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

61 lines
2.1 KiB

5 years ago
<?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>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<form id="frm">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr class="bg_tr">
<td>日期</td>
<td class="td_bg">
<input type="text" name="date" value="<?=$info->date?>" onclick="WdatePicker({dateFmt:'yyyy-MM'})" />
<input type="hidden" name="id" value="<?=$id?>" />
</td>
</tr>
<tr class="bg_tr">
<td>双休天数</td>
<td class="td_bg">
<input type="text" name="double_break" value="<?=$info->double_break?>" />
</td>
</tr>
<tr class="bg_tr">
<td>单休天数</td>
<td class="td_bg">
<input type="text" name="single_break" value="<?=$info->single_break?>" />
</td>
</tr>
<tr>
<td class="td_bg" colspan="2" align="center">
<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>
</form>
<script type="text/javascript">
$(function(){
//返回
$('#back-btn').click(function(){
window.location.href = '/work-day/index?<?=$back_params?>';
});
//提交
$('#submit-btn').click(function(){
if(confirm('是否确认提交?')) {
var params = $('#frm').serialize();
$.post('/work-day/save', params, function (obj) {
if(obj.success){
alert(obj.msg);
window.location.href = "/work-day/index?<?=$back_params?>";
}else{
alert(obj.msg);
}
});
}
});
})
</script>