|
@@ -96,13 +96,13 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:deliveryMethod="{ row }">
|
|
<template v-slot:deliveryMethod="{ row }">
|
|
|
- <el-select clearable class="ele-block" v-model="row.deliveryMethod" placeholder="请选择">
|
|
|
|
|
- <el-option label="一次性到货" :value="1" />
|
|
|
|
|
- <el-option label="分批到货" :value="2" @click.native="handleMethod(row)" />
|
|
|
|
|
|
|
+ <el-select clearable class="ele-block" @change="changeMethod" v-model="row.deliveryMethod" placeholder="请选择">
|
|
|
|
|
+ <el-option label="一次性到货" :value="1" @click.native="row.timeList = null" />
|
|
|
|
|
+ <el-option label="分批到货" :value="2" @click.native="handleMethod(row); row.requireDeliveryTime= null" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:requireDeliveryTime="{ row }">
|
|
|
|
|
|
|
+ <template v-slot:requireDeliveryTime="{ row }" >
|
|
|
<el-date-picker style="width: 100%" clearable v-model="row.requireDeliveryTime" type="date"
|
|
<el-date-picker style="width: 100%" clearable v-model="row.requireDeliveryTime" type="date"
|
|
|
v-if="row.deliveryMethod == 1" value-format="yyyy-MM-dd" placeholder="请选择日期">
|
|
v-if="row.deliveryMethod == 1" value-format="yyyy-MM-dd" placeholder="请选择日期">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -521,6 +521,19 @@ export default {
|
|
|
|
|
|
|
|
if (salesOrderIds.length > 0) {
|
|
if (salesOrderIds.length > 0) {
|
|
|
listBomBySalesOrderIds({ salesOrderIds: salesOrderIds }).then((res) => {
|
|
listBomBySalesOrderIds({ salesOrderIds: salesOrderIds }).then((res) => {
|
|
|
|
|
+
|
|
|
|
|
+ res.forEach(m => {
|
|
|
|
|
+ if(m.materialList.length > 0) {
|
|
|
|
|
+ m.materialList.forEach(p => {
|
|
|
|
|
+ p.detailId = m.id
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
this.$refs.table.setData([...this.tableData, ...res]);
|
|
this.$refs.table.setData([...this.tableData, ...res]);
|
|
|
|
|
|
|
|
this.$refs.table.toggleRowExpansionAll()
|
|
this.$refs.table.toggleRowExpansionAll()
|
|
@@ -572,10 +585,10 @@ export default {
|
|
|
|
|
|
|
|
remove2(row) {
|
|
remove2(row) {
|
|
|
const data = this.$refs.table.getData() ?? [];
|
|
const data = this.$refs.table.getData() ?? [];
|
|
|
- this.formData.materialRemoveIds.push(row.id)
|
|
|
|
|
|
|
+ this.formData.materialRemoveIds.push(row.categoryId)
|
|
|
data.forEach((e) => {
|
|
data.forEach((e) => {
|
|
|
if (row.detailId == e.id) {
|
|
if (row.detailId == e.id) {
|
|
|
- e.materialList = e.materialList.filter((d) => d.id !== row.id);
|
|
|
|
|
|
|
+ e.materialList = e.materialList.filter((d) => d.categoryId !== row.categoryId);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -628,6 +641,7 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+
|
|
|
handleMethod(row) {
|
|
handleMethod(row) {
|
|
|
this.$refs.timeDialogRef.open(row)
|
|
this.$refs.timeDialogRef.open(row)
|
|
|
},
|
|
},
|
|
@@ -641,7 +655,7 @@ export default {
|
|
|
|
|
|
|
|
e.materialList.forEach(m => {
|
|
e.materialList.forEach(m => {
|
|
|
if (m.id == current.id) {
|
|
if (m.id == current.id) {
|
|
|
- m.timeList = timeList
|
|
|
|
|
|
|
+ m.timeList = timeList || null
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|