From 7619b42541a7b44c4f859b17f69d087b39aef08c Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期一, 24 十一月 2025 16:53:46 +0800
Subject: [PATCH] 修改
---
src/views/work/sealManagement/apply/index.vue | 46 +++++++++++++++++++++++++++++++---------------
1 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/src/views/work/sealManagement/apply/index.vue b/src/views/work/sealManagement/apply/index.vue
index e8e6c03..925e04b 100644
--- a/src/views/work/sealManagement/apply/index.vue
+++ b/src/views/work/sealManagement/apply/index.vue
@@ -77,12 +77,16 @@
width="500px"
:before-close="handleClose"
>
- <el-form :model="data.applyForm" size="default" ref="noticeRef" label-width="110px" >
+ <el-form :model="data.applyForm" :rules="data.rules" size="default" ref="busRef" label-width="110px" >
<el-form-item label="审批意见:" prop="approveStatus" >
<el-radio-group v-model="data.applyForm.approveStatus" >
<el-radio :label="1">同意</el-radio>
<el-radio :label="2">不同意</el-radio>
</el-radio-group>
+
+ </el-form-item>
+ <el-form-item prop="approveMess" >
+ <el-input type="textarea" :rows="3" v-model="data.applyForm.approveMess"></el-input>
</el-form-item>
</el-form>
<template #footer >
@@ -107,6 +111,7 @@
const { proxy } = getCurrentInstance();
const loading = ref(false);
const noticeRef = ref();
+const busRef = ref();
const loadingCompany = ref(false)
const choosedData = ref([])
const data = reactive({
@@ -126,8 +131,13 @@
applyForm: {
useSealId: null,
approveUserId: null,
- approveStatus: null
- }
+ approveStatus: null,
+ approveMess:''
+ },
+ rules: {
+ approveStatus:[{ required: true, message: '请选择审批意见', trigger: 'blur' }],
+ approveMess:[{ required: true, message: '请输入意见内容', trigger: 'blur' }],
+ },
});
const dataList = ref([]);
const total = ref(0);
@@ -267,7 +277,8 @@
data.applyForm = {
useSealId: val.id,
approveUserId: data.userId,
- approveStatus: null
+ approveStatus: null,
+ approveMess:''
}
data.showDialog = true
}
@@ -275,22 +286,27 @@
data.applyForm = {
useSealId: null,
approveUserId: null,
- approveStatus: null
+ approveStatus: null,
+ approveMess:''
}
data.showDialog = false
}
const onSubmit = async () => {
- const res = await reviewApply(data.applyForm)
- if(res.code === 200){
- ElMessage({
- type: 'success',
- message: '审批成功'
- });
- await getList();
- data.showDialog = false
- }else{
- ElMessage.warning(res.message)
+ const valid = await busRef.value.validate();
+ if(valid){
+ const res = await reviewApply(data.applyForm)
+ if(res.code === 200){
+ ElMessage({
+ type: 'success',
+ message: '审批成功'
+ });
+ await getList();
+ data.showDialog = false
+ }else{
+ ElMessage.warning(res.message)
+ }
}
+
}
</script>
<style lang="scss">
--
Gitblit v1.9.2