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.
simple-yewu/frontend/views/gift-group/edit.php

85 lines
3.7 KiB

5 years ago
<table width="100%" border="0" align="center" cellpadding="2" 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 class="Ainput" name="name" type="text" id="name" value="<?=$info->name?>" style="width:300px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">针对岗位</td>
<td height="25" class="td_bg">
<input class="Ainput" name="group_ids" type="text" id="group_ids" value="<?=$info->group_ids?>" style="width:300px;"/>
注:如果针对全部岗位,则保持空。多个岗位之间用逗号间隔。
</td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">是否免费</td>
<td height="25" class="td_bg">
<label>
<input name="is_free" type="checkbox" id="is_free" value="1" <?=$info->is_free==1?'checked':''?>/>
</label>
</td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">是否需要车损险</td>
<td height="25" class="td_bg">
<label>
<input name="is_damage" type="checkbox" id="is_damage" value="1" <?=$info->is_damage==1?'checked':''?>/>
</label>
</td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">最低额度</td>
<td height="25" class="td_bg"><input class="Ainput" name="min_money" type="text" id="min_money" value="<?=$info->min_money?>" style="width:300px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">最高额度</td>
<td height="25" class="td_bg"><input class="Ainput" name="max_money" type="text" id="max_money" value="<?=$info->max_money?>" style="width:300px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">包含礼品</td>
<td height="25" class="td_bg">
<?php
foreach($gift_items as $item) {
echo '<label><input type="checkbox" name="gift_ids[]" value="'.$item->id.'"';
if(in_array($item->id,$gift_ids))
echo ' checked ';
echo '>'.$item->name.'</label>';
}
?>
</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=" 提交 "/>
&nbsp;&nbsp;
<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-group/save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//返回按钮
$('#back-btn').click(function(){
window.location.href='/gift-group/index';
});
})
</script>