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 u=null!=arguments[n]?arguments[n]:{};n%2?e(Object(u),!0).forEach((function(e){r(t,e,u[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(u)):e(Object(u)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(u,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,u,a,i){try{var o=e[a](i),s=o.value}catch(c){return void r(c)}o.done?t(s):Promise.resolve(s).then(n,u)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(u,a){var i=e.apply(t,r);function o(e){n(i,u,a,o,s,"next",e)}function s(e){n(i,u,a,o,s,"throw",e)}o(void 0)}))}}System.register(["./index-legacy.78c8492b.js","./index-legacy.f8641610.js","./index-legacy.40132992.js","./index-legacy.fc510843.js","./index-legacy.c36297f9.js","./index-legacy.8a3dede6.js","./index-legacy.13f535d5.js","./index-legacy.4ddb0119.js","./index-legacy.00d337cc.js","./index-legacy.a8de4840.js","./item-legacy.0af8c942.js","./index-legacy.90f7f902.js","./use-height-legacy.be763bb2.js","./use-id-legacy.30c2e9af.js","./use-tab-status-legacy.5d29085f.js","./use-refs-legacy.e503281e.js","./index-legacy.c8b60294.js","./cart-legacy.2a6d84fa.js"],(function(e){"use strict";var r,n,a,i,o,s,c,l,d,f,p,m,h,g,v,y,b,x,w,S,j;return{setters:[function(e){r=e.C},function(e){n=e.d,a=e.e,i=e.s,o=e.T,s=e.D,c=e.i,l=e.F,d=e.B,f=e.A,p=e.C,m=e.$},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){x=e.T,w=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",n({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 u(regeneratorRuntime.mark((function t(){var r,n,u,a,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:u=t.sent,t.next=13;break;case 10:return t.next=12,e.getReturnList();case 12:u=t.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(e){return e.returnStatus<0}))>-1&&i.push(a.list[o]):i.push(a.list[o]);e.list=e.list.concat(e.list,i)}e.params.pageNum=u.data.pageNum+1}e.finished=e.params.pageNum>=(null===(r=u)||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 u(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,a.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 u(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,a.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 u(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,a.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 u(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,a.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(u(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,a.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("确定")]}})])]}})])}}))}}}))}();
|