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

80 lines
3.1 KiB

6 years ago
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="theFrm">
<input type="hidden" name="id" id="id" value="<?=$info->id?>">
<tr>
<td width="100" height="25" class="td_bg">所属分类</td>
<td height="25" class="td_bg"><?=$info->type->name?></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">编号</td>
<td height="25" class="td_bg"><?=sprintf("%07d",$info->code)?></td>
</tr>
<input type="hidden" name="car_no" id="car_no" value="<?=$info->car_no?>">
<tr>
<td width="100" height="25" class="td_bg">车牌号</td>
<td height="25" class="td_bg"><?=$info->car_no?></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">出库时间</td>
<td colspan="3" height="25" class="td_bg"><?=$info->use_date?></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">状态</td>
<td colspan="3" height="25" class="td_bg"><?=$info->getStatus()?></td>
</tr>
</form>
<tr>
<td height="22" colspan="4" align="center" class="td_bg">
<?php
if($info->status == 1) {
?>
<input id="use-btn" type=button class="ACT_btn" name=Submit1 value=" 使用 "/>
&nbsp;&nbsp;
<input id="cancel-btn" type=button class="ACT_btn" name=Submit2 value=" 退回 "/>
&nbsp;&nbsp;
<?php
}
?>
<input id="back-btn" type="button" class="ACT_btn" name="Submit3" 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 () {
//使用按钮
$("#use-btn").click(function(){
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
params += '&status=2';
$.post('/gift2/save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//退回按钮
$("#cancel-btn").click(function(){
if(confirm('是否确认提交?')) {
var params = $("#theFrm").serialize();
params += '&status=3';
$.post('/gift2/save',params,function(obj){
alert(obj.msg);
if(obj.success) {
$('#back-btn').click();
}
},'json');
}
});
//返回按钮
$('#back-btn').click(function(){
window.location.href='/gift2/gift1-index?<?=$back_params?>';
});
})
</script>