更新
This commit is contained in:
@ -1,19 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="steps-dialog" title="审核" v-model="dialogForm" :close-on-click-modal="false" @close="dialogForm = false" width="420px">
|
||||
<el-dialog class="steps-dialog" title="审核" v-model="dialogForm" :close-on-click-modal="false" @close="dialogForm = false,formData = {}" width="420px">
|
||||
<el-form :model="formData" ref="formRef" :rules="rules" label-width="120px">
|
||||
<el-form-item label="审核类型" prop="auditType">
|
||||
<el-select v-model="formData.auditType" placeholder="请选择审核类型">
|
||||
<el-option label="保安公司审核" value="bakk"></el-option>
|
||||
<el-option label="培训公司审核" value="pxgs"></el-option>
|
||||
<el-option label="公安局审核" value="gongan"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否通过" prop="auditStatus">
|
||||
<el-radio-group v-model="formData.auditStatus">
|
||||
<el-radio label="1">通过</el-radio>
|
||||
<el-radio label="0">不通过</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="驳回原因" prop="auditRemark" v-if="formData.auditStatus === '0'">
|
||||
<el-input v-model="formData.auditRemark" type="textarea" placeholder="请输入驳回原因" :autosize="{ minRows: 2, maxRows: 4 }" />
|
||||
<el-form-item label="驳回原因" prop="rejectReason" v-if="formData.auditStatus === '0'">
|
||||
<el-input v-model="formData.rejectReason" type="textarea" placeholder="请输入驳回原因" :autosize="{ minRows: 2, maxRows: 4 }" />
|
||||
</el-form-item>
|
||||
<div class="flex just-center">
|
||||
<el-button @click="dialogForm = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="dialogForm = false,formData = {}">取消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
@ -21,18 +28,42 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineExpose } from 'vue';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ref, defineExpose,defineEmits } from 'vue';
|
||||
import { qcckPost } from "@/api/qcckApi.js";
|
||||
const emit = defineEmits(['refresh'])
|
||||
const dialogForm = ref(false);
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
const rules = ref({
|
||||
auditType: [{ required: true, message: '请选择审核类型', trigger: 'blur' }],
|
||||
auditStatus: [{ required: true, message: '请选择是否通过', trigger: 'blur' }],
|
||||
auditRemark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }],
|
||||
rejectReason: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }],
|
||||
})
|
||||
const init = (row) => {
|
||||
formData.value = row
|
||||
const formRef = ref();
|
||||
const idsVal = ref([])
|
||||
const init = (ids) => {
|
||||
idsVal.value = ids;
|
||||
dialogForm.value = true;
|
||||
}
|
||||
|
||||
const submitForm = () =>{
|
||||
formRef.value.validate((valid) => {
|
||||
if (!valid) return;
|
||||
loading.value = true;
|
||||
let params = { ...formData.value,ids:idsVal.value }
|
||||
qcckPost(params,"/mosty-base/bans/njxx/batchAudit").then((res) => {
|
||||
loading.value = false;
|
||||
ElMessage.success("操作成功");
|
||||
dialogForm.value = false;
|
||||
formData.value={}
|
||||
emit('refresh')
|
||||
}).catch(()=>{
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user