From 8584e6727f06d4d8c623c79a1ffd7af3593aa034 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 05 六月 2024 15:01:05 +0800
Subject: [PATCH] 1.更新菜单栏,报工台跳转过来时,根据物料+工序+生产资源带出对应清单信息 2.报工台跳转过来时,根据物料带出对应产品防错验证清单清单信息

---
 WebTM/views/车间管理/防错验证/Qc_PreventErrMouldCheckBill.html |   75 ++++++++++++++++++
 WebTM/views/设备管理/Sb_Add_EqpRepairCheckBillList.html    |    4 
 WebTM/views/IpadIndex.html                             |   74 ++++++++++++++++++
 WebTM/views/车间管理/启动点检单/Sc_WorkBeginDotCheckBill.html   |   84 ++++++++++++++++++++
 4 files changed, 228 insertions(+), 9 deletions(-)

diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index 26dd9af..11d3de7 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -1056,7 +1056,6 @@
             });
         }
 
-
         //褰撳墠宸ュ崟(璧嬬爜)鎸夐挳鐐瑰嚮浜嬩欢
         function CodingReport(event, obj) {
             if (wktag == 0) {
@@ -1106,6 +1105,65 @@
 
             });
         }
+
+        //璁惧鍚姩鐐规鎸夐挳鐐瑰嚮浜嬩欢
+        function BeginDotCheck(event, obj) {          
+            layer.open({
+                type: 2,
+                skin: 'layui-layer-rim', //鍔犱笂杈规
+                title: '鏂板璁惧鍚姩鐐规鍗�',
+                closeBtn: 1,
+                shift: 2,
+                area: ['100%', '100%'],
+                maxmin: true,
+                content: '杞﹂棿绠$悊/鍚姩鐐规鍗�/Sc_WorkBeginDotCheckBill.html?OperationType=4&linterid=&HSouceBillType=',
+                end: function () {
+
+                },
+                success: function (dom, index) {
+                    var data = [];
+                    data.push({
+                        "HMaterID": HMaterID,
+                        "HProcID": HProcID,
+                        "HSourceID": HSourceID1,                       
+                    });
+
+                    //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                    var iframe = window['layui-layer-iframe' + index];
+                    //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                    iframe.edit(data);
+                },
+            });
+        }
+
+        //闃查敊楠岃瘉娓呭崟鎸夐挳鐐瑰嚮浜嬩欢
+        function PreventErrMouldCheck(event, obj) {
+            layer.open({
+                type: 2,
+                skin: 'layui-layer-rim', //鍔犱笂杈规
+                title: '鏂板闃查敊楠岃瘉',
+                closeBtn: 1,
+                shift: 2,
+                area: ['100%', '100%'],
+                maxmin: true,
+                content: '杞﹂棿绠$悊/闃查敊楠岃瘉/Qc_PreventErrMouldCheckBill.html?OperationType=4&linterid=&HSouceBillType=',
+                end: function () {
+
+                },
+                success: function (dom, index) {
+                    var data = [];
+                    data.push({
+                        "HMaterID": HMaterID
+                    });
+
+                    //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                    var iframe = window['layui-layer-iframe' + index];
+                    //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                    iframe.edit(data);
+                },
+            });
+        }
+
         //閫�鍑�
         function Esc(event, obj) {
             parent.location.href = "index.html"
@@ -1334,6 +1392,20 @@
                                     <span class="imgtitle">褰撳墠宸ュ崟(璧嬬爜)</span>
                                 </div>
                             </div>
+                            <div class="layui-col-sm12 layui-col-md4" onclick="BeginDotCheck(event,this)">
+                                <div class="cnt bottomright">
+                                    <span class="layui-icon layui-icon-search imgicon"></span>
+                                    <span class="imgtitle">璁惧鍚姩鐐规</span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="layui-row layui-col-space10">                           
+                            <div class="layui-col-sm12 layui-col-md4" onclick="PreventErrMouldCheck(event,this)">
+                                <div class="cnt bottomright">
+                                    <span class="layui-icon layui-icon-engine imgicon"></span>
+                                    <span class="imgtitle">闃查敊楠岃瘉</span>
+                                </div>
+                            </div>                           
                         </div>
                     </div>
                 </fieldset>
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html"
index dba30b0..7e82c4e 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_Add_EqpRepairCheckBillList.html"
@@ -624,8 +624,8 @@
                                 , "HCheckResult": data.楠屾敹缁撹           //楠屾敹缁撹
                                 , "HExplanation": data.鎽樿               //鎽樿
                                 , "HRemark": data.琛ㄥご澶囨敞                //澶囨敞
-                                , "HMouldRepairWorkID": data.HMouldRepairWorkID                //澶囨敞
-                                , "HMouldRepairWorkName": data.HMouldRepairWorkNo                //澶囨敞
+                                , "HMouldRepairWorkID": data.HMouldRepairWorkID                //缁翠慨璁板綍鍐呯爜
+                                , "HMouldRepairWorkName": data.HMouldRepairWorkNo                //缁翠慨璁板綍
 
                             });
 
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\220\257\345\212\250\347\202\271\346\243\200\345\215\225/Sc_WorkBeginDotCheckBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\220\257\345\212\250\347\202\271\346\243\200\345\215\225/Sc_WorkBeginDotCheckBill.html"
index b914fda..1cc3a3a 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\220\257\345\212\250\347\202\271\346\243\200\345\215\225/Sc_WorkBeginDotCheckBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\220\257\345\212\250\347\202\271\346\243\200\345\215\225/Sc_WorkBeginDotCheckBill.html"
@@ -306,6 +306,15 @@
     </script>
 
     <script>
+        var HMaterID = "";  //鐗╂枡
+        var HSourceID = ""; //鐢熶骇璧勬簮
+        var HProcID = "";  //宸ュ簭
+
+        var edit = function (data) {
+            HMaterID = data[0].HMaterID;
+            HSourceID = data[0].HSourceID;
+            HProcID = data[0].HProcID;
+        }
 
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -331,8 +340,9 @@
             var HOrgIDBar = 0;
             //鑾峰彇鍙傛暟
             var params = getUrlVars();
-            var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫
+            var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫   4 鎶ュ伐骞冲彴鎸夐挳璺宠浆
             var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+         
 
             //#endregion
 
@@ -376,7 +386,6 @@
                 $('#HOrgID').attr("disabled", true);
 
             }
-
             else if (OperationType == 3) {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
 
                 //鍒濆鍖栧瓙琛�
@@ -384,6 +393,23 @@
                 
                 RoadBillMain(linterid);
 
+                //绂佺敤缁勭粐閫夐」
+                $('#HOrgID').attr("disabled", true);
+            }
+            else if (OperationType==4) {
+                //鐢熸垚骞惰缃富琛ㄧ殑鍐呯爜鍜屽崟鎹彿
+                createBillNo();
+
+                //鍒濆鍖栧埗鍗曚汉鍜屽埗鍗曟椂闂�
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
+                //鍒濆鍖栨棩鏈�
+                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鍒濆鍖栧瓙琛�
+                get_InitGrid();
+                //鑾峰彇鎶ュ伐鍙拌烦杞暟鎹�
+                RoadBillEdit(HMaterID, HProcID, HSourceID);
                 //绂佺敤缁勭粐閫夐」
                 $('#HOrgID').attr("disabled", true);
             }
@@ -1083,7 +1109,7 @@
 
 
 
-            //#region 椤圭洰闃舵琛細鍒犻櫎鎸囧畾琛�
+            //#region 鍒犻櫎鎸囧畾琛�
             function set_GridDelete(obj) {
                 var data = obj.data;
                 var rowIndex = $(obj.tr).attr("data-index");
@@ -1171,6 +1197,58 @@
             }
             //#endregion
 
+            //#region  鎶ュ伐骞冲彴璺宠浆璧嬪��
+            function RoadBillEdit(HMaterID, HProcID, HSourceID)//鍔犺浇琛ㄥご
+            {
+                $.ajax({
+                    url: GetWEBURL() + "/Sc_WorkBeginDotCheckBill/锘縎c_WorkBeginDotCheckBillList",
+                    type: "GET",
+                    async: false,
+                    data: { "HMaterID": HMaterID, "HProcID": HProcID, "HSourceID": HSourceID, "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        var tableMain = result.data;
+                        var tableSub = result.data;
+
+                        //涓昏〃 璧嬪��
+                        form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                        
+                            "HICMOInterID": tableMain[0]["鐢熶骇涓诲唴鐮�"]
+                            , "HICMOEntryID": tableMain[0]["鐢熶骇瀛愬唴鐮�"]
+                            , "HICMOBillNo": tableMain[0]["鐢熶骇璁㈠崟鍙�"]
+                            , "HProcExchInterID": tableMain[0]["宸ュ簭娴佽浆鍗′富鍐呯爜"]
+                            , "HProcExchEntryID": tableMain[0]["宸ュ簭娴佽浆鍗″瓙鍐呯爜"]
+                            , "HProcExchBillNo": tableMain[0]["宸ュ簭娴佽浆鍗″彿"]
+
+                            , "HMaterID": tableMain[0]["鐗╂枡ID"]
+                            , "HMaterName": tableMain[0]["鐗╂枡鍚嶇О"]
+                            , "HSourceID": tableMain[0]["鐢熶骇璧勬簮ID"]
+                            , "HSourceName": tableMain[0]["鐢熶骇璧勬簮鍚嶇О"]
+
+                        });
+                        //缁勭粐鐨勫�糎OrgID鍙樺寲锛岄噸鏂版覆鏌�
+                        HOrgIDBar = sessionStorage["OrganizationID"];
+
+                        //瀛愯〃  璧嬪��
+                        var rowdata = [];
+                        for (var i = 0; i < tableSub.length; i++) {
+                            rowdata.push(
+                                {
+                                    "HCheckNoteItemID": tableSub[i]["妫�鏌ラ」鐩甀D"],
+                                    "HCheckNoteItemName": tableSub[i]["妫�鏌ラ」鐩�"],
+                                    "HCheckPostID": tableSub[i]["纭鑰呰鑹睮D"],
+                                    "HCheckPostName": tableSub[i]["纭鑰呰鑹�"],
+                                    "HCheckResult": "",
+                                    "HRemark":""
+                                }
+                            );
+                        }
+                        option.data = rowdata;
+                        table.render(option);
+                       
+                    }
+                })
+            }
+            //#endregion
 
             //#endregion
 
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\351\230\262\351\224\231\351\252\214\350\257\201/Qc_PreventErrMouldCheckBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\351\230\262\351\224\231\351\252\214\350\257\201/Qc_PreventErrMouldCheckBill.html"
index cf7e4ec..35ffda0 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\351\230\262\351\224\231\351\252\214\350\257\201/Qc_PreventErrMouldCheckBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\351\230\262\351\224\231\351\252\214\350\257\201/Qc_PreventErrMouldCheckBill.html"
@@ -252,6 +252,10 @@
     </script>
 
     <script>
+        var HMaterID = "";  //鐗╂枡
+        var edit = function (data) {
+            HMaterID = data[0].HMaterID;
+        }
 
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -277,7 +281,7 @@
             var HOrgIDBar = 0;
             //鑾峰彇鍙傛暟
             var params = getUrlVars();
-            var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫
+            var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫 4鎶ュ伐鍙拌烦杞�
             var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
 
             //#endregion
@@ -322,14 +326,30 @@
                 $('#HOrgID').attr("disabled", true);
 
             }
-
             else if (OperationType == 3) {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
 
                 //鍒濆鍖栧瓙琛�
                 get_InitGrid();
-                
+
                 RoadBillMain(linterid);
 
+                //绂佺敤缁勭粐閫夐」
+                $('#HOrgID').attr("disabled", true);
+            }
+            else if (OperationType==4) {
+                //鐢熸垚骞惰缃富琛ㄧ殑鍐呯爜鍜屽崟鎹彿
+                createBillNo();
+
+                //鍒濆鍖栧埗鍗曚汉鍜屽埗鍗曟椂闂�
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
+                //鍒濆鍖栨棩鏈�
+                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+                //鍒濆鍖栧瓙琛�
+                get_InitGrid();
+                //鑾峰彇鎶ュ伐鍙拌烦杞暟鎹�
+                RoadBillEdit(HMaterID);
                 //绂佺敤缁勭粐閫夐」
                 $('#HOrgID').attr("disabled", true);
             }
@@ -904,6 +924,55 @@
             }
              //#endregion
 
+            //#region  鎶ュ伐骞冲彴璺宠浆璧嬪��
+            function RoadBillEdit(HMaterID)//鍔犺浇琛ㄥご
+            {
+                $.ajax({
+                    url: GetWEBURL() + "/Qc_PreventErrMouldCheckBill/锘縌c_PreventErrMouldCheckBillList",
+                    type: "GET",
+                    async: false,
+                    data: { "HMaterID": HMaterID, "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        var tableMain = result.data;
+                        var tableSub = result.data;
+
+                        //涓昏〃 璧嬪��
+                        form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��                          
+
+                            "HMaterID": tableMain[0]["鐗╂枡ID"]
+                            , "HMaterName": tableMain[0]["鐗╂枡鍚嶇О"]
+
+                        });
+                        //缁勭粐鐨勫�糎OrgID鍙樺寲锛岄噸鏂版覆鏌�
+                        HOrgIDBar = sessionStorage["OrganizationID"];
+
+                        //瀛愯〃  璧嬪��
+                        var rowdata = [];
+                        for (var i = 0; i < tableSub.length; i++) {
+                            rowdata.push(
+                                {
+                                    "HPreventErrMouldID": tableSub[i]["闃查敊瑁呯疆ID"],
+                                    "HPreventErrMouldName": tableSub[i]["闃查敊瑁呯疆"],
+                                    "HPreventErrNote": tableSub[i]["闃查敊鍔熻兘"],
+                                    "HLoseMode": tableSub[i]["澶辨晥妯″紡"],
+                                    "HLoseCheck": tableSub[i]["澶辨晥楠岃瘉鏂规硶"],
+                                    "HCheckResult": tableSub[i]["缁撴灉"],
+                                    "HRemark": tableSub[i]["琛ㄤ綋澶囨敞"]
+                                }
+                            );
+                        }
+                        option.data = rowdata;
+                        table.render(option);
+                        for (var i = 0; i < rowdata.length; i++) {
+                            $('#HCheckResult' + (i + 1)).find("option[value='" + tableSub[i].缁撴灉 + "']").attr("selected", true);
+                        }
+                        form.render('select');
+
+                    }
+                })
+            }
+            //#endregion
+
             //#endregion
 
         });

--
Gitblit v1.9.1