diff --git a/src/views/emis/emisSupplier/index.vue b/src/views/emis/emisSupplier/index.vue index 517e85df..59a0cc60 100644 --- a/src/views/emis/emisSupplier/index.vue +++ b/src/views/emis/emisSupplier/index.vue @@ -120,7 +120,7 @@ v-hasPermi="['emis:emisSupplier:remove']" >删除 - + @@ -343,23 +343,26 @@ export default { qParam.pageSize=5000; listEmisSupplier(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','code','name','nameEn','settledType','transType','bizSite','bizSiteName','companyName','companyType','licenceNo','country','province','city','district','address','tel','email','contact','phone','status','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: '公司供应商表', - autoWidth: true - }) - loadingInstance.close() - }) + 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 @@ -367,12 +370,23 @@ export default { if (j === 'index') { return ++index } - if (j === 'status') { - var statusStr='xxx' - if(v[j] == 10){ - statusStr='xxx' + if (j === 'settledType') { + if(v[j] == '1'){ + return '现金' } - return statusStr; + if(v[j] == '2'){ + return '月结' + } + } + if (j === 'transType') { + return v[j].split(',').map(item => + this.selectDictLabel(this.dict.type.emis_biz_shipping_method, item) + ).join(',') + } + if (j === 'feeItemRel') { + return v[j].split(',').map(item => + this.selectDictLabel(this.dict.type.emis_cost_fee_type, item) + ).join(',') } return v[j] }))