(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["agent-pages-order-list"],{"143f":function(t,e,i){"use strict";i.r(e);var a=i("c00f"),n=i("e663");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);var r=i("828b"),o=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"9612e876",null,!1,a["a"],void 0);e["default"]=o.exports},b1a1:function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c223"),i("dd2b");var n=a(i("2634")),s=a(i("2fdc")),r=a(i("9b1b")),o=i("8f59"),l={components:{},data:function(){return{isLoad:!1,options:{},activeIndex:0,tabList:[],tabOrderList:[{title:"全部",id:0},{title:"待服务",id:2,number:0},{title:this.$t("action.attendantName")+"接单",id:3,number:0},{title:this.$t("action.attendantName")+"出发",id:4,number:0},{title:this.$t("action.attendantName")+"到达",id:5,number:0},{title:"服务中",id:6,number:0},{title:"已完成",id:7,number:0}],tabBellList:[{title:"全部",id:0},{title:"待服务",id:2,number:0},{title:this.$t("action.attendantName")+"接单",id:3,number:0},{title:"服务中",id:6,number:0},{title:"已完成",id:7,number:0}],statusType:{"-1":"已取消",1:"待支付",2:"待服务",3:this.$t("action.attendantName")+"接单",4:this.$t("action.attendantName")+"出发",5:this.$t("action.attendantName")+"到达",6:"服务中",7:"已完成",8:"待转单"},technicianStatusOperType:{"-1":"agreeRefund",2:"orderTaking",3:"setOut",4:"arrive",5:"startService",6:"serviceCompletion",8:"transferOrder"},param:{page:1,pay_type:0,order_code:""},list:{data:[]},loading:!0,index:-1,lockTap:!1,popupInfo:{title:"",index:"",type:"",param:{},imgs:[],location:{lat:0,lng:0,address:""}}}},computed:(0,o.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=t.agent,i=void 0===e?0:e,a=t.bell,n=void 0===a?0:a,s=t.tab,r=void 0===s?0:s;t.agent=1*i,t.bell=1*n,this.options=t,uni.setNavigationBarTitle({title:8==r?"拒单管理":1==n?"加钟管理":"订单管理"}),this.tabList=8==r?[]:1==n?this.tabBellList:this.tabOrderList,this.activeIndex=r,this.initIndex()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:(0,r.default)((0,r.default)((0,r.default)({},(0,o.mapActions)(["getConfigInfo"])),(0,o.mapMutations)(["updateTechnicianItem"])),{},{initIndex:function(){var t=arguments,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: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 i.next=10,e.getList();case 10:e.isLoad=!0,e.$util.setNavigationBarColor({bg:e.primaryColor});case 12:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},toSearch:function(t){this.param.page=1,this.param.order_code=t,this.getList()},getList:function(){var t=arguments,e=this;return(0,s.default)((0,n.default)().mark((function i(){var a,s,r,o,l,c,u,d,p,f,v,g,h,m;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return a=t.length>0&&void 0!==t[0]&&t[0],s=e.list,r=e.param,o=e.tabList,l=e.activeIndex,c=e.options,u=c.tab,d=void 0===u?0:u,p=c.bell,f=void 0===p?0:p,v=c.agent,g=void 0===v?0:v,h=g?"agent":"admin",r.pay_type=8==d?8:o[l].id,8!=d&&(r.is_add=f),i.next=8,e.$api[h].orderList(r);case 8:m=i.sent,a||(1==e.param.page||(m.data=s.data.concat(m.data)),e.list=m),e.loading=!1,e.$util.hideAll();case 12:case"end":return i.stop()}}),i)})))()},handerTabChange:function(t){this.activeIndex=t,this.$util.showLoading(),this.param.page=1,this.getList()},toConfirm:function(t){var e=this;return(0,s.default)((0,n.default)().mark((function i(){var a,s,r,o,l,c,u,d,p,f,v;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:a=e.list.data[t],s=a.id,r=a.pay_type,o=a.true_car_price,l=a.true_service_price,c=a.is_add,u=void 0===c?0:c,d=a.store_id,p=void 0===d?0:d,f=3===r&&(u||p)?5:r,v=(1*o+1*l).toFixed(2),e.popupInfo={index:t,order_id:s,type:8==r?-1:f,refund_price:v},e.$refs.change_item.open();case 5:case"end":return i.stop()}}),i)})))()},confirmChangeOrder:function(){var t=this;return(0,s.default)((0,n.default)().mark((function e(){var i,a,s,r,o,l,c;return(0,n.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.$util.deepCopy(t.popupInfo),i.type=i.type+1,a=i.index,s=i.type,delete i.index,delete i.refund_price,r={"-1":"退款成功",3:"接单成功",4:"已成功出发",5:"已成功到达",6:"已开始服务",7:"服务已完成"},o=t.activeIndex,!t.lockTap){e.next=9;break}return e.abrupt("return");case 9:return t.lockTap=!0,t.$util.showLoading(),l=t.options.agent,c=l?"agent":"admin",e.prev=13,e.next=16,t.$api[c].adminUpdateOrder(i);case 16:if(t.$refs.change_item.close(),t.$util.showToast({title:r[s]}),0==o?t.list.data[a].pay_type=s:t.list.data.splice(a,1),t.lockTap=!1,t.$util.hideAll(),t.updateTechnicianItem({key:"haveOperItem",val:!0}),0!=o){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,t.getList(!0);case 26:e.next=32;break;case 28:return e.prev=28,e.t0=e["catch"](13),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3),e.abrupt("return");case 32:case"end":return e.stop()}}),e,null,[[13,28]])})))()},goDetail:function(t){var e=this.list.data[t].id,i=this.options.agent,a="/agent/pages/order/detail?id=".concat(e,"&agent=").concat(i);this.$util.goUrl({url:a})}})};e.default=l},c00f: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.isLoad?i("v-uni-view",{staticClass:"order-pages"},[i("fixed",[i("v-uni-view",{staticClass:"fill-base pt-lg pl-md pr-md pb-md"},[i("search",{attrs:{type:"input",padding:0,radius:30,height:"70rpx",placeholder:"请输入系统订单号查询"},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.toSearch.apply(void 0,arguments)}}})],1),8!=t.options.tab?i("tab",{attrs:{list:t.tabList,activeIndex:1*t.activeIndex,activeColor:t.primaryColor,height:"100rpx"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.handerTabChange.apply(void 0,arguments)}}}):t._e(),i("v-uni-view",{staticClass:"b-1px-b"})],1),t._l(t.list.data,(function(e,a){return i("v-uni-view",{key:a,staticClass:"item-child mt-md ml-lg mr-lg pd-lg fill-base radius-16 rel",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(a)}}},[e.is_add?i("v-uni-view",[i("v-uni-view",{staticClass:"bell-tag flex-center f-icontext c-base abs",style:{background:t.primaryColor}},[t._v("加钟服务")]),i("v-uni-view",{staticClass:"space-md"})],1):t._e(),i("v-uni-view",{staticClass:"flex-between pb-lg b-1px-b"},[i("v-uni-view",{staticClass:"f-paragraph c-title max-450 ellipsis"},[t._v("订单号:"+t._s(e.order_code))]),i("v-uni-view",{staticClass:"f-caption text-bold",style:{color:2==e.pay_type?t.primaryColor:[3,4,5].includes(e.pay_type)?t.subColor:6==e.pay_type?"#11C95E":"#333"}},[t._v(t._s(t.statusType[e.pay_type]))])],1),t._l(e.order_goods,(function(a,n){return i("v-uni-view",{key:n,staticClass:"flex-center mb-lg",class:[{"mt-lg":0==n}]},[i("v-uni-view",{staticClass:"avatar lg radius-16"},[i("v-uni-view",{staticClass:"h5-image avatar lg radius-16",style:{backgroundImage:"url('"+a.goods_cover+"')"}})],1),i("v-uni-view",{staticClass:"flex-1 ml-md"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"f-mini-title c-title text-bold max-380 ellipsis"},[t._v(t._s(a.goods_name))]),i("v-uni-view",{staticClass:"c-paragraph"},[t._v("x"+t._s(a.num))])],1),i("v-uni-view",{staticClass:"flex-between mt-md"},[i("v-uni-view",{staticClass:"f-caption c-caption ellipsis",class:[{"max-300":a.refund_num>0},{"max-450":0==a.refund_num}]},[t._v("服务"+t._s(t.$t("action.attendantName"))+":"+t._s(e.coach_info?e.coach_info.coach_name:"-"))]),a.refund_num>0?i("v-uni-view",{staticClass:"f-caption c-warning"},[t._v("已退x"+t._s(a.refund_num))]):t._e()],1),i("v-uni-view",{staticClass:"f-caption c-caption",staticStyle:{"margin-top":"5rpx"}},[t._v("服务时间:"+t._s(e.start_time))])],1)],1)})),i("v-uni-view",{staticClass:"flex-between pt-lg b-1px-t"},[i("v-uni-view",{staticClass:"flex-y-center f-desc c-title"},[t._v("总计:"),i("v-uni-view",{staticClass:"f-paragraph text-bold"},[t._v("¥"+t._s(e.pay_price))])],1),i("v-uni-view",{staticClass:"flex-warp"},[[2,3,4,5,6,8].includes(e.pay_type)?[t.options.bell?t._e():i("v-uni-button",{staticClass:"clear-btn order",staticStyle:{"margin-left":"0"},on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.$util.goUrl({url:"/agent/pages/order/change?id="+e.id+"&agent="+t.options.agent})}}},[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(a)}}},[t._v(t._s(t.$t("action."+t.technicianStatusOperType[3===e.pay_type&&(e.is_add||e.store_id)?5:8==e.pay_type?-1:e.pay_type])))])]:t._e()],2)],1)],2)})),t.loading?i("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?i("abnor"):t._e(),i("v-uni-view",{staticClass:"space-footer"}),i("uni-popup",{ref:"change_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("你确认要操作"+t._s(t.$t("action."+t.technicianStatusOperType[t.popupInfo.type]))+"吗?")]),-1==t.popupInfo.type?i("v-uni-view",{staticClass:"f-caption c-warning"},[t._v("退款金额:¥"+t._s(t.popupInfo.refund_price))]):t._e(),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.change_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.confirmChangeOrder.apply(void 0,arguments)}}},[t._v("确定")])],1)],1)],1)],2):t._e()},n=[]},e663:function(t,e,i){"use strict";i.r(e);var a=i("b1a1"),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}}]);