history.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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. width: 100%;
  7. background-color: #fff;
  8. }
  9. .layui-table thead tr,
  10. .layui-table-header {
  11. background-color: #D8E6F1 !important;
  12. }
  13. .layui-fluid {
  14. display: block;
  15. border-radius: 5px;
  16. background-color: #ffffff;
  17. padding: 15px 30px;
  18. }
  19. .layui-tab {
  20. padding: 15px;
  21. height: 100%;
  22. }
  23. .layui-form-item {
  24. width: 100%;
  25. }
  26. .layui-form-item .layui-inline {
  27. flex:1;
  28. display: flex;
  29. min-width: 80px;
  30. height: 38px;
  31. line-height: 38px;
  32. background: #FFFFFF;
  33. margin-left: 16px !important;
  34. }
  35. .layui-form-item .layui-input-inline {
  36. width: 145px;
  37. height: 38px;
  38. line-height: 38px;
  39. margin-bottom: 0;
  40. }
  41. .layui-icon {
  42. font-size: 20px !important;
  43. }
  44. .layui-form-item .layui-input-inline .layui-input {
  45. border: 1px solid #9DB6CF;
  46. border-radius: 5px;
  47. }
  48. .layui-form-select dl dd.layui-this {
  49. background-color: #249EFB;
  50. }
  51. .layui-form-item div.searchBox {
  52. width: 320px;
  53. background: #FFFFFF;
  54. border: 1px solid #B6CADE;
  55. border-radius: 24px;
  56. height: 38px;
  57. overflow: hidden;
  58. padding-left: 18px;
  59. position: relative;
  60. margin-bottom: 0px;
  61. float: right;
  62. }
  63. .searchBox .inputBox {
  64. width: 240px;
  65. float: left;
  66. height: 36px;
  67. line-height: 36px;
  68. border-width: 0;
  69. }
  70. .searchBtn {
  71. position: absolute;
  72. top: 0;
  73. right: 0;
  74. width: 51px;
  75. height: 38px;
  76. background-color: #fff;
  77. }
  78. .searchBtn img {
  79. position: absolute;
  80. width: 26px;
  81. top: 6px;
  82. left: 0;
  83. }
  84. .layui-card .layui-tab {
  85. margin: 0;
  86. height: 31%;
  87. width: 98%;
  88. /*float: right;*/
  89. padding: 1px;
  90. }
  91. .layui-btn-primary {
  92. color: #249EFB;
  93. border: 1px solid #249EFB;
  94. }
  95. .layui-btn-primary:hover {
  96. background-color: #E3F7FF;
  97. color: #249EFB;
  98. }
  99. .border {
  100. border: 1px solid #f2f2f2;
  101. }
  102. .line {
  103. width:90%;
  104. height:1px;
  105. background-color: #f2f2f2;
  106. margin: auto;
  107. }
  108. .layui-card .layui-tab-brief .layui-tab-title li.layui-this {
  109. background-color: #249EFB;
  110. color: #fff;
  111. }
  112. .layui-tab-brief>.layui-tab-more li.layui-this:after, .layui-tab-brief>.layui-tab-title .layui-this:after {
  113. border-bottom: none;
  114. }
  115. .layui-card .layui-tab-brief .layui-tab-title li {
  116. background-color: #F2F2F2;
  117. margin: 0px 5px;
  118. }
  119. .layui-card-body {
  120. padding: 15px 0px 0px;
  121. }
  122. .layui-unselect .layui-form-select {
  123. min-width: 60px;
  124. margin-left: 10px;
  125. }
  126. .layui-card-body {
  127. padding: 0px 0px 0px;
  128. height: 483px;
  129. }
  130. .circle1 {
  131. height: 18px;
  132. background-color: #E5E3FF;
  133. font-size: 8px !important;
  134. margin-right: 5px;
  135. color: #2868FF;
  136. line-height: 18px;
  137. padding: 0px 2px;
  138. }
  139. .circle2 {
  140. height: 18px;
  141. background-color: #FFE3E3;
  142. font-size: 8px !important;
  143. margin-right: 5px;
  144. color: #FF2828;
  145. line-height: 18px;
  146. padding: 0px 2px;
  147. }
  148. .flex-sub {
  149. flex:1;
  150. }
  151. .layui-table-cell {
  152. padding: 0px 8px;
  153. }
  154. </style>
  155. <body>
  156. <div class="layui-fluid">
  157. <div class="layui-card">
  158. <div class="layui-card-header layuiadmin-card-header-auto border">
  159. <div style="display:flex;">
  160. <div style="flex:1;display:flex;justify-content:center;align-items:center;">审核总数:{$data.count}</div>
  161. <div style="flex:1;display:flex;justify-content:center;align-items:center;">通过数量:{$data.pass_count}</div>
  162. <div style="flex:1;display:flex;justify-content:center;align-items:center;">驳回数量:{$data.no_count}</div>
  163. </div>
  164. </div>
  165. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="margin-top: 10px;">
  166. <ul class="layui-tab-title layui-inline" style="margin-top: 7px;"></ul>
  167. <div style="float:right;margin-top: 7px;margin-right: -18px;display:flex;">
  168. <!-- <form class="layui-form"> -->
  169. <div class="layui-inline">
  170. <div class="layui-input-inline layui-form" style="max-width:279px;">
  171. <label style="width:66px;margin-top:10px;">上传时间</label>
  172. <input type="text" style="border:1px solid #e6e6e6;height:36px;max-width:212px;text-align: center;" class="pdl40 huise999 ds" name="time" id="time_date" placeholder="开始时间 - 结束时间" autocomplete="off" class="layui-input">
  173. </div>
  174. </div>
  175. <div class="layui-inline" style="margin-left: 10px;">
  176. <div class="layui-input-inline layui-form">
  177. <select name="type_id" lay-filter="org" class="type_id" id="org">
  178. <option value="">请选择部门</option>
  179. {volist name="org" id="i"}
  180. <option value="{$i.id}">{$i.name}</option>
  181. {/volist}
  182. </select>
  183. </div>
  184. </div>
  185. <div class="layui-inline" style="margin-left: 10px;">
  186. <div class="layui-input-inline layui-form">
  187. <select name="cate" lay-filter="slt" class="type_id" id="cate">
  188. <option value="">请选择状态</option>
  189. <option value="1">通过</option>
  190. <option value="2">驳回</option>
  191. </select>
  192. </div>
  193. </div>
  194. <div class="layui-inline" style="margin-left: 10px;">
  195. <div class="layui-input-inline layui-form">
  196. <select name="employee_id" lay-filter="employee_id" class="type_id" id="employee_id" lay-search>
  197. <option value="">请选择或搜索上传人员</option>
  198. {volist name="employee" id="i"}
  199. <option value="{$i.id}">{$i.name}</option>
  200. {/volist}
  201. </select>
  202. </div>
  203. </div>
  204. <div class="layui-inline" style="margin-left: 10px;">
  205. <button class="layui-btn" id="LAY-app-contlist-searchs">
  206. <i class="layui-icon layui-icon-search"></i>
  207. </button>
  208. </div>
  209. <!-- </form> -->
  210. </div>
  211. </div>
  212. <div class="layui-card-body">
  213. <table id="evidence-table" lay-filter="evidence-table"></table>
  214. </div>
  215. </div>
  216. </div>
  217. </body>
  218. {/block} {block name="js"}
  219. <script type="text/html" id="show">
  220. <input type="checkbox" name="show" value="{{d.id}}" lay-skin="switch" lay-text="上架|下架" lay-filter="show" {{ d.publish == 1 ? 'checked' : '' }}>
  221. </script>
  222. <script type="text/html" id="table-evidence-action">
  223. <a class="layui-btn layui-btn-xs" lay-event="evi-details"><i class="layui-icon layui-icon-edit"></i>编辑</a>
  224. <!-- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="evidence-delete"><i
  225. class="layui-icon layui-icon-delete"></i>删除</a> -->
  226. </script>
  227. <script type="text/html" id="evidence_num">
  228. <span>{{d.picnum}}</span>
  229. </script>
  230. <script type="text/html" id="title">
  231. {{# if(d.title){ }}
  232. <span>{{d.title}}</span>
  233. {{# }else{ }}
  234. <span style="color: #cccccc;">无</span>
  235. {{# } }}
  236. </script>
  237. <script type="text/html" id="title">
  238. {{# if(d.title){ }}
  239. <span>{{d.title}}</span>
  240. {{# }else{ }}
  241. <span style="color: #cccccc;">无</span>
  242. {{# } }}
  243. </script>
  244. <script type="text/html" id="content">
  245. {{# if(d.content){ }}
  246. <span>{{d.content}}</span>
  247. {{# }else{ }}
  248. <span style="color: #cccccc;">无</span>
  249. {{# } }}
  250. </script>
  251. <script type="text/html" id="name">
  252. {{# if(d.name){ }}
  253. <span>{{d.name}}</span>
  254. {{# }else{ }}
  255. <span style="color: #cccccc;">无</span>
  256. {{# } }}
  257. </script>
  258. <script type="text/html" id="addtime">
  259. {{# if(d.addtime){ }}
  260. <span>{{d.addtime}}</span>
  261. {{# }else{ }}
  262. <span style="color: #cccccc;">无</span>
  263. {{# } }}
  264. </script>
  265. <script type="text/html" id="org_name">
  266. {{# if(d.org_name){ }}
  267. <span>{{d.org_name}}</span>
  268. {{# }else{ }}
  269. <span style="color: #cccccc;">无</span>
  270. {{# } }}
  271. </script>
  272. <script type="text/html" id="status">
  273. {{# if(d.status){ }}
  274. <span>{{d.status}}</span>
  275. {{# }else{ }}
  276. <span style="color: #cccccc;">无</span>
  277. {{# } }}
  278. </script>
  279. <script type="text/html" id="box">
  280. {{# if(d.box){ }}
  281. <span>{{d.box}}</span>
  282. {{# }else{ }}
  283. <span style="color: #cccccc;">无</span>
  284. {{# } }}
  285. </script>
  286. <script type="text/html" id="approve_name">
  287. {{# if(d.approve_name){ }}
  288. {{# if(d.approve_from==1){ }}
  289. <div style="display: flex;align-items: center;"><span class="circle1">手机</span><div>{{d.approve_name}}</div></div>
  290. {{# }else{ }}
  291. <div style="display: flex;align-items: center;"><span class="circle2">后台</span><div>{{d.approve_name}}</div></div>
  292. {{# } }}
  293. {{# }else{ }}
  294. <span style="color: #cccccc;">无</span>
  295. {{# } }}
  296. </script>
  297. <script type="text/html" id="aprove_time">
  298. {{# if(d.aprove_time){ }}
  299. <span>{{d.aprove_time}}</span>
  300. {{# }else{ }}
  301. <span style="color: #cccccc;">无</span>
  302. {{# } }}
  303. </script>
  304. <script>
  305. layui.config({
  306. base: '__LAYUI__/',
  307. urlbase: '/sys'
  308. }).extend({
  309. index: 'lib/index' //主入口模块
  310. }).use(['index', 'table', 'element','laydate','form'], function () {
  311. var $ = layui.$,
  312. form = layui.form,
  313. element = layui.element,
  314. laydate = layui.laydate,
  315. table = layui.table;
  316. laydate.render({
  317. elem: '#time_date'
  318. ,type: 'date'
  319. ,range: true
  320. ,trigger: 'click'//呼出事件改成click
  321. });
  322. //客户见证列表
  323. table.render({
  324. elem: '#evidence-table',
  325. autoSort: false,
  326. url: '{:url("talkskill/history_list")}?type='+"{$type}",
  327. cols: [
  328. [{
  329. field: 'title',
  330. // width: 180,
  331. title: '问题',
  332. align:'center',
  333. templet: '#title',
  334. }, {
  335. field: 'content',
  336. title: '回答',
  337. align:'center',
  338. templet: '#content',
  339. }, {
  340. field: 'name',
  341. title: '上传人员',
  342. // width: 100,
  343. align:'center',
  344. templet: '#name',
  345. }, {
  346. field: 'addtime',
  347. title: '上传时间',
  348. // width: 180,
  349. align:'center',
  350. }, {
  351. field: 'org_name',
  352. title: '所属部门',
  353. // width: 120,
  354. align:'center',
  355. templet: '#org_name',
  356. }, {
  357. field: 'status',
  358. title: '审核状态',
  359. // width: 100,
  360. align:'center',
  361. templet: '#status',
  362. }, {
  363. field: 'box',
  364. title: '驳回原因',
  365. align:'center',
  366. templet: '#box',
  367. }, {
  368. field: 'approve_name',
  369. title: '审核人员',
  370. // width: 100,
  371. align:'center',
  372. templet: '#approve_name',
  373. }, {
  374. field: 'aprove_time',
  375. title: '审核时间',
  376. // width: 180,
  377. align:'center',
  378. templet: '#aprove_time',
  379. }]
  380. ],
  381. page: true,
  382. limit: 10,
  383. // height: 'full-200',
  384. text: '对不起,加载出现异常!'
  385. });
  386. //搜索
  387. $('#LAY-app-contlist-searchs').click(function() {
  388. var type_id = $('#org').val();
  389. var cate = $('#cate').val();
  390. var employee_id = $('#employee_id').val();
  391. var time = $('#time_date').val();
  392. var field = [];
  393. field['org'] = type_id;
  394. field['cate'] = cate;
  395. field['employee_id'] = employee_id;
  396. field['time'] = time;
  397. //执行重载
  398. table.reload('evidence-table', {
  399. where: field,
  400. page: {
  401. curr: 1
  402. }
  403. });
  404. });
  405. //监听部门变化
  406. form.on('select(org)', function(data){
  407. var org_id = data.value;
  408. $.ajax({
  409. url: '{:url("talkskill/history")}?cate=1&org_id='+org_id,
  410. type: 'post',
  411. dataType: 'json',
  412. success: function(res) {
  413. var html = '<option value="">请选择或搜索上传人员</option>';
  414. for (let i = 0; i < res.data.length; i++) {
  415. const val = res.data[i];
  416. html += '<option value='+val.id+'>'+val.name+'</option>';
  417. }
  418. console.log(html)
  419. $('#employee_id').empty();
  420. $('#employee_id').append(html);
  421. form.render();
  422. }
  423. });
  424. })
  425. });
  426. </script>
  427. {/block}