zhanbo.xu

feat:新增申报数据二次预览

......@@ -137,14 +137,14 @@
>
批量修改
</el-button>
<el-button
<!-- <el-button
class="entrySaveButton"
size="small"
icon="el-icon-edit"
@click="batchModify"
>
重量调整
</el-button>
</el-button> -->
<el-button
class="entrySaveButton"
size="small"
......
......@@ -4,13 +4,22 @@
title="离境单申报"
:visible.sync="timeVisible"
:show-close="false"
width="40%"
width="700px"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close(false)"
>
<div class="modelItem">
<div style="margin-bottom: 10px">
<span>
提运单号 数量:<strong>{{ tableData.length }}</strong>
</span>
<span style="margin-left: 20px">
物流运单编号 数量:<strong>{{ selected.length }}</strong>
</span>
</div>
<div class="modelItem" style="margin-bottom: 10px">
<el-form
class="fedexFormStyle"
ref="formData"
......@@ -19,7 +28,7 @@
size="small"
>
<el-row :gutter="5">
<el-col :span="8">
<el-col :span="18">
<Formitem label="离境时间" prop="leaveTime" type="edit">
<el-date-picker
class="inputInner--leaveTime"
......@@ -35,6 +44,17 @@
</el-row>
</el-form>
</div>
<Table
class="fedexDetialTable fedexSreachTable"
ref="entryTable"
:data="tableData"
:headerData="headerData"
:border="true"
:pagination="false"
:order="false"
>
</Table>
<div class="dialogOption entrySave">
<el-button
class="entrySaveButton"
......@@ -62,13 +82,33 @@ export default {
},
},
},
watch: {
timeVisible(val) {
if (val) {
this.tableData = this.processWaybills(this.selected);
}
},
},
data() {
return {
formData: {
leaveTime: "",
},
headerData: [
{
name: "提运单号",
value: "billNo",
width: "180px",
align: "left",
},
{
name: "物流运单编号",
value: "logisticsWaybillNumber",
width: "",
align: "left",
},
],
tableData: [],
loadings: {
dialogLoading: false,
submitLoading: false,
......@@ -77,6 +117,33 @@ export default {
};
},
methods: {
processWaybills(data) {
if (!Array.isArray(data)) {
throw new Error("输入参数必须是数组");
}
return Array.from(
data.reduce((map, item) => {
const key = item.billNo;
if (!map.has(key)) {
map.set(key, {
billNo: key,
logisticsWaybillNumber: [],
});
}
if (item.logisticsWaybillNumber) {
map
.get(key)
.logisticsWaybillNumber.push(item.logisticsWaybillNumber);
}
return map;
}, new Map()),
([_, value]) => ({
...value,
logisticsWaybillNumber: value.logisticsWaybillNumber.join(","),
})
);
},
//数据保存
submit() {
let obj = {
......
......@@ -4,7 +4,7 @@
title="重量调整"
:visible.sync="batchModifyVisible"
:show-close="false"
width="60%"
width="450px"
:close-on-click-modal="false"
>
<div>
......@@ -16,7 +16,37 @@
label-position="left"
size="small"
>
<Formitem label="修改数据" prop="modifyData">
<Formitem label="提运单号" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入提运单号"
></el-input>
</Formitem>
<Formitem label="件数" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入修改内容"
></el-input>
</Formitem>
<Formitem label="原毛重" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入修改内容"
></el-input>
</Formitem>
<Formitem label="修改后毛重" prop="modifyData">
<el-select
type="text"
v-model="batchModifyFormData.modifyData"
......
......@@ -169,10 +169,10 @@ export default {
addMenuFn() {
let params = {
icon: "",
menuName: "运抵单申报",
order: 1,
parentMenuId: 96,
physicalUrl: "/arrival-declare", //-management
menuName: "HSCODE 管理",
order: 6.2,
parentMenuId: 90,
physicalUrl: "/hs-code", //-management
url: "",
};
addMenu(params).then((res) => {
......