优化审批流程显示及体验,提升用户操作效率。
This commit is contained in:
parent
c007c5c74b
commit
e3564727bc
@ -76,7 +76,7 @@
|
||||
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type == 3">
|
||||
回退
|
||||
</el-button>
|
||||
<el-button type="info" @click=" showBackDialog = true" v-if="formData.admin_id == userStore.id">
|
||||
<el-button type="info" @click="showBackDialog = true" v-if="formData.admin_id == userStore.id">
|
||||
撤回
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
@ -251,9 +251,9 @@ const hdClose = () => {
|
||||
|
||||
// 审批
|
||||
const handCheck = async () => {
|
||||
if (form.check == 2 && !form.content) return feedback.msgError("请填写审批意见")
|
||||
if (formData.check_admin_ids && formData.record[formData.record.length - 1].check_user_id == form.check_admin_ids) {
|
||||
feedback.msgError("下一级审批人不能是发起审批人")
|
||||
return
|
||||
return feedback.msgError("下一级审批人不能是发起审批人")
|
||||
}
|
||||
if (formData.flow_info.check_type != 2) delete form.check_node;
|
||||
form.id = formData.id
|
||||
|
@ -110,7 +110,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="invoice_phone">
|
||||
<el-button type="primary" @click="allSubmits">确定</el-button>
|
||||
<el-button @click="showDialog.value = false">取消</el-button>
|
||||
<el-button @click="showDialog = false">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
|
@ -48,7 +48,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<!-- 密码输入框 -->
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-form-item label="密码" prop="password" v-if="mode == 'add'">
|
||||
<el-input v-model="formData.password" show-password clearable placeholder="请输入密码" />
|
||||
</el-form-item>
|
||||
|
||||
@ -100,7 +100,7 @@ const formData = reactive({
|
||||
org_id: [],
|
||||
avatar: '',
|
||||
password: '',
|
||||
// password_confirm: '',
|
||||
password_confirm: '',
|
||||
disable: 0,
|
||||
multipoint_login: 1,
|
||||
root: 0
|
||||
@ -148,17 +148,17 @@ const formRules = reactive({
|
||||
trigger: ['blur']
|
||||
}
|
||||
] as any[],
|
||||
// password_confirm: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: '请输入确认密码',
|
||||
// trigger: ['blur']
|
||||
// },
|
||||
// {
|
||||
// validator: passwordConfirmValidator,
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ] as any[]
|
||||
password_confirm: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入确认密码',
|
||||
trigger: ['blur']
|
||||
},
|
||||
{
|
||||
validator: passwordConfirmValidator,
|
||||
trigger: 'blur'
|
||||
}
|
||||
] as any[]
|
||||
})
|
||||
const { optionsData } = useDictOptions<{
|
||||
role: any[]
|
||||
@ -172,7 +172,14 @@ const { optionsData } = useDictOptions<{
|
||||
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
mode.value == 'edit' ? await adminEdit(formData) : await adminAdd(formData)
|
||||
if (mode.value == 'edit') {
|
||||
delete formData.password;
|
||||
delete formData.password_confirm;
|
||||
await adminEdit(formData)
|
||||
} else {
|
||||
await adminAdd(formData)
|
||||
}
|
||||
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
@ -206,12 +213,6 @@ const getlista = () => {
|
||||
}
|
||||
const setFormData = async (row: any) => {
|
||||
formRules.password = []
|
||||
// formRules.password_confirm = [
|
||||
// {
|
||||
// validator: passwordConfirmValidator,
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ]
|
||||
const data = await adminDetail({
|
||||
id: row.id
|
||||
})
|
||||
@ -230,7 +231,9 @@ const setFormData = async (row: any) => {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (formData.dept_id == 0) formData.dept_id = '';
|
||||
if (formData.job_id == 0) formData.job_id = '';
|
||||
if (formData.org_id == 0) formData.org_id = '';
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user