diff --git a/src/views/emis/emisCommissionDtl/index.vue b/src/views/emis/emisCommissionDtl/index.vue index 9b6d3cf6..684e20c6 100644 --- a/src/views/emis/emisCommissionDtl/index.vue +++ b/src/views/emis/emisCommissionDtl/index.vue @@ -52,6 +52,8 @@ :data="emisCommissionDtlList" :showSearch.sync="showSearch" + ref="refTable" + storageName="emisCommissionDtl_main_240702" :queryParams="queryParams" @@ -108,16 +110,15 @@ >批量重算 - + @@ -137,18 +138,22 @@ - - + + + + - + + + @@ -237,9 +242,12 @@ import emisCommissionDtlForm from '@/views/emis/emisCommissionDtl/emisCommission import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue'; export default { - name: "emisCommissionDtl", + name: "EmisCommissionDtl", components: { elDateSimplePicker,emisCommissionDtlForm,EmisUserSimplePicker0,PayeePicker }, - dicts: ['emis_commission_fee_type'], + dicts: ['emis_commission_fee_type','emis_qujian_fangshi','emis_declare_mode','emis_customs_clear', + 'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type', + 'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status','emis_tab_dispatch_mode' + ], data() { return { // 遮罩层 @@ -259,6 +267,8 @@ export default { // 员工提成明细表表格数据 emisCommissionDtlList: [], + selectBillList:[], + currentId:null, openForm: false, titleForm: "", @@ -316,7 +326,7 @@ export default { /** 查询员工提成明细表列表 */ getList() { this.loading = true; - listEmisCommissionDtl(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => { + listEmisCommissionDtl(this.queryParams).then(response => { this.emisCommissionDtlList = response.rows; this.total = response.total; this.loading = false; @@ -338,6 +348,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { + this.selectBillList=selection; this.ids = selection.map(item => item.id) this.single = selection.length!==1 this.multiple = !selection.length @@ -435,49 +446,201 @@ export default { this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, - /** 导出按钮操作 */ - handleExport() { - // this.download('emis/emisCommissionDtl/export', { - // ...this.queryParams - // }, `emisCommissionDtl_${new Date().getTime()}.xlsx`) - const loadingInstance = this.$loading({ + /** 导出按钮操作 */ + handleExport() { + const loadingInstance = this.$loading({ text: '正在导出...' - }) - var qParam = {...this.queryParams}; - qParam.pageNum=1; - qParam.pageSize=5000; + }) - listEmisCommissionDtl(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','feeType','money','billMonth','billCode','feeRemark','empCode','empName','blConfirmCenter','confirmCenterDate','confirmCenterNote','confirmCenterManCode','confirmCenterCode','blConfirmSite','confirmSiteDate','confirmSiteManCode','confirmSiteNote','confirmSiteCode','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.selectBillList&&this.selectBillList.length>0){ + this.exportData(this.selectBillList,loadingInstance); + } + else{ + let qExportParam={...this.queryParams}; + qExportParam.pageNum=1; + qExportParam.pageSize=10000; + + listEmisCommissionDtl(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 === '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] })) diff --git a/src/views/emis/emisCommissionProfit/index.vue b/src/views/emis/emisCommissionProfit/index.vue index a60657cf..663f2087 100644 --- a/src/views/emis/emisCommissionProfit/index.vue +++ b/src/views/emis/emisCommissionProfit/index.vue @@ -1,19 +1,22 @@