From df3e719955cc93b4e762ac75fbb61737fbf3b7a8 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 16 六月 2025 08:38:12 +0800
Subject: [PATCH] 1
---
WebTM/views/质量管理/检验方案单/QC_Add_CheckProject.html | 545 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 500 insertions(+), 45 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html"
index ef3014e..f0ba129 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html"
@@ -8,6 +8,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
<style type="text/css">
.layui-form-label {
width: 85px;
@@ -34,12 +41,17 @@
<div class="layui-card-header">
<div class="layui-btn-group">
<button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
+ <button type="button" id="add-btn1" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Audit">瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
</div>
</div>
<div class="layui-card-body">
- <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
<h1 style="text-align:center;"><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>
+ </ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="layui-form-item">
@@ -60,6 +72,16 @@
<label class="layui-form-label">鏂规鍚嶇О<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HName" id="HName" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐢熶骇璧勬簮</label>
+ <div class="layui-input-inline">
+ <input type="text" name="HSourceName" id="HSourceName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="hidden" name="HSourceID" id="HSourceID" class="layui-input" value="0" style="float:left;width:150px;">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HSourceList" id="HSourceList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
</div>
</div>
</div>
@@ -154,9 +176,93 @@
<input type="checkbox" name="HStandard" id="HStandard" lay-skin="primary" title="" checked="">
</div>
</div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px; ">缁勭粐<label style="color:red"> * </label></label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 501px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
</div>
</div>
- </div>
+ <!--鍏朵粬淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-form-item">
+ <div class="layui-row">
+ <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+ </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="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+ </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="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+
+ </div>
+ <div class="layui-row">
+ <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="HMakerDate" id="HMakerDate" style="background-color:#efefef4d;" readonly>
+ </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="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+ </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="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+ </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="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+
+ </div>
+ <div class="layui-row">
+ <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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+ </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="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
<div class="layui-tab-content">
@@ -168,6 +274,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>
<script type="text/html" id="xuhao">
@@ -199,7 +306,7 @@
<option value="2">閲嶇己闄�</option>
<option value="3">杞荤己闄�</option>
</select>
- </script>
+ </script>
<!--琛屼笅鎷夐�夋嫨(鐘舵��)-->
<script type="text/html" id="HStatus">
<select name="HStatus" lay-filter="HStatus" id="HStatus{{d.LAY_TABLE_INDEX+1}}">
@@ -217,11 +324,6 @@
<input type="checkbox" value="{{d.HDestructInspect}}" lay-skin="primary" id="HDestructInspect{{d.LAY_TABLE_INDEX+1}}" lay-filter="HDestructInspect" {{ d.HDestructInspect == 1 ? 'checked' : '' }}>
</script>
- <script src="../../../layuiadmin/layui/layui.js"></script>
- <script src="../../../layuiadmin/Scripts/json2.js"></script>
- <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
- <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
- <script src="../../../layuiadmin/PubCustom.js"></script>
<script>
//鑾峰彇椤甸潰璺宠浆鍙傛暟
var params = get_UrlVars();
@@ -249,6 +351,9 @@
, element = layui.element;
var option;
var sBillType = "3320";
+ //璁板綍缁勭粐鐨勫��
+ var HOrgIDBar = 0;
+ var HModName = "QC_Add_CheckProject";
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -259,12 +364,56 @@
if (OperationType == 1) {//鏃犳簮鍗�
set_AddFNew();
}
+ else if (OperationType == 2) {//澶嶅埗
+ set_EditFromGrid();
+ //鑾峰彇鏈�澶у崟鎹彿
+ get_MAXNum();
+ //绂佺敤缁勭粐閫夐」
+ $('#HOrgID').attr("disabled", true);
+
+ }
else if (OperationType == 3) {//缂栬緫
set_EditFromGrid();
}
else {
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
+ }
+ //#endregion
+
+ //#region 鍒濆鍖栫粍缁�
+ Organ();
+ //#endregion
+
+
+ //#region 鍒濆鍖栬〃鏍�
+ DisPlay_HideColumn();
+ //#endregion
+
+
+ //#region 鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ var Organization = '';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HOrgID").append(Organization);
+ if (OperationType == 1) {
+ HOrgIDBar = sessionStorage["OrganizationID"];
+ }
+ $("#HOrgID").val(HOrgIDBar);
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
}
//#endregion
@@ -284,6 +433,7 @@
, "HDownOffSetQ": 0, "HTargetValB": 0, "HUpLimitB": 0, "HDownLimitB": 0, "HUpOffSetB": 0, "HDownOffSetB": 0
, "HTargetValTxt": "", "HUpLimitTxt": "", "HDownLimitTxt": "", "HUpOffSetTxt": "", "HDownOffSetTxt": ""
, "HQualityStdName": "", "HInspectMethodName": "", "HInspectInstruMentName": "", "HInspectBasisName": "", "HSampleSchemeName": ""
+ , "HControlUpperLimit": 0, "HControlLowerLimit": 0, "HSampleCount": 0, "HSampleDayCount": 0
};
switch (obj.event) {
//鏂板涓�琛�
@@ -291,6 +441,9 @@
break;
//澶嶅埗涓�琛�
case 'btn-CopyLine': btnCopyLine(data);
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn':get_HideColumn();
break;
}
});
@@ -314,7 +467,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -351,7 +504,7 @@
, shade: 0.6 //閬僵閫忔槑搴�
//, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html', 'yes']
+ , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html?openType=2', 'yes']
, resize: false
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -371,6 +524,45 @@
})
});
+ //鐢熶骇璧勬簮
+ form.on('submit(HSourceList)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璧勬簮鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html?Htype=&openType=2', '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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HSourceName").val(checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О);
+ $("#HSourceID").val(checkStatus.data[0].HItemID);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ });
+
+
//琛ㄥご鐗╂枡澶х被
form.on('submit(HMaterTypeList)', function () {
//椤甸潰灞�-鑷畾涔�
@@ -382,7 +574,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_MaterType.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_MaterType.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -420,7 +612,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -494,7 +686,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html?Type=HUnitList', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -618,7 +810,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) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -635,7 +827,8 @@
HQCCheckItemName: checkStatus.data[0].鍚嶇О,
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- } else {
+ }
+ else {
//(澶氶�夎)
//灏嗗師鏈夎〃浣撴暟鎹啓鍏ユ暟缁�
var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
@@ -649,7 +842,8 @@
for (var i = 0; i < checkStatus.data.length; i++) {
buttonArr.push({
"HPrjNo": i + 1, "HQCCheckItemID": checkStatus.data[i].HItemID, "HQCCheckItemNumber": checkStatus.data[i].浠g爜, "HQCCheckItemName": checkStatus.data[i].鍚嶇О, "HQCStd": "", "HQCStdMax": "", "HQCUnit": "", "HRemark": ""
- ,"HTargetVal": 0, "HUpLimit": 0, "HDownLimit": 0, "HUpOffSet": 0, "HDownOffSet": 0, "HTargetValB": 0,"HUpLimitB": 0, "HDownLimitB": 0, "HUpOffSetB": 0,"HDownOffSetB": 0
+ , "HTargetVal": 0, "HUpLimit": 0, "HDownLimit": 0, "HUpOffSet": 0, "HDownOffSet": 0, "HTargetValB": 0, "HUpLimitB": 0, "HDownLimitB": 0, "HUpOffSetB": 0, "HDownOffSetB": 0, "HTargetValQ": 0, "HUpLimitQ": 0, "HDownLimitQ": 0, "HUpOffSetQ": 0
+ , "HDownOffSetQ": 0
});
}
@@ -666,6 +860,16 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
+ if (OptionData[0].绂佺敤鏍囪 !='Y' || OptionData[0].瀹℃牳浜� != "") {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HQCCheckItemID": OptionData[0].HItemID
+ , "HQCCheckItemNumber": OptionData[0].浠g爜
+ , "HQCCheckItemName": OptionData[0].鍚嶇О
+ })
+ } else {
+ layer.msg("璇ユ楠岄」鐩凡绂佺敤鏈鏍革紝璇烽噸鏂伴�夋嫨!");
+ }
}
});
}
@@ -680,7 +884,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_QualityStd.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_QualityStd.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -701,7 +905,15 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
-
+ if (OptionData[0].绂佺敤鏍囪 != '鏄�' || OptionData[0].瀹℃牳浜� != "") {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HQualityStdID": OptionData[0].HItemID
+ , "HQualityStdName": OptionData[0].璐ㄩ噺鏍囧噯鍚嶇О
+ })
+ } else {
+ layer.msg("璇ヨ川閲忔爣鍑嗗凡绂佺敤鏈鏍革紝璇烽噸鏂伴�夋嫨!");
+ }
},
success: function (layero, index) {
@@ -719,7 +931,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectMethod.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectMethod.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -740,7 +952,15 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
-
+ if (OptionData[0].绂佺敤鏍囪 != '鏄�' || OptionData[0].瀹℃牳浜� != "") {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HInspectMethodID": OptionData[0].HItemID
+ , "HInspectMethodName": OptionData[0].妫�楠屾柟娉曞悕绉�
+ })
+ } else {
+ layer.msg("璇ユ楠屾柟娉曞凡绂佺敤鏈鏍革紝璇烽噸鏂伴�夋嫨!");
+ }
},
success: function (layero, index) {
@@ -758,7 +978,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectInstruMent.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectInstruMent.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -780,7 +1000,16 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
-
+ if (OptionData[0].绂佺敤鏍囪 != '鏄�' || OptionData[0].瀹℃牳浜� != "") {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HInspectInstruMentID": OptionData[0].HItemID
+ , "HInspectInstruMentName": OptionData[0].妫�楠屼华鍣ㄥ悕绉�
+ , "HQCTool": OptionData[0].妫�楠屼华鍣ㄥ悕绉�
+ })
+ } else {
+ layer.msg("璇ユ楠屼华鍣ㄥ凡绂佺敤鏈鏍革紝璇烽噸鏂伴�夋嫨!");
+ }
},
success: function (layero, index) {
@@ -798,7 +1027,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectBasis.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_InspectBasis.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -819,7 +1048,15 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
-
+ if (OptionData[0].绂佺敤鏍囪 != '鏄�' || OptionData[0].瀹℃牳浜� != "") {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HInspectBasisID": OptionData[0].HItemID
+ , "HInspectBasisName": OptionData[0].妫�楠屼緷鎹悕绉�
+ })
+ } else {
+ layer.msg("璇ユ楠屼华鍣ㄥ凡绂佺敤鏈鏍革紝璇烽噸鏂伴�夋嫨!");
+ }
},
success: function (layero, index) {
@@ -882,13 +1119,13 @@
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
, { field: 'HPrjNo', title: '娆″簭鍙�', edit: 'text', hide: true }
, { field: 'HQCCheckItemID', title: '妫�楠岄」鐩甀D', edit: 'text', hide: true }
- , { field: 'HQCCheckItemNumber', title: '妫�楠岄」鐩唬鐮�*', edit: 'text', event: 'HQCCheckItemNumber' }
- , { field: 'HQCCheckItemName', title: '妫�楠岄」鐩悕绉�', edit: 'text' }
- , { field: 'HQCStd', title: '妫�楠屾爣鍑�', edit: 'text' }
- , { field: 'HQCStdMax', title: '鏈�澶ф楠屾爣鍑�', edit: 'text' }
- , { field: 'HQCUnit', title: '妫�楠屽崟浣�', edit: 'text' }
+ , { field: 'HQCCheckItemNumber', title: '妫�楠岄」鐩唬鐮�', edit: 'text', event: 'HQCCheckItemNumber' }
+ , { field: 'HQCCheckItemName', title: '妫�楠岄」鐩悕绉�', style: 'background-color: #f9f9f9;' }
+ , { field: 'HQCStd', title: '妫�楠屾爣鍑�', edit: 'text', hide: true }
+ , { field: 'HQCStdMax', title: '鏈�澶ф楠屾爣鍑�', edit: 'text', hide: true}
+ , { field: 'HQCUnit', title: '妫�楠屽崟浣�', edit: 'text', hide: true }
- , { field: 'HQCTool', title: '妫�楠屽伐鍏凤紙浠櫒锛�', edit: 'text' }
+ , { field: 'HQCTool', title: '妫�楠屽伐鍏凤紙浠櫒锛�', edit: 'text', hide: true}
, { field: 'HAnalysisMethod', title: '鍒嗘瀽鏂规硶', templet: '#HAnalysisMethod' }
, { field: 'HDefectLevel', title: '缂洪櫡绛夌骇', templet: '#HDefectLevel' }
, { field: 'HDestructInspect', title: '鐮村潖鎬ф楠�', templet: '#HDestructInspect', unresize: false }
@@ -930,6 +1167,10 @@
, { field: 'HDownLimitTxt', title: '涓嬮檺鍊兼枃鏈�', edit: 'text' }
, { field: 'HUpOffSetTxt', title: '涓婂亸宸枃鏈�', edit: 'text' }
, { field: 'HDownOffSetTxt', title: '涓嬪亸宸枃鏈�', edit: 'text' }
+ , { field: 'HControlUpperLimit', title: '鎺у埗涓婇檺', edit: 'text' }
+ , { field: 'HControlLowerLimit', title: '鎺у埗涓嬮檺', edit: 'text' }
+ , { field: 'HSampleCount', title: '鏍锋湰鏁�', edit: 'text' }
+ , { field: 'HSampleDayCount', title: '鏍锋湰澶╂暟', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
];
@@ -970,7 +1211,7 @@
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
- $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+ $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
});
@@ -986,8 +1227,30 @@
});
}
+ //瀹℃牳
+ form.on('submit(Audit)', function ( ) {//瀹℃牳
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_QCCheckProject/AuditGy_QCCheckProject", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": $("#HInterID").val(), "Type": 1, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ $('#add-btn1').addClass("layui-btn-disabled").attr("disabled", true);
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ });
+
//鏃犳簮鍗曟柊澧�
function set_AddFNew() {
+ //绂佺敤缁勭粐閫夐」
+ $('#HOrgID').attr("disabled", true);
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
option.data = [{
@@ -999,8 +1262,12 @@
, "HDownOffSetQ": 0, "HTargetValB": 0, "HUpLimitB": 0, "HDownLimitB": 0, "HUpOffSetB": 0, "HDownOffSetB": 0
, "HTargetValTxt": "", "HUpLimitTxt": "", "HDownLimitTxt": "", "HUpOffSetTxt": "", "HDownOffSetTxt": ""
, "HQualityStdName": "", "HInspectMethodName": "", "HInspectInstruMentName": "", "HInspectBasisName": "", "HSampleSchemeName": ""
+ , "HControlUpperLimit": 0, "HControlLowerLimit": 0, "HSampleCount": 0, "HSampleDayCount": 0
}];
table.render(option);
+ //鍒濆鍖栧埗鍗曚汉鍜屽埗鍗曟椂闂�
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ $("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
}
//缂栬緫
@@ -1016,6 +1283,7 @@
, "HDownOffSetQ": 0, "HTargetValB": 0, "HUpLimitB": 0, "HDownLimitB": 0, "HUpOffSetB": 0, "HDownOffSetB": 0
, "HTargetValTxt": "", "HUpLimitTxt": "", "HDownLimitTxt": "", "HUpOffSetTxt": "", "HDownOffSetTxt": ""
, "HQualityStdName": "", "HInspectMethodName": "", "HInspectInstruMentName": "", "HInspectBasisName": "", "HSampleSchemeName": ""
+ , "HControlUpperLimit": 0, "HControlLowerLimit": 0, "HSampleCount": 0, "HSampleDayCount": 0
}];
table.render(option);
}
@@ -1046,6 +1314,7 @@
$.ajax({
url: GetWEBURL() + "QC_Management/MES_QC_CheckProjectListCheckDetai",
type: "GET",
+ async: false,
data: {
"HID": linterid
},
@@ -1065,8 +1334,8 @@
layui.form.render();//瀹炴椂娓叉煋閫変腑鍜屼笉閫変腑鐨勬牱寮�,鏈�濂芥坊鍔犺繖鍙ヨ瘽
form.val("component-form-group", {
- "HBillNo": data.鍗曟嵁鍙�
- , "HInterID": data.hmainid
+ "HBillNo": OperationType == 2 ? "" : data.鍗曟嵁鍙�
+ , "HInterID": OperationType == 2 ? "" : data.hmainid
, "HDate": formatDate(data.鏃ユ湡)
, "HName": data.鏂规鍚嶇О
, "HMaterName": data.鐗╂枡鍚嶇О
@@ -1085,9 +1354,22 @@
, "HSampleSchemeName": data.鎶芥牱鏂规鍚嶇О
, "HSampleSchemeID": data.HSampleSchemeID
, "HStandard": data.榛樿鏂规 == 1 ? true : false
+ , "HSourceID": data.HSourceID
+ , "HSourceName": data.鐢熶骇璧勬簮
+ , "HMaker": data.鍒跺崟浜�
+ , "HUpDater": data.淇敼浜�
+ , "HChecker": data.瀹℃牳浜�
+ , "HMakerDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd")
+ , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd")
+ , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd")
+ , "HCloseMan": data.鍏抽棴浜�
+ , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd")
+ , "HDeleteMan": data.浣滃簾浜�
+ , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd")
});
-
+ //缁勭粐鐨勫�糎OrgID鍙樺寲锛岄噸鏂版覆鏌�
+ HOrgIDBar = sessionStorage["OrganizationID"];
} else {
layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
}
@@ -1173,6 +1455,7 @@
"HDownLimitTxt": data[i].涓嬮檺鍊兼枃鏈�, "HUpOffSetTxt": data[i].涓婂亸宸枃鏈�, "HDownOffSetTxt": data[i].涓嬪亸宸枃鏈�,
"HQualityStdName": data[i].璐ㄩ噺鏍囧噯鍚嶇О, "HInspectMethodName": data[i].妫�楠屾柟娉曞悕绉�, "HInspectInstruMentName": data[i].妫�楠屼华鍣ㄥ悕绉�,
"HInspectBasisName": data[i].妫�楠屼緷鎹悕绉�, "HSampleSchemeName": data[i].瀛愭娊鏍锋柟妗堝悕绉�
+ , "HControlUpperLimit": data[i].鎺у埗涓婇檺, "HControlLowerLimit": data[i].鎺у埗涓嬮檺, "HSampleCount": data[i].鏍锋湰鏁�, "HSampleDayCount": data[i].鏍锋湰澶╂暟
});
}
@@ -1251,7 +1534,7 @@
}
if (option.data[i - 1].HKeyInspect) {
$('#HKeyInspect' + i + '').attr("checked", true);
- }
+ }
}
form.render('select');
form.render('checkbox');
@@ -1282,7 +1565,7 @@
}
if (option.data[i - 1].HKeyInspect) {
$('#HKeyInspect' + i + '').attr("checked", true);
- }
+ }
}
form.render('select');
form.render('checkbox');
@@ -1304,6 +1587,150 @@
});
}
}
+
+ //#region 闅愯棌鍒楄缃�
+ 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 鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ async: false,
+ success: function (data1) {
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = ["琛屽彿", "椤圭洰闃舵ID", "婧愬崟鍐呯爜", "婧愬崟瀛愬唴鐮�", "婧愬崟鍗曞彿", "婧愬崟绫诲瀷"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ 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 (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ 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;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ 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);
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
+ $('#HDefectLevel' + i + '').find("option[value='" + option.data[i - 1].HDefectLevel + "']").attr("selected", true);
+ $('#HStatus' + i + '').find("option[value='" + option.data[i - 1].HStatus + "']").attr("selected", true);
+
+ if (option.data[i - 1].HDestructInspect) {
+ $('#HDestructInspect' + i + '').attr("checked", true);
+ }
+ if (option.data[i - 1].HKeyInspect) {
+ $('#HKeyInspect' + i + '').attr("checked", true);
+ }
+ }
+ } else {
+ table.render(option);
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
+ $('#HDefectLevel' + i + '').find("option[value='" + option.data[i - 1].HDefectLevel + "']").attr("selected", true);
+ $('#HStatus' + i + '').find("option[value='" + option.data[i - 1].HStatus + "']").attr("selected", true);
+
+ if (option.data[i - 1].HDestructInspect) {
+ $('#HDestructInspect' + i + '').attr("checked", true);
+ }
+ if (option.data[i - 1].HKeyInspect) {
+ $('#HKeyInspect' + i + '').attr("checked", true);
+ }
+ }
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
+
+
// 闈炵┖楠岃瘉
function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
@@ -1375,14 +1802,14 @@
$("#HProcID").val(obj[0].HItemID);
}
- function GetMaterValue(obj) { //鐗╂枡
- $("#HMaterName").val(obj[0].鐗╂枡鍚嶇О);
- $("#HMaterNumber").val(obj[0].鐗╂枡浠g爜);
- $("#HMaterID").val(obj[0].HItemID);
+ function GetGyMaterial(obj) { //鐗╂枡
+ $("#HMaterName").val(obj.鐗╂枡鍚嶇О);
+ $("#HMaterNumber").val(obj.鐗╂枡浠g爜);
+ $("#HMaterID").val(obj.HItemID);
}
function GetMaterTypeValue(obj) { //鐗╂枡鍒嗙被
- $("#HMaterTypeName").val(obj[0].鍚嶇О);
+ $("#HMaterTypeName").val(obj[0].鐗╂枡鍒嗙被鍚嶇О);
$("#HMaterTypeID").val(obj[0].HItemID);
}
@@ -1391,10 +1818,38 @@
$("#HDeptID").val(obj[0].HItemID);
}
- function GetUnitValue(obj) { //璁¢噺鍗曚綅
- $("#HUnitName").val(obj[0].璁¢噺鍗曚綅鍚嶇О);
- $("#HUnitNumber").val(obj[0].璁¢噺鍗曚綅浠g爜);
- $("#HUnitID").val(obj[0].HItemID);
+ function GetHUnitListValue(obj) { //璁¢噺鍗曚綅
+ $("#HUnitName").val(obj.璁¢噺鍗曚綅鍚嶇О);
+ $("#HUnitNumber").val(obj.璁¢噺鍗曚綅浠g爜);
+ $("#HUnitID").val(obj.HItemID);
+ }
+ function GetGySource(obj) { //鐢熶骇璧勬簮
+ $("#HSourceName").val(obj[0].鐢熶骇璧勬簮鍚嶇О);
+ $("#HSourceID").val(obj[0].HItemID);
+ }
+ //妫�楠岄」鐩�
+ function GetCheckItemValue(obj) {
+ OptionData = obj;
+ }
+ //璐ㄩ噺鏍囧噯
+ function GetQualityStdValue(obj) {
+ OptionData = obj;
+ }
+ //妫�楠屾柟娉�
+ function GetInspectMethodValue(obj) {
+ OptionData = obj;
+ }
+ //妫�楠屼华鍣�
+ function GetInspectInstruMentValue(obj) {
+ OptionData = obj;
+ }
+ //妫�楠屼緷鎹�
+ function GetInspectBasisValue(obj) {
+ OptionData = obj;
+ }
+ //鎶芥牱鏂规
+ function GetCheckItemValue(obj) {
+ OptionData = obj;
}
</script>
--
Gitblit v1.9.1