1 line
3.9 KiB
JavaScript
1 line
3.9 KiB
JavaScript
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/punchstatis/supplementaryCard"],{"0b74":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("dc92"),s=i("8683"),o={mixins:[s.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,approvalPro:{},remindPeople:[],imgList:[],statisc_id:"",clockTime:"",dayTime:"",time:"",checkInfo:{},type:"",title:"",remark:"",file_ids:""}},onLoad:function(t){this.statisc_id=t.id,this.type=t.type;var e=t.time;this.clockTime=e.substring(e.length-8,e.length-3),this.getTime(),this.getProcess()},methods:{getTime:function(){var t=this;(0,n.netCheckworkDetail)({statisc_id:this.statisc_id}).then((function(e){e=e.data,t.checkInfo=e,t.dayTime=e.time,1==t.type?t.time=e.end_time:2==t.type?t.time=e.start_time:t.type}))},changeTime:function(e){var i=e.detail.value,n=i.split(":"),s=new Date;if(1==this.type){var o=this.checkInfo.dstart_time.split(":"),c=this.checkInfo.dend_time.split(":");s.setHours(n[0],n[1])<s.setHours(o[0],o[1])?t.showToast({title:"补卡时间不能早于"+this.checkInfo.time+this.checkInfo.dstart_time,icon:"none"}):s.setHours(n[0],n[1])>s.setHours(c[0],c[1])?t.showToast({title:"补卡时间不能晚于"+this.checkInfo.time+this.checkInfo.dstart_time,icon:"none"}):this.time=i}else if(2==this.type){var a=this.checkInfo.ustart_time.split(":"),r=this.checkInfo.uend_time.split(":");s.setHours(n[0],n[1])<s.setHours(a[0],a[1])?t.showToast({title:"补卡时间不能早于"+this.checkInfo.time+this.checkInfo.dstart_time,icon:"none"}):s.setHours(n[0],n[1])>s.setHours(r[0],r[1])?t.showToast({title:"补卡时间不能晚于"+this.checkInfo.time+this.checkInfo.dstart_time,icon:"none"}):this.time=i}else this.type},getProcess:function(){var t=this;(0,n.netApprovalProcess)({type:"card"}).then((function(e){t.approvalPro=e.data}))},uploadImg:function(t){this.imgList.push(t)},delImg:function(t){this.imgList.splice(t,1)},toSave:function(){var e=[];if(this.imgList.forEach((function(t){e.push(t.id)})),0!=this.remindPeople.length||0!=this.approvalPro.status){var i=[];this.remindPeople.forEach((function(t){i.push(t.id)}));var s={statisc_id:this.statisc_id,type:this.type,time:this.dayTime+" "+this.time,title:0==this.type?"补卡打卡":1==this.type?"早退打卡":"迟到打卡("+this.clockTime+")",remark:this.remark,file_ids:e.join(","),flow_staff_ids:0==this.approvalPro.status?i.join(","):""};(0,n.netSupplementClock)(s).then((function(e){t.showToast({title:e.msg,icon:"none"}),setTimeout((function(){t.navigateBack({delta:1})}),2e3)}))}else t.showToast({title:"请选择审核人",icon:"none"})}}};e.default=o}).call(this,i("543d")["default"])},9499:function(t,e,i){"use strict";i.r(e);var n=i("d392"),s=i("f8c7");for(var o in s)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(o);i("ef521");var c=i("f0c5"),a=Object(c["a"])(s["default"],n["b"],n["c"],!1,null,"1efe6414",null,!1,n["a"],void 0);e["default"]=a.exports},ab2b:function(t,e,i){},d392:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},s=[]},de24:function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("8886");n(i("66fd"));var s=n(i("9499"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(s.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},ef521:function(t,e,i){"use strict";var n=i("ab2b"),s=i.n(n);s.a},f8c7:function(t,e,i){"use strict";i.r(e);var n=i("0b74"),s=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=s.a}},[["de24","common/runtime","common/vendor"]]]); |