|
|
|
|
@ -158,7 +158,60 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:extraFormBottom>
|
|
|
|
|
<Input v-model="budgetSelect.name" search enter-button="搜 索" placeholder="搜索预算计划.." @on-search="getBudgets" />
|
|
|
|
|
<div style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
|
|
<DatePicker
|
|
|
|
|
:value="budgetSelect.year"
|
|
|
|
|
placeholder="选择所属年份"
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
style="width: 180px;margin-right: 10px;"
|
|
|
|
|
type="year"
|
|
|
|
|
@on-change="(e) => {
|
|
|
|
|
budgetSelect.year = e
|
|
|
|
|
getBudgets()
|
|
|
|
|
}"
|
|
|
|
|
></DatePicker>
|
|
|
|
|
<el-select
|
|
|
|
|
placeholder="科室选择"
|
|
|
|
|
clearable
|
|
|
|
|
size="small"
|
|
|
|
|
v-model="budgetSelect.plan_department_id"
|
|
|
|
|
style="width: 180px;margin-right: 10px;"
|
|
|
|
|
@change="getBudgets"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in departments"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-cascader
|
|
|
|
|
placeholder="资金类型选择"
|
|
|
|
|
:options="planTypes"
|
|
|
|
|
:props="{
|
|
|
|
|
checkStrictly: false,
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'id',
|
|
|
|
|
}"
|
|
|
|
|
:value="budgetSelect.type"
|
|
|
|
|
clearable
|
|
|
|
|
size="small"
|
|
|
|
|
style="width: 220px;margin-right: 10px;"
|
|
|
|
|
@change="(e) => {
|
|
|
|
|
budgetSelect.type = e[e.length - 1] || '';
|
|
|
|
|
getBudgets();
|
|
|
|
|
}"
|
|
|
|
|
/>
|
|
|
|
|
<Input
|
|
|
|
|
v-model="budgetSelect.name"
|
|
|
|
|
search
|
|
|
|
|
enter-button="搜 索"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="搜索预算计划.."
|
|
|
|
|
@on-search="getBudgets"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="min-width: 300px;">
|
|
|
|
|
<template v-if="form.plan_link.length > 0">
|
|
|
|
|
<template v-for="item in form.plan_link">
|
|
|
|
|
@ -177,12 +230,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
|
|
|
|
|
<!-- <div style="display: flex;justify-content: flex-end;">-->
|
|
|
|
|
<!-- <Page :total="budgetTotal" show-elevator @on-change="e => {-->
|
|
|
|
|
<!-- budgetSelect.page = e;-->
|
|
|
|
|
<!-- getBudgets();-->
|
|
|
|
|
<!-- }" />-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<div style="display: flex;justify-content: flex-end;">
|
|
|
|
|
<Page :total="budgetTotal" show-elevator @on-change="e => {
|
|
|
|
|
budgetSelect.page = e;
|
|
|
|
|
getBudgets();
|
|
|
|
|
}" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
|
|
|
|
|
@ -225,7 +278,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getToken } from "@/utils/auth"
|
|
|
|
|
import { getparameter } from "@/api/system/dictionary";
|
|
|
|
|
import { getparameter, getparameterTree } from '@/api/system/dictionary'
|
|
|
|
|
import {
|
|
|
|
|
addContrant,
|
|
|
|
|
editorContract,
|
|
|
|
|
@ -268,6 +321,7 @@ export default {
|
|
|
|
|
list_rows: 10,
|
|
|
|
|
p: 1
|
|
|
|
|
},
|
|
|
|
|
planTypes: [],
|
|
|
|
|
budgets: [],
|
|
|
|
|
budgetTotal: 0,
|
|
|
|
|
budgetSelect: {
|
|
|
|
|
@ -275,7 +329,9 @@ export default {
|
|
|
|
|
top_pid: "1",
|
|
|
|
|
is_tree: "0",
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10
|
|
|
|
|
page_size: 10,
|
|
|
|
|
plan_department_id: "",
|
|
|
|
|
year: ""
|
|
|
|
|
},
|
|
|
|
|
planOutTable: [
|
|
|
|
|
{
|
|
|
|
|
@ -597,9 +653,29 @@ export default {
|
|
|
|
|
await this.getOutBudgets();
|
|
|
|
|
this.isShowPlan = true;
|
|
|
|
|
},
|
|
|
|
|
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 getBudgets() {
|
|
|
|
|
let res = await getBudget(this.budgetSelect)
|
|
|
|
|
this.budgets = res.list.data;
|
|
|
|
|
this.budgetTotal = res.list.total;
|
|
|
|
|
|
|
|
|
|
this.toggleSelection(this.form.plan_link.map(item => {
|
|
|
|
|
return item.plan_id
|
|
|
|
|
@ -667,6 +743,7 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
this.getMoneyWay();
|
|
|
|
|
this.getPlanTypes()
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|