chunk-6edbed40.71e6049d.js 6.8 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6edbed40"],{6177:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"box"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.yes,expression:"yes"}],staticClass:"null-page"}),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[r("el-card",{staticClass:"box-card order-list"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("el-breadcrumb",{attrs:{separator:"/"}},[r("el-breadcrumb-item",{attrs:{to:{path:"/member/order_list"}}},[e._v("我的订单")]),r("el-breadcrumb-item",{attrs:{to:{path:"/member/order_detail?order_id="+e.orderId}}},[e._v("订单详情")]),r("el-breadcrumb-item",[e._v("退款")])],1)],1),r("div",{staticClass:"goods-list"},[r("table",[r("tr",[r("td",{attrs:{width:"62.5%"}},[e._v("商品")]),r("td",{attrs:{width:"12.5%"}},[e._v("数量")]),r("td",{attrs:{width:"12.5%"}},[e._v("金额")])])])]),r("div",{staticClass:"goods-list"},[r("table",e._l(e.refundData.order_goods_info,(function(t,a){return r("tr",{key:a},[r("td",{attrs:{width:"62.5%"}},[r("div",{staticClass:"goods-info"},[t.sku_image?r("div",{staticClass:"goods-info-left"},[r("router-link",{attrs:{to:{path:"/sku-"+t.sku_id},target:"_blank"}},[r("img",{staticClass:"goods-img",attrs:{src:e.$img(t.sku_image,{size:"mid"})},on:{error:function(r){t.sku_image=e.defaultGoodsImage}}})])],1):e._e(),r("div",{staticClass:"goods-info-right"},[r("router-link",{attrs:{to:{path:"/sku-"+t.sku_id},target:"_blank"}},[r("div",{staticClass:"goods-name"},[e._v(e._s(t.sku_name))])])],1)])]),r("td",{staticClass:"goods-num",attrs:{width:"12.5%"}},[e._v(e._s(t.num))]),r("td",{staticClass:"goods-money",attrs:{width:"12.5%"}},[e._v("¥"+e._s(t.goods_money))])])})),0)])]),r("div",{staticClass:"item-block"},[r("div",{staticClass:"block-text"},[e._v("退款类型")]),r("div",{staticClass:"pay-type-list"},[r("div",{staticClass:"pay-type-item",class:1==e.refundType?"active":"",on:{click:function(t){return e.selectRefundType(1)}}},[e._v("退款无需退货")]),2==e.refundData.refund_type.length?r("div",{staticClass:"pay-type-item",class:2==e.refundType?"active":"",on:{click:function(t){return e.selectRefundType(2)}}},[e._v("退货退款")]):e._e(),r("div",{staticClass:"clear"})])]),r("div",{staticClass:"item-block"},[r("div",{staticClass:"block-text"}),r("el-form",{ref:"form",staticClass:"refund-form",attrs:{"label-width":"80px"}},[r("el-form-item",{attrs:{label:"退款金额"}},[r("el-input",{attrs:{disabled:"",value:e.refundData.refund_money}})],1),r("el-form-item",{attrs:{label:"退款原因"}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.refundReason,callback:function(t){e.refundReason=t},expression:"refundReason"}},e._l(e.refundData.refund_reason_type,(function(e,t){return r("el-option",{key:t,attrs:{label:e,value:e}})})),1)],1),r("el-form-item",{attrs:{label:"退款说明"}},[r("el-input",{attrs:{maxlength:"140","show-word-limit":"",resize:"none",rows:"5",placeholder:"请输入退款说明(选填)",type:"textarea"},model:{value:e.refundRemark,callback:function(t){e.refundRemark=t},expression:"refundRemark"}})],1)],1)],1),r("div",{staticClass:"item-block"},[r("div",{staticClass:"order-submit"},[r("el-button",{staticClass:"el-button--primary",attrs:{type:"primary"},on:{click:e.submit}},[e._v("提交")])],1),r("div",{staticClass:"clear"})])],1)])},s=[],n=r("5530"),i=r("e585"),o=r("2f62"),d={name:"refund",components:{},data:function(){return{orderGoodsId:"",orderId:"",refundType:1,refundReason:"",refundRemark:"",isIphoneX:!1,refundData:{refund_type:[],order_goods_info:{sku_image:""}},isSub:!1,show_type:0,detail:{refund_action:[]},loading:!0,yes:!0}},created:function(){this.$route.query.order_goods_id&&(this.orderGoodsId=this.$route.query.order_goods_id),this.$route.query.order_id&&(this.orderId=this.$route.query.order_id),this.getRefundData()},computed:Object(n["a"])({},Object(o["b"])(["defaultGoodsImage"])),mounted:function(){var e=this;setTimeout((function(){e.yes=!1}),300)},methods:{selectRefundType:function(e){this.refundType=e},getRefundData:function(){var e=this;Object(i["i"])({order_goods_ids:this.orderGoodsId}).then((function(t){var r=t.code,a=(t.message,t.data);r>=0?e.refundData=a:e.$message({message:"未获取到该订单项退款信息!",type:"warning",duration:2e3,onClose:function(){e.$router.push({path:"/member/activist"})}}),e.loading=!1})).catch((function(t){e.loading=!1,e.$message.error({message:t.message,duration:2e3,onClose:function(){e.$router.push({path:"/member/activist"})}})}))},submit:function(){var e=this;if(this.verify()){if(this.isSub)return;this.isSub=!0;var t={order_goods_ids:this.orderGoodsId,refund_type:this.refundType,refund_reason:this.refundReason,refund_remark:this.refundRemark};Object(i["g"])(t).then((function(t){var r=t.code,a=t.message;t.data;r>=0?e.$message({message:"申请成功!",type:"success",duration:2e3,onClose:function(){e.$router.push({path:"/member/activist"})}}):(e.isSub=!1,e.$message({message:a,type:"warning"}))})).catch((function(t){e.$message.error({message:t.message,duration:2e3,onClose:function(){e.$router.push({path:"/member/activist"})}})}))}},verify:function(){return""!=this.refundReason||(this.$message({message:"请选择退款原因",type:"warning"}),!1)}}},u=d,c=(r("9921"),r("2877")),l=Object(c["a"])(u,a,s,!1,null,"5316db54",null);t["default"]=l.exports},9059:function(e,t,r){},9921:function(e,t,r){"use strict";var a=r("9059"),s=r.n(a);s.a},e585:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"i",(function(){return n})),r.d(t,"g",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"e",(function(){return d})),r.d(t,"a",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return f})),r.d(t,"j",(function(){return m}));var a=r("751a");function s(e){return Object(a["a"])({url:"/api/orderrefund/refundData",data:e,forceLogin:!0})}function n(e){return Object(a["a"])({url:"/api/orderrefund/refundDataBatch",data:e,forceLogin:!0})}function i(e){return Object(a["a"])({url:"/api/orderrefund/refund",data:e,forceLogin:!0})}function o(e){return Object(a["a"])({url:"/api/orderrefund/detail",data:e,forceLogin:!0})}function d(e){return Object(a["a"])({url:"/api/orderrefund/delivery",data:e,forceLogin:!0})}function u(e){return Object(a["a"])({url:"/api/orderrefund/cancel",data:e,forceLogin:!0})}function c(e){return Object(a["a"])({url:"/api/ordercomplain/detail",data:e,forceLogin:!0})}function l(e){return Object(a["a"])({url:"/api/ordercomplain/complain",data:e,forceLogin:!0})}function f(e){return Object(a["a"])({url:"/api/ordercomplain/cancel",data:e,forceLogin:!0})}function m(e){return Object(a["a"])({url:"/api/orderrefund/lists",data:e,forceLogin:!0})}}}]);
  2. //# sourceMappingURL=chunk-6edbed40.71e6049d.js.map