Commit 44b728e0 authored by chenzj's avatar chenzj

领料申请新增领料原因

parent 98929435
......@@ -434,16 +434,21 @@
<view class="list-bar">
<u-form label-width="100px" :model="curTaskInfo">
<u-row>
<u-col span="6">
<u-col span="4">
<u-form-item label="编排单号">
{{ curTaskInfo.arrangeCode }}
</u-form-item>
</u-col>
<u-col span="6">
<u-col span="4">
<u-form-item label="生产工单" prop="workorderCode">
<uni-data-select v-model="curTaskInfo.workorderCode" @change="materialReturnWorkorderProcessItem" :localdata="curTaskInfo.workorderOption"></uni-data-select>
</u-form-item>
</u-col>
<u-col span="4">
<u-form-item label="领料原因" prop="pickingReason">
<uni-data-select v-model="curTaskInfo.pickingReason" :localdata="reasonList" @change="pickingCause"></uni-data-select>
</u-form-item>
</u-col>
</u-row>
</u-form>
<scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
......@@ -819,7 +824,9 @@ export default {
operatorTime: '',
depletionMethod: 1
},
curTaskInfo: {},
curTaskInfo: {
pickingReason: null
},
currentType: 0,
bomFeeData: [],
bomFeeColumn: [
......@@ -963,6 +970,7 @@ export default {
viewSop: [],
reasonList: [],
causeList: [],
reasonList: [],
workorderList: [],
materialUsageRecordList: [],
materialusagerecordLoading: false,
......@@ -1221,6 +1229,7 @@ export default {
break;
case 'MaterialRequest':
this.materialRequestShow();
this.pickingCause();
break;
case 'MaterialReturn':
this.materialReturnShow();
......@@ -1431,6 +1440,25 @@ export default {
});
});
},
pickingCause() {
// 查询原因
this.$u.api.abnormal
.detail({
pageNum: 1,
pageSize: 10,
abnormalType: 'REASON'
})
.then((res) => {
this.reasonList = res.rows.map((item) => {
return {
value: item.abnormalReason,
text: item.abnormalReason
};
});
});
},
getWorkorderWithSizeAndDirective(item, index) {
this.$u.api
.getWorkorderWithSizeAndDirective({
......@@ -1995,6 +2023,11 @@ export default {
this.materialRequestFormVisible = false;
},
materialRequestSave() {
if(!this.curTaskInfo.pickingReason){
this.materialRequestVisible = true
this.$u.toast("原因不能为!")
return
}
const rst = [];
const taskInfo = this.tableSelectData[0];
const t = this;
......@@ -2003,6 +2036,7 @@ export default {
this.materialRequestArrays.forEach((s) => {
if (s.applyNum != null) {
rst.push({
pickingReason: this.curTaskInfo.pickingReason,
itemId: s.itemId,
taskWorkunitId: this.curTaskInfo.taskWorkunitId,
workorderCode: items?.text,
......
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