-
![]()
-
+
+
+
+
![]()
+
+
+
@@ -12,72 +19,100 @@ export default {
name: 'ViewImage',
data() {
return {
- url: '',
- showImage: false,
- imgWidth: 800,
- imgHeight: 800
+ visible: false,
+ imageUrl: '',
+ imageWidth: 0,
+ imageHeight: 0
}
},
computed: {
- imgStyle() {
+ imageStyle() {
return {
- width: `${this.imgWidth}px`,
- height: `${this.imgHeight}px`
+ width: this.imageWidth ? `${this.imageWidth}px` : 'auto',
+ height: this.imageHeight ? `${this.imageHeight}px` : 'auto',
+ maxWidth: '90vw',
+ maxHeight: '90vh'
}
}
},
methods: {
open(url) {
- this.url = url
- this.showImage = true
- this.calculateSize(url)
+ this.imageUrl = url
+ this.visible = true
+ this.$nextTick(() => {
+ this.calculateImageSize(url)
+ })
},
close() {
- this.showImage = false
+ this.visible = false
+ this.imageUrl = ''
+ this.imageWidth = 0
+ this.imageHeight = 0
},
- calculateSize(url) {
+ handleImageError(e) {
+ e.target.src = '/img/noPhoto.jpg'
+ },
+ calculateImageSize(url) {
const img = new Image()
img.src = url
img.onload = () => {
- const ratio = img.width / img.height
- this.imgWidth = 800
- this.imgHeight = 800 / ratio
+ const maxWidth = window.innerWidth * 0.8
+ const maxHeight = window.innerHeight * 0.8
+ const ratio = Math.min(maxWidth / img.width, maxHeight / img.height, 1)
+ this.imageWidth = img.width * ratio
+ this.imageHeight = img.height * ratio
}
- },
- handleError() {
- this.url = '/img/noPhoto.jpg'
}
}
}
-
\ No newline at end of file
diff --git a/src/i18n/feeI18n.js b/src/i18n/feeI18n.js
index 594bf4d..98785bf 100644
--- a/src/i18n/feeI18n.js
+++ b/src/i18n/feeI18n.js
@@ -3,6 +3,9 @@ import { messages as meterWaterManageMessages } from '../views/fee/meterWaterMan
import { messages as meterTypeManageMessages } from '../views/fee/meterTypeManageLang'
import { messages as returnPayFeeManageMessages } from '../views/fee/returnPayFeeManageLang'
import { messages as feeDiscountManageMessages } from '../views/fee/feeDiscountManageLang'
+import { messages as applyRoomDiscountManageMessages } from '../views/fee/applyRoomDiscountManageLang'
+import { messages as discountTypeMessages } from '../views/fee/discountTypeLang'
+
export const messages = {
en: {
...contractCreateFeeMessages.en,
@@ -10,6 +13,8 @@ export const messages = {
...meterTypeManageMessages.en,
...returnPayFeeManageMessages.en,
...feeDiscountManageMessages.en,
+ ...applyRoomDiscountManageMessages.en,
+ ...discountTypeMessages.en,
},
zh: {
...contractCreateFeeMessages.zh,
@@ -17,5 +22,7 @@ export const messages = {
...meterTypeManageMessages.zh,
...returnPayFeeManageMessages.zh,
...feeDiscountManageMessages.zh,
+ ...applyRoomDiscountManageMessages.zh,
+ ...discountTypeMessages.zh,
}
}
\ No newline at end of file
diff --git a/src/router/feeRouter.js b/src/router/feeRouter.js
index f2e76c9..33c8f00 100644
--- a/src/router/feeRouter.js
+++ b/src/router/feeRouter.js
@@ -20,8 +20,18 @@ export default [
component: () => import('@/views/fee/returnPayFeeManageList.vue')
},
{
- path:'/pages/property/feeDiscountManage',
- name:'/pages/property/feeDiscountManage',
+ path: '/pages/property/feeDiscountManage',
+ name: '/pages/property/feeDiscountManage',
component: () => import('@/views/fee/feeDiscountManageList.vue')
+ },
+ {
+ path: '/pages/property/applyRoomDiscountManage',
+ name: '/pages/property/applyRoomDiscountManage',
+ component: () => import('@/views/fee/applyRoomDiscountManageList.vue')
+ },
+ {
+ path:'/views/fee/discountType',
+ name:'/views/fee/discountType',
+ component: () => import('@/views/fee/discountTypeList.vue')
},
]
\ No newline at end of file
diff --git a/src/views/fee/applyRoomDiscountManageLang.js b/src/views/fee/applyRoomDiscountManageLang.js
new file mode 100644
index 0000000..68eaab3
--- /dev/null
+++ b/src/views/fee/applyRoomDiscountManageLang.js
@@ -0,0 +1,338 @@
+export const messages = {
+ en: {
+ applyRoomDiscount: {
+ search: {
+ title: 'Search Conditions',
+ roomName: 'Please enter room name (Building-Unit-Room)',
+ applyType: 'Please select application type',
+ state: 'Please select status'
+ },
+ list: {
+ title: 'Discount Application'
+ },
+ table: {
+ roomName: 'Room (Building-Unit-Room)',
+ discountId: 'Discount ID',
+ discountName: 'Discount Name',
+ applyType: 'Application Type',
+ createUser: 'Applicant',
+ createUserTel: 'Applicant Phone',
+ startTime: 'Start Time',
+ endTime: 'End Time',
+ state: 'Status',
+ createTime: 'Create Time',
+ inUse: 'Usage Status',
+ returnType: 'Return Type',
+ returnAmount: 'Return Amount'
+ },
+ button: {
+ discountType: 'Discount Type',
+ phoneApply: 'Phone Application',
+ export: 'Export',
+ check: 'Check',
+ record: 'Record',
+ review: 'Review',
+ edit: 'Edit',
+ delete: 'Delete'
+ },
+ status: {
+ notUsed: 'Not Used',
+ used: 'Used',
+ checkPass: 'Check Passed',
+ checkReject: 'Check Rejected',
+ reviewPass: 'Review Passed',
+ reviewReject: 'Review Rejected'
+ },
+ returnType: {
+ account: 'Account Balance',
+ discount: 'Discount'
+ },
+ discountType: {
+ discount: 'Discount (Need Application)'
+ },
+ returnWay: {
+ discount: 'Enjoy Payment Discount',
+ account: 'Refund to Balance Account'
+ },
+ add: {
+ title: 'Phone Application',
+ room: 'Room',
+ roomPlaceholder: 'Required, please fill in room (Building-Unit-Room)',
+ applyType: 'Application Type',
+ applyTypePlaceholder: 'Required, please select application type',
+ feeItem: 'Fee Item',
+ feeItemPlaceholder: 'Please select fee item',
+ createUser: 'Applicant',
+ createUserPlaceholder: 'Required, please fill in applicant',
+ createUserTel: 'Applicant Phone',
+ createUserTelPlaceholder: 'Required, please fill in applicant phone',
+ startTime: 'Start Time',
+ startTimePlaceholder: 'Required, please fill in start time',
+ endTime: 'End Time',
+ endTimePlaceholder: 'Required, please fill in end time',
+ createRemark: 'Application Description',
+ createRemarkPlaceholder: 'Required, please fill in application description',
+ images: 'Image Materials'
+ },
+ edit: {
+ title: 'Check Room',
+ startTime: 'Start Time',
+ startTimePlaceholder: 'Required, please fill in start time',
+ endTime: 'End Time',
+ endTimePlaceholder: 'Required, please fill in end time',
+ state: 'Check Status',
+ statePlaceholder: 'Required, please select status',
+ createRemark: 'Application Description',
+ checkRemark: 'Check Description',
+ checkRemarkPlaceholder: 'Required, please fill in check description',
+ images: 'Image Materials'
+ },
+ editRecord: {
+ title: 'Edit Discount Application',
+ ardId: 'Application ID',
+ roomName: 'Room (Building-Unit-Room)',
+ applyTypeName: 'Application Type',
+ createUserName: 'Applicant',
+ createUserTel: 'Applicant Phone',
+ startTime: 'Start Time',
+ startTimePlaceholder: 'Required, please fill in start time',
+ endTime: 'End Time',
+ endTimePlaceholder: 'Required, please fill in end time',
+ stateName: 'Status'
+ },
+ review: {
+ title: 'Review',
+ discountType: 'Discount Type',
+ discountTypePlaceholder: 'Required, please select discount type',
+ discountName: 'Discount Name',
+ discountNamePlaceholder: 'Required, please select discount name',
+ returnWay: 'Return Way',
+ returnWayPlaceholder: 'Please select return way',
+ paymentRecords: 'Payment Records',
+ refundAmount: 'Return Amount',
+ refundAmountPlaceholder: 'Required, please fill in return amount',
+ startTime: 'Start Time',
+ startTimePlaceholder: 'Required, please fill in start time',
+ endTime: 'End Time',
+ endTimePlaceholder: 'Required, please fill in end time',
+ state: 'Review Status',
+ statePlaceholder: 'Required, please select status',
+ createRemark: 'Application Remark',
+ checkRemark: 'Check Remark',
+ reviewRemark: 'Review Remark',
+ reviewRemarkPlaceholder: 'Required, please fill in review description',
+ images: 'Image Materials'
+ },
+ delete: {
+ title: 'Please confirm your operation',
+ confirmText: 'Confirm to delete the room discount application?'
+ },
+ validate: {
+ roomRequired: 'Room cannot be empty',
+ roomFormat: 'Room format error',
+ roomNotFound: 'Room not found',
+ applyTypeRequired: 'Application type cannot be empty',
+ feeIdRequired: 'Fee item cannot be empty',
+ createUserRequired: 'Applicant cannot be empty',
+ createUserFormat: 'Applicant format error',
+ createUserTelRequired: 'Applicant phone cannot be empty',
+ createUserTelFormat: 'Applicant phone format error',
+ startTimeRequired: 'Start time cannot be empty',
+ endTimeRequired: 'End time cannot be empty',
+ dateInvalid: 'End time must be greater than start time',
+ createRemarkRequired: 'Application description cannot be empty',
+ createRemarkFormat: 'Application description too long',
+ checkRemarkRequired: 'Check description cannot be empty',
+ checkRemarkFormat: 'Check description too long',
+ reviewRemarkRequired: 'Review description cannot be empty',
+ reviewRemarkFormat: 'Review description too long',
+ stateRequired: 'Status cannot be empty',
+ ardIdRequired: 'Application ID cannot be empty',
+ discountIdRequired: 'Discount name cannot be empty',
+ discountTypeRequired: 'Discount type cannot be empty',
+ returnWayRequired: 'Return way cannot be empty',
+ refundAmountRequired: 'Return amount cannot be empty',
+ refundAmountFormat: 'Return amount format error'
+ },
+ message: {
+ saveSuccess: 'Application successful',
+ saveFailed: 'Application failed',
+ updateSuccess: 'Update successful',
+ updateFailed: 'Update failed',
+ reviewSuccess: 'Review successful',
+ reviewFailed: 'Review failed',
+ deleteSuccess: 'Delete successful',
+ deleteFailed: 'Delete failed',
+ fetchError: 'Failed to get data'
+ }
+ }
+ },
+ zh: {
+ applyRoomDiscount: {
+ search: {
+ title: '查询条件',
+ roomName: '请输入房屋名称(楼栋-单元-房屋)',
+ applyType: '请选择申请类型',
+ state: '请选择状态'
+ },
+ list: {
+ title: '优惠申请'
+ },
+ table: {
+ roomName: '房屋(楼栋-单元-房屋)',
+ discountId: '折扣ID',
+ discountName: '折扣名称',
+ applyType: '申请类型',
+ createUser: '申请人',
+ createUserTel: '申请电话',
+ startTime: '开始时间',
+ endTime: '结束时间',
+ state: '状态',
+ createTime: '创建时间',
+ inUse: '使用状态',
+ returnType: '返还类型',
+ returnAmount: '返还金额'
+ },
+ button: {
+ discountType: '优惠类型',
+ phoneApply: '电话申请',
+ export: '导出',
+ check: '验房',
+ record: '跟踪记录',
+ review: '审核',
+ edit: '修改',
+ delete: '删除'
+ },
+ status: {
+ notUsed: '未使用',
+ used: '已使用',
+ checkPass: '验房通过',
+ checkReject: '验房不通过',
+ reviewPass: '审批通过',
+ reviewReject: '审批不通过'
+ },
+ returnType: {
+ account: '账户余额',
+ discount: '折扣'
+ },
+ discountType: {
+ discount: '优惠(需要申请)'
+ },
+ returnWay: {
+ discount: '享受缴纳折扣',
+ account: '预缴金额返还至余额账户'
+ },
+ add: {
+ title: '电话申请',
+ room: '房屋',
+ roomPlaceholder: '必填,请填写房屋 楼栋-单元-房屋',
+ applyType: '申请类型',
+ applyTypePlaceholder: '必填,请选择申请类型',
+ feeItem: '费用项目',
+ feeItemPlaceholder: '请选择费用项目',
+ createUser: '申请人',
+ createUserPlaceholder: '必填,请填写申请人',
+ createUserTel: '申请电话',
+ createUserTelPlaceholder: '必填,请填写申请电话',
+ startTime: '开始时间',
+ startTimePlaceholder: '必填,请填写开始时间',
+ endTime: '结束时间',
+ endTimePlaceholder: '必填,请填写结束时间',
+ createRemark: '申请说明',
+ createRemarkPlaceholder: '必填,请填写申请说明',
+ images: '图片材料'
+ },
+ edit: {
+ title: '验房',
+ startTime: '开始时间',
+ startTimePlaceholder: '必填,请填写开始时间',
+ endTime: '结束时间',
+ endTimePlaceholder: '必填,请填写结束时间',
+ state: '验房状态',
+ statePlaceholder: '必填,请选择状态',
+ createRemark: '申请说明',
+ checkRemark: '验房说明',
+ checkRemarkPlaceholder: '必填,请填写验房说明',
+ images: '图片资料'
+ },
+ editRecord: {
+ title: '修改优惠申请',
+ ardId: '申请ID',
+ roomName: '房屋(楼栋-单元-房屋)',
+ applyTypeName: '申请类型',
+ createUserName: '申请人',
+ createUserTel: '申请电话',
+ startTime: '开始时间',
+ startTimePlaceholder: '必填,请填写开始时间',
+ endTime: '结束时间',
+ endTimePlaceholder: '必填,请填写结束时间',
+ stateName: '状态'
+ },
+ review: {
+ title: '审批',
+ discountType: '折扣类型',
+ discountTypePlaceholder: '必填,请选择折扣类型',
+ discountName: '折扣名称',
+ discountNamePlaceholder: '必填,请选择折扣名称',
+ returnWay: '返还方式',
+ returnWayPlaceholder: '请选择返还方式',
+ paymentRecords: '缴费记录',
+ refundAmount: '返还金额',
+ refundAmountPlaceholder: '必填,请填写返还金额',
+ startTime: '开始时间',
+ startTimePlaceholder: '必填,请填写开始时间',
+ endTime: '结束时间',
+ endTimePlaceholder: '必填,请填写结束时间',
+ state: '审批状态',
+ statePlaceholder: '必填,请选择状态',
+ createRemark: '申请备注',
+ checkRemark: '验房备注',
+ reviewRemark: '审批备注',
+ reviewRemarkPlaceholder: '必填,请填写审批说明',
+ images: '图片资料'
+ },
+ delete: {
+ title: '请确认您的操作',
+ confirmText: '确定删除房屋折扣申请?'
+ },
+ validate: {
+ roomRequired: '房屋不能为空',
+ roomFormat: '房屋格式错误',
+ roomNotFound: '未找到房屋',
+ applyTypeRequired: '申请类型不能为空',
+ feeIdRequired: '费用项不能为空',
+ createUserRequired: '申请人不能为空',
+ createUserFormat: '申请人错误',
+ createUserTelRequired: '申请电话不能为空',
+ createUserTelFormat: '申请电话错误',
+ startTimeRequired: '开始时间不能为空',
+ endTimeRequired: '结束时间不能为空',
+ dateInvalid: '结束时间必须大于开始时间',
+ createRemarkRequired: '申请说明不能为空',
+ createRemarkFormat: '申请说明过长',
+ checkRemarkRequired: '验房说明不能为空',
+ checkRemarkFormat: '验房说明过长',
+ reviewRemarkRequired: '审批说明不能为空',
+ reviewRemarkFormat: '审批说明过长',
+ stateRequired: '状态不能为空',
+ ardIdRequired: '申请ID不能为空',
+ discountIdRequired: '折扣名称不能为空',
+ discountTypeRequired: '折扣类型不能为空',
+ returnWayRequired: '返还方式不能为空',
+ refundAmountRequired: '返还金额不能为空',
+ refundAmountFormat: '返还金额格式错误'
+ },
+ message: {
+ saveSuccess: '申请成功',
+ saveFailed: '申请失败',
+ updateSuccess: '修改成功',
+ updateFailed: '修改失败',
+ reviewSuccess: '审批成功',
+ reviewFailed: '审批失败',
+ deleteSuccess: '删除成功',
+ deleteFailed: '删除失败',
+ fetchError: '获取数据失败'
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/views/fee/applyRoomDiscountManageList.vue b/src/views/fee/applyRoomDiscountManageList.vue
new file mode 100644
index 0000000..c8753de
--- /dev/null
+++ b/src/views/fee/applyRoomDiscountManageList.vue
@@ -0,0 +1,288 @@
+
+
+
+
+
+ {{ $t('applyRoomDiscount.search.title') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('common.search') }}
+
+
+ {{ $t('common.reset') }}
+
+
+
+
+
+
+
+
+
{{ $t('applyRoomDiscount.list.title') }}
+
+
+ {{ $t('applyRoomDiscount.button.discountType') }}
+
+
+
+ {{ $t('applyRoomDiscount.button.phoneApply') }}
+
+
+
+ {{ $t('applyRoomDiscount.button.export') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.inUse === '0' ? $t('applyRoomDiscount.status.notUsed') : $t('applyRoomDiscount.status.used') }}
+
+
+
+
+ {{ scope.row.discountId ? (scope.row.returnWay === '1002' ? $t('applyRoomDiscount.returnType.account') :
+ $t('applyRoomDiscount.returnType.discount')) : '-' }}
+
+
+
+
+ {{ scope.row.returnAmount ? scope.row.returnAmount : '-' }}
+
+
+
+
+
+ {{ $t('applyRoomDiscount.button.check') }}
+
+
+ {{ $t('applyRoomDiscount.button.record') }}
+
+
+ {{ $t('applyRoomDiscount.button.review') }}
+
+
+ {{ $t('common.edit') }}
+
+
+ {{ $t('common.delete') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/fee/discountTypeLang.js b/src/views/fee/discountTypeLang.js
new file mode 100644
index 0000000..abcedba
--- /dev/null
+++ b/src/views/fee/discountTypeLang.js
@@ -0,0 +1,112 @@
+export const messages = {
+ en: {
+ discountType: {
+ search: {
+ title: 'Search Conditions',
+ applyType: 'Please enter type code',
+ typeName: 'Please enter type name'
+ },
+ list: {
+ title: 'Discount Types'
+ },
+ table: {
+ applyType: 'Type Code',
+ typeName: 'Type Name',
+ typeDesc: 'Type Description',
+ createTime: 'Create Time'
+ },
+ form: {
+ applyType: 'Type Code',
+ typeName: 'Type Name',
+ typeNamePlaceholder: 'Required, please enter type name',
+ typeDesc: 'Type Description',
+ typeDescPlaceholder: 'Optional, please enter type description'
+ },
+ validate: {
+ applyTypeRequired: 'Type code is required',
+ typeNameRequired: 'Type name is required',
+ typeNameMaxLength: 'Type name max length is 64',
+ typeDescMaxLength: 'Type description max length is 512'
+ },
+ add: {
+ title: 'Add Discount Type',
+ success: 'Add success'
+ },
+ edit: {
+ title: 'Edit Discount Type',
+ success: 'Edit success'
+ },
+ delete: {
+ title: 'Delete Confirmation',
+ confirmText: 'Are you sure to delete this discount type?',
+ success: 'Delete success'
+ },
+ fetchError: 'Failed to fetch discount types'
+ },
+ common: {
+ search: 'Search',
+ add: 'Add',
+ edit: 'Edit',
+ delete: 'Delete',
+ back: 'Back',
+ cancel: 'Cancel',
+ confirm: 'Confirm',
+ operation: 'Operation'
+ }
+ },
+ zh: {
+ discountType: {
+ search: {
+ title: '查询条件',
+ applyType: '请输入类型编码',
+ typeName: '请输入类型名称'
+ },
+ list: {
+ title: '优惠类型'
+ },
+ table: {
+ applyType: '类型编码',
+ typeName: '类型名称',
+ typeDesc: '类型描述',
+ createTime: '创建时间'
+ },
+ form: {
+ applyType: '类型编码',
+ typeName: '类型名称',
+ typeNamePlaceholder: '必填,请填写类型名称',
+ typeDesc: '类型描述',
+ typeDescPlaceholder: '选填,请填写类型描述'
+ },
+ validate: {
+ applyTypeRequired: '类型编码不能为空',
+ typeNameRequired: '类型名称不能为空',
+ typeNameMaxLength: '类型名称最大长度64',
+ typeDescMaxLength: '类型描述最大长度512'
+ },
+ add: {
+ title: '添加优惠类型',
+ success: '添加成功'
+ },
+ edit: {
+ title: '修改优惠类型',
+ success: '修改成功'
+ },
+ delete: {
+ title: '删除确认',
+ confirmText: '确定删除该优惠类型吗?',
+ success: '删除成功'
+ },
+ fetchError: '获取优惠类型失败'
+ },
+ common: {
+ search: '查询',
+ add: '添加',
+ edit: '修改',
+ delete: '删除',
+ back: '返回',
+ cancel: '取消',
+ confirm: '确认',
+ operation: '操作'
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/views/fee/discountTypeList.vue b/src/views/fee/discountTypeList.vue
new file mode 100644
index 0000000..f507efd
--- /dev/null
+++ b/src/views/fee/discountTypeList.vue
@@ -0,0 +1,209 @@
+
+
+
+
+
+ {{ $t('discountType.search.title') }}
+
+
+
+
+
+
+
+
+
+
+ {{ $t('common.search') }}
+
+
+
+
+
+
+
+
+
{{ $t('discountType.list.title') }}
+
+
+ {{ $t('common.add') }}
+
+
+ {{ $t('common.back') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('common.edit') }}
+
+
+ {{ $t('common.delete') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
libgit2 0.21.4