diff --git a/src/api/fee/feeConfigManageApi.js b/src/api/fee/feeConfigManageApi.js new file mode 100644 index 0000000..e407814 --- /dev/null +++ b/src/api/fee/feeConfigManageApi.js @@ -0,0 +1,73 @@ +import request from '@/utils/request' + +// 获取费用配置列表 +export function listFeeConfigs(params) { + return new Promise((resolve, reject) => { + request({ + url: '/feeConfig.listFeeConfigs', + method: 'get', + params + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 添加费用配置 +export function saveFeeConfig(data) { + return new Promise((resolve, reject) => { + request({ + url: '/feeConfig.saveFeeConfig', + method: 'post', + data + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 更新费用配置 +export function updateFeeConfig(data) { + return new Promise((resolve, reject) => { + request({ + url: '/feeConfig.updateFeeConfig', + method: 'post', + data + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || '更新费用配置失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 删除费用配置 +export function deleteFeeConfig(data) { + return new Promise((resolve, reject) => { + request({ + url: '/feeConfig.deleteFeeConfig', + method: 'post', + data + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || '删除费用配置失败')) + } + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/components/fee/addFeeConfig.vue b/src/components/fee/addFeeConfig.vue new file mode 100644 index 0000000..9a1fb53 --- /dev/null +++ b/src/components/fee/addFeeConfig.vue @@ -0,0 +1,357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C {{ $t('feeConfigManage.explanationC') }} + F {{ $t('feeConfigManage.explanationF') }} + U {{ $t('feeConfigManage.explanationU') }} + R {{ $t('feeConfigManage.explanationR') }} + X {{ $t('feeConfigManage.explanationX') }} + L {{ $t('feeConfigManage.explanationL') }} + {{ $t('feeConfigManage.example1') }} + {{ $t('feeConfigManage.example2') }} + + + + + + + + {{ $t('common.cancel') }} + {{ $t('common.save') }} + + + + + + + \ No newline at end of file diff --git a/src/components/fee/deleteFeeConfig.vue b/src/components/fee/deleteFeeConfig.vue new file mode 100644 index 0000000..40eda7c --- /dev/null +++ b/src/components/fee/deleteFeeConfig.vue @@ -0,0 +1,45 @@ + + + {{ $t('feeConfigManage.confirmDeleteFeeItem') }} + + + {{ $t('common.cancel') }} + {{ $t('common.delete') }} + + + + + \ No newline at end of file diff --git a/src/components/fee/editFeeConfig.vue b/src/components/fee/editFeeConfig.vue new file mode 100644 index 0000000..b81d148 --- /dev/null +++ b/src/components/fee/editFeeConfig.vue @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C {{ $t('feeConfigManage.explanationC') }} + F {{ $t('feeConfigManage.explanationF') }} + U {{ $t('feeConfigManage.explanationU') }} + R {{ $t('feeConfigManage.explanationR') }} + X {{ $t('feeConfigManage.explanationX') }} + L {{ $t('feeConfigManage.explanationL') }} + {{ $t('feeConfigManage.example1') }} + {{ $t('feeConfigManage.example2') }} + + + + + + + + {{ $t('common.cancel') }} + {{ $t('common.save') }} + + + + + + + \ No newline at end of file diff --git a/src/i18n/commonLang.js b/src/i18n/commonLang.js index 50ea879..b5e9f9b 100644 --- a/src/i18n/commonLang.js +++ b/src/i18n/commonLang.js @@ -32,7 +32,13 @@ export const messages = { male: 'Male', all: 'All', refresh: 'Refresh', - export: 'Export' + export: 'Export', + query: 'Query', + yes: 'Yes', + no: 'No', + status: 'Status', + enabled: 'Enabled', + disabled: 'Disabled', } }, zh: { @@ -68,7 +74,13 @@ export const messages = { male: '男', all: '全部', refresh: '刷新', - export: '导出' + export: '导出', + query: '查询', + yes: '是', + no: '否', + status: '状态', + enabled: '启用', + disabled: '禁用', } } } \ No newline at end of file diff --git a/src/i18n/index.js b/src/i18n/index.js index 57f72f4..42c7d12 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -120,6 +120,7 @@ import { messages as communityMiniMessages } from '../views/community/communityM import { messages as communityPaymentMessages } from '../views/fee/communityPaymentLang' import { messages as enterCommunityMessages } from '../views/community/enterCommunityLang' import { messages as roomRenovationManageMessages } from '../views/community/roomRenovationManageLang' +import { messages as feeConfigManageMessages } from '../views/fee/feeConfigManageLang' Vue.use(VueI18n) @@ -244,6 +245,7 @@ const messages = { ...communityPaymentMessages.en, ...enterCommunityMessages.en, ...roomRenovationManageMessages.en, + ...feeConfigManageMessages.en, }, zh: { ...loginMessages.zh, @@ -364,6 +366,7 @@ const messages = { ...communityPaymentMessages.zh, ...enterCommunityMessages.zh, ...roomRenovationManageMessages.zh, + ...feeConfigManageMessages.zh, } } diff --git a/src/router/index.js b/src/router/index.js index 6f251c5..4c89867 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -586,6 +586,11 @@ const routes = [ name: '/pages/property/roomRenovationManage', component: () => import('@/views/community/roomRenovationManageList.vue') }, + { + path:'/pages/property/feeConfigManage', + name:'/pages/property/feeConfigManage', + component: () => import('@/views/fee/feeConfigManageList.vue') + }, // 其他子路由可以在这里添加 ] }, diff --git a/src/views/fee/feeConfigManageLang.js b/src/views/fee/feeConfigManageLang.js new file mode 100644 index 0000000..5d8d592 --- /dev/null +++ b/src/views/fee/feeConfigManageLang.js @@ -0,0 +1,144 @@ +export const messages = { + en: { + feeConfigManage: { + queryCondition: 'Query Conditions', + feeItems: 'Fee Items', + hide: 'Hide', + more: 'More', + enterFeeItemId: 'Please enter fee item ID', + enterFeeItem: 'Please enter fee item', + selectFeeFlag: 'Please select fee flag', + selectPaymentType: 'Please select payment type', + selectAccountDeduction: 'Please select account deduction', + selectDefaultFee: 'Please select default fee', + number: 'Number', + feeType: 'Fee Type', + feeItem: 'Fee Item', + feeFlag: 'Fee Flag', + paymentType: 'Payment Type', + paymentCycle: 'Payment Cycle (months)', + formula: 'Formula', + unitPrice: 'Unit Price (¥)', + additionalFee: 'Additional/Fixed Fee (¥)', + accountDeduction: 'Account Deduction', + operation: 'Operation', + discount: 'Discount', + detail: 'Detail', + feeFlagTip: 'Fee flag: Periodic fees are charged continuously (e.g., property fees), one-time fees are charged only once (e.g., deposits).', + paymentTypeTip: 'Payment type: Prepaid fees are charged in advance, postpaid fees are charged afterward.', + accountDeductionTip: 'Account deduction: Indicates whether fees can be deducted from the account balance.', + enterFeeType: 'Required, please select fee type', + enterFeeItemRequired: 'Required, please enter fee item', + selectFeeFlagRequired: 'Required, please select fee flag', + enterPaymentCycle: 'Required, please enter payment cycle', + enterPrepaymentPeriod: 'Required, please enter prepayment period', + enterUnit: 'Required, please enter unit (e.g., yuan)', + mobilePayment: 'Mobile Payment', + roundingMethod: 'Rounding Method', + roundHalfUp: 'Round Half Up', + roundUp: 'Round Up', + roundDown: 'Round Down', + decimalPlaces: 'Decimal Places', + integer: 'Integer', + oneDecimal: '1 decimal', + twoDecimal: '2 decimals', + threeDecimal: '3 decimals', + fourDecimal: '4 decimals', + status: 'Status', + formulaRequired: 'Required, please select formula', + enterUnitPrice: 'Required, please enter unit price', + enterAdditionalFee: 'Required, please enter additional fee', + enterFormula: 'Required, please enter formula', + explanationC: 'represents community area corresponding to the property', + explanationF: 'represents building area corresponding to the property', + explanationU: 'represents unit area corresponding to the property', + explanationR: 'represents property area', + explanationX: 'represents property fee coefficient (configured in property management)', + explanationL: 'represents property floor number', + example1: 'Example: Elevator usage fee (floor number - 5) * unit price per floor + base fee', + example2: 'Formula: (L-5)*5 + 10', + confirmOperation: 'Please confirm your operation', + confirmDeleteFeeItem: 'Are you sure you want to delete this fee item?', + confirmDelete: 'Confirm Delete', + cancelDelete: 'Cancel', + fixedFee: 'Fixed Fee', + prepaymentPeriodRequired: 'Prepayment period is required', + disabledAndEndFee: 'Disabled and End Fee', + prepaid: 'Prepaid', + postpaid: 'Postpaid', + unit: 'Unit', + prepaymentPeriod: 'Prepayment Period', + } + }, + zh: { + feeConfigManage: { + queryCondition: '查询条件', + feeItems: '费用项', + hide: '隐藏', + more: '更多', + enterFeeItemId: '请输入费用项ID', + enterFeeItem: '请输入收费项目', + selectFeeFlag: '请选择费用标识', + selectPaymentType: '请选择付费类型', + selectAccountDeduction: '请选择账户抵扣', + selectDefaultFee: '请选择默认费用', + number: '编号', + feeType: '费用类型', + feeItem: '收费项目', + feeFlag: '费用标识', + paymentType: '付费类型', + paymentCycle: '缴费周期(单位:月)', + formula: '公式', + unitPrice: '计费单价(单位:元)', + additionalFee: '附加/固定费用(单位:元)', + accountDeduction: '账户抵扣', + operation: '操作', + discount: '折扣', + detail: '详情', + feeFlagTip: '费用标识:分为周期费用和一次性费用,周期费是连续收费的费用比如物业费每年都会收取,所以物业费建议用周期费;', + paymentTypeTip: '付费类型:分为预付费和后付费,预付费表示费用提前收费 后付费表示之后收取;', + accountDeductionTip: '账户抵扣:表示费用是否可以从账户余额中抵扣;', + enterFeeType: '必填,请选择费用类型', + enterFeeItemRequired: '必填,请填写收费项目', + selectFeeFlagRequired: '必填,请选择费用标识', + enterPaymentCycle: '必填,请填写缴费周期', + enterPrepaymentPeriod: '必填,请填写预付期', + enterUnit: '必填,请填写单位(如:元)', + mobilePayment: '手机缴费', + roundingMethod: '进位方式', + roundHalfUp: '四舍五入', + roundUp: '向上进位', + roundDown: '向下进位', + decimalPlaces: '保留小数位', + integer: '取整', + oneDecimal: '1位', + twoDecimal: '2位', + threeDecimal: '3位', + fourDecimal: '4位', + status: '状态', + formulaRequired: '必填,请选择计算公式', + enterUnitPrice: '必填,请填写计费单价', + enterAdditionalFee: '必填,请填写附加费用', + enterFormula: '必填,请填写公式', + explanationC: '代表房屋对应小区面积', + explanationF: '代表房屋对应楼栋面积', + explanationU: '代表房屋对应单元面积', + explanationR: '代表房屋面积', + explanationX: '代表房屋收费系数(房屋管理中配置)', + explanationL: '代表房屋层数', + example1: '举例:电梯使用费 (层数-5)*每层单价+基础费用', + example2: '公式:(L-5)*5 + 10', + confirmOperation: '请确认您的操作', + confirmDeleteFeeItem: '确定删除费用项?', + confirmDelete: '确认删除', + cancelDelete: '点错了', + fixedFee: '固定费用', + prepaymentPeriodRequired: '预付期不能为空', + disabledAndEndFee: '停用并结束费用', + prepaid: '预付费', + postpaid: '后付费', + unit: '单位', + prepaymentPeriod: '预付期' + } + } +} \ No newline at end of file diff --git a/src/views/fee/feeConfigManageList.vue b/src/views/fee/feeConfigManageList.vue new file mode 100644 index 0000000..4352f87 --- /dev/null +++ b/src/views/fee/feeConfigManageList.vue @@ -0,0 +1,341 @@ + + + + + + + + + {{ item.name }} + + + + + + + + + {{ $t('feeConfigManage.queryCondition') }} + + {{ moreCondition ? $t('feeConfigManage.hide') : $t('feeConfigManage.more') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('common.query') }} + + + {{ $t('common.reset') }} + + + + + + + + + + + + + + + + + + + {{ $t('feeConfigManage.feeItems') }} + + + {{ $t('common.document') }} + + + {{ $t('common.add') }} + + + + + + + + + + + + {{ scope.row.paymentCd == '1200' ? $t('feeConfigManage.prepaid') : $t('feeConfigManage.postpaid') }} + + + + + + + {{ scope.row.computingFormula == '2002' ? '-' : scope.row.squarePrice }} + + + + + + {{ scope.row.deductFrom == 'Y' ? $t('common.yes') : $t('common.no') }} + + + + + {{ scope.row.state == 'Y' ? $t('common.enabled') : $t('common.disabled') }} + + + + + + {{ $t('common.edit') }} + + + {{ $t('feeConfigManage.discount') }} + + + {{ $t('common.delete') }} + + + {{ $t('common.detail') }} + + + + + + + + + {{ $t('feeConfigManage.feeFlagTip') }} + {{ $t('feeConfigManage.paymentTypeTip') }} + {{ $t('feeConfigManage.accountDeductionTip') }} + + + + + + + + + + + + + + + + + + + \ No newline at end of file
{{ $t('feeConfigManage.confirmDeleteFeeItem') }}
{{ $t('feeConfigManage.feeFlagTip') }}
{{ $t('feeConfigManage.paymentTypeTip') }}
{{ $t('feeConfigManage.accountDeductionTip') }}