Commit 453ce16c authored by 沈翠玲's avatar 沈翠玲

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-pad into dev

parents 5aa16f3f bc080d78
...@@ -447,6 +447,29 @@ ...@@ -447,6 +447,29 @@
</view> </view>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6" v-if="!isWaiXie" v-show="!buttonShow || buttonShow.MaterialReturnView === '1'">
<u-form-item label="退料:" prop="returnMa">
<view class="uni-list-item__extra">
<u-radio-group v-model="feedback.returnMa">
<u-radio :name="1"></u-radio>
<u-radio :name="0"></u-radio>
</u-radio-group>
</view>
</u-form-item>
</u-col>
<u-col span="6" v-if="feedback.returnMa===1" >
<u-form-item label="打印二维码">
<u-input v-model="materialReturnFormData.number"></u-input>
</u-form-item>
</u-col>
<u-col span="6" v-if="feedback.returnMa===1">
<u-form-item label="退料原因" prop="returnReason">
<uni-data-select v-model="curTaskInfo.returnReason" :localdata="reasonReturnList"
@change="pickingCauses"></uni-data-select>
</u-form-item>
</u-col>
</u-row>
<!-- <u-row> --> <!-- <u-row> -->
...@@ -1985,10 +2008,15 @@ export default { ...@@ -1985,10 +2008,15 @@ export default {
return; return;
} }
if(this.isWaiXie) { if(this.isWaiXie) {
this.assistFeed()
this.assistFeed();
} else { } else {
this.doFeedback(); this.doFeedback();
} }
this.materialReturnShows();
this.pickingCauses();
break; break;
case 'editProd': case 'editProd':
this.doEditProd(); this.doEditProd();
...@@ -2199,9 +2227,13 @@ export default { ...@@ -2199,9 +2227,13 @@ export default {
stopReasonChange(e) { stopReasonChange(e) {
this.stopReason += e; this.stopReason += e;
}, },
workorderSelect(id, index) { workorderSelect(id, index,s) {
const t = this;
console.log(id, '9999'); console.log(id, '9999');
const row = this.feedbackForms[index]; const row = this.feedbackForms[index];
const tem = row.workorderOption.find(v =>v.value===id);
console.log(tem)
const taskInfo = this.tableSelectData[0];
const items = row.workorderList.find((item) => item.workorderId === id); const items = row.workorderList.find((item) => item.workorderId === id);
if (!id) { if (!id) {
row.packUnitOfMeasure = ''; row.packUnitOfMeasure = '';
...@@ -2242,6 +2274,7 @@ export default { ...@@ -2242,6 +2274,7 @@ export default {
}) })
} }
} }
row.workorderId = id; row.workorderId = id;
row.workorderCode = items.workorderCode; row.workorderCode = items.workorderCode;
row.printName = items.workorderCode; row.printName = items.workorderCode;
...@@ -2249,6 +2282,11 @@ export default { ...@@ -2249,6 +2282,11 @@ export default {
row.printContents = row.workorderCode; row.printContents = row.workorderCode;
row.packByDirective = items.packByDirective; row.packByDirective = items.packByDirective;
row.packBySize = items.packBySize; row.packBySize = items.packBySize;
this.$u.api.listMaterialReturn({ taskId: taskInfo.taskId, workorderCode: tem.text }).then((res) => {
if (res.code === 200) {
t.materialReturnList = res.data;
}
});
}, },
stopReas(abnormalType) { stopReas(abnormalType) {
...@@ -3060,6 +3098,15 @@ export default { ...@@ -3060,6 +3098,15 @@ export default {
this.proVisible = false; this.proVisible = false;
this.timeTest.isshow = false; this.timeTest.isshow = false;
this.feedbackForms.forEach((item) => { this.feedbackForms.forEach((item) => {
if(item.returnMa=='1'){
if (!this.curTaskInfo.returnReason) {
this.$u.toast('原因不能为空!');
this.proVisible = true;
return;
}
this.materialReturnSave();
}
console.log('item.printTemplate', item.printTemplate) console.log('item.printTemplate', item.printTemplate)
if (item.quantity === 0 || item.quantity === null) { if (item.quantity === 0 || item.quantity === null) {
this.$u.toast('请填写合格/不合格产品数量!'); this.$u.toast('请填写合格/不合格产品数量!');
...@@ -3118,7 +3165,7 @@ export default { ...@@ -3118,7 +3165,7 @@ export default {
apires = this.$u.api apires = this.$u.api
.feedback(par) .feedback(par)
} }
apires.then((res) => { apires.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.proVisible = false; this.proVisible = false;
...@@ -3166,6 +3213,7 @@ export default { ...@@ -3166,6 +3213,7 @@ export default {
}); });
}); });
} }
if (!res.msg) { if (!res.msg) {
this.$u.toast('上报成功'); this.$u.toast('上报成功');
} else { } else {
...@@ -3378,6 +3426,20 @@ export default { ...@@ -3378,6 +3426,20 @@ export default {
} }
}); });
}, },
materialReturnShows() {
const t = this;
const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0];
this.curTaskInfo.workorderOption = this.curTaskInfo.proWorkorderList.map((s) => {
return { value: s.workorderCode, text: s.workorderCode };
});
this.$u.api.listMaterialReturn({ taskId: taskInfo.taskId, workorderCode: '' }).then((res) => {
if (res.code === 200) {
t.materialReturnList = res.data;
}
});
},
viewiPctureShow() { viewiPctureShow() {
if(this.tableSelectData.length>1){ if(this.tableSelectData.length>1){
this.$u.toast('不允许同时操作多条任务'); this.$u.toast('不允许同时操作多条任务');
......
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