xy 2 years ago
parent cb846661f7
commit ebf4301495

@ -124,7 +124,35 @@
> >
<template> <template>
<div style="display: flex;align-items: center;"> <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 <Input
v-model="planSearch.name" v-model="planSearch.name"
search search
@ -238,7 +266,7 @@ import { getToken } from "@/utils/auth";
import { parseTime } from "@/utils"; import { parseTime } from "@/utils";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { getBudget } from "@/api/budget/budget"; 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 examineRegistration from "./components/examineRegistration";
import { listdeptNoAuth } from '@/api/system/department' import { listdeptNoAuth } from '@/api/system/department'
export default { export default {
@ -250,6 +278,7 @@ export default {
planSearchPid: "", planSearchPid: "",
isPlanSearchPid: false, isPlanSearchPid: false,
departments: [], departments: [],
planTypes: [],
moneyWay: [], moneyWay: [],
plan: [], plan: [],
planTableSearch: [ planTableSearch: [
@ -276,6 +305,11 @@ export default {
width: 200, width: 200,
align: "left", align: "left",
}, },
{
label: "部门",
prop: "plan_department.name",
width: 140
},
{ {
label: "计划金额", label: "计划金额",
prop: "money", prop: "money",
@ -291,6 +325,7 @@ export default {
year: "", year: "",
name: "", name: "",
plan_department_id: "", plan_department_id: "",
type: ""
}, },
planTotal: 0, planTotal: 0,
plansPageIndex: 1, plansPageIndex: 1,
@ -432,6 +467,25 @@ export default {
}; };
}, },
methods: { 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() { async getDepartment() {
this.departments = await listdeptNoAuth(); this.departments = await listdeptNoAuth();
@ -493,6 +547,7 @@ export default {
page_size: 10, page_size: 10,
page: this.plansPageIndex, page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id, plan_department_id: this.planSearch.plan_department_id,
type: this.planSearch.type,
top_pid: 1, top_pid: 1,
year: this.planSearch.year ? this.$moment(this.planSearch.year).format("YYYY") : "", year: this.planSearch.year ? this.$moment(this.planSearch.year).format("YYYY") : "",
}).then((res) => { }).then((res) => {
@ -624,6 +679,7 @@ export default {
this.getFundLogs(); this.getFundLogs();
}, },
created() { created() {
this.getPlanTypes()
this.getDepartment() this.getDepartment()
} }
}; };

Loading…
Cancel
Save