1 |
- !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<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,a,u,i){try{var o=e[u](i),s=o.value}catch(c){return void r(c)}o.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,u){var i=e.apply(t,r);function o(e){n(i,a,u,o,s,"next",e)}function s(e){n(i,a,u,o,s,"throw",e)}o(void 0)}))}}System.register(["./index-legacy.fba2875c.js","./index-legacy.e7460ea1.js","./index-legacy.e1f7a34d.js","./index-legacy.7dcec7b3.js","./index-legacy.f231f1c5.js","./index-legacy.8921f068.js","./index-legacy.a7012d0a.js","./index-legacy.edb65d0c.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./item-legacy.ce96b002.js","./index-legacy.40eca993.js","./use-height-legacy.233a2ec8.js","./use-id-legacy.db87b112.js","./use-tab-status-legacy.8752ccde.js","./use-refs-legacy.2affcb61.js","./index-legacy.d92f7da7.js","./cart-legacy.df78b0a7.js"],(function(e){"use strict";var r,n,u,i,o,s,c,l,d,f,p,m,h,g,v,y,b,w,x,S,j;return{setters:[function(e){r=e.d,n=e.w,u=e.g,i=e.T,o=e.D,s=e.j,c=e.F,l=e.B,d=e.z,f=e.C,p=e.Z},function(e){m=e.C},function(e){h=e.A},function(e){g=e.C},function(e){v=e.C},function(e){y=e.F},function(e){b=e.L},function(){},function(){},function(e){w=e.T,x=e.a},function(e){S=e.s,j=e.I},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var O={0:"待处理",1:"退货中",2:"已完成",3:"已拒绝"};e("default",r({name:"after-sale",data:function(){return{active:"0",list:[],dataShow:!1,loading:!1,finished:!1,show:!1,kmsShow:!1,params:{pageNum:1,pageSize:20},returnGood:{},reason:"",returnOrderSn:"",returnGoodId:0}},watch:{active:function(){this.init(),this.getList()}},mounted:function(){this.getList()},methods:{init:function(){this.params.pageNum=1,this.finished=!1,this.list=[]},getList:function(){var e=this;return a(regeneratorRuntime.mark((function t(){var r,n,a,u,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log(e.loading,e.finished),!e.loading||!e.finished){t.next=3;break}return t.abrupt("return");case 3:if(e.loading=!0,"0"!==e.active){t.next=10;break}return t.next=7,e.getIsReturnOrderList();case 7:a=t.sent,t.next=13;break;case 10:return t.next=12,e.getReturnList();case 12:a=t.sent;case 13:if(a&&200===a.code&&a.data.list){if(u=a.data,Array.isArray(u.list)){for(i=[],o=0;o<u.list.length;o++)u.list[o].orderItemList?u.list[o].orderItemList.findIndex((function(e){return e.returnStatus<0}))>-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:S.shopOrder},[s(m,null,null),s(w,{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(x,{name:e.name,title:e.title},{default:function(){return[r.list.length?s(b,{loading:r.loading,finished:r.finished,finishedText:" ",class:[S.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(v,{class:S.cellGroup},{default:function(){return[s(j,{item:t},null),s(g,{center:!0},{default:function(){return s("div",{class:S.btnList},["0"===r.active&&t.returnStatus<0&&(3!=e.status||0==e.afterSale)?s(l,{size:"small",round:!0,type:"primary",onClick:function(){r.show=!0,r.setReturnParams(e,t)}},{default:function(){return[d("退货申请")]}}):null,t.returnStatus>=0?s("div",null,[O[t.returnStatus]]):null])}})]}})})):s(v,{class:S.cellGroup},{default:function(){return[s(g,{title:e.createTime,titleClass:S.payTime,value:O[e.status]},null),s(j,{item:e},null),s(g,{center:!0},{default:function(){return s("div",{class:S.btnList},[1!==e.status||e.deliverySn?null:s(l,{size:"small",round:!0,onClick:function(){r.returnGoodId=e.id,r.kmsShow=!0}},{default:function(){return[d("填写退货快递单号")]}}),e.status<=1?s(l,{size:"small",round:!0,type:"primary",onClick:function(){r.returnGoodId=e.id,r.deleteReturnApply()}},{default:function(){return[d("撤销申请")]}}):null,2===e.status?s("div",{class:S.returnDes},[d("该商品金额已于 "),e.handleTime," ",d("原路退还")]):3===e.status?s("div",{class:S.returnDes},[d("拒绝原因: "),e.handleNote]):null])}})]}})])}))]}}):s(f,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无数据"},null)]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!p(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:[S.field],placeholder:"请输入退货原因",type:"textarea",rows:3,modelValue:r.reason,"onUpdate:modelValue":function(e){return r.reason=e}},null)]),s("div",{class:S["btn-group"]},[s(l,{type:"primary",block:!0,round:!0,onClick:function(){return r.setReturnShop()}},{default:function(){return[d("确定")]}})])]}}),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:[S.field],placeholder:"请输入退货快递单号"},null),s("div",{class:S["btn-group"]},[s(l,{type:"primary",block:!0,round:!0,onClick:function(){return r.setReturnApplySn()}},{default:function(){return[d("确定")]}})])]}})])}}))}}}))}();
|