changecommission.html 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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级</th>
  38. <?php } ?>
  39. <?php if( $set['level']>=2 && count($commission_info) >= 2){ ?>
  40. <th style='width:145px;'>
  41. 2级</th>
  42. <?php } ?>
  43. <?php if( $set['level']>=3 && count($commission_info) >= 3){ ?>
  44. <th style='width:145px;'>
  45. 3级</th>
  46. <?php } ?>
  47. </tr>
  48. <tr>
  49. <?php foreach($commission_info as $val){ ?>
  50. <td>
  51. <a href="{:U('user/detail',array('id'=>$val['member_id']))}" target='_blank'><img src="{php echo $val['member_info']['avatar']}" style='width:30px;height:30px;padding:1px;border:1px solid #ccc' /> {$val['member_info']['username']}</a>
  52. </td>
  53. <?php } ?>
  54. </tr>
  55. <tr>
  56. <?php foreach($commission_info as $val){ ?>
  57. <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>
  58. <?php } ?>
  59. </tr>
  60. </table>
  61. </div>
  62. <div class="form-group" style="margin: 0 10px;">
  63. <div class="col-sm-9 col-xs-12">
  64. <div class='form-control-static' style='color:red' >注: 不能修改的佣金为已申请或已结算</div>
  65. </div>
  66. </div>
  67. <a style='float:left;margin-left: 10px' href="javascript:;" class="btn btn-success" onclick='commission_changeall()' >按应得重新设置佣金</a>
  68. </div>
  69. <div class="modal-footer">
  70. <button class="btn btn-primary" type="submit">提交</button>
  71. <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
  72. </div>
  73. </div>
  74. </form>
  75. <script language='javascript'>
  76. function commission_changeall() {
  77. $('.clevel[data-canchange=1]').each(function(){
  78. $(this).val( $('#clevel' + $(this).data('level') + '_sys_' + $(this).data('ogid')).html());
  79. });
  80. tip.msgbox.suc('设置成功!');
  81. }
  82. </script>