From 211d4845aeaaebbf033adabd112015c569d96dc9 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 10 四月 2024 14:23:04 +0800
Subject: [PATCH] 设备管理全部模块,选择基础资料的界面,全部增加 双击返回 的功能; (设备保养规程,设备点检规程,设备保养记录单,设备点检记录单,设备故障登记单,设备维修派工单,设备维修记录单,设备维修验收单)
---
WebTM/views/设备管理/Sb_EquipDotCheckBillEdit.html | 99 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 81 insertions(+), 18 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html"
index 67cef8d..71cf943 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html"
@@ -156,6 +156,7 @@
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
</script>
<script>
+ var OptionData = [];
//鑾峰彇鍙傛暟
var params = get_UrlVars();
if (typeof (params[params[0]]) == "undefined") {
@@ -246,9 +247,9 @@
closeBtn: 1,
shift: 2,
area: ['80%', '80%'],
- maxmin: true,
- content: ['../PublicPage/EqpInformation.html', 'yes'],
- btn: ['纭畾', '鍙栨秷']
+ maxmin: true
+ , content: ['../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -256,8 +257,8 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HEquipName").val(checkStatus.data[0].HName);
- $("#HEquipID").val(checkStatus.data[0].HInterID);
+ $("#HEquipName").val(checkStatus.data[0].璁惧鍚嶇О);
+ $("#HEquipID").val(checkStatus.data[0].hmainid);
get_DocCheckItem();
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -347,7 +348,7 @@
}
});
});
- function get_DocCheckItem2() {
+ window.get_DocCheckItem2 = function () {
$.ajax({
url: GetWEBURL() + "/Web/GetDotCheckRuleItemByDotCheckRuleID",
type: "GET",
@@ -553,6 +554,7 @@
, elem: '#mainTable'
, toolbar: '#toolbarDemo'
, page: true
+ , limit: 100
, totalRow: true
, cellMinWidth: 120
, height: 500
@@ -636,19 +638,51 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HDotCheckItemID: checkStatus.data[0].HItemID,
- HDotCheckCode: checkStatus.data[0].鐐规椤圭洰浠g爜,
- HDotCheckItem: checkStatus.data[0].鐐规椤圭洰鍚嶇О
- });
- layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+
+ if (checkStatus.data.length === 1) {
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HDotCheckItemID: checkStatus.data[0].HItemID,
+ HDotCheckCode: checkStatus.data[0].鐐规椤圭洰浠g爜,
+ HDotCheckItem: checkStatus.data[0].鐐规椤圭洰鍚嶇О
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ } else {
+ //(澶氶�夎)
+ //灏嗗師鏈夎〃浣撴暟鎹啓鍏ユ暟缁�
+ var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < tableBak.length; i++) {
+ if (tableBak[i]["HDotCheckItemID"] != 0 && tableBak[i]["HDotCheckItemID"] != "" && tableBak[i]["HDotCheckItemID"] != undefined && tableBak[i]["HDotCheckItemID"] != null) {
+ buttonArr.push(tableBak[i]); //濡傛灉鍏抽敭瀛楁涓嶄负绌猴紝鍒欏皢涔嬪墠鐨勬暟鎹瓨鍌�
+ }
+ }
+ //灏嗘壒閲忛�夋嫨鐨勬暟鎹啓鍏ユ暟缁勶紙澶氶�夎锛�
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ buttonArr.push({ "HDotCheckItemID": checkStatus.data[i].HItemID, "HDotCheckCode": checkStatus.data[i].鐐规椤圭洰浠g爜, "HDotCheckItem": checkStatus.data[i].鐐规椤圭洰鍚嶇О, "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "" });
+ }
+
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
}
, btn2: function (index, layero) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ HDotCheckItemID: OptionData[0].HItemID,
+ HDotCheckCode: OptionData[0].鐐规椤圭洰浠g爜,
+ HDotCheckItem: OptionData[0].鐐规椤圭洰鍚嶇О
+ });
+ OptionData = [];
+ }
}
});
}
@@ -662,9 +696,9 @@
closeBtn: 1,
shift: 2,
area: ['90%', '90%'],
- maxmin: true,
- content: ['../PublicPage/UserInformation.html', 'yes'],
- btn: ['纭畾', '鍙栨秷']
+ maxmin: true
+ , content: ['../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HManager', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -675,8 +709,8 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HManagerID: checkStatus.data[0].HItemID,
- HManagerCode: checkStatus.data[0].HNumber,
- HManagerName: checkStatus.data[0].HName
+ HManagerCode: checkStatus.data[0].鑱屽憳浠g爜,
+ HManagerName: checkStatus.data[0].鑱屽憳鍚嶇О
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -685,6 +719,15 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
+ if (OptionData.length > 0) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ HManagerID: OptionData[0].HItemID,
+ HManagerCode: OptionData[0].鑱屽憳浠g爜,
+ HManagerName: OptionData[0].鑱屽憳鍚嶇О
+ });
+ OptionData = [];
+ }
}
});
}
@@ -843,6 +886,26 @@
//#endregion
});
+
+ //璁惧
+ function GetEquipFileValue(obj) {
+ $("#HEquipName").val(obj[0].璁惧鍚嶇О);
+ $("#HEquipID").val(obj[0].hmainid);
+ }
+ //鐐规瑙勭▼
+ function GetSb_EquipDotCheckRuleListValue(obj) {
+ $("#HEquipDotCheckRuleInterNo").val(obj.鍗曟嵁鍙�);
+ $("#HEquipDotCheckRuleInterID").val(obj.hmainid);
+ get_DocCheckItem2();
+ }
+ //鐐规椤圭洰
+ function GetDotCheckListValue(obj) {
+ OptionData[0] = obj;
+ }
+ //璐d换浜�
+ function GetHManagerValue(obj) {
+ OptionData = obj;
+ }
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1