order.js
7.7 KB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/order"],{"1f92":function(e,t,n){"use strict";(function(e,t){var u=n("47a9");n("c5a3");u(n("3240"));var o=u(n("d548"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},3099:function(e,t,n){"use strict";var u=n("654c"),o=n.n(u);o.a},"654c":function(e,t,n){},"943a":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return u}));var u={uSticky:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-sticky/u-sticky")]).then(n.bind(null,"9b3f"))},uNavbar:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-navbar/u-navbar")]).then(n.bind(null,"47b7"))},uTabs:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-tabs/u-tabs")]).then(n.bind(null,"baf8"))},uTransition:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-transition/u-transition")]).then(n.bind(null,"d737"))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"cfe0"))},uniDataSelect:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(n.bind(null,"4171"))},"u-Textarea":function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u--textarea/u--textarea")]).then(n.bind(null,"c8150"))},uEmpty:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-empty/u-empty")]).then(n.bind(null,"0f76"))},uOverlay:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-overlay/u-overlay")]).then(n.bind(null,"4ef7"))},uModal:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-modal/u-modal")]).then(n.bind(null,"9eaa"))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"70a5"))},uRadio:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-radio/u-radio")]).then(n.bind(null,"f8ef"))}},o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.stateList.length),u=n>0?e.__map(e.showList,(function(t,n){var u=e.__get_orig(t),o=e.formatState(t.state);return{$orig:u,m0:o}})):null,o=n>0?e.showList.length:null;e._isMounted||(e.e0=function(t){e.show=!e.show},e.e1=function(t){e.orderType="mall"},e.e2=function(t){e.orderType="booking"},e.e3=function(t){return e.showRefund=t},e.e4=function(t){e.show=!1},e.e5=function(t){e.showRefund=!1},e.e6=function(t){e.showRefund=!1}),e.$mp.data=Object.assign({},{$root:{g0:n,l0:u,g1:o}})},r=[]},c65b:function(e,t,n){"use strict";n.r(t);var u=n("ccd2"),o=n.n(u);for(var r in u)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(r);t["default"]=o.a},ccd2:function(e,t,n){"use strict";(function(e){var u=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n("7eb4")),r=u(n("34cf")),a=u(n("ee10")),i=u(n("7ca3")),s=n("a5f6"),c=u(n("497b")),l=n("8f59");function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);t&&(u=u.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,u)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={components:{BookingOrderCard:function(){n.e("components/order/bookingOrderCard").then(function(){return resolve(n("e058"))}.bind(null,n)).catch(n.oe)}},mixins:[c.default],data:function(){return{show:!1,title:"确定允许退款吗,请选择退款比例",showRefund:!1,total:0,name:"实时订单",orderType:"booking",stateVlue:null,stateList:[],orderState:[],refundState:[],commentState:[],radiolist:[{name:"退全款",value:1},{name:"退款50%",value:2}],radiovalue:1,mallNavlist:[{name:"自提",badge:{value:2}},{name:"待配送",badge:{value:2}},{name:"退款",badge:{value:2}},{name:"已完成",badge:{isDot:!0}}],bookingNavlist:[{name:"实时订单",badge:{value:0}},{name:"退款售后",badge:{value:0}},{name:"订单评价",badge:{value:0}}],showList:[],mallList:[{title:"扫一扫",iconNane:"scan"}],employeeList:[{title:"扫一扫",iconNane:"scan"},{title:"张三",iconNane:"account"},{title:"18172289999",iconNane:"phone"},{title:"退出登录",iconNane:"share-square"}]}},computed:f(f({},(0,l.mapGetters)(["userInfo"])),{},{formatState:function(){var e=this;return function(t){var n="";return e.stateList.forEach((function(e){Number(e.value)===t&&(n=e.text)})),n}}}),onLoad:function(){var e=this;return(0,a.default)(o.default.mark((function t(){var n,u,a,i,c;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([(0,s.getOrderState)(),(0,s.getRefundState)(),(0,s.getCommentState)()]);case 2:n=t.sent,u=(0,r.default)(n,3),a=u[0],i=u[1],c=u[2],e.orderState=a,e.refundState=i,e.commentState=c,e.stateList=e.getStatus(e.orderState);case 11:case"end":return t.stop()}}),t)})))()},mounted:function(){this.getList()},methods:{selectMode:function(){},toggleOrder:function(e){this.name=e.name,this.getList()},getList:function(){var t=f(f({},this.query),{},{businessId:this.userInfo.businessId,state:this.stateVlue});"实时订单"===this.name?(this.getNewList(t),this.stateList=this.getStatus(this.orderState)):"退款售后"===this.name?(this.getRefundList(t),this.stateList=this.getStatus(this.refundState)):(this.getCommentList(t),this.stateList=this.getStatus(this.commentState)),e.stopPullDownRefresh()},getStatus:function(e){return e.map((function(e){return{value:e.dictValue,text:e.dictLabel}}))},getNewList:function(e){var t=this;return(0,a.default)(o.default.mark((function n(){var u,r,a;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,s.getOrderList)(e);case 2:u=n.sent,r=u.rows,a=u.total,t.showList=r,t.total=a,t.bookingNavlist[0].badge.value=a;case 8:case"end":return n.stop()}}),n)})))()},getRefundList:function(e){var t=this;return(0,a.default)(o.default.mark((function n(){var u,r,a;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,s.getAftersalesOrder)(e);case 2:u=n.sent,r=u.rows,a=u.total,t.showList=r,t.total=a,t.bookingNavlist[1].badge.value=a;case 8:case"end":return n.stop()}}),n)})))()},getCommentList:function(e){var t=this;return(0,a.default)(o.default.mark((function n(){var u,r,a;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,s.getCommentOrder)(e);case 2:u=n.sent,r=u.rows,a=u.total,t.showList=r,t.total=a,t.bookingNavlist[2].badge.value=a;case 8:case"end":return n.stop()}}),n)})))()},sendRefund:function(){var t=this;return(0,a.default)(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,s.businessLookRefund)(t.radiovalue);case 2:e.$u.toast("退款成功"),t.showRefund=!1;case 4:case"end":return n.stop()}}),n)})))()}}};t.default=m}).call(this,n("df3c")["default"])},d548:function(e,t,n){"use strict";n.r(t);var u=n("943a"),o=n("c65b");for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n("3099");var a=n("828b"),i=Object(a["a"])(o["default"],u["b"],u["c"],!1,null,"2a6e6f63",null,!1,u["a"],void 0);t["default"]=i.exports}},[["1f92","common/runtime","common/vendor"]]]);