资金来源

master
lion 8 months ago
parent 3804639567
commit f6280c8a9d

@ -54,14 +54,14 @@
{ {
prop: 'name', prop: 'name',
label: '人员', label: '人员',
width: 180, width: 120,
align: 'left' align: 'left'
}, },
{ {
prop: 'flow.title', prop: 'flow.title',
label: '流程名称', label: '流程名称',
minWidth: 180, minWidth: 240,
align: 'left' align: 'left'
}, },
{ {
@ -96,38 +96,7 @@
}; };
}, },
computed: { computed: {
spanMethods() {
const xingmingSpan = {};
const zijinSpan = {};
this.chuchaibaoxiaoDetailList.forEach((item, index) => {
const xingming = item.xingming_detail;
const zijin = item.zijinlaiyuan;
// xingming_detail
if (!xingmingSpan[xingming]) {
xingmingSpan[xingming] = {
count: 1,
index: index
};
} else {
xingmingSpan[xingming].count++;
}
// xingming_detail zijinlaiyuan
const combinedKey = `${xingming}-${zijin}`;
if (!zijinSpan[combinedKey]) {
zijinSpan[combinedKey] = {
count: 1,
index: index
};
} else {
zijinSpan[combinedKey].count++;
}
});
return {
xingmingSpan,
zijinSpan
};
}
}, },
methods: { methods: {
show() { show() {
@ -143,21 +112,6 @@
console.log("ids", ids); console.log("ids", ids);
this.getAway(ids); this.getAway(ids);
}, },
summary(param) {
const {
columns,
data
} = param;
return columns.map((column, index) => {
if (index === 0) {
return '合计';
} else {
return column.property === 'amt' ? (
data.reduce((pre, cur) => pre + (cur.amt ? Number(cur.amt) : 0), 0)
) : '';
}
});
},
async getAway(ids) { async getAway(ids) {
this.away_ids = ids; this.away_ids = ids;
let res = await getAwayDetails({ let res = await getAwayDetails({
@ -180,21 +134,24 @@
isSelect: false // isSelect: false //
}; };
const innerData = originalData[xingming_details]; const innerData = originalData[xingming_details];
for (const innerKey in innerData) { innerData.map(item=>{
const source = { item.isSelect = false
id: Math.random(), })
name: innerKey, person.children.push(...innerData)
children: innerData[innerKey].map((item) => ({ // const source = {
...item, // id: Math.random(),
name: item.xingming_detail, // name: '',
parent: source, // // children: innerData.map((item) => ({
isSelect: false // // ...item,
})), // name: item.xingming_detail,
parent: person, // // parent: source, //
isSelect: false // // isSelect: false //
}; // })),
person.children.push(source); // parent: person, //
} // isSelect: false //
// };
// person.children.push(source);
result.push(person); result.push(person);
} }
return result; return result;

@ -36,7 +36,7 @@
</div> --> </div> -->
<!-- 批次列表 @row-click="handleRowClick"--> <!-- 批次列表 @row-click="handleRowClick"-->
<xy-table ref="awayTable" row-key="id" default-expand-all <xy-table ref="awayTable" row-key="id" :default-expand-all="false"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :list="batchList" :table-item="table"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :list="batchList" :table-item="table">
<template #btns> </template> <template #btns> </template>
</xy-table> </xy-table>
@ -157,7 +157,8 @@
let arr = [] let arr = []
res.data.map(item=>{ res.data.map(item=>{
arr.push({ arr.push({
name:item.chuchai_detail.length>0?item.chuchai_detail[0].chuchai_pay.zijinlaiyuan:'', id:item.id,
xingming_detail:item.chuchai_detail.length>0?item.chuchai_detail[0].chuchai_pay.zijinlaiyuan:'',
children:item.chuchai_detail children:item.chuchai_detail
}) })
}) })

Loading…
Cancel
Save