Blame view

src/components/fee/returnPayFee.vue 3.12 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
ac99dc05   wuxw   优化代码
2
3
    <el-dialog :title="$t('returnPayFee.fillRefundReason')" :visible.sync="visible" width="50%" @close="handleClose">
      <el-form ref="form" :model="formData" label-width="120px" label-position="left">
9d019fa6   wuxw   测试OA相关流程
4
5
        <el-form-item :label="$t('returnPayFee.payment') + 'ID'">
          <el-input v-model="formData.detailId" readonly />
a6fd0349   wuxw   开发完成套餐费用
6
        </el-form-item>
ac99dc05   wuxw   优化代码
7
  
9d019fa6   wuxw   测试OA相关流程
8
9
        <el-form-item :label="$t('returnPayFee.cycle') + $t('returnPayFee.monthUnit')">
          <el-input v-model="formData.cycles" readonly />
a6fd0349   wuxw   开发完成套餐费用
10
        </el-form-item>
ac99dc05   wuxw   优化代码
11
  
a6fd0349   wuxw   开发完成套餐费用
12
        <el-form-item :label="$t('returnPayFee.receivableAmount')">
9d019fa6   wuxw   测试OA相关流程
13
          <el-input v-model="formData.receivableAmount" readonly />
a6fd0349   wuxw   开发完成套餐费用
14
        </el-form-item>
ac99dc05   wuxw   优化代码
15
  
a6fd0349   wuxw   开发完成套餐费用
16
        <el-form-item :label="$t('returnPayFee.receivedAmount')">
9d019fa6   wuxw   测试OA相关流程
17
          <el-input v-model="formData.receivedAmount" readonly />
a6fd0349   wuxw   开发完成套餐费用
18
        </el-form-item>
ac99dc05   wuxw   优化代码
19
  
24d3590f   wuxw   房屋收费页面开发完成
20
        <el-form-item :label="$t('returnPayFee.paymentTime')">
9d019fa6   wuxw   测试OA相关流程
21
          <el-input v-model="formData.payTime" readonly />
a6fd0349   wuxw   开发完成套餐费用
22
        </el-form-item>
ac99dc05   wuxw   优化代码
23
24
25
26
27
28
29
  
        <el-form-item :label="$t('returnPayFee.refundReason')" prop="reason" :rules="[
          { required: true, message: $t('returnPayFee.reasonRequired'), trigger: 'blur' },
          { max: 200, message: $t('returnPayFee.reasonMaxLength'), trigger: 'blur' }
        ]">
          <el-input v-model="formData.reason" type="textarea" :rows="3"
            :placeholder="$t('returnPayFee.reasonPlaceholder')" />
a6fd0349   wuxw   开发完成套餐费用
30
31
        </el-form-item>
      </el-form>
ac99dc05   wuxw   优化代码
32
  
a6fd0349   wuxw   开发完成套餐费用
33
34
      <span slot="footer" class="dialog-footer">
        <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button>
ac99dc05   wuxw   优化代码
35
        <el-button type="primary" @click="submitReturnPayFee" :loading="loading">
9d019fa6   wuxw   测试OA相关流程
36
37
          {{ $t('returnPayFee.submitRefund') }}
        </el-button>
a6fd0349   wuxw   开发完成套餐费用
38
39
40
41
42
      </span>
    </el-dialog>
  </template>
  
  <script>
9d019fa6   wuxw   测试OA相关流程
43
  import { saveReturnPayFee } from '@/api/fee/refundDepositFeeApi'
a6fd0349   wuxw   开发完成套餐费用
44
45
  
  export default {
24d3590f   wuxw   房屋收费页面开发完成
46
    name: 'ReturnPayFee',
a6fd0349   wuxw   开发完成套餐费用
47
48
49
    data() {
      return {
        visible: false,
9d019fa6   wuxw   测试OA相关流程
50
51
        loading: false,
        formData: {
a6fd0349   wuxw   开发完成套餐费用
52
53
54
55
56
57
58
59
60
61
          detailId: '',
          cycles: '',
          receivableAmount: '',
          receivedAmount: '',
          payTime: '',
          reason: '',
          communityId: '',
          feeId: '',
          feeTypeCd: '',
          configId: ''
9d019fa6   wuxw   测试OA相关流程
62
        }
a6fd0349   wuxw   开发完成套餐费用
63
64
      }
    },
a6fd0349   wuxw   开发完成套餐费用
65
    methods: {
9d019fa6   wuxw   测试OA相关流程
66
67
68
      open(data) {
        this.resetForm()
        Object.assign(this.formData, data)
ac99dc05   wuxw   优化代码
69
        this.formData.payTime = data.createTime
a6fd0349   wuxw   开发完成套餐费用
70
71
        this.visible = true
      },
9d019fa6   wuxw   测试OA相关流程
72
73
74
75
76
77
78
79
80
81
82
83
84
      resetForm() {
        this.$refs.form && this.$refs.form.resetFields()
        this.formData = {
          detailId: '',
          cycles: '',
          receivableAmount: '',
          receivedAmount: '',
          payTime: '',
          reason: '',
          communityId: '',
          feeId: '',
          feeTypeCd: '',
          configId: ''
24d3590f   wuxw   房屋收费页面开发完成
85
        }
9d019fa6   wuxw   测试OA相关流程
86
87
88
      },
      handleClose() {
        this.resetForm()
a6fd0349   wuxw   开发完成套餐费用
89
      },
24d3590f   wuxw   房屋收费页面开发完成
90
      async submitReturnPayFee() {
a6fd0349   wuxw   开发完成套餐费用
91
        try {
9d019fa6   wuxw   测试OA相关流程
92
93
94
95
96
          const valid = await this.$refs.form.validate()
          if (!valid) return
  
          this.loading = true
          await saveReturnPayFee(this.formData)
ac99dc05   wuxw   优化代码
97
  
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
98
          this.$message.success(this.$t('common.operationSuccess'))
9d019fa6   wuxw   测试OA相关流程
99
100
          this.visible = false
          this.$emit('success')
24d3590f   wuxw   房屋收费页面开发完成
101
        } catch (error) {
9d019fa6   wuxw   测试OA相关流程
102
103
104
          console.error(error)
        } finally {
          this.loading = false
a6fd0349   wuxw   开发完成套餐费用
105
106
107
108
        }
      }
    }
  }
9d019fa6   wuxw   测试OA相关流程
109
  </script>