2025-04-01 09:03:51 +08:00

1 line
5.8 KiB
JavaScript

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:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},getOrderInfo:function(t){var o=this;e.$u.http.get("/api/school/worker/order/detail",{params:{id:t}}).then((function(t){1==t.code?(o.info=t.data.detail,o.info.serviceorder&&4==o.info.status&&1==o.info.serviceorder.status&&(t.data.detail.serviceorder.auto_recommend_price<=0?o.reasonPrice=t.data.detail.serviceorder.sub_refundprice:o.reasonPrice=t.data.detail.serviceorder.auto_recommend_price),3==t.data.detail.status&&(o.id=t.data.detail.id,o.getMoney(t.data.detail.id))):e.showToast({title:t.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},callPhone:function(t){e.makePhoneCall({phoneNumber:t})}}};t.default=o}).call(this,o("df3c")["default"])},9853:function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return r})),o.d(t,"a",(function(){return n}));var n={"u-Textarea":function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/uview-ui/components/u--textarea/u--textarea")]).then(o.bind(null,"d17b"))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(o.bind(null,"e6bd"))}},i=function(){var e=this,t=e.$createElement,o=(e._self._c,e.info.detail?e.formatTimestamp(e.info.detail.createtime):null);e._isMounted||(e.e0=function(t){e.refuseShow=!0},e.e1=function(t){e.agreeShow=!0}),e.$mp.data=Object.assign({},{$root:{m0:o}})},r=[]},c563:function(e,t,o){"use strict";o.r(t);var n=o("8e11"),i=o.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(r);t["default"]=i.a},cf19:function(e,t,o){},d32f:function(e,t,o){"use strict";var n=o("cf19"),i=o.n(n);i.a}},[["807e","common/runtime","common/vendor"]]]);