(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b2e1536"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,r,n){return e/=n/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,r){var i=o(),s=e-i,l=20,u=0;t="undefined"===typeof t?500:t;var c=function e(){u+=l;var o=Math.easeInOutQuad(u,i,s,t);a(o),u0?r("select-user",{key:n,attrs:{name:n,item:t,branchsyId:e.branchsyId,employeeByOrganId:e.employeeByOrganId,technicianByOrganId:e.technicianByOrganId}}):e._e()]}))],2),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.$listeners.close}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1)},m=[],p=(r("5df3"),r("db72")),h=r("2d63"),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",r=arguments.length>2?arguments[2]:void 0,n={};if(e){var a,o=Object(h["a"])(e);try{for(o.s();!(a=o.n()).done;){var i=a.value;n[i[t]]=r?i[r]:i}}catch(s){o.e(s)}finally{o.f()}}return n},g=r("829b"),v=function(e){return Object(g["a"])({url:"/api-web/employee/level",method:"post",data:e})},y=function(e){return Object(g["a"])({url:"/api-web/employee/levelDetail",method:"get",params:e})},_=function(e){return Object(g["a"])({url:"/api-web/employee/queryEmployByOrganId",method:"get",params:e})},O=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-alert",{staticClass:"alert",attrs:{type:"info",closable:!1},scopedSlots:e._u([{key:"title",fn:function(){return[r("div",{staticClass:"title"},[r("span",[e._v(e._s(e.formatName))]),e._v(" "),r("el-button",{staticStyle:{padding:"5px"},attrs:{type:"text"},on:{click:e.clear}},[e._v("清空")])],1)]},proxy:!0}])}),e._v(" "),r("div",{staticClass:"content"},e._l(e.item,(function(t,n){return r("el-row",{key:t.organId},[r("el-col",{attrs:{span:8}},[r("el-form-item",{attrs:{label:e.branchsyId[t.organId]&&e.branchsyId[t.organId].name}})],1),e._v(" "),r("el-col",{attrs:{span:16}},[r("el-form-item",{attrs:{label:"交接人",prop:e.name+"."+n+".transferUserId",rules:[{required:!0,message:"请选择交接人"}]}},[r("el-select",{attrs:{value:t.transferUserId,clearable:"",filterable:""},on:{change:function(r){return e.change(r,t)}}},e._l(e.options[t.organId],(function(e){return r("el-option",{key:e.id||e.userId,attrs:{value:e.id||e.userId,label:e.realName}})})),1)],1)],1)],1)})),1)],1)},I=[],w=(r("7f7f"),{props:["item","name","branchsyId","employeeByOrganId","technicianByOrganId"],computed:{formatName:function(){var e={repair:"维修技师",director:"乐队指导",education:"乐团主管",teamTeacher:"运营主管"};return e[this.name]},options:function(){return"repair"===this.name?this.technicianByOrganId:this.employeeByOrganId}},methods:{quickSetting:function(e){this.item.forEach((function(t){t.transferUserId||(t.transferUserId=e)}))},change:function(e,t){t.transferUserId=e},clear:function(){this.item.forEach((function(e){e.transferUserId=""}))}}}),j=w,k=(r("9019"),r("2877")),x=Object(k["a"])(j,O,I,!1,null,"a97fca8e",null),S=x.exports,L={props:["detail"],components:{"select-user":S},data:function(){return{list:[],form:{repair:[],director:[],education:[],teamTeacher:[]},employees:[],loading:!1}},computed:{isEmpty:function(){var e=!0;for(var t in this.form)if(Object.hasOwnProperty.call(this.form,t)){var r=this.form[t];r.length>0&&(e=!1)}return e},branchsyId:function(){return b(this.selects.branchs,"id")},technicianByOrganId:function(){var e,t={},r=Object(h["a"])(this.selects.technician);try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.organIdList){var a,o=Object(h["a"])(n.organIdList);try{for(o.s();!(a=o.n()).done;){var i=a.value;t[i]||(t[i]=[]),t[i].push(n)}}catch(s){o.e(s)}finally{o.f()}}}}catch(s){r.e(s)}finally{r.f()}return t},employeeByOrganId:function(){var e,t={},r=Object(h["a"])(this.employees);try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.organIdList){var a,o=Object(h["a"])(n.organIdList);try{for(o.s();!(a=o.n()).done;){var i=a.value;t[i]||(t[i]=[]),t[i].push(n)}}catch(s){o.e(s)}finally{o.f()}}}}catch(s){r.e(s)}finally{r.f()}return t}},mounted:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$store.dispatch("setBranchs"),this.$store.dispatch("setTechnician"),this.FetchDetail();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{submit:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.$refs.form){e.next=12;break}return e.prev=1,e.next=4,Object(l["k"])({employeeId:this.detail.id,operate:"DEMISSION"});case 4:this.$message.success("提交成功"),this.$listeners.close(),this.$listeners.submited(),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:return e.abrupt("return");case 12:this.$refs.form.validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(r){var n,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=14;break}for(o in n=[],a=function(e){if(Object.hasOwnProperty.call(t.form,e)){var r=t.form[e];n=n.concat(r.map((function(t){return Object(p["a"])(Object(p["a"])({},t),{},{roleName:e})})))}},t.form)a(o);return e.prev=4,e.next=7,v(n);case 7:t.$message.success("提交成功"),t.$listeners.close(),t.$listeners.submited(),e.next=14;break;case 12:e.prev=12,e.t0=e["catch"](4);case 14:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t){return e.apply(this,arguments)}}());case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}(),FetchDetail:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,r,n,a,o,i,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,e.prev=1,e.next=4,Promise.all([_({rows:99999,demissionflag:0}),y({userId:this.detail.id})]).then((function(e){return s.employees=e[0].data.rows,e[1]}));case 4:for(r in t=e.sent,this.list=t.data,t.data)if(Object.hasOwnProperty.call(t.data,r)){n=t.data[r],a=Object(h["a"])(n);try{for(a.s();!(o=a.n()).done;)i=o.value,this.form[r].push({organId:i,transferUserId:"",levelUserId:this.detail.id})}catch(l){a.e(l)}finally{a.f()}}this.form=this.form,e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](1);case 12:this.loading=!1;case 13:case"end":return e.stop()}}),e,this,[[1,10]])})));function t(){return e.apply(this,arguments)}return t}()}},T=L,N=(r("980a"),Object(k["a"])(T,f,m,!1,null,"028ec50e",null)),F=N.exports,$=function(e,t,r){t?Object(d["b"])(t)?r():r(new Error("请输入正确的11位手机号码")):r(new Error("请输入电话号码"))},C={name:"staffManager",components:{pagination:i["a"],Tooltip:c["a"],handover:F},data:function(){return{tableList:[],educationList:[],educationForm:{targetUserId:""},educationViseble:!1,activeRow:null,pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},detail:null,handoverVisible:!1,roleStatus:!1,formActionTitle:"create",roleList:[],formTitle:{create:"添加员工",update:"修改员工"},formLabelWidth:"100px",form:{realName:null,gender:null,phone:null,roleIds:[],organIdLists:[],jobNature:null,entryDate:null,contactAddress:null,postalCode:null},rules:{realName:[{required:!0,message:"请输入姓名",trigger:"blur"}],gender:[{required:!0,message:"请选择性别",trigger:"change"}],phone:[{type:"number",required:!0,validator:$,trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],roleIds:[{type:"array",required:!0,message:"请选择分类",trigger:"change"}],organIdLists:[{type:"array",required:!0,message:"请选择所属部门",trigger:"change"}],jobNature:[{required:!0,message:"请选择工作类型",trigger:"change"}],entryDate:[{required:!0,message:"请选择入职时间",trigger:"blur"}]},searchForm:{search:null,jobNature:null,organId:null,roleId:null}}},mounted:function(){this.getList(),this.getRoleList()},methods:{permission:s["a"],handover:function(e){this.detail=e,this.handoverVisible=!0},onBranchCheckAll:function(){var e=this;this.form.organIdLists=[],this.selects.branchs.forEach((function(t){e.form.organIdLists.push(t.id)}))},onRoleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){e&&(t.form.organIdList=t.form.organIdLists.join(","),"create"==t.formActionTitle?(t.form.id&&delete t.form.id,Object(l["j"])(t.form).then((function(e){t.messageTips("添加",e)}))):"update"==t.formActionTitle&&Object(l["l"])(t.form).then((function(e){t.messageTips("修改",e)})))}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.roleStatus=!1,this.getList()):this.$message.error(t.msg)},search:function(){this.pageInfo.page=1,this.getList()},reset:function(){this.$refs.searchForm.resetFields(),this.search()},getList:function(){var e=this,t=this.searchForm,r={search:t.search?t.search:null,jobNature:t.jobNature?t.jobNature:null,organId:t.organId?t.organId:null,roleId:t.roleId?t.roleId:null,rows:this.pageInfo.limit,page:this.pageInfo.page};Object(l["A"])(r).then((function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},getRoleList:function(){var e=this;Object(l["p"])({delFlag:0,rows:9999}).then((function(t){var r=t.data;200==t.code&&r&&r.rows.length>0&&(e.roleList=[],r.rows.forEach((function(t){e.roleList.push({label:t.roleName,value:t.id})})))})),this.$store.dispatch("setBranchs")},roleOperation:function(e,t){this.formActionTitle=e,this.roleStatus=!0,"update"==e&&(this.form={id:t.id,realName:t.realName,gender:t.gender,phone:Number(t.phone),roleIds:t.roleIds,organIdLists:t.organIdList?t.organIdList:[],jobNature:t.jobNature,entryDate:t.entryDate,contactAddress:t.contactAddress,postalCode:t.postalCode})},onFormClose:function(e){this.form={realName:null,gender:null,phone:null,roleName:null,organIdLists:[],jobNature:null,entryDate:null},this.$refs[e].resetFields()},formatLockFlag:function(e){var t=["正常","冻结"];return e.demissionDate?"离职":t[e.lockFlag]},checkStatus:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var r,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["q"])({employeeId:t.id}).then(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(a){var o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(200!==a.code){e.next=13;break}if(!a.data.hasCourseSchedule){e.next=6;break}n.$message.error("请先交接指导老师课程"),r=!1,e.next=13;break;case 6:if(!a.data.hasCourseGroupRelation){e.next=12;break}return o=t.id,e.next=10,Object(u["p"])({userId:o}).then((function(e){200===e.code&&(n.educationList=e.data,n.educationViseble=!0,r=!1)}));case 10:e.next=13;break;case 12:r=!0;case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),onStaffOperation:function(e,t){var r=this,n="RESET_PASSWORD"==e;this.$confirm("您确定".concat(n?"重置密码":"修改员工状态","?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(regeneratorRuntime.mark((function a(){var o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if("DEMISSION"!==e||t.demissionDate){a.next=7;break}return r.activeRow=t,a.next=4,r.checkStatus(t);case 4:if(o=a.sent,o){a.next=7;break}return a.abrupt("return");case 7:Object(l["k"])({employeeId:t.id,operate:e}).then((function(e){200==e.code?(r.$message.success(n?"重置密码成功":"更改成功"),r.roleStatus=!1,r.getList()):r.$message.error(e.msg)}));case 8:case"end":return a.stop()}}),a)})))).catch((function(e){}))},submitEducation:function(){var e=this;Object(l["J"])({currentUserId:this.activeRow.id,targetUserId:this.educationForm.targetUserId}).then((function(t){if(200===t.code){var r="DEMISSION",n=e.activeRow;Object(l["k"])({employeeId:n.id,operate:r}).then((function(t){200==t.code?(e.$message.success("更改成功"),e.roleStatus=!1,e.educationViseble=!1,e.getList()):e.$message.error(t.msg)}))}}))}},watch:{educationViseble:function(e){e||(this.educationForm.targetUserId="",this.$refs["educationForm"].resetFields())}}},E=C,R=(r("539e"),Object(k["a"])(E,n,a,!1,null,"11eeb3f7",null));t["default"]=R.exports},a8db:function(e,t,r){"use strict";var n=r("e265"),a=r.n(n),o=r("a4bb"),i=r.n(o);function s(e,t){if(null==e)return{};var r,n,a={},o=i()(e);for(n=0;n=0||(a[r]=e[r]);return a}function l(e,t){if(null==e)return{};var r,n,o=s(e,t);if(a.a){var i=a()(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,"a",(function(){return l}))},d349:function(e,t,r){"use strict";r.d(t,"e",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"f",(function(){return d})),r.d(t,"c",(function(){return f})),r.d(t,"s",(function(){return m})),r.d(t,"D",(function(){return p})),r.d(t,"E",(function(){return h})),r.d(t,"h",(function(){return b})),r.d(t,"l",(function(){return g})),r.d(t,"g",(function(){return v})),r.d(t,"m",(function(){return y})),r.d(t,"v",(function(){return _})),r.d(t,"t",(function(){return O})),r.d(t,"u",(function(){return I})),r.d(t,"i",(function(){return w})),r.d(t,"j",(function(){return j})),r.d(t,"p",(function(){return k})),r.d(t,"k",(function(){return x})),r.d(t,"w",(function(){return S})),r.d(t,"F",(function(){return L})),r.d(t,"n",(function(){return T})),r.d(t,"x",(function(){return N})),r.d(t,"A",(function(){return F})),r.d(t,"y",(function(){return $})),r.d(t,"z",(function(){return C})),r.d(t,"r",(function(){return E})),r.d(t,"b",(function(){return R})),r.d(t,"C",(function(){return D})),r.d(t,"q",(function(){return q})),r.d(t,"B",(function(){return A})),r.d(t,"a",(function(){return P})),r.d(t,"o",(function(){return U}));var n=r("a8db"),a=r("b775"),o=r("829b"),i=r("4328"),s=r.n(i),l="/api-web";function u(e){return Object(a["a"])({url:l+"/organization/queryPage",method:"get",params:e})}function c(e){return Object(a["a"])({url:l+"/organization/add",method:"post",data:s.a.stringify(e)})}function d(e){return Object(a["a"])({url:l+"/organization/update",method:"post",data:s.a.stringify(e)})}function f(e){return Object(a["a"])({url:l+"/area/queryChild",method:"get",params:e})}function m(e){return Object(a["a"])({url:l+"/area/getParentArea/".concat(e.id),method:"get"})}function p(e){return Object(a["a"])({url:l+"/subject/queryPageTree",method:"get",params:e})}function h(e){return Object(a["a"])({url:l+"/subject/upset",method:"post",data:e})}function b(e){return Object(a["a"])({url:l+"/chargeType/queryPage",method:"get",params:e})}function g(e){return Object(a["a"])({url:l+"/chargeType/upSet",method:"post",data:e})}function v(e){return Object(a["a"])({url:l+"/chargeType/del/".concat(e),method:"post"})}function y(e){return Object(a["a"])({url:l+"/courseHomeworkTemplate/queryPage",method:"post",data:e})}function _(e){return Object(a["a"])({url:l+"/courseHomeworkTemplate/update",method:"post",data:s.a.stringify(e)})}function O(e){return Object(a["a"])({url:l+"/courseHomeworkTemplate/add",method:"post",data:s.a.stringify(e)})}function I(e){return Object(a["a"])({url:l+"/courseHomeworkTemplate/del/".concat(e),method:"post"})}function w(e){return Object(a["a"])({url:l+"/chargeTypeOrganizationFee/add",method:"post",data:s.a.stringify(e)})}function j(e){return Object(a["a"])({url:l+"/chargeTypeOrganizationFee/update",method:"post",data:s.a.stringify(e)})}function k(e){return Object(a["a"])({url:l+"/employee/findEducationTeacher",method:"get",params:e})}function x(e){return Object(o["a"])({url:l+"/chargeTypeSubjectMapper/queryPage",method:"get",data:{},params:e,requestType:"form"})}function S(e){return Object(o["a"])({url:l+"/chargeTypeSubjectMapper/insert",method:"post",data:e})}function L(e){return Object(o["a"])({url:l+"/chargeTypeSubjectMapper/update",method:"post",data:e})}function T(e){var t=e.id,r=Object(n["a"])(e,["id"]);return Object(o["a"])({url:l+"/chargeTypeSubjectMapper/del/"+t,method:"post",params:r})}function N(e){return Object(o["a"])({url:l+"/musicGroupOrganizationCourseSettings/add",method:"post",data:e})}function F(e){return Object(o["a"])({url:l+"/musicGroupOrganizationCourseSettings/update",method:"post",data:e})}function $(e){return Object(o["a"])({url:l+"/musicGroupOrganizationCourseSettings/delSetting",method:"post",data:{},params:e,requestType:"form"})}function C(e){return Object(o["a"])({url:l+"/musicGroupOrganizationCourseSettings/queryPage",method:"get",data:{},params:e,requestType:"form"})}function E(e){return Object(o["a"])({url:l+"/organizationCourseUnitPriceSettings/queryPage",method:"get",params:e,data:{},requestType:"form"})}function R(e){return Object(o["a"])({url:l+"/organizationCourseUnitPriceSettings/insert",method:"post",data:e})}function D(e){return Object(o["a"])({url:l+"/organizationCourseUnitPriceSettings/update",method:"post",data:e})}function q(e){return Object(o["a"])({url:l+"/organizationCourseDurationSettings/queryPage",method:"get",data:{},params:e})}function A(e){return Object(o["a"])({url:l+"/organizationCourseDurationSettings/update",method:"post",params:e})}function P(e){return Object(o["a"])({url:l+"/organizationCourseDurationSettings/insert",method:"post",params:e})}function U(e){return Object(o["a"])({url:l+"/organizationCourseDurationSettings/del",method:"post",data:e})}},d589:function(e,t,r){}}]);