|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-list"],{"297e":function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("UiRadioPicker",{attrs:{title:"请选择支付方式",show:t.show,options:t.options},on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirm.apply(void 0,arguments)}}})},o=[]},"2ba7":function(t,e,n){"use strict";n.r(e);var a=n("6897"),r=n("958e");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("fb8c");var i,s=n("f0c5"),u=Object(s["a"])(r["default"],a["b"],a["c"],!1,null,"c0772f42",null,!1,a["a"],i);e["default"]=u.exports},"336e":function(t,e,n){"use strict";n.r(e);var a=n("297e"),r=n("5bed");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var i,s=n("f0c5"),u=Object(s["a"])(r["default"],a["b"],a["c"],!1,null,"6c6d794e",null,!1,a["a"],i);e["default"]=u.exports},4136:function(t,e,n){"use strict";var a=n("4ea4");n("ac1f"),n("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var r=a(n("1da1")),o=a(n("1687")),i=n("c0d4"),s={components:{UiRadioPicker:o.default},props:{show:{type:Boolean,default:!1},order:{type:Object,default:function(){return{}}}},data:function(){return{options:[{label:"微信支付",value:"wxpay"},{label:"支付宝支付",value:"alipay"}]}},methods:{confirm:function(t){var e=this;return(0,r.default)(regeneratorRuntime.mark((function t(){var n,a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.order.orderId,t.next=3,(0,i.ApiPostWxPay)({orderId:n,payTypeEnum:"WXPAY"});case 3:a=t.sent,r=a.error,a.result,r?e.$Router.replace("/payFail?ordId=".concat(n)):e.$Router.replace("/paySuccess?ordId=".concat(n));case 7:case"end":return t.stop()}}),t)})))()},close:function(){this.$emit("update:show",!1)}}};e.default=s},"51b0":function(t,e,n){var a=n("5299");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var r=n("4f06").default;r("688f92e4",a,!0,{sourceMap:!1,shadowMode:!1})},5299:function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-page-body[data-v-c0772f42]{background:#f8f8f8;overflow:hidden}.tabs[data-v-c0772f42]{height:%?100?%;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 %?40?%;font-size:%?28?%;color:#666}.tabs__active[data-v-c0772f42]{color:#ff875b;position:relative}.tabs__active[data-v-c0772f42]::after{display:block;content:"";height:%?4?%;background:#ff875b;border-radius:%?4?%;position:absolute;bottom:%?-20?%;left:45%;width:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.orders[data-v-c0772f42]{background:#fff;padding:%?30?%;margin:%?20?% 0}.orders--title[data-v-c0772f42]{display:flex;justify-content:space-between;align-items:center}.orders--name[data-v-c0772f42]{font-size:%?32?%;color:#333;font-weight:700}.orders--status[data-v-c0772f42]{font-size:%?24?%;color:#999}.orders--status__warn[data-v-c0772f42]{color:#ff875b}.orders--total[data-v-c0772f42]{display:flex;align-items:center;justify-content:flex-end;margin-top:%?30?%}.orders--footer[data-v-c0772f42]{display:flex;justify-content:flex-end;align-items:center;margin-top:%?30?%}[data-v-c0772f42] .orders--footer .ui-btn{margin:0 0 0 %?20?%;width:%?180?%;padding:0}[data-v-c0772f42] .orders--total__amount,[data-v-c0772f42] .orders--total__pay{font-size:%?24?%}[data-v-c0772f42] .orders--total__amount uni-text,[data-v-c0772f42] .orders--total__pay uni-text{font-size:%?36?%;font-weight:700}[data-v-c0772f42] .orders--total__amount .ui-money--prefix,[data-v-c0772f42] .orders--total__pay .ui-money--prefix{font-size:%?24?%}[data-v-c0772f42] .orders--total__amount .ui-money--suffix,[data-v-c0772f42] .orders--total__pay .ui-money--suffix{font-size:%?24?%}[data-v-c0772f42] .orders--total__amount{color:#999}[data-v-c0772f42] .orders--total__amount uni-text{color:#999}[data-v-c0772f42] .orders--total__amount .ui-money--suffix{margin-right:%?20?%}body.?%PAGE?%[data-v-c0772f42]{background:#f8f8f8}',""]),t.exports=e},"595c":function(t,e,n){"use strict";var a=n("4ea4");n("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var r=a(n("1da1")),o=a(n("8832")),i=a(n("359f")),s=n("c0d4"),u=a(n("336e")),c=a(n("7932")),d=a(n("eb0d")),f=a(n("dd25")),l={components:{BsEmpty:o.default,UiButton:i.default,BsPay:u.default,UiGoodsInfo:c.default,UiGoodsInfoMax:d.default,UiMoney:f.default},data:function(){return{tabListData:[{key:"-1",name:"全部"},{key:"1",name:"待付款"},{key:"3",name:"待发货"},{key:"4",name:"待收货"}],currentTabKey:this.$Route.query.tab||"-1",orderListData:[],loadingStatus:"loading",pageIndex:1,pageSize:10,payShow:!1,payOrder:null}},onLoad:function(){this.getOrderList()},onReachBottom:function(){this.next()},methods:{changeTab:function(t){this.currentTabKey=t,this.pageIndex=1,this.orderListData=[],this.getOrderList()},getOrderList:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){var n,a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loadingStatus="loading",e.next=3,(0,s.ApiGetOrderList)({length:t.pageSize,pageIndex:t.pageIndex,orderStatus:t.currentTabKey>-1?t.currentTabKey:null});case 3:if(n=e.sent,a=n.error,r=n.result,!a){e.next=9;break}return uni.$u.toast(a.message),e.abrupt("return",!1);case 9:r.records.length<t.pageSize&&(t.loadingStatus="nomore"),t.orderListData=t.orderListData.concat(r.records);case 11:case"end":return e.stop()}}),e)})))()},next:function(){if("nomore"===this.loadingStatus)return!1;this.pageIndex++,this.getOrderList()},pay:function(t){this.payShow=!0,this.payOrder=t},receive:function(t){var e=this;return(0,r.default)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.$msb.confirm({content:"确认已经收到货了吗?",confirm:function(){var n=(0,r.default)(regeneratorRuntime.mark((function n(){var a,r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,s.ApiPutOrderReceive)({orderId:t.orderId});case 2:if(a=n.sent,r=a.error,!r){n.next=7;break}return uni.$toast(r.message),n.abrupt("return",!1);case 7:e.$Router.push("/orderSuccess");case 8:case"end":return n.stop()}}),n)})));function a(){return n.apply(this,arguments)}return a}()});case 1:case"end":return n.stop()}}),n)})))()}}};e.default=l},"5bed":function(t,e,n){"use strict";n.r(e);var a=n("4136"),r=n.n(a);for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=r.a},6897:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var a={uLoadmore:n("c153").default},r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",[a("v-uni-view",{staticClass:"tabs"},t._l(t.tabListData,(function(e){return a("v-uni-text",{key:e.key,class:e.key===t.currentTabKey&&"tabs__active",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.changeTab(e.key)}}},[t._v(t._s(e.name))])})),1),t.orderListData.length||"nomore"!==t.loadingStatus?t._e():a("BsEmpty",{attrs:{tips:"暂无订单记录呢~",icon:n("5151")}},[a("ui-button",{attrs:{slot:"btn",type:"line"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$Router.push("/")}},slot:"btn"},[t._v("去逛逛")])],1),t._l(t.orderListData,(function(e){return a("v-uni-view",{key:e.orderId,staticClass:"orders"},[a("v-uni-view",{staticClass:"orders--title"},[a("v-uni-text",{staticClass:"orders--name"},[t._v("官方自营")]),a("v-uni-text",{staticClass:"orders--status",class:[1,3].includes(e.orderStatus)&&"orders--status__warn"},[t._v(t._s(e.orderStatusDesc))])],1),t._l(e.products,(function(e){return a("UiGoodsInfoMax",{key:e.orderProductId,attrs:{data:e},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.$Router.push("/orderDetail?id="+e.orderId)}}})})),a("v-uni-view",{staticClass:"orders--total"},[a("v-uni-text",{staticClass:"orders--total__amount"},[t._v("合计")]),a("UiMoney",{staticClass:"orders--total__amount",attrs:{money:e.totalAmount,float:!0,prefix:!0,suffix:!0}}),a("v-uni-text",{staticClass:"orders--total__pay "},[t._v("应付")]),a("UiMoney",{staticClass:"orders--total__pay",attrs:{money:e.totalAmount,float:!0,prefix:!0,suffix:!0}})],1),a("v-uni-view",{staticClass:"orders--footer"},[1===e.orderStatus?a("UiButton",{attrs:{size:"min",type:"gradual"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.pay(e)}}},[t._v("去支付")]):t._e(),[2,3].includes(e.orderStatus)?a("UiButton",{attrs:{size:"min"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.$Router.push("/orderDetail?id="+e.orderId)}}},[t._v("查看详情")]):t._e(),e.orderStatus>=4?a("UiButton",{attrs:{size:"min"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.$Router.push("/logisitcsInfo?orderId="+e.orderId)}}},[t._v("查看物流")]):t._e(),4===e.orderStatus?a("UiButton",{attrs:{size:"min",type:"gradual"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.receive(e)}}},[t._v("确认收货")]):t._e()],1)],2)})),"loading"===t.loadingStatus?a("u-loadmore",{attrs:{status:t.loadingStatus}}):t._e(),a("BsPay",{attrs:{show:t.payShow,order:t.payOrder},on:{"update:show":function(e){arguments[0]=e=t.$handleEvent(e),t.payShow=e}}})],2)},o=[]},"958e":function(t,e,n){"use strict";n.r(e);var a=n("595c"),r=n.n(a);for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=r.a},fb8c:function(t,e,n){"use strict";var a=n("51b0"),r=n.n(a);r.a}}]); |