|
|
|
|
@ -80,7 +80,12 @@
|
|
|
|
|
</slot>
|
|
|
|
|
</lx-header>
|
|
|
|
|
|
|
|
|
|
<xy-table :list="list" :table-item="table">
|
|
|
|
|
<xy-table :list="list"
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:table-item="table"
|
|
|
|
|
:show-summary="true"
|
|
|
|
|
:summary-method="summaryMethod"
|
|
|
|
|
@select="tableSelect" @select-all="tableSelect">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="操作"
|
|
|
|
|
@ -223,6 +228,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
selections: [],
|
|
|
|
|
select: {
|
|
|
|
|
plan_id: "",
|
|
|
|
|
plan_name: "",
|
|
|
|
|
@ -278,6 +284,13 @@ export default {
|
|
|
|
|
is_auth: 1,
|
|
|
|
|
status: "",
|
|
|
|
|
table: [
|
|
|
|
|
{
|
|
|
|
|
prop: 'summary',
|
|
|
|
|
type: 'selection',
|
|
|
|
|
width: 55,
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
reserveSelection: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "项目名称",
|
|
|
|
|
minWidth: 250,
|
|
|
|
|
@ -308,9 +321,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "款项类型",
|
|
|
|
|
prop: "type",
|
|
|
|
|
width: 120,
|
|
|
|
|
label: "备注",
|
|
|
|
|
minWidth: 460,
|
|
|
|
|
prop: "remark",
|
|
|
|
|
align: "left",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "预算计划",
|
|
|
|
|
@ -333,22 +347,35 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: "status",
|
|
|
|
|
label: "状态",
|
|
|
|
|
label: "业务科室",
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
prop: "department.name",
|
|
|
|
|
align: "center",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "经办人",
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
prop: "admin.name",
|
|
|
|
|
align: "center",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '付款日期',
|
|
|
|
|
prop: 'act_date',
|
|
|
|
|
width: 120,
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
if (value === 0) return "待审核";
|
|
|
|
|
else return "已审核";
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "次数",
|
|
|
|
|
prop: "pay_count",
|
|
|
|
|
width: 95,
|
|
|
|
|
label: "创建信息",
|
|
|
|
|
prop: "created_at",
|
|
|
|
|
width: 160,
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value + 1;
|
|
|
|
|
return parseTime(new Date(value), "{y}-{m}-{d}");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "款项类型",
|
|
|
|
|
prop: "type",
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "是否为最后一笔",
|
|
|
|
|
prop: "is_end",
|
|
|
|
|
@ -358,35 +385,51 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "经办人",
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
prop: "admin.name",
|
|
|
|
|
align: "center",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "业务科室",
|
|
|
|
|
minWidth: 160,
|
|
|
|
|
prop: "department.name",
|
|
|
|
|
align: "center",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "备注",
|
|
|
|
|
minWidth: 460,
|
|
|
|
|
prop: "remark",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "次数",
|
|
|
|
|
prop: "pay_count",
|
|
|
|
|
width: 95,
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value + 1;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "创建信息",
|
|
|
|
|
prop: "created_at",
|
|
|
|
|
width: 160,
|
|
|
|
|
prop: "status",
|
|
|
|
|
label: "状态",
|
|
|
|
|
width: 120,
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return parseTime(new Date(value), "{y}-{m}-{d}");
|
|
|
|
|
if (value === 0) return "待审核";
|
|
|
|
|
else return "已审核";
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
summaryMethod ({columns,data}) {
|
|
|
|
|
const fn = (prop) => this.selections.reduce((pre,cur) => pre + Number(cur[prop]),0).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
|
|
|
|
|
return columns.map((column, index) => {
|
|
|
|
|
if (index === 0) {
|
|
|
|
|
return '统计'
|
|
|
|
|
}
|
|
|
|
|
else if (column.property === 'apply_money') {
|
|
|
|
|
return fn(column.property)
|
|
|
|
|
}
|
|
|
|
|
else if (column.property === 'act_money') {
|
|
|
|
|
return fn(column.property)
|
|
|
|
|
}
|
|
|
|
|
else if (column.property === 'pay_count') {
|
|
|
|
|
return this.selections.reduce((pre,cur) => pre + Number(cur[column.property]),0) + this.selections.length
|
|
|
|
|
} else {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
tableSelect (selections) {
|
|
|
|
|
console.log(selections)
|
|
|
|
|
this.selections = selections;
|
|
|
|
|
this.list = [...this.list]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
toExport() {
|
|
|
|
|
this.is_export = 1;
|
|
|
|
|
this.getFundLogs(true);
|
|
|
|
|
|