From 168c23ac6a1c021407f905323525c8d411857e57 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期四, 26 三月 2026 16:36:57 +0800
Subject: [PATCH] fix: 修正销售发货验证并优化黑名单表单显示

---
 src/views/salesManagement/salesLedger/index.vue                |   78 ++++++++-----------
 src/views/basicData/supplierManage/components/BlacklistTab.vue |  135 +++++++++++++++++----------------
 2 files changed, 101 insertions(+), 112 deletions(-)

diff --git a/src/views/basicData/supplierManage/components/BlacklistTab.vue b/src/views/basicData/supplierManage/components/BlacklistTab.vue
index 8f6204b..285ab40 100644
--- a/src/views/basicData/supplierManage/components/BlacklistTab.vue
+++ b/src/views/basicData/supplierManage/components/BlacklistTab.vue
@@ -56,6 +56,23 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
+            <el-form-item label="缁存姢浜猴細" prop="maintainUserId">
+              <el-select
+                  v-model="form.maintainUserId"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+                  disabled
+              >
+                <el-option
+                    v-for="item in userList"
+                    :key="item.nickName"
+                    :label="item.nickName"
+                    :value="item.userId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <!-- <el-col :span="12">
             <el-form-item
                 label="绾崇◣浜鸿瘑鍒彿锛�"
                 prop="taxpayerIdentificationNum"
@@ -66,9 +83,9 @@
                   clearable
               />
             </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
-        <el-row :gutter="30">
+        <!-- <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="鍏徃鍦板潃锛�" prop="companyAddress">
               <el-input
@@ -87,8 +104,8 @@
               />
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="30">
+        </el-row> -->
+        <!-- <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="寮�鎴疯锛�" prop="bankAccountName">
               <el-input
@@ -107,7 +124,7 @@
               />
             </el-form-item>
           </el-col>
-        </el-row>
+        </el-row> -->
         <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="鑱旂郴浜猴細" prop="contactUserName">
@@ -128,25 +145,9 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row :gutter="30">
-          <el-col :span="12">
-            <el-form-item label="缁存姢浜猴細" prop="maintainUserId">
-              <el-select
-                  v-model="form.maintainUserId"
-                  placeholder="璇烽�夋嫨"
-                  clearable
-                  disabled
-              >
-                <el-option
-                    v-for="item in userList"
-                    :key="item.nickName"
-                    :label="item.nickName"
-                    :value="item.userId"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
+        <!-- <el-row :gutter="30"> -->
+          
+          <!-- <el-col :span="12">
             <el-form-item label="缁存姢鏃堕棿锛�" prop="maintainTime">
               <el-date-picker
                   style="width: 100%"
@@ -158,9 +159,9 @@
                   clearable
               />
             </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row :gutter="30">
+          </el-col> -->
+        <!-- </el-row> -->
+        <!-- <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="渚涘簲鍟嗙被鍨嬶細" prop="supplierType">
               <el-select v-model="form.supplierType" placeholder="璇烽�夋嫨" clearable>
@@ -179,7 +180,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-        </el-row>
+        </el-row> -->
       </el-form>
       <template #footer>
         <div class="dialog-footer">
@@ -259,36 +260,36 @@
     prop: "supplierName",
     width: 250,
   },
-  {
-    label: "渚涘簲鍟嗙被鍨�",
-    prop: "supplierType",
-    width: 120,
-  },
-  {
-    label: "绾崇◣浜鸿瘑鍒彿",
-    prop: "taxpayerIdentificationNum",
-    width: 230,
-  },
-  {
-    label: "鍏徃鍦板潃",
-    prop: "companyAddress",
-    width: 220,
-  },
-  {
-    label: "鑱旂郴鏂瑰紡",
-    prop: "companyPhone",
-    width:150
-  },
-  {
-    label: "寮�鎴疯",
-    prop: "bankAccountName",
-    width: 220,
-  },
-  {
-    label: "璐﹀彿",
-    prop: "bankAccountNum",
-    width: 220,
-  },
+  // {
+  //   label: "渚涘簲鍟嗙被鍨�",
+  //   prop: "supplierType",
+  //   width: 120,
+  // },
+  // {
+  //   label: "绾崇◣浜鸿瘑鍒彿",
+  //   prop: "taxpayerIdentificationNum",
+  //   width: 230,
+  // },
+  // {
+  //   label: "鍏徃鍦板潃",
+  //   prop: "companyAddress",
+  //   width: 220,
+  // },
+  // {
+  //   label: "鑱旂郴鏂瑰紡",
+  //   prop: "companyPhone",
+  //   width:150
+  // },
+  // {
+  //   label: "寮�鎴疯",
+  //   prop: "bankAccountName",
+  //   width: 220,
+  // },
+  // {
+  //   label: "璐﹀彿",
+  //   prop: "bankAccountNum",
+  //   width: 220,
+  // },
   {
     label: "鑱旂郴浜�",
     prop: "contactUserName",
@@ -298,16 +299,16 @@
     prop: "contactUserPhone",
     width: 150,
   },
-  {
-    label: "缁存姢浜�",
-    prop: "maintainUserName",
-  },
+  // {
+  //   label: "缁存姢浜�",
+  //   prop: "maintainUserName",
+  // },
 
-  {
-    label: "缁存姢鏃堕棿",
-    prop: "maintainTime",
-    width:100
-  },
+  // {
+  //   label: "缁存姢鏃堕棿",
+  //   prop: "maintainTime",
+  //   width:100
+  // },
   {
     dataType: "action",
     label: "鎿嶄綔",
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 6c05604..97c7b3d 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -572,7 +572,7 @@
 						</el-form-item>
 					</el-col> -->
       <el-col :span="12">
-						<el-form-item label="寰呭彂璐ф暟閲忥細">
+						<el-form-item label="寰呭彂璐ф暟閲忥細" prop="remainAmount">
 							<el-input v-model="deliveryForm.remainAmount" disabled placeholder="璇疯緭鍏ュ緟鍙戣揣鏁伴噺"></el-input>
 						</el-form-item>
 					</el-col>
@@ -869,6 +869,18 @@
   deliveryRules: {
     type: [
       { required: true, message: "璇烽�夋嫨鍙戣揣绫诲瀷", trigger: "change" }
+    ],
+    remainAmount: [
+      {
+        validator: (rule, value, callback) => {
+          const remain = Number(value) || 0;
+          if (remain <= 0) {
+            return callback(new Error("寰呭彂璐ф暟閲忛渶瑕佸ぇ浜�0"));
+          }
+          return callback();
+        },
+        trigger: "change",
+      }
     ],
     deliveryMode: [
       { required: true, message: "璇烽�夋嫨鍙戣揣妯″紡", trigger: "change" }
@@ -2142,30 +2154,18 @@
  * @param row 琛屾暟鎹�
  */
 const getShippingStatusText = (row) => {
-	// 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屾樉绀�"宸插彂璐�"
-	if (row.shippingDate || row.shippingCarNumber) {
-		return '宸插彂璐�';
-	}
-	
-	// 鑾峰彇鍙戣揣鐘舵�佸瓧娈�
-	const status = row.shippingStatus;
-	
-	// 濡傛灉鐘舵�佷负绌烘垨鏈畾涔夛紝榛樿涓�"寰呭彂璐�"
-	if (status === null || status === undefined || status === '') {
+	const total = Number(row?.quantity || 0);
+	const shipped = Number(row?.partSendAmount || 0);
+	if (shipped <= 0) {
 		return '寰呭彂璐�';
 	}
-	
-	// 鐘舵�佹槸瀛楃涓�
-	const statusStr = String(status).trim();
-	const statusTextMap = {
-		'寰呭彂璐�': '寰呭彂璐�',
-		'寰呭鏍�': '寰呭鏍�',
-		'瀹℃牳涓�': '瀹℃牳涓�',
-		'瀹℃牳鎷掔粷': '瀹℃牳鎷掔粷',
-		'瀹℃牳閫氳繃': '瀹℃牳閫氳繃',
-		'宸插彂璐�': '宸插彂璐�'
-	};
-	return statusTextMap[statusStr] || '寰呭彂璐�';
+	if (shipped < total) {
+		return '鍙戣揣涓�';
+	}
+	if (shipped >= total && total > 0) {
+		return '宸插彂璐�';
+	}
+	return '寰呭彂璐�';
 };
 
 /**
@@ -2173,30 +2173,18 @@
  * @param row 琛屾暟鎹�
  */
 const getShippingStatusType = (row) => {
-	// 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屾樉绀虹豢鑹�
-	if (row.shippingDate || row.shippingCarNumber) {
-		return 'success';
-	}
-	
-	// 鑾峰彇鍙戣揣鐘舵�佸瓧娈�
-	const status = row.shippingStatus;
-	
-	// 濡傛灉鐘舵�佷负绌烘垨鏈畾涔夛紝榛樿涓虹伆鑹诧紙寰呭彂璐э級
-	if (status === null || status === undefined || status === '') {
+	const total = Number(row?.quantity || 0);
+	const shipped = Number(row?.partSendAmount || 0);
+	if (shipped <= 0) {
 		return 'info';
 	}
-	
-	// 鐘舵�佹槸瀛楃涓�
-	const statusStr = String(status).trim();
-	const typeTextMap = {
-		'寰呭彂璐�': 'info',
-		'寰呭鏍�': 'info',
-		'瀹℃牳涓�': 'warning',
-		'瀹℃牳鎷掔粷': 'danger',
-		'瀹℃牳閫氳繃': 'success',
-		'宸插彂璐�': 'success'
-	};
-	return typeTextMap[statusStr] || 'info';
+	if (shipped < total) {
+		return 'warning';
+	}
+	if (shipped >= total && total > 0) {
+		return 'success';
+	}
+	return 'info';
 };
 
 const getRemainAmount = (row) => {

--
Gitblit v1.9.3