From ab8c184a629b4e92f7b472e2e5cbb870120afee4 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 12 二月 2026 15:25:55 +0800
Subject: [PATCH] 上下班时间限制校验

---
 src/views/procurementManagement/invoiceEntry/index.vue |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index 11a6b4b..8c435e0 100644
--- a/src/views/procurementManagement/invoiceEntry/index.vue
+++ b/src/views/procurementManagement/invoiceEntry/index.vue
@@ -39,7 +39,7 @@
         <div></div>
         <div>
           <el-button @click="handleExport" style="margin-right: 10px">瀵煎嚭</el-button>
-          <el-button type="primary" @click="handleAdd('add')">
+          <el-button type="primary" @click="handleAdd('add')" :disabled="isInvoiceDisabled">
             鏉ョエ鐧昏
           </el-button>
 <!--          <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
@@ -84,7 +84,7 @@
 <script setup>
 import { usePaginationApi } from "@/hooks/usePaginationApi";
 import {delRegistration, gePurchaseListPage} from "@/api/procurementManagement/invoiceEntry.js";
-import { nextTick, onMounted, getCurrentInstance, ref } from "vue";
+import { nextTick, onMounted, getCurrentInstance, ref, computed } from "vue";
 import ExpandTable from "./components/ExpandTable.vue";
 import Modal from "./components/Modal.vue";
 import {ElMessageBox} from "element-plus";
@@ -112,6 +112,8 @@
   gePurchaseListPage,
   {
     purchaseContractNumber: undefined,
+    // 鍙煡璇㈠凡瀹℃壒閫氳繃锛堟垨鎸囧畾鐘舵�佷负 3锛夌殑璁板綍
+    approvalStatus: 3,
   },
   [
     {
@@ -184,6 +186,18 @@
   );
 };
 
+// 璁$畻鏄惁鍙互鏉ョエ鐧昏锛氬鏋滄墍鏈夐�変腑琛岀殑寰呮潵绁ㄩ噾棰濋兘涓�0锛屽垯绂佺敤鎸夐挳
+const isInvoiceDisabled = computed(() => {
+  if (selectedRows.value.length === 0) {
+    return true;
+  }
+  // 濡傛灉鎵�鏈夐�変腑琛岀殑寰呮潵绁ㄩ噾棰濋兘涓�0鎴栧皬浜庣瓑浜�0锛屽垯绂佺敤
+  return selectedRows.value.every(row => {
+    const amount = parseFloat(row.unReceiptPaymentAmount || 0);
+    return amount <= 0;
+  });
+});
+
 const handleAdd = (type) => {
 	if (selectedRows.value.length < 1) {
 		proxy.$modal.msgWarning("璇疯嚦灏戦�変腑涓�鏉℃暟鎹�");

--
Gitblit v1.9.3