From 7ae052d141e69fe9e19392172fc2960134a03232 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 十二月 2025 15:54:52 +0800
Subject: [PATCH] 1.采购入库单列表、直接调拨单列表、其他出库单列表、生产入库列表、销售出库单列表:layui中开发 查看包装明细
---
WebTM/views/质量管理/库存检验单/QC_Add_Edit_StockCheckBill.html | 354 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 308 insertions(+), 46 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_Add_Edit_StockCheckBill.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_Add_Edit_StockCheckBill.html"
index 3390a81..a13028d 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_Add_Edit_StockCheckBill.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\272\223\345\255\230\346\243\200\351\252\214\345\215\225/QC_Add_Edit_StockCheckBill.html"
@@ -50,6 +50,7 @@
<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" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</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>
<div class="layui-tab" lay-filter="tab-POStockInBill">
@@ -186,6 +187,40 @@
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchQCScheme" id="btnSearchQCScheme" 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" 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="HBatchNo" id="HBatchNo" value="">
+ </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="HInSpectQty" id="HInSpectQty" value="0">
+ </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="HRightQty" id="HRightQty" value="0">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <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="HUnRightQty" id="HUnRightQty" value="0">
+ </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="HUnKnowQty" id="HUnKnowQty" value="0">
</div>
</div>
</div>
@@ -352,13 +387,13 @@
<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="HSampleQty" id="HSampleQty" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HSampleQty" id="HSampleQty" value="0" 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="HSampleDamageQty" id="HSampleDamageQty" style="">
+ <input type="text" class="layui-input" name="HSampleDamageQty" value="0" id="HSampleDamageQty" style="">
</div>
</div>
</div>
@@ -401,7 +436,7 @@
<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="HRejectQty" id="HRejectQty" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HRejectQty" id="HRejectQty" value="0" style="background-color:#efefef4d;" readonly>
</div>
</div>
<!--<div class="layui-inline">
@@ -604,6 +639,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 +690,7 @@
//1.妫�楠岄」鐩〃浣撴暟鎹�煎瓨鍌紝鍊熺敤鐐瑰嚮琛屼簨浠讹紝褰撳垏鎹㈣鏃舵妸涓婃鎵�鍦ㄨ鐨勬暟鎹瓨鍒皁ption.data涓婏紱
//杩欎釜鎬濊矾浼氭湁涓棶棰橈紝鏈�鍚庝竴娆$偣鍑荤殑閭h鏁版嵁灏嗕笉浼氬湪鍘昏Е鍙戠偣鍑昏浜嬩欢瀛樺偍鍊硷紝鐩墠鎯冲埌鐨勬槸鍦ㄦ墽琛屼繚瀛樻柟娉曟椂鍦ㄦ妸鏈�鍚庣偣鍑荤殑閭d竴琛屾暟鎹瓨鍏ption.data涓�
-
+ var OptionData = [];
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
@@ -684,6 +720,7 @@
var UnRightQty_isFied = 0; //鐢ㄤ簬鍒ゆ柇鏄惁鍚堟牸//妫�楠屽�艰〃鏍间笉鍚堟牸鏁伴噺姹囨��
var editIndex = 0;//缂栬緫涓嬫爣
var SampleNum = [];//鏍锋湰鏁伴噺
+ var HModName = "QC_Add_Edit_StockCheckBill";
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
var HModuleType = "7519";
@@ -1032,6 +1069,10 @@
form.render('select');
}
break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
//#endregion
@@ -1042,14 +1083,14 @@
sWhere = " and hmainid = " + $("#HInterID").val();
$.ajax({
- url: GetWEBURL() + "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBillList",
+ url: GetWEBURL() + "/QC_StockCheckBill/QC_StockCheckBillList",
type: "GET",
async: false,
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 0) {
$.ajax({
- url: GetWEBURL() + "/DeltetQC_FirstPieceCheck",
+ url: GetWEBURL() + "/QC_StockCheckBill/DeltetQC_StockCheckBill",
type: "GET",
async: false,
data: { "HInterID": $("#HInterID").val(), "user": sessionStorage["HUserName"] },
@@ -1185,7 +1226,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,16 +1236,55 @@
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) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
@@ -1225,7 +1305,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 +1318,8 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- 妫�楠屼华鍣�: checkStatus.data[0].妫�楠屼华鍣ㄥ悕绉�
+ 妫�楠屼华鍣ㄤ唬鐮�: checkStatus.data[0].妫�楠屼华鍣ㄤ唬鐮�
+ , 妫�楠屼华鍣�: checkStatus.data[0].妫�楠屼华鍣ㄥ悕绉�
, HInspectInstruMentID: checkStatus.data[0].HItemID
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -1248,7 +1329,16 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ 妫�楠屼华鍣ㄤ唬鐮�: OptionData[0].妫�楠屼华鍣ㄤ唬鐮�,
+ 妫�楠屼华鍣�: OptionData[0].妫�楠屼华鍣ㄥ悕绉�,
+ HInspectInstruMentID: OptionData[0].HItemID
+ });
+ OptionData = [];
+ }
}
});
}
@@ -1275,7 +1365,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) {
@@ -1366,22 +1456,30 @@
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) {
//淇濆瓨鏈�鍚庝竴娆$偣鍑昏鐨勬楠屽��
set_SaveValue($("#HEntryID").val());
- if ($("#HICMOQty").val() == "" || $("#HICMOQty").val() <= 0) {
- layer.msg("浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return;
- }
- if ($("#HProcExchQty").val() == "" || $("#HProcExchQty").val() <= 0) {
- layer.msg("娴佽浆鍗℃暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return;
- }
+ //if ($("#HICMOQty").val() == "" || $("#HICMOQty").val() <= 0) {
+ // layer.msg("浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return;
+ //}
+ //if ($("#HProcExchQty").val() == "" || $("#HProcExchQty").val() <= 0) {
+ // layer.msg("娴佽浆鍗℃暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return;
+ //}
if ($("#HFirstCheckEmp").val() == 0) {
layer.msg("妫�楠屽憳鏈�夋嫨锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return;
+ }
+ if ($("#HBatchNo").val() == "") {
+ layer.msg("鎵规鍙蜂笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return;
}
var sSubTable = table.cache['mainTable'];
@@ -1394,6 +1492,7 @@
if (sSubTable[i].HSampleSchemeID == '' || sSubTable[i].HSampleSchemeID == null) {
sSubTable[i].HSampleSchemeID = 0
}
+ sSubTable[i].HKeyInspect = sSubTable[i].HKeyInspect == true ? 1 : 0;
if (sSubTable[i].HSampleQty == '' || sSubTable[i].HSampleQty == null) {
sSubTable[i].HSampleQty = 0
}
@@ -1412,6 +1511,9 @@
if (sSubTable[i].HUnitID == '') {
sSubTable[i].HUnitID = 0
}
+ }
+ if (data.field.HICMOQty == "") {
+ data.field.HICMOQty = 0;
}
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
@@ -1504,6 +1606,11 @@
, "HShiftsID": data.HShiftsID
, "HShiftsName": data.鐝鍚嶇О
, "HErrTreatment": data.寮傚父涓存椂澶勭悊鏂规
+ , "HBatchNo": data.鎵瑰彿
+ , "HInSpectQty": data.妫�楠屾暟閲�
+ , "HRightQty": data.鍚堟牸鏁伴噺
+ , "HUnRightQty": data.涓嶅悎鏍兼暟閲�
+ , "HUnKnowQty": data.鍙枒鏁伴噺
});
$("input[name=HLastResult][value=true]").prop("checked", data.鍒ゅ畾缁撹 === "鍚堟牸");
$("input[name=HLastResult][value=false]").prop("checked", data.鍒ゅ畾缁撹 === "涓嶅悎鏍�");
@@ -1902,7 +2009,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../../views/Baseset/鍩虹璧勬枡/Sc_ProcessExchangeBillListView.html', 'yes'],
+ content: ['../../杞﹂棿绠$悊/宸ュ簭娴佽浆鍗�/Sc_ProcessExchangeBillList.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -1941,7 +2048,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList.html', 'yes'],
+ content: ['../../鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList.html?openType=2', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -2019,7 +2126,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) {
@@ -2095,7 +2202,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) {
@@ -2126,6 +2233,7 @@
//琛ㄥご淇℃伅妫�楠屾柟妗堝脊绐�
form.on('submit(btnSearchQCScheme)', function () {
+ var HProcName = $("#HProcName").val();
//椤甸潰灞�-鑷畾涔�
layer.open({
type: 2,
@@ -2135,6 +2243,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
+ //content: ['../../璐ㄩ噺绠$悊/妫�楠屾柟妗堝崟/QC_CheckProjectList.html?OperationType=1&HName=' + HName + '&HProcName=' + HProcName + '', 'yes'],
content: ['../../璐ㄩ噺绠$悊/妫�楠屾柟妗堝崟/QC_CheckProjectList.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -2174,6 +2283,7 @@
//鍒濆鍖栬〃鏍�
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 +2453,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');
}
@@ -2621,21 +2731,19 @@
$("#HDownLimit").val(0);
$("#HUpOffSet").val(0);
$("#HDownOffSet").val(0);
- $("#HSampleDamageQty").val("")
- $("#HSampleQty").val("")
- $("#HSampleQty2").val("")
+ $("#HSampleDamageQty").val("0")
+ $("#HSampleQty").val("0")
+ $("#HSampleQty2").val("0")
$("#HAcceptQty").val("0")
$("#HInspectionLevel").val("")
- $("#HRejectQty").val("")
+ $("#HRejectQty").val("0")
$("#HStrictness").val("")
- $("#HSampleUnRightQty").val("")
- $("#HSampleUnRightQty2").val("")
+ $("#HSampleUnRightQty").val("0")
+ $("#HSampleUnRightQty2").val("0")
$("#HAQL").val("")
$("#HSamplingType").val("")
- $("#HSampleQty").val("")
$("#HInspectResultToSee").val("")
$("#HInspectResultToSee2").val("")
- $("#HSampleUnRightQty").val("")
$("#HUnitID").val("0")
$("#HUnitName").val("")
$("#HInspectValB").val("0")
@@ -2797,10 +2905,8 @@
$("#HSampleUnRightQty2").val(maindata[nowindex].HSampleUnRightQty);
$("#HAQL").val(maindata[nowindex].HAQL);
$("#HSamplingType").val(maindata[nowindex].HSamplingType);
- $("#HSampleQty").val(maindata[nowindex].HSampleQty);
$("#HInspectResultToSee").val(maindata[nowindex].HInspectResultToSee);
$("#HInspectResultToSee2").val(maindata[nowindex].HInspectResultToSee2);
- $("#HSampleUnRightQty").val(maindata[nowindex].HSampleUnRightQty);
$("#HUnitID").val(maindata[nowindex].HUnitID);
$("#HUnitName").val(maindata[nowindex].HUnitName);
$("#HInspectValB").val(maindata[nowindex].HInspectValB);
@@ -3643,10 +3749,153 @@
form.render('checkbox');
}
//#endregion
+ //#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);
@@ -3685,6 +3934,19 @@
$("#HShiftsName").val(obj[0].鐝鍚嶇О);
$("#HShiftsID").val(obj[0].HItemID);
}
+ //宸ュ簭
+ function GetProcessValue(obj) {
+ $("#HProcName").val(obj[0].宸ュ簭鍚嶇О);
+ $("#HProcID").val(obj[0].HItemID);
+ }
+ //妫�楠岄」鐩�
+ function GetCheckItemValue(obj) {
+ OptionData = obj;
+ }
+ //妫�楠屼华鍣�
+ function GetInspectInstruMentValue(obj) {
+ OptionData = obj;
+ }
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1