Commit 9dc392aa authored by chenzj's avatar chenzj

退料申请新增一个退料原因

parent 03fff270
...@@ -790,6 +790,12 @@ ...@@ -790,6 +790,12 @@
:localdata="curTaskInfo.workorderOption"></uni-data-select> :localdata="curTaskInfo.workorderOption"></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4">
<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-form> </u-form>
...@@ -1170,7 +1176,8 @@ export default { ...@@ -1170,7 +1176,8 @@ export default {
depletionMethod: 1 depletionMethod: 1
}, },
curTaskInfo: { curTaskInfo: {
pickingReason: null pickingReason: null,
returnReason: null,
}, },
buttonShow: null, buttonShow: null,
currentType: 0, currentType: 0,
...@@ -1329,6 +1336,7 @@ export default { ...@@ -1329,6 +1336,7 @@ export default {
viewSop: [], viewSop: [],
causeList: [], causeList: [],
reasonList: [], reasonList: [],
reasonReturnList: [],
workorderList: [], workorderList: [],
materialUsageRecordList: [], materialUsageRecordList: [],
materialusagerecordLoading: false, materialusagerecordLoading: false,
...@@ -1743,6 +1751,7 @@ export default { ...@@ -1743,6 +1751,7 @@ export default {
break; break;
case 'MaterialReturn': case 'MaterialReturn':
this.materialReturnShow(); this.materialReturnShow();
this.pickingCauses();
break; break;
case 'StockIn': case 'StockIn':
this.stockInShow(); this.stockInShow();
...@@ -2020,6 +2029,23 @@ export default { ...@@ -2020,6 +2029,23 @@ export default {
}; };
}); });
}); });
},
pickingCauses() {
// 查询原因
this.$u.api.abnormal
.detail({
pageNum: 1,
pageSize: 10,
abnormalType: 'RETURN_REASON'
})
.then((res) => {
this.reasonReturnList = res.rows.map((item) => {
return {
value: item.abnormalReason,
text: item.abnormalReason
};
});
});
}, },
async getWorkorderWithSizeAndDirective(item, index) { async getWorkorderWithSizeAndDirective(item, index) {
...@@ -3085,6 +3111,11 @@ export default { ...@@ -3085,6 +3111,11 @@ export default {
}); });
}, },
async materialReturnSave() { async materialReturnSave() {
if (!this.curTaskInfo.returnReason) {
this.materialReturnVisible = true;
this.$u.toast('原因不能为空!');
return;
}
await this.formatDateRandom() await this.formatDateRandom()
let a=null; let a=null;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
...@@ -3099,7 +3130,8 @@ export default { ...@@ -3099,7 +3130,8 @@ export default {
batchNo: s.batchCode, batchNo: s.batchCode,
packNo: s.packNo, packNo: s.packNo,
applyNo: this.applyNo, applyNo: this.applyNo,
isQualified: s.isQualified isQualified: s.isQualified,
returnReason: this.curTaskInfo.returnReason,
}; };
a=a+s.applyNum; a=a+s.applyNum;
if (this.materialReturnFormData.workorderCode) { if (this.materialReturnFormData.workorderCode) {
......
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