月结客户出货明细导出
This commit is contained in:
parent
6711f03d53
commit
2529c15a3d
@ -24,7 +24,7 @@
|
||||
>
|
||||
<div slot="toolbar">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -32,7 +32,7 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -551,21 +551,16 @@ export default {
|
||||
this.openForm = false;
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
if(this.selectionList&&this.selectionList.length>0){
|
||||
this.exportData(this.selectionList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
|
||||
let qExportParam={...this.queryParams};
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
queryPayBackRecordList(qExportParam).then(response => {
|
||||
monthlyShipmentDetail(this.queryParams).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.exportData(response.rows,loadingInstance);
|
||||
}
|
||||
@ -582,7 +577,7 @@ export default {
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '收款明细',
|
||||
filename: '月结客户出货统计明细',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
@ -595,177 +590,80 @@ export default {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.parcelQty') {
|
||||
return v['waybillDetail']['parcelQty'];
|
||||
if (j === 'kjlx') {
|
||||
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.billWeight') {
|
||||
return v['waybillDetail']['billWeight'];
|
||||
if (j === 'fjr') {
|
||||
return v['sendName']+'--'+v['receiveName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.totalVolume') {
|
||||
return v['waybillDetail']['totalVolume'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.volumeWeight') {
|
||||
return v['waybillDetail']['volumeWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.settlementWeight') {
|
||||
return v['waybillDetail']['settlementWeight'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.freight') {
|
||||
return v['waybillDetail']['freight'];
|
||||
}
|
||||
|
||||
|
||||
if (j === 'waybillDetail.productTypeName') {
|
||||
return v['waybillDetail']['productTypeName']+'('+v['waybillDetail']['timeType']+')';
|
||||
}
|
||||
|
||||
|
||||
if (j === 'waybillDetail.transLineTypeName') {
|
||||
return v['waybillDetail']['transLineTypeName'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.sendCompany') {
|
||||
return v['waybillDetail']['sendCompany'];
|
||||
}
|
||||
|
||||
if (j === 'waybillDetail.paymentType') {
|
||||
let paymentType=v['waybillDetail']['paymentType'];
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_type,paymentType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (j === 'settleBillDetail.payee') {
|
||||
return v['settleBillDetail']['payee'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.salesmen') {
|
||||
return v['settleBillDetail']['salesmen'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.recMoney') {
|
||||
return v['settleBillDetail']['recMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.recMoney') {
|
||||
return v['settleBillDetail']['recMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.refundMoney') {
|
||||
return v['settleBillDetail']['refundMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.satisfyMoney') {
|
||||
return v['settleBillDetail']['satisfyMoney'];
|
||||
}
|
||||
|
||||
|
||||
if (j === 'settleBillDetail.allowanceMoney') {
|
||||
return v['settleBillDetail']['allowanceMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.deductionMoney') {
|
||||
return v['settleBillDetail']['deductionMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.otherMoney') {
|
||||
return v['settleBillDetail']['otherMoney'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.remark') {
|
||||
return v['settlePayRecordDetail']['remark'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.tradeDate') {
|
||||
return v['settlePayRecordDetail']['tradeDate'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.paymentDueDate') {
|
||||
return v['settleBillDetail']['paymentDueDate'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.payId') {
|
||||
return v['settlePayRecordDetail']['payId'];
|
||||
}
|
||||
|
||||
if (j === 'settlePayRecordDetail.recType') {
|
||||
let recType=v['settlePayRecordDetail']['recType'];
|
||||
if(recType == 1){
|
||||
return '收款';
|
||||
}
|
||||
else if(recType == 2){
|
||||
return '退款';
|
||||
}
|
||||
}
|
||||
if (j === 'settlePayRecordDetail.createByName') {
|
||||
return v['settlePayRecordDetail']['createByName'];
|
||||
}
|
||||
if (j === 'settlePayRecordDetail.createTime') {
|
||||
return v['settlePayRecordDetail']['createTime'];
|
||||
}
|
||||
|
||||
if (j === 'settleBillDetail.settleBillName') {
|
||||
return v['settleBillDetail']['settleBillName'];
|
||||
}
|
||||
if (j === 'settleBillDetail.billMonth') {
|
||||
return v['settleBillDetail']['billMonth'];
|
||||
}
|
||||
if (j === 'settleBillDetail.creditPeriod') {
|
||||
return v['settleBillDetail']['creditPeriod'];
|
||||
}
|
||||
if (j === 'settleBillDetail.custName') {
|
||||
return v['settleBillDetail']['custName'];
|
||||
}
|
||||
if (j === 'settleBillDetail.custName') {
|
||||
let paymentType=v['waybillDetail']['paymentType'];
|
||||
if (j === 'custName') {
|
||||
let paymentType=v['paymentType'];
|
||||
if(paymentType==2 || paymentType==4 || paymentType==5 ){
|
||||
return v['settleBillDetail']['custName'];
|
||||
return v['custName'];
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (j === 'settlePayRecordDetail.payType') {
|
||||
let payType=v['settlePayRecordDetail']['payType'];
|
||||
|
||||
if (j === 'sendMobile') {
|
||||
return "";
|
||||
}
|
||||
if (j === 'settleSubBill.openBillStatus') {
|
||||
let openBillStatus=v['settleSubBill']['openBillStatus'];
|
||||
if(openBillStatus== 0){
|
||||
return '未开票';
|
||||
}
|
||||
else if(openBillStatus == 1){
|
||||
return '已开票';
|
||||
}
|
||||
else if(openBillStatus == 2){
|
||||
return '部分开票';
|
||||
}
|
||||
else if(openBillStatus == 3){
|
||||
return '不开票';
|
||||
}
|
||||
else if(openBillStatus == 4){
|
||||
return '已完成';
|
||||
}
|
||||
else{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
if (j === 'settleSubBill.invoicedMoney') {
|
||||
return v['settleSubBill']['invoicedMoney'];
|
||||
}
|
||||
if (j === 'settleSubBill.paymentStatus') {
|
||||
let paymentStatus=v['settleSubBill']['paymentStatus'];
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,paymentStatus);
|
||||
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]
|
||||
}))
|
||||
},
|
||||
|
||||
@ -2,9 +2,12 @@
|
||||
<div class="app-container">
|
||||
<div class="el-tabs-container">
|
||||
<el-tabs slot="pageTabs" v-model="activeTab" @tab-click="handleTabsClick">
|
||||
<el-tab-pane label="出货统计" name="payback" >
|
||||
<el-tab-pane label="出货统计" name="shipment" >
|
||||
<MonthlyShipmentStatQuery @onSelect="onSelect"> </MonthlyShipmentStatQuery>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="按目的国家统计" name="receiveCountry" >
|
||||
<monthlyShipmentStatReceiveCountryQuery @onSelect="onSelect"> </monthlyShipmentStatReceiveCountryQuery>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="明细列表" v-if="showDtlList" name="dtlList" >
|
||||
<!-- <PayBackRecordList :queryType="queryType" :queryInfo="queryInfo"></PayBackRecordList> -->
|
||||
</el-tab-pane>
|
||||
@ -17,18 +20,18 @@
|
||||
|
||||
|
||||
import MonthlyShipmentStatQuery from '@/views/emis/emisCustomerUser/monthlyShipmentStatQuery.vue';
|
||||
|
||||
import monthlyShipmentStatReceiveCountryQuery from '@/views/emis/emisCustomerUser/monthlyShipmentStatReceiveCountryQuery.vue';
|
||||
export default {
|
||||
name: "MonthlyShipmentStat",
|
||||
components: {
|
||||
MonthlyShipmentStatQuery,
|
||||
|
||||
monthlyShipmentStatReceiveCountryQuery,
|
||||
},
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
activeTab:'payback',
|
||||
activeTab:'shipment',
|
||||
queryInfo:null,
|
||||
queryType:null,
|
||||
showDtlList:false,
|
||||
|
||||
@ -0,0 +1,644 @@
|
||||
<template>
|
||||
<XdPageContainer id="BillPaybackSumQuery1" >
|
||||
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="20" label-width="90px" label-position="left" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<!-- 查询条件:客户名称、寄件公司、销售联系人、回款联系人、运单号、账单号、账期月、收款时间、收款登记人、 -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="寄件时间" prop="createTime" label-width="68px">
|
||||
<elDateAdvPicker v-model="dateTimeRange" style="z-index:9999;width:260px" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item label="客户名称" prop="custNo">
|
||||
<AllMonthpayAccountPicker v-model="queryParams.custNo" style="width:100%" ></AllMonthpayAccountPicker>
|
||||
</el-form-item>
|
||||
<el-form-item label="寄件国家" prop="sendCountry">
|
||||
<CountryPicker1 v-model="queryParams.sendCountry" :placeholder="$t('寄件国家')" ></CountryPicker1>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的国家" prop="receiveCountry">
|
||||
<CountryPicker2 v-model="queryParams.receiveCountry" :placeholder="$t('目的国家')" ></CountryPicker2>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="销售主管" prop="salesExecutive" >
|
||||
<EmpNamePicker1 :placeholder="$t('销售主管')" v-model="queryParams.salesExecutive" ></EmpNamePicker1>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售联系人" prop="salesmen" >
|
||||
<EmpNamePicker2 :placeholder="$t('销售联系人')" v-model="queryParams.salesmen" ></EmpNamePicker2>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售支持" prop="salesSupport" >
|
||||
<EmpNamePicker3 :placeholder="$t('销售支持')" v-model="queryParams.salesSupport" ></EmpNamePicker3>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</SearchForm>
|
||||
<div slot="pageContent">
|
||||
<xd-table
|
||||
height="calc(100vh - 20rem)"
|
||||
|
||||
ref="refTable"
|
||||
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
|
||||
storageName="PayBackStatList_main_2505_05"
|
||||
|
||||
:data="emisStatList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
|
||||
highlight-current-row
|
||||
>
|
||||
<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"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="$t('客户名称')" align="left" prop="customerName" width="200" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('总票数')" align="center" prop="totalTickets" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,null)">{{ scope.row.totalTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总重量')" align="center" prop="totalWeight" min-width="100" />
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" min-width="120" />
|
||||
<el-table-column :label="$t('越南')" align="center" prop="express" min-width="120" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="expressTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,1)">{{ scope.row.expressTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="expressWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('空运')" align="center" prop="air" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="airTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,2)">{{ scope.row.airTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="airWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('陆运')" align="center" prop="land" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="landTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,'3,5')">{{ scope.row.landTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="landWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('进口')" align="center" prop="import" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="importTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,'import')">{{ scope.row.importTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="importWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('海运')" align="center" prop="sea" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="seaTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,4)">{{ scope.row.seaTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="seaWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('其他')" align="center" prop="other" width="100" >
|
||||
<el-table-column :label="$t('票数')" align="center" prop="otherTickets" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleShowBillList(scope.row,'other')">{{ scope.row.otherTickets }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="otherWeight" min-width="120" />
|
||||
</el-table-column>
|
||||
|
||||
</xd-table>
|
||||
</div>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { monthlyShipmentStat } from "@/api/emis/emisCustomerUser";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import AllMonthpayAccountPicker from '@/views/emis/EmisBaseTools/AllMonthpayAccountPicker.vue';
|
||||
import EmpNamePicker1 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import EmpNamePicker2 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import EmpNamePicker3 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
import CountryPicker2 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
import { timeFormat } from '@/utils/dateUtils';
|
||||
export default {
|
||||
name: "MonthlyShipmentStatReceiveCountryQuery",
|
||||
components: { EmpNamePicker1,EmpNamePicker2,EmpNamePicker3,elDateAdvPicker,AllMonthpayAccountPicker,CountryPicker1,CountryPicker2 },
|
||||
dicts: ['emis_payment_status'],
|
||||
data() {
|
||||
return {
|
||||
// 调整表格的高度,不允许滚动
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
recordTotal:0,
|
||||
|
||||
emisStatList: [],
|
||||
emisStatRecordList:[],
|
||||
selectionList:[],
|
||||
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
activeName: 'first',
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
queryOrderType:null,
|
||||
|
||||
queryStatInfoMap:null,
|
||||
|
||||
titleEmisElectronicPagApply: "",
|
||||
openEmisElectronicPagApply: false,
|
||||
|
||||
// 显示编辑框更多
|
||||
moreInputVisible: false,
|
||||
|
||||
dataMap:new Map(),
|
||||
|
||||
// 弹出展示层
|
||||
currentId:null,
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
custNo: null,
|
||||
sendCountry: null,
|
||||
receiveCountry: null,
|
||||
salesExecutive: null, // 销售支持
|
||||
salesmen: null, // 销售联系人
|
||||
salesSupport: null, // 销售支持
|
||||
params: {
|
||||
beginSendDate: null,
|
||||
endSendDate: null,
|
||||
}
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
let start = new Date()
|
||||
start.setDate(1)
|
||||
start.setHours(0, 0, 0, 0)
|
||||
let end = new Date()
|
||||
var currentMonth = end.getMonth()
|
||||
var nextMonth = ++currentMonth
|
||||
var nextMonthFirstDay = new Date(end.getFullYear(), nextMonth, 1)
|
||||
var oneDay = 1000 * 60 * 60 * 24
|
||||
end = new Date(nextMonthFirstDay - oneDay)
|
||||
end.setHours(23, 59, 59, 0)
|
||||
this.dateTimeRange = [timeFormat(start), timeFormat(end)]
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
initQueryParams(){
|
||||
let thisQueryParams = {...this.queryParams};
|
||||
thisQueryParams = this.addDateRange(thisQueryParams, this.dateTimeRange,"SendDate");
|
||||
return thisQueryParams;
|
||||
},
|
||||
|
||||
handleShowBillList(row, transType) {
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
transType: transType,
|
||||
custNo: row.custNo,
|
||||
};
|
||||
console.log("====>params====>", params);
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/monthlyShipmentDetail',
|
||||
query: {
|
||||
query: JSON.stringify(params)
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 查询统计信息 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let tempQueryParams = this.initQueryParams();
|
||||
|
||||
monthlyShipmentStat(tempQueryParams).then(response => {
|
||||
this.emisStatList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.selectionList=selection;
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
getProperty(obj, str) {
|
||||
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
|
||||
let arr = str.split(".");
|
||||
for (let i in arr) {
|
||||
obj = obj[arr[i]] || "";
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
sortFun: function (attr, rev) {
|
||||
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
|
||||
if (rev == undefined||rev==null) {
|
||||
rev = 1;
|
||||
} else {
|
||||
rev = (rev) ? 1 : -1;
|
||||
}
|
||||
let that=this;
|
||||
return function (a, b) {
|
||||
a = that.getProperty(a,attr);
|
||||
b = that.getProperty(b,attr);
|
||||
if (a < b) {
|
||||
return rev * -1;
|
||||
}
|
||||
if (a > b) {
|
||||
return rev * 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
this.emisStatList = this.emisStatList.sort(
|
||||
this.sortFun(column.prop, column.order === 'ascending')
|
||||
);
|
||||
},
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (
|
||||
column.property === 'totalTickets'
|
||||
) {
|
||||
const values = data.map(item => Number(item.totalTickets));
|
||||
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);
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'totalWeight'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.totalWeight));
|
||||
|
||||
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);
|
||||
}
|
||||
else if (
|
||||
column.property === 'expressTickets'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.expressTickets));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'expressWeight'
|
||||
) {
|
||||
const values = data.map(item => Number(item.expressWeight));
|
||||
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);
|
||||
} else if (
|
||||
column.property === 'airTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.airTickets));
|
||||
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);
|
||||
} else if(
|
||||
column.property === 'airWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.airWeight));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'landTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.landTickets));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'landWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.landWeight));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'importTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.importTickets));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'importWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.importWeight));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'seaTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.seaTickets));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'seaWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.seaWeight));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'otherTickets'
|
||||
){
|
||||
const values = data.map(item => Number(item.otherTickets));
|
||||
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);
|
||||
}else if(
|
||||
column.property === 'otherWeight'
|
||||
){
|
||||
const values = data.map(item => Number(item.otherWeight));
|
||||
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);
|
||||
}
|
||||
});
|
||||
return sums
|
||||
},
|
||||
handleExportDtl(){
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
|
||||
const $e = this.$refs['refTable'].$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if(!$table) {
|
||||
$table = $e
|
||||
}
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
excel.table_to_book($table,"月结客户出货统计.xlsx");
|
||||
loadingInstance.close()
|
||||
})
|
||||
|
||||
loadingInstance.close();
|
||||
// let qExportParam = this.initQueryParams();;
|
||||
// qExportParam.pageNum=1;
|
||||
// qExportParam.pageSize=20000;
|
||||
|
||||
// monthlyShipmentStat(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 === 'paymentStatus') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,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 === 'settleType') {
|
||||
if(v[j] == 1){
|
||||
return '现金';
|
||||
}
|
||||
else if(v[j] == 2){
|
||||
return '月结';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider{
|
||||
margin-top: 0px;
|
||||
background: 0 0;
|
||||
border-top: 1px solid #E6EBF5;
|
||||
}
|
||||
.el-divider__text {
|
||||
color: #0955ee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user