MMR03700.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. function fSetImageView(){
  2. var selectimg = document.controls(event.target);
  3. var selectimgdata = selectimg.getBase64data();
  4. var selectimgnm = "TEST";
  5. model.setValue("/root/send/imgeitem/imgedata", selectimgdata);
  6. model.setValue("/root/send/imgeitem/imgenm", selectimgnm);
  7. //setParameter("selectimgecd", "0000001001,0000002001,0000003001,0000004001,0000005001,0000006001,0000007001");
  8. setParameter("formcd", "0000000043");
  9. //setParameter("degnitemno", "100570");
  10. //setParameter("formdegnseq", "179");
  11. setParameter("flag", "1");
  12. //setParameter("selectimgdata",selectimgdata);
  13. //setParameter("selectimgnm", selectimgnm);
  14. open("SMMMR03600_??????????","2","1","1","SMMMR03600_??????????");
  15. }
  16. function fSetCompView1(){
  17. // var comp = body.createChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
  18. var selectimg = document.controls(event.target);
  19. var node1 = instance1.selectSingleNode("/root/main/compimg1");
  20. var node2 = instance1.selectSingleNode("/root/main/compimg2");
  21. if(!node1){
  22. var comp = body.createChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
  23. var compdata1 = selectimg.getBase64data();
  24. model.makeValue("/root/main/compimg1", compdata1);
  25. setImageRefInstance("/root/main/compimg1");
  26. comp.refresh();
  27. } else if (!node2){
  28. var comp = body.createChild("xforms:img", "id:comp_window2; ref:/root/main/compimg2; left:0px; top:310px; width:400px; height:300px; background-stretch:stretch;");
  29. var compdata2 = selectimg.getBase64data();
  30. model.makeValue("/root/main/compimg2", compdata2);
  31. setImageRefInstance("/root/main/compimg2");
  32. comp.refresh();
  33. }
  34. }
  35. /**
  36. ?????? ???????? ???????? ???? function
  37. ???????? ?????? ?????? ????
  38. ???? ?? ?? ???? ???????? ???? ?????? 100???? ???? -> ?? ???? ???????? ???????? ???????? ?????? ?????? ????
  39. */
  40. function fSetCompView(){
  41. // var comp = body.crateChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
  42. var selectimg = document.controls(event.target);
  43. var node = new Array(100);
  44. var leftvalue = 3;
  45. //var imgref = selectimg.attribute("ref"); // ???? ?????? ?????? ???? ?? ?????? ???? ?????? ??????.
  46. if ((selectimg.attribute("border-color") != "#0000ff") && (selectimg.attribute("border-style") != "solid" )){
  47. selectimg.attribute("border-color") = "#0000ff";
  48. selectimg.attribute("border-style") = "solid";
  49. selectimg.attribute("border-width") = "2px";
  50. for(var node_count = 0; node_count < node.length; node_count++){
  51. node[node_count] = instance1.selectSingleNode("/root/main/compimge"+node_count);
  52. //alert((node[node_count] == null ? "y":"n"));
  53. var imgid = "comp_imge" + node_count;
  54. var imgref = "/root/main/compimge"+node_count;
  55. if (node[node_count] == null){
  56. var comp = group2.createChild("xforms:img", "id:"+imgid+"; ref:"+imgref+"; left:"+leftvalue+"px; top:2px; width:273px; height:210px; background-stretch:stretch;");
  57. var compdata = selectimg.getBase64data();
  58. model.makeValue("/root/main/compimge"+node_count, compdata);
  59. model.makeValue(selectimg.attribute("ref")+"/childid", imgid);
  60. //model.makeValue(imgref+"/childref", imgref);
  61. setImageRefInstance("/root/main/compimge"+node_count);
  62. model.refresh();
  63. break;
  64. }
  65. // ?? ?????? ???????? ?????????? ??, ???? ???????? display???? ???? ?????? ????
  66. // 3?? ???????? ?????? ?????? ?????? ???? ???? ??
  67. leftvalue = leftvalue + parseInt(document.controls(imgid).attribute("width")) + 3;
  68. }
  69. }else {
  70. selectimg.attribute("border-color") = "";
  71. selectimg.attribute("border-style") = "";
  72. selectimg.attribute("border-width") = "";
  73. fDelCompView(model.getValue(selectimg.attribute("ref")+"/childid"));
  74. }
  75. }
  76. function fDelCompView(ctrlid){
  77. // var comp = body.crateChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
  78. var ctrl = document.controls(ctrlid);
  79. model.removenode(ctrl.attribute("ref"));
  80. group2.removeChild(ctrlid);
  81. model.refresh();
  82. }