Commit 44b728e0 authored by chenzj's avatar chenzj

领料申请新增领料原因

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