Blame view

src/components/fee/refundDepositFee.vue 1.61 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
f9f29030   wuxw   优化退押金 对话框没有关闭的bug
2
3
    <el-dialog :title="$t('refundDepositFee.title')" :visible.sync="dialogVisible" width="30%" @close="handleClose">
      <el-alert :title="$t('refundDepositFee.alertText')" type="warning" :closable="false"></el-alert>
1a0bdbe0   wuxw   优化缴费页面
4
5
  
      <div slot="footer" class="dialog-footer">
ab1ebb3c   wuxw   缴费支持 押金 优惠券 优惠折扣 ...
6
7
        <el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
        <el-button type="primary" @click="refundDepositFee">{{ $t('common.confirm') }}</el-button>
24d3590f   wuxw   房屋收费页面开发完成
8
      </div>
24d3590f   wuxw   房屋收费页面开发完成
9
10
11
12
13
    </el-dialog>
  </template>
  
  <script>
  import { getCommunityId } from '@/api/community/communityApi'
ab1ebb3c   wuxw   缴费支持 押金 优惠券 优惠折扣 ...
14
  import { refundFeeDeposit } from '@/api/fee/payFeeOrderApi'
24d3590f   wuxw   房屋收费页面开发完成
15
16
17
18
19
  
  export default {
    name: 'RefundDepositFee',
    data() {
      return {
1a0bdbe0   wuxw   优化缴费页面
20
21
        dialogVisible: false,
        refundData: {}
24d3590f   wuxw   房屋收费页面开发完成
22
23
24
      }
    },
    methods: {
1a0bdbe0   wuxw   优化缴费页面
25
26
27
      open(params) {
        this.refundData = { ...params }
        this.dialogVisible = true
24d3590f   wuxw   房屋收费页面开发完成
28
      },
1a0bdbe0   wuxw   优化缴费页面
29
30
      close() {
        this.dialogVisible = false
24d3590f   wuxw   房屋收费页面开发完成
31
      },
24d3590f   wuxw   房屋收费页面开发完成
32
33
      async refundDepositFee() {
        try {
1a0bdbe0   wuxw   优化缴费页面
34
          this.refundData.communityId = await getCommunityId()
f9f29030   wuxw   优化退押金 对话框没有关闭的bug
35
  
ab1ebb3c   wuxw   缴费支持 押金 优惠券 优惠折扣 ...
36
37
          const response = await refundFeeDeposit(this.refundData)
          if (response.code === 0) {
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
38
            this.$message.success(this.$t('common.operationSuccess'))
f9f29030   wuxw   优化退押金 对话框没有关闭的bug
39
            this.close()
24d3590f   wuxw   房屋收费页面开发完成
40
            this.$emit('success')
24d3590f   wuxw   房屋收费页面开发完成
41
          } else {
1a0bdbe0   wuxw   优化缴费页面
42
            this.$message.error(response.data.msg)
24d3590f   wuxw   房屋收费页面开发完成
43
44
          }
        } catch (error) {
1a0bdbe0   wuxw   优化缴费页面
45
46
          console.error('退押金失败:', error)
          this.$message.error(this.$t('refundDepositFee.error'))
24d3590f   wuxw   房屋收费页面开发完成
47
        }
1a0bdbe0   wuxw   优化缴费页面
48
49
50
      },
      handleClose() {
        this.refundData = {}
24d3590f   wuxw   房屋收费页面开发完成
51
52
53
54
55
      }
    }
  }
  </script>
  
1a0bdbe0   wuxw   优化缴费页面
56
57
58
59
  <style scoped>
  .el-alert {
    margin-bottom: 20px;
  }
f9f29030   wuxw   优化退押金 对话框没有关闭的bug
60
  
1a0bdbe0   wuxw   优化缴费页面
61
62
  .dialog-footer {
    text-align: right;
24d3590f   wuxw   房屋收费页面开发完成
63
64
  }
  </style>