Commit 7abaee5e authored by chenzj's avatar chenzj

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

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