md
This commit is contained in:
parent
6890666d7f
commit
4a0deecdba
@ -0,0 +1,571 @@
|
||||
<template>
|
||||
<XdPageContainer >
|
||||
<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"
|
||||
@row-dblclick="onDblClick"
|
||||
|
||||
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="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleShowCanlender"
|
||||
>收款日历</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExportDtl"
|
||||
>导出收款明细</el-button>
|
||||
</el-col> -->
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 客户名称 寄件公司 账单名称 账单月份 账期 支付方式 开票状态 收款状态 账单金额 账期内收款金额 超期收款金额(70%) 逾期已收金额(60天) 未收款金额 销售联系人 回款联系人 -->
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<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="creditPeriod" min-width="100" />
|
||||
<el-table-column :label="$t('出账时间')" align="center" prop="createTime" min-width="170" />
|
||||
<el-table-column :label="$t('最后回款日')" align="center" prop="paymentDueDate" min-width="170" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.paymentDueDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('支付方式')" align="center" prop="settleType" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.settleType=='1'" type="error">现金</el-tag>
|
||||
<el-tag v-if="scope.row.settleType=='2'" type="success">月结</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('账单金额')" align="center" prop="recMoney" width="150" />
|
||||
<el-table-column :label="$t('总票数')" align="center" prop="sendPieceSum" width="80" />
|
||||
<el-table-column :label="$t('账期内收款金额(100%)')" align="center" prop="recdMoneyIn" width="180" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleShowBillList(scope.row,1)">{{ scope.row.recdMoneyIn }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('超期收款金额(70%)')" align="center" prop="recdPayMoney60D" width="150" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleShowBillList(scope.row,2)">{{ scope.row.recdPayMoney60D }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('逾期已收金额(60天)')" align="center" prop="recdPayMoneyGreat60D" width="150" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleShowBillList(scope.row,3)">{{ scope.row.recdPayMoneyGreat60D }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('未收款金额')" align="center" prop="noRecMoney" width="150" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleShowNoPayBillList(scope.row,4)">{{ scope.row.noRecMoney }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('理赔金额')" align="center" prop="satisfyMoney" width="100" />
|
||||
<el-table-column :label="$t('折让金额')" align="center" prop="allowanceMoney" width="100" />
|
||||
<el-table-column :label="$t('抵扣金额')" align="center" prop="deductionMoney" width="100" />
|
||||
<el-table-column :label="$t('其它金额')" align="center" prop="otherMoney" width="100" />
|
||||
|
||||
<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="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="left" prop="customerName" width="200" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('账单编号')" align="center" prop="settleBillNo" width="170" :show-overflow-tooltip="true"/>
|
||||
<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="payee" width="100" />
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" width="100" />
|
||||
</xd-table>
|
||||
</div>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { parseTime,parseExcelTime } from "@/utils/custom";
|
||||
|
||||
import { queryPayBackStatList } from "@/api/emis/emisSettleBill";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import AllMonthpayAccountPicker from '@/views/emis/EmisBaseTools/AllMonthpayAccountPicker.vue';
|
||||
|
||||
import SysUserSimplePicker from '@/views/emis/EmisBaseTools/SysUserSimplePicker.vue';
|
||||
|
||||
import EmpNamePicker1 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import EmpNamePicker2 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
|
||||
export default {
|
||||
name: "PayBackStatQuery",
|
||||
components: { EmpNamePicker1,EmpNamePicker2,elDateAdvPicker,AllMonthpayAccountPicker,SysUserSimplePicker},
|
||||
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:500,
|
||||
queryKey:null,
|
||||
settleBillNo: null,
|
||||
settleType: null,
|
||||
billMonth: null,
|
||||
billMonthScope:[],
|
||||
custNo: null,
|
||||
openBillStatus: null,
|
||||
paymentStatus: null,
|
||||
chargeStatus: null,
|
||||
payee: null,
|
||||
salesmen: null,
|
||||
createBy:null,
|
||||
params:{
|
||||
billCode:null,
|
||||
payCreateBy:null
|
||||
}
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryOrderType='1';
|
||||
},
|
||||
methods: {
|
||||
initQueryParams(){
|
||||
|
||||
let thisQueryParams = {...this.queryParams};
|
||||
|
||||
|
||||
// 按运单查询时的处理
|
||||
if(this.queryOrderType==1){
|
||||
thisQueryParams.params.billCode=thisQueryParams.queryKey;
|
||||
thisQueryParams.settleBillNo=null;
|
||||
}
|
||||
else if(this.queryOrderType==2){
|
||||
thisQueryParams.params.billCode=null;
|
||||
thisQueryParams.settleBillNo=thisQueryParams.queryKey;
|
||||
}
|
||||
|
||||
thisQueryParams = this.addDateRange(thisQueryParams, this.dateTimeRange,"tradeDate");
|
||||
|
||||
if(thisQueryParams.billMonthScope&&thisQueryParams.billMonthScope.length>0){
|
||||
thisQueryParams.billMonth=thisQueryParams.billMonthScope.join(",");
|
||||
}
|
||||
|
||||
return thisQueryParams;
|
||||
},
|
||||
handleShowCanlender(){
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/PayDay',
|
||||
query: {
|
||||
action: "queryPayData",
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
handleShowBillList(row,queryDataType){
|
||||
let item0=row;
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/PayBackRecordList',
|
||||
query: {
|
||||
action: "queryBIData",
|
||||
settleBillNo: item0.settleBillNo,
|
||||
queryDataType:queryDataType,
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
handleShowNoPayBillList(row,queryDataType){
|
||||
let item0=row;
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/NoPayBackRecordList',
|
||||
query: {
|
||||
action: "queryBIData",
|
||||
settleBillNo: item0.settleBillNo,
|
||||
queryDataType:queryDataType,
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 查询统计信息 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let tempQueryParams = this.initQueryParams();
|
||||
|
||||
queryPayBackStatList(tempQueryParams).then(response => {
|
||||
this.emisStatList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
handleQuery(){
|
||||
console.log("===>handleQuery====>");
|
||||
this.getList();
|
||||
},
|
||||
/** 查询明细列表 */
|
||||
onDblClick(row, column, event) {
|
||||
// this.loading = true;
|
||||
console.log("===>onDblClick====>",row);
|
||||
this.handleShowBillList(row,0);
|
||||
// this.$emit("onSelect", row);
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
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 === '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);
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'recdMoneyIn'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.recdMoneyIn));
|
||||
|
||||
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 === 'recdPayMoney60D'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.recdPayMoney60D));
|
||||
|
||||
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 === 'recdPayMoneyGreat60D'
|
||||
) {
|
||||
const values = data.map(item => Number(item.recdPayMoneyGreat60D));
|
||||
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 === 'noRecMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.noRecMoney));
|
||||
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);
|
||||
}
|
||||
});
|
||||
console.log(sums);
|
||||
return sums
|
||||
},
|
||||
handleExportDtl(){
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
|
||||
if(this.selectionList&&this.selectionList.length>0){
|
||||
this.exportData(this.selectionList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
let qExportParam = this.initQueryParams();;
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
|
||||
queryPayBackStatList(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>
|
||||
@ -0,0 +1,622 @@
|
||||
<template>
|
||||
<XdPageContainer id="BillPaybackSumQuery1" >
|
||||
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="20" label-width="68px" 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="queryKey" label-width="80px">
|
||||
<div slot="label">
|
||||
<el-radio-group class="query-label" v-model="queryOrderType">
|
||||
<el-radio :key="1" label="1">运单号</el-radio>
|
||||
<el-radio :key="2" label="2">账单号</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<XdTextareaInput
|
||||
v-model="queryParams.queryKey"
|
||||
:placeholder="$t('多个流水号逗号或换行隔开')"
|
||||
clearable
|
||||
:rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款时间" prop="createTime" >
|
||||
<elDateAdvPicker v-model="dateTimeRange" style="z-index:9999;width:200px" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item label="月结客户" prop="custNo">
|
||||
<AllMonthpayAccountPicker v-model="queryParams.custNo" ></AllMonthpayAccountPicker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="回款联系人" prop="payee" label-width="100px">
|
||||
<EmpNamePicker1 :placeholder="$t('回款联系人')" v-model="queryParams.payee" ></EmpNamePicker1>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售联系人" prop="salesmen" label-width="100px">
|
||||
<EmpNamePicker2 :placeholder="$t('销售联系人')" v-model="queryParams.salesmen" ></EmpNamePicker2>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="账单月份" prop="billMonth">
|
||||
<el-date-picker size="mini" style="width:100%" v-model="queryParams.billMonthScope" type="months" placeholder="账单月份" value-format="yyyy-MM"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('支付方式')" prop="settleType" >
|
||||
<el-select clearable v-model="queryParams.settleType" placeholder="支付方式" style="width:100%">
|
||||
<el-option key="1" label="现金" value="1"></el-option>
|
||||
<el-option key="2" label="月结" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款登记人" prop="createBy" label-width="100px">
|
||||
<SysUserSimplePicker v-model="queryParams.params.payCreateBy" ></SysUserSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</SearchForm>
|
||||
<!-- slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight-100)+'px'" -->
|
||||
|
||||
|
||||
<div slot="pageContent">
|
||||
<div slot="toolbar">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleShowCanlender"
|
||||
>收款日历</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExportDtl"
|
||||
>导出收款明细</el-button>
|
||||
</el-col> -->
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
height="calc(100vh - 20rem)"
|
||||
|
||||
id="thisTable"
|
||||
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
|
||||
>
|
||||
|
||||
<!-- @row-dblclick="onDblClick" -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 客户名称 寄件公司 账单名称 账单月份 账期 支付方式 开票状态 收款状态 账单金额 账期内收款金额 超期收款金额(70%) 逾期已收金额(60天) 未收款金额 销售联系人 回款联系人 -->
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" width="100" />
|
||||
<el-table-column :label="$t('账单月份')" align="center" prop="billMonth" width="80" />
|
||||
|
||||
<el-table-column :label="$t('现金账单')" align="center" prop="moneyBill" min-width="100" >
|
||||
<el-table-column :label="$t('账单数')" align="center" prop="totalMoneyBillCount" min-width="100" />
|
||||
<el-table-column :label="$t('账单金额')" align="center" prop="totalMoneyRecAmount" min-width="100" />
|
||||
<el-table-column :label="$t('账期内收款金额(100%)')" align="center" prop="totalMoneyRecdIn" min-width="170" />
|
||||
<el-table-column :label="$t('现金回款系数')" align="center" prop="totalMoneyRecdRate" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.totalMoneyRecdRate!=null"> {{ (scope.row.totalMoneyRecdRate*100).toFixed(2) }}% </span>
|
||||
<span v-else>0%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('月结账单')" align="center" prop="monthBill" min-width="100" >
|
||||
<el-table-column :label="$t('账单数')" align="center" prop="totalMonthBillCount" min-width="100" />
|
||||
<el-table-column :label="$t('账单金额')" align="center" prop="totalMonthRecAmount" min-width="100" />
|
||||
<el-table-column :label="$t('账期内收款金额(100%)')" align="center" prop="totalMonthRecdIn" min-width="170" />
|
||||
<el-table-column :label="$t('超期收款金额(70%)')" align="center" prop="totalMonthRecd70" min-width="150" />
|
||||
<el-table-column :label="$t('月结100%回款率')" align="center" prop="totalMonthRecdInRate" min-width="160" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.totalMonthRecdInRate!=null">{{ (scope.row.totalMonthRecdInRate*100).toFixed(2) }}%</span>
|
||||
<span v-else>0%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('月结70%回款率')" align="center" prop="totalMonthRecd70Rate" min-width="160" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.totalMonthRecd70Rate!=null">{{ (scope.row.totalMonthRecd70Rate*100).toFixed(2) }}%</span>
|
||||
<span v-else>0%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('月结总回款率')" align="center" prop="totalMonthRecdRate" min-width="160">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.totalMonthRecdInRate!=null&&scope.row.totalMonthRecd70Rate!=null">
|
||||
{{ ((scope.row.totalMonthRecdInRate+scope.row.totalMonthRecd70Rate)*100).toFixed(2) }}%
|
||||
</span>
|
||||
<span v-else>0%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { parseTime,parseExcelTime } from "@/utils/custom";
|
||||
|
||||
import { querySalesPayBackRateList } from "@/api/emis/emisSettleBill";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import AllMonthpayAccountPicker from '@/views/emis/EmisBaseTools/AllMonthpayAccountPicker.vue';
|
||||
|
||||
import SysUserSimplePicker from '@/views/emis/EmisBaseTools/SysUserSimplePicker.vue';
|
||||
|
||||
import EmpNamePicker1 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
import EmpNamePicker2 from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
||||
|
||||
export default {
|
||||
name: "PayBackStatQuery",
|
||||
components: { EmpNamePicker1,EmpNamePicker2,elDateAdvPicker,AllMonthpayAccountPicker,SysUserSimplePicker},
|
||||
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:500,
|
||||
queryKey:null,
|
||||
settleBillNo: null,
|
||||
settleType: null,
|
||||
billMonth: null,
|
||||
billMonthScope:[],
|
||||
custNo: null,
|
||||
openBillStatus: null,
|
||||
paymentStatus: null,
|
||||
chargeStatus: null,
|
||||
payee: null,
|
||||
salesmen: null,
|
||||
createBy:null,
|
||||
params:{
|
||||
billCode:null,
|
||||
payCreateBy:null
|
||||
}
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryOrderType='1';
|
||||
},
|
||||
methods: {
|
||||
initQueryParams(){
|
||||
|
||||
let thisQueryParams = {...this.queryParams};
|
||||
|
||||
|
||||
// 按运单查询时的处理
|
||||
if(this.queryOrderType==1){
|
||||
thisQueryParams.params.billCode=thisQueryParams.queryKey;
|
||||
thisQueryParams.settleBillNo=null;
|
||||
}
|
||||
else if(this.queryOrderType==2){
|
||||
thisQueryParams.params.billCode=null;
|
||||
thisQueryParams.settleBillNo=thisQueryParams.queryKey;
|
||||
}
|
||||
|
||||
thisQueryParams = this.addDateRange(thisQueryParams, this.dateTimeRange,"tradeDate");
|
||||
|
||||
if(thisQueryParams.billMonthScope&&thisQueryParams.billMonthScope.length>0){
|
||||
thisQueryParams.billMonth=thisQueryParams.billMonthScope.join(",");
|
||||
}
|
||||
|
||||
return thisQueryParams;
|
||||
},
|
||||
handleShowCanlender(){
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/PayDay',
|
||||
query: {
|
||||
action: "queryPayData",
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
handleShowBillList(row,queryDataType){
|
||||
let item0=row;
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/PayBackRecordList',
|
||||
query: {
|
||||
action: "queryBIData",
|
||||
settleBillNo: item0.settleBillNo,
|
||||
queryDataType:queryDataType,
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
handleShowNoPayBillList(row,queryDataType){
|
||||
let item0=row;
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/BIStatData/NoPayBackRecordList',
|
||||
query: {
|
||||
action: "queryBIData",
|
||||
settleBillNo: item0.settleBillNo,
|
||||
queryDataType:queryDataType,
|
||||
'_t':(new Date()).getTime()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 查询统计信息 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let tempQueryParams = this.initQueryParams();
|
||||
|
||||
querySalesPayBackRateList(tempQueryParams).then(response => {
|
||||
this.emisStatList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
handleQuery(){
|
||||
console.log("===>handleQuery====>");
|
||||
this.getList();
|
||||
},
|
||||
/** 查询明细列表 */
|
||||
onDblClick(row, column, event) {
|
||||
// this.loading = true;
|
||||
console.log("===>onDblClick====>",row);
|
||||
this.handleShowBillList(row,0);
|
||||
// this.$emit("onSelect", row);
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
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 === '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);
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'recdMoneyIn'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.recdMoneyIn));
|
||||
|
||||
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 === 'recdPayMoney60D'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.recdPayMoney60D));
|
||||
|
||||
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 === 'recdPayMoneyGreat60D'
|
||||
) {
|
||||
const values = data.map(item => Number(item.recdPayMoneyGreat60D));
|
||||
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 === 'noRecMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.noRecMoney));
|
||||
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);
|
||||
}
|
||||
});
|
||||
console.log(sums);
|
||||
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();
|
||||
|
||||
|
||||
// if(this.selectionList&&this.selectionList.length>0){
|
||||
// this.exportData(this.selectionList,loadingInstance);
|
||||
// }
|
||||
// else{
|
||||
// let qExportParam = this.initQueryParams();;
|
||||
// qExportParam.pageNum=1;
|
||||
// qExportParam.pageSize=20000;
|
||||
|
||||
// queryPayBackStatList(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>
|
||||
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="el-tabs-container">
|
||||
<el-tabs slot="pageTabs" v-model="activeTab" @tab-click="handleTabsClick">
|
||||
<el-tab-pane label="销售回款率统计" name="paybackRate" >
|
||||
<SalePayBackRateQuery @onSelect="onSelect"> </SalePayBackRateQuery>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="明细列表" v-if="showDtlList" name="dtlList" >
|
||||
<SalePayBackRateDtlList :queryType="queryType" :queryInfo="queryInfo"></SalePayBackRateDtlList>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import SalePayBackRateQuery from '@/views/emis/emisSettleBill/PayBackStat/SalePayBackRateQuery.vue';
|
||||
import SalePayBackRateDtlList from '@/views/emis/emisSettleBill/PayBackStat/SalePayBackRateDtlList.vue';
|
||||
|
||||
export default {
|
||||
name: "SalesPayBackRateTab",
|
||||
components: {
|
||||
SalePayBackRateQuery,
|
||||
SalePayBackRateDtlList
|
||||
},
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
activeTab:'paybackRate',
|
||||
queryInfo:null,
|
||||
queryType:null,
|
||||
showDtlList:false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handleTabsClick(){
|
||||
|
||||
},
|
||||
onSelect(item) {
|
||||
console.log("===onSelect===1111=>",item)
|
||||
this.showDtlList=true;
|
||||
this.queryType=1;
|
||||
this.queryInfo=item;
|
||||
this.activeTab="dtlList";
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .el-tabs__nav{
|
||||
display: flex !important;
|
||||
flex-wrap: wrap !important;
|
||||
} */
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user