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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>选择健康检查项</title>
[#include "/business/pages/include/static.html" /]
 
</head>
 
<body>
                       [#if items?? && items.datas?size>0]
                    <table class="display_form common_list_table">
                        <tr class="title">
                            <td width="5%">
                                   <input type="checkbox" id="checkAll" class="item"  onchange="checkbox_select()"/>
                               </td>
                               <td width="10%">序号</td>
                               <td width="15%">提醒项名称</td>
                               <td width="15%">配置分类</td>
                               <td width="35%">指标说明</td>
                               <td width="10%">期望值</td>
                               <td width="10%">优先级</td>
                               
                           </tr>
                               [#list items.datas as item]
                                <tr>
                                    <td class="list_btnmore_wrap">
                                           <a class="blue_txt lb_button" href="javascript:void(0);"><span  style="border:none;"><input type="checkbox" value="${item.ID}" name="item" class="item selectItem"/></span></a>
                                       </td>
                                    <td>${items.rowNum+item_index+1}</td>
                                       <td>${item.ITEM_NAME}</td>
                                       <td>${item.BUSINESS_NAME}</td>
                                       <td>${item.ITEM_NOTE}</td>
                                       <td>${item.EXPECT_VALUE}</td>
                                       <td>${item.PRIORITY_LEVEL_NAME}</td>
                                </tr>
                               [/#list]
                    </table>
                       [#else]
                       <div class="loadpos"><span class="nodata"></span></div>
                       [/#if]
 
<script type="text/javascript">
    var customerId = '${RequestParameters.customerId}';
    var b = false;
    function checkbox_select(){
        if($("#checkAll").attr("checked")){
            $("input[name=item]").attr("checked",true);
        }else{
            $("input[name=item]").attr("checked",false);
        }
    }
    
    
    
    function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            selectItems();
        }
    }
function selectItems() {
    var $item = $(":checkbox.item:checked");
    if($item.length==0) {
        popupTips("请至少选择一个维护项");
        return;
    }
    
    var items = new Array();
    $item.each(function() {
        items.push($(this).val());
    })
    
    var item = items.join(",");
    
    if(!b) {
        b = true;
        $.post("${base}/business/pages/customerconfig/slacustomer/saveHealthItems.html",{"customerId":customerId,"item":item},function(data,textStatus) {
            if(data==1) {
                window.top.popupTips("选择成功");
                window.top.query();
                window.top.hideDialog('0');
            } else {
                window.top.popupTips("选择失败");
                b = false;
            }
        })
    } else {
        popupTips("正在提交,请稍后......");
    }
}
 
</script>
 
</body>
</html>