zhanbo.xu

feat: 增加总单级申报页面功能

...@@ -23,34 +23,26 @@ ...@@ -23,34 +23,26 @@
23 ></el-input> 23 ></el-input>
24 </Formitem> 24 </Formitem>
25 </el-col> 25 </el-col>
26 - <!-- 监管场所经营人代码 --> 26 + <!-- 回执状态 -->
27 - <el-col :span="5">
28 - <Formitem label="监管场所经营人代码" prop="operatorCode">
29 - <el-input
30 - type="text"
31 - class="inputShadow"
32 - id="inputInner--operatorCode"
33 - resize="none"
34 - v-model="sreachFormData.operatorCode"
35 - clearable
36 - placeholder=""
37 - ></el-input>
38 - </Formitem>
39 - </el-col>
40 - <!-- 监管场所经营人名称 -->
41 <el-col :span="5"> 27 <el-col :span="5">
42 - <Formitem label="监管场所经营人名称" prop="operatorName"> 28 + <Formitem label="回执状态" prop="receiptStatus">
43 - <el-input 29 + <el-select
44 type="text" 30 type="text"
45 - class="inputShadow" 31 + id="inputInner--receiptStatus"
46 - id="inputInner--operatorName" 32 + v-model="sreachFormData.receiptStatus"
47 - resize="none"
48 - v-model="sreachFormData.operatorName"
49 clearable 33 clearable
50 placeholder="" 34 placeholder=""
51 - ></el-input> 35 + >
36 + <el-option
37 + v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
38 + :key="index"
39 + :label="item.itemChineseName"
40 + :value="item.itemValue"
41 + ></el-option>
42 + </el-select>
52 </Formitem> 43 </Formitem>
53 </el-col> 44 </el-col>
45 +
54 <!-- 创建时间 --> 46 <!-- 创建时间 -->
55 <el-col :span="5"> 47 <el-col :span="5">
56 <Formitem label="创建时间" prop="createTime" :activeType="true"> 48 <Formitem label="创建时间" prop="createTime" :activeType="true">
...@@ -91,33 +83,25 @@ ...@@ -91,33 +83,25 @@
91 </el-form-item> 83 </el-form-item>
92 </el-col> 84 </el-col>
93 </el-row> 85 </el-row>
94 - <el-row class="backgroundRow">
95 - <!-- 回执状态 -->
96 - <el-col :span="5">
97 - <Formitem label="回执状态" prop="receiptStatus">
98 - <el-select
99 - type="text"
100 - id="inputInner--receiptStatus"
101 - v-model="sreachFormData.receiptStatus"
102 - clearable
103 - placeholder=""
104 - >
105 - <el-option
106 - v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
107 - :key="index"
108 - :label="item.itemChineseName"
109 - :value="item.itemValue"
110 - ></el-option>
111 - </el-select>
112 - </Formitem>
113 - </el-col>
114 - </el-row>
115 </el-form> 86 </el-form>
116 <div class="optionButton"> 87 <div class="optionButton">
117 <el-button 88 <el-button
118 size="small" 89 size="small"
119 type="primary" 90 type="primary"
120 class="dropdown-style-button" 91 class="dropdown-style-button"
92 + :loading="loadings.declaration"
93 + @click="listDeclaration"
94 + >
95 + <svg-icon
96 + class="el-icon-user-solid"
97 + icon-class="fedexDeclareIcon"
98 + ></svg-icon>
99 + 清单总分单申报
100 + </el-button>
101 + <el-button
102 + size="small"
103 + type="primary"
104 + class="dropdown-style-button"
121 @click="addDeclare" 105 @click="addDeclare"
122 > 106 >
123 <svg-icon 107 <svg-icon
...@@ -126,6 +110,18 @@ ...@@ -126,6 +110,18 @@
126 ></svg-icon> 110 ></svg-icon>
127 运抵单申报 111 运抵单申报
128 </el-button> 112 </el-button>
113 + <el-button
114 + size="small"
115 + type="primary"
116 + class="dropdown-style-button"
117 + @click="leaveDeclare"
118 + >
119 + <svg-icon
120 + class="el-icon-user-solid"
121 + icon-class="fedexDeclareIcon"
122 + ></svg-icon>
123 + 离境单申报
124 + </el-button>
129 </div> 125 </div>
130 <Table 126 <Table
131 class="fedexDetialTable fedexSreachTable" 127 class="fedexDetialTable fedexSreachTable"
...@@ -168,6 +164,18 @@ ...@@ -168,6 +164,18 @@
168 {{ scope.row.uncompletedCount }} 164 {{ scope.row.uncompletedCount }}
169 </el-button> 165 </el-button>
170 </template> 166 </template>
167 + <template v-slot:listDontReleaseCount="scope">
168 + 清单放行:{{ scope.row.listReleaseCount }}/{{
169 + scope.row.listDontReleaseCount
170 + }}
171 + <!-- <el-button type="text" style="margin-left: 0">
172 + {{ scope.row.listReleaseCount }}
173 + </el-button>
174 + /
175 + <el-button type="text">
176 + {{ scope.row.listDontReleaseCount }}
177 + </el-button> -->
178 + </template>
171 <template v-slot:arrivalInReceiptStatus="scope"> 179 <template v-slot:arrivalInReceiptStatus="scope">
172 <TablePopover 180 <TablePopover
173 ref="arrivalInReceiptStatusPopover" 181 ref="arrivalInReceiptStatusPopover"
...@@ -189,22 +197,86 @@ ...@@ -189,22 +197,86 @@
189 </div> 197 </div>
190 </TablePopover> 198 </TablePopover>
191 </template> 199 </template>
200 + <!-- -->
201 + <template v-slot:totalReceiptStatus="scope">
202 + <TablePopover
203 + ref="totalReceiptStatusPopover"
204 + dataKey="totalReceiptStatus"
205 + idKey="declareId"
206 + :parentDom="$refs.entryTable"
207 + :receiptDataHead="receiptDataHead"
208 + :rowData="scope.row"
209 + :tableData="tableData"
210 + @popoverChange="popoverChange"
211 + @popoverClose="popoverClose"
212 + >
213 + <div slot="title">
214 + <span style="font-weight: 700; color: #515a6e">提运单号:</span
215 + >{{ scope.row.billNo }}
216 + </div>
217 + <div slot="buttonLabel">
218 + {{ scope.row.totalReceiptStatus }}
219 + </div>
220 + </TablePopover>
221 + </template>
222 + <template v-slot:logisticsDepartureReceiptStatus="scope">
223 + <TablePopover
224 + ref="logisticsDepartureReceiptStatusPopover"
225 + dataKey="logisticsDepartureReceiptStatus"
226 + idKey="declareId"
227 + :parentDom="$refs.entryTable"
228 + :receiptDataHead="receiptDataHead"
229 + :rowData="scope.row"
230 + :tableData="tableData"
231 + @popoverChange="popoverChange"
232 + @popoverClose="popoverClose"
233 + >
234 + <div slot="title">
235 + <span style="font-weight: 700; color: #515a6e">提运单号:</span
236 + >{{ scope.row.billNo }}
237 + </div>
238 + <div slot="buttonLabel">
239 + {{ scope.row.logisticsDepartureReceiptStatus }}
240 + </div>
241 + </TablePopover>
242 + </template>
192 </Table> 243 </Table>
193 <DialogVue 244 <DialogVue
194 :outerVisible="outerVisible" 245 :outerVisible="outerVisible"
195 :selected="selected" 246 :selected="selected"
196 @close="dialogClose" 247 @close="dialogClose"
197 /> 248 />
249 + <DataPreview
250 + :showDialog="dataPreviewVisible"
251 + :dataPreviewTitle="dataPreviewTitle"
252 + :selectedDatas="selected"
253 + @cancelDataPreview="cancelDataPreview"
254 + />
255 + <TimeDialog
256 + :timeVisible="timeVisible"
257 + :selected="selected"
258 + @close="timeClose"
259 + />
198 </div> 260 </div>
199 </template> 261 </template>
200 262
201 <script> 263 <script>
202 -import { getArrivalIneList, arrivalInReceipt } from "@/api/declareData-api.js"; 264 +import {
265 + getArrivalIneList,
266 + arrivalInReceipt,
267 + declareDataUpload,
268 + getLogisticsReceipt,
269 + getTotalReceipt,
270 +} from "@/api/declareData-api.js";
203 import DialogVue from "./dialog.vue"; 271 import DialogVue from "./dialog.vue";
272 +import DataPreview from "../reportingData/data-preview.vue";
273 +import TimeDialog from "../reportingData/time-dialog.vue";
204 export default { 274 export default {
205 name: "SupervisePlaceManage", 275 name: "SupervisePlaceManage",
206 components: { 276 components: {
207 DialogVue, 277 DialogVue,
278 + DataPreview,
279 + TimeDialog,
208 }, 280 },
209 data() { 281 data() {
210 return { 282 return {
...@@ -215,8 +287,6 @@ export default { ...@@ -215,8 +287,6 @@ export default {
215 selected: [], 287 selected: [],
216 sreachFormData: { 288 sreachFormData: {
217 billNo: "", 289 billNo: "",
218 - operatorCode: "",
219 - operatorName: "",
220 receiptStatus: null, 290 receiptStatus: null,
221 receiptType: null, 291 receiptType: null,
222 createTime: [], 292 createTime: [],
...@@ -236,43 +306,47 @@ export default { ...@@ -236,43 +306,47 @@ export default {
236 slot: true, 306 slot: true,
237 }, 307 },
238 { 308 {
239 - name: "监管场所经营人代码", 309 + name: "清单审结进度",
240 - value: "operatorCode", 310 + value: "listReceiptStatus",
241 width: "", 311 width: "",
242 align: "left", 312 align: "left",
313 + slot: true,
243 }, 314 },
244 { 315 {
245 - name: "监管场所经营人名称", 316 + name: "清单放行进度",
246 - value: "operatorName", 317 + value: "listDontReleaseCount",
247 width: "", 318 width: "",
248 align: "left", 319 align: "left",
320 + slot: true,
249 }, 321 },
250 - // {
251 - // name: "电商企业名称",
252 - // value: "ecomEntName",
253 - // width: "",
254 - // align: "left",
255 - // },
256 { 322 {
257 - name: "创建时间", 323 + name: "清单总分单回执",
258 - value: "createTime", 324 + value: "totalReceiptStatus",
259 width: "", 325 width: "",
260 align: "left", 326 align: "left",
327 + slot: true,
261 }, 328 },
262 { 329 {
263 - name: "清单审结进度", 330 + name: "运抵单回执",
264 - value: "listReceiptStatus", 331 + value: "arrivalInReceiptStatus",
265 width: "", 332 width: "",
266 align: "left", 333 align: "left",
267 slot: true, 334 slot: true,
268 }, 335 },
336 +
269 { 337 {
270 - name: "运抵单回执", 338 + name: "离境单回执",
271 - value: "arrivalInReceiptStatus", 339 + value: "logisticsDepartureReceiptStatus",
272 width: "", 340 width: "",
273 align: "left", 341 align: "left",
274 slot: true, 342 slot: true,
275 }, 343 },
344 + {
345 + name: "创建时间",
346 + value: "createTime",
347 + width: "",
348 + align: "left",
349 + },
276 ], 350 ],
277 receiptDataHead: [ 351 receiptDataHead: [
278 { 352 {
...@@ -296,9 +370,15 @@ export default { ...@@ -296,9 +370,15 @@ export default {
296 ], 370 ],
297 loadings: { 371 loadings: {
298 sreachLoading: false, 372 sreachLoading: false,
373 + declaration: false,
299 }, 374 },
300 tableMaxheight: null, 375 tableMaxheight: null,
301 outerVisible: false, 376 outerVisible: false,
377 + // 清分单总单申报
378 + dataPreviewVisible: false,
379 + dataPreviewTitle: "",
380 + // 离境单申报
381 + timeVisible: false,
302 }; 382 };
303 }, 383 },
304 created() { 384 created() {
...@@ -312,6 +392,61 @@ export default { ...@@ -312,6 +392,61 @@ export default {
312 }, 392 },
313 393
314 methods: { 394 methods: {
395 + // 申报
396 + postDeclareData(val) {
397 + const obj = {
398 + declareIds: this.selected.map((item) => item.declareId),
399 + type: "totalScore",
400 + };
401 + declareDataUpload(obj)
402 + .then((res) => {
403 + if (res.code === "200") {
404 + this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。");
405 + } else {
406 + this.alertWarningMsg(res.message);
407 + }
408 + })
409 + .catch((err) => {
410 + console.error(err);
411 + this.alertWarningMsg("申报失败,请稍后重试。");
412 + })
413 + .finally(() => {
414 + if (+val === 1) {
415 + this.search(0);
416 + }
417 + });
418 + },
419 + // 清单总分单申报
420 + listDeclaration() {
421 + if (this.selected.length === 0) {
422 + this.alertWarningMsg("请选择数据!");
423 + return;
424 + }
425 + this.loadings.declaration = true;
426 +
427 + this.dataPreviewVisible = true;
428 + this.dataPreviewTitle = `预览-清单总分单申报`;
429 + },
430 + timeClose(flag = false) {
431 + this.timeVisible = false;
432 + if (flag) {
433 + this.search(0);
434 + }
435 + },
436 + // 离镜单申报
437 + leaveDeclare() {
438 + if (this.selected.length === 0) {
439 + this.alertWarningMsg("请选择数据!");
440 + return;
441 + }
442 + this.timeVisible = true;
443 + },
444 + cancelDataPreview(val) {
445 + this.dataPreviewVisible = false;
446 + this.dataPreviewTitle = "";
447 + this.loadings.declaration = false;
448 + this.postDeclareData(val);
449 + },
315 // 运单号跳转 450 // 运单号跳转
316 linkChange(record, type) { 451 linkChange(record, type) {
317 const { billNo, completedLogisticsNo, uncompletedLogisticsNo } = 452 const { billNo, completedLogisticsNo, uncompletedLogisticsNo } =
...@@ -346,8 +481,10 @@ export default { ...@@ -346,8 +481,10 @@ export default {
346 }, 481 },
347 popoverClose(val) { 482 popoverClose(val) {
348 this.tableData.forEach((item) => { 483 this.tableData.forEach((item) => {
349 - item.listReceiptStatusPopoverType = false; 484 + // item.listReceiptStatusPopoverType = false;
350 item.arrivalInReceiptStatusPopoverType = false; 485 item.arrivalInReceiptStatusPopoverType = false;
486 + item.logisticsDepartureReceiptStatusPopoverType = false;
487 + item.totalReceiptStatusPopoverType = false;
351 item.popoverData = []; 488 item.popoverData = [];
352 }); 489 });
353 this.selectedLogRow.allLogDataReceiptStatusPopoverType = false; 490 this.selectedLogRow.allLogDataReceiptStatusPopoverType = false;
...@@ -356,7 +493,7 @@ export default { ...@@ -356,7 +493,7 @@ export default {
356 }, 493 },
357 494
358 //查询回执 495 //查询回执
359 - receiptApi(billNo, type) { 496 + receiptApi(billNo, type, declareId) {
360 return new Promise((resolve, reject) => { 497 return new Promise((resolve, reject) => {
361 let obj = { billNo }; 498 let obj = { billNo };
362 // if (type == "listReceiptStatus") { 499 // if (type == "listReceiptStatus") {
...@@ -386,6 +523,34 @@ export default { ...@@ -386,6 +523,34 @@ export default {
386 console.log(err); 523 console.log(err);
387 reject(); 524 reject();
388 }); 525 });
526 + } else if (type == "logisticsDepartureReceiptStatus") {
527 + let objVal = { declareId: declareId };
528 + getLogisticsReceipt(objVal)
529 + .then((res) => {
530 + if (res.code === "200") {
531 + resolve(res.data);
532 + } else {
533 + reject();
534 + }
535 + })
536 + .catch((err) => {
537 + console.log(err);
538 + reject();
539 + });
540 + } else if (type == "totalReceiptStatus") {
541 + let objVal = { declareId: declareId };
542 + getTotalReceipt(objVal)
543 + .then((res) => {
544 + if (res.code === "200") {
545 + resolve(res.data);
546 + } else {
547 + reject();
548 + }
549 + })
550 + .catch((err) => {
551 + console.log(err);
552 + reject();
553 + });
389 } 554 }
390 }); 555 });
391 }, 556 },
...@@ -394,7 +559,7 @@ export default { ...@@ -394,7 +559,7 @@ export default {
394 559
395 console.log(val); 560 console.log(val);
396 561
397 - this.receiptApi(val.data.billNo, val.status) 562 + this.receiptApi(val.data.billNo, val.status, val.data.declareId)
398 .then((res) => { 563 .then((res) => {
399 val.tableData.forEach((item) => { 564 val.tableData.forEach((item) => {
400 if (item.declareId == val.data.declareId) { 565 if (item.declareId == val.data.declareId) {
...@@ -406,8 +571,10 @@ export default { ...@@ -406,8 +571,10 @@ export default {
406 .finally(() => { 571 .finally(() => {
407 this.$nextTick(() => { 572 this.$nextTick(() => {
408 this.$store.dispatch("setLoadingState", false); 573 this.$store.dispatch("setLoadingState", false);
409 - this.$refs.listReceiptStatusPopover.tableLoading = false; // 清单回执 574 + // this.$refs.listReceiptStatusPopover.tableLoading = false; // 清单回执
410 this.$refs.arrivalInReceiptStatusPopover.tableLoading = false; //运抵单回执 575 this.$refs.arrivalInReceiptStatusPopover.tableLoading = false; //运抵单回执
576 + this.$refs.logisticsDepartureReceiptStatusPopover.tableLoading = false; // 离境单回执
577 + this.$refs.totalReceiptStatusPopover.tableLoading = false;
411 }); 578 });
412 }); 579 });
413 }, 580 },
...@@ -417,8 +584,6 @@ export default { ...@@ -417,8 +584,6 @@ export default {
417 //重置数据 584 //重置数据
418 this.sreachFormData = { 585 this.sreachFormData = {
419 billNo: "", 586 billNo: "",
420 - operatorCode: "",
421 - operatorName: "",
422 receiptStatus: null, 587 receiptStatus: null,
423 receiptType: null, 588 receiptType: null,
424 createTime: [], 589 createTime: [],
...@@ -450,8 +615,10 @@ export default { ...@@ -450,8 +615,10 @@ export default {
450 this.page.total = res.data.totalItems; 615 this.page.total = res.data.totalItems;
451 this.tableData.forEach((item, idx) => { 616 this.tableData.forEach((item, idx) => {
452 item.index = idx; 617 item.index = idx;
453 - item.listReceiptStatusPopoverType = false; // 清单回执 618 + // item.listReceiptStatusPopoverType = false; // 清单回执
454 item.arrivalInReceiptStatusPopoverType = false; // 运抵单回执 619 item.arrivalInReceiptStatusPopoverType = false; // 运抵单回执
620 + item.logisticsDepartureReceiptStatusPopoverType = false; // 离境单回执
621 + item.totalReceiptStatusPopoverType = false;
455 // item.logLoading = false; 622 // item.logLoading = false;
456 item.popoverData = []; 623 item.popoverData = [];
457 }); 624 });
......