md
This commit is contained in:
parent
7abfc3ac96
commit
5d0b75836d
@ -114,7 +114,7 @@
|
|||||||
v-hasPermi="['emis:emisSettleBill:remove']"
|
v-hasPermi="['emis:emisSettleBill:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
@ -123,7 +123,7 @@
|
|||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['emis:emisSettleBill:export']"
|
v-hasPermi="['emis:emisSettleBill:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col> -->
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -335,10 +335,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询结算总账单列表 */
|
initQueryParams(){
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
// 按运单查询时的处理
|
// 按运单查询时的处理
|
||||||
if(this.queryOrderType=='1'){
|
if(this.queryOrderType=='1'){
|
||||||
this.queryParams.params.billCode=this.queryParams.queryCode;
|
this.queryParams.params.billCode=this.queryParams.queryCode;
|
||||||
@ -349,6 +346,12 @@ export default {
|
|||||||
this.queryParams.settleBillNo=this.queryParams.queryCode;
|
this.queryParams.settleBillNo=this.queryParams.queryCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
/** 查询结算总账单列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
this.initQueryParams();
|
||||||
|
|
||||||
listEmisSettleBill(this.addDateRange(this.queryParams, this.dateTimeRange,'createTime')).then(response => {
|
listEmisSettleBill(this.addDateRange(this.queryParams, this.dateTimeRange,'createTime')).then(response => {
|
||||||
this.emisSettleBillList = response.rows;
|
this.emisSettleBillList = response.rows;
|
||||||
@ -543,87 +546,122 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// this.download('emis/emisSettleBill/export', {
|
|
||||||
// ...this.queryParams
|
|
||||||
// }, `emisSettleBill_${new Date().getTime()}.xlsx`)
|
|
||||||
const loadingInstance = this.$loading({
|
const loadingInstance = this.$loading({
|
||||||
text: '正在导出...'
|
text: '正在导出...'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(this.selectionList&&this.selectionList.length>0){
|
||||||
|
this.exportData(this.selectionList,loadingInstance);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
var qParam = {...this.queryParams};
|
this.initQueryParams();
|
||||||
qParam.pageNum=1;
|
|
||||||
qParam.pageSize=5000;
|
|
||||||
|
|
||||||
listEmisSettleBill(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
let qExportParam={...this.queryParams};
|
||||||
this.downloadLoading = false
|
qExportParam=this.addDateRange(qExportParam, this.dateTimeRange,'createTime')
|
||||||
|
qExportParam.pageNum=1;
|
||||||
|
qExportParam.pageSize=20000;
|
||||||
|
|
||||||
|
listEmisSettleBill(qExportParam).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.exportData(response.rows,loadingInstance);
|
||||||
const curList = response.rows
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
exportData(selData,loadingInstance){
|
||||||
|
const curList =selData
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
const exportParam=this.$refs.refTable.getExportParam();
|
||||||
const tHeader = ['id','总结算账单编号','结算账单名称','结算账单类型','结算开始时间','结算结束时间','账单月份','应收款金额','已收款金额','月结编号','客户编码','客户名称','结算站点代码','结算站点名称','理赔金额','折让金额','抵扣金额','其他金额','理赔原因','折让原因','抵扣原因','其他原因','开票状态','付款状态','总票数','总件数','总重量','未结数量','合计金额','退款数量','退款金额','财务确认状态','财务确认日期','财务确认站点','财务确认人','站点确认状态','财务确认备注','站点确认日期','站点确认人','网点确认备注','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
|
const tHeader = exportParam.header;
|
||||||
const filterVal = ['id','settleBillNo','settleBillName','settleType','settleStartDate','settleEndDate','billMonth','recMoney','recedMoney','custNo','customerCode','customerName','siteCode','siteName','satisfyMoney','allowanceMoney','deductionMoney','otherMoney','satisfyReason','allowanceReason','deductionReason','otherReason','openBillStatus','paymentStatus','sendPieceSum','pieceNumber','feeWeight','uncollectedAmount','sendMoneySum','refundAmount','refundMoney','blConfirm','confirmDate','confirmSite','confirmManCode','blSiteConfirm','confirmNote','siteConfirmDate','siteConfirmManCode','siteConfirmNote','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
const filterVal = exportParam.filter;
|
||||||
const data = this.formatJson(filterVal, curList, response.rows)
|
const data = this.formatJson(filterVal, curList, selData)
|
||||||
axios({
|
excel.export_json_to_excel({
|
||||||
method: "get",
|
|
||||||
url: this.templateFile,
|
|
||||||
responseType: "arraybuffer",
|
|
||||||
}).then(response =>{
|
|
||||||
|
|
||||||
|
|
||||||
console.log("==this.templateFile=>",this.templateFile);
|
|
||||||
console.log("==xxxx=>",response);
|
|
||||||
|
|
||||||
excel.export_json_to_excel_by_tpl({
|
|
||||||
tplData:response,
|
|
||||||
header: tHeader,
|
header: tHeader,
|
||||||
data,
|
data,
|
||||||
filename: '账单',
|
filename: '寄件运单列表',
|
||||||
autoWidth: true
|
autoWidth: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}).catch(error => console.log(error))
|
|
||||||
|
|
||||||
|
|
||||||
loadingInstance.close()
|
loadingInstance.close()
|
||||||
})
|
})
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
formatJson(filterVal, jsonData, resData) {
|
||||||
handleExport_old() {
|
let index = 0
|
||||||
// this.download('emis/emisSettleBill/export', {
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
// ...this.queryParams
|
|
||||||
// }, `emisSettleBill_${new Date().getTime()}.xlsx`)
|
|
||||||
const loadingInstance = this.$loading({
|
|
||||||
text: '正在导出...'
|
|
||||||
})
|
|
||||||
var qParam = {...this.queryParams};
|
|
||||||
qParam.pageNum=1;
|
|
||||||
qParam.pageSize=5000;
|
|
||||||
|
|
||||||
listEmisSettleBill(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
if (j === 'index') {
|
||||||
this.downloadLoading = false
|
return ++index
|
||||||
if (response.code === 200) {
|
|
||||||
|
|
||||||
// const curList = response.rows
|
|
||||||
// import('@/vendor/Export2Excel').then(excel => {
|
|
||||||
// const tHeader = ['id','总结算账单编号','结算账单名称','结算账单类型','结算开始时间','结算结束时间','账单月份','应收款金额','已收款金额','月结编号','客户编码','客户名称','结算站点代码','结算站点名称','理赔金额','折让金额','抵扣金额','其他金额','理赔原因','折让原因','抵扣原因','其他原因','开票状态','付款状态','总票数','总件数','总重量','未结数量','合计金额','退款数量','退款金额','财务确认状态','财务确认日期','财务确认站点','财务确认人','站点确认状态','财务确认备注','站点确认日期','站点确认人','网点确认备注','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
|
|
||||||
// const filterVal = ['id','settleBillNo','settleBillName','settleType','settleStartDate','settleEndDate','billMonth','recMoney','recedMoney','custNo','customerCode','customerName','siteCode','siteName','satisfyMoney','allowanceMoney','deductionMoney','otherMoney','satisfyReason','allowanceReason','deductionReason','otherReason','openBillStatus','paymentStatus','sendPieceSum','pieceNumber','feeWeight','uncollectedAmount','sendMoneySum','refundAmount','refundMoney','blConfirm','confirmDate','confirmSite','confirmManCode','blSiteConfirm','confirmNote','siteConfirmDate','siteConfirmManCode','siteConfirmNote','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 (j === 'kjlx') {
|
||||||
|
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
|
||||||
|
}
|
||||||
|
if (j === 'fjr') {
|
||||||
|
return v['sendName']+'--'+v['receiveName'];
|
||||||
|
}
|
||||||
|
if (j === 'custName') {
|
||||||
|
let paymentType=v['paymentType'];
|
||||||
|
if(paymentType==2 || paymentType==4 || paymentType==5 ){
|
||||||
|
return v['custName'];
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j === 'sendMobile') {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (j === 'paymentStatus') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j === 'pickupMethod') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
|
||||||
|
}
|
||||||
|
if (j === 'customsEclaration') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
|
||||||
|
}
|
||||||
|
if (j === 'customsClear') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
|
||||||
|
}
|
||||||
|
if (j === 'packType') {
|
||||||
|
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j === 'dispatchMethod') {
|
||||||
|
if(v[j] == 1){
|
||||||
|
return '派送';
|
||||||
|
}else{
|
||||||
|
return '自提';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (j === 'blMessage') {
|
||||||
|
if(v[j] == 1){
|
||||||
|
return '发送';
|
||||||
|
}else{
|
||||||
|
return '不发送';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (j === 'blAcceptMessage') {
|
||||||
|
if(v[j] == 1){
|
||||||
|
return '发送';
|
||||||
|
}else{
|
||||||
|
return '不发送';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (j === 'blSign') {
|
||||||
|
if(v[j] == 1){
|
||||||
|
return '已签收';
|
||||||
|
}else{
|
||||||
|
return '未签收';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (j === 'paymentType') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
|
||||||
|
}
|
||||||
|
return v[j]
|
||||||
|
}))
|
||||||
},
|
},
|
||||||
|
|
||||||
formatJson(filterVal, jsonData, resData) {
|
formatJson(filterVal, jsonData, resData) {
|
||||||
let index = 0
|
let index = 0
|
||||||
return jsonData.map(v => filterVal.map(j => {
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user