(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-doctor-reservation"],{5387:function(t,e,a){"use strict";a.r(e);var i=a("5f1f"),n=a.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},"5f1f":function(t,e,a){"use strict";(function(t){a("7a82");var i=a("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("99af"),a("ac1f"),a("00b4"),a("14d9"),a("d401"),a("d3b7"),a("25f0");var n=a("1126"),o=i(a("75f4")),r=a("e93b"),s=a("c93d"),c={components:{navBar:o.default},data:function(){return{acIndex:0,typeIndex:0,typeList:[{txt:"医院预约",id:1},{txt:"门诊预约",id:2},{txt:"手术预约",id:3}],dataForm:{hospitalName:"",remarks:"",department:"",doctor:"",operation:"",date:""},dayNum:7,dateList:[],dateIndex:0,userInfo:{},listData:[],screenHeight:"",scrollH:""}},onShow:function(){var t=this;1==this.acIndex&&this.$nextTick((function(){t.$refs.paging.reload()}))},mounted:function(){},onLoad:function(){this.getWeekdays(this.dayNum),this.userInfo=uni.getStorageSync("userInfos"),this.userInfo&&this.userInfo.mobile&&(this.userInfo.mobile=(0,s.decryptWithSM4)(this.userInfo.mobile)),this.screenHeight=uni.getSystemInfoSync().safeArea.height},methods:{queryList:function(t,e){var a=this,i={method:r.doctorReservationList,currentPage:t,isDeleted:"0",limit:e,userId:uni.getStorageSync("userId")};(0,n.callbackRequest)(i).then((function(i){if(1==i.returnCode){if(t*e>=i.returnData.total)return void a.$refs.paging.completeByNoMore(i.returnData.records,!0);a.$refs.paging.completeByNoMore(i.returnData.records,!1)}else uni.showToast({title:i.returnMsg,icon:"none"})}))},submitClick:function(){var e=this;if(0!=this.typeIndex||this.dataForm.hospitalName)if(1!=this.typeIndex||this.dataForm.department)if(2!=this.typeIndex||this.dataForm.operation)if(this.mobileValidator(this.userInfo.mobile)){var a={companyName:this.userInfo.departmentName,userName:this.userInfo.realName,userPhone:this.userInfo.mobile||"",sex:"-",serviceType:0==this.typeIndex?"其他":1==this.typeIndex?"预约挂号":2==this.typeIndex?"手术安排":"其他",medicalCheck:[],prefer:"".concat(this.dataForm.hospitalName,"-"),decsription:"".concat(this.dataForm.hospitalName,"-").concat(this.dataForm.remarks)};(0,n.ML_CALLBACK_REQUEST)("/api/MedicalService/CreateOrder","POST",a).then((function(a){var i=a.data.data.orderId;(0,n.callbackRequest)({method:r.doctorReservation,mlReturnStatus:a.data.code,orderId:i,name:e.userInfo.realName,userId:uni.getStorageSync("userId"),phone:e.userInfo.mobile,unit:e.userInfo.departmentName,appointmentTime:e.dataForm.date,hospitalName:e.dataForm.hospitalName,officesName:1==e.typeIndex?e.dataForm.department:"",doctorName:0!==e.typeIndex?e.dataForm.doctor:"",surgicalType:2==e.typeIndex?e.dataForm.operation:"",type:0==e.typeIndex?"1":1==e.typeIndex?"2":2==e.typeIndex?"3":"",remarks:e.dataForm.remarks}).then((function(t){"1"==t.returnCode&&(uni.showToast({title:"预约成功",icon:"none"}),e.dataForm.hospitalName="",e.dataForm.remarks="",e.dataForm.department="",e.dataForm.doctor="",e.dataForm.operation="",e.$refs.Form.resetValidation())})).catch((function(e){t.log(e)}))}))}else uni.showToast({title:"请完整输入手机号",icon:"none"});else uni.showToast({title:"请填写手术类型",icon:"none"});else uni.showToast({title:"请填写预约科室",icon:"none"});else uni.showToast({title:"请填写就诊医院",icon:"none"})},jumpDetail:function(t){uni.navigateTo({url:"/pages/doctor/detail?id="+t.id+"&pageType=1"})},mobileValidator:function(t){return/^1(3[0-9]|5[0-3,5-9]|7[1-3,5-8]|8[0-9])\d{8}$/.test(t)},selectDate:function(t,e){this.dateIndex=e,this.dataForm.date=t.time},typeClick:function(t){var e=this;this.acIndex=t,1==this.acIndex&&this.$nextTick((function(){var t=uni.createSelectorQuery().in(e);t.select("#paging_id").boundingClientRect((function(t){t&&(e.scrollH=e.screenHeight-t.top)})).exec(),e.$refs.paging&&e.$refs.paging.reload()}))},navClick:function(t){this.typeIndex=t,this.dataForm.hospitalName="",this.dataForm.remarks="",this.dataForm.department="",this.dataForm.doctor="",this.dataForm.operation="",this.$refs.Form.resetValidation()},getWeekdays:function(t){for(var e=[],a=0;a