From c08d1c10fbafd7f57eb51c51269a95c281383ae3 Mon Sep 17 00:00:00 2001
From: liubp <1535785116@qq.com>
Date: 星期五, 26 十二月 2025 18:33:55 +0800
Subject: [PATCH] 公共收益金增删查改

---
 public/pages/property/costDetail/costDetail.js |   53 +++++++++++++++++++----------------------------------
 1 files changed, 19 insertions(+), 34 deletions(-)

diff --git a/public/pages/property/costDetail/costDetail.js b/public/pages/property/costDetail/costDetail.js
index fd62347..870f984 100644
--- a/public/pages/property/costDetail/costDetail.js
+++ b/public/pages/property/costDetail/costDetail.js
@@ -45,36 +45,29 @@
         },
         methods: {
             _initDate: function () {
-                // 骞翠唤杈撳叆妗嗕笉闇�瑕佺壒娈婂垵濮嬪寲锛屼娇鐢� v-model 鍙屽悜缁戝畾鍗冲彲
             },
             _loadCommunityList: function () {
-                // 鑾峰彇鎵�鏈夊皬鍖哄垪琛�
                 var communityInfos = vc.getCommunitys();
                 if (communityInfos && Array.isArray(communityInfos) && communityInfos.length > 0) {
                     $that.costDetailInfo.communityList = communityInfos;
-                    // 榛樿閫夋嫨绗竴涓皬鍖�
                     $that.costDetailInfo.conditions.communityName = communityInfos[0].name;
                 } else {
-                    // 濡傛灉鑾峰彇涓嶅埌鍒楄〃锛屼娇鐢ㄥ綋鍓嶅皬鍖�
                     var currentCommunity = vc.getCurrentCommunity();
                     if (currentCommunity && currentCommunity.name) {
                         $that.costDetailInfo.communityList = [currentCommunity];
                         $that.costDetailInfo.conditions.communityName = currentCommunity.name;
                     }
                 }
-                // 鍔犺浇鏁版嵁
                 $that._listCostDetails(DEFAULT_PAGE, DEFAULT_ROWS);
             },
             _listCostDetails: function (_page, _rows) {
-                // 浣跨敤閫変腑鐨勫皬鍖哄悕绉帮紝濡傛灉娌℃湁閫変腑鍒欎娇鐢ㄥ綋鍓嶅皬鍖哄悕绉�
                 var selectedCommunityName = $that.costDetailInfo.conditions.communityName || vc.getCurrentCommunity().name;
                 var params = {
                     communityName: selectedCommunityName,
                     page: _page,
                     row: _rows
                 };
-                
-                // 娣诲姞鍙�夋煡璇㈠弬鏁�
+
                 if ($that.costDetailInfo.conditions.flowNumber) {
                     params.flowNumber = $that.costDetailInfo.conditions.flowNumber;
                 }
@@ -87,21 +80,21 @@
                 if ($that.costDetailInfo.conditions.projectName) {
                     params.projectName = $that.costDetailInfo.conditions.projectName;
                 }
-                
+
                 var param = {
                     params: params
                 };
-                
+
                 vc.http.apiGet('/maintenancePayment/queryMaintenancePayment',
                     param,
                     function (json, res) {
                         try {
                             var _json = JSON.parse(json);
-                            
+
                             if (_json.code === 0 && _json.data) {
                                 var records = Array.isArray(_json.data) ? _json.data : [];
-                                
-                                var mappedRecords = records.map(function(item) {
+
+                                var mappedRecords = records.map(function (item) {
                                     var dateStr = '';
                                     if (item.date) {
                                         dateStr = item.date.substring(0, 7);
@@ -109,7 +102,7 @@
                                         var monthStr = item.month < 10 ? '0' + item.month : String(item.month);
                                         dateStr = item.year + '-' + monthStr;
                                     }
-                                    
+
                                     return {
                                         flowCode: item.flowNumber || '--',
                                         communityCode: item.projectCode || '--',
@@ -130,10 +123,10 @@
                                         _originalData: item
                                     };
                                 });
-                                
+
                                 var total = _json.total || 0;
                                 var totalPages = _json.records || 1;
-                                
+
                                 $that.costDetailInfo.paginationInfo.dataCount = total;
                                 $that.costDetailInfo.paginationInfo.total = totalPages;
                                 $that.costDetailInfo.costDetails = mappedRecords;
@@ -168,7 +161,7 @@
                 var currentPage = $that.costDetailInfo.paginationInfo.currentPage;
                 var total = $that.costDetailInfo.paginationInfo.total;
                 var pageList = [];
-                
+
                 if (total <= 7) {
                     for (var i = 1; i <= total; i++) {
                         pageList.push({
@@ -244,14 +237,13 @@
                         });
                     }
                 }
-                
+
                 $that.costDetailInfo.paginationInfo.pageList = pageList;
             },
             _queryCostDetails: function () {
                 $that._listCostDetails(DEFAULT_PAGE, $that.costDetailInfo.paginationInfo.rows);
             },
             _resetQuery: function () {
-                // 閲嶇疆鏃舵仮澶嶄负绗竴涓皬鍖�
                 if ($that.costDetailInfo.communityList && $that.costDetailInfo.communityList.length > 0) {
                     $that.costDetailInfo.conditions.communityName = $that.costDetailInfo.communityList[0].name;
                 } else {
@@ -285,27 +277,21 @@
                 $that._listCostDetails(page, $that.costDetailInfo.paginationInfo.rows);
             },
             _downloadTemplate: function () {
-                // 涓嬭浇妯℃澘
                 vc.toast('妯℃澘涓嬭浇鍔熻兘');
             },
             _importCostDetail: function () {
-                // 鎵撳紑鏈湴鏂囦欢
                 vc.toast('璐圭敤瀵煎叆鍔熻兘');
             },
             _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);
             },
             _deleteCostDetail: function (_item) {
@@ -321,10 +307,10 @@
                         };
                         vc.http.apiPost('/maintenancePayment/deleteMaintenancePayment',
                             JSON.stringify(param), {
-                                headers: {
-                                    'Content-Type': 'application/json'
-                                }
-                            },
+                            headers: {
+                                'Content-Type': 'application/json'
+                            }
+                        },
                             function (json, res) {
                                 try {
                                     var _json = JSON.parse(json);
@@ -346,7 +332,6 @@
                         );
                     });
                 } else {
-                    // 濡傛灉 vc.confirm 涓嶅瓨鍦紝浣跨敤 window.confirm 浣滀负鍚庡鏂规
                     if (window.confirm('纭畾瑕佸垹闄よ繖鏉¤垂鐢ㄦ槑缁嗗悧锛�')) {
                         var param = {
                             id: _item.costDetailId,
@@ -354,10 +339,10 @@
                         };
                         vc.http.apiPost('/maintenancePayment/deleteMaintenancePayment',
                             JSON.stringify(param), {
-                                headers: {
-                                    'Content-Type': 'application/json'
-                                }
-                            },
+                            headers: {
+                                'Content-Type': 'application/json'
+                            }
+                        },
                             function (json, res) {
                                 try {
                                     var _json = JSON.parse(json);

--
Gitblit v1.8.0