From b0fb51d8d16b3c6a99e4ba4fcb0dbcb5c71df3da Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期三, 14 一月 2026 18:05:40 +0800
Subject: [PATCH] 添加审批通过数据过滤功能,审批通过的采购台账才能进行来票登记

---
 src/views/procurementManagement/invoiceEntry/index.vue |   29 ++++++++++-------------------
 1 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index 87e08e9..2a04cab 100644
--- a/src/views/procurementManagement/invoiceEntry/index.vue
+++ b/src/views/procurementManagement/invoiceEntry/index.vue
@@ -28,13 +28,6 @@
               clearable
           />
         </el-form-item>
-        <el-form-item label="椤圭洰鍚嶇О">
-          <el-input
-              v-model="filters.projectName"
-              placeholder="璇疯緭鍏ラ」鐩悕绉�"
-              clearable
-          />
-        </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="getTableData"> 鎼滅储 </el-button>
           <el-button @click="resetFilters"> 閲嶇疆 </el-button>
@@ -55,7 +48,7 @@
       <PIMTable
         rowKey="id"
         :column="columns"
-        :tableData="dataList"
+        :tableData="filteredDataList"
         :tableLoading="loading"
         :isSelection="true"
         :page="{
@@ -143,11 +136,6 @@
       width:300
     },
     {
-      label: "椤圭洰鍚嶇О",
-      prop: "projectName",
-      width:400
-    },
-    {
       label: "褰曞叆浜�",
       prop: "recorderName",
     },
@@ -190,7 +178,10 @@
     // },
   ]
 );
-
+// 璁$畻灞炴�ц繃婊� 瀹℃壒閫氳繃approvalStatus=1 鐨勬暟鎹�
+const filteredDataList = computed(() => {
+  return dataList.value.filter(item => item.approvalStatus == 1);
+});
 const handleSelectionChange = (selection) => {
   selectedRows.value = selection.filter(
     (item) => item.purchaseContractNumber !== undefined
@@ -198,11 +189,11 @@
 };
 
 const handleAdd = (type) => {
-  if (selectedRows.value.length !== 1) {
-    proxy.$modal.msgWarning("璇峰厛閫変腑涓�鏉℃暟鎹�");
-    return;
-  }
-  modalRef.value.open(type, selectedRows.value[0].id);
+	if (selectedRows.value.length < 1) {
+		proxy.$modal.msgWarning("璇疯嚦灏戦�変腑涓�鏉℃暟鎹�");
+		return;
+	}
+	modalRef.value.open(type, selectedRows.value);
 };
 
 const handleEdit = (type, id) => {

--
Gitblit v1.9.3