diff --git a/src/components/scExport/index.vue b/src/components/scExport/index.vue index 1c6db93..0f04334 100644 --- a/src/components/scExport/index.vue +++ b/src/components/scExport/index.vue @@ -6,18 +6,28 @@
-
-
-
-
{{item.type_desc}}
-
- - {{item.msg}} - + +
+
+
+
正在解析中...
+
+
@@ -36,6 +46,13 @@ export default { }, watch:{ + }, + computed:{ + listIsType(){ + let arr = this.$TOOL.objCopy(this.list); + arr = arr.filter(item => item.type && item.type == this.type); + return arr.length && arr.length > 0; + } }, data(){ return{ diff --git a/src/components/scTable/components/headerSearch.vue b/src/components/scTable/components/headerSearch.vue index 6d1fc65..b38a471 100644 --- a/src/components/scTable/components/headerSearch.vue +++ b/src/components/scTable/components/headerSearch.vue @@ -51,7 +51,7 @@ export default { searchList:{ handler(val){ if(val && val.length>0){ - this.columnList = val.filter(em=> !em.hide && em.is_search); + this.columnList = this.sortData(this.$TOOL.objCopy(val.filter(em=> !em.hide && em.is_search))); this.params = this.groupByType(val); } }, @@ -123,6 +123,26 @@ export default { } } }, + // 排序 + sortData(list){ + const sortedArray = list.sort((a, b) => { + const priority = ['date_range', 'date']; + + // 获取a和b的search_type在优先级数组中的索引 + const aPriority = priority.indexOf(a.search_type); + const bPriority = priority.indexOf(b.search_type); + + // 如果a在优先级数组中而b不在,a排在前面 + if (aPriority !== -1 && bPriority === -1) return -1; + // 如果b在优先级数组中而a不在,b排在前面 + if (bPriority !== -1 && aPriority === -1) return 1; + // 如果都在优先级数组中,按优先级数组中的顺序排序 + if (aPriority !== -1 && bPriority !== -1) return aPriority - bPriority; + // 如果都不在优先级数组中,保持原顺序 + return 0; + }); + return sortedArray; + }, groupByType(list){ const grouped = {}; diff --git a/src/views/cost/feeRecords/index.vue b/src/views/cost/feeRecords/index.vue index f05664b..11722d4 100644 --- a/src/views/cost/feeRecords/index.vue +++ b/src/views/cost/feeRecords/index.vue @@ -299,6 +299,7 @@ export default { if(this.exportShow) return const res = await this.$API.finance.cost.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/cost/shipmentStatistics/index.vue b/src/views/cost/shipmentStatistics/index.vue index 26e1cde..aea656d 100644 --- a/src/views/cost/shipmentStatistics/index.vue +++ b/src/views/cost/shipmentStatistics/index.vue @@ -247,6 +247,7 @@ export default { if(this.exportShow) return const res = await this.$API.finance.cost.summaryExport.post(this.reqParams); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/earlyManager/list.vue b/src/views/earlyManager/list.vue index e3fba40..f2e208a 100644 --- a/src/views/earlyManager/list.vue +++ b/src/views/earlyManager/list.vue @@ -377,6 +377,7 @@ export default { if(this.exportShow) return const res = await this.$API.early.earlyWarn.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/finance/feesStatistics/index.vue b/src/views/finance/feesStatistics/index.vue index 49a4257..5095b1e 100644 --- a/src/views/finance/feesStatistics/index.vue +++ b/src/views/finance/feesStatistics/index.vue @@ -176,6 +176,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/inventory/inoutRecord/index.vue b/src/views/inventory/inoutRecord/index.vue index 8c8aeb2..87d4e47 100644 --- a/src/views/inventory/inoutRecord/index.vue +++ b/src/views/inventory/inoutRecord/index.vue @@ -264,6 +264,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/order/inventoryList/index.vue b/src/views/order/inventoryList/index.vue index c2218f1..568b3e2 100644 --- a/src/views/order/inventoryList/index.vue +++ b/src/views/order/inventoryList/index.vue @@ -289,6 +289,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.sock.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/order/inventoryStatistics/index.vue b/src/views/order/inventoryStatistics/index.vue index 0877f58..cfee0a4 100644 --- a/src/views/order/inventoryStatistics/index.vue +++ b/src/views/order/inventoryStatistics/index.vue @@ -265,6 +265,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/order/orderList/index.vue b/src/views/order/orderList/index.vue index 5ff6f51..5cfec71 100644 --- a/src/views/order/orderList/index.vue +++ b/src/views/order/orderList/index.vue @@ -439,6 +439,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/reports/keepRepairReports/index.vue b/src/views/reports/keepRepairReports/index.vue index 499ee0a..57dc297 100644 --- a/src/views/reports/keepRepairReports/index.vue +++ b/src/views/reports/keepRepairReports/index.vue @@ -264,6 +264,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/reports/shipmentReports/index.vue b/src/views/reports/shipmentReports/index.vue index 499ee0a..57dc297 100644 --- a/src/views/reports/shipmentReports/index.vue +++ b/src/views/reports/shipmentReports/index.vue @@ -264,6 +264,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/bom/index.vue b/src/views/setting/bom/index.vue index 68cd7e8..cb4f12e 100644 --- a/src/views/setting/bom/index.vue +++ b/src/views/setting/bom/index.vue @@ -276,6 +276,7 @@ export default { if(this.exportShow) return const res = await this.$API.setup.bom.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/company/index.vue b/src/views/setting/company/index.vue index a13e6f2..a0b9a67 100644 --- a/src/views/setting/company/index.vue +++ b/src/views/setting/company/index.vue @@ -371,6 +371,7 @@ export default { if(this.exportShow) return const res = await this.$API.system.company.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/log/components/ability.vue b/src/views/setting/log/components/ability.vue index a4804fc..1c58d0f 100644 --- a/src/views/setting/log/components/ability.vue +++ b/src/views/setting/log/components/ability.vue @@ -189,13 +189,14 @@ export default { // 下载导出 exportChangeShow(params){ if(params.type == 8){ - this.exportShow = params.status==0?true:false + this.exportShow = params.status==0?true:false; } }, async exportData() { if(this.exportShow) return const res = await this.$API.system.log.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/log/components/command.vue b/src/views/setting/log/components/command.vue index 6831168..dee29f4 100644 --- a/src/views/setting/log/components/command.vue +++ b/src/views/setting/log/components/command.vue @@ -70,6 +70,7 @@ export default { if(this.exportShow) return const res = await this.$API.system.log.commandExport.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/partsMag/components/info.vue b/src/views/setting/partsMag/components/info.vue index ead28de..6b18811 100644 --- a/src/views/setting/partsMag/components/info.vue +++ b/src/views/setting/partsMag/components/info.vue @@ -316,6 +316,7 @@ export default { if(this.exportShow) return const res = await this.$API.system.spareInfo.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/partsMag/components/library.vue b/src/views/setting/partsMag/components/library.vue index b0eb294..374131b 100644 --- a/src/views/setting/partsMag/components/library.vue +++ b/src/views/setting/partsMag/components/library.vue @@ -320,6 +320,7 @@ export default { if(this.exportShow) return const res = await this.$API.system.spare.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/setting/user/index.vue b/src/views/setting/user/index.vue index e7b8edd..3cc1077 100644 --- a/src/views/setting/user/index.vue +++ b/src/views/setting/user/index.vue @@ -438,6 +438,7 @@ if(this.exportShow) return const res = await this.$API.system.user.export.post(); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/shipment/shipmentDataConfirm/index.vue b/src/views/shipment/shipmentDataConfirm/index.vue index 64f0b4b..dcbc1ba 100644 --- a/src/views/shipment/shipmentDataConfirm/index.vue +++ b/src/views/shipment/shipmentDataConfirm/index.vue @@ -265,6 +265,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/shipment/shipmentList/bom.vue b/src/views/shipment/shipmentList/bom.vue index b65df72..b277db4 100644 --- a/src/views/shipment/shipmentList/bom.vue +++ b/src/views/shipment/shipmentList/bom.vue @@ -182,6 +182,7 @@ export default { if(this.exportShow) return const res = await this.$API.shipment.out.bomExport.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/shipment/shipmentList/list.vue b/src/views/shipment/shipmentList/list.vue index d3e4f5b..5841804 100644 --- a/src/views/shipment/shipmentList/list.vue +++ b/src/views/shipment/shipmentList/list.vue @@ -276,6 +276,7 @@ export default { if(this.exportShow) return const res = await this.$API.shipment.out.stockExport.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/shipment/shipmentStatistics/index.vue b/src/views/shipment/shipmentStatistics/index.vue index b9e1bac..66fae5f 100644 --- a/src/views/shipment/shipmentStatistics/index.vue +++ b/src/views/shipment/shipmentStatistics/index.vue @@ -265,6 +265,7 @@ export default { if(this.exportShow) return const res = await this.$API.orders.order.maintenance.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } }, diff --git a/src/views/userCenter/user/logs.vue b/src/views/userCenter/user/logs.vue index ecf9178..5955d0e 100644 --- a/src/views/userCenter/user/logs.vue +++ b/src/views/userCenter/user/logs.vue @@ -200,6 +200,7 @@ if(this.exportShow) return const res = await this.$API.user.export.post(this.params); if(res.code == 200){ + this.exportShow = true; this.$message.success('开始导出'); } },