fix : 修复审核意见位置
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
@@ -23,6 +23,10 @@ const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
@@ -44,6 +48,14 @@ const schema = computed(() => {
|
||||
}
|
||||
]
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
@@ -91,17 +103,25 @@ const back = () => {
|
||||
}
|
||||
break;
|
||||
case 'Share/detail':
|
||||
router.push({name: 'Expense/share'})
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Expense/share'})
|
||||
}
|
||||
break;
|
||||
case 'Phase/detail':
|
||||
router.push({name: 'Implementation'})
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Implementation'})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
const values = form.value.getValues()
|
||||
if (!values.auditOpinion) {
|
||||
// const values = form.value.getValues()
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
@@ -111,8 +131,10 @@ const handleReject = async () => {
|
||||
}
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
...values
|
||||
// ...values
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
console.log('params', params)
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -124,11 +146,11 @@ const handleReject = async () => {
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
const values = form.value.getValues()
|
||||
// const values = form.value.getValues()
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
formData: props.formData,
|
||||
...values
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
|
||||
Reference in New Issue
Block a user