index.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <style>
  4. .fl{float:left;}
  5. .fr{float:right;}
  6. a.ncsc-btn-mini {
  7. background-color: #f5f5f5;
  8. border-color: #dcdcdc #dcdcdc #b3b3b3;
  9. border-style: solid;
  10. border-width: 1px;
  11. color: #777;
  12. cursor: pointer;
  13. display: inline-block;
  14. font: 12px/20px arial;
  15. height: 20px;
  16. margin:5px;
  17. margin-right: 2px;
  18. padding: 0 10px;
  19. text-align: center;
  20. vertical-align: middle;
  21. }
  22. </style>
  23. <div class="page-header">
  24. <a href="{:U('Transport/add')}" class="btn btn-primary">新增</a>
  25. </div>
  26. <div class="row">
  27. <div class="col-xs-12">
  28. <div class="table-responsive">
  29. <?php if (is_array($output['list'])){?>
  30. <?php $unit=get_weight_name(C('WEIGHT_ID')); ?>
  31. <table class="table table-striped table-bordered table-hover">
  32. <thead>
  33. <tr>
  34. <th>运送方式</th>
  35. <th>运送到</th>
  36. <th>首重(<?php echo $unit; ?>)</th>
  37. <th>运费(元)</th>
  38. <th>续重(<?php echo $unit; ?>)</th>
  39. <th>续费(元)</th>
  40. </tr>
  41. </thead>
  42. <?php foreach ($output['list'] as $v){?>
  43. <tbody>
  44. <tr>
  45. <td colspan="20"></td>
  46. </tr>
  47. <tr>
  48. <th colspan="20">
  49. <h5 class="fl"><?php echo $v['title'];?></h5>
  50. <span class="fr mr5">
  51. <time title="最后编辑时间"><i class="icon-time"></i><?php echo date('Y-m-d H:i:s',$v['update_time']);?></time>
  52. <a class="J_Clone ncsc-btn-mini" href="javascript:void(0)" data-id="<?php echo $v['id'];?>"><i class="icon-copy"></i>复制模板</a> <a class="J_Modify ncsc-btn-mini" href="javascript:void(0)" data-id="<?php echo $v['id'];?>"><i class="icon-edit"></i>修改</a> <a class="J_Delete ncsc-btn-mini" href="javascript:void(0)" data-id="<?php echo $v['id'];?>"><i class="icon-trash"></i>删除</a></span></th>
  53. </tr>
  54. <?php if (is_array($output['extend'][$v['id']]['data'])){?>
  55. <?php foreach ($output['extend'][$v['id']]['data'] as $value){?>
  56. <tr>
  57. <td class="bdl"></td>
  58. <td class="cell-area tl"><?php echo $value['area_name'];?></td>
  59. <td><?php echo $value['snum'];?></td>
  60. <td><?php echo $value['sprice'];?></td>
  61. <td><?php echo $value['xnum'];?></td>
  62. <td class="bdr"><?php echo $value['xprice'];?></td>
  63. </tr>
  64. <?php }?>
  65. <?php }?>
  66. </tbody>
  67. <?php }?>
  68. </table>
  69. <?php } else {?>
  70. <div>~~暂无数据</div>
  71. <?php } ?>
  72. <?php if (is_array($output['list'])){?>
  73. <div class="page"><?php echo $page; ?></div>
  74. <?php }?>
  75. </div>
  76. </div>
  77. </div>
  78. </block>
  79. <block name="javascript">
  80. <script>
  81. $(function(){
  82. $('a[class="J_Delete ncsc-btn-mini"]').click(function(){
  83. var id = $(this).attr('data-id');
  84. if(typeof(id) == 'undefined') return false;
  85. var f=confirm('确认要执行该操作吗?');
  86. if(f){
  87. $(this).attr('href','{:U("Transport/del")}'+'/id/'+id);
  88. return true;
  89. }else{
  90. return false;
  91. }
  92. });
  93. $('a[class="J_Modify ncsc-btn-mini"]').click(function(){
  94. var id = $(this).attr('data-id');
  95. if(typeof(id) == 'undefined') return false;
  96. $(this).attr('href','{:U("Transport/edit")}'+'/id/'+id);
  97. return true;
  98. });
  99. $('a[class="J_Clone ncsc-btn-mini"]').click(function(){
  100. var id = $(this).attr('data-id');
  101. if(typeof(id) == 'undefined') return false;
  102. $(this).attr('href','{:U("Transport/clone_data")}'+'/id/'+id);
  103. return true;
  104. });
  105. });
  106. </script>
  107. </block>