理赔金额明细
This commit is contained in:
parent
6c87ce1b1c
commit
c3b6f7df1c
@ -42,3 +42,12 @@ export function delEmisCreditSalesmen(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//理赔金额明细
|
||||
export function getEmisCreditSalesmenDetail(params) {
|
||||
return request({
|
||||
url: '/emis/emisCreditSalesmen/getSalesSatisfyDetail',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
ref="refTable"
|
||||
storageName="emisCreditSalesmenList_main_250426"
|
||||
storageName="emisCreditSalesmenList_main_250820"
|
||||
|
||||
border stripe
|
||||
size="small"
|
||||
@ -108,7 +108,7 @@
|
||||
|
||||
<el-table-column :label="$t('剩余额度')" align="center" prop="curMoney" min-width="120" :sortable="true">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.tempCreditMoney - scope.row.useMoney).toFixed(2) }}
|
||||
{{ (scope.row.tempCreditMoney - scope.row.useMoney + scope.row.satisfyMoney).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总已用额度')" align="center" prop="useMoney" min-width="120" :sortable="true">
|
||||
@ -126,6 +126,11 @@
|
||||
<div class="link-type" @click="handleShowBillList(scope.row,1)">{{ scope.row.overTermMoney }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('理赔金额')" align="center" prop="satisfyMoney" min-width="80" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleShowSatisfyMoneyList(scope.row,null)">{{ scope.row.satisfyMoney }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('剩余比例(%)')" align="center" prop="curMoneyRate" min-width="130" :sortable="true">
|
||||
<template slot-scope="scope">
|
||||
{{ ( ((scope.row.tempCreditMoney - scope.row.useMoney)/(scope.row.tempCreditMoney))*100 ).toFixed(2) }}%
|
||||
@ -306,6 +311,25 @@ export default {
|
||||
}
|
||||
);
|
||||
},
|
||||
//理赔金额明细列表
|
||||
handleShowSatisfyMoneyList(row,queryQuotaType){
|
||||
console.log('handleShowStatisfy')
|
||||
let item0=row;
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/d24/customerManagement/SatisfyMoneySendWaybillList',
|
||||
query: {
|
||||
action: "queryByCredit",
|
||||
payee: item0.salesmen,
|
||||
startDate: item0.startDate,
|
||||
endDate: item0.endDate,
|
||||
transType: item0.transType,
|
||||
queryQuotaType:queryQuotaType,
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
||||
@ -343,7 +343,7 @@ export default {
|
||||
},
|
||||
dicts: ['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'
|
||||
'emis_payment_status'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
|
||||
607
src/views/emis/emisWaybill/SatisfyMoneySendWaybillList .vue
Normal file
607
src/views/emis/emisWaybill/SatisfyMoneySendWaybillList .vue
Normal file
@ -0,0 +1,607 @@
|
||||
<template>
|
||||
<XdPageContainer class="app-container">
|
||||
<XdTable
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
highlight-current-row
|
||||
|
||||
ref="refTable"
|
||||
row-key="id"
|
||||
|
||||
storageName="CreditSendWaybillList_main_250821"
|
||||
:showStatInfo="true"
|
||||
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
:data="emisWaybillList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams1"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
@row-dblclick="handleShowTraceInfo"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
|
||||
<div slot="toolbar">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisWaybill:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table-column :label="$t('账单编号')" align="center" prop="settleBillNo" width="170" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('账单名称')" align="left" prop="settleBillName" width="200" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('账单月份')" align="center" prop="billMonth" width="80" />
|
||||
<el-table-column :label="$t('账单期间')" align="center" prop="billMonth" width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div >{{scope.row.settleStartDate}}~{{scope.row.settleEndDate}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('总票数')" align="center" prop="sendPieceSum" width="80" />
|
||||
<el-table-column :label="$t('总件数')" align="center" prop="pieceNumber" width="80" />
|
||||
<el-table-column :label="$t('结算重量')" align="center" prop="feeWeight" width="80" />
|
||||
<el-table-column :label="$t('账单应收金额')" align="center" prop="recMoney" width="150" />
|
||||
<el-table-column :label="$t('账单已收金额')" align="center" prop="recedMoney" width="150" />
|
||||
<el-table-column :label="$t('账单退款金额')" align="center" prop="refundMoney" width="150" />
|
||||
<el-table-column :label="$t('理赔金额')" align="center" prop="satisfyMoney" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('折让金额')" align="center" prop="allowanceMoney" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('抵扣金额')" align="center" prop="deductionMoney" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('其他收费')" align="center" prop="otherMoney" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('理赔原因')" align="center" prop="satisfyMoney" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('抵让原因')" align="center" prop="deductionReason" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('其他原因')" align="center" prop="otherReason" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('其他费用')" align="center" prop="otherReason" width="170" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column :label="$t('合计金额')" align="center" prop="sendMoneySum" width="100" :show-overflow-tooltip="true"/> -->
|
||||
|
||||
<el-table-column :label="$t('回款联系人')" align="center" prop="payee" width="100" />
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" width="100" />
|
||||
|
||||
<el-table-column :label="$t('生成时间')" align="center" prop="createTime" width="170" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column :label="$t('收款状态')" align="center" prop="paymentStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='1'" type="success">已收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('开票状态')" align="center" prop="openBillStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.openBillStatus=='0'" type="error">未开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='1'" type="success">已开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='2'" type="warning">部分开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='3'" type="warning">不开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='4'" type="success">已完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('核销状态')" align="center" prop="chargeStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.chargeStatus=='0'" type="error">未核销</el-tag>
|
||||
<el-tag v-if="scope.row.chargeStatus=='1'" type="success">已核销</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('业务确认状态')" align="center" prop="blConfirmSite" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.blConfirmSite=='0'" >未确认</span>
|
||||
<el-tag v-if="scope.row.blConfirmSite=='1'" type="success">已确认</el-tag>
|
||||
<el-tag v-if="scope.row.blConfirmSite=='2'" type="error">确认不出账</el-tag>
|
||||
<el-tag v-if="scope.row.blConfirmSite=='3'" type="error">账单异常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('业务确认时间')" align="center" prop="confirmSiteDate" min-width="170" />
|
||||
<el-table-column :label="$t('业务确认人')" align="center" prop="confirmSiteManName" min-width="100" />
|
||||
<el-table-column :label="$t('业务备注')" align="center" prop="confirmSiteNote" min-width="100" />
|
||||
</XdTable>
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listEmisSettleBill} from "@/api/emis/emisSettleBill";
|
||||
import {getEmisCreditSalesmenDetail} from "@/api/emis/emisCreditSalesmen";
|
||||
import {timeFormat} from '@/utils/dateUtils'
|
||||
|
||||
export default {
|
||||
name: "SatisfyMoneySendWaybillList",
|
||||
components: {},
|
||||
dicts: ['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 {
|
||||
tableHeight: 200,
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 运单列表表格数据
|
||||
emisWaybillList: [],
|
||||
selectionList:[],
|
||||
|
||||
tableData: [],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
billCode:null,
|
||||
|
||||
openTraceInfo:false,
|
||||
currentTraceBillItem:null,
|
||||
currentTraceBillCode:null,
|
||||
|
||||
queryOrderType:null,
|
||||
queryOrderDateType:null,
|
||||
queryExpireNotSign:null,
|
||||
|
||||
queryStatInfoMap:null,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 时间搜索
|
||||
dateRange:[],
|
||||
// 获取运单号查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
paymentType:null,
|
||||
payee:null,
|
||||
paymentStatus:null,
|
||||
carryType:null,
|
||||
params:{
|
||||
problemQueryType:null,
|
||||
problemQueryIds:null,
|
||||
queryTabType:"1",
|
||||
querySendType:"1",
|
||||
beginSendDate:null,
|
||||
endSendDate:null,
|
||||
}
|
||||
},
|
||||
//获取账单查询参数
|
||||
queryParams1:{
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
settleType:null,
|
||||
queryCode:null, // 换行符隔开
|
||||
params:{
|
||||
beginCreateTime:null,
|
||||
endCreateTime:null,
|
||||
billCode:null
|
||||
}
|
||||
},
|
||||
billCodes:[],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route () {
|
||||
if(this.$route.query.action=='queryByCredit'){
|
||||
if(this.$route.query.custNo!=null){
|
||||
this.queryParams.custNo=this.$route.query.custNo;
|
||||
this.queryParams.paymentType='2,4,5';
|
||||
}
|
||||
|
||||
if(this.$route.query.payee!=null){
|
||||
this.queryParams.payee=this.$route.query.payee;
|
||||
this.queryParams.paymentType='1,3';
|
||||
}
|
||||
|
||||
this.queryParams.carryType=this.$route.query.transType;
|
||||
this.queryParams.params.queryQuotaType=this.$route.query.queryQuotaType;
|
||||
|
||||
this.queryParams.paymentStatus='0,2';
|
||||
this.queryParams.params.problemQueryType=2;
|
||||
this.queryParams.params.problemQueryIds="173,170,151";
|
||||
|
||||
let startTime=this.$route.query.startDate;
|
||||
let endTime=this.$route.query.endDate;
|
||||
this.dateRange=[timeFormat(startTime), timeFormat(endTime)]
|
||||
this.queryOrderType="1";
|
||||
this.queryOrderDateType="1";
|
||||
|
||||
this.getList();
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(this.$route.query.action=='queryByCredit'){
|
||||
|
||||
if(this.$route.query.custNo!=null){
|
||||
this.queryParams.custNo=this.$route.query.custNo;
|
||||
this.queryParams.paymentType='2,4,5';
|
||||
}
|
||||
|
||||
if(this.$route.query.payee!=null){
|
||||
this.queryParams.payee=this.$route.query.payee;
|
||||
this.queryParams.paymentType='1,3';
|
||||
}
|
||||
|
||||
this.queryParams.carryType=this.$route.query.transType;
|
||||
this.queryParams.params.queryQuotaType=this.$route.query.queryQuotaType;
|
||||
|
||||
this.queryParams.paymentStatus='0,2';
|
||||
this.queryParams.params.problemQueryType=2;
|
||||
this.queryParams.params.problemQueryIds="173,170,151";
|
||||
|
||||
let startTime=this.$route.query.startDate;
|
||||
let endTime=this.$route.query.endDate;
|
||||
this.dateRange=[timeFormat(startTime), timeFormat(endTime)]
|
||||
this.queryOrderType="1";
|
||||
this.queryOrderDateType="1";
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
//标红table指定行
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
|
||||
if (this.selectionList.some((item) => item === row)) {
|
||||
return "select-row";
|
||||
}
|
||||
|
||||
if (row.blSign=='1') {
|
||||
return 'success-row';
|
||||
}
|
||||
else if (row.blIsQuestion=='1') {
|
||||
return 'warning-row';
|
||||
}
|
||||
|
||||
return '';
|
||||
},
|
||||
handleShowTraceInfo(row){
|
||||
this.currentTraceBillCode=row.billCode;
|
||||
this.currentTraceBillItem=row;
|
||||
this.openTraceInfo=true;
|
||||
},
|
||||
initQueryParams(){
|
||||
this.queryParams=this.addDateRange(this.queryParams, this.dateRange,"sendDate");
|
||||
let qParam=null;
|
||||
if(this.queryParams.billCode){
|
||||
qParam={
|
||||
pageNum:this.queryParams.pageNum,
|
||||
pageSize:this.queryParams.pageSize,
|
||||
billCode:this.queryParams.billCode,
|
||||
}
|
||||
}else{
|
||||
qParam=this.queryParams
|
||||
}
|
||||
// qParam.pageSize = 10;
|
||||
return qParam;
|
||||
},
|
||||
initQueryParams1(){
|
||||
this.queryParams1 ={
|
||||
settleType:1,
|
||||
queryCode:this.billCodes.join('\n'), // 换行符隔开
|
||||
params:{
|
||||
billCode:this.billCodes.join('\n')
|
||||
}
|
||||
}
|
||||
return this.queryParams1;
|
||||
},
|
||||
/** 查询运单列表列表 */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
let qParam=this.initQueryParams();
|
||||
let data =await getEmisCreditSalesmenDetail(qParam);
|
||||
this.billCodes = data.rows.map((item)=>{
|
||||
return item.settleBillName
|
||||
})
|
||||
if(this.billCodes.length>0){
|
||||
let qParam1 =this.initQueryParams1();
|
||||
const res= await listEmisSettleBill(qParam1);
|
||||
this.emisWaybillList = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false;
|
||||
}else{
|
||||
this.emisWaybillList = [];
|
||||
this.total = 0;
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
// if(selection!=null){
|
||||
// this.billCode=selection[0].billCode;
|
||||
// }
|
||||
this.selectionList=selection;
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
var qParam = {...this.queryParams};
|
||||
// 增加导出记录
|
||||
let postExportRecord={
|
||||
menuName: '理赔金额账单明细',
|
||||
dateRange: qParam.params.beginSendDate+"~"+qParam.params.endSendDate,
|
||||
}
|
||||
|
||||
this.addExportAuditRecord(postExportRecord);
|
||||
|
||||
if(this.selectionList&&this.selectionList.length>0){
|
||||
this.exportData(this.selectionList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
let qExportParam=this.initQueryParams1();
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
|
||||
listEmisSettleBill(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 => {
|
||||
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
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 === 'blUploadPic') {
|
||||
if(v['goodsPics']!=null && v['goodsPics']!=''){
|
||||
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]
|
||||
}))
|
||||
},
|
||||
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (
|
||||
column.property === 'sendPieceSum'
|
||||
) {
|
||||
const values = data.map(item => Number(item.sendPieceSum));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0); //保留0位小数
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'pieceNumber'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.pieceNumber));
|
||||
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0); //保留0位小数
|
||||
}
|
||||
else if (
|
||||
column.property === 'feeWeight'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.feeWeight));
|
||||
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'recMoney'
|
||||
) {
|
||||
const values = data.map(item => Number(item.recMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
else if(
|
||||
column.property === 'recedMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.recedMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
else if(
|
||||
column.property === 'refundMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.refundMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}else if(
|
||||
column.property === 'satisfyMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.satisfyMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
|
||||
});
|
||||
console.log(sums);
|
||||
return sums
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user