Commit 67704ace authored by dragondean@qq.com's avatar dragondean@qq.com

完善订单拆单

parent 89474e23
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="收费体积(m³)"> <!--<el-table-column label="收费体积(m³)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('收费体积') }}</span>(m³) <span style="color: red">*</span> <span>{{ $t('收费体积') }}</span>(m³)
</template> </template>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.chargeVolume"/> <el-input-number controls-position="right" :min="0" class="w-100 tight" v-model="row.chargeVolume"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column label="入仓重量(Kg)"> <el-table-column label="入仓重量(Kg)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('入仓重量') }}</span>(Kg) <span style="color: red">*</span> <span>{{ $t('入仓重量') }}</span>(Kg)
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="收费重量(Kg)"> <!--<el-table-column label="收费重量(Kg)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('收费重量') }}</span>(Kg) <span style="color: red">*</span> <span>{{ $t('收费重量') }}</span>(Kg)
</template> </template>
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<el-input-number controls-position="right" :min="0" class="w-75 tight" v-model="row.chargeWeight" type="number"/> <el-input-number controls-position="right" :min="0" class="w-75 tight" v-model="row.chargeWeight" type="number"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column :label="$t('数量')" width="130px"> <el-table-column :label="$t('数量')" width="130px">
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<el-form-item label-width="0" <el-form-item label-width="0"
...@@ -270,7 +270,6 @@ export default { ...@@ -270,7 +270,6 @@ export default {
// 最低0.01 // 最低0.01
volume = Math.max(0.01, volume.toNumber().toFixed(2)) volume = Math.max(0.01, volume.toNumber().toFixed(2))
this.$set(row, 'volume', volume) this.$set(row, 'volume', volume)
this.$set(row, 'chargeVolume', volume)
}, },
// 获取储位名称 // 获取储位名称
getLocationName(locationArr){ getLocationName(locationArr){
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
</el-dialog> </el-dialog>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="$t('放入品名')" :visible.sync="shopOpen" width="1500px" append-to-body> <el-dialog :title="$t('放入品名')" :visible.sync="shopOpen" width="1500px" append-to-body>
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="120px" size="mini"> <el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="120px" inline>
<el-form-item :label="$t('中文品名')"> <el-form-item :label="$t('中文品名')">
<el-select v-model="shopForm.orderItemId" :placeholder="$t('请选择中文品名')"> <el-select v-model="shopForm.orderItemId" :placeholder="$t('请选择中文品名')">
<el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleZh" :value="item.orderItemId" :key="item.prodTitleZh" ></el-option> <el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleZh" :value="item.orderItemId" :key="item.prodTitleZh" ></el-option>
...@@ -254,78 +254,67 @@ ...@@ -254,78 +254,67 @@
<el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleEn" :value="item.orderItemId" :key="item.prodTitleEn" ></el-option> <el-option v-for="item in orderData.orderItemVOList" :label="item.prodTitleEn" :value="item.orderItemId" :key="item.prodTitleEn" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--<el-form-item :label="$t('选择入仓记录')"> <div class="page-title">{{$t('品名可拆数据')}}</div>
<el-select :placeholder="$t('选择入仓记录')" v-model="selectedWarehouseInId" clearable> <div class="pl-20">
<el-option v-for="item in getOrderItemWarehouseIn(shopForm.orderItemId)" :label="item.text" :value="item.id" :key="item.id" ></el-option> <span class="mr-10">{{$t('箱数')}}:{{ leftData.num || 0 }}</span>
</el-select> <span class="mr-10">{{ $t('入仓方数') }}:{{ leftData.volume || 0 }}m³</span>
</el-form-item>--> <span class="mr-10">{{ $t('收费方数') }}:{{ leftData.chargeVolume || 0 }}m³</span>
<el-form-item :label="$t('品名可拆数据')"> <span class="mr-10">{{ $t('入仓重量') }}:{{ leftData.weight || 0 }}kg</span>
<div>{{$t('箱数')}}:{{ leftData.num || 0 }}</div> <span class="mr-10">{{ $t('收费重量') }}:{{ leftData.chargeWeight || 0 }}kg</span>
<div> <span class="mr-10">{{ $t('数量(个)') }}:{{ leftData.quantity || 0 }}</span>
{{ $t('入仓方数') }}:{{ leftData.volume || 0 }}m³ <span class="mr-10">{{ $t('剩余货值') }}:{{ leftData.worth || 0 }}{{ $t('元') }}</span>
{{ $t('收费方数') }}:{{ leftData.chargeVolume || 0 }}m³
</div>
<div>
{{ $t('入仓重量') }}:{{ leftData.weight || 0 }}kg
{{ $t('收费重量') }}:{{ leftData.chargeWeight || 0 }}kg
</div> </div>
<div> <div class="page-title">{{$t('可拆入仓记录')}}</div>
{{ $t('数量(个)') }}:{{ leftData.quantity || 0 }} <el-table
{{ $t('剩余货值') }}:{{ leftData.worth || 0 }}{{ $t('元') }} :data="getOrderItemWarehouseIn(shopForm.orderItemId)"
</div> style="width: 100%">
</el-form-item> <el-table-column :label="$t('箱数')">
<el-form-item :label="$t('可拆入仓记录')"> <template v-slot="{row,$index}">
<el-table {{row.cartonsNum}}
:data="getOrderItemWarehouseIn(shopForm.orderItemId)" <dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="row.specificationType"></dict-tag>
style="width: 100%"> </template>
<el-table-column :label="$t('箱数')"> </el-table-column>
<template v-slot="{row,$index}"> <el-table-column :label="$t('包装类型')">
{{row.cartonsNum}} <template v-slot="{row,$index}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="row.specificationType"></dict-tag> <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="row.unit"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('包装类型')"> <el-table-column label="长(cm)">
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="row.unit"></dict-tag> {{row.boxGauge1}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="长(cm)"> <el-table-column label="宽(cm)">
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
{{row.boxGauge1}} {{ row.boxGauge2 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宽(cm)"> <el-table-column label="高(cm)">
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
{{ row.boxGauge2 }} {{ row.boxGauge3 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="高(cm)"> <el-table-column label="入仓体积(m³)">
<template v-slot="{row,$index}"> <template v-slot="{row,$index}">
{{ row.boxGauge3 }} {{row.volume}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓体积(m³)"> <el-table-column label="入仓重量(Kg)" prop="weight"></el-table-column>
<template v-slot="{row,$index}"> <el-table-column :label="$t('数量')" prop="quantity"></el-table-column>
{{row.volume}} <el-table-column :label="$t('快递单号')" prop="expressNo"></el-table-column>
</template> <el-table-column :label="$t('储位')" prop="orderLocationBackVOList">
</el-table-column> <template v-slot="{ row, column, $index }">
<el-table-column label="入仓重量(Kg)" prop="weight"></el-table-column> {{row.orderLocationList}}
<el-table-column :label="$t('数量')" prop="quantity"></el-table-column> </template>
<el-table-column :label="$t('快递单号')" prop="expressNo"></el-table-column> </el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index}">
{{row.orderLocationList}} <el-button size="mini" type="primary" @click="putInRecord(row)">放入</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> </el-table>
<template v-slot="{ row, column, $index}"> <div class="page-title">{{$t('已放入入仓记录')}}</div>
<el-button size="mini" type="primary" @click="putInRecord(row)">放入</el-button> <el-table
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item :label="$t('已放入入仓记录')">
<el-table
:data="shopForm.specsRecordVOList" :data="shopForm.specsRecordVOList"
style="width: 100%"> style="width: 100%">
<el-table-column :label="$t('箱数')" width="200px"> <el-table-column :label="$t('箱数')" width="200px">
...@@ -375,21 +364,19 @@ ...@@ -375,21 +364,19 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form-item>
<el-form-item :label="$t('放入数据')"> <div class="page-title">放入数据</div>
<div>{{$t('箱数')}}:{{ putin.num || 0 }}</div> <div class="pl-20 mb-10">
<div> <span class="mr-10">{{$t('箱数')}}:{{ putin.num || 0 }},</span>
{{ $t('入仓方数') }}:{{ putin.volume || 0 }}m³ <span class="mr-10">{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},</span>
{{ $t('收费方数') }}:{{ putin.chargeVolume || 0 }}m³ <span class="mr-10">{{ $t('入仓方数') }}:{{ putin.volume || 0 }}m³, </span>
</div> <span class="mr-10">{{ $t('入仓重量') }}:{{ putin.weight || 0 }}kg</span>
<div> </div>
{{ $t('入仓重量') }}:{{ putin.weight || 0 }}kg <el-form-item :label="$t('收费方数')" prop="chargeVolume">
{{ $t('收费重量') }}:{{ putin.chargeWeight || 0 }}kg <el-input-number v-model="shopForm.chargeVolume" controls-position="right"></el-input-number>
</div> </el-form-item>
<div> <el-form-item :label="$t('收费重量')" prop="chargeWeight">
{{ $t('数量(个)') }}:{{ putin.quantity || 0 }} <el-input-number v-model="shopForm.chargeWeight" controls-position="right"></el-input-number>kg
</div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('放入货值')"> <el-form-item :label="$t('放入货值')">
...@@ -512,11 +499,11 @@ export default { ...@@ -512,11 +499,11 @@ export default {
}, },
// 表单校验 // 表单校验
shopRules: { shopRules: {
prodTitleZh: [{ required: true, message: this.$t("请选择中文品名"), trigger: "change" }], chargeVolume: [{ required: true, message: this.$t("请填写收费方数"), trigger: "blur" }],
prodTitleEn: [{ required: true, message: this.$t("请选择英文品名"), trigger: "change" }], chargeWeight: [{ required: true, message: this.$t("请填写收费重量"), trigger: "blur" }],
}, },
queryParams:{ queryParams:{
orderId:7, orderId: null,
lang:0 lang:0
}, },
query:{ query:{
...@@ -640,36 +627,30 @@ export default { ...@@ -640,36 +627,30 @@ export default {
let data = { let data = {
num: new Decimal(0), num: new Decimal(0),
volume: new Decimal(0), volume: new Decimal(0),
chargeVolume: new Decimal(0),
weight: new Decimal(0), weight: new Decimal(0),
chargeWeight: new Decimal(0),
quantity: new Decimal(0) quantity: new Decimal(0)
} }
this.shopForm.specsRecordVOList && this.shopForm.specsRecordVOList.forEach(item => { this.shopForm.specsRecordVOList && this.shopForm.specsRecordVOList.forEach(item => {
data.num = data.num.plus(new Decimal(item.num || 0)) data.num = data.num.plus(new Decimal(item.num || 0))
data.volume = data.volume.plus(new Decimal(item.volume || 0)) data.volume = data.volume.plus(new Decimal(item.volume || 0))
data.chargeVolume = data.chargeVolume.plus(new Decimal(item.chargeVolume || 0))
data.weight = data.weight.plus(new Decimal(item.weight || 0)) data.weight = data.weight.plus(new Decimal(item.weight || 0))
data.chargeWeight = data.chargeWeight.plus(new Decimal(item.chargeWeight || 0))
data.quantity = data.quantity.plus(new Decimal(item.quantity || 0)) data.quantity = data.quantity.plus(new Decimal(item.quantity || 0))
}) })
return { return {
num: data.num.toNumber(), num: data.num.toNumber(),
volume: data.volume.toNumber(), volume: data.volume.toNumber(),
chargeVolume: data.chargeVolume.toNumber(),
weight: data.weight.toNumber(), weight: data.weight.toNumber(),
chargeWeight: data.chargeWeight.toNumber(),
quantity: data.quantity.toNumber() quantity: data.quantity.toNumber()
} }
}, },
// 当前仓库ID // 当前仓库ID,选择储位的时候需要用到
currentWarehouseId(){ currentWarehouseId(){
return this.orderData.adjustToDestWarehouseId || this.orderData.logisticsInfoDto.startWarehouseId return this.orderData.adjustToDestWarehouseId || this.orderData.logisticsInfoDto.startWarehouseId
}, },
// 当前选择的入仓记录 // 当前选择的入仓记录
currentWarehouseItem(){ /*currentWarehouseItem(){
return this.getOrderItemWarehouseIn(this.shopForm.orderItemId).find(item => item.id === this.selectedWarehouseInId) return this.getOrderItemWarehouseIn(this.shopForm.orderItemId).find(item => item.id === this.selectedWarehouseInId)
}, },*/
// 根据orderItemId获取入仓记录 // 根据orderItemId获取入仓记录
getOrderItemWarehouseIn() { getOrderItemWarehouseIn() {
return orderItemId => { return orderItemId => {
......
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