fix : 修复功能
This commit is contained in:
@@ -166,7 +166,6 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
console.log('fileList.value',fileList.value)
|
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
@@ -179,10 +178,10 @@ const handleSubmit = async (instance) => {
|
|||||||
let res = await addRequirement(params)
|
let res = await addRequirement(params)
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
await router.push({
|
await router.push({
|
||||||
path: '/projectdemand/demandcollection'
|
path: '/projectdemand/demandcollection'
|
||||||
})
|
})
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg)
|
ElMessage.error(res.msg)
|
||||||
}
|
}
|
||||||
@@ -196,7 +195,7 @@ const handleResubmit = () => {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
formData.value = res.data.formData
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandcollection'
|
path: '/projectdemand/demandcollection'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-block">
|
<div class="detail-block">
|
||||||
<el-form :model="formData" label-width="auto">
|
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||||
<baseTitle title="需求征集详情"></baseTitle>
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
<div class="left-info">
|
<div class="left-info">
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -58,9 +58,9 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div v-if="processInstanceData.taskId">
|
<div v-if="processInstanceData.taskId">
|
||||||
<baseTitle title="审核意见"></baseTitle>
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
<el-form-item>
|
<el-form-item prop="auditOpinion">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="auditOpinion"
|
v-model="formData.auditOpinion"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="请输入审核意见"
|
placeholder="请输入审核意见"
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||||
<el-button @click="handleReject">驳回</el-button>
|
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||||
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -94,9 +94,13 @@ import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
|||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const form = ref();
|
const form = ref();
|
||||||
|
const demandForm = ref()
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
const processInstanceData = ref({})
|
const processInstanceData = ref({})
|
||||||
@@ -104,26 +108,19 @@ const processDiagramViewer = ref(false)
|
|||||||
const processTree = ref()
|
const processTree = ref()
|
||||||
const companyNameArray = ref([])
|
const companyNameArray = ref([])
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const auditOpinion = ref('')
|
const rules = reactive({
|
||||||
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
|
})
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
let approve = {
|
let approve = {
|
||||||
taskId: processInstanceData.value.taskId,
|
taskId: processInstanceData.value.taskId,
|
||||||
auditOpinion: auditOpinion.value,
|
auditOpinion: formData.value.auditOpinion,
|
||||||
formData: formData.value
|
formData: formData.value
|
||||||
}
|
}
|
||||||
agreeTask(approve).then(res => {
|
agreeTask(approve).then(res => {
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleReject = () => {
|
|
||||||
let approve = {
|
|
||||||
taskId: processInstanceData.value.taskId,
|
|
||||||
auditOpinion: auditOpinion.value,
|
|
||||||
}
|
|
||||||
rejectTask(approve).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandcollection'
|
path: '/projectdemand/demandcollection'
|
||||||
})
|
})
|
||||||
@@ -132,6 +129,27 @@ const handleReject = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleReject = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
let approve = {
|
||||||
|
taskId: processInstanceData.value.taskId,
|
||||||
|
auditOpinion: formData.value.auditOpinion,
|
||||||
|
}
|
||||||
|
rejectTask(approve).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
path: '/projectdemand/demandcollection'
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
const getCompanyOption = async () => {
|
const getCompanyOption = async () => {
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
@@ -160,6 +178,7 @@ const getDataSourceOptionItem = (val) => {
|
|||||||
return companyNameArray.value.join(',');
|
return companyNameArray.value.join(',');
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
if(!route.query.id)return;
|
||||||
await getCompanyOption()
|
await getCompanyOption()
|
||||||
getInfo(route.query.id).then(res => {
|
getInfo(route.query.id).then(res => {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
|
|||||||
Reference in New Issue
Block a user