刘翔宇-旅管家 3 years ago
parent 50e16811e8
commit b876705ec7

@ -65,16 +65,27 @@
<Page :total="total" show-elevator @on-change="pageChange" />
</div>
</div>
<div class="demo-split">
<Split v-model="split" style="height: 440px;">
<template #left>
<div class="demo-split">
<block v-for="(sitem,index) in this.typeList">
<Split v-model="split" style="height: 580px;">
<template #left>
<div class="demo-split-pane" style="padding-right: 5px;">
<div ref="lxHeader" v-if="statistic.departmentList">
<LxHeader icon="md-apps" text="科室进展情况" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content" />
<div ref="lxHeader" v-if="sitem[0]">
<LxHeader icon="md-apps" :text="sitem[0].type_text" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content" >
<xy-table :height="120" :list="[sitem[0]]" :table-item="typeTable">
<template v-slot:btns>
<el-table-column :width="10" fixed="right" label="操作" header-align="center" align="center">
<template slot-scope="scope">
</template>
</el-table-column>
</template>
</xy-table>
</div>
<slot>
<div style="width: 100%">
<xy-table :height="380" :list="statistic.departmentList" :table-item="departmentTable">
<xy-table :height="380" :list="sitem[0].departments" :table-item="departmentTable">
<template v-slot:btns>
<el-table-column :width="80" fixed="right" label="操作" header-align="center" align="center">
<template slot-scope="scope">
@ -90,33 +101,44 @@
</LxHeader>
</div>
</div>
</template>
<template #right>
<div class="demo-split-pane" style="padding-left: 10px;">
<div ref="lxHeader" v-if="statistic.typeList">
<LxHeader icon="md-apps" text="预算类型进展情况" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content" />
<slot>
<div style="width: 100%">
<xy-table :height="380" :list="statistic.typeList" :table-item="typeTable">
<template v-slot:btns>
<el-table-column :width="80" fixed="right" label="操作" header-align="center" align="center">
<template slot-scope="scope">
<router-link :to="`/statisticalReport/budgetProgress?typeId=${scope.row.type}`">查看
</router-link>
</template>
</el-table-column>
</template>
</xy-table>
</div>
</slot>
</LxHeader>
</div>
<div ref="lxHeader" v-if="sitem[1]">
<LxHeader icon="md-apps" :text="sitem[1].type_text" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"> <xy-table :height="120" :list="[sitem[1]]" :table-item="typeTable">
<template v-slot:btns>
<el-table-column :width="10" fixed="right" label="操作" header-align="center" align="center">
<template slot-scope="scope">
</template>
</el-table-column>
</template>
</xy-table></div>
<slot>
<div style="width: 100%">
<xy-table :height="380" :list="sitem[1].departments" :table-item="departmentTable">
<template v-slot:btns>
<el-table-column :width="80" fixed="right" label="操作" header-align="center" align="center">
<template slot-scope="scope">
<router-link
:to="`/statisticalReport/budgetProgress?departmentId=${scope.row.plan_department_id}`">查看
</router-link>
</template>
</el-table-column>
</template>
</xy-table>
</div>
</slot>
</LxHeader>
</div>
</div>
</template>
</Split>
</block>
</div>
<detailContract ref="detailContract"></detailContract>
@ -177,6 +199,7 @@
dialogFormVisible: false,
departmentTree: [],
userList: [],
typeList: [],
formLabelWidth: '200px',
user: {},
@ -184,7 +207,7 @@
departmentTable: [{
label: '科室',
width: 80,
prop: 'plan_department.name',
prop: 'name',
sortable: false,
fixed: "left"
},
@ -213,7 +236,7 @@
}
},
{
label: '年初预算合计金额(元)',
label: '年初预算(元)',
width: 160,
align: 'right',
sortable: false,
@ -223,7 +246,7 @@
}
},
{
label: '调整后预算合计金额(元)',
label: '调整后预算(元)',
width: 160,
align: 'right',
sortable: false,
@ -243,13 +266,7 @@
}
}
],
typeTable: [{
label: '预算类别',
width: 100,
prop: 'type_text',
sortable: false,
fixed: "left",
},
typeTable: [
{
label: '进展情况',
sortable: false,
@ -275,7 +292,7 @@
}
},
{
label: '年初预算合计金额(元)',
label: '年初预算(元)',
width: 160,
align: 'right',
sortable: false,
@ -285,7 +302,7 @@
}
},
{
label: '调整后预算合计金额(元)',
label: '调整后预算(元)',
width: 160,
align: 'right',
sortable: false,
@ -327,7 +344,34 @@
async getStatistic() {
const res = await statistic(this.select)
console.log(res)
this.statistic = res
this.statistic = res;
if(res.typeList){
var arr=[];
for(var i=0;i<res.typeList.length;i=i+2){
if(res.typeList[i]){
res.typeList[i].per=this.getPer(res.typeList[i]);
}
if(res.typeList[i+1]){
res.typeList[i+1].per=this.getPer(res.typeList[i+1]);
}
arr.push([res.typeList[i],res.typeList[i+1]]);
}
this.typeList=arr;
}
},
getPer(row){
let m2 = row.money_total_2;
let m1 = row.money_total_1;
let m3 = row.use_money_total;
let per = 0;
if (m2 != 0) {
per = ((m3 / m2) * 100).toFixed(2);
} else if (m1 != 0) {
per = ((m3 / m1) * 100).toFixed(2);
}
return per;
},
toContract(row) {

@ -25,7 +25,14 @@
<el-option v-for="item in departments" :label="item.name" :value="item.id" :key="item.id">
</el-option>
</el-select>
</span>
</span>
<span style="padding: 0 6px;word-break: keep-all;">付款日期</span>
<span>
<DatePicker v-model="select.showDatePicker" clearable placeholder="请选择日期" placement="bottom-start"
style="width: 200px" type="daterange" @on-change="datePick"></DatePicker>
</span>
<Button type="primary" style="margin-left: 10px" ghost
@click="select = {pageIndex:1,year:'',type:'',department:''}">重置</Button>
@ -71,7 +78,10 @@
pageIndex: 1,
year: '',
type: '',
department: ''
department: '',
showDatePicker:'',
start_created_at:'',
end_created_at:''
},
rateTotal: '0%',
moneyTotal: 0,
@ -124,13 +134,13 @@
{
prop: 'money',
width: 180,
label: '年初预算金额(元)',
label: '年初预算(元)',
align: 'right'
},
{
prop: 'update_money',
width: 180,
label: '调整后预算金额(元)',
label: '调整后预算(元)',
align: 'right'
},
{
@ -165,7 +175,12 @@
]
}
},
methods: { //
methods: { //,
//
datePick(e) {
this.select.start_created_at = e[0]
this.select.end_created_at = e[1]
},
objectSpanMethod({
row,
column,
@ -247,7 +262,8 @@
year: this.select.year,
type: this.select.type,
plan_department_id: this.select.department,
top_pid: 1
top_pid: 1,
...this.select
})
for (var m of res.list.data) {
m.pid_info_name = m.pid_info?.name

Loading…
Cancel
Save