pages-order-order.7ae05948.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-order"],{"191e":function(t,e,i){var a=i("4b12");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("4f06").default;o("3ac01e90",a,!0,{sourceMap:!1,shadowMode:!1})},3156:function(t,e,i){"use strict";var a=i("191e"),o=i.n(a);o.a},3628:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){return a}));var a={uniLoadMore:i("488d").default},o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"navbar"},t._l(t.navList,(function(e,a){return i("v-uni-view",{key:a,staticClass:"nav-item",class:{current:t.tabCurrentIndex===a},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabClick(a)}}},[t._v(t._s(e.text))])})),1),i("v-uni-swiper",{staticClass:"swiper-box",attrs:{current:t.tabCurrentIndex,duration:"300"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.changeTab.apply(void 0,arguments)}}},t._l(t.navList,(function(e,a){return i("v-uni-swiper-item",{key:a,staticClass:"tab-content"},[i("v-uni-scroll-view",{staticClass:"list-scroll-content",attrs:{"scroll-y":!0},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.loadData.apply(void 0,arguments)}}},[!0===e.loaded&&0===e.orderList.length?i("empty"):t._e(),t._l(e.orderList,(function(e,a){return i("v-uni-view",{key:a,staticClass:"order-item",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.goToOrderDetail(e)}}},[i("v-uni-view",{staticClass:"i-top b-b"},[i("v-uni-text",{staticClass:"time"},[t._v("订单编号:"+t._s(e.order_id))]),i("v-uni-text",{staticClass:"state",staticStyle:{color:"#901b21"}},[t._v(t._s(e._status._title))]),4===e.status?i("v-uni-text",{staticClass:"del-btn iconfont icondelete",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.deleteOrder(a)}}}):t._e()],1),e.cartInfo.length>1?i("v-uni-scroll-view",{staticClass:"goods-box",attrs:{"scroll-x":!0}},t._l(e.cartInfo,(function(t,e){return i("v-uni-view",{key:e,staticClass:"goods-item"},[i("v-uni-image",{staticClass:"goods-img",attrs:{src:t.productInfo.image,mode:"aspectFill"}})],1)})),1):t._e(),t._l(e.cartInfo,(function(a,o){return i("v-uni-view",{key:o,staticClass:"goods-box-single"},[i("v-uni-image",{staticClass:"goods-img",attrs:{src:a.productInfo.image,mode:"scaleToFill"}}),i("v-uni-view",{staticClass:"right"},[i("v-uni-view",{staticClass:"flex-start"},[i("v-uni-text",{staticClass:"title clamp2"},[t._v(t._s(a.productInfo.store_name))]),i("v-uni-text",{staticClass:"price",staticStyle:{"flex-grow":"1","text-align":"right",color:"#901B21","font-size":"30rpx","font-weight":"bold"}},[t._v(t._s(t._f("moneyNum")(a.productInfo.price)))])],1),i("v-uni-view",{staticClass:"row flex"},[1===e.shipping_type?i("v-uni-view",{staticClass:"row_title"},[t._v("送货上门")]):i("v-uni-view",{staticClass:"row_title"},[t._v("门店自提")]),i("v-uni-text",{staticClass:"attr-box"},[t._v("x "+t._s(a.cart_num))])],1)],1)],1)})),i("v-uni-view",{staticClass:"price-box"},[t._v("共"),i("v-uni-text",{staticClass:"num"},[t._v(t._s(e.cartInfo.length))]),t._v("件商品 邮费\n\t\t\t\t\t\t\n\t\t\t\t\t\t合计"),i("v-uni-text",{staticClass:"price"},[t._v(t._s(t.moneyNum(e.pay_price)))]),t._v("(含运费"),i("v-uni-text",{staticClass:"price"},[t._v(t._s(t.moneyNum(e.pay_postage)))]),t._v(")")],1),5!=e.status?i("v-uni-view",{staticClass:"action-box b-t"},["未支付"==e._status._title?i("v-uni-button",{staticClass:"action-btn",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.cancelOrder(e)}}},[t._v("取消订单")]):t._e(),"未支付"==e._status._title?i("v-uni-button",{staticClass:"action-btn recom",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.orderPay(e)}}},[t._v("立即支付")]):t._e(),"待评价"==e._status._title?i("v-uni-button",{staticClass:"action-btn"},[t._v("评价")]):t._e(),"待收货"==e._status._title?i("v-uni-button",{staticClass:"action-btn",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.orderTake(e,a)}}},[t._v("确认收货")]):t._e(),"未发货"==e._status._title?i("v-uni-button",{staticClass:"action-btn",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.orderRefund(e)}}},[t._v("申请退款")]):t._e()],1):t._e()],2)})),i("uni-load-more",{attrs:{status:e.loadingType}})],2)],1)})),1)],1)},n=[]},"4b12":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-93dad484],\n.content[data-v-93dad484]{background:#f8f6f6;height:100%}.swiper-box[data-v-93dad484]{height:calc(100% - 40px)}.list-scroll-content[data-v-93dad484]{height:100%}.navbar[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;height:40px;padding:0 5px;background:#fff;-webkit-box-shadow:0 1px 5px rgba(0,0,0,.06);box-shadow:0 1px 5px rgba(0,0,0,.06);position:relative;z-index:10}.navbar .nav-item[data-v-93dad484]{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;height:100%;font-size:15px;color:#303133;position:relative}.navbar .nav-item.current[data-v-93dad484]{color:#921a23}.navbar .nav-item.current[data-v-93dad484]:after{content:"";position:absolute;left:50%;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:44px;height:0;border-bottom:2px solid #921a23}.uni-swiper-item[data-v-93dad484]{height:auto}.order-item[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;padding-left:%?30?%;background:#fff;margin-top:%?16?%\n /* 多条商品 */\n /* 单条商品 */}.order-item .i-top[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;height:%?80?%;padding-right:%?30?%;font-size:%?28?%;color:#303133;position:relative}.order-item .i-top .time[data-v-93dad484]{-webkit-box-flex:1;-webkit-flex:1;flex:1}.order-item .i-top .state[data-v-93dad484]{color:#921a23}.order-item .i-top .del-btn[data-v-93dad484]{padding:%?10?% 0 %?10?% %?36?%;font-size:%?32?%;color:#909399;position:relative}.order-item .i-top .del-btn[data-v-93dad484]:after{content:"";width:0;height:%?30?%;border-left:1px solid #dcdfe6;position:absolute;left:%?20?%;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.order-item .goods-box[data-v-93dad484]{height:%?160?%;padding:%?20?% 0;white-space:nowrap}.order-item .goods-box .goods-item[data-v-93dad484]{width:%?120?%;height:%?120?%;display:inline-block;margin-right:%?24?%}.order-item .goods-box .goods-img[data-v-93dad484]{display:block;width:100%;height:100%}.order-item .goods-box-single[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;padding:%?20?% 0}.order-item .goods-box-single .goods-img[data-v-93dad484]{display:block;width:%?120?%;height:%?120?%}.order-item .goods-box-single .right[data-v-93dad484]{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;padding:0 %?30?% 0 %?24?%;overflow:hidden}.order-item .goods-box-single .right .row[data-v-93dad484]{margin-top:%?10?%;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.order-item .goods-box-single .right .row_title[data-v-93dad484]{display:inline-block;padding:%?7?% %?11?%;font-size:%?20?%;font-family:PingFang SC;font-weight:500;color:#fd5b23;background:#ffeae5;border-radius:%?5?%}.order-item .goods-box-single .right .title[data-v-93dad484]{font-size:%?30?%;color:#303133;line-height:1;width:80%}.order-item .goods-box-single .right .attr-box[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:%?26?%;color:#909399}.order-item .goods-box-single .right .price[data-v-93dad484]{display:inline;font-size:%?30?%;color:#303133}.order-item .goods-box-single .right .price[data-v-93dad484]:before{content:"¥";font-size:%?24?%}.order-item .price-box[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline;padding:%?20?% %?30?%;font-size:%?26?%;color:#909399}.order-item .price-box .num[data-v-93dad484]{margin:0 %?8?%;color:#303133}.order-item .price-box .price[data-v-93dad484]{font-size:%?32?%;color:#303133}.order-item .price-box .price[data-v-93dad484]:before{content:"¥";font-size:%?24?%;margin:0 %?2?% 0 %?8?%}.order-item .action-box[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-align:center;-webkit-align-items:center;align-items:center;height:%?100?%;position:relative;padding-right:%?30?%}.order-item .action-btn[data-v-93dad484]{width:%?160?%;height:%?60?%;margin:0;margin-left:%?24?%;padding:0;text-align:center;line-height:%?60?%;font-size:%?26?%;color:#303133;background:#fff;border-radius:100px}.order-item .action-btn[data-v-93dad484]:after{border-radius:100px}.order-item .action-btn.recom[data-v-93dad484]{color:#921a23}.order-item .action-btn.recom[data-v-93dad484]:after{border-color:#921a23}.order-item .action-btn.evaluate[data-v-93dad484]{color:#fd5b23}.order-item .action-btn.evaluate[data-v-93dad484]:after{border-color:#fd5b23}\n/* load-more */.uni-load-more[data-v-93dad484]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;height:%?80?%;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.uni-load-more__text[data-v-93dad484]{font-size:%?28?%;color:#999}.uni-load-more__img[data-v-93dad484]{height:24px;width:24px;margin-right:10px}.uni-load-more__img > uni-view[data-v-93dad484]{position:absolute}.uni-load-more__img > uni-view uni-view[data-v-93dad484]{width:6px;height:2px;border-top-left-radius:1px;border-bottom-left-radius:1px;background:#999;position:absolute;opacity:.2;-webkit-transform-origin:50%;transform-origin:50%;-webkit-animation:load-data-v-93dad484 1.56s ease infinite;animation:load-data-v-93dad484 1.56s ease infinite}.uni-load-more__img > uni-view uni-view[data-v-93dad484]:nth-child(1){-webkit-transform:rotate(90deg);transform:rotate(90deg);top:2px;left:9px}.uni-load-more__img > uni-view uni-view[data-v-93dad484]:nth-child(2){-webkit-transform:rotate(180deg);transform:rotate(180deg);top:11px;right:0}.uni-load-more__img > uni-view uni-view[data-v-93dad484]:nth-child(3){-webkit-transform:rotate(270deg);transform:rotate(270deg);bottom:2px;left:9px}.uni-load-more__img > uni-view uni-view[data-v-93dad484]:nth-child(4){top:11px;left:0}.load1[data-v-93dad484],\n.load2[data-v-93dad484],\n.load3[data-v-93dad484]{height:24px;width:24px}.load2[data-v-93dad484]{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.load3[data-v-93dad484]{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.load1 uni-view[data-v-93dad484]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.load2 uni-view[data-v-93dad484]:nth-child(1){-webkit-animation-delay:.13s;animation-delay:.13s}.load3 uni-view[data-v-93dad484]:nth-child(1){-webkit-animation-delay:.26s;animation-delay:.26s}.load1 uni-view[data-v-93dad484]:nth-child(2){-webkit-animation-delay:.39s;animation-delay:.39s}.load2 uni-view[data-v-93dad484]:nth-child(2){-webkit-animation-delay:.52s;animation-delay:.52s}.load3 uni-view[data-v-93dad484]:nth-child(2){-webkit-animation-delay:.65s;animation-delay:.65s}.load1 uni-view[data-v-93dad484]:nth-child(3){-webkit-animation-delay:.78s;animation-delay:.78s}.load2 uni-view[data-v-93dad484]:nth-child(3){-webkit-animation-delay:.91s;animation-delay:.91s}.load3 uni-view[data-v-93dad484]:nth-child(3){-webkit-animation-delay:1.04s;animation-delay:1.04s}.load1 uni-view[data-v-93dad484]:nth-child(4){-webkit-animation-delay:1.17s;animation-delay:1.17s}.load2 uni-view[data-v-93dad484]:nth-child(4){-webkit-animation-delay:1.3s;animation-delay:1.3s}.load3 uni-view[data-v-93dad484]:nth-child(4){-webkit-animation-delay:1.43s;animation-delay:1.43s}@-webkit-keyframes load-data-v-93dad484{0%{opacity:1}100%{opacity:.2}}body.?%PAGE?%[data-v-93dad484]{background:#f8f6f6}',""]),t.exports=e},"5c32":function(t,e,i){"use strict";var a=i("dbce");Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=n,e.couponsOrder=d,e.getCouponsList=r,e.order_comment=s,e.product=l,e.express_query=c,e.upload=u,e.orderList=f,e.orderDetail=p,e.orderCancel=b,e.orderDel=v,e.refund=m,e.refundReason=g,e.orderTake=h,e.orderPay=x,e.createOrderkey=w,e.computedOrderkey=y,e.GetAdminOrderList=k,e.aOrderRefund=_;var o=a(i("bc58"));function n(t){return(0,o.default)({url:"/api/order/confirm",method:"post",data:t})}function d(t,e){return(0,o.default)({url:"/api/coupons/order/"+e,method:"get",data:t})}function r(t,e){return(0,o.default)({url:"/api/coupons/user/"+e,method:"get",data:t})}function s(t){return(0,o.default)({url:"/api/order/comment",method:"post",data:t})}function l(t){return(0,o.default)({url:"/api/order/product",method:"post",data:t})}function c(t){return(0,o.default)({url:"/api/order/express_query",method:"get",data:t})}function u(t){return(0,o.upFilse)({url:"/api/upload/image",method:"post",data:t})}function f(t){return(0,o.default)({url:"/api/order/list",method:"get",data:t})}function p(t,e){return(0,o.default)({url:"/api/order/detail/"+e,method:"get",data:t})}function b(t){return(0,o.default)({url:"/api/order/cancel",method:"post",data:t})}function v(t){return(0,o.default)({url:"/api/order/del",method:"get",data:t})}function m(t){return(0,o.default)({url:"/api/order/refund/verify",method:"post",data:t})}function g(t){return(0,o.default)({url:"/api/order/refund/reason",method:"get",data:t})}function h(t){return(0,o.default)({url:"/api/order/take",method:"post",data:t})}function x(t){return(0,o.default)({url:"/api/order/pay",method:"post",data:t})}function w(t,e){return(0,o.default)({url:"/api/order/create/"+e,method:"post",data:t})}function y(t){return(0,o.default)({url:"/api/order/computed/"+t.orderkey,method:"post",data:t})}function k(t){return(0,o.default)({url:" /api/admin/order/list",method:"get",data:t})}function _(t){return(0,o.default)({url:"/api/admin/order/refund",method:"post",data:t})}},"5e28":function(t,e,i){"use strict";var a=i("4ea4");i("99af"),i("c740"),i("d81d"),i("a434"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(i("488d")),n=a(i("2cfa")),d=i("5c32"),r={components:{uniLoadMore:o.default,empty:n.default},filters:{moneyNum:function(t){return+t}},data:function(){return{tabCurrentIndex:0,navList:[{state:0,text:"待付款",loadingType:"more",orderList:[],page:1,limit:10},{state:1,text:"待发货",loadingType:"more",orderList:[],page:1,limit:10},{state:2,text:"待收货",loadingType:"more",orderList:[],page:1,limit:10},{state:3,text:"待评价",loadingType:"more",orderList:[],page:1,limit:10},{state:4,text:"已完成",loadingType:"more",orderList:[],page:1,limit:10}],navShopList:[{state:0,text:"全部",loadingType:"more",orderList:[],page:1,limit:10},{state:1,text:"待接单",loadingType:"more",orderList:[],page:1,limit:10},{state:2,text:"进行中",loadingType:"more",orderList:[],page:1,limit:10},{state:3,text:"待自提",loadingType:"more",orderList:[],page:1,limit:10},{state:4,text:"已完成",loadingType:"more",orderList:[],page:1,limit:10}],isUser:!0}},onLoad:function(t){console.log(t),this.isUser=t.isUser,console.log(this.isUser),this.tabCurrentIndex=+t.state,this.loadData()},onBackPress:function(t){return uni.switchTab({url:"/pages/user/user"}),!0},methods:{moneyNum:function(t){return+t},orderTake:function(t,e){var i=this;uni.showModal({title:"是否确认收货?",success:function(a){a.confirm?(0,d.orderTake)({uni:t.order_id}).then((function(t){i.navList[i.tabCurrentIndex].orderList.splice(e,1),uni.showToast({title:"收货成功"})})).catch((function(t){console.log(t)})):a.cancel&&console.log("取消")}})},goToOrderDetail:function(t){uni.navigateTo({url:"/pages/order/orderDetail?id="+t.order_id})},orderRefund:function(t){uni.navigateTo({url:"/pages/order/orderRefund?id="+t.order_id})},orderPay:function(t){uni.navigateTo({url:"/pages/money/pay?type=1&ordid="+t.order_id+"&money="+t.pay_price})},loadData:function(t){var e=this,i=this.tabCurrentIndex,a=this.navList[i],o=a.state;"tabChange"===t&&!0===a.loaded||"loading"!==a.loadingType&&"noMore"!==a.loadingType&&(a.loadingType="loading",(0,d.orderList)({type:o,page:a.page,limit:a.limit}).then((function(t){var i=t.data,o=i.map((function(t){var i=e.orderStateExp(t.status);return t.stateTip=i.stateTip,t.stateTipColor=i.stateTipColor,t}));a.orderList=a.orderList.concat(o),a.page++,a.limit!=i.length?(a.loadingType="noMore",uni.hideLoading(),e.$set(a,"loaded",!0)):a.loadingType="more"})).catch((function(t){console.log(t)})))},changeTab:function(t){this.tabCurrentIndex=t.target.current,this.loadData("tabChange")},tabClick:function(t){this.tabCurrentIndex=t},deleteOrder:function(t){var e=this;uni.showLoading({title:"请稍后"}),setTimeout((function(){e.navList[e.tabCurrentIndex].orderList.splice(t,1),uni.hideLoading()}),600)},cancelOrder:function(t){var e=this;uni.showModal({title:"订单取消",content:"是否取消订单?",success:function(i){if(i.confirm){uni.showLoading({title:"请稍后"}),(0,d.orderCancel)({id:t.order_id}).then((function(t){uni.showToast({title:"取消成功",duration:2e3,position:"top"})})).catch((function(t){console.log(t)}));var a=e.navList[e.tabCurrentIndex].orderList,o=a.findIndex((function(e){return e.id===t.id}));-1!==o&&a.splice(o,1),uni.hideLoading()}}})},orderStateExp:function(t){var e="",i="#fa436a";switch(+t){case 0:e="待付款";break;case 1:e="待发货";break;case 2:e="待收货";break;case 3:e="待评价";break;case 4:e="已完成",i="#901b21";break;case 9:e="订单已关闭",i="#909399";break}return{stateTip:e,stateTipColor:i}}}};e.default=r},"7c80":function(t,e,i){"use strict";i.r(e);var a=i("3628"),o=i("d23b");for(var n in o)"default"!==n&&function(t){i.d(e,t,(function(){return o[t]}))}(n);i("3156");var d,r=i("f0c5"),s=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"93dad484",null,!1,a["a"],d);e["default"]=s.exports},d23b:function(t,e,i){"use strict";i.r(e);var a=i("5e28"),o=i.n(a);for(var n in a)"default"!==n&&function(t){i.d(e,t,(function(){return a[t]}))}(n);e["default"]=o.a}}]);