From ac851fdbde72a77c7d4ce3b204cf8ebd0cdc5443 Mon Sep 17 00:00:00 2001 From: linfso Date: Thu, 20 Feb 2025 07:27:57 +0800 Subject: [PATCH] md --- .../emisTmsCostFee/EmisTmsCostFeeList.vue | 83 +++++++++++-------- .../emisTmsCostFee/emisTmsCostFeeForm.vue | 1 - .../panel/BigBatchListPanel.vue | 25 +++++- 3 files changed, 72 insertions(+), 37 deletions(-) diff --git a/src/views/emis/emisTmsCostFee/EmisTmsCostFeeList.vue b/src/views/emis/emisTmsCostFee/EmisTmsCostFeeList.vue index e8d8b072..2a7bb9be 100644 --- a/src/views/emis/emisTmsCostFee/EmisTmsCostFeeList.vue +++ b/src/views/emis/emisTmsCostFee/EmisTmsCostFeeList.vue @@ -61,6 +61,8 @@ 利润重算 - + @@ -238,6 +240,7 @@ export default { total: 0, // TMS运输成本账单表格数据 emisTmsCostFeeList: [], + selectList:[], currentId:null, openForm: false, @@ -297,6 +300,8 @@ export default { this.ids = selection.map(item => item.id) this.single = selection.length!==1 this.multiple = !selection.length + + this.selectList=selection; }, // 排序 查询字段是表格中字段名字 动态取值排序顺序 handleSortChange(column) { @@ -433,51 +438,59 @@ export default { console.log(sums); return sums }, - /** 导出按钮操作 */ handleExport() { - // this.download('emis/emisTmsCostFee/export', { - // ...this.queryParams - // }, `emisTmsCostFee_${new Date().getTime()}.xlsx`) - const loadingInstance = this.$loading({ + const loadingInstance = this.$loading({ text: '正在导出...' - }) - var qParam = {...this.queryParams}; - qParam.pageNum=1; - qParam.pageSize=5000; + }) - listEmisTmsCostFee(this.addDateRange(qParam, this.dateTimeRange)).then(response => { - this.downloadLoading = false - if (response.code === 200) { - const curList = response.rows - import('@/vendor/Export2Excel').then(excel => { - const tHeader = ['id','成本序号','成本名称','成本类型','分摊类型','成本费','总票数','总件数','总重量','总体积','财务确认状态','财务确认日期','财务确认备注','财务确认人','财务确认站点','站点确认状态','站点确认日期','站点确认人','网点确认备注','确认网点代码','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',]; - const filterVal = ['id','costNo','costName','feeType','splitType','costFee','sendPieceSum','pieceNumber','totalWeight','totalVolume','blConfirmCenter','confirmCenterDate','confirmCenterNote','confirmCenterManCode','confirmCenterCode','blConfirmSite','confirmSiteDate','confirmSiteManCode','confirmSiteNote','confirmSiteCode','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',]; - const data = this.formatJson(filterVal, curList, response.rows) - excel.export_json_to_excel({ - header: tHeader, - data, - filename: 'TMS运输成本账单', - autoWidth: true - }) - loadingInstance.close() - }) - } - }); + if(this.selectList&&this.selectList.length>0){ + this.exportData(this.selectList,loadingInstance); + } + else{ + + let qExportParam={...this.queryParams}; + qExportParam=this.addDateRange(qExportParam, this.dateTimeRange,'tradeDate') + qExportParam.pageNum=1; + qExportParam.pageSize=20000; + + listEmisTmsCostFee(qExportParam).then(response => { + if (response.code === 200) { + this.exportData(response.rows,loadingInstance); + } + }); + } + }, + exportData(selData,loadingInstance){ + const curList =selData + import('@/vendor/Export2Excel').then(excel => { + const exportParam=this.$refs.refTable.getExportParam(); + const tHeader = exportParam.header; + const filterVal = exportParam.filter; + const data = this.formatJson(filterVal, curList, selData) + excel.export_json_to_excel({ + header: tHeader, + data, + filename: '成本费用列表', + autoWidth: true + }) + loadingInstance.close() + }) }, formatJson(filterVal, jsonData, resData) { let index = 0 return jsonData.map(v => filterVal.map(j => { + if (j === 'index') { return ++index } - if (j === 'status') { - var statusStr='xxx' - if(v[j] == 10){ - statusStr='xxx' - } - return statusStr; + else if (j === 'splitType') { + return this.selectDictLabel(this.dict.type.emis_cost_split_type,v[j]); } + else if (j === 'transType') { + return this.selectDictLabel(this.dict.type.emis_biz_shipping_method,v[j]); + } + return v[j] })) }, diff --git a/src/views/emis/emisTmsCostFee/emisTmsCostFeeForm.vue b/src/views/emis/emisTmsCostFee/emisTmsCostFeeForm.vue index e4e20029..f45ae452 100644 --- a/src/views/emis/emisTmsCostFee/emisTmsCostFeeForm.vue +++ b/src/views/emis/emisTmsCostFee/emisTmsCostFeeForm.vue @@ -212,7 +212,6 @@ 加入单号 修改批次 + 批量导入 导出批次明细 + + @@ -198,6 +208,9 @@ + + + @@ -218,12 +231,16 @@ import { listEmisTmsSiteBatchDtl} from "@/api/emis/emisTmsSiteBatchDtl"; import PackListView from '@/views/emis/emisTmsSiteBatch/packListView'; import EmisSupplierPicker from '@/views/emis/EmisBaseTools/EmisSupplierPicker'; +import BatchImportSiteBatch from '@/views/emis/emisTmsSiteBatch/panel/BatchImportSiteBatch.vue'; + + + export default { name: "CenterGenBatchMgnt", components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker, PackListView, - EmisSupplierPicker + EmisSupplierPicker,BatchImportSiteBatch }, dicts: [ 'emis_waybill_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi', 'cebp_return_status','emis_declare_mode','emis_customs_clear','emis_big_batch_type' @@ -374,6 +391,7 @@ export default { }, methods: { + /** 查询TMS组批次列表 */ getList() { this.loading = true; @@ -437,10 +455,15 @@ export default { this.queryParams.isAsc = column.order; this.getList(); }, + /** 新增按钮操作 */ handleAdd() { this.$emit("onCreate"); }, + handleBatchAdd(){ + this.openForm= true; + this.titleForm = "批量导入"; + }, handleDelete(row){ const ids = row.id || this.ids; this.$modal.confirm('是否确认删除').then(function() {