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 //获取自定义设置数据
...@@ -15,10 +15,10 @@ const baseUrl = process.env.VUE_APP_BASE_API; //接口地址 ...@@ -15,10 +15,10 @@ const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
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 //数据申报
...@@ -42,13 +42,13 @@ export function uploadDeclareData(data) { ...@@ -42,13 +42,13 @@ export function uploadDeclareData(data) {
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 //查询订单回执
...@@ -57,10 +57,10 @@ export function declareDataUpload(data) { ...@@ -57,10 +57,10 @@ export function declareDataUpload(data) {
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 //查看离境回执
...@@ -69,23 +69,22 @@ export function getOrderReceipt(data) { ...@@ -69,23 +69,22 @@ export function getOrderReceipt(data) {
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 //查询清单总分单回执
...@@ -94,10 +93,10 @@ export function getListReceipt(data) { ...@@ -94,10 +93,10 @@ export function getListReceipt(data) {
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 * 查看物流回执
...@@ -106,22 +105,22 @@ export function getTotalReceipt(data) { ...@@ -106,22 +105,22 @@ export function getTotalReceipt(data) {
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 + });
125 } 124 }
126 125
127 /** 126 /**
...@@ -130,13 +129,12 @@ export function getDeclarationLog(data){ ...@@ -130,13 +129,12 @@ export function getDeclarationLog(data){
130 * @returns 129 * @returns
131 */ 130 */
132 export function exportDeclareData(data) { 131 export function exportDeclareData(data) {
133 -
134 return new Promise((resolve, reject) => { 132 return new Promise((resolve, reject) => {
135 - var url = baseUrl + '/bus-customer/declareData/exportDeclareData'; 133 + var url = baseUrl + "/bus-customer/declareData/exportDeclareData";
136 request({ 134 request({
137 url: url, 135 url: url,
138 - method: 'post', 136 + method: "post",
139 - responseType: 'blob', // 确保响应类型为 blob 137 + responseType: "blob", // 确保响应类型为 blob
140 data: data, 138 data: data,
141 }) 139 })
142 .then((res) => { 140 .then((res) => {
...@@ -147,7 +145,6 @@ export function exportDeclareData(data) { ...@@ -147,7 +145,6 @@ export function exportDeclareData(data) {
147 aLink.click(); 145 aLink.click();
148 document.body.removeChild(aLink); 146 document.body.removeChild(aLink);
149 resolve(res); 147 resolve(res);
150 -
151 }) 148 })
152 .catch((err) => { 149 .catch((err) => {
153 reject(err); 150 reject(err);
...@@ -158,51 +155,60 @@ export function exportDeclareData(data) { ...@@ -158,51 +155,60 @@ export function exportDeclareData(data) {
158 //获取客户列表 155 //获取客户列表
159 export function getCustomerList(data) { 156 export function getCustomerList(data) {
160 return request({ 157 return request({
161 - url: '/bus-customer/customers/getCustomerList', 158 + url: "/bus-customer/customers/getCustomerList",
162 - method: 'post', 159 + method: "post",
163 - data:{ 160 + data: {
164 - "pageIndex": 1, 161 + pageIndex: 1,
165 - "pageSize": 1000, 162 + pageSize: 1000,
166 }, 163 },
167 - }) 164 + });
165 +}
166 +// /exportSummary/exportSummaryList
167 +export function getNewCustomerList(data) {
168 + return request({
169 + url: "/bus-customer/exportSummary/get/customers",
170 + method: "post",
171 + data: {
172 + pageIndex: 1,
173 + pageSize: 1000,
174 + ...data,
175 + },
176 + });
168 } 177 }
169 178
170 //获取口岸表数据 179 //获取口岸表数据
171 export function getPortList(data) { 180 export function getPortList(data) {
172 return request({ 181 return request({
173 - url: '/bus-customer/portInfo/getPortList', 182 + url: "/bus-customer/portInfo/getPortList",
174 - method: 'post', 183 + method: "post",
175 - data:{ 184 + data: {
176 - "pageIndex": 1, 185 + pageIndex: 1,
177 - "pageSize": 1000, 186 + pageSize: 1000,
178 }, 187 },
179 - }) 188 + });
180 } 189 }
181 190
182 //获取申报信息 191 //获取申报信息
183 export function getDeclareData(data) { 192 export function getDeclareData(data) {
184 return request({ 193 return request({
185 - url: '/bus-customer/declareData/get/'+data.declareId, 194 + url: "/bus-customer/declareData/get/" + data.declareId,
186 - method: 'get', 195 + method: "get",
187 params: data, 196 params: data,
188 - }) 197 + });
189 } 198 }
190 //更新申报信息 199 //更新申报信息
191 export function updateDeclareData(data) { 200 export function updateDeclareData(data) {
192 return request({ 201 return request({
193 - url: '/bus-customer/declareData/update', 202 + url: "/bus-customer/declareData/update",
194 - method: 'post', 203 + method: "post",
195 - data 204 + data,
196 - }) 205 + });
197 } 206 }
198 //申报数据批量修改-航班号,运单号 207 //申报数据批量修改-航班号,运单号
199 export function bathDeclareDate(data) { 208 export function bathDeclareDate(data) {
200 return request({ 209 return request({
201 - url: '/bus-customer/declareData/bathDeclareDate', 210 + url: "/bus-customer/declareData/bathDeclareDate",
202 - method: 'post', 211 + method: "post",
203 - data 212 + data,
204 - }) 213 + });
205 } 214 }
206 -
207 -
208 -
......
1 -import request from '@/utils/request' 1 +import request from "@/utils/request";
2 2
3 /** 3 /**
4 * 汇总申请单查询 4 * 汇总申请单查询
...@@ -14,46 +14,56 @@ import request from '@/utils/request' ...@@ -14,46 +14,56 @@ import request from '@/utils/request'
14 * @param data.pageIndex 当前页码 14 * @param data.pageIndex 当前页码
15 * @param data.pageSize 分页最大数据量 15 * @param data.pageSize 分页最大数据量
16 */ 16 */
17 -export function searchExportSummaryList(data){ 17 +export function searchExportSummaryList(data) {
18 return request({ 18 return request({
19 - url: '/bus-customer/exportSummary/exportSummaryList', 19 + url: "/bus-customer/exportSummary/exportSummaryList",
20 - method: 'post', 20 + method: "post",
21 data: data, 21 data: data,
22 - }) 22 + });
23 } 23 }
24 24
25 /** 25 /**
26 * 查询汇总回执 26 * 查询汇总回执
27 * @param data.copNo 企业唯一编号 27 * @param data.copNo 企业唯一编号
28 */ 28 */
29 -export function getExportSummaryReceiptData(data){ 29 +export function getExportSummaryReceiptData(data) {
30 return request({ 30 return request({
31 - url: '/bus-customer/exportSummary/receipt/' + data.copNo, 31 + url: "/bus-customer/exportSummary/receipt/" + data.copNo,
32 - method: 'get', 32 + method: "get",
33 - }) 33 + });
34 } 34 }
35 35
36 /** 36 /**
37 * 获取汇总申请单详情 37 * 获取汇总申请单详情
38 * @param data.id 汇总申请单id 38 * @param data.id 汇总申请单id
39 */ 39 */
40 -export function getExportSummaryDetail(data){ 40 +export function getExportSummaryDetail(data) {
41 return request({ 41 return request({
42 - url: '/bus-customer/exportSummary/exportSummaryDetail/' + data.id, 42 + url: "/bus-customer/exportSummary/exportSummaryDetail/" + data.id,
43 - method: 'get', 43 + method: "get",
44 - }) 44 + });
45 } 45 }
46 46
47 -
48 /** 47 /**
49 * 汇总申报 48 * 汇总申报
50 * @param data 49 * @param data
51 * @returns {*} 50 * @returns {*}
52 */ 51 */
53 -export function declareSummaryApplication(data){ 52 +export function declareSummaryApplication(data) {
53 + return request({
54 + url: "/bus-customer/exportSummary/declare",
55 + method: "post",
56 + data: data,
57 + });
58 +}
59 +
60 +// POST
61 +// ​/exportSummary​/get​/customers
62 +// 根据条件获取可以汇总申报的企业
63 +export function getCustomers(data) {
54 return request({ 64 return request({
55 - url:'/bus-customer/exportSummary/declare', 65 + url: "/bus-customer/exportSummary/get/customers",
56 - method:'post', 66 + method: "post",
57 - data:data 67 + data: data,
58 - }) 68 + });
59 } 69 }
......
...@@ -127,6 +127,25 @@ ...@@ -127,6 +127,25 @@
127 </Formitem> 127 </Formitem>
128 </el-col> 128 </el-col>
129 </el-row> 129 </el-row>
130 + <el-row :gutter="5">
131 + <el-col :span="8">
132 + <Formitem
133 + label="汇总申报地海关代码"
134 + prop="exportPortCode"
135 + type="edit"
136 + >
137 + <el-input
138 + type="text"
139 + class="inputShadow"
140 + id="inputInner-edit-exportPortCode"
141 + resize="none"
142 + v-model="formData.exportPortCode"
143 + clearable
144 + placeholder=""
145 + ></el-input>
146 + </Formitem>
147 + </el-col>
148 + </el-row>
130 </el-form> 149 </el-form>
131 </div> 150 </div>
132 <div class="dialogOption entrySave"> 151 <div class="dialogOption entrySave">
...@@ -177,6 +196,7 @@ export default { ...@@ -177,6 +196,7 @@ export default {
177 declarationUnitCompanyName: "", 196 declarationUnitCompanyName: "",
178 dxpid: "", 197 dxpid: "",
179 portCode: "", 198 portCode: "",
199 + exportPortCode: "",
180 }, 200 },
181 rules: { 201 rules: {
182 portCode: [ 202 portCode: [
...@@ -244,6 +264,13 @@ export default { ...@@ -244,6 +264,13 @@ export default {
244 message: "申报单位 (企业名称)不能为空!", 264 message: "申报单位 (企业名称)不能为空!",
245 }, 265 },
246 ], 266 ],
267 + exportPortCode: [
268 + {
269 + required: true,
270 + trigger: "blur",
271 + message: "汇总申报地海关代码不能为空!",
272 + },
273 + ],
247 }, 274 },
248 loadings: { 275 loadings: {
249 dialogLoading: false, 276 dialogLoading: false,
...@@ -348,6 +375,7 @@ export default { ...@@ -348,6 +375,7 @@ export default {
348 declarationUnitCompanyName: "", 375 declarationUnitCompanyName: "",
349 dxpid: "", 376 dxpid: "",
350 portCode: "", 377 portCode: "",
378 + exportPortCode: "",
351 }; 379 };
352 this.$emit("close"); 380 this.$emit("close");
353 }, 381 },
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
23 clearable 23 clearable
24 filterable 24 filterable
25 placeholder="" 25 placeholder=""
26 + @change="searchUserData"
26 > 27 >
27 <el-option 28 <el-option
28 v-for="(item, index) in portInfo" 29 v-for="(item, index) in portInfo"
...@@ -54,24 +55,22 @@ ...@@ -54,24 +55,22 @@
54 </el-row> 55 </el-row>
55 <el-row :gutter="5" type="flex" justify="center"> 56 <el-row :gutter="5" type="flex" justify="center">
56 <el-col :span="10"> 57 <el-col :span="10">
57 - <Formitem label="电商企业名称" prop="ebpcode"> 58 + <Formitem label="创建时间" prop="time" :activeType="true">
58 - <el-select 59 + <el-date-picker
59 - type="text" 60 + class="inputInner--time"
60 - id="inputInner--ebpcode" 61 + id="inputInner--time"
61 - v-model="formData.ebpcode" 62 + v-model="formData.time"
62 - clearable 63 + type="daterange"
63 - filterable 64 + format="yyyy-MM-dd"
64 - placeholder="" 65 + prefix-icon="none"
65 - > 66 + value-format="yyyy-MM-dd"
66 - <el-option 67 + range-separator="至"
67 - v-for="(item, index) in ebcDataList" 68 + @change="dateChange"
68 - :key="index" 69 + style="background-color: #f2f2f2"
69 - :label="item.ecomEntName" 70 + />
70 - :value="item.ecomEntCode"
71 - ></el-option>
72 - </el-select>
73 </Formitem> 71 </Formitem>
74 </el-col> 72 </el-col>
73 +
75 <el-col :span="10"> 74 <el-col :span="10">
76 <Formitem label="申报方式" prop="declareType"> 75 <Formitem label="申报方式" prop="declareType">
77 <el-select 76 <el-select
...@@ -93,19 +92,23 @@ ...@@ -93,19 +92,23 @@
93 </el-row> 92 </el-row>
94 <el-row :gutter="5" type="flex" justify="center"> 93 <el-row :gutter="5" type="flex" justify="center">
95 <el-col :span="10"> 94 <el-col :span="10">
96 - <Formitem label="创建时间" prop="time" :activeType="true"> 95 + <Formitem label="电商企业名称" prop="ebpcode">
97 - <el-date-picker 96 + <el-select
98 - class="inputInner--time" 97 + type="text"
99 - id="inputInner--time" 98 + id="inputInner--ebpcode"
100 - v-model="formData.time" 99 + v-model="formData.ebpcode"
101 - type="daterange" 100 + clearable
102 - format="yyyy-MM-dd" 101 + filterable
103 - prefix-icon="none" 102 + placeholder=""
104 - value-format="yyyy-MM-dd" 103 + @focus="getCustomerList"
105 - range-separator="至" 104 + >
106 - @change="dateChange" 105 + <el-option
107 - style="background-color: #f2f2f2" 106 + v-for="(item, index) in ebcDataList"
108 - /> 107 + :key="index"
108 + :label="item.ecomEntName"
109 + :value="item.ecomEntCode"
110 + ></el-option>
111 + </el-select>
109 </Formitem> 112 </Formitem>
110 </el-col> 113 </el-col>
111 <el-col :span="5"> 114 <el-col :span="5">
...@@ -156,7 +159,7 @@ ...@@ -156,7 +159,7 @@
156 159
157 <script> 160 <script>
158 import { getCurrUserPortInfo } from "@/api/system/user.js"; 161 import { getCurrUserPortInfo } from "@/api/system/user.js";
159 -import { getCustomerList } from "@/api/declareData-api.js"; 162 +import { getNewCustomerList } from "@/api/declareData-api.js";
160 import { getDictData } from "@/api/system/dict-api.js"; 163 import { getDictData } from "@/api/system/dict-api.js";
161 import { declareSummaryApplication } from "@/api/exportSummary-api.js"; 164 import { declareSummaryApplication } from "@/api/exportSummary-api.js";
162 export default { 165 export default {
...@@ -204,9 +207,15 @@ export default { ...@@ -204,9 +207,15 @@ export default {
204 this.getCustomerList(); 207 this.getCustomerList();
205 this.getSummaryFlag(); 208 this.getSummaryFlag();
206 this.getItemNameFlag(); 209 this.getItemNameFlag();
210 + },
211 + mounted() {
207 this.getDeclareType(); 212 this.getDeclareType();
208 }, 213 },
209 methods: { 214 methods: {
215 + searchUserData(val) {
216 + this.formData.customsCode = val;
217 + this.formData.ebpcode = "";
218 + },
210 //获取当前用户的口岸信息 219 //获取当前用户的口岸信息
211 getCurrUserPortInfo() { 220 getCurrUserPortInfo() {
212 getCurrUserPortInfo() 221 getCurrUserPortInfo()
...@@ -221,10 +230,13 @@ export default { ...@@ -221,10 +230,13 @@ export default {
221 }, 230 },
222 //获取客户下拉列表数据 231 //获取客户下拉列表数据
223 getCustomerList() { 232 getCustomerList() {
224 - getCustomerList() 233 + let params = {
234 + ...this.formData,
235 + };
236 + getNewCustomerList(params)
225 .then((res) => { 237 .then((res) => {
226 if (res.code == 200) { 238 if (res.code == 200) {
227 - this.ebcDataList = res.data.value; 239 + this.ebcDataList = res.data;
228 } else { 240 } else {
229 this.ebcDataList = []; 241 this.ebcDataList = [];
230 } 242 }
...@@ -278,6 +290,7 @@ export default { ...@@ -278,6 +290,7 @@ export default {
278 dateChange(val) { 290 dateChange(val) {
279 this.formData.startTime = val[0] + " 00:00:00"; 291 this.formData.startTime = val[0] + " 00:00:00";
280 this.formData.endTime = val[1] + " 23:59:59"; 292 this.formData.endTime = val[1] + " 23:59:59";
293 + this.formData.ebpcode = "";
281 }, 294 },
282 getDeclareType() { 295 getDeclareType() {
283 getDictData({ 296 getDictData({
...@@ -285,6 +298,11 @@ export default { ...@@ -285,6 +298,11 @@ export default {
285 }).then((res) => { 298 }).then((res) => {
286 if (res.code == 200) { 299 if (res.code == 200) {
287 this.declareType = res.data; 300 this.declareType = res.data;
301 + console.log(res.data);
302 + this.formData.declareType = this.declareType[0].itemValue;
303 + this.$nextTick(() => {
304 + this.$refs.editForm.clearValidate(["declareType"]);
305 + });
288 } else { 306 } else {
289 this.declareType = []; 307 this.declareType = [];
290 } 308 }
......