From 78fbcff2eabefedc9602424c77d96b97a5aa4cc6 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 17 十一月 2025 11:39:36 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/质量管理/车间自检单/QC_Add_Edit_WorkSelfCheckBill.html | 721 ++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 600 insertions(+), 121 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_Add_Edit_WorkSelfCheckBill.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_Add_Edit_WorkSelfCheckBill.html"
index 01f9935..3053268 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_Add_Edit_WorkSelfCheckBill.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_Add_Edit_WorkSelfCheckBill.html"
@@ -47,13 +47,19 @@
<div class="layui-card" style="padding: 2px;background-color: #efefef;">
<div class="layui-card-body" style="padding: 1px;">
<form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
- <div style="padding: 10px;">
- <button type="button" class="layui-btn layui-btn-normal" style="margin-left: 0px" lay-submit="" lay-filter="btn-AddNew" id="btn-AddNew">鏂板</button>
- <button type="button" class="layui-btn layui-btn-normal" style="margin-left: 0px" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button>
- <button type="button" class="layui-btn layui-btn-normal" style="margin-left: 0px" lay-submit="" lay-filter="btn-Exit" id="btn-Exit">閫�鍑�</button>
+ <div style="position: relative; display: flex; align-items: center; padding: 10px;">
+ <!-- 鎸夐挳缁� -->
+ <div style="z-index: 1;">
+ <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btn-AddNew" id="btn-AddNew">鏂板</button>
+ <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button>
+ <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btn-Exit" id="btn-Exit">閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="btn-SIP" id="btn-SIP">SIP鏌ョ湅</button>
+ </div>
+ <!-- 鏍囬锛屼娇鐢ㄧ粷瀵瑰畾浣嶄娇鍏跺湪鐖跺鍣ㄥ唴灞呬腑 -->
+ <h1 style="position: absolute; left: 50%; transform: translateX(-50%); z-index: 0; text-align: center; width: fit-content; margin: 0; padding: 0 10px;"><b>杞﹂棿鑷鍗�</b></h1>
</div>
<div class="layui-tab" lay-filter="tab-POStockInBill">
- <h1 style="text-align: center; padding: 10px 0;"><b>杞﹂棿鑷鍗�</b></h1>
<ul class="layui-tab-title" lay-filter="tab-all">
<li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
<li lay-id="2" style="padding:1px;">鍒跺崟淇℃伅</li>
@@ -80,10 +86,20 @@
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇璧勬簮</label>
<div class="layui-input-block" style="margin-left: 77px;">
<input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" name="HSourceID" id="HSourceID" value="0">
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchSource" id="btnSearchSource" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
- <input type="hidden" name="HSourceID" id="HSourceID" value="0">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇鐝</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HShiftsName" id="HShiftsName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" name="HShiftsID" id="HShiftsID" value="0">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHShifts" id="btnHShifts" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
</div>
</div>
</div>
@@ -92,6 +108,8 @@
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浠诲姟鍗曞彿</label>
<div class="layui-input-block" style="margin-left: 77px;">
<input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" class="layui-input" name="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" value="0">
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
@@ -100,44 +118,15 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">浠诲姟鍗曟暟閲�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly>
- </div>
- </div>
- <div class="layui-inline" style="display: none">
- <label class="layui-form-label" style="width: 85px;">浠诲姟鍗曞唴鐮�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly>
- <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" value="0">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇鐝</label>
- <div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" name="HShiftsName" id="HShiftsName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHShifts" id="btnHShifts" style="padding: 0 10px;float: right;margin-right: 3px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- <input type="hidden" name="HShiftsID" id="HShiftsID" value="0">
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div class="layui-inline" style="display: none">
- <label class="layui-form-label" style="width: 85px;">娴佽浆鍗D</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HProcExchInterID" id="HProcExchInterID" value="0" style="background-color:#efefef4d;" readonly>
- </div>
- </div>
- <div class="layui-inline" style="display: none">
- <label class="layui-form-label" style="width: 85px;">娴佽浆鍗″瓙ID</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HProcExchEntryID" id="HProcExchEntryID" value="0" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly value="0">
</div>
</div>
<div class="layui-inline" id="hidediv2">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">娴佽浆鍗″彿</label>
<div class="layui-input-block" style="margin-left: 77px;">
<input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" class="layui-input" name="HProcExchInterID" id="HProcExchInterID" value="0" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" class="layui-input" name="HProcExchEntryID" id="HProcExchEntryID" value="0" style="background-color:#efefef4d;" readonly>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProcExch" id="btnSearchProcExch" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
@@ -146,26 +135,23 @@
<div class="layui-inline" id="hidediv1">
<label class="layui-form-label" style="width: 85px;">娴佽浆鍗℃暟閲�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HProcExchQty" id="HProcExchQty" style="background-color:#efefef4d;" readonly value="1">
- </div>
- </div>
- <div class="layui-inline" id="hidediv1">
- <label class="layui-form-label" style="width: 85px;">宸ュ簭</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;" readonly value="1">
+ <input type="text" class="layui-input" name="HProcExchQty" id="HProcExchQty" style="background-color:#efefef4d;" readonly value="0">
</div>
</div>
</div>
<div class="layui-row">
+
+ </div>
+ <div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浜у搧鍚嶇О</label>
<div class="layui-input-block" style="margin-left: 77px;">
<input type="text" class="layui-input" name="HMaterName" id="HMaterName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
<input type="text" class="layui-input" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: none;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
+ </button>-->
</div>
</div>
<div class="layui-inline">
@@ -190,29 +176,36 @@
</div>
</div>
<div class="layui-row">
- </div>
- <div class="layui-row">
- <div class="layui-inline" style="width: 58%">
- <label class="layui-form-label" style="width: 85px;">寮傚父涓存椂<br />澶勭悊鏂规</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HErrTreatment" id="HErrTreatment" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="margin-top:10px;">
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div class="layui-inline" style="width: 58%;">
- <label class="layui-form-label" style="width: 85px;">澶囨敞</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value">
- </div>
- </div>
- </div>
- <div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label">鍒ゆ柇缁撹</label>
<div class="layui-input-block">
<input type="radio" name="HLastResult" id="HLastResult" value="true" title="鍚堟牸" checked>
<input type="radio" name="HLastResult" id="HLastResult" value="false" title="涓嶅悎鏍�">
+ </div>
+ </div>
+ <div class="layui-inline" id="hidediv1">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ュ簭</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" name="HProcID" id="HProcID" value="0">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProc" id="btnHProc" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </div>
+ </div>
+
+ </div>
+ <div class="layui-row">
+ <div class="layui-inline" style="width: 45%;">
+ <label class="layui-form-label" style="width: 85px;">澶囨敞</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value">
+ </div>
+ </div>
+ <div class="layui-inline" style="width: 45%">
+ <label class="layui-form-label" style="width: 85px;">寮傚父涓存椂<br />澶勭悊鏂规</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HErrTreatment" id="HErrTreatment" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style="margin-top:10px;">
</div>
</div>
</div>
@@ -382,14 +375,14 @@
</div>
</div>
<!--<div class="layui-inline">
- <label class="layui-form-label">妫�楠岀粨鏋�</label>
- <div class="layui-input-block">
- <select name="HResult" lay-filter="HResult" style="width:190px;">
- <option value="鍚堟牸" selected="selected">鍚堟牸</option>
- <option value="涓嶅悎鏍�">涓嶅悎鏍�</option>
- </select>
- </div>
- </div>-->
+ <label class="layui-form-label">妫�楠岀粨鏋�</label>
+ <div class="layui-input-block">
+ <select name="HResult" lay-filter="HResult" style="width:190px;">
+ <option value="鍚堟牸" selected="selected">鍚堟牸</option>
+ <option value="涓嶅悎鏍�">涓嶅悎鏍�</option>
+ </select>
+ </div>
+ </div>-->
</div>
<div class="layui-row" style="margin-top:5px;">
<div class="layui-inline">
@@ -405,11 +398,11 @@
</div>
</div>
<!--<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">閲嶇偣妫�鏌�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="checkbox" name="HKeyInspect" id="HKeyInspect" value="false" lay-skin="primary" lay-filter="HKeyInspect">
- </div>
- </div>-->
+ <label class="layui-form-label" style="width: 85px;">閲嶇偣妫�鏌�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="checkbox" name="HKeyInspect" id="HKeyInspect" value="false" lay-skin="primary" lay-filter="HKeyInspect">
+ </div>
+ </div>-->
</div>
<div class="layui-row" style="margin-top:5px;">
<div class="layui-inline">
@@ -483,11 +476,11 @@
</div>
</div>
<!--<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">閲嶇偣妫�鏌�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="checkbox" name="HKeyInspect" id="HKeyInspect2" value="false" lay-skin="primary" lay-filter="HKeyInspect">
- </div>
- </div>-->
+ <label class="layui-form-label" style="width: 85px;">閲嶇偣妫�鏌�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="checkbox" name="HKeyInspect" id="HKeyInspect2" value="false" lay-skin="primary" lay-filter="HKeyInspect">
+ </div>
+ </div>-->
</div>
<div class="layui-row" style="margin-top:5px;">
<div class="layui-inline" style="border-bottom:2px solid #9C9C9C;width:290px;margin-left:10px">
@@ -498,14 +491,14 @@
</div>
<div class="layui-row" style="margin-top:5px;">
<!--<div class="layui-inline">
- <label class="layui-form-label" style="width: 70px !important;">鍒嗘瀽鏂规硶</label>
- <div class="layui-input-block" style="margin-left: 100px; width: 182px">
- <select name="HAnalysisMethod" lay-filter="HAnalysisMethod">
- <option value="鍚堟牸" selected="selected">鍚堟牸</option>
- <option value="涓嶅悎鏍�">涓嶅悎鏍�</option>
- </select>
- </div>
- </div>-->
+ <label class="layui-form-label" style="width: 70px !important;">鍒嗘瀽鏂规硶</label>
+ <div class="layui-input-block" style="margin-left: 100px; width: 182px">
+ <select name="HAnalysisMethod" lay-filter="HAnalysisMethod">
+ <option value="鍚堟牸" selected="selected">鍚堟牸</option>
+ <option value="涓嶅悎鏍�">涓嶅悎鏍�</option>
+ </select>
+ </div>
+ </div>-->
<div class="layui-inline">
<label class="layui-form-label" style="width: 70px !important;">鐘舵��</label>
<div class="layui-input-block" style="margin-left: 100px; width: 182px">
@@ -604,6 +597,7 @@
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
<!--闅愯棌瀛楁-->
@@ -654,7 +648,7 @@
//1.妫�楠岄」鐩〃浣撴暟鎹�煎瓨鍌紝鍊熺敤鐐瑰嚮琛屼簨浠讹紝褰撳垏鎹㈣鏃舵妸涓婃鎵�鍦ㄨ鐨勬暟鎹瓨鍒皁ption.data涓婏紱
//杩欎釜鎬濊矾浼氭湁涓棶棰橈紝鏈�鍚庝竴娆$偣鍑荤殑閭h鏁版嵁灏嗕笉浼氬湪鍘昏Е鍙戠偣鍑昏浜嬩欢瀛樺偍鍊硷紝鐩墠鎯冲埌鐨勬槸鍦ㄦ墽琛屼繚瀛樻柟娉曟椂鍦ㄦ妸鏈�鍚庣偣鍑荤殑閭d竴琛屾暟鎹瓨鍏ption.data涓�
-
+ var OptionData = [];
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
@@ -670,6 +664,8 @@
//鍏敤鍙橀噺
var rowdata = [];
var option = [];
+ var HDeptID = "";//閮ㄩ棬id 鑾峰彇鐝
+ var HCenterID = "";//宸ヤ綔涓績id 鑾峰彇鐝
var rowdata_Value = [];
var option_Value = [];
@@ -684,6 +680,7 @@
var UnRightQty_isFied = 0; //鐢ㄤ簬鍒ゆ柇鏄惁鍚堟牸//妫�楠屽�艰〃鏍间笉鍚堟牸鏁伴噺姹囨��
var editIndex = 0;//缂栬緫涓嬫爣
var SampleNum = [];//鏍锋湰鏁伴噺
+ var HModName = "QC_Add_Edit_WorkSelfCheckBill";
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
var HModuleType = "7518";
@@ -700,6 +697,7 @@
var linterid = params[params[1]];//婧愬崟id
var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
var HICMOEntryID = params[params[3]];//婧愬崟瀛恑d
+ var HEntryID = params[params[4]];//婧愬崟瀛恑d
}
/*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/
//////娴嬭瘯鐢ㄦ暟鎹�
@@ -707,6 +705,10 @@
//var linterid = 11880;
//var HSouceBillType = 3722;
//var HICMOEntryID = 100027;
+
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+
//#region 鍒ゆ柇鏄惁鏂板
if (OperationType == 1) {
$("#HInterID").val("");
@@ -714,6 +716,8 @@
$("#HFirstCheckEmp").val(sessionStorage["HCheckEmpID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭妫�楠屽憳ID
$("#HFirstCheckEmpName").val(sessionStorage["HCheckEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭妫�楠屽憳
+ HDeptID = sessionStorage["HDeptID"]; //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭閮ㄩ棬ID
+ HCenterID = sessionStorage["HWorkCenterID"]; //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭宸ヤ綔涓績ID
//鑾峰彇鏈�澶у崟鎹彿
$.ajax({
@@ -728,18 +732,22 @@
$("#HMaker").val(sessionStorage["HUserName"]);
}
});
+ //鑾峰彇鐝
+ get_HWorkShift();
}
else if (OperationType == 2) {
$("#HInterID").val("");
$("#HBillNo").val("");
$('#btn-AddNew').addClass("layui-btn-disabled").attr("disabled", true);//鏈夋簮鍗曟椂鏂板鎸夐挳绂佺敤
- $('#btnSearchSource').addClass("layui-btn-disabled").attr("disabled", true);//鏈夋簮鍗曟椂鐢熶骇璧勬簮鎸夐挳绂佺敤
$('#btnSearchICMOBill').addClass("layui-btn-disabled").attr("disabled", true);//鏈夋簮鍗曟椂浠诲姟鍗曞彿鎸夐挳绂佺敤
$('#btnSearchMater').addClass("layui-btn-disabled").attr("disabled", true);//鏈夋簮鍗曟椂浜у搧鍐呯爜鎸夐挳绂佺敤
$('#btnSearchProcExch').addClass("layui-btn-disabled").attr("disabled", true);//鏈夋簮鍗曟椂娴佽浆鍗″彿鎸夐挳绂佺敤
$("#HFirstCheckEmp").val(sessionStorage["HEmpID"]);
$("#HFirstCheckEmpName").val(sessionStorage["HEmpName"]);
+ HDeptID = sessionStorage["HDeptID"]; //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭閮ㄩ棬ID
+ HCenterID = sessionStorage["HWorkCenterID"]; //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭宸ヤ綔涓績ID
+
//鑾峰彇鏈�澶у崟鎹彿
$.ajax({
url: GetWEBURL() + "/Web/GetMAXNum",
@@ -757,30 +765,42 @@
if (HSouceBillType == 3722 || HSouceBillType == 4610) {
//鏍规嵁婧愬崟id鑾峰彇婧愬崟淇℃伅
LoadingInformation2();
+ //鑷姩甯﹀嚭妫�楠屾柟妗�
+ GetCheckItemID();
}
//宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
else if (HSouceBillType == 3790) {
//鏍规嵁婧愬崟id鑾峰彇婧愬崟淇℃伅
LoadingInformation_StationInBill();
+ //鑷姩甯﹀嚭妫�楠屾柟妗�
+ GetCheckItemID();
}
//宸ュ簭濮斿鎺ユ敹鍗曞垪琛ㄩ妫�
else if (HSouceBillType == 3793) {
//鏍规嵁婧愬崟id鑾峰彇婧愬崟淇℃伅
LoadingInformation3();
+ //鑷姩甯﹀嚭妫�楠屾柟妗�
+ GetCheckItemID();
}
//鐢熶骇璁㈠崟鍒楄〃棣栨
else if (HSouceBillType == 3710) {
//鏍规嵁婧愬崟id鑾峰彇婧愬崟淇℃伅
LoadingInformation_ICMO();
+ //鑷姩甯﹀嚭妫�楠屾柟妗�
+ GetCheckItemID();
}
//宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
else if (HSouceBillType == 3772) {
//鏍规嵁婧愬崟id鑾峰彇婧愬崟淇℃伅
LoadingInformation_ProcExchange();
+ //鑷姩甯﹀嚭妫�楠屾柟妗�
+ GetCheckItemID();
}
else {
layer.alert("婧愬崟绫诲瀷鏃犳晥锛�", { icon: 5 });
}
+ //鑾峰彇鐝
+ get_HWorkShift();
}
else if (OperationType == 3) {
RoadBillMain(linterid);
@@ -798,6 +818,7 @@
$.ajax({
url: GetWEBURL() + '/QC_WorkSelfCheckBill/get_StationInBill',
type: "GET",
+ async: false,
data: { "HInterID": linterid, "user": sessionStorage["HUserName"] },
success: function (result) {
var data = result.data[0];
@@ -839,7 +860,8 @@
$.ajax({
url: GetWEBURL() + '/QC_WorkSelfCheckBill/get_ProcessExchangeBill',
type: "GET",
- data: { "HInterID": linterid, "user": sessionStorage["HUserName"] },
+ async: false,
+ data: { "HInterID": linterid, "HEntryID": HEntryID, "user": sessionStorage["HUserName"] },
success: function (result) {
var data = result.data[0];
if (result.count == 1) {
@@ -860,7 +882,10 @@
$("#HICMOEntryID").val(data.HICMOEntryID == null ? 0 : data.HICMOEntryID);//
$("#HQCSchemeName").val(data.妫�楠屾柟妗堝悕绉�);
$("#HQCSchemeID").val(data.妫�楠屾柟妗圛D);
+ $("#HProcID").val(data.HProcID);//
$("#HProcName").val(data.褰撳墠宸ュ簭);//
+ HDeptID = data.HWorkShopID == null ? sessionStorage["HDeptID"] : data.HWorkShopID;//宸ヤ綔涓績id
+ HCenterID = data.HCenterID == null ? sessionStorage["HWorkCenterID"] : data.HCenterID;//宸ヤ綔涓績id
//鑾峰彇琛ㄤ綋妫�楠岄」鐩俊鎭�
get_CheckItem();
} else {
@@ -883,6 +908,7 @@
$.ajax({
url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
type: "GET",
+ async: false,
data: { "sWhere": "and hmainid = " + linterid, "user": sessionStorage["HUserName"] },
success: function (result) {
var data = result.data[0];
@@ -915,6 +941,7 @@
$.ajax({
url: GetWEBURL() + "/QC_WorkSelfCheckBill/get_ICMOBillStatus_Tmp",
type: "GET",
+ async: false,
data: { "HInterID": linterid, "HEntryID": HICMOEntryID, "HBillType": HSouceBillType },
success: function (result) {
var data = result.data[0];
@@ -956,6 +983,7 @@
$.ajax({
url: GetWEBURL() + '/Cj_StationEntrustOutBill/list',
type: "GET",
+ async: false,
data: { "sWhere": "and HInterID = " + linterid },
success: function (result) {
var data = result.data[0];
@@ -1032,9 +1060,83 @@
form.render('select');
}
break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
//#endregion
+
+ //琛ㄥご淇℃伅宸ュ簭
+ form.on('submit(btnHProc)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '宸ュ簭鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ console.log("1");
+ $("#HProcName").val(checkStatus.data[0].宸ュ簭鍚嶇О);
+ $("#HProcID").val(checkStatus.data[0].HItemID);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ get_ICMOBillStatusList();
+ GetCheckItemID();
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ });
+
+ //SIP鏌ョ湅鎸夐挳
+ form.on('submit(btn-SIP)', function () {
+ var HProcID = $("#HProcID").val();
+ var HMaterID = $("#HMaterID").val();
+ if (HProcID == 0 && HMaterID == 0) {
+ layer.alert("鐗╂枡鍚嶇О涓庡伐搴忎笉鑳戒负绌�", { icon: 5 });
+ }
+ else {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鏌ョ湅浣滀笟鎸囧涔�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../../鐢熶骇绠$悊/浣滀笟鎸囧涔�/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=&HSourceEntryID=&HProcID=' + HProcID + '&HType=SIP'
+ , resize: false,
+ end: function () {
+ }
+ , cancel: function () {
+ }
+ })
+ }
+
+ });
+
+
//閫�鍑烘寜閽�
form.on('submit(btn-Exit)', function (data) {
@@ -1185,7 +1287,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_CheckItem.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_CheckItem.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -1195,17 +1297,57 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- var HResult = checkStatus.data[0].榛樿缁撹 == "鍚堟牸" ? 1 : 2
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- 妫�楠岄」鐩�: checkStatus.data[0].鍚嶇О
- , HQCCheckItemID: checkStatus.data[0].HItemID
- , HResult: HResult
- });
- $('#HResult' + rowIndex + '').find("option[value='" + HResult + "']").attr("selected", true);
- form.render('select');
- layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ if (checkStatus.data.length === 1) {
+ var HResult = checkStatus.data[0].榛樿缁撹 == "鍚堟牸" ? 1 : 2
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ 妫�楠岄」鐩�: checkStatus.data[0].鍚嶇О
+ , 妫�楠岄」鐩唬鐮�: checkStatus.data[0].浠g爜
+ , HQCCheckItemID: checkStatus.data[0].HItemID
+ , HResult: HResult
+ });
+ $('#HResult' + rowIndex + '').find("option[value='" + HResult + "']").attr("selected", true);
+ form.render('select');
+ layer.close(layer.index);
+ }
+ else {
+ //(澶氶�夎)
+ //灏嗗師鏈夎〃浣撴暟鎹啓鍏ユ暟缁�
+ var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < tableBak.length; i++) {
+ if (tableBak[i]["HQCCheckItemID"] != 0 && tableBak[i]["妫�楠岄」鐩�"] != "" && tableBak[i]["HResult"] != undefined && tableBak[i]["HResult"] != null) {
+ buttonArr.push(tableBak[i]); //濡傛灉鍏抽敭瀛楁涓嶄负绌猴紝鍒欏皢涔嬪墠鐨勬暟鎹瓨鍌�
+ }
+ }
+ //灏嗘壒閲忛�夋嫨鐨勬暟鎹啓鍏ユ暟缁勶紙澶氶�夎锛�
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ buttonArr.push({
+ "妫�楠岄」鐩�": checkStatus.data[i].鍚嶇О, "妫�楠岄」鐩唬鐮�": checkStatus.data[i].浠g爜, "HQCCheckItemID": checkStatus.data[i].HItemID, "HResult": 1,
+ "HInspectInstruMentID": "0", "妫�楠屼华鍣ㄤ唬鐮�": "", "妫�楠屼华鍣�": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "",
+ "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0,
+ "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0',
+ "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "",
+ "HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": ""
+ });
+ }
+
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HResult' + i + '').find("option[value='" + option.data[i - 1].HResult + "']").attr("selected", true);
+ $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
+ //瀹屾垚鏍囪
+ if (option.data[i - 1].HKeyInspect) {
+ $('#HKeyInspect' + i + '').attr("checked", true);
+ }
+ }
+ form.render('select');
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
}
+
, btn2: function (index, layero) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
@@ -1225,7 +1367,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectInstruMent.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectInstruMent.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -1238,7 +1380,8 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- 妫�楠屼华鍣�: checkStatus.data[0].妫�楠屼华鍣ㄥ悕绉�
+ 妫�楠屼华鍣ㄤ唬鐮�: checkStatus.data[0].妫�楠屼华鍣ㄤ唬鐮�
+ , 妫�楠屼华鍣�: checkStatus.data[0].妫�楠屼华鍣ㄥ悕绉�
, HInspectInstruMentID: checkStatus.data[0].HItemID
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -1248,7 +1391,16 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ 妫�楠屼华鍣ㄤ唬鐮�: OptionData[0].妫�楠屼华鍣ㄤ唬鐮�,
+ 妫�楠屼华鍣�: OptionData[0].妫�楠屼华鍣ㄥ悕绉�,
+ HInspectInstruMentID: OptionData[0].HItemID
+ });
+ OptionData = [];
+ }
}
});
}
@@ -1275,7 +1427,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectValue.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectValue.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -1362,10 +1514,53 @@
}
});
+ table.on('edit(mainTable)', function (obj) {
+ // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+ var oldText = $(this).prev().text();
+ var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+ , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+ , field = obj.field; //寰楀埌瀛楁
+ var HInspectVal = $("#HInspectVal").val(); //妫�楠屽��
+ //var HTargetVal = $("#HTargetVal").val(); //鐩爣鍊�
+ //var HComparator = $("#HComparator").val(); //姣旇緝绗�
+ var HEntryID = $("#HEntryID").val() - 1;
+ var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //鍒嗘瀽鏂规硶
+ var HUpLimit = table.cache["mainTable"][HEntryID].HUpLimit; //涓婇檺鍊�
+ var HDownLimit = table.cache["mainTable"][HEntryID].HDownLimit; //涓嬮檺鍊�
+ switch (field) {
+ case "HInspectVal": //妫�楠屽��
+ value = isNaN(value) ? 0 : value;
+
+ if (HAnalysisMethod == "2") {
+ if (value <= HUpLimit && value >= HDownLimit) {
+ obj.update({
+ "HResult": "1"
+ });
+
+ $('#HResult' + (HEntryID + 1)).find("option[value='1']").attr("selected", true);
+
+ } else {
+ obj.update({
+ "HResult": "2"
+ });
+
+ $('#HResult' + (HEntryID + 1)).find("option[value='2']").attr("selected", true);
+ }
+ form.render('select');
+ }
+ break;
+ }
+ });
+
//淇濆瓨鎸夐挳
form.on('submit(btnSave)', function (data) {
set_SaveBill(data);
});
+ //#region 瀹℃牳鎸夐挳
+ form.on('submit(set_CheckBill)', function (data) {
+ set_CheckBill(0);
+ });
+ //#endregion
//淇濆瓨
function set_SaveBill(data) {
@@ -1448,7 +1643,7 @@
var ajaxLoad = layer.load();
var sWhere = " and hmainid=" + linterid;
$.ajax({
- url: GetWEBURL() + "/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillList",
+ url: GetWEBURL() + "/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillEdit",
type: "GET",
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (result) {
@@ -1504,6 +1699,8 @@
, "HShiftsID": data.HShiftsID
, "HShiftsName": data.鐝鍚嶇О
, "HErrTreatment": data.寮傚父涓存椂澶勭悊鏂规
+ , "HProcID": data.HProcID
+ , "HProcName": data.HProcName
});
$("input[name=HLastResult][value=true]").prop("checked", data.鍒ゅ畾缁撹 === "鍚堟牸");
$("input[name=HLastResult][value=false]").prop("checked", data.鍒ゅ畾缁撹 === "涓嶅悎鏍�");
@@ -2019,7 +2216,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html?Htype=&openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -2031,6 +2228,8 @@
}
$("#HSourceName").val(checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О);
$("#HSourceID").val(checkStatus.data[0].HItemID);
+ get_ICMOBillStatusList();
+ GetCheckItemID();
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -2057,7 +2256,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_ShiftsList.html?type=HShifts', 'yes'],
+ content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_WorkShiftList.html?type=HWorkShifts', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -2068,7 +2267,7 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
$("#HShiftsName").val(checkStatus.data[0].鐝鍚嶇О);
- $("#HShiftsID").val(checkStatus.data[0].HItemID);
+ $("#HShiftsID").val(checkStatus.data[0].HInterID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -2095,7 +2294,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -2109,6 +2308,7 @@
$("#HMaterNumber").val(checkStatus.data[0].鐗╂枡浠g爜);
$("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);
$("#HMaterID").val(checkStatus.data[0].HItemID);
+ GetCheckItemID();
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -2126,6 +2326,8 @@
//琛ㄥご淇℃伅妫�楠屾柟妗堝脊绐�
form.on('submit(btnSearchQCScheme)', function () {
+ var HName = $("#HMaterName").val();
+ var HProcName = $("#HProcName").val();
//椤甸潰灞�-鑷畾涔�
layer.open({
type: 2,
@@ -2135,7 +2337,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../璐ㄩ噺绠$悊/妫�楠屾柟妗堝崟/QC_CheckProjectList.html', 'yes'],
+ content: ['../../璐ㄩ噺绠$悊/妫�楠屾柟妗堝崟/QC_CheckProjectList.html?OperationType=1&HName=' + HName + '&HProcName=' + HProcName + '', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -2167,13 +2369,12 @@
//閫�鍑�
form.on('submit(Cancel)', function () {
- //sessionStorage["SourceFlag"] = false;
parent.location.href = "../../../views/index.html"
- //window.close();//鍏抽棴褰撳墠椤�
})
//鍒濆鍖栬〃鏍�
function set_InitGrid() {
+ $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//鍒濆鍖栫鐢ㄥ鏍告寜閽�
$("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
$("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
//鍒濆琛ㄦ牸鏁版嵁
@@ -2343,10 +2544,10 @@
}
if (HQty > 0) {
document.querySelectorAll("[name='HLastResult']")[0].removeAttribute('checked'); //鍒犻櫎閫夋嫨灞炴��
- $("input:radio[name=HLastResult][value=" + false + "]").attr("checked", "true"); //娣诲姞閫夋嫨灞炴��
+ $("input:radio[name=HLastResult][value=" + false + "]").prop("checked", "true"); //娣诲姞閫夋嫨灞炴��
} else {
document.querySelectorAll("[name='HLastResult']")[1].removeAttribute('checked'); //鍒犻櫎閫夋嫨灞炴��
- $("input:radio[name=HLastResult][value=" + true + "]").attr("checked", "true"); //娣诲姞閫夋嫨灞炴��
+ $("input:radio[name=HLastResult][value=" + true + "]").prop("checked", "true"); //娣诲姞閫夋嫨灞炴��
}
form.render('radio');
}
@@ -3535,6 +3736,45 @@
}
//#endregion
+ //鏍规嵁鐢熶骇璧勬簮鎴栬�� 宸ュ簭 鏌ヨ鐢熶骇宸ュ崟淇℃伅
+ function get_ICMOBillStatusList() {
+ var sWhere = "";
+ var HProcID = $("#HProcID").val();
+ var HSourceID = $("#HSourceID").val();
+ var HProcExchInterID = $("#HProcExchInterID").val();
+
+ if (HProcID != "0") {
+ sWhere += " and HProcID=" + HProcID;
+ }
+ if (HSourceID != "0") {
+ sWhere += " and HSourceID=" + HSourceID
+ }
+
+ sWhere += " and HSourceInterID=" + HProcExchInterID;
+
+ $.ajax({
+ url: GetWEBURL() + "/CheckBill/GetICMOBillStatusList",
+ type: "GET",
+ async: false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ $("#HProcID").val(result.data[0]["HProcID"]);
+ $("#HProcName").val(result.data[0]["宸ュ簭"]);
+ $("#HSourceID").val(result.data[0]["HSourceID"]);
+ $("#HSourceName").val(result.data[0]["鐢熶骇璧勬簮"]);
+
+ } else {
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ })
+ }
+
+
//#region 銆愰殣钘忔娴嬪�煎瓧娈点��
function IsHide(HAnalysisMethod_Value) {
if (HAnalysisMethod_Value == 1) { //濡傛灉閫変腑銆愬畾鎬у垎鏋愩�戯紝鍒欓殣钘忓畾閲忋�佸叾浠栧垎鏋�
@@ -3644,9 +3884,233 @@
}
//#endregion
+ //鑷姩甯﹀嚭妫�楠屾柟妗�
+ function GetCheckItemID() {
+ var HName = $("#HMaterName").val();
+ var HProName = $("#HProcName").val();
+ var HSourceID = $("#HSourceID").val();
+ if (HName != '' && HName != undefined && HProName != '' && HProName != undefined) {
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetCheckItemID",
+ type: "GET",
+ async: false,
+ data: { "HName": HName, "HProName": HProName, "HSourceID": HSourceID},
+ success: function (result) {
+ if (result.code == 1) {
+ $("#HQCSchemeID").val(result.data[0].hmainid);
+ $("#HQCSchemeName").val(result.data[0].妫�楠屾柟妗堝悕绉�);
+ get_CheckItem();
+ } else {
+ layer.msg(result.code + result.Message, { icon: 5 });
+ }
+ }
+ })
+ }
+ }
+
+ //琛ㄥご 鑾峰彇妫�楠屾柟妗�
+ function get_CheckItem()//鍔犺浇琛ㄥご
+ {
+ $.ajax({
+ url: GetWEBURL() + "/Gy_BaseInformation/Gy_EnvironmentTestSchemeBillMainEditList",
+ type: "GET",
+ async: false,
+ data: { "linterid": $("#HEnvironmentTestSchemeID").val() == "" ? 0 : $("#HEnvironmentTestSchemeID").val(), "user": sessionStorage["HUserName"] },
+ success: function (d) {
+ //瀛愯〃 璧嬪��
+ var rowdata = [];
+ for (var i = 0; i < d.data.length; i++) {
+ rowdata.push(
+ {
+ "HEnvironmentItemID": d.data[i].HEnvironmentItemID, "HEnvironmentItemName": d.data[i].妫�娴嬮」鐩�,
+ "HMeasure": "0", "HTargetVal": d.data[i].鐩爣鍊�, "HUpLimit": d.data[i].涓婇檺鍊�, "HDownLimit": d.data[i].涓嬮檺鍊�
+ }
+ )
+ }
+ option.data = rowdata;
+ table.render(option);
+ }
+ })
+ }
+
+
+
+ //鑾峰彇鐝
+ function get_HWorkShift() {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_ShiftsController/Get_HWorkShift", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: {
+ "HDeptID": HDeptID,
+ "HCenterID": HCenterID
+ },
+ success: function (data) {
+ if (data.count == 1)// 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ {
+ var LoadData = data.data;
+ $("#HShiftsID").val(LoadData[0].HInterID); //褰撳墠宸ュ簭ID
+ $("#HShiftsName").val(LoadData[0].鐝); //褰撳墠宸ュ簭
+ }
+ else {
+ layer.alert(data.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ layer.alert(err, { icon: 5 });
+ }
+ });
+ }
+
+
+ //#region 瀛愯〃1锛氶殣钘忓垪璁剧疆
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [contentUrl, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //#endregion
+ //#region 瀛愯〃1锛氭樉绀哄垪鏁版嵁
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ async: false,
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ async: false,
+ success: function (data1) {
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = ["HQCCheckItemID", "HInspectInstruMentID"];
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ if (dataCol.length <= i) {
+ break;
+ }
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] += "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
+
//浠ヤ笂涓簂ayui妯″潡
});
-
+
+ //#region 瀹℃牳鏁版嵁
+ function set_CheckBill() {
+ var InterID = $("#HInterID").val();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/QC_WorkSelfCheckBill/AuditQC_WorkSelfCheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "Type": 1, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ });
+ $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);// 绂佺敤瀹℃牳鎸夐挳
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
function GetGySource(obj) { //鐢熶骇璧勬簮
$("#HSourceName").val(obj[0].鐢熶骇璧勬簮鍚嶇О);
$("#HSourceID").val(obj[0].HItemID);
@@ -3669,6 +4133,7 @@
$("#HMaterNumber").val(obj.鐗╂枡浠g爜);
$("#HMaterName").val(obj.鐗╂枡鍚嶇О);
$("#HMaterID").val(obj.HItemID);
+ GetCheckItemID();
}
function GetHEmpValue(obj) { //璐ㄦ鍛�
@@ -3681,9 +4146,23 @@
$("#HQCSchemeName").val(obj[0].妫�楠屾柟妗堝悕绉�);
get_CheckItem();
}
- function GetHShiftsValue(obj) { //鐢熶骇鐝
+ //鐝
+ function GetHWorkShiftsValue(obj) {
$("#HShiftsName").val(obj[0].鐝鍚嶇О);
- $("#HShiftsID").val(obj[0].HItemID);
+ $("#HShiftsID").val(obj[0].HInterID);
+ }
+ //宸ュ簭
+ function GetProcessValue(obj) {
+ $("#HProcName").val(obj[0].宸ュ簭鍚嶇О);
+ $("#HProcID").val(obj[0].HItemID);
+ }
+ //妫�楠岄」鐩�
+ function GetCheckItemValue(obj) {
+ OptionData = obj;
+ }
+ //妫�楠屼华鍣�
+ function GetInspectInstruMentValue(obj) {
+ OptionData = obj;
}
</script>
</body>
--
Gitblit v1.9.1