(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/workOrder_manage/components/CheckinPopup"],{"1dc6":function(e,t,n){"use strict";n.r(t);var a=n("544b"),i=n("337e");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("317e");var o=n("828b"),c=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"55bef15a",null,!1,a["a"],void 0);t["default"]=c.exports},"23ed":function(e,t,n){},"317e":function(e,t,n){"use strict";var a=n("23ed"),i=n.n(a);i.a},"337e":function(e,t,n){"use strict";n.r(t);var a=n("9080"),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=i.a},"544b":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,n=(e._self._c,e.stage!==e.STAGE.directSubmission&&e.stage===e.STAGE.fillTheForm?e.form.clockInRemark.length:null),a=e.stage!==e.STAGE.directSubmission&&e.stage===e.STAGE.fillTheForm?e.form.images.length:null;e.$mp.data=Object.assign({},{$root:{g0:n,g1:a}})},i=[]},9080:function(e,t,n){"use strict";(function(e){var a=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n("7eb4")),r=a(n("34cf")),o=a(n("ee10")),c=a(n("d6aa")),s=n("6009"),l={directSubmission:0,fillTheForm:1,success:2,fail:3},u={DELETE_IMAGE:"delete-image",ADD_IMAGE:"add-image"},d={props:{time:String,address:String,workOrderNo:String,takePhoto:Boolean},data:function(){var e=this.takePhoto;return{urlDomain:this.$Cache.get("imgHost"),STAGE:l,EVENT:u,maxLength:100,stage:e?l.fillTheForm:l.directSubmission,imageCountLimit:4,form:{checkInTime:this.time,clockInRemark:"",images:[]}}},created:function(){var t=this;return(0,o.default)(i.default.mark((function n(){var a,o,c,s;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.takePhoto){n.next=8;break}return n.next=3,e.showModal({title:"提示",content:"确定要打卡吗？"});case 3:a=n.sent,o=(0,r.default)(a,2),c=o[0],s=o[1].confirm,c||!s?t.handleCheckinCancel():t.handleCheckinConfirm();case 8:case"end":return n.stop()}}),n)})))()},methods:{handleCheckinCancel:function(){this.$emit("cancel")},handleCheckinConfirm:function(){var t=this;return(0,o.default)(i.default.mark((function n(){var a,r,o,u;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a=t.form,r=a.clockInRemark,o=a.images,o.length||t.stage!==l.fillTheForm){n.next=3;break}return n.abrupt("return",t.$util.Tips({title:"请上传打卡照片",icon:"none"}));case 3:return e.showLoading({mask:!0}),n.prev=4,n.next=7,(0,s.checkinStaffOrderApi)({workOrderNo:t.workOrderNo,address:t.address,clockInRemark:r,clockInPhoto:o.length?o.join(","):""});case 7:e.hideLoading(),u=(0,c.default)().format("HH:mm:ss"),t.form.checkInTime=u,t.stage=l.success,n.next=18;break;case 13:n.prev=13,n.t0=n["catch"](4),e.hideLoading(),t.stage=l.fail,t.$util.Tips({title:n.t0,icon:"none"});case 18:case"end":return n.stop()}}),n,null,[[4,13]])})))()},handleUploadImage:function(){var e=this;this.$util.uploadImageOne({url:"upload/image",name:"multipart",model:"staff",pid:1},(function(t){e.form.images.push(t)}))},handleImageListClick:function(e){var t=e.target.dataset,n=t.event,a=t.index;if(void 0!==n)switch(n){case u.DELETE_IMAGE:this.form.images.splice(a,1);break;case u.ADD_IMAGE:this.handleUploadImage();break}},handleCheckinSuccess:function(){e.navigateBack(-1)},handleRetryCheckin:function(){this.stage=l.fillTheForm}}};t.default=d}).call(this,n("df3c")["default"])}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'pages/admin/workOrder_manage/components/CheckinPopup-create-component',
    {
        'pages/admin/workOrder_manage/components/CheckinPopup-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("1dc6"))
        })
    },
    [['pages/admin/workOrder_manage/components/CheckinPopup-create-component']]
]);
