!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 a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,n.get("/api-mall-portal/order/list",{params:t(t({},e.params),{},{status:"1,2,3"})});case 3:return a=r.sent,r.abrupt("return",a);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 a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,n.post("/api-mall-portal/returnApply/list",{data:t(t({},e.params),{},{status:"1"===e.active?"0,1":"2,3"})});case 3:return a=r.sent,r.abrupt("return",a);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=u.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 i("请填写退货原因!"),r.abrupt("return");case 3:return r.prev=3,r.next=6,n.post("/api-mall-portal/returnApply/create",{data:t(t({},e.returnGood),{},{reason:e.reason})});case 6:200===r.sent.code&&(i({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,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.returnOrderSn){t.next=3;break}return i("请填写退货快递单号"),t.abrupt("return");case 3:return t.prev=3,t.next=6,n.post("/api-mall-portal/returnApply/deliverySn",{data:{deliverySn:e.returnOrderSn,id:e.returnGoodId}});case 6:r=t.sent,a=r.code,r.data,200===a&&(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;o.confirm({title:"提示",message:"是否撤销退货申请?",confirmButtonText:"撤销",confirmButtonColor:"var(--van-primary)"}).then(a(regeneratorRuntime.mark((function t(){var r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.post("/api-mall-portal/returnApply/delete/"+e.returnGoodId);case 3:r=t.sent,a=r.code,r.data,200===a&&(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,r=this;return s("div",{class:x.shopOrder},[s(m,null,null),s(S,{active:this.active,"onUpdate:active":function(e){return r.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 s(w,{name:e.name,title:e.title},{default:function(){return[r.list.length?s(b,{loading:r.loading,finished:r.finished,finishedText:" ",class:[x.goodsList],onLoad:r.getList},{default:function(){return[r.active===e.name&&r.list.map((function(e){return s(c,null,[e.orderItemList&&e.orderItemList.length?e.orderItemList.map((function(t){return s(g,{class:x.cellGroup},{default:function(){return[s(v,{title:e.createTime,titleClass:x.payTime},null),s(j,{item:t},null),s(v,{center:!0,class:x.bottomCell},{title:function(){return s(c,null,[l("订单编号:"),t.orderSn])},default:function(){return s("div",{class:x.btnList},["0"===r.active&&t.returnStatus<0&&(3!=e.status||0==e.afterSale)?s(d,{size:"small",round:!0,onClick:function(){r.show=!0,r.setReturnParams(e,t)}},{default:function(){return[l("退货申请")]}}):null,t.returnStatus>=0?s("div",null,[O[t.returnStatus]]):null])}})]}})})):s(g,{class:x.cellGroup},{default:function(){return[s(v,{title:e.createTime,titleClass:x.payTime,value:O[e.status]},null),s(j,{item:e},null),s(v,{center:!0},{default:function(){return s("div",{class:x.sectionCell},[2!==e.status&&3!==e.status&&s("div",{class:x.orderSn},[l("订单编号:"),e.orderSn]),s("div",{class:x.btnList},[1!==e.status||e.deliverySn?null:s(d,{size:"small",round:!0,onClick:function(){r.returnGoodId=e.id,r.kmsShow=!0}},{default:function(){return[l("填写退货快递单号")]}}),e.status<=1?s(d,{size:"small",round:!0,type:"primary",onClick:function(){r.returnGoodId=e.id,r.deleteReturnApply()}},{default:function(){return[l("撤销申请")]}}):null,2===e.status?s("div",{class:x.returnSection},[s("div",{class:x.orderSn},[l("订单编号:"),e.orderSn]),s("div",{class:x.returnDes},[s("i",{class:x.iconChecked},null),l("该商品金额已于 "),e.handleTime," ",l("原路退还")])]):3===e.status?s("div",{class:x.returnSection},[s("div",{class:x.orderSn},[l("订单编号:"),e.orderSn]),s("div",{class:x.returnDes},[l("拒绝原因: "),e.handleNote])]):null])])}})]}})])}))]}}):s(p,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无数据"},null)]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!f(t)?e:{default:function(){return[e]}})),s(h,{show:this.show,"onUpdate:show":function(e){return r.show=e},title:"退货原因"},{default:function(){return[s("div",{style:{paddingTop:"15px"}},[s(y,{class:[x.field],placeholder:"请输入退货原因",type:"textarea",rows:3,modelValue:r.reason,"onUpdate:modelValue":function(e){return r.reason=e}},null)]),s("div",{class:x["btn-group"]},[s(d,{type:"primary",block:!0,round:!0,onClick:function(){return r.setReturnShop()}},{default:function(){return[l("确定")]}})])]}}),s(h,{show:this.kmsShow,"onUpdate:show":function(e){return r.kmsShow=e},title:"填写退货快递单号"},{default:function(){return[s(y,{modelValue:r.returnOrderSn,"onUpdate:modelValue":function(e){return r.returnOrderSn=e},class:[x.field],placeholder:"请输入退货快递单号"},null),s("div",{class:x["btn-group"]},[s(d,{type:"primary",block:!0,round:!0,onClick:function(){return r.setReturnApplySn()}},{default:function(){return[l("确定")]}})])]}})])}}))}}}))}();