diff --git a/src/views/approve/fee/api.ts b/src/views/approve/fee/api.ts index 5ffa208b..5b03d00a 100644 --- a/src/views/approve/fee/api.ts +++ b/src/views/approve/fee/api.ts @@ -9,7 +9,17 @@ enum Api { GetFees = '/feeApi/FeeAudit/GetFees', GetModifyValue = '/feeApi/FeeRecord/GetModifyValue', GetStat = '/feeApi/FeeAudit/GetStat', - OneClickAudit = '/feeApi/FeeAudit/OneClickAudit' + OneClickAudit = '/feeApi/FeeAudit/OneClickAudit', + BusinessAudit = '/feeApi/FeeAudit/BusinessAudit' +} + +// 整票费用审核 +export function BusinessAudit(data: PageRequest) { + return request({ + url: Api.BusinessAudit, + method: 'post', + data + }) } // 业务列表 diff --git a/src/views/approve/fee/index.vue b/src/views/approve/fee/index.vue index 8cfd78bc..3cb4ecaf 100644 --- a/src/views/approve/fee/index.vue +++ b/src/views/approve/fee/index.vue @@ -74,8 +74,10 @@ @@ -95,7 +97,7 @@ import { onMounted, ref, defineExpose, computed, reactive } from 'vue' import { BasicTable, useTable } from '/@/components/Table' import { formatParams } from '/@/hooks/web/common' - import { GetList, GetStat } from './api' + import { GetList, GetStat, BusinessAudit } from './api' import { Divider } from 'ant-design-vue' // import FeeActionBar from './components/feeActionBar.vue' // import { useModal } from '/@/components/Modal' @@ -107,8 +109,11 @@ // 审批组件 import ApproveBtns from '/@/components/ApproveBtns/index.vue' import { formatTableData } from '/@/hooks/web/common' - import { useRoute } from 'vue-router' + import { useMultipleTabStore } from '/@/store/modules/multipleTab' + import { useRoute, useRouter } from 'vue-router' const route = useRoute() + const router = useRouter() + const tabStore = useMultipleTabStore() const { createMessage } = useMessage() // 当前页面状态 const status = route.query.status @@ -216,8 +221,24 @@ } // 审核接口 - const approveDc = () => { - + const approve = (remark) => { + const postData = { + result: remark ? 2 : 1, + ids: [route.query.id], + businessType: '1', + taskTypeName: route.query.status + } + if (remark) postData['remark'] = remark + loading.value = true + BusinessAudit(postData).then(res => { + loading.value = false + createMessage.success(res.message) + // 关闭当前页面 + const { fullPath } = route //获取当前路径 + tabStore.closeTabByKey(fullPath, router) + }).catch(() => { + loading.value = false + }) } onMounted(() => { //初始化 有id就是从任务跳转过来,直接打开这一票的费用 diff --git a/src/views/taskmanage/index.vue b/src/views/taskmanage/index.vue index beadae46..979b4f2d 100644 --- a/src/views/taskmanage/index.vue +++ b/src/views/taskmanage/index.vue @@ -1177,9 +1177,17 @@ }, }) }) - break case 'FEE_AUDIT': + // 费用审批 + go({ + path: '/approve-fee', + query: { + id: data.ouT_BS_NO, + btype: 1 + } + }) + break case 'BILL_RECV_AUDIT': // 费用审批 go({ @@ -1187,8 +1195,9 @@ query: { id: data.ouT_BS_NO, btype: 1, - status: data.tasK_TYPE - }, + status: data.tasK_TYPE, + source: 'Create' + } }) break case 'WAIT_ORDER_AUDIT':