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.
82 lines
3.3 KiB
82 lines
3.3 KiB
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
|
|
<form id="theFrm">
|
|
<input type="hidden" name="id" value="<?=$info->id?>">
|
|
<tr>
|
|
<td width="100" height="25" class="td_bg">名称</td>
|
|
<td height="25" class="td_bg">
|
|
<input name="name" type="text" id="name" value="<?=$info->name?>" style="width:400px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="td_bg">所属分类</td>
|
|
<td height="25" class="td_bg">
|
|
<select name="type_id">
|
|
<option value="0">---请选择---</option>
|
|
<?php
|
|
foreach($type_items as $item) {
|
|
echo '<option value="'.$item->id.'"';
|
|
if($info->type_id == $item->id)
|
|
echo ' selected ';
|
|
echo '>'.$item->name.'</option>';
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="td_bg">价格</td>
|
|
<td height="25" class="td_bg">
|
|
<input name="price" type="text" id="price" value="<?=$info->price?>" style="width:50px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="td_bg">描述</td>
|
|
<td height="25" class="td_bg">
|
|
<textarea name="remark" id="remark" style="width: 400px; height: 50px;"><?=$info->remark?></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="td_bg">总数量</td>
|
|
<td height="25" class="td_bg">
|
|
<input name="total" type="text" id="total" value="<?=$info->total?>" style="width:50px;"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100" height="25" class="td_bg">锁定量</td>
|
|
<td height="25" class="td_bg">
|
|
<input name="total_lock" type="text" id="total_lock" value="<?=$info->total_lock?>" style="width:50px;"/>
|
|
</td>
|
|
</tr>
|
|
</form>
|
|
<tr>
|
|
<td height="22" colspan="2" align="center" class="td_bg">
|
|
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
|
|
|
|
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
|
|
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
|
|
<script type="text/javascript" language="javascript">
|
|
$(function () {
|
|
//提交按钮
|
|
$("#submit-btn").click(function(){
|
|
if(confirm('是否确认提交?')) {
|
|
var params = $("#theFrm").serialize();
|
|
$.post('/gift/save',params,function(obj){
|
|
alert(obj.msg);
|
|
if(obj.success) {
|
|
$('#back-btn').click();
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
|
|
//返回按钮
|
|
$('#back-btn').click(function(){
|
|
window.location.href='/gift/index';
|
|
});
|
|
})
|
|
</script>
|
|
|