Commit bc080d78 authored by chenzj's avatar chenzj

报工时退料

parent f39d8179
......@@ -447,6 +447,29 @@
</view>
</u-form-item>
</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> -->
......@@ -1985,10 +2008,15 @@ export default {
return;
}
if(this.isWaiXie) {
this.assistFeed()
this.assistFeed();
} else {
this.doFeedback();
}
this.materialReturnShows();
this.pickingCauses();
break;
case 'editProd':
this.doEditProd();
......@@ -2199,9 +2227,13 @@ export default {
stopReasonChange(e) {
this.stopReason += e;
},
workorderSelect(id, index) {
workorderSelect(id, index,s) {
const t = this;
console.log(id, '9999');
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);
if (!id) {
row.packUnitOfMeasure = '';
......@@ -2242,6 +2274,7 @@ export default {
})
}
}
row.workorderId = id;
row.workorderCode = items.workorderCode;
row.printName = items.workorderCode;
......@@ -2249,6 +2282,11 @@ export default {
row.printContents = row.workorderCode;
row.packByDirective = items.packByDirective;
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) {
......@@ -3060,6 +3098,15 @@ export default {
this.proVisible = false;
this.timeTest.isshow = false;
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)
if (item.quantity === 0 || item.quantity === null) {
this.$u.toast('请填写合格/不合格产品数量!');
......@@ -3118,7 +3165,7 @@ export default {
apires = this.$u.api
.feedback(par)
}
apires.then((res) => {
if (res.code === 200) {
this.proVisible = false;
......@@ -3166,6 +3213,7 @@ export default {
});
});
}
if (!res.msg) {
this.$u.toast('上报成功');
} else {
......@@ -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() {
if(this.tableSelectData.length>1){
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