Blame view

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