/** * mplus_mobile_treatment */ var mplus_mobile_treatment = function(){ // 상속 mplus_common.call(this); // super var self = this; //변수 var div = $("
"); var tr = $(""); var th = $(""); var td = $(""); var table = $("
"); var li = $("
  • "); var a = $(""); var span = $(""); var button = $(""); var $sltDept = $('#sltDept'), $scheduleList = $('#scheduleList'); var scheduleList = []; var openFlag = false; $(window).on('load resize',function(){ if( self.isTablet() ) { $('#treatmentList table').css({ 'width': '100%', 'max-width': '100%' }); }else{ $('#treatmentList table').css({ 'width': 'max-content', 'max-width': 'initial' }); }; }); /** * 초기화 */ this.init = function(){ addEvent(); initDataSetting(); searchScheduleList(localStorage.selectDeptCode); }; /** * 이벤트 등록 */ var addEvent = function(){ $('#sltDept').change(function(){ searchScheduleList($('#sltDept').val()); }); }; /** * 기초데이터 셋팅 */ var initDataSetting = function(){ var deptList = []; self.hospital.getDeptList('D', function(result){ deptList = result; $('#sltDept').empty(); for(var i=0; i').clone().attr('value', deptList[i].departmentCd) .attr('type', deptList[i].departmentTyp) .text(deptList[i].departmentNm); $('#sltDept').append(option); }; $('#sltDept').val(localStorage.selectDeptCode); if($('#sltDept').val()==null){ $("#sltDept").val($("#sltDept option:first").val()); }; }); }; var searchScheduleList = function(deptCode){ $scheduleList.empty(); scheduleList = []; var param = { departmentCd: deptCode }; self.schedule.getTreatSchedule(param); }; bindingPatientList = function(bindScheduleList, extraMsg){ $scheduleList.empty(); scheduleList = bindScheduleList; if(scheduleList.length==0){ $scheduleList.append(tr.clone().addClass('').append( td.clone().addClass('text-center no-result').attr('colspan', '13').text('―'))); }; for(var i=0; i