From 865d76e8e4ce934d7020c44f562065fb06be2eff Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 22 四月 2026 10:39:43 +0800
Subject: [PATCH] 阳光彩印web 删减所有的辅助单位辅库存等
---
src/views/procurementManagement/invoiceEntry/index.vue | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index 00a6881..e63f53a 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";
@@ -150,7 +150,7 @@
prop: "contractAmount",
width:200,
formatData: (val) => {
- return val ? parseFloat(val).toFixed(2) : 0;
+ return val ? parseFloat(val).toFixed(3) : 0;
},
},
{
@@ -158,7 +158,7 @@
prop: "receiptPaymentAmount",
width:200,
formatData: (val) => {
- return val ? parseFloat(val).toFixed(2) : 0;
+ return val ? parseFloat(val).toFixed(3) : 0;
},
},
{
@@ -166,7 +166,7 @@
prop: "unReceiptPaymentAmount",
width:200,
formatData: (val) => {
- return val ? parseFloat(val).toFixed(2) : 0;
+ return val ? parseFloat(val).toFixed(3) : 0;
},
},
{
@@ -186,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