From 1f0f42d549a5a5759934096ec40cb70c73531da9 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 08 四月 2026 16:34:03 +0800
Subject: [PATCH] 模具每日使用清单,模具使用情况报表

---
 WebTM/views/IpadIndex.html |  512 ++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 362 insertions(+), 150 deletions(-)

diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index 2705a43..37ee899 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -1,5 +1,6 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
+
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>鎶ュ伐骞冲彴</title>
@@ -19,6 +20,7 @@
     <script src="../layuiadmin/Scripts/json2.js"></script>
     <script src="../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../layuiadmin/zgqCustom/zgqCustom.js"></script>
+
 
     <script>
         var wktag = 0;
@@ -47,6 +49,7 @@
         var HGroupName = "";      //鐝粍
         var HProcID = 0;      //宸ュ簭
         var HSBName = "";   //璁惧鍚嶇О
+        var HReportTotal = 0;      // 褰撳墠閫変腑宸ュ崟鐨勬眹鎶ユ�绘暟
 
         //娉ㄦ剰锛氶�夐」鍗� 渚濊禆 element 妯″潡锛屽惁鍒欐棤娉曡繘琛屽姛鑳芥�ф搷浣�
         layui.config({
@@ -60,7 +63,8 @@
                 , table = layui.table
                 , form = layui.form
                 , laydate = layui.laydate
-                , element = layui.element;
+                , element = layui.element
+                ;
             //window 鍏ㄥ眬鍙橀噺
             window.mychart1 = echarts.init(document.getElementById('mychart1'));
             window.mychart2 = echarts.init(document.getElementById('mychart2'));
@@ -84,77 +88,198 @@
                 dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
                 success: function (data) {
                     var LoadData = data.data.h_p_JIT_GetSourceInfoByUser;
-
+                    // 鍗庤垷鍒嗙粍鍐呭
+                    var LoadingTabsContact = {}
                     if (LoadData.length > 0)// 璇存槑楠岃瘉鎴愬姛浜嗭紝
                     {
                         HSBName = LoadData[0].HSourceName;
                         for (var i = 1; i <= LoadData.length + 1; i++) {
-                            if (i <= LoadData.length) {
-                                var html1 = '';
-                                html1 += '<div class="layui-col-sm12 layui-col-md3">';
-                                html1 += '<div class="cnt ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
-                                html1 += '<dl>';
-                                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="HEmpName' + i + '">' + LoadData[i - 1].HUserName + '</span></h1>';
-                                html1 += '<h1><span>鐢熶骇鐝粍锛�</span><span id="HGroupName' + 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>';
-                                switch (LoadData[i - 1].HStatus) {
-                                    case "绌洪棽":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border6"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    case "寮�鏈�":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    case "鍋滄満":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    case "鐢熶骇":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    case "缁翠慨杩涜涓�":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border5"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    case "缁翠慨缁撴潫":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    case "缁翠慨缁堟":
-                                        html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
-                                        break;
-                                    default:
-                                }
-                                html1 += '<h1 hidden> <span id="HGroupID' + i + '">' + LoadData[i - 1].HGroupID + '</span></h1>';
-                                html1 += '<h1 hidden> <span id="HManagerID' + i + '">' + LoadData[i - 1].HManagerID + '</span></h1>';
-                                html1 += '</dd>';
-                                html1 += '</dl>';
-                                html1 += '</div>';
-                                html1 += '</div>';
-                                $("#topleft").append(html1);
-                                $("#ts" + i + "").append('<span class="layui-icon layui-icon-delete delete"  onclick="Delete(event,this,' + i + ')"></span>'); //鍦ㄥ綋鍓峝iv鍚庤拷鍔犲姞涓�涓猻pan鍒犻櫎
+                            // sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�"
+                            if (sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�") {
+                                if (i <= LoadData.length) {
+                                    var html1 = '';
+                                    html1 += '<div class="layui-col-sm12 layui-col-md2">';
+                                    html1 += '<div class="cnt1 ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
+                                    html1 += '<dl>';
+                                    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>';
+                                    switch (LoadData[i - 1].HStatus) {
+                                        case "绌洪棽":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border6"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "寮�鏈�":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "鍋滄満":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "鐢熶骇":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "寰呮満":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "鏁呴殰":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border5 "></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "缁翠慨瀹屾垚":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        default:
+                                    }
+                                    html1 += '<h1 hidden> <span id="HGroupID' + i + '">' + LoadData[i - 1].HGroupID + '</span></h1>';
+                                    html1 += '<h1 hidden> <span id="HManagerID' + i + '">' + LoadData[i - 1].HManagerID + '</span></h1>';
+                                    html1 += '</dd>';
+                                    html1 += '</dl>';
+                                    html1 += '</div>';
+                                    html1 += '</div>';
 
-                                //鏍规嵁杩斿洖鐨� 閫変腑鏍囧織HNowFlag璁剧疆閫変腑鐨勮祫婧�
-                                if (LoadData[i - 1].HNowFlag) {
-                                    $('.ctop').removeClass('check');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
-                                    $("#ts" + i + "").addClass('check'); // 娣诲姞褰撳墠鍏冪礌鐨勬牱寮�
-                                    Check(this, i);
+                                    // 浣跨敤涓嶅彲瑙佸璞℃殏瀛樻覆鏌撶殑html
+                                    $("#topleftTemp").append(html1);
+                                    $("#ts" + i + "").append('<span class="layui-icon layui-icon-delete delete"  onclick="Delete(event,this,' + i + ')"></span>'); //鍦ㄥ綋鍓峝iv鍚庤拷鍔犲姞涓�涓猻pan鍒犻櫎
+
+                                    //鏍规嵁杩斿洖鐨� 閫変腑鏍囧織HNowFlag璁剧疆閫変腑鐨勮祫婧�
+                                    if (LoadData[i - 1].HNowFlag) {
+                                        $('.ctop').removeClass('check');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
+                                        $("#ts" + i + "").addClass('check'); // 娣诲姞褰撳墠鍏冪礌鐨勬牱寮�
+                                        Check(this, i);
+                                    }
+                                    if (LoadData[i - 1].HSourceNumber.substring(0, 2) == 'ZS') {
+                                        var GroupName = LoadData[i - 1].HSourceNumber.substring(3, 4)
+                                        if (!LoadingTabsContact[GroupName]) {
+                                            LoadingTabsContact[GroupName] = []
+                                        }
+                                        LoadingTabsContact[GroupName].push($("#topleftTemp").html())
+                                    }
+
+                                    $("#topleftTemp").empty()
+
+
+                                }
+                                else {
+                                    // var html1 = '';
+                                    // html1 += '<div class="layui-col-sm12 layui-col-md2">';
+                                    // html1 += '<div class="cnt1 ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
+                                    // html1 += '<span class="layui-icon layui-icon-addition imgicon0" onclick="Add(event,this,' + i + ')"></span>';
+                                    // html1 += '</div>';
+                                    // html1 += '</div>';
+                                    // $("#topleft").append(html1);
+
+                                }
+                            } else {
+                                if (i <= LoadData.length) {
+
+                                    var html1 = '';
+                                    html1 += '<div class="layui-col-sm12 layui-col-md3">';
+                                    html1 += '<div class="cnt ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
+                                    html1 += '<dl>';
+                                    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="HEmpName' + i + '">' + LoadData[i - 1].HUserName + '</span></h1>';
+                                    html1 += '<h1><span>鐢熶骇鐝粍锛�</span><span id="HGroupName' + i + '">' + LoadData[i - 1].GroupName + '</span></h1>';
+                                    html1 += '<h1><span>璐熻矗浜猴細</span><span id="us' + i + '">' + LoadData[i - 1].HEmpName + '</span></h1>';
+                                    switch (LoadData[i - 1].HStatus) {
+                                        case "绌洪棽":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border6"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "寮�鏈�":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "鍋滄満":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border3"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "鐢熶骇":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "寰呮満":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "鏁呴殰":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border5 "></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        case "缁翠慨瀹屾垚":
+                                            html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
+                                            break;
+                                        default:
+                                    }
+                                    html1 += '<h1 hidden> <span id="HGroupID' + i + '">' + LoadData[i - 1].HGroupID + '</span></h1>';
+                                    html1 += '<h1 hidden> <span id="HManagerID' + i + '">' + LoadData[i - 1].HManagerID + '</span></h1>';
+                                    html1 += '</dd>';
+                                    html1 += '</dl>';
+                                    html1 += '</div>';
+                                    html1 += '</div>';
+
+                                    $("#topleft").append(html1);
+                                    $("#ts" + i + "").append('<span class="layui-icon layui-icon-delete delete"  onclick="Delete(event,this,' + i + ')"></span>'); //鍦ㄥ綋鍓峝iv鍚庤拷鍔犲姞涓�涓猻pan鍒犻櫎
+
+                                    //鏍规嵁杩斿洖鐨� 閫変腑鏍囧織HNowFlag璁剧疆閫変腑鐨勮祫婧�
+                                    if (LoadData[i - 1].HNowFlag) {
+                                        $('.ctop').removeClass('check');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
+                                        $("#ts" + i + "").addClass('check'); // 娣诲姞褰撳墠鍏冪礌鐨勬牱寮�
+                                        Check(this, i);
+                                    }
+                                }
+                                else {
+                                    var html1 = '';
+                                    html1 += '<div class="layui-col-sm12 layui-col-md3">';
+                                    html1 += '<div class="cnt ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
+                                    html1 += '<span class="layui-icon layui-icon-addition imgicon0" onclick="Add(event,this,' + i + ')"></span>';
+                                    html1 += '</div>';
+                                    html1 += '</div>';
+                                    $("#topleft").append(html1);
+
                                 }
                             }
-                            else {
+
+                        }
+
+                        if (sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�") {
+                            // 鍗庤垷 浣跨敤鍒嗙粍鏍囩
+                            var divParent = document.createElement("div")
+                            divParent.classList.add("layui-tab")
+                            divParent.classList.add("layui-tab-card")
+                            var tabTitle = document.createElement("ul")
+                            var tabContent = document.createElement("div")
+                            tabTitle.classList.add("layui-tab-title")
+                            tabContent.classList.add("layui-tab-content")
+                            var index = 0
+                            for (var key in LoadingTabsContact) {
+                                var liItem = document.createElement("li")
+                                liItem.innerText = key
+                                var tabItem = document.createElement("div")
+                                tabItem.classList.add("layui-tab-item")
+                                tabItem.classList.add("layui-row")
+                                tabItem.classList.add("layui-col-space10")
+
+                                if (index == 0) {
+                                    liItem.classList.add("layui-this")
+                                    tabItem.classList.add("layui-show")
+                                }
+
+                                for (var j = 0; j < LoadingTabsContact[key].length; j++) {
+                                    tabItem.innerHTML += LoadingTabsContact[key][j]
+                                }
+                                tabTitle.appendChild(liItem)
+                                tabContent.appendChild(tabItem)
                                 var html1 = '';
-                                html1 += '<div class="layui-col-sm12 layui-col-md3">';
-                                html1 += '<div class="cnt ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
+                                html1 += '<div class="layui-col-sm12 layui-col-md2">';
+                                html1 += '<div class="cnt1 ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">';
                                 html1 += '<span class="layui-icon layui-icon-addition imgicon0" onclick="Add(event,this,' + i + ')"></span>';
                                 html1 += '</div>';
                                 html1 += '</div>';
-                                $("#topleft").append(html1);
-
+                                tabItem.innerHTML += html1;
+                                index++
                             }
+                            divParent.appendChild(tabTitle)
+                            divParent.appendChild(tabContent)
+
+                            $("#topleft").append(divParent)
                         }
+
                     }
                     else {
                         var html1 = '';
@@ -426,7 +551,8 @@
                                 html1 += '<h1 style="display:none;"><span>宸ュ簭ID锛�</span><span id="procid' + (i + 1) + '">' + LoadData1[i].HProcID + '</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>';
+                                html1 += '<h1><span>姹囨姤鎬绘暟锛�</span><span id="qty' + (i + 1) + '">' + LoadData1[i].HWCHQty + '</span></h1>';
                                 switch (LoadData1[i].HICMOStatus) {
                                     case "寰呯敓浜�":
                                         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>';
@@ -662,6 +788,7 @@
             HMaterName = $("#ptn" + i + "").html();     //浜у搧鍚嶇О
             HMaterID = $("#materid" + i + "").html();     //浜у搧ID
             HProcID = $("#procid" + i + "").html();     //宸ュ簭ID
+            HReportTotal = $("#qty" + i + "").html();//鑾峰彇姹囨姤鎬绘暟
 
             if (workcode != "" && workcode != null) {
                 $('.cns').removeClass('check1');  //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
@@ -835,6 +962,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
+                scrollbar: false,
                 content: '鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
@@ -876,6 +1004,7 @@
                 , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
                 , btn: ['纭畾', '鍙栨秷']
                 , btnAlign: 'c'
+                , scrollbar: false
                 , 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) {
@@ -921,12 +1050,13 @@
                 closeBtn: 1,
                 shift: 2,
                 area: ['95%', '95%'],
+                scrollbar: false,
                 maxmin: true,
                 content: '鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=' + workcode + '&HSourceEntryID=' + HSourceEntryID + '&HProcID=' + HProcID,
                 end: function () {
 
                 },
-            });           
+            });
         }
 
         //SIP 浣滀笟鎸囧涔�
@@ -1009,6 +1139,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
+                scrollbar: false,
                 content: '鐢熶骇绠$悊/鐢熶骇瀹屽伐鍗�/Sc_Add_MESEndWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
@@ -1048,6 +1179,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
+                scrollbar: false,
                 content: '鐢熶骇绠$悊/鐢熶骇鍋滃伐鍗�/Sc_Add_MESStopWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
 
@@ -1173,6 +1305,48 @@
             });
         }
 
+
+        // 鍋滃伐鎭㈠鍗�
+        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,
+                scrollbar: false,
+                area: ['100%', '100%'],
+                maxmin: true,
+                content: '鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/鍋滃伐鎭㈠鍗�/Sc_MESStopRestoreWorkBill.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) {
             if (wktag == 0) {
@@ -1188,6 +1362,7 @@
                 , anim: 0
                 , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes']
                 , resize: false
+                , scrollbar: false
                 , cancel: function () {
                 }
                 , end: function () {
@@ -1262,6 +1437,7 @@
                 , anim: 0
                 , content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
                 , resize: false
+                , scrollbar: false
                 , cancel: function () {
 
                 }
@@ -1291,6 +1467,7 @@
                 , anim: 0
                 , content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID + '&HBillSubType=寰憰鍝�', 'yes']
                 , resize: false
+                , scrollbar: false
                 , cancel: function () {
 
                 }
@@ -1354,52 +1531,75 @@
                 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: '杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_CurrentWork.html?OperationType=2&linterid=&HSouceBillType=',
-                end: function () {
+            //褰撳墠宸ュ崟(姹囨姤)鎸夐挳鐐瑰嚮浜嬩欢
+            function CodingReport(event, obj) {
+                if (wktag == 0) {
+                    layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                    return false;
+                }
 
-                },
-                success: function (dom, index) {
-                    var data = [];
-                    data.push({
-                        "HEquipName": $("#HEquipName1").text(),
-                        "HEquipCode": $("#HEquipCode1").text(),
-                        "HICMOBillNo": workcode,
-                        "HICMOInterID": HICMOInterID,
-                        "HICMOEntryID": HICMOEntryID,
-                        "HSourceID": HSourceID1,
-                        "HSourceName": HSourceName1,
-                        "HEmpName": HEmpName,
-                        "HManagerID": HManagerID,
-                        "HManagerName": HManagerName,
-                        "HGroupName": HGroupName,
-                        "HGroupID": HGroupID,
-                        "HBillType": HBillType,
-                        "HSourceInterID": HSourceInterID,
-                        "HSourceEntryID": HSourceEntryID,
-                        "HSourceBillNo": HSourceBillNo,
-                        "HSourceBillType": HSourceBillType
-                    });
+                // 鍒ゆ柇鏄惁涓哄崕鑸熺粍缁�              
+                if (sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�") {
+                    // 鍗庤垷缁勭粐锛氳嫢姹囨姤鎬绘暟涓嶄负0鍒欒烦杩囩姸鎬佹鏌ワ紝鍚﹀垯鎵ц妫�鏌�
+                    if (parseFloat(HReportTotal) !== 0) {
+                        // 姹囨姤鎬绘暟涓嶄负0锛岀洿鎺ユ墦寮�锛堜笉鎵ц WorkStaus 妫�鏌ワ級
+                    } else {
+                        // 姹囨姤鎬绘暟绛変簬0锛屾墽琛屽師鏈夌殑鐘舵�佹鏌�
+                        if (WorkStaus(HSourceID1, workcode, HSourceInterID, "鏂帿灏旀眹鎶�")) {
+                            layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻姹囨姤鏉′欢!", { icon: 5 });
+                            return false;
+                        }
+                    }
+                } else {
+                    // 闈炲崕鑸熺粍缁囷細淇濇寔鍘熸湁閫昏緫锛岀洿鎺ユ墽琛� WorkStaus 妫�鏌�
+                    if (WorkStaus(HSourceID1, workcode, HSourceInterID, "鏂帿灏旀眹鎶�")) {
+                        layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻姹囨姤鏉′欢!", { icon: 5 });
+                        return false;
+                    }
+                }
 
-                    //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
-                    var iframe = window['layui-layer-iframe' + index];
-                    //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
-                    iframe.edit(data);
-                },
+                // 鎵撳紑 iframe 寮圭獥锛堝師鏈変唬鐮佷笉鍙橈級
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '褰撳墠宸ュ崟',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['100%', '100%'],
+                    maxmin: true,
+                    scrollbar: false,
+                    content: '杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_CurrentWork.html?OperationType=2&linterid=&HSouceBillType=',
+                    end: function () {
+                        // 鍙�夌殑鍏抽棴鍥炶皟
+                    },
+                    success: function (dom, index) {
+                        var data = [{
+                            "HEquipName": $("#HEquipName1").text(),
+                            "HEquipCode": $("#HEquipCode1").text(),
+                            "HICMOBillNo": workcode,
+                            "HICMOInterID": HICMOInterID,
+                            "HICMOEntryID": HICMOEntryID,
+                            "HSourceID": HSourceID1,
+                            "HSourceName": HSourceName1,
+                            "HEmpName": HEmpName,
+                            "HManagerID": HManagerID,
+                            "HManagerName": HManagerName,
+                            "HGroupName": HGroupName,
+                            "HGroupID": HGroupID,
+                            "HBillType": HBillType,
+                            "HSourceInterID": HSourceInterID,
+                            "HSourceEntryID": HSourceEntryID,
+                            "HSourceBillNo": HSourceBillNo,
+                            "HSourceBillType": HSourceBillType
+                        }];
 
-
-            });
+                        //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                        var iframe = window['layui-layer-iframe' + index];
+                        //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                        iframe.edit(data);
+                    }
+                });            
+            }            
         }
 
         //璁惧鍚姩鐐规鎸夐挳鐐瑰嚮浜嬩欢
@@ -1443,6 +1643,7 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
+                scrollbar: false,
                 content: '鐢熶骇绠$悊/寮傚父鍙嶉鍗�/Sc_MESExecptFeedBackBillType.html',
                 end: function () {
 
@@ -1506,6 +1707,7 @@
                 closeBtn: 1,
                 shift: 2,
                 area: ['100%', '100%'],
+                scrollbar: false,
                 maxmin: true,
                 content: '璐ㄩ噺绠$悊/妫�楠屽彇鏍疯繕鏍峰崟/QC_Add_TakeSampleCheckBill.html?OperationType=2&linterid=&HSouceBillType=',
                 end: function () {
@@ -1596,6 +1798,8 @@
                 shift: 2,
                 area: ['100%', '100%'],
                 maxmin: true,
+                scrollbar: false,
+
                 content: '璐ㄩ噺绠$悊/寮傚父鍙嶉/OA_ErrMsgBackSelfQuery_BGT.html?OperationType=2',
                 end: function () {
 
@@ -1623,52 +1827,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>
@@ -1690,6 +1899,7 @@
                         <div class="layui-row layui-col-space10" id="topleft">
 
                         </div>
+                        <div style="display: none;" id="topleftTemp"> </div>
                     </div>
                 </fieldset>
             </div>
@@ -1713,7 +1923,8 @@
                     </ul>
                     <div class="layui-tab-content content3">
                         <div class="layui-tab-item layui-show">
-                            <div class="layui-row layui-col-space10" id="btomleft" style="height:600px;display:block;overflow-y:auto;">
+                            <div class="layui-row layui-col-space10" id="btomleft"
+                                style="height:600px;display:block;overflow-y:auto;">
 
                             </div>
                         </div>
@@ -1906,4 +2117,5 @@
     </div>
 
 </body>
+
 </html>
\ No newline at end of file

--
Gitblit v1.9.1