md
This commit is contained in:
parent
af5fdbdd14
commit
0671aace18
@ -62,7 +62,7 @@
|
||||
size="small"
|
||||
|
||||
ref="refTable"
|
||||
storageName="emisTmsCostFeeSplitList_main1"
|
||||
storageName="emisTmsCostFeeSplitList_main2"
|
||||
|
||||
:data="emisTmsCostFeeSplitList"
|
||||
:showSearch.sync="showSearch"
|
||||
@ -283,6 +283,7 @@ export default {
|
||||
total: 0,
|
||||
// 成本费用分摊明细表格数据
|
||||
emisTmsCostFeeSplitList: [],
|
||||
selectList:[],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
@ -358,6 +359,7 @@ export default {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.selectList=selection
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
@ -433,47 +435,283 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisTmsCostFeeSplit/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisTmsCostFeeSplit_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
})
|
||||
|
||||
listEmisTmsCostFeeSplit(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','支付序号','费用项ID','运单号','主单号','成本费用类型','成本分摊类型','分摊成本','总体积','实际重量','计算备注','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',];
|
||||
const filterVal = ['id','costNo','feeItemId','billCode','mainBillCode','feeType','splitType','costFee','totalVolume','billWeight','calcRemark','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()
|
||||
})
|
||||
}
|
||||
});
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
let qExportParam={...this.queryParams};
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
|
||||
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 === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
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 '自提';
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
|
||||
|
||||
if (j === 'paymentStatus') {
|
||||
if(v['paymentStatus'] == 0){
|
||||
return '未收款';
|
||||
}
|
||||
else if(v['paymentStatus'] == 1){
|
||||
return '已收款';
|
||||
}
|
||||
else if(v['paymentStatus'] == 2){
|
||||
return '部分收款';
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'openBillStatus') {
|
||||
if(v['openBillStatus'] == 0){
|
||||
return '未开票';
|
||||
}
|
||||
else if(v['openBillStatus'] == 1){
|
||||
return '已开票';
|
||||
}
|
||||
else if(v['openBillStatus'] == 2){
|
||||
return '部分开票';
|
||||
}
|
||||
else if(v['openBillStatus'] == 3){
|
||||
return '不开票';
|
||||
}
|
||||
else if(v['openBillStatus'] == 4){
|
||||
return '已完成';
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'blSpecialQuote') {
|
||||
if(v['blSpecialQuote'] == 0){
|
||||
return '否';
|
||||
}
|
||||
else if(v['paymentStatus'] == 1){
|
||||
return '是';
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'blMerge') {
|
||||
if(v['blMerge'] == 0){
|
||||
return '否';
|
||||
}
|
||||
else if(v['blMerge'] == 1){
|
||||
return '是';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (j === 'blConfirmCenter') {
|
||||
if(v['blConfirmCenter'] == 0){
|
||||
return '未确认';
|
||||
}
|
||||
else if(v['blConfirmCenter'] == 1){
|
||||
return '已确认';
|
||||
}
|
||||
else if(v['blConfirmCenter'] == 2){
|
||||
return '确认不出账';
|
||||
}
|
||||
else if(v['blConfirmCenter'] == 3){
|
||||
return '账单异常';
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'blConfirmSite') {
|
||||
if(v['blConfirmSite'] == 0){
|
||||
return '未确认';
|
||||
}
|
||||
else if(v['blConfirmSite'] == 1){
|
||||
return '已确认';
|
||||
}
|
||||
else if(v['blConfirmSite'] == 2){
|
||||
return '确认不出账';
|
||||
}
|
||||
else if(v['blConfirmSite'] == 3){
|
||||
return '账单异常';
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.blIsQuestion') {
|
||||
if(v['waybillDetail']['blIsQuestion'] == 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]
|
||||
}))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user