Files
OMS/app/logistics/view/admin/addArea.html
2026-01-04 19:08:31 +08:00

80 lines
2.7 KiB
HTML

<!--
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>