已修改12个文件
142 ■■■■■ 文件已修改
company.config.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
internal/vite-config/src/utils/env.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/erp/purchase/order/index.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mes/pd/project/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/auth.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/packages/effects/layouts/src/widgets/preferences/blocks/company/company.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bpm/task/done/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bpm/task/done/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/erp/purchase/order/index.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/pd/project/detail/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/pd/project/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company.config.ts
@@ -30,7 +30,7 @@
    apiUrl: 'http://42.63.70.90:9001/admin-api',
  },
  YZFX: {
    name: '宁夏英泽除锈',
    name: '宁夏英泽防锈',
    logo: '/logos/YZFXLogo.png',
    favicon: '/logos/YZFXLogo.ico',
    apiUrl: 'http://42.63.70.231:9001/admin-api',
internal/vite-config/src/utils/env.ts
@@ -38,7 +38,7 @@
  match = 'VITE_GLOB_',
  confFiles = getConfFiles(),
) {
  let envConfig = {};
  let envConfig: Record<string, string> = {};
  for (const confFile of confFiles) {
    try {
@@ -60,6 +60,13 @@
      Reflect.deleteProperty(envConfig, key);
    }
  });
  // 合并进程环境变量,使 vite.config.ts 按公司注入的 VITE_GLOB_API_URL 能进入 _app-config 文件
  Object.keys(process.env).forEach((key) => {
    const value = process.env[key];
    if (reg.test(key) && value) {
      envConfig[key] = value;
    }
  });
  return envConfig as T;
}
src/api/erp/purchase/order/index.ts
@@ -103,6 +103,13 @@
  return requestClient.get<any[]>('/erp/purchase-order/approve-process-list');
}
/** 反审批(协同办公已办任务中撤回已审核订单,回退为未审核) */
export function reverseApprove(processInstanceId: string) {
  return requestClient.post('/erp/purchase-order/reverse-approve', null, {
    params: { processInstanceId },
  });
}
/** 获取采购审核流程列表响应 */
export interface ProcessDefinition {
  id: string; // 流程定义ID
src/api/mes/pd/project/index.ts
@@ -34,6 +34,8 @@
    createTime?: number;
    /** BPM 流程实例编号 */
    processInstanceId?: string;
    /** 待审核文件数(auditStatus=0 的审核记录数) */
    pendingAuditCount?: number;
  }
  export interface PageParams extends PageParam {
src/layouts/auth.vue
@@ -17,7 +17,8 @@
});
const appName = computed(() => preferences.copyright.companyName);
const logo = computed(() => __APP_LOGO__ || preferences.logo.source);
// 登录页 logo 优先取数据库配置(preferences.logo.source),未配置时回退编译期默认 __APP_LOGO__
const logo = computed(() => preferences.logo.source || __APP_LOGO__);
const logoDark = computed(() => preferences.logo.sourceDark);
// 登录页标题/描述优先取后端配置,未配置时回退到 i18n 默认
const pageTitle = computed(
src/packages/effects/layouts/src/widgets/preferences/blocks/company/company.vue
@@ -72,8 +72,8 @@
<template>
  <div class="flex flex-col">
    <!-- 公司名称 -->
    <div class="my-1 flex w-full items-center justify-between rounded-md px-2 py-1">
      <span class="flex items-center text-sm">
    <div class="my-2 flex w-full items-center justify-between gap-4 rounded-md px-2 py-2">
      <span class="shrink-0 text-sm text-foreground/80">
        {{ $t('preferences.company.companyName') }}
      </span>
      <Input
@@ -85,8 +85,8 @@
    </div>
    <!-- 登录页标题 -->
    <div class="my-1 flex w-full items-center justify-between rounded-md px-2 py-1">
      <span class="flex items-center text-sm">
    <div class="my-2 flex w-full items-center justify-between gap-4 rounded-md px-2 py-2">
      <span class="shrink-0 text-sm text-foreground/80">
        {{ $t('preferences.company.loginTitle') }}
      </span>
      <Input
@@ -98,8 +98,8 @@
    </div>
    <!-- 登录页描述 -->
    <div class="my-1 flex w-full items-center justify-between rounded-md px-2 py-1">
      <span class="flex items-center text-sm">
    <div class="my-2 flex w-full items-center justify-between gap-4 rounded-md px-2 py-2">
      <span class="shrink-0 text-sm text-foreground/80">
        {{ $t('preferences.company.loginDescription') }}
      </span>
      <Input
@@ -111,8 +111,8 @@
    </div>
    <!-- 公司 Logo -->
    <div class="my-1 flex w-full items-center justify-between rounded-md px-2 py-1">
      <span class="flex items-center text-sm">
    <div class="my-2 flex w-full items-center justify-between gap-4 rounded-md px-2 py-2">
      <span class="shrink-0 text-sm text-foreground/80">
        {{ $t('preferences.company.logo') }}
      </span>
      <div class="flex items-center gap-2">
src/views/bpm/task/done/data.ts
@@ -146,7 +146,7 @@
    },
    {
      title: '操作',
      width: 120,
      width: 180,
      fixed: 'right',
      slots: { default: 'actions' },
    },
src/views/bpm/task/done/index.vue
@@ -7,6 +7,7 @@
import { message } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { reverseApprove } from '#/api/erp/purchase/order';
import { getTaskDonePage, withdrawTask } from '#/api/bpm/task';
import { router } from '#/router';
@@ -34,6 +35,28 @@
  try {
    await withdrawTask(row.id);
    message.success('撤回成功');
    await gridApi.query();
  } finally {
    hideLoading();
  }
}
/** 是否采购订单审批任务(用于显示"反审批"、隐藏通用"撤回") */
function isPurchaseOrderApprove(row: BpmTaskApi.Task) {
  return (row.processInstance?.processDefinitionId || '').startsWith(
    'purchase_order_approve',
  );
}
/** 反审批采购订单(已审核 -> 未审核,在协同办公已办任务中操作) */
async function handleReverseApprove(row: BpmTaskApi.Task) {
  const hideLoading = message.loading({
    content: '反审批中...',
    duration: 0,
  });
  try {
    await reverseApprove(row.processInstance.id);
    message.success('反审批成功,订单已重新进入待办审批');
    await gridApi.query();
  } finally {
    hideLoading();
@@ -77,10 +100,22 @@
        <TableAction
          :actions="[
            {
              label: '反审批',
              type: 'link',
              danger: true,
              icon: ACTION_ICON.AUDIT,
              ifShow: () => isPurchaseOrderApprove(row),
              popConfirm: {
                title: '确定要反审批该采购订单吗?订单将重新进入待办审批',
                confirm: handleReverseApprove.bind(null, row),
              },
            },
            {
              label: '撤回',
              type: 'link',
              danger: true,
              icon: ACTION_ICON.DELETE,
              ifShow: () => !isPurchaseOrderApprove(row),
              popConfirm: {
                title: '确定要撤回该任务吗?',
                confirm: handleWithdraw.bind(null, row),
src/views/erp/purchase/order/index.vue
@@ -16,7 +16,6 @@
  deletePurchaseOrder,
  exportPurchaseOrder,
  getPurchaseOrderPage,
  updatePurchaseOrderStatus,
} from '#/api/erp/purchase/order';
import { $t } from '#/locales';
@@ -63,24 +62,6 @@
  try {
    await deletePurchaseOrder(ids);
    message.success($t('ui.actionMessage.deleteSuccess'));
    handleRefresh();
  } finally {
    hideLoading();
  }
}
/** 审批/反审批操作 */
async function handleUpdateStatus(
  row: ErpPurchaseOrderApi.PurchaseOrder,
  status: number,
) {
  const hideLoading = message.loading({
    content: `确定${status === 20 ? '审批' : '反审批'}该订单吗?`,
    duration: 0,
  });
  try {
    await updatePurchaseOrderStatus(row.id!, status);
    message.success(`${status === 20 ? '审批' : '反审批'}成功`);
    handleRefresh();
  } finally {
    hideLoading();
@@ -159,7 +140,8 @@
</script>
<template>
  <Page auto-content-height><FormModal @success="handleRefresh" />
  <Page auto-content-height>
    <FormModal @success="handleRefresh" />
    <Grid table-title="采购订单列表">
      <template #toolbar-tools>
        <TableAction
@@ -215,20 +197,6 @@
              auth: ['erp:purchase-order:update'],
              ifShow: () => row.status !== 20,
              onClick: handleEdit.bind(null, row),
            },
            {
              label: row.status === 10 ? '审批' : '反审批',
              type: 'link',
              icon: ACTION_ICON.AUDIT,
              auth: ['erp:purchase-order:update-status'],
              popConfirm: {
                title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`,
                confirm: handleUpdateStatus.bind(
                  null,
                  row,
                  row.status === 10 ? 20 : 10,
                ),
              },
            },
            {
              label: '确认收货',
src/views/mes/pd/project/detail/index.vue
@@ -86,7 +86,10 @@
  loading.value = true;
  try {
    project.value = await getPdProject(projectId.value);
    if (isPendingUpload.value) {
    if (route.query.tab === 'audit') {
      // 从列表页「审核文件」按钮进入,直接定位到资料审核 Tab
      activeTab.value = 'audit';
    } else if (isPendingUpload.value) {
      activeTab.value = 'material';
    } else if (isPendingAudit.value) {
      activeTab.value = 'audit';
src/views/mes/pd/project/index.vue
@@ -100,6 +100,15 @@
  }
}
/** 审核文件 - 跳转详情页资料审核 Tab */
function handleAuditFile(row: MesPdProjectApi.Project) {
  router.push({
    name: 'MesPdProjectDetail',
    params: { id: row.id },
    query: { tab: 'audit' },
  });
}
/** 查看审批详情 */
function handleProcessDetail(row: MesPdProjectApi.Project) {
  if (!row.processInstanceId) {
@@ -223,10 +232,21 @@
              onClick: () => handleDetail(row),
            },
            {
              label: '审核文件',
              type: 'link',
              auth: ['mes:pd-project:update'],
              ifShow:
                row.status === MesPdProjectStatusEnum.PENDING_AUDIT &&
                (row.pendingAuditCount ?? 0) > 0,
              onClick: handleAuditFile.bind(null, row),
            },
            {
              label: '提交审批',
              type: 'link',
              auth: ['mes:pd-project:update'],
              ifShow: row.status === MesPdProjectStatusEnum.PENDING_AUDIT,
              ifShow:
                row.status === MesPdProjectStatusEnum.PENDING_AUDIT &&
                (row.pendingAuditCount ?? 0) === 0,
              onClick: handleSubmit.bind(null, row),
            },
            {
vite.config.ts
@@ -25,6 +25,7 @@
    __APP_NAME__: JSON.stringify(appName),
  };
  if (!isDev && appApiUrl) {
    process.env.VITE_GLOB_API_URL = appApiUrl;
    defineVars['import.meta.env.VITE_GLOB_API_URL'] = JSON.stringify(appApiUrl);
    defineVars['import.meta.env.VITE_BASE_URL'] = JSON.stringify(new URL(appApiUrl).origin);
  }
@@ -82,7 +83,7 @@
        proxy: {
          "/admin-api": {
            changeOrigin: true,
            target: "http://192.168.0.10:48080",
            target: "http://36.213.90.123:9500",
            ws: true,
          },
        },