require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/returns_and_refunds/index"],{"10fa":function(e,t,r){"use strict";var n=r("9d2b"),s=r.n(n);s.a},"47b7":function(e,t,r){"use strict";(function(e){var n=r("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=r("9ecc"),i=r("28e0"),o=(r("cef1"),r("8f59")),u=r("0cce"),d=(n(r("ac21")),getApp()),a={data:function(){return{orderInfo:{},theme:d.globalData.theme,expressAll:[],expressIndex:0,telephone:"",trackingNumber:"",refundOrderNo:"",returnGoodsType:1,merAddress:null}},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(e){if(this.$set(this,"orderInfo",JSON.parse(this.$Cache.get("productInfo"))),!e.refundOrderNo)return this.$util.Tips({title:"缺少退款单id,无法退回商品"},{tab:3,url:1});this.refundOrderNo=e.refundOrderNo,this.returnGoodsType=e.returnGoodsType?Number(e.returnGoodsType):1,1===this.returnGoodsType?this.$Cache.get("expressListAll")?this.expressAll=JSON.parse(this.$Cache.get("expressListAll")):this.getExpressAll():this.getMerAddress()},onReady:function(){},methods:{copy:function(t){e.setClipboardData({data:t})},getExpressAll:function(){var e=this;(0,s.expressAllApi)().then((function(t){e.$set(e,"expressAll",t.data),e.$Cache.set("expressListAll",t.data)})).catch((function(t){return e.$util.Tips({title:t})}))},bindExpressChange:function(e){this.expressIndex=e.target.value},getMerAddress:function(){var e=this;(0,i.getMerAddressApi)(this.orderInfo.merId).then((function(t){e.$set(e,"merAddress",t.data)})).catch((function(t){return e.$util.Tips({title:t})}))},submitForm:(0,u.Debounce)((function(t){var r=this,n={},i=t.detail.value;return i.trackingNumber||1!==this.returnGoodsType?i.telephone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(i.telephone)?(e.showLoading({title:"保存中",mask:!0}),n=1===r.returnGoodsType?{refundOrderNo:r.refundOrderNo,telephone:i.telephone,trackingNumber:i.trackingNumber,expressName:r.expressAll[r.expressIndex].name}:{refundOrderNo:r.refundOrderNo,telephone:i.telephone},void(0,s.returningGoodsApi)(n).then((function(t){return e.hideLoading(),r.$util.Tips({title:"退回商品成功",icon:"success"},{tab:5,url:"/pages/goods/user_return_list/index?isT=1"})})).catch((function(t){return e.hideLoading(),r.$util.Tips({title:t})}))):r.$util.Tips({title:"请输入正确的手机号码"}):r.$util.Tips({title:"请填写联系电话"}):r.$util.Tips({title:"请填写物流单号"})}))}};t.default=a}).call(this,r("df3c")["default"])},"9d2b":function(e,t,r){},d3e2:function(e,t,r){"use strict";r.r(t);var n=r("df2a"),s=r("e6c2");for(var i in s)["default"].indexOf(i)<0&&function(e){r.d(t,e,(function(){return s[e]}))}(i);r("10fa");var o=r("828b"),u=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"54fcbb7c",null,!1,n["a"],void 0);t["default"]=u.exports},df2a:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=(this._self._c,1===this.returnGoodsType&&this.expressAll.length);this.$mp.data=Object.assign({},{$root:{g0:t}})},s=[]},e6c2:function(e,t,r){"use strict";r.r(t);var n=r("47b7"),s=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(i);t["default"]=s.a},edb0:function(e,t,r){"use strict";(function(e,t){var n=r("47a9");r("1d3c");n(r("3240"));var s=n(r("d3e2"));e.__webpack_require_UNI_MP_PLUGIN__=r,t(s.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])}},[["edb0","common/runtime","common/vendor"]]]);