From 408b576b8aa155c9f7c8b919be3cd82be52a1da8 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 25 十一月 2025 08:52:44 +0800
Subject: [PATCH] 1.标准代码更新(2025-11-25)

---
 H5/Js/Xcsl.js |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 54 insertions(+), 3 deletions(-)

diff --git a/H5/Js/Xcsl.js b/H5/Js/Xcsl.js
index 0e183cf..55f5e50 100644
--- a/H5/Js/Xcsl.js
+++ b/H5/Js/Xcsl.js
@@ -23,6 +23,7 @@
             selectKey: "",//鏌ヨ鍏抽敭瀛�
             actions: [],//鍒楄〃鐨勫��
             show: false,//鍒楄〃灞曠ず
+            DaaInfo: {  },
 
         }
     },
@@ -34,11 +35,50 @@
         };
     },
     methods: {
+        // 鏍规嵁鍥剧墖涓殑閫昏緫鍒ゆ柇琛岃儗鏅鑹�
+        getRowColorClass(itm) {
+            const xls = parseFloat(itm.DAB006) || 0; // 闇�棰嗘暟锛堟敮鎸佸皬鏁帮級
+            const bl = parseFloat(itm.BL_Num) || 0;  // 澶囨枡鏁帮紙鏀寔灏忔暟锛�
+            const js = parseFloat(itm.JS_Num) || 0;  // 鎺ユ敹鏁帮紙鏀寔灏忔暟锛�
+            
+            // 1. 鏈鏂欐樉绀虹孩鑹�
+            if (bl === 0) {
+                return 'row-red';
+            }
+            // 2. 宸插叏閮ㄥ鏂欏凡鍏ㄩ儴鎺ユ敹鏄剧ず缁胯壊
+            if (xls === bl && bl === js && bl !== 0) {
+                return 'row-green';
+            }
+            // 3. 宸插叏閮ㄥ鏂欐帴鏀堕儴鍒嗘樉绀洪粍鑹�
+            // 4. 宸插叏閮ㄥ鏂欐湭鎺ユ敹鏄剧ず榛勮壊
+            if (xls === bl && bl > js && bl !== 0) {
+                return 'row-yellow';
+            }
+            // 5. 閮ㄥ垎澶囨枡鏈帴鏀舵樉绀鸿摑鑹�
+            if (xls > bl && bl > js && js === 0) {
+                return 'row-blue';
+            }
+            // 6. 閮ㄥ垎澶囨枡鎺ユ敹閮ㄥ垎鏄剧ず榛勮壊
+            if (xls > bl && bl > js && bl !== 0) {
+                return 'row-yellow';
+            }
+            // 7. 閮ㄥ垎澶囨枡宸插叏閮ㄦ帴鏀舵樉绀虹豢鑹�
+            if (bl === js && bl !== 0) {
+                return 'row-green';
+            }
+
+            //if (xls === js && bl !== 0) {
+            //    return 'row-green';
+            //}
+            
+            return '';
+        },
         GetItemsXcsl() {
             var that = this;
 
             if (!that.DAA001 || that.DAA001.length <= 0) {
                 that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 that.$refs.DAA001.focus();
                 return;
             }
@@ -50,8 +90,9 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.DAANum = json.data.tbBillList.gD_Num;
-                        that.DAA021 = json.data.tbBillList.workNo;
+                        //that.DAANum = json.data.tbBillList.gD_Num;
+                        //that.DAA021 = json.data.tbBillList.workNo;
+                        that.DaaInfo = json.data.tbBillList.daaInfoList[0];
                         that.xcslItemList = json.data.tbBillList.xcslItemList;
                         that.xcslWjsBarList = json.data.tbBillList.xcslWjsBarList;
                         that.xcslYjsBarList = json.data.tbBillList.xcslYjsBarList;
@@ -59,6 +100,7 @@
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.$refs.DAA001.focus();
                         that.DAA001 = "";
                     }
@@ -67,6 +109,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                 });
         },
         ScanXcsl() {
@@ -78,6 +121,7 @@
             var that = this;
             if (!that.Bar ||that.Bar.length <= 0) {
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 that.$refs.Bar.focus();
                 return;
             }
@@ -85,6 +129,7 @@
 
             if (!that.DAA001 ||that.DAA001.length <= 0) {
                 that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 that.$refs.DAA001.focus();
                 return;
             }
@@ -100,10 +145,12 @@
                     if (json.status == 0) {
                         // that.scanInfo = json.data.tbBillList;
                         that.$notify({ type: 'success', message: json.message });
+                        that.$playSound('success');
                         that.GetItemsXcsl();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                     }
                     that.isLoading = false;
                     that.$refs.Bar.focus();
@@ -112,6 +159,7 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                 });
         },
         //鑾峰彇宸ュ崟淇℃伅
@@ -122,6 +170,7 @@
             that.isLoading = true;
             that.AxiosHttp("post", 'Womdaa/GetXcslDaa', {
                 selectKey: that.selectKey,
+                selDaaType: "1",
             }, false)
                 .then(function (res) {
                     var json = res;
@@ -134,7 +183,8 @@
                             that.itemInfo = json.data.tbBillList;
                             that.actions = json.data.tbBillList.map(item => {
                                 return {
-                                    name: item.daaInfo  // 鎷兼帴瀛楁
+                                    name: item.daaInfo,  // 鎷兼帴瀛楁
+                                    subname: item.startTime
 
                                 };
                             });
@@ -167,6 +217,7 @@
                 console.log('鎻愬彇鐨凞AA001:', this.DAA001);
             } else {
                 this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�');
+                that.$playSound('error');
                 this.DAA001 = '';
             }
             this.GetItemsXcsl();

--
Gitblit v1.9.3