截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

open.html 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. {layout name="layout2" /}
  2. <style>
  3. /*.layui-form {*/
  4. /* margin: 5px;*/
  5. /*}*/
  6. /*.layui-form-label {*/
  7. /* width: 120px;*/
  8. /* text-align: left;*/
  9. /* padding-left:30px;*/
  10. /*}*/
  11. .layui-input-block {
  12. width: 300px;
  13. line-height: 36px;
  14. }
  15. .layui-btn {
  16. margin-top: 5px;
  17. }
  18. select {
  19. width: 300px;
  20. }
  21. .layui-input {
  22. width: 300px;
  23. }
  24. </style>
  25. <form class="layui-form">
  26. <input type="hidden" name="user_id" id="user_id" value="0">
  27. <div class="layui-form-item">
  28. <label class="layui-form-label">用户信息</label>
  29. <div class="layui-inline">
  30. <span id="user_selected"></span>
  31. </div>
  32. <div class="layui-inline">
  33. <button class="layui-btn layui-btn-sm layui-bg-blue" id="show-user">选择用户</button>
  34. </div>
  35. </div>
  36. <div class="layui-form-item">
  37. <label class="layui-form-label">分销等级</label>
  38. <div class="layui-input-block">
  39. <select name="level_id" id="level_id" placeholder="请选择" >
  40. {foreach $levels as $val }
  41. <option value="{$val.id}">{$val.name}({$val.weights})级</option>
  42. {/foreach}
  43. </select>
  44. </div>
  45. </div>
  46. <div class="layui-form-item">
  47. <div class="layui-input-block layui-hide">
  48. <button class="layui-btn" lay-submit lay-filter="openSubmit" id="openSubmit">立即提交</button>
  49. </div>
  50. </div>
  51. </form>
  52. <script>
  53. layui.config({
  54. version: "{$front_version}",
  55. base: '/static/lib/'
  56. }).use(['element', 'form'], function () {
  57. var $ = layui.$
  58. , form = layui.form
  59. , layer = layui.layer
  60. , element = layui.element;
  61. $('#show-user').click(function() {
  62. layer.open({
  63. type: 2
  64. ,title: "选择用户"
  65. ,content: "{:url('distribution.distribution_member/userLists')}"
  66. ,area: ["90%", "90%"]
  67. ,btn: ["确定", "取消"]
  68. ,yes: function(index, layero){
  69. var iframeWindow = window["layui-layer-iframe" + index];
  70. let user_selected = iframeWindow.user_selected();
  71. $('#user_selected').html(user_selected.nickname + '(' + user_selected.sn + ')');
  72. $('#user_id').val(user_selected.id);
  73. layer.close(index);
  74. }
  75. });
  76. return false;
  77. });
  78. });
  79. </script>