Blame view

src/components/fee/audit.vue 2.37 KB
9b01bbd3   wuxw   开发完成发票相关功能
1
2
  <template>
    <el-dialog
a6fd0349   wuxw   开发完成套餐费用
3
      :title="$t('audit.auditInfo')"
9b01bbd3   wuxw   开发完成发票相关功能
4
5
      :visible.sync="visible"
      width="50%"
7505cb92   wuxw   开发完成折扣设置
6
      @close="handleClose"
9b01bbd3   wuxw   开发完成发票相关功能
7
    >
a6fd0349   wuxw   开发完成套餐费用
8
9
10
11
12
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-form-item :label="$t('audit.auditStatus')" prop="state">
          <el-select 
            v-model="form.state" 
            :placeholder="$t('audit.selectAudit')"
7505cb92   wuxw   开发完成折扣设置
13
            style="width:100%"
a6fd0349   wuxw   开发完成套餐费用
14
            @change="handleStatusChange"
9b01bbd3   wuxw   开发完成发票相关功能
15
          >
a6fd0349   wuxw   开发完成套餐费用
16
17
            <el-option 
              :label="$t('audit.agree')" 
9b01bbd3   wuxw   开发完成发票相关功能
18
19
              value="1100"
            />
a6fd0349   wuxw   开发完成套餐费用
20
21
            <el-option 
              :label="$t('audit.reject')" 
9b01bbd3   wuxw   开发完成发票相关功能
22
23
24
25
              value="1200"
            />
          </el-select>
        </el-form-item>
a6fd0349   wuxw   开发完成套餐费用
26
        <el-form-item :label="$t('audit.reason')" prop="remark">
9b01bbd3   wuxw   开发完成发票相关功能
27
          <el-input
a6fd0349   wuxw   开发完成套餐费用
28
            v-model="form.remark"
9b01bbd3   wuxw   开发完成发票相关功能
29
            type="textarea"
7505cb92   wuxw   开发完成折扣设置
30
            :rows="4"
a6fd0349   wuxw   开发完成套餐费用
31
            :placeholder="$t('audit.inputReason')"
9b01bbd3   wuxw   开发完成发票相关功能
32
33
34
          />
        </el-form-item>
      </el-form>
7505cb92   wuxw   开发完成折扣设置
35
36
37
38
      <span slot="footer" class="dialog-footer">
        <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button>
        <el-button type="primary" @click="handleSubmit">{{ $t('common.submit') }}</el-button>
      </span>
9b01bbd3   wuxw   开发完成发票相关功能
39
40
41
42
43
    </el-dialog>
  </template>
  
  <script>
  export default {
a6fd0349   wuxw   开发完成套餐费用
44
    name: 'AuditModal',
9b01bbd3   wuxw   开发完成发票相关功能
45
46
47
    data() {
      return {
        visible: false,
a6fd0349   wuxw   开发完成套餐费用
48
        form: {
9b01bbd3   wuxw   开发完成发票相关功能
49
50
          state: '',
          remark: ''
a6fd0349   wuxw   开发完成套餐费用
51
52
53
54
55
56
57
58
59
        },
        rules: {
          state: [
            { required: true, message: this.$t('audit.stateRequired'), trigger: 'change' }
          ],
          remark: [
            { required: true, message: this.$t('audit.reasonRequired'), trigger: 'blur' },
            { max: 200, message: this.$t('audit.reasonMaxLength'), trigger: 'blur' }
          ]
9b01bbd3   wuxw   开发完成发票相关功能
60
61
62
63
64
        }
      }
    },
    methods: {
      open() {
9b01bbd3   wuxw   开发完成发票相关功能
65
66
        this.visible = true
      },
7505cb92   wuxw   开发完成折扣设置
67
68
      handleClose() {
        this.$refs.form.resetFields()
9b01bbd3   wuxw   开发完成发票相关功能
69
      },
a6fd0349   wuxw   开发完成套餐费用
70
71
72
73
74
75
76
      handleStatusChange(val) {
        if (val === '1100') {
          this.form.remark = this.$t('audit.agree')
        } else {
          this.form.remark = ''
        }
      },
7505cb92   wuxw   开发完成折扣设置
77
78
79
80
      handleSubmit() {
        this.$refs.form.validate(valid => {
          if (valid) {
            const auditInfo = {
a6fd0349   wuxw   开发完成套餐费用
81
82
83
84
              state: this.form.state,
              remark: this.form.state === '1200' 
                ? `${this.$t('audit.reject')}: ${this.form.remark}`
                : this.form.remark
7505cb92   wuxw   开发完成折扣设置
85
            }
a6fd0349   wuxw   开发完成套餐费用
86
            this.$emit('success', auditInfo)
7505cb92   wuxw   开发完成折扣设置
87
88
89
            this.visible = false
          }
        })
9b01bbd3   wuxw   开发完成发票相关功能
90
91
92
93
      }
    }
  }
  </script>