From e3564727bc4d02439c10f109176e0a71ea07d908 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Thu, 30 May 2024 11:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A1=E6=89=B9=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=98=BE=E7=A4=BA=E5=8F=8A=E4=BD=93=E9=AA=8C=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E7=94=A8=E6=88=B7=E6=93=8D=E4=BD=9C=E6=95=88?= =?UTF-8?q?=E7=8E=87=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oa_Initiate/detail.vue | 6 ++-- src/views/oa_arrival/edit.vue | 2 +- src/views/permission/admin/edit.vue | 45 +++++++++++++++-------------- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/views/oa_Initiate/detail.vue b/src/views/oa_Initiate/detail.vue index b6ba3e0..5084d01 100644 --- a/src/views/oa_Initiate/detail.vue +++ b/src/views/oa_Initiate/detail.vue @@ -76,7 +76,7 @@ v-if="formData.admin_id != userStore.id && formData.flow_info.check_type == 3"> 回退 - + 撤回 @@ -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 diff --git a/src/views/oa_arrival/edit.vue b/src/views/oa_arrival/edit.vue index 7209769..f24a52a 100644 --- a/src/views/oa_arrival/edit.vue +++ b/src/views/oa_arrival/edit.vue @@ -110,7 +110,7 @@ 确定 - 取消 + 取消 diff --git a/src/views/permission/admin/edit.vue b/src/views/permission/admin/edit.vue index bfc78f9..ff1387f 100644 --- a/src/views/permission/admin/edit.vue +++ b/src/views/permission/admin/edit.vue @@ -48,7 +48,7 @@ - + @@ -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 = () => {