zhanbo.xu

feat: 开发申报数据管理

1 -import request from '@/utils/request' 1 +import request from "@/utils/request";
2 const baseUrl = process.env.VUE_APP_BASE_API; //接口地址 2 const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
3 3
4 //获取自定义设置数据 4 //获取自定义设置数据
...@@ -14,11 +14,11 @@ const baseUrl = process.env.VUE_APP_BASE_API; //接口地址 ...@@ -14,11 +14,11 @@ const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
14 * @param pageSize * 14 * @param pageSize *
15 */ 15 */
16 export function searchDeclareData(data) { 16 export function searchDeclareData(data) {
17 - return request({ 17 + return request({
18 - url: '/bus-customer/declareData/getDeclareDataList', 18 + url: "/bus-customer/declareData/getDeclareDataList",
19 - method: 'post', 19 + method: "post",
20 - data: data, 20 + data: data,
21 - }) 21 + });
22 } 22 }
23 23
24 //申报数据导入 24 //申报数据导入
...@@ -26,13 +26,13 @@ export function searchDeclareData(data) { ...@@ -26,13 +26,13 @@ export function searchDeclareData(data) {
26 * @param multipartFile * 提运单号 26 * @param multipartFile * 提运单号
27 */ 27 */
28 export function uploadDeclareData(data) { 28 export function uploadDeclareData(data) {
29 - let formData = new FormData 29 + let formData = new FormData();
30 - formData.append("multipartFile", data.multipartFile); 30 + formData.append("multipartFile", data.multipartFile);
31 - return request({ 31 + return request({
32 - url: '/bus-customer/declareData/import', 32 + url: "/bus-customer/declareData/import",
33 - method: 'post', 33 + method: "post",
34 - data: formData, 34 + data: formData,
35 - }) 35 + });
36 } 36 }
37 37
38 //数据申报 38 //数据申报
...@@ -41,14 +41,14 @@ export function uploadDeclareData(data) { ...@@ -41,14 +41,14 @@ export function uploadDeclareData(data) {
41 * @param type * 41 * @param type *
42 */ 42 */
43 export function declareDataUpload(data) { 43 export function declareDataUpload(data) {
44 - return request({ 44 + return request({
45 - url: '/bus-customer/declareData/' + data.type, 45 + url: "/bus-customer/declareData/" + data.type,
46 - method: 'post', 46 + method: "post",
47 - data:{ 47 + data: {
48 - cancellationReason: data.cancellationReason, 48 + cancellationReason: data.cancellationReason,
49 - declareIds: data.declareIds 49 + declareIds: data.declareIds,
50 - }, 50 + },
51 - }) 51 + });
52 } 52 }
53 53
54 //查询订单回执 54 //查询订单回执
...@@ -56,11 +56,11 @@ export function declareDataUpload(data) { ...@@ -56,11 +56,11 @@ export function declareDataUpload(data) {
56 * @param declareId * id 56 * @param declareId * id
57 */ 57 */
58 export function getOrderReceipt(data) { 58 export function getOrderReceipt(data) {
59 - return request({ 59 + return request({
60 - url: '/bus-customer/declareData/orderReceipt', 60 + url: "/bus-customer/declareData/orderReceipt",
61 - method: 'get', 61 + method: "get",
62 - params: data, 62 + params: data,
63 - }) 63 + });
64 } 64 }
65 65
66 //查看离境回执 66 //查看离境回执
...@@ -68,24 +68,23 @@ export function getOrderReceipt(data) { ...@@ -68,24 +68,23 @@ export function getOrderReceipt(data) {
68 * @param declareId * id 68 * @param declareId * id
69 */ 69 */
70 export function getLogisticsReceipt(data) { 70 export function getLogisticsReceipt(data) {
71 - return request({ 71 + return request({
72 - url: '/bus-customer/declareData/logisticsReceipt', 72 + url: "/bus-customer/declareData/logisticsReceipt",
73 - method: 'get', 73 + method: "get",
74 - params: data, 74 + params: data,
75 - }) 75 + });
76 } 76 }
77 77
78 -
79 //查询清单回执 78 //查询清单回执
80 /** 79 /**
81 * @param declareId * id 80 * @param declareId * id
82 */ 81 */
83 export function getListReceipt(data) { 82 export function getListReceipt(data) {
84 - return request({ 83 + return request({
85 - url: '/bus-customer/declareData/listReceipt', 84 + url: "/bus-customer/declareData/listReceipt",
86 - method: 'get', 85 + method: "get",
87 - params: data, 86 + params: data,
88 - }) 87 + });
89 } 88 }
90 89
91 //查询清单总分单回执 90 //查询清单总分单回执
...@@ -93,11 +92,11 @@ export function getListReceipt(data) { ...@@ -93,11 +92,11 @@ export function getListReceipt(data) {
93 * @param declareId * id 92 * @param declareId * id
94 */ 93 */
95 export function getTotalReceipt(data) { 94 export function getTotalReceipt(data) {
96 - return request({ 95 + return request({
97 - url: '/bus-customer/declareData/totalReceipt', 96 + url: "/bus-customer/declareData/totalReceipt",
98 - method: 'get', 97 + method: "get",
99 - params: data, 98 + params: data,
100 - }) 99 + });
101 } 100 }
102 /** 101 /**
103 * 查看物流回执 102 * 查看物流回执
...@@ -105,23 +104,34 @@ export function getTotalReceipt(data) { ...@@ -105,23 +104,34 @@ export function getTotalReceipt(data) {
105 * @returns 104 * @returns
106 */ 105 */
107 export function getWayBillReceipt(data) { 106 export function getWayBillReceipt(data) {
108 - return request({ 107 + return request({
109 - url: '/bus-customer/declareData/wayBillReceipt', 108 + url: "/bus-customer/declareData/wayBillReceipt",
110 - method: 'get', 109 + method: "get",
111 - params: data, 110 + params: data,
112 - }) 111 + });
113 } 112 }
114 113
115 /** 114 /**
116 * 查询总申报日志 115 * 查询总申报日志
117 * @param data id---->申报id 116 * @param data id---->申报id
118 */ 117 */
119 -export function getDeclarationLog(data){ 118 +export function getDeclarationLog(data) {
120 return request({ 119 return request({
121 - url: '/bus-customer/declareData/getDeclarationLog/' + data, 120 + url: "/bus-customer/declareData/getDeclarationLog/" + data,
122 - method: 'get', 121 + method: "get",
123 params: data, 122 params: data,
124 - }) 123 + });
124 +}
125 +
126 +// GET
127 +// ​/declareData​/arrivalInReceipt
128 +// 运抵单回执
129 +export function arrivalInReceipt(data) {
130 + return request({
131 + url: "/bus-customer/declareData/arrivalInReceipt",
132 + method: "get",
133 + params: data,
134 + });
125 } 135 }
126 136
127 /** 137 /**
...@@ -130,79 +140,74 @@ export function getDeclarationLog(data){ ...@@ -130,79 +140,74 @@ export function getDeclarationLog(data){
130 * @returns 140 * @returns
131 */ 141 */
132 export function exportDeclareData(data) { 142 export function exportDeclareData(data) {
133 - 143 + return new Promise((resolve, reject) => {
134 - return new Promise((resolve, reject) => { 144 + var url = baseUrl + "/bus-customer/declareData/exportDeclareData";
135 - var url = baseUrl + '/bus-customer/declareData/exportDeclareData'; 145 + request({
136 - request({ 146 + url: url,
137 - url: url, 147 + method: "post",
138 - method: 'post', 148 + responseType: "blob", // 确保响应类型为 blob
139 - responseType: 'blob', // 确保响应类型为 blob 149 + data: data,
140 - data: data, 150 + })
141 - }) 151 + .then((res) => {
142 - .then((res) => { 152 + const aLink = document.createElement("a");
143 - const aLink = document.createElement("a"); 153 + aLink.href = URL.createObjectURL(res);
144 - aLink.href = URL.createObjectURL(res); 154 + aLink.setAttribute("download", "申报数据.xlsx"); // 设置下载文件名称
145 - aLink.setAttribute("download", "申报数据.xlsx"); // 设置下载文件名称 155 + document.body.appendChild(aLink);
146 - document.body.appendChild(aLink); 156 + aLink.click();
147 - aLink.click(); 157 + document.body.removeChild(aLink);
148 - document.body.removeChild(aLink); 158 + resolve(res);
149 - resolve(res); 159 + })
150 - 160 + .catch((err) => {
151 - }) 161 + reject(err);
152 - .catch((err) => {
153 - reject(err);
154 - });
155 }); 162 });
163 + });
156 } 164 }
157 165
158 //获取客户列表 166 //获取客户列表
159 export function getCustomerList(data) { 167 export function getCustomerList(data) {
160 - return request({ 168 + return request({
161 - url: '/bus-customer/customers/getCustomerList', 169 + url: "/bus-customer/customers/getCustomerList",
162 - method: 'post', 170 + method: "post",
163 - data:{ 171 + data: {
164 - "pageIndex": 1, 172 + pageIndex: 1,
165 - "pageSize": 1000, 173 + pageSize: 1000,
166 - }, 174 + },
167 - }) 175 + });
168 } 176 }
169 177
170 //获取口岸表数据 178 //获取口岸表数据
171 export function getPortList(data) { 179 export function getPortList(data) {
172 - return request({ 180 + return request({
173 - url: '/bus-customer/portInfo/getPortList', 181 + url: "/bus-customer/portInfo/getPortList",
174 - method: 'post', 182 + method: "post",
175 - data:{ 183 + data: {
176 - "pageIndex": 1, 184 + pageIndex: 1,
177 - "pageSize": 1000, 185 + pageSize: 1000,
178 - }, 186 + },
179 - }) 187 + });
180 } 188 }
181 189
182 //获取申报信息 190 //获取申报信息
183 export function getDeclareData(data) { 191 export function getDeclareData(data) {
184 - return request({ 192 + return request({
185 - url: '/bus-customer/declareData/get/'+data.declareId, 193 + url: "/bus-customer/declareData/get/" + data.declareId,
186 - method: 'get', 194 + method: "get",
187 - params: data, 195 + params: data,
188 - }) 196 + });
189 } 197 }
190 //更新申报信息 198 //更新申报信息
191 export function updateDeclareData(data) { 199 export function updateDeclareData(data) {
192 - return request({ 200 + return request({
193 - url: '/bus-customer/declareData/update', 201 + url: "/bus-customer/declareData/update",
194 - method: 'post', 202 + method: "post",
195 - data 203 + data,
196 - }) 204 + });
197 } 205 }
198 //申报数据批量修改-航班号,运单号 206 //申报数据批量修改-航班号,运单号
199 export function bathDeclareDate(data) { 207 export function bathDeclareDate(data) {
200 - return request({ 208 + return request({
201 - url: '/bus-customer/declareData/bathDeclareDate', 209 + url: "/bus-customer/declareData/bathDeclareDate",
202 - method: 'post', 210 + method: "post",
203 - data 211 + data,
204 - }) 212 + });
205 } 213 }
206 -
207 -
208 -
......
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
106 }, 106 },
107 //弹框状态改版 107 //弹框状态改版
108 popoverChange(data, type) { 108 popoverChange(data, type) {
109 + console.log(data, type);
109 this.popoverClose(); 110 this.popoverClose();
110 let arr = JSON.parse(JSON.stringify(this.tableData)); 111 let arr = JSON.parse(JSON.stringify(this.tableData));
111 arr.forEach((item) => { 112 arr.forEach((item) => {
......
...@@ -202,7 +202,7 @@ export default { ...@@ -202,7 +202,7 @@ export default {
202 }, 202 },
203 { 203 {
204 name: "电商企业代码", 204 name: "电商企业代码",
205 - value: "copNo", 205 + value: "ebccode",
206 width: "", 206 width: "",
207 align: "left", 207 align: "left",
208 }, 208 },
......
...@@ -336,6 +336,27 @@ ...@@ -336,6 +336,27 @@
336 </div> 336 </div>
337 </TablePopover> 337 </TablePopover>
338 </template> 338 </template>
339 + <template v-slot:arrivalInReceiptStatus="scope">
340 + <TablePopover
341 + ref="arrivalInReceiptStatusPopover"
342 + dataKey="arrivalInReceiptStatus"
343 + idKey="declareId"
344 + :parentDom="$refs.entryTable"
345 + :receiptDataHead="receiptDataHead"
346 + :rowData="scope.row"
347 + :tableData="tableData"
348 + @popoverChange="popoverChange"
349 + @popoverClose="popoverClose"
350 + >
351 + <div slot="title">
352 + <span style="font-weight: 700; color: #515a6e">订单编号:</span
353 + >{{ scope.row.orderno }}
354 + </div>
355 + <div slot="buttonLabel">
356 + {{ scope.row.arrivalInReceiptStatus }}
357 + </div>
358 + </TablePopover>
359 + </template>
339 <template v-slot:totalSplitOrderStatus="scope"> 360 <template v-slot:totalSplitOrderStatus="scope">
340 <TablePopover 361 <TablePopover
341 ref="totalSplitOrderStatusPopover" 362 ref="totalSplitOrderStatusPopover"
...@@ -429,6 +450,7 @@ import { ...@@ -429,6 +450,7 @@ import {
429 getTotalReceipt, 450 getTotalReceipt,
430 getLogisticsReceipt, 451 getLogisticsReceipt,
431 getDeclarationLog, 452 getDeclarationLog,
453 + arrivalInReceipt,
432 exportDeclareData, 454 exportDeclareData,
433 } from "@/api/declareData-api.js"; 455 } from "@/api/declareData-api.js";
434 import { getDictData } from "@/api/system/dict-api.js"; 456 import { getDictData } from "@/api/system/dict-api.js";
...@@ -528,7 +550,7 @@ export default { ...@@ -528,7 +550,7 @@ export default {
528 { 550 {
529 // release-v1.0.9 551 // release-v1.0.9
530 name: "运抵单回执", 552 name: "运抵单回执",
531 - value: "listReceiptStatus", 553 + value: "arrivalInReceiptStatus",
532 width: "", 554 width: "",
533 align: "left", 555 align: "left",
534 slot: true, 556 slot: true,
...@@ -677,6 +699,7 @@ export default { ...@@ -677,6 +699,7 @@ export default {
677 item.orderReceiptStatusPopoverType = false; 699 item.orderReceiptStatusPopoverType = false;
678 item.listReceiptStatusPopoverType = false; 700 item.listReceiptStatusPopoverType = false;
679 item.wayBillReceiptPopoverType = false; 701 item.wayBillReceiptPopoverType = false;
702 + item.arrivalInReceiptStatusPopoverType = false;
680 item.totalSplitOrderStatusPopoverType = false; 703 item.totalSplitOrderStatusPopoverType = false;
681 item.logisticsReceiptStatusPopoverType = false; 704 item.logisticsReceiptStatusPopoverType = false;
682 // item.logLoading = false; 705 // item.logLoading = false;
...@@ -868,6 +891,9 @@ export default { ...@@ -868,6 +891,9 @@ export default {
868 }, 891 },
869 popoverChange(val) { 892 popoverChange(val) {
870 this.tableData = val.tableData; 893 this.tableData = val.tableData;
894 +
895 + console.log(val);
896 +
871 this.receiptApi(val.data.declareId, val.status) 897 this.receiptApi(val.data.declareId, val.status)
872 .then((res) => { 898 .then((res) => {
873 val.tableData.forEach((item) => { 899 val.tableData.forEach((item) => {
...@@ -883,6 +909,7 @@ export default { ...@@ -883,6 +909,7 @@ export default {
883 this.$refs.orderReceiptStatusPopover.tableLoading = false; 909 this.$refs.orderReceiptStatusPopover.tableLoading = false;
884 this.$refs.wayBillReceiptPopover.tableLoading = false; 910 this.$refs.wayBillReceiptPopover.tableLoading = false;
885 this.$refs.listReceiptStatusPopover.tableLoading = false; 911 this.$refs.listReceiptStatusPopover.tableLoading = false;
912 + this.$refs.arrivalInReceiptStatusPopover.tableLoading = false;
886 this.$refs.totalSplitOrderStatusPopover.tableLoading = false; 913 this.$refs.totalSplitOrderStatusPopover.tableLoading = false;
887 this.$refs.logisticsReceiptStatusPopover.tableLoading = false; 914 this.$refs.logisticsReceiptStatusPopover.tableLoading = false;
888 this.$refs.allLogDataReceiptStatusPopover.tableLoading = false; 915 this.$refs.allLogDataReceiptStatusPopover.tableLoading = false;
...@@ -971,6 +998,19 @@ export default { ...@@ -971,6 +998,19 @@ export default {
971 console.log(err); 998 console.log(err);
972 reject(); 999 reject();
973 }); 1000 });
1001 + } else if (type == "arrivalInReceiptStatus") {
1002 + arrivalInReceipt(obj)
1003 + .then((res) => {
1004 + if (res.code === "200") {
1005 + resolve(res.data);
1006 + } else {
1007 + reject();
1008 + }
1009 + })
1010 + .catch((err) => {
1011 + console.log(err);
1012 + reject();
1013 + });
974 } 1014 }
975 }); 1015 });
976 }, 1016 },
...@@ -981,6 +1021,7 @@ export default { ...@@ -981,6 +1021,7 @@ export default {
981 item.wayBillReceiptPopoverType = false; 1021 item.wayBillReceiptPopoverType = false;
982 item.totalSplitOrderStatusPopoverType = false; 1022 item.totalSplitOrderStatusPopoverType = false;
983 item.logisticsReceiptStatusPopoverType = false; 1023 item.logisticsReceiptStatusPopoverType = false;
1024 + item.arrivalInReceiptStatusPopoverType = false;
984 item.popoverData = []; 1025 item.popoverData = [];
985 }); 1026 });
986 this.selectedLogRow.allLogDataReceiptStatusPopoverType = false; 1027 this.selectedLogRow.allLogDataReceiptStatusPopoverType = false;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 :title="title" 4 :title="title"
5 :visible.sync="outerVisible" 5 :visible.sync="outerVisible"
6 :show-close="false" 6 :show-close="false"
7 - width="25%" 7 + width="40%"
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 :destroy-on-close="true" 9 :destroy-on-close="true"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
......