From de87e4a6357da78d51a6798aaedc2353d56c7a4d Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期二, 11 十二月 2018 15:45:15 +0800
Subject: [PATCH] 后台修改
---
gx_tieta/WebRoot/set-match-group.jsp | 100 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 87 insertions(+), 13 deletions(-)
diff --git a/gx_tieta/WebRoot/set-match-group.jsp b/gx_tieta/WebRoot/set-match-group.jsp
index 36e8c4b..7a65063 100644
--- a/gx_tieta/WebRoot/set-match-group.jsp
+++ b/gx_tieta/WebRoot/set-match-group.jsp
@@ -13,7 +13,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />
<meta charset="UTF-8">
-<title>鐢垫睜缁勯厤缁勭鐞�</title>
+<title>鐢垫睜缁勯厤缁勮褰�</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
@@ -60,7 +60,14 @@
<div class="layui-input-inline">
<div class="layui-form" lay-filter="cityFilter">
<select name="city" id="city" lay-filter="city">
- <option value="">璇烽�夋嫨甯�/鍖�</option>
+ <option value="">璇烽�夋嫨甯�</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-input-inline">
+ <div class="layui-form" lay-filter="countyFilter">
+ <select name="county" id="county" lay-filter="county">
+ <option value="">璇烽�夋嫨鍖�/鍘�</option>
</select>
</div>
</div>
@@ -70,7 +77,6 @@
<option value="">璇烽�夋嫨鏈烘埧</option>
</select>
</div>
-
</div>
<div class="layui-input-inline">
<div class="layui-form" lay-filter="groupFilter">
@@ -178,6 +184,7 @@
var obj = {};
obj.StationName1 = '';
obj.StationName2 = '';
+ obj.StationName5 = '';
obj.StationName3 = '';
obj.BattGroupName = '';
obj.BattGroupId = data.BattGroupId;
@@ -235,6 +242,7 @@
}
// 鏌ヨ鐪佷笅鎷夋
+ var filterLoad = layer.load();
searchProvince();
// 鏌ヨ鐪�
function searchProvince() {
@@ -275,15 +283,19 @@
// 鍒囨崲鐪�-甯�
form.on('select(province)', function(data) {
// 鏌ヨ甯�
- searchCity();
+ searchCity(true);
});
// 鏌ヨ甯�
- function searchCity() {
+ function searchCity(isLoad) {
// 鏋勯�犳煡璇㈡潯浠�
var tmp = {
StationName1: $("#province").val()
};
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
// 鏍规嵁鏋勯�犳潯浠舵煡璇㈠唴瀹�
$.ajax({
type: 'post',
@@ -297,7 +309,7 @@
var ele = $('#city'); // 鐩爣select
if(rs.code == 1) {
var data = rs.data;
- list.push(getLayuiSelect('璇烽�夋嫨甯�/鍖�', '', {}, undefined));
+ list.push(getLayuiSelect('璇烽�夋嫨甯�', '', {}, undefined));
// 閬嶅巻鏌ヨ缁撴灉
for(var i=0; i<data.length; i++) {
var _data = data[i];
@@ -305,12 +317,56 @@
list.push(_tmp);
}
}else {
- list.push(getLayuiSelect('鏆傛棤甯�/鍖�', '', {}, undefined));
+ list.push(getLayuiSelect('鏆傛棤甯�', '', {}, undefined));
}
// 鏍规嵁瀵硅薄鏁扮粍鐢熸垚涓嬫媺鍒楄〃
createLayuiSelect(ele, list);
form.render('select', 'cityFilter');
+ // 鏌ヨ鍖�/鍘�
+ searchCounty();
+ }
+ });
+ }
+
+ // 鏌ヨ鍖�/鍘�
+ function searchCounty(isLoad) {
+ // 鏋勯�犳煡璇㈡潯浠�
+ var tmp = {
+ StationName1: $("#province").val(),
+ StationName2: $("#city").val()
+ };
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
+ // 鏍规嵁鏋勯�犳潯浠舵煡璇㈠唴瀹�
+ $.ajax({
+ type: 'post',
+ async: true,
+ url: 'BattInfAction!serchStationName5',
+ dataType: 'json',
+ data: "json = "+JSON.stringify(tmp),
+ success: function(result) {
+ var rs = JSON.parse(result.result);
+ var list = []; // option缁撴灉闆�
+ var ele = $('#county'); // 鐩爣select
+ if(rs.code == 1) {
+ var data = rs.data;
+ list.push(getLayuiSelect('璇烽�夋嫨鍖�/鍘�', '', {}, undefined));
+ // 閬嶅巻鏌ヨ缁撴灉
+ for(var i=0; i<data.length; i++) {
+ var _data = data[i];
+ var _tmp = getLayuiSelect(_data.StationName5, _data.StationName5, {}, _data);
+ list.push(_tmp);
+ }
+ }else {
+ list.push(getLayuiSelect('鏆傛棤鍖�/鍘�', '', {}, undefined));
+ }
+
+ // 鏍规嵁瀵硅薄鏁扮粍鐢熸垚涓嬫媺鍒楄〃
+ createLayuiSelect(ele, list);
+ form.render('select', 'countyFilter');
// 鏌ヨ鏈烘埧
searchHome();
@@ -318,19 +374,31 @@
});
}
- // 鍒囨崲甯�-鏈烘埧
+
+ // 鍒囨崲甯�-鍖�/鍘�
form.on('select(city)', function(data) {
+ // 鏌ヨ鍖�/鍘�
+ searchCounty(true);
+ });
+
+ // 鍒囨崲鍖�/鍘�-鏈烘埧
+ form.on('select(county)', function(data) {
// 鏌ヨ鏈烘埧
- searchHome();
+ searchHome(true);
});
// 鏌ヨ鏈烘埧
- function searchHome() {
+ function searchHome(isLoad) {
// 鏋勯�犳煡璇㈡潯浠�
var tmp = {
StationName1:$("#province").val(),
- StationName2:$("#city").val()
+ StationName2:$("#city").val(),
+ StationName5:$("#county").val()
};
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
// 鏍规嵁鏋勯�犳潯浠舵煡璇㈠唴瀹�
$.ajax({
type: 'post',
@@ -375,14 +443,19 @@
});
// 鏌ヨ鏈烘埧
- function searchGroup() {
+ function searchGroup(isLoad) {
// 鏋勯�犳煡璇㈡潯浠�
var tmp = {
StationName1:$("#province").val(),
StationName2:$("#city").val(),
+ StationName5:$("#county").val(),
StationName: $("#home").val(),
StationId: $("#home").find('option:selected').attr('stationid')
};
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
// 鏍规嵁鏋勯�犳潯浠舵煡璇㈠唴瀹�
$.ajax({
type: 'post',
@@ -410,9 +483,10 @@
list.push(_tmp);
}
}else {
- list.push(getLayuiSelect('鏆傛棤鏈烘埧', '', {}, undefined));
+ list.push(getLayuiSelect('鏆傛棤鐢垫睜缁�', '', {}, undefined));
}
+ layer.close(filterLoad);
// 鏍规嵁瀵硅薄鏁扮粍鐢熸垚涓嬫媺鍒楄〃
createLayuiSelect(ele, list);
form.render('select', 'groupFilter');
--
Gitblit v1.9.1