changecommission.html 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <style>
  2. .recharge_info{
  3. display: -webkit-box;
  4. display: -webkit-flex;
  5. display: -ms-flexbox;
  6. display: flex;
  7. justify-content: space-around;
  8. margin-bottom: 10px;
  9. }
  10. .recharge_info>div{
  11. -webkit-box-flex: 1;
  12. -webkit-flex: 1;
  13. -ms-flex: 1;
  14. flex: 1;
  15. border:1px solid #efefef;
  16. margin: 0 10px;
  17. padding:10px 22px;
  18. line-height: 25px;
  19. color: #333;
  20. }
  21. </style>
  22. <form class="form-horizontal form-validate" action="{:U('distribution/changecommission')}" method="post" enctype="multipart/form-data">
  23. <input type='hidden' name='order_id' value="{$order_id}" />
  24. <input type='hidden' name='order_goods_id' value="{$order_goods_id}" />
  25. <div class="modal-dialog" style='width:800px;'>
  26. <div class="modal-content">
  27. <div class="modal-header">
  28. <button data-dismiss="modal" class="close" type="button">×</button>
  29. <h4 class="modal-title">修改佣金</h4>
  30. </div>
  31. <div class="modal-body">
  32. <div class="form-group" style="margin: 0 10px;">
  33. <table class='table' style='table-layout: fixed;'>
  34. <tr>
  35. <?php if($set['level']>=1 && count($commission_info) >= 1){ ?>
  36. <th style='width:145px;'>
  37. 1级
  38. </th>
  39. <?php } ?>
  40. <?php if($set['level']>=2 && count($commission_info) >= 2){ ?>
  41. <th style='width:145px;'>
  42. 2级</th>
  43. <?php } ?>
  44. <?php if($set['level']>=3 && count($commission_info) >= 3){ ?>
  45. <th style='width:145px;'>
  46. 3级</th>
  47. <?php } ?>
  48. </tr>
  49. <tr>
  50. <?php foreach($commission_info as $val){ ?>
  51. <td>
  52. <a href="{:U('user/detail',array('id'=>$val['member_id']))}" target='_blank'><img src="{$val['member_info']['avatar']}" style='width:30px;height:30px;padding:1px;border:1px solid #ccc' /> {$val['member_info']['username']}</a>
  53. </td>
  54. <?php } ?>
  55. </tr>
  56. <tr>
  57. <?php foreach($commission_info as $val){ ?>
  58. <td><input type='text' class='form-control clevel' data-ogid='{$val['id']}' value="{$val['money']}" <?php if($val['state'] == 0){ ?>data-canchange="1" data-level="{$val['level']}" name="cm1[{$val['id']}]"<?php }else{ ?>readonly<?php } ?> /></td>
  59. <?php } ?>
  60. </tr>
  61. </table>
  62. </div>
  63. <div class="form-group" style="margin: 0 10px;">
  64. <div class="col-sm-9 col-xs-12">
  65. <div class='form-control-static' style='color:red' >注: 不能修改的佣金为已申请或已结算</div>
  66. </div>
  67. </div>
  68. <a style='float:left;margin-left: 10px' href="javascript:;" class="btn btn-success" onclick='commission_changeall()' >按应得重新设置佣金</a>
  69. </div>
  70. <div class="modal-footer">
  71. <button class="btn btn-primary" type="submit">提交</button>
  72. <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
  73. </div>
  74. </div>
  75. </form>
  76. <script language='javascript'>
  77. function commission_changeall() {
  78. $('.clevel[data-canchange=1]').each(function(){
  79. $(this).val( $('#clevel' + $(this).data('level') + '_sys_' + $(this).data('ogid')).html());
  80. });
  81. tip.msgbox.suc('设置成功!');
  82. }
  83. </script>