From 9e90f6e2e7958310906ccb88489015bbd2bc02b8 Mon Sep 17 00:00:00 2001
From: liubp <1535785116@qq.com>
Date: 星期三, 24 十二月 2025 09:50:05 +0800
Subject: [PATCH] 权限页面完善,我的小区页面权限对接,费用明细详情页面,公共收益金编辑模态框

---
 public/pages/property/costDetail/costDetail.js         |   18 +
 public/components/frame/privilegeTree/privilegeTree.js |    5 
 public/pages/frame/role/role-a/role-a.js               |   86 ++++++
 public/pages/property/costDetail/detail/detail.html    |   88 +++++++
 public/pages/property/costDetail/more/more.html        |   55 ++++
 public/pages/property/costDetail/add/add.html          |   28 +
 public/pages/common/enterCommunity/enterCommunity.html |   40 +-
 public/pages/property/costDetail/costDetail.html       |    6 
 public/pages/property/costDetail/edit/edit.html        |   28 +
 public/pages/property/costDetail/add/add.js            |   10 
 public/pages/property/costDetail/edit/edit.js          |   10 
 public/pages/property/costDetail/more/more.js          |   77 +++++-
 public/pages/common/enterCommunity/enterCommunity.js   |   55 ++++
 public/pages/frame/role/role-a/role-a.html             |   44 ++-
 public/css/vc.css                                      |  115 ++++++++-
 15 files changed, 559 insertions(+), 106 deletions(-)

diff --git a/public/components/frame/privilegeTree/privilegeTree.js b/public/components/frame/privilegeTree/privilegeTree.js
index 793a511..ea62625 100644
--- a/public/components/frame/privilegeTree/privilegeTree.js
+++ b/public/components/frame/privilegeTree/privilegeTree.js
@@ -160,8 +160,11 @@
                             // 鑾峰彇褰撳墠椤甸潰鐨勫弬鏁�
                             let pgId = vc.component.privilegeTreeInfo._currentPgId;
                             let communityId = vc.getCurrentCommunity().communityId;
+                            // 鑾峰彇鏉冮檺鍚嶇О
+                            let nodeData = $('#jstree_privilege').jstree('get_node', nodeId);
+                            let pName = nodeData ? nodeData.text : '';
                             // 璺宠浆鍒皉ole-a椤甸潰锛屼紶閫掓墍鏈夊弬鏁�
-                            let params = 'pId=' + pId + '&pgId=' + pgId + '&communityId=' + communityId + '&type=all';
+                            let params = 'pId=' + pId + '&pgId=' + pgId + '&communityId=' + communityId + '&type=all&pName=' + encodeURIComponent(pName);
                             vc.jumpToPage('/#/pages/frame/role/role-a?' + params);
                         });
                         // 灏嗘寜閽彃鍏ュ埌鑺傜偣鍚庨潰
diff --git a/public/css/vc.css b/public/css/vc.css
index 5586b47..5980798 100644
--- a/public/css/vc.css
+++ b/public/css/vc.css
@@ -1366,25 +1366,14 @@
     transition: all 0.3s;
 }
 
-.cost-detail-container .action-buttons .add-btn {
+.cost-detail-container .action-buttons .add-btn, .cost-detail-container .action-buttons .import-btn{
     background: #1677ff;
     color: #fff;
     border: 1px solid #1677ff;
 }
 
-.cost-detail-container .action-buttons .add-btn:hover {
+.cost-detail-container .action-buttons .add-btn:hover, .cost-detail-container .action-buttons .import-btn:hover {
     background: #4096ff;
-}
-
-.cost-detail-container .action-buttons .import-btn {
-    background: #fff;
-    color: #333;
-    border: 1px solid #d9d9d9;
-}
-
-.cost-detail-container .action-buttons .import-btn:hover {
-    background: #f5f5f5;
-    border-color: #bfbfbf;
 }
 
 .cost-detail-container table {
@@ -1628,23 +1617,111 @@
 
 #button-container .role-a-checkbox,
 #data-container .role-a-checkbox {
-    flex: 0 0 calc(20% - 8px);
+    flex: 0 0 calc((100% - 70px) / 8);
     min-width: 0;
     box-sizing: border-box;
 }
 
-@media (max-width: 1200px) {
-
+@media (max-width: 1400px) {
     #button-container .role-a-checkbox,
     #data-container .role-a-checkbox {
-        flex: 0 0 calc(25% - 8px);
+        flex: 0 0 calc((100% - 60px) / 7);
+    }
+}
+
+@media (max-width: 1200px) {
+    #button-container .role-a-checkbox,
+    #data-container .role-a-checkbox {
+        flex: 0 0 calc((100% - 50px) / 6);
+    }
+}
+
+@media (max-width: 992px) {
+    #button-container .role-a-checkbox,
+    #data-container .role-a-checkbox {
+        flex: 0 0 calc((100% - 40px) / 5);
     }
 }
 
 @media (max-width: 768px) {
-
     #button-container .role-a-checkbox,
     #data-container .role-a-checkbox {
-        flex: 0 0 calc(50% - 8px);
+        flex: 0 0 calc((100% - 20px) / 2);
     }
+}
+.role-a-checkbox label {
+    padding-top: 5px;
+}
+
+.cost-detail-container .action-buttons .download-btn {
+    border: 1px solid #1677ff;
+    background: #fff;
+    color: #1677ff;
+}
+
+/* 缂栬緫鍏叡鏀剁泭閲戝脊绐楁牱寮� */
+.edit-public-income-modal .edit-form-group {
+    display: flex;
+    align-items: center;
+}
+
+.edit-public-income-modal .edit-form-label {
+    min-width: 120px;
+    margin: 0;
+    padding: 0;
+    font-weight: normal;
+    color: #333;
+}
+
+.edit-public-income-modal .edit-input-wrapper {
+    display: flex;
+    align-items: center;
+    flex: 1;
+}
+
+.edit-public-income-modal .edit-input {
+    flex: 1;
+    margin: 0;
+}
+
+.edit-public-income-modal .edit-input-unit {
+    margin-left: 10px;
+    color: #333;
+}
+
+.edit-public-income-modal .edit-radio-group {
+    display: flex;
+    align-items: center;
+    flex: 1;
+}
+
+.edit-public-income-modal .edit-radio-label {
+    margin: 0 20px 0 0;
+    padding: 0;
+    font-weight: normal;
+    cursor: pointer;
+    display: inline-flex;
+    align-items: center;
+}
+
+.edit-public-income-modal .edit-radio-label:last-child {
+    margin-right: 0;
+}
+
+.edit-public-income-modal .edit-radio-label input[type="radio"] {
+    margin-right: 5px;
+    cursor: pointer;
+}
+
+/* 纭繚缂栬緫鍏叡鏀剁泭閲戝脊绐楀眳涓樉绀� */
+#editPublicIncomeModal {
+    display: flex !important;
+    align-items: center;
+    justify-content: center;
+}
+
+#editPublicIncomeModal .modal-dialog {
+    margin: 0;
+    position: relative;
+    width: auto;
 }
\ No newline at end of file
diff --git a/public/pages/common/enterCommunity/enterCommunity.html b/public/pages/common/enterCommunity/enterCommunity.html
index 4db525c..3bfa0aa 100644
--- a/public/pages/common/enterCommunity/enterCommunity.html
+++ b/public/pages/common/enterCommunity/enterCommunity.html
@@ -7,7 +7,7 @@
                         <span><vc:i18n name="鎴戠殑灏忓尯" namespace="enterCommunity"></vc:i18n></span>
                     </h5>
                     <div class="ibox-tools" style="top:10px;">
-                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_showHcUse()">
+                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_showHcUse()" v-show="_hasPrivilegePIds('1500201904008')">
                             <i class="fa fa-plus"></i>
                             <span><vc:i18n name="鍟嗙敤娴佺▼" namespace="enterCommunity"></vc:i18n></span>
                         </button>
@@ -17,34 +17,34 @@
                     <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                         <thead>
                         <tr>
-                            <th data-hide="phone" class="text-center">
+                            <th data-hide="phone" class="text-center" v-show="_hasPrivilegePIds('1500201904009')">
                                 <span><vc:i18n name="鐪佷唤" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" class="text-center">
+                            <th data-hide="phone" class="text-center" v-show="_hasPrivilegePIds('1500201904010')">
                                 <span><vc:i18n name="甯�/宸�" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" width="150px" class="text-center">
+                            <th data-hide="phone" width="150px" class="text-center" v-show="_hasPrivilegePIds('1500201904011')">
                                 <span><vc:i18n name="鍖�/鍘�" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" width="200px" class="text-center">
+                            <th data-hide="phone" width="200px" class="text-center" v-show="_hasPrivilegePIds('1500201904012')">
                                 <span><vc:i18n name="灏忓尯鍚嶇О" namespace="enterCommunity"></vc:i18n></span>
                             </th>
                             <!-- <th data-hide="phone">
                                    <span><vc:i18n name="灏忓尯鍦板潃" namespace="enterCommunity"></vc:i18n></span>
                                  </th> -->
-                            <th class="text-center">
+                            <th class="text-center" v-show="_hasPrivilegePIds('1500201904013')">
                                 <span><vc:i18n name="灏忓尯缂栫爜" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" class="text-center">
+                            <th data-hide="phone" class="text-center" v-show="_hasPrivilegePIds('1500201904014')">
                                 <span><vc:i18n name="瀹㈡湇鐢佃瘽" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" class="text-center">
+                            <th data-hide="phone" class="text-center" v-show="_hasPrivilegePIds('1500201904015')">
                                 <span><vc:i18n name="闈㈢Н" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" class="text-center">
+                            <th data-hide="phone" class="text-center" v-show="_hasPrivilegePIds('1500201904016')">
                                 <span><vc:i18n name="寮�濮嬫椂闂�" namespace="enterCommunity"></vc:i18n></span>
                             </th>
-                            <th data-hide="phone" class="text-center">
+                            <th data-hide="phone" class="text-center" v-show="_hasPrivilegePIds('1500201904017')">
                                 <span><vc:i18n name="缁撴潫鏃堕棿" namespace="enterCommunity"></vc:i18n></span>
                             </th>
                             <!-- <th data-hide="phone,tablet" >
@@ -60,34 +60,34 @@
                         </thead>
                         <tbody>
                         <tr v-for="community in communityInfo.enterCommunityInfo">
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904009')">
                                 {{community.provName}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904010')">
                                 {{community.cityName}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904011')">
                                 {{community.areaName}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904012')">
                                 {{community.name}}
                             </td>
                             <!-- <td>
                             {{community.address}}
                              </td> -->
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904013')">
                                 {{community.communityId}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904014')">
                                 {{community.tel}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904015')">
                                 {{community.communityArea}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904016')">
                                 {{community.startTime}}
                             </td>
-                            <td class="text-center">
+                            <td class="text-center" v-show="_hasPrivilegePIds('1500201904017')">
                                 {{community.endTime}}
                             </td>
                             <!-- <td>
@@ -100,7 +100,7 @@
                                 {{_showCommunityStatus(community.auditStatusCd)}}
                             </td>
                             <td class="text-center">
-                                <div class="btn-group" v-if="community.auditStatusCd == '1100' ">
+                                <div class="btn-group" v-if="community.auditStatusCd == '1100' && _hasPrivilegePIds('1500201904018')">
                                     <button class="btn-white btn btn-xs"
                                             v-on:click="_openUpdateCommunityModel(community)">
                                         <span><vc:i18n name="淇敼" namespace="enterCommunity"></vc:i18n></span>
diff --git a/public/pages/common/enterCommunity/enterCommunity.js b/public/pages/common/enterCommunity/enterCommunity.js
index 18e7535..1b56151 100644
--- a/public/pages/common/enterCommunity/enterCommunity.js
+++ b/public/pages/common/enterCommunity/enterCommunity.js
@@ -7,10 +7,12 @@
             communityInfo: {
                 enterCommunityInfo: [],
                 showPage: 'myCommunity'
-            }
+            },
+            privilegePIds: [] // 瀛樺偍鏉冮檺ID鏁扮粍
         },
         _initMethod: function () {
             vc.component.listMyCommunity();
+            vc.component._loadPrivilegePIds();
         },
         _initEvent: function () {
             vc.on('enterCommunity', 'listMyCommunity', function (_param) {
@@ -61,6 +63,57 @@
             },
             _goBack: function () {
                 $that.communityInfo.showPage = 'myCommunity';
+            },
+            _loadPrivilegePIds: function () {
+                var userInfo = vc.getData('/nav/getUserInfo');
+                console.log(userInfo);
+                var param = {
+                    params: {
+                        // pgId: userInfo ? userInfo.pgId : '',
+                        pgId: '6002025062697550342',
+                        communityId: '20250723478310237',
+                        pId: '500201904008',
+                        type: 'all'
+                    }
+                };
+                vc.http.apiGet('/query.privilegeGroup.noAddPrivilege',
+                    param,
+                    function (json, res) {
+                        try {
+                            var data = typeof json === 'string' ? JSON.parse(json) : json;
+                            if (data && Array.isArray(data)) {
+                                vc.component.privilegePIds = data
+                                    .filter(function(item) {
+                                        return item.pgId != null && item.pgId !== '';
+                                    })
+                                    .map(function(item) {
+                                        return item.pId;
+                                    });
+                            } else if (data && data.data && Array.isArray(data.data)) {
+                                vc.component.privilegePIds = data.data
+                                    .filter(function(item) {
+                                        return item.pgId != null && item.pgId !== '';
+                                    })
+                                    .map(function(item) {
+                                        return item.pId;
+                                    });
+                            }
+                        } catch (e) {
+                            console.error('瑙f瀽鏉冮檺鏁版嵁澶辫触:', e);
+                            console.error('鍘熷鏁版嵁:', json);
+                        }
+                    },
+                    function (errInfo, error) {
+                        console.log('鑾峰彇鏉冮檺鏁版嵁澶辫触');
+                    }
+                );
+            },
+            _hasPrivilegePIds: function (pId) {
+                // 妫�鏌ユ潈闄怚D鏄惁鍦╬rivilegePIds鏁扮粍涓�
+                if (!vc.component.privilegePIds || !Array.isArray(vc.component.privilegePIds)) {
+                    return false;
+                }
+                return vc.component.privilegePIds.indexOf(pId) !== -1;
             }
         }
     });
diff --git a/public/pages/frame/role/role-a/role-a.html b/public/pages/frame/role/role-a/role-a.html
index 464dc07..f1d65e7 100644
--- a/public/pages/frame/role/role-a/role-a.html
+++ b/public/pages/frame/role/role-a/role-a.html
@@ -1,24 +1,36 @@
 <h1 style="font-weight: 600;">椤甸潰鏉冮檺閰嶇疆</h1>
 <div class="role-a-container">
-    <h3>鍏ㄩ儴</h3>
-    <div class="role-a-checkbox">
-        <label>鍏ㄩ儴</label>
-        <input type="checkbox" name="all" id="all">
-    </div>
-    <h3>鎸夐挳</h3>
     <div class="role-a-checkbox" style="gap: 10px; display: flex; align-items: center;">
-        <label>鍏ㄩ儴</label>
-        <input type="checkbox" id="button-all">
+        <h3 style="margin: 0;">鍏ㄩ儴</h3>
+        <input type="checkbox" name="all" id="all" checked>
+        <label style="padding-top: 8px;">鍏ㄩ儴</label>
     </div>
-    <div id="button-container"></div>
-    <h3>琛ㄥご</h3>
-    <div class="role-a-checkbox" style="gap: 10px; display: flex; align-items: center;">
+    <div class="role-a-checkbox" style="border: 1px solid #e7eaec;"></div>
+
+    <div class="role-a-checkbox" style="gap: 10px; display: flex; align-items: center; margin-top: 20px;" v-show="buttonPrivileges.length > 0">
+        <h3 style="margin: 0;">鎸夐挳鏉冮檺</h3>
+        <input type="checkbox" id="button-all" checked>
         <label>鍏ㄩ儴</label>
-        <input type="checkbox" id="data-all">
     </div>
-    <div id="data-container"></div>
-    <div class="role-a-buttons">
+    <div id="button-container" style="margin: 0 0 0 74px;"></div>
+
+    <div class="role-a-checkbox" style="gap: 10px; display: flex; align-items: center; margin-top: 20px;" v-show="labelPrivileges.length > 0">
+        <h3 style="margin: 0;">鏍囩鏉冮檺</h3>
+        <input type="checkbox" id="label-all" checked>
+        <label>鍏ㄩ儴</label>
+    </div>
+    <div id="label-container" style="margin: 0 0 0 74px;"></div>
+
+    <div class="role-a-checkbox" style="gap: 10px; display: flex; align-items: center; margin-top: 20px;" v-show="dataPrivileges.length > 0">
+        <h3 style="margin: 0;">琛ㄥご鏉冮檺</h3>
+        <input type="checkbox" id="data-all" checked>
+        <label>鍏ㄩ儴</label>
+    </div>
+    <div id="data-container" style="margin: 0 0 0 74px;"></div>
+
+    <div class="role-a-buttons" style="width: 100%; display: flex; justify-content: flex-end; gap: 10px; margin-top: 100px;">
         <button type="button" class="btn btn-primary" id="save">淇濆瓨</button>
-        <button type="button" class="btn btn-primary" id="cancel" v-on:click="goBack">杩斿洖</button>
+        <button type="button" class="btn btn-primary" id="reset">閲嶇疆</button>
+        <button type="button" class="btn btn-primary" id="cancel" v-on:click="goBack" style="margin-right: 100px;">鍙栨秷</button>
     </div>
-</div>
+</div>
\ No newline at end of file
diff --git a/public/pages/frame/role/role-a/role-a.js b/public/pages/frame/role/role-a/role-a.js
index 2eaffbf..f0122a4 100644
--- a/public/pages/frame/role/role-a/role-a.js
+++ b/public/pages/frame/role/role-a/role-a.js
@@ -7,7 +7,11 @@
                 header: false
             },
             pgId: '', // 淇濆瓨瑙掕壊缂栫爜
-            privilegeData: [] // 淇濆瓨鏉冮檺鏁版嵁
+            privilegeData: [], // 淇濆瓨鏉冮檺鏁版嵁
+            pName: '鍏ㄩ儴', // 淇濆瓨鏉冮檺鍚嶇О锛岄粯璁や负"鍏ㄩ儴"
+            buttonPrivileges: [], // 淇濆瓨鎸夐挳鏉冮檺
+            labelPrivileges: [], // 淇濆瓨鏍囩鏉冮檺
+            dataPrivileges: [], // 淇濆瓨鏁版嵁鏉冮檺
         },
         _initMethod: function () {
             // 鑾峰彇URL鍙傛暟
@@ -15,6 +19,7 @@
             let pgId = '';
             let communityId = '';
             let type = '';
+            let pName = '鍏ㄩ儴'; // 榛樿鍊间负"鍏ㄩ儴"
             
             // 浼樺厛浠� hash 涓幏鍙栧弬鏁帮紙鍗曢〉搴旂敤浣跨敤 hash 璺敱锛�
             const hash = location.hash;
@@ -36,6 +41,8 @@
                         communityId = value;
                     } else if (key === 'type') {
                         type = value;
+                    } else if (key === 'pName') {
+                        pName = value;
                     }
                 }
             }
@@ -53,14 +60,25 @@
             if (!type) {
                 type = vc.getParam('type') || '';
             }
+            if (pName === '鍏ㄩ儴') {
+                pName = vc.getParam('pName') || '鍏ㄩ儴';
+            }
             
             // 濡傛灉缂哄皯蹇呰鍙傛暟锛屼娇鐢ㄩ粯璁ゅ�兼垨浠庡綋鍓嶇ぞ鍖鸿幏鍙�
             if (!communityId) {
                 communityId = vc.getCurrentCommunity().communityId;
             }
             
-            // 淇濆瓨 pgId 鍒� data 涓�
+            // 淇濆瓨 pgId銆乸Id 鍜� pName 鍒� data 涓�
             vc.component.pgId = pgId;
+            vc.component.pId = pId;
+            vc.component.pName = pName;
+            
+            // 鏇存柊椤甸潰鏍囬
+            const titleElement = document.querySelector('.role-a-container h3');
+            if (titleElement) {
+                titleElement.textContent = pName;
+            }
             
             // 璋冪敤鎺ュ彛
             if (pgId && communityId) {
@@ -81,6 +99,9 @@
                             // 鍒ゆ柇 json 鐨勭被鍨嬶紝濡傛灉宸茬粡鏄璞″垯鐩存帴浣跨敤锛屽惁鍒欒繘琛岃В鏋�
                             let data = typeof json === 'string' ? JSON.parse(json) : json;
                             vc.component.privilegeData = data;
+                            vc.component.buttonPrivileges = data.filter(item => item.type === '鎸夐挳');
+                            vc.component.labelPrivileges = data.filter(item => item.type === '鏍囩');
+                            vc.component.dataPrivileges = data.filter(item => item.type === '鏁版嵁');
                             vc.component.renderPrivileges(data);
                             vc.component.initCheckboxEvents();
                         } catch (e) {
@@ -106,10 +127,12 @@
             // 娓叉煋鏉冮檺澶嶉�夋
             renderPrivileges: function (data) {
                 const buttonContainer = document.getElementById('button-container');
+                const labelContainer = document.getElementById('label-container');
                 const dataContainer = document.getElementById('data-container');
                 
                 // 娓呯┖瀹瑰櫒
                 if (buttonContainer) buttonContainer.innerHTML = '';
+                if (labelContainer) labelContainer.innerHTML = '';
                 if (dataContainer) dataContainer.innerHTML = '';
                 
                 // 閬嶅巻鏁版嵁锛屾牴鎹� type 鍒涘缓瀵瑰簲鐨勫閫夋
@@ -122,6 +145,7 @@
                     
                     const label = document.createElement('label');
                     label.textContent = item.pName;
+                    label.style.paddingTop = '8px';
                     
                     const checkbox = document.createElement('input');
                     checkbox.type = 'checkbox';
@@ -129,14 +153,19 @@
                     checkbox.value = item.pId;
                     checkbox.setAttribute('data-pid', item.pId);
                     checkbox.setAttribute('data-type', item.type);
+                    checkbox.checked = true;
                     
-                    checkboxDiv.appendChild(label);
                     checkboxDiv.appendChild(checkbox);
+                    checkboxDiv.appendChild(label);
                     
                     // 鏍规嵁 type 娣诲姞鍒板搴斿鍣�
                     if (item.type === '鎸夐挳') {
                         if (buttonContainer) {
                             buttonContainer.appendChild(checkboxDiv);
+                        }
+                    } else if (item.type === '鏍囩') {
+                        if (labelContainer) {
+                            labelContainer.appendChild(checkboxDiv);
                         }
                     } else if (item.type === '鏁版嵁') {
                         if (dataContainer) {
@@ -161,8 +190,10 @@
                         });
                         // 鍚屾椂鏇存柊鎸夐挳鍜屾暟鎹尯鍩熺殑"鍏ㄩ儴"澶嶉�夋
                         const buttonAll = document.getElementById('button-all');
+                        const labelAll = document.getElementById('label-all');
                         const dataAll = document.getElementById('data-all');
                         if (buttonAll) buttonAll.checked = isChecked;
+                        if (labelAll) labelAll.checked = isChecked;
                         if (dataAll) dataAll.checked = isChecked;
                     });
                 }
@@ -181,7 +212,22 @@
                         self.updateAllCheckbox();
                     });
                 }
-                
+
+                // 鏍囩鍖哄煙鍏ㄩ儴澶嶉�夋
+                const labelAllCheckbox = document.getElementById('label-all');
+                if (labelAllCheckbox) {
+                    labelAllCheckbox.addEventListener('change', function () {
+                        const isChecked = this.checked;
+                        // 閫変腑鏍囩鍖哄煙鎵�鏈夊閫夋
+                        const labelCheckboxes = document.querySelectorAll('#label-container input[type="checkbox"][name="privilege"]');
+                        labelCheckboxes.forEach(function (cb) {
+                            cb.checked = isChecked;
+                        });
+                        // 妫�鏌ユ槸鍚﹂渶瑕佹洿鏂�"鍏ㄩ儴"澶嶉�夋
+                        self.updateAllCheckbox();
+                    });
+                }
+
                 // 鏁版嵁鍖哄煙鍏ㄩ儴澶嶉�夋
                 const dataAllCheckbox = document.getElementById('data-all');
                 if (dataAllCheckbox) {
@@ -213,6 +259,27 @@
                         self.savePrivileges();
                     });
                 }
+                
+                // 閲嶇疆鎸夐挳浜嬩欢
+                const resetButton = document.getElementById('reset');
+                if (resetButton) {
+                    resetButton.addEventListener('click', function () {
+                        // 閫変腑鎵�鏈夋潈闄愬閫夋
+                        const allCheckboxes = document.querySelectorAll('input[type="checkbox"][name="privilege"]');
+                        allCheckboxes.forEach(function (cb) {
+                            cb.checked = true;
+                        });
+                        // 閫変腑鎵�鏈�"鍏ㄩ儴"澶嶉�夋
+                        const allCheckbox = document.getElementById('all');
+                        const buttonAll = document.getElementById('button-all');
+                        const labelAll = document.getElementById('label-all');
+                        const dataAll = document.getElementById('data-all');
+                        if (allCheckbox) allCheckbox.checked = true;
+                        if (buttonAll) buttonAll.checked = true;
+                        if (labelAll) labelAll.checked = true;
+                        if (dataAll) dataAll.checked = true;
+                    });
+                }
             },
             // 鏇存柊"鍏ㄩ儴"澶嶉�夋鐘舵��
             updateAllCheckbox: function () {
@@ -237,6 +304,16 @@
                     buttonAll.checked = buttonAllChecked;
                 }
                 
+                // 鏇存柊鏍囩鍖哄煙
+                const labelCheckboxes = document.querySelectorAll('#label-container input[type="checkbox"][name="privilege"]');
+                const labelAllChecked = labelCheckboxes.length > 0 && Array.from(labelCheckboxes).every(function (cb) {
+                    return cb.checked;
+                });
+                const labelAll = document.getElementById('label-all');
+                if (labelAll) {
+                    labelAll.checked = labelAllChecked;
+                }
+
                 // 鏇存柊鏁版嵁鍖哄煙
                 const dataCheckboxes = document.querySelectorAll('#data-container input[type="checkbox"][name="privilege"]');
                 const dataAllChecked = dataCheckboxes.length > 0 && Array.from(dataCheckboxes).every(function (cb) {
@@ -263,6 +340,7 @@
                 
                 const requestData = {
                     pgId: vc.component.pgId,
+                    parentId: vc.component.pId,
                     pIds: pIds
                 };
                 
diff --git a/public/pages/property/costDetail/add/add.html b/public/pages/property/costDetail/add/add.html
index 057a93e..94a2b75 100644
--- a/public/pages/property/costDetail/add/add.html
+++ b/public/pages/property/costDetail/add/add.html
@@ -79,24 +79,32 @@
         <div class="form-row">
             <label class="form-label">鍩洪噾涓庤鏂�</label>
             <div class="radio-group">
-                <input type="radio" id="fundRepair" name="fundType" checked>
+                <input type="radio" id="fundRepair" name="fundType" value="repair" v-model="fundType">
                 <label for="fundRepair" style="margin-top: 8px;">缁翠慨璧勯噾</label>
             </div>
-            <label class="form-label" for="ownerScope">涓氫富澶т細鑼冨洿</label>
-            <select id="ownerScope" class="form-select">
-                <option value="multi">澶氶��</option>
-            </select>
-            <label class="form-label" for="buildingScope">闂ㄧ墝骞㈣寖鍥�</label>
-            <select id="buildingScope" class="form-select">
-                <option value="multi">澶氶��</option>
-            </select>
+            <div class="radio-group" style="margin-left: 100px;" v-if="fundType === 'repair'">
+                <label class="form-label" for="ownerScope">涓氫富澶т細鑼冨洿</label>
+                <select id="ownerScope" class="form-select">
+                    <option value="multi">澶氶��</option>
+                </select>
+                <label class="form-label" for="buildingScope">闂ㄧ墝骞㈣寖鍥�</label>
+                <select id="buildingScope" class="form-select">
+                    <option value="multi">澶氶��</option>
+                </select>
+            </div>
         </div>
 
         <div class="form-row">
             <div class="radio-group" style="margin-left: 100px;">
-            <input type="radio" id="fundPublic" name="fundType">
+                <input type="radio" id="fundPublic" name="fundType" value="public" v-model="fundType">
                 <label for="fundPublic" style="margin-top: 8px;">鍏叡鏀剁泭</label>
             </div>
+            <div class="radio-group" style="margin-left: 100px;" v-if="fundType === 'public'">
+                <input type="radio" id="fundSystemOut" name="fundSystemType" value="out" v-model="fundSystemType">
+                <label for="fundSystemOut" style="margin-top: 8px;">绯荤粺澶�</label>
+                <input type="radio" id="fundSystemIn" name="fundSystemType" value="in" v-model="fundSystemType">
+                <label for="fundSystemIn" style="margin-top: 8px;">绯荤粺鍐�</label>
+            </div>
         </div>
 
         <!-- 鎸夐挳缁� -->
diff --git a/public/pages/property/costDetail/add/add.js b/public/pages/property/costDetail/add/add.js
index e69de29..369a818 100644
--- a/public/pages/property/costDetail/add/add.js
+++ b/public/pages/property/costDetail/add/add.js
@@ -0,0 +1,10 @@
+
+(function (vc) {
+    vc.extends({
+        data: {
+            fundType: 'repair', // 榛樿閫変腑缁翠慨璧勯噾
+            fundSystemType: 'out' // 榛樿閫変腑绯荤粺澶�
+        }
+    });
+})(window.vc);
+
diff --git a/public/pages/property/costDetail/costDetail.html b/public/pages/property/costDetail/costDetail.html
index c8153a4..95b9d9a 100644
--- a/public/pages/property/costDetail/costDetail.html
+++ b/public/pages/property/costDetail/costDetail.html
@@ -21,10 +21,9 @@
         <button type="button" class="query-btn" v-on:click="_queryCostDetails()" style="line-height: 0px;">鏌ヨ</button>
         <button type="button" class="reset-btn" v-on:click="_resetQuery()" style="line-height: 0px;">閲嶇疆</button>
         <div class="action-buttons">
-            <button type="button" class="add-btn" v-on:click="_addCostDetail()" style="line-height: 0px;">
-                娣诲姞
-            </button>
+            <button type="button" class="download-btn" v-on:click="_downloadTemplate()" style="line-height: 0px; ">妯℃澘涓嬭浇</button>
             <button type="button" class="import-btn" v-on:click="_importCostDetail()" style="line-height: 0px;">璐圭敤瀵煎叆</button>
+            <button type="button" class="add-btn" v-on:click="_addCostDetail()" style="line-height: 0px;">娣诲姞</button>
         </div>
     </div>
 
@@ -70,6 +69,7 @@
                 <td>{{item.buildingType || '-'}}</td>
                 <td>{{item.maintenanceType || '-'}}</td>
                 <td>
+                    <a href="javascript:void(0)" v-on:click="_viewCostDetail(item)">璇︽儏</a>
                     <a href="javascript:void(0)" v-on:click="_viewMore(item)">鏇村</a>
                     <a href="javascript:void(0)" v-on:click="_editCostDetail(item)">缂栬緫</a>
                     <a href="javascript:void(0)" v-on:click="_deleteCostDetail(item)">鍒犻櫎</a>
diff --git a/public/pages/property/costDetail/costDetail.js b/public/pages/property/costDetail/costDetail.js
index 978e309..2f0d8cf 100644
--- a/public/pages/property/costDetail/costDetail.js
+++ b/public/pages/property/costDetail/costDetail.js
@@ -203,18 +203,26 @@
                 }
                 $that._listCostDetails(page, $that.costDetailInfo.paginationInfo.rows);
             },
-            _addCostDetail: function () {
-                // 璺宠浆鍒版坊鍔犻〉闈㈡垨鎵撳紑娣诲姞寮圭獥
-                vc.jumpToPage('/#/pages/property/costDetail/add');
+            _downloadTemplate: function () {
+                // 涓嬭浇妯℃澘
+                vc.toast('妯℃澘涓嬭浇鍔熻兘');
             },
             _importCostDetail: function () {
-                // 鎵撳紑瀵煎叆寮圭獥鎴栬烦杞埌瀵煎叆椤甸潰
+                // 鎵撳紑鏈湴鏂囦欢
                 vc.toast('璐圭敤瀵煎叆鍔熻兘');
             },
-            _viewMore: function (_item) {
+            _addCostDetail: function () {
+                // 璺宠浆鍒版坊鍔犻〉闈�
+                vc.jumpToPage('/#/pages/property/costDetail/add');
+            },
+            _viewCostDetail: function (_item) {
                 // 鏌ョ湅璇︽儏
                 vc.jumpToPage('/#/pages/property/costDetail/detail?costDetailId=' + _item.costDetailId);
             },
+            _viewMore: function (_item) {
+                // 鏌ョ湅鏇村
+                vc.jumpToPage('/#/pages/property/costDetail/more?costDetailId=' + _item.costDetailId);
+            },
             _editCostDetail: function (_item) {
                 // 缂栬緫
                 vc.jumpToPage('/#/pages/property/costDetail/edit?costDetailId=' + _item.costDetailId);
diff --git a/public/pages/property/costDetail/detail/detail.html b/public/pages/property/costDetail/detail/detail.html
index e69de29..e4a446e 100644
--- a/public/pages/property/costDetail/detail/detail.html
+++ b/public/pages/property/costDetail/detail/detail.html
@@ -0,0 +1,88 @@
+<div class="form-container">
+    <h2 style="font-weight: 600;">娣诲姞</h2>
+    <form>
+        <!-- 娴佽浆缂栫爜 + 鏃ユ湡 -->
+        <div class="form-row">
+            <label class="form-label" for="flowCode">娴佽浆缂栫爜</label>
+            <p>{{costDetailInfo.flowCode || '-'}}</p>
+            <label class="form-label" for="date">鏃ユ湡</label>
+            <p>{{costDetailInfo.date || '-'}}</p>
+        </div>
+
+        <!-- 灏忓尯鍚嶇О + 灏忓尯缂栫爜锛堝甫澶囨敞锛� -->
+        <div class="form-row">
+            <label class="form-label" for="communityName">灏忓尯鍚嶇О</label>
+            <p>{{costDetailInfo.communityName || '-'}}</p>
+            <label class="form-label">灏忓尯缂栫爜</label>
+            <p>{{costDetailInfo.communityCode || '-'}}</p>
+        </div>
+
+        <!-- 宸ョ▼鍐呭 -->
+        <div class="form-row">
+            <label class="form-label" for="projectContent">宸ョ▼鍐呭</label>
+            <p>{{costDetailInfo.projectContent || '-'}}</p>
+        </div>
+
+        <!-- 绠$悊澶勯噾棰� + 鏄惁鐩栫珷 -->
+        <div class="form-row">
+            <label class="form-label" for="mgmtAmount">绠$悊澶勯噾棰�</label>
+            <p>{{costDetailInfo.managementAmount || '-'}}</p>
+            <span>鍏�</span>
+            <label class="form-label">鏄惁鐩栫珷</label>
+            <div class="radio-group">
+                <p>{{costDetailInfo.managementStamped == '1' ? '鏄�' : '鍚�'}}</p>
+            </div>
+        </div>
+
+        <!-- 涓氬浼氶噾棰� + 瀹′环閲戦 + 鏄惁鐩栫珷 + 绛炬姤閮ㄩ棬 -->
+        <div class="form-row">
+            <label class="form-label" for="committeeAmount">涓氬浼氶噾棰�</label>
+            <p>{{costDetailInfo.committeeAmount || '-'}}</p>
+            <span>鍏�</span>
+            <label class="form-label" for="auditAmount">瀹′环閲戦</label>
+            <p>{{costDetailInfo.appraisalAmount || '-'}}</p>
+            <span>鍏�</span>
+            <label class="form-label">鏄惁鐩栫珷</label>
+            <div class="radio-group">
+                <p>{{costDetailInfo.committeeStamped == '1' ? '鏄�' : '鍚�'}}</p>
+            </div>
+            <label class="form-label" for="approveDept">绛炬姤閮ㄩ棬</label>
+            <p>{{costDetailInfo.approvalDepartment || '-'}}</p>
+        </div>
+
+        <!-- 鍒嗘憡鑼冨洿 + 缁翠慨绫诲瀷 -->
+        <div class="form-row">
+            <label class="form-label">鍒嗘憡鑼冨洿</label>
+            <div class="radio-group">
+                <p>{{costDetailInfo.buildingType == '1' ? '骞�' : '鍏ㄤ綋'}}</p>
+            </div>
+            <label class="form-label" for="repairType">缁翠慨绫诲瀷</label>
+            <p>{{costDetailInfo.maintenanceType || '-'}}</p>
+        </div>
+
+        <!-- 鍩洪噾涓庤鏂� + 涓氫富澶т細鑼冨洿 + 闂ㄧ墝骞㈣寖鍥� -->
+        <div class="form-row">
+            <label class="form-label">鍩洪噾涓庤鏂�</label>
+            <div class="radio-group">
+                <p>{{costDetailInfo.fundTypeLevel1 == '1' ? '缁翠慨璧勯噾' : '鍏叡鏀剁泭'}}</p>
+                <label for="fundRepair" style="margin-top: 8px;">缁翠慨璧勯噾</label>
+            </div>
+            <label class="form-label" for="ownerScope">涓氫富澶т細鑼冨洿</label>
+            <p>{{costDetailInfo.ownerScope || '-'}}</p>
+            <label class="form-label" for="buildingScope">闂ㄧ墝骞㈣寖鍥�</label>
+            <p>{{costDetailInfo.buildingScope || '-'}}</p>
+        </div>
+
+        <div class="form-row">
+            <div class="radio-group" style="margin-left: 100px;">
+                <p>{{costDetailInfo.fundTypeLevel2 == '1' ? '鍏叡鏀剁泭' : '缁翠慨璧勯噾'}}</p>
+            </div>
+        </div>
+
+        <!-- 鎸夐挳缁� -->
+        <div class="btn-group">
+            <button type="button" class="btn-cancel">鍙栨秷</button>
+            <button type="button" class="btn-save">淇濆瓨</button>
+        </div>
+    </form>
+</div>
\ No newline at end of file
diff --git a/public/pages/property/costDetail/edit/edit.html b/public/pages/property/costDetail/edit/edit.html
index e62b096..c335946 100644
--- a/public/pages/property/costDetail/edit/edit.html
+++ b/public/pages/property/costDetail/edit/edit.html
@@ -79,24 +79,32 @@
         <div class="form-row">
             <label class="form-label">鍩洪噾涓庤鏂�</label>
             <div class="radio-group">
-                <input type="radio" id="fundRepair" name="fundType" checked>
+                <input type="radio" id="fundRepair" name="fundType" value="repair" v-model="fundType">
                 <label for="fundRepair" style="margin-top: 8px;">缁翠慨璧勯噾</label>
             </div>
-            <label class="form-label" for="ownerScope">涓氫富澶т細鑼冨洿</label>
-            <select id="ownerScope" class="form-select">
-                <option value="multi">澶氶��</option>
-            </select>
-            <label class="form-label" for="buildingScope">闂ㄧ墝骞㈣寖鍥�</label>
-            <select id="buildingScope" class="form-select">
-                <option value="multi">澶氶��</option>
-            </select>
+            <div class="radio-group" style="margin-left: 100px;" v-if="fundType === 'repair'">
+                <label class="form-label" for="ownerScope">涓氫富澶т細鑼冨洿</label>
+                <select id="ownerScope" class="form-select">
+                    <option value="multi">澶氶��</option>
+                </select>
+                <label class="form-label" for="buildingScope">闂ㄧ墝骞㈣寖鍥�</label>
+                <select id="buildingScope" class="form-select">
+                    <option value="multi">澶氶��</option>
+                </select>
+            </div>
         </div>
 
         <div class="form-row">
             <div class="radio-group" style="margin-left: 100px;">
-            <input type="radio" id="fundPublic" name="fundType">
+                <input type="radio" id="fundPublic" name="fundType" value="public" v-model="fundType">
                 <label for="fundPublic" style="margin-top: 8px;">鍏叡鏀剁泭</label>
             </div>
+            <div class="radio-group" style="margin-left: 100px;" v-if="fundType === 'public'">
+                <input type="radio" id="fundSystemOut" name="fundSystemType" value="out" v-model="fundSystemType">
+                <label for="fundSystemOut" style="margin-top: 8px;">绯荤粺澶�</label>
+                <input type="radio" id="fundSystemIn" name="fundSystemType" value="in" v-model="fundSystemType">
+                <label for="fundSystemIn" style="margin-top: 8px;">绯荤粺鍐�</label>
+            </div>
         </div>
 
         <!-- 鎸夐挳缁� -->
diff --git a/public/pages/property/costDetail/edit/edit.js b/public/pages/property/costDetail/edit/edit.js
index e69de29..369a818 100644
--- a/public/pages/property/costDetail/edit/edit.js
+++ b/public/pages/property/costDetail/edit/edit.js
@@ -0,0 +1,10 @@
+
+(function (vc) {
+    vc.extends({
+        data: {
+            fundType: 'repair', // 榛樿閫変腑缁翠慨璧勯噾
+            fundSystemType: 'out' // 榛樿閫変腑绯荤粺澶�
+        }
+    });
+})(window.vc);
+
diff --git a/public/pages/property/costDetail/more/more.html b/public/pages/property/costDetail/more/more.html
index e0dd21f..ee6fa66 100644
--- a/public/pages/property/costDetail/more/more.html
+++ b/public/pages/property/costDetail/more/more.html
@@ -8,9 +8,9 @@
             <input type="date" class="form-control endDate" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" v-model="moreInfo.conditions.endDate" />
         </div>
         <div class="action-buttons">
-            <button type="button" class="download-btn" v-on:click="_downloadTemplate()" style="line-height: 0px;">涓嬭浇妯℃澘</button>
+            <button type="button" class="edit-btn" v-on:click="_editPublicIncome()" style="line-height: 0px;">缂栬緫</button>
             <button type="button" class="add-btn" v-on:click="_add()" style="line-height: 0px;">娣诲姞</button>
-            <button type="button" class="import-btn" v-on:click="_export()" style="line-height: 0px;">瀵煎嚭</button>
+            <button type="button" class="import-btn" v-on:click="_export()" style="line-height: 0px; background-color: white; color: #333; border: 1px solid #e8e8e8;">瀵煎嚭</button>
         </div>
     </div>
 
@@ -84,8 +84,8 @@
                 <td>{{item.publishedStartDate || '-'}}</td>
                 <td>{{item.publishedEndDate || '-'}}</td>
                 <td>
-                    <a href="javascript:void(0)" v-on:click="_viewDetail(item)">璇︽儏</a>
-                    <a href="javascript:void(0)" v-on:click="_edit(item)">缂栬緫</a>
+                    <a href="javascript:void(0)" v-on:click="_viewDetailPublicIncome(item)">璇︽儏</a>
+                    <a href="javascript:void(0)" v-on:click="_editPublicIncome(item)">缂栬緫</a>
                     <a href="javascript:void(0)" v-on:click="_delete(item)">鍒犻櫎</a>
                 </td>
             </tr>
@@ -450,3 +450,50 @@
     </div>
 </div>
 
+<!-- 缂栬緫鍏叡鏀剁泭閲� Modal -->
+<div class="modal fade" id="editPublicIncomeModal" inert aria-hidden="true" tabindex="-1" style="position: relative; top: 50%; left: 50%; transform: translate(-50%, -30%);">
+    <div class="modal-dialog">
+        <div class="modal-content" style="border-radius: 10px;">
+            <div class="modal-header">
+                <h4 class="modal-title">缂栬緫</h4>
+                <button type="button" class="close" v-on:click="_hideEditPublicModal()" aria-label="Close"><span aria-hidden="true">脳</span></button>
+            </div>
+            <div class="modal-body edit-public-income-modal">
+                <div class="form-group edit-form-group">
+                    <label class="edit-form-label">棰濆害</label>
+                    <div class="edit-input-wrapper">
+                        <input type="text" class="form-control edit-input" v-model.trim="moreInfo.editForm.amount" placeholder="璇疯緭鍏ュ悕绉�">
+                        <span class="edit-input-unit">鍏�</span>
+                    </div>
+                </div>
+                <div class="form-group edit-form-group">
+                    <label class="edit-form-label">涓氬浼氬ぇ浼氬喅璁�</label>
+                    <div class="edit-radio-group">
+                        <label class="edit-radio-label">
+                            <input type="radio" name="meetingResolution" value="1" v-model="moreInfo.editForm.meetingResolution"> 鏄�
+                        </label>
+                        <label class="edit-radio-label">
+                            <input type="radio" name="meetingResolution" value="0" v-model="moreInfo.editForm.meetingResolution"> 鍚�
+                        </label>
+                    </div>
+                </div>
+                <div class="form-group edit-form-group">
+                    <label class="edit-form-label">涓氬浼氬緛璇㈣〃</label>
+                    <div class="edit-radio-group">
+                        <label class="edit-radio-label">
+                            <input type="radio" name="consultationForm" value="1" v-model="moreInfo.editForm.consultationForm"> 鏄�
+                        </label>
+                        <label class="edit-radio-label">
+                            <input type="radio" name="consultationForm" value="0" v-model="moreInfo.editForm.consultationForm"> 鍚�
+                        </label>
+                    </div>
+                </div>
+            </div>
+            <div style="display: flex; justify-content: center; padding-bottom: 20px; gap: 20px;">
+                <button type="button" class="btn btn-white" v-on:click="_hideEditPublicModal()">鍙栨秷</button>
+                <button type="button" class="btn btn-primary" v-on:click="_saveEditPublicIncome()">纭</button>
+            </div>
+        </div>
+    </div>
+</div>
+
diff --git a/public/pages/property/costDetail/more/more.js b/public/pages/property/costDetail/more/more.js
index 9d03b81..47ebaa5 100644
--- a/public/pages/property/costDetail/more/more.js
+++ b/public/pages/property/costDetail/more/more.js
@@ -17,10 +17,16 @@
                     pageList: []
                 },
                 jumpPage: 1,
-                currentTab: 'convention',
+                currentTab: 'publicIncome',
                 conditions: {
                     startDate: '',
                     endDate: ''
+                },
+                editForm: {
+                    id: '',
+                    amount: '',
+                    meetingResolution: '1',
+                    consultationForm: '1'
                 }
             }
         },
@@ -57,7 +63,7 @@
                     todayBtn: true,
                     clearBtn: true
                 });
-                
+
                 // 璁剧疆榛樿鏃ユ湡涓哄綋鍓嶆湀浠�
                 var now = new Date();
                 var year = now.getFullYear();
@@ -65,12 +71,12 @@
                 var startDateStr = year + '-' + (month < 10 ? '0' + month : month) + '-01';
                 var endDate = new Date(year, month, 0); // 鑾峰彇褰撴湀鏈�鍚庝竴澶�
                 var endDateStr = year + '-' + (month < 10 ? '0' + month : month) + '-' + endDate.getDate();
-                
+
                 $that.moreInfo.conditions.startDate = startDateStr;
                 $that.moreInfo.conditions.endDate = endDateStr;
                 $(".startDate").val(startDateStr);
                 $(".endDate").val(endDateStr);
-                
+
                 $('.startDate').datetimepicker()
                     .on('changeDate', function (ev) {
                         var value = $(".startDate").val();
@@ -89,17 +95,17 @@
                             $that.moreInfo.conditions.endDate = value;
                         }
                     });
-                
+
                 // 闃叉澶氭鐐瑰嚮鏃堕棿鎻掍欢澶卞幓鐒︾偣
                 var startDateElements = document.getElementsByClassName('form-control startDate');
                 if (startDateElements.length > 0) {
-                    startDateElements[0].addEventListener('click', function(e) {
+                    startDateElements[0].addEventListener('click', function (e) {
                         e.currentTarget.blur();
                     });
                 }
                 var endDateElements = document.getElementsByClassName('form-control endDate');
                 if (endDateElements.length > 0) {
-                    endDateElements[0].addEventListener('click', function(e) {
+                    endDateElements[0].addEventListener('click', function (e) {
                         e.currentTarget.blur();
                     });
                 }
@@ -149,7 +155,7 @@
                 var currentPage = $that.moreInfo.paginationInfo.currentPage;
                 var total = $that.moreInfo.paginationInfo.total;
                 var pageList = [];
-                
+
                 if (total <= 7) {
                     // 鎬婚〉鏁板皬浜庣瓑浜�7锛屾樉绀烘墍鏈夐〉鐮�
                     for (var i = 1; i <= total; i++) {
@@ -230,7 +236,7 @@
                         });
                     }
                 }
-                
+
                 $that.moreInfo.paginationInfo.pageList = pageList;
             },
             _changePageSize: function () {
@@ -260,13 +266,58 @@
                 // 瀵煎嚭鍔熻兘
                 vc.toast('瀵煎嚭鍔熻兘');
             },
-            _viewDetail: function (_item) {
+            _viewDetailPublicIncome: function (_item) {
                 // 鏌ョ湅璇︽儏
                 vc.toast('鏌ョ湅璇︽儏鍔熻兘');
             },
-            _edit: function (_item) {
-                // 缂栬緫
-                vc.toast('缂栬緫鍔熻兘');
+            _showEditPublicModal: function () {
+                const modal = document.getElementById('editPublicIncomeModal');
+                modal.classList.add('show');
+                modal.style.display = 'block';
+                modal.removeAttribute('inert');
+                modal.removeAttribute('aria-hidden');
+                modal.setAttribute('aria-modal', 'true');
+                modal.focus();
+            },
+            _hideEditPublicModal: function () {
+                const modal = document.getElementById('editPublicIncomeModal');
+                modal.classList.remove('show');
+                modal.style.display = 'none';
+                modal.setAttribute('inert', '');
+                modal.setAttribute('aria-hidden', 'true');
+                modal.removeAttribute('aria-modal');
+            },
+            _editPublicIncome: function (_item) {
+                // 缂栬緫 - 濉厖琛ㄥ崟鏁版嵁
+                // $that.moreInfo.editForm.id = _item.id || '';
+                // $that.moreInfo.editForm.amount = _item.amount || '';
+                // $that.moreInfo.editForm.meetingResolution = _item.meetingResolution || '1';
+                // $that.moreInfo.editForm.consultationForm = _item.consultationForm || '1';
+                // 鎵撳紑寮圭獥
+                $that._showEditPublicModal();
+            },
+            _saveEditPublicIncome: function () {
+                // 淇濆瓨缂栬緫
+                var param = {
+                    params: {
+                        id: $that.moreInfo.editForm.id,
+                        amount: $that.moreInfo.editForm.amount,
+                        meetingResolution: $that.moreInfo.editForm.meetingResolution,
+                        consultationForm: $that.moreInfo.editForm.consultationForm,
+                        communityId: vc.getCurrentCommunity().communityId
+                    }
+                };
+                vc.http.apiPost('/costDetail/updatePublicIncome',
+                    param,
+                    function (json, res) {
+                        vc.toast('淇濆瓨鎴愬姛');
+                        $that._hideEditPublicModal();
+                        $that._listData($that.moreInfo.paginationInfo.currentPage, $that.moreInfo.paginationInfo.rows);
+                    },
+                    function (errInfo, error) {
+                        vc.message(errInfo);
+                    }
+                );
             },
             _delete: function (_item) {
                 vc.confirm('纭畾瑕佸垹闄よ繖鏉¤褰曞悧锛�', function () {

--
Gitblit v1.8.0