!function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n-1&&i.push(u.list[o]):i.push(u.list[o]);e.list=e.list.concat(e.list,i)}e.params.pageNum=a.data.pageNum+1}e.finished=e.params.pageNum>=(null===(r=a)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.totalPage),e.loading=!1;case 16:case"end":return t.stop()}}),t)})))()},getIsReturnOrderList:function(){var e=this;return a(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,u.get("/api-mall-portal/order/list",{params:t(t({},e.params),{},{status:"1,2,3"})});case 3:return n=r.sent,r.abrupt("return",n);case 7:r.prev=7,r.t0=r.catch(0);case 9:return r.abrupt("return",{});case 10:case"end":return r.stop()}}),r,null,[[0,7]])})))()},getReturnList:function(){var e=this;return a(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,u.post("/api-mall-portal/returnApply/list",{data:t(t({},e.params),{},{status:"1"===e.active?"0,1":"2,3"})});case 3:return n=r.sent,r.abrupt("return",n);case 7:r.prev=7,r.t0=r.catch(0);case 9:return r.abrupt("return",{});case 10:case"end":return r.stop()}}),r,null,[[0,7]])})))()},setReturnParams:function(e,t){this.returnGood.memberUsername=i.user.data.username,this.returnGood.orderId=e.id,this.returnGood.orderSn=e.orderSn,this.returnGood.productAttr=t.productAttr,this.returnGood.productBrand=t.productBrand,this.returnGood.productCount=t.productQuantity,this.returnGood.productId=t.productId,this.returnGood.productName=t.productName,this.returnGood.productPic=t.productPic,this.returnGood.productPrice=t.productPrice,this.returnGood.productRealPrice=t.productPrice,this.returnGood.proofPics="",this.returnGood.returnName=e.receiverName,this.returnGood.returnPhone=e.receiverPhone,this.returnGood.orderItemId=t.id,console.log(this.returnGood)},setReturnShop:function(){var e=this;return a(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.reason){r.next=3;break}return o("请填写退货原因!"),r.abrupt("return");case 3:return r.prev=3,r.next=6,u.post("/api-mall-portal/returnApply/create",{data:t(t({},e.returnGood),{},{reason:e.reason})});case 6:200===r.sent.code&&(o({message:"退货申请成功",icon:"success"}),setTimeout((function(){e.show=!1,e.reason="",e.returnOrderSn="",e.active="1"}),500)),r.next=12;break;case 10:r.prev=10,r.t0=r.catch(3);case 12:e.returnGood={};case 13:case"end":return r.stop()}}),r,null,[[3,10]])})))()},setReturnApplySn:function(){var e=this;return a(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.returnOrderSn){t.next=3;break}return o("请填写退货快递单号"),t.abrupt("return");case 3:return t.prev=3,t.next=6,u.post("/api-mall-portal/returnApply/deliverySn",{data:{deliverySn:e.returnOrderSn,id:e.returnGoodId}});case 6:r=t.sent,n=r.code,r.data,200===n&&(e.returnOrderSn="",e.kmsShow=!1,e.init(),e.getList()),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(3);case 14:case"end":return t.stop()}}),t,null,[[3,12]])})))()},deleteReturnApply:function(){var e=this;s.confirm({title:"提示",message:"是否撤销退货申请?",confirmButtonText:"撤销",confirmButtonColor:"var(--van-primary)"}).then(a(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.post("/api-mall-portal/returnApply/delete/"+e.returnGoodId);case 3:r=t.sent,n=r.code,r.data,200===n&&(e.init(),e.getList()),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])}))))}},render:function(){var e,t,n=this;return c("div",{class:S.shopOrder},[c(r,null,null),c(x,{active:this.active,"onUpdate:active":function(e){return n.active=e},color:"var(--van-primary)",lineWidth:28,animated:!0,swipeable:!0},(t=e=[{name:"0",title:"全部"},{name:"1",title:"处理中"},{name:"2",title:"已处理"}].map((function(e){return c(w,{name:e.name,title:e.title},{default:function(){return[n.list.length?c(b,{loading:n.loading,finished:n.finished,finishedText:" ",class:[S.goodsList],onLoad:n.getList},{default:function(){return[n.active===e.name&&n.list.map((function(e){return c(l,null,[e.orderItemList&&e.orderItemList.length?e.orderItemList.map((function(t){return c(v,{class:S.cellGroup},{default:function(){return[c(j,{item:t},null),c(g,{center:!0},{default:function(){return c("div",{class:S.btnList},["0"===n.active&&t.returnStatus<0&&(3!=e.status||0==e.afterSale)?c(d,{size:"small",round:!0,type:"primary",onClick:function(){n.show=!0,n.setReturnParams(e,t)}},{default:function(){return[f("退货申请")]}}):null,t.returnStatus>=0?c("div",null,[O[t.returnStatus]]):null])}})]}})})):c(v,{class:S.cellGroup},{default:function(){return[c(g,{title:e.createTime,titleClass:S.payTime,value:O[e.status]},null),c(j,{item:e},null),c(g,{center:!0},{default:function(){return c("div",{class:S.btnList},[1!==e.status||e.deliverySn?null:c(d,{size:"small",round:!0,onClick:function(){n.returnGoodId=e.id,n.kmsShow=!0}},{default:function(){return[f("填写退货快递单号")]}}),e.status<=1?c(d,{size:"small",round:!0,type:"primary",onClick:function(){n.returnGoodId=e.id,n.deleteReturnApply()}},{default:function(){return[f("撤销申请")]}}):null,2===e.status?c("div",{class:S.returnDes},[f("该商品金额已于 "),e.handleTime," ",f("原路退还")]):3===e.status?c("div",{class:S.returnDes},[f("拒绝原因: "),e.handleNote]):null])}})]}})])}))]}}):c(p,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无数据"},null)]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!m(t)?e:{default:function(){return[e]}})),c(h,{show:this.show,"onUpdate:show":function(e){return n.show=e},title:"退货原因"},{default:function(){return[c("div",{style:{paddingTop:"15px"}},[c(y,{class:[S.field],placeholder:"请输入退货原因",type:"textarea",rows:3,modelValue:n.reason,"onUpdate:modelValue":function(e){return n.reason=e}},null)]),c("div",{class:S["btn-group"]},[c(d,{type:"primary",block:!0,round:!0,onClick:function(){return n.setReturnShop()}},{default:function(){return[f("确定")]}})])]}}),c(h,{show:this.kmsShow,"onUpdate:show":function(e){return n.kmsShow=e},title:"填写退货快递单号"},{default:function(){return[c(y,{modelValue:n.returnOrderSn,"onUpdate:modelValue":function(e){return n.returnOrderSn=e},class:[S.field],placeholder:"请输入退货快递单号"},null),c("div",{class:S["btn-group"]},[c(d,{type:"primary",block:!0,round:!0,onClick:function(){return n.setReturnApplySn()}},{default:function(){return[f("确定")]}})])]}})])}}))}}}))}();