lanan-old/detection-user/unpackage/dist/build/mp-weixin/pages/detection/reser-details.js

1 line
11 KiB
JavaScript
Raw Normal View History

2024-07-17 14:16:22 +08:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/detection/reser-details"],{"164d":function(t,e,a){"use strict";var n=a("f252"),o=a.n(n);o.a},"954d":function(t,e,a){"use strict";(function(t,n){var o=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(a("2eee")),r=o(a("c973")),s=(o(a("80a6")),o(a("b077"))),d={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,d,u;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,