Commit 23830c63 authored by Marcus's avatar Marcus

入仓部分细节补充

parent 19322c62
......@@ -3,7 +3,7 @@
<el-descriptions border v-if="order.orderId">
<el-descriptions-item label="唛头">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item label="已到箱数">{{ order.sumNum }}</el-descriptions-item>
<el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" /></el-descriptions-item>
<el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item>
<el-descriptions-item label="送货时间">{{ order.consigneeVO && order.consigneeVO.deliveryDate || '' }}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag>
......@@ -41,6 +41,12 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red{
color: $--color-danger;
}
.green{
color: $--color-success;
}
</style>
......@@ -20,7 +20,7 @@
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.titleZh">
:value="item.id">
</el-option>
</el-select>
</el-descriptions-item>
......@@ -61,37 +61,39 @@
<el-table-column label="长(cm)">
<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>
<el-input v-else v-model.number="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<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>
<el-input v-else v-model.number="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<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>
<el-input v-else v-model.number="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span>
<el-input v-else v-model="tableData[$index].volume" placeholder=""></el-input>
<el-input v-else v-model.number="tableData[$index].volume" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span>
<el-input v-else v-model="tableData[$index].weight" placeholder=""></el-input>
<el-input v-else v-model.number="tableData[$index].weight" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column label="数量">
<template v-slot="{r,c,$index}">
<span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span>
<el-input v-else v-model="tableData[$index].quantityAll" placeholder=""></el-input>
<el-input v-else v-model.number="tableData[$index].quantityAll" placeholder="">
<template slot="append"></template>
</el-input>
</template>
</el-table-column>
<el-table-column label="快递单号">
......@@ -145,6 +147,9 @@ export default {
mounted() {
getProductBrankPage({pageSize: 100000}).then(r => {
this.brandList = r.data.list.map(e => {
if(e.id){
e.id = e.id.toString()
}
const boxGauge = e.boxGauge
if (boxGauge && boxGauge.length > 0) {
const boxGaugeList = boxGauge.split('*')
......@@ -204,6 +209,14 @@ export default {
},
methods: {
handleVolume(index){
const {boxGauge1, boxGauge2, boxGauge3} = this.tableData[index]
if (boxGauge1 && boxGauge2 && boxGauge3) {
this.tableData[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000).toFixed(2)
} else {
this.tableData[index].volume = 0
}
},
handleSubmit() {
const orderWarehouseInItemDoList = this.form.orderWarehouseInItemDoList.map(e => {
return {
......
......@@ -57,7 +57,7 @@
prop="diffType"
v-slot="{row}"
label="状态">
<dict-tag :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" />
<dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{green: row.warehouseInInfoVO.diffType === 4}"/>
</el-table-column>
<el-table-column
prop="address"
......@@ -290,6 +290,12 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red{
color: $--color-danger;
}
.green{
color: $--color-success;
}
</style>
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