711 lines
28 KiB
Vue
711 lines
28 KiB
Vue
<template>
|
|
<XdPageContainer class="app-container">
|
|
|
|
<div style="margin-bottom: 20px;">
|
|
<el-descriptions title="账单信息" size="mini" border :column="4" v-if="settleBillItem">
|
|
<el-descriptions-item label="账单名称">{{ settleBillItem.settleBillName }}</el-descriptions-item>
|
|
<el-descriptions-item label="账单编号">{{ settleBillItem.settleBillNo }}</el-descriptions-item>
|
|
<el-descriptions-item label="账单月份">{{ settleBillItem.billMonth }}</el-descriptions-item>
|
|
<el-descriptions-item label="应收金额">{{ settleBillItem.recMoney }}</el-descriptions-item>
|
|
<el-descriptions-item label="总票数">{{ settleBillItem.sendPieceSum }}</el-descriptions-item>
|
|
<el-descriptions-item label="总件数">{{ settleBillItem.pieceNumber }}</el-descriptions-item>
|
|
<el-descriptions-item label="结算重量">{{ settleBillItem.feeWeight }}</el-descriptions-item>
|
|
<el-descriptions-item label="月结编号" v-if="settleBillItem.settleType==2">{{ settleBillItem.custNo }}</el-descriptions-item>
|
|
<el-descriptions-item label="月结客户" v-if="settleBillItem.settleType==2">{{ settleBillItem.custName }}</el-descriptions-item>
|
|
<el-descriptions-item label="账单类型" >
|
|
<span v-if="settleBillItem.settleType==1">现金账单</span>
|
|
<span v-if="settleBillItem.settleType==2">月结账单</span>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="销售联系人">{{ settleBillItem.salesmen }}</el-descriptions-item>
|
|
<el-descriptions-item label="回款联系人">{{ settleBillItem.payee }}</el-descriptions-item>
|
|
|
|
</el-descriptions>
|
|
</div>
|
|
|
|
<!-- <SearchForm
|
|
slot="pageHeader"
|
|
|
|
:model="queryParams"
|
|
ref="queryForm"
|
|
size="mini" :maxShow="12" label-width="100px"
|
|
v-show="showSearch"
|
|
@search="handleQuery"
|
|
@reset="resetQuery"
|
|
:isShowSearchBtn="true"
|
|
>
|
|
<el-form-item label="运单号" prop="billCode">
|
|
<XdTextareaInput
|
|
v-model="queryParams.billCode"
|
|
:placeholder="$t('多个流水号逗号或换行隔开')"
|
|
clearable
|
|
:rows="2"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="寄件日期" prop="sendDate">
|
|
<elDateAdvPicker v-model="dateTimeRange" ></elDateAdvPicker>
|
|
</el-form-item>
|
|
<el-form-item label="寄件网点" prop="params.sendSiteCode">
|
|
<EmisSiteSimplePicker1 v-model="queryParams.params.sendSiteCode" ></EmisSiteSimplePicker1>
|
|
</el-form-item>
|
|
<el-form-item label="目的网点" prop="params.dispatchUnderlingSiteCode">
|
|
<EmisSiteSimplePicker2 v-model="queryParams.params.dispatchUnderlingSiteCode" ></EmisSiteSimplePicker2>
|
|
</el-form-item>
|
|
<el-form-item label="月结客户" prop="custNo">
|
|
<EmisMonthpayAccountPicker v-model="queryParams.custNo" @onChange="handleQuery"></EmisMonthpayAccountPicker>
|
|
</el-form-item>
|
|
<el-form-item label="付款方式" prop="params.paymentType" >
|
|
<el-select clearable v-model="queryParams.params.paymentType" placeholder="请选择">
|
|
<el-option
|
|
v-for="dict in dict.type.emis_payment_type"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('回款联系人')" prop="params.payee">
|
|
<PayeePicker :placeholder="$t('回款联系人')" v-model="queryParams.params.payee" ></PayeePicker>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('销售联系人')" prop="params.salesmen">
|
|
<SalemanPicker :placeholder="$t('销售联系人')" v-model="queryParams.params.salesmen" ></SalemanPicker>
|
|
</el-form-item>
|
|
<el-form-item label="寄件公司" prop="params.sendCompany">
|
|
<el-input
|
|
v-model="queryParams.params.sendCompany"
|
|
:placeholder="$t('寄件公司')"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="收件公司" prop="params.receiveCompany">
|
|
<el-input
|
|
v-model="queryParams.params.receiveCompany"
|
|
:placeholder="$t('收件公司')"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
</SearchForm> -->
|
|
<!-- slot="pageContent"
|
|
slot-scope="slotProps"
|
|
:height="(slotProps.contentHeight)+'px'" -->
|
|
<!-- 账单明细数据表 -->
|
|
<XdTable
|
|
v-loading="loading"
|
|
border
|
|
size="mini"
|
|
ref="refTable1"
|
|
|
|
row-key="id"
|
|
storageName="emisSettleSubBillList_billDtl_1"
|
|
|
|
:data="emisSettleSubBillList"
|
|
@queryTable="getList"
|
|
:showSearch.sync="showSearch"
|
|
:queryParams="queryParams"
|
|
:total="total"
|
|
@selection-change="handleSelectionChange"
|
|
@sort-change="handleSortChange"
|
|
>
|
|
<!-- @queryTable="getList" -->
|
|
<!-- highlight-current-row
|
|
:row-style="tableRowClassName" -->
|
|
|
|
<div slot="toolbar" >
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5" >
|
|
<XdTextareaInput
|
|
v-model="billCodeStr"
|
|
:placeholder="$t('多个流水号逗号或换行隔开')"
|
|
clearable
|
|
:rows="1"
|
|
/>
|
|
</el-col>
|
|
|
|
<el-col :span="1.5" >
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
size="mini"
|
|
@click="handleAddBillCode"
|
|
>追加运单到此账单</el-button>
|
|
</el-col>
|
|
<el-col :span="1.5" >
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
size="mini"
|
|
@click="handleRemovceBillCode"
|
|
>从账单内删除运单</el-button>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
<el-table-column label="序号" align="center" width="50">
|
|
<template slot-scope="scope">
|
|
<span v-text="getIndex(scope.$index)"> </span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column type="expand">
|
|
<template slot-scope="scope">
|
|
<div style="padding: 8px 50px;background:white">
|
|
<div style="display:inline-flex;padding: 15px 0px;" >
|
|
<div style="font-weight:500">总费用(CNY):<span>{{scope.row.billFee}}</span></div>
|
|
<div>
|
|
<el-button
|
|
type="text"
|
|
size="mini"
|
|
style="padding: 2px 10px;font-size: 13px;border: 1px solid #e1e1e1;"
|
|
@click="handleShowTraceInfo(scope.row)"
|
|
>运单详情</el-button>
|
|
</div>
|
|
</div>
|
|
<div style="font-weight:500">费用备注:<span>{{scope.row.waybillDetail.feeRemark}}</span></div>
|
|
|
|
<div style="width: 500px;">
|
|
<BillFeeListPanel :key="'feeitem_'+scope.$index" :feeitemList="scope.row.feeitemList"></BillFeeListPanel>
|
|
</div>
|
|
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" />
|
|
<el-table-column :label="$t('发件人')" align="center" prop="fjr" width="200" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.waybillDetail.sendName }}--{{ scope.row.waybillDetail.receiveName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('快件类型')" align="center" prop="kjlx" width="180" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.waybillDetail.sendSiteName }}--{{ scope.row.waybillDetail.dispatchUnderlingSiteName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('支付方式')" align="center" prop="waybillDetail.paymentType" min-width="80" :show-overflow-tooltip="true" >
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.waybillDetail.paymentType"/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('收件省')" align="center" prop="waybillDetail.receiveProvinceName" min-width="80" :show-overflow-tooltip="true"/>
|
|
|
|
<el-table-column :label="$t('产品类型')" align="center" prop="waybillDetail.productTypeName" min-width="120" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span >{{scope.row.waybillDetail.productTypeName}}({{scope.row.waybillDetail.timeType}})</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('寄件日期')" align="center" prop="waybillDetail.sendDate" min-width="170" :show-overflow-tooltip="true"/>
|
|
|
|
<!-- <el-table-column :label="$t('是否特殊报价')" align="center" prop="waybillDetail.blSpecialQuote" width="150" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.waybillDetail.blSpecialQuote==1">是</span>
|
|
<span v-else>否</span>
|
|
</template>
|
|
</el-table-column> -->
|
|
<!-- </el-table-column>
|
|
<el-table-column :label="$t('计费方式')" align="center" prop="waybillDetail.calcFeeType" width="150" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<dict-tag :options="dict.type.emis_calc_fee_type" :value="scope.row.waybillDetail.calcFeeType"/>
|
|
</template>
|
|
</el-table-column> -->
|
|
|
|
<el-table-column :label="$t('寄件网点')" align="center" prop="waybillDetail.sendSiteName" min-width="150" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('寄件公司')" align="center" prop="waybillDetail.sendCompany" min-width="150" :show-overflow-tooltip="true"/>
|
|
<el-table-column v-if="settleBillItem.settleType==2" :label="$t('月结编号')" align="center" prop="custNo" min-width="150" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span type="normal">{{ scope.row.custNo }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column v-if="settleBillItem.settleType==2" :label="$t('月结客户')" align="center" prop="custName" min-width="150" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span type="normal">{{ scope.row.custName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<!-- <el-table-column :label="$t('取件员/操作员')" align="center" prop="takePieceEmployeeName" min-width="170" :show-overflow-tooltip="true">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.pickupMethod==1">{{scope.row.waybillDetail.operateEmployeeName}}</span>
|
|
<span v-if="scope.row.pickupMethod==2">{{scope.row.waybillDetail.takePieceEmployeeName}}</span>
|
|
<span v-else></span>
|
|
</template>
|
|
</el-table-column> -->
|
|
|
|
<el-table-column :label="$t('寄件人')" align="center" prop="waybillDetail.sendName" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('件数')" align="center" prop="waybillDetail.parcelQty" min-width="80" />
|
|
<el-table-column :label="$t('实际重量')" align="center" prop="waybillDetail.billWeight" min-width="80" />
|
|
<el-table-column :label="$t('体积')" align="center" prop="waybillDetail.totalVolume" min-width="80" />
|
|
<el-table-column :label="$t('体积重量')" align="center" prop="waybillDetail.volumeWeight" min-width="80" />
|
|
<el-table-column :label="$t('结算重量')" align="center" prop="waybillDetail.settlementWeight" min-width="80" />
|
|
<el-table-column :label="$t('运费')" align="center" prop="waybillDetail.freight" min-width="80" >
|
|
<template slot-scope="scope">
|
|
<span style="color: red;font-weight: 500" v-if="scope.row.waybillDetail.realFee!=scope.row.waybillDetail.freight">{{scope.row.waybillDetail.freight}}</span>
|
|
<span v-else>{{scope.row.waybillDetail.freight}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('标准报价')" align="center" prop="waybillDetail.realFee" min-width="80" />
|
|
<el-table-column :label="$t('费用备注')" align="center" prop="waybillDetail.feeRemark" min-width="80" :show-overflow-tooltip="true"/>
|
|
<el-table-column :label="$t('录单备注')" align="center" prop="waybillDetail.remark" min-width="80" :show-overflow-tooltip="true" />
|
|
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="100" />
|
|
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="100" />
|
|
<!--
|
|
<el-table-column :label="$t('问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="150" >
|
|
<template slot-scope="scope">
|
|
<el-tag v-if="scope.row.waybillDetail.blIsQuestion==1" type="danger">是</el-tag>
|
|
<span v-else >/</span>
|
|
</template>
|
|
</el-table-column> -->
|
|
<!-- <el-table-column :label="$t('问题件类型')" align="center" prop="waybillDetail.problemTypeName" width="150" :show-overflow-tooltip="true"/> -->
|
|
<!-- <el-table-column :label="$t('问题件原因')" align="center" prop="waybillDetail.problemCause" width="150" :show-overflow-tooltip="true"/> -->
|
|
|
|
<!-- <el-table-column :label="$t('财务确认状态')" align="center" prop="blConfirmCenter" min-width="120" >
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.blConfirmCenter=='0'" >未确认</span>
|
|
<el-tag v-if="scope.row.blConfirmCenter=='1'" type="success">已确认</el-tag>
|
|
<el-tag v-if="scope.row.blConfirmCenter=='2'" type="error">确认不出账</el-tag>
|
|
<el-tag v-if="scope.row.blConfirmCenter=='3'" type="error">账单异常</el-tag>
|
|
</template>
|
|
</el-table-column> -->
|
|
<!-- <el-table-column :label="$t('财务确认人')" align="center" prop="confirmCenterManName" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('财务确认时间')" align="center" prop="confirmCenterDate" min-width="170" /> -->
|
|
<!-- <el-table-column :label="$t('财务备注')" align="center" prop="confirmCenterNote" min-width="100" /> -->
|
|
|
|
<!-- <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 elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
|
import emisSettleBillForm from '@/views/emis/emisSettleBill/emisSettleBillForm';
|
|
|
|
import emisWaybillForm from '@/views/emis/emisWaybill/emisWaybillForm';
|
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
|
|
|
import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
|
|
import CountryPicker2 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
import ProvincePicker2 from '@/views/emis/EmisBaseTools/ProvincePicker.vue';
|
|
|
|
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
|
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
|
|
|
|
|
import PayeePicker from '@/views/emis/EmisBaseTools/PayeePicker.vue';
|
|
import SalemanPicker from '@/views/emis/EmisBaseTools/SalemanPicker.vue';
|
|
|
|
import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
import EmisUserSimplePicker1 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
import EmisUserSimplePicker2 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
|
|
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
|
|
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
|
|
|
|
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
|
|
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
|
|
|
|
import MergeBillForm from '@/views/emis/emisSettleBill/MergeBillForm.vue';
|
|
import BillFeeListPanel from '@/views/emis/emisSettleSubBill/panel/BillFeeListPanel.vue';
|
|
|
|
import { getInfoBySettleBillNo,addSubBillToSettleBill,removeSubBillFromSettleBill } from "@/api/emis/emisSettleBill";
|
|
import { listEmisSettleSubBill} from "@/api/emis/emisSettleSubBill";
|
|
|
|
|
|
export default {
|
|
name: "SubBillListPanel",
|
|
props:{
|
|
settleBillNo:{
|
|
type:String
|
|
}
|
|
},
|
|
components: {
|
|
BillFeeListPanel,
|
|
elDateSimplePicker,
|
|
emisSettleBillForm,
|
|
EmisMonthpayAccountPicker,
|
|
elDateAdvPicker,emisWaybillForm,
|
|
CountryPicker1,
|
|
CountryPicker2,
|
|
ProvincePicker2,
|
|
TransLinePicker,
|
|
TransProductPicker,
|
|
PayeePicker,
|
|
SalemanPicker,
|
|
EmisUserSimplePicker0,
|
|
EmisUserSimplePicker1,
|
|
EmisUserSimplePicker2,
|
|
|
|
EmisSiteSimplePicker1,
|
|
EmisSiteSimplePicker2,
|
|
ProblemTypePicker,
|
|
|
|
TraceWaybillDetailView,
|
|
MergeBillForm
|
|
},
|
|
dicts: ['emis_payment_type'
|
|
],
|
|
data() {
|
|
return {
|
|
activeTab:'billList',
|
|
// 遮罩层
|
|
loading: false,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 创建时间搜索
|
|
dateTimeRange:[],
|
|
// 总条数
|
|
total: 0,
|
|
billCodeStr:null,
|
|
// 结算总账单表格数据
|
|
emisSettleBillList: [],
|
|
|
|
settleBillItem:null,
|
|
|
|
currentId:null,
|
|
openForm: false,
|
|
titleForm: "",
|
|
|
|
subBillTotal: 0,
|
|
// 结算子账单表格数据
|
|
emisSettleSubBillList: [],
|
|
|
|
currentSettleBillNo:null,
|
|
|
|
// 弹出展示层
|
|
id:null,
|
|
titleView:"",
|
|
openView: false,
|
|
// 更新站点时间范围
|
|
daterangeSettleStartDate: [],
|
|
// 更新站点时间范围
|
|
daterangeSettleEndDate: [],
|
|
// 更新站点时间范围
|
|
daterangeCreateTime: [],
|
|
// 更新站点时间范围
|
|
daterangeUpdateTime: [],
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 20,
|
|
settleBillNo: null,
|
|
settleBillName: null,
|
|
settleType: null,
|
|
settleStartDate: null,
|
|
settleEndDate: null,
|
|
billMonth: null,
|
|
recMoney: null,
|
|
recedMoney: null,
|
|
custNo: null,
|
|
customerCode: null,
|
|
customerName: null,
|
|
siteCode: null,
|
|
siteName: null,
|
|
satisfyMoney: null,
|
|
allowanceMoney: null,
|
|
deductionMoney: null,
|
|
otherMoney: null,
|
|
satisfyReason: null,
|
|
allowanceReason: null,
|
|
deductionReason: null,
|
|
otherReason: null,
|
|
openBillStatus: null,
|
|
paymentStatus: null,
|
|
sendPieceSum: null,
|
|
pieceNumber: null,
|
|
feeWeight: null,
|
|
uncollectedAmount: null,
|
|
sendMoneySum: null,
|
|
refundAmount: null,
|
|
refundMoney: null,
|
|
blConfirm: null,
|
|
confirmDate: null,
|
|
confirmSite: null,
|
|
confirmManCode: null,
|
|
blSiteConfirm: null,
|
|
confirmNote: null,
|
|
siteConfirmDate: null,
|
|
siteConfirmManCode: null,
|
|
siteConfirmNote: null,
|
|
remark: null,
|
|
delFlag: null,
|
|
},
|
|
templateFile: '/static/tpl/billExportTpl.xls',
|
|
};
|
|
},
|
|
watch: {
|
|
"settleBillNo": {
|
|
handler (newValue, oldValue) {
|
|
this.initData();
|
|
},
|
|
deep: true
|
|
}
|
|
},
|
|
created() {
|
|
this.initData();
|
|
},
|
|
methods: {
|
|
initData(){
|
|
this.loading = true;
|
|
getInfoBySettleBillNo(this.settleBillNo).then(response => {
|
|
this.settleBillItem = response.data;
|
|
this.getList();
|
|
this.loading = false;
|
|
});
|
|
},
|
|
getList(row, column, event) {
|
|
this.loading = true;
|
|
this.queryParams.settleBillNo=this.settleBillNo
|
|
listEmisSettleSubBill(this.queryParams).then(response => {
|
|
this.emisSettleSubBillList = response.rows;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
});
|
|
|
|
},
|
|
//指定列求和
|
|
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位小数
|
|
}
|
|
});
|
|
console.log(sums);
|
|
return sums
|
|
},
|
|
// 移除运单
|
|
handleRemovceBillCode(){
|
|
let postData={
|
|
settleBillNo: this.settleBillNo,
|
|
params:{
|
|
billCodeStr:this.billCodeStr
|
|
}
|
|
}
|
|
|
|
removeSubBillFromSettleBill(postData).then(response => {
|
|
this.$modal.msgSuccess("操作成功");
|
|
this.initData();
|
|
});
|
|
},
|
|
// 加入运单
|
|
handleAddBillCode(){
|
|
if(!this.billCodeStr){
|
|
this.$modal.msgError("运单号必填");
|
|
return;
|
|
}
|
|
|
|
let postData={
|
|
settleBillNo: this.settleBillNo,
|
|
params:{
|
|
billCodeStr:this.billCodeStr
|
|
}
|
|
}
|
|
addSubBillToSettleBill(postData).then(response => {
|
|
this.$modal.msgSuccess("操作成功");
|
|
// this.getSubBillList();
|
|
this.initData();
|
|
});
|
|
|
|
},
|
|
// handleShowTraceInfo(row){
|
|
// this.openTraceInfoTitle="运单详情【"+row.billCode+"】";
|
|
// this.currentTraceBillCode=row.billCode;
|
|
// this.currentTraceBillItem=row.waybillDetail;
|
|
// this.openTraceInfo=true;
|
|
// },
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.getList();
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
},
|
|
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
|
|
if(selection&&selection.length>0){
|
|
this.currentSettleBillNo=selection[0].settleBillNo;
|
|
}
|
|
|
|
},
|
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
|
handleSortChange(column) {
|
|
this.queryParams.orderByColumn = column.prop;
|
|
this.queryParams.isAsc = column.order;
|
|
this.getList();
|
|
},
|
|
handleFormChanged(){
|
|
this.openForm = false;
|
|
this.getList();
|
|
},
|
|
cancelForm(){
|
|
this.openForm = false;
|
|
},
|
|
|
|
/** 列索引函数 */
|
|
getIndex($index) {
|
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
|
},
|
|
/** 时间搜索响应函数 */
|
|
dateTimeChange(value){
|
|
this.dateTimeRange=value;
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.feeItem{
|
|
|
|
border: 1px solid #dfe6ec;
|
|
margin-bottom:50px;
|
|
|
|
ul{
|
|
list-style: none;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
width: 590px;
|
|
height: 32px;
|
|
line-height: 32px;
|
|
border: 1px solid #dfe6ec;
|
|
border-top: 0px;
|
|
font-size: 12px;
|
|
|
|
}
|
|
ul li{
|
|
display:block; width:33%; float:left;text-indent:2em
|
|
}
|
|
.th{
|
|
background:#FFF; font-weight:bold; border-top:1px
|
|
}
|
|
}
|
|
|
|
|
|
.statInfoValue{
|
|
color: red;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
</style>
|