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/group/edit.php

70 lines
3.0 KiB

<?php
use \common\libs\MyLib;
?>
<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>
<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:600px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">上级</td>
<td height="25" class="td_bg">
<select name="parent_id">
<option value="0">----无上级----</option>
<?php
foreach($group_items as $item) {
echo '<option value="'.$item->id.'"';
if($item->id == $info->parent_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="base_pay" type="text" id="base_pay" value="<?=$info->base_pay?>" style="width:120px;"/>元</td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">职务工资</td>
<td height="25" class="td_bg"><input name="job_pay" type="text" id="job_pay" value="<?=$info->job_pay?>" style="width:120px;"/>元</td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">岗位工资</td>
<td height="25" class="td_bg"><input name="station_pay" type="text" id="station_pay" value="<?=$info->station_pay?>" style="width:120px;"/>元</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">
$(function () {
//提交按钮
$("#submit-btn").click(function(){
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
$.post('/group/save',params,function(obj){
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//返回按钮
$('#back-btn').click(function(){
window.location.href='/group/index';
});
})
</script>