| | |
| | | <link rel="stylesheet" type="text/css" href="css/query.css">
|
| | | <link rel="stylesheet" type="text/css" href="css/nocontent.css">
|
| | | <link rel="stylesheet" type="text/css" href="css/loading.css">
|
| | | <link href="src/css/layui.css" type="text/css" rel="stylesheet">
|
| | | </head>
|
| | |
|
| | | <body>
|
| | |
| | | <script type="text/javascript" src="js/loading.js"></script>
|
| | | <script type="text/javascript" src="js/rightmenu.js"></script>
|
| | | <script type="text/javascript" src="pages/js/common.js"></script>
|
| | | <script type="text/javascript" src="src/layui.all.js"></script>
|
| | | <script type="text/javascript">
|
| | | var Page = {
|
| | | pageCurr:1,
|
| | |
| | | });
|
| | | });
|
| | |
|
| | | // 省-市-机房-电池组
|
| | | var filterLoad;
|
| | | $(document).ready(function(){
|
| | | filterLoad = layer.load();
|
| | | //页面加载时查询维护区中的枢纽类型
|
| | | $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
|
| | | data=data.result;
|
| | |
| | | });
|
| | |
|
| | | // 根据维护区的内容查询市
|
| | | function findCity() {
|
| | | function findCity(isLoad) {
|
| | | var data = {
|
| | | StationName1: $("#station_name1").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 请求获取当前省下的市
|
| | | $.ajax({
|
| | | type: "post",
|
| | |
| | | }
|
| | |
|
| | | // 查询区/县
|
| | | function findCounty() {
|
| | | function findCounty(isLoad) {
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val(),
|
| | | };
|
| | | |
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 查询区县
|
| | | $.ajax({
|
| | | type: 'post',
|
| | |
| | |
|
| | | //当维护区的值变换时更新市
|
| | | $('#station_name1').change(function(){
|
| | | findCity();
|
| | | findCity(true);
|
| | | });
|
| | |
|
| | | //当维护区的值变换时更新机房站点
|
| | | $('#city').change(function(){
|
| | | findCounty();
|
| | | findCounty(true);
|
| | | });
|
| | |
|
| | | //当区/县的值变换时更新机房站点
|
| | | $('#county').change(function(){
|
| | | findStationNamebyStationname1();
|
| | | findStationNamebyStationname1(true);
|
| | | });
|
| | |
|
| | | //根据省,市查询站点
|
| | | function findStationNamebyStationname1(){
|
| | | function findStationNamebyStationname1(isLoad){
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val(),
|
| | |
| | |
|
| | | // 切换机房更新电池组
|
| | | $('#station_name').change(function(){
|
| | | findserchByBattGroupNamebystationname();
|
| | | findserchByBattGroupNamebystationname(true);
|
| | | });
|
| | |
|
| | | //根据省,市和机房查询蓄电池组
|
| | | function findserchByBattGroupNamebystationname(){
|
| | | function findserchByBattGroupNamebystationname(isLoad){
|
| | | var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 构造查询条件
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | // 查询电池单体
|
| | | $('#battgroup_name').change(function(){
|
| | | searchBattMonNum();
|
| | | });
|
| | |
|
| | | function searchBattMonNum(){
|
| | | function searchBattMonNum(isLoad){
|
| | | //当选择蓄电池组时
|
| | | var battgroup_id = $('#battgroup_name').val();
|
| | | var OSingle_number = $('#Single_number');
|
| | |
| | | $option.attr("value", 0);
|
| | | OSingle_number.text('');
|
| | | OSingle_number.append($option);
|
| | | layer.close(filterLoad);
|
| | | }else{
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 根据电池组id查询单体数量
|
| | | $.post("BattInfAction!serchByMonNum","bif.BattGroupId="+battgroup_id,function(data){
|
| | | data=data.result;
|
| | |
| | | OSingle_number.append($option);
|
| | | }
|
| | | }
|
| | | layer.close(filterLoad);
|
| | | });
|
| | | }
|
| | | }
|