index.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {layout name="layout" /}
  2. <form id="form" action="{:url('fastshop/config/index')}">
  3. <div class="titlebar">
  4. <div class="fn-fb"><i class="iconfont icon-line-chart_icon"></i>会员配置</div>
  5. </div>
  6. <table class="formtable">
  7. <tr><th>购买限制:</th><td>
  8. <select datatype="*" class="select w180" name="shop_types">
  9. <option value="0"{if $info.shop_types == 0}selected{/if}>任何人</option>
  10. <option value="1"{if $info.shop_types == 1}selected{/if}>仅会员</option>
  11. </select>
  12. <span class="gray">想要获得推荐奖励,必须自己先开通会员.</span>
  13. </td></tr>
  14. <tr><th>开通会员:</th><td>
  15. <input class="input" datatype="n" type="text" name="regvip_price" value="{$info.regvip_price}" />(¥)
  16. <span class="gray">开通会员费用</span>
  17. </td></tr>
  18. <tr><th>直推返比:</th><td><input class="input" datatype="n" type="text" name="regvip_level1_ratio" value="{$info.regvip_level1_ratio}" /> %</td></tr>
  19. <tr><th>间推返比:</th><td><input class="input" datatype="n" type="text" name="regvip_level2_ratio" value="{$info.regvip_level2_ratio}" /> %</td></tr>
  20. <tr><th>提现手续费:</th><td>
  21. <input class="input" datatype="n" type="text" name="tax" value="{$info.tax}" /> (%)
  22. <span class="gray">公式:【 实际提现金额 - 实际提现金额*手续费 】 </span>
  23. </td></tr>
  24. </table>
  25. <div class="titlebar">
  26. <div class="fn-fb"><i class="iconfont icon-line-chart_icon"></i>抢购奖励</div>
  27. </div>
  28. <table class="formtable">
  29. <tr><th>成交利润率:</th><td>
  30. <input class="input" datatype="n" type="text" name="profit" value="{$info.profit}" /> (%)
  31. <span class="gray">单件商品成交利润率.<span class="fn-f12">公式:商品1000元,10%利润率【A1000=B1000+C1000 】(A1000*10%=100)+(B1000*10%=100) = 200元</span></span><br />
  32. </td></tr>
  33. <tr><th>购物金比例:</th><td>
  34. <input class="input" datatype="n" type="text" name="shopping" value="{$info.shopping }" /> (%)
  35. <span class="gray">公式:【 禁止提现,只能用于闪商城消费 】 </span>
  36. </td></tr>
  37. <tr><th>奖励方式:</th><td>
  38. <select datatype="*" class="select w180" name="reward_types">
  39. <option value="0"{if $info.reward_types == 0}selected{/if}>成交奖励</option>
  40. <option value="1"{if $info.reward_types == 1}selected{/if}>利润奖励</option>
  41. </select>
  42. <span class="gray">您推荐新用户成交的奖励方式</span>
  43. </td></tr>
  44. <tr><th class="rules_1">{if $info.reward_types == 0}推荐奖励{else}奖励倍数{/if}:</th><td>
  45. <input class="input" datatype="n" type="text" name="reward_nth" value="{$info.reward_nth}" />
  46. <span class="gray rules_1text">{if $info.reward_types == 0} (%)商品本身成交价的百分比奖励给推荐人 {else} 公式(成交利润率 - 购物金比例 ÷ 奖励倍数)= (奖励金额 ÷ 奖励倍数)N次(最小1元){/if}</span>
  47. </td></tr>
  48. <tr><th class="rules_2">{if $info.reward_types == 0}间接奖励{else}绩效奖励比例{/if}:</th><td>
  49. <input class="input" datatype="n" type="text" name="reward_ratio" value="{$info.reward_ratio}" /> (%)
  50. <span class="gray rules_2text">{if $info.reward_types == 0}商品本身成交价的百分比奖励给推荐人{else}商品本身成交价的百分比奖励给满足绩效规则的用户{/if}</span>
  51. </td></tr>
  52. </table>
  53. <table class="formtable rules {if $info.reward_types == 0}fn-hide{/if}" id="props">
  54. {if empty($info.rules )}
  55. <tr>
  56. <th>绩效奖励规则:</th>
  57. <td>
  58. <input class="input" type="text" name="num[]" value="" placeholder="人数" />
  59. <input class="input" type="text" name="much[]" value="" placeholder="成绩"/>
  60. <input class="input" type="text" name="ratio[]" value="" placeholder="比例"/>(%)
  61. <span class="fn-cp" id="add"><i class="iconfont icon-add_icon"></i></span>
  62. </td>
  63. </tr>
  64. {else}
  65. {foreach $info.rules as $key => $vo}
  66. <tr>
  67. <th>{if !$key}绩效奖励规则:{/if}</th>
  68. <td>
  69. <input class="input" type="text" name="num[]" value="{$vo.num}" placeholder="人数" />
  70. <input class="input" type="text" name="much[]" value="{$vo.much}" placeholder="成绩" />
  71. <input class="input" type="text" name="ratio[]" value="{$vo.ratio}" placeholder="比例" />(%)
  72. {if !$key}<span class="fn-cp" id="add"><i class="iconfont icon-add_icon"></i></span>
  73. {else /}<span class="fn-cp" onclick="delProps(this)"><i class="iconfont icon-reduce_icon"></i></span>{/if}
  74. </td>
  75. </tr>
  76. {/foreach}
  77. {/if}
  78. </table>
  79. <table class="formtable">
  80. <tr class="rules {if $info.reward_types == 0}fn-hide{/if}">
  81. <th>平台奖励比例</th><td><input class="input" datatype="n" type="text" name="platform_ratio" value="{$info.platform_ratio ? $info.platform_ratio : 0}" /> (%) <span class="gray">0不启用</span></td>
  82. </tr>
  83. <tr class="rules {if $info.reward_types == 0}fn-hide{/if}">
  84. <th>平台奖励条件</th><td>
  85. <input class="input" type="text" name="platform_amout" value="{$info.platform_amout ? $info.platform_amout : 0}" placeholder="成绩"/>
  86. <span class="gray rules_2text">{if $info.reward_types == 0}商品本身成交价的百分比奖励给推荐人{else}商品本身成交价的百分比奖励给满足绩效规则的用户{/if}</span>
  87. </td>
  88. </tr>
  89. <tr>
  90. <th></th>
  91. <td>
  92. <input type="submit" value="确定" class="button submit" />
  93. <input type="reset" value="重置" class="button button-blank" />
  94. </td>
  95. </tr>
  96. </table>
  97. </form>
  98. <script type="text/javascript">
  99. Do('base', 'layer', 'form', function () {
  100. $('#form').isForm();
  101. //增加商品属性
  102. $('#add').click(function () {
  103. $("#props").append(
  104. "<tr><th></th><td>" +
  105. '<input class="input" type="text" name="num[]" placeholder="人数" /> ' +
  106. '<input class="input" type="text" name="much[]" placeholder="成绩" /> ' +
  107. '<input class="input" type="text" name="ratio[]" placeholder="比例" />(%)</div>' +
  108. ' <span class="fn-cp" onClick="delProps(this)"><i class="iconfont icon-reduce_icon"></i></span></td></tr>')
  109. })
  110. $("select[name='reward_types']").change(function () {
  111. var id = $(this).val();
  112. if(id == 1){
  113. $('.rules').show();
  114. $('.rules_1').text('奖励倍数:');
  115. $('.rules_2').text('绩效奖励比例:');
  116. $('.rules_1text').text('公式(成交利润率 - 购物金比例 ÷ 奖励倍数)= (奖励金额 ÷ 奖励倍数)N次(最小1元)');
  117. $('.rules_2text').text('商品本身成交价的百分比奖励给满足绩效规则的用户');
  118. }else{
  119. $('.rules').hide();
  120. $('.rules_1').text('推荐奖励:');
  121. $('.rules_2').text('间接奖励:');
  122. $('.rules_1text').text('(%)商品本身成交价的百分比奖励给推荐人');
  123. $('.rules_2text').text('商品本身成交价的百分比奖励给推荐人');
  124. }
  125. })
  126. })
  127. //删除属性
  128. function delProps(dom) {
  129. $(dom).parents("tr").remove();
  130. $(dom).parent().remove();
  131. }
  132. </script>