From 9cd022e109e834881ab8718f99b7e2506a05ce91 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 10 十一月 2025 08:55:35 +0800
Subject: [PATCH] 华远:不良原因分析统计报表,根据参数,初始化站别下拉列表

---
 WebTM/views/基础资料/公用基础资料/Gy_BarCodeReport.html |   74 +++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)

diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html"
index b6b8742..35dd13b 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_BarCodeReport.html"
@@ -287,6 +287,10 @@
                 }
                 $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                 $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鏍规嵁鍙傛暟璁剧疆绔欏埆鍒楄〃鏁版嵁
+                setStationListByParams();
+
                 //鍒濆鍖栦笅鎷夋
                 initSelects();
                
@@ -1042,6 +1046,76 @@
                 });
             }
             //#endregion
+
+            //#region 鑾峰彇鍙傛暟
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
+                }
+                return vars;
+            }
+            //#endregion
+            //#region 鏍规嵁鍙傛暟璁剧疆绔欏埆鍒楄〃鏁版嵁
+            function setStationListByParams() {
+                //鑾峰彇鍙傛暟
+                var params = getUrlVars();
+                var openType = params[params[0]];                           //浠庡弬鏁颁腑鑾峰彇 鎵撳紑鏂瑰紡  VRS锛歏RS涓嶈壇缁熻鍒嗘瀽锛� AVI锛欰VI涓嶈壇缁熻鍒嗘瀽锛汥ianCe锛氱數娴嬩笉鑹粺璁″垎鏋愶紱JiGuangGe锛氭縺鍏夊壊涓嶈壇缁熻鍒嗘瀽
+                if (openType == null || typeof (openType) == "undefined") { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                    var data = ["AOI1", "AOI2", "AOI3", "AOI4", "AVI", "鐢垫祴", "MRB"];
+                    var Organization = "";
+                    for (var i = 0; i < data.length; i++) {
+                        Organization += '<option  style="color:blue;" value="' + data[i] + '">' + data[i] + '</option>';
+                    }
+                    $("#Station").empty();
+                    $("#Station").append(Organization);
+                    form.render('select');
+                }
+                else if (openType == "VRS") {
+                    var data = ["AOI1", "AOI2", "AOI3", "AOI4"];
+                    var Organization = "";
+                    for (var i = 0; i < data.length; i++) {
+                        Organization += '<option  style="color:blue;" value="' + data[i] + '">' + data[i] + '</option>';
+                    }
+                    $("#Station").empty();
+                    $("#Station").append(Organization);
+                    form.render('select');
+                }
+                else if (openType == "AVI") {
+                    var data = ["AVI"];
+                    var Organization = "";
+                    for (var i = 0; i < data.length; i++) {
+                        Organization += '<option  style="color:blue;" value="' + data[i] + '">' + data[i] + '</option>';
+                    }
+                    $("#Station").empty();
+                    $("#Station").append(Organization);
+                    form.render('select');
+                }
+                else if (openType == "DianCe") {
+                    var data = ["鐢垫祴"];
+                    var Organization = "";
+                    for (var i = 0; i < data.length; i++) {
+                        Organization += '<option  style="color:blue;" value="' + data[i] + '">' + data[i] + '</option>';
+                    }
+                    $("#Station").empty();
+                    $("#Station").append(Organization);
+                    form.render('select');
+                }
+                else if (openType == "JiGuangGe") {
+                    var data = ["MRB"];
+                    var Organization = "";
+                    for (var i = 0; i < data.length; i++) {
+                        Organization += '<option  style="color:blue;" value="' + data[i] + '">' + data[i] + '</option>';
+                    }
+                    $("#Station").empty();
+                    $("#Station").append(Organization);
+                    form.render('select');
+                }
+            }
+            //#endregion
         });
         
     </script>

--
Gitblit v1.9.1