Commit d795e7c5 authored by 沈翠玲's avatar 沈翠玲

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

parents 9f0da623 403f60cb
...@@ -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) {
...@@ -2910,6 +2936,10 @@ export default { ...@@ -2910,6 +2936,10 @@ export default {
}, },
materialRequestShow() { materialRequestShow() {
if(this.tableSelectData.length>1){
this.$u.toast("不允许同时操作多条数据");
return;
}
this.materialRequestVisible = true; this.materialRequestVisible = true;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0]; this.curTaskInfo = this.tableSelectData[0];
...@@ -2986,6 +3016,10 @@ export default { ...@@ -2986,6 +3016,10 @@ export default {
}, },
materialReturnShow() { materialReturnShow() {
const t = this; const t = this;
if(this.tableSelectData.length>1){
t.$u.toast("不允许同时操作多条数据");
return;
}
this.materialReturnVisible = true; this.materialReturnVisible = true;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0]; this.curTaskInfo = this.tableSelectData[0];
...@@ -3085,6 +3119,11 @@ export default { ...@@ -3085,6 +3119,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 +3138,8 @@ export default { ...@@ -3099,7 +3138,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