From 28711a084415ac3a74c719e9a3b4fffc21a02ee1 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 11 九月 2024 21:06:47 +0800
Subject: [PATCH] 1

---
 WebTM/views/质量管理/质量报表/QC_EquipMentCollectionTechParam.html |   60 +++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 39 insertions(+), 21 deletions(-)

diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_EquipMentCollectionTechParam.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_EquipMentCollectionTechParam.html"
index 400a670..77749c2 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_EquipMentCollectionTechParam.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_EquipMentCollectionTechParam.html"
@@ -67,9 +67,15 @@
                                         </div>
                                     </div>
                                     <div class="layui-inline">
-                                        <label class="layui-form-label">鏃ユ湡</label>
+                                        <label class="layui-form-label">寮�濮嬫棩鏈�</label>
                                         <div class="layui-input-block">
                                             <input type="date" class="layui-input ForFilteringSchemes" id="HDate" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                        <div class="layui-input-block">
+                                            <input type="date" class="layui-input ForFilteringSchemes" id="HDate1" style="width:190px;">
                                         </div>
                                     </div>
                                     <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch" style="padding: 0 10px;margin-left: 20px;">
@@ -273,6 +279,7 @@
             // 鍒濆鍖栫晫闈�
             function set_ClearBill() {
                 $("#HDate").val(Format(new Date, "yyyy-MM-dd"));
+                $("#HDate1").val(Format(new Date, "yyyy-MM-dd"));
                 set_InitGrid(); //鍒濆鍖栬〃鏍�
                 get_FastQuery();
                 ////鍔犺浇鎶樼嚎鍥�
@@ -293,14 +300,10 @@
                     , limits: [50, 500, 5000, 20000]
                     , cols: [[
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
-                        , { field: '鏃ユ湡', title: '鏃ユ湡', sort: true }
                         , { field: '璁惧缂栫爜', title: '璁惧缂栫爜', sort: true }
+                        , { field: '閲囬泦鏃ユ湡', title: '閲囬泦鏃ユ湡', sort: true }
                         , { field: '宸ヨ壓鍙傛暟', title: '宸ヨ壓鍙傛暟', sort: true }
-                        , { field: '鍗曚綅 ', title: '鍗曚綅 ',sort: true }
-                        , { field: '涓婇檺鍊�', title: '涓婇檺鍊�', sort: true }
-                        , { field: '鏍囧噯鍊�', title: '鏍囧噯鍊�', sort: true }
-                        , { field: '涓嬮檺鍊�', title: '涓嬮檺鍊�', sort: true }
-                        , { field: '瀹為檯鍊�', title: '瀹為檯鍊�', sort: true }
+                        , { field: '鏁伴噰鍊�', title: '鏁伴噰鍊�', sort: true }
 
                     ]]
                 };
@@ -313,7 +316,7 @@
                 var ajaxLoad = layer.load();
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
                 $.ajax({
-                    url: GetWEBURL() + '/QC_CustomerAppealReport/SB_EquipICMOTechParamList',
+                    url: GetWEBURL() + '/QC_CustomerAppealReport/Get_QC_EquipMentCollectionTechParamList',
                     type: "GET",
                     async:false,
                     data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
@@ -384,7 +387,8 @@
                 var HEquipName = $("#HEquipName").val();
                 var HProcName = $("#HProcName").val();
                 var HTechParamName = $("#HTechParamName").val();
-                var HDate = $("#HDate").val();
+                var HDate = $("#HDate").val(); //寮�濮嬫棩鏈�
+                var HDate1 = $("#HDate1").val();//缁撴潫鏃ユ湡
 
                 var ColName = $("#ColName").val();//澶嶉�夋
                 var Comparator = $("#Comparator").val()
@@ -461,17 +465,24 @@
                     sWhere += " and " + ColName2 + " " + com2;
                 }
 
-                if (HEquipNumber != "" && HEquipName != "" && HProcName != "" && HTechParamName != "") {
-                    sWhere = {
-                        HEquipNumber: HEquipNumber
-                        , HEquipName: HEquipName
-                        , HProcName: HProcName
-                        , HTechParamName: HTechParamName
-                        , HDate: HDate
-                    }
-                    get_Display(JSON.stringify(sWhere));
+
+                if (HEquipNumber) {
+                    sWhere += " and 璁惧缂栫爜 = '" + HEquipNumber + "'";
+                }                             
+                if (HTechParamName) {
+                    sWhere += " and 宸ヨ壓浜ф暟 = '" + HTechParamName + "'";
+                }
+                if (HDate) {
+                    sWhere += " and CONVERT(date, 閲囬泦鏃ユ湡) >= '" + HDate + "'";
+                }
+                if (HDate1) {
+                    sWhere += " and CONVERT(date, 閲囬泦鏃ユ湡) <= '" + HDate1 + "'";
+                }
+                if (HEquipNumber != "" || HTechParamName!="") {
+                    get_Display(sWhere);
                     sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
                 }
+               
             }
             //閲嶇疆蹇�熸煡璇�
             function set_ClearQuery() {
@@ -520,6 +531,11 @@
                         HVaule.push(option.data[i].鏁伴噰鍊�);
                     }
                 }
+
+                var minValue = Math.min(...HVaule) - 10; //鎶樼嚎鐨勬渶澶у��
+                var maxValue = Math.max(...HVaule) + 10; //鎶樼嚎鐨勬渶灏忓��
+                var interval = Math.floor((maxValue - minValue) / 10); //鏄剧ず鎶樼嚎鐨勯棿闅�
+
                 option_ZZT = {
                     title: {
                         text: HTitle,
@@ -555,7 +571,10 @@
                     ],
                     yAxis: [
                         {
-                            type: 'value'
+                            type: 'value',
+                            min: minValue,
+                            max: maxValue,
+                            interval: interval
                         }
                     ],
                     series: [
@@ -603,7 +622,7 @@
             }
             //#endregion
 
-            //宸ュ簭娴佽浆鍗″脊绐�
+            //璁惧寮圭獥
             form.on('submit(btnHEquip)', function () {
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
@@ -627,7 +646,6 @@
                         $("#HEquipNumber").val(checkStatus.data[0].璁惧缂栫爜);
                         $("#HEquipName").val(checkStatus.data[0].璁惧鍚嶇О);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                        get_EquipList();
                     }
                     , btn2: function (index, layero) {
                         //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟

--
Gitblit v1.9.1