From d64724c092e9aa860c888d3e4106d41a8dfe99e8 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 30 三月 2022 17:30:53 +0800
Subject: [PATCH] PDA加删除提示+器具档案批量生成
---
WebTM/views/设备管理/Sb_EquipDotCheckBillEdit.html | 184 +++++++++++++++++++++++++++++++++++++++++----
1 files changed, 167 insertions(+), 17 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 ff6ae47..ca8010d 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"
@@ -79,9 +79,13 @@
</div>
<div class="layui-form-item">
<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="text" name="HPlanNo" id="HPlanNo" class="layui-input">
+ <input type="hidden" name="HPlanNo" id="HPlanNo" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HPlanName" id="HPlanName" class="layui-input" value="" style="float:left;width:150px;" readonly="readonly">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HPlanList" 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">
@@ -95,6 +99,16 @@
<label class="layui-form-label">璁″垝缁撴潫鏃ユ湡</label>
<div class="layui-input-inline">
<input class="layui-input" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">璁惧鐐规瑙勭▼<label style="color:red"> * </label></label>
+ <div class="layui-input-inline">
+ <input type="hidden" name="HEquipDotCheckRuleInterID" id="HEquipDotCheckRuleInterID" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HEquipDotCheckRuleInterNo" id="HEquipDotCheckRuleInterNo" class="layui-input" value="" style="float:left;width:150px;" readonly="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>
@@ -217,7 +231,7 @@
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '杞﹂棿鍒楄〃',
+ title: '璁惧鍒楄〃',
closeBtn: 1,
shift: 2,
area: ['80%', '80%'],
@@ -233,6 +247,154 @@
}
$("#HEquipName").val(checkStatus.data[0].HName);
$("#HEquipID").val(checkStatus.data[0].HInterID);
+ get_DocCheckItem();
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ },
+ success: function (layero, index) {
+ }
+ });
+ });
+ function get_DocCheckItem() {
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetDotCheckRuleItemByEquipProjectID",
+ type: "GET",
+ data: { "EquipProjectID": $("#HEquipID").val() },
+ success: function (result) {
+ if (result != null) {
+ if (result.count == 1) {
+ var BYData = result;//
+ var rowdate1 = layui.table.cache["mainTable"];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
+ table.render(option);
+
+ if (BYData.data.length != 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < BYData.data.length; i++) {
+ var checkrow = {
+ "HDotCheckItemID": BYData.data[i].HDotCheckItemID, "HDotCheckCode": BYData.data[i].HDotCheckCode, "HDotCheckItem": BYData.data[i].HDotCheckItem,
+ "HDotCheckPart": BYData.data[i].HDotCheckPart, "HClaim": rowdate1[i].HClaim, "HManagerID": BYData.data[i].HManagerID, "HManagerCode": BYData.data[i].HManagerCode,
+ "HManagerName": BYData.data[i].HManagerName, "HRemark": rowdate1[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+ }
+ else {
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
+ table.render(option);
+ layer.alert("璇ヨ澶囨殏鏃犻粯璁ょ偣妫�璁板綍", { icon: 5 });
+ }
+ }
+ }
+ })
+ }
+
+ //琛ㄥご淇℃伅璁惧鐐规瑙勭▼
+ 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_EquipDotCheckRuleList.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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HEquipDotCheckRuleInterNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HEquipDotCheckRuleInterID").val(checkStatus.data[0].hmainid);
+ get_DocCheckItem2();
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ },
+ success: function (layero, index) {
+ }
+ });
+ });
+ function get_DocCheckItem2() {
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetDotCheckRuleItemByDotCheckRuleID",
+ type: "GET",
+ data: { "HDotCheckRuleInterID": $("#HEquipDotCheckRuleInterID").val() },
+ success: function (result) {
+ if (result != null) {
+ if (result.count == 1) {
+ var BYData = result;//
+ var rowdate1 = layui.table.cache["mainTable"];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
+ table.render(option);
+
+ if (BYData.data.length != 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < BYData.data.length; i++) {
+ var checkrow = {
+ "HDotCheckItemID": BYData.data[i].HDotCheckItemID, "HDotCheckCode": BYData.data[i].HDotCheckCode, "HDotCheckItem": BYData.data[i].HDotCheckItem,
+ "HDotCheckPart": BYData.data[i].HDotCheckPart, "HClaim": rowdate1[i].HClaim, "HManagerID": BYData.data[i].HManagerID, "HManagerCode": BYData.data[i].HManagerCode,
+ "HManagerName": BYData.data[i].HManagerName, "HRemark": rowdate1[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+ }
+ else {
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
+ table.render(option);
+ layer.alert("璇ヨ澶囨殏鏃犻粯璁ょ偣妫�璁板綍", { icon: 5 });
+ }
+ }
+ }
+ })
+ }
+
+ //琛ㄥご淇℃伅鐐规璁″垝婧愬崟寮圭獥
+ form.on('submit(HPlanList)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鐐规璁″垝婧愬崟鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../璁惧绠$悊/Sb_EquipDotCheckPlanBillEdit.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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HPlanName").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HPlanNo").val(checkStatus.data[0].hmainid);
get_MaintainItem();
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -246,19 +408,6 @@
}
});
});
- function get_MaintainItem() {
- $.ajax({
- url: GetWEBURL() + "/Web/GetDotCheckRuleItemByEquipProjectID",
- type: "GET",
- data: { "EquipProjectID": $("#HEquipID").val() },
- success: function (result) {
- if (result != null) {
- option.data = result.data;
- table.render(option);
- }
- }
- })
- }
// 鎻愪氦淇濆瓨
form.on('submit(set_SaveBill)', function (data) {//淇濆瓨
@@ -266,7 +415,7 @@
data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr;
+ var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"];
if (AllowLoadData(sSubStr)) {
$.ajax(
{
@@ -545,6 +694,7 @@
, "HBeginDate": data.寮�濮嬫棩鏈� // 寮�濮嬫棩鏈�
, "HEndDate": data.缁撴潫鏃ユ湡 // 缁撴潫鏃ユ湡
, "HPlanNo": data.鐐规璁″垝缂栧彿 //鐐规璁″垝缂栧彿
+ , "HPlanName": data.鐐规璁″垝 //鐐规璁″垝缂栧彿
, "HRemark": data.琛ㄥご澶囨敞 //澶囨敞
});
--
Gitblit v1.9.1