From d76a93705c711a10df28bc35135cc146c24ae8a1 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 05 六月 2023 11:23:34 +0800
Subject: [PATCH] 提料运算

---
 WebTM/views/生产管理/提料计划/JIT_LiftMaterPlaBillnList.html   |   78 ++++++++++++++++++++++++++++++++++++++-
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html       |   37 ++++++++++++++++++
 WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html |    1 
 3 files changed, 114 insertions(+), 2 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html"
index 62c9443..a261098 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html"
@@ -50,8 +50,35 @@
                                 </div>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button>
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button>
-                                <div class="layui-colla-content">
+                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                     <!--鍏朵粬鏉′欢-->
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-search="" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -245,7 +272,11 @@
                         option.data = result.data;
                         table.render(option);
                         layer.close(ajaxLoad);
-                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+
+                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                            ColFilter();
+                        }
+
                     } else {
                         layer.close(ajaxLoad);
                         layer.alert(result.code + result.Message, { icon: 5 });
@@ -374,6 +405,31 @@
             var HBillNo = $("#HBillNo").val();
             var Organization = $("#Organization").val();//閲囪喘缁勭粐
             var HWorkShopIDName = $("#HWorkShopIDName").val();//鐢熶骇杞﹂棿
+            var ColName = $("#ColName").val();//澶嶉�夋
+            var Comparator = $("#Comparator").val()
+            var ColContent = $("#ColContent").val();
+
+            if (ColName != 0 && Comparator != 0) {
+                var com = "";
+                switch (Comparator) {
+                    case "7":
+                        com = "like'%" + ColContent + "%'";
+                        break;
+                    case "8":
+                        com = "like'%" + ColContent + "'";
+                        break;
+                    case "9":
+                        com = "like'" + ColContent + "%'";
+                        break;
+                    case "10":
+                        com = "not like'%" + ColContent + "%'";
+                        break;
+                    default:
+                        com = "" + Comparator + "'" + ColContent + "'";
+                        break;
+                }
+                sWhere += " and " + ColName + " " + com;
+            }
 
             if (HBillNo) {
                 sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
@@ -395,6 +451,10 @@
             $("#Organization").val("");//閲囪喘缁勭粐
             $("#HWorkShopIDName").val("");//鐢熶骇杞﹂棿
             $("#HWorkShopID").val("");//鐢熶骇杞﹂棿
+            $("#ColContent").val("");
+            $("#ColName").val("0");
+            $("#Comparator").val("0");
+            form.render('select');
             sWhere = "";
         }
         //#endregion
@@ -582,6 +642,20 @@
         }
             //#endregion
 
+        //#region 鍒楁槑鏄剧ず涓嬫媺妗�
+        function ColFilter() {
+            var Organization = '<option  value="0" selected="selected" ></option>';
+            for (var i = 1; i < option.cols[0].length; i++) {
+                if (option.cols[0][i].hide != true) {
+                    Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
+                }
+            }
+            $("#ColName").empty(); //绉婚櫎涓嬫媺妗嗘暟鎹�
+            $("#ColName").append(Organization); //娣诲姞涓嬫媺妗嗘暟鎹�
+            form.render('select');
+        }
+            //#endregion
+
         //#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_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 23d9ef4..7c23c21 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"
@@ -24,6 +24,7 @@
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnLock" id="btnLock">閿佸畾</button>
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnUnlock" id="btnUnlock">瑙i攣</button>
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnCompleteSetAnalysis" id="btnCompleteSetAnalysis">榻愬鍒嗘瀽</button>
+                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnTLYS" id="btnTLYS">鎻愭枡杩愮畻</button>
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnICMOBill" id="btnICMOBill">鐢熶骇璁㈠崟閫夊崟</button>
                         </div>
                         <div class="layui-collapse">
@@ -295,6 +296,11 @@
         //榻愬鍒嗘瀽
         form.on('submit(btnCompleteSetAnalysis)', function (data) {
             get_btnCompleteSetAnalysis();
+        })
+
+        //鎻愭枡杩愮畻
+        form.on('submit(btnTLYS)', function (data) {
+            get_btnTLYS();
         })
 
         //鐢熶骇璁㈠崟閫夊崟
@@ -886,6 +892,37 @@
             });
         }
 
+        //鎻愭枡杩愮畻
+        function get_btnTLYS() {
+            if ($("#HWorkShopID").val() == 0) {
+                return layer.msg("鐢熶骇杞﹂棿涓嶈兘涓虹┖!");
+            }
+            sWhere = {
+                HProdORGID: $("#HProdORGID").val()
+                , HWorkShopID: $("#HWorkShopID").val()
+            }
+            sWhere = JSON.stringify(sWhere);
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_TLYS',
+                type: "GET",
+                data: { "sWhere": sWhere, "user": sessionStorage["Czybm"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        get_FastQuery(2);
+                        layer.msg(data1.Message);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        } 
+
         //鐢熶骇璁㈠崟閫夊崟
         function get_btnICMOBill() {
             layer.open({
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
index 1813655..10466fa 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
@@ -520,6 +520,7 @@
                     url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
                     type: "GET",
                     data: { "sWhere": HMainID },
+                    async: false,
                     //success: function (data1) {
                     //    if (data1.count == 1) {
                     //        option2.data = data1.data;

--
Gitblit v1.9.1