From b52b59232747e44a4abd0acbeef34e20b3859a62 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Fri, 21 Mar 2025 16:41:17 +0800
Subject: [PATCH 1/2] init
---
src/components/PlanPicker/index.vue | 26 +++++++++++++++++++++++++-
src/views/contract/contractEdit.vue | 13 ++++++++++++-
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/src/components/PlanPicker/index.vue b/src/components/PlanPicker/index.vue
index 414ffb5..67eba00 100644
--- a/src/components/PlanPicker/index.vue
+++ b/src/components/PlanPicker/index.vue
@@ -110,10 +110,12 @@
import { getBudget } from "@/api/budget/budget";
import { listdeptNoAuth } from "@/api/system/department";
import { getparameterTree } from "@/api/system/dictionary";
+import { getQueryParam } from "@/utils";
export default {
data() {
return {
+ myFlowModId: '',
boxHeight: 0,
planTypes: [],
departments: [],
@@ -211,6 +213,8 @@ export default {
res.list.forEach((item) => (item._inputMoney = 0));
this.plans = res.list;
this.planTotal = res.list.total || 0;
+
+ this.toggleBudgetByFlowModId()
},
getDepartment() {
@@ -271,7 +275,26 @@ export default {
new_money: i.money,
})))
})
- }
+ },
+
+ getParentFlowModId() {
+ const parentUrl = parent.location.href
+ const splitArr = parentUrl.split('?')
+
+ if (splitArr[1]) {
+ const query = splitArr[1].split('&')
+ this.myFlowModId = query.find(i => /^module_id/.test(i))?.split('=')[1]
+ }
+ },
+ toggleBudgetByFlowModId() {
+ this.$nextTick(_ => {
+ this.plans.forEach(row => {
+ if (row.flow_mod_id == this.myFlowModId) {
+ this.$refs['editorPlanTable']?.toggleRowSelection(row, true)
+ }
+ })
+ })
+ },
},
computed: {},
mounted() {
@@ -281,6 +304,7 @@ export default {
})
},
created() {
+ this.getParentFlowModId()
window.$getPlans = this.getSelections
this.getPlanTypes()
this.getDepartment()
diff --git a/src/views/contract/contractEdit.vue b/src/views/contract/contractEdit.vue
index 47a8a2d..dc019ac 100644
--- a/src/views/contract/contractEdit.vue
+++ b/src/views/contract/contractEdit.vue
@@ -920,7 +920,7 @@
@@ -1611,12 +1611,23 @@ export default {
}
},
+ toggleBudgetByFlowModId() {
+ this.$nextTick(_ => {
+ this.plans.forEach(row => {
+ if (row.flow_mod_id == this.form.flow_mod_id) {
+ this.$refs['editorPlanTable']?.toggleRowSelection(row, true)
+ }
+ })
+ })
+ },
//获取预算计划
async getBudgets() {
let res = await getBudget(this.planSelect);
res.list.forEach((item) => (item._inputMoney = 0));
this.plans = res.list;
this.planTotal = res.list.total || 0;
+
+ this.toggleBudgetByFlowModId()
},
handleDrawerClose(done) {
From 0f4ff3427cf0190ea46b600705491aa1299a985f Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Tue, 25 Mar 2025 10:56:07 +0800
Subject: [PATCH 2/2] init
---
.../components/examineRegistration.vue | 34 +++++++------------
src/views/finance/paymentRegistrationList.vue | 2 +-
2 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue
index 5f73f2f..35ba27f 100644
--- a/src/views/finance/components/examineRegistration.vue
+++ b/src/views/finance/components/examineRegistration.vue
@@ -218,6 +218,7 @@
>
+
Number(item))
- this.getBudgets()
await this.getContract(res.contract)
+ this.getBudgets(this.paymentRegistrationForm.plan?.map(i => i.plan_id)?.toString())
await this.moneyWayChange()
},
@@ -625,14 +627,6 @@ import {listdeptNoAuth} from "@/api/system/department";
// })
// return
// }
- console.log({
- id: this.registrationId,
- contract_id: this.contract.id,
- act_money: this.paymentRegistrationForm.actMoney,
- status: 1,
- // money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
- contract_plan_act_links: this.paymentRegistrationForm.plan
- })
editorFundLog({
id: this.registrationId,
contract_id: this.contract.id,
@@ -656,19 +650,17 @@ import {listdeptNoAuth} from "@/api/system/department";
//计划
//获取预算计划
- async getBudgets() {
+ async getBudgets(pid) {
let res = await getBudget({
- top_pid: 0,
- ...this.plansSelect
+ top_pid: 1,
+ ...this.plansSelect,
+ pid
})
if (res.list.data) {
- this.plans = [...this.paymentRegistrationForm.plan.map(i => ({
- use_money: i.use_money,
- ...i.plan
- })), ...res.list.data.map(i => ({
+ this.plans = res.list.data.map(i => ({
use_money: 0,
...i
- }))].reduce((accumulator, current) => {
+ })).reduce((accumulator, current) => {
const duplicate = accumulator.find(item => item.id === current.id);
if (!duplicate) {
return accumulator.concat([current]);
@@ -727,11 +719,11 @@ import {listdeptNoAuth} from "@/api/system/department";
toggleSelection(plans) {
if (plans) {
this.plans.filter(plan => {
- if (plans.includes(plan.id)) {
- plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].use_money
+ if (plans.includes(plan.pid)) {
+ plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money
return true
}
- }).map(row => {
+ }).forEach(row => {
this.$refs.planTable.toggleRowSelection(row)
})
} else {
diff --git a/src/views/finance/paymentRegistrationList.vue b/src/views/finance/paymentRegistrationList.vue
index 8a88af2..96d6db4 100644
--- a/src/views/finance/paymentRegistrationList.vue
+++ b/src/views/finance/paymentRegistrationList.vue
@@ -254,7 +254,7 @@ export default {
select: {
plan_id: "",
plan_name: "",
- flow_status: "",
+ flow_status: 1,
department_id: ""
},
selectDate: "",