You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
21 KiB
1 lines
21 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["technician-pages-order-detail"],{"4d96":function(t,e,i){"use strict";i.r(e);var a=i("e8b0"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},"536c":function(t,e,i){var a=i("9e60");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("65ac95b2",a,!0,{sourceMap:!1,shadowMode:!1})},6835:function(t,e,i){"use strict";i.r(e);var a=i("e7d8"),n=i("8e49");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("bcf1");var r=i("f0c5"),o=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"e114900a",null,!1,a["a"],void 0);e["default"]=o.exports},"8e49":function(t,e,i){"use strict";i.r(e);var a=i("ae55"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},"9e60":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.record-item[data-v-e114900a]{padding:0 0 %?30?% %?30?%}.record-item .item-tag[data-v-e114900a]{width:14px;height:14px;display:block;background:#fff;border-radius:50%;top:0;left:-7px;-webkit-transform:rotate(1turn);transform:rotate(1turn)}.record-item .item-text[data-v-e114900a]{line-height:%?34?%}.record-item .item-img[data-v-e114900a]{width:%?180?%;min-height:%?118?%}.record-item.b-1px-l[data-v-e114900a]::before{border-left:2px solid #ccc}.record-item[data-v-e114900a]:nth-child(5){padding-bottom:0}',""]),t.exports=e},ae55:function(t,e,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("c7eb")),s=a(i("1da1")),r=i("26cb"),o={name:"timeline",props:{list:{type:Array,default:function(){return{}}},info:{type:Object,default:function(){return{}}}},data:function(){return{}},computed:(0,r.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor}}),methods:{toPreviewImage:function(t){var e=1==t?this.info.arrive_img:this.info.end_img;this.$util.previewImage({curent:e,urls:[e]})},toMap:function(t){var e=this;return(0,s.default)((0,n.default)().mark((function i(){var a;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return a=e.info,i.next=3,e.$util.checkAuth({type:"userLocation"});case 3:return i.next=5,uni.getLocation({type:"gcj02"});case 5:return i.next=7,uni.openLocation({latitude:1*a["".concat(t,"_lat")],longitude:1*a["".concat(t,"_lng")],name:a["".concat(t,"_address")],scale:28});case 7:case"end":return i.stop()}}),i)})))()}}};e.default=o},bcf1:function(t,e,i){"use strict";var a=i("536c"),n=i.n(a);n.a},cf6b:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.detail.id?i("v-uni-view",{staticClass:"order-pages"},[6==t.detail.pay_type?i("v-uni-view",{staticClass:"fix",staticStyle:{top:"-100%",left:"-100%"}},[i("min-countdown",{attrs:{targetTime:1e3*t.detail.start_service_time_unix,isPlay:!0}})],1):t._e(),i("v-uni-view",{staticClass:"item-child pd-lg fill-base f-paragraph c-base",style:{background:t.primaryColor}},[i("v-uni-view",{staticClass:"text-bold"},[t._v(t._s(t.statusType[t.detail.pay_type]))]),1==t.detail.pay_type&&t.detail.end_time>0?i("v-uni-view",{staticClass:"f-caption mt-sm"},[t._v("请在"),i("min-countdown",{attrs:{targetTime:t.over_time_text},on:{callback:function(e){arguments[0]=e=t.$handleEvent(e),t.countEnd.apply(void 0,arguments)}}}),t._v("内完成支付,逾期未支付,订单将自动取消")],1):t._e(),i("v-uni-view",{staticClass:"space-lg"})],1),i("v-uni-view",{staticClass:"menu-list flex-warp rel ml-lg mr-lg pt-lg pb-lg pl-md pr-md fill-base f-paragraph c-caption radius-16"},[i("v-uni-view",{staticClass:"menu-line abs b-1px-b"}),t._l(t.lineList,(function(e,a){return i("v-uni-view",{key:a,staticClass:"item-child flex-center flex-column f-icontext c-paragraph",style:{color:t.detail.pay_type>e.pay_type-1?t.primaryColor:""}},[i("v-uni-view",{staticClass:"item-img fill-base flex-center mb-sm radius",style:{borderColor:t.detail.pay_type>e.pay_type-1?t.primaryColor:""}},[i("i",{staticClass:"iconfont",class:e.icon})]),i("v-uni-view",[t._v(t._s(e.title))])],1)}))],2),i("v-uni-view",{staticClass:"item-child mt-md ml-lg mr-lg pd-lg fill-base radius-16"},[i("v-uni-view",{staticClass:"flex-between pb-lg"},[i("v-uni-view",{staticClass:"f-paragraph c-title max-380 ellipsis"},[t._v("预约内容")])],1),t._l(t.detail.order_goods,(function(e,a){return i("v-uni-view",{key:a,staticClass:"flex-center",class:[{"mb-lg":a!=t.detail.order_goods.length-1}]},[i("v-uni-image",{staticClass:"avatar lg radius-16",attrs:{mode:"aspectFill",src:e.goods_cover}}),i("v-uni-view",{staticClass:"flex-1 ml-md"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"goods-title f-title c-title ellipsis",class:[{"max-300":e.refund_num>0}]},[t._v(t._s(e.goods_name))]),e.refund_num>0?i("v-uni-view",{staticClass:"f-caption c-warning"},[t._v("已退x"+t._s(e.refund_num))]):t._e()],1),i("v-uni-view",{staticClass:"f-caption c-caption mt-md"},[t._v("服务时间:"+t._s(t.detail.start_time))]),i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"flex-y-baseline f-caption c-warning"},[t._v("¥"),i("v-uni-view",{staticClass:"f-title text-bold"},[t._v(t._s(e.price))])],1),i("v-uni-view",{staticClass:"c-paragraph"},[t._v("x"+t._s(e.num))])],1)],1)],1)}))],2),i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg pd-lg fill-base f-paragraph c-caption radius-16"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",[t._v("下单人")]),i("v-uni-view",{staticClass:"c-title"},[t._v(t._s(t.detail.address_info.user_name))])],1),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("联系方式")]),i("v-uni-view",{staticClass:"c-title"},[t._v(t._s(t.detail.address_info.mobile))])],1),i("v-uni-view",{staticClass:"mt-md"},[i("v-uni-view",[t._v("服务地址")]),i("v-uni-view",{staticClass:"flex-center"},[i("v-uni-view",{staticClass:"c-title mt-sm flex-1 mr-md"},[t._v(t._s(""+t.detail.address_info.address+t.detail.address_info.address_info))]),i("v-uni-view",{staticClass:"flex-center flex-column f-icontext",style:{color:t.primaryColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toMap.apply(void 0,arguments)}}},[i("i",{staticClass:"iconfont icon-dingwei",staticStyle:{"font-size":"42rpx"}}),i("v-uni-view",[t._v("立刻导航去")])],1)],1)],1),t.detail.text?i("v-uni-view",{staticClass:"mt-md"},[i("v-uni-view",[t._v("订单备注")]),i("v-uni-view",{staticClass:"c-title mt-sm"},[t._v(t._s(t.detail.text))])],1):t._e()],1),i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg pd-lg fill-base f-paragraph c-caption radius-16"},[i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("下单时间")]),i("v-uni-view",{staticClass:"c-title"},[t._v(t._s(t.detail.create_time))])],1),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("服务时间")]),i("v-uni-view",{staticClass:"c-title"},[t._v(t._s(t.detail.start_time))])],1),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("服务时长")]),i("v-uni-view",{staticClass:"c-title"},[t._v(t._s(t.detail.time_long)+"分钟")])],1),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("车费详情")]),i("v-uni-view",{staticClass:"flex-y-center c-title"},[t._v(t._s(t.carType[t.detail.car_type])),1==t.detail.car_type?i("v-uni-view",{staticClass:"ml-md"},[t._v("全程"+t._s(t.detail.distance))]):t._e()],1)],1),1==t.detail.car_type?i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("出行费用")]),i("v-uni-view",{staticClass:"c-warning"},[t._v("出租车 ¥"+t._s(t.detail.car_price))])],1):t._e(),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("服务项目费用")]),i("v-uni-view",{staticClass:"c-warning"},[t._v("¥"+t._s(t.detail.init_service_price))])],1),1*t.detail.discount>0?i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("卡券优惠")]),i("v-uni-view",{staticClass:"c-warning"},[t._v("-¥"+t._s(t.detail.discount))])],1):t._e(),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",[t._v("支付方式")]),i("v-uni-view",{staticClass:"flex-y-baseline c-title"},[i("i",{staticClass:"iconfont mr-sm",class:t.payType[t.detail.is_balance].icon,style:{color:1==t.detail.is_balance?t.primaryColor:""}}),t._v(t._s(t.payType[t.detail.is_balance].text))])],1),i("v-uni-view",{staticClass:"flex-between mt-md pt-md b-1px-t"},[i("v-uni-view"),i("v-uni-view",{staticClass:"flex-y-baseline c-title"},[t._v("总计:"),i("v-uni-view",{staticClass:"c-warning"},[t._v("¥"+t._s(t.detail.pay_price))])],1)],1)],1),i("v-uni-view",{staticClass:"mt-md ml-lg mr-lg pd-lg fill-base f-paragraph c-caption radius-16"},[i("v-uni-view",{staticClass:"flex-between pb-lg c-title"},[t._v("订单编号:"+t._s(t.detail.order_code))]),i("timeline",{attrs:{list:t.lineList,info:t.detail}})],1),i("v-uni-view",{staticClass:"space-max-footer"}),t.statusPayType.includes(t.detail.pay_type)?i("v-uni-view",{staticClass:"footer-info fix fill-base"},[i("v-uni-view",{staticClass:"flex-between pd-lg"},[i("v-uni-view"),i("v-uni-view",{staticClass:"flex-center f-desc c-title"},[2==t.detail.pay_type?[i("v-uni-button",{staticClass:"clear-btn order",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toRefuse.apply(void 0,arguments)}}},[t._v("拒绝接单")]),i("v-uni-button",{staticClass:"clear-btn order",style:{color:"#fff",background:t.primaryColor,borderColor:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toConfirm(3)}}},[t._v("确认接单")])]:t._e(),3==t.detail.pay_type||4==t.detail.pay_type||5==t.detail.pay_type?[i("v-uni-button",{staticClass:"clear-btn order",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toTel.apply(void 0,arguments)}}},[t._v("咨询")]),i("v-uni-button",{staticClass:"clear-btn order",style:{color:"#fff",background:t.primaryColor,borderColor:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toConfirm(1*t.detail.pay_type+1)}}},[t._v(t._s(3==t.detail.pay_type?"已出发":4==t.detail.pay_type?"拍照确认到达":"开始服务"))])]:t._e(),6==t.detail.pay_type?[i("v-uni-button",{staticClass:"clear-btn order",style:{color:"#fff",background:t.primaryColor,borderColor:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toConfirm(7)}}},[t._v("完成服务")])]:t._e()],2)],1),i("v-uni-view",{staticClass:"space-safe"})],1):t._e(),i("uni-popup",{ref:"refuse_item",attrs:{type:"center",custom:!0}},[i("v-uni-view",{staticClass:"common-popup-content fill-base pd-lg radius-34"},[i("v-uni-view",{staticClass:"title"},[t._v("拒绝接单")]),i("v-uni-view",{staticClass:"desc"},[t._v("请确认是否拒接接单")]),i("v-uni-textarea",{staticClass:"pd-lg textarea f-desc c-title mt-lg radius-20",attrs:{maxlength:"200",placeholder:"请输入拒单原因","placeholder-class":"f-desc c-caption"},model:{value:t.coach_refund_text,callback:function(e){t.coach_refund_text=e},expression:"coach_refund_text"}}),i("v-uni-view",{staticClass:"flex-center mt-md",staticStyle:{width:"540rpx"}},[i("v-uni-view",{staticClass:"flex-1"}),i("v-uni-view",[t._v(t._s(t.coach_refund_text.length>200?200:t.coach_refund_text.length)+"/200")])],1),i("v-uni-view",{staticClass:"button"},[i("v-uni-view",{staticClass:"item-child",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.$refs.refuse_item.close()}}},[t._v("取消")]),i("v-uni-view",{staticClass:"item-child c-base",style:{background:t.primaryColor,color:"#fff"},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.confirmRefuse.apply(void 0,arguments)}}},[t._v("确定")])],1)],1)],1)],1):t._e()},n=[]},de97:function(t,e,i){"use strict";i.r(e);var a=i("cf6b"),n=i("4d96");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);var r=i("f0c5"),o=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"660e31da",null,!1,a["a"],void 0);e["default"]=o.exports},e7d8:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("v-uni-view",{staticClass:"record-box fill-base"},t._l(t.list,(function(e,a){return i("v-uni-view",{key:a,staticClass:"record-item rel ml-sm b-1px-l"},[i("v-uni-text",{staticClass:"item-tag abs",class:[{cur:t.info.pay_type>e.pay_type-1}],style:{border:"2rpx solid "+t.primaryColor,background:t.info.pay_type>e.pay_type-1?t.primaryColor:""}}),i("v-uni-view",{staticClass:"c-title"},[i("v-uni-view",{staticClass:"item-text f-paragraph flex-y-baseline"},[t._v(t._s(e.title)),i("v-uni-view",{staticClass:"ml-md f-caption c-caption",style:{color:t.info.pay_type>e.pay_type-1?t.primaryColor:""}},[t._v(t._s(t.info.pay_type>e.pay_type-1?"":"状态未开始"))])],1),t.info[e.time]?i("v-uni-view",{staticClass:"c-caption"},[t._v(t._s(t.info[e.time]))]):t._e()],1),2==a&&t.info.pay_type>4?[i("v-uni-image",{staticClass:"item-img mt-md radius-5",attrs:{mode:"widthFix",src:t.info.arrive_img},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toPreviewImage(1)}}}),t.info.arr_address?i("v-uni-view",{staticClass:"flex-y-center mt-sm f-caption c-title",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toMap("arr")}}},[i("i",{staticClass:"iconfont iconjuli mr-sm",style:{color:t.primaryColor}}),t._v(t._s(t.info.arr_address))]):t._e()]:t._e(),4==a&&7==t.info.pay_type?[t.info.end_img?i("v-uni-image",{staticClass:"item-img mt-md radius-5",attrs:{mode:"widthFix",src:t.info.end_img},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toPreviewImage(2)}}}):t._e(),t.info.end_address?i("v-uni-view",{staticClass:"flex-y-center mt-sm f-caption c-title",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toMap("end")}}},[i("i",{staticClass:"iconfont iconjuli mr-sm",style:{color:t.primaryColor}}),t._v(t._s(t.info.end_address))]):t._e()]:t._e()],2)})),1)],1)},n=[]},e8b0:function(t,e,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("ac1f"),i("5319"),i("99af");var n=a(i("3835")),s=a(i("c7eb")),r=a(i("1da1")),o=a(i("5530")),c=i("26cb"),l=a(i("6835")),u={components:{timeline:l.default},data:function(){return{options:{},statusPayType:[2,3,4,5,6],statusType:{"-1":"已拒单",2:"待接单",3:"已接单",4:"已出发",5:"已到达",6:"服务中",7:"已完成"},carType:{0:"公交/地铁",1:"出租车"},payType:{0:{icon:"iconweixinzhifu1 c-success",text:"微信支付"},1:{icon:"iconqianbao",text:"账户余额"}},lineList:[{pay_type:3,title:"技师接单",time:"receiving_time",icon:"iconjishijiedan"},{pay_type:4,title:"技师出发",time:"serout_time",icon:"iconjishichufa"},{pay_type:5,title:"技师到达",time:"arrive_time",icon:"iconjishidaoda"},{pay_type:6,title:"开始服务",time:"start_service_time",icon:"iconjishifuwu"},{pay_type:7,title:"服务完成",time:"order_end_time",icon:"iconjishiwancheng"}],detail:{pay_type:0},popupInfo:{},coach_refund_text:"",lockTap:!1}},computed:(0,c.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo},over_time_text:function(){return(new Date).getTime()+1e3*this.detail.end_time}}),onLoad:function(t){this.options=t,this.initIndex()},onUnload:function(){this.toPlayAudio(!0)},methods:(0,o.default)((0,o.default)((0,o.default)({},(0,c.mapActions)(["getConfigInfo","toPlayAudio"])),(0,c.mapMutations)([""])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)((0,s.default)().mark((function i(){var a,n,r,o,c,l;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=t.length>0&&void 0!==t[0]&&t[0],a||!e.$jweixin.isWechat()){i.next=5;break}return i.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:if(e.configInfo.id&&!a){i.next=8;break}return i.next=8,e.getConfigInfo();case 8:return n=e.options.id,i.next=11,e.$api.order.orderInfo({id:n});case 11:r=i.sent,e.$util.setNavigationBarColor({bg:e.primaryColor}),r.is_balance=1*r.balance>0?1:0,o=r.pay_type,c=r.time_long,l=r.start_service_time,6==o&&(r.start_service_time_unix=e.$util.DateToUnix(l)+60*c),e.detail=r;case 17:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.initIndex(!0)},countEnd:function(){var t=this;this.$util.log("倒计时完了"),setTimeout((function(){t.initRefresh(),t.$util.back()}),1e3)},toRefuse:function(){var t=this;return(0,r.default)((0,s.default)().mark((function e(){return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.coach_refund_text="",t.$refs.refuse_item.open();case 2:case"end":return e.stop()}}),e)})))()},confirmRefuse:function(){var t=this;return(0,r.default)((0,s.default)().mark((function e(){var i;return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.coach_refund_text,i=i.length>0?i.replace(/(^\s*)|(\s*$)/g,""):"",0!=i.length){e.next=5;break}return t.$util.showToast({title:"请输入拒单原因"}),e.abrupt("return");case 5:t.coach_refund_text=t.coach_refund_text.substring(0,200),t.toConfirm(-1);case 7:case"end":return e.stop()}}),e)})))()},toConfirm:function(t){var e=this;return(0,r.default)((0,s.default)().mark((function i(){var a,r,o,c,l,u,d,f,v,p,_,m,w,y,g,x,h,b,C,k,$;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=e.detail.id,r={order_id:a,type:t},-1==t&&(r.coach_refund_text=e.coach_refund_text),5!=t&&7!=t){i.next=44;break}return i.next=6,uni.chooseImage({count:1,sourceType:["camera"]});case 6:return o=i.sent,c=(0,n.default)(o,2),c[0],l=c[1],u=l.tempFiles,d=void 0===u?[]:u,f=l.tempFilePath,void 0===f?"":f,i.next=16,e.$api.base.uploadFile({filePath:d[0].path,filetype:"picture"});case 16:if(v=i.sent,p=v.attachment_path,p){i.next=20;break}return i.abrupt("return");case 20:if(!e.$jweixin.isWechat()){i.next=42;break}return e.$util.showLoading(),i.next=24,e.$jweixin.wxReady2();case 24:return i.next=26,e.$jweixin.getWxLocation();case 26:if(_=i.sent,m=_.latitude,w=void 0===m?0:m,y=_.longitude,g=void 0===y?0:y,w){i.next=35;break}return e.$util.hideAll(),e.$util.showToast({title:"请授权定位当前地址"}),i.abrupt("return");case 35:if(!w||!g){i.next=42;break}return x="".concat(w,",").concat(g),i.next=39,e.$api.base.getMapInfo({location:x});case 39:h=i.sent,b=JSON.parse(h),C=b.status,k=b.result,0==C&&($=k.address,e.toConfirmUpdate(t,r,{lat:w,lng:g,address:$,attachment_path:p}));case 42:i.next=45;break;case 44:e.toConfirmUpdate(t,r);case 45:case"end":return i.stop()}}),i)})))()},toConfirmUpdate:function(t,e){var i=arguments,a=this;return(0,r.default)((0,s.default)().mark((function n(){var r,o,c,l,u,d;return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=i.length>2&&void 0!==i[2]?i[2]:{},5!=t&&7!=t||(o=r.lat,c=r.lng,l=r.address,u=r.attachment_path,5==t?(e.arrive_img=u,e.arr_lat=o,e.arr_lng=c,e.arr_address=l):(e.end_img=u,e.end_lat=o,e.end_lng=c,e.end_address=l)),d={"-1":"已拒绝接单",3:"接单成功",4:"已成功出发",5:"已成功到达",6:"已开始服务",7:"服务已完成"},!a.lockTap){n.next=5;break}return n.abrupt("return");case 5:return a.lockTap=!0,a.$util.showLoading(),n.prev=7,n.next=10,a.$api.technician.updateOrder(e);case 10:-1==t&&a.$refs.refuse_item.close(),a.$util.hideAll(),a.$util.showToast({title:d[t]}),a.lockTap=!1,a.initRefresh(),a.$util.back(),n.next=22;break;case 18:return n.prev=18,n.t0=n["catch"](7),setTimeout((function(){a.lockTap=!1,a.$util.hideAll()}),2e3),n.abrupt("return");case 22:case"end":return n.stop()}}),n,null,[[7,18]])})))()},toTel:function(){var t=this.detail.address_info.mobile;this.$util.goUrl({url:t,openType:"call"})},toMap:function(t){var e=this;return(0,r.default)((0,s.default)().mark((function t(){var i,a,n,r,o;return(0,s.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=e.detail.address_info,a=i.address,n=i.address_info,r=i.lat,o=i.lng,t.next=3,e.$util.checkAuth({type:"userLocation"});case 3:return t.next=5,uni.getLocation({type:"gcj02"});case 5:return t.next=7,uni.openLocation({latitude:1*r,longitude:1*o,name:"".concat(a," ").concat(n),scale:28});case 7:case"end":return t.stop()}}),t)})))()}})};e.default=u}}]); |