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,7 +17,7 @@ | ||
| 17 | </el-form-item> | 17 | </el-form-item> |
| 18 | 18 | ||
| 19 | <el-form-item v-if="form.paymentType === 'WECHAT'" :label="$t('communityPayment.merchantCert')"> | 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 | </el-form-item> | 21 | </el-form-item> |
| 22 | 22 | ||
| 23 | <el-form-item :label="$t('communityPayment.paymentScope')" prop="payType"> | 23 | <el-form-item :label="$t('communityPayment.paymentScope')" prop="payType"> |
| @@ -52,11 +52,11 @@ | @@ -52,11 +52,11 @@ | ||
| 52 | 52 | ||
| 53 | <script> | 53 | <script> |
| 54 | import { saveAdminPaymentPool, listPaymentKey, listPaymentAdapt, queryAdminFeeConfigs } from '@/api/fee/communityPaymentApi' | 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 | export default { | 57 | export default { |
| 58 | name: 'AddCommunityPayment', | 58 | name: 'AddCommunityPayment', |
| 59 | - components: { FileUpload }, | 59 | + components: { uploadFile }, |
| 60 | data() { | 60 | data() { |
| 61 | return { | 61 | return { |
| 62 | visible: false, | 62 | visible: false, |
src/components/fee/EditCommunityPayment.vue
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | 17 | ||
| 18 | <el-form-item v-if="form.paymentType === 'WECHAT'" :label="$t('communityPayment.merchantCert')"> | 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 | </el-form-item> | 20 | </el-form-item> |
| 21 | 21 | ||
| 22 | <el-form-item :label="$t('communityPayment.paymentScope')"> | 22 | <el-form-item :label="$t('communityPayment.paymentScope')"> |
| @@ -57,11 +57,11 @@ | @@ -57,11 +57,11 @@ | ||
| 57 | 57 | ||
| 58 | <script> | 58 | <script> |
| 59 | import { updateAdminPaymentPool, listPaymentKey, listPaymentAdapt, queryAdminFeeConfigs } from '@/api/fee/communityPaymentApi' | 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 | export default { | 62 | export default { |
| 63 | name: 'EditCommunityPayment', | 63 | name: 'EditCommunityPayment', |
| 64 | - components: { FileUpload }, | 64 | + components: { uploadFile }, |
| 65 | data() { | 65 | data() { |
| 66 | return { | 66 | return { |
| 67 | visible: false, | 67 | visible: false, |
| @@ -102,7 +102,9 @@ export default { | @@ -102,7 +102,9 @@ export default { | ||
| 102 | this.loadPaymentKeys() | 102 | this.loadPaymentKeys() |
| 103 | this.loadFeeConfigs() | 103 | this.loadFeeConfigs() |
| 104 | if (row.certPath && this.$refs.uploader) { | 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,7 +311,11 @@ export default { | ||
| 311 | await this.$refs.form.validate() | 311 | await this.$refs.form.validate() |
| 312 | 312 | ||
| 313 | // 调用API保存 | 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 | this.$message.success(this.$t('common.operationSuccess')) | 320 | this.$message.success(this.$t('common.operationSuccess')) |
| 317 | this.visible = false | 321 | this.visible = false |
src/components/fee/editFeeConfig.vue
| @@ -287,7 +287,11 @@ export default { | @@ -287,7 +287,11 @@ export default { | ||
| 287 | this.form.communityId = this.getCommunityId() | 287 | this.form.communityId = this.getCommunityId() |
| 288 | 288 | ||
| 289 | // 调用API更新 | 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 | this.$message.success(this.$t('common.operationSuccess')) | 296 | this.$message.success(this.$t('common.operationSuccess')) |
| 293 | this.visible = false | 297 | this.visible = false |