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
xingru.liu
2024-12-30 11:31:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c978fb5fe4e3ea55c8d97782d5b182eb850da74
9c978fb5
1 parent
60b72fcc
修改申报数据管理接口
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
20 deletions
src/api/declareData-api.js
src/api/system/customer-ai.js
src/views/reportingData/index.vue
src/api/declareData-api.js
View file @
9c978fb
import
request
from
'@/utils/request'
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
;
//接口地址
//获取自定义设置数据
/**
...
...
@@ -59,7 +60,7 @@ export function getOrderReceipt(data) {
})
}
//查
询物流单
回执
//查
看离境
回执
/**
* @param declareId * id
*/
...
...
@@ -95,5 +96,49 @@ export function getTotalReceipt(data) {
params
:
data
,
})
}
/**
* 查看物流回执
* @param {*} data
* @returns
*/
export
function
getWayBillReceipt
(
data
)
{
return
request
({
url
:
'/bus-customer/declareData/wayBillReceipt'
,
method
:
'get'
,
params
:
data
,
})
}
/**
* 查看物流回执
* @param {*} data
* @returns
*/
export
function
exportDeclareData
(
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
url
=
baseUrl
+
'/bus-customer/declareData/exportDeclareData'
;
request
({
url
:
url
,
method
:
'post'
,
responseType
:
'blob'
,
// 确保响应类型为 blob
data
:
data
.
declareIds
,
})
.
then
((
res
)
=>
{
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
"申报数据.xlsx"
);
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
resolve
(
res
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
});
}
...
...
src/api/system/customer-ai.js
View file @
9c978fb
...
...
@@ -81,12 +81,6 @@ export function delCertificate(id, certificate) {
//下载证书
export
function
downloadCertificate
(
id
,
filename
)
{
// return request({
// url: '/bus-customer/customers/getCertificate/' + id,
// method: 'get',
// responseType: 'blob', // 确保响应类型为 blob
// // data: formData,
// });
console
.
log
(
"fileName"
+
filename
);
return
new
Promise
((
resolve
,
reject
)
=>
{
// axios({
...
...
@@ -102,7 +96,6 @@ export function downloadCertificate(id,filename) {
params
:
id
,
})
.
then
((
res
)
=>
{
console
.
log
(
"aaaaaa"
+
res
);
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
filename
);
// 设置下载文件名称
...
...
src/views/reportingData/index.vue
View file @
9c978fb
...
...
@@ -175,6 +175,7 @@
class="entrySaveButton"
size="small"
icon="el-icon-download"
v-loading="loadings.exportDeclareLoading"
@click="downloadData"
>
导出
...
...
@@ -225,10 +226,10 @@
</div>
</TablePopover>
</template>
<template v-slot:
logisticsReceiptStatus
="scope">
<template v-slot:
wayBillReceipt
="scope">
<TablePopover
ref="
logisticsReceiptStatus
Popover"
dataKey="
logisticsReceiptStatus
"
ref="
wayBillReceipt
Popover"
dataKey="
wayBillReceipt
"
idKey="declareId"
:parentDom="$refs.entryTable"
:receiptDataHead="receiptDataHead"
...
...
@@ -242,7 +243,7 @@
>{{ scope.row.orderno }}
</div>
<div slot="buttonLabel">
{{ scope.row.
logisticsReceiptStatus
}}
{{ scope.row.
wayBillReceipt
}}
</div>
</TablePopover>
</template>
...
...
@@ -288,6 +289,27 @@
</div>
</TablePopover>
</template>
<template v-slot:logisticsReceiptStatus="scope">
<TablePopover
ref="logisticsReceiptStatusPopover"
dataKey="logisticsReceiptStatus"
idKey="declareId"
:parentDom="$refs.entryTable"
:receiptDataHead="receiptDataHead"
:rowData="scope.row"
:tableData="tableData"
@popoverChange="popoverChange"
@popoverClose="popoverClose"
>
<div slot="title">
<span style="font-weight: 700; color: #515a6e">订单编号:</span
>{{ scope.row.orderno }}
</div>
<div slot="buttonLabel">
{{ scope.row.logisticsReceiptStatus }}
</div>
</TablePopover>
</template>
</Table>
<DialogVue
:outerVisible="outerVisible"
...
...
@@ -302,9 +324,11 @@ import {
searchDeclareData,
declareDataUpload,
getOrderReceipt,
get
Logistics
Receipt,
get
WayBill
Receipt,
getListReceipt,
getTotalReceipt,
getLogisticsReceipt,
exportDeclareData
} from "@/api/declareData-api.js";
import DialogVue from "./dialog.vue";
export default {
...
...
@@ -369,7 +393,7 @@ export default {
// },
{
name: "物流单回执",
value: "
logisticsReceiptStatus
",
value: "
wayBillReceipt
",
width: "",
align: "left",
slot: true,
...
...
@@ -388,6 +412,13 @@ export default {
align: "left",
slot: true,
},
{
name: "离境回执",
value: "logisticsReceiptStatus",
width: "",
align: "left",
slot: true,
},
],
receiptDataHead: [
{
...
...
@@ -421,6 +452,7 @@ export default {
dwonloadModelLoading: false,
dropDownLoading: false,
logTableLoading: false,
exportDeclareLoading:false,
},
textareaVisible: {},
tableMaxheight: null,
...
...
@@ -466,8 +498,9 @@ export default {
item.index = idx;
item.orderReceiptStatusPopoverType = false;
item.listReceiptStatusPopoverType = false;
item.
logisticsReceiptStatus
PopoverType = false;
item.
wayBillReceipt
PopoverType = false;
item.totalSplitOrderStatusPopoverType = false;
item.logisticsReceiptStatusPopoverType = false;
item.popoverData = [];
});
} else {
...
...
@@ -511,7 +544,33 @@ export default {
});
},
//导出
downloadData() {},
downloadData() {
if (this.selected.length > 0) {
this.loadings.exportDeclareLoading = true;
let obj = {
declareIds: [],
};
this.selected.forEach((item) => {
obj.declareIds.push(item.declareId);
});
exportDeclareData(obj).then((res)=>{
// if (res.code === "200") {
// // this.alertSuccessMsg(res.message);
// } else {
// console.log(res.message);
// this.alertWarningMsg(res.message);
// }
this.loadings.exportDeclareLoading = false;
}).catch((err)=>{
console.log(err);
this.alertErrorMsg(err);
this.loadings.exportDeclareLoading = false;
})
}else {
this.alertWarningMsg("请选择需导出的数据!");
}
},
//申报
declareData() {
if (this.selected.length > 0) {
...
...
@@ -567,9 +626,10 @@ export default {
.finally(() => {
this.$nextTick(() => {
this.$refs.orderReceiptStatusPopover.tableLoading = false;
this.$refs.
logisticsReceiptStatus
Popover.tableLoading = false;
this.$refs.
wayBillReceipt
Popover.tableLoading = false;
this.$refs.listReceiptStatusPopover.tableLoading = false;
this.$refs.totalSplitOrderStatusPopover.tableLoading = false;
this.$refs.logisticsReceiptStatusPopover.tableLoading = false;
});
});
},
...
...
@@ -590,8 +650,8 @@ export default {
console.log(err);
reject();
});
} else if (type == "
logisticsReceiptStatus
") {
get
Logistics
Receipt(obj)
} else if (type == "
wayBillReceipt
") {
get
WayBill
Receipt(obj)
.then((res) => {
if (res.code === "200") {
resolve(res.data);
...
...
@@ -630,14 +690,29 @@ export default {
reject();
});
}
else if (type == "logisticsReceiptStatus") {
getLogisticsReceipt(obj)
.then((res) => {
if (res.code === "200") {
resolve(res.data);
} else {
reject();
}
})
.catch((err) => {
console.log(err);
reject();
});
}
});
},
popoverClose(val) {
this.tableData.forEach((item) => {
item.orderReceiptStatusPopoverType = false;
item.listReceiptStatusPopoverType = false;
item.
logisticsReceiptStatus
PopoverType = false;
item.
wayBillReceipt
PopoverType = false;
item.totalSplitOrderStatusPopoverType = false;
item.logisticsReceiptStatusPopoverType = false;
item.popoverData = [];
});
this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
...
...
Please
register
or
login
to post a comment