From db57306b71f88696b54fdb5f693fa1692044fd72 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 18 五月 2022 09:12:52 +0800
Subject: [PATCH] 生产计划平台 查询

---
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatFormImport.html |    4 
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html       |  160 ++++++++++++++++++++++++++++++++++++-----------------
 2 files changed, 111 insertions(+), 53 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html"
index 9cd00ef..c0c13d0 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatForm.html"
@@ -92,8 +92,9 @@
                                             <label class="layui-form-label" style="width: 85px;">榻愬绫诲瀷</label>
                                             <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                                 <select name="HOrderType" id="HOrderType" lay-verify="HOrderType">
-                                                    <option value="鐢熶骇璁㈠崟">鐢熶骇璁㈠崟</option>
-                                                    <option value="濮斿璁㈠崟">濮斿璁㈠崟</option>
+                                                    <option value="鍏ㄩ儴">鍏ㄩ儴</option>
+                                                    <option value="鐢熶骇鐢ㄦ枡娓呭崟">鐢熶骇鐢ㄦ枡娓呭崟</option>
+                                                    <option value="鏍囧噯Bom">鏍囧噯Bom</option>
                                                 </select>
                                             </div>
                                         </div>
@@ -162,6 +163,7 @@
             , element = layui.element;
 
         var sWhere = "";
+        var option = [];
 
         //#endregion
 
@@ -184,8 +186,16 @@
         form.on('submit(btnHWorkShopID)', function (data) {
             btnHWorkShopID();
         });
-        
-     
+
+        //蹇�熻繃婊�
+        form.on('submit(btnSearch)', function (data) {
+            get_FastQuery();
+        });
+
+        //閲嶇疆
+        form.on('submit(btnReSearch)', function (data) {
+            set_ClearQuery();
+        });
 
         //#endregion
 
@@ -196,18 +206,18 @@
             //鍒濆鍖栨椂闂�
             $("#HPlanBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
             $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd"));
-            //鍒濆鍖栬〃鏍�
-            set_InitGrid();
-            get_Display(sWhere);
             //缁勭粐
             Organ();
+            //鍒濆鍖栬〃鏍�
+            set_InitGrid();
+            get_FastQuery();
         }
          //#endregion
 
         //鑾峰彇缁勭粐
         function Organ() {
             //鑾峰彇鐧诲綍椤电粍缁囧垪
-            var Organization = '<option  style="color:blue;" value="">缁勭粐</option>';
+            var Organization = '<option  style="color:blue;" value="0">缁勭粐</option>';
             $.ajax({
                 type: "get",
                 url: GetWEBURL() + "/Web/GetOrganizations",
@@ -227,6 +237,57 @@
 
         //琛ㄦ牸鏁版嵁
         function set_InitGrid() {
+            var columns = [];
+            var myDate = new Date();
+            var yyyy = myDate.getFullYear();
+            var MM = myDate.getMonth() + 1;
+            var dd = myDate.getDate();
+            var SumMonth = 31; //鍔ㄦ�佷袱鏈堜箣宸� new Date(yyyy, MM, 0).getDate()
+
+            columns.push({ type: 'checkbox', fixed: 'left' });
+            columns.push({ field: 'hmainid', title: 'hmainid', hide: true });
+            columns.push({ field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', hide: true });
+            columns.push({ field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width:150 });
+            columns.push({ field: '鐢熶骇璁㈠崟鍙�', title: '鐢熶骇璁㈠崟鍙�', width:150 });
+            columns.push({ field: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', title: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', width: 150 });
+            columns.push({ field: '鐢靛帇/鍔熺巼/搴曟澘', title: '鐢靛帇/鍔熺巼/搴曟澘', width: 150 });
+            columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�', width:150 });
+            columns.push({ field: '鐢熶骇缁勭粐', title: '鐢熶骇缁勭粐', width:150 });
+            columns.push({ field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width:150 });
+            columns.push({ field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width:150 });
+            columns.push({ field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width:150 });
+            columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true});
+            columns.push({ field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width:150 });
+            columns.push({ field: '閿�鍞鍗曟暟閲�', title: '閿�鍞鍗曟暟閲�', width:150 });//0
+            columns.push({ field: '璁㈠崟闇�姹傛暟閲�', title: '鐢熶骇璁㈠崟鏁伴噺', width: 150 });//0
+            columns.push({ field: '璁㈠崟鍙帓鏁伴噺', title: '璁㈠崟鍙帓鏁伴噺', width:150 });
+            columns.push({ field: '鏈叆搴撴暟閲�', title: '鏈叆搴撴暟閲�', width: 150 });//0
+            columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150 });//0
+            columns.push({ field: '鏃ヨ鍒掓暟閲忔�婚噺', title: '鏃ヨ鍒掓暟閲忔�婚噺', width: 150 });//0
+            columns.push({ field: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', title: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', width: 150 });//0
+            columns.push({ field: '璁″垝寮�濮嬫棩鏈�', title: '棰勮寮�宸ユ棩鏈�', width:150 });
+            columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
+            columns.push({ field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿', width:150 });
+            columns.push({ field: 'HSourceID', title: 'HSourceID', hide:true });
+            columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width:150 });
+            for (var i = 0; i <= (SumMonth - dd); i++) {
+                columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), edit: 'text',width:120 })//0
+            }
+            for (var i = 1; i < dd; i++) {
+                columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), edit: 'text',width: 120 })//0
+            }
+            columns.push({ field: 'T31', title: 'T31', width: 150 });//0
+            columns.push({ field: '璁㈠崟绫诲瀷', title: '璁㈠崟绫诲瀷', width: 150 });
+            columns.push({ field: '鐢熶骇璁㈠崟鍗曟嵁绫诲瀷', title: '婧愬崟璁㈠崟鍗曟嵁绫诲瀷', width: 150 });
+            columns.push({ field: '涓氬姟鐘舵��', title: '涓氬姟鐘舵��', width: 150 });
+            columns.push({ field: '浜х嚎鍏ュ簱鏁伴噺', title: '浜х嚎鍏ュ簱鏁伴噺', width: 150 });
+            columns.push({ field: '鏈帓鏁伴噺', title: '鍙帓鏁伴噺', width: 150 });
+            columns.push({ field: '璁㈠崟绛夌骇', title: '璁㈠崟绛夌骇', width: 150 });
+            columns.push({ field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 150 });
+            columns.push({ field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 150 });
+            columns.push({ field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 150 });
+            columns.push({ field: '鏃ヨ鍒掑伐鍗曚富鐮�', title: '鏃ヨ鍒掑伐鍗曚富鐮�', width: 150 });
+
             option = {
                 elem: '#mainTable'
                 , toolbar: '#toolbarDemo'
@@ -235,48 +296,7 @@
                 , cellMinWidth: 90
                 , limit: 50
                 , limits: [50, 500, 5000, 20000]
-                , cols: [[
-                    { type: 'checkbox', fixed: 'left' }
-                    , { field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width: 150 }
-                    , { field: '鐢熶骇璁㈠崟鍙�', title: '鐢熶骇璁㈠崟鍙�', width: 170 }
-                    , { field: '浜у搧浠g爜', title: '浜у搧浠g爜', width: 170 }
-                    , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О', width: 260, }
-                    , { field: '浜у搧瑙勬牸鍨嬪彿', title: '浜у搧瑙勬牸鍨嬪彿', width: 160 }
-                    , { field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿', width: 160 }
-                    , { field: '璁″垝寮�宸ユ棩鏈�', title: '璁″垝寮�宸ユ棩鏈�', width: 160, templet: "<div>{{d.璁″垝寮�宸ユ棩鏈� ==null ?'':layui.util.toDateString(d.璁″垝寮�宸ユ棩鏈�, 'yyyy-MM-dd')}}</div>" }
-                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160 }
-                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160 }
-                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 160 }
-                    , { field: '瀛愰」鍗曚綅', title: '瀛愰」鍗曚綅', width: 160 }
-                    , { field: '鍗曚綅鐢ㄩ噺', title: '鍗曚綅鐢ㄩ噺', width: 160 }
-                    , { field: '璁″垝鍙戞枡鏁伴噺', title: '璁″垝鍙戞枡鏁伴噺', width: 160 }
-                    , { field: '鍙枡鏁伴噺', title: '鍙枡鏁伴噺', width: 160, edit: 'text' }
-                    , { field: '閫�鏂欐暟閲�', title: '閫�鏂欐暟閲�', width: 160, edit: 'text' }
-                    , { field: '閫�鏂欏師鍥�', title: '閫�鏂欏師鍥�', width: 160, edit: 'text' }
-                    , { field: '宸插彨鏂欐暟閲�', title: '宸插彨鏂欐暟閲�', width: 160 }
-                    , { field: '宸查厤閫佹暟閲�', title: '宸查厤閫佹暟閲�', width: 160 }
-                    , { field: '璋冨嚭浠撳簱', title: '璋冨嚭浠撳簱', width: 160, edit: 'text', event: 'Warehouse' }
-                    , { field: '璋冨嚭浠撳簱id', title: '璋冨嚭浠撳簱id', width: 160, hide: true }
-                    , { field: '搴撳瓨鏁伴噺', title: '搴撳瓨鏁伴噺', width: 160 }
-                    , { field: '璋冨嚭浠撳簱搴撳瓨鏁伴噺', title: '璋冨嚭浠撳簱搴撳瓨鏁伴噺', width: 160 }
-                    , { field: '璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺', title: '璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺', width: 160 }
-                    , { field: '鍙敤搴撳瓨', title: '鍙敤搴撳瓨', width: 160 }
-                    , { field: '搴撳瓨缁勭粐', title: '搴撳瓨缁勭粐', width: 160 }
-                    , { field: 'HICMOBillNo', title: 'HICMOBillNo', width: 160 }
-                    , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 160 }
-                    , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 160 }
-                    , { field: 'HDeptID', title: 'HDeptID', hide: true }
-                    , { field: 'HDeptNumber', title: 'HDeptNumber', hide: true }
-                    , { field: 'HMaterialID', title: 'HMaterialID', hide: true }
-                    , { field: 'HWHID', title: 'HWHID', hide: true }
-                    , { field: 'HOutOrgID', title: 'HOutOrgID', hide: true }
-                    , { field: 'HSouceInterID', title: 'HSouceInterID', hide: true }
-                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', hide: true }
-                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', hide: true }
-                    , { field: 'HICMOInterID', title: 'HICMOInterID', hide: true }
-                    , { field: 'HICMOEntryID', title: 'HICMOEntryID', hide: true }
-                    , { field: 'HSTOCKID', title: 'HSTOCKID', hide: true }
-                ]]
+                , cols: [columns]
             };
         }
 
@@ -284,7 +304,7 @@
         function get_Display(sWhere) {
             var ajaxLoad = layer.load();
             $.ajax({
-                url: GetWEBURL() + '/Sc_WorkBillSortBill/Sc_WorkBillSortBillList',
+                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillList',
                 type: "GET",
                 data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                 success: function (data1) {
@@ -358,6 +378,44 @@
 
         }
 
+        //蹇�熻繃婊�
+        function get_FastQuery() {
+            var HPlanBeginDate = $("#HPlanBeginDate").val();//寮�宸ヨ捣濮嬫棩鏈�
+            var HProdORGID = $("#HProdORGID").val();//鐢熶骇璁㈠崟缁勭粐
+            var HSeOrderBillNo = $("#HSeOrderBillNo").val();//閿�鍞鍗曞彿
+            var HPlanEndDate = $("#HPlanEndDate").val();//寮�宸ユ埅姝㈡棩鏈�
+            var HMaterID = $("#HMaterID").val();//鐗╂枡缂栫爜id
+            var HICMOBillNo = $("#HICMOBillNo").val();//鐢熶骇璁㈠崟鍙�
+            var HWorkShopID = $("#HWorkShopID").val();//鐢熶骇杞﹂棿
+
+            sWhere = {
+                HPlanBeginDate: HPlanBeginDate
+                , HProdORGID: HProdORGID
+                , HSeOrderBillNo: HSeOrderBillNo
+                , HPlanEndDate: HPlanEndDate
+                , HMaterID: HMaterID
+                , HICMOBillNo: HICMOBillNo
+                , HWorkShopID: HWorkShopID
+            }
+            get_Display(JSON.stringify(sWhere));
+            sWhere = ""//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+        }
+
+        //閲嶇疆
+        function set_ClearQuery() {
+            $("#HPlanBeginDate").val(Format(new Date(), "yyyy-MM-dd"));//寮�宸ヨ捣濮嬫棩鏈�
+            $("#HProdORGID").val("0");//鐢熶骇璁㈠崟缁勭粐
+            $("#HSeOrderBillNo").val("");//閿�鍞鍗曞彿
+            $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd"));//寮�宸ユ埅姝㈡棩鏈�
+            $("#HMaterID").val("0");//鐗╂枡缂栫爜id
+            $("#HMaterNumber").val("");//鐗╂枡缂栫爜
+            $("#HMaterName").val("");//鐗╂枡鍚嶇О
+            $("#HMaterModel").val("0");//瑙勬牸鍨嬪彿
+            $("#HICMOBillNo").val("");//鐢熶骇璁㈠崟鍙�
+            $("#HWorkShopID").val("0");//鐢熶骇杞﹂棿id
+            $("#HWorkShopIDName").val("");//鐢熶骇杞﹂棿
+            sWhere = "";
+        }
         //#endregion
         //浠ヤ笂鏄痩ayui妯″潡
     });
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
index 9526fbe..92ed1fc 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
@@ -206,8 +206,8 @@
             var columns = [];
 
             columns.push({ type: 'checkbox', fixed: 'left' });
-            columns.push({ field: 'hmainid', title: ' hmainid', width: 200, hide: true });
-            columns.push({ field: '鍗曟嵁鍙�', title: ' 鍗曟嵁鍙�', width: 200 });
+            columns.push({ field: 'hmainid', title: 'hmainid', width: 200, hide: true });
+            columns.push({ field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 });
             columns.push({ field: '鐢熶骇璁㈠崟鍙�*', title: '鐢熶骇璁㈠崟鍙�' });
             columns.push({ field: '鐢熶骇璁㈠崟鏄庣粏琛屽彿*', title: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', width: 200 });
             columns.push({ field: '缁勭粐缂栫爜*', title: '缁勭粐缂栫爜' });

--
Gitblit v1.9.1