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/in/index.vue | 38 ++++++++++++++++++++++++++++----------
1 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/views/erp/purchase/in/index.vue b/src/views/erp/purchase/in/index.vue
index 5b3282a..6952f78 100644
--- a/src/views/erp/purchase/in/index.vue
+++ b/src/views/erp/purchase/in/index.vue
@@ -4,28 +4,35 @@
import { ref } from 'vue';
-import { DocAlert, 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 {
deletePurchaseIn,
exportPurchaseIn,
getPurchaseInPage,
+ inspectPurchaseIn,
updatePurchaseInStatus,
} from '#/api/erp/purchase/in';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
+import InspectionForm from './modules/inspection-form.vue';
/** ERP 閲囪喘鍏ュ簱鍒楄〃 */
defineOptions({ name: 'ErpPurchaseIn' });
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: Form,
+ destroyOnClose: true,
+});
+
+const [InspectionModal, inspectionModalApi] = useVbenModal({
+ connectedComponent: InspectionForm,
destroyOnClose: true,
});
@@ -83,6 +90,11 @@
}
}
+/** 楠屾敹鎿嶄綔 */
+function handleInspection(row: ErpPurchaseInApi.PurchaseIn) {
+ inspectionModalApi.setData({ id: row.id }).open();
+}
+
const checkedIds = ref<number[]>([]);
function handleRowCheckboxChange({
records,
@@ -134,14 +146,8 @@
<template>
<Page auto-content-height>
- <template #doc>
- <DocAlert
- title="銆愰噰璐�戦噰璐鍗曘�佸叆搴撱�侀��璐�"
- url="https://doc.iocoder.cn/erp/purchase/"
- />
- </template>
-
<FormModal @success="handleRefresh" />
+ <InspectionModal @success="handleRefresh" />
<Grid table-title="閲囪喘鍏ュ簱鍒楄〃">
<template #toolbar-tools>
<TableAction
@@ -175,6 +181,11 @@
]"
/>
</template>
+ <template #inspectionStatus="{ row }">
+ <Tag v-if="row.inspectionStatus === 0" color="warning">寰呴獙鏀�</Tag>
+ <Tag v-else-if="row.inspectionStatus === 1" color="success">宸查獙鏀�</Tag>
+ <Tag v-else-if="row.inspectionStatus === 2" color="error">楠屾敹涓嶅悎鏍�</Tag>
+ </template>
<template #actions="{ row }">
<TableAction
:actions="[
@@ -194,6 +205,13 @@
onClick: handleEdit.bind(null, row),
},
{
+ label: '楠屾敹',
+ type: 'link',
+ auth: ['erp:purchase-in:inspect'],
+ ifShow: () => row.inspectionStatus === 0 && row.status === 20,
+ onClick: handleInspection.bind(null, row),
+ },
+ {
label: row.status === 10 ? '瀹℃壒' : '鍙嶅鎵�',
type: 'link',
icon: ACTION_ICON.AUDIT,
--
Gitblit v1.9.3