1 line
5.8 KiB
JavaScript
Raw Normal View History

2025-04-01 09:03:51 +08:00
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["packageA/my/refund"],{"4f2a":function(e,t,o){"use strict";o.r(t);var n=o("9853"),i=o("c563");for(var r in i)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return i[e]}))}(r);o("d32f");var a=o("828b"),c=Object(a["a"])(i["default"],n["b"],n["c"],!1,null,"61405c66",null,!1,n["a"],void 0);t["default"]=c.exports},"807e":function(e,t,o){"use strict";(function(e,t){var n=o("47a9");o("5e3a");n(o("3240"));var i=n(o("4f2a"));e.__webpack_require_UNI_MP_PLUGIN__=o,t(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"8e11":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={data:function(){return{price:"",reason:"",reasonPrice:"",list:"",refuseShow:!1,agreeShow:!1,id:0,info:{},classes_service_order_id:0,reasonText:"",loss_proportion:"",popupStyle:{width:"690rpx",borderRadious:"20rpx",margin:"0 auto",display:"flex",justifyContent:"center",alignItems:"center"}}},onLoad:function(e){this.classes_service_order_id=e.id,this.getOrderInfo(e.id)},computed:{},methods:{formatTimestamp:function(e){var t=new Date(1e3*e),o=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),r=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0"),c=String(t.getSeconds()).padStart(2,"0");return"".concat(o,"-").concat(n,"-").concat(i," ").concat(r,":").concat(a,":").concat(c)},quxiao:function(){e.$u.http.post("/api/school/worker/order/cancel",{order_no:this.info.order_no}).then((function(t){1==t.code?e.showToast({title:"取消免费课程成功",icon:"none",duration:2e3,complete:function(){setTimeout((function(){e.navigateBack(1)}),2e3)}}):e.showToast({title:t.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},cancelRefund:function(){e.navigateBack(1)},refuseClose:function(){this.refuseShow=!1,this.reasonText=""},refuseOpen:function(){this.refuseShow=!0},agreeClose:function(){this.agreeShow=!1},agreeOpen:function(){this.agreeShow=!0},qx:function(){this.refuseShow=!1,this.reasonText=""},TynextQx:function(){this.agreeShow=fasle},Tynext:function(){var t=this;e.$u.http.post("/api/school.worker.service_order/shop_confirmation",{order_no:this.info.serviceorder.id,price:this.reasonPrice,status:"yes"}).then((function(o){1==o.code?(t.agreeShow=!1,e.showToast({title:"已同意",icon:"none",duration:2e3,complete:function(){setTimeout((function(){e.navigateBack(1)}),2e3)}})):e.showToast({title:o.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},next:function(){var t=this;e.$u.http.post("/api/school.worker.service_order/shop_confirmation",{order_no:this.info.serviceorder.id,reject_reason:this.reasonText,status:"no"}).then((function(o){1==o.code?(t.refuseShow=!1,t.reasonText="",e.showToast({title:"已拒绝",icon:"none",duration:2e3,complete:function(){setTimeout((function(){e.navigateBack(1)}),2e3)}})):e.showToast({title:o.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},submitRefund:function(){e.$u.http.post("/api/school.worker.service_order/create",{classes_order_id:this.id,reason:this.reason,price:this.price}).then((function(t){1==t.code?e.showToast({title:"发起成功",icon:"none",duration:2e3,complete:function(){setTimeout((function(){e.navigateBack(1)}),2e3)}}):e.showToast({title:t.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},getMoney:function(t){var o=this;e.$u.http.get("/api/school.worker.service_order/create",{params:{classes_order_id:t}}).then((function(t){1==t.code?(o.loss_proportion=t.data.order_data.loss_proportion,t.data.order_data.auto_recommend_price<=0?o.price=t.data.order_data.sub_refundprice:o.price=t.data.order_data.auto_recommend_price):e.showToast({title:t.msg,icon:"