|
|
|
|
<!-- $Id: presale_info.htm $ -->
|
|
|
|
|
{include file="pageheader.htm"}
|
|
|
|
|
{insert_scripts files="validator.js,../js/utils.js,../js/jquery-1.9.1.min.js,common.js"}
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
|
|
|
|
|
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
|
|
|
|
|
<!-- 商品搜索 -->
|
|
|
|
|
<div class="form-div">
|
|
|
|
|
<form action="javascript:searchGoods()" name="searchForm">
|
|
|
|
|
<img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
|
|
|
|
|
<!-- 分类 -->
|
|
|
|
|
<!-- <select name="cat_id"><option value="0">{$lang.all_cat}</caption>{$cat_list}</select> -->
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 品牌 -->
|
|
|
|
|
<select name="brand_id"><option value="0">{$lang.all_brand}</caption>{html_options options=$brand_list}</select>
|
|
|
|
|
<!-- 关键字 -->
|
|
|
|
|
<input type="text" name="keyword" size="20" />
|
|
|
|
|
<input type="hidden" name="ru_id" value="{$ru_id}" />
|
|
|
|
|
<input type="hidden" name="presale" value="1" />
|
|
|
|
|
<input type="submit" value="{$lang.button_search}" class="button" />
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<form method="post" action="presale.php?act=insert_update" name="theForm" onsubmit="return validate()">
|
|
|
|
|
<div class="main-div">
|
|
|
|
|
<table id="group-table" cellspacing="0" cellpadding="0" width="100%">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_goods_name}</td>
|
|
|
|
|
<td><select name="goods_id">
|
|
|
|
|
{if $presale.act_id}
|
|
|
|
|
<option value="{$presale.goods_id}">{$presale.goods_name}</option>
|
|
|
|
|
{else}
|
|
|
|
|
<option value="0">{$lang.notice_goods_name}</option>
|
|
|
|
|
{/if}
|
|
|
|
|
</select> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_act_name}</td>
|
|
|
|
|
<td><input name="act_name" type="text" id="act_name" value="{$presale.act_name}" size="60"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_start_date}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input name="start_time" type="text" id="start_time" size="22" value='{$presale.start_time}' readonly="readonly" /><input name="selbtn1" type="button" id="selbtn1" onclick="return showCalendar('start_time', '%Y-%m-%d %H:%M', '24', false, 'selbtn1');" value="{$lang.btn_select}" class="button"/>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_end_date}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input name="end_time" type="text" id="end_time" size="22" value='{$presale.end_time}' readonly="readonly" /><input name="selbtn2" type="button" id="selbtn2" onclick="return showCalendar('end_time', '%Y-%m-%d %H:%M', '24', false, 'selbtn2');" value="{$lang.btn_select}" class="button"/>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_presale_cat}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select name="cid" id="cat_parent_id">
|
|
|
|
|
<option value="0">{$lang.select_option}</option>
|
|
|
|
|
{$cat_select}
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_deposit}</td>
|
|
|
|
|
<td><input name="deposit" type="text" id="deposit" value="{$presale.deposit|default:0}" size="30"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label">{$lang.label_desc}</td>
|
|
|
|
|
<td><textarea name="act_desc" cols="40" rows="3" >{$presale.act_desc}</textarea></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="label"> </td>
|
|
|
|
|
<td>
|
|
|
|
|
<input name="act_id" type="hidden" id="act_id" value="{$presale.act_id}">
|
|
|
|
|
<input type="submit" name="submit" value="{$lang.button_submit}" class="button" />
|
|
|
|
|
<input type="reset" value="{$lang.button_reset}" class="button" />
|
|
|
|
|
{if $group_buy.status eq 1}
|
|
|
|
|
<input type="submit" name="finish" value="{$lang.button_finish}" class="button" onclick="return confirm('{$lang.notice_finish}')"/>
|
|
|
|
|
{elseif $group_buy.status eq 2}
|
|
|
|
|
<input type="submit" name="succeed" value="{$lang.button_succeed}" class="button" onclick="return confirm(succeed_confirm)" />{$lang.notice_succeed}<br />
|
|
|
|
|
<input type="submit" name="fail" value="{$lang.button_fail}" class="button" onclick="return confirm(fail_confirm)" />{$lang.notice_fail}
|
|
|
|
|
{elseif $group_buy.status eq 3}
|
|
|
|
|
<input type="submit" name="mail" value="{$lang.button_mail}" class="button" onclick="return confirm('{$lang.notice_mail}')" />
|
|
|
|
|
{/if}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<script language="JavaScript">
|
|
|
|
|
<!--
|
|
|
|
|
{literal}
|
|
|
|
|
|
|
|
|
|
// 检查新订单
|
|
|
|
|
startCheckOrder();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 检查表单输入的数据
|
|
|
|
|
*/
|
|
|
|
|
function validate()
|
|
|
|
|
{
|
|
|
|
|
validator = new Validator("theForm");
|
|
|
|
|
var eles = document.forms['theForm'].elements;
|
|
|
|
|
|
|
|
|
|
var goods_id = eles['goods_id'].value;
|
|
|
|
|
if (goods_id <= 0)
|
|
|
|
|
{
|
|
|
|
|
validator.addErrorMsg("商品不为空!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return validator.passed();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 搜索商品
|
|
|
|
|
*/
|
|
|
|
|
function searchGoods()
|
|
|
|
|
{
|
|
|
|
|
var filter = new Object;
|
|
|
|
|
filter.cat_id = document.forms['searchForm'].elements['cat_id'].value;
|
|
|
|
|
filter.brand_id = document.forms['searchForm'].elements['brand_id'].value;
|
|
|
|
|
filter.keyword = document.forms['searchForm'].elements['keyword'].value;
|
|
|
|
|
filter.ru_id = document.forms['searchForm'].elements['ru_id'].value;
|
|
|
|
|
filter.presale = document.forms['searchForm'].elements['presale'].value;
|
|
|
|
|
|
|
|
|
|
Ajax.call('presale.php?is_ajax=1&act=search_goods', filter, searchGoodsResponse, 'GET', 'JSON');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function searchGoodsResponse(result)
|
|
|
|
|
{
|
|
|
|
|
if (result.error == '1' && result.message != '')
|
|
|
|
|
{
|
|
|
|
|
alert(result.message);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sel = document.forms['theForm'].elements['goods_id'];
|
|
|
|
|
|
|
|
|
|
sel.length = 0;
|
|
|
|
|
|
|
|
|
|
/* 创建 options */
|
|
|
|
|
var goods = result.content;
|
|
|
|
|
if (goods)
|
|
|
|
|
{
|
|
|
|
|
for (i = 0; i < goods.length; i++)
|
|
|
|
|
{
|
|
|
|
|
var opt = document.createElement("OPTION");
|
|
|
|
|
opt.value = goods[i].goods_id;
|
|
|
|
|
opt.text = goods[i].goods_name;
|
|
|
|
|
sel.options.add(opt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var opt = document.createElement("OPTION");
|
|
|
|
|
opt.value = 0;
|
|
|
|
|
opt.text = search_is_null;
|
|
|
|
|
sel.options.add(opt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//-->
|
|
|
|
|
{/literal}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
{include file="pagefooter.htm"}
|