From f65fe092c04cb3d18b7cb1cd511c19d408d59370 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 25 十二月 2024 09:31:12 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 534 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 491 insertions(+), 43 deletions(-)
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
index 78ce1ec..aa3c505 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
@@ -52,31 +52,35 @@
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁鍙�</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="WorkCenter" id="WorkCenter">
+ <input type="text" class="layui-input ForFilteringSchemes" name="WorkCenter" id="WorkCenter">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡浠g爜</label>
<div class="layui-input-block">
- <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;">
+ <input type="hidden" class="layui-input " lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="text" class="layui-input ForFilteringSchemes" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;">
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
+ </div>
+ <!--鏄剧ず褰撳墠杩囨护鏂规-->
+ <div class="layui-inline" style="margin-left:5px;">
+ <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
</div>
<div class="layui-row" style="margin-top:10px;margin-left:5%;">
<!--鍏朵粬鏉′欢-->
<div class="layui-inline">
<label class="layui-form-label" style="width: 76px;">鐗╂枡鍚嶇О</label>
<div class="layui-input-block" style="margin-left: 107px;">
- <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HMaterName" id="HMaterName">
</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="HModel" id="HModel">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HModel" id="HModel">
</div>
</div>
</div>
@@ -109,12 +113,12 @@
<div class="layui-inline">
<label class="layui-form-label">杩囨护</label>
<div class="layui-input-block">
- <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+ <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;" class="ForFilteringSchemes">
</select>
</div>
</div>
<div class="layui-inline">
- <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;" class="ForFilteringSchemes">
<option value="0" selected="selected"></option>
<option value="=">=</option>
<option value=">=">>=</option>
@@ -129,7 +133,7 @@
</select>
</div>
<div class="layui-inline">
- <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
</div>
</div>
<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
@@ -210,6 +214,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>椹冲洖</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_WithdrawCheck_Flow" id="WithdrawCheck_Flow"><i class="layui-icon layui-icon-form"></i>鎾ゅ洖</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-ProcPriceRequestBills" id="btn-ProcPriceRequestBills"><i class="layui-icon layui-icon-delete"></i>澶氳涓嬫帹(瀹氶鐢宠鍗�)</button>
@@ -220,6 +225,8 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="set_HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_SaveScheme" id="btn_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_ReadScheme" id="btn_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
</div>
</script>
</form>
@@ -254,6 +261,20 @@
var ins; //鐢ㄤ簬瀵煎嚭excel
var HModName = "Gy_RoutingBillList";
var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //杩囨护鏉′欢鐨刢lass绫�
+ var HClassTag = "ForFilteringSchemes";
+ //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+ window.HModuleName = "宸ヨ壓璺嚎鍒楄〃";
+ //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+ window.HDefaultFilter = "";
+ //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+ window.HInterID_Choose = 0;
+
+ //#endregion
+
//鑾峰彇鍙傛暟
function getUrlVars() {
var vars = [], hash;
@@ -324,6 +345,9 @@
//椹冲洖
case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
break;
+ //鎾ゅ洖
+ case 'set_WithdrawCheck_Flow': set_WithdrawCheck_Flow();
+ break;
//澶嶅埗
case 'set_Copy': set_Copy();
break;
@@ -359,6 +383,12 @@
case 'set_HideButton':
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
get_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
+ break;
+ //淇濆瓨鏂规
+ case 'btn_SaveScheme': set_SaveScheme();
+ break;
+ //璇诲彇鏂规
+ case 'btn_ReadScheme': set_ReadScheme();
break;
};
});
@@ -458,6 +488,8 @@
get_FastQuery(1);
//鑾峰彇椤圭洰鍙�
Get_HProject();
+ //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+ get_DefaultModule();
}
//#endregion
@@ -583,6 +615,59 @@
}
});
})
+ //#endregion
+
+ //#region 鍥炶溅鏌ヨ
+
+ //鍗曟嵁鍙峰洖杞︽柟娉�
+ $('#WorkCenter').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鐗╂枡浠g爜鍥炶溅鏂规硶
+ $('#HMaterNumber').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鐗╂枡鍚嶇О鍥炶溅鏂规硶
+ $('#HMaterName').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //瑙勬牸鍨嬪彿鍥炶溅鏂规硶
+ $('#HModel').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鑷畾涔夎繃婊ゅ洖杞︽柟娉�
+ $('#ColContent').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鑷畾涔夎繃婊ゅ洖杞︽柟娉�
+ $('#ColContent1').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鑷畾涔夎繃婊ゅ洖杞︽柟娉�
+ $('#ColContent2').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
//#endregion
//#region 閲嶇疆杩囨护鏉′欢鏂规硶
@@ -773,7 +858,7 @@
//#region 蹇�熻繃婊�
function get_FastQuery(number) {
-
+
var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
var HOrgID = "";
@@ -886,7 +971,8 @@
sWhere += " and 鍗曟嵁绫诲瀷 like ''%" + HOrderProcNO + "%''";
}
if (HMaterName) {
- sWhere += "and 鐗╂枡鍚嶇О like ''%" + HMaterName + "%''";
+ //sWhere += "and 鐗╂枡鍚嶇О like ''%" + HMaterName + "%''";
+ sWhere += "and REPLACE(鐗╂枡鍚嶇О, CHAR(10), '''') like ''%" + HMaterName + "%''";
}
if (HMaterNumber) {
sWhere += "and 鐗╂枡浠g爜 like ''%" + HMaterNumber + "%''";
@@ -900,14 +986,17 @@
if (HOrgID) {
sWhere += " and HOrgID = ''" + HOrgID + "''";
}
- if (number==2) {
- if (HProject!='0') {
+ if (number == 2) {
+ if (HProject != '0') {
sWhere += " and 椤圭洰鍙� like ''%" + HProject + "%''";
}
}
-
+
sWhere += " and 宸ュ簭浠g爜 != ''9999'' and HBillSubType<>''SUB''"
- get_DisplayPage(sWhere);
+ //鍒ゆ柇鏉冮檺
+ if (PermissionJudge() == true) {
+ get_DisplayPage(sWhere);
+ }
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
//#endregion
@@ -1066,31 +1155,36 @@
var hmainid = data[0].hmainid;
layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
var wait = layer.load();
- //閫昏緫鍒犻櫎鏂规硶
- $.ajax({
- url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
- type: "GET",
- data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
- success: function (result) {
- console.log('gouba' + result);
- if (result.count == 1) {
- layer.msg(result.Message, { icon: 1 }, function () {
- // 寰楀埌frame绱㈠紩
- var index = layer.getFrameIndex(window.name);
- //鍏抽棴褰撳墠frame
+ if (data[0].鐘舵�� == "鍒涘缓" || data[0].鐘舵�� == "瀹℃牳閫�鍥�" ) {
+ //閫昏緫鍒犻櫎鏂规硶
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
+ type: "GET",
+ data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (result) {
+ console.log('gouba' + result);
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(wait);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
layer.close(wait);
- //淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
- });
- } else {
- layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
layer.close(wait);
}
- }, error: function () {
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- layer.close(wait);
- }
- });
+ });
+ } else {
+ layer.msg('鍗曟嵁鐘舵�佹湭鍦ㄥ垱寤�');
+ layer.close(wait);
+ }
})
}
@@ -1409,11 +1503,12 @@
//#region 瀵煎嚭Execel
function get_Export() {
var ModRightNameCheck = "Gy_RoutingBillList_ExportExcel";
-
+ var wait = layer.load();
//閫昏緫瀹℃牳鏂规硶
$.ajax({
type: "GET",
url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: true,
data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
success: function (result) {
@@ -1430,11 +1525,14 @@
});
if (result.count == 1) {
table.exportFile(ins.config.id, data, "xls");
+ layer.close(wait);
} else {
layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+ layer.close(wait);
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
}
});
}
@@ -1442,7 +1540,7 @@
//#region 鑾峰彇瀵煎嚭鏁版嵁
function getExportData() {
- var data;;//瀵煎嚭鐨勬暟鎹�
+ var data;//瀵煎嚭鐨勬暟鎹�
var ajaxLoad = layer.load();
var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
@@ -1669,16 +1767,53 @@
//#endregion
//#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
+ //function set_CheckBill_Flow(num) {
+ // var checkStatus = table.checkStatus('mainTable')
+ // , data = checkStatus.data;
+ // if (checkStatus.data.length === 1) {
+ // var InterID = data[0].hmainid.toString();
+ // //閫昏緫瀹℃牳鏂规硶
+ // $.ajax({
+ // type: "GET",
+ // url: GetWEBURL() + "/Gy_Routing/AuditFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ // data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
+ // 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);
+ // //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ // $("#btnSearch").trigger('click');
+ // });
+
+ // } else {
+ // layer.alert(result.code + result.Message, { icon: 5 });
+ // }
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // });
+ // }
+ // else {
+ // layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ // }
+ //}
+ //#endregion
+
+ //#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
function set_CheckBill_Flow(num) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- if (checkStatus.data.length === 1) {
- var InterID = data[0].hmainid.toString();
+ if (checkStatus.data.length != 0) {
+ var uniqueIds = [...new Set(data.map(obj => obj.hmainid))];//灏嗗璞℃暟缁刬d鎻愬彇鍘婚噸
+ var queryString = uniqueIds.join(",");//灏唅ds鍙樻垚鏁扮粍
//閫昏緫瀹℃牳鏂规硶
$.ajax({
type: "GET",
- url: GetWEBURL() + "/Gy_Routing/AuditFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
+ url: GetWEBURL() + "/Gy_Routing/CheckAllFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterIDS": queryString, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -1688,6 +1823,7 @@
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
$("#btnSearch").trigger('click');
+
});
} else {
@@ -1699,7 +1835,7 @@
});
}
else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ layer.msg('璇烽�夋嫨鑷冲皯涓�琛屾暟鎹鏍革紒');
}
}
//#endregion
@@ -1736,6 +1872,72 @@
else {
layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
}
+ }
+ //#endregion
+
+ //#region 鎾ゅ洖
+ function set_WithdrawCheck_Flow() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/WithdrawCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "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);
+ });
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
+
+ //#region 鍒ゆ柇鏉冮檺
+ function PermissionJudge() {
+ var ModRightNameCheck = "";
+ if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
+ //浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊�
+ ModRightNameCheck = "Gy_RoutingBill_BasicSelect"
+ } else {
+ //涓嶆槸浠庡埆鐨勯〉闈㈡墦寮�
+ ModRightNameCheck = "Gy_RoutingBill_Query"
+ }
+ var Permission = false;
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async:false,
+ data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ Permission = true;
+ } else {
+ layer.alert("褰撳墠妯″潡娌℃湁鏌ヨ鏉冮檺!", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return Permission;
}
//#endregion
@@ -2006,11 +2208,257 @@
form.render('select');
}
//#endregion
+
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗�
+ function get_DefaultModule() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+ type: "GET",
+ data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规
+ var data = data1.data;
+ //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗�
+ HInterID_Choose = data[0].hmainid;
+ //杩囨护鏂规鍐呯爜
+ HInterID = data[0].hmainid
+ //杩囨护鏂规鍚嶇О
+ HDefaultFilter = data[0].鏂规鍚嶇О
+ //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛�
+ var HRemark = data[0].澶囨敞
+ //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>';
+ //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓�
+ for (let i = 0; i < data.length; i++) {
+ $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+ if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+ $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+ }
+ }
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery()
+ form.render("select");
+ } else {
+ //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗�
+ //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
+ document.getElementById("HFilterScheme_Now").style.display = "none";
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery()
+ form.render("select");
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //淇濆瓨鏂规
+ function set_SaveScheme() {
+ var index = layer.open()
+ //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈�
+ var HIsClose_Manual = false;
+ //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+ var Filter = document.getElementsByClassName(HClassTag);
+
+ var HFilterIdList = "";//杩囨护鏉′欢
+ var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢
+ var HValue = "";//杩囨护鍊�
+ var HElement_type = "";//杩囨护鏍囩绫诲瀷
+
+ for (var i = 0; i < Filter.length; i++) {
+ HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉�
+ if (HDefaultFilter == "") {
+ layer.open({
+ type: 2
+ , area: ['40%', '80%']
+ , title: '杩囨护鏂规'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+ , cancel: function () {
+ // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+ HIsClose_Manual = true;
+ }
+ , end: function () {
+ if (HIsClose_Manual != true) {
+ get_FastQuery();
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+ }
+ }
+ })
+ layer.close(index)
+ } else {
+ //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈�
+ layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', {
+ title: "鎿嶄綔鎻愮ず",
+ icon: 0,
+ btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷']
+ }, function (index, layero) {
+ //鏂板
+ layer.open({
+ type: 2
+ , area: ['40%', '80%']
+ , title: '杩囨护鏂规'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+ , end: function () {
+ get_FastQuery()
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+ }
+ })
+ layer.close(index)
+ }, function (index) {
+ //缂栬緫
+ var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+ HFilterIdList = "";
+ HFilterIdLists = "";
+ HValue = "";
+ HElement_type = "";
+ for (var i = 0; i < Filter_Edit.length; i++) {
+ HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
+
+ //淇敼
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: true,
+ data: { "oMain": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
+ }
+ else {
+
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+
+
+ }
+ });
+ layer.close(index)
+ }, function (index) {
+ //鍙栨秷
+ layer.alert('鍙栨秷')
+ layer.close(index)
+ });
+ }
+
+ }
+
+ //璇诲彇鏂规
+ function set_ReadScheme() {
+ var HIsClose_Manual = false;
+ var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+
+ var HFilterIdList = "";
+ var HFilterIdLists = "";
+ var HValue = "";
+ var HElement_type = "";
+ for (var i = 0; i < Filter.length; i++) {
+ HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '杩囨护鏂规鍒楄〃'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
+ , cancel: function () {
+ // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+ HIsClose_Manual = true;
+ }
+ , end: function () {
+ if (HIsClose_Manual != true) {
+ get_FastQuery()
+ form.render("select");
+ }
+ }
+ })
+ }
+
+ //#endregion
+
//#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
+ //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹��
+ function HFilterScheme(obj) //杩斿洖杩囨护鏂规
+ {
+ var HInterID = obj[0].hmainid;
+ HInterID_Choose = obj[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+ type: "GET",
+ data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = data1.data;
+ //璧嬪�艰繃婊ゆ柟妗堝悕绉�
+ HDefaultFilter = data[0].鏂规鍚嶇О
+ var HRemark = data[0].澶囨敞
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>';
+ HInterID = data[0].hmainid
+ //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢
+ for (let i = 0; i < data.length; i++) {
+ $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+ if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+ $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+ }
+ }
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
//鐗╂枡
function GetMaterValue(obj) {
$("#HMaterID").val(obj[0].HItemID);
--
Gitblit v1.9.1