index.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style>
  45. tbody tr td{
  46. position: relative;
  47. }
  48. tbody tr .icow-weibiaoti--{
  49. visibility: hidden;
  50. display: inline-block;
  51. color: #fff;
  52. height:18px;
  53. width:18px;
  54. background: #e0e0e0;
  55. text-align: center;
  56. line-height: 18px;
  57. vertical-align: middle;
  58. }
  59. tbody tr:hover .icow-weibiaoti--{
  60. visibility: visible;
  61. }
  62. tbody tr .icow-weibiaoti--.hidden{
  63. visibility: hidden !important;
  64. }
  65. .full .icow-weibiaoti--{
  66. margin-left:10px;
  67. }
  68. .full>span{
  69. display: -webkit-box;
  70. display: -webkit-flex;
  71. display: -ms-flexbox;
  72. display: flex;
  73. vertical-align: middle;
  74. align-items: center;
  75. }
  76. tbody tr .label{
  77. margin: 5px 0;
  78. }
  79. .goods_attribute a{
  80. cursor: pointer;
  81. }
  82. .newgoodsflag{
  83. width: 22px;height: 16px;
  84. background-color: #ff0000;
  85. color: #fff;
  86. text-align: center;
  87. position: absolute;
  88. bottom: 70px;
  89. left: 57px;
  90. font-size: 12px;
  91. }
  92. .a{cursor: pointer;}
  93. </style>
  94. </head>
  95. <body layadmin-themealias="default">
  96. <table id="demo" lay-filter="test"></table>
  97. <div class="layui-fluid">
  98. <div class="layui-card">
  99. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">系统日志列表</span></div>
  100. <div class="layui-card-body" style="padding:15px;">
  101. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  102. <input type="hidden" name="c" value="operatelog" />
  103. <input type="hidden" name="a" value="index" />
  104. <div class="layui-form-item">
  105. <div class="layui-inline">
  106. <div class="layui-input-inline">
  107. <select name='operation_type' class='layui-input layui-unselect' lay-ignore style="width:190px;padding:0 5px;" id="operation_type">
  108. <option value=''>操作类型</option>
  109. <option value='detailed_list' <?php if(isset($gpc['operation_type']) && $gpc['operation_type']=='detailed_list'){ ?>selected<?php } ?>>清单</option>
  110. </select>
  111. </div>
  112. <span class="layui-input-inline">
  113. <select name='searchtime' class='form-control' style="width:100px;padding:0 5px;" id="searchtime">
  114. <option value=''>不按时间</option>
  115. <option value='create_time' <?php if($gpc['searchtime']=='create_time'){ ?>selected<?php } ?>>操作时间</option>
  116. </select>
  117. </span>
  118. <div class="layui-input-inline" style="width:280px;">
  119. {:tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
  120. </div>
  121. <div class="layui-input-inline">
  122. <input type="text" style="width:300px;" class="layui-input" name='keyword' value="{$gpc['keyword']}" placeholder="操作员名称/订单编号/商品名称">
  123. </div>
  124. <div class="layui-input-inline">
  125. <button class="layui-btn layui-btn-sm" style="margin-left: 100px;" type="submit"> 搜索</button>
  126. </div>
  127. </div>
  128. </div>
  129. </form>
  130. <form action="" class="layui-form" lay-filter="example" method="post" >
  131. <div class="row">
  132. <div class="col-md-12">
  133. <div class="page-table-header">
  134. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  135. <div class="btn-group">
  136. <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除吗?" data-href="{:U('operatelog/delete_operatelog')}">
  137. 删除
  138. </button>
  139. </div>
  140. </div>
  141. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  142. <thead>
  143. <tr>
  144. <th style="width:25px;"></th>
  145. <th style="width:100px;">编号</th>
  146. <th style="width:300px;">操作者</th>
  147. <th style="width:300px;">操作日期</th>
  148. <th style="width:150px;">操作类型</th>
  149. <th style="width:350px;">ip</th>
  150. <th style="width:800px;">操作内容</th>
  151. </tr>
  152. </thead>
  153. <tbody>
  154. <?php foreach( $label as $row ){ ?>
  155. <tr>
  156. <td>
  157. <?php if( $row['id']!='default'){ ?>
  158. <input type='checkbox' name="item_checkbox" lay-skin="primary" value="{$row['id']}"/>
  159. <?php } ?>
  160. </td>
  161. <td>{$row['id']}</td>
  162. <td>{$row['operation_seller_name']}</td>
  163. <td><?php echo date('Y-m-d H:i:s',$row['addtime']);?></td>
  164. <td>
  165. <?php if( $row['operation_type'] =='detailed_list'){ ?>
  166. 清单
  167. <?php } ?>
  168. </td>
  169. <td>
  170. {$row['ip']}
  171. </td>
  172. <td>
  173. {$row['content']}
  174. </td>
  175. <!--
  176. <td style="text-align: center;">
  177. <a class='layui-btn layui-btn-xs deldom' href="javascript:;" data-href="{:U('operatelog/delete_operatelog', array('id' => $row['id']))}" data-confirm='确认要删除此日志吗?'>
  178. <i class="layui-icon">&#xe640;</i>删除
  179. </a>
  180. </td>-->
  181. </tr>
  182. <?php } ?>
  183. </tbody>
  184. <tfoot>
  185. <tr>
  186. <td colspan="2">
  187. <div class="page-table-header">
  188. <input type="checkbox" name="checkall" lay-skin="primary" lay-filter="checkboxall">
  189. <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除吗?" data-href="{:U('operatelog/delete_operatelog')}">
  190. 删除
  191. </button>
  192. </div>
  193. </td>
  194. <td colspan="6" style="text-align: right">
  195. {$pager}
  196. </td>
  197. </tr>
  198. </tfoot>
  199. </table>
  200. </div>
  201. </div>
  202. </form>
  203. </div>
  204. </div>
  205. </div>
  206. <script src="/layuiadmin/layui/layui.js"></script>
  207. <script>
  208. layui.config({
  209. base: '/layuiadmin/' //静态资源所在路径
  210. }).extend({
  211. index: 'lib/index' //主入口模块
  212. }).use('index');
  213. </script>
  214. <script>
  215. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  216. var layer = layui.layer;
  217. var $;
  218. layui.use(['jquery', 'layer','form'], function(){
  219. $ = layui.$;
  220. var form = layui.form;
  221. $('.deldom').click(function(){
  222. var s_url = $(this).attr('data-href');
  223. layer.confirm($(this).attr('data-confirm'), function(index){
  224. $.ajax({
  225. url:s_url,
  226. type:'post',
  227. dataType:'json',
  228. success:function(info){
  229. if(info.status == 0)
  230. {
  231. layer.msg(info.result.message,{icon: 1,time: 2000});
  232. }else if(info.status == 1){
  233. var go_url = location.href;
  234. if( info.result.hasOwnProperty("url") )
  235. {
  236. go_url = info.result.url;
  237. }
  238. layer.msg('操作成功',{time: 1000,
  239. end:function(){
  240. location.href = info.result.url;
  241. }
  242. });
  243. }
  244. }
  245. })
  246. });
  247. })
  248. $('.btn-operation').click(function(){
  249. var ids_arr = [];
  250. var obj = $(this);
  251. var s_toggle = $(this).attr('data-toggle');
  252. var s_url = $(this).attr('data-href');
  253. $("input[name=item_checkbox]").each(function() {
  254. if( $(this).prop('checked') )
  255. {
  256. ids_arr.push( $(this).val() );
  257. }
  258. })
  259. if(ids_arr.length < 1)
  260. {
  261. layer.msg('请选择要操作的内容');
  262. }else{
  263. var can_sub = true;
  264. if( s_toggle == 'batch-remove' )
  265. {
  266. can_sub = false;
  267. layer.confirm($(obj).attr('data-confirm'), function(index){
  268. $.ajax({
  269. url:s_url,
  270. type:'post',
  271. dataType:'json',
  272. data:{ids:ids_arr},
  273. success:function(info){
  274. if(info.status == 0)
  275. {
  276. layer.msg(info.result.message,{icon: 1,time: 2000});
  277. }else if(info.status == 1){
  278. var go_url = location.href;
  279. if( info.result.hasOwnProperty("url") )
  280. {
  281. go_url = info.result.url;
  282. }
  283. layer.msg('操作成功',{time: 1000,
  284. end:function(){
  285. location.href = info.result.url;
  286. }
  287. });
  288. }
  289. }
  290. })
  291. });
  292. }else{
  293. $.ajax({
  294. url:s_url,
  295. type:'post',
  296. dataType:'json',
  297. data:{ids:ids_arr},
  298. success:function(info){
  299. if(info.status == 0)
  300. {
  301. layer.msg(info.result.message,{icon: 1,time: 2000});
  302. }else if(info.status == 1){
  303. var go_url = location.href;
  304. if( info.result.hasOwnProperty("url") )
  305. {
  306. go_url = info.result.url;
  307. }
  308. layer.msg('操作成功',{time: 1000,
  309. end:function(){
  310. location.href = info.result.url;
  311. }
  312. });
  313. }
  314. }
  315. })
  316. }
  317. }
  318. })
  319. form.on('checkbox(checkboxall)', function(data){
  320. if(data.elem.checked)
  321. {
  322. $("input[name=item_checkbox]").each(function() {
  323. $(this).prop("checked", true);
  324. });
  325. $("input[name=checkall]").each(function() {
  326. $(this).prop("checked", true);
  327. });
  328. }else{
  329. $("input[name=item_checkbox]").each(function() {
  330. $(this).prop("checked", false);
  331. });
  332. $("input[name=checkall]").each(function() {
  333. $(this).prop("checked", false);
  334. });
  335. }
  336. form.render('checkbox');
  337. });
  338. //监听提交
  339. form.on('submit(formDemo)', function(data){
  340. $.ajax({
  341. url: data.form.action,
  342. type: data.form.method,
  343. data: data.field,
  344. dataType:'json',
  345. success: function (info) {
  346. if(info.status == 0)
  347. {
  348. layer.msg(info.result.message,{icon: 1,time: 2000});
  349. }else if(info.status == 1){
  350. var go_url = location.href;
  351. if( info.result.hasOwnProperty("url") )
  352. {
  353. go_url = info.result.url;
  354. }
  355. layer.msg('操作成功',{time: 1000,
  356. end:function(){
  357. location.href = info.result.url;
  358. }
  359. });
  360. }
  361. }
  362. });
  363. return false;
  364. });
  365. })
  366. </script>
  367. </body>