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

完善订单拆单

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