fix : 修复项目立项校验
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<el-form-item :label="label" prop="attachment" label-width="125">
|
||||
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
|
||||
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
|
||||
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName?formData.singleFile?.originalFileName:_singleFileValue[0]?.originalFileName }}
|
||||
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
|
||||
</el-button>
|
||||
<el-button type="danger" link @click="deleteSingleFile(singleFile?singleFile:formData.singleFile,1)">删除
|
||||
</el-button>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="title==='apply'">
|
||||
<el-form-item label="项目负责人" :required="true" prop="projectChargePerson"
|
||||
<el-form-item label="项目负责人" :required="true" prop=""
|
||||
label-width="125">
|
||||
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
|
||||
<!-- {{ localFormData.projectChargePerson ? '更改' : '请选择' }}-->
|
||||
@@ -45,7 +45,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="title==='apply'">
|
||||
<el-form-item label="项目成员" :required="true" prop="projectPerson"
|
||||
<el-form-item label="项目成员" :required="true" prop=""
|
||||
label-width="125">
|
||||
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
|
||||
<!-- {{ localFormData.projectPersonIds ? '更改' : '请选择' }}-->
|
||||
@@ -59,7 +59,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
||||
<!-- :required="preProcessRequired"-->
|
||||
<el-form-item label="前置流程" prop="preProcess" label-width="125">
|
||||
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
||||
{{ localFormData.preProcess&&localFormData.preProcess.length>0 ? '更改' :sessionParams.preProcess&&sessionParams.preProcess.length>0 ? '更改' : '请选择' }}
|
||||
</el-button>
|
||||
@@ -77,7 +78,7 @@
|
||||
v-model:otherFileList="otherFileList" :tag="getTitleName(props.title)"
|
||||
@getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||
:preview="mode == 'resubmit'||mode == 'submit'"/>
|
||||
:preview="mode == 'resubmit'"/>
|
||||
<div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
@@ -260,11 +261,11 @@ const pageInfo = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
const rules = reactive({
|
||||
preProcess: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||
projectChargePerson: [{required: true, message: '请选择项目负责人', trigger: 'blur'}],
|
||||
projectPerson: [{required: true, message: '请选择项目成员', trigger: 'blur'}],
|
||||
})
|
||||
// const rules = reactive({
|
||||
// preProcess: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||
// projectChargePerson: [{required: true, message: '请选择项目负责人', trigger: 'blur'}],
|
||||
// projectPerson: [{required: true, message: '请选择项目成员', trigger: 'blur'}],
|
||||
// })
|
||||
const tagsViewStore = useTagsView()
|
||||
const processStore = useProcessStore()
|
||||
const localProjectPerson = ref([])
|
||||
@@ -303,27 +304,22 @@ if(localStorage.getItem('singleFile')){
|
||||
localFormData.value.singleFile=param
|
||||
singleList.value=[param]
|
||||
localStorage.setItem('singleFile', JSON.stringify(param))
|
||||
showSingleTable.value=false
|
||||
nextTick(()=>{
|
||||
showSingleTable.value=true
|
||||
})
|
||||
}
|
||||
if(localStorage.getItem('otherFileList')){
|
||||
let param=JSON.parse(localStorage.getItem('otherFileList'))
|
||||
localFormData.value.otherFileList=param
|
||||
otherFileList.value=param
|
||||
localStorage.setItem('otherFileList', JSON.stringify(param))
|
||||
showTable.value=false
|
||||
nextTick(()=>{
|
||||
showTable.value=true
|
||||
})
|
||||
}
|
||||
// if(localStorage.getItem('sessionParams')){
|
||||
// let param=JSON.parse(localStorage.getItem('sessionParams'))
|
||||
// if(param.otherFileList){
|
||||
// localFormData.value.otherFileList = param.otherFileList
|
||||
// // localStorage.setItem('sessionParams', JSON.stringify(localFormData.value))
|
||||
// otherFileList.value=param.otherFileList
|
||||
// // showTable.value=false
|
||||
// // nextTick(()=>{
|
||||
// // showTable.value=true
|
||||
// // })
|
||||
// }
|
||||
//
|
||||
// localStorage.setItem('sessionParams', JSON.stringify(localFormData.value))
|
||||
// }
|
||||
|
||||
if(localStorage.getItem('projectChargePersonUserList')){
|
||||
let param=JSON.parse(localStorage.getItem('projectChargePersonUserList'))
|
||||
projectChargePersonUserList.value=param
|
||||
@@ -538,7 +534,19 @@ const getAttachment = (val) => {
|
||||
singleList.value.push(compositeParam(val))
|
||||
nextTick(() => {
|
||||
showSingleTable.value = true
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
})
|
||||
|
||||
localStorage.setItem('singleFile', JSON.stringify(compositeParam(val)))
|
||||
}
|
||||
watch(() => singleList.value, (newVal) => {
|
||||
|
||||
@@ -383,6 +383,17 @@ const getAttachment = (val) => {
|
||||
singleList.value.push(compositeParam(val))
|
||||
nextTick(() => {
|
||||
showSingleTable.value = true
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
})
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
|
||||
@@ -123,6 +123,17 @@ const getAttachment = (val) => {
|
||||
singleList.value.push( compositeParam(val))
|
||||
nextTick(() => {
|
||||
showSingleTable.value = true
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
})
|
||||
}
|
||||
watch(() => singleList.value, (newVal) => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="requestName">
|
||||
<el-form-item label="前置流程" prop="requestName">
|
||||
<div v-for="item in localFormData.preProcess" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
|
||||
@@ -270,6 +270,17 @@ const compositeParam = (item) => {
|
||||
const getAttachment = (val) => {
|
||||
// console.log('上传文件getAttachment', val)
|
||||
localFormData.value.singleFile = compositeParam(val)
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
// console.log('上传文件getOtherFile', val)
|
||||
|
||||
Reference in New Issue
Block a user