diff --git a/src/api/community/communityMiniApi.js b/src/api/community/communityMiniApi.js new file mode 100644 index 0000000..d9fd067 --- /dev/null +++ b/src/api/community/communityMiniApi.js @@ -0,0 +1,81 @@ +import request from '@/utils/request' + +// 查询管理员小区列表 +export function listAdminCommunitys(params) { + return new Promise((resolve, reject) => { + request({ + url: '/community.listAdminCommunitys', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取小区列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 查询小程序列表 +export function listAdminSmallWeChats(params) { + return new Promise((resolve, reject) => { + request({ + url: '/smallWeChat.listAdminSmallWeChats', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取小程序列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 添加小程序 +export function saveAdminSmallWeChat(data) { + return new Promise((resolve, reject) => { + request({ + url: '/smallWeChat.saveAdminSmallWeChat', + 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 updateAdminSmallWeChat(data) { + return new Promise((resolve, reject) => { + request({ + url: '/smallWeChat.updateAdminSmallWeChat', + 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/api/fee/communityPaymentApi.js b/src/api/fee/communityPaymentApi.js new file mode 100644 index 0000000..7ac05e5 --- /dev/null +++ b/src/api/fee/communityPaymentApi.js @@ -0,0 +1,141 @@ +import request from '@/utils/request' + +// 获取小区支付列表 +export function listAdminPayment(params) { + return new Promise((resolve, reject) => { + request({ + url: '/payment.listAdminPayment', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取小区支付列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 保存支付配置 +export function saveAdminPaymentPool(data) { + return new Promise((resolve, reject) => { + request({ + url: '/payment.saveAdminPaymentPool', + 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 updateAdminPaymentPool(data) { + return new Promise((resolve, reject) => { + request({ + url: '/payment.updateAdminPaymentPool', + 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 deleteAdminPaymentPool(data) { + return new Promise((resolve, reject) => { + request({ + url: '/payment.deleteAdminPaymentPool', + 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 listPaymentAdapt(params) { + return new Promise((resolve, reject) => { + request({ + url: '/payment.listPaymentAdapt', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取支付厂商列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取支付密钥列表 +export function listPaymentKey(params) { + return new Promise((resolve, reject) => { + request({ + url: '/payment.listPaymentKey', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取支付密钥列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取费用项列表 +export function queryAdminFeeConfigs(params) { + return new Promise((resolve, reject) => { + request({ + url: '/feeConfig.queryAdminFeeConfigs', + method: 'get', + params + }).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/AddCommunityPayment.vue b/src/components/fee/AddCommunityPayment.vue new file mode 100644 index 0000000..02f0200 --- /dev/null +++ b/src/components/fee/AddCommunityPayment.vue @@ -0,0 +1,184 @@ + + + \ No newline at end of file diff --git a/src/components/fee/DeleteCommunityPayment.vue b/src/components/fee/DeleteCommunityPayment.vue new file mode 100644 index 0000000..0e032fc --- /dev/null +++ b/src/components/fee/DeleteCommunityPayment.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/src/components/fee/EditCommunityPayment.vue b/src/components/fee/EditCommunityPayment.vue new file mode 100644 index 0000000..063154a --- /dev/null +++ b/src/components/fee/EditCommunityPayment.vue @@ -0,0 +1,198 @@ + + + \ No newline at end of file diff --git a/src/i18n/index.js b/src/i18n/index.js index 0e9b88a..862a380 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -116,6 +116,8 @@ import { messages as aStaffMessages } from '../views/staff/aStaffLang' import { messages as aStaffDetailMessages } from '../views/staff/aStaffDetailLang' import { messages as aStaffCommunityMessages } from '../views/staff/aStaffCommunityLang' import { messages as communityWechatMessages } from '../views/community/communityWechatLang' +import { messages as communityMiniMessages } from '../views/community/communityMiniLang' +import { messages as communityPaymentMessages } from '../views/fee/communityPaymentLang' Vue.use(VueI18n) @@ -236,6 +238,8 @@ const messages = { ...aStaffDetailMessages.en, ...aStaffCommunityMessages.en, ...communityWechatMessages.en, + ...communityMiniMessages.en, + ...communityPaymentMessages.en, }, zh: { ...loginMessages.zh, @@ -352,6 +356,8 @@ const messages = { ...aStaffDetailMessages.zh, ...aStaffCommunityMessages.zh, ...communityWechatMessages.zh, + ...communityMiniMessages.zh, + ...communityPaymentMessages.zh, } } diff --git a/src/router/index.js b/src/router/index.js index 09813e3..632fc9a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -557,15 +557,25 @@ const routes = [ component: () => import('@/views/staff/aStaffDetailList.vue') }, { - path:'/pages/staff/aStaffCommunity', - name:'/pages/staff/aStaffCommunity', + path: '/pages/staff/aStaffCommunity', + name: '/pages/staff/aStaffCommunity', component: () => import('@/views/staff/aStaffCommunityList.vue') + }, + { + path: '/pages/community/communityWechat', + name: '/pages/community/communityWechat', + component: () => import('@/views/community/communityWechatList.vue') + }, + { + path: '/pages/community/communityMini', + name: '/pages/community/communityMini', + component: () => import('@/views/community/communityMiniList.vue') + }, + { + path:'/pages/fee/communityPayment', + name:'/pages/fee/communityPayment', + component: () => import('@/views/fee/communityPaymentList.vue') }, - { - path:'/pages/community/communityWechat', - name:'/pages/community/communityWechat', - component: () => import('@/views/community/communityWechatList.vue') - }, // 其他子路由可以在这里添加 ] }, diff --git a/src/views/community/communityMiniLang.js b/src/views/community/communityMiniLang.js new file mode 100644 index 0000000..cfd3bef --- /dev/null +++ b/src/views/community/communityMiniLang.js @@ -0,0 +1,38 @@ +export const messages = { + en: { + communityMini: { + title: 'Community Mini Program', + name: 'Name', + communityName: 'Community Name', + appSecret: 'App Secret', + description: 'Description', + operation: 'Operation', + add: 'Add', + edit: 'Edit', + cancel: 'Cancel', + save: 'Save', + requiredName: 'Required, please fill in the name', + requiredAppId: 'Required, please fill in APPID', + requiredSecret: 'Required, please fill in App Secret', + optionalDescription: 'Optional, please fill in description' + } + }, + zh: { + communityMini: { + title: '小区小程序', + name: '名称', + communityName: '小区名称', + appSecret: '应用密钥', + description: '描述', + operation: '操作', + add: '添加', + edit: '修改', + cancel: '取消', + save: '保存', + requiredName: '必填,请填写名称', + requiredAppId: '必填,请填写APPID', + requiredSecret: '必填,请填写应用密钥', + optionalDescription: '选填,请填写描述信息' + } + } +} \ No newline at end of file diff --git a/src/views/community/communityMiniList.vue b/src/views/community/communityMiniList.vue new file mode 100644 index 0000000..78b3217 --- /dev/null +++ b/src/views/community/communityMiniList.vue @@ -0,0 +1,124 @@ + + + + + \ No newline at end of file diff --git a/src/views/fee/communityPaymentLang.js b/src/views/fee/communityPaymentLang.js new file mode 100644 index 0000000..74467c4 --- /dev/null +++ b/src/views/fee/communityPaymentLang.js @@ -0,0 +1,98 @@ +export const messages = { + en: { + communityPayment: { + title: 'Community Payment', + search: 'Search', + add: 'Add', + edit: 'Edit', + delete: 'Delete', + confirmDelete: 'Confirm Delete', + paymentName: 'Name', + communityName: 'Community', + paymentVendor: 'Payment Vendor', + paymentScope: 'Payment Scope', + status: 'Status', + createTime: 'Create Time', + instruction: 'Instruction', + operation: 'Operation', + communityFee: 'Community Fee', + tempParkingFee: 'Temporary Parking Fee', + specificFee: 'Specific Fee Item', + enabled: 'Enabled', + disabled: 'Disabled', + selectCommunity: 'Select Community', + selectStatus: 'Select Status', + selectVendor: 'Select Vendor', + selectScope: 'Select Scope', + selectFeeItem: 'Select Fee Item', + merchantCert: 'Merchant Certificate (.p12)', + uploadFile: 'Upload Attachment', + cancel: 'Cancel', + save: 'Save', + requiredField: 'Required field' + }, + addCommunityPayment: { + title: 'Add Payment', + namePlaceholder: 'Please enter name', + vendorPlaceholder: 'Please select vendor', + scopePlaceholder: 'Please select scope', + remarkPlaceholder: 'Optional, usage instructions' + }, + editCommunityPayment: { + title: 'Edit Payment', + statusPlaceholder: 'Please select status' + }, + deleteCommunityPayment: { + title: 'Delete Confirmation', + message: 'Are you sure to delete this payment configuration?' + } + }, + zh: { + communityPayment: { + title: '小区支付', + search: '查询', + add: '添加', + edit: '修改', + delete: '删除', + confirmDelete: '确认删除', + paymentName: '名称', + communityName: '小区名称', + paymentVendor: '支付厂家', + paymentScope: '支付范围', + status: '状态', + createTime: '创建时间', + instruction: '使用说明', + operation: '操作', + communityFee: '小区费用', + tempParkingFee: '临时停车费', + specificFee: '指定费用项', + enabled: '启用', + disabled: '停用', + selectCommunity: '请选择小区', + selectStatus: '请选择状态', + selectVendor: '请选择厂家', + selectScope: '请选择范围', + selectFeeItem: '请选择费用项', + merchantCert: '商户证书(.p12)', + uploadFile: '上传附件', + cancel: '取消', + save: '保存', + requiredField: '必填项' + }, + addCommunityPayment: { + title: '添加支付', + namePlaceholder: '必填,请填写名称', + vendorPlaceholder: '必填,请选择支付厂家', + scopePlaceholder: '必填,请选择支付范围', + remarkPlaceholder: '选填,请填写使用说明' + }, + editCommunityPayment: { + title: '修改支付', + statusPlaceholder: '必填,请选择状态' + }, + deleteCommunityPayment: { + title: '删除确认', + message: '确定删除支付配置' + } + } +} \ No newline at end of file diff --git a/src/views/fee/communityPaymentList.vue b/src/views/fee/communityPaymentList.vue new file mode 100644 index 0000000..ae56bb2 --- /dev/null +++ b/src/views/fee/communityPaymentList.vue @@ -0,0 +1,195 @@ + + + + + \ No newline at end of file