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 @@
:localdata="curTaskInfo.workorderOption"></uni-data-select>
</u-form-item>
</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-form>
......@@ -1170,7 +1176,8 @@ export default {
depletionMethod: 1
},
curTaskInfo: {
pickingReason: null
pickingReason: null,
returnReason: null,
},
buttonShow: null,
currentType: 0,
......@@ -1329,6 +1336,7 @@ export default {
viewSop: [],
causeList: [],
reasonList: [],
reasonReturnList: [],
workorderList: [],
materialUsageRecordList: [],
materialusagerecordLoading: false,
......@@ -1743,6 +1751,7 @@ export default {
break;
case 'MaterialReturn':
this.materialReturnShow();
this.pickingCauses();
break;
case 'StockIn':
this.stockInShow();
......@@ -2021,6 +2030,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) {
await this.$u.api
......@@ -2910,6 +2936,10 @@ export default {
},
materialRequestShow() {
if(this.tableSelectData.length>1){
this.$u.toast("不允许同时操作多条数据");
return;
}
this.materialRequestVisible = true;
const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0];
......@@ -2986,6 +3016,10 @@ export default {
},
materialReturnShow() {
const t = this;
if(this.tableSelectData.length>1){
t.$u.toast("不允许同时操作多条数据");
return;
}
this.materialReturnVisible = true;
const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0];
......@@ -3085,6 +3119,11 @@ export default {
});
},
async materialReturnSave() {
if (!this.curTaskInfo.returnReason) {
this.materialReturnVisible = true;
this.$u.toast('原因不能为空!');
return;
}
await this.formatDateRandom()
let a=null;
const taskInfo = this.tableSelectData[0];
......@@ -3099,7 +3138,8 @@ export default {
batchNo: s.batchCode,
packNo: s.packNo,
applyNo: this.applyNo,
isQualified: s.isQualified
isQualified: s.isQualified,
returnReason: this.curTaskInfo.returnReason,
};
a=a+s.applyNum;
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