<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>${Constants.UNIT_CONSTANTS}</title>
|
<!--(start) public flies-->
|
|
</head>
|
|
<body class="select_tree_body">
|
[#include "/business/pages/include/static.html" /]
|
<div class="select_tree">
|
<table class="st_title">
|
<tr>
|
<th width="14%">当前已选择:</th>
|
<td id="treeLabel">
|
|
[#if checkSl?? && checkSl?size>0]
|
[#list checkSl as sl]
|
<a><span class='removeSelect' sl='${sl.checkId}'>${sl.checkName}</span></a>
|
[/#list]
|
[/#if]
|
</td>
|
</tr>
|
</table>
|
<div class="first_level">
|
<div class="fl_title">
|
<input class="pos tree bigtree" name="treeValue" type="radio" [#if currCus.checked==1]checked="checked"[/#if] id="${currCus.ID}" value="${currCus.ID}" labelName="${currCus.CUSTOMER_NAME}" style="float:left;margin-top:12px;"/>
|
<h3>${currCus.CUSTOMER_NAME}</h3>
|
<a class="fl_morebtn"></a>
|
</div>
|
<table class="second_level">
|
[#if customers?? && customers?size>0]
|
[#list customers as customer]
|
<tr><th width="14%"><input class="pos tree" name="treeValue" type="radio" [#if customer.checked==1]checked="checked"[/#if] id="${customer.ID}" value="${customer.ID}" labelName="${customer.CUSTOMER_NAME}"><span>${customer.CUSTOMER_NAME}</span>:</th><td><div class="thrid_level">
|
<div class="thrid_level_con clearfix">
|
[#if customer.subs?? && customer.subs?size>0]
|
[#list customer.subs as sub]
|
<div class="tl_item">
|
<input class="pos tree" name="treeValue" type="radio" [#if sub.checked==1]checked="checked"[/#if] id="${sub.ID}" value="${sub.ID}" labelName="${sub.CUSTOMER_NAME}"/>
|
<span>${sub.CUSTOMER_NAME}</span>
|
</div>
|
[/#list]
|
[/#if]
|
</div>
|
</div></td><th class="tl_morebtn_wrap"><a class="tl_morebtn">更多</a></th></tr>
|
[/#list]
|
[/#if]
|
</table>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
$(function() {
|
$(".tree").click(function() {
|
var checkTree = $(".tree:checked");
|
var alreadySelect = "";
|
checkTree.each(function() {
|
var slId = $(this).attr("id");
|
alreadySelect += "<a><span class='removeSelect' sl='"+slId+"'>"+$(this).next('span').text()+"</span></a>";
|
});
|
|
$("#treeLabel").empty().append(alreadySelect);
|
});
|
|
$(".bigtree").click(function() {
|
var checkTree = $(".bigtree:checked");
|
var alreadySelect = "";
|
checkTree.each(function() {
|
var slId = $(this).attr("id");
|
alreadySelect += "<a><span class='removeSelect' sl='"+slId+"'>"+$(this).next('h3').text()+"</span></a>";
|
});
|
|
$("#treeLabel").empty().append(alreadySelect);
|
});
|
|
$(".removeSelect").live("click",function() {
|
var slId = $(this).attr("sl");
|
niceform("#"+slId).prop("checked",false);
|
$(this).parent().remove();
|
})
|
})
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var labelId = new Array();
|
var labelName = new Array();
|
var checkTree = $(".tree:checked");
|
var labelIds = "";
|
var labelNames = "";
|
|
if(checkTree.length!=0) {
|
checkTree.each(function() {
|
labelId.push($(this).val());
|
labelName.push($(this).attr("labelName"));
|
});
|
var labelIds = labelId.join(",");
|
var labelNames = labelName.join(",");
|
|
}
|
|
|
var type = '${RequestParameters.type}';
|
if(type==2) {
|
window.parent.showCus(labelIds,labelNames);
|
} else if(type==1) {
|
window.top.document.getElementById('baseMsgIframe').contentWindow.showCus(labelIds,labelNames);
|
}
|
|
window.top.hideDialog(dialogID);
|
}
|
}
|
</script>
|
</body>
|
</html>
|