王总上门按摩后台代码
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.
 
 
 
 
 
shangmenanmo/public/h6/static/js/user-pages-order-bell-list....

1 lines
11 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-order-bell-list"],{"38b8":function(t,e,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("c223"),a("dd2b");var i=n(a("9b1b")),r=n(a("2634")),o=n(a("2fdc")),s=a("8f59"),c={components:{},data:function(){return{options:{},statusType:{"-1":"已取消",1:"待支付",2:"待服务",3:this.$t("action.attendantName")+"接单",4:this.$t("action.attendantName")+"出发",5:this.$t("action.attendantName")+"到达",6:"服务中",7:"已完成",8:"待转单"},param:{page:1},list:{data:[]},loading:!0,popupInfo:{},lockTap:!1}},computed:(0,s.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}}),onLoad:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function a(){return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.options=t,e.param.order_id=t.id,a.next=4,e.initIndex();case 4:case"end":return a.stop()}}),a)})))()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.loading=!0,this.getList(this.param.page+1))},methods:(0,i.default)((0,i.default)((0,i.default)({},(0,s.mapActions)(["getConfigInfo","getOrderList"])),(0,s.mapMutations)(["updateOrderItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,o.default)((0,r.default)().mark((function a(){var n;return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(n=t.length>0&&void 0!==t[0]&&t[0],n||!e.$jweixin.isWechat()){a.next=5;break}return a.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:return e.$util.setNavigationBarColor({bg:e.primaryColor}),a.next=8,e.getList(1);case 8:case"end":return a.stop()}}),a)})))()},initRefresh:function(){this.initIndex(!0)},getList:function(){var t=arguments,e=this;return(0,o.default)((0,r.default)().mark((function a(){var n,i,o,s;return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:0,n&&(e.param.page=n),i=e.list,o=e.param,a.next=5,e.$api.order.getAddClockOrder(o);case 5:s=a.sent,1==e.param.page||(s.data=i.data.concat(s.data)),e.list=s,e.loading=!1,e.$util.hideAll();case 9:case"end":return a.stop()}}),a)})))()},toCancel:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function a(){var n,i,o,s,c,l,u;return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:n=e.list.data[t],i=n.id,o=n.order_code,s=n.order_goods,c=n.pay_type,l=s[0].goods_cover,e.popupInfo={id:i,name:"系统单号:".concat(o),image:l,index:t},u=1==c?"cancel_item":"del_item",e.$refs[u].open();case 5:case"end":return a.stop()}}),a)})))()},confirmCancel:function(){var t=this;return(0,o.default)((0,r.default)().mark((function e(){var a,n,i;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.popupInfo,n=a.id,i=a.index,e.next=3,t.$api.order.cancelOrder({id:n});case 3:0==t.activeIndex?t.list.data[i].pay_type=-1:t.list.data.splice(i,1),t.$util.showToast({title:"取消成功"}),t.$refs.cancel_item.close();case 6:case"end":return e.stop()}}),e)})))()},confirmDel:function(){var t=this;return(0,o.default)((0,r.default)().mark((function e(){var a,n,i;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.popupInfo,n=a.id,i=a.index,e.next=3,t.$api.order.delOrder({id:n});case 3:t.list.data.splice(i,1),t.$util.showToast({title:"删除成功"}),t.$refs.del_item.close(),t.$util.back();case 7:case"end":return e.stop()}}),e)})))()},toPay:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function a(){var n,i,o,s,c;return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!e.lockTap){a.next=2;break}return a.abrupt("return");case 2:return e.lockTap=!0,e.$util.showLoading(),n=e.list.data[t],i=n.id,o=n.pay_model,a.prev=5,a.next=8,e.$api.order.rePayOrder({id:i});case 8:if(s=a.sent,c=s.pay_list,e.$util.hideAll(),!c){a.next=33;break}if(3==o&&(c={orderInfo:c,provider:"alipay"}),3!=o){a.next=20;break}return c=Object.assign({},c,{order_id:i,page_url:"/pages/order?tab=2"}),e.updateOrderItem({key:"alipayOrderParams",val:c}),e.$util.goUrl({url:"/user/pages/alipay-result"}),e.lockTap=!1,setTimeout((function(){e.initRefresh()}),3e3),a.abrupt("return");case 20:return a.prev=20,a.next=23,e.$util.pay(c);case 23:e.$util.showToast({title:"支付成功"}),0==e.activeIndex?e.list.data[t].pay_type=2:e.list.data.splice(t,1),e.lockTap=!1,a.next=33;break;case 28:return a.prev=28,a.t0=a["catch"](20),e.$util.showToast({title:"支付失败"}),e.lockTap=!1,a.abrupt("return");case 33:a.next=38;break;case 35:a.prev=35,a.t1=a["catch"](5),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 38:case"end":return a.stop()}}),a,null,[[5,35],[20,28]])})))()},toHx:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function a(){var n,i,o;return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:n=e.list.data[t],i=n.id,o=n.qr,e.popupInfo={id:i,image:o},e.$refs.hx_item.open();case 3:case"end":return a.stop()}}),a)})))()},goDetail:function(t,e){var a=this.list.data[t].id,n="/user/pages/order/".concat(e,"?id=").concat(a);this.$util.goUrl({url:n})},toAgain:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function a(){var n,i,o;return(0,r.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n=e.list.data[t],i=n.id,o=n.coach_id,a.next=3,e.$api.order.onceMoreOrder({order_id:i});case 3:e.$util.goUrl({url:"/user/pages/order?id=".concat(o)});case 4:case"end":return a.stop()}}),a)})))()}})};e.default=c},5980:function(t,e,a){"use strict";a.r(e);var n=a("38b8"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},"6ff1":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"order-pages"},[t._l(t.list.data,(function(e,n){return a("v-uni-view",{key:n,staticClass:"item-child mt-md ml-md mr-md pd-lg fill-base radius-16 rel",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(n,"detail")}}},[e.is_add?a("v-uni-view",[a("v-uni-view",{staticClass:"bell-tag flex-center f-icontext c-base abs",style:{background:t.primaryColor}},[t._v("加钟服务")]),a("v-uni-view",{staticClass:"space-md"})],1):t._e(),a("v-uni-view",{staticClass:"flex-between pb-lg b-1px-b"},[a("v-uni-view",{staticClass:"f-paragraph c-title max-500 ellipsis",on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.$util.goUrl({openType:"copy",url:e.order_code})}}},[t._v("订单号:"+t._s(e.order_code))]),a("v-uni-view",{staticClass:"f-caption text-bold",style:{color:1==e.pay_type?t.primaryColor:[2,3,4,5,6].includes(e.pay_type)?t.subColor:7==e.pay_type?"#11C95E":"#333"}},[t._v(t._s(t.statusType[e.pay_type]))])],1),t._l(e.order_goods,(function(n,i){return a("v-uni-view",{key:i,staticClass:"flex-center mt-lg"},[a("v-uni-view",{staticClass:"cover radius-16"},[a("v-uni-view",{staticClass:"h5-image cover radius-16",style:{backgroundImage:"url('"+n.goods_cover+"')"}})],1),a("v-uni-view",{staticClass:"flex-1 ml-md"},[a("v-uni-view",{staticClass:"flex-between"},[a("v-uni-view",{staticClass:"f-mini-title c-title text-bold max-400 ellipsis"},[t._v(t._s(n.goods_name))]),a("v-uni-view",{staticClass:"f-desc c-desc"},[t._v("x"+t._s(n.num))])],1),a("v-uni-view",{staticClass:"flex-center",staticStyle:{"margin-top":"6rpx"}},[a("v-uni-view",{staticClass:"flex-1 flex-y-center f-caption c-caption"},[t._v("服务"+t._s(t.$t("action.attendantName"))),a("v-uni-view",{staticClass:"ml-md max-280 ellipsis"},[t._v(t._s(e.coach_info.coach_name))])],1),n.refund_num>0?a("v-uni-view",{staticClass:"f-caption c-warning"},[t._v("已退x"+t._s(n.refund_num))]):t._e()],1),a("v-uni-view",{staticClass:"flex-y-center f-caption c-caption"},[t._v("预约时间"),a("v-uni-view",{staticClass:"ml-md"},[t._v(t._s(e.start_time))])],1),a("v-uni-view",{staticClass:"flex-y-center f-caption c-caption"},[t._v("总计:"),a("v-uni-view",{staticClass:"flex-y-baseline c-warning text-bold"},[t._v("¥"),a("v-uni-view",{staticClass:"f-title"},[t._v(t._s(e.pay_price))])],1)],1)],1)],1)})),a("v-uni-view",{staticClass:"flex-between pt-lg"},[a("v-uni-view"),a("v-uni-view",{staticClass:"flex-warp"},[1==e.pay_type?[a("v-uni-button",{staticClass:"clear-btn order",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toCancel(n)}}},[t._v("取消订单")]),a("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.toPay(n)}}},[t._v("去支付")])]:t._e(),-1==e.pay_type||7==e.pay_type?[a("v-uni-button",{staticClass:"clear-btn order",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toCancel(n)}}},[t._v("删除")])]:t._e(),e.can_refund>0?a("v-uni-button",{staticClass:"clear-btn order",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(n,"refund")}}},[t._v("申请退款")]):t._e(),6==e.pay_type&&(e.is_add||!e.is_add&&e.can_add_order)?[a("v-uni-button",{staticClass:"clear-btn order",style:{color:"#fff",background:t.primaryColor,borderColor:t.primaryColor},on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.$util.goUrl({url:"/user/pages/bell/list?id="+e.id+"&coach_id="+e.coach_id})}}},[t._v(t._s(e.is_add?"升级项目":"升级/加钟"))])]:t._e(),7!=e.pay_type||e.is_add?t._e():[e.is_comment?t._e():a("v-uni-button",{staticClass:"clear-btn order",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(n,"evaluate")}}},[t._v("去评价")]),e.can_again?a("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.toAgain(n)}}},[t._v("再来一单")]):t._e()]],2)],1)],2)})),t.loading?a("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page?a("abnor"):t._e(),a("v-uni-view",{staticClass:"space-footer"}),a("common-popup",{ref:"cancel_item",attrs:{type:"CANCEL_ORDER",info:t.popupInfo},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmCancel.apply(void 0,arguments)}}}),a("common-popup",{ref:"del_item",attrs:{type:"DELETE_ORDER",info:t.popupInfo},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirmDel.apply(void 0,arguments)}}})],2)},i=[]},d04a:function(t,e,a){"use strict";a.r(e);var n=a("6ff1"),i=a("5980");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);var o=a("828b"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"7583cca2",null,!1,n["a"],void 0);e["default"]=s.exports}}]);