人人商城

group.tpl.php 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('mc/common', TEMPLATE_INCLUDEPATH)) : (include template('mc/common', TEMPLATE_INCLUDEPATH));?>
  3. <div class="alert we7-page-alert">
  4. <p><strong class="text-danger"><i class="wi wi-info-sign"></i> 会员组的总积分是根据(积分+贡献)的值算出来的,管理员不能直接修改会员所在的会员组. 如果需要修改会员组,请通过设置积分或者贡献的值来影响总积分,系统会根据影响后的总积分自动算出对应的会员组</strong></p>
  5. <p><i class="wi wi-info-sign"></i>默认会员组的积分需设置为 0</p>
  6. <p><i class="wi wi-info-sign"></i> 系统会根据会员的总积分(积分+贡献)多少自动对会员的分组进行调整</p>
  7. </div>
  8. <div id="js-member-group" ng-controller="group" ng-cloak>
  9. <div class="text-right we7-margin-bottom">
  10. <button class="btn btn-default" data-toggle="modal" data-target="#modal-change-group">会员组变更设置</button>
  11. <button type="button" class="btn btn-primary" ng-click="set_group_detail_info()">增加会员组</button>
  12. </div>
  13. <table class="table we7-table table-hover vertical-middle">
  14. <col width="200px"/>
  15. <col />
  16. <col />
  17. <col width="200px"/>
  18. <tr>
  19. <th>会员组名称</th>
  20. <th>所需总积分(积分+贡献)</th>
  21. <th>会员数</th>
  22. <th class="text-right">操作</th>
  23. </tr>
  24. <tr ng-repeat="group in group_list">
  25. <td>
  26. {{ group.title }}
  27. <span class="label label-info" ng-if="group.isdefault == 1">默认</span>
  28. </td>
  29. <td>{{ group.credit }}</td>
  30. <td>{{ group_person_count[group.groupid].num == undefined ? 0 : group_person_count[group.groupid].num}}</td>
  31. <td>
  32. <div class="link-group">
  33. <a href="javascript:;" ng-click="set_group_detail_info(group.groupid)">编辑</a>
  34. <a href="javascript:;" class="del" ng-click="del_group(group.groupid)">删除</a>
  35. <a href="javascript:;" ng-if="group.isdefault != 1" ng-click="set_default(group.groupid)">设为默认</a>
  36. </div>
  37. </td>
  38. </tr>
  39. </table>
  40. <div class="modal fade modal-change-group" id="modal-change-group" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  41. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  42. <div class="modal-content">
  43. <form action="" method="post" enctype="multipart/form-data" class="form-horizontal form we7-form" id="">
  44. <div class="modal-header">
  45. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  46. <h4 class="modal-title">会员组变更设置</h4>
  47. </div>
  48. <div class="modal-body we7-padding-horizontal">
  49. <div class="form-group">
  50. <input type="radio" name="grouplevel" value="0" id="group_level-0" ng-model="group_level"/>
  51. <label for="group_level-0">不自动变更</label>
  52. <span class="help-block">
  53. 会员组的变更只能通过管理员来变更。
  54. </span>
  55. </div>
  56. <div class="form-group">
  57. <input type="radio" name="grouplevel" value="1" id="group_level-1" ng-model="group_level"/>
  58. <label for="group_level-1">根据积分多少自动升降</label>
  59. <span class="help-block">
  60. 系统根据当前会员的总积分,按照每个会员组所需总积分的设置进行变更。可自动升降。
  61. </span>
  62. </div>
  63. <div class="form-group">
  64. <input type="radio" name="grouplevel" value="2" id="group_level-2" ng-model="group_level"/>
  65. <label for="group_level-2">根据积分多少只升不降</label>
  66. <span class="help-block">
  67. 系统根据当前会员的总积分,如果会员的总积分达到更高一级的会员组,则变更会员组,如果积分少于当前所在会员组所需总积分,保持当前会员组不变,不会降级。
  68. </span>
  69. </div>
  70. </div>
  71. <div class="modal-footer">
  72. <button class="btn btn-primary" type="button" ng-click="change_group_level()">保存</button>
  73. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  74. <input type="hidden" name="token" value="c781f0df">
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="modal fade" id="group_detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  81. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  82. <div class="modal-content">
  83. <form action="" method="post" enctype="multipart/form-data" class="form-horizontal form" id="form-info">
  84. <div class="modal-header">
  85. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  86. <h4 class="modal-title">{{ group_detail.groupid != unidefined ? '编辑' : '增加'}}会员组</h4>
  87. </div>
  88. <div class="modal-body">
  89. <div class="form-group">
  90. <label class="col-sm-2 control-label">会员组名称</label>
  91. <div class="col-sm-10">
  92. <input type="text" name="title" ng-model="group_detail.title" class="form-control">
  93. </div>
  94. </div>
  95. <div class="form-group">
  96. <label class="col-sm-2 control-label">所需积分</label>
  97. <div class="col-sm-10">
  98. <input type="text" name="title" ng-model="group_detail.credit" class="form-control">
  99. </div>
  100. </div>
  101. </div>
  102. <div class="modal-footer">
  103. <button class="btn btn-primary" type="button" ng-click="save_group()">保存</button>
  104. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  105. <input type="hidden" name="token" value="c781f0df">
  106. </div>
  107. </form>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <script>
  113. angular.module('memberAPP').value('config', {
  114. 'group_level' : '<?php echo $group_level;?>',
  115. 'change_group_level_url' : "<?php echo url('mc/group/change_group_level')?>",
  116. 'group_list' : <?php echo json_encode($group_list)?>,
  117. 'group_person_count' : <?php echo json_encode($group_person_count)?>,
  118. 'save_group_url' : "<?php echo url('mc/group/save_group')?>",
  119. 'get_group_url' : "<?php echo url('mc/group/get_group')?>",
  120. 'set_default_url' : "<?php echo url('mc/group/set_default')?>",
  121. 'del_group_url' : "<?php echo url('mc/group/del_group')?>",
  122. 'default_group' : <?php echo json_encode($default_group)?>
  123. });
  124. angular.bootstrap($('#js-member-group'), ['memberAPP']);
  125. </script>
  126. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>