1 |
- !function(){function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var u=null!=arguments[n]?arguments[n]:{};n%2?t(Object(u),!0).forEach((function(t){r(e,t,u[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):t(Object(u)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(u,t))}))}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e,r,n,u,a,i){try{var o=t[a](i),s=o.value}catch(c){return void r(c)}o.done?e(s):Promise.resolve(s).then(n,u)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(u,a){var i=t.apply(e,r);function o(t){n(i,u,a,o,s,"next",t)}function s(t){n(i,u,a,o,s,"throw",t)}o(void 0)}))}}System.register(["./index-legacy.7a891e5d.js","./index-legacy.81d44319.js","./index-legacy.4469a86c.js","./index-legacy.b8ec7a97.js","./index-legacy.b36679cf.js","./index-legacy.32821163.js","./index-legacy.c6620bc9.js","./index-legacy.c454c468.js","./index-legacy.2be96011.js","./index-legacy.39db0f1f.js","./item-legacy.cec8f316.js","./use-id-legacy.3c7752d9.js","./use-tab-status-legacy.14cb8f42.js","./use-refs-legacy.62944b2f.js","./index-legacy.a4068862.js","./cart-legacy.5af14022.js"],(function(t){"use strict";var r,n,a,i,o,s,c,l,d,p,f,m,h,g,v,y,b,x,w,S,j;return{setters:[function(t){r=t.d,n=t.x,a=t.g,i=t.T,o=t.D,s=t.j,c=t.F,l=t.B,d=t.z,p=t.C,f=t.Z},function(t){m=t.C},function(t){h=t.A},function(t){g=t.C},function(t){v=t.C},function(t){y=t.F},function(t){b=t.L},function(){},function(){},function(t){x=t.T,w=t.a},function(t){S=t.s,j=t.I},function(){},function(){},function(){},function(){},function(){}],execute:function(){var O={0:"待处理",1:"退货中",2:"已完成",3:"已拒绝"};t("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 t=this;return u(regeneratorRuntime.mark((function e(){var r,n,u,a,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(t.loading,t.finished),!t.loading||!t.finished){e.next=3;break}return e.abrupt("return");case 3:if(t.loading=!0,"0"!==t.active){e.next=10;break}return e.next=7,t.getIsReturnOrderList();case 7:u=e.sent,e.next=13;break;case 10:return e.next=12,t.getReturnList();case 12:u=e.sent;case 13:if(u&&200===u.code&&u.data.list){if(a=u.data,Array.isArray(a.list)){for(i=[],o=0;o<a.list.length;o++)a.list[o].orderItemList?a.list[o].orderItemList.findIndex((function(t){return t.returnStatus<0}))>-1&&i.push(a.list[o]):i.push(a.list[o]);t.list=t.list.concat(t.list,i)}t.params.pageNum=u.data.pageNum+1}t.finished=t.params.pageNum>=(null===(r=u)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.totalPage),t.loading=!1;case 16:case"end":return e.stop()}}),e)})))()},getIsReturnOrderList:function(){var t=this;return u(regeneratorRuntime.mark((function r(){var u;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:e(e({},t.params),{},{status:"1,2,3"})});case 3:return u=r.sent,r.abrupt("return",u);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 t=this;return u(regeneratorRuntime.mark((function r(){var u;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:e(e({},t.params),{},{status:"1"===t.active?"0,1":"2,3"})});case 3:return u=r.sent,r.abrupt("return",u);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(t,e){this.returnGood.memberUsername=a.user.data.username,this.returnGood.orderId=t.id,this.returnGood.orderSn=t.orderSn,this.returnGood.productAttr=e.productAttr,this.returnGood.productBrand=e.productBrand,this.returnGood.productCount=e.productQuantity,this.returnGood.productId=e.productId,this.returnGood.productName=e.productName,this.returnGood.productPic=e.productPic,this.returnGood.productPrice=e.productPrice,this.returnGood.productRealPrice=e.productPrice,this.returnGood.proofPics="",this.returnGood.returnName=t.receiverName,this.returnGood.returnPhone=t.receiverPhone,this.returnGood.orderItemId=e.id,console.log(this.returnGood)},setReturnShop:function(){var t=this;return u(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.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:e(e({},t.returnGood),{},{reason:t.reason})});case 6:200===r.sent.code&&(i({message:"退货申请成功",icon:"success"}),setTimeout((function(){t.show=!1,t.reason="",t.returnOrderSn="",t.active="1"}),500)),r.next=12;break;case 10:r.prev=10,r.t0=r.catch(3);case 12:t.returnGood={};case 13:case"end":return r.stop()}}),r,null,[[3,10]])})))()},setReturnApplySn:function(){var t=this;return u(regeneratorRuntime.mark((function e(){var r,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.returnOrderSn){e.next=3;break}return i("请填写退货快递单号"),e.abrupt("return");case 3:return e.prev=3,e.next=6,n.post("/api-mall-portal/returnApply/deliverySn",{data:{deliverySn:t.returnOrderSn,id:t.returnGoodId}});case 6:r=e.sent,u=r.code,r.data,200===u&&(t.returnOrderSn="",t.kmsShow=!1,t.init(),t.getList()),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(3);case 14:case"end":return e.stop()}}),e,null,[[3,12]])})))()},deleteReturnApply:function(){var t=this;o.confirm({title:"提示",message:"是否撤销退货申请?",confirmButtonText:"撤销",confirmButtonColor:"var(--van-primary)"}).then(u(regeneratorRuntime.mark((function e(){var r,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.post("/api-mall-portal/returnApply/delete/"+t.returnGoodId);case 3:r=e.sent,u=r.code,r.data,200===u&&(t.init(),t.getList()),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])}))))}},render:function(){var t,e,r=this;return s("div",{class:S.shopOrder},[s(m,null,null),s(x,{active:this.active,"onUpdate:active":function(t){return r.active=t},color:"var(--van-primary)",lineWidth:28,animated:!0,swipeable:!0},(e=t=[{name:"0",title:"全部"},{name:"1",title:"处理中"},{name:"2",title:"已处理"}].map((function(t){return s(w,{name:t.name,title:t.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===t.name&&r.list.map((function(t){return s(c,null,[t.orderItemList&&t.orderItemList.length?t.orderItemList.map((function(e){return s(v,{class:S.cellGroup},{default:function(){return[s(j,{item:e},null),s(g,{center:!0},{default:function(){return s("div",{class:S.btnList},["0"===r.active&&e.returnStatus<0&&(3!=t.status||0==t.afterSale)?s(l,{size:"small",round:!0,type:"primary",onClick:function(){r.show=!0,r.setReturnParams(t,e)}},{default:function(){return[d("退货申请")]}}):null,e.returnStatus>=0?s("div",null,[O[e.returnStatus]]):null])}})]}})})):s(v,{class:S.cellGroup},{default:function(){return[s(g,{title:t.createTime,titleClass:S.payTime,value:O[t.status]},null),s(j,{item:t},null),s(g,{center:!0},{default:function(){return s("div",{class:S.btnList},[1!==t.status||t.deliverySn?null:s(l,{size:"small",round:!0,onClick:function(){r.returnGoodId=t.id,r.kmsShow=!0}},{default:function(){return[d("填写退货快递单号")]}}),t.status<=1?s(l,{size:"small",round:!0,type:"primary",onClick:function(){r.returnGoodId=t.id,r.deleteReturnApply()}},{default:function(){return[d("撤销申请")]}}):null,2===t.status?s("div",{class:S.returnDes},[d("该商品金额已于 "),t.handleTime," ",d("原路退还")]):3===t.status?s("div",{class:S.returnDes},[d("拒绝原因: "),t.handleNote]):null])}})]}})])}))]}}):s(p,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无数据"},null)]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!f(e)?t:{default:function(){return[t]}})),s(h,{show:this.show,"onUpdate:show":function(t){return r.show=t},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(t){return r.reason=t}},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(t){return r.kmsShow=t},title:"填写退货快递单号"},{default:function(){return[s(y,{modelValue:r.returnOrderSn,"onUpdate:modelValue":function(t){return r.returnOrderSn=t},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("确定")]}})])]}})])}}))}}}))}();
|