Files
OMS/app/logistics/view/admin/regionSelect1.html
2025-12-28 23:13:25 +08:00

84 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
Copyright © ShopeX http://www.shopex.cn. All rights reserved.
See LICENSE file for license details.
-->
<style>
#con_m_list li {width:90px; overflow: hidden; float: left; margin-bottom: 10px; font-size: 12px; line-height: 20px;}
.current-set {color: red; font-weight: 700;}
</style>
<input type='hidden' id='sequence'/>
<div id='region-treelist-<{$sid}>-loading'></div>
<div id='region-treelist-<{$sid}>' class='x-tree-list'></div>
<div id="region-treelist" class="x-tree-list" style="padding-left:10px;width:600px;">
<{input type="checkbox" name="checkAll" id="checkAll"}>全选
<ul id='con_m_list'>
<{foreach from=$regionlist item=region}>
<li>
<span class="node">
<span class="node-handle" pid="0" nid="<{$region.region_id}>" hasc="0"> </span>
<span class="node-line"> </span>
<input type="checkbox" name="region" value="<{$region.region_id}>" pid="0" <{if is_array($region_ids) && in_array($region.region_id , $region_ids,true) }>checked<{/if}>>
<span class=""> </span>
<span class="node-names "><{$region.local_name}></span>
</span>
</li>
<{/foreach}>
</ul>
</div>
<div class="table-action">
<{button id="dlg_ok" class="btn btn-primary" label=$___eccommon="确定"|t:'eccommon'}>
<{button id="dlg_cancel-{$sid}" class="btn btn-secondary" label=$___eccommon="取消"|t:'eccommon' onclick="window.close();"}>
</div>
<script>
var sequence=$('sequence');
var sequence_dialog=sequence.getParent('div');
$('dlg_ok').addEvent('click',function(){
var nodes=sequence_dialog.getElements('.node').filter(function(n){
return n.getElement('input[type=checkbox]').checked;
});
var IDdatas=[];
var Namedatas=[];
nodes.each(function(node){
var v = node.getElement('input[type=checkbox]').getValue();
IDdatas.push(v);
var text = node.getElement('.node-names').get('text');
Namedatas.push(text);
});
$('p_region_id').set('value',IDdatas.join(','));
$('p_region_name').set('value',Namedatas.join(','));
$('dlg_ok').getParent('.dialog').retrieve('instance').close();
});
$('checkAll').addEvent('click',function(e){
if (this.checked==true)
{
sequence_dialog.getElements('input[name=region]').each(function(i,index){
i.set('checked',true);
});
}else{
sequence_dialog.getElements('input[name=region]').each(function(i,index){
i.set('checked',false);
});
}
});
</script>