王总上门按摩后台代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

2 months ago
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._