(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/refund/refund"],{"00a9":function(t,e,i){"use strict";i.r(e);var o=i("5181"),n=i("c0c5");for(var s in n)"default"!==s&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("4ce9");var a,r=i("f0c5"),d=Object(r["a"])(n["default"],o["b"],o["c"],!1,null,"d0749796",null,!1,o["a"],a);e["default"]=d.exports},"4ce9":function(t,e,i){"use strict";var o=i("f376"),n=i.n(o);n.a},5181:function(t,e,i){"use strict";var o;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return o}));var n=function(){var t=this,e=t.$createElement;t._self._c},s=[]},b78a:function(t,e,i){"use strict";(function(t){i("2d0a");o(i("66fd"));var e=o(i("00a9"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},bfe7:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){i.e("components/page-component/app-order-goods-info/app-order-goods-info").then(function(){return resolve(i("a9f2"))}.bind(null,i)).catch(i.oe)},n=function(){Promise.all([i.e("common/vendor"),i.e("components/basic-component/app-upload-image/app-upload-image")]).then(function(){return resolve(i("86eb"))}.bind(null,i)).catch(i.oe)},s=function(){i.e("pages/order/components/app-select").then(function(){return resolve(i("f292"))}.bind(null,i)).catch(i.oe)},a={components:{"app-order-goods-info":o,"app-upload-image":n,"app-select":s},data:function(){return{refundDetail:{},maxNum:6,is_show:!1,form:{id:0,type:0,goods_status:"",cause:"",image_list:[],mobile:"",remark:"",refund_price:""},goodsStatus:{index:0,visible:!1,list:[]},refundList:{index:0,visible:!1,list:[]},refundCauseList:[],disabled:!1}},methods:{getRefundDetail:function(){var e=this;e.$showLoading(),e.$request({url:this.$api.order.apply_refund,data:{id:e.form.id}}).then((function(i){e.$hideLoading(),e.is_show=!0,0===i.code?(e.refundDetail=i.data.detail,e.goodsStatus.list=i.data.list.goods_status,e.refundList.list=i.data.list.refund_list.confirm_list,e.refundCauseList=i.data.list.refund_list):t.showModal({title:"",content:i.msg,showCancel:!1})})).catch((function(){e.$hideLoading()}))},formSubmit:function(){var e=this;if(e.form.goods_status||3!=e.form.type)if(e.form.cause)e.form.refund_price&&!(e.form.refund_price<0)||2==e.form.type?e.form.remark?e.form.mobile?this.$subscribe(this.refundDetail.template_message_list).then((function(t){e.submitAction()})).catch((function(t){e.submitAction()})):t.showModal({title:"",content:"请填写联系方式",showCancel:!1}):t.showModal({title:"",content:"请填写备注信息",showCancel:!1}):t.showModal({title:"",content:"请填写退款金额",showCancel:!1});else{var i=2==e.form.type?"请填写换货原因":"请选择退款原因";t.showModal({title:"",content:i,showCancel:!1})}else t.showModal({title:"",content:"请选择货物状态",showCancel:!1})},submitAction:function(){var e=this;if(!e.disabled){e.disabled=!0,t.showLoading({title:"提交中"});var i=2==e.form.type?0:e.form.refund_price;e.$request({url:e.$api.order.refund_submit,method:"post",data:{id:e.form.id,type:e.form.type,pic_list:JSON.stringify(e.form.image_list),refund_price:i,remark:this.form.remark,mobile:this.form.mobile,cause:this.form.cause,goods_status:this.form.goods_status}}).then((function(i){e.disabled=!1,t.hideLoading(),0===i.code?t.redirectTo({url:"/pages/order/refund/index"}):t.showModal({title:"",content:i.msg,showCancel:!1})})).catch((function(){e.disabled=!1,t.hideLoading()}))}},imageEvent:function(t){this.form.image_list=t.imageList},goodsStatusChange:function(t){t.is_modal_confirm||(this.goodsStatus.index!=t.index&&(this.form.cause=""),this.goodsStatus.index=t.index,this.form.goods_status=this.goodsStatus.list[this.goodsStatus.index],0==this.goodsStatus.index?this.refundList.list=this.refundCauseList.not_confirm_list:this.refundList.list=this.refundCauseList.confirm_list),this.goodsStatus.visible=!1},refundListChange:function(t){t.is_modal_confirm||(this.refundList.index=t.index,this.form.cause=this.refundList.list[this.refundList.index]),this.refundList.visible=!1},setPageTitle:function(){var e="订单售后";1==this.form.type?e="退货退款":2==this.form.type?e="换货":3==this.form.type&&(e="仅退款"),t.setNavigationBarTitle({title:e})},setVisible:function(t){this[t].visible=!0}},onLoad:function(t){this.$commonLoad.onload(t),this.form.id=t.id,this.form.type=t.type,this.getRefundDetail()},onReady:function(){this.setPageTitle()}};e.default=a}).call(this,i("543d")["default"])},c0c5:function(t,e,i){"use strict";i.r(e);var o=i("bfe7"),n=i.n(o);for(var s in o)"default"!==s&&function(t){i.d(e,t,(function(){return o[t]}))}(s);e["default"]=n.a},f376:function(t,e,i){}},[["b78a","common/runtime","common/vendor"]]]);