123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- {extend name="public/layout" /} {block name="title"}新增训练计划{/block} {block name="body"}
- <style type="text/css">
- html,
- body {
- display: block;
- min-width: 1100px;
- }
- body::-webkit-scrollbar {
- /*滚动条整体样式*/
- width: 4px;
- /*高宽分别对应横竖滚动条的尺寸*/
- height: 1px;
- }
- body::-webkit-scrollbar-thumb {
- /*滚动条里面小方块*/
- border-radius: 10px;
- box-shadow: inset 0 0 5px rgba(97, 184, 179, 0.1);
- background: #78b4b4;
- }
- body::-webkit-scrollbar-track {
- /*滚动条里面轨道*/
- box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
- border-radius: 10px;
- background: #ededed;
- }
- .layui-table thead tr,
- .layui-table-header {
- background-color: #D8E6F1 !important;
- }
- .layui-fluid {
- display: block;
- box-shadow: 0 0 4px 0 #B6CADE;
- border-radius: 5px;
- margin: 15px;
- background-color: #ffffff;
- }
- .layui-form-label {
- width: auto;
- }
- .layui-tab-title .layui-this {
- color: #249EFB !important;
- }
- .layui-tab-title .layui-this:after {
- width: 50px;
- height: 4px;
- top: 37px;
- background-color: #249EFB;
- border: none;
- left: 50%;
- transform: translateX(-50%);
- }
- .layui-tab-title li {
- margin: 0px 5px;
- }
- .layui-btn-xs,
- .layui-btn-xs:hover {
- border: 1px solid #249EFB;
- background-color: #fff;
- color: #249EFB;
- padding: 0px 10px;
- }
- .layui-btn-danger,
- .layui-btn-danger:hover {
- color: #FF5722;
- background-color: #fff;
- border: 1px solid #FF5722;
- padding: 0px 10px;
- }
- .layui-btn-primary {
- color: #249EFB;
- border: 1px solid #249EFB;
- }
- .layui-btn-primary:hover {
- background-color: #E3F7FF;
- color: #249EFB;
- }
- .flex-row {
- display: flex;
- justify-content: space-around;
- align-items: center;
- background-color: #fff;
- margin: 15px;
- height: 130px;
- box-shadow: 0 0 4px 0 #b6cade;
- border-radius: 5px;
- }
- .flex-item {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .font-weight {
- font-weight: 600;
- }
- .font32 {
- font-size: 32px;
- }
- .mt10 {
- margin-top: 10px;
- }
- .layui-form-item .layui-inline {
- margin-bottom: 0px;
- margin-right: 0px !important;
- }
- .block {
- display: inline-block;
- width: 100%;
- height: 100%;
- }
- .layui-card {
- padding: 0px;
- }
- .thenumbers{cursor: pointer;color:#249EFB;}
- .layui-tab-title {
- border-bottom: 1px solid #f5f5f5;
- }
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-tab">
- <ul class="layui-tab-title">
- <li style="margin-left: 0px;">
- <a href="{:url('org/index')}" class="block">组织架构</a>
- </li>
- <li class="layui-this">
- 设计师管理
- </li>
- <li>
- <a href="{:url('recruitment/index')}" class="block">招聘管理</a>
- </li>
- </ul>
- </div>
- <div class="layui-form layui-card-header layuiadmin-card-header-auto">
- <div class="layui-form-item">
- <div style="float: left;">
- <div class="layui-inline">
- <div class="layui-input-inline">
- <!-- <button class="layui-btn layui-btn-primary layuiadmin-btn-course"
- data-type="add">添加设计师</button> -->
- </div>
- </div>
- </div>
- <div style="float:right;" class="flexRow">
- <div class="layui-inline">
- <div class="layui-input-inline flex-sub relative">
- <input type="text" class="iwidth layui-input" name="start_time" id="time_date"
- placeholder="VCR更新时间" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline" style="margin-left: 10px;">
- <div class="layui-input-inline">
- <select name="org" id="org" lay-search>
- <option value="">部门</option>
- {volist name="designerOrg" id="org"}
- <option value="{$org.id}">{$org.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline" style="margin-left: 10px;">
- <div class="layui-input-inline">
- <input type="text" name="keyword" id="" class="layui-input keyword" placeholder="请输入设计师名称"/>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layuiadmin-btn-useradmin searchBtn submitbtn" lay-submit lay-filter="search">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-card-body">
- <table lay-filter="table-designer" id="table-designer"></table>
- </div>
- </div>
- </div>
- </body>
- {/block} {block name="js"}
- <script type="text/html" id="theNumber">
- <a class="thenumbers" lay-event="thenumbers">{{d.designer_reserve}}</a>
- </script>
- <script type="text/html" id="table-action">
- <a class="layui-btn layui-btn-xs" lay-event="designer-edit">编辑</a>
- {{# if(d.show == '展示'){ }}
- <a class="layui-btn layui-btn-xs" lay-event="designer-show">不展示</a>
- {{# }else{ }}
- <a class="layui-btn layui-btn-xs" lay-event="designer-show">展示</a>
- {{# } }}
- </script>
- <script type="text/html" id="photo">
- {{# if(d.headimgurl){ }}
- <img src="{{d.headimgurl}}?x-oss-process=image/resize,w_50" style="width: 30px;height: 30px;"/>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="work_years">
- {{# if(d.work_years != null && d.work_years != ''){ }}
- <span >{{d.work_years}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="position">
- {{# if(d.work_years != null && d.work_years != ''){ }}
- <span >{{d.position?d.position:'无'}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="good_at">
- {{# if(d.good_at != null && d.good_at != ''){ }}
- {{# layui.each(d.good_at, function(index, item){ }}
- <span>{{item}}</span>
- {{# }); }}
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="good_house">
- {{# if(d.good_house != null && d.good_house != ''){ }}
- {{# layui.each(d.good_house, function(index, item){ }}
- <span>{{item}}</span>
- {{# }); }}
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="vcr">
- {{# if(d.vcr != null && d.vcr != ''){ }}
- <span>有</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index'
- }).use(['index', 'table', 'layedit', 'element', 'laydate'], function () {
- var $ = layui.$,
- table = layui.table,
- element = layui.element,
- form = layui.form,
- laydate = layui.laydate;
- var field = {};
- laydate.render({
- elem: '#time_date'
- , type: 'date'
- , range: true
- , trigger: 'click'//呼出事件改成click
- , done: function (value, date, endDate) { // 选择完毕的回调
- }
- });
- form.on('submit(search)', function (data) {
- var field = data.field;
- //执行重载
- table.reload('table-designer', {
- where: field
- , page: { curr: 1}
- });
- });
- document.onkeydown=function(event){
- var e = event || window.event || arguments.callee.caller.arguments[0];
- if(e && e.keyCode==13){
- $(".submitbtn").trigger("click");
- }
- };
- //事件
- var active = {
- };
- //话术列表
- table.render({
- elem: '#table-designer',
- autoSort: false,
- url: "{:url('employee/designer')}",
- cols: [
- [ {
- field: 'name',
- title: '设计师名称',
- }, {
- field: 'org_name',
- title: '部门',
- }, {
- title: '设计师形象照',
- templet: '#photo',
- },{
- title: '设计年限',
- field: 'work_years',
- templet: '#work_years',
- },{
- title: '设计级别',
- field: 'position',
- templet: '#position',
- },{
- title: '擅长风格',
- field: 'good_at',
- templet: '#good_at',
- },{
- title: '擅长户型',
- field: 'good_house',
- templet: '#good_house',
- },{
- title: 'VCR更新时间',
- field: 'vcr_updatetime',
- },{
- title: 'VRC',
- field: 'vcr',
- templet: '#vcr'
- },{
- title: '状态',
- field: 'show',
- // templet: '#good_house',
- },{
- title:'预约次数',
- // field:'designer_reserve',
- templet:'#theNumber'
- }, {
- title: '操作',
- width: '15%',
- align: 'center',
- fixed: 'right',
- toolbar: '#table-action'
- }]
- ],
- page: true,
- limit: 30,
- height: 'full-200',
- text: '对不起,加载出现异常!'
- });
- showDialog();
- function showDialog () {
- setTimeout(() => {
- let msg = sessionStorage.getItem('Dialog');
- let data = sessionStorage.getItem('trainData') ? JSON.parse(sessionStorage.getItem('trainData')): '';
- if (msg && data.pattern == 0) {
- layer.alert('训练人员无法在规定训练周期内完成训练,请重新更改训练周期',{ title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function (index) {
- layer.close(index);
- });
- sessionStorage.removeItem('Dialog');
- sessionStorage.removeItem('trainData');
- }
- },1500)
- }
- //监听列表
- table.on('tool(table-designer)', function(obj) {
- var data = obj.data;
- switch(obj.event) {
- case 'thenumbers':
- layer.open({
- type: 2,
- title: ['设计师列表', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("employee/designer_reserve")}?id='+data.id,
- resize: false,
- area: ['80%', '80%'],
- });
- break;
- case 'designer-edit':
- layer.open({
- type: 2,
- title: ['编辑设计师', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("org/edit_designer")}?id='+data.id,
- resize: false,
- area: ['80%', '80%'],
- });
- break;
- case 'designer-show':
- layer.confirm('确定展示(不展示)当前设计师', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'] }, function (index) {
- $.ajax({
- url: '{:url("employee/edit_show")}',
- data: {
- id: data.id
- },
- type: 'post',
- success: function (res) {
- if (res.code == 0) {
- layer.msg(res.msg, { anim: 0 });
- table.reload('table-designer', {
- page: { curr: 1}
- });
- } else {
- layer.msg(res.msg, { anim: 6 });
- }
- }
- });
- layer.close(index);
- });
- break;
- }
- });
- $('.layui-btn.layuiadmin-btn-course').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- });
- </script>
- {/block}
|