From 3cc56ff5b45dc78ce5ad9c50d466cfa2e4e9c1f7 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 12 七月 2023 12:20:30 +0800
Subject: [PATCH] 项目管理-工程项目:项目阶段表完成日期输入方式修改

---
 WebTM/views/IpadIndex.html |  433 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 253 insertions(+), 180 deletions(-)

diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index b93b70a..451abaf 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -63,7 +63,7 @@
         });
         function TSLoad() {
             $("#topleft").html("");
-            var HUserName = "Admin";  //sessionStorage["HUserName"];     //榛樿褰撳墠鐧诲綍浜哄憳
+            var HUserName = sessionStorage["HUserName"];  //sessionStorage["HUserName"];     //榛樿褰撳墠鐧诲綍浜哄憳
             $.ajax({
                 url: GetWEBURL() + "/ReportPlatForm/SearchGetLineBindBillList",
                 type: "GET",
@@ -82,7 +82,12 @@
                                 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>褰撳墠宸ュ崟锛�</span><span id="po' + i + '">' + (LoadData[i - 1].HSourceBillNo == null ? '' : LoadData[i - 1].HSourceBillNo) + '</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>';
                                 html1 += '<h1><span>璐熻矗浜猴細</span><span id="us' + i + '">' + LoadData[i - 1].HEmpName + '</span></h1>';
                                 html1 += '</dd>';
                                 html1 += '</dl>';
@@ -111,8 +116,13 @@
                         }
                     }
                     else {
-                        layer.alert(data.Message, { icon: 5 });
-                        return false;
+                        var html1 = '';
+                        html1 += '<div class="layui-col-sm12 layui-col-md3">';
+                        html1 += '<div class="cnt ctop" id="ts1" onclick="Check(this,1)">';
+                        html1 += '<span class="layui-icon layui-icon-addition imgicon0" onclick="Add(event,this,1)"></span>';
+                        html1 += '</div>';
+                        html1 += '</div>';
+                        $("#topleft").append(html1);
                     }
                 },
                 error: function (err) {
@@ -124,116 +134,118 @@
 
         //閫変腑璧勬簮
         function Check(obj, i) {
-                $("#btomleft").html("");
-                $("#topright").html("");
-                var partid = $(obj).parent().attr("id");   //鑾峰彇鐖剁骇id
-                var eqpid = "eqpid" + i;                   //鑾峰彇鎸囧畾璧勬簮鏍峰紡ID
-                var HSourceID = $("#" + eqpid + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮ID)
-                HSourceID1 = $("#" + eqpid + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮ID)
-                var eqp = "eqp" + i;                       //鑾峰彇鎸囧畾璧勬簮鏍峰紡ID
-                var HSourceName = $("#" + eqp + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮)
-                HSourceName1 = $("#" + eqp + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮)
-                if (HSourceID != "" && HSourceID != null) {
-                        $('.ctop').removeClass('check');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
-                        $("#ts" + i + "").addClass('check'); // 娣诲姞褰撳墠鍏冪礌鐨勬牱寮�
-                        //鎵ц鑱斿姩浜嬩欢
-                        $.ajax({
-                            url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList",
-                            type: "GET",
-                            data: { "HSourceID": HSourceID },
-                            dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
-                            success: function (data) {
-                              
-                                var LoadData1 = data.data.h_p_JIT_GetWorkBillListInfoBySource;
-                                var LoadData2 = data.data.h_p_JIT_GetWorkBillListInfoBySource1;
-                                if (LoadData1.length > 0)  //宸ュ崟鍒楄〃鏁版嵁
-                                {
+            wktag = 0;
+            $("#btomleft").html("");
+            $("#topright").html("");
+            var partid = $(obj).parent().attr("id");   //鑾峰彇鐖剁骇id
+            var eqpid = "eqpid" + i;                   //鑾峰彇鎸囧畾璧勬簮鏍峰紡ID
+            var HSourceID = $("#" + eqpid + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮ID)
+            HSourceID1 = $("#" + eqpid + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮ID)
+            var eqp = "eqp" + i;                       //鑾峰彇鎸囧畾璧勬簮鏍峰紡ID
+            var HSourceName = $("#" + eqp + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮)
+            HSourceName1 = $("#" + eqp + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮)
+            if (HSourceID != "" && HSourceID != null) {
+                $('.ctop').removeClass('check');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
+                $("#ts" + i + "").addClass('check'); // 娣诲姞褰撳墠鍏冪礌鐨勬牱寮�
+                //鎵ц鑱斿姩浜嬩欢
+                $.ajax({
+                    url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList",
+                    type: "GET",
+                    data: { "HSourceID": HSourceID },
+                    dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
+                    success: function (data) {
 
-                                    for (var i = 0; i < LoadData1.length; i++) {
-                                        var html1 = '';
-                                        html1 += '<div class="layui-col-sm12 layui-col-md3">';
-                                        html1 += '<div class="cns" id="bs' + (i + 1) + '" onclick="CheckBtom(this,' + (i + 1)+ ')">';
-                                        html1 += '<dl>';
-                                        html1 += '<dd class="tcenter">';
-                                        html1 += '<h1 style="display:none;"><span>鍗曟嵁绫诲瀷锛�</span><span id="ty' + (i + 1) + '">' + LoadData1[i].HBillType + '</span></h1>';
-                                        //HSourceInterID瀹為檯鍙栧�硷細Sc_ICMOBillStatus_Tmp  HInterID锛堝崟鎹富ID锛�
-                                        html1 += '<h1 style="display:none;"><span>婧愬崟涓诲唴鐮侊細</span><span id="sm' + (i + 1) + '">' + LoadData1[i].HSourceInterID + '</span></h1>';
-                                        html1 += '<h1 style="display:none;"><span>婧愬崟瀛愬唴鐮侊細</span><span id="sb' + (i + 1) + '">' + LoadData1[i].HSourceEntryID + '</span></h1>';
-                                        html1 += '<h1 style="display:none;"><span>婧愬崟鍗曞彿锛�</span><span id="sw' + (i + 1) + '">' + LoadData1[i].HSourceBillNo + '</span></h1>';
-                                        html1 += '<h1 style="display:none;"><span>婧愬崟绫诲瀷锛�</span><span id="st' + (i + 1) + '">' + LoadData1[i].HSourceBillType + '</span></h1>';
-                                        html1 += '<h1 style="display:none;"><span>鐢熶骇璁㈠崟鍙蜂富ID锛�</span><span id="df' + (i + 1) + '">' + LoadData1[i].HICMOInterID + '</span></h1>';
-                                        html1 += '<h1 style="display:none;"><span>鐢熶骇璁㈠崟瀛怚D锛�</span><span id="ds' + (i + 1) + '">' + LoadData1[i].HICMOEntryID + '</span></h1>';
-                                       
-                                        
-                                        html1 += '<h1><span>宸ュ崟鍙凤細</span><span id="wk' + (i + 1) + '">' + LoadData1[i].HICMOBillNo + '</span></h1>';
-                                        switch (LoadData1[i].HICMOStatus) {
-                                            case "寰呯敓浜�":
-                                                html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
-                                                break;
-                                            case "鐢熶骇涓�":
-                                                html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
-                                                break;
-                                            case "鎸傝捣":
-                                                html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
-                                                break;
-                                            case "瀹屽伐":
-                                                html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</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 + '%" style="width:' + LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty + '%;">';
-                                        html1 += '<span class="layui-progress-text">' + LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty + '%</span>';
-                                        html1 += '</div > ';
-                                        html1 += '</div>';
-                                        html1 += '</dd>';
-                                        html1 += '</dl>';
-                                        html1 += '</div>';
-                                        html1 += '</div>';
-                                        $("#btomleft").append(html1);
-                                    }
+                        var LoadData1 = data.data.h_p_JIT_GetWorkBillListInfoBySource;
+                        var LoadData2 = data.data.h_p_JIT_GetWorkBillListInfoBySource1;
+                        if (LoadData1.length > 0)  //宸ュ崟鍒楄〃鏁版嵁
+                        {
+
+                            for (var i = 0; i < LoadData1.length; i++) {
+                                var html1 = '';
+                                html1 += '<div class="layui-col-sm12 layui-col-md3">';
+                                html1 += '<div class="cns" id="bs' + (i + 1) + '" onclick="CheckBtom(this,' + (i + 1) + ')">';
+                                html1 += '<dl>';
+                                html1 += '<dd class="tcenter">';
+                                html1 += '<h1 style="display:none;"><span>鍗曟嵁绫诲瀷锛�</span><span id="ty' + (i + 1) + '">' + LoadData1[i].HBillType + '</span></h1>';
+                                //HSourceInterID瀹為檯鍙栧�硷細Sc_ICMOBillStatus_Tmp  HInterID锛堝崟鎹富ID锛�
+                                html1 += '<h1 style="display:none;"><span>婧愬崟涓诲唴鐮侊細</span><span id="sm' + (i + 1) + '">' + LoadData1[i].HSourceInterID + '</span></h1>';
+                                html1 += '<h1 style="display:none;"><span>婧愬崟瀛愬唴鐮侊細</span><span id="sb' + (i + 1) + '">' + LoadData1[i].HSourceEntryID + '</span></h1>';
+                                html1 += '<h1 style="display:none;"><span>婧愬崟鍗曞彿锛�</span><span id="sw' + (i + 1) + '">' + LoadData1[i].HSourceBillNo + '</span></h1>';
+                                html1 += '<h1 style="display:none;"><span>婧愬崟绫诲瀷锛�</span><span id="st' + (i + 1) + '">' + LoadData1[i].HSourceBillType + '</span></h1>';
+                                html1 += '<h1 style="display:none;"><span>鐢熶骇璁㈠崟鍙蜂富ID锛�</span><span id="df' + (i + 1) + '">' + LoadData1[i].HICMOInterID + '</span></h1>';
+                                html1 += '<h1 style="display:none;"><span>鐢熶骇璁㈠崟瀛怚D锛�</span><span id="ds' + (i + 1) + '">' + LoadData1[i].HICMOEntryID + '</span></h1>';
+
+
+                                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><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>';
+                                switch (LoadData1[i].HICMOStatus) {
+                                    case "寰呯敓浜�":
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        break;
+                                    case "鐢熶骇涓�":
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        break;
+                                    case "鎸傝捣":
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        break;
+                                    case "瀹屽伐":
+                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
+                                        break;
+                                    default:
                                 }
-                                if (LoadData2.length > 0)  //褰撳墠鐘舵�佹暟鎹�
-                                {
-                                    for (var i = 0; i < LoadData2.length; i++) {
-                                        var html1 = '';
-                                        html1 += '<div class="layui-col-sm12 layui-col-md12">';
-                                        html1 += '<dl class="topright">;'
-                                        html1 += '<dt>';
-                                        html1 += '<img src="../layuiadmin/layui/images/device.png" onError="this.src="../layuiadmin/layui/images/erro.png";">'
-                                        html1 += '</dt>';
-                                        html1 += '<dd>';
-                                        html1 += '<h1><span>褰撳墠璁惧锛�</span><span>' + LoadData2[i].HSourceName + '</span></h1>';
-                                        html1 += '<h1><span>褰撳墠璁㈠崟锛�</span><span>' + LoadData2[i].HSourceBillNo + '</span></h1>';
-                                        html1 += '<h1><span>鐗╂枡鍚嶇О锛�</span><span>' + LoadData2[i].HMaterName + '</span></h1>';
-                                        html1 += '<h1><span>璁″垝鏁伴噺锛�</span><span>' + LoadData2[i].HPlanQty + '</span></h1>';
-                                        html1 += '<h1><span>浠ユ眹鎶ユ暟閲忥細</span><span>' + LoadData2[i].HRelationQty + '</span></h1>';
-                                        if (LoadData2[i].HRelationQty == 0 || LoadData2[i].HRelationQty == null)
-                                        {
-                                            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>' + getSeconds(LoadData2[i].HSumTimes)+'</span></h1>';
-                                        html1 += '<h1><span>鏈祫婧愯繍琛屾椂闂达細</span><span>' + getSeconds(LoadData2[i].HSourceWorkTime) +'</span></h1>';
-                                        html1 += '</dd>';
-                                        html1 += '</dl>';
-                                        html1 += '</div>';
-                                        $("#topright").append(html1);
-                                    }
-                                }
-                            },
-                            error: function (err) {
-                                layer.alert(err.Message, { time: 1 * 2000, icon: 5 });
-                                return false;
+                                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).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>';
+                                html1 += '</dl>';
+                                html1 += '</div>';
+                                html1 += '</div>';
+                                $("#btomleft").append(html1);
                             }
-                        });
-               
-                }
+                        }
+                        if (LoadData2.length > 0)  //褰撳墠鐘舵�佹暟鎹�
+                        {
+                            for (var i = 0; i < LoadData2.length; i++) {
+                                var html1 = '';
+                                html1 += '<div class="layui-col-sm12 layui-col-md12">';
+                                html1 += '<dl class="topright">;'
+                                html1 += '<dt>';
+                                html1 += '<img src="../layuiadmin/layui/images/device.png" onError="this.src="../layuiadmin/layui/images/erro.png";">'
+                                html1 += '</dt>';
+                                html1 += '<dd>';
+                                html1 += '<h1><span>褰撳墠璁惧锛�</span><span>' + LoadData2[i].HSourceName + '</span></h1>';
+                                html1 += '<h1><span>褰撳墠璁㈠崟锛�</span><span>' + LoadData2[i].HSourceBillNo + '</span></h1>';
+                                html1 += '<h1><span>鐗╂枡鍚嶇О锛�</span><span>' + LoadData2[i].HMaterName + '</span></h1>';
+                                html1 += '<h1><span>璁″垝鏁伴噺锛�</span><span>' + LoadData2[i].HPlanQty + '</span></h1>';
+                                html1 += '<h1><span>宸叉眹鎶ユ暟閲忥細</span><span>' + LoadData2[i].HRelationQty + '</span></h1>';
+                                if (LoadData2[i].HRelationQty == 0 || LoadData2[i].HRelationQty == null) {
+                                    html1 += '<h1><span>杩涘害锛�</span><span>0%</span></h1>';
+                                }
+                                else {
+                                    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>';
+                                html1 += '</dd>';
+                                html1 += '</dl>';
+                                html1 += '</div>';
+                                $("#topright").append(html1);
+                            }
+                        }
+                    },
+                    error: function (err) {
+                        layer.alert(err.Message, { time: 1 * 2000, icon: 5 });
+                        return false;
+                    }
+                });
+
             }
+        }
 
         //娣诲姞璧勬簮
         function Add(event, obj, i) {
@@ -257,7 +269,7 @@
                     {
                         return false;
                     }
-                    var HUserName = "Admin";
+                    var HUserName = sessionStorage["HUserName"];
                     var HSourceID = body.find("#HSourceID").val();
                     var HSourceCode = body.find("#HSourceCode").val();
                     var HSourceName = body.find("#HSourceName").val();
@@ -327,23 +339,20 @@
             var eqpid = "eqpid" + i;                   //鑾峰彇鎸囧畾璧勬簮鏍峰紡ID
             HSourceID = $("#" + eqpid + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(璧勬簮ID)
             //閫昏緫鍒犻櫎鏂规硶
-            layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index)
-            {
+            layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
                 $.ajax({
                     url: GetWEBURL() + "/ReportPlatForm/DeleteGetLineBindBillList",
                     type: "GET",
                     data: { "HSourceID": HSourceID },
                     dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
                     success: function (data) {
-                        if (data.count > 0)
-                        {
+                        if (data.count > 0) {
                             TSLoad(); //鎵ц鏌ヨ杩囩▼
                             layer.close(index);
                             layer.msg(data.Message, { time: 1 * 2000, icon: 1 });
                             return false;
                         }
-                        else
-                        {
+                        else {
                             layer.alert(data.Message, { time: 1 * 2000, icon: 5 });
                             return false;
                         }
@@ -357,8 +366,7 @@
         }
 
         //宸ュ崟鍒楄〃閫変腑
-        function CheckBtom(obj, i)
-        {
+        function CheckBtom(obj, i) {
             var partid = $(obj).parent().attr("id");   //鑾峰彇鐖剁骇id
             workcode = $("#wk" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(宸ュ崟鍙�)
             HBillType = $("#ty" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(鍗曟嵁绫诲瀷)
@@ -368,7 +376,7 @@
             HSourceBillType = $("#st" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(婧愬崟绫诲瀷)
             HICMOInterID = $("#df" + i + "").html();     //鐢熶骇璁㈠崟涓诲唴鐮�
             HICMOEntryID = $("#ds" + i + "").html();     //鐢熶骇璁㈠崟瀛愬唴鐮�
-     
+
 
             if (workcode != "" && workcode != null) {
                 $('.cns').removeClass('check1');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
@@ -526,18 +534,15 @@
             }
             return result;
         }
-    
+
 
         //寮�宸ユ寜閽偣鍑讳簨浠�
-        function OpenWork(event, obj)
-        {
-            if (wktag == 0)
-            {
-                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", {icon: 5 });
+        function OpenWork(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
                 return false;
             }
-            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "寮�宸�"))
-            {
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "寮�宸�")) {
                 layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻寮�宸ユ潯浠�!", { icon: 5 });
                 return false;
             }
@@ -549,20 +554,20 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
-                content: '鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?hID=&Type=2',
+                content: '鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.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
-                        });
-                 
+                        "HBillType": HBillType,
+                        "HSourceInterID": HSourceInterID,
+                        "HSourceEntryID": HSourceEntryID,
+                        "HSourceBillNo": HSourceBillNo,
+                        "HSourceBillType": HSourceBillType
+                    });
+
                     //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
                     var iframe = window['layui-layer-iframe' + index];
                     //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
@@ -578,7 +583,7 @@
                 return false;
             }
             if (WorkStaus(HSourceID1, workcode, HSourceInterID, "姹囨姤")) {
-                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻瀹屽伐鏉′欢!", { icon: 5 });
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻姹囨姤鏉′欢!", { icon: 5 });
                 return false;
             }
             layer.open({
@@ -589,7 +594,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
-                content: '鐢熶骇绠$悊/浜ч噺姹囨姤鍗�/Sc_Add_ProductReportBillList.html?hID=&Type=2',
+                content: '鐢熶骇绠$悊/浜ч噺姹囨姤鍗�/Sc_Add_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
                 },
@@ -616,8 +621,7 @@
                 layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
                 return false;
             }
-            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "瀹屽伐"))
-            {
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "瀹屽伐")) {
                 layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻瀹屽伐鏉′欢!", { icon: 5 });
                 return false;
             }
@@ -629,7 +633,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
-                content: '鐢熶骇绠$悊/鐢熶骇瀹屽伐鍗�/Sc_Add_MESEndWorkBillList.html?hID=&Type=2',
+                content: '鐢熶骇绠$悊/鐢熶骇瀹屽伐鍗�/Sc_Add_MESEndWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
                 },
@@ -656,8 +660,7 @@
                 layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
                 return false;
             }
-            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "鍋滃伐"))
-            {
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "鍋滃伐")) {
                 layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻鍋滃伐鏉′欢!", { icon: 5 });
                 return false;
             }
@@ -669,7 +672,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
-                content: '鐢熶骇绠$悊/鐢熶骇鍋滃伐鍗�/Sc_Add_MESStopWorkBillList.html?hID=&Type=2',
+                content: '鐢熶骇绠$悊/鐢熶骇鍋滃伐鍗�/Sc_Add_MESStopWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
                 },
@@ -705,7 +708,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
-                content: '鐢熶骇绠$悊/浜ч噺姹囨姤鍗�/Sc_ProductReportBillList.html?hID=&Type=2',
+                content: '鐢熶骇绠$悊/浜ч噺姹囨姤鍗�/Sc_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
                 },
@@ -717,7 +720,8 @@
                         "HSourceName": HSourceName1,
                         "HICMOInterID": HICMOInterID,
                         "HICMOEntryID": HICMOEntryID,
-                        "HMaker": "Admin",    //sessionStorage["HUserName"]
+                        "HMaker": sessionStorage["HUserName"],    //sessionStorage["HUserName"]
+                        "Czybm": sessionStorage["Czybm"],
                         //"HEmpID": "0",    //sessionStorage["HEmpID"]
                         "HSourceBillType": HSourceBillType
                     });
@@ -730,9 +734,48 @@
             });
         }
 
+        //涓婃枡闃查敊鍗�
+        function OpenMaterToSource() {
+            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_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 OpenFistCheck(event, obj)
-        {
+        function OpenFistCheck(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
             layer.open({
                 type: 2
                 , area: ['100%', '100%']
@@ -740,19 +783,22 @@
                 , shade: 0.6
                 , maxmin: false
                 , anim: 0
-                , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType, 'yes']
+                , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes']
                 , resize: false
                 , cancel: function () {
                 }
                 , end: function () {
-                    get_FastQuery(table, option);
+
                 }
             })
         }
 
         //杩囩▼妫�楠�
-        function OpenProcess(event, obj)
-        {
+        function OpenProcess(event, obj) {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
             layer.open({
                 type: 2
                 , area: ['100%', '100%']
@@ -760,37 +806,66 @@
                 , shade: 0.6
                 , maxmin: false
                 , anim: 0
-                , content: ['璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID, 'yes']
+                , content: ['璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes']
                 , resize: false
                 , cancel: function () {
-                    btnIs();
+
                 }
                 , end: function () {
-                    get_FastQuery(table, option);
+
                 }
             })
         }
 
+        //涓嶈壇閲囬泦
+        function BadGather() {
+            if (wktag == 0) {
+                layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            layer.open({
+                type: 2
+                , area: ['100%', '100%']
+                , title: '璐ㄩ噺姹囨姤鍗�-缂栬緫'
+                , shade: 0.6
+                , maxmin: false
+                , anim: 0
+                , content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
+                , resize: false
+                , cancel: function () {
+
+                }
+                , end: function () {
+
+                }
+            })
+        }
+
+        //閫�鍑�
+        function Esc(event, obj) {
+            parent.location.href = "index.html"
+
+        }
+
         //鍗曟嵁鐘舵�侀獙璇�
-        function WorkStaus(HSourceID1, workcode,HSourceInterID,btn)
-        {
+        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')";   //寮�宸ョ姸鎬�
+                    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')";   //瀹屽伐鐘舵��
+                    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')";   //鍋滃伐鎸傝捣鐘舵��
+                    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')";   //姹囨姤鐘舵��
+                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
                     break;
                 case "鎶ユ鐢宠":
-                    
+
                     break;
                 default:
             }
@@ -798,26 +873,24 @@
             $.ajax({
                 url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
                 type: "GET",
-                data: { "sWhere": sWhere},
+                data: { "sWhere": sWhere },
                 dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
                 async: false,
                 success: function (data) {
-                    
-                    if (data.count > 0)
-                    {
+
+                    if (data.count > 0) {
                         flag = true;
-                     
+
                     }
                     else {
-                        flag =false;
+                        flag = false;
                     }
                 },
-                error: function (err)
-                {
+                error: function (err) {
                     flag = false;
                 }
             });
-        
+
             return flag;
         }
     </script>
@@ -915,7 +988,7 @@
                                     <span class="imgtitle">棣栨</span>
                                 </div>
                             </div>
-                            <div class="layui-col-sm12 layui-col-md4" >
+                            <div class="layui-col-sm12 layui-col-md4">
                                 <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%)">
                                     <span class="layui-icon layui-icon-search imgicon"></span>
                                     <span class="imgtitle">宸℃</span>
@@ -935,14 +1008,14 @@
                                     <span class="imgtitle">鎶ユ鐢宠</span>
                                 </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="layui-col-sm12 layui-col-md4" onclick="OpenMaterToSource(event,this)">
+                                <div class="cnt bottomright">
                                     <span class="layui-icon layui-icon-engine imgicon"></span>
                                     <span class="imgtitle">涓婃枡闃插憜</span>
                                 </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="layui-col-sm12 layui-col-md4" onclick="BadGather(event,this)">
+                                <div class="cnt bottomright">
                                     <span class="layui-icon layui-icon-chart imgicon"></span>
                                     <span class="imgtitle">涓嶈壇閲囬泦</span>
                                 </div>
@@ -961,8 +1034,8 @@
                                     <span class="imgtitle">寮傚父</span>
                                 </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="layui-col-sm12 layui-col-md4" onclick="Esc(event,this)">
+                                <div class="cnt bottomright">
                                     <span class="layui-icon layui-icon-close imgicon"></span>
                                     <span class="imgtitle">閫�鍑�</span>
                                 </div>
@@ -975,4 +1048,4 @@
     </div>
 
 </body>
-</html>
+</html>
\ No newline at end of file

--
Gitblit v1.9.1