require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["shop/pages/orders/orders"],{422:function(t,e,a){"use strict";(function(t,e){var n=a(4);a(30);n(a(25));var r=n(a(423));t.__webpack_require_UNI_MP_PLUGIN__=a,e(r.default)}).call(this,a(1)["default"],a(2)["createPage"])},423:function(t,e,a){"use strict";a.r(e);var n=a(424),r=a(426);for(var o in r)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return r[t]}))}(o);a(428);var u,i=a(41),s=Object(i["default"])(r["default"],n["render"],n["staticRenderFns"],!1,null,"071375b9",null,!1,n["components"],u);s.options.__file="shop/pages/orders/orders.vue",e["default"]=s.exports},424:function(t,e,a){"use strict";a.r(e);var n=a(425);a.d(e,"render",(function(){return n["render"]})),a.d(e,"staticRenderFns",(function(){return n["staticRenderFns"]})),a.d(e,"recyclableRender",(function(){return n["recyclableRender"]})),a.d(e,"components",(function(){return n["components"]}))},425:function(t,e,a){"use strict";var n;a.r(e),a.d(e,"render",(function(){return r})),a.d(e,"staticRenderFns",(function(){return u})),a.d(e,"recyclableRender",(function(){return o})),a.d(e,"components",(function(){return n}));var r=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__map(t.dataList,(function(e,a){var n=t.__get_orig(e),r=0===e.type&&5===e.status&&1===e.overdueStatus?((e.overdueFee||0)/100).toFixed(2):null,o=0===e.type&&5===e.status&&3===e.overdueStatus?((e.overdueFee||0)/100).toFixed(2):null,u=0!==e.type&&5===e.status&&1===e.overdueStatus?((e.overdueFee||0)/100).toFixed(2):null,i=0!==e.type&&5===e.status&&3===e.overdueStatus?((e.overdueFee||0)/100).toFixed(2):null,s=e.detailList?t.__map(e.detailList,(function(e,a){var n=t.__get_orig(e),r=((e.subtotal||0)/100).toFixed(2);return{$orig:n,g4:r}})):null,c=((e.estimatedAmount||0)/100).toFixed(2),d=((e.declaredFee||0)/100).toFixed(2);return{$orig:n,g0:r,g1:o,g2:u,g3:i,l0:s,g5:c,g6:d}}))),n=t.loading?null:!t.hasNext&&t.dataList.length,r=t.loading||n?null:!t.hasNext&&!t.dataList.length;t._isMounted||(t.e0=function(e,a){var n=arguments[arguments.length-1].currentTarget.dataset,r=n.eventParams||n["event-params"];a=r.item;t.activeTab=a.value}),t.$mp.data=Object.assign({},{$root:{l1:a,g7:n,g8:r}})},o=!1,u=[];r._withStripped=!0},426:function(t,e,a){"use strict";a.r(e);var n=a(427),r=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},427:function(t,e,a){"use strict";(function(t){var n=a(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a(34)),o=n(a(18)),u=n(a(36)),i=n(a(11)),s=a(37);n(a(193));function c(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function d(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?c(Object(a),!0).forEach((function(e){(0,i.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var l={computed:d({},(0,s.mapState)(["navHeight","statusbarHeight"])),data:function(){return{activeTab:-1,loading:!1,pageSize:10,currentPage:1,total:0,hasNext:!0,isLoadingMore:!1,currentOrder:null,filterTabs:[{label:"全部",value:-1},{label:"待核验",value:1},{label:"待配送",value:2},{label:"待收货",value:3},{label:"已完成",value:4},{label:"已取消",value:5}],dataList:[]}},watch:{activeTab:function(){this.getFirstPageData()}},onLoad:function(e){console.log(e),this.activeTab=-1,null!=e.status&&void 0!=e.status&&(this.activeTab=Number(e.status)),this.getFirstPageData();var a=this;t.$on("updateOrder",(function(t){console.log("监听到事件来自 update ,携带参数 msg 为:",t),1==t.delete?a.getFirstPageData():null!=t.info&&null!=t.info.orderId&&(console.log("监听到事件来自 update 01:",t),a.dataList.forEach((function(e,a){e.id==t.info.orderId&&(console.log("监听到事件来自 update 02:",t),e.status=t.info.orderStatus,e.commentStatus=t.info.commentStatus)})))}))},onShow:function(){this.loading=!1,this.currentOrder=null},onReachBottom:function(){this.getDataList()},methods:{hexiaoOrder:function(e){t.navigateTo({url:"/shop/pages/write-off/write-off"})},contactPhoneDo:function(e){null!=e&&""!=e&&t.makePhoneCall({phoneNumber:e})},getFirstPageData:function(){this.currentPage=0,this.hasNext=!0,this.total=0,this.dataList=[],this.getDataList()},getDataList:function(){var t=this;return(0,u.default)(r.default.mark((function e(){var a,n,u;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.loading&&t.hasNext){e.next=2;break}return e.abrupt("return");case 2:return t.loading=!0,t.currentPage=t.currentPage+1,1==t.currentPage&&(t.hasNext=!0,t.dataList=[]),a=t,n={},e.next=9,a.$u.api.shopOrderPage({capacity:10,model:{combinedStatus:-1==t.activeTab?"":t.activeTab},page:t.currentPage});case 9:n=e.sent,200===n.code&&n.data&&n.data.page===t.currentPage&&(n.data.records=n.data.records||[],(u=a.dataList).push.apply(u,(0,o.default)(n.data.records)),a.total=n.data.total,t.currentPage>=n.data.pageCount?a.hasNext=!1:a.hasNext=!0),t.loading=!1;case 12:case"end":return e.stop()}}),e)})))()},jumpOrderDetails:function(e){t.navigateTo({url:"/shop/pages/order-details/order-details?id="+e})}}};e.default=l}).call(this,a(2)["default"])},428:function(t,e,a){"use strict";a.r(e);var n=a(429),r=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},429:function(t,e,a){}},[[422,"common/runtime","common/vendor"]]]);
|