form.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <form action="{:request()->url()}" autocomplete="off" class="layui-form layui-card" data-auto="true" method="post">
  2. <div class="layui-card-body padding-left-40">
  3. <fieldset class="layui-form-item">
  4. <legend><span class="layui-badge layui-bg-cyan">用户等级</span></legend>
  5. <div class="layui-form-item layui-row layui-col-space15">
  6. <div class="layui-col-xs3 block relative">
  7. <span class="color-green label-required-prev">等级序号</span><span class="margin-left-5 color-desc">Number</span>
  8. <select class="layui-select" name="number">
  9. {for start="1" end="10" name="i"}{if isset($vo.number) and $vo.number eq $i}
  10. <option selected value="{$i}">当前 VIP {$vo.number} 等级</option>
  11. {else}
  12. <option value="{$i}">设置 VIP {$i} 等级</option>
  13. {/if}{/for}
  14. </select>
  15. </div>
  16. <label class="layui-col-xs9 block relative">
  17. <span class="color-green label-required-prev">等级名称</span><span class="margin-left-5 color-desc">Level Name</span>
  18. <input class="layui-input" name="name" placeholder="请输入等级名称" required value="{$vo.name|default=''}">
  19. </label>
  20. </div>
  21. </fieldset>
  22. <fieldset class="layui-form-item">
  23. <legend><span class="layui-badge layui-bg-cyan">升级规则</span></legend>
  24. <div class="layui-form-item">
  25. {php}$vo['upgrade_type'] = $vo['upgrade_type'] ?? 1;{/php}
  26. {foreach [1=>'达成所有条件',0=>'达成任何条件'] as $k => $v}
  27. {if isset($vo.upgrade_type) and $vo.upgrade_type eq $k}
  28. <label class="think-radio"><input checked lay-ignore name="upgrade_type" type="radio" value="{$k}"> {$v}</label>
  29. {else}
  30. <label class="think-radio"><input lay-ignore name="upgrade_type" type="radio" value="{$k}"> {$v}</label>
  31. {/if}{/foreach}
  32. </div>
  33. </fieldset>
  34. <fieldset class="layui-form-item">
  35. <legend><span class="layui-badge layui-bg-cyan">升级条件</span></legend>
  36. <div class="font-s13">
  37. <label class="layui-form-item block relative think-checkbox notselect">
  38. {if isset($vo.goods_vip_status) and $vo.goods_vip_status eq 1}
  39. ① <input checked lay-ignore name="goods_vip_status" type="checkbox" value="1">开启
  40. {else}
  41. ① <input lay-ignore name="goods_vip_status" type="checkbox" value="1">开启
  42. {/if}
  43. 需要 <span class="color-blue">购买入会礼包</span> 达成升级;
  44. </label>
  45. <label class="layui-form-item block relative think-checkbox notselect">
  46. {if isset($vo.teams_direct_status) and $vo.teams_direct_status eq 1}
  47. ② <input checked lay-ignore name="teams_direct_status" type="checkbox" value="1">开启
  48. {else}
  49. ② <input lay-ignore name="teams_direct_status" type="checkbox" value="1">开启
  50. {/if}
  51. <span class="color-blue">直推团队</span> 升级,<span class="color-blue">直推团队</span> 达到
  52. <input class="inline-block text-center" data-blur-number="0" name="teams_direct_number" style="width:80px" value="{$vo.teams_direct_number|default='0'}">
  53. 人;
  54. </label>
  55. <label class="layui-form-item block relative think-checkbox notselect">
  56. {if isset($vo.teams_indirect_status) and $vo.teams_indirect_status eq 1}
  57. ③ <input checked lay-ignore name="teams_indirect_status" type="checkbox" value="1">开启
  58. {else}
  59. ③ <input lay-ignore name="teams_indirect_status" type="checkbox" value="1">开启
  60. {/if}
  61. <span class="color-blue">间接团队</span> 升级,<span class="color-blue">间接团队</span> 达到
  62. <input class="inline-block text-center" data-blur-number="0" name="teams_indirect_number" style="width:80px" value="{$vo.teams_indirect_number|default='0'}">
  63. 人;
  64. </label>
  65. <label class="layui-form-item block relative think-checkbox notselect">
  66. {if isset($vo.teams_users_status) and $vo.teams_users_status eq 1}
  67. ④ <input checked lay-ignore name="teams_users_status" type="checkbox" value="1">开启
  68. {else}
  69. ④ <input lay-ignore name="teams_users_status" type="checkbox" value="1">开启
  70. {/if}
  71. <span class="color-blue">团队总数</span> 升级,<span class="color-blue">团队总数</span> 达到
  72. <input class="inline-block text-center" data-blur-number="0" name="teams_users_number" style="width:80px" value="{$vo.teams_users_number|default='0'}">
  73. 人;
  74. </label>
  75. <label class="layui-form-item block relative think-checkbox notselect">
  76. {if isset($vo.order_amount_status) and $vo.order_amount_status eq 1}
  77. ⑤ <input checked lay-ignore name="order_amount_status" type="checkbox" value="1">开启
  78. {else}
  79. ⑤ <input lay-ignore name="order_amount_status" type="checkbox" value="1">开启
  80. {/if}
  81. <span class="color-blue">订单总额</span> 升级,<span class="color-blue">订单总额</span> 达到
  82. <input class="inline-block text-center" data-blur-number="2" name="order_amount_number" style="width:80px" value="{$vo.order_amount_number|default='0'}">
  83. 元;
  84. </label>
  85. </div>
  86. </fieldset>
  87. <fieldset class="layui-form-item">
  88. <legend><span class="layui-badge layui-bg-cyan">发放奖利</span></legend>
  89. <div class="layui-form-item notselect">
  90. {foreach $prizes as $prize}{if isset($vo.rebate_rule) && is_array($vo.rebate_rule) && in_array($prize.code, $vo.rebate_rule)}
  91. <label class="think-checkbox"><input checked lay-ignore name="rebate_rule[]" type="checkbox" value="{$prize.code}"> {$prize.name}</label>
  92. {else}
  93. <label class="think-checkbox"><input lay-ignore name="rebate_rule[]" type="checkbox" value="{$prize.code}"> {$prize.name}</label>
  94. {/if}{/foreach}
  95. </div>
  96. </fieldset>
  97. <fieldset class="layui-form-item layui-hide">
  98. <legend><span class="layui-badge layui-bg-cyan">等级描述</span></legend>
  99. <label class="layui-form-item block relative">
  100. <textarea class="layui-textarea" name="remark" placeholder="请输入用户等级描述">{$vo.remark|default=''}</textarea>
  101. </label>
  102. </fieldset>
  103. <div class="hr-line-dashed"></div>
  104. {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}
  105. {notempty name='vo.number'}<input name='old_number' type='hidden' value='{$vo.number}'>{/notempty}
  106. <div class="layui-form-item text-center">
  107. <button class="layui-btn" type='submit'>保存数据</button>
  108. <button class="layui-btn layui-btn-danger" data-close data-confirm="确定要取消编辑吗?" type='button'>取消编辑</button>
  109. </div>
  110. </div>
  111. <script>form.render()</script>
  112. </form>