Commit 4c91c553 authored by 沈翠玲's avatar 沈翠玲

修复bug

parent c4316004
......@@ -2022,8 +2022,8 @@ export default {
});
},
getWorkorderWithSizeAndDirective(item, index) {
this.$u.api
async getWorkorderWithSizeAndDirective(item, index) {
await this.$u.api
.getWorkorderWithSizeAndDirective({
pageNum: 1,
pageSize: 10,
......@@ -2031,7 +2031,7 @@ export default {
taskWorkunitId: item.taskWorkunitId,
processId: item.processId
})
.then((res) => {
.then(async (res) => {
item.workorderList = res.rows;
//如果只关联一个订单,默认选中
if (res.rows.length == 1) {
......@@ -2043,7 +2043,7 @@ export default {
item.unitOfConvert = res.rows[0].unitOfConvert;
if ((!item.isPackage || item.isPackage !== '1') && (!item.taskType || item.taskType !== 3)) {
// 请求了证明了中间的报工
this.$u.api.quantitywaitsum({
await this.$u.api.quantitywaitsum({
workorderCode: item.workorderCode,
taskWorkunitId: item.taskWorkunitId
}).then((res) => {
......@@ -2052,7 +2052,6 @@ export default {
item.workorderFeedbackSum = res.data.workorderFeedbackSum
item.workorderUnfeedbackSum = res.data.workorderUnfeedbackSum
item.overFeedback = res.data.overFeedback
this.$set(this.feedbackForms, index, item)
}
})
}
......@@ -2087,6 +2086,9 @@ export default {
item.encasementNum = res.rows[0].usageEncasementNum ? res.rows[0].usageEncasementNum : 0;
this.getWorkorderDirectiveList(res.rows[0].workorderId, index);
}
this.feedbackForms.push(item);
}).catch(() => {
this.feedbackForms.push(item);
});
},
......@@ -2315,7 +2317,7 @@ export default {
this.printTemplateData.printTemplate = this.$refs.printTemplateRef.tableSelectData[0].name;
this.printTemplateVisible = false;
},
doFeedback() {
async doFeedback() {
// this.reset();
this.feedbackUnQuantityFu = 0;
this.feedbackQuantityFu = 0;
......@@ -2339,7 +2341,7 @@ export default {
feedbackChannel: 'PAD',
quantity: item.quantity,
quantityQualify: item.quantityWait, //默认为排产数量-合格数-不合格数
//默认为排产数量-合格数-不合格数
quantityUnqualify: 0,
reportQualify: item.quantityQualify + item.quantityUnqualify,
printName: '',
......@@ -2421,6 +2423,7 @@ export default {
encasementNum: 0,
mergePack: 0
};
feedback.quantityQualify = item.quantityWait
if(feedback.taskType && feedback.taskType === 3) {
feedback.quantityQualify = item.quantity - item.quantityQualify - item.quantityUnqualify
feedback.quantityUnqualify = item.quantityUnqualify
......@@ -2441,9 +2444,7 @@ 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;
......@@ -2465,11 +2466,9 @@ export default {
workorderId: row.workorderId
})
.then((res) => {
console.log(res, '88999res');
this.getWorkorderDirectiveLoading = false;
if (res.code === 200) {
this.copyFeedBackForms = JSON.parse(JSON.stringify(this.feedbackForms));
console.log(this.copyFeedBackForms, 'this.copyFeedBackForms88999');
if (res.data.directiveList) {
row.tableDirectiveData = res.data.directiveList.map((item) => {
return {
......@@ -2520,19 +2519,16 @@ export default {
}
} else {
if (flag) {
console.log(this.copyFeedBackForms, 'this.copyFeedBackForms');
// this.$set(this.feedbackForms, index, this.copyFeedBackForms[index])
this.$set(this.feedbackForms[index], 'packNum', this.copyFeedBackForms[index].packNum);
this.$set(this.feedbackForms[index], 'encasementNum', this.copyFeedBackForms[index].encasementNum);
this.$set(this.feedbackForms[index], 'mergePack', this.copyFeedBackForms[index].mergePack);
console.log(this.feedbackForms[index], '889row');
}
row.tableDirectiveData = [];
row.tableSizeData = []
row.tableOrderData = [];
row.listTabPro = [
];
console.log(88999);
}
});
},
......@@ -2636,7 +2632,6 @@ export default {
workorderId: id
})
.then((res) => {
console.log(res, '88999resSize');
let columns = [];
if (res.code === 200) {
for (const key in res.data.columns) {
......@@ -2712,7 +2707,6 @@ export default {
this.feedbackQuantityFu = 0;
this.proVisible = false;
this.timeTest.isshow = false;
console.log('this.feedbackForms', this.feedbackForms)
this.feedbackForms.forEach((item) => {
if (item.quantity === 0 || item.quantity === null) {
this.$u.toast('请填写合格/不合格产品数量!');
......@@ -2721,7 +2715,6 @@ export default {
// if (item.lastProcess) {
// //最后工序
// }
console.log(this.vuex_printConnect, 'this.vuex_printConnect');
if ((item.printTemplate || item.whether == '1') && !this.vuex_printConnect) {
this.$u.toast('打印机连接失败');
return;
......@@ -2782,7 +2775,6 @@ export default {
});
}
let workunitName='';
console.log(item.taskId);
if (item.whether == '1') {
this.$u.api.getNextProcess({taskId:item.taskId}).then(workunit =>{
workunitName=workunit.data.workunitName;
......
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