From 8b2d472c84386dcd8d1726c5f6edee00f3d5867c Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 22 九月 2026 12:19:51 +0800
Subject: [PATCH] fix: 修复付款金额验证逻辑,调整可付款余额计算

---
 src/views/customerService/feedbackRegistration/index.vue |   12 ++++++------
 src/views/procurementManagement/paymentLedger/index.vue  |    6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/views/customerService/feedbackRegistration/index.vue b/src/views/customerService/feedbackRegistration/index.vue
index 1e57bdb..3099c55 100644
--- a/src/views/customerService/feedbackRegistration/index.vue
+++ b/src/views/customerService/feedbackRegistration/index.vue
@@ -259,12 +259,12 @@
       prop: "proDesc",
       width: 300,
     },
-    {
-      label: "鍏宠仈閮ㄩ棬",
-      prop: "deptName",
-      width: 200,
-      align: "center",
-    },
+    // {
+    //   label: "鍏宠仈閮ㄩ棬",
+    //   prop: "deptName",
+    //   width: 200,
+    //   align: "center",
+    // },
     {
       dataType: "action",
       label: "鎿嶄綔",
diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue
index 19768a8..02c0b58 100644
--- a/src/views/procurementManagement/paymentLedger/index.vue
+++ b/src/views/procurementManagement/paymentLedger/index.vue
@@ -99,8 +99,8 @@
           <el-date-picker style="width:100%" v-model="paymentForm.paymentDate" value-format="YYYY-MM-DD" type="date" placeholder="璇烽�夋嫨浠樻鏃ユ湡" clearable />
         </el-form-item>
         <el-form-item label="浠樻閲戦锛�" prop="paymentAmount">
-          <el-input-number style="width:100%" v-model="paymentForm.paymentAmount" :min="0" :precision="6" :max="Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0))" placeholder="璇疯緭鍏ヤ粯娆鹃噾棰�" controls-position="right" />
-          <div style="color:#e6a23c;font-size:12px;margin-top:4px">褰撳墠鍙粯娆句綑棰濓細{{ Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0)).toFixed(6) }} 鍏�</div>
+          <el-input-number style="width:100%" v-model="paymentForm.paymentAmount" :min="0" :precision="6" :max="Math.max(0,Number(currentPaymentRow.payableAmount)||0)" placeholder="璇疯緭鍏ヤ粯娆鹃噾棰�" controls-position="right" />
+          <div style="color:#e6a23c;font-size:12px;margin-top:4px">褰撳墠鍙粯娆句綑棰濓細{{ Math.max(0,Number(currentPaymentRow.payableAmount)||0).toFixed(6) }} 鍏�</div>
         </el-form-item>
         <el-form-item label="浠樻鏂瑰紡锛�" prop="paymentMethod">
           <el-select v-model="paymentForm.paymentMethod" placeholder="璇烽�夋嫨浠樻鏂瑰紡" style="width:100%" clearable>
@@ -206,7 +206,7 @@
   const currentPaymentRow = ref({});
   const paymentFormRef = ref(null);
   const paymentForm = reactive({ paymentDate:"", paymentAmount:undefined, paymentMethod:"", remark:"" });
-  const validatePaymentAmount = (_,v,cb) => { if(!v) return cb(new Error("璇疯緭鍏ヤ粯娆鹃噾棰�")); const m=Math.max(0,(Number(currentPaymentRow.value.payableAmount)||0)-(Number(currentPaymentRow.value.paymentAmount)||0)); if(v>m) return cb(new Error(`浠樻閲戦涓嶈兘瓒呰繃鍙粯娆句綑棰� ${m.toFixed(6)} 鍏僠)); cb(); };
+  const validatePaymentAmount = (_,v,cb) => { if(!v) return cb(new Error("璇疯緭鍏ヤ粯娆鹃噾棰�")); const m=Math.max(0,Number(currentPaymentRow.value.payableAmount)||0); if(v>m) return cb(new Error(`浠樻閲戦涓嶈兘瓒呰繃鍙粯娆句綑棰� ${m.toFixed(6)} 鍏僠)); cb(); };
   const paymentRules = { paymentDate:[{required:true,message:"璇烽�夋嫨浠樻鏃ユ湡",trigger:"change"}], paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], paymentMethod:[{required:true,message:"璇烽�夋嫨浠樻鏂瑰紡",trigger:"change"}] };
   const openPaymentDialog = r => { currentPaymentRow.value=r; paymentForm.paymentDate=""; paymentForm.paymentAmount=undefined; paymentForm.paymentMethod=""; paymentForm.remark=""; paymentDialogVisible.value=true; };
   const closePaymentDialog = () => { paymentFormRef.value?.resetFields(); paymentDialogVisible.value=false; };

--
Gitblit v1.9.3