云
6 天以前 ec8ff4f6259404460a0b4437e29a40986c2c4b9d
src/views/erp/purchase/request/index.vue
@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { automaticApproval } from '#/store/audit-policy';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { ErpPurchaseRequestApi } from '#/api/erp/purchase/request';
@@ -96,10 +97,17 @@
/** 提交审批 - 先获取流程列表 */
async function handleSubmit(row: ErpPurchaseRequestApi.PurchaseRequest) {
  const hideLoading = message.loading({
    content: '获取审批流程...',
    content: automaticApproval.value ? '正在提交生效...' : '获取审批流程...',
    duration: 0,
  });
  try {
    if (automaticApproval.value) {
      await submitPurchaseRequest(row.id!, 'purchase_request_approve');
      hideLoading();
      message.success('已提交生效');
      handleRefresh();
      return;
    }
    const processList = await getApproveProcessList(row.id!);
    hideLoading();
    if (!processList || processList.length === 0) {
@@ -107,6 +115,7 @@
      return;
    }
    // 打开流程选择弹窗
    processModalApi.setData({ id: row.id, processList }).open();
  } catch {
    hideLoading();