Commit 0f255876 authored by 张海景's avatar 张海景

update:修改生产工单的逻辑

parent 1a2e761d
......@@ -1942,7 +1942,9 @@ export default {
// this.reset();
console.log(this.dict.type, 'this.dicts.type')
this.feedbackForms = [];
let flagPackage = []
this.tableSelectData.forEach((item, index) => {
flagPackage.push(item.isPackage === '1')
let defQualify = item.quantity - item.quantityQualify - item.quantityUnqualify;
defQualify = defQualify < 0 ? 0 : defQualify;
defQualify = defQualify > item.quantityWait ? item.quantityWait : defQualify;
......@@ -2035,6 +2037,12 @@ export default {
this.getWorkorderWithSizeAndDirective(feedback, index);
this.feedbackForms.push(feedback);
});
console.log(flagPackage, Array.from(new Set(flagPackage)))
if (Array.from(new Set(flagPackage)).length === 2) {
this.$u.toast('包装工序禁止多选报工')
return
}
// 如果选择了包装工序、非包装工序提示:“包装工序禁止多选报工”
this.proVisible = true;
},
// 获取指令列表
......
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