diff --git a/src/api/paymentRegistration/fundLog.js b/src/api/paymentRegistration/fundLog.js
index d72110a..5dc315c 100644
--- a/src/api/paymentRegistration/fundLog.js
+++ b/src/api/paymentRegistration/fundLog.js
@@ -9,6 +9,15 @@ export function getFundLog(params,noloading = false){
})
}
+export function getPlanActLinks(params,noloading = false){
+ return request({
+ method:'get',
+ url:'/api/ht/plan/plan-act-links',
+ params,
+ noloading
+ })
+}
+
export function addFundLog(data){
return request({
method:'post',
diff --git a/src/views/statisticalReport/budgetProgress.vue b/src/views/statisticalReport/budgetProgress.vue
index 284204e..6da302e 100644
--- a/src/views/statisticalReport/budgetProgress.vue
+++ b/src/views/statisticalReport/budgetProgress.vue
@@ -51,6 +51,9 @@
+
+
+
@@ -70,8 +73,12 @@
import {
mergeTableRow
} from "@/utils/mergeTableRow"
-import { getFundLog } from "@/api/paymentRegistration/fundLog"
+import { getFundLog,getPlanActLinks } from "@/api/paymentRegistration/fundLog"
+import detail from "@/views/contract/components/detailContract";
export default {
+ components:{
+ detail
+ },
data() {
return {
types: [], //预算类型
@@ -179,12 +186,12 @@ import { getFundLog } from "@/api/paymentRegistration/fundLog"
['show']:async _ => {
try {
this.isLoadingFundLogTable = true
- const res = await getFundLog({
+ const res = await getPlanActLinks({
page: 1,
page_size: 999,
- act_plan_link_id: row.id,
+ plan_id: row.id,
},true)
- this.fundLogs = res.data
+ this.fundLogs = res.list.data
this.isLoadingFundLogTable = false
} catch (e) {
this.isLoadingFundLogTable = false
@@ -194,106 +201,160 @@ import { getFundLog } from "@/api/paymentRegistration/fundLog"
h('span',row.contract?.name)
- },
- {
- title: "付款申请金额(元)",
- prop: "apply_money",
- align: "right",
- width: 170,
- render:(h, { row }) => h('span',Number(row.apply_money)
- .toFixed(2)
- .replace(/(\d)(?=(\d{3})+\.)/g, "$1,"))
},
{
- title: "实际付款金额(元)",
- key: "act_money",
+ title: "支出金额(元)",
+ prop: "use_money",
align: "right",
width: 170,
- render:(h, { row }) => h('span',Number(row.act_money)
+ render:(h, { row }) => h('span',Number(row.use_money)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,"))
},
{
- title: "预算计划",
- width: 320,
+ title: "事由/备注",
+ width: 200,
+ key: "model.reason",
align: "left",
render:(h, { row }) => {
- if (row.act_plan_link.length > 0) {
- return h('div',row.act_plan_link.map(item => (
- {" "}
- [{item.plan.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan.name}
[使用金额]{" "}
- {item.use_money}元{" "}
- )))
+ if (row.model.reason) {
+ return h('div',row.model.reason)
+ }
+ if (row.model.remark) {
+ return h('div',row.model.remark)
}
}
},
+
{
- title: "款项类型",
- key: "type",
+ title: "关联合同",
width: 120,
- },
- {
- key: "status",
- title: "状态",
- width: 100,
- render:(h, { row }) => h('span',row.status ? "已审核" : "待审核")
- },
- {
- key: 'flow_status',
- title: '流程状态',
- width: 100,
+ key: "model.contract_id",
+ align: "center",
render:(h, { row }) => {
- let map = new Map([
- [1,'待申请'],
- [2,'流转中'],
- [3,'已完成']
- ])
- return h('span',map.get(row.flow_status))
- }
- },
- {
- title: "次数",
- key: "pay_count",
- width: 95,
- render:(h , { row }) => {
- let val = row.pay_count + 1
- return h('span',val)
+ if(row.model.contract_id){
+ return h('div',{
+ style: {
+ color: '#409EFF', // 蓝色文字
+ cursor: 'pointer', // 手型光标
+ textDecoration: 'underline', // 下划线
+ fontWeight: 'bold', // 加粗
+ padding: '4px 8px', // 内边距
+ borderRadius: '4px', // 圆角
+ },
+ on: {
+ click: () => {
+ console.log('查看点击事件触发', row.model.contract_id);
+ this.$refs['detailContract'].getDetail(row.model.contract_id),
+ this.$refs['detailContract'].isShowDetail = true
+ }
+ }
+ },'查看')
+ }
}
},
- {
- title: "最后一笔",
- key: "is_end",
- width: 125,
- render: (h, { row }) => h('span',row.is_end ? "是" : "否")
- },
- {
- title: "经办人",
- minWidth: 120,
- key: "admin.name",
- align: "center",
- render: (h, { row }) => h('span',row.admin?.name)
- },
- {
- title: "业务科室",
- minWidth: 140,
- key: "department.name",
- align: "center",
- render: (h, { row }) => h('span',row.department?.name)
- },
- {
- title: "备注",
- minWidth: 360,
- key: "remark",
- align: "left",
- },
+ //
+ // {
+ // title: "实际付款金额(元)",
+ // key: "act_money",
+ // align: "right",
+ // width: 170,
+ // render:(h, { row }) => h('span',Number(row.act_money)
+ // .toFixed(2)
+ // .replace(/(\d)(?=(\d{3})+\.)/g, "$1,"))
+ // },
+ // {
+ // title: "预算计划",
+ // width: 320,
+ // align: "left",
+ // render:(h, { row }) => {
+ // if (row.act_plan_link.length > 0) {
+ // return h('div',row.act_plan_link.map(item => (
+ // {" "}
+ // [{item.plan.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan.name}
[使用金额]{" "}
+ // {item.use_money}元{" "}
+ // )))
+ // }
+ // }
+ // },
+ // {
+ // title: "款项类型",
+ // key: "type",
+ // width: 120,
+ // },
+ // {
+ // key: "status",
+ // title: "状态",
+ // width: 100,
+ // render:(h, { row }) => h('span',row.status ? "已审核" : "待审核")
+ // },
+ // {
+ // key: 'flow_status',
+ // title: '流程状态',
+ // width: 100,
+ // render:(h, { row }) => {
+ // let map = new Map([
+ // [1,'待申请'],
+ // [2,'流转中'],
+ // [3,'已完成']
+ // ])
+ // return h('span',map.get(row.flow_status))
+ // }
+ // },
+ // {
+ // title: "次数",
+ // key: "pay_count",
+ // width: 95,
+ // render:(h , { row }) => {
+ // let val = row.pay_count + 1
+ // return h('span',val)
+ // }
+ // },
+ // {
+ // title: "最后一笔",
+ // key: "is_end",
+ // width: 125,
+ // render: (h, { row }) => h('span',row.is_end ? "是" : "否")
+ // },
+ // {
+ // title: "经办人",
+ // minWidth: 120,
+ // key: "admin.name",
+ // align: "center",
+ // render: (h, { row }) => h('span',row.admin?.name)
+ // },
+ // {
+ // title: "业务科室",
+ // minWidth: 140,
+ // key: "department.name",
+ // align: "center",
+ // render: (h, { row }) => h('span',row.department?.name)
+ // },
+ // {
+ // title: "备注",
+ // minWidth: 360,
+ // key: "remark",
+ // align: "left",
+ // },
{
title: "创建信息",
key: "created_at",
@@ -331,6 +392,50 @@ import { getFundLog } from "@/api/paymentRegistration/fundLog"
}
return per;
},
+ handleSummary({ columns, data }){
+ console.log("data",data)
+ const sums = {};
+ columns.forEach((column, index) => {
+ const key = column.key;
+ if (index === 0) {
+ sums[key] = {
+ key,
+ value: '合计'
+ };
+ return;
+ }
+ const values = data.map(item => Number(item['use_money']));
+ if (!values.every(value => isNaN(value))) {
+ const v = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0);
+ if(index===1){
+ sums[key] = {
+ key,
+ value: v + ' 元'
+ };
+ }else{
+ sums[key] = {
+ key,
+ value: ''
+ };
+ }
+
+ } else {
+ sums[key] = {
+ key,
+ value: ''
+ };
+ }
+ });
+
+ return sums
+ },
//统计
summary(param) {
this.$nextTick(() => {