gaoluyang
10 天以前 20eae58b25403e8cc58f9e72e411f40798f0bd2c
src/views/erp/purchase/order/index.vue
@@ -11,6 +11,7 @@
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
  confirmReceipt,
  deletePurchaseOrder,
  exportPurchaseOrder,
  getPurchaseOrderPage,
@@ -77,6 +78,21 @@
  try {
    await updatePurchaseOrderStatus(row.id!, status);
    message.success(`${status === 20 ? '审批' : '反审批'}成功`);
    handleRefresh();
  } finally {
    hideLoading();
  }
}
/** 确认收货 */
async function handleConfirmReceipt(row: ErpPurchaseOrderApi.PurchaseOrder) {
  const hideLoading = message.loading({
    content: '确认收货中...',
    duration: 0,
  });
  try {
    const arrivalNoticeId = await confirmReceipt(row.id!);
    message.success(`确认收货成功,已生成到货通知单`);
    handleRefresh();
  } finally {
    hideLoading();
@@ -200,6 +216,17 @@
              },
            },
            {
              label: '确认收货',
              type: 'link',
              icon: ACTION_ICON.VIEW,
              auth: ['erp:purchase-order:confirm-receipt'],
              ifShow: () => row.status === 20 && row.inStatus !== 2,
              popConfirm: {
                title: `确认收货${row.no}吗?`,
                confirm: handleConfirmReceipt.bind(null, row),
              },
            },
            {
              label: $t('common.delete'),
              type: 'link',
              danger: true,