yangfeng
2024-01-04 5cce58dab04d9d3f2c4c67df7cf8379acb7c03ab
1
2
3
4
5
6
7
8
9
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<template>
  <div class="review-dialog">
    <el-dialog
      :title="editCommonConfig.title"
      :visible.sync="editConfig.visible"
      :width="dialogWidth"
      :before-close="handleClose"
      append-to-body
      custom-class="iframe-dialog"
    >
      <div class="drawerContent" style="overflow: auto">
        <el-form ref="form" :rules="rules" :model="form" label-position="right" label-width="100px">
          <el-form-item label="审核结果:" prop="result">
            <el-select v-model="form.result" placeholder="请选择审核结果">
              <el-option label="审核通过" value="审核通过"></el-option>
              <el-option label="审核拒绝" value="审核拒绝"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item v-if="form.result === '审核拒绝'" label="未通过原因:" prop="reason">
            <el-input v-model="form.reason" type="textarea"></el-input>
          </el-form-item>
          <el-form-item v-if="form.result === '审核通过'" label="用户等级:" prop="level">
            <el-radio-group v-model="form.level">
              <div style="margin-top: 10px">
                <el-radio :label="1">三合一经典会员</el-radio>
                <el-radio :label="2">APS+WMS普通会员</el-radio>
              </div>
              <div style="margin-top: 10px">
                <el-radio :label="3">四合一超级会员</el-radio>
                <el-radio :label="4">APS普通会员</el-radio>
              </div>
            </el-radio-group>
          </el-form-item>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取消</el-button>
        <el-button v-if="editConfig.title == '查看' ? false : true" type="primary" @click="onSubmit('form')"
          >确定</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
export default {
  name: "ReviewDialog",
  props: {
    editCommonConfig: {
      type: Object,
      default: () => {
        return {
          visible: false,
          title: "用户审核",
          infomation: {}
        }
      }
    }
  },
  components: {},
  computed: {},
  data() {
    return {
      dialogWidth: "30%",
      editConfig: this.editCommonConfig,
      form: {
        result: "审核通过"
      },
      rules: {
        result: [{ required: true, message: "请选择审核结果", trigger: "change" }],
        reason: [{ required: true, message: "请输入拒绝原因", trigger: "blur" }],
        level: [{ required: true, message: "请选择用户等级", trigger: "change" }]
      }
    }
  },
  watch: {
    "editCommonConfig.visible"(val) {
      if (val) {
        this.$refs.form.resetFields()
        // this.getDataInfo()
      }
    },
    "editCommonConfig.infomation"(val) {
      if (this.isopen) {
        this.$refs.form.resetFields()
        if (val.id) {
          this.form = val
          // this.getDataInfo(val)
        }
      }
    }
  },
  created() {
    // this.getDataInfo()
  },
  methods: {
    handleClose() {
      this.editConfig.visible = false
    }
  }
}
</script>
 
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
::v-deep {
  .iframe-dialog .el-dialog__body {
    .drawerContent {
      width: 80%;
      padding: 20px 0;
      margin: auto;
      overflow: hidden;
      margin-top: 15px;
      // 溢出隐藏滚动条
      scrollbar-width: none; /* firefox */
      -ms-overflow-style: none; /* IE 10+ */
    }
  }
  .el-dialog__footer {
    background-color: #f5f5f5;
    height: 55px;
    line-height: 55px;
    text-align: right;
    padding-right: 20px;
  }
}
</style>