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.
199 lines
8.0 KiB
199 lines
8.0 KiB
|
3 years ago
|
<!-- $Id: goods_search.htm 16790 2009-11-10 08:56:15Z wangleisvn $ -->
|
||
|
|
<div class="form-div">
|
||
|
|
<form action="javascript:searchGoods()" name="searchForm">
|
||
|
|
<img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
|
||
|
|
{if $smarty.get.act neq "trash"}
|
||
|
|
<!-- 分类 -->
|
||
|
|
<input type="hidden" name="cat_id" id="cat_id" value="0" />
|
||
|
|
<select name="catList1" id="cat_list1" onchange="catList(this.value, 1)"><option value="0">{$lang.goods_cat}</option>{$cat_list}</select>
|
||
|
|
|
||
|
|
<!-- 品牌 -->
|
||
|
|
{if $priv_ru eq 1}
|
||
|
|
<select name="sel_brand" id='selbrand' onchange="get_sel_mode(this.value)">
|
||
|
|
<option value="0">所有品牌</option>
|
||
|
|
<option value="1">自营品牌</option>
|
||
|
|
<option value="2">商家品牌</option>
|
||
|
|
</select>
|
||
|
|
{/if}
|
||
|
|
<select name="sel_mode" id="sel_mode" style="display: none;" onchange="get_selbrand(this.value)">
|
||
|
|
<option value="0">请选择</option>
|
||
|
|
<option value="1">按关键字</option>
|
||
|
|
<option value="2">按列表</option>
|
||
|
|
</select>
|
||
|
|
<input type="text" name="brand_keyword" id="brand_keyword" style="display: none; width: 10px;" />
|
||
|
|
<select name="brand_id" id="brandId" {if $priv_ru eq 1}style="display:none"{/if}><option value="0">{$lang.goods_brand}</option>{html_options options=$brand_list}</select>
|
||
|
|
{if $priv_ru eq 1}
|
||
|
|
<select name="store_brand" id="storeBrand" style="display:none"><option value="0">{$lang.goods_brand}</option>{html_options options=$store_brand}</select>
|
||
|
|
{/if}
|
||
|
|
<!-- 推荐 -->
|
||
|
|
<select name="intro_type"><option value="0">{$lang.intro_type}</option>{html_options options=$intro_list selected=$smarty.get.intro_type}</select>
|
||
|
|
{if $suppliers_exists eq 1}
|
||
|
|
<!-- 供货商 -->
|
||
|
|
<select name="suppliers_id"><option value="0">{$lang.intro_type}</option>{html_options options=$suppliers_list_name selected=$smarty.get.suppliers_id}</select>
|
||
|
|
{/if}
|
||
|
|
<!-- 上架 -->
|
||
|
|
<select name="is_on_sale"><option value=''>{$lang.intro_type}</option><option value="1">{$lang.on_sale}</option><option value="0">{$lang.not_on_sale}</option></select>
|
||
|
|
{/if}
|
||
|
|
<select name="review_status">
|
||
|
|
<option value="0">全部</option>
|
||
|
|
<option value="1">未审核</option>
|
||
|
|
<option value="2">审核未通过</option>
|
||
|
|
<option value="3">审核已通过</option>
|
||
|
|
</select>
|
||
|
|
<!-- 关键字 -->
|
||
|
|
{$lang.keyword} <input type="text" name="keyword" size="15" />
|
||
|
|
|
||
|
|
{if $priv_ru eq 1}
|
||
|
|
店铺名称
|
||
|
|
<select name="store_search" onchange="get_store_search(this.value)">
|
||
|
|
<option value="0">请选择...</option>
|
||
|
|
<option value="1">按店铺名称</option>
|
||
|
|
<option value="2">按期望店铺名称</option>
|
||
|
|
<option value="3">按入驻品牌+类型</option>
|
||
|
|
</select>
|
||
|
|
<select name="merchant_id" style="display:none">
|
||
|
|
{foreach from=$store_list item=store}
|
||
|
|
<option value="{$store.ru_id}">{$store.store_name}</option>
|
||
|
|
{/foreach}
|
||
|
|
</select>
|
||
|
|
<input name="store_keyword" type="text" style="display:none"/>
|
||
|
|
<select name="store_type" style="display:none">
|
||
|
|
<option value="0">店铺类型</option>
|
||
|
|
<option value="旗舰店">旗舰店</option>
|
||
|
|
<option value="专卖店">专卖店</option>
|
||
|
|
<option value="专营店">专营店</option>
|
||
|
|
<option value="馆">馆</option>
|
||
|
|
</select>
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
<input type="submit" value="{$lang.button_search}" class="button" />
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
{literal}
|
||
|
|
<script language="JavaScript">
|
||
|
|
|
||
|
|
{if $priv_ru eq 1}
|
||
|
|
function get_store_search(val){
|
||
|
|
if(val == 1){
|
||
|
|
document.forms['searchForm'].elements['merchant_id'].style.display = '';
|
||
|
|
document.forms['searchForm'].elements['store_keyword'].style.display = 'none';
|
||
|
|
document.forms['searchForm'].elements['store_type'].style.display = 'none';
|
||
|
|
}else if(val == 2){
|
||
|
|
document.forms['searchForm'].elements['merchant_id'].style.display = 'none';
|
||
|
|
document.forms['searchForm'].elements['store_keyword'].style.display = '';
|
||
|
|
document.forms['searchForm'].elements['store_type'].style.display = 'none';
|
||
|
|
}else if(val == 3){
|
||
|
|
document.forms['searchForm'].elements['merchant_id'].style.display = 'none';
|
||
|
|
document.forms['searchForm'].elements['store_keyword'].style.display = '';
|
||
|
|
document.forms['searchForm'].elements['store_type'].style.display = '';
|
||
|
|
}else{
|
||
|
|
document.forms['searchForm'].elements['merchant_id'].style.display = 'none';
|
||
|
|
document.forms['searchForm'].elements['store_keyword'].style.display = 'none';
|
||
|
|
document.forms['searchForm'].elements['store_type'].style.display = 'none';
|
||
|
|
}
|
||
|
|
}
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
function searchGoods()
|
||
|
|
{
|
||
|
|
{if $smarty.get.act neq "trash"}
|
||
|
|
listTable.filter['cat_id'] = document.forms['searchForm'].elements['cat_id'].value;
|
||
|
|
|
||
|
|
//传品牌归属值 ecmoban模板堂 --zhuo
|
||
|
|
if(document.forms['searchForm'].elements['sel_brand']){
|
||
|
|
listTable.filter['sel_brand'] = document.forms['searchForm'].elements['sel_brand'].value;
|
||
|
|
listTable.filter['store_brand'] = document.forms['searchForm'].elements['store_brand'].value;
|
||
|
|
}
|
||
|
|
|
||
|
|
listTable.filter['brand_id'] = document.forms['searchForm'].elements['brand_id'].value;
|
||
|
|
listTable.filter['review_status'] = document.forms['searchForm'].elements['review_status'].value;
|
||
|
|
listTable.filter['intro_type'] = document.forms['searchForm'].elements['intro_type'].value;
|
||
|
|
{if $suppliers_exists eq 1}
|
||
|
|
listTable.filter['suppliers_id'] = document.forms['searchForm'].elements['suppliers_id'].value;
|
||
|
|
{/if}
|
||
|
|
listTable.filter['is_on_sale'] = document.forms['searchForm'].elements['is_on_sale'].value;
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
{if $priv_ru eq 1}
|
||
|
|
listTable.filter['store_search'] = Utils.trim(document.forms['searchForm'].elements['store_search'].value);
|
||
|
|
listTable.filter['merchant_id'] = Utils.trim(document.forms['searchForm'].elements['merchant_id'].value);
|
||
|
|
listTable.filter['store_keyword'] = Utils.trim(document.forms['searchForm'].elements['store_keyword'].value);
|
||
|
|
listTable.filter['store_type'] = Utils.trim(document.forms['searchForm'].elements['store_type'].value);
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
|
||
|
|
// 品牌搜索 -qin
|
||
|
|
listTable.filter['brand_keyword'] = Utils.trim(document.forms['searchForm'].elements['brand_keyword'].value);
|
||
|
|
|
||
|
|
listTable.filter['sel_mode'] = Utils.trim(document.forms['searchForm'].elements['sel_mode'].value);
|
||
|
|
|
||
|
|
listTable.filter['page'] = 1;
|
||
|
|
|
||
|
|
listTable.loadList();
|
||
|
|
}
|
||
|
|
|
||
|
|
// 显示品牌选择方式
|
||
|
|
function get_sel_mode(val)
|
||
|
|
{
|
||
|
|
var brandId = document.getElementById('brandId');
|
||
|
|
var storeBrand = document.getElementById('storeBrand');
|
||
|
|
var brand_keyword = document.getElementById('brand_keyword');
|
||
|
|
|
||
|
|
var sel_mode = document.getElementById('sel_mode');
|
||
|
|
if(val == 0)
|
||
|
|
{
|
||
|
|
sel_mode.style.display = 'none';
|
||
|
|
brandId.style.display = 'none';
|
||
|
|
storeBrand.style.display = 'none';
|
||
|
|
brand_keyword.style.display = 'none';
|
||
|
|
}
|
||
|
|
else if(val == 1)
|
||
|
|
{
|
||
|
|
storeBrand.style.display = 'none';
|
||
|
|
sel_mode.style.display = '';
|
||
|
|
}
|
||
|
|
else if(val == 2)
|
||
|
|
{
|
||
|
|
brandId.style.display = 'none';
|
||
|
|
sel_mode.style.display = '';
|
||
|
|
}
|
||
|
|
}
|
||
|
|
//判断选择品牌归属 ecmoban模板堂 --zhuo
|
||
|
|
function get_selbrand(val){
|
||
|
|
var brandId = document.getElementById('brandId');
|
||
|
|
var storeBrand = document.getElementById('storeBrand');
|
||
|
|
var brand_keyword = document.getElementById('brand_keyword');
|
||
|
|
|
||
|
|
var selbrand = document.getElementById('selbrand').value;
|
||
|
|
|
||
|
|
if(val == 1)
|
||
|
|
{
|
||
|
|
brand_keyword.style.display = '';
|
||
|
|
brandId.style.display = 'none';
|
||
|
|
storeBrand.style.display = 'none';
|
||
|
|
}
|
||
|
|
else if(val == 2 && selbrand == 1)
|
||
|
|
{
|
||
|
|
brand_keyword.style.display = 'none';
|
||
|
|
|
||
|
|
brandId.style.display = '';
|
||
|
|
storeBrand.style.display = 'none';
|
||
|
|
}
|
||
|
|
else if(val == 2 && selbrand == 2)
|
||
|
|
{
|
||
|
|
brand_keyword.style.display = 'none';
|
||
|
|
|
||
|
|
brandId.style.display = 'none';
|
||
|
|
storeBrand.style.display = '';
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
brand_keyword.style.display = 'none';
|
||
|
|
brandId.style.display = 'none';
|
||
|
|
storeBrand.style.display = 'none';
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
{/literal}
|