index.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>报备审核</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport"
  9. content="width=report_check-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  10. <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  11. <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
  12. <style type="text/css">
  13. .seach_items {
  14. float: right;
  15. margin-left: 10px;
  16. }
  17. </style>
  18. <style type="text/css">
  19. .LAY-btns .layui-nav {
  20. padding-left: 0;
  21. padding-right: 10px;
  22. top: -4px;
  23. margin: 0 10px;
  24. border: 0;
  25. background-color: #009688;
  26. }
  27. .LAY-btns .layui-nav .layui-nav-item {
  28. line-height: 40px;
  29. }
  30. .LAY-btns .layui-nav .layui-nav-child {
  31. top: 34px;
  32. }
  33. .LAY-btns .layui-nav .layui-nav-bar {
  34. display: none;
  35. }
  36. .LAY-btns .layui-nav .layui-nav-child dd.layui-this a {
  37. color: #333;
  38. background-color: #fff;
  39. }
  40. .LAY-btns .layui-nav .layui-nav-child dd.layui-this a:hover {
  41. background-color: #f2f2f2;
  42. color: #000;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <div class="layui-fluid">
  48. <div class="layui-card">
  49. <div class="layui-card-body" pad15>
  50. <div class="layui-row layui-col-space15">
  51. <div class="layui-col-md12">
  52. <div class="LAY-btns" style="margin-bottom: 10px;">
  53. <div style="float: left">
  54. <button class="layui-btn" id="report_check_divide"><i
  55. class="layui-icon layui-icon-auz"></i>分配客户
  56. </button>
  57. </div>
  58. <form class="layui-form" lay-filter="query-form-element1">
  59. <div class="seach_items">
  60. <button class="layui-btn" lay-submit lay-filter="query-form-element1"><i
  61. class="layui-icon layui-icon-search"></i>查询
  62. </button>
  63. </div>
  64. <div class="seach_items">
  65. <input type="text" name="name" autocomplete="off" class="layui-input"
  66. placeholder="姓名"/>
  67. </div>
  68. </form>
  69. <div style="clear: both;"></div>
  70. </div>
  71. <table class="layui-hide" id="report_check_datagrid" lay-filter="report_check-operate"></table>
  72. <script type="text/html" id="report_check-operate-bar">
  73. <div class="layui-btn-group">
  74. <a class="layui-btn layui-btn-default layui-btn-xs" lay-event="report_check_search"
  75. >查看跟踪记录</a>
  76. </div>
  77. </script>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <script src="../../layuiadmin/layui/layui.js?t=1"></script>
  84. <script>
  85. layui.config({
  86. base: '../../../layuiadmin/' //静态资源所在路径
  87. }).extend({
  88. index: 'lib/index' //主入口模块
  89. }).use(['index', 'table', 'form', 'upload'], function () {
  90. var $ = layui.$;
  91. var table = layui.table
  92. , form = layui.form
  93. , upload = layui.upload
  94. , admin = layui.admin;
  95. table.render({
  96. elem: '#report_check_datagrid'
  97. , url: '/api/report_check.json'
  98. , cols: [[
  99. {type:'checkbox'}
  100. , {field: 'name', title: '姓名', width: 200}
  101. , {field: 'gender_text', title: "性别", width: 70}
  102. , {field: 'tel', title: '电话', width: 150}
  103. , {field: 'project_text', title: '项目', width: 200}
  104. , {field: 'report_time', title: '报备时间', width: 150}
  105. , {field: 'report_user', title: '报备人', width: 100}
  106. , {field: 'hitBill_customer', title: '撞单客户', width: 100}
  107. , {field: 'hitBill_project_text', title: '撞单项目', width: 100}
  108. , {field: 'stalk_user', title: '撞单跟踪人', width: 100}
  109. , {field: 'stalk_process', title: '撞单进度', width: 100}
  110. , {field: 'last_stalk', title: '最后跟踪', width: 200}
  111. , {width: 120, align: 'center', fixed: 'right', toolbar: '#report_check-operate-bar'}
  112. ]]
  113. , page: true
  114. , height: 'full-108'
  115. });
  116. // admin.req({
  117. // url: '/report_check/dict/',
  118. // done: function (res) {
  119. // var data = res.data.source;
  120. // var source_node = $('#id_source');
  121. // for (var i in data) {
  122. // var pid = data[i].id;
  123. // var name = data[i].name;
  124. // source_node.append("<option value='" + pid + "'>" + name + "</option>");
  125. // }
  126. // form.render('select');
  127. // }
  128. // });
  129. $('#btn_download').on('click', function () {
  130. layui.view.download("/static/xls/设备信息导入模板.xlsx");
  131. });
  132. //监听工具条
  133. table.on('tool(report_check-operate)', function (obj) {
  134. var data = obj.data;
  135. //查看跟踪记录
  136. if (obj.event === 'report_check_search') {
  137. }
  138. });
  139. form.on('submit(query-form-element1)', function (data) {
  140. table.reload('report_check_datagrid', {
  141. where: data.field
  142. , page: {curr: 1}
  143. });
  144. layer.closeAll();
  145. return false
  146. });
  147. $('#report_check_divide').on('click', function () {
  148. var checkStatus = table.checkStatus('report_check_datagrid');
  149. if(checkStatus.data.length === 0){
  150. layer.msg('请至少选择一条记录');
  151. return
  152. };
  153. let divide_id = checkStatus.data.map(item=>{ return item.id }).join(",");
  154. layer.open({
  155. type: 2,
  156. title: '分配客户',
  157. area: ['400px', '300px'],
  158. btn: ['保存', '取消'],
  159. yes: function (index, dom) {
  160. layui.onSubmitChild = function (data) {
  161. let customer = '华北';
  162. layer.close(index);
  163. if(!data){
  164. layer.open({
  165. type: 1,
  166. title: '操作',
  167. area: ['300px', '220px'],
  168. btn: ['标记为撞单客户', '重新分配'],
  169. yes: function (index, dom) {
  170. layui.onSubmitChild = function (data) {
  171. layer.close(index);
  172. };
  173. },
  174. btn2: function (index, layero) {
  175. layer.close(index);
  176. },
  177. content: '<p style="text-align: center; padding: 15px 0">和' + customer + '客户撞单,请选择后续操作。<p>'
  178. });
  179. }
  180. table.reload('report_check_datagrid', {});
  181. };
  182. layui.submitChild();
  183. },
  184. btn2: function (index, layero) {
  185. layer.close(index);//关闭当前按钮
  186. },
  187. content: 'divide.html?id=' + divide_id
  188. });
  189. });
  190. });
  191. </script>
  192. </body>
  193. </html>