Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zhanbo.xu
2025-04-11 17:07:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a6a59aac6792c2a6df7736d45e72a05cf5d5739d
a6a59aac
1 parent
4611c0da
feat:新增申报数据二次预览接口
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
18 deletions
src/api/declareData-api.js
src/views/reportingData/data-preview.vue
src/views/reportingData/time-dialog.vue
src/api/declareData-api.js
View file @
a6a59aa
...
...
@@ -250,8 +250,6 @@ export function checkBillNo(data) {
return
request
({
url
:
"/bus-customer/declareData/checkBillNo"
,
method
:
"post"
,
data
:
{
...
data
,
},
data
:
data
.
declareIds
,
});
}
...
...
src/views/reportingData/data-preview.vue
View file @
a6a59aa
...
...
@@ -12,7 +12,7 @@
提运单号 数量:<strong>{{ tableData.length }}</strong>
</span>
<span style="margin-left: 20px">
物流运单编号 数量:<strong>{{
selectedDatas.length
}}</strong>
物流运单编号 数量:<strong>{{
logisticsTotal
}}</strong>
</span>
</div>
<Table
...
...
@@ -23,6 +23,8 @@
:border="true"
:pagination="false"
:order="false"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
>
</Table>
<div class="dialogOption entrySave revokeOperation">
...
...
@@ -74,6 +76,8 @@ export default {
],
tableData: [],
batchModifyVisible: false,
logisticsTotal: 0,
tableMaxheight: 200,
};
},
watch: {
...
...
@@ -90,11 +94,30 @@ export default {
checkBillNo({
declareIds: this.selectedDatas.map((item) => item.declareId),
}).then((res) => {
if (res.code === 200) {
this.tableData = res.data.value;
console.log(res);
if (+res.code === 200) {
this.tableData = res.data;
const { total } = this.getLogisticsWaybillDetails(this.tableData);
this.logisticsTotal = total;
this.tableMaxheight =
res.data.length >= 10 ? 500 : res.data.length * 50 + 50;
}
});
},
getLogisticsWaybillDetails(data) {
const numbers = data.reduce((acc, item) => {
const validNumbers = item.logisticsWaybillNumber
.split(",")
.filter((num) => num && num.trim());
return [...acc, ...validNumbers];
}, []);
return {
total: numbers.length,
numbers: numbers,
};
},
formSubmit() {
this.cancelModify(1);
...
...
src/views/reportingData/time-dialog.vue
View file @
a6a59aa
...
...
@@ -2,7 +2,7 @@
<el-dialog
class="entryDialog classCUploadDialog"
title="离境单申报"
:visible.sync="timeVisible"
:visible.sync="timeVisible
Config
"
:show-close="false"
width="700px"
:close-on-click-modal="false"
...
...
@@ -15,7 +15,7 @@
提运单号 数量:<strong>{{ tableData.length }}</strong>
</span>
<span style="margin-left: 20px">
物流运单编号 数量:<strong>{{
selected.length
}}</strong>
物流运单编号 数量:<strong>{{
logisticsTotal
}}</strong>
</span>
</div>
...
...
@@ -52,6 +52,8 @@
:border="true"
:pagination="false"
:order="false"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
>
</Table>
...
...
@@ -82,18 +84,13 @@ export default {
},
},
},
watch: {
timeVisible(val) {
if (val) {
this.getBillNo();
}
},
},
data() {
return {
formData: {
leaveTime: "",
},
timeVisibleConfig: false,
headerData: [
{
name: "提运单号",
...
...
@@ -114,15 +111,29 @@ export default {
submitLoading: false,
},
loadingText: "",
logisticsTotal: 0,
tableMaxheight: 200,
};
},
watch: {
timeVisible(val) {
if (val) {
this.timeVisibleConfig = val;
this.getBillNo();
}
},
},
methods: {
getBillNo() {
checkBillNo({
declareIds: this.selected
Datas
.map((item) => item.declareId),
declareIds: this.selected.map((item) => item.declareId),
}).then((res) => {
if (res.code === 200) {
this.tableData = res.data.value;
if (+res.code === 200) {
this.tableData = res.data;
const { total } = this.getLogisticsWaybillDetails(this.tableData);
this.logisticsTotal = total;
this.tableMaxheight =
res.data.length >= 9 ? 500 : res.data.length * 50 + 50;
}
});
},
...
...
@@ -139,6 +150,19 @@ export default {
}
});
},
getLogisticsWaybillDetails(data) {
const numbers = data.reduce((acc, item) => {
const validNumbers = item.logisticsWaybillNumber
.split(",")
.filter((num) => num && num.trim());
return [...acc, ...validNumbers];
}, []);
return {
total: numbers.length,
numbers: numbers,
};
},
//新增
addapi(val) {
this.loadings.dialogLoading = true;
...
...
@@ -163,6 +187,7 @@ export default {
leaveTime: "",
};
this.loadings.dialogLoading = false;
this.timeVisibleConfig = false;
this.$emit("close", flag);
},
},
...
...
Please
register
or
login
to post a comment