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.
129 lines
3.9 KiB
129 lines
3.9 KiB
|
3 years ago
|
<!-- $Id: goods_batch_add.htm 16544 2009-08-13 07:55:57Z liuhui $ -->
|
||
|
|
{include file="pageheader.htm"}
|
||
|
|
|
||
|
|
<div class="main-div">
|
||
|
|
<form action="goods_batch.php?act=upload" method="post" enctype="multipart/form-data" name="theForm" onsubmit="return formValidate()">
|
||
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||
|
|
<tr>
|
||
|
|
<td class="label">{$lang.export_format}</td>
|
||
|
|
<td><select name="data_cat" id="data_cat">
|
||
|
|
<option value="0">{$lang.select_please}</option>
|
||
|
|
{html_options options=$data_format}
|
||
|
|
</select></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td class="label">{$lang.goods_cat}</td>
|
||
|
|
<td>
|
||
|
|
<!-- <select name="cat" id="cat"><option value="0">{$lang.select_please}</option>{$cat_list}</select> -->
|
||
|
|
<input type="hidden" name="cat" id="cat" value="0" />
|
||
|
|
<select name="catList1" id="cat_list1" onchange="catList(this.value, 1)"><option value="0">{$lang.goods_cat}</option>{$cat_list}</select>
|
||
|
|
<script type="text/javascript">
|
||
|
|
// 分类分级 by qin
|
||
|
|
|
||
|
|
function catList(val, level)
|
||
|
|
{
|
||
|
|
var cat_id = val;
|
||
|
|
document.getElementById('cat').value = cat_id;
|
||
|
|
Ajax.call('goods.php?is_ajax=1&act=sel_cat', 'cat_id='+cat_id+'&cat_level='+level, catListResponse, 'GET', 'JSON');
|
||
|
|
}
|
||
|
|
|
||
|
|
function catListResponse(result)
|
||
|
|
{
|
||
|
|
if (result.error == '1' && result.message != '')
|
||
|
|
{
|
||
|
|
alert(result.message);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
var response = result.content;
|
||
|
|
var cat_level = result.cat_level; // 分类级别, 1为顶级分类
|
||
|
|
for(var i=cat_level;i<10;i++)
|
||
|
|
{
|
||
|
|
$("#cat_list"+Number(i+1)).remove();
|
||
|
|
}
|
||
|
|
if(response)
|
||
|
|
{
|
||
|
|
$("#cat_list"+cat_level).after(response);
|
||
|
|
}
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td class="label">{$lang.file_charset}</td>
|
||
|
|
<td><select name="charset" id="charset">
|
||
|
|
{html_options options=$lang_list}
|
||
|
|
</select></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td class="label">
|
||
|
|
<a href="javascript:showNotice('noticeFile');" title="{$lang.form_notice}"><img src="images/notice.gif" width="14" height="14" border="0" alt="{$lang.form_notice}"></a>
|
||
|
|
{$lang.csv_file}</td>
|
||
|
|
<td><input name="file" type="file" size="40">
|
||
|
|
<br />
|
||
|
|
<span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="noticeFile">{$lang.notice_file}</span></td>
|
||
|
|
</tr>
|
||
|
|
{foreach from=$download_list item=download key=charset}
|
||
|
|
<tr>
|
||
|
|
<td> </td>
|
||
|
|
<td><a href="goods_batch.php?act=download&charset={$charset}">{$download}</a></td>
|
||
|
|
</tr>
|
||
|
|
{/foreach}
|
||
|
|
<tr align="center">
|
||
|
|
<td colspan="2"><input name="submit" type="submit" id="submit" value="{$lang.button_submit}" class="button" /></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</form>
|
||
|
|
<table width="100%">
|
||
|
|
<tr>
|
||
|
|
<td> </td>
|
||
|
|
<td width="80%">{$lang.use_help}</td>
|
||
|
|
<td> </td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
{insert_scripts files="../js/utils.js,validator.js"}
|
||
|
|
{literal}
|
||
|
|
<script language="JavaScript">
|
||
|
|
var elements;
|
||
|
|
onload = function()
|
||
|
|
{
|
||
|
|
// 文档元素对象
|
||
|
|
elements = document.forms['theForm'].elements;
|
||
|
|
|
||
|
|
// 开始检查订单
|
||
|
|
startCheckOrder();
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 检查是否底级分类
|
||
|
|
*/
|
||
|
|
function checkIsLeaf(selObj)
|
||
|
|
{
|
||
|
|
if (selObj.options[selObj.options.selectedIndex].className != 'leafCat')
|
||
|
|
{
|
||
|
|
alert(goods_cat_not_leaf);
|
||
|
|
selObj.options.selectedIndex = 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 检查输入是否完整
|
||
|
|
*/
|
||
|
|
function formValidate()
|
||
|
|
{
|
||
|
|
if (elements['cat'].value <= 0)
|
||
|
|
{
|
||
|
|
alert(please_select_cat);
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
if (elements['file'].value == '')
|
||
|
|
{
|
||
|
|
alert(please_upload_file);
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
{/literal}
|
||
|
|
{include file="pagefooter.htm"}
|