fix : 修复申请文件校验
This commit is contained in:
@@ -97,12 +97,12 @@
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="subtotal" label="小计">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="subtotal" label="小计">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="oper" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="handleCopy(scope.row)" link style="font-size: 18px">复制</el-button>
|
||||
@@ -147,7 +147,7 @@ const form = ref()
|
||||
const nameOptions = ref([
|
||||
{
|
||||
label: "某项目",
|
||||
value: '2'
|
||||
value: '42'
|
||||
}
|
||||
])
|
||||
const researchOptions = ref([
|
||||
@@ -168,7 +168,7 @@ const tableData = ref([
|
||||
annuity: '',
|
||||
workday: '',
|
||||
researchDuration: '',
|
||||
subtotal: '',
|
||||
// subtotal: '',
|
||||
}
|
||||
])
|
||||
const handleAdd = () => {
|
||||
@@ -183,7 +183,7 @@ const handleAdd = () => {
|
||||
annuity: '',
|
||||
workday: '',
|
||||
researchDuration: '',
|
||||
subtotal: '',
|
||||
// subtotal: '',
|
||||
}
|
||||
tableData.value.push(row)
|
||||
}
|
||||
@@ -199,7 +199,8 @@ const handleSubmit = (instance) => {
|
||||
if (!valid) return
|
||||
let params = {
|
||||
...formData.value,
|
||||
usrAllocations: tableData.value
|
||||
usrAllocations: tableData.value,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
}
|
||||
const {code, msg} = await addAllocation(params)
|
||||
ElNotification({
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
// import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
const router = useRouter();
|
||||
const searchConfig = reactive([
|
||||
@@ -42,16 +42,17 @@ const searchConfig = reactive([
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
colProps: {}
|
||||
}, {
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
cacheKey: 'special_fund'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '状态',
|
||||
// prop: 'state',
|
||||
// component: shallowRef(fvSelect),
|
||||
// props: {
|
||||
// placeholder: '请选择状态',
|
||||
// clearable: true,
|
||||
// cacheKey: 'special_fund'
|
||||
// }
|
||||
// },
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
@@ -76,7 +77,7 @@ const tableConfig = reactive({
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
// currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
@@ -89,25 +90,25 @@ const tableConfig = reactive({
|
||||
if(row.buttons){
|
||||
buttons = new Set(Array.from(row.buttons))
|
||||
}
|
||||
if (buttons.has("details")) {
|
||||
// if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
// }
|
||||
// if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("report")) {
|
||||
// }
|
||||
// if (buttons.has("report")) {
|
||||
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("report")) {
|
||||
// }
|
||||
// if (buttons.has("report")) {
|
||||
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
// v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -116,11 +117,11 @@ const tableConfig = reactive({
|
||||
))
|
||||
}
|
||||
{
|
||||
buttons.has("delete") ?
|
||||
// buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
: ''
|
||||
// : ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
@@ -148,7 +149,7 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Share/detail',
|
||||
query: {
|
||||
id:row.id
|
||||
id:row.allocationId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund" >
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="5">-->
|
||||
<!-- <el-form-item label="是否专项资金" prop="isSpecialFund">-->
|
||||
<!-- <el-radio-group v-model="formData.isSpecialFund" >-->
|
||||
<!-- <el-radio :label="true">是</el-radio>-->
|
||||
<!-- <el-radio :label="false">否</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="formData.isSpecialFund">
|
||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
@@ -54,12 +54,6 @@
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
|
||||
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
|
||||
<!-- filterable clearable :check-strictly="true"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col> <el-col :span="12">-->
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
@@ -271,7 +265,6 @@ const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const deploymentId = ref()
|
||||
const specialFundOption = ref([])
|
||||
const isSpecialFund = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const file = ref({})
|
||||
@@ -284,7 +277,6 @@ const rules = reactive({
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||
// affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||
@@ -305,16 +297,16 @@ const rules = reactive({
|
||||
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
|
||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
||||
})
|
||||
const getIsFund = async () => {
|
||||
getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
formData.value.isSpecialFund = res.data.isSpecialFund
|
||||
if(res.data.isSpecialFund){
|
||||
formData.value.specialFund = Number(res.data.specialFund)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// const getIsFund = async () => {
|
||||
// getFormInfo(route.query.id).then(res => {
|
||||
// if (res.code === 1000) {
|
||||
// formData.value.isSpecialFund = res.data.isSpecialFund
|
||||
// if(res.data.isSpecialFund){
|
||||
// formData.value.specialFund = Number(res.data.specialFund)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||
@@ -351,74 +343,85 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
const handleSubmit = debounce(async (instance) => {
|
||||
console.log('formData.value',formData.value)
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
// if (JSON.stringify(file.value) === "{}") {
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
}
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
// let params = {
|
||||
// "specialFund": "2",
|
||||
// "projectName": "重新提交全流程测试2024520",
|
||||
// "startTime": "2024-05-24 00:00:00",
|
||||
// "endTime": "2024-05-29 00:00:00",
|
||||
// "projectType": "3",
|
||||
// "investmentType": "3",
|
||||
// "businessSegment": "2",
|
||||
// "technicalStandard": "2",
|
||||
// "governmentDeclaration": 0,
|
||||
// "inventionPatent": "3",
|
||||
// "newPatent": "3",
|
||||
// "economicEstimate": "3",
|
||||
// "other": "3",
|
||||
// "copyright": "3",
|
||||
// "softwareCopyright": "3",
|
||||
// "industryUniversityResearch": 0,
|
||||
// "intellectualProperty": "00",
|
||||
// "resultForm": "3",
|
||||
// "projectImpact": "3",
|
||||
// "rdSubject": "3",
|
||||
// // "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
// "serviceDescription": "3",
|
||||
// "contentDescription": "3",
|
||||
// "specialFundAmount": "3",
|
||||
// deploymentId: deploymentId.value,
|
||||
// "singleFile": singleFile,
|
||||
// "fileList": otherFiles,
|
||||
// "requirementId":route.query.id
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Summary'
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// let params = {
|
||||
// "specialFund": "2",
|
||||
// "projectName": "测试全流程功能-上报",
|
||||
// "startTime": "2024-05-24 00:00:00",
|
||||
// "endTime": "2024-05-29 00:00:00",
|
||||
// "projectType": "3",
|
||||
// "investmentType": "3",
|
||||
// "businessSegment": "2",
|
||||
// "technicalStandard": "2",
|
||||
// "governmentDeclaration": 0,
|
||||
// "inventionPatent": "3",
|
||||
// "newPatent": "3",
|
||||
// "economicEstimate": "3",
|
||||
// "other": "3",
|
||||
// "copyright": "3",
|
||||
// "softwareCopyright": "3",
|
||||
// "industryUniversityResearch": 0,
|
||||
// "intellectualProperty": "00",
|
||||
// "resultForm": "3",
|
||||
// "projectImpact": "3",
|
||||
// "rdSubject": "3",
|
||||
// "serviceDescription": "3",
|
||||
// "contentDescription": "3",
|
||||
// "specialFundAmount": "3",
|
||||
// deploymentId: deploymentId.value,
|
||||
// "singleFile": singleFile,
|
||||
// "fileList": otherFiles,
|
||||
// "requirementId":route.query.id
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
const handleResubmit = debounce(() => {
|
||||
@@ -426,12 +429,12 @@ const handleResubmit = debounce(() => {
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (name.value === 'Summary/edit') {
|
||||
console.log('attachment.value', attachment.value.singleFile)
|
||||
if (attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// console.log('attachment.value', attachment.value.singleFile)
|
||||
// if (attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile?.fileId
|
||||
}
|
||||
@@ -455,6 +458,17 @@ const handleResubmit = debounce(() => {
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -470,6 +484,7 @@ const handleResubmit = debounce(() => {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const getDetailInfo = async () => {
|
||||
getDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
@@ -486,15 +501,10 @@ const getDetailInfo = async () => {
|
||||
const init = async () => {
|
||||
const resFund = await getFundOption()
|
||||
specialFundOption.value = resFund.data
|
||||
await getIsFund()
|
||||
// await getIsFund()
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
@@ -507,6 +517,12 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -128,12 +128,12 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}") {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
@@ -151,6 +151,17 @@ const handleSubmit = async () => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await projectConclusion(params)
|
||||
ElNotification({
|
||||
@@ -169,12 +180,12 @@ const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
@@ -199,6 +210,17 @@ const handleResubmit = () => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitConclusion(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -229,11 +251,6 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getProjectConclusionProcess().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -248,6 +265,12 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -116,6 +116,17 @@ const handleSubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params-提交',params)
|
||||
let res = await projectCheck(params)
|
||||
ElNotification({
|
||||
@@ -138,12 +149,12 @@ const handleResubmit = (instance) => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
@@ -168,6 +179,17 @@ const handleResubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitCheck(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -199,11 +221,6 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getProjectCheckProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -218,6 +235,12 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="项目立项申请"></baseTitle>
|
||||
<baseTitle title="项目立项"></baseTitle>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="前置流程">
|
||||
@@ -93,7 +93,7 @@ const name = ref(router.currentRoute.value.name)
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
|
||||
tag = '项目立项申请'
|
||||
tag = '项目立项'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -130,7 +130,7 @@ const handleSubmit = (instance) => {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传申请书附件',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
@@ -148,6 +148,17 @@ const handleSubmit = (instance) => {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
@@ -155,6 +166,7 @@ const handleSubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
|
||||
console.log('params', params)
|
||||
let res = await projectApply(params)
|
||||
ElNotification({
|
||||
@@ -174,12 +186,12 @@ const handleResubmit = async () => {
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
@@ -203,6 +215,17 @@ const handleResubmit = async () => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await resubmitApply(params)
|
||||
ElNotification({
|
||||
@@ -232,11 +255,6 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getApplyProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -251,6 +269,12 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user