Commit 249bafb0 authored by Marcus's avatar Marcus

长宽高

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