md
This commit is contained in:
parent
cc52a2802a
commit
ac108c7727
@ -509,16 +509,6 @@ export default {
|
||||
this.openForm = false;
|
||||
},
|
||||
|
||||
|
||||
// <el-table-column :label="$t('总票数')" align="center" prop="totalNum" width="100" :sortable="true" />
|
||||
// <el-table-column :label="$t('总件数')" align="center" prop="parcelQty" width="100" :sortable="true" />
|
||||
// <el-table-column :label="$t('总重量')" align="center" prop="totalBillWeight" width="100" :sortable="true" />
|
||||
// <el-table-column :label="$t('总体积')" align="center" prop="totalVolume" width="100" :sortable="true" />
|
||||
// <el-table-column :label="$t('总体积重量')" align="center" prop="totalVolumeWeight" width="120" :sortable="true" />
|
||||
// <el-table-column :label="$t('结算重量')" align="center" prop="totalSettlementWeight" width="120" :sortable="true" />
|
||||
// <el-table-column :label="$t('运费')" align="center" prop="totalFreight" width="100" :sortable="true" />
|
||||
|
||||
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
@ -632,205 +622,7 @@ export default {
|
||||
return sums
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
if(this.selectBillList&&this.selectBillList.length>0){
|
||||
this.exportData(this.selectBillList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
let qExportParam=this.initQueryParams();
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=5000;
|
||||
|
||||
listEmisSettleSubBill(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 => {
|
||||
|
||||
console.log("===>1111===>",v);
|
||||
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'kjlx') {
|
||||
return v['waybillDetail']['sendSiteName']+'--'+v['waybillDetail']['dispatchUnderlingSiteName'];
|
||||
}
|
||||
if (j === 'fjr') {
|
||||
return v['sendName']+'--'+v['receiveName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.sendSiteName') {
|
||||
return v['waybillDetail']['sendSiteName'];
|
||||
}
|
||||
|
||||
|
||||
if (j === 'waybillDetail.sendDate') {
|
||||
return v['waybillDetail']['sendDate'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.sendCompany') {
|
||||
return v['waybillDetail']['sendCompany'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.transLineTypeName') {
|
||||
return v['waybillDetail']['transLineTypeName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.productTypeName') {
|
||||
return v['waybillDetail']['productTypeName'];
|
||||
}
|
||||
|
||||
|
||||
if (j === 'waybillDetail.sendName') {
|
||||
return v['waybillDetail']['sendName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.parcelQty') {
|
||||
return v['waybillDetail']['parcelQty'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.billWeight') {
|
||||
return v['waybillDetail']['billWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.volumeWeight') {
|
||||
return v['waybillDetail']['volumeWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.totalVolume') {
|
||||
return v['waybillDetail']['totalVolume'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.settlementWeight') {
|
||||
return v['waybillDetail']['settlementWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.freight') {
|
||||
return v['waybillDetail']['freight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.realFee') {
|
||||
return v['waybillDetail']['realFee'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.remark') {
|
||||
return v['waybillDetail']['remark'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.feeRemark') {
|
||||
return v['waybillDetail']['feeRemark'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.salesmen') {
|
||||
return v['waybillDetail']['salesmen'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.payee') {
|
||||
return v['waybillDetail']['payee'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.payee') {
|
||||
return v['waybillDetail']['payee'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.problemTypeName') {
|
||||
return v['waybillDetail']['problemTypeName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.problemCause') {
|
||||
return v['waybillDetail']['problemCause'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.sendMobile') {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.calcFeeType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_calc_fee_type,v['waybillDetail']['calcFeeType']);
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.paymentStatus') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,v['waybillDetail']['paymentStatus']);
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.pickupMethod') {
|
||||
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v['waybillDetail']['pickupMethod']);
|
||||
}
|
||||
if (j === 'waybillDetail.customsEclaration') {
|
||||
return this.selectDictLabel(this.dict.type.emis_declare_mode,v['waybillDetail']['customsEclaration']);
|
||||
}
|
||||
if (j === 'waybillDetail.customsClear') {
|
||||
return this.selectDictLabel(this.dict.type.emis_customs_clear,v['waybillDetail']['customsClear']);
|
||||
}
|
||||
if (j === 'waybillDetail.packType') {
|
||||
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v['waybillDetail']['packType']);
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.dispatchMethod') {
|
||||
if(v['waybillDetail']['dispatchMethod'] == 1){
|
||||
return '派送';
|
||||
}else{
|
||||
return '自提';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (j === 'waybillDetail.blMessage') {
|
||||
if(v['waybillDetail']['blMessage'] == 1){
|
||||
return '发送';
|
||||
}else{
|
||||
return '不发送';
|
||||
}
|
||||
}
|
||||
if (j === 'waybillDetail.blAcceptMessage') {
|
||||
if(v['waybillDetail']['blAcceptMessage'] == 1){
|
||||
return '发送';
|
||||
}else{
|
||||
return '不发送';
|
||||
}
|
||||
}
|
||||
if (j === 'waybillDetail.blSign') {
|
||||
if(v['waybillDetail']['blSign'] == 1){
|
||||
return '已签收';
|
||||
}else{
|
||||
return '未签收';
|
||||
}
|
||||
}
|
||||
if (j === 'waybillDetail.paymentType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_type,v['waybillDetail']['paymentType']);
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user