refund-detail.js 4.4 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/refund-detail/refund-detail"],{"1b69":function(e,n,t){"use strict";(function(e){t("2d0a");r(t("66fd"));var n=r(t("6584"));function r(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("543d")["createPage"])},"326e":function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(t("a34a")),o=i(t("f93a"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,n,t,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void t(c)}s.done?n(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function s(e){a(i,r,o,s,u,"next",e)}function u(e){a(i,r,o,s,u,"throw",e)}s(void 0)}))}}var u=function(){t.e("components/page-component/app-order-banner/app-order-banner").then(function(){return resolve(t("c1c5"))}.bind(null,t)).catch(t.oe)},c=function(){t.e("components/page-component/app-order-goods-info/app-order-goods-info").then(function(){return resolve(t("a9f2"))}.bind(null,t)).catch(t.oe)},d=function(){t.e("components/page-component/app-order-express/app-order-express").then(function(){return resolve(t("77bf"))}.bind(null,t)).catch(t.oe)},f={components:{"app-order-banner":u,"app-order-goods-info":c,"app-order-express":d},data:function(){return{id:null,refundDetail:{},expressList:[],expressIndex:0,express:"",express_no:"",customer_name:"",index:0,is_show:!1,value:[0]}},methods:{getRefundDetail:function(){var e=this;e.$showLoading(),e.$request({url:e.$api.order.refund_detail,data:{id:e.id}}).then((function(n){e.$hideLoading(),e.is_show=!0,0===n.code&&(e.refundDetail=n.data.detail,e.expressList=n.data.express_list)})).catch((function(){e.$hideLoading()}))},formSubmit:function(){var n=this;return s(r.default.mark((function t(){var o;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(o=n,n.express){t.next=4;break}return e.showToast({title:"请选择快递公司",icon:"none"}),t.abrupt("return");case 4:if(n.express_no){t.next=7;break}return e.showToast({title:"请填写快递单号",icon:"none"}),t.abrupt("return");case 7:n.$subscribe(n.refundDetail.template_message_list).then((function(e){o.submitAction()})).catch((function(e){o.submitAction()}));case 8:case"end":return t.stop()}}),t)})))()},submitAction:function(){var n=this;try{this.$showLoading({title:"提交中"}),this.$request({url:this.$api.order.refund_send,method:"post",data:{id:this.id,express:this.express,customer_name:this.customer_name,express_no:this.express_no}}).then((function(t){n.$hideLoading(),0===t.code?n.getRefundDetail():e.showModal({title:"",content:t.msg,showCancel:!1})}))}catch(t){this.$hideLoading()}},copyText:function(){var e=this.refundDetail,n=e.refund_name,t=e.refund_mobile,r=e.refund_address;o.default.copyText("".concat(n," ").concat(t," ").concat(r))},cancel:function(){var n=this;e.showModal({title:"提示",content:"是否撤销申请?",success:function(t){t.confirm&&(e.showLoading({title:"撤销中"}),n.$request({url:n.$api.order.cancel_refund,data:{refund_id:n.refundDetail.id},method:"post"}).then((function(n){e.hideLoading();n.code,n.data;var t=n.msg;e.showModal({title:"",content:t,showCancel:!1,success:function(){var n=getCurrentPages();e.navigateBack({delta:n.length>3?3:1})}})})))}})},expressListChange:function(e){this.expressIndex=e.target.value,this.express=this.expressList[this.expressIndex].name},previewImage:function(n){var t=this.refundDetail.pic_list;e.previewImage({current:t[n],urls:t})}},onLoad:function(e){this.$commonLoad.onload(e),this.id=e.id,this.getRefundDetail()}};n.default=f}).call(this,t("543d")["default"])},5898:function(e,n,t){"use strict";var r;t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return r}));var o=function(){var e=this,n=e.$createElement;e._self._c},i=[]},6584:function(e,n,t){"use strict";t.r(n);var r=t("5898"),o=t("7425");for(var i in o)"default"!==i&&function(e){t.d(n,e,(function(){return o[e]}))}(i);t("7855");var a,s=t("f0c5"),u=Object(s["a"])(o["default"],r["b"],r["c"],!1,null,"2d7d9416",null,!1,r["a"],a);n["default"]=u.exports},7425:function(e,n,t){"use strict";t.r(n);var r=t("326e"),o=t.n(r);for(var i in r)"default"!==i&&function(e){t.d(n,e,(function(){return r[e]}))}(i);n["default"]=o.a},7855:function(e,n,t){"use strict";var r=t("865e"),o=t.n(r);o.a},"865e":function(e,n,t){}},[["1b69","common/runtime","common/vendor"]]]);