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

修复bug

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