Commit edce21e5 authored by 黄卓's avatar 黄卓

入仓

parent b58a0ec1
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material"></dict-selector> <dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="入仓时间"> <el-form-item label="入仓时间">
<el-date-picker v-model="form.time" type="datetime" placeholder="请选择入仓时间"></el-date-picker> <el-date-picker v-model="form.inTime" type="datetime" placeholder="请选择入仓时间"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -51,51 +51,51 @@ ...@@ -51,51 +51,51 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table <el-table
:data="warehousingInNewList" :data="form.orderWarehouseInItemDoList"
style="width: 100%"> style="width: 100%">
<el-table-column label="箱数"> <el-table-column label="箱数">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input> <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>
</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}">
<el-input v-model="warehousingInNewList[$index].boxGauge" placeholder=""></el-input> <el-input v-model="form.orderWarehouseInItemDoList[$index].boxGauge" placeholder=""></el-input>
</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="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>--> <!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </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="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>--> <!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </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="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>--> <!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>--> <!-- </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}">
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>--> <el-input v-model="form.orderWarehouseInItemDoList[$index].volume" placeholder=""></el-input>
<!-- </template>--> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<!-- <template v-slot="{r,c,$index}">--> <template v-slot="{r,c,$index}">
<!-- <el-input v-model="warehousingInNewList[$index].cartonsNum" placeholder=""></el-input>--> <el-input v-model="form.orderWarehouseInItemDoList[$index].weight" placeholder=""></el-input>
<!-- </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}">
<el-input v-model="warehousingInNewList[$index].quantityAll" placeholder=""></el-input> <el-input v-model="form.orderWarehouseInItemDoList[$index].quantityAll" placeholder=""></el-input>
</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}">
<el-input v-model="warehousingInNewList[$index].expressNo" placeholder=""></el-input> <el-input v-model="form.orderWarehouseInItemDoList[$index].expressNo" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -147,11 +147,22 @@ export default { ...@@ -147,11 +147,22 @@ export default {
DICT_TYPE, DICT_TYPE,
opened: false, opened: false,
form: { form: {
material: undefined, "brand": "",
inTime: 0 "brandType": 0,
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"type": 0
}, },
// orderItem: {} // orderItem: {}
warehousingInNewList: []
}; };
}, },
...@@ -177,50 +188,47 @@ export default { ...@@ -177,50 +188,47 @@ export default {
methods: { methods: {
handleSubmit() { handleSubmit() {
Promise.all( // Promise.all(
this.warehousingInNewList.map(e => { // this.form.orderWarehouseInItemDoList.map(e => {
return orderWarehouseIn({ // return orderWarehouseIn({
...e, // ...e,
inTime: this.form.inTime, // inTime: this.form.inTime,
material: this.form.material, // material: this.form.material,
brandType: this.warehousing.brandType, // brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId, // orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId, // orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo // orderNo: this.warehousing.orderNo
}) // })
}) // })
).then(() => { // ).then(() => {
// this.handleClose()
// })
return orderWarehouseIn({
...this.form,
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() this.handleClose()
}) })
}, },
handleClose() { handleClose() {
this.warehousingInNewList = [] this.form.orderWarehouseInItemDoList = []
this.opened = false this.opened = false
}, },
handleDelete() { handleDelete() {
this.warehousingInNewList.pop() this.form.orderWarehouseInItemDoList.pop()
}, },
handleAdd() { handleAdd() {
this.warehousingInNewList.push({ this.form.orderWarehouseInItemDoList.push({
"boxGauge": "", "boxGauge": "",
"brand": "",
"brandType": 0,
"cartonsNum": 0, "cartonsNum": 0,
"expressNo": "", "expressNo": "",
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"prodAttrIds": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"quantityAll": 0, "quantityAll": 0,
"type": 0, "unit": "",
"unit": "package",
"volume": 0, "volume": 0,
"weight": 0 "weight": 0
}) })
......
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