declareData-api.js
4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
import request from '@/utils/request'
const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
//获取自定义设置数据
/**
* @param billNo 提运单号
* @param orderNo 订单编号
* @param logisticsNo 运单编号
* @param startCreateTime 创建开始时间
* @param endCreateTime 创建结束时间
* @param receiptType 回执类型
* @param receiptStatus 回执状态
* @param pageIndex *
* @param pageSize *
*/
export function searchDeclareData(data) {
return request({
url: '/bus-customer/declareData/getDeclareDataList',
method: 'post',
data: data,
})
}
//申报数据导入
/**
* @param multipartFile * 提运单号
*/
export function uploadDeclareData(data) {
let formData = new FormData
formData.append("multipartFile", data.multipartFile);
return request({
url: '/bus-customer/declareData/import',
method: 'post',
data: formData,
})
}
//数据申报
/**
* @param declareIds * id list
* @param type *
*/
export function declareDataUpload(data) {
return request({
url: '/bus-customer/declareData/' + data.type,
method: 'post',
data:{
cancellationReason: data.cancellationReason,
declareIds: data.declareIds
},
})
}
//查询订单回执
/**
* @param declareId * id
*/
export function getOrderReceipt(data) {
return request({
url: '/bus-customer/declareData/orderReceipt',
method: 'get',
params: data,
})
}
//查看离境回执
/**
* @param declareId * id
*/
export function getLogisticsReceipt(data) {
return request({
url: '/bus-customer/declareData/logisticsReceipt',
method: 'get',
params: data,
})
}
//查询清单回执
/**
* @param declareId * id
*/
export function getListReceipt(data) {
return request({
url: '/bus-customer/declareData/listReceipt',
method: 'get',
params: data,
})
}
//查询清单总分单回执
/**
* @param declareId * id
*/
export function getTotalReceipt(data) {
return request({
url: '/bus-customer/declareData/totalReceipt',
method: 'get',
params: data,
})
}
/**
* 查看物流回执
* @param {*} data
* @returns
*/
export function getWayBillReceipt(data) {
return request({
url: '/bus-customer/declareData/wayBillReceipt',
method: 'get',
params: data,
})
}
/**
* 查询总申报日志
* @param data id---->申报id
*/
export function getDeclarationLog(data){
return request({
url: '/bus-customer/declareData/getDeclarationLog/' + data,
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,
})
.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);
});
});
}
//获取客户列表
export function getCustomerList(data) {
return request({
url: '/bus-customer/customers/getCustomerList',
method: 'post',
data:{
"pageIndex": 1,
"pageSize": 1000,
},
})
}
//获取口岸表数据
export function getPortList(data) {
return request({
url: '/bus-customer/portInfo/getPortList',
method: 'post',
data:{
"pageIndex": 1,
"pageSize": 1000,
},
})
}
//获取申报信息
export function getDeclareData(data) {
return request({
url: '/bus-customer/declareData/get/'+data.declareId,
method: 'get',
params: data,
})
}
//更新申报信息
export function updateDeclareData(data) {
return request({
url: '/bus-customer/declareData/update',
method: 'post',
data
})
}
//申报数据批量修改-航班号,运单号
export function bathDeclareDate(data) {
return request({
url: '/bus-customer/declareData/bathDeclareDate',
method: 'post',
data
})
}