优化
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
append-to-body
|
||||
width="500px"
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:before-close="handleClose"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@@ -93,6 +94,7 @@ export default {
|
||||
outForm: { formula_qty: null, sys_qty: null, fact_qty: null, put_qty: null },
|
||||
error_rate1: null,
|
||||
error_rate2: null,
|
||||
fullscreenLoading: false,
|
||||
openType: null,
|
||||
confirm_type: null,
|
||||
dialogVisible: false
|
||||
@@ -146,10 +148,14 @@ export default {
|
||||
'error_rate1': this.error_rate1,
|
||||
'error_rate2': this.error_rate2
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.sendMaterConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.$parent.$parent.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 物料确认
|
||||
@@ -160,10 +166,14 @@ export default {
|
||||
'error_rate1': this.error_rate1,
|
||||
'error_rate2': this.error_rate2
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.materConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.$parent.$parent.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 配粉确认
|
||||
@@ -174,12 +184,16 @@ export default {
|
||||
'error_rate1': this.error_rate1,
|
||||
'error_rate2': this.error_rate2
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.flourConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.dialogVisible = false
|
||||
this.$parent.$parent.close()
|
||||
// this.close()
|
||||
this.$parent.$parent.$parent.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
title="出库确认"
|
||||
append-to-body
|
||||
width="500px"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
destroy-on-close
|
||||
@@ -67,6 +68,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
outForm: {},
|
||||
fullscreenLoading: false,
|
||||
error_rate: null,
|
||||
dialogVisible: false
|
||||
}
|
||||
@@ -88,10 +90,14 @@ export default {
|
||||
'form': this.outForm,
|
||||
'error_rate': this.error_rate
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.outConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('出库成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.$parent.$parent.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="closeView"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:visible.sync="dialogVisible"
|
||||
@open="openView"
|
||||
>
|
||||
@@ -290,6 +291,7 @@ export default {
|
||||
return {
|
||||
fla: false,
|
||||
form: {},
|
||||
fullscreenLoading: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
dtlJson: null,
|
||||
@@ -361,6 +363,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.fullscreenLoading = true
|
||||
const data = {
|
||||
'device_id': this.form.device_id,
|
||||
'formula_id': this.form.formula_id
|
||||
@@ -368,6 +371,7 @@ export default {
|
||||
this.fla = true
|
||||
crudFlourwork.autoCalledMater(data).then(res => {
|
||||
const num = res.task
|
||||
this.fullscreenLoading = false
|
||||
if (num === undefined) {
|
||||
this.crud.notify('叫料成功,生成0个任务', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
} else {
|
||||
@@ -376,6 +380,7 @@ export default {
|
||||
this.fla = false
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
@@ -388,6 +393,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.fullscreenLoading = true
|
||||
if (this.dtlJson === null) {
|
||||
return this.crud.notify('请选择明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
@@ -406,10 +412,12 @@ export default {
|
||||
}
|
||||
this.fla = true
|
||||
crudFlourwork.calledMater(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.fla = false
|
||||
this.crud.notify('叫料成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
@@ -449,12 +457,15 @@ export default {
|
||||
'device_id': this.form.device_id
|
||||
}
|
||||
this.fla = true
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.startWork(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.openView()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fla = false
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
if (arr[i].status === '10') {
|
||||
@@ -493,12 +504,15 @@ export default {
|
||||
'device_id': this.form.device_id
|
||||
}
|
||||
this.fla = true
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.again(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
this.fla = false
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
@@ -515,8 +529,12 @@ export default {
|
||||
const data = {
|
||||
'form': this.disJson
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.outConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('出库成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 投料确认按钮
|
||||
@@ -536,9 +554,13 @@ export default {
|
||||
const data = {
|
||||
'form': this.disJson
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.sendMaterConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
@@ -564,9 +586,13 @@ export default {
|
||||
const data = {
|
||||
'form': this.dtlJson
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.materConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
@@ -591,9 +617,13 @@ export default {
|
||||
const data = {
|
||||
'form': this.form
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.flourConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
@@ -612,9 +642,13 @@ export default {
|
||||
return this.crud.notify('已出库,不能删除!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = this.disJson
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.delDtlTask(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.refresh()
|
||||
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="closeView"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:visible.sync="dialogVisible"
|
||||
@open="openView"
|
||||
>
|
||||
@@ -251,6 +252,7 @@ export default {
|
||||
isSuccess: true,
|
||||
path: 'ws://localhost:8010/webSocket/10',
|
||||
webSocketResult: {},
|
||||
fullscreenLoading: false,
|
||||
form: {},
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
@@ -327,8 +329,12 @@ export default {
|
||||
if (this.dtlJson.is_need_move !== '是') {
|
||||
return this.crud.notify('选择物料必须为需要移库', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.calledMater(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('叫料成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
startWork() {
|
||||
@@ -339,9 +345,13 @@ export default {
|
||||
return this.crud.notify('选择配方明细物料状态必须为生成状态', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = this.dtlJson
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.startWork(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.openView()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 出库确认按钮
|
||||
@@ -428,9 +438,13 @@ export default {
|
||||
return this.crud.notify('已出库,不能删除!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = this.disJson
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.delDtlTask(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.refresh()
|
||||
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// websocket 监控
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<el-dialog
|
||||
title="配粉作业"
|
||||
append-to-body
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
fullscreen
|
||||
:before-close="closeView"
|
||||
:visible.sync="dialogVisible"
|
||||
@@ -258,6 +259,7 @@ export default {
|
||||
form: {},
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
fullscreenLoading: false,
|
||||
dtlJson: null,
|
||||
disJson: null,
|
||||
dialogVisible: false
|
||||
@@ -332,8 +334,12 @@ export default {
|
||||
if (this.form.status !== '30') {
|
||||
return this.crud.notify('配方状态必须为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.autoCalledMater(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('叫料成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
calledMater() {
|
||||
@@ -353,8 +359,12 @@ export default {
|
||||
if (this.dtlJson.is_need_move !== '1') {
|
||||
return this.crud.notify('选择物料必须为需要移库', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.calledMater(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('叫料成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
startWork() {
|
||||
@@ -393,8 +403,12 @@ export default {
|
||||
const data = {
|
||||
'form': this.disJson
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.outConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('出库成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 投料确认按钮
|
||||
@@ -408,9 +422,13 @@ export default {
|
||||
const data = {
|
||||
'form': this.disJson
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.sendMaterConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 物料确认按钮
|
||||
@@ -428,9 +446,13 @@ export default {
|
||||
const data = {
|
||||
'form': this.dtlJson
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.materConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 配粉确认按钮
|
||||
@@ -447,9 +469,13 @@ export default {
|
||||
const data = {
|
||||
'form': this.form
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.flourConfirm(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.refresh()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
delDtlTask() {
|
||||
@@ -460,9 +486,13 @@ export default {
|
||||
return this.crud.notify('已出库,不能删除!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = this.disJson
|
||||
this.fullscreenLoading = true
|
||||
crudFlourwork.delDtlTask(data).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.refresh()
|
||||
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
statusName1(row, column) {
|
||||
|
||||
Reference in New Issue
Block a user