brokerform.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <div class="layui-fluid">
  2. <div class="layui-row layui-col-space15">
  3. <div class="layui-col-md12">
  4. <div class="layui-card">
  5. <div class="layui-card-header">经纪人</div>
  6. <div class="layui-card-body" pad15>
  7. <div class="layui-form layui-form-pane" lay-filter="LAY-broker-brokerform-edit">
  8. <input type="hidden" name="id" value="{$broker.id}">
  9. <div class="layui-form-item">
  10. <label class="layui-form-label">代理名称</label>
  11. <div class="layui-input-block">
  12. <input type="text" name="title" value="{$agent.title}" readonly class="layui-input layui-disabled">
  13. </div>
  14. </div>
  15. <div class="layui-form-item">
  16. <label class="layui-form-label">关联用户</label>
  17. <div class="layui-input-block">
  18. <input type="text" name="musermobile" value="{$broker.muser.mobile}" lay-verify="phone" placeholder="请输入关联用户手机号..."
  19. autocomplete="off" class="layui-input">
  20. <div class="layui-form-mid layui-word-aux">关联用户的手机号。关联的用户会自动归属到该经纪人名下,请谨慎修改。个人中心才会出现职业顾问管理入口导航。</div>
  21. </div>
  22. </div>
  23. <div class="layui-form-item">
  24. <label class="layui-form-label"><span style="color:#f90c05;">*</span>姓名</label>
  25. <div class="layui-input-block">
  26. <input type="text" name="title" value="{$broker.title}" lay-verify="required" placeholder="请输入..." autocomplete="off"
  27. class="layui-input">
  28. </div>
  29. </div>
  30. <div class="layui-form-item">
  31. <label class="layui-form-label">手机号</label>
  32. <div class="layui-input-block">
  33. <input type="text" name="mobile" value="{$broker.mobile}" lay-verify="phone" placeholder="请输入..." autocomplete="off"
  34. class="layui-input">
  35. </div>
  36. </div>
  37. <div class="layui-form-item">
  38. <label class="layui-form-label">微信号</label>
  39. <div class="layui-input-block">
  40. <input type="text" name="weixin" value="{$broker.weixin}" placeholder="请输入..." autocomplete="off" class="layui-input">
  41. </div>
  42. </div>
  43. <div class="layui-form-item">
  44. <label class="layui-form-label">QQ号</label>
  45. <div class="layui-input-block">
  46. <input type="text" name="qq" value="{$broker.qq}" placeholder="请输入..." autocomplete="off" class="layui-input">
  47. </div>
  48. </div>
  49. <div class="layui-form-item" id="LAY-broker-brokerform-edit-areapicker">
  50. <label class="layui-form-label"><span style="color:#f90c05;">*</span>省市区</label>
  51. <div class="layui-input-inline">
  52. <select name="province" class="province-selector" data-value="{$broker.province}" lay-filter="province-2"
  53. lay-verify="required">
  54. <option value="">请选择省</option>
  55. </select>
  56. </div>
  57. <div class="layui-input-inline">
  58. <select name="city" class="city-selector" data-value="{$broker.city}" lay-filter="city-2" lay-verify="required">
  59. <option value="">请选择市</option>
  60. </select>
  61. </div>
  62. <div class="layui-input-inline">
  63. <select name="district" class="district-selector" data-value="{$broker.district}" lay-filter="district-2"
  64. lay-verify="required">
  65. <option value="">请选择区</option>
  66. </select>
  67. </div>
  68. </div>
  69. <div class="layui-form-item" id="formdetails">
  70. <label class="layui-form-label">基本介绍</label>
  71. <div class="layui-input-block">
  72. <textarea name="details" placeholder="请输入..." class="layui-textarea">{$broker.details}</textarea>
  73. </div>
  74. </div>
  75. <div class="layui-form-item" pane>
  76. <label class="layui-form-label">状态</label>
  77. <div class="layui-input-block">
  78. <input type="checkbox" lay-filter="switch" name="status" {eq name="broker.status|default=1" value="1" }checked{/eq}
  79. lay-skin="switch" lay-text="正常|禁用" value="1">
  80. </div>
  81. </div>
  82. <div class="layui-form-item" pane>
  83. <label class="layui-form-label">报备权限</label>
  84. <div class="layui-input-block">
  85. <input type="checkbox" lay-filter="switch" name="powerreport" {eq name="broker.powerreport|default=1" value="1"
  86. }checked{/eq} lay-skin="switch" lay-text="是|否" value="1">
  87. </div>
  88. </div>
  89. <div class="layui-form-item">
  90. <div class="layui-input-block">
  91. <input type="button" lay-submit lay-filter="LAY-broker-brokerform-edit-submit" value="确认提交" class="layui-btn">
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <script>
  101. layui.config({
  102. base: '/static/echoui/' //静态资源所在路径
  103. }).extend({
  104. index: 'lib/index' //主入口模块
  105. }).use(['index', 'form', 'set', 'upload', 'selectN', 'selectM', 'layarea'], function() {
  106. var $ = layui.$,
  107. setter = layui.setter,
  108. admin = layui.admin,
  109. form = layui.form,
  110. upload = layui.upload,
  111. selectN = layui.selectN,
  112. selectM = layui.selectM,
  113. layarea = layui.layarea;
  114. form.render();
  115. layarea.render({
  116. elem: '#LAY-broker-brokerform-edit-areapicker',
  117. data: {
  118. province: '福建省',
  119. city: '福州市',
  120. district: '马尾区',
  121. }
  122. });
  123. form.on('submit(LAY-broker-brokerform-edit-submit)', function(obj) {
  124. var index = parent.layer.getFrameIndex(window.name);
  125. admin.req({
  126. url: setter.baseAgentUrl + 'broker/editbroker',
  127. data: obj.field,
  128. done: function(res) {
  129. layer.msg("提交成功", {
  130. icon: 1
  131. });
  132. parent.layui.table.reload('LAY-broker-brokerlist-table'); //重载表格
  133. parent.layer.close(index);
  134. }
  135. });
  136. });
  137. });
  138. </script>