fix : 修改为一个文件上传入口, 阶段变更增加变更状态,修复项目实施显示
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
<template>
|
||||
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition" style="margin-left: 5px">
|
||||
<el-row>
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item :label="label" prop="attachment" >-->
|
||||
<!-- <template v-if="preview">-->
|
||||
<!-- <file-upload @getFile="getAttachment" :multiple="false"-->
|
||||
<!-- :disabled="singleFileArray?.length>0?true:false" title="如需修改需求申请书附件,请先删除文件再上传!"/>-->
|
||||
<!-- <fvTable style="width: 100%;max-height: 80px;" height="80" v-if="singleFileArray?.length>0"-->
|
||||
<!-- :tableConfig="editSingleTableConfig"-->
|
||||
<!-- :data="singleFileArray" :isSettingCol="false" :pagination="false">-->
|
||||
<!-- </fvTable>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else-if="!preview">-->
|
||||
<!-- <file-upload @getFile="getAttachment" :multiple="false"-->
|
||||
<!-- :disabled="isSingleFile"/>-->
|
||||
<!-- <fvTable style="width: 100%;max-height: 80px;" v-if="showSingleTable" height="80"-->
|
||||
<!-- :tableConfig="singleTableConfig"-->
|
||||
<!-- :data="_singleFileValue" :isSettingCol="false" :pagination="false">-->
|
||||
<!-- </fvTable>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="label" prop="attachment" >
|
||||
<template v-if="preview">
|
||||
<file-upload @getFile="getAttachment" :multiple="false"
|
||||
:disabled="singleFileArray?.length>0?true:false" title="如需修改需求申请书附件,请先删除文件再上传!"/>
|
||||
<fvTable style="width: 100%;max-height: 80px;" height="80" v-if="singleFileArray?.length>0"
|
||||
:tableConfig="editSingleTableConfig"
|
||||
:data="singleFileArray" :isSettingCol="false" :pagination="false">
|
||||
</fvTable>
|
||||
</template>
|
||||
<template v-else-if="!preview">
|
||||
<file-upload @getFile="getAttachment" :multiple="false"
|
||||
:disabled="isSingleFile"/>
|
||||
<fvTable style="width: 100%;max-height: 80px;" v-if="showSingleTable" height="80"
|
||||
:tableConfig="singleTableConfig"
|
||||
:data="_singleFileValue" :isSettingCol="false" :pagination="false">
|
||||
</fvTable>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="其他文件" :label-width="tag==='需求上报'?120:106">
|
||||
<el-form-item :label="label" prop="" required>
|
||||
<file-upload @getFile="getOtherFile"/>
|
||||
<fvTable style="width: 100%;max-height: 160px;" v-if="showTable" height="160" :tableConfig="tableConfig"
|
||||
:data="allFileList" :isSettingCol="false" :pagination="false">
|
||||
@@ -240,11 +240,12 @@ const editSingleTableConfig = reactive({
|
||||
})
|
||||
const singleFileArray = ref([])
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
|
||||
// attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
|
||||
})
|
||||
const applyForm = ref()
|
||||
const singleFile = ref({})
|
||||
const isSingleFile = ref(false)
|
||||
const isHaveOneFile = ref(false)
|
||||
const allFileList = ref([])
|
||||
if (localStorage.getItem('singleFile')) {
|
||||
singleFileArray.value.push(JSON.parse(localStorage.getItem('singleFile')))
|
||||
@@ -276,16 +277,18 @@ const _otherFileListValue = computed({
|
||||
}
|
||||
})
|
||||
if (_otherFileListValue.value && _otherFileListValue.value.length > 0) {
|
||||
isHaveOneFile.value=true
|
||||
_otherFileListValue.value.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}
|
||||
watch(() => props.showSingleTable, (newVal) => {
|
||||
props.showSingleTable = newVal
|
||||
}, {deep: true})
|
||||
// watch(() => props.showSingleTable, (newVal) => {
|
||||
// props.showSingleTable = newVal
|
||||
// }, {deep: true})
|
||||
watch(() => props.formData.fileList, (newVal) => {
|
||||
if (props.preview) {
|
||||
newVal?.forEach(item => {
|
||||
isHaveOneFile.value=true
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}
|
||||
@@ -329,6 +332,9 @@ watch(() => props.showTable, (newVal) => {
|
||||
watch(() => isSingleFile.value, (newVal) => {
|
||||
isSingleFile.value = newVal
|
||||
}, {deep: true})
|
||||
watch(() => isHaveOneFile.value, (newVal) => {
|
||||
isHaveOneFile.value = newVal
|
||||
}, {deep: true})
|
||||
// watch(() => singleFile.value, (newVal) => {
|
||||
// singleFile.value = newVal
|
||||
// }, {deep: true})
|
||||
@@ -364,6 +370,7 @@ const handleDelete = (row, type) => {
|
||||
_singleFileValue.value.splice(_singleFileValue.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
isSingleFile.value = false
|
||||
} else {
|
||||
isHaveOneFile.value=false
|
||||
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
}
|
||||
}
|
||||
@@ -373,7 +380,6 @@ const handleSingleDelete = (row) => {
|
||||
handleDelete(row, 'single')
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
// console.log('getAttachment', val)
|
||||
isSingleFile.value = true
|
||||
emit('getAttachment', val)
|
||||
}
|
||||
@@ -394,6 +400,7 @@ const getOtherFile = (val) => {
|
||||
} else {
|
||||
allFileList.value = _otherFileListValue.value
|
||||
}
|
||||
isHaveOneFile.value=true
|
||||
emit('getOtherFile', val)
|
||||
}
|
||||
const deleteAttachment = (val) => {
|
||||
@@ -458,7 +465,8 @@ defineExpose({
|
||||
},
|
||||
allFileList,
|
||||
singleFile,
|
||||
isSingleFile
|
||||
isSingleFile,
|
||||
isHaveOneFile,
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -259,22 +259,22 @@ const schema = computed(() => {
|
||||
}
|
||||
}
|
||||
arr.push(preProcess)
|
||||
arr.push({
|
||||
label: '项目立项附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth: 'left',
|
||||
component: () => {
|
||||
let singleFileArray = [props.formData.singleFile]
|
||||
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
tableConfig={editSingleTableConfig}
|
||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
</fvTable>
|
||||
: <span>--</span>
|
||||
}
|
||||
})
|
||||
// arr.push({
|
||||
// label: '项目立项附件',
|
||||
// prop: 'singleFile',
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// },
|
||||
// labelWidth: 'left',
|
||||
// component: () => {
|
||||
// let singleFileArray = [props.formData.singleFile]
|
||||
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
// tableConfig={editSingleTableConfig}
|
||||
// data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
// </fvTable>
|
||||
// : <span>--</span>
|
||||
// }
|
||||
// })
|
||||
} else if (props.type == 'execute') {
|
||||
arr = [{
|
||||
label: '部门分管领导',
|
||||
@@ -312,60 +312,60 @@ const schema = computed(() => {
|
||||
}
|
||||
}
|
||||
arr.push(preProcess)
|
||||
arr.push(
|
||||
{
|
||||
label: '项目验收附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth: 'left',
|
||||
component: () => {
|
||||
let singleFileArray = [props.formData.singleFile]
|
||||
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
tableConfig={editSingleTableConfig}
|
||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
</fvTable>
|
||||
: <span>--</span>
|
||||
}
|
||||
})
|
||||
// arr.push(
|
||||
// {
|
||||
// label: '项目验收附件',
|
||||
// prop: 'singleFile',
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// },
|
||||
// labelWidth: 'left',
|
||||
// component: () => {
|
||||
// let singleFileArray = [props.formData.singleFile]
|
||||
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
// tableConfig={editSingleTableConfig}
|
||||
// data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
// </fvTable>
|
||||
// : <span>--</span>
|
||||
// }
|
||||
// })
|
||||
} else if (props.type == 'archivist') {
|
||||
arr = [
|
||||
{
|
||||
label: '项目归档附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth: 'left',
|
||||
component: () => {
|
||||
let singleFileArray = [props.formData.singleFile]
|
||||
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
tableConfig={editSingleTableConfig}
|
||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
</fvTable>
|
||||
: <span>--</span>
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '项目归档附件',
|
||||
// prop: 'singleFile',
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// },
|
||||
// labelWidth: 'left',
|
||||
// component: () => {
|
||||
// let singleFileArray = [props.formData.singleFile]
|
||||
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
// tableConfig={editSingleTableConfig}
|
||||
// data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
// </fvTable>
|
||||
// : <span>--</span>
|
||||
// }
|
||||
// },
|
||||
]
|
||||
} else if (props.type == 'phase') {
|
||||
arr = [
|
||||
{
|
||||
label: '阶段变更附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth: 'left',
|
||||
component: () => {
|
||||
let singleFileArray = [props.formData.singleFile]
|
||||
return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
tableConfig={editSingleTableConfig}
|
||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
</fvTable>
|
||||
: <span>--</span>
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '阶段变更附件',
|
||||
// prop: 'singleFile',
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// },
|
||||
// labelWidth: 'left',
|
||||
// component: () => {
|
||||
// let singleFileArray = [props.formData.singleFile]
|
||||
// return props.formData.singleFile ? <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||
// tableConfig={editSingleTableConfig}
|
||||
// data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||
// </fvTable>
|
||||
// : <span>--</span>
|
||||
// }
|
||||
// },
|
||||
]
|
||||
}
|
||||
return arr
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-form :label-position="labelAlign">
|
||||
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
|
||||
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
|
||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||
<!-- :style="{width:isOpenPrint?'610px': '100%'}" table-layout="auto" id="printTable"-->
|
||||
<fvTable style="width:100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig"
|
||||
|
||||
@@ -491,17 +491,17 @@ const handleSubmit = async () => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (!attachment.value.isHaveOneFile) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let projectPersonIds = []
|
||||
for (const item of projectPersonUserList.value) {
|
||||
projectPersonIds.push(parseInt(item.id))
|
||||
|
||||
@@ -553,20 +553,22 @@ const getBaseInfo = async () => {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
// console.log('data.procedure', data.procedure, route.query.step)
|
||||
if (route.query.step === '30'||route.query.step === '40') {
|
||||
if (data.procedure.indexOf('30') == -1||data.procedure.indexOf('40') == -1) {
|
||||
data.procedure.push('30')
|
||||
data.procedure.push('40')
|
||||
}
|
||||
}
|
||||
else if (route.query.step === '10'||route.query.step === '20') {
|
||||
if (data.procedure.indexOf('40') != -1||data.procedure.indexOf('50') != -1) {
|
||||
data.procedure.push('30')
|
||||
}
|
||||
}
|
||||
else if (route.query.step === '50') {
|
||||
if (data.procedure.indexOf('30') == -1) {
|
||||
data.procedure.push('30')
|
||||
}
|
||||
if (data.procedure.indexOf('40') == -1) {
|
||||
data.procedure.push('40')
|
||||
}
|
||||
}
|
||||
// else if (route.query.step === '10'||route.query.step === '20') {
|
||||
// if (data.procedure.indexOf('40') != -1||data.procedure.indexOf('50') != -1) {
|
||||
// data.procedure.push('30')
|
||||
// }
|
||||
// }
|
||||
else if (route.query.step === '50') {
|
||||
// if (data.procedure.indexOf('30') == -1) {
|
||||
// data.procedure.push('30')
|
||||
// }
|
||||
if (data.procedure.indexOf('50') == -1) {
|
||||
data.procedure.push('50')
|
||||
}
|
||||
|
||||
@@ -254,10 +254,13 @@
|
||||
</el-form>
|
||||
<baseTitle title="附件文件"></baseTitle>
|
||||
<div :style="{marginRight:!formData.isSpecialFund?'20px':'80px'}">
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" v-model:otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment" v-model:singleList="singleList"
|
||||
:showSingleTable="showSingleTable"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" tag="需求上报"
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件"
|
||||
:showTable="showTable"
|
||||
v-model:otherFileList="otherFileList"
|
||||
@getOtherFile="getOtherFile"
|
||||
:showSingleTable="showSingleTable" @getAttachment="getAttachment"
|
||||
v-model:singleList="singleList"
|
||||
:showFileList="true" :formData="formData" tag="需求上报"
|
||||
:preview="name === 'Summary/edit'"/>
|
||||
</div>
|
||||
<div class="approval-record">
|
||||
@@ -470,45 +473,44 @@ const handleSubmit = debounce(async (instance) => {
|
||||
})
|
||||
return;
|
||||
}
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
formData.value.optionalChargeLeadership = optionalChargeLeadershipList.value
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
// if (!attachment.value.isHaveOneFile) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
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'
|
||||
})
|
||||
formData.value.optionalChargeLeadership = optionalChargeLeadershipList.value
|
||||
if (formData.value.singleFile !== undefined) {
|
||||
formData.value.singleFile = getFileParam(formData.value.singleFile)
|
||||
}
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
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((instance) => {
|
||||
@@ -532,17 +534,17 @@ const handleResubmit = debounce((instance) => {
|
||||
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
|
||||
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (!attachment.value.isHaveOneFile) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
|
||||
@@ -435,6 +435,7 @@ const handlePhaseChangeEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Phase/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId:row.projectId
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,20 +1,29 @@
|
||||
<template>
|
||||
<div class="apply-block" v-loading="loading">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"
|
||||
style="margin-left: 15px"></fvForm>
|
||||
<baseTitle title="阶段变更信息" style="margin-top: -10px"></baseTitle>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<el-form :model="formData" label-width="auto" :rules="rules">
|
||||
<el-form-item label="抄送人员" label-width="110">
|
||||
<Ttsup :modelValue="chooseUserInfo()" @clickCopyUser="chooseUser"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更状态" label-width="110" prop="changeState">
|
||||
<el-select v-model="formData.changeState" placeholder="请选择变更状态" filterable clearable style="width: 300px">
|
||||
<el-option v-for="item in cacheStore.getDict('fee_stage')" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<user-picker :multiple="true" ref="userPicker" title="请选择抄送人员" v-model:value="userList" @ok="ccPersonPickerOkOrCancel" @cancelOrClear="ccPersonPickerOkOrCancel"/>
|
||||
<user-picker :multiple="true" ref="userPicker" title="请选择抄送人员" v-model:value="userList"
|
||||
@ok="ccPersonPickerOkOrCancel" @cancelOrClear="ccPersonPickerOkOrCancel"/>
|
||||
<AttachmentUpload ref="attachment" label="阶段变更附件" :showTable="showTable" v-model:otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable"
|
||||
@getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" tag="阶段变更"
|
||||
:preview="name === 'Phase/edit'"/>
|
||||
<div class="approval-record" >
|
||||
<div class="approval-title" style="margin-top: -15px">
|
||||
<div class="approval-record">
|
||||
<div class="approval-title" style="margin-top: -15px">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
@@ -24,8 +33,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty :image-size="100" description="暂无审批记录" v-if="processDiagramViewer&& !opentionData?.operationList&&!changeDiagram"/>
|
||||
<!-- <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>-->
|
||||
<el-empty :image-size="100" description="暂无审批记录"
|
||||
v-if="processDiagramViewer&& !opentionData?.operationList&&!changeDiagram"/>
|
||||
<!-- <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>-->
|
||||
<div class="process">
|
||||
<operation-render
|
||||
v-if="processDiagramViewer&& opentionData?.operationList && opentionData?.operationList.length > 0&&!changeDiagram"
|
||||
@@ -55,6 +65,7 @@ import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const changeDiagram = ref(false)
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -67,7 +78,9 @@ const showSingleTable = ref(false)
|
||||
const singleList = ref([])
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
const formData = ref({
|
||||
changeState:'1'
|
||||
})
|
||||
const file = ref({})
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
@@ -77,6 +90,9 @@ const processDiagramViewer = ref(true)
|
||||
const userList = ref([])
|
||||
const processStore = useProcessStore()
|
||||
const baseFormData = ref([])
|
||||
const rules = reactive({
|
||||
changeState: [{required: true, message: '请选择变更状态', trigger: ['blur', 'change']}],
|
||||
})
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
@@ -214,7 +230,7 @@ const schema = computed(() => {
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
<span>{toThousands(baseFormData.value?.economicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
@@ -330,9 +346,9 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
// console.log('上传文件getAttachment', val)
|
||||
showSingleTable.value=false
|
||||
showSingleTable.value = false
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
singleList.value.push( compositeParam(val))
|
||||
singleList.value.push(compositeParam(val))
|
||||
nextTick(() => {
|
||||
showSingleTable.value = true
|
||||
if (attachment.value.singleFile == null) {
|
||||
@@ -372,7 +388,7 @@ const chooseUser = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const chooseUserInfo = () => {
|
||||
if(userList.value==null)return;
|
||||
if (userList.value == null) return;
|
||||
if (userList.value.length > 0) {
|
||||
return userList.value.map(item => {
|
||||
return item.name
|
||||
@@ -382,7 +398,7 @@ const chooseUserInfo = () => {
|
||||
}
|
||||
}
|
||||
const ccPersonPickerOkOrCancel = (select) => {
|
||||
console.log('select',select)
|
||||
console.log('select', select)
|
||||
userList.value = select
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
@@ -391,7 +407,7 @@ const handleSubmit = async () => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let userIds = []
|
||||
if (userList.value&&userList.value.length > 0) {
|
||||
if (userList.value && userList.value.length > 0) {
|
||||
userIds = userList.value?.map(item => {
|
||||
return item.id
|
||||
})
|
||||
@@ -403,22 +419,23 @@ const handleSubmit = async () => {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: formData.value.singleFile,
|
||||
// singleFile: formData.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
userIds: userIds
|
||||
userIds: userIds,
|
||||
changeState:formData.value.changeState
|
||||
}
|
||||
if (!attachment.value.isSingleFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params',params)
|
||||
// if (!attachment.value.isHaveOneFile) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
console.log('params', params)
|
||||
let res = await submitPhaseChange(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -440,29 +457,30 @@ const handleResubmit = (instance) => {
|
||||
})
|
||||
}
|
||||
let userIds = []
|
||||
if (userList.value&&userList.value.length > 0) {
|
||||
if (userList.value && userList.value.length > 0) {
|
||||
userIds = userList.value?.map(item => {
|
||||
return item.id
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (!attachment.value.isHaveOneFile) {
|
||||
// attachment.value.validate()
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '请上传附件',
|
||||
// type: 'error'
|
||||
// })
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: otherFiles,
|
||||
singleFile: attachment.value.singleFile,
|
||||
// singleFile: attachment.value.singleFile,
|
||||
projectId: route.query.projectId,
|
||||
userIds: userIds
|
||||
userIds: userIds,
|
||||
changeState:formData.value.changeState
|
||||
}
|
||||
// console.log('重新提交params', params)
|
||||
resubmitPhaseForm(params).then(res => {
|
||||
@@ -510,7 +528,7 @@ const getDetailInfo = async () => {
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
userList.value=res.data.formData.userInfoList?res.data.formData.userInfoList:[]
|
||||
userList.value = res.data.formData.userInfoList ? res.data.formData.userInfoList : []
|
||||
formData.value = res.data.formData
|
||||
opentionData.value = res.data
|
||||
loading.value = false
|
||||
@@ -529,6 +547,6 @@ onMounted(async () => {
|
||||
<style scoped>
|
||||
.apply-block {
|
||||
margin: 15px 0;
|
||||
padding: 0 30px ;
|
||||
padding: 0 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px;height:25px;"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
|
||||
<div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">变更状态</span>
|
||||
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
|
||||
<tag dict-type="fee_stage" :value="changeState"/>
|
||||
</div>
|
||||
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" :taskUserOptionList="summaryData.taskUserOptionList" v-model:value="auditOpinion"></opinion>
|
||||
@@ -28,6 +33,7 @@ const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const changeState = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
@@ -275,6 +281,7 @@ const getInfo = async () => {
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
changeState.value= data.formData.changeState
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
|
||||
Reference in New Issue
Block a user