Blame view

src/components/fee/deleteFee.vue 1.35 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
24d3590f   wuxw   房屋收费页面开发完成
2
3
4
5
6
7
8
    <el-dialog
      :title="$t('deleteFee.title')"
      :visible.sync="visible"
      width="30%"
      :before-close="handleClose"
    >
      <p>{{ $t('deleteFee.confirmMessage') }}</p>
2e0fd29c   wuxw   开发报修
9
      <span slot="footer" class="dialog-footer">
24d3590f   wuxw   房屋收费页面开发完成
10
        <el-button @click="handleClose">{{ $t('common.cancel') }}</el-button>
2e0fd29c   wuxw   开发报修
11
12
13
14
15
16
        <el-button type="primary" @click="deleteFee">{{ $t('common.confirm') }}</el-button>
      </span>
    </el-dialog>
  </template>
  
  <script>
24d3590f   wuxw   房屋收费页面开发完成
17
18
  import { deleteFee } from '@/api/fee/deleteFeeApi'
  import { getCommunityId } from '@/api/community/communityApi'
2e0fd29c   wuxw   开发报修
19
20
21
22
23
24
25
26
27
28
  
  export default {
    name: 'DeleteFee',
    data() {
      return {
        visible: false,
        deleteFeeInfo: {}
      }
    },
    methods: {
24d3590f   wuxw   房屋收费页面开发完成
29
30
      open(params) {
        this.deleteFeeInfo = params
2e0fd29c   wuxw   开发报修
31
32
        this.visible = true
      },
24d3590f   wuxw   房屋收费页面开发完成
33
      handleClose() {
2e0fd29c   wuxw   开发报修
34
35
        this.visible = false
      },
24d3590f   wuxw   房屋收费页面开发完成
36
37
38
39
40
41
      async deleteFee() {
        this.deleteFeeInfo.communityId = getCommunityId()
        
        try {
          const res = await deleteFee(this.deleteFeeInfo)
          if (res.code === 0) {
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
42
            this.$message.success(this.$t('common.operationSuccess'))
2e0fd29c   wuxw   开发报修
43
            this.$emit('success')
24d3590f   wuxw   房屋收费页面开发完成
44
            this.handleClose()
2e0fd29c   wuxw   开发报修
45
          } else {
24d3590f   wuxw   房屋收费页面开发完成
46
            this.$message.error(res.msg)
2e0fd29c   wuxw   开发报修
47
          }
24d3590f   wuxw   房屋收费页面开发完成
48
49
        } catch (error) {
          console.error('请求失败:', error)
1f9802a2   wuxw   v1.9 登陆错误信息提示
50
          this.$message.error(error || this.$t('common.operateFail'))
24d3590f   wuxw   房屋收费页面开发完成
51
        }
2e0fd29c   wuxw   开发报修
52
53
54
55
      }
    }
  }
  </script>