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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>指标分类</title>
[#include "/business/pages/include/static.html" /]
 
</head>
 
<body class="fullscreen">
[#include "/business/pages/include/header.html" /]
 
[#assign focusLabel = 'ZBFL']
[#include "/business/pages/health/healthPlanHeader.html" /]
 
 
<div class="fs_main equip_add clearfix" >
        <div class="fs_navtitle" id="fsNavtitle" style="margin-bottom:15px;">
        <div class="fs_navtitle_con common_list" style="margin:0 15px;">
            <div class="fsnt_btn">
                <a class="operating_conmon"  href="javascript:addCategory();"><span>新增</span></a>
            </div>
        </div>
        </div>
        <div class="fs_main clearfix" id="main">
        </div>
</div>
 
 
[#include "/business/pages/include/footer.html" /]
</body>
<script type="text/javascript">
    //var proId = '${RequestParameters.proId}';
    //var customerId = '${RequestParameters.customerId}';
    var planId='${RequestParameters.planId}';
    var subId='${RequestParameters.subId}';
    
    $(function() {
        query();
    })
    
    function query() {
        $.post("${base}/business/pages/health/healthCateData.html",{"planId":planId},function(data,textStatus) {
            $("#main").html(data);
        })
    }
    
    
    
    //添加分类
    function addCategory() {
        var url = "${base}/business/pages/health/addCommons.html?planId="+planId;
        window.top.openDialog("0","添加指标分类",
                 {},
                 {"width":40,"height":50},
                 [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
    }
    //修改计划分类
    function updateCate(id) {
        var url = "${base}/business/pages/health/updateCommons.html?planId="+planId+"&id="+id;
        window.top.openDialog("0","修改指标分类",
                 {},
                 {"width":40,"height":50},
                 [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
    }
    
    
    function addItem(categoryId) {
        window.top.openDialog("1","新增通用指标项",
                             {},
                             {"width":50,"height":50},
                             [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],
                             "${base}/business/pages/health/addCommonItem.html?categoryId="+categoryId);
    }
    
    
    function updateItem(id) {
        window.top.openDialog("1","修改通用指标项",
                             {},
                             {"width":50,"height":50},
                             [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],
                             "${base}/business/pages/health/updateCommonItem.html?id="+id);
    }
    
    
    //删除
    function delCate(id,type) {
        var msg;
        if(type == 1) {
            msg = "确定要启用该分类吗?";
        } else {
            msg = "确定要禁用该分类吗?";
        } 
        window.top.confirmInfo('信息确认', msg, function(){
           $.post("deleteCommons.html", {'id':id,"type":type,"planId":planId},function(data,textStatus){
              if(data=="1"){
                  window.top.popupTips("操作成功");
                query();
              } else {
                  window.top.popupTips("操作失败");
              }
          });
      });
    }
    
    function changeState(id,state) {
        var msg;
        if(state==1) {
          msg = "确定要启用吗?";
        } else {
          msg = "确定要禁用吗?";
        }
        window.top.confirmInfo('提示', msg, function(){
            $.post("${base}/business/pages/health/deleteCommonItem.html",{"id":id,"type":state},function(data,textStatus) {
                if(data == 1) {
                    window.top.popupTips("操作成功");
                    query();
                } else {
                    window.top.popupTips("操作失败");
                }
                query();
            })
        })
    }
    
</script>
</html>