call_cuslist.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {extend name="public/layout"/} {block name="title"}外呼电话{/block} {block name="body"}
  2. <style type="text/css">
  3. html,
  4. body {
  5. display: block;
  6. background-color: #fff;
  7. }
  8. .layui-table thead tr,
  9. .layui-table-header {
  10. background-color: #D8E6F1 !important;
  11. }
  12. .layui-fluid {
  13. display: block;
  14. border-radius: 5px;
  15. background-color: #ffffff;
  16. padding: 15px 30px;
  17. }
  18. .layui-tab {
  19. padding: 15px;
  20. height: 100%;
  21. }
  22. .layui-form-item {
  23. width: 100%;
  24. }
  25. </style>
  26. <div class="layui-fluid">
  27. <div class="layui-card">
  28. <div class="layui-card-body">
  29. <table lay-filter="checkTrainPlan" id="checkTrainPlan"></table>
  30. </div>
  31. </div>
  32. </div>
  33. {/block} {block name="js"}
  34. <script type="text/html" id="status">
  35. {{# if(d.status){ }}
  36. <span>{{d.status_name}}</span>
  37. {{# }else{ }}
  38. <span style="color: #cccccc;">无</span>
  39. {{# } }}
  40. </script>
  41. <script type="text/html" id="fwd_start_time">
  42. {{# if(d.fwd_start_time){ }}
  43. <span>{{d.fwd_start_time}}</span>
  44. {{# }else{ }}
  45. <span style="color: #cccccc;">无</span>
  46. {{# } }}
  47. </script>
  48. <script type="text/html" id="customer_name">
  49. <span>{{d.customer.name}}</span>
  50. </script>
  51. <script>
  52. layui.config({
  53. base: '__LAYUI__/',
  54. urlbase: '/sys'
  55. }).extend({
  56. index: 'lib/index'
  57. }).use(['index', 'table', 'layedit', 'element'], function () {
  58. var $ = layui.$,
  59. table = layui.table,
  60. element = layui.element,
  61. form = layui.form;
  62. var field = {};
  63. form.on('submit(LAY-app-contlist-search)', function (data) {
  64. var pattern = $('.pattern').val();
  65. var keyword = $('.keyword').val();
  66. field['pattern'] = pattern;
  67. field['keyword'] = keyword;
  68. //执行重载
  69. table.reload('checkTrainPlan', {
  70. where: field,
  71. page: {
  72. curr: 1
  73. }
  74. });
  75. });
  76. table.render({
  77. elem: '#checkTrainPlan',
  78. url: "{:url('manager_emp/call_cuslist')}?customer_id={$customer_id}",
  79. cols: [
  80. [
  81. {
  82. type: 'numbers',
  83. field: 'id',
  84. title: '序号'
  85. },
  86. {
  87. field: 'title',
  88. title: '拨打时间',
  89. templet: '#fwd_start_time'
  90. },
  91. {
  92. field: 'addtime',
  93. title: '状态',
  94. templet: '#status'
  95. },
  96. ]
  97. ],
  98. page: true,
  99. limit: 10,
  100. height: 'full-60'
  101. });
  102. });
  103. </script>
  104. {/block}