From 5e88a5e7f1d2e8a0a9d90f2bdd151c7e449728be Mon Sep 17 00:00:00 2001 From: linfso Date: Fri, 20 Sep 2024 17:39:21 +0800 Subject: [PATCH] md --- .../emisSettleBill/EmisSettleBillQuery.vue | 205 +++++++++------- .../emisSettleBill/panel/SiteConfimPanel.vue | 221 +++++++++--------- .../panel/SiteWaitOpenBillPanel.vue | 2 + .../SubBillConfirmByMoneyList.vue | 12 + .../SubBillConfirmByMonthList.vue | 15 +- .../SubBillConfirmBySiteList.vue | 13 +- 6 files changed, 270 insertions(+), 198 deletions(-) diff --git a/src/views/emis/emisSettleBill/EmisSettleBillQuery.vue b/src/views/emis/emisSettleBill/EmisSettleBillQuery.vue index e443eda6..2b45cbc7 100644 --- a/src/views/emis/emisSettleBill/EmisSettleBillQuery.vue +++ b/src/views/emis/emisSettleBill/EmisSettleBillQuery.vue @@ -65,15 +65,19 @@ - + 修改账单 --> - +
- - + + 导出 + this.$store.getters.ownerSiteCode==>",this.$store.getters.ownerSiteCode) // if(this.$store.getters.ownerSiteCode !='88888'){ // this.queryParams.salesmen=this.$store.getters.empName @@ -631,99 +629,112 @@ export default { }, /** 导出按钮操作 */ handleExport() { - // this.download('emis/emisSettleBill/export', { - // ...this.queryParams - // }, `emisSettleBill_${new Date().getTime()}.xlsx`) - const loadingInstance = this.$loading({ + const loadingInstance = this.$loading({ text: '正在导出...' - }) + }) + if(this.selectList&&this.selectList.length>0){ + this.exportData(this.selectList,loadingInstance); + } + else{ - var qParam = {...this.queryParams}; - qParam.pageNum=1; - qParam.pageSize=5000; + this.initQueryParams(); - listEmisSettleBill(this.addDateRange(qParam, this.dateTimeRange)).then(response => { - this.downloadLoading = false - if (response.code === 200) { + let qExportParam={...this.queryParams}; + qExportParam=this.addDateRange(qExportParam, this.dateTimeRange,'createTime') + qExportParam.pageNum=1; + qExportParam.pageSize=20000; - 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) - axios({ - 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, - data, - filename: '账单', - autoWidth: true - }) - - - }).catch(error => console.log(error)) - - - loadingInstance.close() - }) - } - }); + listEmisSettleBill(qExportParam).then(response => { + if (response.code === 200) { + this.exportData(response.rows,loadingInstance); + } + }); + } }, - /** 导出按钮操作 */ - handleExport_old() { - // this.download('emis/emisSettleBill/export', { - // ...this.queryParams - // }, `emisSettleBill_${new Date().getTime()}.xlsx`) - const loadingInstance = this.$loading({ - text: '正在导出...' + 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 }) - var qParam = {...this.queryParams}; - qParam.pageNum=1; - qParam.pageSize=5000; - - listEmisSettleBill(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','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() - // }) - } - }); + loadingInstance.close() + }) }, formatJson(filterVal, jsonData, resData) { let index = 0 return jsonData.map(v => filterVal.map(j => { + if (j === 'index') { return ++index } - if (j === 'status') { - var statusStr='xxx' - if(v[j] == 10){ - statusStr='xxx' + 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 ""; } - return statusStr; + } + + 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 === 'openBillStatus') { + if(v[j] == 0){ + return '未开票'; + } + else if(v[j] == 1){ + return '已开票'; + } + else if(v[j] == 2){ + return '部分开票'; + } + else if(v[j] == 3){ + return '不开票'; + } + else{ + return '/'; + } + } + if (j === 'chargeStatus') { + if(v[j] == 0){ + return '未核销'; + }else{ + return '已核销'; + } + } + if (j === 'paymentType') { + return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]); } return v[j] })) diff --git a/src/views/emis/emisSettleBill/panel/SiteWaitOpenBillPanel.vue b/src/views/emis/emisSettleBill/panel/SiteWaitOpenBillPanel.vue index 39352e55..c13466ee 100644 --- a/src/views/emis/emisSettleBill/panel/SiteWaitOpenBillPanel.vue +++ b/src/views/emis/emisSettleBill/panel/SiteWaitOpenBillPanel.vue @@ -395,6 +395,8 @@ export default { // this.titleForm = "新增开票申请"; // 跳转到开单界面 if(this.selectBillList&&this.selectBillList.length>0){ + // 检查是否可开票 + this.$emit("onApply",this.selectBillList); }else{ this.$modal.msgError("请先选择账单"); diff --git a/src/views/emis/emisSettleSubBill/SubBillConfirmByMoneyList.vue b/src/views/emis/emisSettleSubBill/SubBillConfirmByMoneyList.vue index 0abae96e..b5360717 100644 --- a/src/views/emis/emisSettleSubBill/SubBillConfirmByMoneyList.vue +++ b/src/views/emis/emisSettleSubBill/SubBillConfirmByMoneyList.vue @@ -314,6 +314,13 @@ {{scope.row.waybillDetail.freight}} + + + + @@ -321,6 +328,7 @@ + @@ -743,6 +751,10 @@ export default { return {"background-color": "#03a9f4 !important"}; } + if (row.waybillDetail.blSpecialQuote==1 ) { + return {"background-color": "#a9b0b3 !important"}; + } + if (row.blConfirmCenter=='0' ) { return {}; } diff --git a/src/views/emis/emisSettleSubBill/SubBillConfirmByMonthList.vue b/src/views/emis/emisSettleSubBill/SubBillConfirmByMonthList.vue index fce3a8be..f543fb15 100644 --- a/src/views/emis/emisSettleSubBill/SubBillConfirmByMonthList.vue +++ b/src/views/emis/emisSettleSubBill/SubBillConfirmByMonthList.vue @@ -335,7 +335,14 @@ {{scope.row.waybillDetail.freight}} {{scope.row.waybillDetail.freight}} - + + + + + @@ -834,10 +841,14 @@ export default { tableRowClassName({row, rowIndex}) { - if (row.waybillDetail.realFee!=row.waybillDetail.freight ) { + if (row.waybillDetail.realFee!=row.waybillDetail.freight ) { return {"background-color": "#03a9f4 !important"}; } + if (row.waybillDetail.blSpecialQuote==1 ) { + return {"background-color": "#a9b0b3 !important"}; + } + if (row.blConfirmCenter=='0') { return {}; } diff --git a/src/views/emis/emisSettleSubBill/SubBillConfirmBySiteList.vue b/src/views/emis/emisSettleSubBill/SubBillConfirmBySiteList.vue index 75661e48..75d5f1b8 100644 --- a/src/views/emis/emisSettleSubBill/SubBillConfirmBySiteList.vue +++ b/src/views/emis/emisSettleSubBill/SubBillConfirmBySiteList.vue @@ -326,6 +326,13 @@ {{scope.row.waybillDetail.freight}} + + + + @@ -755,10 +762,14 @@ export default { tableRowClassName({row, rowIndex}) { - if (row.waybillDetail.realFee!=row.waybillDetail.freight ) { + if (row.waybillDetail.realFee!=row.waybillDetail.freight ) { return {"background-color": "#03a9f4 !important"}; } + if (row.waybillDetail.blSpecialQuote==1 ) { + return {"background-color": "#a9b0b3 !important"}; + } + if (row.blConfirmCenter=='0') { return {}; }