From 2e5feddf5b4afc56e0e4842378a2fac13886c290 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期二, 23 十月 2018 11:26:07 +0800
Subject: [PATCH] 包机组添加按钮
---
gx_tieta/WebRoot/elegroup.jsp | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 100 insertions(+), 19 deletions(-)
diff --git a/gx_tieta/WebRoot/elegroup.jsp b/gx_tieta/WebRoot/elegroup.jsp
index b5ea1df..186d357 100644
--- a/gx_tieta/WebRoot/elegroup.jsp
+++ b/gx_tieta/WebRoot/elegroup.jsp
@@ -13,11 +13,43 @@
<title><s:text name="Package_unit_manage"/></title>
<link rel="stylesheet" type="text/css" href="css/basic.css">
<link rel="stylesheet" type="text/css" href="css/elegroup.css">
-
+ <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome.css">
<script type="text/javascript" src="js/frame.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/base.js"></script>
-
+ <style>
+ .toolbar-fixed-top-right {
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 999;
+ }
+ .toolbar-fixed-top-right.right10 {
+ right: 10px;
+ }
+ .toolbar-fixed-top-right.right20 {
+ right: 20px;
+ }
+ .toolbar-fixed-top-right.top3 {
+ top: 5px;
+ }
+ .toolbar-fixed-top-right select {
+ font-size: 12px;
+ height: 26px;
+ vertical-align: top;
+ border: 1px solid #ccc;
+ margin-right: 4px;
+ }
+ .toolbar-fixed-top-right a.tool-btn{
+ display: inline-block;
+ margin-right: 10px;
+ color: #000;
+ font-size: 20px;
+ }
+ .toolbar-fixed-top-right a.tool-btn:hover {
+ color: #1495E7;
+ }
+ </style>
</head>
<body>
<!--澶撮儴鍐呭寮�濮�-->
@@ -42,22 +74,16 @@
</tr>
<tr>
<td>
- <select id="station_name1" name="">
- </select>
+ <select id="station_name1" name=""></select>
</td>
<td>
- <select id="city" name="">
- </select>
+ <select id="city" name=""></select>
</td>
<td>
- <select id="station_name" name="">
-
- </select>
+ <select id="station_name" name=""></select>
</td>
<td>
- <select id="battgroup_name" name="">
-
- </select>
+ <select id="battgroup_name" name=""></select>
</td>
</tr>
</table>
@@ -72,6 +98,18 @@
</div>
<!-- 鍙充笂瀹瑰櫒 -->
<div id="rtop">
+ <div class="toolbar-fixed-top-right top3 right20">
+ <select name="addType" id="addType">
+ <option value="0">鍏ㄧ渷鏈烘埧</option>
+ <option value="1">鍏ㄥ競鏈烘埧</option>
+ <option value="2">鍗曚釜鏈烘埧</option>
+ <option value="3">鐢垫睜缁�</option>
+ </select>
+ <a href="javasscript:;" class="tool-btn" id="toolBtnAdd" title="娣诲姞"><i class="fa fa-plus"></i></a>
+ <a href="javasscript:;" class="tool-btn" title="搴旂敤"><i class="fa fa-sticky-note-o"></i></a>
+ <a href="javasscript:;" class="tool-btn" title="鍏ㄩ��"><i class="fa fa-check-square-o"></i></a>
+ <a href="javasscript:;" class="tool-btn" title="绉婚櫎"><i class="fa fa-trash-o"></i></a>
+ </div>
<table style="width:100%">
<thead>
<tr>
@@ -756,12 +794,18 @@
});
}
var json=window.JSON.stringify(baoji_user);
+
+ // 鏄剧ず绛夊緟妗�
+ loading.showLoading();
+ return;
//console.info(json);
$.post('User_battgroup_baojigroup_usrAction!add',"json="+json,function(data){
var model=eval("("+data.result+")");
alert(model.msg);
var baojizuid=$('#lbottom .li-con li.b8cfe5').attr('value');
searchBaojiZuUser(baojizuid);
+ // 闅愯棌绛夊緟妗�
+ loading.showLoading();
});
}else{
alert('<s:text name="There_is_nothing_to_be_done"/>'); /* 娌℃湁浠�涔堝彲浠ュ仛鐨� */
@@ -885,7 +929,8 @@
// 鐪�-甯�-鏈烘埧-鐢垫睜缁�
$(document).ready(function(){
//椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷
- $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
+ $.post("BattInfAction!serchAllStation_all",null,function(data){
+ //console.info(data);
data=data.result;
data=eval("("+data+")");
//console.info(data);
@@ -898,13 +943,13 @@
$option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.data.length+"<s:text name='Species'/>)");
$option.attr("value", "");
}else{
- $option.text(data.data[i-1]);
- $option.attr("value",data.data[i-1]);
+ $option.text(data.data[i-1].StationName1);
+ $option.attr("value",data.data[i-1].StationName1);
}
$select.append($option);
}
}else{
- $("#station_name1").text('').html('<option>鏆傛棤绠$悊鐨勭淮鎶ゅ尯</option>');
+ $("#station_name1").text('').html('<option>鏆傛湭娣诲姞鐪�</option>');
}
findCity();
});
@@ -918,7 +963,7 @@
// 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競
$.ajax({
type: "post",
- url: "BattInfAction!serchStationName2",
+ url: "BattInfAction!serchStationName2_all",
async:true,
dataType:'json',
data:"json = "+JSON.stringify(data),
@@ -962,7 +1007,7 @@
};
//var selectvalue=$("#station_name1 option:selected").val();
//alert(selectvalue);
- $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
+ $.post("BattInfAction!serchStationName3_all","json="+JSON.stringify(tmp),function(data){
var rs = JSON.parse(data.result);
if(rs.code==1){
var _data = rs.data;
@@ -1006,7 +1051,7 @@
//var station_name1=$("#station_name1 option:selected").val();
//var station_name=$("#station_name option:selected").val();
- $.post("BattInfAction!serchBattByStation","json="+JSON.stringify(tmp),function(data){
+ $.post("BattInfAction!serchBattByStation_all","json="+JSON.stringify(tmp),function(data){
data=data.result;
//console.info(data);
data=eval("("+data+")");
@@ -1774,5 +1819,41 @@
_rsObj.tblAttr = _rsId;
return _rsObj;
}
+
+ // 缁欐ā鍧楁坊鍔犲伐鍏锋潯
+ $(function() {
+ $('.toolbar-fixed-top-right').tooltip();
+
+ // 鐐瑰嚮娣诲姞鎸夐挳
+ $('#toolBtnAdd').click(function() {
+ var baoji = $('#lbottom .li-con li.b8cfe5').text();
+ if(baoji.length == 0) {
+ alert('璇烽�夋嫨宸︿笅鏂圭殑鍖呮満缁勶紒锛侊紒');
+ }else {
+ var addType = $('#addType').val();
+ addBattGroup(addType);
+ }
+ });
+ // 鏍规嵁閫夋嫨鐨勬坊鍔犵數姹犵粍
+ function addBattGroup(num) {
+ switch(num) {
+ case '0': // 娣诲姞鍏ㄧ渷
+ $('#tb-right-menu .add-province').click();
+ break;
+ case '1':
+ $('#tb-right-menu .add-city').click();
+ break;
+ case '2':
+ $('#tb-right-menu .add-station').click();
+ break;
+ case '3':
+ $('#tb-right-menu .add-batt').click();
+ break;
+
+ }
+ }
+
+ //
+ });
</script>
</html>
\ No newline at end of file
--
Gitblit v1.9.1