;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i=data.total){_this.finished=true;}if(_this.list.length===0){_this.dataShow=false;}_context.next=18;break;case 14:_context.prev=14;_context.t0=_context["catch"](3);_this.finished=true;_this.dataShow=false;case 18:_this.loading=false;case 19:case"end":return _context.stop();}}},_callee,null,[[3,14]]);}))();},onClickRight:function onClickRight(){this.$router.push('/afterSale');},cancelOrder:function cancelOrder(item){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var dialog,_yield$request$post,code,data;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.next=2;return Dialog.confirm({title:'提示',message:'确认取消订单?',confirmButtonText:'取消订单',confirmButtonColor:'var(--van-primary)'});case 2:dialog=_context2.sent;if(!(dialog==='confirm')){_context2.next=10;break;}_context2.next=6;return request.post('/api-mall-portal/order/cancelUserOrder',{params:{orderId:item.id}});case 6:_yield$request$post=_context2.sent;code=_yield$request$post.code;data=_yield$request$post.data;if(code===200){_this2.init();_this2.getList();}case 10:case"end":return _context2.stop();}}},_callee2);}))();},payOrder:function payOrder(item){cartConfirm.orderInfo=item;this.$router.push({path:'/cartConfirmAgin'});},// 再来一单 onAginOrder:function onAginOrder(item){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var res,code,data;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return request.post('/api-mall-portal/order/oneOrder',{params:{orderId:item.id}});case 3:res=_context3.sent;code=res.code,data=res.data;if(code===200){cartConfirm.calcAmount=data.calcAmount;cartConfirm.cartPromotionItemList=data.cartPromotionItemList;cartConfirm.memberReceiveAddressList=data.memberReceiveAddressList;_this3.$router.push({path:'/cartConfirm'});}console.log(res);_context3.next=11;break;case 9:_context3.prev=9;_context3.t0=_context3["catch"](0);case 11:case"end":return _context3.stop();}}},_callee3,null,[[0,9]]);}))();},// 确认收货 onConfirmReceipt:function onConfirmReceipt(item){var _this4=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var dialog,res;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.next=2;return Dialog.confirm({title:'提示',message:'确认收货?',confirmButtonText:'收货',confirmButtonColor:'var(--van-primary)'});case 2:dialog=_context4.sent;if(!(dialog==='confirm')){_context4.next=8;break;}_context4.next=6;return request.post('/api-mall-portal/order/confirmReceiveOrder',{params:{orderId:item.id}});case 6:res=_context4.sent;if(res.code===200){_this4.init();_this4.getList();}case 8:case"end":return _context4.stop();}}},_callee4);}))();}},render:function render(){var _this5=this;var _slot2;var tabs=[{name:0,title:'待支付'},{name:1,title:'待收货'},{name:2,title:'已完成'}];return createVNode("div",{"class":styles.shopOrder},[createVNode(ColHeader,{"ref":"colHeader","class":"header"},null),createVNode(Tabs,{"active":this.active,"onUpdate:active":function onUpdateActive($event){return _this5.active=$event;},"color":"var(--van-primary)","lineWidth":28,"animated":true,"swipeable":true},_isSlot(_slot2=tabs.map(function(tab){var _slot;return createVNode(Tab,{"name":tab.name,"title":tab.title},{default:function _default(){return[_this5.active===tab.name&&_this5.dataShow?createVNode(List,{"loading":_this5.loading,"finished":_this5.finished,"finishedText":" ","class":[styles.goodsList],"onLoad":_this5.getList},_isSlot(_slot=_this5.list.map(function(item){return createVNode(Fragment,null,[createVNode(CellGroup,{"class":styles.cellGroup,"border":false,"onClick":function onClick(){_this5.$router.push({path:'/shopOrderDetail',query:{id:item.id}});}},{default:function _default(){return[createVNode(Cell,{"title":item.createTime,"titleClass":styles.payTime,"value":orderState[item.status],"valueClass":[0,4,5,6].includes(item.status)?styles.payStatus:styles.paySuccess},null),item.orderItemList&&item.orderItemList.length?item.orderItemList.map(function(n){return createVNode(Item,{"item":n},null);}):null,createVNode(AfterSaleBtns,{"item":item,"onCancelOrder":_this5.cancelOrder,"onPayOrder":_this5.payOrder,"onConfirmReceipt":_this5.onConfirmReceipt,"onAginOrder":_this5.onAginOrder},null)];}})]);}))?_slot:{default:function _default(){return[_slot];}}):createVNode(ColResult,{"btnStatus":false,"classImgSize":"SMALL","tips":"暂无订单"},null)];}});}))?_slot2:{default:function _default(){return[_slot2];}})]);}}));}};});})();