Blame view

src/components/fee/mergeFee.vue 1.43 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
f80ea09a   wuxw   加入费用详情
2
3
4
5
6
7
    <el-dialog
      :title="$t('mergeFee.confirmOperation')"
      :visible.sync="visible"
      width="50%"
      :before-close="closeMergeFeeModel"
    >
b0222bb0   wuxw   v1.9 优化加入费用拆分功能和费...
8
9
    {{ $t('mergeFee.mergeDescription') }}
  
f80ea09a   wuxw   加入费用详情
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeMergeFeeModel">{{ $t('mergeFee.cancel') }}</el-button>
        <el-button type="primary" @click="_doMergeFee">{{ $t('mergeFee.confirmMerge') }}</el-button>
      </span>
    </el-dialog>
  </template>
  
  <script>
  import { mergePayFee } from '@/api/fee/mergeFeeApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'MergeFee',
    data() {
      return {
        visible: false,
        mergeFeeInfo: {},
        communityId: ''
      }
    },
    methods: {
      open(params) {
        this.mergeFeeInfo = params
        this.communityId = getCommunityId()
        this.visible = true
      },
      closeMergeFeeModel() {
        this.visible = false
      },
      async _doMergeFee() {
        try {
          const params = {
            feeId: this.mergeFeeInfo.feeId,
            communityId: this.communityId
          }
          const res = await mergePayFee(params)
          if (res.code === 0) {
            this.closeMergeFeeModel()
b0222bb0   wuxw   v1.9 优化加入费用拆分功能和费...
48
            this.$emit('success')
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
49
            this.$message.success(this.$t('common.operationSuccess'))
f80ea09a   wuxw   加入费用详情
50
51
52
53
54
55
56
57
58
59
          } else {
            this.$message.error(res.msg)
          }
        } catch (error) {
          this.$message.error(error.message)
        }
      }
    }
  }
  </script>