(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/detection/reser-details"],{"5d1e":function(t,e,a){"use strict";(function(t,e){var n=a("47a9");a("c55e");n(a("3240"));var o=n(a("f641"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(o.default)}).call(this,a("3223")["default"],a("df3c")["createPage"])},8146:function(t,e,a){"use strict";a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var n={uIcon:function(){return Promise.all([a.e("common/vendor"),a.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(a.bind(null,"9855"))},uniIcons:function(){return Promise.all([a.e("common/vendor"),a.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(a.bind(null,"ee17"))}},o=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__map(t.itmelist,(function(e,a){var n=t.__get_orig(e),o=e.dateStr.substring(5,10).replace("-","月");return{$orig:n,g0:o}})));t.$mp.data=Object.assign({},{$root:{l0:a}})},i=[]},c990:function(t,e,a){"use strict";var n=a("fcc8"),o=a.n(n);o.a},d180:function(t,e,a){"use strict";a.r(e);var n=a("d231"),o=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=o.a},d231:function(t,e,a){"use strict";(function(t,n){var o=a("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(a("7eb4")),r=o(a("ee10")),s=(o(a("f76e")),o(a("1fab"))),u={data:function(){return{type:"sku",detaulsObj:"",skuName:"",show:!1,id:"",payobj:"",skuid:"",indexid:0,imgs:"",indicatorDots:!1,autoplay:!0,interval:2e3,xprice:0,duration:500,pid:"",couponId:null,coupontitle:null,discount:null,couponType:null,idCardImage:null,partnerName:"",address:"",partnerId:"",itmelist:"",appointmentday:"",tapindex:null,sx:null,renshu:{morningCount:0,afterCount:0},dataObj:{couponId:null,driverLicenesImg:null,isPayOnline:null,isPickCar:null,otherPhone:null,remark:null},pickCarId:null,zjShow:null,telShow:null,zjData:"",carShow:null,dateStr:""}},onLoad:function(e){var a=this;this.imgs=this.$baseUrl,this.id=e.id,this.getDetails(e.id),t.$on("pickCar",(function(t){a.pickCarId=t})),t.$on("imgUrl",(function(t){console.log(t,"1111"),a.dataObj.driverLicenesImg=t,a.getimg(t)})),t.$on("userCouponDiscount",(function(t){console.log("jianting",t),a.couponId=t.couponId,a.coupontitle=t.title,a.discount=t.discount,a.couponType=t.couponType}))},methods:{delAppointment:function(){var e=this;return(0,r.default)(i.default.mark((function a(){var n,o;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n={appointmentId:e.id},a.next=3,(0,s.default)({url:"/appInspection/goods/delAppointment",method:"post",params:n});case 3:o=a.sent,t.showModal({title:"取消成功"}),t.navigateBack(),console.log(o);case 7:case"end":return a.stop()}}),a)})))()},editAppointment:function(){var e=this;return(0,r.default)(i.default.mark((function a(){var n;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return console.log(e.appointmentday),e.dataObj.appointmentDay=e.appointmentday,e.dataObj.appointmentPeriod=e.sx,e.dataObj.pickCarId=e.pickCarId,console.log(e.appointmentDay,e.dataObj.appointmentDay),a.next=7,(0,s.default)({url:"/appInspection/goods/editAppointment",method:"post",data:e.dataObj});case 7:n=a.sent,t.showModal({title:"修改成功"}),t.navigateBack(),console.log(n);case 11:case"end":return a.stop()}}),a)})))()},getDetails:function(t){var e=this;return(0,r.default)(i.default.mark((function a(){var n;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,s.default)({url:"/inspection/appointment/getDetail?id="+t,method:"get"});case 2:n=a.sent,e.dataObj=n.data,e.appointmentDay=n.data.appointmentDay,e.sx=n.data.appointmentPeriod,e.reservationCom(n.data.skuId),e.zjShow=0,n.data.otherPhone&&(e.telShow=0);case 9:case"end":return a.stop()}}),a)})))()},createOrder:function(){var e=this;return(0,r.default)(i.default.mark((function a(){var o,r,u,d;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(null!=e.zjShow){a.next=3;break}return t.showToast({title:"必填项为空",icon:"error"}),a.abrupt("return");case 3:if(null!=e.telShow){a.next=6;break}return t.showToast({title:"必填项为空",icon:"error"}),a.abrupt("return");case 6:if(e.appointmentday){a.next=9;break}return t.showToast({title:"预约日期未填",icon:"error"}),a.abrupt("return");case 9:if(null!=e.sx){a.next=12;break}return t.showToast({title:"上午下午未填",icon:"error"}),a.abrupt("return");case 12:if(0!=e.telShow||null!=e.dataObj.otherPhone){a.next=15;break}return t.showToast({title:"联系方式未填",icon:"error"}),a.abrupt("return");case 15:if(1!=e.zjShow||null!=e.dataObj.driverLicenesImg){a.next=18;break}return t.showToast({title:"证据照片未填",icon:"error"}),a.abrupt("return");case 18:if(null!=e.dataObj.isPayOnline){a.next=21;break}return t.showToast({title:"没选支付方式",icon:"error"}),a.abrupt("return");case 21:return o={skuId:e.skuid,appointmentDay:e.appointmentday,appointmentPeriod:e.sx,otherPhone:e.dataObj.otherPhone,driverLicenesImg:e.dataObj.driverLicenesImg,isPayOnline:e.dataObj.isPayOnline,isPickCar:e.dataObj.isPickCar,remark:e.dataObj.remark,carModel:e.zjData.Model,carNature:e.zjData.UseCharacter,carIdNo:e.zjData.Vin,carNo:e.zjData.PlateNo,pickCarId:e.pickCarId},a.next=24,(0,s.default)({url:"/appInspection/goods/appointmentInspection",method:"post",data:o});case 24:if(a.sent,0!=e.dataObj.isPayOnline){a.next=28;break}return t.navigateBack(),a.abrupt("return");case 28:return r={goodsType:"jc",mdAmount:e.obj.realPrice/100,skuId:e.skuid,otherPhone:e.dataObj.otherPhone,driverLicenesImg:e.dataObj.driverLicenesImg,isPayOnline:e.dataObj.isPayOnline,isPickCar:e.dataObj.isPickCar,remark:e.dataObj.dataObj,carModel:e.zjData.Model,carNature:e.zjData.UseCharacter,carIdNo:e.zjData.Vin,carNo:e.zjData.PlateNo,couponId:e.couponId,pickCarId:e.pickCarId},a.next=31,(0,s.default)({url:"/orderApi/createOrder",method:"post",data:r});case 31:if(u=a.sent,!u.data){a.next=39;break}return console.log("执行"),a.next=36,(0,s.default)({url:"/payApi/jcPrepayment?type=jsapi&orderId="+u.data});case 36:d=a.sent,console.log(d),n.requestPayment({timeStamp:d.timeStamp,nonceStr:d.nonceStr,package:d.package,signType:d.signType,paySign:d.paySign,success:function(e){console.log("成功",e),(e.errMsg="requestPayment:ok")&&(t.showToast({title:"支付成功"}),t.navigateTo({url:"/pages/detection/success"}))},fail:function(t){console.log("执行失败1",t),that.cancelpay()}});case 39:case"end":return a.stop()}}),a)})))()},ifzjShow:function(t){1==t&&this.gohomemy(),this.zjShow=t},iftelShow:function(t){this.telShow=t},iftimeShow:function(t){this.dataObj.isPayOnline=t},ifcarShow:function(e){this.dataObj.isPickCar=e,1==e&&t.navigateTo({url:"/pages/detection/godoor?goodsName="+this.dataObj.goodsTitle+"&goodsId="+this.dataObj.skuId+"&type="+this.type})},gohomemy:function(){t.navigateTo({url:"/pages/detection/my-user"})},reservationCom:function(t){var e=this;return(0,r.default)(i.default.mark((function a(){var n,o,r;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n={goodsId:t,type:"sku"},a.next=3,(0,s.default)({url:"/appInspection/goods/appointmentDateList",method:"get",params:n});case 3:for(o=a.sent,e.partnerName=o.data.partnerName,e.address=o.data.address,e.partnerId=o.data.partnerId,e.itmelist=o.data.dataList,e.appointmentday=o.data.dataList[0].dateStr,r=0;r