Commit 249bafb0 authored by Marcus's avatar Marcus

长宽高

parent 63294a31
......@@ -50,30 +50,32 @@
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].cartonsNum }}</span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder=""></el-input>
<span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].boxGauge) }}</span>
<span>{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].unit) }}</span>
</template>
</el-table-column>
<el-table-column label="包装类型">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].boxGauge) }}</span>
<!-- <el-input v-else v-model="tableData[$index].boxGauge" placeholder=""></el-input>-->
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData[$index].boxGauge"></dict-selector>
<span v-if="tableData[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGE_TYPE, tableData[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGE_TYPE" v-model="tableData[$index].unit"></dict-selector>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model="tableData[$index].boxGauge1" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model="tableData[$index].boxGauge2" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>-->
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model="tableData[$index].boxGauge3" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}">
......@@ -143,7 +145,15 @@ export default {
mounted() {
getProductBrankPage({pageSize: 100000}).then(r => {
this.brandList = r.data.list
this.brandList = r.data.list.map(e => {
const boxGauge = e.boxGauge
if (boxGauge && boxGauge.length > 0) {
const boxGaugeList = boxGauge.split('*')
const [boxGauge1, boxGauge2, boxGauge3] = boxGaugeList
return {...e, boxGauge1, boxGauge2, boxGauge3}
}
return e
})
})
},
......@@ -203,27 +213,19 @@ export default {
}
},
handleSubmit() {
// Promise.all(
// this.form.orderWarehouseInItemDoList.map(e => {
// return orderWarehouseIn({
// ...e,
// inTime: this.form.inTime,
// material: this.form.material,
// brandType: this.warehousing.brandType,
// orderId: this.warehousing.orderId,
// orderItemId: this.warehousing.orderItemId,
// orderNo: this.warehousing.orderNo
// })
// })
// ).then(() => {
// this.handleClose()
// })
const orderWarehouseInItemDoList = this.form.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
}
})
return orderWarehouseIn({
...this.form,
brandType: this.form.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList
}).then(r => {
if (r.data){
this.$message.success('入仓成功')
......@@ -242,7 +244,9 @@ export default {
},
handleAdd() {
this.form.orderWarehouseInItemDoList.push({
"boxGauge": "",
"boxGauge1": "",
"boxGauge2": "",
"boxGauge3": "",
"cartonsNum": "",
"expressNo": "",
"quantityAll": "",
......
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