Commit 57efaa0c authored by dragondean@qq.com's avatar dragondean@qq.com

完善装柜拆单

parent 8e56232e
......@@ -138,14 +138,32 @@
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column :label="$t('体积')" align="center">
<el-table-column :label="$t('入仓体积')" align="center" >
<template slot-scope="scope">
<span>{{scope.row.volume}}</span>
<el-input v-model="scope.row.volume" @change="updateField(scope.row, 'volume')" size="mini" :disabled="index === 0">
<span slot="append"></span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('重量')" align="center">
<el-table-column :label="$t('收费体积')" align="center" >
<template slot-scope="scope">
<span>{{scope.row.weight}}kg</span>
<el-input v-model="scope.row.chargeVolume" @change="updateField(scope.row, 'chargeVolume')" size="mini" :disabled="index === 0">
<span slot="append"></span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('入仓重量')" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.weight" @change="updateField(scope.row, 'weight')" size="mini" :disabled="index === 0">
<span slot="append">kg</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('收费重量')" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.chargeWeight" @change="updateField(scope.row, 'chargeWeight')" size="mini" :disabled="index === 0">
<span slot="append">kg</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center">
......@@ -208,6 +226,18 @@
<el-form-item :label="$t('放入箱数')+':'">
{{shopForm.putNum||0}}
</el-form-item>
<el-form-item :label="$t('入仓体积')">
<el-input-number v-model="shopForm.volume" controls-position="right" :min="0" :max="orderItem.warehouseInInfoVO.volume"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费体积')">
<el-input-number v-model="shopForm.chargeVolume" controls-position="right" :min="0" :max="orderItem.chargeVolume"></el-input-number>
</el-form-item>
<el-form-item :label="$t('入仓重量')">
<el-input-number v-model="shopForm.weight" controls-position="right" :min="0" :max="orderItem.warehouseInInfoVO.weight"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费重量')">
<el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="orderItem.chargeWeight"></el-input-number>
</el-form-item>
<!-- <el-form-item :label="$t('放入数量(个)')+':'" prop="putQuantity" v-show="isQuantity">
<el-input-number v-model="shopForm.putQuantity" controls-position="right" :min="0"></el-input-number>
</el-form-item> -->
......@@ -233,7 +263,7 @@ import {
} from "@/api/ecw/orderHandle";
import { getTradeCityList } from "@/api/ecw/region";
import WorkFlow from "@/components/WorkFlow";
import { getOrder } from "@/api/ecw/order";
import {getOrder, splitItemUpdate} from "@/api/ecw/order";
import { serviceMsg, toReviewDetail } from "../../utils";
import { createApproval, approvalCancel, splitList } from "@/api/ecw/boxSea";
import Decimal from "decimal.js";
......@@ -328,8 +358,26 @@ export default {
}
return false;
},
// 订单项数据,默认要返回一个如下的空json结构体,避免报错
orderItem(){
if(!this.orderData) return {warehouseInInfoVO:{}}
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId) || {warehouseInInfoVO:{}}
}
},
methods: {
/*检查并提交字段(体积,重量)修改*/
updateField(row, field){
let val = parseFloat(row[field])
if(!val || val < 0){
this.$message.error(this.$t('数据无效'))
return this.getList()
}
splitItemUpdate(row).then(() => {
this.$message.success(this.$t('修改成功'))
}).catch(() => {
this.getList()
})
},
/* 拆箱总数 */
totalSplitNum() {
let _total = 0;
......@@ -565,6 +613,10 @@ export default {
orderItemId: this.shopForm.orderItemId,
orderSplitId: this.splitData.id,
remarks: this.shopForm.remarks,
volume: this.shopForm.volume,
weight: this.shopForm.weight,
chargeWeight: this.shopForm.chargeWeight,
chargeVolume: this.shopForm.chargeVolume
};
createSplitItem(params).then((res) => {
this.$message.success(this.$t("放入成功"));
......
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