|
|
|
|
<!-- $Id: goods_batch_add.htm 16544 2009-08-13 07:55:57Z liuhui $ -->
|
|
|
|
|
{include file="pageheader.htm"}
|
|
|
|
|
<div class="main-div">
|
|
|
|
|
<form action="goods_produts_warehouse_batch.php?act=upload" method="post" enctype="multipart/form-data" name="theForm" onsubmit="return formValidate()">
|
|
|
|
|
<table cellspacing="1" cellpadding="3" width="100%">
|
|
|
|
|
{if $goods_name}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.goods_name}</td>
|
|
|
|
|
<td style="color:#F00; font-size:12px;">{$goods_name}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{if $attribute_list}
|
|
|
|
|
{foreach from=$attribute_list item=attribute}
|
|
|
|
|
<tr style="display:none">
|
|
|
|
|
<td class="label">{$attribute.attr_name}:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select name="goods_attr[]" id="goods_attr_list">
|
|
|
|
|
{foreach from=$attribute.goods_attr item=attr}
|
|
|
|
|
<option value="{$attr.goods_attr_id}">{$attr.attr_value}</option>
|
|
|
|
|
{/foreach}
|
|
|
|
|
</select>
|
|
|
|
|
<span style="color:#F00">(导出CSV属性类型)</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{/foreach}
|
|
|
|
|
{/if}
|
|
|
|
|
<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="16" height="16" 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}
|
|
|
|
|
{if $charset eq 'zh_cn'}
|
|
|
|
|
<tr>
|
|
|
|
|
<td> </td>
|
|
|
|
|
<td><a onclick="get_produts_batch('{$charset}', {$goods_id}, {$warehouse_id});" href="javascript:;">{$download}</a></td>
|
|
|
|
|
</tr>
|
|
|
|
|
{/if}
|
|
|
|
|
{/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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function get_produts_batch(charset, goods_id, warehouse_id){
|
|
|
|
|
|
|
|
|
|
var goods_attr = document.getElementsByName('goods_attr[]');
|
|
|
|
|
var spec_arr = new Array();
|
|
|
|
|
|
|
|
|
|
for(i=0; i<goods_attr.length; i++){
|
|
|
|
|
spec_arr[i] = goods_attr[i].value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// + "&goods_attr=" + spec_arr
|
|
|
|
|
|
|
|
|
|
location.href="goods_produts_warehouse_batch.php?act=download&charset=" +charset+ "&goods_id=" +goods_id+ "&warehouse_id=" + warehouse_id;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
{/literal}
|
|
|
|
|
{include file="pagefooter.htm"}
|