王总上门按摩后台代码
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 lines
12 KiB

webpackJsonp([12],{Urbt:function(e,t){},XjRr:function(e,t){},eak1:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),r=a.n(n),s=a("exGp"),i=a.n(s),o=a("PJh5"),l=a.n(o),c={data:function(){return{base_agent:[],statusOptions:[{label:"全部订单",value:0},{label:"退款申请中",value:1},{label:"同意退款",value:2},{label:"拒绝退款",value:3}],statusType:{1:"退款申请中",2:"同意退款",3:"拒绝退款"},loading:!1,searchForm:{page:1,limit:10,goods_name:"",order_code:"",status:0,admin_id:"",is_add:1},tableData:[],total:0,dialogRefund:!1,refundId:"",refundMoney:"",refundTotalMoney:"",lockTap:!1}},activated:function(){var e=this;return i()(r.a.mark(function t(){return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getBaseInfo();case 2:e.getTableDataList();case 3:case"end":return t.stop()}},t,e)}))()},methods:{getBaseInfo:function(){var e=this;return i()(r.a.mark(function t(){var a,n,s;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$api.agent.adminSelect();case 2:if(a=t.sent,n=a.code,s=a.data,200===n){t.next=7;break}return t.abrupt("return");case 7:e.base_agent=s;case 8:case"end":return t.stop()}},t,e)}))()},resetForm:function(e){this.$refs[e].resetFields(),this.getTableDataList(1)},handleSizeChange:function(e){this.searchForm.limit=e,this.handleCurrentChange(1)},handleCurrentChange:function(e){this.searchForm.page=e,this.getTableDataList()},getTableDataList:function(e){var t=this;return i()(r.a.mark(function a(){var n,s,i,o;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e&&(t.searchForm.page=1),t.tableData=[],t.loading=!0,n=t.searchForm,a.next=6,t.$api.shop.refundOrderList(n);case 6:if(s=a.sent,i=s.code,o=s.data,t.loading=!1,200===i){a.next=12;break}return a.abrupt("return");case 12:t.tableData=o.data,t.total=o.total;case 14:case"end":return a.stop()}},a,t)}))()},showRefundDialog:function(e,t){this.refundId=e,this.refundTotalMoney=t,this.refundMoney=t,this.dialogRefund=!0},toPassRefund:function(){var e=this;return i()(r.a.mark(function t(){var a,n,s,i,o,l;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.lockTap){t.next=2;break}return t.abrupt("return");case 2:if(a=e.refundId,n=e.refundMoney,s=e.refundTotalMoney,i={id:a,price:n,text:""},!(0===s&&0===n||n>0&&n<=s&&/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(n))){t.next=20;break}return e.lockTap=!0,t.next=9,e.$api.shop.passRefund(i);case 9:if(o=t.sent,l=o.code,e.lockTap=!1,200===l){t.next=14;break}return t.abrupt("return");case 14:e.$message.success(e.$t("tips.successSub")),e.dialogRefund=!1,e.refundMoney="",e.getTableDataList(),t.next=21;break;case 20:e.$message.error("请核对金额再提交!");case 21:case"end":return t.stop()}},t,e)}))()},toRefuse:function(e){var t=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(){t.refuseRefund(e)}).catch(function(){})},refuseRefund:function(e){var t=this;return i()(r.a.mark(function a(){var n;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.$api.shop.noPassRefund({id:e,text:""});case 2:if(n=a.sent,200===n.code){a.next=6;break}return a.abrupt("return");case 6:t.$message.success(t.$t("tips.successOper")),t.getTableDataList();case 8:case"end":return a.stop()}},a,t)}))()}},filters:{handleTime:function(e,t){return 1===t?l()(1e3*e).format("YYYY-MM-DD"):2===t?l()(1e3*e).format("HH:mm:ss"):l()(1e3*e).format("YYYY-MM-DD HH:mm:ss")}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lb-shop-refund"},[a("top-nav"),e._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"服务名称",prop:"goods_name"}},[a("el-input",{attrs:{placeholder:"请输入服务名称"},model:{value:e.searchForm.goods_name,callback:function(t){e.$set(e.searchForm,"goods_name",t)},expression:"searchForm.goods_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"订单号",prop:"order_code"}},[a("el-input",{attrs:{placeholder:"请输入付款/退款订单号"},model:{value:e.searchForm.order_code,callback:function(t){e.$set(e.searchForm,"order_code",t)},expression:"searchForm.order_code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"代理商",prop:"admin_id"}},[a("el-select",{attrs:{placeholder:"请选择代理商",filterable:"",clearable:""},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.admin_id,callback:function(t){e.$set(e.searchForm,"admin_id",t)},expression:"searchForm.admin_id"}},e._l(e.base_agent,function(e){return a("el-option",{key:e.id,attrs:{label:e.agent_name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},e._l(e.statusOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.getTableDataList(1)}}},[e._v(e._s(e.$t("action.search")))]),e._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(t){return e.resetForm("searchForm")}}},[e._v(e._s(e.$t("action.reset")))])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"goods_info_text",width:"300",label:"服务项目信息"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.order_goods,function(t,n){return a("div",{key:n,staticClass:"pb-sm"},[a("div",{staticClass:"flex-warp pt-md"},[a("lb-image",{staticClass:"avatar radius-5",attrs:{src:t.goods_cover}}),e._v(" "),a("div",{staticClass:"flex-1 f-caption c-caption ml-md",staticStyle:{width:"210px"}},[a("div",{staticClass:"flex-between"},[a("div",{staticClass:"f-paragraph c-title ellipsis",class:[{"max-300":t.refund_num>0}],staticStyle:{"line-height":"1.2","margin-bottom":"4px"}},[e._v("\n "+e._s(t.goods_name)+"\n ")]),e._v(" "),t.refund_num>0?a("div",{staticClass:"f-caption c-warning"},[e._v("\n 已退x"+e._s(t.refund_num)+"\n ")]):e._e()]),e._v(" "),1*t.time_long>0?a("div",{staticClass:"f-caption",staticStyle:{"line-height":"1.4"}},[e._v("\n 时长:"+e._s(t.time_long)+" 分钟\n ")]):e._e(),e._v(" "),1*t.material_price>0?a("div",{staticClass:"flex-y-center f-caption",staticStyle:{"line-height":"1.4"}},[e._v("\n 物料费:\n "),a("div",{staticClass:"c-warning"},[e._v("¥"+e._s(t.material_price))])]):e._e(),e._v(" "),a("div",{staticClass:"flex-between f-caption mt-sm"},[a("div",{staticClass:"c-warning"},[e._v("¥"+e._s(t.goods_price))]),e._v(" "),a("div",[e._v("x"+e._s(t.num||1))])])])],1)])})}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"user_name",label:"下单人"}}),e._v(" "),a("el-table-column",{attrs:{prop:"coach_info.coach_name",label:e.$t("action.attendantName"),"min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"apply_price",label:"","min-width":"180"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticStyle:{"margin-top":"7px"}},[e._v("\n 申请退款金额\n "),a("lb-tool-tips",{attrs:{padding:"11"}},[e._v("含物料费")])],1)]}},{key:"default",fn:function(t){return[a("div",[e._v("¥"+e._s(t.row.apply_price))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"refund_price",label:"退款金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("¥"+e._s(t.row.refund_price))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"pay_order_code","min-width":"150",label:"付款订单号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"order_code","min-width":"150",label:"退款订单号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"out_refund_no","min-width":"150",label:"微信退款订单号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"admin_name","min-width":"150",label:"代理商"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time","min-width":"120",label:"申请退款时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("handleTime")(t.row.create_time,1)))]),e._v(" "),a("div",[e._v(e._s(e._f("handleTime")(t.row.create_time,2)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status_text",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.statusType[t.row.status])+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"220"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-view",expression:"`${$route.name}-view`"}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return e.$router.push("/shop/refund/detail?id="+t.row.id)}}},[e._v(e._s(e.$t("action.view")))]),e._v(" "),1===t.row.status?a("block",[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-rejectRefund",expression:"`${$route.name}-rejectRefund`"}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){return e.toRefuse(t.row.id)}}},[e._v(e._s(e.$t("action.rejectRefund")))]),e._v(" "),a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-agreeRefund",expression:"`${$route.name}-agreeRefund`"}],attrs:{size:"mini",plain:"",type:"success"},on:{click:function(a){return e.showRefundDialog(t.row.id,t.row.apply_price)}}},[e._v(e._s(e.$t("action.agreeRefund")))])],1):e._e()],1)]}}])})],1),e._v(" "),a("lb-page",{attrs:{batch:!1,page:e.searchForm.page,pageSize:e.searchForm.limit,total:e.total},on:{handleSizeChange:e.handleSizeChange,handleCurrentChange:e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"立即退款",visible:e.dialogRefund,width:"400px",center:""},on:{"update:visible":function(t){e.dialogRefund=t}}},[a("div",{staticClass:"refund-inner"},[a("lb-tips",{attrs:{isIcon:!1}},[e._v("请核对信息后输入需要退款的金额")]),e._v(" "),a("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(" "),a("p",{staticClass:"mt-lg"},[e._v("\n 实际可退款金额\n "),a("span",{staticClass:"c-warning"},[e._v("¥"+e._s(e.refundTotalMoney))])]),e._v(" "),a("p",[e._v("退款金额不能大于可退款金额")])],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogRefund=!1}}},[e._v(e._s(e.$t("action.cancel")))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.toPassRefund}},[e._v("确认退款")])],1)])],1)],1)},staticRenderFns:[]};var d=a("VU/8")(c,u,!1,function(e){a("Urbt"),a("XjRr")},"data-v-9e5b649c",null);t.default=d.exports}});