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 | 53 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/src/views/work/sealManagement/apply/index.vue b/src/views/work/sealManagement/apply/index.vue
index 3e70918..925e04b 100644
--- a/src/views/work/sealManagement/apply/index.vue
+++ b/src/views/work/sealManagement/apply/index.vue
@@ -47,16 +47,15 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160" >
<template #default="scope">
- <div v-if="data.tabName === 'apply'">
+ <div v-if="data.tabName === 'apply' || data.tabName === 'all'">
<el-button link type="primary" @click="openDialog('review',scope.row)">查看</el-button>
- <el-button link type="primary" @click="openDialog('edit',scope.row)" v-hasPermi="['sealApply:list:edit']">编辑</el-button>
+ <el-button link type="primary" v-if="scope.row.status == 1" @click="openDialog('edit',scope.row)" v-hasPermi="['sealApply:list:edit']">编辑</el-button>
<el-button link type="danger" @click="handleDelete(scope.row)" v-hasPermi="['sealApply:list:del']">删除</el-button>
</div>
- <div v-else>
+ <div v-if="data.tabName === 'approval'">
<el-button link type="primary" @click="openDialog('review',scope.row)">查看</el-button>
<el-button link type="primary" @click="openApplyDialog(scope.row)" v-hasPermi="['sealApply:list:apply']">审批</el-button>
</div>
-
</template>
</el-table-column>
</el-table>
@@ -78,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 >
@@ -108,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({
@@ -127,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);
@@ -268,7 +277,8 @@
data.applyForm = {
useSealId: val.id,
approveUserId: data.userId,
- approveStatus: null
+ approveStatus: null,
+ approveMess:''
}
data.showDialog = true
}
@@ -276,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