agent_customer_list.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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="pattern">
  35. <span>{{d.pattern==0?'日期模式':'闯关模式'}}</span>
  36. </script>
  37. <script type="text/html" id="trainTime">
  38. <span>{{d.start_date + ' - ' + d.end_date}}</span>
  39. </script>
  40. <script type="text/html" id="name">
  41. {{# if(d.name){ }}
  42. <span>{{d.name}}</span>
  43. {{# }else{ }}
  44. <span style="color: #cccccc;">无</span>
  45. {{# } }}
  46. </script>
  47. <script type="text/html" id="addtime">
  48. {{# if(d.addtime){ }}
  49. <span>{{d.addtime}}</span>
  50. {{# }else{ }}
  51. <span style="color: #cccccc;">无</span>
  52. {{# } }}
  53. </script>
  54. <script type="text/html" id="daodiantime">
  55. {{# if(d.daodiantime){ }}
  56. <span>{{d.daodiantime}}</span>
  57. {{# }else{ }}
  58. <span style="color: #cccccc;">未到店</span>
  59. {{# } }}
  60. </script>
  61. <script type="text/html" id="jiaodingtime">
  62. {{# if(d.jiaodingtime){ }}
  63. <span>{{d.jiaodingtime}}</span>
  64. {{# }else{ }}
  65. <span style="color: #cccccc;">未交定</span>
  66. {{# } }}
  67. </script>
  68. <script type="text/html" id="qiandantime">
  69. {{# if(d.qiandantime){ }}
  70. <span>{{d.qiandantime}}</span>
  71. {{# }else{ }}
  72. <span style="color: #cccccc;">未签合同</span>
  73. {{# } }}
  74. </script>
  75. <script type="text/html" id="all_integral">
  76. {{# if(d.all_integral){ }}
  77. <span>{{d.all_integral}}</span>
  78. {{# }else{ }}
  79. <span style="color: #cccccc;">0</span>
  80. {{# } }}
  81. </script>
  82. <script>
  83. layui.config({
  84. base: '__LAYUI__/',
  85. urlbase: '/sys'
  86. }).extend({
  87. index: 'lib/index'
  88. }).use(['index', 'table', 'layedit', 'element'], function () {
  89. var $ = layui.$,
  90. table = layui.table,
  91. element = layui.element,
  92. form = layui.form;
  93. var field = {};
  94. var root_id = '{$employee.root_id}';
  95. var jiaoding = '定金';
  96. var qiandan = '合同';
  97. form.on('submit(LAY-app-contlist-search)', function (data) {
  98. var pattern = $('.pattern').val();
  99. var keyword = $('.keyword').val();
  100. field['pattern'] = pattern;
  101. field['keyword'] = keyword;
  102. //执行重载
  103. table.reload('checkTrainPlan', {
  104. where: field,
  105. page: {
  106. curr: 1
  107. }
  108. });
  109. });
  110. table.render({
  111. elem: '#checkTrainPlan',
  112. url: "{:url('agents/agent_customer_list')}?agentid={$agentid}",
  113. cols: [
  114. [
  115. {
  116. type: 'numbers',
  117. field: 'id',
  118. title: '序号'
  119. },
  120. {
  121. field: 'title',
  122. title: '装修推荐官客户',
  123. templet: '#name'
  124. },
  125. {
  126. field: 'employee_count',
  127. title: '报备时间',
  128. templet: '#addtime'
  129. },
  130. {
  131. title: '到店时间',
  132. field: 'employee_count',
  133. templet: '#daodiantime'
  134. },
  135. {
  136. field: 'employee_count',
  137. title: jiaoding+'时间',
  138. templet: '#jiaodingtime'
  139. },
  140. {
  141. field: 'employee_count',
  142. title: qiandan+'时间',
  143. templet: '#qiandantime'
  144. },
  145. {
  146. field: 'employee_count',
  147. title: '已产出积分',
  148. templet: '#all_integral'
  149. }
  150. ]
  151. ],
  152. page: true,
  153. limit: 10,
  154. height: 'full-60'
  155. });
  156. });
  157. </script>
  158. {/block}