diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue
index 866f104..5f73f2f 100644
--- a/src/views/finance/components/examineRegistration.vue
+++ b/src/views/finance/components/examineRegistration.vue
@@ -234,7 +234,7 @@
-
+
{{item.label}}
@@ -401,22 +401,38 @@ import {listdeptNoAuth} from "@/api/system/department";
label: "分类",
width: 136,
prop: 'type_detail.value',
+ formatter: (row, column, value) => {
+ const findVal = (arr, id) => {
+ for (let i = 0;i < arr.length;i++) {
+ if (i.id === id) {
+ return arr[i].name
+ } else if (arr.children instanceof Array) {
+ findVal(arr.children, id)
+ }
+ }
+ }
+ return value ? value : findVal(this.planTypes, row.type_id)
+ }
+ },
+ {
+ label: "科室",
+ prop: 'plan_department.name',
+ width: 140,
+ align: 'center',
+ formatter: (row, column, value) => {
+ return value ? value : this.departments.find(i => i.id === row.department_id)?.name
+ }
},
- {
- label: "科室",
- prop: 'plan_department.name',
- width: 100,
- align: 'center'
- }, {
- label: "隶属",
- prop: 'pid_info.name',
- width: 180,
- align: 'left'
- },
+ // {
+ // label: "隶属",
+ // prop: 'pid_info.name',
+ // width: 180,
+ // align: 'left'
+ // },
{
label: "名称",
prop: 'name',
- width: 280,
+ width: 280,
align: 'left'
},
@@ -486,7 +502,7 @@ import {listdeptNoAuth} from "@/api/system/department";
});
this.plansSelect[`type`]=_arr +'';
}
- this.getBudgets()
+ // this.getBudgets()
},
inputMoney(e, row) {
@@ -575,6 +591,7 @@ import {listdeptNoAuth} from "@/api/system/department";
this.paymentRegistrationForm.actMoney = res.apply_money
this.paymentRegistrationForm.moneyWay = res.money_way_id?.split(',').map(item => Number(item))
+ this.getBudgets()
await this.getContract(res.contract)
await this.moneyWayChange()
},
@@ -641,15 +658,29 @@ import {listdeptNoAuth} from "@/api/system/department";
//获取预算计划
async getBudgets() {
let res = await getBudget({
- top_pid: 1,
+ top_pid: 0,
...this.plansSelect
})
- this.plans = res.list.data
- this.planTotal = res.list.total
+ if (res.list.data) {
+ this.plans = [...this.paymentRegistrationForm.plan.map(i => ({
+ use_money: i.use_money,
+ ...i.plan
+ })), ...res.list.data.map(i => ({
+ use_money: 0,
+ ...i
+ }))].reduce((accumulator, current) => {
+ const duplicate = accumulator.find(item => item.id === current.id);
+ if (!duplicate) {
+ return accumulator.concat([current]);
+ }
+ return accumulator;
+ }, []);
+ this.planTotal = res.list.total
- this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
- return item.plan_id
- }))
+ this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
+ return item.plan_id
+ }))
+ }
},
planPageChange(e) {
this.plansSelect.page = e