123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- /* ---------------------------------------------------------------------
-
- 수술기록 사항(SMMNP00900.xfm - JScript )
-
- - Version :
- 1) : Ver.1.00.01
- : Create By Francis Choi
- : 2007.05.02
- ---------------------------------------------------------------------- */
- var nLen = 5;
- var DispData = "/root/main/valueitem";
- var SaveData = "/root/ValuItemLists/valuitem";
-
- // alert(model.getValue("/root/main/patposition")+"==="+model.getValue("/root/main/valueitem/valueposition"));
- // model.setValue("/root/main/valueitem/valueposition",model.getValue("/root/main/patposition"));
- /* --------------------------------------------------*/
- /* desc : xforms-ready시 수행한다 */
- /* --------------------------------------------------*/
- function fXformsReady() {
- if (window.opener != null) {
- //회복상태 평가표 팝업창에 입실, 퇴실 구분에 따라서 2점으로 초기화 by 박영우 2010-02-17
- var sInOutSaveFlag = opener.javascript.getParameter("SMMNP00700_00901");
- model.copyNode("/root/ValuItemLists", opener.root.main.MnphrecoData.MnphrecoList.recovstatvalutable.valuitemlists);
- if(sInOutSaveFlag == "IN") {
- for(var i=1; i<=5; i++) {
- model.setValue(SaveData+"["+i+"]/valuitemarrv", "2");
- }
- model.setValue("/root/ValuItemLists/valuitemarrvtot", "10");
- } else if(sInOutSaveFlag == "OUT") {
- for(var i=1; i<=5; i++) {
- model.setValue(SaveData+"["+i+"]/valuitemleav", "2");
- }
- model.setValue("/root/ValuItemLists/valuitemleavtot", "10");
- } else if(sInOutSaveFlag == "ALL") {
- }
-
- var nLen = instance1.selectSingleNode(SaveData).childNodes.length;
- var sInOutFlag = opener.javascript.getParameter("SMMNP00700_00900");
-
- opener.javascript.setParameter("SMMNP00700_00900", "");
- opener.javascript.setParameter("SMMNP00700_00901", "");
-
- var pNode1 = "valuitemarrv";
- var pNode2 = "valuitemarrvtot";
-
- if(sInOutFlag == "OUT"){
- pNode1 = "valuitemleav";
- pNode2 = "valuitemleavtot";
- model.setValue("/root/main/patposition","2");
- radio6.refresh();
- }
- fSetValueDisp(nLen, pNode1, pNode2);
-
- // fMain2ValueItem("1", "Y");
- }
- }
- /* ------------------------------------------------- */
- /* desc : 선택 NODE 하위의 내용을 CLEAR한다. */
- /* return : */
- /* -------------------------------------------------- */
- function fMain2ValueItem(pPOS, pDispYn){
- var nLen = instance1.selectSingleNode(SaveData).childNodes.length;
-
- var pNode1 = "valuitemarrv";
- var pNode2 = "valuitemarrvtot";
- var pNode3 = "valuitemleav";
- var pNode4 = "valuitemleavtot";
- if (pPOS == "2") {
- pNode1 = "valuitemleav";
- pNode2 = "valuitemleavtot";
-
- pNode3 = "valuitemarrv";
- pNode4 = "valuitemarrvtot";
- }
-
- fSetValueItem(nLen, pNode1, pNode2);
- if (pDispYn == "Y") {
- fSetValueDisp(nLen, pNode3, pNode4);
- }
- }
- function fSetValueItem(pLen, pNode1, pNode2){
- var xNode = instance1.selectSingleNode(DispData);
-
- for (var i=0;i<=pLen; i++){
- model.setValue(SaveData+"["+(i+1)+"]/"+pNode1, xNode.childNodes(i).text);
- }
-
- model.setValue("/root/ValuItemLists/"+pNode2,model.getValue("/root/main/valuetot"));
- }
- function fSetValueDisp(pLen, pNode1, pNode2){
- var xNode = instance1.selectSingleNode(DispData);
-
- for (var i=0;i<=pLen; i++){
- xNode.childNodes(i).text = model.getValue(SaveData+"["+(i+1)+"]/"+pNode1);
-
- eval("rb_value"+(i+1)).refresh();
- }
-
- model.setValue("/root/main/valueposition", model.getValue("/root/main/patposition"));
- model.setValue("/root/main/valuetot" , model.getValue("/root/ValuItemLists/"+pNode2));
- inp_tot.refresh();
- }
- /* ------------------------------------------------- */
- /* desc : 선택 NODE 하위의 내용을 CLEAR한다. */
- /* return : */
- /* -------------------------------------------------- */
- function fSumValueItem(){
-
- var Tot = 0;
- var nLen = instance1.selectSingleNode(SaveData).childNodes.length;
- var xNode = instance1.selectSingleNode(DispData);
-
- for (var i=0;i<=nLen; i++){
- Tot += parseInt(xNode.childNodes(i).text);
- }
- // alert("Sum=="+model.getValue("/root/main/valuetot"));
-
- model.setValue("/root/main/valuetot", Tot);
-
- inp_tot.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.16
- * @by : 최학록
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 항목 보내기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fConfirmData(){
- // var iParam = instance1.selectSingleNode("/root/ValuItemLists");
- // window.parent.document.models(0).copyNode("/root/ValuItemLists", iParam);
- if (window.opener != null) {
- model.copyNode(opener.root.main.MnphrecoData.MnphrecoList.recovstatvalutable.valuitemlists,"/root/ValuItemLists");
- }
-
- // if(checkOpener()){
- // model.copyNode(opener.root.hidden.recinfo.icnpinfo,root.hidden.icnplist);
- // } else{
- // alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
- // }
-
- // window.parent.document.models(0).copyNode( "/root/ValuItemLists", "/root/ValuItemLists");
-
- // opener.javascript.setParameter("SendData", iParam);
- window.close();
- }
-
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|