修改导出问题、检索重新按时间排序

This commit is contained in:
龙运模 2025-07-28 16:58:56 +08:00
parent fba81eb17e
commit f7406250b1
24 changed files with 71 additions and 12 deletions

View File

@ -6,6 +6,7 @@
<div class="contentPopover" v-if="show">
<div class="bodyMain">
<span class="arrow"></span>
<template v-if="listIsType">
<div v-for="item in list" :key="item">
<div v-if="list.length>0 && type == item.type">
<div class="exportHeader">
@ -20,6 +21,15 @@
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="item.rate" />
</div>
</div>
</template>
<div v-else>
<div>
<div class="exportHeader">
<div class="exportName">正在解析中...</div>
</div>
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" percentage="0" />
</div>
</div>
</div>
</div>
</div>
@ -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{

View File

@ -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'];
// absearch_type
const aPriority = priority.indexOf(a.search_type);
const bPriority = priority.indexOf(b.search_type);
// aba
if (aPriority !== -1 && bPriority === -1) return -1;
// bab
if (bPriority !== -1 && aPriority === -1) return 1;
//
if (aPriority !== -1 && bPriority !== -1) return aPriority - bPriority;
//
return 0;
});
return sortedArray;
},
groupByType(list){
const grouped = {};

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},

View File

@ -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('开始导出');
}
},