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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>地区选择</title>
[#include "/business/pages/include/static.html" /]
</head>
 
<body>
<div class="threet_level">
        [#if trees?? && trees?size>0]
            [#list trees as tree]
                <div class="threet_level_title navone firstTree"><a href="#">${tree.ADDRESS_NAME}</a> </div>
                [#if tree.ejTree?? && tree.ejTree?size>0]
                        <ul [#if tree.check == 1]style="display:block;"[#else]style="display:none;"[/#if]>
                    [#list tree.ejTree as ej]
                            <li><a href="#" class="secondTree">${ej.ADDRESS_NAME}</a>
                                [#if ej.sjTree?? && ej.sjTree?size>0]
                                        <ul  [#if ej.check == 1]style="display:block;"[#else]style="display:none;"[/#if]>
                                            [#list ej.sjTree as sj]
                                                <li><input [#if sj.check == 1]checked="checked"[/#if] name="address" type="radio" class="pos" style="position:relative;top:2px;margin-right:5px;" value="${tree.ID}-${ej.ID}-${sj.ID}" addressName="${tree.ADDRESS_NAME}-${ej.ADDRESS_NAME}-${sj.ADDRESS_NAME}"/><a href="#">${sj.ADDRESS_NAME}</a></li>
                                            [/#list]
                                        </ul>
                                [/#if]
                            </li>
                    [/#list]
                        </ul>
                [/#if]
            [/#list]
        [/#if]
    </div>
    
    
    <script type="text/javascript">
        $("div.firstTree").click(function() {
            var $nextUl = $(this).next("ul");
            if($nextUl.is(":visible")) {
                $(this).removeClass("focus");
                $nextUl.slideUp("show");
            } else {
                $(this).addClass("focus");
                $nextUl.slideDown("show");
            }
        });
        
        $("a.secondTree").click(function() {
            var $nextUl = $(this).next("ul");
            if($nextUl.is(":visible")) {
                $(this).parent().removeClass("focus");
                $nextUl.slideUp("show");
            } else {
                $(this).parent().addClass("focus");
                $nextUl.slideDown("show");
            }
        });
        
        function onDialogBtnClick(btnID, dialogID, config){
            if(btnID == "btnSure"){
                var $checkTree = $(":radio.pos:checked");
                   if($checkTree.length==0) {
                       popupTips("请选择区域");
                       return;
                   }
                   var addressId = $checkTree.val();
                   var addressName = $checkTree.attr("addressName");
                   [#if RequestParameters.iframe_lv1_id?length<=0]
                    window.parent.showArea(addressId,addressName);
                   [#else]
                       [#if RequestParameters.iframe_lv2_id?length<=0]
                       window.top.document.getElementById("${RequestParameters.iframe_lv1_id}").contentWindow
                        .showArea(addressId,addressName);        
                       [#else]
                           window.top.document.getElementById("${RequestParameters.iframe_lv1_id}").contentWindow
                               .document.getElementById("${RequestParameters.iframe_lv2_id}").contentWindow
                               .showArea(addressId,addressName);
                       [/#if]
                [/#if]
                   window.top.hideDialog(dialogID);
            }
        }
    </script>
</body>
</html>