| | |
| | | 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 ref="form" :rules="rules" :model="editConfig.infomation" 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 v-model="editConfig.infomation.result" placeholder="请选择审核结果"> |
| | | <el-option label="审核通过" :value="3"></el-option> |
| | | <el-option label="审核拒绝" :value="4"></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 v-if="editConfig.infomation.result === 4" label="未通过原因:" prop="reason"> |
| | | <el-input v-model="editConfig.infomation.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 v-if="editConfig.infomation.result === 3" label="用户等级:" prop="roleIDs"> |
| | | <el-checkbox-group |
| | | v-model="editConfig.infomation.roleIDs" |
| | | :disabled="editConfig.title == '查看' ? true : false" |
| | | > |
| | | <el-checkbox v-for="role in roleList" :label="role.id" :key="role.id">{{ role.name }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getRoleIDs, userExamine } from "@/api/unifiedManage/userManage" |
| | | export default { |
| | | name: "ReviewDialog", |
| | | props: { |
| | |
| | | return { |
| | | visible: false, |
| | | title: "用户审核", |
| | | infomation: {} |
| | | infomation: { |
| | | result: 3, |
| | | roleIDs: [] |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | 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" }] |
| | | } |
| | | roleIDs: [{ required: true, message: "请选择用户等级", trigger: "change" }] |
| | | }, |
| | | roleList: [] // 用户等级 |
| | | } |
| | | }, |
| | | 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.form = val |
| | | // this.getDataInfo(val) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getDataInfo() |
| | | this.getDataInfo() |
| | | }, |
| | | methods: { |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 获取等级信息 |
| | | async getDataInfo() { |
| | | const rsp = await getRoleIDs({ useType: 1 }) |
| | | if (rsp.code == 200) { |
| | | this.roleList = rsp.data ? rsp.data : [] |
| | | } |
| | | }, |
| | | // 确定 |
| | | onSubmit(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | let param = this.saveParams() |
| | | userExamine(param).then((reply) => { |
| | | if (reply && reply.code === 200) { |
| | | this.$message.success("保存成功") |
| | | this.handleClose() |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let reason = this.editConfig.infomation.result == 3 ? "" : this.editConfig.infomation.reason |
| | | let roleIds = this.editConfig.infomation.result == 3 ? this.editConfig.infomation.roleIDs : [] |
| | | let params = { |
| | | reason: reason, |
| | | roleIds: roleIds, |
| | | status: this.editConfig.infomation.result, |
| | | userId: this.editConfig.infomation.id |
| | | } |
| | | return params |
| | | } |
| | | } |
| | | } |