<!-- $Id: goods_search.htm 16790 2009-11-10 08:56:15Z $ -->
|
<script type="text/javascript" src="../js/jquery.js"></script>
|
<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"}
|
<!-- 商圈 -->
|
<select name="city" onchange="selectCity()">
|
<option value="">城市</option>
|
{foreach from=$city item=city}
|
{if $selectKey.city eq $city.city}
|
<option value="{$city.city}" selected="selected">{$city.region_name}</option>
|
{else}
|
<option value="{$city.city}">{$city.region_name}</option>
|
{/if}
|
{/foreach}
|
</select>
|
<select name="county" onchange="selectCounty()">
|
<option value="">区县</option>
|
</select>
|
<select name="district">
|
<option value="">商圈</option>
|
</select>
|
<!-- 分类 -->
|
<!--<select name="cat_id"><option value="0">{$lang.goods_cat}</option>{$cat_list}</select>-->
|
|
<!-- 推荐 -->
|
<!-- <select name="intro_type"><option value="0">{$lang.intro_type}</option>{html_options options=$intro_list selected=$smarty.get.intro_type}</select>-->
|
|
<!-- 上架 -->
|
<select name="is_on_sale"><option value=''>上架状态</option><option value="1">{$lang.on_sale}</option><option value="0">{$lang.not_on_sale}</option></select>
|
<select name="supplier_status"><option value=''>审核状态</option><option value="0">未审核</option><option value="1">已通过</option><option value="2">未通过</option></select>
|
{/if}
|
<!-- 关键字 -->
|
{$lang.keyword} <input type="text" name="keyword" size="15" />
|
<input type="submit" value="{$lang.button_search}" class="button" />
|
</form>
|
</div>
|
|
{literal}
|
<script language="JavaScript">
|
function searchGoods()
|
{
|
{/literal}
|
{if $smarty.get.act neq "trash"}
|
// listTable.filter['cat_id'] = document.forms['searchForm'].elements['cat_id'].value;
|
|
// listTable.filter['brand_id'] = document.forms['searchForm'].elements['brand_id'].value;
|
listTable.filter['supplier_status'] = document.forms['searchForm'].elements['supplier_status'].value;
|
// listTable.filter['intro_type'] = document.forms['searchForm'].elements['intro_type'].value;
|
listTable.filter['city'] = document.forms['searchForm'].elements['city'].value;
|
listTable.filter['county'] = document.forms['searchForm'].elements['county'].value;
|
listTable.filter['district_id'] = document.forms['searchForm'].elements['district'].value;
|
{if $suppliers_exists eq 1}
|
//listTable.filter['suppliers_id'] = document.forms['searchForm'].elements['supplier_id'].value;
|
{/if}
|
listTable.filter['is_on_sale'] = document.forms['searchForm'].elements['is_on_sale'].value;
|
{/if}
|
{literal}
|
listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
|
listTable.filter['page'] = 1;
|
|
listTable.loadList();
|
}
|
|
function selectCity(){
|
var city = $("select[name='city']").val();
|
$.ajax({url:'virtual_goods.php?act=selectCounty',
|
dataType: 'json',
|
data:{city:city},
|
success: function(data){
|
$('select[name="county"]').empty();
|
$('select[name="county"]').append('<option value="">区县</option>');
|
$('select[name="district"]').empty();
|
$('select[name="district"]').append('<option value="">商圈</option>');
|
$.each(data, function(i, item) {
|
$('select[name="county"]').append('<option value="'+item.county+'">'+item.region_name+'</option>');
|
})
|
}
|
});
|
}
|
|
function selectCounty(){
|
var county = $("select[name='county']").val();
|
$.ajax({url:'virtual_goods.php?act=selectDistrict',
|
dataType: 'json',
|
data:{county:county},
|
success: function(data){
|
|
$('select[name="district"]').empty();
|
$('select[name="district"]').append('<option value="">商圈</option>');
|
$.each(data, function(i, item) {
|
$('select[name="district"]').append('<option value="'+item.district_id+'">'+item.district_name+'</option>');
|
})
|
}
|
});
|
}
|
</script>
|
{/literal}
|