md
This commit is contained in:
parent
f822e0ded1
commit
2c9a6b4928
537
src/views/emis/emisSettleBill/PayBackStat/PayBackStatQuery.vue
Normal file
537
src/views/emis/emisSettleBill/PayBackStat/PayBackStatQuery.vue
Normal file
@ -0,0 +1,537 @@
|
||||
<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="queryCode" 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.queryCode"
|
||||
: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="$t('回款联系人')" prop="payee" label-width="100px">
|
||||
<PayeePicker :placeholder="$t('回款联系人')" v-model="queryParams.payee" ></PayeePicker>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('销售联系人')" prop="salesmen" label-width="100px">
|
||||
<SalemanPicker :placeholder="$t('销售联系人')" v-model="queryParams.salesmen" ></SalemanPicker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="账单月份" prop="billMonth">
|
||||
<el-date-picker size="mini" style="width:100%" v-model="queryParams.billMonth" type="month" 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-col>
|
||||
</el-row>
|
||||
</SearchForm>
|
||||
<!-- slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight-100)+'px'" -->
|
||||
|
||||
<div slot="pageContent">
|
||||
<xd-table
|
||||
height="calc(100vh - 20rem)"
|
||||
|
||||
ref="refTable"
|
||||
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
|
||||
storageName="PayBackStatList_main_240702"
|
||||
|
||||
:data="emisStatList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
|
||||
@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="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="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="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="paymentDueDate" min-width="170" />
|
||||
<el-table-column :label="$t('支付方式')" align="center" prop="chargeStatus" 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="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="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="recMoney" width="150" />
|
||||
<el-table-column :label="$t('账期内收款金额(100%)')" align="center" prop="recdMoneyIn" width="180" />
|
||||
<el-table-column :label="$t('超期收款金额(70%)')" align="center" prop="recdPayMoney60D" width="150" />
|
||||
<el-table-column :label="$t('逾期已收金额(60天)')" align="center" prop="recdPayMoneyGreat60D" width="150" />
|
||||
<el-table-column :label="$t('未收款金额')" align="center" prop="noRecMoney" width="150" />
|
||||
|
||||
<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 { queryBillPayStatInfoList,queryPayBackStatList } from "@/api/emis/emisSettleBill";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import AllMonthpayAccountPicker from '@/views/emis/EmisBaseTools/AllMonthpayAccountPicker.vue';
|
||||
|
||||
import PayeePicker from '@/views/emis/EmisBaseTools/PayeePicker.vue';
|
||||
import SalemanPicker from '@/views/emis/EmisBaseTools/SalemanPicker.vue';
|
||||
|
||||
export default {
|
||||
name: "BillPaybackSumQuery",
|
||||
components: { PayeePicker,SalemanPicker,elDateAdvPicker,AllMonthpayAccountPicker},
|
||||
dicts: ['emis_scan_type'],
|
||||
data() {
|
||||
return {
|
||||
// 调整表格的高度,不允许滚动
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
recordTotal:0,
|
||||
// 网点电子面单申请表格数据
|
||||
emisStatList: [],
|
||||
emisStatRecordList:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
activeName: 'first',
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
queryOrderType:"1",
|
||||
|
||||
titleEmisElectronicPagApply: "",
|
||||
openEmisElectronicPagApply: false,
|
||||
|
||||
// 显示编辑框更多
|
||||
moreInputVisible: false,
|
||||
|
||||
dataMap:new Map(),
|
||||
|
||||
// 弹出展示层
|
||||
currentId:null,
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 备注时间范围
|
||||
daterangeApplyDate: [],
|
||||
// 备注时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 备注时间范围
|
||||
daterangeUpdateTime: [],
|
||||
|
||||
tempQueryParams:null,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum:1,
|
||||
pageSize:500,
|
||||
queryCode:null,
|
||||
settleBillNo: null,
|
||||
settleType: null,
|
||||
billMonth: null,
|
||||
custNo: null,
|
||||
openBillStatus: null,
|
||||
paymentStatus: null,
|
||||
chargeStatus: null,
|
||||
payee: null,
|
||||
salesmen: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询统计信息 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.tempQueryParams = {...this.queryParams};
|
||||
queryPayBackStatList(this.tempQueryParams).then(response => {
|
||||
this.emisStatList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleQuery(){
|
||||
this.getList();
|
||||
},
|
||||
/** 查询明细列表 */
|
||||
onDblClick(row, column, event) {
|
||||
// this.loading = true;
|
||||
console.log("===>onDblClick====>",row);
|
||||
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.queryParams};
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=5000;
|
||||
|
||||
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 === 'kjlx') {
|
||||
// return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
|
||||
// }
|
||||
// if (j === 'fjr') {
|
||||
// return v['sendName']+'--'+v['receiveName'];
|
||||
// }
|
||||
// if (j === 'sendMobile') {
|
||||
// return "";
|
||||
// }
|
||||
// if (j === 'paymentStatus') {
|
||||
// return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
|
||||
// }
|
||||
|
||||
// if (j === 'pickupMethod') {
|
||||
// return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
|
||||
// }
|
||||
// if (j === 'customsEclaration') {
|
||||
// return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
|
||||
// }
|
||||
// if (j === 'customsClear') {
|
||||
// return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
|
||||
// }
|
||||
// if (j === 'packType') {
|
||||
// return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
|
||||
// }
|
||||
|
||||
// if (j === 'dispatchMethod') {
|
||||
// if(v[j] == 1){
|
||||
// return '派送';
|
||||
// }else{
|
||||
// return '自提';
|
||||
// }
|
||||
// }
|
||||
// if (j === '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]
|
||||
}))
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</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>
|
||||
68
src/views/emis/emisSettleBill/PayBackStat/PayBackStatTab.vue
Normal file
68
src/views/emis/emisSettleBill/PayBackStat/PayBackStatTab.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<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="payback" >
|
||||
<PayBackStatQuery @onSelect="onSelect"> </PayBackStatQuery>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="明细列表" v-if="showDtlList" name="dtlList" >
|
||||
<BillPaybackBillList :queryType="queryType" :queryInfo="queryInfo"></BillPaybackBillList>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import PayBackStatQuery from '@/views/emis/emisSettleBill/PayBackStat/PayBackStatQuery.vue';
|
||||
|
||||
import BillPaybackBillList from '@/views/emis/emisSettleBill/BillPaybackBillList.vue';
|
||||
|
||||
export default {
|
||||
name: "BillPaybackSumList",
|
||||
components: {
|
||||
PayBackStatQuery,
|
||||
BillPaybackBillList
|
||||
},
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
activeTab:'payback',
|
||||
queryInfo:null,
|
||||
queryType:null,
|
||||
showDtlList:false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handleTabsClick(){
|
||||
|
||||
},
|
||||
onSelect(item) {
|
||||
// console.log("===onSelect===1111=>",item)
|
||||
this.queryType=1;
|
||||
this.queryInfo=item;
|
||||
this.activeTab="warningList";
|
||||
},
|
||||
onSelectOpenBill(item) {
|
||||
// console.log("===onSelect===2222=>",item)
|
||||
this.queryType=2;
|
||||
this.queryInfo=item;
|
||||
this.activeTab="warningList";
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .el-tabs__nav{
|
||||
display: flex !important;
|
||||
flex-wrap: wrap !important;
|
||||
} */
|
||||
|
||||
</style>
|
||||
541
src/views/emis/emisSettleBill/PayBackStat/PayBackSubBillList.vue
Normal file
541
src/views/emis/emisSettleBill/PayBackStat/PayBackSubBillList.vue
Normal file
@ -0,0 +1,541 @@
|
||||
<template>
|
||||
<XdPageContainer >
|
||||
<div slot="pageContent" style="height:calc(100vh - 3rem)">
|
||||
<XdTable
|
||||
slot="pageContent"
|
||||
|
||||
height="calc(100vh - 20rem)"
|
||||
|
||||
v-loading="loading"
|
||||
border stripe
|
||||
size="mini"
|
||||
|
||||
ref="refTable"
|
||||
|
||||
storageName="waringEmisSettleBillList_custbill_query_main"
|
||||
:data="emisSettleBillList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
|
||||
<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="settleBillName" 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="billMonth" width="80" />
|
||||
<el-table-column :label="$t('账单期间')" align="center" prop="billMonthRange" width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div >{{scope.row.settleStartDate}}~{{scope.row.settleEndDate}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('收款状态')" align="center" prop="paymentStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='1'" type="success">已收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('开票状态')" align="center" prop="openBillStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.openBillStatus=='0'" type="error">未开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='1'" type="success">已开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='2'" type="warning">部分开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='3'" type="warning">不开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='4'" type="success">已完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('核销状态')" align="center" prop="chargeStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.chargeStatus=='0'" type="error">未核销</el-tag>
|
||||
<el-tag v-if="scope.row.chargeStatus=='1'" type="success">已核销</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('月结客户')" align="center" prop="custName" min-width="150" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span type="normal">{{ scope.row.custName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('总票数')" align="center" prop="sendPieceSum" width="80" />
|
||||
<el-table-column :label="$t('总件数')" align="center" prop="pieceNumber" width="80" />
|
||||
<el-table-column :label="$t('结算重量')" align="center" prop="feeWeight" width="80" />
|
||||
<el-table-column :label="$t('账单应收金额')" align="center" prop="recMoney" width="150" />
|
||||
<el-table-column :label="$t('账单已收金额')" align="center" prop="recedMoney" width="150" />
|
||||
<el-table-column :label="$t('账单退款金额')" align="center" prop="refundMoney" width="150" />
|
||||
<el-table-column :label="$t('理赔金额')" align="center" prop="satisfyMoney" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('折让金额')" align="center" prop="allowanceMoney" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('抵扣金额')" align="center" prop="deductionMoney" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('其他收费')" align="center" prop="otherMoney" width="80" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column :label="$t('理赔原因')" align="center" prop="satisfyMoney" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('折让原因')" align="center" prop="allowanceReason" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('抵扣原因')" align="center" prop="deductionReason" width="100" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('其他原因')" align="center" prop="otherReason" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('回款联系人')" align="center" prop="payee" width="100" />
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" width="100" />
|
||||
|
||||
<el-table-column :label="$t('账期(天)')" align="center" prop="creditPeriod" min-width="100" />
|
||||
<el-table-column :label="$t('账单日')" align="center" prop="settleDay" min-width="100" />
|
||||
<el-table-column :label="$t('最后回款日')" align="center" prop="paymentDueDate" min-width="170" />
|
||||
|
||||
|
||||
<el-table-column :label="$t('账单生成时间')" align="center" prop="createTime" width="170" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column :label="$t('业务确认状态')" align="center" prop="blConfirmSite" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.blConfirmSite=='0'" >未确认</span>
|
||||
<el-tag v-if="scope.row.blConfirmSite=='1'" type="success">已确认</el-tag>
|
||||
<el-tag v-if="scope.row.blConfirmSite=='2'" type="error">确认不出账</el-tag>
|
||||
<el-tag v-if="scope.row.blConfirmSite=='3'" type="error">账单异常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('业务确认时间')" align="center" prop="confirmSiteDate" min-width="170" />
|
||||
<el-table-column :label="$t('业务确认人')" align="center" prop="confirmSiteManName" min-width="100" />
|
||||
<el-table-column :label="$t('业务备注')" align="center" prop="confirmSiteNote" min-width="100" />
|
||||
|
||||
<el-table-column label="创建人" align="center" prop="createByName" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="创建网点" align="center" prop="createSiteName" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="170"/>
|
||||
<el-table-column label="修改人" align="center" prop="updateByName" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="修改网点" align="center" prop="updateSiteName" width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="修改时间" align="center" prop="updateTime" width="170"/>
|
||||
|
||||
</XdTable>
|
||||
|
||||
</div>
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisSettleBill } from "@/api/emis/emisSettleBill";
|
||||
|
||||
|
||||
export default {
|
||||
name: "EmisSettleBillQuery",
|
||||
props:{
|
||||
queryInfo:{
|
||||
type:Object
|
||||
},
|
||||
queryType:{
|
||||
type:Number
|
||||
}
|
||||
|
||||
},
|
||||
components: { },
|
||||
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
||||
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
||||
'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status','emis_tab_dispatch_mode'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 结算总账单表格数据
|
||||
emisSettleBillList: [],
|
||||
selectList: [],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
subBillTotal: 0,
|
||||
// 结算子账单表格数据
|
||||
emisSettleSubBillList: [],
|
||||
|
||||
currentSettleBillNo:null,
|
||||
|
||||
queryOrderType:null,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 更新站点时间范围
|
||||
daterangeSettleStartDate: [],
|
||||
// 更新站点时间范围
|
||||
daterangeSettleEndDate: [],
|
||||
// 更新站点时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 更新站点时间范围
|
||||
daterangeUpdateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 500,
|
||||
|
||||
billMonth: null,
|
||||
custNo: null,
|
||||
openBillStatus: null,
|
||||
paymentStatus: null,
|
||||
chargeStatus: null,
|
||||
|
||||
payee: null,
|
||||
salesmen: null,
|
||||
|
||||
params:{
|
||||
noPayBill:null,
|
||||
canOpenBill:null
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"queryInfo": {
|
||||
handler (newValue, oldValue) {
|
||||
console.log("====>queryInfo====>",this.queryInfo);
|
||||
this.getList();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
/** 查询结算总账单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.emisSettleBillList=[];
|
||||
console.log("====>queryInfo====>",this.queryInfo);
|
||||
this.queryParams.salesmen=this.queryInfo.salesmen;
|
||||
this.queryParams.billMonth=this.queryInfo.billMonth;
|
||||
if(this.queryType==1){
|
||||
this.queryParams.params.noPayBill=1;
|
||||
this.queryParams.params.canOpenBill=null;
|
||||
this.queryParams.openBillStatus=null;
|
||||
}
|
||||
else if(this.queryType==2){
|
||||
this.queryParams.params.noPayBill=null;
|
||||
this.queryParams.params.canOpenBill=1;
|
||||
this.queryParams.openBillStatus=0;
|
||||
}
|
||||
|
||||
listEmisSettleBill(this.queryParams).then(response => {
|
||||
this.emisSettleBillList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
handleSendDbClick(row){
|
||||
this.$emit("onSelect",row);
|
||||
},
|
||||
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (
|
||||
column.property === 'sendPieceSum'
|
||||
) {
|
||||
const values = data.map(item => Number(item.sendPieceSum));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0); //保留0位小数
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'pieceNumber'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.pieceNumber));
|
||||
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(0); //保留0位小数
|
||||
}
|
||||
else if (
|
||||
column.property === 'feeWeight'
|
||||
|
||||
) {
|
||||
const values = data.map(item => Number(item.feeWeight));
|
||||
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
|
||||
else if (
|
||||
column.property === 'recMoney'
|
||||
) {
|
||||
const values = data.map(item => Number(item.recMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
else if(
|
||||
column.property === 'recedMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.recedMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
else if(
|
||||
column.property === 'refundMoney'
|
||||
){
|
||||
const values = data.map(item => Number(item.refundMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留2位小数
|
||||
}
|
||||
});
|
||||
console.log(sums);
|
||||
return sums
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
||||
this.selectList=selection;
|
||||
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
if(selection&&selection.length>0){
|
||||
this.currentSettleBillNo=selection[0].settleBillNo;
|
||||
}
|
||||
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
|
||||
let qExportParam={...this.queryParams};
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
|
||||
listEmisSettleBill(qExportParam).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.exportData(response.rows,loadingInstance);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
exportData(selData,loadingInstance){
|
||||
const curList =selData
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam=this.$refs.refTable.getExportParam();
|
||||
const tHeader = exportParam.header;
|
||||
const filterVal = exportParam.filter;
|
||||
const data = this.formatJson(filterVal, curList, selData)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '账单列表',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'kjlx') {
|
||||
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
|
||||
}
|
||||
if (j === 'fjr') {
|
||||
return v['sendName']+'--'+v['receiveName'];
|
||||
}
|
||||
if (j === 'custName') {
|
||||
let paymentType=v['paymentType'];
|
||||
if(paymentType==2 || paymentType==4 || paymentType==5 ){
|
||||
return v['custName'];
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
if (j === 'sendMobile') {
|
||||
return "";
|
||||
}
|
||||
if (j === 'paymentStatus') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_status,v[j]);
|
||||
}
|
||||
|
||||
if (j === 'pickupMethod') {
|
||||
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v[j]);
|
||||
}
|
||||
if (j === 'customsEclaration') {
|
||||
return this.selectDictLabel(this.dict.type.emis_declare_mode,v[j]);
|
||||
}
|
||||
if (j === 'customsClear') {
|
||||
return this.selectDictLabel(this.dict.type.emis_customs_clear,v[j]);
|
||||
}
|
||||
if (j === 'packType') {
|
||||
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v[j]);
|
||||
}
|
||||
if (j === '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 if(v[j] == 4){
|
||||
return '已完成';
|
||||
}
|
||||
else{
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
if (j === 'chargeStatus') {
|
||||
if(v[j] == 0){
|
||||
return '未核销';
|
||||
}else{
|
||||
return '已核销';
|
||||
}
|
||||
}
|
||||
if (j === 'paymentType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-divider{
|
||||
margin-top: 0px;
|
||||
background: 0 0;
|
||||
border-top: 1px solid #E6EBF5;
|
||||
}
|
||||
.el-divider__text {
|
||||
color: #0955ee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.query-label {
|
||||
.el-radio{
|
||||
display: block;
|
||||
line-height: 23px;
|
||||
white-space: normal;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user