1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,i,a,o){try{var c=e[a](o),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function c(e){r(o,i,a,c,u,"next",e)}function u(e){r(o,i,a,c,u,"throw",e)}c(void 0)}))}}System.register(["./index-legacy.78c8492b.js","./index-legacy.f8641610.js","./index-legacy.fc510843.js","./index-legacy.c36297f9.js","./index-legacy.13f535d5.js","./index-legacy.4ddb0119.js","./index-legacy.00d337cc.js","./index-legacy.a8de4840.js","./item-legacy.0af8c942.js","./shop-mall-legacy.abf66ea2.js","./cart-legacy.2a6d84fa.js","./hooks-legacy.1d4168e3.js","./index-legacy.90f7f902.js","./use-height-legacy.be763bb2.js","./use-tab-status-legacy.5d29085f.js","./use-id-legacy.30c2e9af.js","./use-refs-legacy.e503281e.js","./index-legacy.c8b60294.js"],(function(e){"use strict";var n,r,a,o,c,u,s,l,f,d,p,m,g,h,y,v,b,O,j,x,C;return{setters:[function(e){n=e.C},function(e){r=e.d,a=e.i,o=e.A,c=e.by,u=e.F,s=e.B,l=e.e,f=e.D,d=e.C,p=e.$},function(e){m=e.C},function(e){g=e.C},function(e){h=e.L},function(){},function(){},function(e){y=e.T,v=e.a},function(e){b=e.s,O=e.I},function(e){j=e.o},function(e){x=e.c},function(e){C=e.u},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w=r({name:"AfterSaleBtns",props:{item:{type:Object,default:{}},onCancelOrder:{type:Function,default:function(e){}},onPayOrder:{type:Function,default:function(e){}},onConfirmReceipt:{type:Function,default:function(e){}},onAginOrder:{type:Function,default:function(e){}}},setup:function(e){var t=e.item,n=e.onCancelOrder,r=e.onPayOrder,i=e.onConfirmReceipt,l=e.onAginOrder;return function(){return a(m,{center:!0},{title:function(){return a("div",{class:b.orderPrice},[a("div",null,[o("订单金额"),a("span",{class:b.price,style:{paddingLeft:"5px"}},[a("i",null,[o("¥ ")]),c(t.payAmount)])]),!!t.couponAmount&&a("div",{class:b.coupon},[o("优惠券: -¥ "),c(t.couponAmount)])])},default:function(){return a("div",{class:b.btnList},[0===t.status||6===t.status?a(u,null,[a(s,{size:"small",round:!0,onClick:function(e){e.stopPropagation(),n(t)}},{default:function(){return[o("取消订单")]}}),a(s,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),r(t)}},{default:function(){return[o("继续支付")]}})]):null,2===t.status?a(s,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),i(t)}},{default:function(){return[o("确认收货")]}}):null,3===t.status?a(u,null,[a("span",{class:b.confirmReceipt},[o("已确认收货")]),a(s,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),l(t)}},{default:function(){return[o("再来一单")]}})]):null])}})}}});function P(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!p(e)}e("default",r({name:"shop-order",data:function(){return{active:0,list:[],dataShow:!0,loading:!1,finished:!1,params:{search:"",groupStatus:"APPLY",page:1,rows:20},page:{pageNum:1,pageSize:20}}},watch:{active:function(e){this.init(),this.getList()}},mounted:function(){C("订单")},methods:{init:function(){this.page.pageNum=1,this.finished=!1,this.list=[],this.dataShow=!0},getList:function(){var e=this;return i(regeneratorRuntime.mark((function n(){var r,i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.loading&&!e.finished){n.next=2;break}return n.abrupt("return");case 2:return e.loading=!0,n.prev=3,n.next=6,l.get("/api-mall-portal/order/list",{params:t(t({},e.page),{},{status:0===e.active?"0,6":1===e.active?"1,2":"3,4"})});case 6:r=n.sent,i=r.code,a=r.data,200===i&&a.list&&(e.page.pageNum+=1,e.list=[].concat(e.list,a.list)),e.list.length>=a.total&&(e.finished=!0),0===e.list.length&&(e.dataShow=!1),n.next=18;break;case 14:n.prev=14,n.t0=n.catch(3),e.finished=!0,e.dataShow=!1;case 18:e.loading=!1;case 19:case"end":return n.stop()}}),n,null,[[3,14]])})))()},onClickRight:function(){this.$router.push("/afterSale")},cancelOrder:function(e){var t=this;return i(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,f.confirm({title:"提示",message:"确认取消订单?",confirmButtonText:"取消订单",confirmButtonColor:"var(--van-primary)"});case 2:if("confirm"!==n.sent){n.next=10;break}return n.next=6,l.post("/api-mall-portal/order/cancelUserOrder",{params:{orderId:e.id}});case 6:r=n.sent,i=r.code,r.data,200===i&&(t.init(),t.getList());case 10:case"end":return n.stop()}}),n)})))()},payOrder:function(e){x.orderInfo=e,this.$router.push({path:"/cartConfirmAgin"})},onAginOrder:function(e){var t=this;return i(regeneratorRuntime.mark((function n(){var r,i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,l.post("/api-mall-portal/order/oneOrder",{params:{orderId:e.id}});case 3:r=n.sent,i=r.code,a=r.data,200===i&&(x.calcAmount=a.calcAmount,x.cartPromotionItemList=a.cartPromotionItemList,x.memberReceiveAddressList=a.memberReceiveAddressList,t.$router.push({path:"/cartConfirm"})),console.log(r),n.next=11;break;case 9:n.prev=9,n.t0=n.catch(0);case 11:case"end":return n.stop()}}),n,null,[[0,9]])})))()},onConfirmReceipt:function(e){var t=this;return i(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,f.confirm({title:"提示",message:"确认收货?",confirmButtonText:"收货",confirmButtonColor:"var(--van-primary)"});case 2:if("confirm"!==n.sent){n.next=8;break}return n.next=6,l.post("/api-mall-portal/order/confirmReceiveOrder",{params:{orderId:e.id}});case 6:200===n.sent.code&&(t.init(),t.getList());case 8:case"end":return n.stop()}}),n)})))()}},render:function(){var e,t=this;return a("div",{class:b.shopOrder},[a(n,{ref:"colHeader",class:"header",rightText:"售后服务",onClickRight:this.onClickRight},null),a(y,{active:this.active,"onUpdate:active":function(e){return t.active=e},color:"var(--van-primary)",lineWidth:28,animated:!0,swipeable:!0},P(e=[{name:0,title:"待支付"},{name:1,title:"待收货"},{name:2,title:"已完成"}].map((function(e){var n;return a(v,{name:e.name,title:e.title},{default:function(){return[t.active===e.name&&t.dataShow?a(h,{loading:t.loading,finished:t.finished,finishedText:" ",class:[b.goodsList],onLoad:t.getList},P(n=t.list.map((function(e){return a(u,null,[a(g,{class:b.cellGroup,onClick:function(){t.$router.push({path:"/shopOrderDetail",query:{id:e.id}})}},{default:function(){return[a(m,{title:e.createTime,titleClass:b.payTime,value:j[e.status],valueClass:[0,4,5,6].includes(e.status)?b.payStatus:b.paySuccess},null),e.orderItemList&&e.orderItemList.length?e.orderItemList.map((function(e){return a(O,{item:e},null)})):null,a(w,{item:e,onCancelOrder:t.cancelOrder,onPayOrder:t.payOrder,onConfirmReceipt:t.onConfirmReceipt,onAginOrder:t.onAginOrder},null)]}})])})))?n:{default:function(){return[n]}}):a(d,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无订单"},null)]}})})))?e:{default:function(){return[e]}})])}}))}}}))}();
|