diff --git a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue index bec0e6fb..e7640977 100644 --- a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue +++ b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue @@ -228,7 +228,7 @@ 导出 + @click="handleExport">导出 @@ -1307,6 +1307,43 @@ export default { dateTimeChange(value){ this.dateTimeRange=value; }, + /** 导出按钮操作 */ + handleExport() { + const loadingInstance = this.$loading({ + text: '正在导出...' + }) + var qParam = {...this.queryParams}; + qParam.pageNum=1; + qParam.pageSize=5000; + + listEmisTmsSiteBatchDtl({batchNo: this.form.batchNo}).then(response => { + this.downloadLoading = false + if (response.code === 200) { + const curList = response.rows.map(item=>{ + return { + "billCode":item.billCode, + ...item.waybillDetail, + } + }) + console.log(curList) + setTimeout(()=>{ + import('@/vendor/Export2Excel').then(excel => { + const tHeader = ['运单号','寄件网点','寄件国家','目的国家','线路','产品类型','寄件日期','预计到达时间','总件数','实际重量','总体积','体积重量','结算重量','收件人','收件公司','报关方式','清关方式','取件方式','付款方式','运费','寄件人','寄件公司','录单备注']; + const filterVal = ['billCode','sendSiteName','sendCountryName','receiveCountryName','transLineTypeName','productTypeName','sendDate','estimateDate','parcelQty','billWeight','totalVolume','volumeWeight','settlementWeight','receiveName','receiveCompany','customsEclaration','customsClear','pickupMethod','paymentType','freight','sendName','sendCompany','remark']; + const data = this.formatJson(filterVal, curList, response.rows) + excel.export_json_to_excel({ + header: tHeader, + data, + filename: '批次明细导出', + autoWidth: true + }) + loadingInstance.close() + }) + + },500 ) + } + }); + }, } };