From b4f231bb0e3a624e23964f2fbac573da680f110f Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 24 四月 2025 13:38:28 +0800
Subject: [PATCH] 报工平台快捷开工快捷停工快捷完工

---
 WebTM/views/生产管理/报工平台_PDA/IpadIndex_PDA.html |  223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 223 insertions(+), 0 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
index 41b484b..999bf08 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
@@ -355,6 +355,7 @@
         function fetchListData(HSourceID) {
             if (HSourceID != "0" && HSourceID != null && HSourceID!="") {
                 $('.ctop').removeClass('check');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
+                HSourceID1 = HSourceID;
                 //鎵ц鑱斿姩浜嬩欢
                 $.ajax({
                     url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList",
@@ -655,6 +656,156 @@
                     //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
                     iframe.edit(data);
                 },
+            });
+        }
+
+        //蹇嵎寮�宸�
+        function OpenFastWork(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "蹇嵎寮�宸�")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻寮�宸ユ潯浠�!", { icon: 5 });
+                return false;
+            }
+            var indexOpen = layer.open({
+                type: 1
+                , title: "纭寮�宸ュ悧?"
+                , closeBtn: false
+                , area: '300px;'
+                , shade: 0.8
+                , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
+                , btn: ['纭畾', '鍙栨秷']
+                , btnAlign: 'c'
+                , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+                , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">璁惧缂栧彿:' + HSourceName1 + '<br>宸ュ崟鍙�:' + workcode + '<br>浜у搧鍚嶇О:' + HMaterName + '<br></div>'
+                , btn1: function (index, layero, e) {
+
+                    //鏂板寮�宸ュ崟
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MESBeginWorkBill/FastBeginWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    window.location.reload();
+                                });
+                                layer.close(indexOpen);
+                            } else {
+                                layer.alert(result.code + result.Message, { icon: 5 });
+                            }
+                        }, error: function () {
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+            });
+        }
+
+        //蹇嵎瀹屽伐
+        function OpenFastEnd(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "蹇嵎瀹屽伐")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻瀹屽伐鏉′欢!", { icon: 5 });
+                return false;
+            }
+            var indexOpen = layer.open({
+                type: 1
+                , title: "纭瀹屽伐鍚�?"
+                , closeBtn: false
+                , area: '300px;'
+                , shade: 0.8
+                , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
+                , btn: ['纭畾', '鍙栨秷']
+                , btnAlign: 'c'
+                , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+                , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">璁惧缂栧彿:' + HSourceName1 + '<br>宸ュ崟鍙�:' + workcode + '<br>浜у搧鍚嶇О:' + HMaterName + '<br></div>'
+                , btn1: function (index, layero, e) {
+
+                    //鏂板寮�宸ュ崟
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MESEndWorkBill/FastEndWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    window.location.reload();
+                                });
+                                layer.close(indexOpen);
+                            } else {
+                                layer.alert(result.code + result.Message, { icon: 5 });
+                            }
+                        }, error: function () {
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+            });
+        }
+
+        //蹇嵎鍋滃伐
+        function OpenFastStop(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "蹇嵎鍋滃伐")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻鍋滃伐鏉′欢!", { icon: 5 });
+                return false;
+            }
+            var indexOpen = layer.open({
+                type: 1
+                , title: "纭鍋滃伐鍚�?"
+                , closeBtn: false
+                , area: '300px;'
+                , shade: 0.8
+                , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
+                , btn: ['纭畾', '鍙栨秷']
+                , btnAlign: 'c'
+                , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+                , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">璁惧缂栧彿:' + HSourceName1 + '<br>宸ュ崟鍙�:' + workcode + '<br>浜у搧鍚嶇О:' + HMaterName + '<br></div>'
+                , btn1: function (index, layero, e) {
+
+                    //鏂板寮�宸ュ崟
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MESStopWorkBill/FastStopWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    window.location.reload();
+                                });
+                                layer.close(indexOpen);
+                            } else {
+                                layer.alert(result.code + result.Message, { icon: 5 });
+                            }
+                        }, error: function () {
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
             });
         }
 
@@ -1465,6 +1616,78 @@
                     });
 
                     return flag;
+                case "蹇嵎寮�宸�":
+                    sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID,"type":"寮�宸�"}
+                    $.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;
+                case "蹇嵎鍋滃伐":
+                    sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID, "type": "瀹屽伐" }
+                    $.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;
+                case "蹇嵎瀹屽伐":
+                    sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID, "type": "鍋滃伐" }
+                    $.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>

--
Gitblit v1.9.1