You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.1 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/OrderDetails/index"],{"1cb2":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(r("a34a")),o=r("2559"),a=r("8c38"),i=r("2f62"),u=r("0510");function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t,r,n,o,a,i){try{var u=e[a](i),s=u.value}catch(c){return void r(c)}u.done?t(s):Promise.resolve(s).then(n,o)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,u,"next",e)}function u(e){c(a,n,o,i,u,"throw",e)}i(void 0)}))}}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var y=function(){r.e("components/OrderGoods").then(function(){return resolve(r("52fa"))}.bind(null,r)).catch(r.oe)},h=function(){r.e("components/Payment").then(function(){return resolve(r("f012"))}.bind(null,r)).catch(r.oe)},m="OrderDetails",g={name:m,components:{OrderGoods:y,Payment:h},data:function(){return{offlinePayStatus:2,orderTypeName:"普通订单",orderTypeNameStatus:!0,offlineStatus:!0,id:"",orderInfo:{_status:{}},status:{},pay:!1,payType:["yue","weixin"],from:this.$deviceType,system_store:{},mapKay:"",mapShow:!1,isIntegral:!1}},computed:l({refundOrder:function(){return this.orderInfo.refund_status>0}},(0,i.mapGetters)(["userInfo"])),onShow:function(){this.id=this.$yroute.query.id,this.getDetail()},mounted:function(){this.id=this.$yroute.query.id},methods:{copyClipboard:a.copyClipboard,goGoodsReturn:function(e){this.$yrouter.push({path:"/pages/order/GoodsReturn/index",query:{id:e.orderId}})},goGroupRule:function(e){this.$yrouter.push({path:"/pages/activity/GroupRule/index",query:{id:e.pinkId}})},telPhone:function(t){e.makePhoneCall({phoneNumber:t,fail:function(){console.log("取消拨打")}})},showChang:function(e){this.$yrouter.push({path:"/pages/map/index",query:e})},goBack:function(){return"MyOrder"===this.name?void this.$yrouter.back():(console.log(this),void this.$yrouter.replace({path:"/pages/order/MyOrder/index"}))},cancelOrder:function(){var e=this;(0,u.cancelOrderHandle)(this.orderInfo.orderId).then((function(){setTimeout((function(){return e.goBack()}),300)})).catch((function(){e.getDetail()}))},takeOrder:function(){var e=this;(0,u.takeOrderHandle)(this.orderInfo.orderId).finally((function(){e.getDetail()}))},delOrder:function(){var e=this;(0,u.delOrderHandle)(this.orderInfo.orderId).then((function(){setTimeout((function(){return e.goBack()}),300)}))},setOfflinePayStatus:function(e){var t=this;t.offlinePayStatus=e,1===e&&!0===t.orderTypeNameStatus&&t.payType.push("offline")},getOrderStatus:function(){var e=this.orderInfo||{},t=e._status||{_type:0},r={},n=parseInt(t._type),o=e.deliveryType,a=e.seckillId?parseInt(e.seckillId):0,i=e.bargainId?parseInt(e.bargainId):0,u=e.combinationId?parseInt(e.combinationId):0;r={type:n,class_status:0},1==n&&u>0&&(r.type=6,r.class_status=1),2==n&&"express"==o&&(r.class_status=2),2==n&&(r.class_status=3),4!=n&&0!==n||(r.class_status=4),a||i||u||3!=n&&4!=n||(r.class_status=5),9==n&&(r.class_status=0,this.offlineStatus=!1),this.status=r},getDetail:function(){var t=this,r=this.id;r?(0,o.orderDetail)(r).then((function(e){t.orderInfo=e.data,t.getOrderStatus(),t.orderInfo.combinationId>0?(t.orderTypeName="拼团订单",t.orderTypeNameStatus=!1):t.orderInfo.bargainId>0?(t.orderTypeName="砍价订单",t.orderTypeNameStatus=!1):t.orderInfo.seckillId>0&&(t.orderTypeNa