diff --git a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js b/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9ac2c8aa093e2355edaa3b7e047a5952e2b08a22 100644 --- a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js +++ b/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js @@ -0,0 +1,99 @@ + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'textool', 'tagEditor'], function (exports) { + winui.renderColor(); + layui.use(['form'], function (form) { + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + textool = layui.textool; + + textool.init({ + eleId: 'basicResume', + maxlength: 1000, + tools: ['count', 'copy', 'reset', 'clear'] + }); + + skyeyeEnclosure.init('enclosureUpload'); + matchingLanguage(); + form.render(); + form.on('submit(formAddBean)', function (data) { + if (winui.verifyForm(data.elem)) { + var params = { + name: $("#name").val(), + sex: $("input[name='userSex']:checked").val(), + idcard: $("#idcard").val(), + phone: $("#phone").val(), + workYears: $("#workYears").val(), + chargePersonId: chargePerson[0].id, + favoriteJob: $("#favoriteJob").val(), + basicResume: $("#basicResume").val(), + enclosureResume: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') + }; + AjaxPostUtil.request({url: reqBasePath + "bossIntervieweeFrom002", params: params, type: 'json', method: "POST", callback: function(json){ + if(json.returnCode == 0){ + parent.layer.close(index); + parent.refreshCode = '0'; + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + } + return false; + }); + + var chargePerson = []; + $('#chargePersonId').tagEditor({ + initialTags: [], + placeholder: '请选择负责人', + editorTag: false, + beforeTagDelete: function(field, editor, tags, val) { + var inArray = -1; + $.each(chargePerson, function(i, item) { + if(val === item.name) { + inArray = i; + return false; + } + }); + if(inArray != -1) { //如果该元素在集合中存在 + chargePerson.splice(inArray, 1); + } + } + }); + + // 人员选择 + $("body").on("click", "#toHandsPersonSelPeople", function(e){ + systemCommonUtil.userReturnList = [].concat(chargePerson); + systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含 + systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 + systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 + systemCommonUtil.openSysUserStaffChoosePage(function (staffChooseList){ + // 移除所有tag + var tags = $('#handsPersonId').tagEditor('getTags')[0].tags; + for (i = 0; i < tags.length; i++) { + $('#chargePersonId').tagEditor('removeTag', tags[i]); + } + chargePerson = [].concat(staffChooseList); + // 添加新的tag + $.each(chargePerson, function(i, item){ + $('#chargePersonId').tagEditor('addTag', item.name); + }); + }); + }); + + // 选择来源 + $("body").on("click", "#toChooseFromId", function(e){ + var _this = $(this); + bossUtil.openBossIntervieweeFromChoosePage(function (bossIntervieweeFromMation){ + _this.parent().find("input").val(bossIntervieweeFromMation.name); + }); + }); + + $("body").on("click", "#cancle", function(){ + parent.layer.close(index); + }); + }); +}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeList.js b/boss/src/main/resources/template/js/bossInterviewee/myEnterBossIntervieweeList.js similarity index 98% rename from boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeList.js rename to boss/src/main/resources/template/js/bossInterviewee/myEnterBossIntervieweeList.js index 2a4e02271d82ab06daccde46585d12a3d6277272..e21de88eb9f9890755d43c30ef0e06e33672abfb 100644 --- a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeList.js +++ b/boss/src/main/resources/template/js/bossInterviewee/myEnterBossIntervieweeList.js @@ -140,9 +140,10 @@ layui.config({ function getTableParams(){ return { name: $("#name").val(), - phone: $("#phone").val() + phone: $("#phone").val(), + type: 1 }; } - exports('bossIntervieweeList', {}); + exports('myEnterBossIntervieweeList', {}); }); diff --git a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html b/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0794921abd6bfdf8dbfe87078a5a1ccdad14ede4 100644 --- a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html +++ b/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html @@ -0,0 +1,89 @@ + + +
+ +