From fb755cbb079d67c650781b728be8fa8a5a518a8a Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 5 Dec 2023 17:49:12 +0800 Subject: [PATCH] 2023-12-5 --- src/api/system/dictionary.js | 14 +- src/views/budget/budgetList.vue | 145 ++++++++++++------ src/views/contract/contractList.vue | 3 +- .../contract/paymentRegistrationList.vue | 3 +- src/views/finance/paymentRegistrationList.vue | 3 +- src/views/system/dictionary.vue | 7 +- 6 files changed, 114 insertions(+), 61 deletions(-) diff --git a/src/api/system/dictionary.js b/src/api/system/dictionary.js index 0a1c940..930b8c4 100644 --- a/src/api/system/dictionary.js +++ b/src/api/system/dictionary.js @@ -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) { return request({ url: '/api/admin/parameter/index', @@ -30,13 +38,11 @@ export function listparameter(param) { params: param }) } -export function del(id) { +export function del(params) { return request({ url: '/api/admin/parameter/delete', method: 'get', - params: { - id - } + params }) } export function delDetail(id) { diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue index 95712a8..33d501e 100644 --- a/src/views/budget/budgetList.vue +++ b/src/views/budget/budgetList.vue @@ -22,16 +22,19 @@ 预算类型 - + 科室 @@ -301,18 +304,31 @@ >预算类型
- - - + @change="(e) => (form.type = e[e.length - 1] || '')" + /> + + + + + + + + + + + +
@@ -469,18 +485,31 @@ >预算类型
- - - + @change="(e) => (editorForm.type = e[e.length - 1] || '')" + /> + + + + + + + + + + + +
@@ -512,15 +541,30 @@ >科室
- + > + + + + + + + + + + + +
@@ -638,7 +682,7 @@ import { import { listdeptNoAuth } from "@/api/system/department"; import { Message } from "element-ui"; 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 addPoint from "./components/addPoint.vue"; @@ -730,14 +774,8 @@ export default { }, { label: "预算类型", - prop: "type", + prop: "type_detail.value", width: 115, - formatter: (cell, data, value) => { - let res = this.types.filter((item) => { - return item.id === value; - }); - return res[0]?.value || "未知"; - }, }, { label: "所属年份", @@ -854,10 +892,23 @@ export default { console.log(v); }, async getTypes() { - const res = await getparameter({ - number: "money_way", + const res = await getparameterTree({ + 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) { diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index b1fb95e..d5ccf39 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -1574,9 +1574,8 @@ export default { return row.plans.map((item) => { return (
- {item.pid_info ? item.pid_info.name : ''}: {" "} - [{item.year}] - {item.name}{" "} + [{item.year}] {item.pid_info ? item.pid_info.name : ''} - {item.name}{" "}
); }); diff --git a/src/views/contract/paymentRegistrationList.vue b/src/views/contract/paymentRegistrationList.vue index a89ef2e..1e92018 100644 --- a/src/views/contract/paymentRegistrationList.vue +++ b/src/views/contract/paymentRegistrationList.vue @@ -224,8 +224,7 @@ export default { return row.act_plan_link.map((item) => { return (
- {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''}: - [{item.plan?.year}] - {item.plan?.name} + [{item.plan?.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan?.name}
[使用金额] {item.use_money}元{" "}
diff --git a/src/views/finance/paymentRegistrationList.vue b/src/views/finance/paymentRegistrationList.vue index efec7b1..20e4f2a 100644 --- a/src/views/finance/paymentRegistrationList.vue +++ b/src/views/finance/paymentRegistrationList.vue @@ -287,9 +287,8 @@ export default { return row.act_plan_link.map((item) => { return (
- {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''}: {" "} - [{item.plan.year}] - {item.plan.name}
[使用金额]{" "} + [{item.plan.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan.name}
[使用金额]{" "} {item.use_money}元{" "}
); diff --git a/src/views/system/dictionary.vue b/src/views/system/dictionary.vue index c2fb36f..383a147 100644 --- a/src/views/system/dictionary.vue +++ b/src/views/system/dictionary.vue @@ -42,6 +42,9 @@ + + + @@ -87,25 +90,21 @@