declareData-api.js
7.79 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
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,
changeFlag: data?.changeFlag || false,
},
});
}
// 删单deleteFlag:true,note:删单原因
// 变更changeFlag:true
export function declareDataUploadNew(data) {
return request({
url: "/bus-customer/declareData/" + data.type,
method: "post",
data: {
declareIds: data.declareIds, //申报id
deleteFlag: data?.deleteFlag || false, // 是否删单
changeFlag: data?.changeFlag || false,
note: data.note || null, // 删单原因
},
});
}
//查询订单回执
/**
* @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,
});
}
// GET
// /declareData/arrivalInReceipt
// 运抵单回执
export function arrivalInReceipt(data) {
return request({
url: "/bus-customer/declareData/arrivalInReceipt",
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,
},
});
}
// /exportSummary/exportSummaryList
export function getNewCustomerList(data) {
return request({
url: "/bus-customer/exportSummary/get/customers",
method: "post",
data: {
pageIndex: 1,
pageSize: 1000,
...data,
},
});
}
//获取口岸表数据
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,
});
}
// GET
// /operatorPlace/getCurrUserOperatorCode
// 获取当前用户监管场所代码
export function getCurrUserOperatorCode() {
return request({
url: "/bus-customer/operatorPlace/getCurrUserOperatorCode",
method: "get",
});
}
export function declareUpload(data) {
return request({
url: "/bus-customer/declareData/" + data.type,
method: "post",
data: {
...data,
},
});
}
// 根据提运单号 查询提运单号下的所有物流运单号
// bus-customer/declareData/checkBillNo
export function checkBillNo(data) {
return request({
url: "/bus-customer/declareData/checkBillNo",
method: "post",
data: data.declareIds,
});
}
// /declareData/getArrivalIneList
// 运抵单申报列表
export function getArrivalIneList(data) {
return request({
url: "/bus-customer/declareData/getArrivalIneList",
method: "post",
data: data,
});
}
// /declareData/getWeight/{billNo}
export function getWeight(data) {
return request({
url: "/bus-customer/declareData/getWeight/" + data.billNo,
method: "get",
data: data,
});
}
// POST
// /declareData/modifyWeight
// 修改重量
export function modifyWeight(data) {
return request({
url: "/bus-customer/declareData/modifyWeight",
method: "post",
data: data,
});
}
// GET /declareData/getTotalDocumentsLevelLog/{billNo}
export function getTotalDocumentsLevelLog(data) {
return request({
url: "/bus-customer/declareData/getTotalDocumentsLevelLog/" + data.billNo,
method: "get",
data: data,
});
}
// 分单级 根据提运单号获取操作日志
export function getOperationLogByLogisticsNo(data) {
return request({
url:
"/bus-customer/declareData/getOperationLogByLogisticsNo/" +
data.LogisticsNo,
method: "get",
data: data,
});
}
// /declareData/getOperationLogByBillNo/{billNo}
// 总 根据提运单号获取操作日志
export function getOperationLogByBillNo(data) {
return request({
url: "/bus-customer/declareData/getOperationLogByBillNo/" + data.billNo,
method: "get",
data: data,
});
}
// 查询导出的任务ID
// POST
// /exportList/submitExportTask
export function getSubmitExportTask(data) {
return request({
url: "/bus-customer/declareData/submitExportTask",
method: "post",
data: data,
});
}
// /asyncExport/taskStatus/{taskId}
export function getTaskStatus(data) {
return request({
url: "/bus-customer/asyncExport/taskStatus/" + data.taskId,
method: "get",
});
}
// /asyncExport/download/{taskId}
export function getDownload(data) {
return request({
url: "/bus-customer/asyncExport/download/" + data.taskId,
method: "get",
});
}