Commit 7abaee5e authored by chenzj's avatar chenzj

设置首页所有按钮只能操作一个任务

parent c17b34fc
......@@ -1713,6 +1713,10 @@ export default {
break;
case 'StartTask':
let status = false;
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.tableSelectData.forEach((item) => {
if (item.status === 'BEGINNING') {
status = true;
......@@ -1736,14 +1740,26 @@ export default {
case 'StopTask':
this.stopCause();
this.stopReason = '';
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.stopReasonVisible = true;
break;
case 'FinshTask':
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.tableSelectData.forEach((item) => {
this.changeStatus(item.taskId, item.taskWorkunitId, 'FINISHED', item.workunitId);
});
break;
case 'Prod':
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
if (this.tableSelectData[0].status === 'PREPARE') {
this.$u.toast('工序未开工');
return;
......@@ -1803,6 +1819,10 @@ export default {
this.jobAssignmentForm.workunitName = this.$refs.workunitRef.tableSelectData[0].workunitName;
},
doEditProd(){
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
// console.log('vuex_workstation', this.$store.state.vuex_workunit)
const datas = Object.assign({}, this.tableSelectData[0]);
this.$refs['editFeeding'].getList().then(() => {
......@@ -1825,6 +1845,7 @@ export default {
},
async knifeTempShow() {
if (this.tableSelectData.length > 1) {
this.$u.toast('不允许同时操作多条任务');
return;
}
const params = {
......@@ -2719,6 +2740,10 @@ export default {
},
doException() {
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.ExceptionForms = {
abnormalType: null,
abnormalReason: null
......@@ -2869,7 +2894,11 @@ export default {
});
},
feedingInspectionShow() {
this.feedingInspectionVisible = true;
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.feedingInspectionVisible = true;
this.getPemissionScan();
this.feedingInspectionLoadAndScan();
},
......@@ -2921,6 +2950,10 @@ export default {
});
},
recoilMaterialShow() {
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.recoilMaterialVisible = true;
this.getPemissionScan();
this.recoilMaterialLoadAndScan();
......@@ -3062,6 +3095,10 @@ export default {
});
},
viewiPctureShow() {
if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务');
return;
}
this.materialReturn = true;
// this.viewSopPicture = this.tableSelectData[0];
const taskInfo = this.tableSelectData[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment