master
xy 2 years ago
parent 78ddcf0bad
commit fb755cbb07

@ -23,6 +23,14 @@ export function getparameter(param) {
}) })
} }
export function getparameterTree(param) {
return request({
url: '/api/admin/parameter/show-child',
method: 'get',
params: param
})
}
export function listparameter(param) { export function listparameter(param) {
return request({ return request({
url: '/api/admin/parameter/index', url: '/api/admin/parameter/index',
@ -30,13 +38,11 @@ export function listparameter(param) {
params: param params: param
}) })
} }
export function del(id) { export function del(params) {
return request({ return request({
url: '/api/admin/parameter/delete', url: '/api/admin/parameter/delete',
method: 'get', method: 'get',
params: { params
id
}
}) })
} }
export function delDetail(id) { export function delDetail(id) {

@ -22,16 +22,19 @@
<span style="padding: 0 6px"> 预算类型 </span> <span style="padding: 0 6px"> 预算类型 </span>
<span> <span>
<Select <el-cascader
v-model="select.type" :options="types"
clearable :props="{
placeholder="选择预算类型" checkStrictly: false,
style="width: 130px" label: 'name',
> value: 'id',
<Option v-for="item in types" :key="item.id" :value="item.id">{{ }"
item.value :value="select.type"
}}</Option> clearable
</Select> size="small"
style="width: 300px"
@change="(e) => (select.type = e[e.length - 1] || '')"
/>
</span> </span>
<span style="padding: 0 6px"> 科室 </span> <span style="padding: 0 6px"> 科室 </span>
@ -301,18 +304,31 @@
>预算类型 >预算类型
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select <el-cascader
v-model="form.type" :options="types"
:props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="form.type"
clearable clearable
placeholder="请选择预算类型" size="small"
style="width: 300px" style="width: 300px"
> @change="(e) => (form.type = e[e.length - 1] || '')"
<el-option />
v-for="item in types" <!-- <el-select-->
:label="item.value" <!-- v-model="form.type"-->
:value="item.id" <!-- clearable-->
></el-option> <!-- placeholder="请选择预算类型"-->
</el-select> <!-- style="width: 300px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in types"-->
<!-- :label="item.value"-->
<!-- :value="item.id"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</div> </div>
</div> </div>
</template> </template>
@ -469,18 +485,31 @@
>预算类型 >预算类型
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select <el-cascader
v-model="editorForm.type" :options="types"
:props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="editorForm.type"
clearable clearable
placeholder="请选择预算类型" size="small"
style="width: 300px" style="width: 300px"
> @change="(e) => (editorForm.type = e[e.length - 1] || '')"
<el-option />
v-for="item in types" <!-- <el-select-->
:label="item.value" <!-- v-model="editorForm.type"-->
:value="item.id" <!-- clearable-->
></el-option> <!-- placeholder="请选择预算类型"-->
</el-select> <!-- style="width: 300px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in types"-->
<!-- :label="item.value"-->
<!-- :value="item.id"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</div> </div>
</div> </div>
</template> </template>
@ -512,15 +541,30 @@
>科室 >科室
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-cascader <el-select
:options="departments" placeholder="科室选择"
:props="{ checkStrictly: true, label: 'name', value: 'id' }"
:value="editorForm.department"
clearable clearable
size="small" size="small"
v-model="editorForm.department"
style="width: 300px" style="width: 300px"
@change="(e) => (editorForm.department = e[e.length - 1] || '')" >
/> <el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<!-- <el-cascader-->
<!-- :options="departments"-->
<!-- :props="{ checkStrictly: true, label: 'name', value: 'id' }"-->
<!-- :value="editorForm.department"-->
<!-- clearable-->
<!-- size="small"-->
<!-- style="width: 300px"-->
<!-- @change="(e) => (editorForm.department = e[e.length - 1] || '')"-->
<!-- />-->
</div> </div>
</div> </div>
</template> </template>
@ -638,7 +682,7 @@ import {
import { listdeptNoAuth } from "@/api/system/department"; import { listdeptNoAuth } from "@/api/system/department";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { parseTime, moneyFormatter, moneyRecovery } from "@/utils"; import { parseTime, moneyFormatter, moneyRecovery } from "@/utils";
import { getparameter } from "@/api/system/dictionary"; import { getparameter, getparameterTree } from "@/api/system/dictionary";
import { mergeTableRow } from "@/utils/mergeTableRow"; import { mergeTableRow } from "@/utils/mergeTableRow";
import addPoint from "./components/addPoint.vue"; import addPoint from "./components/addPoint.vue";
@ -730,14 +774,8 @@ export default {
}, },
{ {
label: "预算类型", label: "预算类型",
prop: "type", prop: "type_detail.value",
width: 115, width: 115,
formatter: (cell, data, value) => {
let res = this.types.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
}, },
{ {
label: "所属年份", label: "所属年份",
@ -854,10 +892,23 @@ export default {
console.log(v); console.log(v);
}, },
async getTypes() { async getTypes() {
const res = await getparameter({ const res = await getparameterTree({
number: "money_way", id: 3
}); });
this.types = res.detail; 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.types = dataHandler(res?.children) || []
}, },
moneyRecoverEditor(key) { moneyRecoverEditor(key) {

@ -1574,9 +1574,8 @@ export default {
return row.plans.map((item) => { return row.plans.map((item) => {
return ( return (
<div> <div>
<span style="font-weight: 600;">{item.pid_info ? item.pid_info.name : ''}</span>
{" "} {" "}
[{item.year}] - {item.name}{" "} [{item.year}] {item.pid_info ? item.pid_info.name : ''} - {item.name}{" "}
</div> </div>
); );
}); });

@ -224,8 +224,7 @@ export default {
return row.act_plan_link.map((item) => { return row.act_plan_link.map((item) => {
return ( return (
<div> <div>
<span style="font-weight: 600;">{(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''}</span> [{item.plan?.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan?.name}
[{item.plan?.year}] - {item.plan?.name}
<br /> <br />
[使用金额] {item.use_money}{" "} [使用金额] {item.use_money}{" "}
</div> </div>

@ -287,9 +287,8 @@ export default {
return row.act_plan_link.map((item) => { return row.act_plan_link.map((item) => {
return ( return (
<div> <div>
<span style="font-weight: 600;">{(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''}</span>
{" "} {" "}
[{item.plan.year}] - {item.plan.name} <br /> [使用金额]{" "} [{item.plan.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan.name} <br /> [使用金额]{" "}
{item.use_money}{" "} {item.use_money}{" "}
</div> </div>
); );

@ -42,6 +42,9 @@
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth"> <el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="上级id">
<el-input v-model="form.pid" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="上级"> <el-form-item label="上级">
<el-input v-model="form.pname" disabled autocomplete="off"></el-input> <el-input v-model="form.pname" disabled autocomplete="off"></el-input>
</el-form-item> </el-form-item>
@ -87,25 +90,21 @@
<el-table-column prop="value" label="数据值Text" width="320"> <el-table-column prop="value" label="数据值Text" width="320">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.value" /> <el-input v-model="scope.row.value" />
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sort" align="center" label="排序" width="80"> <el-table-column prop="sort" align="center" label="排序" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.sort" /> <el-input v-model="scope.row.sort" />
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" align="center" label="状态" width="180"> <el-table-column prop="status" align="center" label="状态" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.status" /> <el-switch v-model="scope.row.status" />
</el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注"> <el-table-column prop="remark" label="备注">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.remark" /> <el-input v-model="scope.row.remark" />
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100" align="center"> <el-table-column label="操作" width="100" align="center">

Loading…
Cancel
Save