parent
f61c805f05
commit
245d9e9f82
@ -0,0 +1,17 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
export function planToFundlog (params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/chart/plan-to-fundlog',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function departmentMoney (params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/chart/department-money',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,276 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 0 20px">
|
||||||
|
<lx-header
|
||||||
|
icon="md-apps"
|
||||||
|
text="部门预算执行情况"
|
||||||
|
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
|
||||||
|
>
|
||||||
|
<div slot="content"></div>
|
||||||
|
<slot>
|
||||||
|
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
|
||||||
|
<span>
|
||||||
|
<Input
|
||||||
|
v-model="select.keyword"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
style="width: 180px"
|
||||||
|
></Input>
|
||||||
|
</span>
|
||||||
|
<Button type="primary" style="margin-left: 10px" ghost @click=""
|
||||||
|
>重置</Button
|
||||||
|
>
|
||||||
|
<Button type="primary" style="margin-left: 10px" @click="getList"
|
||||||
|
>查询</Button
|
||||||
|
>
|
||||||
|
</slot>
|
||||||
|
</lx-header>
|
||||||
|
|
||||||
|
<xy-table :list="list" :table-item="table">
|
||||||
|
<template #btns> </template>
|
||||||
|
</xy-table>
|
||||||
|
|
||||||
|
<!-- <div style="display: flex; justify-content: flex-end; margin-top: 10px">-->
|
||||||
|
<!-- <Page-->
|
||||||
|
<!-- :total="total"-->
|
||||||
|
<!-- show-elevator-->
|
||||||
|
<!-- @on-change="-->
|
||||||
|
<!-- (e) => {-->
|
||||||
|
<!-- select.page = e;-->
|
||||||
|
<!-- getList();-->
|
||||||
|
<!-- }-->
|
||||||
|
<!-- "-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { departmentMoney } from "@/api/static";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
select: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
keyword: "",
|
||||||
|
is_auth: 1,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
table: [
|
||||||
|
{
|
||||||
|
label: '项目',
|
||||||
|
fixed: 'left',
|
||||||
|
prop: 'department.name',
|
||||||
|
minWidth: 200,
|
||||||
|
sortable: false,
|
||||||
|
customFn:row => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-tooltip class="item" effect="dark" content={row.department.name} placement="top">
|
||||||
|
<p class="split split__department">{row.department.name}</p>
|
||||||
|
</el-tooltip>
|
||||||
|
{
|
||||||
|
row.plan?.map(i => {
|
||||||
|
return (
|
||||||
|
<el-tooltip class="item" effect="dark" content={i.name} placement="top">
|
||||||
|
<p class="split">{i.name}</p>
|
||||||
|
</el-tooltip>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '下达预算',
|
||||||
|
Fprop: '',
|
||||||
|
multiHd: [
|
||||||
|
{
|
||||||
|
sortable: false,
|
||||||
|
prop: 'plan.money',
|
||||||
|
label: '合计',
|
||||||
|
width: 160,
|
||||||
|
customFn: row => {
|
||||||
|
return (
|
||||||
|
<div style="display: flex;flex-direction: column;">
|
||||||
|
<p class="split split__department" style="text-align: right;">{
|
||||||
|
row.plan?.reduce((a, b) => {
|
||||||
|
return parseInt(a) + parseInt(b.money)
|
||||||
|
},0)
|
||||||
|
}</p>
|
||||||
|
{
|
||||||
|
row.plan?.map(i => {
|
||||||
|
return (
|
||||||
|
<p class="split" style="text-align: right;">{ i.money }</p>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...(() => {
|
||||||
|
let labels = new Map([
|
||||||
|
[0, '第一季度'],
|
||||||
|
[1, '第二季度'],
|
||||||
|
[3, '第三季度'],
|
||||||
|
[4, '10月'],
|
||||||
|
[5, '11月'],
|
||||||
|
[6, '12月']
|
||||||
|
])
|
||||||
|
let arr = []
|
||||||
|
for (let z = 0;z < 6;z ++) {
|
||||||
|
arr.push({
|
||||||
|
label: labels.get(z),
|
||||||
|
Fprop: '',
|
||||||
|
multiHd: [
|
||||||
|
{
|
||||||
|
label: '计划支出',
|
||||||
|
sortable: false,
|
||||||
|
width: 160,
|
||||||
|
customFn: row => {
|
||||||
|
return (
|
||||||
|
<div style="display: flex;flex-direction: column;">
|
||||||
|
<p class="split split__department" style="text-align: right;">{
|
||||||
|
row.plan?.reduce((a, b) => {
|
||||||
|
return parseInt(a) + parseInt(b.detail[z].plan_total)
|
||||||
|
},0)
|
||||||
|
}</p>
|
||||||
|
{
|
||||||
|
row.plan?.map(i => {
|
||||||
|
return (
|
||||||
|
<p class="split" style="text-align: right;">{ i.detail[z].plan_total }</p>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '实际支出',
|
||||||
|
sortable: false,
|
||||||
|
width: 160,
|
||||||
|
customFn: row => {
|
||||||
|
return (
|
||||||
|
<div style="display: flex;flex-direction: column;">
|
||||||
|
<p class="split split__department" style="text-align: right;">{
|
||||||
|
row.plan?.reduce((a, b) => {
|
||||||
|
return parseInt(a) + parseInt(b.detail[z].act_total)
|
||||||
|
},0)
|
||||||
|
}</p>
|
||||||
|
{
|
||||||
|
row.plan?.map(i => {
|
||||||
|
return (
|
||||||
|
<p class="split" style="text-align: right;">{ i.detail[z].act_total }</p>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '执行率',
|
||||||
|
sortable: false,
|
||||||
|
width: 160,
|
||||||
|
customFn: row => {
|
||||||
|
return (
|
||||||
|
<div style="display: flex;flex-direction: column;">
|
||||||
|
<p class="split split__department" style="text-align: right;">{
|
||||||
|
this.percent(row.plan?.reduce((a, b) => {
|
||||||
|
return parseInt(a) + parseInt(b.detail[z].act_total)
|
||||||
|
},0),row.plan?.reduce((a, b) => {
|
||||||
|
return parseInt(a) + parseInt(b.detail[z].plan_total)
|
||||||
|
},0))
|
||||||
|
}%</p>
|
||||||
|
{
|
||||||
|
row.plan?.map(i => {
|
||||||
|
return (
|
||||||
|
<p class="split" style="text-align: right;" style="text-align: right;">{ this.percent(i.detail[z].act_total,i.detail[z].plan_total) }%</p>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
})(),
|
||||||
|
{
|
||||||
|
label: '合计',
|
||||||
|
width: 120,
|
||||||
|
customFn: row => {
|
||||||
|
return (
|
||||||
|
<div style="display: flex;flex-direction: column;">
|
||||||
|
<p class="split split__department" style="text-align: right;">{
|
||||||
|
'/'
|
||||||
|
}</p>
|
||||||
|
{
|
||||||
|
row.plan?.map(i => {
|
||||||
|
return (
|
||||||
|
<p class="split" style="text-align: right;">{
|
||||||
|
i.detail?.reduce((a,b) => {
|
||||||
|
return a + parseInt(b.plan_total)
|
||||||
|
},0)
|
||||||
|
}</p>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
percent (a,b) {
|
||||||
|
if (b == 0) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return (parseInt(a) / parseInt(b) * 100).toFixed(2)
|
||||||
|
},
|
||||||
|
|
||||||
|
async getList() {
|
||||||
|
const res = await departmentMoney(this.select);
|
||||||
|
this.list = res;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
::v-deep .v-table .el-table__body td {
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
.split {
|
||||||
|
word-break: keep-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex: 1;
|
||||||
|
text-align: left;
|
||||||
|
border-top: 1px solid #EBEEF5;
|
||||||
|
|
||||||
|
padding: 5px 0;
|
||||||
|
|
||||||
|
&:nth-child(1) {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
&__department {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in new issue