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
102
<!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="main"></div>
</div>
<script type="text/javascript">
var pId = '${RequestParameters.pId}';
function query(pId) {
    loading($("#main"));
    var params = {"pId":pId};
    $.post("${base}/business/pages/xtgl/bmgl/bmData.html",params,function(data,textStatus) {
        loaded($("#main"));
        $("#main").html(data);
    })
}
 
$(function() {
    
    query(pId);
})
 
 
function addBm(){
        var url = "${base}/business/pages/xtgl/bmgl/addBm.html?sjbh="+pId;
        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/bmgl/addBm.html?id="+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(){
            $.get("${base}/business/pages/xtgl/bmgl/del.html", {"id":id,"index":index},function(data){
                  if(data.msg == "1"){
                      window.top.popupTips("操作成功");
                      query(pId);
                      window.top.queryTree(data.firstCate,data.secondCate);
                  } else {
                      if(data.msg == "0"){
                        window.top.popupTips("该部门下存在正常使用中的操作人员,不允许删除!");                  
                      }else{
                          window.top.popupTips("该部门下存在下属部门,请先删除下属部门!");
                      }
                  }
            },"json");
        })
 
 
        
    }
</script>
 
</body>
</html>