SMRSD00230_일반청구Set 상비품복사.xrw 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>일반청구Set 상비품복사</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <goodbaseqtylist/>
  11. <codelist>
  12. <allsizespecid/>
  13. <goodspec/>
  14. </codelist>
  15. </main>
  16. <apply/>
  17. <send>
  18. <retvcond>
  19. <instcd/>
  20. <goodflag/>
  21. <reqdeptcd/>
  22. <reqdeptnm/>
  23. <instcdnm/>
  24. <reqmthd/>
  25. </retvcond>
  26. <goodbaseqtylist/>
  27. <allsize>
  28. <goodcd/>
  29. <instcd/>
  30. <goodspec/>
  31. </allsize>
  32. </send>
  33. <init>
  34. <goodflag>
  35. <label>의료소모품</label>
  36. <value>Y</value>
  37. <label>일반소모품</label>
  38. <value>Z</value>
  39. <label>의료비품</label>
  40. <value>U</value>
  41. </goodflag>
  42. <reqmthd>
  43. <label>전체</label>
  44. <value/>
  45. <label>처방집계</label>
  46. <value>1</value>
  47. <label>일반청구</label>
  48. <value>3</value>
  49. </reqmthd>
  50. <baseflag>1</baseflag>
  51. </init>
  52. <hidden/>
  53. <copytemp/>
  54. <temp/>
  55. </root>
  56. </instance>
  57. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  59. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  60. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  61. <script type="javascript" ev:event="xforms-ready">
  62. <![CDATA[
  63. fInitialize();
  64. misfGridInit(grd_goodbaseqtylist);
  65. misfMsterDetailSet(grd_goodbaseqtylist,null,"TRRSD00102","Y");
  66. model.refresh();
  67. ]]>
  68. </script>
  69. <submission id="TRRSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retvcond" resultref="/root/main/goodbaseqtylist"/>
  70. </model>
  71. <script type="javascript">
  72. <![CDATA[
  73. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  74. function fInitialize() {
  75. model.removeNodeset("/root/main/goodbaseqtylist");
  76. model.resetInstanceNode("/root/send");
  77. model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  78. model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm"));
  79. model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  80. model.setValue(ipt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
  81. cmb_goodflag.select(0); //물품구분
  82. cmb_reqmthd.select(0); //청구방법
  83. model.refresh();
  84. }
  85. function fCheckKey()
  86. {
  87. var bool = false;
  88. //기관코드 및 물품청구 구분값 체크
  89. if( opt_instcd.value =="") {
  90. messageBox("기관코드를","C002");
  91. bool = true;
  92. } else if(cmb_goodflag.value=="") {
  93. messageBox("물품청구 구분","C002");
  94. bool = true;
  95. } else if(ipt_reqdeptcd.value=="") {
  96. messageBox("부서 코드를","C002");
  97. bool = true;
  98. }
  99. return bool
  100. }
  101. function fSettingGoodList(pnode, nodename, userqtynm){
  102. var codynode = instance1.selectNodes(pnode + "/*");
  103. var addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
  104. if(model.getValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  105. for (var j = 1; j <= codynode.length ; j++) {
  106. if((grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows == 0) || (addRow > grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows))
  107. {
  108. misfGridIUD(grd_goodbaseqtylist,"A");
  109. addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
  110. }
  111. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd" ));
  112. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm" ));
  113. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel" ));
  114. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec" ));
  115. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm" ));
  116. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/purcunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit" ));
  117. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/exchqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty" ));
  118. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/deliveunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/deliveunit" ));
  119. model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/reqmthd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" ));
  120. var sReqmThd = model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" );
  121. if(sReqmThd=="1"){
  122. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prepargodqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
  123. }else if(sReqmThd=="3"){
  124. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/basevol" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
  125. }
  126. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/ddavguseqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/ddavguseqty" ));
  127. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizespecid", model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizespecid"));
  128. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizeyn" , model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizeyn" ));
  129. model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/tmpreqflag" , model.getValue(pnode +"/" + nodename + "[" + j + "]/tmpreqflag" ));
  130. addRow = addRow + 1;
  131. }
  132. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  133. // 2009.12.29 수정 tmpreqflag 임의청구 가능여부 삭제
  134. for(var k =1;k<=grd_goodbaseqtylist.rows;k++){
  135. var Reqmthd = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/reqmthd");
  136. var Tmpreqflag = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/tmpreqflag");
  137. if(Reqmthd=="1"){ //처방집계시
  138. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
  139. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  140. }else if(Reqmthd=="3"){ //일반청구시
  141. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
  142. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  143. }
  144. }
  145. //model.removenode(pnode);
  146. model.refresh();
  147. }
  148. // --------------------------------------------------
  149. // All Size 읽어오는 함수
  150. // --------------------------------------------------
  151. var vAllSizeCol = 0;
  152. var vAllSizeRow = 0;
  153. var vAllSizePath = "/root/main/codelist";
  154. var vGoodReqPath = "/root/main/goodbaseqtylist";
  155. function fAllSizeRead(pRow, pCol, pPos) {
  156. var iClickY = pPos - 100;
  157. vAllSizeCol = pCol;
  158. vAllSizeRow = pRow;
  159. if (iClickY > 375) iClickY = iClickY - 319;
  160. grp_allsize.attribute("top") = iClickY+ "px";
  161. grp_allsize.attribute("visibility") = "visible" ;
  162. model.setValue("/root/send/allsize/instcd", model.getValue(opt_instcd.attribute("ref" )));
  163. model.setValue("/root/send/allsize/goodcd", grd_goodbaseqtylist.valueMatrix(pRow, pCol-3) );
  164. submit("TRRSD00281");
  165. grp_allsize.refresh();
  166. }
  167. // All Size 선택
  168. function fAllSizeSelect(pGrid) {
  169. grp_allsize.attribute("visibility") = "hidden" ;
  170. var vQty = "0";
  171. var vSize = "";
  172. var vSpec = "";
  173. var vModel = "";
  174. var vCheck = "";
  175. var vPath = "";
  176. var vTarget = "";
  177. var vSource = "";
  178. var vGoodcd = model.getValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodcd");
  179. for (var i = 1; i < grd_codelist.rows; i++) {
  180. if (model.getValue(vAllSizePath+"["+i+"]/chk") == "true") {
  181. vSize = model.getValue(vAllSizePath+"["+ i +"]/allsizespecid");
  182. vSpec = model.getValue(vAllSizePath+"["+ i +"]/goodspec" );
  183. vModel = model.getValue(vAllSizePath+"["+ i +"]/goodmodel" );
  184. vQty = model.getValue(vAllSizePath+"["+ i +"]/qty" );
  185. if (model.getValue(vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']" +"/goodcd") == "") {
  186. if (vCheck == "") {
  187. vCheck = "Y";
  188. vTarget = vGoodReqPath+"["+(vAllSizeRow)+"]" ;
  189. if (pGrid.rowStatus(vAllSizeRow) == 0)
  190. pGrid.rowStatus(vAllSizeRow) = 2 ;
  191. } else {
  192. misfGridIUD(pGrid,"A");
  193. addRow = pGrid.rows - pGrid.fixedRows;
  194. //fDefaultSetting(addRow);
  195. vTarget = pGrid.nodeset + "[" + addRow + "]/";
  196. vSource = vGoodReqPath + "[" + vAllSizeRow + "]/";
  197. fSettingGoodData(vTarget, vSource);
  198. pGrid.cellstyle("background-color" , addRow, 9) = "#FFFF00";
  199. }
  200. } else {
  201. vPath = vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']";
  202. }
  203. //
  204. if (vQty == "") {
  205. vQty = "1";
  206. }
  207. model.setValue(vTarget + "/allsizeyn" , "Y" );
  208. model.setValue(vTarget + "/allsizespecid" , vSize );
  209. model.setValue(vTarget + "/goodspec" , vSpec );
  210. model.setValue(vTarget + "/goodmodel" , vModel);
  211. if (model.getValue(cmb_reqmthd.attribute("ref"))=="1") {
  212. model.setValue(vTarget + "/basevol" , "0" );
  213. model.setValue(vTarget + "/prepargodqty", vQty );
  214. } else {
  215. model.setValue(vTarget + "/basevol" , vQty );
  216. model.setValue(vTarget + "/prepargodqty", "0" );
  217. }
  218. }
  219. }
  220. pGrid.refresh();
  221. }
  222. //
  223. function fSettingGoodData(pTarget, pSource) {
  224. model.setValue(pTarget + "goodcd" , model.getValue(pSource + "goodcd" ));
  225. model.setValue(pTarget + "allsizespecid" , model.getValue(pSource + "allsizespecid" ));
  226. model.setValue(pTarget + "goodnm" , model.getValue(pSource + "goodnm" ));
  227. model.setValue(pTarget + "goodspec" , model.getValue(pSource + "goodspec" ));
  228. model.setValue(pTarget + "goodmodel" , model.getValue(pSource + "goodmodel" ));
  229. model.setValue(pTarget + "prodcmpynm" , model.getValue(pSource + "prodcmpynm" ));
  230. model.setValue(pTarget + "purcunit" , model.getValue(pSource + "purcunit" ));
  231. model.setValue(pTarget + "exchqty" , model.getValue(pSource + "exchqty" ));
  232. model.setValue(pTarget + "deliveunit" , model.getValue(pSource + "deliveunit" ));
  233. model.setValue(pTarget + "basevol" , model.getValue(pSource + "basevol" ));
  234. model.setValue(pTarget + "prepargodqty" , model.getValue(pSource + "prepargodqty" ));
  235. model.setValue(pTarget + "cmt" , model.getValue(pSource + "cmt" ));
  236. model.setValue(pTarget + "ddavguseqty" , model.getValue(pSource + "ddavguseqty" ));
  237. model.setValue(pTarget + "instcd" , model.getValue(pSource + "instcd" ));
  238. model.setValue(pTarget + "goodflag" , model.getValue(pSource + "goodflag" ));
  239. model.setValue(pTarget + "reqdeptcd" , model.getValue(pSource + "reqdeptcd" ));
  240. model.setValue(pTarget + "lrgcd" , model.getValue(pSource + "lrgcd" ));
  241. model.setValue(pTarget + "allsizeyn" , model.getValue(pSource + "allsizeyn" ));
  242. // model.setValue(pTarget + "oallsizespecid", model.getValue(pSource + "oallsizespecid"));
  243. }
  244. ]]>
  245. </script>
  246. </xhtml:head>
  247. <xhtml:body pagewidth="1170" pageheight="600" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  248. <group id="grp_tle" style="left:0px; top:0px; width:1150; height:13px; ">
  249. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">일반청구Set 상비품복사</caption>
  250. </group>
  251. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1150px; height:585px; ">
  252. <group id="grp_sea" style="left:0px; top:10px; width:1145px; height:60px; vertical-align:top; ">
  253. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1144px; height:58px; background-color:#fffbf2; border-color:#ffd799; "/>
  254. <caption id="caption2" class="search_name" style="left:25px; top:9px; width:89px; height:17px; ">기관코드 :</caption>
  255. <caption id="caption3" class="search_name" style="left:636px; top:9px; width:86px; height:17px; ">부 서 :</caption>
  256. <button id="btn_search" class="btn1_letter2" style="left:1030px; top:20px; width:56px; height:22px; ">
  257. <caption>조회</caption>
  258. <script type="javascript" ev:event="DOMActivate">
  259. <![CDATA[
  260. if(fCheckKey())
  261. {
  262. return;
  263. }
  264. misfMsterDetailRetrieve();
  265. ]]>
  266. </script>
  267. </button>
  268. <select1 id="cmb_goodflag" ref="/root/send/retvcond/goodflag" class="combo_s_essential" appearance="minimal" style="left:435px; top:9px; width:145px; height:19px; ">
  269. <choices>
  270. <itemset nodeset="/root/init/goodflag">
  271. <label ref="label"/>
  272. <value ref="value"/>
  273. </itemset>
  274. </choices>
  275. <script type="javascript" ev:event="xforms-value-changed">
  276. <![CDATA[
  277. btn_search.dispatch("DOMActivate");
  278. ]]>
  279. </script>
  280. </select1>
  281. <input id="ipt_reqdeptcd" ref="/root/send/retvcond/reqdeptcd" class="input_s_essential" style="left:720px; top:9px; width:100px; height:19px; ">
  282. <script type="javascript" ev:event="xforms-value-changed">
  283. <![CDATA[
  284. if(ipt_reqdeptcd.value.length == 0)
  285. ipt_reqdeptnm.value = "";
  286. else
  287. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  288. model.refresh();
  289. ]]>
  290. </script>
  291. </input>
  292. <button id="btn_reqdeptcd" class="icon_search" style="left:825px; top:12px; width:16px; height:16px; ">
  293. <caption/>
  294. <script type="javascript" ev:event="DOMActivate">
  295. <![CDATA[
  296. var recv_list = "reqdeptcd,reqdeptnm";
  297. misfOpenPopUpList("02", ipt_reqdeptcd,"",recv_list);
  298. model.refresh();
  299. ]]>
  300. </script>
  301. </button>
  302. <input id="ipt_reqdeptnm" ref="/root/send/retvcond/reqdeptnm" class="input_fix" appearance="input" style="left:720px; top:32px; width:235px; height:19px; ">
  303. <script type="javascript" ev:event="xforms-value-changed">
  304. <![CDATA[
  305. if(ipt_reqdeptnm.value.length == 0)
  306. ipt_reqdeptcd.value = "";
  307. else
  308. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  309. model.refresh();
  310. ]]>
  311. </script>
  312. </input>
  313. <caption id="caption7" class="search_name" style="left:350px; top:9px; width:94px; height:17px; ">물품구분 :</caption>
  314. <line id="line3" class="line_4" style="x1:1015px; y1:9px; x2:1015px; y2:51px; border-color:#ffe4bb; border-left-style:solid; "/>
  315. <output id="opt_instcd" ref="/root/send/retvcond/instcd" class="output_fix" visibility="hidden" style="left:284px; top:9px; width:30px; height:19px; "/>
  316. <output id="opt_instcdnm" ref="/root/send/retvcond/instcdnm" class="output_search" style="left:110px; top:9px; width:165px; height:19px; text-align:center; "/>
  317. <select1 id="cmb_reqmthd" ref="/root/send/retvcond/reqmthd" class="combo_s_essential" appearance="minimal" style="left:435px; top:32px; width:145px; height:19px; ">
  318. <choices>
  319. <itemset nodeset="/root/init/reqmthd">
  320. <label ref="label"/>
  321. <value ref="value"/>
  322. </itemset>
  323. </choices>
  324. </select1>
  325. <caption id="caption1" class="search_name" style="left:350px; top:32px; width:94px; height:17px; ">청구방법 :</caption>
  326. </group>
  327. <line id="line1" class="line_1" style="x1:0px; y1:106px; x2:630px; y2:106px; "/>
  328. <caption id="cap_titlist" class="tit_2" style="left:3px; top:91px; width:190px; height:13px; ">부서 상비품 List</caption>
  329. <caption id="caption8" style="left:237px; top:90px; width:66px; height:14px; font-weight:bold; ">적용구분 :</caption>
  330. <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtylist" allowuserresize="false" caption="Chk^물품코드^물품코드^물품명^규격^모델^안전재고^상비품^단위^청구구분^물품구분^" colsep="^" colwidth="31, 66, 25, 218, 46, 46, 60, 60, 35, 10, 10, 12, 10, 13, 34" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:111px; width:630px; height:472px; ">
  331. <col ref="select" type="checkbox"/>
  332. <col ref="goodcd"/>
  333. <col ref="allsizespecid" style="text-align:center; "/>
  334. <col ref="goodnm"/>
  335. <col ref="goodspec"/>
  336. <col ref="goodmodel"/>
  337. <col ref="basevol" format="#,###" style="text-align:right; background-color:#ccffcc; "/>
  338. <col ref="prepargodqty" format="#,###" style="text-align:right; background-color:#ffcc99; "/>
  339. <col ref="deliveunit" style="text-align:center; "/>
  340. <col ref="reqflag" visibility="hidden"/>
  341. <col ref="reqflagnm" visibility="hidden"/>
  342. <col ref="goodflag" visibility="hidden"/>
  343. <col ref="instcd" visibility="hidden"/>
  344. <col ref="reqprid" visibility="hidden"/>
  345. <col ref="reqpridnm" visibility="hidden"/>
  346. <script type="javascript" ev:event="onaftersort">
  347. <![CDATA[
  348. grd_goodbaseqtylist.gridToInstance();
  349. ]]>
  350. </script>
  351. </datagrid>
  352. <button id="btn_listcopy" class="btn4_letter2" style="left:575px; top:83px; width:56px; height:22px; ">
  353. <caption>선택</caption>
  354. <script type="javascript" ev:event="DOMActivate">
  355. <![CDATA[
  356. if(grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows == 0)
  357. {
  358. messageBox("적용할 내역이","I004");
  359. return;
  360. }
  361. model.resetInstanceNode("/root/copytemp");
  362. var varcopy = instance1.selectNodes(grd_goodbaseqtylist.nodeset + "[select='true']");
  363. var rCSV = getNodeListCSV(varcopy);
  364. model.setValue("/root/copytemp", rCSV);
  365. var CSV = model.getValue("/root/copytemp");
  366. setCSVToNode("/root/apply", CSV, "goodapplist");
  367. model.refresh();
  368. var vQty = "";
  369. for (var row = grd_apply.fixedRows ; row < grd_apply.rows; row++)
  370. {
  371. model.setValue(grd_apply.nodeset + "[" + row + "]/select" , "false");
  372. if (model.getValue(rdo_baseflag.attribute("ref")) == "1" ) {
  373. vQty = model.getValue(grd_apply.nodeset +"[" + row+ "]/basevol") ; // 안전재고량
  374. } else {
  375. vQty = model.getValue(grd_apply.nodeset +"[" + row+ "]/prepargodqty") ; // 상비품량
  376. }
  377. //
  378. if (vQty == "" || vQty == "0" ) {
  379. vQty ="1";
  380. }
  381. //
  382. model.setValue(grd_apply.nodeset + "[" + row + "]/userqty" ,vQty);
  383. grd_apply.rowStatus(row) = 1;
  384. }
  385. for (var row = grd_goodbaseqtylist.fixedRows ; row < grd_goodbaseqtylist.rows; row++)model.setValue(grd_goodbaseqtylist.nodeset + "[" + row + "]/select" , "false");
  386. model.refresh();
  387. ]]>
  388. </script>
  389. </button>
  390. <button id="btn_delete" class="btn2_letter2" style="left:983px; top:85px; width:42px; height:19px; ">
  391. <caption>삭제</caption>
  392. <script type="javascript" ev:event="DOMActivate">
  393. <![CDATA[
  394. for(var currow = grd_apply.rows ; currow > 0; currow--)
  395. if(grd_apply.valueMatrix(currow, grd_apply.colRef("select")) == "true") grd_apply.deleteRow(currow,true);
  396. ]]>
  397. </script>
  398. </button>
  399. <caption id="caption10" class="tit_2" style="left:640px; top:91px; width:145px; height:13px; ">선택리스트</caption>
  400. <line id="line2" class="line_1" style="x1:635px; y1:106px; x2:1146px; y2:106px; "/>
  401. <datagrid id="grd_apply" nodeset="/root/apply/goodapplist" class="grd_agtplcelist" caption="Chk^물품코드^물품코드^물품명^규격^모델^수량^단위^청구구분^청구구분^물품구분^청구주기^청구주기명^기관" colsep="^" colwidth="31, 66, 25, 158, 70, 54, 60, 35, 21, 15, 36, 30, 27, 34" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" tooltip="true" style="left:635px; top:111px; width:511px; height:472px; ">
  402. <col ref="select" type="checkbox"/>
  403. <col ref="goodcd"/>
  404. <col ref="allsizespecid" style="text-align:center; "/>
  405. <col ref="goodnm"/>
  406. <col ref="goodspec"/>
  407. <col ref="goodmodel"/>
  408. <col ref="userqty" type="input" format="#,###" style="text-align:right; background-color:#ccffcc; "/>
  409. <col ref="deliveunit"/>
  410. <col ref="reqflag" visibility="hidden"/>
  411. <col ref="reqflagnm" visibility="hidden"/>
  412. <col ref="goodflag" visibility="hidden"/>
  413. <col ref="reqprid" visibility="hidden"/>
  414. <col ref="reqpridnm" visibility="hidden"/>
  415. <col ref="instcd" visibility="hidden"/>
  416. <script type="javascript" ev:event="onaftersort">
  417. <![CDATA[
  418. grd_apply.gridToInstance();
  419. ]]>
  420. </script>
  421. </datagrid>
  422. <button id="btn_save" class="btn4_letter2" style="left:1089px; top:83px; width:56px; height:22px; ">
  423. <caption>적용</caption>
  424. <script type="javascript" ev:event="DOMActivate">
  425. <![CDATA[
  426. if (grd_apply.rows - grd_apply.fixedRows == 0)
  427. {
  428. messageBox("적용할 내역이","I004");
  429. window.close();
  430. return;
  431. }
  432. var iParam = model.getValue(grd_apply.nodeset);
  433. var nodelist = instance1.selectNodes(grd_apply.nodeset);
  434. var rCVS = getNodeListCSV(nodelist);
  435. if ( checkOpener() ) {
  436. opener.javascript.setParameter("SMRSD00230_", rCVS);
  437. } else {
  438. var rtn = messageBox("상위화면을 찾을 수", "E001");
  439. }
  440. window.close();
  441. ]]>
  442. </script>
  443. </button>
  444. <select1 id="rdo_baseflag" ref="/root/init/baseflag" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:301px; top:89px; width:185px; height:15px; border-style:none; ">
  445. <choices>
  446. <item>
  447. <label>안전재고량</label>
  448. <value>1</value>
  449. </item>
  450. <item>
  451. <label>상비품량</label>
  452. <value>2</value>
  453. </item>
  454. </choices>
  455. </select1>
  456. <button id="btn_cancel" class="btn4_letter2" style="left:1030px; top:83px; width:56px; height:22px; ">
  457. <caption>취소</caption>
  458. <script type="javascript" ev:event="DOMActivate">
  459. <![CDATA[
  460. window.close();
  461. ]]>
  462. </script>
  463. </button>
  464. </group>
  465. </xhtml:body>
  466. </xhtml:html>