From 7bb3ffb383e41f66ea9e89b8b0f8182726e77d1b Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 27 一月 2026 15:14:07 +0800
Subject: [PATCH] 华舟 新增 器具保养规程 器具点检规程 设备点检规程 设备保养规程 的默认结果选择
---
WebTM/views/IpadIndex.html | 308 ++++++++++++++++++++++++++++++++------------------
1 files changed, 196 insertions(+), 112 deletions(-)
diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index f64bba6..3c645ff 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -20,6 +20,7 @@
<script src="../layuiadmin/Scripts/webConfig.js"></script>
<script src="../layuiadmin/zgqCustom/zgqCustom.js"></script>
+
<script>
var wktag = 0;
var workcode = ""; //宸ュ崟鍙�
@@ -89,71 +90,131 @@
{
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鍒犻櫎
+ 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_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鍒犻櫎
- //鏍规嵁杩斿洖鐨� 閫変腑鏍囧織HNowFlag璁剧疆閫変腑鐨勮祫婧�
- if (LoadData[i - 1].HNowFlag) {
- $('.ctop').removeClass('check'); //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
- $("#ts" + i + "").addClass('check'); // 娣诲姞褰撳墠鍏冪礌鐨勬牱寮�
- Check(this, i);
+ //鏍规嵁杩斿洖鐨� 閫変腑鏍囧織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-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_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鍒犻櫎
+
+ //鏍规嵁杩斿洖鐨� 閫変腑鏍囧織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 {
- 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 {
@@ -927,9 +988,30 @@
},
});
-
- /* window.open("../../../views/鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=" + HMaterID + "&HSourceNo=" + workcode + "&HSourceEntryID=" + HSourceEntryID);*/
}
+
+ //SIP 浣滀笟鎸囧涔�
+ function SIP(event, obj) {
+ if (wktag == 0) {
+ layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+ return false;
+ }
+ var HTypes = "SIP";
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '浣滀笟鎸囧涔�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['95%', '95%'],
+ maxmin: true,
+ content: '鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=' + workcode + '&HSourceEntryID=' + HSourceEntryID + '&HProcID=' + HProcID + '&HTypes=' + HTypes,
+ end: function () {
+
+ }
+ });
+ }
+
//姹囨姤鎸夐挳鐐瑰嚮浜嬩欢
function OpenReport(event, obj) {
@@ -1171,7 +1253,7 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- content: '鐢熶骇绠$悊/鍋滃伐鎭㈠鍗�/Sc_MESStopRestoreWorkBill.html?OperationType=2&linterid=&HSouceBillType=',
+ content: '鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/鍋滃伐鎭㈠鍗�/Sc_MESStopRestoreWorkBill.html?OperationType=2&linterid=&HSouceBillType=',
end: function () {
},
@@ -1643,55 +1725,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 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;
- 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>
--
Gitblit v1.9.1