parent
668f8bf4ab
commit
a0c3d5ea47
@ -1,65 +0,0 @@ |
||||
2467 |
||||
4/2467...京NZJ848...1158(范绍芬)...1171(王小丽)... |
||||
26/2467...京P286A5...1178(姜涛)...1041(练晓蓝)... |
||||
27/2467...京FF4512...1082(舒小燕)...3003(舒小燕)... |
||||
72/2467...京N0U486...0001(吴炜)...3005(饶丽云)... |
||||
84/2467...京N158H5...1158(范绍芬)...1171(王小丽)... |
||||
103/2467...京NWX242...1102(姜晶晶)...1064(陈丽)... |
||||
118/2467...京ND1X02...1082(舒小燕)...3003(舒小燕)... |
||||
141/2467...京ND1G28...9020(彭明艳)...9027(喻篮苹)... |
||||
144/2467...京KW5793...1054(蒋小华)...1172(黄学伟)... |
||||
150/2467...京N2UV97...1090(宋晓铃)...3004(宋晓铃)... |
||||
158/2467...京NQ03Q9...1132(何贤辰)...1099(王角)... |
||||
190/2467...京KC6332...2021(王岩静)...2002(陈丽丽)... |
||||
192/2467...京Y37932...1090(宋晓铃)...3004(宋晓铃)... |
||||
197/2467...京Q1Q2K6...1046(李琴)...1182(李一)... |
||||
201/2467...京Q5P2P7...1090(宋晓铃)...3004(宋晓铃)... |
||||
259/2467...京QK50J6...1144(占龙海)...1139(陈文超)... |
||||
284/2467...京QT6T81...1041(练晓蓝) ...1041(练晓蓝)... |
||||
285/2467...京QT3R29...9006(吴海英)...1159(徐丽红)... |
||||
324/2467...京N82N01...1175(黄娟)...1099(王角)... |
||||
355/2467...京QE81V3...1082(舒小燕)...3003(舒小燕)... |
||||
358/2467...京P81P62...1099(王角)...1172(黄学伟)... |
||||
401/2467...京QF81W7...1099(王角)...1158(范绍芬)... |
||||
507/2467...京N341B6...9011(陈焱秀)...1137(张书牙)... |
||||
555/2467...京H40440...1090(宋晓铃)...3004(宋晓铃)... |
||||
557/2467...京N9H0Y5...1178(姜涛)...1045(冯丽)... |
||||
563/2467...京QT2P99...1173(陈艳艳)...1041(练晓蓝)... |
||||
574/2467...京H17382...2010(董永涛)...2002(陈丽丽)... |
||||
583/2467...京NUE165...9008(郑慧萍)...1171(王小丽)... |
||||
586/2467...京P980A5...1159(徐丽红)...1101(徐剑丽)... |
||||
740/2467...京NFS410...1193(练鄢萍)...9016(魏小梅)... |
||||
765/2467...京NC6652...1123(练霞)...1183(郑瑶)... |
||||
775/2467...京HG1093...1090(宋晓铃)...3004(宋晓铃)... |
||||
785/2467...京N3A917...1099(王角)...1162(郑洪丽)... |
||||
823/2467...京QZ9M65...1182(李一)...9009(李建红)... |
||||
914/2467...京N6QK89...1144(占龙海)...3004(宋晓铃)... |
||||
1064/2467...京Q6Q7M5...1081(邓伟芬)...1182(李一)... |
||||
1102/2467...京ND0M02...1058(董淑斌)...3003(舒小燕)... |
||||
1111/2467...京Q8P1S1...2011(王晓亮)...2011(王晓亮)... |
||||
1147/2467...京Q0S6R5...1115(尤爱萍)...1109(庾名梅)... |
||||
1205/2467...京N6A060...1093(应楼炜)...9013(钟小利)... |
||||
1269/2467...京P8G668...1193(练鄢萍)...1190(刘利芬)... |
||||
1298/2467...京Q3M8V0...1082(舒小燕)...3003(舒小燕)... |
||||
1301/2467...京Q8P5P7...1081(邓伟芬)...1156(祝雨霞)... |
||||
1314/2467...京Q21C98...1173(陈艳艳)...9010(程小燕)... |
||||
1340/2467...京QY7G97...9006(吴海英)...1178(姜涛)... |
||||
1395/2467...京N2ZX77...1050(叶丽)...1182(李一)... |
||||
1409/2467...京N21MY7...1185(郑华丽)...1132(何贤辰)... |
||||
1410/2467...京Q1D1P7...1082(舒小燕)...3003(舒小燕)... |
||||
1499/2467...京N9X9X0...1185(郑华丽)...1178(姜涛)... |
||||
1557/2467...京QG38H9...9013(钟小利)...1194(周雪娜)... |
||||
1671/2467...京NX8E21...2046(张改双)...1099(王角)... |
||||
1748/2467...京QJ13P2...1090(宋晓铃)...3004(宋晓铃)... |
||||
1880/2467...京QQ5Z77...9006(吴海英)...1159(徐丽红)... |
||||
1945/2467...京Q9N8U6...1109(庾名梅)...1182(李一)... |
||||
1954/2467...京NT9Z51...1090(宋晓铃)...3004(宋晓铃)... |
||||
1955/2467...京QY2F06...1081(邓伟芬)...1101(徐剑丽)... |
||||
2020/2467...京Q3P5E1...1082(舒小燕)...3003(舒小燕)... |
||||
2039/2467...京Q9V0C3...1048(吴灵琳)...1108(童小琴)... |
||||
2139/2467...京N88G97...1099(王角)...1162(郑洪丽)... |
||||
2228/2467...京NHZ021...1172(黄学伟)...1102(姜晶晶)... |
||||
2351/2467...京N553V9...1090(宋晓铃)...3004(宋晓铃)... |
||||
2385/2467...京NW65L3...1076(罗美娟)...1058(董淑斌)... |
||||
2409/2467...京QZ6B06...1112(柳雅露)...1132(何贤辰)... |
||||
花费时间: 0小时0分钟6秒OK |
File diff suppressed because it is too large
Load Diff
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/bank/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/bank/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>银行管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增银行'; |
||||
layer_show(title, '/bank/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/bank/edit?id=' + id; |
||||
var title = '编辑银行'; |
||||
layer_show(title, '/bank/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/bank/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/bank/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/bank/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/bank/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/car-type/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/car-type/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>车辆类型</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增车辆类型'; |
||||
layer_show(title, '/car-type/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/car-type/edit?id=' + id; |
||||
var title = '编辑车辆类型'; |
||||
layer_show(title, '/car-type/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/car-type/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/car-type/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/car-type/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/car-type/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/car-use/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/car-use/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>运营性质</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增运营性质'; |
||||
layer_show(title, '/car-use/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/car-use/edit?id=' + id; |
||||
var title = '编辑运营性质'; |
||||
layer_show(title, '/car-use/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/car-use/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/car-use/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/car-use/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/car-use/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/city/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/city/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>城市管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增城市'; |
||||
layer_show(title, '/city/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/city/edit?id=' + id; |
||||
var title = '编辑城市'; |
||||
layer_show(title, '/city/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/city/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/city/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/city/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/city/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,235 +1,117 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<HEAD> |
||||
<TITLE>后台管理</TITLE> |
||||
<link href="/js/layout/jquery.layout.css" rel="stylesheet" type="text/css"> |
||||
<link href="/js/jqueryui/css/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css"> |
||||
</HEAD> |
||||
<BODY> |
||||
<DIV id="container" class="ui-layout-center" style="padding: 0px; overflow: hidden;"> |
||||
<div id="tabs" style="border: 0; padding: 0px; margin: 0px;"> |
||||
<ul> |
||||
<li><a href="#tabs-1">首页</a></li> |
||||
</ul> |
||||
<div id="tabs-1" style="overflow: hidden;"> |
||||
<div style="position: absolute; left: 50px; right: 50px; width: 900px; height: 300px;"> |
||||
<!-- |
||||
<object id="axDRSLC" classid="clsid:F47CFBF8-18A5-4620-9A7E-0E96B118D94A" height="300" width="900"></object> |
||||
//--> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="renderer" content="webkit"> |
||||
<title>汇盈车险业务系统 - 主页</title> |
||||
<!--[if lt IE 9]> |
||||
<meta http-equiv="refresh" content="0;/ie.html" /> |
||||
<![endif]--> |
||||
<link rel="shortcut icon" href="/favicon.ico"> |
||||
<link href="/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
||||
<link href="/assets/css/font-awesome.min.css?v=4.4.0" rel="stylesheet"> |
||||
<link href="/assets/css/animate.css" rel="stylesheet"> |
||||
<link href="/assets/css/style.css?v=4.1.0" rel="stylesheet"> |
||||
</head> |
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden"> |
||||
<div id="wrapper"> |
||||
<!--左侧导航开始--> |
||||
<nav class="navbar-default navbar-static-side" role="navigation"> |
||||
<div class="nav-close"><i class="fa fa-times-circle"></i></div> |
||||
<div class="sidebar-collapse"> |
||||
<ul class="nav" id="side-menu"> |
||||
<li class="nav-header"> |
||||
<div class="dropdown profile-element"> |
||||
<span><img alt="image" class="img-circle" src="/assets/img/profile_small.jpg" /></span> |
||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#"> |
||||
<span class="clear"> |
||||
<span class="block m-t-xs"><strong class="font-bold"><?=$this->context->my->username?> </strong></span>
|
||||
<span class="text-muted text-xs block"><?=$this->context->my->name?> <b class="caret"></b></span>
|
||||
</span> |
||||
</a> |
||||
<ul class="dropdown-menu animated fadeInRight m-t-xs"> |
||||
<li><a class="J_menuItem" href="/common/update-pwd">修改密码</a></li> |
||||
<li class="divider"></li> |
||||
<li><a href="/common/logout">安全退出</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="logo-element">菜单</div> |
||||
</li> |
||||
<?php foreach($menus as $item) { ?> |
||||
<li> |
||||
<a href="#"> |
||||
<i class="<?=$item['icon']?>"></i>
|
||||
<span class="nav-label"><?=$item['name']?></span>
|
||||
<span class="fa arrow"></span> |
||||
</a> |
||||
<?php if(isset($item['children'])) { ?> |
||||
<ul class="nav nav-second-level"> |
||||
<?php foreach($item['children'] as $sub_item) { ?> |
||||
<li> |
||||
<a class="J_menuItem" href="<?=$sub_item['path']?>" data-index="0"><?=$sub_item['name']?></a>
|
||||
</li> |
||||
<?php } ?> |
||||
</ul> |
||||
<?php } ?> |
||||
</li> |
||||
<?php } ?> |
||||
</ul> |
||||
</div> |
||||
</nav> |
||||
<!--左侧导航结束--> |
||||
<!--右侧部分开始--> |
||||
<div id="page-wrapper" class="gray-bg dashbard-1"> |
||||
<div class="row content-tabs"> |
||||
<button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i> |
||||
</button> |
||||
<nav class="page-tabs J_menuTabs"> |
||||
<div class="page-tabs-content"> |
||||
<a href="javascript:;" class="active J_menuTab" data-id="index_v1.html">首页</a> |
||||
</div> |
||||
</nav> |
||||
<button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i> |
||||
</button> |
||||
<div class="btn-group roll-nav roll-right"> |
||||
<button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span> |
||||
|
||||
</button> |
||||
<ul role="menu" class="dropdown-menu dropdown-menu-right"> |
||||
<li class="J_tabShowActive"><a>定位当前选项卡</a> |
||||
</li> |
||||
<li class="divider"></li> |
||||
<li class="J_tabCloseAll"><a>关闭全部选项卡</a> |
||||
</li> |
||||
<li class="J_tabCloseOther"><a>关闭其他选项卡</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
<a href="login.html" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a> |
||||
<a class="navbar-minimalize minimalize-styl-2 btn btn-success roll-right" href="#" style="position:fixed;bottom:50%;"> |
||||
<i class="fa fa-bars"></i> |
||||
</a> |
||||
</div> |
||||
<div class="row J_mainContent" id="content-main"> |
||||
<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="/common/welcome" frameborder="0" data-id="index_v1.html" seamless></iframe> |
||||
</div> |
||||
<div class="footer"> |
||||
<div class="pull-right">© 2014-2017 <a href="http://www.zi-han.net/" target="_blank">zihan's blog</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</DIV> |
||||
<DIV class="ui-layout-north" style="padding: 0px; overflow: hidden;"> |
||||
<iframe src="/common/top" frameborder="0" width="100%" height="59" scrolling="no"></iframe> |
||||
</DIV> |
||||
<DIV class="ui-layout-west" style="padding: 0px; overflow: hidden;"> |
||||
<iframe src="/common/left" frameborder="0" width="190" height="100%" scrolling="auto"></iframe> |
||||
</DIV> |
||||
<SCRIPT type="text/javascript" src="/js/jquery-1.8.3.js"></SCRIPT> |
||||
<SCRIPT type="text/javascript" src="/js/jqueryui/jquery-ui-1.9.2.custom.min.js"></SCRIPT> |
||||
<SCRIPT type="text/javascript" src="/js/layout/jquery.layout.js"></SCRIPT> |
||||
<SCRIPT type="text/javascript"> |
||||
var tabs; |
||||
function openTab(node) { |
||||
var label=node.name,id=node.id; |
||||
var index = tabs.find('li#tabs-'+id).index(); |
||||
if(index == -1) { |
||||
li = '<li id="tabs-'+id+'"><a href="#' + id + '">' + label + '</a><span class="ui-icon ui-icon-close" role="presentation">删除</span></li>', |
||||
tabContentHtml = '<iframe src="' + node.path + '" frameborder="0" width="100%" height="100%" scrolling="auto"></iframe>'; |
||||
var a = tabs.find( ".ui-tabs-nav" ).append( li ); |
||||
tabs.append('<div id="' + id + '" style="overflow: hidden; padding: 0px;">' + tabContentHtml + '</div>'); |
||||
tabs.tabs( "refresh" ); |
||||
} |
||||
tabs.tabs("option","active",index); |
||||
} |
||||
|
||||
var g_has_phone = false; |
||||
var strFJH = "<?=$this->context->my->ext_phone?>"; //分机号
|
||||
|
||||
function test() { |
||||
alert('test'); |
||||
} |
||||
|
||||
function CallPhone() |
||||
{ |
||||
var phone = $('#phone').val(); |
||||
drtCall(phone); |
||||
} |
||||
|
||||
function drtLogin() |
||||
{ |
||||
if(!g_has_phone) return; |
||||
n = document.all.axDRSLC.drtLogin("人工","<?=$this->context->my->ext_phone?>","<?=$this->context->my->ext_phone?>","123");
|
||||
if (n == 1){ |
||||
} |
||||
else { |
||||
alert("发送签入指令失败"); |
||||
} |
||||
window.setTimeout("drtAgentType()",3000); |
||||
} |
||||
|
||||
function drtLogout() |
||||
{ |
||||
if(!g_has_phone) return; |
||||
n = document.all.axDRSLC.drtLogout("人工","<?=$this->context->my->ext_phone?>");
|
||||
if (n == 1){ |
||||
// alert("发送签出指令成功"); |
||||
} |
||||
else alert("发送签出指令失败"); |
||||
} |
||||
|
||||
function drtAgentType() |
||||
{ |
||||
if(!g_has_phone) return; |
||||
strSLCType=1; |
||||
var n = document.all.axDRSLC.drtSetAgentType(parseInt(strSLCType)); |
||||
if (n == 1){ |
||||
// alert("发送设置座类型指令成功。" + strSLCType); |
||||
} |
||||
else alert("发送设置座类型指令失败。"); |
||||
} |
||||
|
||||
function drtCall(strCallee) |
||||
{ |
||||
if(!g_has_phone) return; |
||||
var n = document.all.axDRSLC.drtAutoDial(101,1,"801",strCallee); |
||||
if (n == 1) |
||||
{ |
||||
// alert("发送呼叫[" + strCallee + "]指令成功"); |
||||
} |
||||
else{alert("发送呼叫[" + strCallee + "]指令失败");} |
||||
} |
||||
function drtHook() |
||||
{ |
||||
if(!g_has_phone) return; |
||||
n = document.all.axDRSLC.drtHook("801"); |
||||
if (n == 1) |
||||
{ |
||||
// alert("发送软挂机指令成功"); |
||||
} |
||||
else |
||||
{ |
||||
alert("发送软挂机指令失败"); |
||||
} |
||||
} |
||||
|
||||
function funload() |
||||
{ |
||||
|
||||
try |
||||
{ |
||||
recivePacket(); |
||||
var objaxDRSLC = document.getElementById('axDRSLC'); |
||||
objaxDRSLC.drtSetStartParam("<?=$this->context->my->phoneServer?$this->context->my->phoneServer->ip:''?>", 9558);
|
||||
objaxDRSLC.drtSetLoginParam("人工", strFJH, strFJH, "123"); |
||||
objaxDRSLC.drtSetAutoDialParam(1, 1); |
||||
objaxDRSLC.drtSetAgentType(1); |
||||
|
||||
var strCurVersion=document.all.axDRSLC.GetVerson(); |
||||
// 设置座席姓名 |
||||
objaxDRSLC.drtSetXingMinParam("<?=$this->context->my->getShowName()?>");
|
||||
g_has_phone = true; |
||||
} |
||||
catch(e) |
||||
{ |
||||
g_has_phone = false; |
||||
// alert('加载控件失败。'); |
||||
} |
||||
} |
||||
// 启动数据接收 1ms接收一次 --- 此处要特别注意 |
||||
function recivePacket() |
||||
{ |
||||
if(!g_has_phone) { |
||||
window.setTimeout("recivePacket()",1); |
||||
return; |
||||
} |
||||
document.all.axDRSLC.drtRecivePacket(); |
||||
window.setTimeout("recivePacket()",1); |
||||
|
||||
} |
||||
var g_phone_id=0; |
||||
var g_phone_state = 0; |
||||
var g_count = 0; |
||||
//应答事件 |
||||
function eventOffHook(vStrCaller) { |
||||
if(vStrCaller == strFJH) { |
||||
$.post('/phone-server/phone-begin',{caller:vStrCaller,phone_id:g_phone_id},function(obj){ |
||||
if(obj.success) { |
||||
g_count++; |
||||
g_phone_id = obj.phone_id; |
||||
bTimer = true; |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
//挂机事件 |
||||
function eventHook(vStrCaller) { |
||||
if(vStrCaller == strFJH) { |
||||
if(g_phone_id > 0 && g_count > 0) { |
||||
g_count = 0; |
||||
$.post('/phone-server/phone-end',{caller:vStrCaller,phone_id:g_phone_id},function(obj){ |
||||
if(obj.success) { |
||||
g_phone_id = 0; |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
} |
||||
|
||||
$(document).ready(function () { |
||||
$('body').layout({ |
||||
north__size:59, |
||||
west__size:175, |
||||
north__spacing_open:0, |
||||
west__spacing_open:0 |
||||
}); |
||||
tabs = $( "#tabs" ).tabs({ heightStyle: "fill" }); |
||||
|
||||
tabs.on( "click", "span.ui-icon-close", function() { |
||||
var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" ); |
||||
$( "#" + panelId ).remove(); |
||||
tabs.tabs( "refresh" ); |
||||
}); |
||||
|
||||
tabs.on( "keyup", function( event ) { |
||||
if ( event.altKey && event.keyCode === $.ui.keyCode.BACKSPACE ) { |
||||
var panelId = tabs.find( ".ui-tabs-active" ).remove().attr( "aria-controls" ); |
||||
$( "#" + panelId ).remove(); |
||||
tabs.tabs( "refresh" ); |
||||
} |
||||
}); |
||||
//初始化软电话 |
||||
funload(); |
||||
}); |
||||
//收到忙音事件 |
||||
function eventBusyVoice(vStrCaller) |
||||
{ |
||||
if (vStrCaller == strFJH) |
||||
{ |
||||
if(g_phone_id > 0) { |
||||
g_count = 0; |
||||
$.post('/phone-server/phone-end',{caller:vStrCaller,phone_id:g_phone_id},function(obj){ |
||||
if(obj.success) { |
||||
g_phone_id = 0; |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
} |
||||
<!--右侧部分结束--> |
||||
</div> |
||||
|
||||
</SCRIPT> |
||||
<script language="javascript" type="text/javascript" For="axDRSLC" event="drtAnswerEvent(vStrCaller)"> |
||||
//应签 |
||||
eventOffHook(vStrCaller); |
||||
</script> |
||||
<script language="javascript" type="text/javascript" For="axDRSLC" event="drtHookEvent(vStrCaller)"> |
||||
//挂机 |
||||
eventHook(vStrCaller); |
||||
</script> |
||||
<script language="javascript" type="text/javascript" For="axDRSLC" event="drtBusyVoiceEvent(vCallerID)"> |
||||
//忙音 |
||||
eventBusyVoice(vCallerID); |
||||
</script> |
||||
</BODY> |
||||
</HTML> |
||||
<!-- 全局js --> |
||||
<script src="/assets/js/jquery.min.js?v=2.1.4"></script> |
||||
<script src="/assets/js/bootstrap.min.js?v=3.3.6"></script> |
||||
<script src="/assets/js/plugins/metisMenu/jquery.metisMenu.js"></script> |
||||
<script src="/assets/js/plugins/slimscroll/jquery.slimscroll.min.js"></script> |
||||
<script src="/assets/js/plugins/layer/layer.min.js"></script> |
||||
<!-- 自定义js --> |
||||
<script src="/assets/js/hplus.js?v=4.1.0"></script> |
||||
<script type="text/javascript" src="/assets/js/contabs.js"></script> |
||||
<!-- 第三方插件 --> |
||||
<script src="/assets/js/plugins/pace/pace.min.js"></script> |
||||
</body> |
||||
</html> |
||||
|
@ -1,25 +0,0 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
<title>首页</title> |
||||
<link href="/css/base.css" rel="stylesheet"> |
||||
<link href="/css/pages/index.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<div class="container"> |
||||
<div id="inner-hd"> |
||||
<div class="crumbs"> |
||||
<i class="crumbs-arrow"></i> |
||||
<a href="javascript:;" class="crumbs-label">首页</a> |
||||
</div> |
||||
</div> |
||||
<div id="inner-bd"> |
||||
</div> |
||||
<div id="inner-ft"> |
||||
|
||||
</div> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -1,64 +1,82 @@ |
||||
<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="city_id" id="city_id"> |
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($city_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($item->id == $info->city_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="order_id" type="text" id="order_id" value="<?=$info->order_id?>" 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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">所属城市</label> |
||||
<div class="col-md-5"> |
||||
<select name="city_id" id="city_id" class="form-control"> |
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($city_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($item->id == $info->city_id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">排序</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="order_id" value="<?=$info->order_id?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/district/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/district/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,98 +1,99 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>区县管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-field="city_name">所属城市</th> |
||||
<th data-field="order_id">排序</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增区县'; |
||||
layer_show(title, '/district/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/district/edit?id=' + id; |
||||
var title = '编辑区县'; |
||||
layer_show(title, '/district/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/district/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/district/index?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/district/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#order-btn').click(function(){ |
||||
if(confirm('是否批量保存排序?')) { |
||||
var params = $('#theFrm').serialize(); |
||||
$.post('/district/order-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/district/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
城市:<select name="city_id" id="city_id"> |
||||
<option value="0">全部</option> |
||||
<?php |
||||
foreach($city_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($item->id == $city_id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
<input type="button" class="act_btn" id="order-btn" name="order-btn" value="保存排序"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="200" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="70%" align="center" align="center" class="bg_tr">所属城市</td> |
||||
<td width="100" align="center" align="center" class="bg_tr">排序</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<form id="theFrm"> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->name?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->city->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
<input type="text" name="order_ids[<?=$item->id?>]" value="<?=$item->order_id?>" style="width:50px;">
|
||||
</td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</form> |
||||
<tr > |
||||
<td height="25" colspan="11" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,70 +1,90 @@ |
||||
<?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=" 提交 "/> |
||||
|
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">上级</label> |
||||
<div class="col-md-5"> |
||||
<select name="parent_id" class="form-control"> |
||||
<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> |
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">基本工资</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="base_pay" value="<?=$info->base_pay?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">职务工资</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="job_pay" value="<?=$info->job_pay?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">岗位工资</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="station_pay" value="<?=$info->station_pay?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/group/save',params,function(obj){ |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/group/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,55 +0,0 @@ |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="theFrm"> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">编号</td> |
||||
<td height="25" class="td_bg"> |
||||
从<input name="min_code" type="text" id="min_code" value="" style="width:50px;"/> |
||||
到<input name="max_code" type="text" id="max_code" value="" style="width:50px;"/> |
||||
</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.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
<tr> |
||||
<td height="22" colspan="4" 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('/gift2/add-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift1-index'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,78 +0,0 @@ |
||||
<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> |
||||
<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=" 使用 "/> |
||||
|
||||
<input id="cancel-btn" type=button class="ACT_btn" name=Submit2 value=" 退回 "/> |
||||
|
||||
<?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=0'; |
||||
$.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> |
@ -1,104 +0,0 @@ |
||||
<?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"> |
||||
//详情 |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/gift2/edit?id=' + id + '&back_params=' + encodeURIComponent(params); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/gift2/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/gift1-index?" + params; |
||||
}); |
||||
$('#input-btn').click(function(){ |
||||
window.location.href = '/gift2/add'; |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
window.location.href = '/gift2/output'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
编号:<input name="code" type="text" value="<?=$code?>">
|
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
状态:<select name="status"> |
||||
<option value="0" <?=$status==0?'selected':''?>>未使用</option>
|
||||
<option value="1" <?=$status==1?'selected':''?>>已出库</option>
|
||||
<option value="2" <?=$status==2?'selected':''?>>已使用</option>
|
||||
</select> |
||||
分类:<select name="type_id"> |
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($type_id == $item->id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="input-btn" name="input-btn" value="入库"> |
||||
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="30" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>礼券编号</td> |
||||
<td width="60%" align="center" class="bg_tr" nowrap>礼券</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
$start_index = ($page - 1) * 20 + $index; |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
|
||||
<td class="td_bg" nowrap><?=sprintf("%07d",$item->code)?></td>
|
||||
<td class="td_bg" nowrap><?=$item->type->name?></td>
|
||||
<td class="td_bg" nowrap><?=$item->car_no?></td>
|
||||
<td class="td_bg" nowrap><?=$item->use_date?></td>
|
||||
<td class="td_bg" ><?=$item->getStatus()?> </td>
|
||||
<td class="td_bg" ><?php |
||||
if($item->status > 0) |
||||
echo $item->user?$item->user->getShowName():'' |
||||
?></td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">操作</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,60 +0,0 @@ |
||||
<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"> |
||||
<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> |
||||
</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('/gift2/gift2-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift2-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,24 +0,0 @@ |
||||
<?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"> |
||||
$(function(){ |
||||
$('#input-btn').click(function(){ |
||||
window.location.href = '/gift2/gift2-list'; |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
window.location.href = '/gift2/ticket2-list'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="input-btn" name="input-btn" value="入库"> |
||||
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</table> |
@ -1,75 +0,0 @@ |
||||
<?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"> |
||||
//编辑 |
||||
function edit(id) { |
||||
window.location.href = '/gift2/gift2-edit?id=' + id; |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/gift2/gift2-delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/gift2-list?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
}); |
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift2-index'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="150" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>价格</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">描述</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>总数量</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->price?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=MyLib::substr_cut($item->remark,70)?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->total?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
@ -1,100 +0,0 @@ |
||||
<?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"> |
||||
//入库 |
||||
function add() { |
||||
window.location.href = '/gift2/add'; |
||||
} |
||||
//出库 |
||||
function output() { |
||||
window.location.href = '/gift2/output'; |
||||
} |
||||
//编辑 |
||||
function edit(id) { |
||||
window.location.href = '/gift2/edit?id=' + id; |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/gift2/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/index?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
add(); |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
output(); |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
编号:<input name="code" type="text" value="<?=$code?>">
|
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="入库"> |
||||
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="100" align="center" align="center" class="bg_tr" nowrap>编号</td> |
||||
<td width="100" align="center" align="center" class="bg_tr" nowrap>所属类型</td> |
||||
<td width="30%" align="center" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" align="center" class="bg_tr" nowrap>入库时间</td> |
||||
<td width="120" align="center" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="80" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=sprintf("%07d",$item->code)?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item->type?$item->type->name:''?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->car_no?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->input_date?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->status>1?$item->use_date:''?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->getStatus()?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->user?$item->user->getShowName():''?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
<?php |
||||
if($item->status > 0) { |
||||
?> |
||||
[<a href="javascript:void(0);" onclick="edit(<?= $item->id ?>)">修改</a>]
|
||||
<?php |
||||
} |
||||
?> |
||||
<!-- |
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
//--> |
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,110 +0,0 @@ |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="theFrm"> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
车牌号 |
||||
<input name="car_no" type="text" id="car_no" value="" style="width:100px;"/> |
||||
</td> |
||||
</tr> |
||||
<?php |
||||
$index = 0; |
||||
foreach($type_items as $item) { |
||||
?> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<label> |
||||
<input type="checkbox" name="types[<?=$index?>]" value="<?=$item->id?>"><?=$item->name?> |
||||
</label> |
||||
<input name="codes[<?=$index?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
$index++; |
||||
} |
||||
?> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
</form> |
||||
<tr> |
||||
<td height="22" colspan="4" align="center" class="td_bg"> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/output-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift1-index'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,76 +0,0 @@ |
||||
<?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"> |
||||
$(function(){ |
||||
$('#input-btn').click(function(){ |
||||
window.location.href = '/gift2/add'; |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
window.location.href = '/gift2/output'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
礼券统计 |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">礼券名称</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>总数量</td> |
||||
<td width="50" align="center" align="center" class="bg_tr">未出库</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>已出库</td> |
||||
</tr> |
||||
<?php |
||||
foreach($gift_type_items as $index => $gift_type_info) { |
||||
$total = $gift_type_info->getTickets()->count(); |
||||
$use_total = $gift_type_info->getTickets()->where('status>0')->count(); |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_type_info->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$total?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$total-$use_total?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$use_total?></td>
|
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
礼券统计 |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="150" align="center" align="center" class="bg_tr">礼品名称</td> |
||||
<td width="50" align="center" align="center" class="bg_tr">价格</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">描述</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>当前库存</td> |
||||
</tr> |
||||
<?php |
||||
foreach($gift_items as $index => $gift_info) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->price?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->remark?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->total?></td>
|
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
@ -1,117 +0,0 @@ |
||||
<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"> |
||||
<select name="gift_id" id="gift_id"> |
||||
<option value="0">请选择</option> |
||||
<?php |
||||
foreach($gift_items as $gift_info) { |
||||
echo '<option value="'.$gift_info->id.'"'; |
||||
if($gift_info->id == $info->gift_id) |
||||
echo ' selected '; |
||||
echo '>'.$gift_info->type->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">编号</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="code" type="text" id="code" value="<?=$info->code?>" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">车牌号</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="car_no" type="text" id="car_no" value="<?=$info->car_no?>" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">出库时间</td> |
||||
<td colspan="3" height="25" class="td_bg"><?=$info->output_date?></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 == 0) { |
||||
?> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<?php |
||||
} |
||||
if($info->status == 1) { |
||||
?> |
||||
<input id="use-btn" type=button class="ACT_btn" name=Submit2 value=" 使用 "/> |
||||
|
||||
<input id="cancel-btn" type=button class="ACT_btn" name=Submit3 value=" 退回 "/> |
||||
|
||||
<?php |
||||
} |
||||
?> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/ticket-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
//使用按钮 |
||||
$("#use-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=2'; |
||||
$.post('/gift2/ticket-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/ticket-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/ticket-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,72 +0,0 @@ |
||||
<?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"> |
||||
//详情 |
||||
function edit(id) { |
||||
window.location.href = '/gift2/ticket-edit?id=' + id; |
||||
} |
||||
|
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/ticket-list?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<tr> |
||||
<td class="td_bg"> |
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="30" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>礼券编号</td> |
||||
<td width="60%" align="center" class="bg_tr" nowrap>礼券</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>出库时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="30" align="center" class="bg_tr" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
$start_index = ($page - 1) * 20 + $index; |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
|
||||
<td class="td_bg" nowrap><?=$item->code?></td>
|
||||
<td class="td_bg" nowrap><?=$item->type->name?></td>
|
||||
<td class="td_bg" nowrap><?=$item->car_no?></td>
|
||||
<td class="td_bg" nowrap><?=$item->output_date?></td>
|
||||
<td class="td_bg" nowrap><?=$item->use_date?></td>
|
||||
<td class="td_bg" ><?=$item->getStatus()?> </td>
|
||||
<td class="td_bg" ><?=$item->user?$item->user->getShowName():''?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">操作</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,90 +0,0 @@ |
||||
<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"><?=$info->ticket->type->name?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼券编号</td> |
||||
<td height="25" class="td_bg"><?=sprintf("%07d",$info->ticket->code)?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼品</td> |
||||
<td height="25" class="td_bg"><?=$info->gift->name?></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->getSendType()?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">快递单号</td> |
||||
<td colspan="3" height="25" class="td_bg"><?=$info->send_no?></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 == 0) { |
||||
?> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<?php |
||||
} |
||||
if($info->status == 1) { |
||||
?> |
||||
<input id="cancel-btn" type=button class="ACT_btn" name=Submit3 value=" 退回 "/> |
||||
|
||||
<?php |
||||
} |
||||
?> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/ticket2-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/ticket2-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/ticket2-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,84 +0,0 @@ |
||||
<?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"> |
||||
//详情 |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/gift2/ticket2-output?id=' + id + '&back_params=' + encodeURIComponent(params); |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/ticket2-list?" + params; |
||||
}); |
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift2-index'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
编号:<input name="code" type="text" value="<?=$code?>">
|
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
分类:<select name="type_id"> |
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($type_id == $item->id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="30" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>礼券编号</td> |
||||
<td width="60%" align="center" class="bg_tr" nowrap>礼券</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
$start_index = ($page - 1) * 20 + $index; |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
|
||||
<td class="td_bg" nowrap><?=sprintf("%07d",$item->code)?></td>
|
||||
<td class="td_bg" nowrap><?=$item->type->name?></td>
|
||||
<td class="td_bg" nowrap><?=$item->car_no?></td>
|
||||
<td class="td_bg" nowrap><?=$item->use_date?></td>
|
||||
<td class="td_bg" ><?=$item->getStatus()?> </td>
|
||||
<td class="td_bg" ><?php |
||||
if($item->status > 0) |
||||
echo $item->user?$item->user->getShowName():'' |
||||
?></td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">操作</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,88 +0,0 @@ |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="theFrm"> |
||||
<input type="hidden" name="ticket_id" id="ticket_id" value="<?=$ticket_info->id?>">
|
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">所属分类</td> |
||||
<td height="25" class="td_bg"><?=$ticket_info->type->name?></select>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼券编号</td> |
||||
<td height="25" class="td_bg"><?=sprintf("%07d",$ticket_info->code)?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼品</td> |
||||
<td height="25" class="td_bg"><select name="gift_id" id="gift_id"> |
||||
<option value="0">请选择</option> |
||||
<?php |
||||
foreach ($gift_items as $gift_info) { |
||||
echo '<option value="' . $gift_info->id . '"'; |
||||
echo '>' . $gift_info->name . '</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">快递方式</td> |
||||
<td height="25" class="td_bg"> |
||||
<select name="send_type" id="send_type"> |
||||
<option value="0">请选择</option> |
||||
<option value="1">自上门</option> |
||||
<option value="2" selected>德邦快递</option> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">快递单号</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="send_no" type="text" id="send_no" value="" style="width:100px;"/> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
<tr> |
||||
<td height="22" colspan="4" align="center" class="td_bg"> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/ticket2-output-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/ticket2-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/ticket2-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,76 +1,100 @@ |
||||
<?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="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td align="center" width="50" align="center" class="bg_tr">序号</td> |
||||
<td width="60%" align="center" align="center" class="bg_tr">组名</td> |
||||
<td width="120" align="center" align="center" class="bg_tr">基本工资</td> |
||||
<td width="120" align="center" align="center" class="bg_tr">职务工资</td> |
||||
<td width="120" align="center" align="center" class="bg_tr">岗位工资</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$item['id']?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item['name']?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item['base_pay']?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item['job_pay']?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item['station_pay']?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item['id']?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item['id']?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>岗位管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-field="base_pay">基本工资</th> |
||||
<th data-field="job_pay">职务工资</th> |
||||
<th data-field="station_pay">岗位工资</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增岗位'; |
||||
layer_show(title, '/group/edit?id=0'); |
||||
} |
||||
?> |
||||
</table> |
||||
<script type="text/javascript" language="javascript"> |
||||
//权限 |
||||
// function permission(id) { |
||||
// var params = $('#searchForm').serialize(); |
||||
// window.location.href = '/group/permission?id=' + id; |
||||
// } |
||||
//编辑 |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/group/edit?id=' + id; |
||||
var title = '编辑岗位'; |
||||
layer_show(title, '/group/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/group/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/group/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/group/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
window.location.href = '/group/edit?id=0'; |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/group/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
|
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,58 +1,70 @@ |
||||
<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">SAM代码</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="sam" type="text" id="sam" value="<?=$info->sam?>" style="width:400px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">区别流程</td> |
||||
<td height="25" class="td_bg"> |
||||
普通流程: |
||||
<input name="difc" type="radio" value="1" <?php if($info->difc==1){ echo 'checked';}?>/>
|
||||
特殊流程: |
||||
<input name="difc" type="radio" value="2" <?php if($info->difc==2){ echo 'checked';}?>/>
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
</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> |
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">SAM代码</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="sam" value="<?=$info->sam?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<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('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/insurer-company/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/insurer-company/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,75 +1,98 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>保险公司</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th data-field="id">ID</th> |
||||
<th data-field="name">公司名称</th> |
||||
<th data-field="sam">SAM</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增保险公司'; |
||||
layer_show(title, '/insurer-company/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/insurer-company/edit?id=' + id; |
||||
var title = '编辑保险公司'; |
||||
layer_show(title, '/insurer-company/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/insurer-company/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/insurer-company/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/insurer-company/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/insurer-company/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="250" align="center" align="center" class="bg_tr">公司名称</td> |
||||
<td width="70%" align="center" align="center" class="bg_tr">SAM代码</td> |
||||
<td width="70%" align="center" align="center" class="bg_tr">区别流程</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->sam?></td>
|
||||
<td align="left" class="td_bg" nowrap > |
||||
<?php if($item->difc==1):?> |
||||
普通流程 |
||||
<?php elseif($item->difc==2):?> |
||||
特殊流程 |
||||
<?php else:?> |
||||
<?php endif;?> |
||||
</td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/insurer-company2/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/insurer-company2/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,55 +0,0 @@ |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="theFrm"> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">编号</td> |
||||
<td height="25" class="td_bg"> |
||||
从<input name="min_code" type="text" id="min_code" value="" style="width:50px;"/> |
||||
到<input name="max_code" type="text" id="max_code" value="" style="width:50px;"/> |
||||
</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.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
<tr> |
||||
<td height="22" colspan="4" 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('/gift2/add-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift1-index'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,78 +0,0 @@ |
||||
<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> |
||||
<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=" 使用 "/> |
||||
|
||||
<input id="cancel-btn" type=button class="ACT_btn" name=Submit2 value=" 退回 "/> |
||||
|
||||
<?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=0'; |
||||
$.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> |
@ -1,104 +0,0 @@ |
||||
<?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"> |
||||
//详情 |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/gift2/edit?id=' + id + '&back_params=' + encodeURIComponent(params); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/gift2/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/gift1-index?" + params; |
||||
}); |
||||
$('#input-btn').click(function(){ |
||||
window.location.href = '/gift2/add'; |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
window.location.href = '/gift2/output'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
编号:<input name="code" type="text" value="<?=$code?>">
|
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
状态:<select name="status"> |
||||
<option value="0" <?=$status==0?'selected':''?>>未使用</option>
|
||||
<option value="1" <?=$status==1?'selected':''?>>已出库</option>
|
||||
<option value="2" <?=$status==2?'selected':''?>>已使用</option>
|
||||
</select> |
||||
分类:<select name="type_id"> |
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($type_id == $item->id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="input-btn" name="input-btn" value="入库"> |
||||
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="30" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>礼券编号</td> |
||||
<td width="60%" align="center" class="bg_tr" nowrap>礼券</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
$start_index = ($page - 1) * 20 + $index; |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
|
||||
<td class="td_bg" nowrap><?=sprintf("%07d",$item->code)?></td>
|
||||
<td class="td_bg" nowrap><?=$item->type->name?></td>
|
||||
<td class="td_bg" nowrap><?=$item->car_no?></td>
|
||||
<td class="td_bg" nowrap><?=$item->use_date?></td>
|
||||
<td class="td_bg" ><?=$item->getStatus()?> </td>
|
||||
<td class="td_bg" ><?php |
||||
if($item->status > 0) |
||||
echo $item->user?$item->user->getShowName():'' |
||||
?></td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">操作</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,60 +0,0 @@ |
||||
<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"> |
||||
<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> |
||||
</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('/gift2/gift2-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift2-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,24 +0,0 @@ |
||||
<?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"> |
||||
$(function(){ |
||||
$('#input-btn').click(function(){ |
||||
window.location.href = '/gift2/gift2-list'; |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
window.location.href = '/gift2/ticket2-list'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="input-btn" name="input-btn" value="入库"> |
||||
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</table> |
@ -1,75 +0,0 @@ |
||||
<?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"> |
||||
//编辑 |
||||
function edit(id) { |
||||
window.location.href = '/gift2/gift2-edit?id=' + id; |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/gift2/gift2-delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/gift2-list?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
}); |
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift2-index'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="150" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>价格</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">描述</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>总数量</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->price?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=MyLib::substr_cut($item->remark,70)?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->total?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
@ -1,100 +0,0 @@ |
||||
<?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"> |
||||
//入库 |
||||
function add() { |
||||
window.location.href = '/gift2/add'; |
||||
} |
||||
//出库 |
||||
function output() { |
||||
window.location.href = '/gift2/output'; |
||||
} |
||||
//编辑 |
||||
function edit(id) { |
||||
window.location.href = '/gift2/edit?id=' + id; |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/gift2/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/index?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
add(); |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
output(); |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
编号:<input name="code" type="text" value="<?=$code?>">
|
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="入库"> |
||||
<input type="button" class="act_btn" id="output-btn" name="output-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="100" align="center" align="center" class="bg_tr" nowrap>编号</td> |
||||
<td width="100" align="center" align="center" class="bg_tr" nowrap>所属类型</td> |
||||
<td width="30%" align="center" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" align="center" class="bg_tr" nowrap>入库时间</td> |
||||
<td width="120" align="center" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="80" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=sprintf("%07d",$item->code)?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item->type?$item->type->name:''?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->car_no?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->input_date?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->status>1?$item->use_date:''?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->getStatus()?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->user?$item->user->getShowName():''?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
<?php |
||||
if($item->status > 0) { |
||||
?> |
||||
[<a href="javascript:void(0);" onclick="edit(<?= $item->id ?>)">修改</a>]
|
||||
<?php |
||||
} |
||||
?> |
||||
<!-- |
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
//--> |
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,110 +0,0 @@ |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="theFrm"> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
车牌号 |
||||
<input name="car_no" type="text" id="car_no" value="" style="width:100px;"/> |
||||
</td> |
||||
</tr> |
||||
<?php |
||||
$index = 0; |
||||
foreach($type_items as $item) { |
||||
?> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<label> |
||||
<input type="checkbox" name="types[<?=$index?>]" value="<?=$item->id?>"><?=$item->name?> |
||||
</label> |
||||
<input name="codes[<?=$index?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
$index++; |
||||
} |
||||
?> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" class="td_bg"> |
||||
<select name="types[<?=$index?>]">
|
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'">'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input name="codes[<?=$index++?>]" type="text" value="" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
</form> |
||||
<tr> |
||||
<td height="22" colspan="4" align="center" class="td_bg"> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/output-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift1-index'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,76 +0,0 @@ |
||||
<?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"> |
||||
$(function(){ |
||||
$('#input-btn').click(function(){ |
||||
window.location.href = '/gift2/add'; |
||||
}); |
||||
$('#output-btn').click(function(){ |
||||
window.location.href = '/gift2/output'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
礼券统计 |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">礼券名称</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>总数量</td> |
||||
<td width="50" align="center" align="center" class="bg_tr">未出库</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>已出库</td> |
||||
</tr> |
||||
<?php |
||||
foreach($gift_type_items as $index => $gift_type_info) { |
||||
$total = $gift_type_info->getTickets()->count(); |
||||
$use_total = $gift_type_info->getTickets()->where('status>0')->count(); |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_type_info->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$total?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$total-$use_total?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$use_total?></td>
|
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
礼券统计 |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="150" align="center" align="center" class="bg_tr">礼品名称</td> |
||||
<td width="50" align="center" align="center" class="bg_tr">价格</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">描述</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>当前库存</td> |
||||
</tr> |
||||
<?php |
||||
foreach($gift_items as $index => $gift_info) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->name?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->price?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->remark?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$gift_info->total?></td>
|
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
@ -1,117 +0,0 @@ |
||||
<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"> |
||||
<select name="gift_id" id="gift_id"> |
||||
<option value="0">请选择</option> |
||||
<?php |
||||
foreach($gift_items as $gift_info) { |
||||
echo '<option value="'.$gift_info->id.'"'; |
||||
if($gift_info->id == $info->gift_id) |
||||
echo ' selected '; |
||||
echo '>'.$gift_info->type->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">编号</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="code" type="text" id="code" value="<?=$info->code?>" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">车牌号</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="car_no" type="text" id="car_no" value="<?=$info->car_no?>" style="width:100px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">出库时间</td> |
||||
<td colspan="3" height="25" class="td_bg"><?=$info->output_date?></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 == 0) { |
||||
?> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<?php |
||||
} |
||||
if($info->status == 1) { |
||||
?> |
||||
<input id="use-btn" type=button class="ACT_btn" name=Submit2 value=" 使用 "/> |
||||
|
||||
<input id="cancel-btn" type=button class="ACT_btn" name=Submit3 value=" 退回 "/> |
||||
|
||||
<?php |
||||
} |
||||
?> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/ticket-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
//使用按钮 |
||||
$("#use-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=2'; |
||||
$.post('/gift2/ticket-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/ticket-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/ticket-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,72 +0,0 @@ |
||||
<?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"> |
||||
//详情 |
||||
function edit(id) { |
||||
window.location.href = '/gift2/ticket-edit?id=' + id; |
||||
} |
||||
|
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/ticket-list?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<tr> |
||||
<td class="td_bg"> |
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="出库"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="30" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>礼券编号</td> |
||||
<td width="60%" align="center" class="bg_tr" nowrap>礼券</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>出库时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="30" align="center" class="bg_tr" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
$start_index = ($page - 1) * 20 + $index; |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
|
||||
<td class="td_bg" nowrap><?=$item->code?></td>
|
||||
<td class="td_bg" nowrap><?=$item->type->name?></td>
|
||||
<td class="td_bg" nowrap><?=$item->car_no?></td>
|
||||
<td class="td_bg" nowrap><?=$item->output_date?></td>
|
||||
<td class="td_bg" nowrap><?=$item->use_date?></td>
|
||||
<td class="td_bg" ><?=$item->getStatus()?> </td>
|
||||
<td class="td_bg" ><?=$item->user?$item->user->getShowName():''?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">操作</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,90 +0,0 @@ |
||||
<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"><?=$info->ticket->type->name?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼券编号</td> |
||||
<td height="25" class="td_bg"><?=sprintf("%07d",$info->ticket->code)?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼品</td> |
||||
<td height="25" class="td_bg"><?=$info->gift->name?></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->getSendType()?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">快递单号</td> |
||||
<td colspan="3" height="25" class="td_bg"><?=$info->send_no?></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 == 0) { |
||||
?> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<?php |
||||
} |
||||
if($info->status == 1) { |
||||
?> |
||||
<input id="cancel-btn" type=button class="ACT_btn" name=Submit3 value=" 退回 "/> |
||||
|
||||
<?php |
||||
} |
||||
?> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/ticket2-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/ticket2-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/ticket2-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,84 +0,0 @@ |
||||
<?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"> |
||||
//详情 |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/gift2/ticket2-output?id=' + id + '&back_params=' + encodeURIComponent(params); |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/gift2/ticket2-list?" + params; |
||||
}); |
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/gift2-index'; |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
编号:<input name="code" type="text" value="<?=$code?>">
|
||||
车牌:<input name="car_no" type="text" value="<?=$car_no?>">
|
||||
分类:<select name="type_id"> |
||||
<option value="0">---请选择---</option> |
||||
<?php |
||||
foreach($type_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($type_id == $item->id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 "> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="30" align="center" class="bg_tr" nowrap>序号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>礼券编号</td> |
||||
<td width="60%" align="center" class="bg_tr" nowrap>礼券</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>车牌号</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>使用时间</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>状态</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作员</td> |
||||
<td width="120" align="center" class="bg_tr" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
$start_index = ($page - 1) * 20 + $index; |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg"n owrap ><?=$start_index + 1?></td>
|
||||
<td class="td_bg" nowrap><?=sprintf("%07d",$item->code)?></td>
|
||||
<td class="td_bg" nowrap><?=$item->type->name?></td>
|
||||
<td class="td_bg" nowrap><?=$item->car_no?></td>
|
||||
<td class="td_bg" nowrap><?=$item->use_date?></td>
|
||||
<td class="td_bg" ><?=$item->getStatus()?> </td>
|
||||
<td class="td_bg" ><?php |
||||
if($item->status > 0) |
||||
echo $item->user?$item->user->getShowName():'' |
||||
?></td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">操作</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr > |
||||
<td height="25" colspan="14" align="center" class="td_bg"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
@ -1,88 +0,0 @@ |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="theFrm"> |
||||
<input type="hidden" name="ticket_id" id="ticket_id" value="<?=$ticket_info->id?>">
|
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">所属分类</td> |
||||
<td height="25" class="td_bg"><?=$ticket_info->type->name?></select>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼券编号</td> |
||||
<td height="25" class="td_bg"><?=sprintf("%07d",$ticket_info->code)?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">礼品</td> |
||||
<td height="25" class="td_bg"><select name="gift_id" id="gift_id"> |
||||
<option value="0">请选择</option> |
||||
<?php |
||||
foreach ($gift_items as $gift_info) { |
||||
echo '<option value="' . $gift_info->id . '"'; |
||||
echo '>' . $gift_info->name . '</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">快递方式</td> |
||||
<td height="25" class="td_bg"> |
||||
<select name="send_type" id="send_type"> |
||||
<option value="0">请选择</option> |
||||
<option value="1">自上门</option> |
||||
<option value="2" selected>德邦快递</option> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">快递单号</td> |
||||
<td height="25" class="td_bg"> |
||||
<input name="send_no" type="text" id="send_no" value="" style="width:100px;"/> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
<tr> |
||||
<td height="22" colspan="4" align="center" class="td_bg"> |
||||
<input id="output-btn" type=button class="ACT_btn" name=Submit1 value=" 出库 "/> |
||||
|
||||
<input id="back-btn" type="button" class="ACT_btn" name="Submit4" 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 () { |
||||
//出库按钮 |
||||
$("#output-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
var params = $("#theFrm").serialize(); |
||||
params += '&status=1'; |
||||
$.post('/gift2/ticket2-output-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/ticket2-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/gift2/ticket2-list'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>业务保险公司</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增业务保险公司'; |
||||
layer_show(title, '/insurer-company2/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/insurer-company2/edit?id=' + id; |
||||
var title = '编辑业务保险公司'; |
||||
layer_show(title, '/insurer-company2/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/insurer-company2/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/insurer-company2/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/insurer-company2/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/insurer-company2/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">公司名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,63 +1,84 @@ |
||||
<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"> |
||||
<input name="code" type="text" id="code" value="<?=$info->code?>" style="width:50px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">内容</td> |
||||
<td height="25" class="td_bg"> |
||||
<textarea name="content" id="content" style="width: 400px; height: 50px;"><?=$info->content?></textarea>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg"></td> |
||||
<td height="25" class="td_bg"> |
||||
<label> |
||||
<input name="has_nopay" type="checkbox" id="has_nopay" value="1" <?=$info->has_nopay?'checked':''?>/>
|
||||
不计免赔 |
||||
</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=" 提交 "/> |
||||
|
||||
<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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">代码</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="code" value="<?=$info->code?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">内容</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="content" value="<?=$info->content?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">不计免赔</label> |
||||
<div class="col-md-3"> |
||||
<label class="i-checks form-control-static"> |
||||
<input type="checkbox" name="has_nopay" value="1" <?=$info->has_nopay==1?'checked':''?> ><i></i> 是
|
||||
</label> |
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
$('.i-checks').iCheck({ |
||||
checkboxClass: 'icheckbox_square-green', |
||||
radioClass: 'iradio_square-green', |
||||
}); |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/insurer-type/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/insurer-type/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,68 +1,100 @@ |
||||
<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"> |
||||
//编辑 |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>险种管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th data-field="id">ID</th> |
||||
<th data-field="name">险种</th> |
||||
<th data-field="code">代码</th> |
||||
<th data-field="content">内容</th> |
||||
<th data-field="has_nopay">不计免赔</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增保险公司'; |
||||
layer_show(title, '/insurer-type/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/insurer-type/edit?id=' + id; |
||||
var title = '编辑保险公司'; |
||||
layer_show(title, '/insurer-type/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/insurer-type/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/insurer-type/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/insurer-type/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/insurer-type/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
代码:<input style="width:50px;" name="code" type="text" value="<?=$code?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="150" align="center" align="center" class="bg_tr">险种</td> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>代码</td> |
||||
<td width="50%" align="center" align="center" class="bg_tr">内容</td> |
||||
<td width="70" align="center" align="center" class="bg_tr" nowrap>不计免赔</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item->code?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->content?></td>
|
||||
<td align="center" class="td_bg" nowrap ><?=$item->has_nopay?'是':''?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,79 +1,96 @@ |
||||
<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="parent_id" id="parent_id"> |
||||
<option value="0">--无上级---</option> |
||||
<?php |
||||
foreach($parent_items as $item) { |
||||
echo '<option value="'.$item['id'].'"'; |
||||
if($item['id'] == $info->parent_id) |
||||
echo ' selected '; |
||||
echo '>'; |
||||
echo $item['name']; |
||||
echo '</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">区别</td> |
||||
<td height="25" class="td_bg"> |
||||
新保: |
||||
<input name="difc" type="radio" value="1" <?php if($info->difc==1){ echo 'checked';}?>/>
|
||||
续保: |
||||
<input name="difc" type="radio" value="2" <?php if($info->difc==2){ echo 'checked';}?>/>
|
||||
增加新保 |
||||
<input name="difc" type="radio" value="3" <?php if($info->difc==3){ echo 'checked';}?>/>
|
||||
增加清洗库 |
||||
<input name="difc" type="radio" value="4" <?php if($info->difc==4){ echo 'checked';}?>/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">排序</td> |
||||
<td height="25" class="td_bg"> |
||||
<input type="text" name="paixu_id" value="<?=$info->paixu_id?>">
|
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">上级</label> |
||||
<div class="col-md-5"> |
||||
<select name="parent_id" class="form-control"> |
||||
<option value="0">--无上级---</option> |
||||
<?php |
||||
foreach($parent_items as $item) { |
||||
echo '<option value="'.$item['id'].'"'; |
||||
if($item['id'] == $info->parent_id) |
||||
echo ' selected '; |
||||
echo '>'; |
||||
echo $item['name']; |
||||
echo '</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">区别</label> |
||||
<div class="col-md-5"> |
||||
<select name="difc" class="form-control"> |
||||
<option value="0"></option> |
||||
<option value="1" <?=$info->difc==1?'selected':''?>>新保</option>
|
||||
<option value="2" <?=$info->difc==2?'selected':''?>>续保</option>
|
||||
<option value="3" <?=$info->difc==3?'selected':''?>>增加新保</option>
|
||||
<option value="4" <?=$info->difc==4?'selected':''?>>增加清洗库</option>
|
||||
</select> |
||||
</div> |
||||
<label class="col-md-1 control-label">排序</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="paixu_id" value="<?=$info->paixu_id?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<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('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/invalid/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/invalid/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,77 +1,98 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>无效状态</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-field="type">状态</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增无效状态'; |
||||
layer_show(title, '/invalid/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/invalid/edit?id=' + id; |
||||
var title = '编辑无效状态'; |
||||
layer_show(title, '/invalid/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/invalid/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/invalid/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/invalid/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/invalid/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
|
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td align="center" width="24" align="center" class="bg_tr">序号</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">状态</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item['name']?></td>
|
||||
<td align="left" class="td_bg" nowrap > |
||||
<?php if($item->difc==1):?> |
||||
新保 |
||||
<?php elseif($item->difc==2):?> |
||||
续保 |
||||
<?php elseif($item->difc==3):?> |
||||
新增加新保 |
||||
<?php elseif($item->difc==4):?> |
||||
新增加清洗 |
||||
<?php endif;?> |
||||
</td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item['id']?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item['id']?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -0,0 +1,42 @@ |
||||
<?php |
||||
|
||||
/* @var $this \yii\web\View */ |
||||
/* @var $content string */ |
||||
|
||||
use yii\helpers\Html; |
||||
?> |
||||
<?php $this->beginPage() ?> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<title><?= Html::encode($this->title) ?></title>
|
||||
<?=Html::csrfMetaTags() ?> |
||||
<link rel="shortcut icon" href="favicon.ico"> |
||||
<link href="/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
||||
<link href="/assets/css/font-awesome.css?v=4.4.0" rel="stylesheet"> |
||||
<?php if (isset($this->blocks['header_css'])): ?> |
||||
<?= $this->blocks['header_css'] ?> |
||||
<?php endif; ?> |
||||
<link href="/assets/css/animate.css" rel="stylesheet"> |
||||
<link href="/assets/css/style.css?v=4.1.1" rel="stylesheet"> |
||||
</head> |
||||
<body class="gray-bg"> |
||||
<?php $this->beginBody() ?> |
||||
<?=$content ?> |
||||
<!-- 全局js --> |
||||
<script src="/assets/js/jquery.min.js?v=2.1.4"></script> |
||||
<script src="/assets/js/bootstrap.min.js?v=3.3.6"></script> |
||||
<script src="/assets/js/plugins/iCheck/icheck.min.js"></script> |
||||
<script src="/assets/js/plugins/layer/layer.min.js"></script> |
||||
<!-- 自定义js --> |
||||
<script src="/assets/js/content.js?v=1.0.0"></script> |
||||
|
||||
<!-- Bootstrap table --> |
||||
<?php if (isset($this->blocks['footer_js'])): ?> |
||||
<?= $this->blocks['footer_js'] ?> |
||||
<?php endif; ?> |
||||
<?php $this->endBody() ?> |
||||
</body> |
||||
</html> |
||||
<?php $this->endPage() ?> |
@ -1,58 +1,76 @@ |
||||
<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="code" type="text" id="code" value="<?=$info->code?>" style="width:400px;"/>
|
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td width="100" height="25" class="td_bg">类型</td> |
||||
<td class="td_bg"> |
||||
<select name="mtype"> |
||||
<option value="0">--请选择类型--</option> |
||||
<option <?=$info->mtype==1?'selected':''?> value="1">新保(续保)组</option>
|
||||
<option <?=$info->mtype==2?'selected':''?> value="2">跟踪组</option>
|
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">代码</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="code" value="<?=$info->code?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">类型</label> |
||||
<div class="col-md-5"> |
||||
<select name="mtype" class="form-control"> |
||||
<option value="0">--请选择类型--</option> |
||||
<option <?=$info->mtype==1?'selected':''?> value="1">新保(续保)组</option>
|
||||
<option <?=$info->mtype==2?'selected':''?> value="2">跟踪组</option>
|
||||
</select> |
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/meet/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/meet/list'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,82 +1,99 @@ |
||||
<?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"> |
||||
$(function(){ |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
}); |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/meet/list?" + params; |
||||
}); |
||||
}); |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>预约状态</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-field="code">代码</th> |
||||
<th data-field="type_name">类型</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增车辆类型'; |
||||
layer_show(title, '/meet/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/meet/edit?id=' + id; |
||||
var title = '编辑车辆类型'; |
||||
layer_show(title, '/meet/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/meet/del',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/meet/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/meet/list-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?= $name; ?>">
|
||||
类别: |
||||
<select name="mtype"> |
||||
<option value="0">--全部类型--</option> |
||||
<option <?=$mtype==1?'selected':''?> value="1">新保(续保)组</option>
|
||||
<option <?=$mtype==2?'selected':''?> value="2">跟踪组</option>
|
||||
</select> |
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<?php |
||||
if($info){ |
||||
?> |
||||
<tr> |
||||
<td width="10%" align="center" align="center" class="bg_tr" nowrap>状态码</td> |
||||
<td width="30%" align="center" align="center" class="bg_tr">类型</td> |
||||
<td width="20%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="40%" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($info as $index => $item){ |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$item->code?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->getShowType()?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<?php |
||||
}else{ |
||||
?> |
||||
<tr>没有查到数据</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,67 +1,94 @@ |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<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="20%" height="25" class="td_bg">菜单名称</td> |
||||
<td width="80%" height="25" class="td_bg"><input name="name" type="text" id="name" value="<?=$info->name?>" size="40" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="20%" height="25" class="td_bg">菜单路径</td> |
||||
<td width="80%" height="25" class="td_bg"><input name="path" type="text" id="path" value="<?=$info->path?>" size="40" /></td>
|
||||
</tr> |
||||
<tr> |
||||
<td width="20%" height="25" class="td_bg">上级菜单</td> |
||||
<td width="80%" height="25" class="td_bg"> |
||||
<select name="parent_id" id="parent_id"> |
||||
<option value="0"></option> |
||||
<?php |
||||
foreach($menu_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="20%" height="25" class="td_bg">排序</td> |
||||
<td width="80%" height="25" class="td_bg"><input name="order_id" type="text" id="order_id" value="<?=$info->order_id?>" size="40" /></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> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">菜单名称</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">上级菜单</label> |
||||
<div class="col-md-3"> |
||||
<select name="parent_id" class="form-control"> |
||||
<option value="0"></option> |
||||
<?php |
||||
foreach($menu_items as $item) { |
||||
echo '<option value="'.$item->id.'"'; |
||||
if($item->id == $info->parent_id) |
||||
echo ' selected '; |
||||
echo '>'.$item->name.'</option>'; |
||||
} |
||||
?> |
||||
</select> |
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">图标</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="icon" value="<?=$info->icon?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">路径</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="path" value="<?=$info->path?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">排序</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="order_id" value="<?=$info->order_id?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<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"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/menu/save',params,function(obj){ |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
alert(obj.msg); |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/menu/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
@ -1,91 +1,107 @@ |
||||
<?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"> |
||||
//修改 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>菜单管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th data-field="show_id">ID</th> |
||||
<th data-field="name">菜单名称</th> |
||||
<th data-field="icon">图标</th> |
||||
<th data-field="path">路径</th> |
||||
<th data-field="order_id">排序</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="subcreate(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-folder-open" title="子菜单"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function subcreate(id) { |
||||
var title = '新增菜单'; |
||||
layer_show(title, '/menu/edit?parent_id=' + id); |
||||
} |
||||
function create() { |
||||
title = '新增菜单'; |
||||
layer_show(title, '/menu/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/menu/edit?id=' + id; |
||||
var title = '编辑菜单'; |
||||
layer_show(title, '/menu/edit?id=' + id); |
||||
} |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/menu/delete',{id:id},function(obj){ |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} else { |
||||
alert(obj.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/menu/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#order-btn').click(function(){ |
||||
if(confirm('是否批量保存排序?')) { |
||||
var params = $('#theFrm').serialize(); |
||||
$.post('/menu/order-save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/menu/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table style="width:98%;" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="add-btn" name="search-btn" value="添加"> |
||||
<input type="button" class="act_btn" id="order-btn" name="order-btn" value="保存排序"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="300" align="center" class="bg_tr">菜单名称</td> |
||||
<td width="60%" align="center" class="bg_tr">路径</td> |
||||
<td width="50" align="center" class="bg_tr">排序</td> |
||||
<td width="50" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<form id="theFrm"> |
||||
<?php |
||||
foreach($menu_items as $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td class="td_bg" nowrap><?= $item['name'] ?></td>
|
||||
<td class="td_bg" nowrap><?= $item['path'] ?></td>
|
||||
<td class="td_bg" nowrap> |
||||
<input type="text" name="order_ids[<?=$item['id']?>]" value="<?=$item['order_id']?>" style="width:50px;">
|
||||
</td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?= $item['id'] ?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?= $item['id'] ?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
if (isset($item['children'])) foreach ($item['children'] as $sub_item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td class="td_bg" nowrap> <?= $sub_item['name'] ?></td>
|
||||
<td class="td_bg" nowrap><?= $sub_item['path'] ?></td>
|
||||
<td class="td_bg" nowrap> |
||||
<input type="text" name="order_ids[<?=$sub_item['id']?>]" value="<?=$sub_item['order_id']?>" style="width:50px;">
|
||||
</td> |
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?= $sub_item['id'] ?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?= $sub_item['id'] ?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
} |
||||
?> |
||||
</form> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/pay-type/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/pay-type/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>支付方式</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增支付方式'; |
||||
layer_show(title, '/pay-type/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/pay-type/edit?id=' + id; |
||||
var title = '编辑支付方式'; |
||||
layer_show(title, '/pay-type/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/pay-type/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/pay-type/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/pay-type/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/pay-type/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/payee/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/payee/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>收款人管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增收款人'; |
||||
layer_show(title, '/payee/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/payee/edit?id=' + id; |
||||
var title = '编辑收款人'; |
||||
layer_show(title, '/payee/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/payee/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/payee/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/payee/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/payee/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/payment/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/payment/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>收款方式</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增收款方式'; |
||||
layer_show(title, '/payment/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/payment/edit?id=' + id; |
||||
var title = '编辑收款方式'; |
||||
layer_show(title, '/payment/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/payment/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/payment/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/payment/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/payment/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,64 @@ |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<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: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=" 提交 "/> |
||||
|
||||
<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('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/permissions/save',params,function(obj){ |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/permissions/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,71 +1,104 @@ |
||||
<?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="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td align="center" width="50" align="center" class="bg_tr">序号</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap ><?=$item['id']?></td>
|
||||
<td align="left" class="td_bg" nowrap ><?=$item['name']?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="permission(<?=$item['id']?>)">分配权限</a>]
|
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item['id']?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item['id']?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>权限分配</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="lock(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-lock" title="分配权限"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function lock(id) { |
||||
var title = '分配权限'; |
||||
layer_show(title, '/permissions/permission?id=' + id); |
||||
} |
||||
?> |
||||
</table> |
||||
<script type="text/javascript" language="javascript"> |
||||
//权限 |
||||
function permission(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/permissions/permission?id=' + id; |
||||
function create() { |
||||
title = '新增菜单'; |
||||
layer_show(title, '/permissions/edit?id=0'); |
||||
} |
||||
//编辑 |
||||
function edit(id) { |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/permissions/edit?id=' + id; |
||||
var title = '编辑菜单'; |
||||
layer_show(title, '/permissions/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/permissions/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
$('#page').val(0); |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/permissions/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/permissions/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
window.location.href = '/permissions/edit?id=0'; |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/permissions/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
|
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,65 +1,66 @@ |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
<input type="button" class="act_btn" id="save-btn" name="save-btn" value="保存"> |
||||
<input type="button" class="act_btn" id="return-btn" name="return-btn" value="返回"> |
||||
<?=$permissions_info->name?> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="24" align="center" class="bg_tr"><input type="checkbox" id="all"></td> |
||||
<td width="100" align="center" class="bg_tr">菜单名称</td> |
||||
<td width="70%" align="center" class="bg_tr">路径</td> |
||||
</tr> |
||||
<form id="theFrm"> |
||||
<input type="hidden" name="group_id" value="<?=$permissions_id?>">
|
||||
<?php |
||||
foreach($menu_items as $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td width="24" align="center" class="td_bg"> |
||||
<label> |
||||
<input class="checkbox" type="checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id,$menu_ids)?'checked':''?>>
|
||||
</label> |
||||
</td> |
||||
<td class="td_bg" nowrap><?= $item->name ?></td>
|
||||
<td class="td_bg" nowrap><?= $item->path ?></td>
|
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</form> |
||||
</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"> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<form id="theFrm"> |
||||
<input type="hidden" name="group_id" value="<?=$permissions_id?>">
|
||||
<?php foreach($menu_items as $item) { ?> |
||||
<div class="col-md-2"> |
||||
<div class="panel panel-info"> |
||||
<div class="panel-heading"> |
||||
<label class="i-checks"> |
||||
<input type="checkbox" name="menu_ids[]" value="<?=$item->id?>" <?=in_array($item->id, $menu_ids)?'checked':''?>><i></i> <?=$item->name?> |
||||
</label> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<?php foreach($item->menus as $sub_item) { ?> |
||||
<div> |
||||
<label class="i-checks"> |
||||
<input type="checkbox" name="menu_ids[]" value="<?=$sub_item->id?>" <?=in_array($sub_item->id, $menu_ids)?'checked':''?>><i></i> <?=$sub_item->name?> |
||||
</label> |
||||
</div> |
||||
<?php } ?> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<?php } ?> |
||||
</form> |
||||
</div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong>保 存</strong> |
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
$(function(){ |
||||
$('#save-btn').click(function(){ |
||||
$('.btn-save').click(function(){ |
||||
var params = $('#theFrm').serialize(); |
||||
$.post('/permissions/permission',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.href = '/permissions/index'; |
||||
parent.layer.msg('保存成功'); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
}); |
||||
$('#return-btn').click(function(){ |
||||
window.location.href = '/permissions/index'; |
||||
}); |
||||
$('#all').click(function(){ |
||||
var key = $(this).prop('checked'); |
||||
if(key) |
||||
$('.checkbox').prop('checked',true); |
||||
else |
||||
$('.checkbox').removeProp('checked'); |
||||
}); |
||||
}); |
||||
</script> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,42 +1,62 @@ |
||||
<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> |
||||
</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> |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-6"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$("#submit-btn").click(function(){ |
||||
if(confirm('是否确认提交?')) { |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/role/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/role/index'; |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,64 +1,97 @@ |
||||
<?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"> |
||||
//编辑 |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>职务管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增职务'; |
||||
layer_show(title, '/role/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
window.location.href = '/role/edit?id=' + id; |
||||
var title = '编辑职务'; |
||||
layer_show(title, '/role/edit?id=' + id); |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/role/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/role/index?" + params; |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/role/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/role/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>ID</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap><?=$item->id?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->name?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -1,60 +1,86 @@ |
||||
<?php |
||||
use common\libs\MyLib; |
||||
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=" 提交 "/> |
||||
|
||||
<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?>';
|
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<link href="/assets/css/plugins/datapicker/datepicker3.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">月份</label> |
||||
<div class="col-md-3"> |
||||
<div class="input-group date"> |
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
<input type="text" name="date" class="form-control" autocomplete="off" value="<?=$info->date?>">
|
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">双休天数</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="double_break" value="<?=$info->double_break?>" class="form-control">
|
||||
</div> |
||||
<label class="col-md-1 control-label">单休天数</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="single_break" value="<?=$info->single_break?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/datapicker/bootstrap-datepicker.js"></script> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
$('.input-group.date').datepicker({ |
||||
minViewMode: 1, |
||||
keyboardNavigation: false, |
||||
forceParse: false, |
||||
autoclose: true, |
||||
todayHighlight: true, |
||||
format: "yyyy-mm" |
||||
}); |
||||
|
||||
//提交 |
||||
$('#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); |
||||
//提交按钮 |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/work-day/save',params,function(obj){ |
||||
if(obj.success) { |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
}); |
||||
} |
||||
},'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
||||
|
@ -1,65 +1,99 @@ |
||||
<?php |
||||
use common\libs\MyLib; |
||||
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> |
||||
<script type="text/javascript"> |
||||
function edit(id){ |
||||
var back_params = $('#searchForm').serialize(); |
||||
window.location.href = '/work-day/edit?id='+ id + '&back_params=' + encodeURIComponent(back_params); |
||||
} |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>岗位管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="date">月份</th> |
||||
<th data-field="double_break">双休天数</th> |
||||
<th data-field="single_break">单休天数</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
$(function(){ |
||||
//搜索 |
||||
$('#search-btn').click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/work-day/index?' + params; |
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增岗位'; |
||||
layer_show(title, '/work-day/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
var title = '编辑岗位'; |
||||
layer_show(title, '/work-day/edit?id=' + id); |
||||
} |
||||
function del(id) { |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/work-day/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
$('#add-btn').click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = '/work-day/edit?id=0&back_params=' + encodeURIComponent(params); |
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/work-day/index-json", |
||||
pagination: true, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
时间:<input name="date" type="text" onclick="WdatePicker({dateFmt:'yyyy-MM'})"> |
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td class="bg_tr" align="center" nowrap>排序</td> |
||||
<td class="bg_tr" align="center" nowrap>日期</td> |
||||
<td class="bg_tr" align="center" nowrap>双休天数</td> |
||||
<td class="bg_tr" align="center" nowrap>单休天数</td> |
||||
<td class="bg_tr" align="center" nowrap>操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach ($items as $index => $item) { |
||||
?> |
||||
<tr> |
||||
<td class="td_bg"><?=$index+1?></td>
|
||||
<td class="td_bg"><?=$item->date?></td>
|
||||
<td class="td_bg"><?=$item->double_break?></td>
|
||||
<td class="td_bg"><?=$item->single_break?></td>
|
||||
<td class="td_bg" align="center"> |
||||
<a href="javascript:void(0)" onclick="edit(<?=$item->id?>)">[操作]</a>
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
<tr> |
||||
<td class="td_bg" colspan="5" align="center"><?=$page_info?></td>
|
||||
</tr> |
||||
</table> |
||||
<?php $this->endBlock(); ?> |
||||
|
@ -0,0 +1,68 @@ |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<form role="form" class="form-horizontal data-from" id="theFrm"> |
||||
<input type="hidden" name="id" value="<?=intval($info->id)?>">
|
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">名称</label> |
||||
<div class="col-md-5"> |
||||
<input type="text" name="name" value="<?=$info->name?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div class="form-group"> |
||||
<label class="col-md-1 control-label">天数</label> |
||||
<div class="col-md-3"> |
||||
<input type="text" name="days" value="<?=$info->days?>" class="form-control">
|
||||
</div> |
||||
</div> |
||||
<div> |
||||
<div class="row"> |
||||
<div class="col-md-5 col-md-offset-5"> |
||||
<button class="btn btn-primary btn-save" type="button"> |
||||
<strong><?=$info ? '保 存':'添 加'?></strong>
|
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script type="text/javascript" language="javascript"> |
||||
$(function () { |
||||
//提交按钮 |
||||
$(".btn-save").click(function(){ |
||||
parent.layer.confirm('是否确认提交?', { |
||||
btn: ['确认','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
var params = $("#theFrm").serialize(); |
||||
$.post('/work-type/save',params,function(obj){ |
||||
if(obj.success) { |
||||
parent.layer.msg('保存成功'); |
||||
parent.refreshList(); |
||||
layer_close(); |
||||
} else { |
||||
parent.layer.msg(data.msg); |
||||
} |
||||
},'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
}); |
||||
}) |
||||
</script> |
||||
<?php $this->endBlock('footer_js'); ?> |
@ -0,0 +1,97 @@ |
||||
<?php |
||||
use \common\libs\MyLib; |
||||
?> |
||||
<?php $this->beginBlock('header_css'); ?> |
||||
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"> |
||||
<?php $this->endBlock(); ?> |
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight"> |
||||
<div class="ibox float-e-margins"> |
||||
<div class="ibox-title"> |
||||
<h5>工作制管理</h5> |
||||
<div class="ibox-tools"> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="create(0)"> |
||||
<i class="fa fa-plus"></i> 添加 |
||||
</a> |
||||
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');"> |
||||
<i class="fa fa-refresh"></i> 刷新 |
||||
</a> |
||||
</div> |
||||
</div> |
||||
<div class="ibox-content"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<table id="listTable"> |
||||
<thead> |
||||
<tr> |
||||
<th width="50" data-field="id">ID</th> |
||||
<th data-field="name">名称</th> |
||||
<th data-field="days">天数</th> |
||||
<th data-formatter="opFormatter">操作</th> |
||||
</tr> |
||||
</thead> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<?php $this->beginBlock('footer_js'); ?> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> |
||||
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> |
||||
<script> |
||||
function opFormatter(value, row, index) { |
||||
var opStr = []; |
||||
opStr.push('<a href="javascript:void(0);" onclick="edit(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-edit" title="编辑"></i>'); |
||||
opStr.push('</a>'); |
||||
opStr.push('<a href="javascript:void(0);" onclick="del(' + row.id + ')">'); |
||||
opStr.push('<i class="fa fa-trash" title="删除"></i>'); |
||||
opStr.push('</a>'); |
||||
|
||||
return opStr.join(' '); |
||||
} |
||||
function create() { |
||||
title = '新增工作制'; |
||||
layer_show(title, '/work-type/edit?id=0'); |
||||
} |
||||
function edit(id) { |
||||
var title = '编辑工作制'; |
||||
layer_show(title, '/work-type/edit?id=' + id); |
||||
} |
||||
function del(id) { |
||||
parent.layer.confirm('是否确认删除?', { |
||||
btn: ['删除','取消'], //按钮 |
||||
shade: false //不显示遮罩 |
||||
}, function(){ |
||||
$.post('/work-type/delete',{id:id},function(data) { |
||||
parent.layer.msg(data.msg); |
||||
refreshList(); |
||||
}, 'json'); |
||||
}, function(){ |
||||
// |
||||
}); |
||||
} |
||||
function refreshList() { |
||||
$('#listTable').bootstrapTable('refresh'); |
||||
} |
||||
|
||||
function search() { |
||||
$('#listTable').bootstrapTable('destroy'); |
||||
$('#listTable').bootstrapTable({ |
||||
url: "/work-type/index-json", |
||||
pagination: false, |
||||
sidePagination: 'server', |
||||
queryParams: function(params) { |
||||
return params; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
$(function() { |
||||
search(); |
||||
}); |
||||
</script> |
||||
<?php $this->endBlock(); ?> |
@ -1,48 +0,0 @@ |
||||
<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"> |
||||
<input name="days" type="text" id="days" value="<?=$info->days?>" style="width:400px;"/>
|
||||
</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('/worktype/save',params,function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
$('#back-btn').click(); |
||||
} |
||||
},'json'); |
||||
} |
||||
}); |
||||
|
||||
//返回按钮 |
||||
$('#back-btn').click(function(){ |
||||
window.location.href='/worktype/index'; |
||||
}); |
||||
}) |
||||
</script> |
@ -1,66 +0,0 @@ |
||||
<?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"> |
||||
//编辑 |
||||
function edit(id) { |
||||
window.location.href = '/worktype/edit?id=' + id; |
||||
} |
||||
//删除 |
||||
function del(id) { |
||||
if(confirm('是否确认删除?')) { |
||||
$.post('/worktype/delete',{id:id},function(obj){ |
||||
alert(obj.msg); |
||||
if(obj.success) { |
||||
window.location.reload(); |
||||
} |
||||
},'json'); |
||||
} |
||||
} |
||||
$(function(){ |
||||
$("#search-btn").click(function(){ |
||||
var params = $('#searchForm').serialize(); |
||||
window.location.href = "/worktype/index?" + params; |
||||
}); |
||||
$('#add-btn').click(function(){ |
||||
edit(0); |
||||
}); |
||||
}); |
||||
</script> |
||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table"> |
||||
<form id="searchForm"> |
||||
<tr> |
||||
<td class="td_bg"> |
||||
名称:<input name="name" type="text" value="<?=$name?>">
|
||||
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索"> |
||||
<input type="button" class="act_btn" id="add-btn" name="add-btn" value="添加"> |
||||
</td> |
||||
</tr> |
||||
</form> |
||||
</table> |
||||
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> |
||||
<tr> |
||||
<td width="50" align="center" align="center" class="bg_tr" nowrap>排序</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">名称</td> |
||||
<td width="80%" align="center" align="center" class="bg_tr">天数</td> |
||||
<td width="30" align="center" class="bg_tr">操作</td> |
||||
</tr> |
||||
<?php |
||||
foreach($items as $index => $item) { |
||||
?> |
||||
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)> |
||||
<td align="center" class="td_bg" nowrap><?=$index+1?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->name?></td>
|
||||
<td align="left" class="td_bg" nowrap><?=$item->days?></td>
|
||||
<td align="center" class="td_bg" nowrap> |
||||
[<a href="javascript:void(0);" onclick="edit(<?=$item->id?>)">修改</a>]
|
||||
[<a href="javascript:void(0);" onclick="del(<?=$item->id?>)">删除</a>]
|
||||
</td> |
||||
</tr> |
||||
<?php |
||||
} |
||||
?> |
||||
</table> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue