transferform.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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-transferform-edit">
  8. <input type="hidden" name="origin_broker_id" value="{$origin_broker_id}">
  9. <div class="layui-form-item">
  10. <label class="layui-form-label">对方名称</label>
  11. <div class="layui-input-block" id="broker_id">
  12. </div>
  13. </div>
  14. <div class="layui-form-item">
  15. <div class="layui-input-block">
  16. <input type="button" lay-submit lay-filter="LAY-broker-transferform-edit-submit"
  17. value="确认提交" class="layui-btn">
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. <script>
  27. layui.config({
  28. base: '/static/echoui/' //静态资源所在路径
  29. }).extend({
  30. index: 'lib/index' //主入口模块
  31. }).use(['index', 'form', 'set', 'upload','selectN', 'layarea'], function () {
  32. var $ = layui.$, setter = layui.setter, admin = layui.admin, selectN = layui.selectN,form = layui.form;
  33. form.render();
  34. var workeragent = selectN({
  35. elem: '#broker_id',
  36. search: [true],
  37. tips: ["请选择对方姓名"],
  38. data: {$broker_list|raw},
  39. field: { idName: 'id', titleName: 'title'}
  40. });
  41. form.on('submit(LAY-broker-transferform-edit-submit)', function (obj) {
  42. var index = parent.layer.getFrameIndex(window.name);
  43. admin.req({
  44. url: setter.baseAgentUrl + 'broker/edittransfer',
  45. data: obj.field,
  46. done: function (res) {
  47. layer.msg("提交成功", {
  48. icon: 1
  49. });
  50. parent.layui.table.reload('LAY-broker-brokerlist-table'); //重载表格
  51. parent.layer.close(index);
  52. }
  53. });
  54. });
  55. });
  56. </script>