1 line
4.5 KiB
JavaScript
1 line
4.5 KiB
JavaScript
|
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/punchstatis/leave"],{"2e28":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this.$createElement;this._self._c},n=[]},"4c12":function(t,e,i){"use strict";(function(t,e){var a=i("4ea4");i("8886");a(i("66fd"));var n=a(i("9993"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(n.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},"816d":function(t,e,i){"use strict";i.r(e);var a=i("afda"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},9993:function(t,e,i){"use strict";i.r(e);var a=i("2e28"),n=i("816d");for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("d9fc");var o=i("f0c5"),s=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"4e15f02a",null,!1,a["a"],void 0);e["default"]=s.exports},afda:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i("dc92"),n=i("c7eb"),r=i("8683"),o={mixins:[r.commonF],components:{fixedApproval:function(){i.e("components/fixedApproval").then(function(){return resolve(i("d3f7"))}.bind(null,i)).catch(i.oe)},uploadImage:function(){i.e("components/uploadImg/index").then(function(){return resolve(i("8391"))}.bind(null,i)).catch(i.oe)}},data:function(){return{noClick:!0,arr:["年假","事假","病假","调休假","婚假","产假","陪产假","其他"],arrIndex:null,start_time:"",end_time:"",hour:"",remarks:"",imgList:[],approvalPro:{},dateTimeArray:[],dateArr:[],dateTime:[],remindPeople:[],remindType:"leave"}},onLoad:function(){this.getProcess(),this.initTime()},methods:{changeType:function(t){this.arrIndex=t.detail.value},uploadImg:function(t){this.imgList.push(t)},delImg:function(t){this.imgList.splice(t,1)},changeStartTime:function(t){this.start_time=this.handleTime(t.detail.value),this.start_time&&this.end_time&&this.handleDuration()},changeEndTime:function(t){this.end_time=this.handleTime(t.detail.value),this.start_time&&this.end_time&&this.handleDuration()},handleDuration:function(){var t=this,e={start_time:this.start_time,end_time:this.end_time};(0,a.netLeaveDuration)(e).then((function(e){t.hour=e.data.hour}))},withData:function(t){return t<10?"0"+t:""+t},initTime:function(){var t=new Date,e=(t.getFullYear(),this.withData(t.getMonth()+1),this.withData(t.getDate()),this.withData(t.getHours()),this.withData(t.getMinutes()),this.withData(t.getSeconds()),(0,n.dateTimePicker)());e.dateTimeArray.pop(),e.dateTime.pop(),e.dateArray.pop();this.dateTimeArray=e.dateTimeArray,this.dateArr=e.dateArray,this.dateTime=e.dateTime},changeColumn:function(t){var e=t.detail.column,i=t.detail.value;if(1==e){this.dateArr[e][i];var a=new Date,r=(a.getFullYear(),(0,n.dateTimePicker)());r.dateTimeArray.pop(),r.dateTime.pop(),r.dateArray.pop();this.dateTimeArray=r.dateTimeArray,this.dateArr=r.dateArray,this.dateTime=r.dateTime}},handleTime:function(t){var e=this.dateArr[0][t[0]],i=this.dateArr[1][t[1]],a=this.dateArr[2][t[2]],n=this.dateArr[3][t[3]],r=this.dateArr[4][t[4]],o=e+"-"+i+"-"+a+" "+n+":"+r;return o},getProcess:function(){var t=this;(0,a.netApprovalProcess)({type:"leave"}).then((function(e){t.approvalPro=e.data}))},toSave:function(){if(this.arr[this.arrIndex])if(this.start_time)if(this.end_time)if(this.hour<=0)t.showToast({title:"请填写请假时长",icon:"none"});else if(this.remarks)if(0!=this.remindPeople.length||0!=this.approvalPro.status){var e=[];this.remindPeople.forEach((function(t){e.push(t.id)}));var i=[];this.imgList.forEach((function(t){i.push(t.id)}));var n={type:this.arr[this.arrIndex],start_time:this.start_time,end_time:this.end_time,remarks:this.remarks,hour:this.hour,file_ids:i.join(","),flow_staff_ids:0==this.approvalPro.status?e.join(","):""};(0,a.netApplyLeave)(n).then((function(e){t.showToast({title:e.msg,icon:"none"}),setTimeout((function(){t.navigateBack({delta:1})}),2e3)}))}else t.showToast({title:"<EFBFBD><EFBFBD>
|