1 line
39 KiB
JavaScript
1 line
39 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-medical-see-doctor-edit"],{"0633":function(e,t,a){"use strict";var i=a("526f"),o=a.n(i);o.a},"407a":function(e,t,a){"use strict";a.r(t);var i=a("f4f8"),o=a.n(i);for(var n in i)"default"!==n&&function(e){a.d(t,e,(function(){return i[e]}))}(n);t["default"]=o.a},"49e8":function(e,t,a){var i=a("5965");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=a("4f06").default;o("3492e0dc",i,!0,{sourceMap:!1,shadowMode:!1})},"4a93":function(e,t,a){"use strict";var i=a("4ea4");a("ac1f"),a("5319"),a("1276"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a("37f6"),n=a("b742"),r=i(a("8e28")),d=i(a("bd50")),c={components:{loadMore:r.default,contentNone:d.default},data:function(){return{user:(0,n.getStorage)("userInfo"),parentProjectList:[],projectList:[],chooseProjectId:0,choseProject:{},projectInfoList:[],chooseProjectInfoId:0,choseProjectInfo:{},deptList:[],departmentIndex:0,appointlist:[],chooseDateIndex:-1,userName:"",phone:"",desc:"",date:(0,n.getDate)(),commentlist:[],formatDate:n.formatDate,id:"",type:1,record:{},deptId:"",applyDate:""}},onLoad:function(e){this.getCalendar(),this.id=e.id,this.type=e.type||1,this.initHaircut(),this.getDepartment()},methods:{compareTime:function(e){var t=e.split("-")[1],a=this.date[this.chooseDateIndex].tiems+" "+t;a=a.replace(/-/g,"/");var i=new Date(a).getTime(),o=(new Date).getTime();return i>o},submit:function(){var e=this,t=/^1[3|4|5|6|7|8|9]\d{9}$/;return 0==this.chooseProjectInfoId?((0,n.alertTip)("请选择时间段"),!1):0==this.userName.length?((0,n.alertTip)("请输入联系人姓名"),!1):t.test(this.phone)?void uni.showModal({title:"确认",content:"提交后不可再次修改,请确认是否提交?",showCancel:!0,cancelText:"取消",confirmText:"确定",success:function(t){if(t.confirm){var a={method:o.saveSeekmedicalProjectRecord,data:{id:e.id,editType:e.type,projectId:e.chooseProjectId,projectName:e.choseProject.project_name,projectInfoId:e.chooseProjectInfoId,projectInfoName:e.choseProjectInfo.project_time,remark:e.desc,modifyBy:e.user.userId,applyDate:e.date[e.chooseDateIndex].tiems}};(0,n.callbackRequest)(a).then((function(t){var a=t.data;1==a.returnCode?((0,n.alertTip)(a.returnMsg),1==e.type?uni.redirectTo({url:"/pages/medical/see-doctor?currentTabIndex=1"}):2==e.type&&uni.redirectTo({url:"/pages/medical/see-doctor-sl"})):(0,n.alertTip)(a.returnMsg)}))}}}):((0,n.alertTip)("请输入正确的手机号"),!1)},chooseProject:function(e){this.chooseProjectId=e.id,this.choseProject=e,this.getSeekmedicalProjectInfo()},chooseProjectInfo:function(e){this.choseProjectInfo=e,this.chooseProjectInfoId=e.id},getDepartment:function(){var e=this,t={method:o.getAllDept,data:{}};(0,n.callbackRequest)(t).then((function(t){if(console.log(t),1==t.data.returnCode){e.deptList=t.data.returnData;for(var a=0;a<e.deptList.length;a++)e.deptList[a].id==e.eptId&&(e.departmentIndex=a)}}))},initHaircut:function(){var e=this,t={method:o.getSeekmedicalProject,data:{userId:this.user.id}};(0,n.callbackRequest)(t).then((function(t){t=t.data,"1"===t.returnCode&&(e.parentProjectList=t.returnData,e.projectList=e.parentProjectList[0].childrenList,e.getRecord())}))},getSeekmedicalProjectInfo:function(){var e=this,t={method:o.getSeekmedicalProjectInfo,data:{userId:this.user.userId,projectId:this.chooseProjectId,applyDate:this.applyDate}};(0,n.callbackRequest)(t).then((function(t){if(t=t.data,"1"===t.returnCode){e.projectInfoList=t.returnData;for(var a=0;a<e.projectInfoList.length;a++)e.chooseProjectInfoId==e.projectInfoList[a].id&&(e.choseProjectInfo=e.projectInfoList[a])}}))},switchTab:function(e){this.chooseDateIndex!=e&&(this.chooseDateIndex=e,this.applyDate=this.date[this.chooseDateIndex].tiems,this.getSeekmedicalProjectInfo())},changeDepartment:function(e){this.departmentIndex=e.detail.value},getRecord:function(){var e=this,t={method:o.getMySeekmedicalProjectRecord,data:{applyId:this.user.id,id:this.id}};(0,n.callbackRequest)(t).then((function(t){if(1==t.data.returnCode&&t.data.returnData.length>0){
|