webpackJsonp([85],{"0OJD":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s("Dd8w"),n=s.n(r),a=s("Xxa5"),i=s.n(a),o=s("exGp"),u=s.n(o),l=s("NYxO"),c=s("PJh5"),d=s.n(c),m={data:function(){return{loading:!1,navTitle:"",pagePermission:[],carType:{0:"公交/地铁",1:"出租车"},statusType:{1:"退款申请中",2:"同意退款",3:"拒绝退款"},subForm:{id:0},dialogRefund:!1,refundMoney:"",lockRefund:!1}},created:function(){var e=this;return u()(i.a.mark(function t(){var s,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.$route.query.id,t.next=3,e.getDetail(s);case 3:r=1===e.subForm.is_add?"ShopBellRefund":"ShopRefund",e.routesItem.routes.map(function(t){"/shop"===t.path&&t.children.map(function(t){t.name===r&&(e.pagePermission=t.meta.pagePermission[0].auth)})});case 5:case"end":return t.stop()}},t,e)}))()},computed:n()({},Object(l.d)({routesItem:function(e){return e.routes}})),methods:{getDetail:function(e){var t=this;return u()(i.a.mark(function s(){var r,n,a;return i.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,t.$api.shop.refundOrderInfo({id:e});case 2:if(r=s.sent,n=r.code,a=r.data,200===n){s.next=7;break}return s.abrupt("return");case 7:t.subForm=a;case 8:case"end":return s.stop()}},s,t)}))()},showRefundDialog:function(){var e=this.subForm.apply_price;this.refundTotalMoney=e,this.refundMoney=e,this.dialogRefund=!0},toPassRefund:function(){var e=this;return u()(i.a.mark(function t(){var s,r,n,a,o,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.lockRefund){t.next=2;break}return t.abrupt("return");case 2:if(s=e.subForm,r=s.id,n=s.apply_price,a=e.refundMoney,o={id:r,price:a,text:""},!(0===n&&0===a||a>0&&a<=n&&/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(a))){t.next=21;break}return t.next=9,e.$api.shop.passRefund(o);case 9:if(u=t.sent,200===u.code){t.next=13;break}return t.abrupt("return");case 13:return e.$message.success(e.$t("tips.successSub")),e.dialogRefund=!1,e.refundMoney="",t.next=18,e.getDetail(r);case 18:e.lockRefund=!1,t.next=22;break;case 21:e.$message.error("请核对金额再提交!");case 22:case"end":return t.stop()}},t,e)}))()},toRefuse:function(){var e=this;this.$confirm(this.$t("tips.confirmNoRefund"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){e.refuseRefund()}).catch(function(){})},refuseRefund:function(){var e=this;return u()(i.a.mark(function t(){var s,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.subForm.id,t.next=3,e.$api.shop.noPassRefund({id:s,text:""});case 3:if(r=t.sent,200===r.code){t.next=7;break}return t.abrupt("return");case 7:return e.$message.success(e.$t("tips.successOper")),t.next=10,e.getDetail(s);case 10:case"end":return t.stop()}},t,e)}))()}},watch:{$route:function(e){var t=this;return u()(i.a.mark(function s(){var r,n;return i.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=e.query.id,1*(n=void 0===r?0:r)!==t.subForm.id&&t.getDetail(n);case 2:case"end":return s.stop()}},s,t)}))()}},filters:{handleTime:function(e,t){return 1===t?d()(1e3*e).format("YYYY-MM-DD"):2===t?d()(1e3*e).format("HH:mm:ss"):d()(1e3*e).format("YYYY-MM-DD HH:mm:ss")}}},f={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"lb-shop-order-edit"},[s("top-nav",{attrs:{isBack:!0}}),e._v(" "),s("div",{staticClass:"page-main"},[s("lb-tips",{attrs:{isIcon:!1}},[s("div",{staticClass:"flex-y-center"},[e._v("\n "+e._s(e.statusType[e.subForm.status])+"\n "),2===e.subForm.status?s("div",{staticClass:"flex-y-center"},[e._v("\n ,退款金额:¥"+e._s(e.subForm.refund_price)+"\n "),e.subForm.car_price?s("div",{staticClass:"ml-md"},[e._v("\n 含车费:¥"+e._s(e.subForm.car_price)+"\n ")]):e._e(),e._v(" "),1*e.subForm.material_price>0?s("div",{staticClass:"ml-md"},[e._v("\n 含物料费:¥"+e._s(e.subForm.material_price)+"\n ")]):e._e()]):e._e()])]),e._v(" "),s("el-form",{attrs:{model:e.subForm,"label-width":"130px",size:"mini"},nativeOn:{submit:function(e){e.preventDefault()}}},[s("lb-classify-title",{attrs:{title:"用户信息"}}),e._v(" "),s("el-form-item",{attrs:{label:"用户ID:"}},[s("div",[e._v(e._s(e.subForm.user_id))])]),e._v(" "),s("el-form-item",{attrs:{label:"姓名:"}},[s("div",[e._v(e._s(e.subForm.address_info.user_name))])]),e._v(" "),s("el-form-item",{attrs:{label:"手机号:"}},[s("div",[e._v(e._s(e.subForm.address_info.mobile))])]),e._v(" "),e.subForm.is_add?e._e():s("el-form-item",{attrs:{label:"车费详情:"}},[s("div",{staticClass:"flex-y-center"},[e._v("\n "+e._s(e.carType[e.subForm.car_type])+"\n "),1==e.subForm.car_type?s("div",{staticClass:"ml-md"},[e._v("\n 全程"+e._s(e.subForm.distance)+",车费¥"+e._s(e.subForm.pay_car_price)+"\n ")]):e._e()])]),e._v(" "),s("el-form-item",{attrs:{label:"服务地址:"}},[s("div",[e._v("\n "+e._s(""+e.subForm.address_info.address+e.subForm.address_info.address_info)+"\n ")])]),e._v(" "),s("lb-classify-title",{attrs:{title:e.$t("action.attendantName")+"信息"}}),e._v(" "),s("el-form-item",{attrs:{label:e.$t("action.attendantName")+":"}},[s("div",[e._v(e._s(e.subForm.coach_info.coach_name))])]),e._v(" "),s("el-form-item",{attrs:{label:e.$t("action.attendantName")+"头像:"}},[s("lb-cover",{attrs:{fileList:[{url:e.subForm.coach_info.work_img}],isToDel:!1,size:"small",type:"more",fileSize:1}})],1),e._v(" "),s("el-form-item",{attrs:{label:"联系电话:"}},[s("div",[e._v(e._s(e.subForm.coach_info.mobile))])]),e._v(" "),s("lb-classify-title",{attrs:{title:"订单信息"}}),e._v(" "),s("el-form-item",{attrs:{label:"付款订单号:"}},[s("div",[e._v(e._s(e.subForm.pay_order_code))])]),e._v(" "),s("el-form-item",{attrs:{label:"退款订单号:"}},[s("div",[e._v(e._s(e.subForm.order_code))])]),e._v(" "),e.subForm.out_refund_no?s("el-form-item",{attrs:{label:"微信退款订单号:"}},[s("div",[e._v(e._s(e.subForm.out_refund_no))])]):e._e(),e._v(" "),e.subForm.admin_id?s("el-form-item",{attrs:{label:"代理商:"}},[s("div",[e._v(e._s(e.subForm.admin_name))])]):e._e(),e._v(" "),s("el-form-item",{attrs:{label:"申请退款时间:"}},[s("div",[e._v(e._s(e.subForm.create_time))])]),e._v(" "),1!==e.subForm.status?s("el-form-item",{attrs:{label:"审核时间:"}},[s("div",[e._v(e._s(e.subForm.refund_time))])]):e._e(),e._v(" "),s("el-form-item",{attrs:{label:"退款原因:"}},[s("div",[e._v(e._s(e.subForm.text))])]),e._v(" "),e.subForm.imgs&&e.subForm.imgs.length>0?s("el-form-item",{attrs:{label:"上传图片:"}},[s("div",{staticClass:"flex-warp"},e._l(e.subForm.imgs,function(e,t){return s("div",{key:t,staticClass:"mr-md"},[s("lb-image",{attrs:{src:e}})],1)}),0)]):e._e(),e._v(" "),s("el-form-item",{directives:[{name:"show",rawName:"v-show",value:(e.pagePermission.includes("agreeRefund")||e.pagePermission.includes("rejectRefund"))&&1===e.subForm.status,expression:"\n (pagePermission.includes('agreeRefund') ||\n pagePermission.includes('rejectRefund')) &&\n subForm.status === 1\n "}],attrs:{label:"处理退款:"}},[s("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:1===e.subForm.is_add?"shopBellRefund-rejectRefund":"shopRefund-rejectRefund",expression:"\n subForm.is_add === 1\n ? `shopBellRefund-rejectRefund`\n : `shopRefund-rejectRefund`\n "}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:e.toRefuse}},[e._v(e._s(e.$t("action.rejectRefund")))]),e._v(" "),s("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:1===e.subForm.is_add?"shopBellRefund-agreeRefund":"shopRefund-agreeRefund",expression:"\n subForm.is_add === 1\n ? `shopBellRefund-agreeRefund`\n : `shopRefund-agreeRefund`\n "}],attrs:{size:"mini",plain:"",type:"success"},on:{click:e.showRefundDialog}},[e._v(e._s(e.$t("action.agreeRefund")))])],1)],1),e._v(" "),s("lb-classify-title",{attrs:{title:"退款服务"}}),e._v(" "),s("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.subForm.order_goods,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[s("el-table-column",{attrs:{prop:"goods_cover",label:"服务图片"},scopedSlots:e._u([{key:"default",fn:function(e){return[s("lb-image",{attrs:{src:e.row.goods_cover}})]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"goods_name",label:"服务名称"}}),e._v(" "),s("el-table-column",{attrs:{prop:"goods_price",label:"服务价格"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" ¥"+e._s(t.row.goods_price)+" ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"material_price",label:"物料费"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n ¥"+e._s(t.row.material_price)+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"time_long",label:"服务时长"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.time_long?t.row.time_long+"分钟":"")+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"num",label:"服务数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.num||1)+"\n ")]}}])})],1),e._v(" "),s("div",{staticClass:"space-lg mt-lg mb-lg"},[e._v("\n 合计数量:"+e._s(e.subForm.all_goods_num||1)+"\n ")]),e._v(" "),s("lb-button",{attrs:{type:"primary"},on:{click:function(t){return e.$router.back(-1)}}},[e._v(e._s(e.$t("action.back")))]),e._v(" "),s("el-dialog",{attrs:{title:"立即退款",visible:e.dialogRefund,width:"400px",center:""},on:{"update:visible":function(t){e.dialogRefund=t}}},[s("div",{staticClass:"refund-inner"},[s("lb-tips",{attrs:{isIcon:!1}},[e._v("请核对信息后输入需要退款的金额")]),e._v(" "),s("el-input",{staticStyle:{width:"100%"},attrs:{disabled:1*e.refundTotalMoney==0,placeholder:"请输入退款金额"},model:{value:e.refundMoney,callback:function(t){e.refundMoney=t},expression:"refundMoney"}}),e._v(" "),s("p",{staticClass:"mt-lg"},[e._v("\n 实际可退款金额\n "),s("span",{staticClass:"c-warning"},[e._v("¥"+e._s(e.refundTotalMoney))])]),e._v(" "),s("p",[e._v("退款金额不能大于可退款金额")])],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogRefund=!1}}},[e._v(e._s(e.$t("action.cancel")))]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.toPassRefund}},[e._v("确认退款")])],1)])],1)],1)},staticRenderFns:[]};var _=s("VU/8")(m,f,!1,function(e){s("7HLE")},"data-v-30edbc42",null);t.default=_.exports},"7HLE":function(e,t){}});