From b3bce2c5a8f0316829faf0cbc4284e49d6eee6b5 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 23 一月 2026 16:48:39 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/IpadIndex.html | 589 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 545 insertions(+), 44 deletions(-)
diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index e2e590a..88f1d96 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -30,6 +30,7 @@
var HSourceID1 = ""; //鐢熶骇璧勬簮ID1
var HSourceName1 = ""; //鐢熶骇璧勬簮1
var HSourceInterID = ""; //婧愬崟涓诲唴鐮�
+ var HProcExchInterID = ""; //娴佽浆鍗d
var HSourceEntryID = ""; //婧愬崟瀛愬唴鐮�
var HSourceBillNo = ""; //婧愬崟鍗曞彿
var HSourceBillType = ""; //婧愬崟绫诲瀷
@@ -71,6 +72,7 @@
})
TSLoad();
+ fetchButtonsData();
});
function TSLoad() {
$("#topleft").html("");
@@ -102,6 +104,30 @@
//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>';
@@ -148,6 +174,187 @@
}
var HManagerID = 0;
var HGroupID = 0;
+
+ //鍔犺浇褰撳墠鐢ㄦ埛鎸夐挳
+ function fetchButtonsData() {
+ $.ajax({
+ url: GetWEBURL() + '/ReportPlatForm/getButtonlist',
+ type: "GET",
+ data: { "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data && data1.data.length > 0) {
+ // 娓呯┖鐜版湁鍐呭
+ $("#button-container").empty();
+ var colClass = ''; // 鍔ㄦ�佽缃垪鐨勬牱寮�
+ let largestColClass = 'layui-col-md4'; // 榛樿鏂板鎸夐挳澶у皬锛堝亣璁炬渶澶氭槸 3 涓寜閽竴鎺掞級
+
+ // 閬嶅巻姣忎釜鎸夐挳鏁版嵁骞剁敓鎴愬搴旂殑 HTML
+ data1.data.forEach(function (buttonData, index) {
+ // 鏍规嵁 defaultSize 瀛楁閫夋嫨鍚堥�傜殑鍒楀
+ switch (buttonData.鎸夐挳澶у皬) {
+ case '灏�':
+ colClass = 'layui-col-md3'; // 涓�鎺�4涓�
+ break;
+ case '涓�':
+ colClass = 'layui-col-md4'; // 涓�鎺�3涓�
+ break;
+ case '澶�':
+ colClass = 'layui-col-md6'; // 涓�鎺�2涓�
+ break;
+ default:
+ colClass = 'layui-col-md4'; // 榛樿璁剧疆涓轰腑绛夊ぇ灏忥紙3涓竴鎺掞級
+ }
+
+ // 鏇存柊鏈�澶у垪瀹斤細鍙栨渶澶у垪瀹�
+ if (colClass === 'layui-col-md6') {
+ largestColClass = colClass; // 濡傛灉褰撳墠鍒楀鏄� 'layui-col-md6'锛岃鏄庢槸鏈�瀹界殑
+ } else if (colClass === 'layui-col-md4' && largestColClass !== 'layui-col-md6') {
+ largestColClass = colClass; // 榛樿鍒楀涓� 'layui-col-md4'锛屽皬浜� 'layui-col-md6'
+ } else if (colClass === 'layui-col-md3' && largestColClass === 'layui-col-md4') {
+ largestColClass = colClass; // 濡傛灉褰撳墠鍒楀鏄� 'layui-col-md3'锛屽皬浜� 'layui-col-md4'
+ }
+
+ var html = '';
+ html += '<div class="' + colClass + '" id="btn' + index + '">';
+ html += ' <div class="cnt bottomright" id="button' + index + '" onclick="' + buttonData.浜嬩欢鍚嶇О + '(event, this)">';
+ html += ' <span class="layui-icon ' + buttonData.鍥炬爣 + ' imgicon"></span>';
+ html += ' <span class="imgtitle">' + buttonData.鍚嶇О + '</span>';
+ html += ' </div>';
+ html += ' <span class="layui-icon layui-icon-delete delete" onclick="deleteButton(event, \'' + buttonData.HItemID + '\')"></span>'; // 淇敼鍒犻櫎鎸夐挳浜嬩欢锛屼紶閫� id1 鍜� id2
+ html += '</div>';
+ // 灏嗙敓鎴愮殑 HTML 杩藉姞鍒� #button-container
+ $("#button-container").append(html);
+ });
+
+ // 娣诲姞涓�涓柊澧炴寜閽�
+ var html1 = '';
+ html1 += '<div class="layui-col-sm12 ' + largestColClass + '">';
+ html1 += ' <div class="cnt bottomright">';
+ html1 += ' <span class="layui-icon layui-icon-addition imgtitle" onclick="Add_Buttton(event,this,1)"></span>';
+ html1 += ' </div>';
+ html1 += '</div>';
+
+ $("#button-container").append(html1);
+ } else {
+ // 濡傛灉娌℃湁鎸夐挳鏁版嵁锛屽睍绀洪粯璁ょ殑绌虹櫧鏂板鎸夐挳
+ var html1 = '';
+ html1 += '<div class="layui-col-sm12 layui-col-md4">';
+ html1 += ' <div class="cnt bottomright">';
+ html1 += ' <span class="layui-icon layui-icon-addition imgtitle" onclick="Add_Buttton(event,this,1)"></span>';
+ html1 += ' </div>';
+ html1 += '</div>';
+ $("#button-container").append(html1);
+ }
+ },
+ error: function (error) {
+ console.log('鑾峰彇鎸夐挳鏁版嵁澶辫触', error);
+ }
+ });
+ }
+
+ // 鍒犻櫎鎸夐挳鐨勪簨浠跺鐞嗗嚱鏁�
+ function deleteButton(event, HItemID) {
+ event.stopPropagation(); // 闃叉浜嬩欢鍐掓场锛岄伩鍏嶈Е鍙戞寜閽殑鐐瑰嚮浜嬩欢
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ url: GetWEBURL() + "/ReportPlatForm/DeleteButtonlist",
+ type: "GET",
+ data: { "HItemID": HItemID },
+ dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json script jsonp
+ success: function (data) {
+ if (data.count > 0) {
+ fetchButtonsData(); //鎵ц鏌ヨ杩囩▼
+ layer.close(index);
+ layer.msg(data.Message, { time: 1 * 2000, icon: 1 });
+ return false;
+ }
+ else {
+ layer.alert(data.Message, { time: 1 * 2000, icon: 5 });
+ return false;
+ }
+ },
+ error: function (err) {
+ layer.alert(err.Message, { time: 1 * 2000, icon: 5 });
+ return false;
+ }
+ });
+ })
+ }
+
+ //娣诲姞鎸夐挳
+ function Add_Buttton(event, obj, i) {
+ event.stopPropagation(); //闃绘鍐掓场
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2 //姝ゅ浠frame涓句緥
+ , title: '鎸夐挳缁戝畾'
+ , area: ['90%', '90%']
+ , shadeClose: false //寮�鍚伄缃╁叧闂�
+ , shade: 0.5
+ , maxmin: true
+ , content: ['鐢熶骇绠$悊/鎶ュ伐骞冲彴鍔熻兘椤�/LineBind_Button.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero, e) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var body = layer.getChildFrame('body', index); //寰楀埌iframe椤电殑body鍐呭
+
+ var HUserName = sessionStorage["HUserName"];
+ var HButtonID = body.find("#HButtonID").val();
+ var HButtonName = body.find("#HName").val();
+ var HButtonSize = body.find("#HButtonSize").val();
+ var HButtonOrder = body.find("#HButtonOrder").val();
+ $.ajax(
+ {
+ url: GetWEBURL() + "/ReportPlatForm/AddButtonlist", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ dataType: "json",
+ type: "Get",
+ async: false,
+ data: {
+ "HUserName": HUserName,
+ "HButtonID": HButtonID,
+ "HButtonName": HButtonName,
+ "HButtonSize": HButtonSize,
+ "HButtonOrder": HButtonOrder
+
+ },
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ fetchButtonsData(); //鎵ц鏌ヨ杩囩▼
+ layer.close(index);
+ layer.msg(data.Message, { time: 1 * 2000, icon: 1 });
+ return false;
+ }
+ else {
+ layer.close(index);
+ layer.alert(data.Message, { icon: 5 });
+ return false;
+
+ }
+ },
+ error: function (err) {
+ layer.alert(err.Message, { time: 1 * 2000, icon: 5 });
+ return false;
+ }
+ });
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ }
+
+ , zIndex: layer.zIndex //閲嶇偣1
+ , success: function (layero, index) {
+
+ }
+ , end: function () {
+
+ }
+ });
+
+ }
+
//閫変腑璧勬簮
function Check(obj, i) {
wktag = 0;
@@ -188,7 +395,7 @@
var LoadData1 = data.data.h_p_JIT_GetWorkBillListInfoBySource;
var LoadData2 = data.data.h_p_JIT_GetWorkBillListInfoBySource1;
var LoadData3 = data.data.h_p_JIT_GetWorkBillListInfoBySource2; //鏃堕棿鐐逛骇閲�
- var LoadData4 = data.data.h_p_JIT_GetWorkBillListInfoBySource3; //涓嶈壇鍒嗘瀽
+ var LoadData4 = data.data.h_p_JIT_GetWorkBillListInfoBySource3; //涓嶈壇鍒嗘瀽
if (LoadData1.length > 0) //宸ュ崟鍒楄〃鏁版嵁
{
@@ -206,6 +413,7 @@
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>娴佽浆鍗′富ID锛�</span><span id="lzk' + (i + 1) + '">' + LoadData1[i].HProcExchInterID + '</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>';
@@ -232,7 +440,6 @@
case "瀹屽伐":
html1 += '<h1><span>褰撳墠鐘舵�侊細</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">棰嗘枡鐘舵�侊細</span><span>' + LoadData1[i].棰嗘枡鐘舵�� + '</span></h1>';
break;
- default:
}
html1 += '<span class="prs">鐢熶骇杩涘害锛�</span>';
html1 += '<div class="layui-progress layui-progress-big" lay-showPercent="yes">';
@@ -269,6 +476,12 @@
}
else {
html1 += '<h1><span>杩涘害锛�</span><span>' + ((LoadData2[i].HRelationQty / LoadData2[i].HPlanQty) * 100).toFixed(2) + '%</span><div style="margin-left:25px;float:right"><span >鐐规瀹屾垚鎯呭喌锛�</span><span>' + LoadData2[i].褰撴棩鐐规瀹屾垚鎯呭喌 + '</span></div></h1>';
+ }
+ if (LoadData2[i].瀹夌伅鏈獙鏀舵暟閲� == 0 || LoadData2[i].瀹夌伅鏈獙鏀舵暟閲� == null) {
+ html1 += '<h1><span>寮傚父鍙嶉鏈獙鏀讹細</span><span class="gj_icon color_border4"></span><span>' + LoadData2[i].瀹夌伅鏈獙鏀舵暟閲� + '</span></h1>';
+ }
+ else {
+ html1 += '<h1><span>寮傚父鍙嶉鏈獙鏀讹細</span><span class="gj_icon color_border5"></span><span>' + LoadData2[i].瀹夌伅鏈獙鏀舵暟閲� + '</span></h1>';
}
html1 += '<h1><span>鏈崟杩愯鏃堕棿锛�</span><span>' + getSeconds(LoadData2[i].HSumTimes) + '</span></h1>';
html1 += '<h1><span>鏈祫婧愯繍琛屾椂闂达細</span><span>' + getSeconds(LoadData2[i].HSourceWorkTime) + '</span></h1>';
@@ -372,6 +585,7 @@
return false;
}
else {
+ layer.close(index);
layer.alert(data.Message, { icon: 5 });
return false;
@@ -396,7 +610,6 @@
}
});
-
}
//鍒犻櫎璧勬簮
@@ -439,6 +652,7 @@
workcode = $("#wk" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(宸ュ崟鍙�)
HBillType = $("#ty" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(鍗曟嵁绫诲瀷)
HSourceInterID = $("#sm" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(婧愬崟涓诲唴鐮�)
+ HProcExchInterID = $("#lzk" + i + "").html(); //娴佽浆鍗D
HSourceEntryID = $("#sb" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(婧愬崟瀛愬唴鍚�)
HSourceBillNo = $("#sw" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(婧愬崟鍗曞彿)
HSourceBillType = $("#st" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(婧愬崟绫诲瀷)
@@ -547,10 +761,6 @@
//闈炵┖楠岃瘉
function AllowLoadData(body) { //闈炵┖楠岃瘉
var Result = true;
- //if (body.find("#HUserName").val() == '' || body.find("#HUserName").val() == null) {
- // layer.msg("鐢ㄦ埛鍚嶄笉鑳戒负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- // return Result = false;
- //}
if (body.find("#HSourceID").val() == '' || body.find("#HSourceID").val() == null) {
layer.msg("鐢熶骇璧勬簮涓嶈兘涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
@@ -716,10 +926,31 @@
end: function () {
},
- });
-
- /* 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) {
@@ -942,6 +1173,47 @@
});
}
+
+ // 鍋滃伐鎭㈠鍗�
+ 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,
+ 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) {
@@ -955,7 +1227,7 @@
, shade: 0.6
, maxmin: false
, anim: 0
- , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes']
+ , content: ['璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes']
, resize: false
, cancel: function () {
}
@@ -974,11 +1246,34 @@
layer.open({
type: 2
, area: ['100%', '100%']
+ , title: '宸℃妫�楠屽崟-缂栬緫'
+ , shade: 0.6
+ , maxmin: false
+ , anim: 0
+ , content: ['璐ㄩ噺绠$悊/宸℃璁板綍鍗�/QC_Add_Edit_PatrolProcCheckOtherill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes']
+ , resize: false
+ , cancel: function () {
+
+ }
+ , end: function () {
+
+ }
+ })
+ }
+ //鏈
+ function ProcessCheck(event, obj) {
+ 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: ['璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes']
+ , content: ['璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes']
, resize: false
, cancel: function () {
@@ -995,6 +1290,10 @@
layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
return false;
}
+ if (WorkStaus(HSourceID1, workcode, HSourceInterID, "涓嶈壇閲囬泦")) {
+ layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻涓嶈壇閲囬泦鏉′欢!", { icon: 5 });
+ return false;
+ }
layer.open({
type: 2
, area: ['100%', '100%']
@@ -1003,6 +1302,35 @@
, maxmin: false
, anim: 0
, content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
+ , resize: false
+ , cancel: function () {
+
+ }
+ , end: function () {
+
+ }
+ })
+ }
+
+
+ //寰憰鍝佹眹鎶�
+ function SubtleFlaw() {
+ if (wktag == 0) {
+ layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+ return false;
+ }
+ if (WorkStaus(HSourceID1, workcode, HSourceInterID, "寰憰鍝佹眹鎶�")) {
+ 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 + '&HBillSubType=寰憰鍝�', 'yes']
, resize: false
, cancel: function () {
@@ -1067,6 +1395,10 @@
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', //鍔犱笂杈规
@@ -1112,7 +1444,7 @@
}
//璁惧鍚姩鐐规鎸夐挳鐐瑰嚮浜嬩欢
- function BeginDotCheck(event, obj) {
+ function BeginDotCheck(event, obj) {
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
@@ -1143,7 +1475,7 @@
}
//寮傚父鎸夐挳鐐瑰嚮浜嬩欢
- function Abnormal (event, obj) {
+ function Abnormal(event, obj) {
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
@@ -1160,7 +1492,8 @@
var data = [];
data.push({
"HICMOBillNo": HICMOBillNo,//宸ュ崟鍙�
- "HSourceName": HSBName //璁惧
+ "HSourceName": HSBName, //璁惧
+ "HSourceBillNo": HSourceBillNo //宸ュ簭娴佽浆鍗�
});
//閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
@@ -1189,7 +1522,7 @@
var data = [];
data.push({
"HMaterID": HMaterID,
- "HProcID": HProcID,
+ "HProcID": HProcID,
"SCOrder": HSourceBillNo
});
@@ -1198,6 +1531,127 @@
//璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
iframe.edit(data);
},
+ });
+ }
+
+ //妫�楠屽彇鏍锋寜閽偣鍑讳簨浠�
+ function TakeSample(event, obj) {
+ if (wktag == 0) {
+ layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+ return false;
+ }
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板寮�宸ュ崟',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '璐ㄩ噺绠$悊/妫�楠屽彇鏍疯繕鏍峰崟/QC_Add_TakeSampleCheckBill.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 TechParam(event, obj) {
+ 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,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '璁惧绠$悊/璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛�/SB_EquipICMOTechParamBillEdit.html?OperationType=4&linterid=&HEntryID=',
+ 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 SingErrMsg(event, obj) {
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板寮傚父绛惧埌澶勭悊鍗�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '鐢熶骇绠$悊/寮傚父鍙嶉鍗�/OA_ErrMsgBackSignBill_BrushCard.html?OperationType=2',
+ end: function () {
+
+ }
+ });
+ }
+
+ //寮傚父楠屾敹鐐瑰嚮浜嬩欢
+ function ErrMsgBackCheck(event, obj) {
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板寮傚父鍙嶉楠屾敹鍗�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '璐ㄩ噺绠$悊/寮傚父鍙嶉/OA_ErrMsgBackSelfQuery_BGT.html?OperationType=2',
+ end: function () {
+
+ },
+ success: function (dom, index) {
+ var data = [];
+ data.push({
+ "HSourceID": HSourceID1,
+ "HSourceName": HSourceName1
+ });
+ //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+ var iframe = window['layui-layer-iframe' + index];
+ //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+ iframe.edit(data);
+ }
});
}
@@ -1210,30 +1664,38 @@
//鍗曟嵁鐘舵�侀獙璇�
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 "鎶ユ鐢宠":
-
- break;
- default:
+ 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": sWhere },
+ data: { "sWhere": JSON.stringify(sWhere) },
dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json script jsonp
async: false,
success: function (data) {
@@ -1252,6 +1714,7 @@
});
return flag;
+
}
</script>
</head>
@@ -1321,7 +1784,7 @@
<fieldset style="border: 1px solid #eee;box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%);">
<legend style="color: #5FB878">鎿嶄綔鍙�</legend>
<div class="content4">
- <div class="layui-row layui-col-space10">
+ <!--<div class="layui-row layui-col-space10">
<div class="layui-col-sm12 layui-col-md4" onclick="OpenWork(event,this)">
<div class="cnt bottomright">
<span class="layui-icon layui-icon-play imgicon"></span>
@@ -1363,16 +1826,16 @@
<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%);display:none;">
+ <div class="layui-col-sm12 layui-col-md4" onclick="OpenProcess(event,this)">
+ <div class="cnt bottomright">
<span class="layui-icon layui-icon-search imgicon"></span>
<span class="imgtitle">宸℃</span>
</div>
</div>
- <div class="layui-col-sm12 layui-col-md4" onclick="OpenProcess(event,this)">
+ <div class="layui-col-sm12 layui-col-md4" onclick="ProcessCheck(event,this)">
<div class="cnt bottomright">
<span class="layui-icon layui-icon-search imgicon"></span>
- <span class="imgtitle">杩囩▼妫�楠�</span>
+ <span class="imgtitle">鏈</span>
</div>
</div>
</div>
@@ -1404,9 +1867,9 @@
</div>
</div>
<div class="layui-col-sm12 layui-col-md4" onclick="Abnormal(event,this)">
- <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%)">
+ <div class="cnt bottomright">
<span class="layui-icon layui-icon-unlink imgicon"></span>
- <span class="imgtitle">寮傚父</span>
+ <span class="imgtitle">寮傚父鐢宠</span>
</div>
</div>
<div class="layui-col-sm12 layui-col-md4" onclick="Esc(event,this)">
@@ -1436,13 +1899,51 @@
</div>
</div>
</div>
- <div class="layui-row layui-col-space10">
+ <div class="layui-row layui-col-space10">
<div class="layui-col-sm12 layui-col-md4" onclick="PreventErrMouldCheck(event,this)">
<div class="cnt bottomright">
<span class="layui-icon layui-icon-engine imgicon"></span>
<span class="imgtitle">闃查敊楠岃瘉</span>
</div>
- </div>
+ </div>
+ <div class="layui-col-sm12 layui-col-md4" onclick="TakeSample(event,this)">
+ <div class="cnt bottomright">
+ <span class="layui-icon layui-icon-form imgicon"></span>
+ <span class="imgtitle">妫�楠屽彇鏍�</span>
+ </div>
+ </div>
+ <div class="layui-col-sm12 layui-col-md4" onclick="TechParam(event,this)">
+ <div class="cnt bottomright">
+ <span class="layui-icon layui-icon-tabs imgicon"></span>
+ <span class="imgtitle">宸ヨ壓鍙傛暟鐐规</span>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10">
+ <div class="layui-col-sm12 layui-col-md4" onclick="SingErrMsg(event,this)">
+ <div class="cnt bottomright">
+ <span class="layui-icon layui-icon-layer imgicon"></span>
+ <span class="imgtitle">寮傚父绛惧埌澶勭悊</span>
+ </div>
+ </div>
+ <div class="layui-col-sm12 layui-col-md4" onclick="ErrMsgBackCheck(event,this)">
+ <div class="cnt bottomright">
+ <span class="layui-icon layui-icon-layer imgicon"></span>
+ <span class="imgtitle">寮傚父楠屾敹</span>
+ </div>
+ </div>
+ <div class="layui-col-sm12 layui-col-md4" onclick="SubtleFlaw(event,this)">
+ <div class="cnt bottomright">
+ <span class="layui-icon layui-icon-log imgicon"></span>
+ <span class="imgtitle">寰憰鍝佹眹鎶�</span>
+ </div>
+ </div>
+ </div>-->
+ <!--鏁版嵁鎻掑叆鍔ㄦ�佹寜閽甋QL锛岀劧鍚庢椤甸潰鍐欑偣鍑讳簨浠跺嵆鍙紝缃戦〉缁戝畾鏂版寜閽嵆鍙娇鐢�-->
+ <!--insert into Gy_BGButtons (HNumber,HName,HIcno,HOnclick,HSize,HOrder) values ('鎸夐挳浠g爜','鎸夐挳鍚嶅瓧','鎸夐挳鍥炬爣','鎸夐挳鐐瑰嚮浜嬩欢','鎸夐挳榛樿澶у皬锛岄粯璁ゆ槸涓紙澶э紝涓紝灏忥級','鎸夐挳榛樿鎺掑簭 榛樿0')-->
+
+ <div class="layui-row layui-col-space10" id="button-container">
+
</div>
</div>
</fieldset>
--
Gitblit v1.9.1