crm_second_opening_mini/pagesA/punchclock/punchClock.js

11 lines
8.2 KiB
JavaScript
Raw Normal View History

2023-03-13 01:13:08 +00:00
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/punchClock"],{"17a3":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]},"27d9":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,a=e("dc92"),c=e("0c59"),o={components:{updateClock:function(){e.e("pagesA/punchclock/updateClock").then(function(){return resolve(e("d805"))}.bind(null,e)).catch(e.oe)}},props:{lat:{type:String/Number,default:""},lng:{type:String/Number,default:""}},data:function(){return{BASE_IMG_URL:c.BASE_IMG_URL,info:{},hour:"00",branch:"00",address:"",clockTime:"",isClock:!1,clockInfo:{}}},onLoad:function(){},created:function(){this.getTime(),this.checkIsPunch()},onUnload:function(){},methods:{clear:function(){clearInterval(i)},_locationChangeFn:function(t){this.lng=t.longitude,this.lat=t.latitude,this.checkIsPunch()},checkIsPunch:function(){var t=this,n={lng:this.lng,lat:this.lat};(0,a.netIsPunch)(n).then((function(n){if(t.info=n.data,2==n.data.is_card){var e=n.data.attendance.time;t.clockTime=e.substring(e.length-8,e.length)}}))},getTime:function(){var t=this;i=setInterval((function(){var n=new Date,e=n.getHours(),i=n.getMinutes();t.hour=t.handleTime(e),t.branch=t.handleTime(i)}),1e3)},toClock:function(){var n=this;if(1==this.info.is_card){var e={id:this.info.intime.id,type:0,type_name:this.info.intime.type_name,lng:this.lng,lat:this.lat};(0,a.netPunchClock)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),n.clockInfo=e.data;var i=e.data.time;n.clockTime=i.substring(i.length-8,i.length),setTimeout((function(){n.isClock=!0}),2e3)}))}},toSubmitColck:function(){var n;0==this.clockInfo.type_name&&1==this.clockInfo.late?n=2:1==this.clockInfo.type_name&&1==this.clockInfo.leaver&&(n=1),t.navigateTo({url:"/pagesA/punchclock/punchstatis/supplementaryCard?id="+this.clockInfo.statisc_id+"&type="+n+"&time="+this.clockInfo.time})},toLeave:function(){t.navigateTo({url:"/pagesA/punchclock/punchstatis/leave"})},toUpdate:function(){var t={id:this.info.attendance.statisc_id,type:0,type_name:this.info.attendance.type_name,lng:this.lng,lat:this.lat};this.$refs.clockChild.init(t)},toSetClock:function(){t.navigateTo({url:"/pagesA/punchclock/clockrules/index"})}}};n.default=o}).call(this,e("543d")["default"])},2859:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]},"2c0c":function(t,n,e){"use strict";e.r(n);var i=e("17a3"),a=e("5915");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("9440");var o=e("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"5b2a8a96",null,!1,i["a"],void 0);n["default"]=u.exports},"490a":function(t,n,e){"use strict";var i=e("b1df"),a=e.n(i);a.a},"4aa7":function(t,n,e){"use strict";e.r(n);var i=e("e12c"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},5915:function(t,n,e){"use strict";e.r(n);var i=e("9ed1"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},"624c":function(t,n,e){"use strict";e.r(n);var i=e("2859"),a=e("676a");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("490a");var o=e("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"32c6badc",null,!1,i["a"],void 0);n["default"]=u.exports},"676a":function(t,n,e){"use strict";e.r(n);var i=e("27d9"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},"6b5d":function(t,n,e){"use strict";var i=e("fd4e"),a=e.n(i);a.a},9440:function(t,n,e){"use strict";var i=e("f736"),a=e.n(i);a.a},"9ed1":function(t,n,e){"use strict";var i=e("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'pagesA/punchclock/punchClock-create-component',
{
'pagesA/punchclock/punchClock-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("2c0c"))
})
},
[['pagesA/punchclock/punchClock-create-component']]
]);