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'
                }
            }
        },
@@ -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 () {