123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 진료기록 - 서명이미지관리( SMMRF04500_서명이미지관리.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
-
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @desc : 초기화
- * @
- * @param :수정(이창록),2008/07/21
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize()
- {
- model.setValue("/root/main/userinfo/userid", getUserId());
- model.setValue("/root/main/userinfo/usernm", getUserName());
- model.removeNodeset("/root/main/list/signimglist");
-
- mmbfGetDeptCodeComboList("/root/send", "/root/init/orddept", "D");//진료과 가져오기
- addComboItem("cmb_orddept", "전체", "-", "above");//진료과에 전체 추가
- addComboItem("cmb_orddrid", "전체", "-", "above");//진료과에 전체 추가
- cmb_orddept.Value="-";
- cmb_orddrid.Value="-";
- fSetCtrlDisabled(true);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 서명 이미지 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch() {
- if(submit("TRMRF04501"))
- {
- }
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 해당 진료과에 주치의 가져오기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChgMedirecd()
- {
- model.resetInstanceNode("/root/init/userlist/usercombo");
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , cmb_orddept.value, "0330");
- if(getNodesetCnt(model, "/root/init/userlist/usercombo") == 0)
- model.makeNode("/root/init/userlist/usercombo");
- addComboInstance("/root/init/userlist" , "userid^usernm" , "-^전체", "usercombo"); //의사콤보(담당교수) 전체항목 추가
- model.setValue("/root/main/cond/orddrid", "-");
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 정리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClearSignImgInfo() {
- var xPath ="/root/main/signimginfo";
-
- model.setValue(xPath + "/userid", "");
- model.setValue(xPath + "/usernm", "");
- model.setValue(xPath + "/fstrgstrnm", "");
- model.setValue(xPath + "/fstrgstdt", "");
- model.setValue(xPath + "/lastrgstrnm", "");
- model.setValue(xPath + "/lastrgstdt", "");
- model.setValue(xPath + "/signdata","");
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 서명 이미지를 수정한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSignImgelist()
- {
- var repryn = model.getValue("/root/main/signimginfo/repryn");
- var iRow = grd_signimglist.row;
- if (iRow < 1) {
- return;
- }
- grd_signimglist.rowStatus(iRow) = 2;
- model.makeValue("/root/main/signimginfo/status" ,"u");
- model.makeValue("/root/main/signimginfo/fstrgstrid" ,model.getValue("/root/main/userinfo/userid"));
- model.makeValue("/root/main/signimginfo/lastupdtrid",getUserId());
- model.makeValue("/root/main/signimginfo/lastupdtrnm",getUserInfo("usernm"));
- model.setValue("/root/main/signimginfo/lastupdtdt" ,getCurrentDate());
- ipt_lastrgstrnm.disabled = true;
- btn_srch.disabled = true;
- btn_imgsrch.disabled = false;
- btn_save.disabled = false;
- cmb_repryn.disabled = false;
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 저장한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave()
- {
- var userid = model.getValue("/root/main/signimginfo/userid");
- var signdata = model.getValue("/root/main/signimginfo/signdata");
- var repryn = model.getValue("/root/main/signimginfo/repryn");
- if (userid == "" || userid == null) {
- messageBox("사용자정보는","I003");
- return;
- }
- if(signdata==""){
- messageBox("서명이미지는","I003");
- return;
- }
- if(repryn==""){
- messageBox("대표여부는","I003");
- return;
- }
- var xPath = "/root/main/signimginfo";
- model.makeValue("/root/send/savedata/signimgeseqno" ,model.getValue("/root/main/signimginfo/signimgeseqno"));
- model.makeValue("/root/send/savedata/userid" ,userid);
- model.makeValue("/root/send/savedata/repryn" ,model.getValue("/root/main/signimginfo/repryn"));
- model.makeValue("/root/send/savedata/status" ,model.getValue("/root/main/signimginfo/status"));
- model.makeValue("/root/send/savedata/fstrgstrid" ,model.getValue("/root/main/signimginfo/fstrgstrid"));
- model.makeValue("/root/send/savedata/lastupdtrid" ,model.getValue("/root/main/signimginfo/lastupdtrid"));
- model.makeValue("/root/send/savedata/signimgefromdd" ,model.getValue("/root/main/signimginfo/signimgefromdd"));
- model.makeValue("/root/send/savedata/signimgetodd" ,model.getValue("/root/main/signimginfo/signimgetodd"));
- model.makeValue("/root/send/savedata/orddeptcd" ,model.getValue("/root/main/cond/orddeptcd"));
- model.makeValue("/root/send/savedata/orddrid" ,model.getValue("/root/main/cond/orddrid"));
- model.makeValue("/root/send/savedata/signdata" ,signdata);
-
- if(submit("TXMRF04501")==true){
- messageBox("저장이", "I002");
- }else{
- messageBox("저장을", "E009");
- }
-
- btn_save.disabled = true;
- btn_srch.disabled = true;
- btn_imgsrch.disabled = true;
- cmb_repryn.disabled = true;
- model.removeNodeset("/root/send");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 파일 열기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOpenFile()
- {
- var file = openImageFileDialog(1048576);
-
- if (file == "") {
- return;
- }
-
- img_hidden.src = file;
- var data = img_hidden.getbase64data();
- model.setValue("/root/main/signimginfo/signdata", data, true);
- setImageRefInstance("/root/main/signimginfo/signdata");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택한 그리드의 이미지를 보여준다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fShowSignImgInfo()
- {
- img_imgView.visible = false;
- if (grd_signimglist.isCell(event.target)
- && grd_signimglist.row >= grd_signimglist.fixedRows)
- {
- fSetCtrlDisabled(true);
- var iRow = grd_signimglist.row;
- var xImglistPath = "/root/main/list/signimglist";
- var xImgInfoPath = "/root/main/signimginfo";
-
- model.setValue(xImgInfoPath + "/userid" ,model.getValue(xImglistPath+"[" + iRow + "]/userid"));
- model.setValue(xImgInfoPath + "/usernm" ,model.getValue(xImglistPath+"[" + iRow + "]/usernm"));
- model.setValue(xImgInfoPath + "/repryn" ,model.getValue(xImglistPath+"[" + iRow + "]/repryn"));
- model.setValue(xImgInfoPath + "/signimgeseqno" ,model.getValue(xImglistPath+"[" + iRow + "]/signimgeseqno"));
- model.makeValue(xImgInfoPath + "/fstrgstrid" ,model.getValue(xImglistPath+"[" + iRow + "]/fstrgstrid"));
- model.setValue(xImgInfoPath + "/fstrgstrnm" ,model.getValue(xImglistPath+"[" + iRow + "]/fstrgstrnm"));
- model.setValue(xImgInfoPath + "/fstrgstdt" ,model.getValue(xImglistPath+"[" + iRow + "]/fstrgstdt"));
- model.makeValue(xImgInfoPath + "/lastupdtrid" ,model.getValue(xImglistPath+"[" + iRow + "]/lastupdtrid"));
- model.setValue(xImgInfoPath + "/lastupdtrnm" ,model.getValue(xImglistPath+"[" + iRow + "]/lastupdtrnm"));
- model.setValue(xImgInfoPath + "/lastupdtdt" ,model.getValue(xImglistPath+"[" + iRow + "]/lastupdtdt"));
- model.setValue(xImgInfoPath + "/signimgefromdd" ,model.getValue(xImglistPath+"[" + iRow + "]/signimgefromdd"));
- model.setValue(xImgInfoPath + "/signimgetodd" ,model.getValue(xImglistPath+"[" + iRow + "]/signimgetodd"));
- model.makevalue(xImgInfoPath + "/signdata" ,model.getValue(xImglistPath+"[" + iRow + "]/signdata"));
- model.makeValue("/root/send/userid" ,model.getValue(xImgInfoPath + "/userid"));
- model.makeValue("/root/send/signimgeseqno" ,model.getValue(xImgInfoPath + "/signimgeseqno"));
- model.makeValue("/root/send/srchflag" ,"Y");
- img_imgView.src = "../../../com/commonweb/images/no_image.gif";//빈값 으로 초기화
- img_imgView.refresh();
- if(submit("TRMRF04502")){
- setImageRefInstance("/root/main/signimginfo/signdata");
- img_imgView.refresh();
- }
- }
- img_imgView.visible = true;
- model.removeNodeset("/root/send");
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 신규 서명이미지 추가
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddSignImglist()
- {
- var signdata = model.getValue("/root/main/signimginfo/signdata");
- var xPath ="/root/main/signimginfo";
- model.makeValue(xPath + "/status" ,"i");
- model.makeValue(xPath + "/userid" ,"");
- model.makeValue(xPath + "/usernm" ,"");
- model.makeValue(xPath + "/repryn" ,"");
- model.makeValue(xPath + "/fstrgstdt" ,getCurrentDate());
- model.makeValue(xPath + "/fstrgstrid" ,getUserId());
- model.makeValue(xPath + "/fstrgstrnm" ,getUserInfo("usernm"));
- model.makeValue(xPath + "/lastupdtrid" ,getUserId());
- model.makeValue(xPath + "/lastupdtrnm" ,getUserInfo("usernm"));
- model.makeValue(xPath + "/lastupdtdt" ,getCurrentDate());
- model.makeValue(xPath + "/signdata" ,"");
- model.setValue(xPath + "/signimgefromdd",getCurrentDate());
- model.setValue(xPath + "/signimgetodd" ,"");
- model.setValue(xPath + "/signimgeseqno" ,"");
-
- ipt_userid.disabled = true;
- ipt_lastrgstrnm.disabled = true;
- ipt_fstrgstrnm.disabled = true;
- ipt_usernm.disabled = true;
- btn_save.disabled = false;
- btn_srch.disabled = false;
- btn_imgsrch.disabled = false;
- cmb_repryn.disabled = false;
- ipt_stnddd.disabled = false;
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.19
- * @by : 손형준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 컨트롤 enable 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetCtrlDisabled(bool)
- {
- btn_srch.disabled = bool;
- btn_imgsrch.disabled = bool;
- btn_save.disabled = bool;
- ipt_userid.disabled = bool;
- ipt_lastrgstrnm.disabled = bool;
- ipt_fstrgstrnm.disabled = bool;
- ipt_usernm.disabled = bool;
- cmb_repryn.disabled = bool;
- ipt_stnddd.disabled = bool;
- }
- /**
- * @ver : 2007-11-21 1:17오후
- * @desc : 사용자정보
- * @
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetUserInfo(userid,usernm)
- {
- model.setValue("/root/main/signimginfo/userid", userid);
- model.setValue("/root/main/signimginfo/usernm", usernm);
- model.refresh();
- }
- /**
- * @ver : 2008/07/21
- * @desc : 대표여부 설정
- * @
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelectReprYN()
- {
- var repryn = model.getValue("/root/main/signimginfo/repryn");
- var fStatus = model.getValue("/root/main/signimginfo/status");
- var userid = model.getValue("/root/main/signimginfo/userid");
- var usernm = model.getValue("/root/main/signimginfo/usernm");
- var signdata = model.getValue("/root/main/signimginfo/signdata");
- if(signdata==""){
- messageBox("서명이미지를 먼저 입력","I008");
- cmb_repryn.value="";
- return;
- }
- if(fStatus=="i"){
- if(repryn=="N"){
- cmb_repryn.value="N";
- opt_imgetodd.refresh();
- model.setValue("/root/main/signimginfo/signimgetodd",getCurrentDate());
- }else if(repryn=="Y"){
- model.makeValue("/root/send/reqdata/userid" ,model.getValue("/root/main/signimginfo/userid"));
- model.makeValue("/root/send/reqdata/reprflag" ,"Y");
- if(submit("TRMRF04504")){
- if(model.getValue("/root/temp/reprinfo/repryn")=="Y"){
- messageBox("대표사인이 이미 등록되어 ","I010");
- return;
- }else{
- model.setValue("/root/main/signimginfo/repryn","Y");
- opt_imgetodd.refresh();
- model.setValue("/root/main/signimginfo/signimgetodd","99991231");
- }
-
- }
- }
- }else if(fStatus=="u"){
- if(repryn=="N"){
- opt_imgetodd.refresh();
- model.setValue("/root/main/signimginfo/signimgetodd",getCurrentDate());
- }else if(repryn=="Y"){
- model.makeValue("/root/send/reqdata/userid" ,model.getValue("/root/main/signimginfo/userid"));
- model.makeValue("/root/send/reqdata/reprflag" ,"Y");
- if(submit("TRMRF04504")){
- if(model.getValue("/root/temp/reprinfo/repryn")=="Y"){
- messageBox("대표사인이 이미 등록되어 ","I010");
- return;
- }else{
- model.setValue("/root/main/signimginfo/repryn","Y");
- opt_imgetodd.refresh();
- model.setValue("/root/main/signimginfo/signimgetodd","99991231");
- }
-
- }
- }
- }
- model.removeNodeset("/root/send/reqdate");
- model.refresh();
- }
|