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

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,18 +6,28 @@
<div class="contentPopover" v-if="show"> <div class="contentPopover" v-if="show">
<div class="bodyMain"> <div class="bodyMain">
<span class="arrow"></span> <span class="arrow"></span>
<div v-for="item in list" :key="item"> <template v-if="listIsType">
<div v-if="list.length>0 && type == item.type"> <div v-for="item in list" :key="item">
<div class="exportHeader"> <div v-if="list.length>0 && type == item.type">
<div class="exportName">{{item.type_desc}}</div> <div class="exportHeader">
<div class="status" v-if="item.status==0"> <div class="exportName">{{item.type_desc}}</div>
<el-tooltip effect="dark" :content="item.msg"> <div class="status" v-if="item.status==0">
<span size="mini">{{item.msg}}</span> <el-tooltip effect="dark" :content="item.msg">
</el-tooltip> <span size="mini">{{item.msg}}</span>
</el-tooltip>
</div>
<div class="finish" v-if="item.status==1"><i class="icon"><sc-icon-Finish/></i> 文件生成完成</div>
</div> </div>
<div class="finish" v-if="item.status==1"><i class="icon"><sc-icon-Finish/></i> 文件生成完成</div> <el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="item.rate" />
</div> </div>
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="item.rate" /> </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> </div>
@ -36,6 +46,13 @@ export default {
}, },
watch:{ 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(){ data(){
return{ return{

View File

@ -51,7 +51,7 @@ export default {
searchList:{ searchList:{
handler(val){ handler(val){
if(val && val.length>0){ 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); 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){ groupByType(list){
const grouped = {}; const grouped = {};

View File

@ -299,6 +299,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.finance.cost.export.post(this.params); const res = await this.$API.finance.cost.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -247,6 +247,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.finance.cost.summaryExport.post(this.reqParams); const res = await this.$API.finance.cost.summaryExport.post(this.reqParams);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -377,6 +377,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.early.earlyWarn.export.post(this.params); const res = await this.$API.early.earlyWarn.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -176,6 +176,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -264,6 +264,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -289,6 +289,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.sock.export.post(this.params); const res = await this.$API.orders.order.sock.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -265,6 +265,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -439,6 +439,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -264,6 +264,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -264,6 +264,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -276,6 +276,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.setup.bom.export.post(this.params); const res = await this.$API.setup.bom.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -371,6 +371,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.system.company.export.post(this.params); const res = await this.$API.system.company.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -189,13 +189,14 @@ export default {
// //
exportChangeShow(params){ exportChangeShow(params){
if(params.type == 8){ if(params.type == 8){
this.exportShow = params.status==0?true:false this.exportShow = params.status==0?true:false;
} }
}, },
async exportData() { async exportData() {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.system.log.export.post(this.params); const res = await this.$API.system.log.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -70,6 +70,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.system.log.commandExport.post(this.params); const res = await this.$API.system.log.commandExport.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -316,6 +316,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.system.spareInfo.export.post(this.params); const res = await this.$API.system.spareInfo.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -320,6 +320,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.system.spare.export.post(this.params); const res = await this.$API.system.spare.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -438,6 +438,7 @@
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.system.user.export.post(); const res = await this.$API.system.user.export.post();
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -265,6 +265,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -182,6 +182,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.shipment.out.bomExport.post(this.params); const res = await this.$API.shipment.out.bomExport.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -276,6 +276,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.shipment.out.stockExport.post(this.params); const res = await this.$API.shipment.out.stockExport.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -265,6 +265,7 @@ export default {
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.orders.order.maintenance.export.post(this.params); const res = await this.$API.orders.order.maintenance.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },

View File

@ -200,6 +200,7 @@
if(this.exportShow) return if(this.exportShow) return
const res = await this.$API.user.export.post(this.params); const res = await this.$API.user.export.post(this.params);
if(res.code == 200){ if(res.code == 200){
this.exportShow = true;
this.$message.success('开始导出'); this.$message.success('开始导出');
} }
}, },