From 391859dbae05b59aaa8c1966bfeccc11d07fef5f Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 03 十一月 2023 20:24:58 +0800
Subject: [PATCH] PDA 增加 工序出站汇报单列表查询、工序进站接收单列表查询
---
WebTM/views/设备管理/Sb_EquipMaintainPlanBillEdit.html | 320 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 251 insertions(+), 69 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
index 0ff7adb..9321e4a 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
@@ -20,11 +20,13 @@
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
- <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
+ <form id="component-form-group" class="layui-form" lay-filter="component-form-group" action="">
<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" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_AddNew" id="set_AddNew">鏂板</button>
+ <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver" id="add-btn">淇濆瓨</button>
+ <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="view">棰勮</button>
+ <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="print">鎵撳嵃</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
</div>
@@ -61,7 +63,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">璁惧</label>
+ <label class="layui-form-label">璁惧<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="hidden" name="HEquipID" id="HEquipID" class="layui-input" value="" style="float:left;width:150px;">
<input type="text" name="HEquipName" id="HEquipName" class="layui-input" value="" style="float:left;width:150px;">
@@ -103,6 +105,16 @@
</div>
</div>
<div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">璁惧淇濆吇瑙勭▼<label style="color:red"></label></label>
+ <div class="layui-input-inline">
+ <input type="hidden" name="HMouldMaintainRuleID" id="HMouldMaintainRuleID" class="layui-input" value="0" style="float:left;width:150px;">
+ <input type="text" name="HMouldMaintainRuleNo" id="HMouldMaintainRuleNo" class="layui-input" value="" style="float:left;width:150px;background-color:#efefef4d;" readonly>
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HEquipDotCheckRuleInterList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
<div class="layui-inline">
<label class="layui-form-label">鎽樿</label>
<div class="layui-input-inline">
@@ -162,8 +174,10 @@
</div>
</div>
<script type="text/html" id="barDemo">
- <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+ </script>
+ <script type="text/html" id="barDemo1">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del1">鍒犻櫎</a>
</script>
<script src="../../layuiadmin/layui/layui.js"></script>
<script src="../../layuiadmin/Scripts/json2.js"></script>
@@ -199,8 +213,8 @@
var option = [];//淇濆吇
var option1 = [];//閰嶄欢
var sBillType = "3902";
- var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " };//淇濆吇
- var TabRow1 = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HQty": "", "HRemark": "" };//閰嶄欢
+ //var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " };//淇濆吇
+ //var TabRow1 = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "", "HRemark": "" };//閰嶄欢
//#endregion
@@ -235,7 +249,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = TabRow;
+ var NewRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " };
switch (obj.event) {
//鏂板涓�琛�
case 'btn-AddLine': btnAddLine(NewRow);
@@ -250,13 +264,13 @@
table.on('toolbar(mainTable1)', function (obj) {
var checkStatus = table.checkStatus('mainTable1')
, data = checkStatus.data;
- var NewRow = TabRow1;
+ var NewRow = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "0", "HRemark": "" };
switch (obj.event) {
//鏂板涓�琛�
- case 'btn-AddLine': btnAddLine1(NewRow);
+ case 'btn-AddLine1': btnAddLine1(NewRow);
break;
//澶嶅埗涓�琛�
- case 'btn-CopyLine': btnCopyLine1(data);
+ case 'btn-CopyLine1': btnCopyLine1(data);
break;
}
});
@@ -291,7 +305,7 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
$("#HEquipName").val(checkStatus.data[0].HName);
- $("#HEquipID").val(checkStatus.data[0].HItemID);
+ $("#HEquipID").val(checkStatus.data[0].HInterID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -304,6 +318,12 @@
}
});
});
+ //鏂板
+ form.on('submit(set_AddNew)', function (data) {
+ $("#component-form-group")[0].reset();
+ layui.form.render();
+ set_AddFNew();
+ });
//淇濆瓨
form.on('submit(Saver)', function (data) {
//debugger;
@@ -311,8 +331,11 @@
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
- var sMainSub = sMainStr + ';' + sSubStr + ';' + sSubStr1;
- //if (AllowLoadData(sSubStr, sSubStr1)) {
+ var sMainSub = sMainStr + ';' + sSubStr + ';' + sSubStr1 + ";" + sessionStorage["HUserName"];
+ if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+ {
+ return false;
+ }
$.ajax(
{
type: "POST",
@@ -325,7 +348,7 @@
layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
$('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
- parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
+ parent.layer.close(index); //鍐嶆墽琛屽叧闂�
});
}
else {
@@ -341,11 +364,56 @@
console.log("Reason" + sMainStr);
}
});
- //}
+
+ });
+ //琛ㄥご淇℃伅璁惧淇濆吇瑙勭▼
+ form.on('submit(HEquipDotCheckRuleInterList)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璁惧淇濆吇瑙勭▼鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../璁惧绠$悊/璁惧瑙勭▼鍗�/Sb_EquipMaintainRuleList.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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HMouldMaintainRuleNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HMouldMaintainRuleID").val(checkStatus.data[0].hmainid);
+ get_DocCheckItem2(checkStatus.data[0].hmainid);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ });
+ });
+
+ //棰勮Printing
+ form.on("submit(view)", function (data) {
+ window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
+
+ });
+ //鎵撳嵃Printing
+ form.on("submit(print)", function (data) {
+ window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HEquipMaintainPlanBill&OpenTmp=璁惧淇濆吇璁″垝鏉$爜");
+
});
//閫�鍑�
form.on('submit(Exit)', function () {
- Pub_Close(1);
+ if (linterid == undefined) {
+ //鍏抽棴椤电
+ Pub_Close(2);
+ }
+ else {
+ //鍏抽棴椤电
+ Pub_Close(1);
+ }
})
//鐩戝惉鎻愪氦
form.verify({
@@ -387,12 +455,12 @@
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
, { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', edit: 'text', hide: true }
, { field: 'HMaintainItemNumber', title: '淇濆吇椤圭洰浠g爜', edit: 'text', event: 'HMaintainItemNumber' }
- , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', edit: 'text' }
+ , { field: 'HMaintainItem', title: '淇濆吇椤圭洰' }
, { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', edit: 'text' }
, { field: 'HClaim', title: '鍏蜂綋瑕佹眰', edit: 'text' }
, { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
, { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerNumber' }
- , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
+ , { field: 'HManagerName', title: '璐熻矗浜�' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
];
@@ -421,9 +489,12 @@
, { field: 'HUnitID', title: '鍗曚綅ID', edit: 'text', hide: true }
, { field: 'HUnitNumber', title: '鍗曚綅浠g爜', edit: 'text', event: "HUnitCode" }
, { field: 'HUnitName', title: '鍗曚綅鍚嶇О', edit: 'text', event: "" }
+ //, { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
+ //, { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerNumber' }
+ //, { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
, { field: 'HQty', title: '鐢ㄩ噺', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo1', width: 150 }
];
option1 = {
id: 'mainTable1'
@@ -443,8 +514,8 @@
function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
- option.data = [TabRow];
- option1.data = [TabRow1];
+ option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "0", "HRemark": "" }];
table.render(option);
table.render(option1);
}
@@ -472,9 +543,9 @@
function set_EditFromGrid(linterid) {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
- option.data = [TabRow];
+ option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
table.render(option);
- option1.data = [TabRow1];
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "0", "HRemark": "" }];
table.render(option1);
}
//缂栬緫鑾峰彇琛ㄥご
@@ -502,6 +573,8 @@
, "HRemark": data.琛ㄥご澶囨敞
, "HCycleUnit": data.鍛ㄦ湡鍗曚綅
, "HCheckCycle": data.淇濆吇鍛ㄦ湡
+ , "HMouldMaintainRuleID": data.HMouldMaintainRuleID
+ , "HMouldMaintainRuleNo": data.璁惧淇濆吇瑙勭▼
});
} else {
@@ -517,7 +590,7 @@
$("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
//缂栬緫鍔犺浇鏁版嵁
$.ajax({
- url: GetWEBURL() + 'Sb_EquipMaintainPlanBill/Sb_EquipMaintainBillListProjectDetaiNew',
+ url: GetWEBURL() + 'Sb_EquipMaintainPlanBill/Sb_EquipMaintainPlanBillListProjectDetaiNew',
type: "GET",
data: { "HInterID": linterid },
success: function (result) {
@@ -536,6 +609,66 @@
}
});
}
+
+ // 淇濆吇淇℃伅 閰嶄欢淇℃伅
+ function get_DocCheckItem2(data) {
+ $.ajax({
+ url: GetWEBURL() + "/Sb_EquipMaintainRuleBill/Sb_EquipMaintainRuleBillSubAndSubItem",
+ type: "GET",
+ async: false,
+ data: { "HInterID": data },
+ success: function (result) {
+ if (result != null) {
+ if (result.count == 1) {
+ var BYData = result.list[0];//淇濆吇
+ var PJData = result.list[1];//閰嶄欢
+ var rowdate1 = layui.table.cache["mainTable"];
+ var rowdate2 = layui.table.cache["mainTable1"];
+ option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "" }];
+ table.render(option);
+ table.render(option1);
+
+ if (BYData.length != 0) //琛ㄤ綋鏁版嵁涓嶄负绌烘椂
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < BYData.length; i++) {
+ var checkrow = {
+ "HMaintainItemID": BYData[i].HMaintainItemID, "HMaintainItemNumber": BYData[i].HMaintainItemNumber, "HMaintainItem": BYData[i].HMaintainItem,
+ "HMaintainPart": BYData[i].HMaintainPart, "HClaim": BYData[i].HClaim, "HManagerID": BYData[i].HManagerID, "HManagerNumber": BYData[i].HManagerNumber,
+ "HManagerName": BYData[i].HManagerName, "HRemark": BYData[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+
+ if (PJData.length != 0) //琛ㄤ綋鏁版嵁涓嶄负绌烘椂
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < PJData.length; i++) {
+ var checkrow = {
+ "HMaterID": PJData[i].HMaterID, "HMaterNumber": PJData[i].HMaterNumber, "HMaterName": PJData[i].HMaterName,
+ "HUnitID": PJData[i].HUnitID, "HUnitNumber": PJData[i].HUnitNumber,
+ "HUnitName": PJData[i].HUnitName, "HQty": PJData[i].HQty, "HRemark": PJData[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable1", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }
+ }
+ })
+ }
+
//鏃ユ湡鏍煎紡鍖�
function formatDate(date) {
var d = new Date(date),
@@ -550,15 +683,27 @@
}
//澧炲姞涓�琛�
function btnAddLine(NewRow) {
- table.cache["mainTable"].push(NewRow);
- option1.data = table.cache["mainTable"];
- table.render(option);
+ var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < tableBak.length; i++) {
+ buttonArr.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
}
//澧炲姞涓�琛�
function btnAddLine1(NewRow) {
- table.cache["mainTable1"].push(NewRow);
- option1.data = table.cache["mainTable1"];
- table.render(option1);
+ var tableBak = table.cache["mainTable1"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < tableBak.length; i++) {
+ buttonArr.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ table.reload("mainTable1", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
}
//澶嶅埗涓�琛�
function btnCopyLine(data) {
@@ -604,8 +749,6 @@
if (rowIndex === '0') {
layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
} else {
- //obj.del();
- //layer.close(index);
var oldData = table.cache["mainTable"];
oldData.splice(obj.tr.data('index'), 1);
table.reload('mainTable', { data: oldData });
@@ -618,14 +761,12 @@
function set_GridDelete1(obj) {
var data = obj.data;
var rowIndex = $(obj.tr).attr("data-index");
- if (obj.event === 'del') {
+ if (obj.event === 'del1') {
layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
console.log("绱㈠紩涓�:" + rowIndex);
if (rowIndex === '0') {
layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
} else {
- //obj.del();
- //layer.close(index);
var oldData = table.cache["mainTable1"];
oldData.splice(obj.tr.data('index'), 1);
table.reload('mainTable1', { data: oldData });
@@ -748,7 +889,7 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HUnitID: checkStatus.data[0].HItemID,
- HUnitCode: checkStatus.data[0].HNumber,
+ HUnitNumber: checkStatus.data[0].HNumber,
HUnitName: checkStatus.data[0].HName
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -784,7 +925,7 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HMaterID: checkStatus.data[0].HItemID,
- HMaterCode: checkStatus.data[0].HNumber,
+ HMaterNumber: checkStatus.data[0].HNumber,
HMaterName: checkStatus.data[0].HName
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -797,6 +938,46 @@
}
});
}
+ //璐熻矗浜轰俊鎭�
+ if (obj.event === 'HManagerNumber') {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璐d换浜哄垪琛�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../PublicPage/UserInformation.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('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HManagerID: checkStatus.data[0].HItemID,
+ HManagerNumber: checkStatus.data[0].HNumber,
+ HManagerName: checkStatus.data[0].HName
+ });
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
obj.event = "";
return false;
@@ -804,62 +985,63 @@
})
}
//闈炵┖楠岃瘉
- function AllowLoadData(sSubStr, sSubStr1) {
- if ($("#HInnerBillNo").val() == '') {
- layer.msg("璇烽�夋嫨鍐呴儴鍗曟嵁鍙�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
+ function AllowLoadData(sSubStr) {
+ var Result = true;
if ($("#HEquipID").val() == '' || $("#HEquipName").val() == '') {
layer.msg("璇烽�夋嫨璁惧", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ return Result = false;
}
if ($("#HCheckCycle").val() == '' || $("#HCheckCycle").val() == '0') {
layer.msg("璇疯緭鍏ヤ繚鍏诲懆鏈�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ return Result = false;
}
if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
layer.msg("淇濆吇椤规槑缁嗚褰曚笉鑳戒负绌�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ return Result = false;
}
if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
sSubStr = JSON.parse(sSubStr);
for (var i = 0; i < sSubStr.length; i++) {
if (sSubStr[i].HMaintainItemID == "") {
layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,淇濆吇椤圭洰淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ return Result = false;
}
if (sSubStr[i].HMaintainItem == "") {
layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,淇濆吇閮ㄤ綅淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ return Result = false;
}
if (sSubStr[i].HManagerNumber == "") {
- layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,璐d换浜轰俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,璐熻矗浜轰俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
}
}
- if (typeof (sSubStr1) == "undefined" || sSubStr1 == "" || sSubStr1 == "[]") {
- layer.msg("閰嶄欢椤规槑缁嗚褰曚笉鑳戒负绌�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
- if (typeof (sSubStr1) != "undefined" && typeof (sSubStr1) != "") {
- sSubStr1 = JSON.parse(sSubStr1);
- for (var i = 0; i < sSubStr1.length; i++) {
- if (sSubStr1[i].HMaterCode == "") {
- layer.msg("閰嶄欢椤规槑缁嗚褰曠" + (i + 1) + "琛�,閰嶄欢浠g爜涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
- if (sSubStr1[i].HUnitCode == "") {
- layer.msg("閰嶄欢椤规槑缁嗚褰曠" + (i + 1) + "琛�,鍗曚綅浠g爜淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
-
- }
- }
+ //if (typeof (sSubStr1) == "undefined" || sSubStr1 == "" || sSubStr1 == "[]") {
+ // layer.msg("閰嶄欢椤规槑缁嗚褰曚笉鑳戒负绌�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ //}
+ //if (typeof (sSubStr1) != "undefined" && typeof (sSubStr1) != "") {
+ // sSubStr1 = JSON.parse(sSubStr1);
+ // for (var i = 0; i < sSubStr1.length; i++) {
+ // if (sSubStr1[i].HMaterNumber == "") {
+ // layer.msg("閰嶄欢椤规槑缁嗚褰曠" + (i + 1) + "琛�,閰嶄欢浠g爜涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ // }
+ // if (sSubStr1[i].HUnitNumber == "") {
+ // layer.msg("閰嶄欢椤规槑缁嗚褰曠" + (i + 1) + "琛�,鍗曚綅浠g爜淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ // }
+ // if (sSubStr[i].HManagerNumber == "") {
+ // layer.msg("淇濆吇椤规槑缁嗚褰曠" + (i + 1) + "琛�,璐熻矗浜轰俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ // }
+ // }
+ //}
else {
- return true;
+ return Result = true;
}
+ return Result;
}
function f_alert(sMsg) {
layer.alert(sMsg, { icon: 5 });
--
Gitblit v1.9.1