From af989f35ae4f1c29237364a44aff832b7851f06f Mon Sep 17 00:00:00 2001
From: 黄何裕 <1053952480@qq.com>
Date: 星期二, 30 七月 2024 16:19:04 +0800
Subject: [PATCH] !!!
---
src/views/system/contract/score/index.vue | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/views/system/contract/score/index.vue b/src/views/system/contract/score/index.vue
index dfb9565..d578e8c 100644
--- a/src/views/system/contract/score/index.vue
+++ b/src/views/system/contract/score/index.vue
@@ -289,6 +289,7 @@
let item = this.$refs['cascader'].getCheckedNodes()[0].data;
this.calcObj = item;
this.form.contractId = item.contractId;
+ this.form.ruleName = item.ruleName + " / " + item.label;
this.form.deductCategory = item.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + item.calcFraction + '鍒�*鏁伴噺 ' : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂' : '鎵�' + item.calcFraction + '鍒�';
if (item.deductCategory == "鎵f寚瀹氬垎鏁�") {
this.needNum = false;
@@ -315,6 +316,24 @@
handleChangeUnit(value) {
getRuleListByUnitId(value).then((res) => {
this.options = this.getTreeData(res.data);
+ // 鎵嬪姩鏍戝舰缁撴瀯
+ if (this.options) {
+ let groupedList = {};
+ this.options.forEach(item => {
+ if (!groupedList[item.ruleName]) {
+ groupedList[item.ruleName] = {
+ value: 0,
+ children: [],
+ label: item.ruleName,
+ ruleName: item.ruleName,
+ contractId: item.contractId
+ };
+ }
+ groupedList[item.ruleName].children.push(item);
+ });
+ let result = Object.values(groupedList);
+ this.options = result;
+ }
})
},
getTreeData(data) {
--
Gitblit v1.8.0