You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

125 lines
4.1 KiB

<!-- $Id: area_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
{if $priv_ru eq 1}
<div class="form-div">
<form method="post" action="warehouse.php" name="theForm" onsubmit="return add_area()">
{if $parent_id eq 0}新增仓库
<input type="text" name="region_name" maxlength="150" size="40" />
{else}
<input type="hidden" name="region_name" value="1" maxlength="150" size="40" />
仓库新增地区
<select name="regionId">
<option value="0" selected>{$lang.select_please}</option>
{foreach from=$ecs_region item=region name=noregion}
<option value="{$region.region_id}">{$region.region_name}</option>
{/foreach}
</select>
{/if}
<input type="hidden" name="region_type" value="{$region_type}" />
<input type="hidden" name="parent_id" value="{$parent_id}" />
<input type="submit" value="{$lang.button_submit}" class="button" />
</form>
</div>
{/if}
<!-- start category list -->
<div class="list-div">
<table cellspacing='1' cellpadding='3' id='listTable'>
<tr>
<th>{$area_here}</th>
</tr>
</table>
</div>
<div class="list-div" id="listDiv">
{/if}
<table cellspacing='1' cellpadding='3' id='listTable'>
<tr>
{foreach from=$region_arr item=list name=area_name}
{if $smarty.foreach.area_name.iteration > 1 and ($smarty.foreach.area_name.iteration-1) % 3 eq 0}
</tr><tr>
{/if}
<td class="first-cell" align="left">
{if $priv_ru eq 1 && $region_type eq 0}
<span onclick="listTable.edit(this, 'edit_area_name', '{$list.region_id}'); return false;">{$list.region_name|escape:"html"}</span>
{else}
{$list.region_name|escape:"html"}
{/if}
<span class="link-span" >
{if $priv_ru eq 0}
{if $list.region_child}
{if $list.child}
{if $region_type < 3}
<a href="warehouse.php?act=list&type={$list.region_type+1}&pid={$list.region_id}&regionId={$list.regionId}" title="{$lang.manage_area}">
{$lang.manage_area}</a>&nbsp;&nbsp;
{/if}
{/if}
{/if}
{else}
{if $region_type < 3}
<a href="warehouse.php?act=list&type={$list.region_type+1}&pid={$list.region_id}&regionId={$list.regionId}" title="{$lang.manage_area}">
{$lang.manage_area}</a>&nbsp;&nbsp;
{/if}
{/if}
{if $list.regionId > 0 && $freight_model eq 1}
<a href="warehouse.php?act=freight&id={$list.region_id}" title="运费管理">运费管理</a>
{/if}
{if $priv_ru eq 1}
<a href="javascript:listTable.remove({$list.region_id}, '{$lang.area_drop_confirm}', 'drop_area')" title="{$lang.drop}">{$lang.drop}</a>
{/if}
</span>
</td>
{/foreach}
</tr>
</table>
{if $full_page}
</div>
{literal}
<script language="JavaScript">
<!--
onload = function() {
document.forms['theForm'].elements['region_name'].focus();
// 开始检查订单
startCheckOrder();
}
/**
* 新建区域
*/
function add_area()
{
var region_name = Utils.trim(document.forms['theForm'].elements['region_name'].value);
var region_type = Utils.trim(document.forms['theForm'].elements['region_type'].value);
var parent_id = Utils.trim(document.forms['theForm'].elements['parent_id'].value);
if(document.forms['theForm'].elements['regionId']){
var regionId = Utils.trim(document.forms['theForm'].elements['regionId'].value);
}else{
var regionId = 0;
}
if (region_name.length == 0)
{
alert(region_name_empty);
}
else
{
Ajax.call('warehouse.php?is_ajax=1&act=add_area',
'parent_id=' + parent_id + '&region_name=' + region_name + '&region_type=' + region_type + '&regionId=' + regionId,
listTable.listCallback, 'POST', 'JSON');
}
return false;
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}
{/if}