Commit d1d9e8d6 authored by huhaiqing's avatar huhaiqing

修改海运操作缺陷单

parent b8102b65
...@@ -411,6 +411,21 @@ export function createSection(data) { ...@@ -411,6 +411,21 @@ export function createSection(data) {
}); });
} }
/**
* 创建预装部分
*
* @export
* @param {*} data
* @return {*}
*/
export function changeSection(data) {
return request({
url: "/ecw/box-preload-goods/changeSection",
method: "post",
data,
});
}
/** /**
* 查询出货单下的所有部分列表 * 查询出货单下的所有部分列表
* *
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间" align="center"> <el-table-column label="预计时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{formatDate(scope.row.createTime)}} {{formatDate(scope.row.createTime)}}
</template> </template>
......
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
orderId: this.currRow.orderId, orderId: this.currRow.orderId,
copyUserId: this.selectedUsers, copyUserId: this.selectedUsers,
}; };
if (['makeBill','resetBill'].includes(this.dialogCfg.type)) { if (["makeBill", "resetBill"].includes(this.dialogCfg.type)) {
createBillService({ ...params, status: 1 }).then((res) => { createBillService({ ...params, status: 1 }).then((res) => {
serviceMsg(res, this).then((res) => { serviceMsg(res, this).then((res) => {
this.close("query"); this.close("query");
......
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
calcSum(goodsList) { calcSum(goodsList) {
let sum = 0; let sum = 0;
goodsList.forEach((element) => { goodsList.forEach((element) => {
sum = Decimal.add(sum, element.num); sum = Decimal.add(sum, element.num).toNumber();
}); });
return sum; return sum;
}, },
......
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
let _total = 0; let _total = 0;
const { orderSplitItemBackVOList = [] } = this.splitData; const { orderSplitItemBackVOList = [] } = this.splitData;
orderSplitItemBackVOList.forEach((v) => { orderSplitItemBackVOList.forEach((v) => {
_total = Decimal.add(_total, Number(v.num)); _total = Decimal.add(_total, Number(v.num)).toNumber();
}); });
return _total; return _total;
}, },
...@@ -382,15 +382,15 @@ export default { ...@@ -382,15 +382,15 @@ export default {
let leviteV = 0; let leviteV = 0;
let leviteW = 0; let leviteW = 0;
this.orderData.orderItemVOList.forEach((column, index) => { this.orderData.orderItemVOList.forEach((column, index) => {
orderSum = Decimal.add(orderSum, column.num ?? 0); orderSum = Decimal.add(orderSum, column.num ?? 0).toNumber();
orderV = Decimal.add(orderV, column.volume ?? 0); orderV = Decimal.add(orderV, column.volume ?? 0).toFixed(2);
orderW = Decimal.add(orderW, column.weight ?? 0); orderW = Decimal.add(orderW, column.weight ?? 0).toFixed(2);
leviteSum = Decimal.add( leviteSum = Decimal.add(
leviteSum, leviteSum,
column.warehouseInInfoVO?.cartonsNum ?? 0 column.warehouseInInfoVO?.cartonsNum ?? 0
); ).toNumber();
leviteV += Decimal.add(leviteV, column.warehouseInInfoVO?.volume ?? 0); leviteV += Decimal.add(leviteV, column.warehouseInInfoVO?.volume ?? 0).toFixed(2);
leviteW += Decimal.add(leviteW, column.warehouseInInfoVO?.weight ?? 0); leviteW += Decimal.add(leviteW, column.warehouseInInfoVO?.weight ?? 0).toFixed(2);
}); });
sums[1] = sums[1] =
"下单统计:" + "下单统计:" +
...@@ -460,8 +460,8 @@ export default { ...@@ -460,8 +460,8 @@ export default {
if (valid) { if (valid) {
// 输入箱数大于实装箱数 // 输入箱数大于实装箱数
const total = this.totalSplitNum(); const total = this.totalSplitNum();
const canSplitNum = Decimal.sub(this.currRow.num, this.currRow.installNum); const canSplitNum = Decimal.sub(this.currRow.num, this.currRow.installNum).toNumber();
const remain = Decimal.sub(canSplitNum, total); const remain = Decimal.sub(canSplitNum, total).toNumber();
if (this.shopForm.num > remain) { if (this.shopForm.num > remain) {
this.$message.error("放入箱数不能大于总箱数"); this.$message.error("放入箱数不能大于总箱数");
return; return;
......
...@@ -642,7 +642,7 @@ export default { ...@@ -642,7 +642,7 @@ export default {
this.listData.forEach((item) => { this.listData.forEach((item) => {
const { sectionOrderList = [] } = item; const { sectionOrderList = [] } = item;
sectionOrderList.forEach((item) => { sectionOrderList.forEach((item) => {
count = Decimal.add(count, item.installNum); count = Decimal.add(count, item.installNum).toNumber();
}); });
}); });
} }
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclarationObj" label-width="120px"> <el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclarationObj" label-width="120px">
<el-form-item label="单证要求"> <el-form-item label="单证要求">
<template v-for="(item, index) in cusDeclarationObj.documentInfo"> <template v-for="(item, index) in cusDeclarationObj.documentInfo">
{{
(index === 0 || index === cusDeclarationObj.documentInfo.length) ? "" :"/"
}}
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item" :key="index" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item" :key="index" />
</template> </template>
<el-button type="primary" style="margin-left:10px;" @click="downloadVGM">{{getButtonLabel(cusDeclarationObj.documentInfo)}}</el-button> <el-button type="primary" style="margin-left:10px;" @click="downloadVGM">{{getButtonLabel(cusDeclarationObj.documentInfo)}}</el-button>
...@@ -30,7 +33,7 @@ ...@@ -30,7 +33,7 @@
<el-date-picker type="datetime" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="dcCustomsStatus"> <el-form-item label="状态" prop="dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview || isCheckDeal"> <el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview || isCheckDeal('status')">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -38,7 +41,7 @@ ...@@ -38,7 +41,7 @@
<!-- 查验 --> <!-- 查验 -->
<div v-show="cusDeclarationObj.dcCustomsStatus === '3'"> <div v-show="cusDeclarationObj.dcCustomsStatus === '3'">
<el-form-item label="查验"> <el-form-item label="查验">
<el-radio-group v-model="cusDeclarationObj.dcCheckStatus" :disabled="inReview || isCheckDeal"> <el-radio-group v-model="cusDeclarationObj.dcCheckStatus" :disabled="inReview || isCheckDeal('check')">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value" :disabled="disabledRadio(item)">{{item.label}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value" :disabled="disabledRadio(item)">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -78,8 +81,8 @@ ...@@ -78,8 +81,8 @@
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消全部退场审核' : '取消部分退场审核'}}</el-button> <el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? '取消全部退场审核' : '取消部分退场审核'}}</el-button>
</el-row> </el-row>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)" :disabled="isCheckDeal">保存</el-button> <el-button type="primary" @click="onSubmit(1)" :disabled="isCheckDeal('submit')">保存</el-button>
<el-button type="success" v-if="!inReview" @click="onSubmit(2)" :disabled="isCheckDeal">提交</el-button> <el-button type="success" v-if="!inReview" @click="onSubmit(2)" :disabled="isCheckDeal('submit')">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">额外费用</el-button> <el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">额外费用</el-button>
</el-row> </el-row>
...@@ -156,7 +159,7 @@ import { ...@@ -156,7 +159,7 @@ import {
downloadFile, downloadFile,
} from "../utils"; } from "../utils";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
import Decimal from 'decimal.js' import Decimal from "decimal.js";
/** /**
* 报关 * 报关
...@@ -218,7 +221,7 @@ export default { ...@@ -218,7 +221,7 @@ export default {
methods: { methods: {
getButtonLabel(documentInfo = []) { getButtonLabel(documentInfo = []) {
const newList = Array.from(new Set(documentInfo)); const newList = Array.from(new Set(documentInfo));
return newList.length > 2 ? "混合报关" : "VGM声明"; return newList.length >= 2 ? "混合报关" : "VGM声明";
}, },
submitCustomsCreate(operateType) { submitCustomsCreate(operateType) {
customsCreate({ customsCreate({
...@@ -404,7 +407,7 @@ export default { ...@@ -404,7 +407,7 @@ export default {
this.$set( this.$set(
this.cusDeclarationObj, this.cusDeclarationObj,
"dcVgmWgt", "dcVgmWgt",
Decimal.add(dcBoxWgtTmp, dcGoodsWgtTmp) Decimal.add(dcBoxWgtTmp, dcGoodsWgtTmp).toFixed(2)
); );
}, },
// 审核详情 // 审核详情
...@@ -439,6 +442,7 @@ export default { ...@@ -439,6 +442,7 @@ export default {
if ( if (
checkExamineStatus === 2 && checkExamineStatus === 2 &&
dcCheckStatus === 2 && dcCheckStatus === 2 &&
checkDealStatus === 0 &&
item.value === "1" item.value === "1"
) { ) {
return true; return true;
...@@ -491,12 +495,16 @@ export default { ...@@ -491,12 +495,16 @@ export default {
computed: { computed: {
/* 获取报关审核退场状态文字 */ /* 获取报关审核退场状态文字 */
getCheckExamineStatus() { getCheckExamineStatus() {
const { checkExamineStatus, customsInfo = {} } = this.shipmentObj; const {
checkExamineStatus,
checkDealStatus,
customsInfo = {},
} = this.shipmentObj;
const { dcCheckStatus } = customsInfo; const { dcCheckStatus } = customsInfo;
if (checkExamineStatus === 1) { if (checkExamineStatus === 1) {
return dcCheckStatus === 1 ? "退场审核中" : "部分退场审核中"; return dcCheckStatus === 1 ? "退场审核中" : "部分退场审核中";
} }
if (checkExamineStatus === 2) { if (checkExamineStatus === 2 && checkDealStatus === 0) {
return dcCheckStatus === 1 return dcCheckStatus === 1
? "审核通过,退场中" ? "审核通过,退场中"
: "审核通过,部分退场中"; : "审核通过,部分退场中";
...@@ -505,21 +513,57 @@ export default { ...@@ -505,21 +513,57 @@ export default {
}, },
/* 判断是否已处理 */ /* 判断是否已处理 */
isCheckDeal() { isCheckDeal() {
return (type) => {
const { const {
checkExamineStatus, checkExamineStatus,
checkDealStatus, checkDealStatus,
customsInfo = {}, customsInfo = {},
} = this.shipmentObj; } = this.shipmentObj;
const { dcCheckStatus } = customsInfo; const { dcCheckStatus } = customsInfo;
// 退场未处理不能操作
// 状态
if (type === "status") {
// 退场/部分退场 审核通过未处理,禁用
if (
checkExamineStatus === 2 &&
[1, 2].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
return true;
}
}
// 查验
if (type === "check") {
// 退场 审核通过未处理,禁用
// 部分退场 审核通过未处理,由 disabledRadio 方法判断
if ( if (
checkExamineStatus === 2 && checkExamineStatus === 2 &&
dcCheckStatus === 1 && [1].includes(dcCheckStatus) &&
checkDealStatus === 0 checkDealStatus === 0
) { ) {
return true; return true;
} }
}
// 提交/保存
if (type === "submit") {
const { dcCheckStatus: newCheckStatus } = this.cusDeclarationObj;
// 退场/部分退场 审核通过未处理
if (checkExamineStatus === 2 && checkDealStatus === 0) {
// 退场,禁用
if (dcCheckStatus === 1) return true;
// 部分退场
if (dcCheckStatus === 2) {
// 修改为查验后放行,可用,其他禁用
if (newCheckStatus === "3") return false;
return true;
}
}
}
return false; return false;
};
}, },
}, },
}; };
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<p>{{preList.remainWeight}}kg</p> <p>{{preList.remainWeight}}kg</p>
</div> </div>
<div class="table-button"> <div class="table-button">
<el-button type="success" size="small" @click="addPart">增加</el-button> <el-button type="success" size="small" @click="addPart" :disabled="isAudit">增加</el-button>
</div> </div>
</el-row> </el-row>
<el-scrollbar style="height:calc(100% - 43px)"> <el-scrollbar style="height:calc(100% - 43px)">
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
<p>{{getTotlContent(part.secStatistics)}}</p> <p>{{getTotlContent(part.secStatistics)}}</p>
</div> </div>
<div class="table-button"> <div class="table-button">
<el-button type="danger" size="small" @click="deletePart(part)">删除部分</el-button> <el-button type="danger" size="small" @click="deletePart(part)" :disabled="isAudit">删除部分</el-button>
<el-button type="danger" size="small" @click="deleteOrder('selected', part)">删除订单</el-button> <el-button type="danger" size="small" @click="deleteOrder('selected', part)" :disabled="isAudit">删除订单</el-button>
<el-button type="primary" size="small" @click="foldTable(index, part)">{{part.fold ? '展开' : '收起'}}</el-button> <el-button type="primary" size="small" @click="foldTable(index, part)">{{part.fold ? '展开' : '收起'}}</el-button>
</div> </div>
</el-row> </el-row>
...@@ -157,13 +157,13 @@ ...@@ -157,13 +157,13 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" fixed="right"> <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)"> <el-dropdown trigger="click" @command="(command)=>handleGoods('single',scope.row,command)" :disabled="isAudit">
<el-button type="primary" size="small" icon="el-icon-edit-outline" circle></el-button> <el-button type="primary" size="small" icon="el-icon-edit-outline" circle :disabled="isAudit"></el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="bPart" v-for="(bPart, index) in preList.sectionGoodList" :key="bPart.id" v-show="bPart.id !== part.id">{{index+1}}部分</el-dropdown-item> <el-dropdown-item :command="bPart" v-for="(bPart, index) in preList.sectionGoodList" :key="bPart.id" v-show="bPart.id !== part.id">{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button type="danger" size="small" icon="el-icon-minus" circle style="margin-left:10px;" @click="deleteOrder('row',scope.row)"></el-button> <el-button type="danger" size="small" icon="el-icon-minus" circle style="margin-left:10px;" @click="deleteOrder('row',scope.row)" :disabled="isAudit"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -220,8 +220,8 @@ ...@@ -220,8 +220,8 @@
</div> </div>
<div class="table-button"> <div class="table-button">
<el-dropdown trigger="click" @command="(command)=>handleGoods('all',item,command)"> <el-dropdown trigger="click" @command="(command)=>handleGoods('all',item,command)">
<el-button type="success" size="small">预装全部</el-button> <el-button type="success" size="small" :disabled="isAudit">预装全部</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown" v-if="preList.sectionGoodList">
<el-dropdown-item :command="part" v-for="(part, index) in preList.sectionGoodList" :key="part.id">第{{index+1}}部分</el-dropdown-item> <el-dropdown-item :command="part" v-for="(part, index) in preList.sectionGoodList" :key="part.id">第{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)"> <el-dropdown trigger="click" @command="(command)=>handleGoods('single',scope.row,command)">
<el-button type="primary" size="small">预装</el-button> <el-button type="primary" size="small">预装</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="part" v-for="(part, index) in preList" :key="part.id">第{{index+1}}部分</el-dropdown-item> <el-dropdown-item :command="part" v-for="(part, index) in preList" :key="part.id">第{{index+1}}部分</el-dropdown-item>
...@@ -311,6 +311,7 @@ import { ...@@ -311,6 +311,7 @@ import {
deleteSection, deleteSection,
createGoods, createGoods,
deleteGoods, deleteGoods,
changeSection,
approvalCreate, approvalCreate,
approvalCancel, approvalCancel,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
...@@ -494,18 +495,22 @@ export default { ...@@ -494,18 +495,22 @@ export default {
return; return;
} }
if (column.property === "num") { if (column.property === "num") {
sums[index] = this.calcSum(column.property, data) ?? 0; sums[index] = new Decimal(
this.calcSum(column.property, data)
).toNumber();
} }
if (column.property === "volumeWeight") { if (column.property === "volumeWeight") {
const volume = this.calcSum("volume", data); let volume = this.calcSum("volume", data);
const weight = this.calcSum("weight", data); let weight = this.calcSum("weight", data);
volume = volume === 0 ? volume : new Decimal(volume).toFixed(2);
weight = weight === 0 ? weight : new Decimal(weight).toFixed(2);
sums[index] = getTotlContent({ volume, weight }, [ sums[index] = getTotlContent({ volume, weight }, [
"volume", "volume",
"weight", "weight",
]); ]);
sums[index] = sums[index].replace(" ", "\n");
} }
}); });
return sums; return sums;
}, },
/* 计算总和 */ /* 计算总和 */
...@@ -515,12 +520,13 @@ export default { ...@@ -515,12 +520,13 @@ export default {
return values.reduce((prev, curr) => { return values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
return Decimal.add(prev, curr); return prev + curr;
} else { } else {
return prev; return prev;
} }
}, 0); }, 0);
} }
return 0;
}, },
/* 待预装订单分页 */ /* 待预装订单分页 */
pageChange(page) { pageChange(page) {
...@@ -558,23 +564,32 @@ export default { ...@@ -558,23 +564,32 @@ export default {
}, },
/** 预装 */ /** 预装 */
handleGoods(type, item, part) { handleGoods(type, item, part) {
if (type === "all") {
let params = { let params = {
secId: part.id, secId: part.id,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
orderId: item.orderId, orderId: item.orderId,
}; orderItemIdList: item.boxOrderItemList.map(
if (type === "all") {
params.orderItemIdList = item.boxOrderItemList.map(
(data) => data.orderItemId (data) => data.orderItemId
); ),
} else { };
params.orderItemIdList = [item.orderItemId];
}
createGoods(params).then((res) => { createGoods(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
}); });
} else {
let params = {
secId: part.id,
id: item.id,
};
changeSection(params).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
}
}, },
/* 删除订单 */ /* 删除订单 */
deleteOrder(type, data) { deleteOrder(type, data) {
...@@ -735,6 +750,11 @@ export default { ...@@ -735,6 +750,11 @@ export default {
.tobePre-row { .tobePre-row {
margin-top: 10px; margin-top: 10px;
.el-table {
.cell {
white-space: pre-line;
}
}
} }
} }
} }
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="success" @click="onSubmit" :disabled="isReview">发起申请</el-button> <el-button type="success" @click="onSubmit" v-show="!isReview">发起申请</el-button>
<el-button type="primary" @click="jumpReviewDetail" :disabled="!isReview">审核中</el-button> <el-button type="primary" @click="jumpReviewDetail" v-show="isReview">审核中</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="箱数" align="center" prop="num" /> <el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="纸箱尺寸" align="center" prop="boxGauge"> <el-table-column label="纸箱尺寸" align="center" prop="warehouseInInfo.boxGauge">
</el-table-column> </el-table-column>
<el-table-column label="体积" align="center" prop="volume"> <el-table-column label="体积" align="center" prop="volume">
</el-table-column> </el-table-column>
...@@ -130,8 +130,14 @@ export default { ...@@ -130,8 +130,14 @@ export default {
let list = []; let list = [];
res.data.forEach((item) => { res.data.forEach((item) => {
item.orderItemList.forEach((oItem) => { item.orderItemList.forEach((oItem) => {
let warehouseInInfo = {};
if (oItem.warehouseInInfo) {
warehouseInInfo = JSON.parse(oItem.warehouseInInfo ?? {});
}
list.push({ list.push({
...oItem, ...oItem,
warehouseInInfo,
positionNo: item.positionNo, positionNo: item.positionNo,
tallyStatus: item.tallyStatus, tallyStatus: item.tallyStatus,
tallyTime: item.tallyTime, tallyTime: item.tallyTime,
......
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
let count = 0; let count = 0;
if (this.pageData.sectionOrderList) { if (this.pageData.sectionOrderList) {
this.pageData.sectionOrderList.forEach((item) => { this.pageData.sectionOrderList.forEach((item) => {
count = Decimal.add(count, item.unloadNum); count = Decimal.add(count, item.unloadNum).toNumber();
}); });
} }
return count; return count;
......
<template> <template>
<div> <div>
<el-form ref="errorForm" :model="errorObj" label-width="100px"> <el-form ref="errorForm" :model="errorObj" label-width="100px" :rules="rules">
<el-form-item label="异常"> <el-form-item label="异常" prop="exceptionType">
<el-radio-group v-model="errorObj.exceptionType "> <el-radio-group v-model="errorObj.exceptionType">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_UNLOADING_ERROR)" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_UNLOADING_ERROR)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-option v-for="(item, index) in goodsList" :key="index" :value="item.orderItemId" :label="item.prodTitleZh"></el-option> <el-option v-for="(item, index) in goodsList" :key="index" :value="item.orderItemId" :label="item.prodTitleZh"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="件数"> <el-form-item label="件数" prop="productNum">
<el-input-number v-model="errorObj.productNum" controls-position="right" :min="1"></el-input-number> <el-input-number v-model="errorObj.productNum" controls-position="right" :min="1"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="异常详情"> <el-form-item label="异常详情">
...@@ -39,6 +39,11 @@ export default { ...@@ -39,6 +39,11 @@ export default {
const { currRow } = this.$attrs; const { currRow } = this.$attrs;
return { return {
// 校验
rules: {
exceptionType: [{ required: true, message: "必填", trigger: "change" }],
productNum: [{ required: true, message: "必填", trigger: "change" }],
},
// 异常对象 // 异常对象
errorObj: { errorObj: {
productId: currRow.goodsList[0].orderItemId, productId: currRow.goodsList[0].orderItemId,
......
...@@ -1415,10 +1415,14 @@ function getTotlContent(total, keys = ["num", "volume", "weight"]) { ...@@ -1415,10 +1415,14 @@ function getTotlContent(total, keys = ["num", "volume", "weight"]) {
content.push(`${total?.num ?? 0}`); content.push(`${total?.num ?? 0}`);
} }
if (key === "volume") { if (key === "volume") {
content.push(`${total?.volume ?? 0}m³`); let volume = total?.volume ?? 0;
volume = volume === 0 ? volume : new Decimal(volume).toFixed(2);
content.push(`${volume}m³`);
} }
if (key === "weight") { if (key === "weight") {
content.push(`${total?.weight ?? 0}kg`); let weight = total?.weight ?? 0;
weight = weight === 0 ? weight : new Decimal(weight).toFixed(2);
content.push(`${weight}kg`);
} }
} }
return content.join(" "); return content.join(" ");
...@@ -1437,13 +1441,22 @@ function sumStatistics(val) { ...@@ -1437,13 +1441,22 @@ function sumStatistics(val) {
const { secStatistics } = item; const { secStatistics } = item;
if (secStatistics) { if (secStatistics) {
if (!Number.isNaN(Number(secStatistics.num))) { if (!Number.isNaN(Number(secStatistics.num))) {
count.num = Decimal.add(count.num, Number(secStatistics.num)); count.num = Decimal.add(
count.num,
Number(secStatistics.num)
).toNumber();
} }
if (!Number.isNaN(Number(secStatistics.volume))) { if (!Number.isNaN(Number(secStatistics.volume))) {
count.volume = Decimal.add(count.volume, Number(secStatistics.volume)); count.volume = Decimal.add(
count.volume,
Number(secStatistics.volume)
);
} }
if (!Number.isNaN(Number(secStatistics.weight))) { if (!Number.isNaN(Number(secStatistics.weight))) {
count.weight = Decimal.add(count.weight, Number(secStatistics.weight)); count.weight = Decimal.add(
count.weight,
Number(secStatistics.weight)
);
} }
} }
}); });
......
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