From 62f346794d27086f41f7ce901bdd11eead5249c8 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 06 五月 2024 08:54:47 +0800
Subject: [PATCH] 1
---
WebTM/views/设备管理/Sb_EquipMaintainBillList.html | 450 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 428 insertions(+), 22 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
index 5cbe602..f3de829 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBillList.html"
@@ -9,7 +9,10 @@
<link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
<script src="../../layuiadmin/layui/layui.js"></script>
- <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
+
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -42,31 +45,35 @@
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁鍙�</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">鍒跺崟浜�</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HCreateBy" id="HCreateBy">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">寮�濮嬫椂闂�</label>
<div class="layui-input-block">
- <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
+ <input type="date" class="layui-input ForFilteringSchemes" name="BenginHCreateDate" id="BenginHCreateDate">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">缁撴潫鏃堕棿</label>
<div class="layui-input-block">
- <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
+ <input type="date" class="layui-input ForFilteringSchemes" name="EndHCreateDate" id="EndHCreateDate">
</div>
</div>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ <!--鏄剧ず褰撳墠杩囨护鏂规-->
+ <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-colla-content">
<div class="layui-row">
<div class="layui-inline">
@@ -79,12 +86,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" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
</select>
</div>
</div>
<div class="layui-inline">
- <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
<option value="0" selected="selected"></option>
<option value="=">=</option>
<option value=">=">>=</option>
@@ -99,7 +106,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>
@@ -129,9 +136,15 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><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="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
</div>
</script>
@@ -159,7 +172,7 @@
base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
//#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
@@ -172,13 +185,35 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
+
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
var option1 = [];
var option2 = [];
var HModName = "Sb_EquipMaintainBillList";
- var titleData = ["hmainid", "鍗曟嵁绫诲瀷", "琛ㄥご澶囨敞", "閰嶄欢浠g爜", "hsubid", "琛屽叧闂汉", "琛ㄤ綋澶囨敞", "鍒跺崟浜�", "淇敼浜�", "浣滃簾鏃ユ湡", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�","HEquipID","鍐呴儴鍗曟嵁鍙�","HMaterID","鍗曚綅ID","璐熻矗浜篒D","HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "3901";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+ //#endregion
+
+ var titleData = ["hmainid", "鍗曟嵁绫诲瀷", "琛ㄥご澶囨敞", "閰嶄欢浠g爜", "hsubid", "琛屽叧闂汉", "琛ㄤ綋澶囨敞", "鍒跺崟浜�", "淇敼浜�", "浣滃簾鏃ユ湡", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HEquipID", "鍐呴儴鍗曟嵁鍙�", "HMaterID", "鍗曚綅ID", "璐熻矗浜篒D", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //杩囨护鏉′欢鐨刢lass绫�
+ var HClassTag = "ForFilteringSchemes";
+ //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+ window.HModuleName = "璁惧淇濆吇璁板綍鍗曞垪琛�";
+ //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+ window.HDefaultFilter = "";
+ //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+ window.HInterID_Choose = 0;
+
+ //#endregion
+
//#endregion
@@ -230,7 +265,24 @@
case 'set_HideColumn':
get_HideColumn();
break;
-
+ //瀹℃牳
+ case 'set_CheckBill': set_CheckBill(1);
+ break;
+ //鍙嶅鏍�
+ case 'set_AbandonCheck': set_CheckBill(2);
+ break;
+ //鍏抽棴
+ case 'set_CloseBill': set_CloseBill(1);
+ break;
+ //鍙嶅叧闂�
+ case 'set_CancelCloseBill': set_CloseBill(2);
+ break;
+ //淇濆瓨鏂规
+ case 'set_SaveScheme': set_SaveScheme();
+ break;
+ //璇诲彇鏂规
+ case 'set_ReadScheme': set_ReadScheme();
+ break;
};
});
@@ -280,6 +332,8 @@
set_InitGrid2();
//鏌ヨ
get_Display(sWhere);
+ //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+ get_DefaultModule();
}
//鍒濆鍖栦富琛ㄦ牸
function set_InitGrid() {
@@ -288,11 +342,12 @@
, toolbar: '#toolbarDemo'
, height: '400'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [[
- { type: 'checkbox', fixed: 'left' }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�'}
, { field: 'hmainid', title: 'hmainid', hide: true }
, { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
@@ -308,13 +363,13 @@
, { field: '閰嶄欢浠g爜', title: '閰嶄欢浠g爜', width: 115, hide: true }
, { field: '閰嶄欢鍚嶇О', title: '閰嶄欢鍚嶇О', width: 200 }
, { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О', width: 200 }
- , { field: '瀹為檯鐢ㄩ噺', title: '瀹為檯鐢ㄩ噺', width: 200 }
- , { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+ , { field: '瀹為檯鐢ㄩ噺', title: '瀹為檯鐢ㄩ噺', width: 200, totalRow: true}
+ , { field: '鏍囧噯鐢ㄩ噺', title: '鏍囧噯鐢ㄩ噺', width: 200 , totalRow: true}
, { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
, { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
- , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
- , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200 }
+ , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 , totalRow: true}
+ , { field: '鍏宠仈閲戦', title: '鍏宠仈閲戦', width: 200, totalRow: true}
, { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115, hide: true }
, { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
@@ -336,6 +391,28 @@
]]
}
}
+
+ //#region 鐐瑰嚮琛岄�変腑楂樹寒
+ table.on('row(mainTable)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ var flag = !obj.tr.find(':checkbox:first').prop('checked');
+ obj.tr.find(':checkbox').prop('checked', flag);
+ if (flag) {
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ } else {
+ obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+ }
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = flag;
+ }
+ });
+ })
+ //#endregion
+
//鍒濆鍖栬〃鏍�(瀛愯〃1)
function set_InitGrid1() {
var ajaxLoad = layer.load();
@@ -344,6 +421,7 @@
//, toolbar: '#toolbarDemo'
, height: '350'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -372,6 +450,7 @@
elem: '#mainTable2'
//, toolbar: '#toolbarDemo'
, height: '350'
+ , totalRow: true
, page: true
, cellMinWidth: 90
, limit: 50
@@ -389,8 +468,8 @@
//, { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
//, { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
//, { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
- , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
- , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+ , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200, totalRow: true}
+ , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200, totalRow: true }
, { field: 'HRemark', title: '澶囨敞', width: 200 }
]]
};
@@ -403,9 +482,11 @@
var ajaxLoad = layer.load();
//杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
$.ajax({
+ //h_v_Sc_EquipMaintain
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/Sb_EquipMaintainBill/GetEquipMaintainBillList',
type: "GET",
+ async: false,
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
success: function (data1) {
if (data1.count == 1) {
@@ -416,7 +497,7 @@
data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
}
//鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
- col.push({ type: 'checkbox', fixed: 'left' });
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' });
for (var i = 0; i < data.length; i++) {
if ($.inArray(data[i].name, titleData) > -1 ) {
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
@@ -427,6 +508,13 @@
case 'DateTime':
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
break;
+ case 'long':
+ case 'Int32':
+ case 'Int64':
+ case 'double':
+ case 'Decimal':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
+ break;
default:
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
}
@@ -441,15 +529,18 @@
, data: data1.data
, height: 550
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
}
table.render(option);
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn();
-
//鍒锋柊鎸夐挳鏄剧ず
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
var HBillType = "3901";
@@ -478,7 +569,7 @@
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '鏂板璁惧淇濆吇璁板綍鍗� ',
+ title: '鏂板' + HPageTitle,
closeBtn: false,
shift: 2,
area: ['100%', '100%'],
@@ -502,7 +593,7 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '缂栬緫璁惧淇濆吇璁板綍鍗� '
+ , title: '缂栬緫' + HPageTitle
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
@@ -557,6 +648,73 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
}
}
+
+ //瀹℃牳/鍙嶅鏍�
+ function set_CheckBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ if (data.length == 1) {
+ layer.confirm("纭瑕佸鏍稿悧?", function (index) {
+ var wait = layer.load();
+ var HInterID = data[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Sb_EquipMaintainBill/CheckSb_EquipMaintainBill',
+ type: "GET",
+ data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ get_FastQuery();
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(wait);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ } else {
+ layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ }
+
+ //鍏抽棴/鍙嶅叧闂�
+ function set_CloseBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ if (data.length == 1) {
+ layer.confirm("纭瑕佸叧闂悧?", function (index) {
+ var wait = layer.load();
+ var HInterID = data[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Sb_EquipMaintainBill/CloseSb_EquipMaintainBill',
+ type: "GET",
+ data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 });
+ layer.close(wait);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ layer.close(wait);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
+ }
+ });
+ })
+ }
+ else {
+ layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ }
+
//棰勮
function get_ViewReport() {
var checkStatus = table.checkStatus('mainTable')
@@ -779,9 +937,257 @@
})
}
layer.close(index);
+
+ //#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
});
+ //#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
+
</script>
</body>
--
Gitblit v1.9.1