From 6b8a9aef84d4d4ba8dd08b911ade7cfa6cc4fa4a Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 26 一月 2024 16:51:07 +0800
Subject: [PATCH] 周总结

---
 WebTM/views/IpadIndex.html |  215 ++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 170 insertions(+), 45 deletions(-)

diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index 001c7df..0864503 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -36,6 +36,8 @@
         var HICMOInterID = "";     //鐢熶骇璁㈠崟涓诲唴鐮�
         var HICMOEntryID = "";     //鐢熶骇璁㈠崟瀛愬唴鐮�
         var HICMOBillNo = "";      //浠诲姟鍗曞彿
+        var HMaterName = "";      //浜у搧鍚嶇О
+        var HMaterID = 0;          //浜у搧ID
         //娉ㄦ剰锛氶�夐」鍗� 渚濊禆 element 妯″潡锛屽惁鍒欐棤娉曡繘琛屽姛鑳芥�ф搷浣�
         layui.config({
             base: '../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -82,6 +84,9 @@
                                 html1 += '<dd>';
                                 html1 += '<h1 style="display:none;"><span>璧勬簮ID锛�</span><span id="eqpid' + i + '">' + LoadData[i - 1].HSourceID + '</span></h1>';
                                 html1 += '<h1><span>璁惧缂栧彿锛�</span><span id="eqp' + i + '">' + LoadData[i - 1].HSourceName + '</span></h1>';
+                                html1 += '<h1><span>璁惧浠g爜锛�</span><span id="eqp' + i + '">' + LoadData[i - 1].HSourceNumber + '</span></h1>';
+                                html1 += '<h1><span>鎿嶄綔鍛橈細</span><span id="eqp' + i + '">' + LoadData[i - 1].HUserName + '</span></h1>';
+                                html1 += '<h1><span>鐢熶骇鐝粍锛�</span><span id="eqp' + i + '">' + LoadData[i - 1].GroupName + '</span></h1>';
                                 //html1 += '<h1><span>褰撳墠宸ュ崟锛�</span><span id="po' + i + '">' + (LoadData[i - 1].HSourceBillNo == null ? '' : LoadData[i - 1].HSourceBillNo) + '</span></h1>';
                                 //html1 += '<h1><span>浜у搧鍚嶇О锛�</span><span id="ptn' + i + '">' + (LoadData[i - 1].HName == null ? '' : LoadData[i - 1].HName) + '</span></h1>';
                                 //html1 += '<h1><span>浜у搧瑙勬牸锛�</span><span id="pts' + i + '">' + (LoadData[i - 1].HModel == null ? '' : LoadData[i - 1].HModel) + '</span></h1>';
@@ -131,6 +136,7 @@
 
         //閫変腑璧勬簮
         function Check(obj, i) {
+            wktag = 0;
             $("#btomleft").html("");
             $("#topright").html("");
             var partid = $(obj).parent().attr("id");   //鑾峰彇鐖剁骇id
@@ -173,28 +179,29 @@
 
 
                                 html1 += '<h1><span>宸ュ崟鍙凤細</span><span id="wk' + (i + 1) + '">' + LoadData1[i].HICMOBillNo + '</span></h1>';
-                                html1 += '<h1><span>浜у搧鍚嶇О锛�</span><span id="ptn' + (i + 1) + '">' + LoadData1[i].HMaterName + '</span></h1>';
+                                html1 += '<h1 style="display:none;"><span>浜у搧ID锛�</span><span id="materid' + (i + 1) + '">' + LoadData1[i].HMaterID + '</span></h1>';
+                                html1 += '<h1><span>浜у搧鍚嶇О锛�</span><span id="ptn' + (i + 1) + '">[' + LoadData1[i].HMaterNumber + ']-[' + LoadData1[i].HMaterName + ']</span></h1>';
                                 html1 += '<h1><span>浜у搧鍨嬪彿锛�</span><span id="pts' + (i + 1) + '">' + LoadData1[i].HModel + '</span></h1>';
-                                html1 += '<h1><span>璁″垝鏁伴噺锛�</span><span>' + LoadData1[i].HDatePlanQty + '</span><span style="margin-left:20px;">姹囨姤鎬绘暟锛�</span><span>' + LoadData1[i].HDateFinishQty+'</span></h1>';
+                                html1 += '<h1><span>璁″垝鏁伴噺锛�</span><span>' + LoadData1[i].HDatePlanQty + '</span><span style="margin-left:20px;">姹囨姤鎬绘暟锛�</span><span>' + LoadData1[i].HDateFinishQty + '</span></h1>';
                                 switch (LoadData1[i].HICMOStatus) {
                                     case "寰呯敓浜�":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">棰嗘枡鐘舵�侊細</span><span>' + LoadData1[i].棰嗘枡鐘舵�� + '</span></h1>';
                                         break;
                                     case "鐢熶骇涓�":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">棰嗘枡鐘舵�侊細</span><span>' + LoadData1[i].棰嗘枡鐘舵�� + '</span></h1>';
                                         break;
                                     case "鎸傝捣":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">棰嗘枡鐘舵�侊細</span><span>' + LoadData1[i].棰嗘枡鐘舵�� + '</span></h1>';
                                         break;
                                     case "瀹屽伐":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">棰嗘枡鐘舵�侊細</span><span>' + LoadData1[i].棰嗘枡鐘舵�� + '</span></h1>';
                                         break;
                                     default:
                                 }
                                 html1 += '<span class="prs">鐢熶骇杩涘害锛�</span>';
                                 html1 += '<div class="layui-progress layui-progress-big" lay-showPercent="yes">';
-                                html1 += '<div class="layui-progress-bar" lay-percent="' + (LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty)*100 + '%" style="width:' + (LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty)*100 + '%;">';
-                                html1 += '<span class="layui-progress-text">' + (LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty)*100 + '%</span>';
+                                html1 += '<div class="layui-progress-bar" lay-percent="' + ((LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty) * 100).toFixed(2) + '%" style="width:' + ((LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty) * 100).toFixed(2) + '%;">';
+                                html1 += '<span class="layui-progress-text">' + ((LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty) * 100).toFixed(2) + '%</span>';
                                 html1 += '</div > ';
                                 html1 += '</div>';
                                 html1 += '</dd>';
@@ -223,7 +230,7 @@
                                     html1 += '<h1><span>杩涘害锛�</span><span>0%</span></h1>';
                                 }
                                 else {
-                                    html1 += '<h1><span>杩涘害锛�</span><span>' + (LoadData2[i].HRelationQty / LoadData2[i].HPlanQty) * 100 + '%</span></h1>';
+                                    html1 += '<h1><span>杩涘害锛�</span><span>' + ((LoadData2[i].HRelationQty / LoadData2[i].HPlanQty) * 100).toFixed(2) + '%</span></h1>';
                                 }
                                 html1 += '<h1><span>鏈崟杩愯鏃堕棿锛�</span><span>' + getSeconds(LoadData2[i].HSumTimes) + '</span></h1>';
                                 html1 += '<h1><span>鏈祫婧愯繍琛屾椂闂达細</span><span>' + getSeconds(LoadData2[i].HSourceWorkTime) + '</span></h1>';
@@ -372,7 +379,9 @@
             HSourceBillType = $("#st" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(婧愬崟绫诲瀷)
             HICMOInterID = $("#df" + i + "").html();     //鐢熶骇璁㈠崟涓诲唴鐮�
             HICMOEntryID = $("#ds" + i + "").html();     //鐢熶骇璁㈠崟瀛愬唴鐮�
-
+            HICMOBillNo = $("#wk" + i + "").html();     //鐢熶骇璁㈠崟鍙�
+            HMaterName = $("#ptn" + i + "").html();     //浜у搧鍚嶇О
+            HMaterID = $("#materid" + i + "").html();     //浜у搧ID
 
             if (workcode != "" && workcode != null) {
                 $('.cns').removeClass('check1');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
@@ -572,6 +581,80 @@
             });
         }
 
+        //蹇�熷紑宸�
+        function KSOpenWork(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/SaveGetMESBeginWorkFrom_KS", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "user": sessionStorage["HUserName"], "HSourceBillType": HSourceBillType },
+                        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 });
+                        }
+                    });
+                }
+            });
+        }
+
+        //SOP 浣滀笟鎸囧涔�
+        function SOP(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+
+            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,
+                end: function () {
+
+                },
+            });
+
+            /* window.open("../../../views/鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=" + HMaterID + "&HSourceNo=" + workcode + "&HSourceEntryID=" + HSourceEntryID);*/
+        }
+
         //姹囨姤鎸夐挳鐐瑰嚮浜嬩欢
         function OpenReport(event, obj) {
             if (wktag == 0) {
@@ -579,7 +662,7 @@
                 return false;
             }
             if (WorkStaus(HSourceID1, workcode, HSourceInterID, "姹囨姤")) {
-                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻瀹屽伐鏉′欢!", { icon: 5 });
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻姹囨姤鏉′欢!", { icon: 5 });
                 return false;
             }
             layer.open({
@@ -695,39 +778,66 @@
             if (wktag == 0) {
                 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_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=',
-                end: function () {
+            }          
 
-                },
-                success: function (dom, index) {
-                    var data = [];
-                    data.push({
-                        "workcode": workcode,
-                        "HSourceID": HSourceID1,
-                        "HSourceName": HSourceName1,
-                        "HICMOInterID": HICMOInterID,
-                        "HICMOEntryID": HICMOEntryID,
-                        "HMaker": sessionStorage["HUserName"],    //sessionStorage["HUserName"]
-                        "Czybm": sessionStorage["Czybm"],
-                        //"HEmpID": "0",    //sessionStorage["HEmpID"]
-                        "HSourceBillType": HSourceBillType
-                    });
+            var IsCheck = false;
 
-                    //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
-                    var iframe = window['layui-layer-iframe' + index];
-                    //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
-                    iframe.edit(data);
+            //鏍规嵁绯荤粺鍙傛暟鎺у埗锛屽垽鏂敓浜ц鍗曟槸鍚﹀仛浜嗛浠舵楠屽崟鍜屽伐搴忔楠屽崟锛屽鏋滄湁鍏朵腑涓�绉嶆楠屽崟娌″仛锛屽垯涓嶈鍋氱敓浜ф眹鎶ュ崟
+            $.ajax({
+                url: GetWEBURL() + "/ReportPlatForm/IsCheck",
+                type: "GET",
+                data: { "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, "HICMOBillNo": HICMOBillNo },
+                async: false,
+                success: function (data) {
+                    if (data.code == 0) {
+                        layer.alert(data.Message);
+                        return false;
+                    } else {
+                        IsCheck = true;
+                    }
                 },
+                error: function (err) {
+                    layer.alert(data.Message);
+                    return false;
+                }
             });
+
+            if (IsCheck == true) {
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '浜ч噺姹囨姤鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['100%', '100%'],
+                    maxmin: true,
+                    content: '鐢熶骇绠$悊/浜ч噺姹囨姤鍗�/Sc_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=',
+                    end: function () {
+
+                    },
+                    success: function (dom, index) {
+                        var data = [];
+                        data.push({
+                            "workcode": workcode,
+                            "HSourceID": HSourceID1,
+                            "HSourceName": HSourceName1,
+                            "HICMOInterID": HICMOInterID,
+                            "HICMOEntryID": HICMOEntryID,
+                            "HMaker": sessionStorage["HUserName"],    //sessionStorage["HUserName"]
+                            "Czybm": sessionStorage["Czybm"],
+                            //"HEmpID": "0",    //sessionStorage["HEmpID"]
+                            "HSourceBillType": HSourceBillType
+                        });
+
+                        //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                        var iframe = window['layui-layer-iframe' + index];
+                        //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                        iframe.edit(data);
+                    },
+                });
+            }
+
+            
         }
 
         //涓婃枡闃查敊鍗�
@@ -779,7 +889,7 @@
                 , shade: 0.6
                 , maxmin: false
                 , anim: 0
-                , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
+                , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes']
                 , resize: false
                 , cancel: function () {
                 }
@@ -802,7 +912,7 @@
                 , shade: 0.6
                 , maxmin: false
                 , anim: 0
-                , content: ['璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
+                , content: ['璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes']
                 , resize: false
                 , cancel: function () {
 
@@ -960,7 +1070,7 @@
                         <div class="layui-row layui-col-space10">
                             <div class="layui-col-sm12 layui-col-md4" onclick="OpenWork(event,this)">
                                 <div class="cnt bottomright">
-                                    <span class="layui-icon layui-icon-pause imgicon"></span>
+                                    <span class="layui-icon layui-icon-play imgicon"></span>
                                     <span class="imgtitle">寮�宸�</span>
                                 </div>
                             </div>
@@ -977,7 +1087,22 @@
                                 </div>
                             </div>
                         </div>
+                        <div class="layui-row layui-col-space10" style="display:none;">
+                            <div class="layui-col-sm12 layui-col-md4" onclick="KSOpenWork(event,this)" >
+                                <div class="cnt bottomright">
+                                    <span class="layui-icon layui-icon-pause 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="SOP(event,this)">
+                                <div class="cnt bottomright">
+                                    <span class="layui-icon layui-icon-read imgicon"></span>
+                                    <span class="imgtitle">浣滀笟鎸囧涔�</span>
+                                </div>
+                            </div>
                             <div class="layui-col-sm12 layui-col-md4" onclick="OpenFistCheck(event,this)">
                                 <div class="cnt bottomright">
                                     <span class="layui-icon layui-icon-search imgicon"></span>
@@ -985,7 +1110,7 @@
                                 </div>
                             </div>
                             <div class="layui-col-sm12 layui-col-md4">
-                                <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%)">
+                                <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%);display:none;">
                                     <span class="layui-icon layui-icon-search imgicon"></span>
                                     <span class="imgtitle">宸℃</span>
                                 </div>
@@ -1020,7 +1145,7 @@
                         <div class="layui-row layui-col-space10">
                             <div class="layui-col-sm12 layui-col-md4" onclick="OpenStop(event,this)">
                                 <div class="cnt bottomright">
-                                    <span class="layui-icon layui-icon-play imgicon"></span>
+                                    <span class="layui-icon layui-icon-pause imgicon"></span>
                                     <span class="imgtitle">鍋滃伐</span>
                                 </div>
                             </div>

--
Gitblit v1.9.1