|
|
|
|
@ -54,14 +54,14 @@
|
|
|
|
|
{
|
|
|
|
|
prop: 'name',
|
|
|
|
|
label: '人员',
|
|
|
|
|
width: 180,
|
|
|
|
|
width: 120,
|
|
|
|
|
align: 'left'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
prop: 'flow.title',
|
|
|
|
|
label: '流程名称',
|
|
|
|
|
minWidth: 180,
|
|
|
|
|
minWidth: 240,
|
|
|
|
|
align: 'left'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -96,38 +96,7 @@
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
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: {
|
|
|
|
|
show() {
|
|
|
|
|
@ -143,21 +112,6 @@
|
|
|
|
|
console.log("ids", 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) {
|
|
|
|
|
this.away_ids = ids;
|
|
|
|
|
let res = await getAwayDetails({
|
|
|
|
|
@ -179,22 +133,25 @@
|
|
|
|
|
parent: null, // 添加父级字段
|
|
|
|
|
isSelect: false // 添加选中状态字段
|
|
|
|
|
};
|
|
|
|
|
const innerData = originalData[xingming_details];
|
|
|
|
|
for (const innerKey in innerData) {
|
|
|
|
|
const source = {
|
|
|
|
|
id: Math.random(),
|
|
|
|
|
name: innerKey,
|
|
|
|
|
children: innerData[innerKey].map((item) => ({
|
|
|
|
|
...item,
|
|
|
|
|
name: item.xingming_detail,
|
|
|
|
|
parent: source, // 指向当前父级
|
|
|
|
|
isSelect: false // 添加选中状态字段
|
|
|
|
|
})),
|
|
|
|
|
parent: person, // 指向当前父级
|
|
|
|
|
isSelect: false // 添加选中状态字段
|
|
|
|
|
};
|
|
|
|
|
person.children.push(source);
|
|
|
|
|
}
|
|
|
|
|
const innerData = originalData[xingming_details];
|
|
|
|
|
innerData.map(item=>{
|
|
|
|
|
item.isSelect = false
|
|
|
|
|
})
|
|
|
|
|
person.children.push(...innerData)
|
|
|
|
|
// const source = {
|
|
|
|
|
// id: Math.random(),
|
|
|
|
|
// name: '',
|
|
|
|
|
// children: innerData.map((item) => ({
|
|
|
|
|
// ...item,
|
|
|
|
|
// name: item.xingming_detail,
|
|
|
|
|
// parent: source, // 指向当前父级
|
|
|
|
|
// isSelect: false // 添加选中状态字段
|
|
|
|
|
// })),
|
|
|
|
|
// parent: person, // 指向当前父级
|
|
|
|
|
// isSelect: false // 添加选中状态字段
|
|
|
|
|
// };
|
|
|
|
|
// person.children.push(source);
|
|
|
|
|
|
|
|
|
|
result.push(person);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
|