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-03-28 17:18:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9dd3e0402d954106fac5c86e4250fcdab932c6a4
9dd3e040
1 parent
3d099461
feat: 新增汇总申报预览
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
237 additions
and
3 deletions
src/api/exportSummary-api.js
src/views/summaryDataSearch/index.vue
src/views/summaryEdit/dialog.vue
src/views/summaryEdit/index.vue
src/api/exportSummary-api.js
View file @
9dd3e04
...
...
@@ -67,3 +67,12 @@ export function getCustomers(data) {
data
:
data
,
});
}
// POST /exportSummary/preview 预览
export
function
preview
(
data
)
{
return
request
({
url
:
"/bus-customer/exportSummary/preview"
,
method
:
"post"
,
data
:
data
,
});
}
...
...
src/views/summaryDataSearch/index.vue
View file @
9dd3e04
...
...
@@ -194,7 +194,8 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:maxHeight="tableMaxheight"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:border="true"
:pagination="true"
:order="false"
...
...
@@ -372,14 +373,18 @@ export default {
formItemconsignmentCode: false,
formItemconsignmentHeadCode: false,
},
tableMaxheight:
null
,
tableMaxheight:
500
,
};
},
created() {
this.search(0);
this.calculateTableHeight();
},
mounted() {
this.tableMaxheight = window.innerHeight - 300;
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
watch: {
$route() {
...
...
@@ -387,6 +392,9 @@ export default {
},
},
methods: {
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
//查询
search(val) {
this.loadings.searchLoading = true;
...
...
src/views/summaryEdit/dialog.vue
0 → 100644
View file @
9dd3e04
<template>
<el-dialog
class="entryDialog classCUploadDialog"
:title="pageData.ebpName"
:visible.sync="outerVisible"
:show-close="false"
width="900px"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close(false)"
>
<div style="margin-bottom: 10px">
<span> 汇总清单数量:{{ pageData.count }} </span>
<span style="margin-left: 20px">
汇总申报地海关:{{ pageData.portCode }}
</span>
</div>
<Table
class="fedexDetialTable fedexSreachTable"
ref="entryTable"
:data="pageData.value"
:headerData="headerData"
:border="true"
:pagination="true"
:order="false"
:page="page.pageIndex"
:pageSizes="[20, 30, 50, 100]"
:totalCount="page.total"
@sizeChange="sizeChange"
@currentChange="currentChange"
>
</Table>
<div class="dialogOption entrySave">
<el-button
class="entrySaveButton"
:disabled="loadings.submitLoading"
@click="submit"
>
提 交
</el-button>
<el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { preview, declareSummaryApplication } from "@/api/exportSummary-api.js";
export default {
props: {
outerVisible: {
type: Boolean,
default: false,
},
selected: {
type: Object,
default: () => {
return {};
},
},
},
watch: {
outerVisible(val) {
if (val) {
this.loadings.dialogLoading = false;
this.fetchPreview();
}
},
},
data() {
return {
loadings: {
dialogLoading: false,
submitLoading: false,
},
title: "",
page: {
pageIndex: 1,
pageSize: 20,
total: 0,
},
pageData: {
count: 0,
ebpName: "预览",
portCode: "",
value: [],
},
headerData: [
{
name: "提运单号",
value: "billNo",
width: "",
align: "left",
},
{
name: "物流运单编号",
value: "logisticsNo",
width: "",
align: "left",
},
{
name: "清单编号",
value: "invtNo",
width: "",
align: "left",
},
{
name: "清单申报时间",
value: "createTime",
width: "",
align: "left",
},
],
};
},
methods: {
fetchPreview() {
preview({
...this.selected,
...this.page,
}).then((res) => {
if (res.code === "200") {
console.log(res.data);
this.pageData = {
...res.data,
value: res.data.pageData.value,
};
console.log(this.pageData);
this.page.total = res.data.pageData.totalItems;
}
});
},
search(val) {
if (val == 0) {
this.page.pageIndex = 1;
}
this.fetchPreview();
},
sizeChange(val) {
this.page.pageSize = val;
this.search(1);
},
currentChange(val) {
this.page.pageIndex = val.page;
this.search(1);
},
//数据保存
submit() {
declareSummaryApplication(this.selected).then((response) => {
if (response.data) {
this.msgSuccess("汇总申报成功");
this.$router.push("summaryDataSearch");
} else {
this.msgError(response.message);
}
});
},
//新增
addapi(val) {
// declareUpload(val)
// .then((res) => {
// if (res.code === "200") {
// this.msgSuccess(res.message);
// this.close(true);
// } else {
// this.alertWarningMsg(res.message);
// this.loadings.dialogLoading = false;
// }
// })
// .catch((err) => {
// console.log(err);
// this.loadings.dialogLoading = false;
// });
},
close(flag) {
this.formData = {
operatorCode: "",
domesticTrafNo: "",
};
this.loadings.dialogLoading = false;
this.$emit("close", flag);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
</style>
src/views/summaryEdit/index.vue
View file @
9dd3e04
...
...
@@ -149,7 +149,15 @@
</el-row>
</el-form>
</div>
<!-- 预览弹窗 -->
<DialogVue
:outerVisible="outerVisible"
:selected="selected"
@close="dialogClose"
/>
<!-- -->
<div class="entrySave">
<el-button class="entrySaveButton" @click="preview">预览</el-button>
<el-button class="entrySaveButton" @click="submit">提交</el-button>
<el-button class="entrySaveButton" @click="cancel">取消</el-button>
</div>
...
...
@@ -161,7 +169,11 @@ import { getCurrUserPortInfo } from "@/api/system/user.js";
import { getNewCustomerList } from "@/api/declareData-api.js";
import { getDictData } from "@/api/system/dict-api.js";
import { declareSummaryApplication } from "@/api/exportSummary-api.js";
import DialogVue from "./dialog.vue";
export default {
components: {
DialogVue,
},
name: "",
data() {
return {
...
...
@@ -207,6 +219,8 @@ export default {
summaryFlag: [],
itemNameFlag: [],
declareType: [],
outerVisible: false,
selected: {},
};
},
created() {
...
...
@@ -219,6 +233,18 @@ export default {
this.getDeclareType();
},
methods: {
preview() {
this.$refs.editForm.validate((valid) => {
if (!valid) {
return;
}
this.selected = JSON.parse(JSON.stringify(this.formData));
this.outerVisible = true;
});
},
dialogClose() {
this.outerVisible = false;
},
searchUserData(val) {
this.formData.customsCode = val;
this.formData.ebpcode = "";
...
...
Please
register
or
login
to post a comment