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

69 lines
2.2 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.
-->
<form id="area_add_form" method="post" action="index.php?app=logistics&ctl=admin_area&act=saveDlArea" class="tableform" >
<div class="division">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th><font color='red'>*</font><{t}>地区名称:<{/t}></th>
<td><{input type="text" name="local_name" maxlength="20" value=$area.local_name vtype="required"}></td>
</tr>
<tr>
<th><font color='red'>*</font><{t}>一级地区:<{/t}></th>
<td>
<{input type='text' id='p_region_name' name="region_name" readonly=true class="lnk" onclick='regionSelect(this)' value='' size="40" value=$area.region_name}><span class="notice-inline"></span>
<input type='hidden' id='p_region_id' name='p_region_id' value='<{$area.region_id}>'/>
</td>
</tr>
</table>
</div>
<input type="hidden" name="area_id" value="<{$area.area_id}>">
<div class="table-action">
<{button label=$___eccommon="保存"|t:'eccommon' type="button" id='save_area'}><input type="hidden" name="package" value="mainland">
<{button label=$___eccommon="取消"|t:'eccommon' isCloseDialogBtn="true"}>
</div>
</form>
<script>
function regionSelect(el){
// var el=$(el);
// Ex_Loader('modedialog',function(){
// new ModeDialog('index.php?app=logistics&ctl=admin_area&act=showRegionList',{
// width:250,height:340,params:{iptText:el,iptHidden:el.getParent().getElement('input[type=hidden]')}});
// });
new Dialog('index.php?app=logistics&ctl=admin_area&act=showRegionList&region_id='+$('p_region_id').value,{width:600,height:600,title:'选择地区',onClose:function(){
}});
}
$('save_area').addEvent('click',function(e){
var form=this.getParent('form');
var _this=this;
if($('p_region_id').value==''){
return MessageBox.error('<{t}>请选择区域<{/t}>');
}
form.store('target',{
onComplete:function(jsontext){
var json = Json.evaluate(jsontext);
if (typeof(json.error) != 'undefined'){
this.disabled=false;
}else{
$('area_add_form').getParent('.dialog').retrieve('instance').close();
}
}
});
form.fireEvent('submit',e);
});
</script>