From f209700fa9076f54a5748c27347aae98211ec4df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E7=BA=A2=E5=85=B5?= <374362909@qq.com>
Date: Sun, 8 Feb 2026 21:12:20 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=87=87=E8=B4=AD=E7=94=B3?=
=?UTF-8?q?=E8=AF=B7=E5=89=8D=E7=AB=AF=E7=BB=99=E5=AE=A1=E6=A0=B8=E6=97=B6?=
=?UTF-8?q?=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../finance/purchasingrequisition/add.vue | 353 ++++++++++++------
.../finance/purchasingrequisition/index.vue | 83 +++-
2 files changed, 307 insertions(+), 129 deletions(-)
diff --git a/src/views/finance/purchasingrequisition/add.vue b/src/views/finance/purchasingrequisition/add.vue
index fa70e65..de05d2d 100644
--- a/src/views/finance/purchasingrequisition/add.vue
+++ b/src/views/finance/purchasingrequisition/add.vue
@@ -16,11 +16,11 @@
:model="dataForm"
:rules="dataRules"
label-width="150px"
- :disabled="isViewMode"
+ :disabled="isViewMode || flowFormDisabled"
class="compact-form">
-
-
+
+
@@ -131,8 +131,8 @@
-
-
+
+
部门自行采购
@@ -384,7 +384,7 @@
-
+
-
+
@@ -249,6 +297,7 @@ import { List, Document, DocumentCopy, Search, Collection, Money, CircleCheck, I
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
const ActionDropdown = defineAsyncComponent(() => import('/@/components/tools/action-dropdown.vue'));
const PurchasingAcceptModal = defineAsyncComponent(() => import('./accept/PurchasingAcceptModal.vue'));
+const FlowCommentTimeline = defineAsyncComponent(() => import('/@/views/jsonflow/comment/timeline.vue'));
// 字典数据和品目树数据
const dictData = ref({
@@ -268,6 +317,9 @@ const formDialogRef = ref()
const acceptModalRef = ref()
const searchFormRef = ref()
const showSearch = ref(true)
+/** 审批过程弹窗:是否显示、当前行对应的流程 job(供 Comment 组件用) */
+const showFlowComment = ref(false)
+const currFlowJob = ref<{ id?: number; flowInstId?: number } | null>(null)
/**
* 定义响应式表格数据
@@ -305,6 +357,19 @@ const handleAdd = () => {
};
/**
+/**
+ * 点击审核状态:若有流程实例则打开「查看审批过程」弹窗(参考 hi-job.vue)
+ * @param row - 当前行数据(需含 flowInstId)
+ */
+const handleShowFlowComment = (row: any) => {
+ if (!row?.flowInstId) {
+ useMessage().info('暂存状态无审批过程');
+ return;
+ }
+ currFlowJob.value = { id: row.id, flowInstId: row.flowInstId };
+ showFlowComment.value = true;
+};
+
/**
* 打开查看对话框
* @param row - 当前行数据
@@ -569,5 +634,9 @@ onMounted(() => {
align-items: center;
justify-content: center;
}
+
+.status-tag-clickable {
+ cursor: pointer;
+}