MRF01700.xjs 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[
  3. /**
  4. * @desc : 누적리스트 조회
  5. * @
  6. * @param :
  7. * @return :
  8. * @---------------------------------------------------
  9. */
  10. function fReqValue(condPath){
  11. // fSetCtrlDisabled2(true)
  12. var mode = ds_main_condition.getColumn(0, "reqgrupflag");
  13. if(mode == "code")
  14. {
  15. ds_main_condition.setColumn(0, "grupcd", ds_main_condition.getColumn(0, "grupnm"));
  16. }
  17. ds_main_condition.setColumn(0, "grupflag", "G");
  18. ds_send_reqdata.copyData(ds_main_condition);
  19. var oParam = {};
  20. oParam.id = "TRMRF00901";
  21. oParam.service = "formmngtapp.GridMngt";
  22. oParam.method = "reqGetGrupList";
  23. oParam.inds = "req=ds_send_reqdata";
  24. oParam.outds = "ds_main_gruplist=gruplist";
  25. oParam.async = false;
  26. tranf_submit(oParam);
  27. }
  28. function fSelectGrid(destGrdID, srcGrdID)
  29. {
  30. var destModel = null;
  31. var destGrd = null;
  32. var srcGrd = null;
  33. // destModel = opener.model;
  34. destGrd = opener.components[destGrdID];
  35. srcGrd = this.components[srcGrdID];
  36. if(utlf_isNull(srcGrd)){
  37. return;
  38. }
  39. var srcDataset:Dataset;
  40. srcDataset = eval(srcGrd.binddataset);
  41. var iRow = ds_main_gruplist.rowposition;
  42. if(iRow < 0)
  43. return;
  44. //var pageInfo = new PAGEINFO();
  45. var grupcd = ds_main_gruplist.getColumn(iRow, "grupcd");
  46. var grupnm = ds_main_gruplist.getColumn(iRow, "grupnm");
  47. opener.frmf_setParameter("grupnm", grupnm);
  48. opener.frmf_setParameter("grupcd", grupcd);
  49. if(utlf_isNull(destGrd))
  50. {
  51. this.close();
  52. return;
  53. }
  54. //해당 케이스 있을경우 주석 처리 되어 있는 부분 수정해야됨...
  55. // var destDataset:Dataset;
  56. // destDataset = eval(destGrd.binddataset);
  57. //
  58. // var destCurRow = destDataset.rowposition;
  59. // if(destCurRow < 0)
  60. // return;
  61. //
  62. // var gridtype = ds_main_gruplist.getColumn(iRow, "grupflag");
  63. // dsf_makeValue(opener.destDataset, "valgrupcd", "string", grupcd, destCurRow);
  64. // dsf_makeValue(opener.destDataset, "valgrupnm", "string", grupnm, destCurRow);
  65. //
  66. // var attrVal = opener.destDataset.getColumn(destCurRow, "degnitemattrval");
  67. // attrVal = setStyleValue(attrVal, "gridtype", gridtype);
  68. // dsf_makeValue(opener.destDataset, "itemattrval", "string", attrVal, destCurRow);
  69. //
  70. // var formdegnseq = destModel.getValue(pageInfo.formmastRef + "/formdegnseq");
  71. // var supdegnitemno = destModel.getValue(destGrd.attribute("nodeset") + "[" + destCurRow + "]/degnitemno");
  72. // var supdegnitemcd = destModel.getValue(destGrd.attribute("nodeset") + "[" + destCurRow + "]/degnitemcd");
  73. // var degnitemno = destModel.getXPathValue("max(" + destGrd.attribute("nodeset") + "/degnitemno)");
  74. // if(degnitemno == "NaN")
  75. // degnitemno = 1;
  76. //
  77. // var degnrowno = destModel.getXPathValue("max(" + destGrd.attribute("nodeset") + "/degnrowno)");
  78. // if(degnrowno == "NaN")
  79. // degnrowno = 1;
  80. //
  81. // var degnitemlevlno = parseInt(destModel.getValue(destGrd.attribute("nodeset") + "[" + destCurRow + "]/degnitemlevlno")) + 1;
  82. // //alert(degnitemlevlno);
  83. // var nextRow = -1;
  84. // var nextItemNo = destModel.getValue(destGrd.attribute("nodeset") + "[degnitemlevlno <= " + (degnitemlevlno - 1) + " and position() > " + destCurRow + "]/degnitemno");
  85. // if(nextItemNo == '')
  86. // nextRow = destGrd.rows;
  87. // else
  88. // nextRow = destGrd.findRow(nextItemNo, destCurRow + 1, destGrd.colRef("degnitemno"));
  89. //
  90. // for(var i = nextRow - 1; i >= destCurRow + 1; i--)
  91. // {
  92. // destGrd.deleteRow(i);
  93. // }
  94. // destGrd.rebuild();
  95. //
  96. // for(var i = 0; i < srcGrd.Rows - srcGrd.FixedRows; i++)
  97. // {
  98. // destGrd.insertRow(destCurRow + i, "after", false);
  99. // var srcPath = srcGrd.attribute("nodeset") + "[" + (i + 1) + "]";
  100. // var destPath = destGrd.attribute("nodeset") + "[" + (destCurRow + i + 1) + "]";
  101. // var degnitemlevlcd = destModel.getValue(destGrd.attribute("nodeset") + "[" + destCurRow + "]/degnitemlevlcd") + "." + model.getValue(srcPath + "/itemcd").substr(0,7);
  102. // degnitemno = parseInt(degnitemno) + i + 1;
  103. // degnrowno = parseInt(degnrowno) + i + 1;
  104. //
  105. // //destModel.makeValue(destPath + "/formbasecd" , formbasecd );
  106. // //destModel.makeValue(destPath + "/degnhistno" , "" );
  107. // destModel.makeValue(destPath + "/formdegnseq" , formdegnseq );
  108. // destModel.makeValue(destPath + "/degnitemno" , degnitemno );
  109. // destModel.makeValue(destPath + "/degnitemkind" , "GSU" );
  110. // destModel.makeValue(destPath + "/degnitemcd" , model.getValue(srcPath + "/itemcd") );
  111. // destModel.makeValue(destPath + "/termcd" , "" );
  112. // destModel.makeValue(destPath + "/degnitemnm" , model.getValue(srcPath + "/itemnm") );
  113. // destModel.makeValue(destPath + "/supdegnitemno" , supdegnitemno );
  114. // destModel.makeValue(destPath + "/supdegnitemcd" , supdegnitemcd );
  115. // destModel.makeValue(destPath + "/degnitemlevlno" , degnitemlevlno );
  116. // destModel.makeValue(destPath + "/degnitemlevlcd" , degnitemlevlcd );
  117. // destModel.makeValue(destPath + "/valgrupcd" , "" );
  118. // destModel.makeValue(destPath + "/valgrupnm" , "" );
  119. // destModel.makeValue(destPath + "/unitcd" , "" );
  120. // destModel.makeValue(destPath + "/unitnm" , "" );
  121. // destModel.makeValue(destPath + "/degnitemdefltval", "" );
  122. // destModel.makeValue(destPath + "/degncntrviewflag", "A" );
  123. // destModel.makeValue(destPath + "/userdegnyn" , "N" );
  124. // destModel.makeValue(destPath + "/degnxval" , "0" );
  125. // destModel.makeValue(destPath + "/degnyval" , "0" );
  126. // destModel.makeValue(destPath + "/degnrowno" , destCurRow + i + 1 );
  127. // destModel.makeValue(destPath + "/essndegnyn" , "N" );
  128. // destModel.makeValue(destPath + "/essnrecyn" , "N" );
  129. // destModel.makeValue(destPath + "/degnattrval" , "" );
  130. //
  131. // attrVal = destModel.getValue(destPath + "/itemattrval");
  132. // attrVal = setStyleValue(attrVal, "axflag", model.getValue(srcPath + "/axflag"));
  133. //
  134. // var inptkind = model.getValue(srcPath + "/inptkind");
  135. // switch(inptkind)
  136. // {
  137. // case "1": // OUTPUT
  138. // attrVal += "axtype:OUTPUT;";
  139. // break;
  140. // case "2": // INPUT
  141. // attrVal += "axtype:INPUT;";
  142. // break;
  143. // case "3": // INPUT+BUTTON
  144. // attrVal += "axtype:INPUT+BUTTON;";
  145. // break;
  146. // case "4": // INPUT+DATE
  147. // attrVal += "axtype:INPUT+DATE;";
  148. // break;
  149. // case "5": // COMBO
  150. // attrVal += "axtype:COMBO;";
  151. // break;
  152. // case "6": // CHECKBOX
  153. // attrVal += "axtype:CHECKBOX;";
  154. // break;
  155. // case "7": // RADIO
  156. // attrVal += "axtype:RADIO;";
  157. // break;
  158. // }
  159. //
  160. // destModel.makeValue(destPath + "/itemattrval", attrVal);
  161. //
  162. // //destModel.makeValue(destPath + "/degnitemlevlno", degnitemlevlno);
  163. // //destModel.makeValue(destPath + "/degnitemrowno", degnitemrowno);
  164. // //destModel.makeValue(destPath + "/subitemseq", model.getValue(srcPath + "/subitemseq"));
  165. // }
  166. // destGrd.rebuild();
  167. //
  168. // for(var j = destCurRow + srcGrd.Rows - srcGrd.FixedRows; j < destGrd.Rows - destGrd.FixedRows; j++)
  169. // {
  170. // var destPath = destGrd.attribute("nodeset") + "[" + (j + 1) + "]";
  171. // destModel.setValue(destPath + "/degnrowno" , j + 1 );
  172. // }
  173. //
  174. //
  175. // setTree(destGrd, destGrd.colref("degnitemlevlno"), destGrd.colref("degnitemcd"), true);
  176. // model.close();
  177. }
  178. /**
  179. * @desc : 누적서브리스트 조회
  180. * @
  181. * @param : grdObj 그리드 ID, condPath 조회조건 xpath
  182. * @return :
  183. * @---------------------------------------------------
  184. */
  185. function fReqValueSub(grdObj, condPath:Dataset){
  186. var datasetObj:Dataset;
  187. datasetObj = eval(grdObj.binddataset);
  188. var curRow = datasetObj.rowposition;
  189. ds_main_condition.setColumn(0, "grupcd", ds_main_gruplist.getColumn(curRow, "grupcd"));
  190. ds_main_condition.setColumn(0, "grupflag", ds_main_gruplist.getColumn(curRow, "grupflag"));
  191. ds_send_reqdata.copyData(condPath);
  192. var oParam = {};
  193. oParam.id = "TRMRF00902";
  194. oParam.service = "formmngtapp.GridMngt";
  195. oParam.method = "reqGetGridSubList";
  196. oParam.inds = "req=ds_send_reqdata";
  197. oParam.outds = "ds_main_gridsublist=gridsublist";
  198. oParam.async = false;
  199. tranf_submit(oParam);
  200. }]]></Script>