|
@@ -51,7 +51,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 驳回弹窗 -->
|
|
|
- <van-dialog v-model:show="showDialog" :title="`转移线索`" show-cancel-button @confirm="confirmTransfer"
|
|
|
+ <van-dialog v-model:show="showDialog" :title="`驳回合同`" show-cancel-button @confirm="confirmTransfer"
|
|
|
:before-close="dialogCloseBefo">
|
|
|
<template #default>
|
|
|
<van-field v-model.trim="dialogSelection" type="textarea" rows="3" label="驳回原因" placeholder="请输入驳回原因" />
|
|
@@ -77,7 +77,7 @@ import useFixedData from "@store/useFixedData.js"
|
|
|
const fixedData = useFixedData()
|
|
|
const router = useRouterStore()
|
|
|
const userInfo = useInfoStore()
|
|
|
-const { toastSuccess, toastFail, toastText } = useShowToast()
|
|
|
+const { toastSuccess, toastLoading, toastFail, toastText, clearToast } = useShowToast()
|
|
|
const props = defineProps({
|
|
|
info: {
|
|
|
type: Object,
|
|
@@ -128,7 +128,7 @@ function confirmTransfer() {
|
|
|
title: `合同驳回`,
|
|
|
message: `确认驳回吗?,驳回后合同基本信息无法修改`,
|
|
|
}).then(() => {
|
|
|
- requests.post(CONTRACT_APPROVED, { id, status: 0, msg: dialogSelection.value }).then((res) => {
|
|
|
+ requests.post(CONTRACT_APPROVED, { id, status: 2, msg: dialogSelection.value }).then((res) => {
|
|
|
toastSuccess('操作成功')
|
|
|
showDialog.value = false
|
|
|
processingData(id)
|
|
@@ -147,7 +147,7 @@ function dialogCloseBefo(val) {
|
|
|
function deleteRow() {
|
|
|
const { name = '', searchFiled = {}, deteleFiled = '' } = routingInformation
|
|
|
const row = props.info
|
|
|
- const foemVal = { [routingInformation.key == 'tasks' ? 'taskIds' : 'ids']: row.id }
|
|
|
+ const foemVal = { [routingInformation.key == 'tasks' ? 'taskIds' : 'id']: row.id }
|
|
|
showConfirmDialog({
|
|
|
title: `删除${name}`,
|
|
|
message: `确定删除【${row[searchFiled?.search]}】${name}吗?`,
|
|
@@ -170,7 +170,7 @@ function deleteRow() {
|
|
|
function jumpEdit() {
|
|
|
const formJson = fixedData.formJson[routingInformation.key] || []
|
|
|
const formList = resetListData(formJson?.list)
|
|
|
- const filedObj = getListFieldKey(formList, props.info)
|
|
|
+ const filedObj = getListFieldKey(formList, infoData.value)
|
|
|
const formVal = { ...filedObj, id: props.info.id }
|
|
|
|
|
|
router.navigateTo({
|
|
@@ -187,10 +187,15 @@ function jumpEdit() {
|
|
|
function getDetails(id) {
|
|
|
requests.post(OBTAIN_CONTRACT_DETAILS, { id }).then((res) => {
|
|
|
infoData.value = res.data || {}
|
|
|
+ }).finally(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ clearToast()
|
|
|
+ }, 200)
|
|
|
})
|
|
|
}
|
|
|
function processingData(id) {
|
|
|
clearTimeout(timeout.value);
|
|
|
+ toastLoading('加载中...', 0)
|
|
|
timeout.value = setTimeout(() => {
|
|
|
getDetails(id)
|
|
|
}, 100);
|