From ac5962f71fe0f4fd4e7e44fb74a02bba7ff816b4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 18 六月 2024 12:14:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/Sb_EquipDotCheckPlanBillEdit.html | 108 +++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 95 insertions(+), 13 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
index a29f66f..ad1a87d 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
@@ -53,14 +53,14 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鐐规鍛ㄦ湡</label>
+ <label class="layui-form-label" style="width: 85px;">鐐规鍛ㄦ湡<label style="color:red"> * </label></label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" class="layui-input" name="HCheckCycle" lay-verify="HCheckCycle" id="HCheckCycle">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">鍛ㄦ湡鍗曚綅</label>
- <div class="layui-input-block" style="margin-left: 120px;width: 185px;" ">
+ <div class="layui-input-block" style="margin-left: 120px;width: 185px;">
<select name="HCycleUnit" lay-filter="aihao" id="HCycleUnit">
<option value="澶�">澶�</option>
<option value="鏈�">鏈�</option>
@@ -76,7 +76,7 @@
</div>
<div class="layui-row" style="margin-top:10px;">
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">璁惧</label>
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">璁惧<label style="color:red"> * </label></label>
<div class="layui-input-block" style="margin-left: 77px;">
<input type="text" class="layui-input" lay-verify="HEquipName" name="HEquipName" id="HEquipName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
<input type="hidden" name="HEquipID" id="HEquipID" lay-verify="HEquipID" value="0">
@@ -225,7 +225,7 @@
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "" };
+ var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" };
switch (obj.event) {
//澧炲姞涓�琛�
case 'btn-AddLine': set_AddLine(NewRow);
@@ -392,6 +392,10 @@
, { field: 'HDotCheckItemID', title: '鐐规椤圭洰ID', edit: 'text', hide: true }
, { field: 'HDotCheckCode', title: '鐐规椤圭洰浠g爜', edit: 'text', event: "HDotCheckCode" }
, { field: 'HDotCheckItem', title: '鐐规椤圭洰', edit: 'text', event: "" }
+ , { field: 'HDotCheckItemClassID', title: '鐐规椤圭洰鍒嗙被ID', edit: 'text', hide: true }
+ , { field: 'HDotCheckItemClassName', title: '鐐规椤圭洰鍒嗙被', edit: 'text', event: 'HDotCheckItemClassName' }
+ , { field: 'HDotCheckItemMethodID', title: '鐐规鏂规硶ID', edit: 'text', hide: true }
+ , { field: 'HDotCheckItemMethodName', title: '鐐规鏂规硶', edit: 'text', event: 'HDotCheckItemMethodName' }
, { field: 'HDotCheckPart', title: '鐐规閮ㄤ綅', edit: 'text', event: "" }
, { field: 'HClaim', title: '鍏蜂綋瑕佹眰', edit: 'text' }
, { field: 'HManagerID', title: '璐熻矗浜轰唬鐮�', edit: 'text', hide: true }
@@ -445,7 +449,7 @@
function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "" }];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
}
//鑾峰彇鏈�澶у崟鎹彿鍙婇粯璁ゅ�艰祴鍊�
@@ -472,7 +476,7 @@
function set_EditFromGrid() {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
@@ -493,7 +497,7 @@
if (result.count == 1) {
var DJData = result.data;//鐐规
var rowdate1 = layui.table.cache["mainTable"];
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
if (DJData.length != 0) //琛ㄤ綋鏁版嵁涓嶄负绌烘椂
@@ -503,7 +507,7 @@
var checkrow = {
"HDotCheckItemID": DJData[i].鐐规椤圭洰ID, "HDotCheckCode": DJData[i].鐐规椤圭洰浠g爜, "HDotCheckItem": DJData[i].鐐规椤圭洰, "HDotCheckPart": DJData[i].鐐规閮ㄤ綅,
"HClaim": DJData[i].鍏蜂綋瑕佹眰, "HManagerID": DJData[i].璐熻矗浜篒D, "HManagerCode": DJData[i].璐熻矗浜轰唬鐮�,
- "HManagerName": DJData[i].璐熻矗浜�, "HRemark": DJData[i].瀛愬娉�
+ "HManagerName": DJData[i].璐熻矗浜�, "HRemark": DJData[i].瀛愬娉�, "HDotCheckItemClassID": DJData[i].HDotCheckItemClassID, "HDotCheckItemClassName": DJData[i].鐐规椤圭洰鍒嗙被鍚嶇О, "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""
};
buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
}
@@ -566,11 +570,15 @@
url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
type: "GET",
data: { "sqlWhere": "and hmainid=" + linterid },
- success: function (result) {
- console.log(result);
- //console.log('gouba' + result);
+ success: function (result) {
if (result.count == 1) {
- option.data = result.data;
+ var data = result.data;
+ var subarr = [];
+ for (var i = 0; i < data.length; i++) {
+ subarr.push({ "HDotCheckItemID": data[i].鐐规椤圭洰ID, "HDotCheckCode": data[i].鐐规椤圭洰浠g爜, "HDotCheckItem": data[i].鐐规椤圭洰, "HDotCheckPart": data[i].鐐规閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerCode": data[i].璐熻矗浜轰唬鐮�, "HManagerName": data[i].璐熻矗浜�, "HRemark": data[i].琛ㄤ綋澶囨敞, "HDotCheckItemClassID": data[i].HDotCheckItemClassID, "HDotCheckItemClassName": data[i].鐐规椤圭洰鍒嗙被鍚嶇О, "HDotCheckItemMethodID": data[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": data[i].鐐规鏂规硶鍚嶇О });
+ }
+
+ option.data = subarr;
table.render(option);
} else {
@@ -708,6 +716,8 @@
HDotCheckItemID: checkStatus.data[0].HItemID,
HDotCheckItem: checkStatus.data[0].鐐规椤圭洰鍚嶇О,
HDotCheckCode: checkStatus.data[0].鐐规椤圭洰浠g爜,
+ HDotCheckItemClassID: checkStatus.data[0].HDotCheckItemClassID,
+ HDotCheckItemClassName: checkStatus.data[0].鐐规椤圭洰鍒嗙被鍚嶇О,
//HDotCheckPart: checkStatus.data[0].鐐规閮ㄤ綅
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -723,7 +733,7 @@
}
//灏嗘壒閲忛�夋嫨鐨勬暟鎹啓鍏ユ暟缁勶紙澶氶�夎锛�
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": "" });
+ 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": "", "HDotCheckItemClassID": checkStatus.data[i].HDotCheckItemClassID, "HDotCheckItemClassName": checkStatus.data[i].鐐规椤圭洰鍒嗙被鍚嶇О, "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" });
}
table.reload("mainTable", {
@@ -777,6 +787,74 @@
}
});
}
+
+ if (obj.event === 'HDotCheckItemClassName') //鐐规椤圭洰鍒嗙被
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鐐规椤圭洰鍒嗙被鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true
+ , content: ['../鍩虹璧勬枡/鍩虹璧勬枡/Gy_DotCheckItemClassList.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({
+ HDotCheckItemClassID: checkStatus.data[0].HItemID,
+ HDotCheckItemClassName: checkStatus.data[0].鐐规椤圭洰鍒嗙被鍚嶇О
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ }
+ });
+ }
+ if (obj.event === 'HDotCheckItemMethodName') //鐐规鏂规硶
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鐐规鏂规硶鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true
+ , content: ['../鍩虹璧勬枡/鍩虹璧勬枡/Gy_DotCheckItemMethodList.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({
+ HDotCheckItemMethodID: checkStatus.data[0].HItemID,
+ HDotCheckItemMethodName: checkStatus.data[0].鐐规鏂规硶鍚嶇О
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ }
+ });
+ }
+
obj.event = "";
return false;
@@ -790,6 +868,10 @@
layer.msg("璇烽�夋嫨璁惧", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
}
+ if ($("#HCheckCycle").val() == '' || $("#HCheckCycle").val() == '0') {
+ layer.msg("璇疯緭鍏ヤ繚鍏诲懆鏈�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
sSubStr = JSON.parse(sSubStr);
for (var i = 0; i < sSubStr.length; i++) {
--
Gitblit v1.9.1