designer.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  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. min-width: 1100px;
  7. }
  8. body::-webkit-scrollbar {
  9. /*滚动条整体样式*/
  10. width: 4px;
  11. /*高宽分别对应横竖滚动条的尺寸*/
  12. height: 1px;
  13. }
  14. body::-webkit-scrollbar-thumb {
  15. /*滚动条里面小方块*/
  16. border-radius: 10px;
  17. box-shadow: inset 0 0 5px rgba(97, 184, 179, 0.1);
  18. background: #78b4b4;
  19. }
  20. body::-webkit-scrollbar-track {
  21. /*滚动条里面轨道*/
  22. box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
  23. border-radius: 10px;
  24. background: #ededed;
  25. }
  26. .layui-table thead tr,
  27. .layui-table-header {
  28. background-color: #D8E6F1 !important;
  29. }
  30. .layui-fluid {
  31. display: block;
  32. box-shadow: 0 0 4px 0 #B6CADE;
  33. border-radius: 5px;
  34. margin: 15px;
  35. background-color: #ffffff;
  36. }
  37. .layui-form-label {
  38. width: auto;
  39. }
  40. .layui-tab-title .layui-this {
  41. color: #249EFB !important;
  42. }
  43. .layui-tab-title .layui-this:after {
  44. width: 50px;
  45. height: 4px;
  46. top: 37px;
  47. background-color: #249EFB;
  48. border: none;
  49. left: 50%;
  50. transform: translateX(-50%);
  51. }
  52. .layui-tab-title li {
  53. margin: 0px 5px;
  54. }
  55. .layui-btn-xs,
  56. .layui-btn-xs:hover {
  57. border: 1px solid #249EFB;
  58. background-color: #fff;
  59. color: #249EFB;
  60. padding: 0px 10px;
  61. }
  62. .layui-btn-danger,
  63. .layui-btn-danger:hover {
  64. color: #FF5722;
  65. background-color: #fff;
  66. border: 1px solid #FF5722;
  67. padding: 0px 10px;
  68. }
  69. .layui-btn-primary {
  70. color: #249EFB;
  71. border: 1px solid #249EFB;
  72. }
  73. .layui-btn-primary:hover {
  74. background-color: #E3F7FF;
  75. color: #249EFB;
  76. }
  77. .flex-row {
  78. display: flex;
  79. justify-content: space-around;
  80. align-items: center;
  81. background-color: #fff;
  82. margin: 15px;
  83. height: 130px;
  84. box-shadow: 0 0 4px 0 #b6cade;
  85. border-radius: 5px;
  86. }
  87. .flex-item {
  88. display: flex;
  89. flex-direction: column;
  90. justify-content: center;
  91. align-items: center;
  92. }
  93. .font-weight {
  94. font-weight: 600;
  95. }
  96. .font32 {
  97. font-size: 32px;
  98. }
  99. .mt10 {
  100. margin-top: 10px;
  101. }
  102. .layui-form-item .layui-inline {
  103. margin-bottom: 0px;
  104. margin-right: 0px !important;
  105. }
  106. .block {
  107. display: inline-block;
  108. width: 100%;
  109. height: 100%;
  110. }
  111. .layui-card {
  112. padding: 0px;
  113. }
  114. .thenumbers{cursor: pointer;color:#249EFB;}
  115. .layui-tab-title {
  116. border-bottom: 1px solid #f5f5f5;
  117. }
  118. </style>
  119. <body>
  120. <div class="layui-fluid">
  121. <div class="layui-card">
  122. <div class="layui-tab">
  123. <ul class="layui-tab-title">
  124. <li style="margin-left: 0px;">
  125. <a href="{:url('org/index')}" class="block">组织架构</a>
  126. </li>
  127. <li class="layui-this">
  128. 设计师管理
  129. </li>
  130. <li>
  131. <a href="{:url('recruitment/index')}" class="block">招聘管理</a>
  132. </li>
  133. </ul>
  134. </div>
  135. <div class="layui-form layui-card-header layuiadmin-card-header-auto">
  136. <div class="layui-form-item">
  137. <div style="float: left;">
  138. <div class="layui-inline">
  139. <div class="layui-input-inline">
  140. <!-- <button class="layui-btn layui-btn-primary layuiadmin-btn-course"
  141. data-type="add">添加设计师</button> -->
  142. </div>
  143. </div>
  144. </div>
  145. <div style="float:right;" class="flexRow">
  146. <div class="layui-inline">
  147. <div class="layui-input-inline flex-sub relative">
  148. <input type="text" class="iwidth layui-input" name="start_time" id="time_date"
  149. placeholder="VCR更新时间" autocomplete="off" class="layui-input">
  150. </div>
  151. </div>
  152. <div class="layui-inline" style="margin-left: 10px;">
  153. <div class="layui-input-inline">
  154. <select name="org" id="org" lay-search>
  155. <option value="">部门</option>
  156. {volist name="designerOrg" id="org"}
  157. <option value="{$org.id}">{$org.name}</option>
  158. {/volist}
  159. </select>
  160. </div>
  161. </div>
  162. <div class="layui-inline" style="margin-left: 10px;">
  163. <div class="layui-input-inline">
  164. <input type="text" name="keyword" id="" class="layui-input keyword" placeholder="请输入设计师名称"/>
  165. </div>
  166. </div>
  167. <div class="layui-inline">
  168. <button class="layui-btn layuiadmin-btn-useradmin searchBtn submitbtn" lay-submit lay-filter="search">
  169. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  170. </button>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="layui-card-body">
  176. <table lay-filter="table-designer" id="table-designer"></table>
  177. </div>
  178. </div>
  179. </div>
  180. </body>
  181. {/block} {block name="js"}
  182. <script type="text/html" id="theNumber">
  183. <a class="thenumbers" lay-event="thenumbers">{{d.designer_reserve}}</a>
  184. </script>
  185. <script type="text/html" id="table-action">
  186. <a class="layui-btn layui-btn-xs" lay-event="designer-edit">编辑</a>
  187. {{# if(d.show == '展示'){ }}
  188. <a class="layui-btn layui-btn-xs" lay-event="designer-show">不展示</a>
  189. {{# }else{ }}
  190. <a class="layui-btn layui-btn-xs" lay-event="designer-show">展示</a>
  191. {{# } }}
  192. </script>
  193. <script type="text/html" id="photo">
  194. {{# if(d.headimgurl){ }}
  195. <img src="{{d.headimgurl}}?x-oss-process=image/resize,w_50" style="width: 30px;height: 30px;"/>
  196. {{# }else{ }}
  197. <span style="color: #cccccc;">无</span>
  198. {{# } }}
  199. </script>
  200. <script type="text/html" id="work_years">
  201. {{# if(d.work_years != null && d.work_years != ''){ }}
  202. <span >{{d.work_years}}</span>
  203. {{# }else{ }}
  204. <span style="color: #cccccc;">无</span>
  205. {{# } }}
  206. </script>
  207. <script type="text/html" id="position">
  208. {{# if(d.work_years != null && d.work_years != ''){ }}
  209. <span >{{d.position?d.position:'无'}}</span>
  210. {{# }else{ }}
  211. <span style="color: #cccccc;">无</span>
  212. {{# } }}
  213. </script>
  214. <script type="text/html" id="good_at">
  215. {{# if(d.good_at != null && d.good_at != ''){ }}
  216. {{# layui.each(d.good_at, function(index, item){ }}
  217. <span>{{item}}</span>
  218. {{# }); }}
  219. {{# }else{ }}
  220. <span style="color: #cccccc;">无</span>
  221. {{# } }}
  222. </script>
  223. <script type="text/html" id="good_house">
  224. {{# if(d.good_house != null && d.good_house != ''){ }}
  225. {{# layui.each(d.good_house, function(index, item){ }}
  226. <span>{{item}}</span>
  227. {{# }); }}
  228. {{# }else{ }}
  229. <span style="color: #cccccc;">无</span>
  230. {{# } }}
  231. </script>
  232. <script type="text/html" id="vcr">
  233. {{# if(d.vcr != null && d.vcr != ''){ }}
  234. <span>有</span>
  235. {{# }else{ }}
  236. <span style="color: #cccccc;">无</span>
  237. {{# } }}
  238. </script>
  239. <script>
  240. layui.config({
  241. base: '__LAYUI__/',
  242. urlbase: '/sys'
  243. }).extend({
  244. index: 'lib/index'
  245. }).use(['index', 'table', 'layedit', 'element', 'laydate'], function () {
  246. var $ = layui.$,
  247. table = layui.table,
  248. element = layui.element,
  249. form = layui.form,
  250. laydate = layui.laydate;
  251. var field = {};
  252. laydate.render({
  253. elem: '#time_date'
  254. , type: 'date'
  255. , range: true
  256. , trigger: 'click'//呼出事件改成click
  257. , done: function (value, date, endDate) { // 选择完毕的回调
  258. }
  259. });
  260. form.on('submit(search)', function (data) {
  261. var field = data.field;
  262. //执行重载
  263. table.reload('table-designer', {
  264. where: field
  265. , page: { curr: 1}
  266. });
  267. });
  268. document.onkeydown=function(event){
  269. var e = event || window.event || arguments.callee.caller.arguments[0];
  270. if(e && e.keyCode==13){
  271. $(".submitbtn").trigger("click");
  272. }
  273. };
  274. //事件
  275. var active = {
  276. };
  277. //话术列表
  278. table.render({
  279. elem: '#table-designer',
  280. autoSort: false,
  281. url: "{:url('employee/designer')}",
  282. cols: [
  283. [ {
  284. field: 'name',
  285. title: '设计师名称',
  286. }, {
  287. field: 'org_name',
  288. title: '部门',
  289. }, {
  290. title: '设计师形象照',
  291. templet: '#photo',
  292. },{
  293. title: '设计年限',
  294. field: 'work_years',
  295. templet: '#work_years',
  296. },{
  297. title: '设计级别',
  298. field: 'position',
  299. templet: '#position',
  300. },{
  301. title: '擅长风格',
  302. field: 'good_at',
  303. templet: '#good_at',
  304. },{
  305. title: '擅长户型',
  306. field: 'good_house',
  307. templet: '#good_house',
  308. },{
  309. title: 'VCR更新时间',
  310. field: 'vcr_updatetime',
  311. },{
  312. title: 'VRC',
  313. field: 'vcr',
  314. templet: '#vcr'
  315. },{
  316. title: '状态',
  317. field: 'show',
  318. // templet: '#good_house',
  319. },{
  320. title:'预约次数',
  321. // field:'designer_reserve',
  322. templet:'#theNumber'
  323. }, {
  324. title: '操作',
  325. width: '15%',
  326. align: 'center',
  327. fixed: 'right',
  328. toolbar: '#table-action'
  329. }]
  330. ],
  331. page: true,
  332. limit: 30,
  333. height: 'full-200',
  334. text: '对不起,加载出现异常!'
  335. });
  336. showDialog();
  337. function showDialog () {
  338. setTimeout(() => {
  339. let msg = sessionStorage.getItem('Dialog');
  340. let data = sessionStorage.getItem('trainData') ? JSON.parse(sessionStorage.getItem('trainData')): '';
  341. if (msg && data.pattern == 0) {
  342. layer.alert('训练人员无法在规定训练周期内完成训练,请重新更改训练周期',{ title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function (index) {
  343. layer.close(index);
  344. });
  345. sessionStorage.removeItem('Dialog');
  346. sessionStorage.removeItem('trainData');
  347. }
  348. },1500)
  349. }
  350. //监听列表
  351. table.on('tool(table-designer)', function(obj) {
  352. var data = obj.data;
  353. switch(obj.event) {
  354. case 'thenumbers':
  355. layer.open({
  356. type: 2,
  357. title: ['设计师列表', 'color:#333333;background-color:#D8E6F1;'],
  358. content: '{:url("employee/designer_reserve")}?id='+data.id,
  359. resize: false,
  360. area: ['80%', '80%'],
  361. });
  362. break;
  363. case 'designer-edit':
  364. layer.open({
  365. type: 2,
  366. title: ['编辑设计师', 'color:#333333;background-color:#D8E6F1;'],
  367. content: '{:url("org/edit_designer")}?id='+data.id,
  368. resize: false,
  369. area: ['80%', '80%'],
  370. });
  371. break;
  372. case 'designer-show':
  373. layer.confirm('确定展示(不展示)当前设计师', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'] }, function (index) {
  374. $.ajax({
  375. url: '{:url("employee/edit_show")}',
  376. data: {
  377. id: data.id
  378. },
  379. type: 'post',
  380. success: function (res) {
  381. if (res.code == 0) {
  382. layer.msg(res.msg, { anim: 0 });
  383. table.reload('table-designer', {
  384. page: { curr: 1}
  385. });
  386. } else {
  387. layer.msg(res.msg, { anim: 6 });
  388. }
  389. }
  390. });
  391. layer.close(index);
  392. });
  393. break;
  394. }
  395. });
  396. $('.layui-btn.layuiadmin-btn-course').on('click', function() {
  397. var type = $(this).data('type');
  398. active[type] ? active[type].call(this) : '';
  399. });
  400. });
  401. </script>
  402. {/block}