(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/askForLeave/newLeave2"],{"1ee4":function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return a}));var o=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.isEdit=!0})},s=[]},"679e":function(e,t,n){"use strict";var a=n("ce75"),o=n.n(a);o.a},b0c6:function(e,t,n){"use strict";(function(e){n("40da");a(n("66fd"));var t=a(n("ea1b"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},ce75:function(e,t,n){},e649:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("2f62");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i={data:function(){return{isEdit:!1,typeList:[],urgentList:[{name:"一般",value:0},{name:"紧急",value:1}],leaveDate:["",""],selectType:1,transferUserList:[],pickerIndex:[0,0,0],postData:{leaveReason:"",leaveDays:"",post:""},ispost:!1}},computed:s({},(0,a.mapGetters)({users:"getUser"})),methods:s(s({},(0,a.mapMutations)(["shouldReLoadingList"])),{},{setLeaveData:function(e,t){this.leaveDate[t]=e.detail.value,this.$forceUpdate()},pickerChange:function(e,t){this.pickerIndex[t]=Number(e.detail.value),this.$forceUpdate()},getTransferUser:function(){var t=this,n={ProdefId:this.postData.prodefId,serverpartCode:t.postData.sCode};this.$request.$get("GetStaffLeaveInfo",n).then((function(n){e.hideLoading(),t.postData.USER_NAME=n.Data.USER_NAME,t.postData.USERTYPE_NAME=n.Data.USERTYPE_NAME,t.postData.ActDef_ID=n.Data.ActDef_ID,t.transferUserList=n.Data.List}))},getTypeList:function(){var e=this;e.$request.$get("GetStaffLeaveType",{}).then((function(t){e.typeList=t.Data.List}))},nextTap:function(t){var n=this,a=t.detail.value;return a.PersonPost?a.LeaveStartdate?a.LeaveEnddate?a.DurationDays?a.LeaveReason?(n.ispost=!0,a.ProdefId=this.postData.prodefId,a.serverpartCode=this.postData.sCode,a.NowActdefIds=this.postData.ActDef_ID,a.LeaveType=this.typeList[this.pickerIndex[0]].FIELDENUM_VALUE,a.UrgencyDegree=this.urgentList[this.pickerIndex[1]].value,a.NowStaffId=this.transferUserList[this.pickerIndex[2]].USER_ID,void this.$request.$post("InsertStaffLeave",a).then((function(t){e.showToast({title:t.ResultDesc,icon:"none",duration:2e3}),n.ispost=!1,100==t.ResultCode&&(e.$emit("7000",!0),n.shouldReLoadingList(!0),setTimeout((function(){e.navigateBack({delta:2})}),800))}))):(e.showToast({title:"请输入请假事由",icon:"none"}),!1):(e.showToast({title:"请输入请假天数",icon:"none"}),!1):(e.showToast({title:"请选择请假结束时间",icon:"none"}),!1):(e.showToast({title:"请选择请假开始时间",icon:"none"}),!1):(e.showToast({title:"请输入职务岗位",icon:"none"}),!1)}}),onUnload:function(){this.$util.addUserBehavior()},onLoad:function(t){e.showLoading({title:"正在加载"}),this.postData.prodefId=t.prodefId,this.postData.sCode=t.sCode,this.getTransferUser(),this.getTypeList()}};t.default=i}).call(this,n("543d")["default"])},ea1b:function(e,t,n){"use strict";n.r(t);var a=n("1ee4"),o=n("f413");for(var s in o)"default"!==s&&function(e){n.d(t,e,(function(){return o[e]}))}(s);n("679e");var r,i=n("f0c5"),c=Object(i["a"])(o["default"],a["b"],a["c"],!1,null,"67dfdda0",null,!1,a["a"],r);t["default"]=c.exports},f413:function(e,t,n){"use strict";n.r(t);var a=n("e649"),o=n.n(a);for(var s in a)"default"!==s&&function(e){n.d(t,e,(function(){return a[e]}))}(s);t["default"]=o.a}},[["b0c6","common/runtime","common/vendor"]]]);