From d2469cf65f097ce6d6faa6699ea252adcd3e954c Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 14 四月 2026 16:54:51 +0800
Subject: [PATCH] 新增 质量每日运行状态分析 报表
---
WebTM/views/IpadIndex.html | 216 +++++++----------------------------------------------
1 files changed, 29 insertions(+), 187 deletions(-)
diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index 243c8aa..8f46f8d 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -1,6 +1,5 @@
-锘�<!DOCTYPE html>
+<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>鎶ュ伐骞冲彴</title>
@@ -49,23 +48,20 @@
var HGroupName = ""; //鐝粍
var HProcID = 0; //宸ュ簭
var HSBName = ""; //璁惧鍚嶇О
- var HReportTotal = 0; // 褰撳墠閫変腑宸ュ崟鐨勬眹鎶ユ�绘暟
//娉ㄦ剰锛氶�夐」鍗� 渚濊禆 element 妯″潡锛屽惁鍒欐棤娉曡繘琛屽姛鑳芥�ф搷浣�
layui.config({
base: '../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'laydate', 'table', 'element', "timerManager"], function () {
+ }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
, table = layui.table
, form = layui.form
, laydate = layui.laydate
- , element = layui.element
- , timerManager = layui.timerManager
- ;
+ , element = layui.element;
//window 鍏ㄥ眬鍙橀噺
window.mychart1 = echarts.init(document.getElementById('mychart1'));
window.mychart2 = echarts.init(document.getElementById('mychart2'));
@@ -76,67 +72,9 @@
mychart2.resize();
})
- // 閰嶇疆 寮瑰嚭灞� 鎵撳紑/鍏抽棴澶勭悊鍑芥暟
- InitLayerConfig()
-
TSLoad();
fetchButtonsData();
-
- timerManager.createTimer(
- 'Timer', // 鍞竴鏍囪瘑
- function () {
- TSLoad();
- },
- 10000, // 闂撮殧3鍒嗛挓
- 'interval' // 寰幆绫诲瀷
- );
-
- $(window).on('beforeunload', function () {
- timerManager.clearAllTimers();
- });
});
- function InitLayerConfig() {
- var _open = layer.open
- , _timerManager = layui.timerManager
-
- layer.open = function (opts) {
- // 鍚堝苟榛樿閰嶇疆
- var options = $.extend({}, layer.config, opts);
-
- var oldSuccess = options.success;
- var oldEnd = options.end;
- var needHideScroll = options.scrollbar === false;
-
- // 鎵撳紑寮圭獥鏃�
- options.success = function (layero, index) {
- if (needHideScroll) {
- $('body').css('overflow', 'hidden');
- }
- console.log("鏆傚仠瀹氭椂鍣�")
- _timerManager.pauseTimer('Timer')
- if (oldSuccess) oldSuccess.call(this, layero, index);
- };
-
-
- // 鍏抽棴寮圭獥鏃�
- options.end = function () {
- if (needHideScroll) {
- // 鍙湁鏈�鍚庝竴涓脊绐楀叧闂墠鎭㈠
- if ($('.layui-layer:visible').length <= 1) {
- $('body').css('overflow', '');
- }
- }
- if ($('.layui-layer:visible').length <= 1) {
- console.log("鎭㈠瀹氭椂鍣�")
- _timerManager.resumeTimer('Timer')
- }
- if (oldEnd) oldEnd.call(this);
- };
-
- return _open.call(this, options);
- };
- }
-
function TSLoad() {
$("#topleft").html("");
var HUserName = sessionStorage["HUserName"]; //sessionStorage["HUserName"]; //榛樿褰撳墠鐧诲綍浜哄憳
@@ -147,13 +85,11 @@
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++) {
- // sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�"
if (sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�") {
if (i <= LoadData.length) {
var html1 = '';
@@ -177,14 +113,14 @@
case "鐢熶骇":
html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
break;
- case "寰呮満":
+ 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_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>';
+ case "缁翠慨缁堟":
+ html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
break;
default:
}
@@ -194,9 +130,7 @@
html1 += '</dl>';
html1 += '</div>';
html1 += '</div>';
-
- // 浣跨敤涓嶅彲瑙佸璞℃殏瀛樻覆鏌撶殑html
- $("#topleftTemp").append(html1);
+ $("#topleft").append(html1);
$("#ts" + i + "").append('<span class="layui-icon layui-icon-delete delete" onclick="Delete(event,this,' + i + ')"></span>'); //鍦ㄥ綋鍓峝iv鍚庤拷鍔犲姞涓�涓猻pan鍒犻櫎
//鏍规嵁杩斿洖鐨� 閫変腑鏍囧織HNowFlag璁剧疆閫変腑鐨勮祫婧�
@@ -205,31 +139,19 @@
$("#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);
+ 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 + ')">';
@@ -254,14 +176,14 @@
case "鐢熶骇":
html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
break;
- case "寰呮満":
+ 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_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>';
+ case "缁翠慨缁堟":
+ html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>';
break;
default:
}
@@ -271,7 +193,6 @@
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鍒犻櫎
@@ -295,51 +216,6 @@
}
}
-
- if (sessionStorage["Organization"] == "瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�") {
- // 鍗庤垷 浣跨敤鍒嗙粍鏍囩
- console.log("鍒嗙粍鏍囩", LoadingTabsContact)
- 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-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>';
- tabItem.innerHTML += html1;
- index++
- }
- divParent.appendChild(tabTitle)
- divParent.appendChild(tabContent)
-
- $("#topleft").append(divParent)
- }
-
}
else {
var html1 = '';
@@ -611,8 +487,7 @@
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 id="qty' + (i + 1) + '">' + LoadData1[i].HWCHQty + '</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><span style="margin-left:5px;">棰嗘枡鐘舵�侊細</span><span>' + LoadData1[i].棰嗘枡鐘舵�� + '</span></h1>';
@@ -848,7 +723,6 @@
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鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
@@ -1022,7 +896,6 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- scrollbar: false,
content: '鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
end: function () {
@@ -1064,7 +937,6 @@
, 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) {
@@ -1110,7 +982,6 @@
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 () {
@@ -1199,7 +1070,6 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- scrollbar: false,
content: '鐢熶骇绠$悊/鐢熶骇瀹屽伐鍗�/Sc_Add_MESEndWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
end: function () {
@@ -1239,7 +1109,6 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- scrollbar: false,
content: '鐢熶骇绠$悊/鐢熶骇鍋滃伐鍗�/Sc_Add_MESStopWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
end: function () {
@@ -1382,7 +1251,6 @@
title: '鏂板鍋滃伐鎭㈠鍗�',
closeBtn: 1,
shift: 2,
- scrollbar: false,
area: ['100%', '100%'],
maxmin: true,
content: '鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/鍋滃伐鎭㈠鍗�/Sc_MESStopRestoreWorkBill.html?OperationType=2&linterid=&HSouceBillType=',
@@ -1422,7 +1290,6 @@
, 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 () {
@@ -1497,7 +1364,6 @@
, anim: 0
, content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
, resize: false
- , scrollbar: false
, cancel: function () {
}
@@ -1527,7 +1393,6 @@
, anim: 0
, content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID + '&HBillSubType=寰憰鍝�', 'yes']
, resize: false
- , scrollbar: false
, cancel: function () {
}
@@ -1591,24 +1456,9 @@
layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
return false;
}
- // 鍒ゆ柇鏄惁涓哄崕鑸熺粍缁�
- 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;
- }
+ if (WorkStaus(HSourceID1, workcode, HSourceInterID, "鏂帿灏旀眹鎶�")) {
+ layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻姹囨姤鏉′欢!", { icon: 5 });
+ return false;
}
layer.open({
type: 2,
@@ -1618,7 +1468,6 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- scrollbar: false,
content: '杞﹂棿绠$悊/宸ュ簭鍑虹珯姹囨姤鍗�/Cj_StationOutBill_CurrentWork.html?OperationType=2&linterid=&HSouceBillType=',
end: function () {
@@ -1696,7 +1545,6 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- scrollbar: false,
content: '鐢熶骇绠$悊/寮傚父鍙嶉鍗�/Sc_MESExecptFeedBackBillType.html',
end: function () {
@@ -1760,7 +1608,6 @@
closeBtn: 1,
shift: 2,
area: ['100%', '100%'],
- scrollbar: false,
maxmin: true,
content: '璐ㄩ噺绠$悊/妫�楠屽彇鏍疯繕鏍峰崟/QC_Add_TakeSampleCheckBill.html?OperationType=2&linterid=&HSouceBillType=',
end: function () {
@@ -1851,8 +1698,6 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- scrollbar: false,
-
content: '璐ㄩ噺绠$悊/寮傚父鍙嶉/OA_ErrMsgBackSelfQuery_BGT.html?OperationType=2',
end: function () {
@@ -1952,7 +1797,6 @@
<div class="layui-row layui-col-space10" id="topleft">
</div>
- <div style="display: none;" id="topleftTemp"> </div>
</div>
</fieldset>
</div>
@@ -1976,8 +1820,7 @@
</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>
@@ -2170,5 +2013,4 @@
</div>
</body>
-
</html>
\ No newline at end of file
--
Gitblit v1.9.1