From 787ccc59ba89bacc075562a161ecf02bc76ebadc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 24 七月 2026 17:15:53 +0800
Subject: [PATCH] 银川 1.采购申请添加入库状态查询条件
---
src/views/erp/purchase/order/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/src/views/erp/purchase/order/index.vue b/src/views/erp/purchase/order/index.vue
index 288b0b0..c56c84d 100644
--- a/src/views/erp/purchase/order/index.vue
+++ b/src/views/erp/purchase/order/index.vue
@@ -2,15 +2,17 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { ErpPurchaseOrderApi } from '#/api/erp/purchase/order';
-import { ref } from 'vue';
+import { onMounted, ref } from 'vue';
+import { useRoute } from 'vue-router';
-import { Page, useVbenModal } from '../../../../packages/effects/common-ui/src';
-import { downloadFileFromBlobPart, isEmpty } from '../../../../packages/utils/src';
+import { Page, useVbenModal } from '@vben/common-ui';
+import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
-import { message } from 'ant-design-vue';
+import { message, Tag } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
+ confirmReceipt,
deletePurchaseOrder,
exportPurchaseOrder,
getPurchaseOrderPage,
@@ -23,6 +25,8 @@
/** ERP 閲囪喘璁㈠崟鍒楄〃 */
defineOptions({ name: 'ErpPurchaseOrder' });
+
+const route = useRoute();
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
@@ -83,6 +87,21 @@
}
}
+/** 纭鏀惰揣 */
+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();
+ }
+}
+
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
@@ -130,6 +149,13 @@
checkboxChange: handleRowCheckboxChange,
},
});
+
+onMounted(() => {
+ const id = route.query.id;
+ if (id) {
+ formModalApi.setData({ formType: 'detail', id: Number(id) }).open();
+ }
+});
</script>
<template>
@@ -167,6 +193,11 @@
]"
/>
</template>
+ <template #inStatus="{ row }">
+ <Tag v-if="row.inStatus === 0" color="default">鏈叆搴�</Tag>
+ <Tag v-else-if="row.inStatus === 1" color="warning">閮ㄥ垎鍏ュ簱</Tag>
+ <Tag v-else-if="row.inStatus === 2" color="success">鍏ㄩ儴鍏ュ簱</Tag>
+ </template>
<template #actions="{ row }">
<TableAction
:actions="[
@@ -200,6 +231,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,
--
Gitblit v1.9.3