xy 1 year ago
parent cb846661f7
commit ebf4301495

@ -124,7 +124,35 @@
>
<template>
<div style="display: flex;align-items: center;">
<DatePicker type="year" v-model="planSearch.year" style="margin-right: 6px;"></DatePicker>
<el-select
placeholder="科室选择"
clearable
size="small"
v-model="planSearch.plan_department_id"
style="width: 160px;"
>
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<el-cascader
:options="planTypes"
:props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="planSearch.type"
clearable
size="small"
style="width: 160px;margin-left: 6px;"
@change="(e) => (planSearch.type = e[e.length - 1] || '')"
/>
<DatePicker type="year" v-model="planSearch.year" style="margin-right: 6px;margin-left: 6px;"></DatePicker>
<Input
v-model="planSearch.name"
search
@ -238,7 +266,7 @@ import { getToken } from "@/utils/auth";
import { parseTime } from "@/utils";
import { Message } from "element-ui";
import { getBudget } from "@/api/budget/budget";
import { getparameter } from "@/api/system/dictionary";
import { getparameter, getparameterTree } from '@/api/system/dictionary'
import examineRegistration from "./components/examineRegistration";
import { listdeptNoAuth } from '@/api/system/department'
export default {
@ -250,6 +278,7 @@ export default {
planSearchPid: "",
isPlanSearchPid: false,
departments: [],
planTypes: [],
moneyWay: [],
plan: [],
planTableSearch: [
@ -276,6 +305,11 @@ export default {
width: 200,
align: "left",
},
{
label: "部门",
prop: "plan_department.name",
width: 140
},
{
label: "计划金额",
prop: "money",
@ -291,6 +325,7 @@ export default {
year: "",
name: "",
plan_department_id: "",
type: ""
},
planTotal: 0,
plansPageIndex: 1,
@ -432,6 +467,25 @@ export default {
};
},
methods: {
async getPlanTypes() {
const res = await getparameterTree({
id: 3
});
const dataHandler = (data) => {
data.forEach(i => {
if (i.hasOwnProperty('detail')) {
i.children = i.detail.map(j => {
j.name = j.value
return j;
})
} else {
dataHandler(i['children'])
}
})
return data;
}
this.planTypes = dataHandler(res?.children) || []
},
//
async getDepartment() {
this.departments = await listdeptNoAuth();
@ -493,6 +547,7 @@ export default {
page_size: 10,
page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id,
type: this.planSearch.type,
top_pid: 1,
year: this.planSearch.year ? this.$moment(this.planSearch.year).format("YYYY") : "",
}).then((res) => {
@ -624,6 +679,7 @@ export default {
this.getFundLogs();
},
created() {
this.getPlanTypes()
this.getDepartment()
}
};

Loading…
Cancel
Save