cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>区域维护</title>
[#include "/business/pages/include/static.html" /]
<style>
    .leftTable{
        border-collapse: collapse;
        border-spacing: 0;
    }
 
    .leftTable .checkspan {
        margin-right:5px;
        float:left;
        margin-top:2px;
    }
    </style>
</head>
 
<body>
<div class="facieditlistright">
      <div class="fs_navtitle facieditlistright_navtitle" id="fsNavtitle">
        <h2>区域列表</h2>
        <div class="fsnt_btn">
            <a class="operating_conmon"  href="javascript:addBm();">
                <span class="facilistright_forticon">增加</span>
            </a>
        </div>
      </div>
      <div id="mainData"></div>
      <div class="paging clearfix" id="pagination"></div>
</div>
<script type="text/javascript">
var u_Id = '${RequestParameters.id}';
var nowPage = 1;
function query(u_Id) {
    loading($("#main"));
    var params = {"u_Id":u_Id};
    
    pagination("${base}/business/pages/xtgl/xtpz/address/addressData.html","${base}/business/pages/xtgl/xtpz/address/addressCount.html","mainData","pagination",{cpage:nowPage,psize:10},params,function(data,page) {
            nowPage = page;
        });
}
 
$(function() {
    
    query(u_Id);
})
 
 
function addBm(){
        var url = "${base}/business/pages/xtgl/xtpz/address/addAddress.html?sjbh="+u_Id;
        window.top.openDialog("0","新增区域",
                         {},
                         {"width":50,"height":60},
                         [{btnId:"btnSure", btnName:"提交", btnStyle:"bluebtn"}],
                         url);  
}
 
function addSubCus() {
    
}
 
function updateBm(id) {
    var url = "${base}/business/pages/xtgl/xtpz/address/addAddress.html?id="+id+"&sjbh="+u_Id;
        window.top.openDialog("0","修改区域",
                         {},
                         {"width":50,"height":60},
                         [{btnId:"btnSure", btnName:"提交", btnStyle:"bluebtn"}],
                         url);  
}
 
 
function delBm(id,index){
        var tip = "";
            
            if(index == 1 ){
              tip = '确定要启用该数据吗?';
            }else{
              tip = '确定要禁用该数据吗?';
            }
        window.top.confirmInfo('提示', tip, function(){
            $.post("${base}/business/pages/xtgl/xtpz/address/updateState.html", {id:id,state:index},function(data){
                  if(data.result == 1){
                      window.top.popupTips("操作成功");
                      query(u_Id);
                      window.top.queryTree(data.firstCate,data.secondCate);
                  } else {
                      window.top.popupTips("操作失败");
                  }
            },"json");
        })
 
 
        
    }
</script>
 
</body>
</html>