|
|
|
@ -1,11 +1,13 @@
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { computed, onBeforeMount, reactive, ref, toRefs, unref } from 'vue'
|
|
|
|
|
import { useDialog, useMessage } from 'naive-ui'
|
|
|
|
|
import { useDictionary } from '@/store/modules/dictonary'
|
|
|
|
|
import { audit } from '@/api/task/task'
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
|
(e: 'commit', rejectId: any, backId: any, isOther: boolean)
|
|
|
|
|
}>()
|
|
|
|
|
const message = useMessage()
|
|
|
|
|
|
|
|
|
|
const dictonaryStore = useDictionary()
|
|
|
|
|
const state: any = reactive({
|
|
|
|
@ -20,6 +22,7 @@ const cardStyle = {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showModal(value) {
|
|
|
|
|
console.log(value)
|
|
|
|
|
state.detail = value
|
|
|
|
|
show.value = true
|
|
|
|
|
}
|
|
|
|
@ -48,23 +51,24 @@ const comomitValue = computed(() => {
|
|
|
|
|
|
|
|
|
|
async function handleSumbit(e: MouseEvent) {
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
closeModal()
|
|
|
|
|
|
|
|
|
|
// selectRejectId.value === 'other'
|
|
|
|
|
// emit('commit', unref(comomitValue), unref(selectBackId), showOther.value)
|
|
|
|
|
console.log(state.detail)
|
|
|
|
|
// const param = {
|
|
|
|
|
// formid: formIds,
|
|
|
|
|
// taskId: taskIds,
|
|
|
|
|
// approvd: false,
|
|
|
|
|
// taskComment: idOrDesc,
|
|
|
|
|
// taskname: isOther ? tasknames : ['其他'],
|
|
|
|
|
// }
|
|
|
|
|
// audit(param).then((res) => {
|
|
|
|
|
// const { code } = res
|
|
|
|
|
// if (code === 'OK')
|
|
|
|
|
// reload()
|
|
|
|
|
// else message.error(res.message)
|
|
|
|
|
// })
|
|
|
|
|
console.log(comomitValue)
|
|
|
|
|
const param = {
|
|
|
|
|
formid: [state.detail.id],
|
|
|
|
|
taskId: ['66b06dda-e673-11ee-a934-0242bc74e4f3'],
|
|
|
|
|
approvd: false,
|
|
|
|
|
taskComment: comomitValue.value,
|
|
|
|
|
taskname: showOther.value ? state.detail.detail.tasks : ['其他'],
|
|
|
|
|
}
|
|
|
|
|
audit(param).then((res) => {
|
|
|
|
|
const { code } = res
|
|
|
|
|
if (code === 'OK')
|
|
|
|
|
closeModal()
|
|
|
|
|
else message.error(res.message)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
|