Merge pull request '月结客户达标统计' (#205) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-frontend/pulls/205
This commit is contained in:
commit
f961ba7839
@ -11,21 +11,24 @@
|
||||
<el-tab-pane label="明细列表" v-if="showDtlList" name="dtlList" >
|
||||
<!-- <PayBackRecordList :queryType="queryType" :queryInfo="queryInfo"></PayBackRecordList> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="月结客户达标统计" name="compliance">
|
||||
<monthlyShipmentStatComplianceQuery @onSelect="onSelect"> </monthlyShipmentStatComplianceQuery>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import MonthlyShipmentStatQuery from '@/views/emis/emisCustomerUser/monthlyShipmentStatQuery.vue';
|
||||
import monthlyShipmentStatReceiveCountryQuery from '@/views/emis/emisCustomerUser/monthlyShipmentStatReceiveCountryQuery.vue';
|
||||
import monthlyShipmentStatComplianceQuery from '@/views/emis/emisCustomerUser/monthlyShipmentStatComplianceQuery.vue';
|
||||
export default {
|
||||
name: "MonthlyShipmentStat",
|
||||
components: {
|
||||
MonthlyShipmentStatQuery,
|
||||
monthlyShipmentStatReceiveCountryQuery,
|
||||
monthlyShipmentStatComplianceQuery,
|
||||
},
|
||||
dicts: [
|
||||
],
|
||||
|
||||
@ -0,0 +1,861 @@
|
||||
<template>
|
||||
<XdPageContainer id="monthlyShipmentStatQuery" >
|
||||
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="20" label-width="96px" 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-date-picker
|
||||
v-model="dateTimeRange"
|
||||
type="monthrange"
|
||||
value-format="yyyy-MM"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="对比时间" prop="createTime" label-width="68px">
|
||||
<elDateAdvPicker v-model="dateTimeRangeCompare" 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-form-item label="客户启用状态" prop="params.status">
|
||||
<el-select v-model="queryParams.params.status" placeholder="请选择客户启用状态" clearable>
|
||||
<el-option label="启用" value="1"></el-option>
|
||||
<el-option label="停用" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计方式" prop="params.complianceStatType">
|
||||
<el-select v-model="queryParams.params.complianceStatType" placeholder="请选择是否达标" clearable>
|
||||
<el-option label="已达标" value="1"></el-option>
|
||||
<el-option label="未达标" value="2"></el-option>
|
||||
<el-option label="连续3个月未出货" value="3"></el-option>
|
||||
<el-option label="累计3个月未出货" value="4"></el-option>
|
||||
<el-option label="连续3个月出货未达标" value="5"></el-option>
|
||||
<el-option label="累计3个月出货未达标" value="6"></el-option>
|
||||
</el-select>
|
||||
</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="monthlyShipmentStatComplianceQuery_main_2602_11"
|
||||
|
||||
: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="left" prop="firstSigningDay" width="110" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('寄件月份')" align="center" prop="sendMonth" min-width="120" />
|
||||
<el-table-column :label="$t('是否达标')" align="center" prop="blCompliance" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.blCompliance == 1">{{ $t('已达标') }}</span>
|
||||
<span v-else>{{ $t('未达标') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总票数')" align="center" prop="totalTickets" width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,null)">{{ scope.row.totalTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.totalTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.totalTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.totalTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总重量')" align="center" prop="totalWeight" min-width="140" sortable >
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.totalWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.totalWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.totalWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.totalWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总运费')" align="center" prop="totalBillFee" min-width="120" />
|
||||
<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" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,1)">{{ scope.row.expressTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.expressTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.expressTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.expressTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="expressWeight" min-width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.expressWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.expressWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.expressWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.expressWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,2)">{{ scope.row.airTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.airTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.airTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.airTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="airWeight" min-width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.airWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.airWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.airWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.airWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,'3,5')">{{ scope.row.landTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.landTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.landTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.landTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="landWeight" min-width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.landWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.landWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.landWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.landWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,'import')">{{ scope.row.importTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.importTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.importTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.importTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="importWeight" min-width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.importWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.importWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.importWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.importWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,4)">{{ scope.row.seaTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.seaTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.seaTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.seaTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="seaWeight" min-width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.seaWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.seaWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.seaWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.seaWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span @click="handleShowBillList(scope.row,'other')">{{ scope.row.otherTickets }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.otherTicketsCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.otherTicketsCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.otherTicketsCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('实际重量')" align="center" prop="otherWeight" min-width="120" sortable>
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<span>{{ scope.row.otherWeight }}</span>
|
||||
<div class="icon-content" >
|
||||
<i class="el-icon-right" v-if="scope.row.otherWeightCompareFlag == 0" ></i>
|
||||
<i class="el-icon-top" v-if="scope.row.otherWeightCompareFlag == 1" ></i>
|
||||
<i class="el-icon-bottom" v-if="scope.row.otherWeightCompareFlag == 2"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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: "monthlyShipmentStatComplianceQuery",
|
||||
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:[],
|
||||
// 对比时间
|
||||
dateTimeRangeCompare:[],
|
||||
// 总条数
|
||||
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: 20,
|
||||
custNo: null,
|
||||
sendCountry: null,
|
||||
receiveCountry: null,
|
||||
salesExecutive: null, // 销售支持
|
||||
salesmen: null, // 销售联系人
|
||||
salesSupport: null, // 销售支持
|
||||
params: {
|
||||
beginSendDate: null,
|
||||
endSendDate: null,
|
||||
statType:'5',
|
||||
status: null,
|
||||
complianceStatType: 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, "YYYY-MM"), timeFormat(end, "YYYY-MM")]
|
||||
// this.dateTimeRange = [timeFormat(start), timeFormat(end)]
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
initQueryParams(){
|
||||
let thisQueryParams = {...this.queryParams};
|
||||
thisQueryParams = this.addDateRange(thisQueryParams, this.dateTimeRange,"SendDate");
|
||||
thisQueryParams = this.addDateRange(thisQueryParams, this.dateTimeRangeCompare,"CompareDate");
|
||||
// if(this.dateTimeRangeCompare && this.dateTimeRangeCompare.length > 0){
|
||||
// thisQueryParams.params.statType = 3;
|
||||
// }else{
|
||||
// thisQueryParams.params.statType = 1;
|
||||
// }
|
||||
return thisQueryParams;
|
||||
},
|
||||
|
||||
handleShowBillList(row, transType) {
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
params: {
|
||||
...this.queryParams.params, // 拷贝 params 对象的所有属性
|
||||
beginSendDate: null,
|
||||
endSendDate: null,
|
||||
sendMonth: row.sendMonth
|
||||
},
|
||||
transType: transType,
|
||||
custNo: row.custNo,
|
||||
};
|
||||
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() {
|
||||
let qExportParam=this.initQueryParams();
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=10000;
|
||||
this.download('emis/emisCustomerUser/exportMonthlyShipmentStat', {
|
||||
...qExportParam
|
||||
}, `月结客户达标统计.xlsx`)
|
||||
|
||||
|
||||
|
||||
// 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 '月结';
|
||||
}
|
||||
}
|
||||
if (j === 'blCompliance') {
|
||||
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;
|
||||
}
|
||||
.flex-center{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.icon-content{
|
||||
margin-left: 10px;
|
||||
margin-left: auto;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-icon-right{
|
||||
color: #409EFF;
|
||||
}
|
||||
.el-icon-top{
|
||||
color: #dd0c1e;
|
||||
}
|
||||
.el-icon-bottom{
|
||||
color: #12da33;
|
||||
}
|
||||
</style>
|
||||
@ -95,7 +95,7 @@
|
||||
<!-- 求和 -->
|
||||
{{ scope.row.detailList.reduce((total, item) => total + (item.emisSettleSubBill.recedMoney || 0), 0).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('本次销账金额')" align="center" prop="writeoffAmount" min-width="140" />
|
||||
<!-- <el-table-column :label="$t('未收金额')" align="center" prop="emisSettleSubBill.unrecedMoney" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
@ -104,15 +104,11 @@
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="$t('缴款人')" align="center" prop="recipient" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('收款公司')" align="center" prop="payCompanyName" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('收款方式')" align="center" prop="payType" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_settlebill_pay_type" :value="scope.row.payType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('付款日期')" align="center" prop="payDate" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('销账日期')" align="center" prop="tradeDate" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('发票号')" align="center" prop="invoiceNo" min-width="100">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user