adduserlevel.html 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
  2. <input type="hidden" name="id" value="{$group['id']}" />
  3. <div class="modal-dialog">
  4. <div class="modal-content">
  5. <div class="modal-header">
  6. <button data-dismiss="modal" class="close" type="button">×</button>
  7. <h4 class="modal-title"><?php if( !empty($group['id'])){ ?>编辑<?php }else{ ?>添加<?php } ?>标签组</h4>
  8. </div>
  9. <div class="modal-body">
  10. <div class="form-group">
  11. <label class="col-sm-2 control-label must">等级</label>
  12. <div class="col-sm-9 col-xs-12">
  13. <select name="level" class="form-control">
  14. <option value="1" <?php if( !empty($group['level']) && $group['level'] == 1){ ?> selected<?php } ?>>1</option>
  15. <option value="2" <?php if( !empty($group['level']) && $group['level'] == 2){ ?> selected<?php } ?>>2</option>
  16. <option value="3" <?php if( !empty($group['level']) && $group['level'] == 3){ ?> selected<?php } ?>>3</option>
  17. <option value="4" <?php if( !empty($group['level']) && $group['level'] == 4){ ?> selected<?php } ?>>4</option>
  18. <option value="5" <?php if( !empty($group['level']) && $group['level'] == 5){ ?> selected<?php } ?>>5</option>
  19. <option value="6" <?php if( !empty($group['level']) && $group['level'] == 6){ ?> selected<?php } ?>>6</option>
  20. <option value="7" <?php if( !empty($group['level']) && $group['level'] == 7){ ?> selected<?php } ?>>7</option>
  21. <option value="8" <?php if( !empty($group['level']) && $group['level'] == 8){ ?> selected<?php } ?>>8</option>
  22. <option value="9" <?php if( !empty($group['level']) && $group['level'] == 9){ ?> selected<?php } ?>>9</option>
  23. <option value="10" <?php if( !empty($group['level']) && $group['level'] == 10){ ?> selected<?php } ?>>10</option>
  24. </select>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-sm-2 control-label must">等级名称</label>
  29. <div class="col-sm-9 col-xs-12">
  30. <input type="text" name="levelname" class="form-control" value="{$group['levelname']}" data-rule-required="true" />
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-sm-2 control-label must">等级折扣</label>
  35. <div class="col-sm-9 col-xs-12">
  36. <input type="text" name="discount" class="form-control" value="{$group['discount']}" data-rule-required="true" />
  37. <div class="help-block">请填写1-99的<span style="color:red">整数</span>,100不打折。例如:80,打八折,该会员对应等级会员价=商品现价*80%</div>
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label class="col-sm-2 control-label ">升级方式</label>
  42. <div class="col-sm-9 col-xs-12" style="margin-top:7px;">
  43. &nbsp;&nbsp;
  44. <label>
  45. <input type='radio' name='is_auto_grade' value='0' <?php if( empty($group) || $group['is_auto_grade'] ==0 ){ ?>checked <?php } ?> /> 手动
  46. </label>&nbsp;&nbsp;&nbsp;
  47. <label>
  48. <input type='radio' name='is_auto_grade' value='1' <?php if( !empty($group) && $group['is_auto_grade'] ==1 ){ ?>checked <?php } ?> /> 自动
  49. </label>
  50. </div>
  51. </div>
  52. <div class="form-group" id="level_money" <?php if( empty($group) || $group['is_auto_grade'] ==0 ){ ?>style="display:none;" <?php } ?>>
  53. <label class="col-sm-2 control-label must">等级升级金额</label>
  54. <div class="col-sm-9 col-xs-12">
  55. <input type="text" name="level_money" class="form-control" value="{$group['level_money']}" />
  56. </div>
  57. </div>
  58. </div>
  59. <div class="modal-footer">
  60. <button class="btn btn-primary" type="submit">提交</button>
  61. <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
  62. </div>
  63. </div>
  64. </div>
  65. </form>
  66. <script>
  67. $(function(){
  68. $('input[name=is_auto_grade]').click(function(){
  69. var is_auto_grade = $(this).val();
  70. if( is_auto_grade == 1 )
  71. {
  72. $('#level_money').show();
  73. }else{
  74. $('#level_money').hide();
  75. }
  76. })
  77. })
  78. </script>