feat(reportingData): 添加申报日志功能
- 在申报数据列表中增加日志按钮 - 实现查询总申报日志的 API 接口 - 添加日志弹窗组件,用于展示申报日志 - 优化表格列的对齐方式
Showing
2 changed files
with
106 additions
and
2 deletions
| ... | @@ -113,6 +113,18 @@ export function getWayBillReceipt(data) { | ... | @@ -113,6 +113,18 @@ export function getWayBillReceipt(data) { |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | /** | 115 | /** |
| 116 | + * 查询总申报日志 | ||
| 117 | + * @param data id---->申报id | ||
| 118 | + */ | ||
| 119 | +export function getDeclarationLog(data){ | ||
| 120 | + return request({ | ||
| 121 | + url: '/bus-customer/declareData/getDeclarationLog/' + data, | ||
| 122 | + method: 'get', | ||
| 123 | + params: data, | ||
| 124 | + }) | ||
| 125 | +} | ||
| 126 | + | ||
| 127 | +/** | ||
| 116 | * 导出回执数据 | 128 | * 导出回执数据 |
| 117 | * @param {*} data | 129 | * @param {*} data |
| 118 | * @returns | 130 | * @returns | ... | ... |
| ... | @@ -320,13 +320,35 @@ | ... | @@ -320,13 +320,35 @@ |
| 320 | </TablePopover> | 320 | </TablePopover> |
| 321 | </template> | 321 | </template> |
| 322 | <template slot="optionColumn"> | 322 | <template slot="optionColumn"> |
| 323 | - <el-table-column align="left" label="操作" width="100"> | 323 | + <el-table-column align="center" label="操作" width="150"> |
| 324 | <template slot-scope="scope"> | 324 | <template slot-scope="scope"> |
| 325 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> | 325 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> |
| 326 | + <el-button type="text" @click="showTotalLog(scope.row)">日志</el-button> | ||
| 326 | </template> | 327 | </template> |
| 327 | </el-table-column> | 328 | </el-table-column> |
| 328 | </template> | 329 | </template> |
| 329 | </Table> | 330 | </Table> |
| 331 | + <template> | ||
| 332 | + <TablePopover | ||
| 333 | + ref="allLogDataReceiptStatusPopover" | ||
| 334 | + dataKey="allLogDataReceiptStatus" | ||
| 335 | + idKey="declareId" | ||
| 336 | + :parentDom="$refs.entryTable" | ||
| 337 | + :receiptDataHead="logDataHead" | ||
| 338 | + :rowData="selectedLogRow" | ||
| 339 | + :tableData="tableData" | ||
| 340 | + @popoverChange="popoverChange" | ||
| 341 | + @popoverClose="popoverClose" | ||
| 342 | + > | ||
| 343 | + <div slot="title"> | ||
| 344 | + <span style="font-weight: 700; color: #515a6e">订单编号:</span> | ||
| 345 | + {{ selectedLogRow.orderno }} | ||
| 346 | + </div> | ||
| 347 | + <div slot="buttonLabel"> | ||
| 348 | + {{ selectedLogRow.allLogDataReceiptStatusPopoverType }} | ||
| 349 | + </div> | ||
| 350 | + </TablePopover> | ||
| 351 | + </template> | ||
| 330 | <DialogVue | 352 | <DialogVue |
| 331 | :outerVisible="outerVisible" | 353 | :outerVisible="outerVisible" |
| 332 | @dwonloadModelFile="dwonloadModelFile" | 354 | @dwonloadModelFile="dwonloadModelFile" |
| ... | @@ -364,6 +386,7 @@ import { | ... | @@ -364,6 +386,7 @@ import { |
| 364 | getListReceipt, | 386 | getListReceipt, |
| 365 | getTotalReceipt, | 387 | getTotalReceipt, |
| 366 | getLogisticsReceipt, | 388 | getLogisticsReceipt, |
| 389 | + getDeclarationLog, | ||
| 367 | exportDeclareData | 390 | exportDeclareData |
| 368 | } from "@/api/declareData-api.js"; | 391 | } from "@/api/declareData-api.js"; |
| 369 | import { getDictData } from '@/api/system/dict-api.js' | 392 | import { getDictData } from '@/api/system/dict-api.js' |
| ... | @@ -372,8 +395,14 @@ import RevokeDialog from "./revokeDialog.vue"; | ... | @@ -372,8 +395,14 @@ import RevokeDialog from "./revokeDialog.vue"; |
| 372 | import TemplateDownloadDialog from "./templateDownloadDialog.vue"; | 395 | import TemplateDownloadDialog from "./templateDownloadDialog.vue"; |
| 373 | import ExportDialog from "./exportDialog.vue"; | 396 | import ExportDialog from "./exportDialog.vue"; |
| 374 | import BatchModify from "./batchModify.vue"; | 397 | import BatchModify from "./batchModify.vue"; |
| 398 | +import TablePopover from "@/components/TablePopover/index.vue"; | ||
| 375 | export default { | 399 | export default { |
| 376 | name: "ReportingData", | 400 | name: "ReportingData", |
| 401 | + computed: { | ||
| 402 | + TablePopover() { | ||
| 403 | + return TablePopover | ||
| 404 | + } | ||
| 405 | + }, | ||
| 377 | components: { | 406 | components: { |
| 378 | DialogVue, | 407 | DialogVue, |
| 379 | RevokeDialog, | 408 | RevokeDialog, |
| ... | @@ -383,6 +412,8 @@ export default { | ... | @@ -383,6 +412,8 @@ export default { |
| 383 | }, | 412 | }, |
| 384 | data() { | 413 | data() { |
| 385 | return { | 414 | return { |
| 415 | + allLogDataReceiptStatusPopoverType: false, // 控制日志弹窗的显示和隐藏 | ||
| 416 | + selectedLogRow: {}, // 存储选中的日志数据 | ||
| 386 | sreachFormData: { | 417 | sreachFormData: { |
| 387 | billNo: "", | 418 | billNo: "", |
| 388 | logisticsNo: "", | 419 | logisticsNo: "", |
| ... | @@ -492,6 +523,32 @@ export default { | ... | @@ -492,6 +523,32 @@ export default { |
| 492 | }, | 523 | }, |
| 493 | ], | 524 | ], |
| 494 | selected: [], | 525 | selected: [], |
| 526 | + logDataHead: [ | ||
| 527 | + { | ||
| 528 | + name: "回执类型", | ||
| 529 | + value: "receiptType", | ||
| 530 | + width: "", | ||
| 531 | + align: "left", | ||
| 532 | + }, | ||
| 533 | + { | ||
| 534 | + name: "回执状态", | ||
| 535 | + value: "receiptStatus", | ||
| 536 | + width: "", | ||
| 537 | + align: "left", | ||
| 538 | + }, | ||
| 539 | + { | ||
| 540 | + name: "状态时间", | ||
| 541 | + value: "statusTime", | ||
| 542 | + width: "", | ||
| 543 | + align: "left", | ||
| 544 | + }, | ||
| 545 | + { | ||
| 546 | + name: "回执描述", | ||
| 547 | + value: "receiptDescription", | ||
| 548 | + width: "", | ||
| 549 | + align: "left", | ||
| 550 | + }, | ||
| 551 | + ], | ||
| 495 | // dictData: { | 552 | // dictData: { |
| 496 | // logisticsNo: [], | 553 | // logisticsNo: [], |
| 497 | // receiptStatus: [], | 554 | // receiptStatus: [], |
| ... | @@ -560,6 +617,8 @@ export default { | ... | @@ -560,6 +617,8 @@ export default { |
| 560 | item.wayBillReceiptPopoverType = false; | 617 | item.wayBillReceiptPopoverType = false; |
| 561 | item.totalSplitOrderStatusPopoverType = false; | 618 | item.totalSplitOrderStatusPopoverType = false; |
| 562 | item.logisticsReceiptStatusPopoverType = false; | 619 | item.logisticsReceiptStatusPopoverType = false; |
| 620 | + item.allLogDataReceiptStatusPopoverType = false; | ||
| 621 | + // item.logLoading = false; | ||
| 563 | item.popoverData = []; | 622 | item.popoverData = []; |
| 564 | }); | 623 | }); |
| 565 | } else { | 624 | } else { |
| ... | @@ -730,7 +789,6 @@ export default { | ... | @@ -730,7 +789,6 @@ export default { |
| 730 | this.$forceUpdate() | 789 | this.$forceUpdate() |
| 731 | }, | 790 | }, |
| 732 | popoverChange(val) { | 791 | popoverChange(val) { |
| 733 | - console.log(val); | ||
| 734 | this.tableData = val.tableData; | 792 | this.tableData = val.tableData; |
| 735 | this.receiptApi(val.data.declareId, val.status) | 793 | this.receiptApi(val.data.declareId, val.status) |
| 736 | .then((res) => { | 794 | .then((res) => { |
| ... | @@ -749,6 +807,7 @@ export default { | ... | @@ -749,6 +807,7 @@ export default { |
| 749 | this.$refs.listReceiptStatusPopover.tableLoading = false; | 807 | this.$refs.listReceiptStatusPopover.tableLoading = false; |
| 750 | this.$refs.totalSplitOrderStatusPopover.tableLoading = false; | 808 | this.$refs.totalSplitOrderStatusPopover.tableLoading = false; |
| 751 | this.$refs.logisticsReceiptStatusPopover.tableLoading = false; | 809 | this.$refs.logisticsReceiptStatusPopover.tableLoading = false; |
| 810 | + this.$refs.allLogDataReceiptStatusPopover.tableLoading = false; | ||
| 752 | }); | 811 | }); |
| 753 | }); | 812 | }); |
| 754 | }, | 813 | }, |
| ... | @@ -823,6 +882,20 @@ export default { | ... | @@ -823,6 +882,20 @@ export default { |
| 823 | reject(); | 882 | reject(); |
| 824 | }); | 883 | }); |
| 825 | } | 884 | } |
| 885 | + else if (type == "allLogDataReceiptStatus") { | ||
| 886 | + getDeclarationLog(id) | ||
| 887 | + .then((res) => { | ||
| 888 | + if (res.code === "200") { | ||
| 889 | + resolve(res.data); | ||
| 890 | + } else { | ||
| 891 | + reject(); | ||
| 892 | + } | ||
| 893 | + }) | ||
| 894 | + .catch((err) => { | ||
| 895 | + console.log(err); | ||
| 896 | + reject(); | ||
| 897 | + }); | ||
| 898 | + } | ||
| 826 | }); | 899 | }); |
| 827 | }, | 900 | }, |
| 828 | popoverClose(val) { | 901 | popoverClose(val) { |
| ... | @@ -832,6 +905,7 @@ export default { | ... | @@ -832,6 +905,7 @@ export default { |
| 832 | item.wayBillReceiptPopoverType = false; | 905 | item.wayBillReceiptPopoverType = false; |
| 833 | item.totalSplitOrderStatusPopoverType = false; | 906 | item.totalSplitOrderStatusPopoverType = false; |
| 834 | item.logisticsReceiptStatusPopoverType = false; | 907 | item.logisticsReceiptStatusPopoverType = false; |
| 908 | + item.allLogDataReceiptStatusPopoverType = false; | ||
| 835 | item.popoverData = []; | 909 | item.popoverData = []; |
| 836 | }); | 910 | }); |
| 837 | this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY = | 911 | this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY = |
| ... | @@ -878,6 +952,24 @@ export default { | ... | @@ -878,6 +952,24 @@ export default { |
| 878 | params: { data: val }, | 952 | params: { data: val }, |
| 879 | }); | 953 | }); |
| 880 | }, | 954 | }, |
| 955 | + //申报日志 | ||
| 956 | + showTotalLog(row) { | ||
| 957 | + this.selectedLogRow = row; | ||
| 958 | + this.$set(row, 'logLoading', true); | ||
| 959 | + | ||
| 960 | + this.receiptApi(row.declareId, "allLogDataReceiptStatus") | ||
| 961 | + .then((logData) => { | ||
| 962 | + this.$set(row, 'popoverData', logData); | ||
| 963 | + | ||
| 964 | + // 手动触发状态更新 | ||
| 965 | + this.$nextTick(() => { | ||
| 966 | + // 强制设置弹窗状态为true | ||
| 967 | + row.allLogDataReceiptStatusPopoverType = !row.allLogDataReceiptStatusPopoverType; | ||
| 968 | + // 强制更新表格 | ||
| 969 | + this.tableData = [...this.tableData]; | ||
| 970 | + }); | ||
| 971 | + }) | ||
| 972 | + }, | ||
| 881 | cancelDownload(){ | 973 | cancelDownload(){ |
| 882 | this.loadings.dwonloadModelLoading = false; | 974 | this.loadings.dwonloadModelLoading = false; |
| 883 | this.templateDownloadVisible = false | 975 | this.templateDownloadVisible = false | ... | ... |
-
Please register or login to post a comment