From a16d0d40755d4da86242ef12472aed2d1a8b2ffb Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期三, 17 十二月 2025 13:11:29 +0800
Subject: [PATCH] 1

---
 WebTM/views/IpadIndex.html |  163 ++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 115 insertions(+), 48 deletions(-)

diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index a4ea6cb..88f1d96 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -926,10 +926,31 @@
                 end: function () {
 
                 },
-            });
-
-            /* window.open("../../../views/鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=" + HMaterID + "&HSourceNo=" + workcode + "&HSourceEntryID=" + HSourceEntryID);*/
+            });           
         }
+
+        //SIP 浣滀笟鎸囧涔�
+        function SIP(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            var HTypes = "SIP";
+            layer.open({
+                type: 2,
+                skin: 'layui-layer-rim', //鍔犱笂杈规
+                title: '浣滀笟鎸囧涔�',
+                closeBtn: 1,
+                shift: 2,
+                area: ['95%', '95%'],
+                maxmin: true,
+                content: '鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=' + workcode + '&HSourceEntryID=' + HSourceEntryID + '&HProcID=' + HProcID + '&HTypes=' + HTypes,
+                end: function () {
+
+                }
+            });
+        }
+
 
         //姹囨姤鎸夐挳鐐瑰嚮浜嬩欢
         function OpenReport(event, obj) {
@@ -1131,6 +1152,47 @@
                 area: ['100%', '100%'],
                 maxmin: true,
                 content: '鐢熶骇绠$悊/涓婃枡闃查敊鍗�/Sc_Add_MaterToSourceBillList.html?OperationType=2&linterid=&HSouceBillType=',
+                end: function () {
+
+                },
+                success: function (dom, index) {
+                    var data = [];
+                    data.push({
+                        "HBillType": HBillType,
+                        "HSourceInterID": HSourceInterID,
+                        "HSourceEntryID": HSourceEntryID,
+                        "HSourceBillNo": HSourceBillNo,
+                        "HSourceBillType": HSourceBillType
+                    });
+
+                    //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                    var iframe = window['layui-layer-iframe' + index];
+                    //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                    iframe.edit(data);
+                },
+            });
+        }
+
+
+        // 鍋滃伐鎭㈠鍗�
+        function OpenMESStopRestoreWorkBill() {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "鍋滃伐鎭㈠")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻鍋滃伐鎭㈠鏉′欢!", { icon: 5 });
+                return false;
+            }
+            layer.open({
+                type: 2,
+                skin: 'layui-layer-rim', //鍔犱笂杈规
+                title: '鏂板鍋滃伐鎭㈠鍗�',
+                closeBtn: 1,
+                shift: 2,
+                area: ['100%', '100%'],
+                maxmin: true,
+                content: '鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/鍋滃伐鎭㈠鍗�/Sc_MESStopRestoreWorkBill.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
                 },
@@ -1602,52 +1664,57 @@
         //鍗曟嵁鐘舵�侀獙璇�
         function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) {
             var flag = false;
-            var sWhere = "";
-            switch (btn) {
-                case "寮�宸�":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //鏄惁鏈変笉涓哄紑宸ュ紑宸ョ姸鎬併�佸仠宸ョ姸鎬�
-                    break;
-                case "瀹屽伐":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸畬宸ョ姸鎬�
-                    break;
-                case "鍋滃伐":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')";   //鏄惁鏈変笉涓哄仠宸ユ寕璧风姸鎬�
-                    break;
-                case "姹囨姤":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
-                    break;
-                case "鏂帿灏旀眹鎶�":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
-                    break;
-                case "鎶ユ鐢宠":
-
-                    //        break;
-                    //    default:
-                    //}
-
-                    $.ajax({
-                        url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
-                        type: "GET",
-                        data: { "sWhere": JSON.stringify(sWhere) },
-                        dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
-                        async: false,
-                        success: function (data) {
-
-                            if (data.count > 0) {
-                                flag = true;
-
-                            }
-                            else {
-                                flag = false;
-                            }
-                        },
-                        error: function (err) {
-                            flag = false;
-                        }
-                    });
-
-                    return flag;
+            var sWhere = "";    //鍚庣画鍦ㄥ瓨鍌ㄨ繃绋嬪姞鎺у埗  鏂规硶鏄� h_p_IpadIndexButton
+            sWhere = {
+                HSourceID: HSourceID1
+                , HICMOBillNo: workcode
+                , HInterID: HSourceInterID
+                , type: btn
             }
+            //switch (btn) {
+            //    case "寮�宸�":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //鏄惁鏈変笉涓哄紑宸ュ紑宸ョ姸鎬併�佸仠宸ョ姸鎬�
+            //        break;
+            //    case "鍋滃伐鎭㈠":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus in('2')";   //鏄惁涓哄仠宸ユ寕璧风姸鎬�
+            //        break;
+            //    case "瀹屽伐":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸畬宸ョ姸鎬�
+            //        break;
+            //    case "鍋滃伐":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')";   //鏄惁鏈変笉涓哄仠宸ユ寕璧风姸鎬�
+            //        break;
+            //    case "姹囨姤":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
+            //        break;
+            //    case "鏂帿灏旀眹鎶�":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
+            //        break;                    
+            //}
+
+            $.ajax({
+                url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
+                type: "GET",
+                data: { "sWhere": JSON.stringify(sWhere) },
+                dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
+                async: false,
+                success: function (data) {
+
+                    if (data.count > 0) {
+                        flag = true;
+
+                    }
+                    else {
+                        flag = false;
+                    }
+                },
+                error: function (err) {
+                    flag = false;
+                }
+            });
+
+            return flag;
+
         }
     </script>
 </head>

--
Gitblit v1.9.1