|
@@ -95,9 +95,21 @@
|
|
|
tool-class="ele-toolbar-actions"
|
|
tool-class="ele-toolbar-actions"
|
|
|
max-height="360px"
|
|
max-height="360px"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template v-slot:produceRoutingName="{ row }">
|
|
|
|
|
+ <el-select v-model="row.produceRoutingId" filterable size="mini">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item of routingList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.name"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<template v-slot:requiredFormingNum="{ row }">
|
|
<template v-slot:requiredFormingNum="{ row }">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-if="row.isManual"
|
|
|
|
|
|
|
+ v-if="row.resourceType"
|
|
|
|
|
+ size="mini"
|
|
|
v-model.number="row.requiredFormingNum"
|
|
v-model.number="row.requiredFormingNum"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
<span v-else>{{ row.requiredFormingNum }}</span>
|
|
<span v-else>{{ row.requiredFormingNum }}</span>
|
|
@@ -117,7 +129,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { deepClone } from '@/utils';
|
|
import { deepClone } from '@/utils';
|
|
|
import { getBom } from '@/api/productionPlan/index.js';
|
|
import { getBom } from '@/api/productionPlan/index.js';
|
|
|
-
|
|
|
|
|
|
|
+ import { routeList } from '@/api/saleOrder';
|
|
|
import EquipmentDialog from './EquipmentDialog.vue';
|
|
import EquipmentDialog from './EquipmentDialog.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -145,6 +157,7 @@
|
|
|
{ code: 3, name: '装配' }
|
|
{ code: 3, name: '装配' }
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
|
|
+ routingList: [],
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
|
columnKey: 'selection',
|
|
columnKey: 'selection',
|
|
@@ -263,6 +276,7 @@
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
prop: 'produceRoutingName',
|
|
prop: 'produceRoutingName',
|
|
|
|
|
+ slot: 'produceRoutingName',
|
|
|
label: '工艺路线',
|
|
label: '工艺路线',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
minWidth: 120
|
|
minWidth: 120
|
|
@@ -287,6 +301,7 @@
|
|
|
this.formData = deepClone(row);
|
|
this.formData = deepClone(row);
|
|
|
|
|
|
|
|
this.getBomList();
|
|
this.getBomList();
|
|
|
|
|
+ this.getRouteListFn();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
getBomList() {
|
|
getBomList() {
|
|
@@ -322,7 +337,7 @@
|
|
|
produceRoutingName: '',
|
|
produceRoutingName: '',
|
|
|
requiredFormingNum: _num,
|
|
requiredFormingNum: _num,
|
|
|
unit: this.unit,
|
|
unit: this.unit,
|
|
|
- isManual: false
|
|
|
|
|
|
|
+ resourceType: 0
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
this.jhList = _arr;
|
|
this.jhList = _arr;
|
|
@@ -351,7 +366,7 @@
|
|
|
produceRoutingName: '',
|
|
produceRoutingName: '',
|
|
|
requiredFormingNum: '',
|
|
requiredFormingNum: '',
|
|
|
unit: this.unit,
|
|
unit: this.unit,
|
|
|
- isManual: true
|
|
|
|
|
|
|
+ resourceType: 1
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -363,7 +378,40 @@
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- confirm() {}
|
|
|
|
|
|
|
+ getRouteListFn() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: -1
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ routeList(params).then((res) => {
|
|
|
|
|
+ this.routingList = res?.list || [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ confirm() {
|
|
|
|
|
+ let bol = this.jhList.every((m) => m.produceRoutingId);
|
|
|
|
|
+ if (!bol) {
|
|
|
|
|
+ return this.$message.warning('请选择工艺路线');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let bol2 = this.jhList.every((m) => m.requiredFormingNum);
|
|
|
|
|
+ if (!bol2) {
|
|
|
|
|
+ return this.$message.warning('请填写生产数量');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ addPOList: this.jhList,
|
|
|
|
|
+ produceType: this.formData.produceType,
|
|
|
|
|
+ id: this.formData.id
|
|
|
|
|
+ };
|
|
|
|
|
+ return false
|
|
|
|
|
+ batchSave(param).then((res) => {
|
|
|
|
|
+
|
|
|
|
|
+ this.$emit('close', true);
|
|
|
|
|
+ this.visible = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|