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

1 line
8.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/afterSales/info"],{"0fbc":function(e,t,n){},"361a":function(e,t,n){"use strict";n.r(t);var o=n("4483"),i=n("cedf");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("bffa");var s=n("828b"),a=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"e0651186",null,!1,o["a"],void 0);t["default"]=a.exports},4483:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o}));var o={uGrid:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-grid/u-grid")]).then(n.bind(null,"3bab"))},uGridItem:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-grid-item/u-grid-item")]).then(n.bind(null,"244a"))},uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,"e6bd"))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"c3d1"))},uRadio:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-radio/u-radio")]).then(n.bind(null,"5901"))},"u-Textarea":function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u--textarea/u--textarea")]).then(n.bind(null,"d17b"))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"3fd2"))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"5220"))}},i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.infoRefund.detail?e.formatTimestamp(e.infoRefund.detail.createtime):null);e._isMounted||(e.e0=function(t){e.refuseShow=!1}),e.$mp.data=Object.assign({},{$root:{m0:n}})},r=[]},"91cb":function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("7eb4")),r=o(n("7ca3")),s=o(n("ee10"));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={data:function(){return{refundShow:!1,radioValue:"",otherText:"",refuseShow:!1,fileList:[],list:"",id:0,info:{},infoRefund:"",myReason:"",radioList:["没有时间上课","课程内容不符合预期","位置不便","其他课程时间冲突","课程延期","其他"],classes_service_order_id:0,user_status:""}},onLoad:function(e){this.classes_service_order_id=e.id,this.getRefundInfo()},computed:{},methods:{formatTimestamp:function(e){var t=new Date(1e3*e),n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),r=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return"".concat(n,"-").concat(o,"-").concat(i," ").concat(r,":").concat(s,":").concat(a)},refuseShowOpen:function(t){var n=this;this.user_status=t,"no"==t?this.refuseShow=!0:e.showModal({title:"提示",content:"确定要同意吗?",success:function(e){e.confirm&&n.userConfirmation()}})},oversize:function(e){return this.$u.toast("请传6MB以内大小的图片"),!1},userConfirmation:function(){var t=this;""!=this.otherText||"no"!=this.user_status?e.$u.http.post("/api/school.service_order/user_confirmation",{order_no:this.classes_service_order_id,status:this.user_status,reject_reason:this.otherText,reject_images:this.list}).then((function(n){console.log(n),1==n.code&&(e.showToast({title:"提交成功!",icon:"none",duration:2e3}),t.refuseShow=!1,t.getRefundInfo())})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})})):e.showToast({title:"请填写原因!",icon:"none",duration:2e3})},cancelOrder:function(){var t=this;e.showModal({title:"提示",content:"确定要撤销售后订单吗?",success:function(e){e.confirm&&t.cancelOrderDo()}})},cancelOrderDo:function(){var t=this;e.$u.http.post("/api/school.service_order/cancel",{order_no:this.classes_service_order_id}).then((function(n){console.log(n),1==n.code?(e.showToast({title:n.msg,icon:"none",duration:2e3}),t.infoRefund="",t.getOrderInfo()):e.showToast({title:n.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},chickRadio:function(){var t="";""!==this.radioValue?(t=5!=this.radioValue?this.radioList[this.radioValue]:this.otherText,this.refundShow=!1,this.myReason=t):e.showToast({title:"请选择原因!",icon:"none",duration:2e3})},submitAdd:function(){var t=this;console.log(this.radioValue);var n="";""!==this.radioValue?(n=5!=this.radioValue?this.radioList[this.radioValue]:this.otherText,e.$u.http.post("/api/school.service_order/create",{classes_order_id:this.id,reason:n}).then((function(n){console.log(n),1==n.code?(e.showToast({title:n.msg,icon:"none",duration:2e3}),t.getOrderInfo()):e.showToast({title:n.msg,icon:"none",duration:2e3})})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))):e.showToast({title:"请选择原因!",icon:"none",duration:2e3})},getOrderInfo:function(){var t=this;e.$u.http.get("/api/school/order/detail",{params:{id:this.id}}).then((function(e){t.info=e.data.detail,0!=e.data.detail.classes_service_order_id&&null!=e.data.detail.classes_service_order_id&&""!=e.data.detail.classes_service_order_id&&(t.classes_service_order_id=e.data.detail.classes_service_order_id,t.getRefundInfo(e.data.detail.classes_service_order_id))})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},getRefundInfo:function(){var t=this;e.$u.http.get("/api/school.service_order/detail",{params:{id:this.classes_service_order_id}}).then((function(e){null==e.data.detail?t.infoRefund="":t.infoRefund=e.data.detail})).catch((function(t){e.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},delShow:function(){this.refundShow=!1,this.refuseShow=!1},clickImg:function(t,n){e.previewImage({current:n,urls:[t]})},deletePic:function(e){console.log(e);var t=e.index;if(t>=0&&t<this.fileList.length){this.fileList.splice(t,1),this.list=this.fileList.map((function(e){return e.url})).join(",");var n=this.list;Array.isArray(n)?(n.splice(t,1),console.log("Updated list",n)):console.warn("list is not an array, skipping splice operation")}else console.error("Invalid index")},afterRead:function(e){var t=this;return(0,s.default)(i.default.mark((function n(){var o,r,s,a,c;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:o=[].concat(e.file),r=t.fileList.length,o.map((function(e){t.fileList.push(u(u({},e),{},{status:"uploading",message:"上传中"}))})),s=0;case 4:if(!(s<o.length)){n.next=15;break}return n.next=7,t.uploadFilePromise(o[s].url);case 7:a=n.sent,c=t.fileList[r],t.fileList.splice(r,1,Object.assign(c,{status:"success",message:"",url:a})),r++,t.list=t.fileList.map((function(e){return e.url})).join(",");case 12:s++,n.next=4;break;case 15:case"end":return n.stop()}}),n)})))()},uploadFilePromise:function(t){return new Promise((function(n,o){e.uploadFile({url:"https://testy.hschool.com.cn//api/common/upload",filePath:t,name:"file",formData:{user:"test"},header:{token:e.getStorageSync("token")},success:function(e){n(JSON.parse(e.data).data.fullurl)},fail:function(e){o(e)}})}))},callPhone:function(t){e.makePhoneCall({phoneNumber:t})}}};t.default=c}).call(this,n("df3c")["default"])},bffa:function(e,t,n){"use strict";var o=n("0fbc"),i=n.n(o);i.a},cedf:function(e,t,n){"use strict";n.r(t);var o=n("91cb"),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},e54d:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("5e3a");o(n("3240"));var i=o(n("361a"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["e54d","common/runtime","common/vendor"]]]);