Merge pull request 'dj' (#162) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/162
This commit is contained in:
@@ -166,7 +166,6 @@ const init = async () => {
|
||||
}
|
||||
|
||||
const handleSubmit = async (instance) => {
|
||||
console.log('fileList.value',fileList.value)
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
@@ -179,10 +178,10 @@ const handleSubmit = async (instance) => {
|
||||
let res = await addRequirement(params)
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
path: '/projectdemand/demandcollection'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
@@ -196,7 +195,7 @@ const handleResubmit = () => {
|
||||
}).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
formData.value = res.data.formData
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
path: '/projectdemand/demandcollection'
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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>
|
||||
<div class="left-info">
|
||||
<el-row>
|
||||
@@ -58,9 +58,9 @@
|
||||
<el-col :span="24">
|
||||
<div v-if="processInstanceData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="auditOpinion"
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
@@ -80,7 +80,7 @@
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,9 +94,13 @@ import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const form = ref();
|
||||
const demandForm = ref()
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const processInstanceData = ref({})
|
||||
@@ -104,26 +108,19 @@ const processDiagramViewer = ref(false)
|
||||
const processTree = ref()
|
||||
const companyNameArray = ref([])
|
||||
const formData = ref({})
|
||||
const auditOpinion = ref('')
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const handleSubmit = () => {
|
||||
let approve = {
|
||||
taskId: processInstanceData.value.taskId,
|
||||
auditOpinion: auditOpinion.value,
|
||||
auditOpinion: formData.value.auditOpinion,
|
||||
formData: formData.value
|
||||
}
|
||||
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) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
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 res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
@@ -160,6 +178,7 @@ const getDataSourceOptionItem = (val) => {
|
||||
return companyNameArray.value.join(',');
|
||||
}
|
||||
const init = async () => {
|
||||
if(!route.query.id)return;
|
||||
await getCompanyOption()
|
||||
getInfo(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
|
||||
Reference in New Issue
Block a user