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.

310 lines
14 KiB

3 years ago
<!-- $Id: goods_list.htm 17126 2010-04-23 10:30:26Z liuhui $ -->
{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js,../js/jquery-1.9.1.min.js,common.js"}
<style type="text/css">
.aSpan{
background:#F00; padding:2px 5px;
position:relative;
top:-5px;
}
.list-div .aSpan a{ text-decoration:none; color:#FFF;}
</style>
<!-- 商品搜索 -->
{include file="goods_search.htm"}
<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
<!-- start goods list -->
<div class="list-div" id="listDiv">
{/if}
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="80">
<input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
<a href="javascript:listTable.sort('goods_id'); ">{$lang.record_id}</a>{$sort_goods_id}
</th>
<th width="830"><a href="javascript:listTable.sort('goods_name'); ">{$lang.goods_name}</a>{$sort_goods_name}</th>
{if $priv_ru eq 1}
<th width="87">{$lang.goods_steps_name}</th>
{/if}
<th width="112"><a href="javascript:listTable.sort('goods_sn'); ">{$lang.goods_sn}</a>{$sort_goods_sn}</th>
<th style="display:none"><a href="javascript:listTable.sort('shop_price'); ">{$lang.shop_price}</a>{$sort_shop_price}</th>
<th width="42"><a href="javascript:listTable.sort('is_on_sale'); ">{$lang.is_on_sale}</a>{$sort_is_on_sale}</th>
{if $priv_ru eq 1}
<th width="42"><a href="javascript:listTable.sort('is_best'); ">{$lang.is_best}</a>{$sort_is_best}</th>
<th width="42"><a href="javascript:listTable.sort('is_new'); ">{$lang.is_new}</a>{$sort_is_new}</th>
<th width="42"><a href="javascript:listTable.sort('is_hot'); ">{$lang.is_hot}</a>{$sort_is_hot}</th>
{else}
<th width="42"><a href="javascript:listTable.sort('store_best'); ">{$lang.is_best}</a>{$sort_is_best}</th>
<th width="42"><a href="javascript:listTable.sort('store_new'); ">{$lang.is_new}</a>{$sort_is_new}</th>
<th width="42"><a href="javascript:listTable.sort('store_hot'); ">{$lang.is_hot}</a>{$sort_is_hot}</th>
{/if}
<th width="62"><a href="javascript:listTable.sort('sort_order'); ">{$lang.sort_order}</a>{$sort_sort_order}</th>
{if $use_storage}
<th style="display:none"><a href="javascript:listTable.sort('goods_number'); ">{$lang.goods_number}</a>{$sort_goods_number}</th>
{/if}
<th width="90">审核状态</th>
<th width="230">{$lang.handler}</th>
<tr>
{foreach from=$goods_list item=goods}
<tr>
<td><input type="checkbox" name="checkboxes[]" value="{$goods.goods_id}" />{$goods.goods_id}</td>
<td class="first-cell" style="{if $goods.is_promote}color:red;{/if}"><span onclick="listTable.edit(this, 'edit_goods_name', {$goods.goods_id})">{$goods.goods_name|escape:html}</span></td>
{if $priv_ru eq 1}
<td align="center">{if $goods.user_name}<font style="color:#F00;">{$goods.user_name}</font>{else}<font style="color:#0e92d0;">自营</font>{/if}</td>
{/if}
<td align="center"><span onclick="listTable.edit(this, 'edit_goods_sn', {$goods.goods_id})">{$goods.goods_sn}</span></td>
<td align="right" style="display:none"><span onclick="listTable.edit(this, 'edit_goods_price', {$goods.goods_id})">{$goods.shop_price}
</span></td>
<td align="center"><img src="images/{if $goods.is_on_sale}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_on_sale', {$goods.goods_id})" /></td>
{if $goods.user_id eq 0}
<td align="center"><img src="images/{if $goods.is_best}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_best', {$goods.goods_id})" /></td>
<td align="center"><img src="images/{if $goods.is_new}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_new', {$goods.goods_id})" /></td>
<td align="center"><img src="images/{if $goods.is_hot}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_hot', {$goods.goods_id})" /></td>
{else}
<td align="center"><img src="images/{if $goods.store_best}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_store_best', {$goods.goods_id})" /></td>
<td align="center"><img src="images/{if $goods.store_new}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_store_new', {$goods.goods_id})" /></td>
<td align="center"><img src="images/{if $goods.store_hot}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_store_hot', {$goods.goods_id})" /></td>
{/if}
<td align="center"><span onclick="listTable.edit(this, 'edit_sort_order', {$goods.goods_id})">{$goods.sort_order}</span></td>
{if $use_storage}
<td align="right" style="display:none"><span onclick="listTable.edit(this, 'edit_goods_number', {$goods.goods_id})">{$goods.goods_number}</span></td>
{/if}
<td align="center">
{if $goods.review_status eq 1}
<font style="color:#F90">未审核</font>
{elseif $goods.review_status eq 2}
<font style="color:#0e92d0">审核未通过</font><br/>
<a href="javascript:;" style="color:#C60" title="{$goods.review_content}">(提示)</a>
{elseif $goods.review_status eq 3 || $goods.review_status eq 4}
<font style="color:#F00">审核已通过</font>
{elseif $goods.review_status eq 5}
<font style="color:#007B7B">无需审核</font>
{/if}
</td>
<td align="center"><a href="../goods.php?id={$goods.goods_id}" target="_blank" title="{$lang.view}"><img src="images/icon_view.gif" width="21" height="21" border="0" /></a>
<a href="goods.php?act=edit&goods_id={$goods.goods_id}{if $code neq 'real_goods'}&extension_code={$code}{/if}" title="{$lang.edit}"><img src="images/icon_edit.gif" width="21" height="21" border="0" /></a>
<a href="goods.php?act=copy&goods_id={$goods.goods_id}{if $code neq 'real_goods'}&extension_code={$code}{/if}" title="{$lang.copy}"><img src="images/icon_copy.gif" width="21" height="21" border="0" /></a>
<a href="javascript:;" onclick="listTable.remove({$goods.goods_id}, '{$lang.trash_goods_confirm}')" title="{$lang.trash}"><img src="images/icon_trash.gif" width="21" height="21" border="0" /></a>
{if $specifications[$goods.goods_type] neq ''}
{if $goods.model_attr eq 1}
<a href="goods_warehouse_attr.php?act=warehouse_list&goods_id={$goods.goods_id}" title="{$lang.item_list}"><img src="images/icon_docs.gif" width="21" height="21" border="0" /></a>
{elseif $goods.model_attr eq 2}
<a href="goods_area_attr.php?act=warehouse_list&goods_id={$goods.goods_id}" title="{$lang.item_list}"><img src="images/icon_docs.gif" width="21" height="21" border="0" /></a>
{else}
<a href="goods.php?act=product_list&goods_id={$goods.goods_id}" title="{$lang.item_list}"><img src="images/icon_docs.gif" width="21" height="21" border="0" /></a>
{/if}
{else}
<img src="images/empty.gif" width="21" height="21" border="0" />
{/if}
{if $add_handler}
|
{foreach from=$add_handler item=handler}
<a href="{$handler.url}&goods_id={$goods.goods_id}" title="{$handler.title}"><img src="images/{$handler.img}" width="21" height="21" border="0" /></a>
{/foreach}
{/if}
</td>
</tr>
{foreachelse}
<tr><td class="no-records" colspan="11">{$lang.no_records}</td></tr>
{/foreach}
</table>
<!-- end goods list -->
<!-- 分页 -->
<table border="0" cellpadding="0" cellspacing="0" style="background:#f1f1f1; border-top:none;" >
<tr>
<td align="right" nowrap="true" style=" padding-right:10px;">
{include file="page.htm"}
</td>
</tr>
</table>
{if $full_page}
</div>
<div style="margin-left:18px; margin-top:10px;">
<input type="hidden" name="act" value="batch" />
<select name="type" id="selAction" onchange="changeAction()">
<option value="">{$lang.select_please}</option>
<option value="trash">{$lang.trash}</option>
<option value="on_sale">{$lang.on_sale}</option>
<option value="not_on_sale">{$lang.not_on_sale}</option>
{if $priv_ru eq 1}
<option value="best">{$lang.best}</option>
<option value="not_best">{$lang.not_best}</option>
<option value="new">{$lang.new}</option>
<option value="not_new">{$lang.not_new}</option>
<option value="hot">{$lang.hot}</option>
<option value="not_hot">{$lang.not_hot}</option>
<option value="move_to">{$lang.move_to}</option>
<option value="review_to">审核商品</option> <!--ecmoban模板堂 --zhuo-->
{if $suppliers_list > 0}
<option value="suppliers_move_to">{$lang.suppliers_move_to}</option>
{/if}
{/if}
</select>
<input type="hidden" name="target_cat" id="target_cat" value="0" />
<select name="movecatList1" id="move_cat_list1" style="display: none;" onchange="movecatList(this.value, 1)"><option value="0">{$lang.goods_cat}</option>{$cat_list}</select>
<!-- <select name="target_cat" style="display:none">
<option value="0">{$lang.select_please}</option>{$cat_list}
</select> -->
<script type="text/javascript">
// 分类分级 by qin
function movecatList(val, level)
{
var cat_id = val;
document.getElementById('target_cat').value = cat_id;
Ajax.call('goods.php?is_ajax=1&act=sel_cat_goodslist', 'cat_id='+cat_id+'&cat_level='+level, movecatListResponse, 'GET', 'JSON');
}
function movecatListResponse(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++)
{
$("#move_cat_list"+Number(i+1)).remove();
}
if(response)
{
$("#move_cat_list"+cat_level).after(response);
}
return;
}
</script>
<!--ecmoban模板堂 --zhuo start-->
<select name="review_status" onchange="get_review_status(this.value)" style="display:none">
<option value="4" selected="selected">全部</option>
<option value="1">未审核</option>
<option value="2">审核未通过</option>
<option value="3">审核已通过</option>
</select>
<input name="review_content" type="text" value="" style="display:none" />
<!--ecmoban模板堂 --zhuo start-->
{if $suppliers_list > 0}
<!--二级主菜单:转移供货商-->
<select name="suppliers_id" style="display:none;">
<option value="-1">{$lang.select_please}</option>
<option value="0">{$lang.lab_to_shopex}</option>
{foreach name=sln from=$suppliers_list item=sl}
<option value="{$sl.suppliers_id}">{$sl.suppliers_name}</option>
{/foreach}
</select>
<!--end!-->
{/if}
{if $code neq 'real_goods'}
<input type="hidden" name="extension_code" value="{$code}" />
{/if}
<input type="submit" value="{$lang.button_submit}" id="btnSubmit" name="btnSubmit" class="button" disabled="true" />
</div>
</form>
<script type="text/javascript">
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};
{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}
{literal}
onload = function()
{
startCheckOrder(); // 开始检查订单
document.forms['listForm'].reset();
}
/**
* @param: bool ext 其他条件:用于转移分类
*/
function confirmSubmit(frm, ext)
{
if (frm.elements['type'].value == 'trash')
{
return confirm(batch_trash_confirm);
}
else if (frm.elements['type'].value == 'not_on_sale')
{
return confirm(batch_no_on_sale);
}
else if (frm.elements['type'].value == 'move_to')
{
ext = (ext == undefined) ? true : ext;
return ext && frm.elements['target_cat'].value != 0;
}
else if (frm.elements['type'].value == '')
{
return false;
}
else
{
return true;
}
}
function changeAction()
{
var frm = document.forms['listForm'];
// 切换分类列表的显示
for (var i = 10; i >= 0; i--)
{
if (document.getElementById('move_cat_list'+i))
{
frm.elements['movecatList'+i].style.display = frm.elements['type'].value == 'move_to' ? '' : 'none';
}
}
//ecmoban模板堂 --zhuo start
// 切换商品审核列表的显示
frm.elements['review_status'].style.display = frm.elements['type'].value == 'review_to' ? '' : 'none';
if(frm.elements['type'].value != 'review_to'){
frm.elements['review_content'].style.display = 'none';
}
//ecmoban模板堂 --zhuo end
{if $suppliers_list > 0}
frm.elements['suppliers_id'].style.display = frm.elements['type'].value == 'suppliers_move_to' ? '' : 'none';
{/if}
if (!document.getElementById('btnSubmit').disabled &&
confirmSubmit(frm, false))
{
frm.submit();
}
}
//ecmoban模板堂 --zhuo start
function get_review_status(){
var frm = document.forms['listForm'];
if(frm.elements['type'].value == 'review_to'){
if(frm.elements['review_status'].value == 2){
frm.elements['review_content'].style.display = '';
}else{
frm.elements['review_content'].style.display = 'none';
}
}else{
frm.elements['review_content'].style.display = 'none';
}
}
//ecmoban模板堂 --zhuo end
{/literal}
</script>
{include file="pagefooter.htm"}
3 years ago
{/if}