2026-08-14 c5b6bf8931e80e5b097af0f93c95ee82164cf872
src/views/erp/purchase/invoice/index.vue
@@ -12,7 +12,6 @@
  deletePurchaseInvoice,
  exportPurchaseInvoice,
  getPurchaseInvoicePage,
  updatePurchaseInvoiceStatus,
} from '#/api/erp/purchase/invoice';
import { $t } from '#/locales';
@@ -62,24 +61,6 @@
  try {
    await deletePurchaseInvoice(row.id!);
    message.success($t('ui.actionMessage.deleteSuccess', [row.no]));
    handleRefresh();
  } finally {
    hideLoading();
  }
}
/** 更新来票状态(审核/反审核) */
async function handleUpdateStatus(
  row: ErpPurchaseInvoiceApi.PurchaseInvoice,
  status: number,
) {
  const hideLoading = message.loading({
    content: '更新状态中...',
    duration: 0,
  });
  try {
    await updatePurchaseInvoiceStatus(row.id!, status);
    message.success('更新状态成功');
    handleRefresh();
  } finally {
    hideLoading();
@@ -153,11 +134,6 @@
        <Tag v-if="!row.hasAttachment" color="warning">未上传</Tag>
        <Tag v-else color="success">已上传</Tag>
      </template>
      <template #auditStatus="{ row }">
        <Tag v-if="row.auditStatus === 10" color="warning">未审核</Tag>
        <Tag v-else-if="row.auditStatus === 20" color="success">已审核</Tag>
        <Tag v-else color="default">--</Tag>
      </template>
      <template #actions="{ row }">
        <TableAction
          :actions="[
@@ -173,24 +149,7 @@
              type: 'link',
              icon: ACTION_ICON.EDIT,
              auth: ['erp:purchase-invoice:update'],
              ifShow: row.auditStatus === 10,
              onClick: handleEdit.bind(null, row),
            },
            {
              label: '审核',
              type: 'link',
              icon: ACTION_ICON.AUDIT,
              auth: ['erp:purchase-invoice:update-status'],
              ifShow: row.auditStatus === 10,
              onClick: handleUpdateStatus.bind(null, row, 20),
            },
            {
              label: '反审核',
              type: 'link',
              icon: ACTION_ICON.VIEW,
              auth: ['erp:purchase-invoice:update-status'],
              ifShow: row.auditStatus === 20,
              onClick: handleUpdateStatus.bind(null, row, 10),
            },
            {
              label: $t('common.delete'),
@@ -198,7 +157,6 @@
              danger: true,
              icon: ACTION_ICON.DELETE,
              auth: ['erp:purchase-invoice:delete'],
              ifShow: row.auditStatus !== 20,
              popConfirm: {
                title: $t('ui.actionMessage.deleteConfirm', [row.no]),
                confirm: handleDelete.bind(null, row),