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.fba2875c.js","./index-legacy.e7460ea1.js","./index-legacy.7dcec7b3.js","./index-legacy.f231f1c5.js","./index-legacy.a7012d0a.js","./index-legacy.edb65d0c.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./item-legacy.ce96b002.js","./shop-mall-legacy.73aea14c.js","./cart-legacy.df78b0a7.js","./hooks-legacy.148eb332.js","./index-legacy.40eca993.js","./use-height-legacy.233a2ec8.js","./use-tab-status-legacy.8752ccde.js","./use-id-legacy.db87b112.js","./use-refs-legacy.2affcb61.js","./index-legacy.d92f7da7.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,w;return{setters:[function(e){n=e.d,r=e.j,a=e.z,o=e.by,c=e.F,u=e.B,s=e.w,l=e.D,f=e.C,d=e.Z},function(e){p=e.C},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){w=e.u},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var C=n({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,i=e.onPayOrder,s=e.onConfirmReceipt,l=e.onAginOrder;return function(){return r(m,{center:!0},{title:function(){return r("div",{class:b.orderPrice},[r("div",null,[a("订单金额"),r("span",{class:b.price,style:{paddingLeft:"5px"}},[r("i",null,[a("¥ ")]),o(t.payAmount)])]),!!t.couponAmount&&r("div",{class:b.coupon},[a("优惠券: -¥ "),o(t.couponAmount)])])},default:function(){return r("div",{class:b.btnList},[0===t.status||6===t.status?r(c,null,[r(u,{size:"small",round:!0,onClick:function(e){e.stopPropagation(),n(t)}},{default:function(){return[a("取消订单")]}}),r(u,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),i(t)}},{default:function(){return[a("继续支付")]}})]):null,2===t.status?r(u,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),s(t)}},{default:function(){return[a("确认收货")]}}):null,3===t.status?r(c,null,[r("span",{class:b.confirmReceipt},[a("已确认收货")]),r(u,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),l(t)}},{default:function(){return[a("再来一单")]}})]):null])}})}}});function P(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!d(e)}e("default",n({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(){w("订单")},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,s.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,l.confirm({title:"提示",message:"确认取消订单?",confirmButtonText:"取消订单",confirmButtonColor:"var(--van-primary)"});case 2:if("confirm"!==n.sent){n.next=10;break}return n.next=6,s.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,s.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,l.confirm({title:"提示",message:"确认收货?",confirmButtonText:"收货",confirmButtonColor:"var(--van-primary)"});case 2:if("confirm"!==n.sent){n.next=8;break}return n.next=6,s.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 r("div",{class:b.shopOrder},[r(p,{ref:"colHeader",class:"header",rightText:"售后服务",onClickRight:this.onClickRight},null),r(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 r(v,{name:e.name,title:e.title},{default:function(){return[t.active===e.name&&t.dataShow?r(h,{loading:t.loading,finished:t.finished,finishedText:" ",class:[b.goodsList],onLoad:t.getList},P(n=t.list.map((function(e){return r(c,null,[r(g,{class:b.cellGroup,onClick:function(){t.$router.push({path:"/shopOrderDetail",query:{id:e.id}})}},{default:function(){return[r(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 r(O,{item:e},null)})):null,r(C,{item:e,onCancelOrder:t.cancelOrder,onPayOrder:t.payOrder,onConfirmReceipt:t.onConfirmReceipt,onAginOrder:t.onAginOrder},null)]}})])})))?n:{default:function(){return[n]}}):r(f,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无订单"},null)]}})})))?e:{default:function(){return[e]}})])}}))}}}))}();
|