123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- /*
-
- SMS전송 관리(SMMNO01100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xOpatListPath = "/root/main/opatlist/opatlist";
- var xBaseCodeListBKPath = "/root/temp/basecodelist/basecodelistinfo";
- var xSMSCodeListPath = "/root/main/smscodelist/smscodelistinfo";
- var xDoctListPath = "/root/main/doctlist/doctlistinfo";
- var g_initGrdData; // 리스트 관련 초기 Instance값
- var g_updateData;
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- g_updateData = grd_opatmngt.getUpdateData("update");
-
- //오늘 날짜로 초기화 하는 부분.(진료일자를 default로 오늘 날짜로 선택함)
- var dt = getCurrentDate();
-
- grd_opatmngt.fixedcellcheckbox(0,1) = true;
- model.removeNodeset(xOpatListPath);
- model.setValue("/root/main/cond/orddd", dt);
- var instcd = getUserInfo("dutplceinstcd");
-
- var standard_yn = "rcptuseyn";
- var ord_deptflag = 'X';
- var rslt_ref = "/root/hidden/orddeptlist";
- var sort_field = "depthngnm";
- var sort_method = "asc";
- var dt = getCurrentDate();
-
- //zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, "depthngnm", "asc");
- //zsdfGetOutOrdDeptList( instcd, rslt_ref, sort_field, sort_method, dt );
- // 간호외래진료부서콤보 (특정하위부서를 포함- 분만실, 육아상담실, 인공신장실)
- zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, dt);
-
- model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd")); // 근무지부서코드
- fDeptChanged(); //진료과내의 의사정보 조회
- fBaseCodeSearch("B"); // 전송구분 조회
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전송구분 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBaseCodeSearch(typegubn){
- model.setValue("/root/main/cond/baseclsflag", "O"); // 외래기준자료
- model.setValue("/root/main/cond/basetypecd", typegubn);
- model.setValue("/root/main/cond/supbasetypecd", "O");
- model.copynode("/root/send/req", "/root/main/cond");
- if(submit("TRMNO00801")){
- model.removeNodeset("/root/main/basecodelist/basecodelistinfo");
- cmb_sendgb.select(0);
- }
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료과내의 의사정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDeptChanged() {
- if(model.getValue("/root/main/cond/orddeptcd") <= ""){
- return;
- }
- cmb_orddr.disabled = false;
-
- model.resetInstanceNode("/root/main/condition/orddrid");
- model.makeValue("/root/send/req/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
- model.makeValue("/root/send/req/orddd", model.getValue("/root/main/cond/orddd"));
-
-
- var sordclsdeptflag = model.getValue("/root/hidden/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/ordclsdeptflag"); // 센터/대표/분과/서브 구분
- var sorddeptkind = model.getValue("/root/hidden/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/orddeptkind"); // 센터/대표 구분
- var ssupdeptcd = model.getValue("/root/hidden/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/supdeptcd"); // 상위부서코드
-
- var sorddeptflag = "";
- if (sorddeptkind == "C") { // 센터이면
- sorddeptflag = "C";
- //} else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // 센터가 아니면서 분과이면
- // sorddeptflag = "A";
- } else { // 그외에 기타과
- sorddeptflag = "etc";
- }
-
-
- model.setValue("/root/main/cond/ordclsdeptflag",sorddeptflag);
- model.setValue("/root/main/cond/supdeptcd",ssupdeptcd);
-
- model.makeValue("/root/send/req/ordclsdeptflag", model.getValue("/root/main/cond/ordclsdeptflag"));
- model.makeValue("/root/send/req/supdeptcd", model.getValue("/root/main/cond/supdeptcd"));
- //추가. 20081103
- model.makeValue("/root/send/req/prcpspecflag", model.getValue("/root/main/cond/prcpspecflag"));
-
-
- submit("TRMNO00104");
-
- model.refresh();
- //model.setFocus("btn_ref");
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SMS 상용구의 중분류에서 기준코드조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGubnChanged() {
- model.removeNodeset(xBaseCodeListBKPath);
- grd_baselist.refresh();
- //model.setValue("/root/main/cond/supbasetypecd", model.getValue("/root/send/req/basegubn"));
- model.setValue("/root/main/cond/baseclsflag", "O"); // 외래기준자료
- model.copynode("/root/send/req", "/root/main/cond");
- submit("TRMNO00800");
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기준 Code 리스트 초기화
- * @param : grid : grid Name
- * @return :
- * @---------------------------------------------------
- */
- function fBaseCodeReset(pPath, GrdControl) {
- model.removeNodeset(pPath);
- GrdControl.Rebuild();
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료예약 대상자를 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBtnRefClicked(){
- if(isRequiredControls("ipt_orddd", "cmb_orddept", "cmb_orddr")) {
-
- grd_opatmngt.fixedcellischeck(0,1) = false;
- model.removeNodeset(xOpatListPath);
- grd_opatmngt.refresh();
- model.makeValue("/root/send/req/stat", "4"); // 전체 조회
- model.copynode("/root/send/req", "/root/main/cond");
-
- // 날짜 변경시 의사스케쥴재조회
- fDeptChanged();
-
- submit("TRMNO01100");
- //조회 후 상태 정보 clear
- grd_opatmngt.clearStatus();
- }
- model.setValue("/root/main/cond/cntctel", model.getValue("/root/main/opatlist/opatlist[1]/cntctel"));
- ipt_cntctel.refresh();
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 클릭시 선택컬럼 값 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickedGridRow(){
- var iRow = 0;
- var iCol = 0;
- iRow = grd_opatmngt.row;
- iCol = grd_opatmngt.col;
-
- //** 전체선택 체크박스 기능 추가_20081128(ByJA) ******************************************//
- if(iRow == "0"){
- if(grd_opatmngt.fixedcellischeck(0, grd_opatmngt.colRef("acptyn"))==true){ // 선택시
- for(i=1;i<=getNodesetCount(xOpatListPath);i++){
- model.makeValue(xOpatListPath + "[" + i + "]/acptyn", "true");
- grd_opatmngt.rowStatus(i) = 2;
- }
- } else{
- for(i=1;i<=getNodesetCount(xOpatListPath);i++){
- model.makeValue(xOpatListPath + "[" + i + "]/acptyn", "false");
- grd_opatmngt.removeStatus(i, "update");
- }
- }
- }
- //***************************************************************************************//
-
-
- if(iCol == 1) return;
- if(iRow < 1) return;
- if(model.getValue(xOpatListPath+"["+iRow+"]/acptyn") == "true"){
- model.setValue(xOpatListPath+"["+iRow+"]/acptyn","false");
- grd_opatmngt.removeStatus(iRow, "update");
- }else{
- model.setValue(xOpatListPath+"["+iRow+"]/acptyn", "true");
- grd_opatmngt.rowStatus(iRow) = 2;
- }
- }
- /**
- * @group :
- * @ver : 2007.07.04
- * @by : 정경화
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SMS 자료 전송
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallMngtInfo(){
- if(model.getValue("/root/item") == ""){
- messageBox("전송내용을 입력하지 ","E007");
- return;
- }
- // 발신번호 Setting
- for(var i=1; i<=getNodesetCount(xOpatListPath); i++){
- model.setValue(xOpatListPath + "[" + i + "]/cntctel", model.getValue("/root/main/cond/cntctel"));
- }
-
- var updatedata = grd_opatmngt.getUpdateData("update");
-
- if(updatedata == g_updateData){
- messageBox("SMS 전송대상이 ", "I004")
- return;
- }
- for(var iRow = grd_opatmngt.fixedrows; iRow <= grd_opatmngt.rows - grd_opatmngt.fixedrows; iRow++){
- if((model.getValue(xOpatListPath+"["+iRow+"]/mpphontel").length < 10) &&
- (model.getValue(xOpatListPath+"["+iRow+"]/acptyn") == "true")){
- messageBox(model.getValue(xOpatListPath+"["+iRow+"]/hngnm") + "의 휴대전화번호가 ","C001");
- return;
- }
- }
- var sRtnMsg = messageBox("SMS 전송을 ", "Q003");
- if(sRtnMsg != 6) return;
- model.copynode("/root/send", "/root/main/cond");
- model.makeValue("/root/send/msgparam", model.getValue("/root/item"));
- model.makeValue("/root/send/opatinfo",updatedata);
- if(submit("TXMNO01101")){
- grd_opatmngt.fixedcellischeck(0,1) = false;
- model.setValue("/root/item","");
- model.removenode("/root/send/opatinfo");
- model.refresh();
- //2009-06-15 오전 11:18:12 taebum 전송 후 Grid Data Clear 로직 추가
- grd_opatmngt.refresh();
- grd_opatmngt.clearStatus();
-
- }else{
- //2009-06-15 오전 11:18:12 taebum 전송 후 Grid Data Clear 로직 추가
- grd_opatmngt.refresh();
- grd_opatmngt.clearStatus();
- }
-
-
- }
|