Commit cd705b0a27b987635862e6e5bdc7e86b00ed04b4
1 parent
b50cf649
v1.9 优化群里反馈 admin 配置小区支付时 微信场景下没法上传附件的bug 优化
Showing
4 changed files
with
19 additions
and
9 deletions
src/components/fee/AddCommunityPayment.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | </el-form-item> |
| 18 | 18 | |
| 19 | 19 | <el-form-item v-if="form.paymentType === 'WECHAT'" :label="$t('communityPayment.merchantCert')"> |
| 20 | - <file-upload ref="uploader" namespace="addCommunityPayment" @upload-success="handleUploadSuccess" /> | |
| 20 | + <upload-file ref="uploader" @notify="handleUploadSuccess" /> | |
| 21 | 21 | </el-form-item> |
| 22 | 22 | |
| 23 | 23 | <el-form-item :label="$t('communityPayment.paymentScope')" prop="payType"> |
| ... | ... | @@ -52,11 +52,11 @@ |
| 52 | 52 | |
| 53 | 53 | <script> |
| 54 | 54 | import { saveAdminPaymentPool, listPaymentKey, listPaymentAdapt, queryAdminFeeConfigs } from '@/api/fee/communityPaymentApi' |
| 55 | -import FileUpload from '@/components/upload/FileUpload' | |
| 55 | +import uploadFile from '@/components/upload/uploadFile' | |
| 56 | 56 | |
| 57 | 57 | export default { |
| 58 | 58 | name: 'AddCommunityPayment', |
| 59 | - components: { FileUpload }, | |
| 59 | + components: { uploadFile }, | |
| 60 | 60 | data() { |
| 61 | 61 | return { |
| 62 | 62 | visible: false, | ... | ... |
src/components/fee/EditCommunityPayment.vue
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | </el-form-item> |
| 17 | 17 | |
| 18 | 18 | <el-form-item v-if="form.paymentType === 'WECHAT'" :label="$t('communityPayment.merchantCert')"> |
| 19 | - <file-upload ref="uploader" namespace="editCommunityPayment" @upload-success="handleUploadSuccess" /> | |
| 19 | + <upload-file ref="uploader" @notify="handleUploadSuccess" /> | |
| 20 | 20 | </el-form-item> |
| 21 | 21 | |
| 22 | 22 | <el-form-item :label="$t('communityPayment.paymentScope')"> |
| ... | ... | @@ -57,11 +57,11 @@ |
| 57 | 57 | |
| 58 | 58 | <script> |
| 59 | 59 | import { updateAdminPaymentPool, listPaymentKey, listPaymentAdapt, queryAdminFeeConfigs } from '@/api/fee/communityPaymentApi' |
| 60 | -import FileUpload from '@/components/upload/FileUpload' | |
| 60 | +import uploadFile from '@/components/upload/uploadFile' | |
| 61 | 61 | |
| 62 | 62 | export default { |
| 63 | 63 | name: 'EditCommunityPayment', |
| 64 | - components: { FileUpload }, | |
| 64 | + components: { uploadFile }, | |
| 65 | 65 | data() { |
| 66 | 66 | return { |
| 67 | 67 | visible: false, |
| ... | ... | @@ -102,7 +102,9 @@ export default { |
| 102 | 102 | this.loadPaymentKeys() |
| 103 | 103 | this.loadFeeConfigs() |
| 104 | 104 | if (row.certPath && this.$refs.uploader) { |
| 105 | - this.$refs.uploader.setFileName(row.certPath) | |
| 105 | + this.$refs.uploader.fileName = row.certPath | |
| 106 | + this.$refs.uploader.realFileName = row.certPath | |
| 107 | + this.$refs.uploader.progress = 100 | |
| 106 | 108 | } |
| 107 | 109 | }) |
| 108 | 110 | }, | ... | ... |
src/components/fee/addFeeConfig.vue
| ... | ... | @@ -311,7 +311,11 @@ export default { |
| 311 | 311 | await this.$refs.form.validate() |
| 312 | 312 | |
| 313 | 313 | // 调用API保存 |
| 314 | - await saveFeeConfig(this.form) | |
| 314 | + const {code,msg} = await saveFeeConfig(this.form) | |
| 315 | + if(code != 0){ | |
| 316 | + this.$message.error(msg) | |
| 317 | + return | |
| 318 | + } | |
| 315 | 319 | |
| 316 | 320 | this.$message.success(this.$t('common.operationSuccess')) |
| 317 | 321 | this.visible = false | ... | ... |
src/components/fee/editFeeConfig.vue
| ... | ... | @@ -287,7 +287,11 @@ export default { |
| 287 | 287 | this.form.communityId = this.getCommunityId() |
| 288 | 288 | |
| 289 | 289 | // 调用API更新 |
| 290 | - await updateFeeConfig(this.form) | |
| 290 | + const {code,msg} = await updateFeeConfig(this.form) | |
| 291 | + if(code != 0){ | |
| 292 | + this.$message.error(msg) | |
| 293 | + return | |
| 294 | + } | |
| 291 | 295 | |
| 292 | 296 | this.$message.success(this.$t('common.operationSuccess')) |
| 293 | 297 | this.visible = false | ... | ... |