Commit 745b8235dc826cb4651f712da1bf035ce9a79701
1 parent
a1cba8c1
v1.9 优化优惠申请 bug
Showing
7 changed files
with
61 additions
and
95 deletions
src/api/fee/applyRoomDiscountManageApi.js
| @@ -97,6 +97,24 @@ export function saveApplyRoomDiscount(data) { | @@ -97,6 +97,24 @@ export function saveApplyRoomDiscount(data) { | ||
| 97 | }) | 97 | }) |
| 98 | }) | 98 | }) |
| 99 | } | 99 | } |
| 100 | +export function editApplyRoomDiscount(data) { | ||
| 101 | + return new Promise((resolve, reject) => { | ||
| 102 | + request({ | ||
| 103 | + url: '/applyRoomDiscount/editApplyRoomDiscount', | ||
| 104 | + method: 'post', | ||
| 105 | + data: { | ||
| 106 | + ...data, | ||
| 107 | + communityId: getCommunityId() | ||
| 108 | + } | ||
| 109 | + }).then(response => { | ||
| 110 | + const res = response.data | ||
| 111 | + resolve(res) | ||
| 112 | + }).catch(error => { | ||
| 113 | + reject(error) | ||
| 114 | + }) | ||
| 115 | + }) | ||
| 116 | +} | ||
| 117 | + | ||
| 100 | 118 | ||
| 101 | // 更新优惠申请 | 119 | // 更新优惠申请 |
| 102 | export function updateApplyRoomDiscount(data) { | 120 | export function updateApplyRoomDiscount(data) { |
src/api/fee/simplifyRefundDepositApi.js
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | 2 | ||
| 3 | export function queryFeeDeposit(params) { | 3 | export function queryFeeDeposit(params) { |
| 4 | - return request({ | ||
| 5 | - url: '/fee.queryFeeDeposit', | ||
| 6 | - method: 'get', | ||
| 7 | - params | 4 | + return new Promise((resolve, reject) => { |
| 5 | + request({ | ||
| 6 | + url: '/fee.queryFeeDeposit', | ||
| 7 | + method: 'get', | ||
| 8 | + params | ||
| 9 | + }).then(response => { | ||
| 10 | + const res = response.data | ||
| 11 | + | ||
| 12 | + resolve(res) | ||
| 13 | + | ||
| 14 | + }).catch(error => { | ||
| 15 | + reject(error) | ||
| 16 | + }) | ||
| 8 | }) | 17 | }) |
| 9 | } | 18 | } |
| 10 | \ No newline at end of file | 19 | \ No newline at end of file |
src/components/fee/editApplyRoomDiscount.vue
src/components/fee/editApplyRoomDiscountRecord.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog | ||
| 3 | - :title="$t('applyRoomDiscount.editRecord.title')" | ||
| 4 | - :visible.sync="visible" | ||
| 5 | - width="60%" | ||
| 6 | - @close="handleClose" | ||
| 7 | - > | ||
| 8 | - <el-form | ||
| 9 | - ref="form" | ||
| 10 | - :model="form" | ||
| 11 | - :rules="rules" | ||
| 12 | - label-width="120px" | ||
| 13 | - > | ||
| 14 | - <el-form-item | ||
| 15 | - :label="$t('applyRoomDiscount.editRecord.ardId')" | ||
| 16 | - prop="ardId" | ||
| 17 | - > | ||
| 18 | - <el-input | ||
| 19 | - v-model="form.ardId" | ||
| 20 | - disabled | ||
| 21 | - /> | 2 | + <el-dialog :title="$t('applyRoomDiscount.editRecord.title')" :visible.sync="visible" width="60%" @close="handleClose"> |
| 3 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | ||
| 4 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.ardId')" prop="ardId"> | ||
| 5 | + <el-input v-model="form.ardId" disabled /> | ||
| 22 | </el-form-item> | 6 | </el-form-item> |
| 23 | 7 | ||
| 24 | - <el-form-item | ||
| 25 | - :label="$t('applyRoomDiscount.editRecord.roomName')" | ||
| 26 | - prop="roomName" | ||
| 27 | - > | ||
| 28 | - <el-input | ||
| 29 | - v-model="form.roomName" | ||
| 30 | - disabled | ||
| 31 | - /> | 8 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.roomName')" prop="roomName"> |
| 9 | + <el-input v-model="form.roomName" disabled /> | ||
| 32 | </el-form-item> | 10 | </el-form-item> |
| 33 | 11 | ||
| 34 | - <el-form-item | ||
| 35 | - :label="$t('applyRoomDiscount.editRecord.applyTypeName')" | ||
| 36 | - prop="applyTypeName" | ||
| 37 | - > | ||
| 38 | - <el-input | ||
| 39 | - v-model="form.applyTypeName" | ||
| 40 | - disabled | ||
| 41 | - /> | 12 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.applyTypeName')" prop="applyTypeName"> |
| 13 | + <el-input v-model="form.applyTypeName" disabled /> | ||
| 42 | </el-form-item> | 14 | </el-form-item> |
| 43 | 15 | ||
| 44 | - <el-form-item | ||
| 45 | - :label="$t('applyRoomDiscount.editRecord.createUserName')" | ||
| 46 | - prop="createUserName" | ||
| 47 | - > | ||
| 48 | - <el-input | ||
| 49 | - v-model="form.createUserName" | ||
| 50 | - disabled | ||
| 51 | - /> | 16 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.createUserName')" prop="createUserName"> |
| 17 | + <el-input v-model="form.createUserName" disabled /> | ||
| 52 | </el-form-item> | 18 | </el-form-item> |
| 53 | 19 | ||
| 54 | - <el-form-item | ||
| 55 | - :label="$t('applyRoomDiscount.editRecord.createUserTel')" | ||
| 56 | - prop="createUserTel" | ||
| 57 | - > | ||
| 58 | - <el-input | ||
| 59 | - v-model="form.createUserTel" | ||
| 60 | - disabled | ||
| 61 | - /> | 20 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.createUserTel')" prop="createUserTel"> |
| 21 | + <el-input v-model="form.createUserTel" disabled /> | ||
| 62 | </el-form-item> | 22 | </el-form-item> |
| 63 | 23 | ||
| 64 | - <el-form-item | ||
| 65 | - :label="$t('applyRoomDiscount.editRecord.startTime')" | ||
| 66 | - prop="startTime" | ||
| 67 | - > | ||
| 68 | - <el-date-picker | ||
| 69 | - v-model="form.startTime" | ||
| 70 | - type="datetime" | ||
| 71 | - :placeholder="$t('applyRoomDiscount.editRecord.startTimePlaceholder')" | ||
| 72 | - value-format="yyyy-MM-dd HH:mm:ss" | ||
| 73 | - style="width:100%" | ||
| 74 | - @change="validateDate" | ||
| 75 | - /> | 24 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.startTime')" prop="startTime"> |
| 25 | + <el-date-picker v-model="form.startTime" type="datetime" | ||
| 26 | + :placeholder="$t('applyRoomDiscount.editRecord.startTimePlaceholder')" value-format="yyyy-MM-dd HH:mm:ss" | ||
| 27 | + style="width:100%" @change="validateDate" /> | ||
| 76 | </el-form-item> | 28 | </el-form-item> |
| 77 | 29 | ||
| 78 | - <el-form-item | ||
| 79 | - :label="$t('applyRoomDiscount.editRecord.endTime')" | ||
| 80 | - prop="endTime" | ||
| 81 | - > | ||
| 82 | - <el-date-picker | ||
| 83 | - v-model="form.endTime" | ||
| 84 | - type="datetime" | ||
| 85 | - :placeholder="$t('applyRoomDiscount.editRecord.endTimePlaceholder')" | ||
| 86 | - value-format="yyyy-MM-dd HH:mm:ss" | ||
| 87 | - style="width:100%" | ||
| 88 | - @change="validateDate" | ||
| 89 | - /> | 30 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.endTime')" prop="endTime"> |
| 31 | + <el-date-picker v-model="form.endTime" type="datetime" | ||
| 32 | + :placeholder="$t('applyRoomDiscount.editRecord.endTimePlaceholder')" value-format="yyyy-MM-dd HH:mm:ss" | ||
| 33 | + style="width:100%" @change="validateDate" /> | ||
| 90 | </el-form-item> | 34 | </el-form-item> |
| 91 | 35 | ||
| 92 | - <el-form-item | ||
| 93 | - :label="$t('applyRoomDiscount.editRecord.stateName')" | ||
| 94 | - prop="stateName" | ||
| 95 | - > | ||
| 96 | - <el-input | ||
| 97 | - v-model="form.stateName" | ||
| 98 | - disabled | ||
| 99 | - /> | 36 | + <el-form-item :label="$t('applyRoomDiscount.editRecord.stateName')" prop="stateName"> |
| 37 | + <el-input v-model="form.stateName" disabled /> | ||
| 100 | </el-form-item> | 38 | </el-form-item> |
| 101 | </el-form> | 39 | </el-form> |
| 102 | 40 | ||
| @@ -112,7 +50,7 @@ | @@ -112,7 +50,7 @@ | ||
| 112 | </template> | 50 | </template> |
| 113 | 51 | ||
| 114 | <script> | 52 | <script> |
| 115 | -import { updateApplyRoomDiscount } from '@/api/fee/applyRoomDiscountManageApi' | 53 | +import { editApplyRoomDiscount } from '@/api/fee/applyRoomDiscountManageApi' |
| 116 | import { getCommunityId } from '@/api/community/communityApi' | 54 | import { getCommunityId } from '@/api/community/communityApi' |
| 117 | 55 | ||
| 118 | export default { | 56 | export default { |
| @@ -206,7 +144,7 @@ export default { | @@ -206,7 +144,7 @@ export default { | ||
| 206 | }, | 144 | }, |
| 207 | async updateApplyRoomDiscount() { | 145 | async updateApplyRoomDiscount() { |
| 208 | try { | 146 | try { |
| 209 | - await updateApplyRoomDiscount(this.form) | 147 | + await editApplyRoomDiscount(this.form) |
| 210 | this.$message.success(this.$t('applyRoomDiscount.message.updateSuccess')) | 148 | this.$message.success(this.$t('applyRoomDiscount.message.updateSuccess')) |
| 211 | this.visible = false | 149 | this.visible = false |
| 212 | this.$emit('success') | 150 | this.$emit('success') |
src/components/fee/reviewApplyRoomDiscount.vue
| @@ -186,7 +186,8 @@ export default { | @@ -186,7 +186,8 @@ export default { | ||
| 186 | ...data, | 186 | ...data, |
| 187 | communityId: getCommunityId(), | 187 | communityId: getCommunityId(), |
| 188 | selectedFees: [], | 188 | selectedFees: [], |
| 189 | - refundAmount: '' | 189 | + refundAmount: '', |
| 190 | + state:'' | ||
| 190 | } | 191 | } |
| 191 | this.visible = true | 192 | this.visible = true |
| 192 | this.loadDiscounts() | 193 | this.loadDiscounts() |
src/components/fee/simplifyRefundDeposit.vue
| @@ -82,7 +82,6 @@ export default { | @@ -82,7 +82,6 @@ export default { | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | queryFeeDeposit(params).then(response => { | 84 | queryFeeDeposit(params).then(response => { |
| 85 | - if (response.code !== 0) return | ||
| 86 | this.simplifyRefundDepositInfo.total = response.total | 85 | this.simplifyRefundDepositInfo.total = response.total |
| 87 | this.simplifyRefundDepositInfo.records = response.records | 86 | this.simplifyRefundDepositInfo.records = response.records |
| 88 | this.simplifyRefundDepositInfo.fees = response.data | 87 | this.simplifyRefundDepositInfo.fees = response.data |
| @@ -102,7 +101,7 @@ export default { | @@ -102,7 +101,7 @@ export default { | ||
| 102 | }, | 101 | }, |
| 103 | _openRefundModel() { | 102 | _openRefundModel() { |
| 104 | const roomId = this.simplifyRefundDepositInfo.roomId | 103 | const roomId = this.simplifyRefundDepositInfo.roomId |
| 105 | - this.$router.push(`/pages/fee/refundDepositFee?roomId=${roomId}`) | 104 | + this.$router.push(`/views/fee/refundDepositFee?roomId=${roomId}`) |
| 106 | }, | 105 | }, |
| 107 | _toSimplifyFeeDepositFeeDetail(fee) { | 106 | _toSimplifyFeeDepositFeeDetail(fee) { |
| 108 | this.$router.push(`/views/fee/propertyFee?feeId=${fee.feeId}`) | 107 | this.$router.push(`/views/fee/propertyFee?feeId=${fee.feeId}`) |
vue.config.js
| @@ -4,14 +4,14 @@ module.exports = { | @@ -4,14 +4,14 @@ module.exports = { | ||
| 4 | open: true, // 自动打开浏览器 | 4 | open: true, // 自动打开浏览器 |
| 5 | proxy: { | 5 | proxy: { |
| 6 | '/app': { | 6 | '/app': { |
| 7 | - target: 'http://demo.homecommunity.cn/app', // 后端API地址 | 7 | + target: 'http://127.0.0.1:8008/app', // 后端API地址 |
| 8 | changeOrigin: true, | 8 | changeOrigin: true, |
| 9 | pathRewrite: { | 9 | pathRewrite: { |
| 10 | '^/app': '' | 10 | '^/app': '' |
| 11 | } | 11 | } |
| 12 | }, | 12 | }, |
| 13 | '/callComponent': { | 13 | '/callComponent': { |
| 14 | - target: 'http://demo.homecommunity.cn/callComponent', // 后端API地址 | 14 | + target: 'http://127.0.0.1:8008/callComponent', // 后端API地址 |
| 15 | changeOrigin: true, | 15 | changeOrigin: true, |
| 16 | pathRewrite: { | 16 | pathRewrite: { |
| 17 | '^/callComponent': '' | 17 | '^/callComponent': '' |