SMRSD00600_부서별 정량보충 기준량 등록.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  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>부서별 기준량 등록</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. <send>
  17. <retvcond>
  18. <instcd/>
  19. <goodflag/>
  20. <reqdeptcd/>
  21. <reqdeptnm/>
  22. <instcdnm/>
  23. <reqmthd/>
  24. <purcflag/>
  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. <label>약품</label>
  42. <value>P</value>
  43. </goodflag>
  44. <reqmthd>
  45. <label>전체</label>
  46. <value/>
  47. <label>처방집계</label>
  48. <value>1</value>
  49. <label>일반청구</label>
  50. <value>3</value>
  51. </reqmthd>
  52. </init>
  53. <hidden/>
  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. //화면 권한 설정
  67. btn_save.disabled = !(checkAuth("X"));
  68. // btn_prt.disabled= !(checkAuth("P"));
  69. model.refresh();
  70. ]]>
  71. </script>
  72. <submission id="TRRSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retvcond" resultref="/root/main/goodbaseqtylist"/>
  73. <submission id="TRRSD00281" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/allsize" resultref="/root/main/codelist"/>
  74. <submission id="TXRSD00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  75. </model>
  76. <script type="javascript">
  77. <![CDATA[
  78. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  79. function fInitialize() {
  80. // misfComboComCdListMulti("R0111", "cmb_purcflag"); //구매구분
  81. misfComboComCdList('R0111', cmb_purcflag, "Y"); //구매구분
  82. model.removeNodeset("/root/main/goodbaseqtylist");
  83. model.resetInstanceNode("/root/send");
  84. model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  85. model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm"));
  86. model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  87. model.setValue(ipt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
  88. cmb_goodflag.select(0); //물품구분
  89. cmb_reqmthd.select(0); //청구방법
  90. model.refresh();
  91. }
  92. function fCheckKey()
  93. {
  94. var bool = false;
  95. //기관코드 및 물품청구 구분값 체크
  96. if( opt_instcd.value =="") {
  97. messageBox("기관코드를","C002");
  98. bool = true;
  99. } else if(cmb_goodflag.value=="") {
  100. messageBox("물품청구 구분","C002");
  101. bool = true;
  102. } else if(ipt_reqdeptcd.value=="") {
  103. messageBox("부서 코드를","C002");
  104. bool = true;
  105. }
  106. return bool
  107. }
  108. function fSettingGoodList(pnode, nodename, userqtynm){
  109. var codynode = instance1.selectNodes(pnode + "/*");
  110. var addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
  111. if(model.getValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  112. for (var j = 1; j <= codynode.length ; j++) {
  113. if((grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows == 0) || (addRow > grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows))
  114. {
  115. misfGridIUD(grd_goodbaseqtylist,"A");
  116. addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
  117. }
  118. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd" ));
  119. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm" ));
  120. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel" ));
  121. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec" ));
  122. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm" ));
  123. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/purcunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit" ));
  124. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/exchqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty" ));
  125. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/deliveunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/deliveunit" ));
  126. model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/reqmthd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" ));
  127. var sReqmThd = model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" );
  128. if(sReqmThd=="1"){
  129. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prepargodqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
  130. }else if(sReqmThd=="3"){
  131. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/basevol" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
  132. }
  133. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/ddavguseqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/ddavguseqty" ));
  134. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizespecid", model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizespecid"));
  135. model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizeyn" , model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizeyn" ));
  136. model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/tmpreqflag" , model.getValue(pnode +"/" + nodename + "[" + j + "]/tmpreqflag" ));
  137. addRow = addRow + 1;
  138. }
  139. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  140. // 2009.12.29 수정 tmpreqflag 임의청구 가능여부 삭제
  141. for(var k =1;k<=grd_goodbaseqtylist.rows;k++){
  142. var Reqmthd = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/reqmthd");
  143. var Tmpreqflag = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/tmpreqflag");
  144. if(Reqmthd=="1"){ //처방집계시
  145. model.setValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/basevol" , "0" );
  146. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
  147. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  148. }else if(Reqmthd=="3"){ //일반청구시
  149. model.setValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/prepargodqty" , "0");
  150. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
  151. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  152. }
  153. }
  154. //model.removenode(pnode);
  155. model.refresh();
  156. }
  157. // --------------------------------------------------
  158. // All Size 읽어오는 함수
  159. // --------------------------------------------------
  160. var vAllSizeCol = 0;
  161. var vAllSizeRow = 0;
  162. var vAllSizePath = "/root/main/codelist";
  163. var vGoodReqPath = "/root/main/goodbaseqtylist";
  164. function fAllSizeRead(pRow, pCol, pPos) {
  165. var iClickY = pPos - 100;
  166. vAllSizeCol = pCol;
  167. vAllSizeRow = pRow;
  168. if (iClickY > 375) iClickY = iClickY - 319;
  169. grp_allsize.attribute("top") = iClickY+ "px";
  170. grp_allsize.attribute("visibility") = "visible" ;
  171. model.setValue("/root/send/allsize/instcd", model.getValue(opt_instcd.attribute("ref" )));
  172. model.setValue("/root/send/allsize/goodcd", grd_goodbaseqtylist.valueMatrix(pRow, pCol-3) );
  173. submit("TRRSD00281");
  174. grp_allsize.refresh();
  175. }
  176. // All Size 선택
  177. function fAllSizeSelect(pGrid) {
  178. grp_allsize.attribute("visibility") = "hidden" ;
  179. var vQty = "0";
  180. var vSize = "";
  181. var vSpec = "";
  182. var vModel = "";
  183. var vCheck = "";
  184. var vPath = "";
  185. var vTarget = "";
  186. var vSource = "";
  187. var vGoodcd = model.getValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodcd");
  188. for (var i = 1; i < grd_codelist.rows; i++) {
  189. if (model.getValue(vAllSizePath+"["+i+"]/chk") == "true") {
  190. vSize = model.getValue(vAllSizePath+"["+ i +"]/allsizespecid");
  191. vSpec = model.getValue(vAllSizePath+"["+ i +"]/goodspec" );
  192. vModel = model.getValue(vAllSizePath+"["+ i +"]/goodmodel" );
  193. vQty = model.getValue(vAllSizePath+"["+ i +"]/qty" );
  194. if (model.getValue(vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']" +"/goodcd") == "") {
  195. if (vCheck == "") {
  196. vCheck = "Y";
  197. vTarget = vGoodReqPath+"["+(vAllSizeRow)+"]" ;
  198. if (pGrid.rowStatus(vAllSizeRow) == 0)
  199. pGrid.rowStatus(vAllSizeRow) = 2 ;
  200. } else {
  201. misfGridIUD(pGrid,"A");
  202. addRow = pGrid.rows - pGrid.fixedRows;
  203. //fDefaultSetting(addRow);
  204. vTarget = pGrid.nodeset + "[" + addRow + "]/";
  205. vSource = vGoodReqPath + "[" + vAllSizeRow + "]/";
  206. fSettingGoodData(vTarget, vSource);
  207. pGrid.cellstyle("background-color" , addRow, 9) = "#FFFF00";
  208. }
  209. } else {
  210. vPath = vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']";
  211. }
  212. //
  213. if (vQty == "") {
  214. vQty = "1";
  215. }
  216. model.setValue(vTarget + "/allsizeyn" , "Y" );
  217. model.setValue(vTarget + "/allsizespecid" , vSize );
  218. model.setValue(vTarget + "/goodspec" , vSpec );
  219. model.setValue(vTarget + "/goodmodel" , vModel);
  220. if (model.getValue(cmb_reqmthd.attribute("ref"))=="1") {
  221. model.setValue(vTarget + "/basevol" , "0" );
  222. model.setValue(vTarget + "/prepargodqty", vQty );
  223. } else {
  224. model.setValue(vTarget + "/basevol" , vQty );
  225. model.setValue(vTarget + "/prepargodqty", "0" );
  226. }
  227. }
  228. }
  229. pGrid.refresh();
  230. }
  231. //
  232. function fSettingGoodData(pTarget, pSource) {
  233. model.setValue(pTarget + "goodcd" , model.getValue(pSource + "goodcd" ));
  234. model.setValue(pTarget + "allsizespecid" , model.getValue(pSource + "allsizespecid" ));
  235. model.setValue(pTarget + "goodnm" , model.getValue(pSource + "goodnm" ));
  236. model.setValue(pTarget + "goodspec" , model.getValue(pSource + "goodspec" ));
  237. model.setValue(pTarget + "goodmodel" , model.getValue(pSource + "goodmodel" ));
  238. model.setValue(pTarget + "prodcmpynm" , model.getValue(pSource + "prodcmpynm" ));
  239. model.setValue(pTarget + "purcunit" , model.getValue(pSource + "purcunit" ));
  240. model.setValue(pTarget + "exchqty" , model.getValue(pSource + "exchqty" ));
  241. model.setValue(pTarget + "deliveunit" , model.getValue(pSource + "deliveunit" ));
  242. model.setValue(pTarget + "basevol" , model.getValue(pSource + "basevol" ));
  243. model.setValue(pTarget + "prepargodqty" , model.getValue(pSource + "prepargodqty" ));
  244. model.setValue(pTarget + "cmt" , model.getValue(pSource + "cmt" ));
  245. model.setValue(pTarget + "ddavguseqty" , model.getValue(pSource + "ddavguseqty" ));
  246. model.setValue(pTarget + "instcd" , model.getValue(pSource + "instcd" ));
  247. model.setValue(pTarget + "goodflag" , model.getValue(pSource + "goodflag" ));
  248. model.setValue(pTarget + "reqdeptcd" , model.getValue(pSource + "reqdeptcd" ));
  249. model.setValue(pTarget + "lrgcd" , model.getValue(pSource + "lrgcd" ));
  250. model.setValue(pTarget + "allsizeyn" , model.getValue(pSource + "allsizeyn" ));
  251. // model.setValue(pTarget + "oallsizespecid", model.getValue(pSource + "oallsizespecid"));
  252. }
  253. function fAllSizeSelect_2(pRow) {
  254. grp_allsize.attribute("visibility") = "hidden" ;
  255. if (pRow < 1) return;
  256. model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/allsizespecid", model.getValue(vAllSizePath+"["+(pRow)+"]/allsizespecid"));
  257. model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodspec" , model.getValue(vAllSizePath+"["+(pRow)+"]/goodspec" ));
  258. model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodmodel" , model.getValue(vAllSizePath+"["+(pRow)+"]/goodmodel" ));
  259. if(grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) == "0") grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) = "2";
  260. grd_goodbaseqtylist.refresh();
  261. }
  262. function fGridChange ( pValue ) {
  263. if( pValue == "1" ) // 처방 집계 물품 상비품량 항목 활성화 / 안전재고 항목 비활성화
  264. {
  265. cap_titlist.value = "부서 상비품 List";
  266. //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  267. //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("basevol")) = true;
  268. }
  269. else // 일반청구 물품.. 상비품량 항목 비활성화 / 안전재고 항목 활성화
  270. {
  271. cap_titlist.value = "부서 안전재고 List";
  272. //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  273. //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("basevol")) = false;
  274. }
  275. }
  276. ]]>
  277. </script>
  278. </xhtml:head>
  279. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  280. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  281. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">부서별 기준량 등록</caption>
  282. </group>
  283. <group id="grp_biz" scroll="auto" style="left:0px; top:15px; width:1195px; height:767px; ">
  284. <group id="grp_sea" style="left:0px; top:15px; width:1195px; height:55px; vertical-align:top; ">
  285. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
  286. <caption id="caption2" class="search_name" style="left:15px; top:7px; width:89px; height:17px; ">기관코드 :</caption>
  287. <caption id="caption3" class="search_name" style="left:605px; top:30px; width:86px; height:17px; ">부 서 :</caption>
  288. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:20px; width:56px; height:22px; ">
  289. <caption>조회</caption>
  290. <script type="javascript" ev:event="DOMActivate">
  291. <![CDATA[
  292. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  293. if ( updtdata != "") {
  294. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  295. if (ret != 6) { // not OK
  296. return;
  297. }
  298. }
  299. if(fCheckKey())
  300. {
  301. return;
  302. }
  303. misfMsterDetailRetrieve();
  304. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  305. for(var k =grd_goodbaseqtylist.fixedRows;k< grd_goodbaseqtylist.rows;k++){
  306. var Reqmthd = model.getValue("/root/main/goodbaseqtylist["+k+"]/reqmthd");
  307. var Tmpreqflag = model.getValue("/root/main/goodbaseqtylist["+k+"]/tmpreqflag");
  308. if(Reqmthd=="1"){ //처방집계
  309. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
  310. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  311. }else if(Reqmthd=="3"){//일반청구
  312. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
  313. grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  314. }
  315. }
  316. ]]>
  317. </script>
  318. </button>
  319. <select1 id="cmb_goodflag" ref="/root/send/retvcond/goodflag" class="combo_s_essential" appearance="minimal" style="left:440px; top:7px; width:110px; height:19px; text-align:center; ">
  320. <choices>
  321. <itemset nodeset="/root/init/goodflag">
  322. <label ref="label"/>
  323. <value ref="value"/>
  324. </itemset>
  325. </choices>
  326. <script type="javascript" ev:event="xforms-value-changed">
  327. <![CDATA[
  328. btn_search.dispatch("DOMActivate");
  329. ]]>
  330. </script>
  331. </select1>
  332. <input id="ipt_reqdeptcd" ref="/root/send/retvcond/reqdeptcd" class="input_s_essential" style="left:690px; top:30px; width:120px; height:19px; text-align:center; ">
  333. <script type="javascript" ev:event="xforms-value-changed">
  334. <![CDATA[
  335. if(ipt_reqdeptcd.value.length == 0)
  336. ipt_reqdeptnm.value = "";
  337. else
  338. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  339. // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptcd",
  340. // "deptcd," + ipt_reqdeptcd.value, "", "reqdeptcd,reqdeptnm",
  341. // ipt_reqdeptcd, "SPRPZ00200", "","","Y");
  342. model.refresh();
  343. ]]>
  344. </script>
  345. </input>
  346. <button id="btn_reqdeptcd" class="icon_search" style="left:815px; top:30px; width:16px; height:16px; ">
  347. <caption/>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. var recv_list = "reqdeptcd,reqdeptnm";
  351. misfOpenPopUpList("02", ipt_reqdeptcd,"",recv_list);
  352. model.refresh();
  353. ]]>
  354. </script>
  355. </button>
  356. <input id="ipt_reqdeptnm" ref="/root/send/retvcond/reqdeptnm" class="input_fix" appearance="input" style="left:835px; top:30px; width:165px; height:19px; text-align:center; ">
  357. <script type="javascript" ev:event="xforms-value-changed">
  358. <![CDATA[
  359. if(ipt_reqdeptnm.value.length == 0)
  360. ipt_reqdeptcd.value = "";
  361. else
  362. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  363. // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
  364. // "deptnm," + ipt_reqdeptnm.value, "", "reqdeptcd,reqdeptnm",
  365. // ipt_reqdeptnm, "SPRPZ00200", "","","Y");
  366. model.refresh();
  367. ]]>
  368. </script>
  369. </input>
  370. <caption id="caption7" class="search_name" style="left:355px; top:7px; width:94px; height:17px; ">물품구분 :</caption>
  371. <line id="line3" class="line_4" style="x1:1110px; y1:9px; x2:1110px; y2:48px; border-color:#ffe4bb; border-left-style:solid; "/>
  372. <output id="opt_instcd" ref="/root/send/retvcond/instcd" class="output_fix" visibility="hidden" style="left:274px; top:7px; width:30px; height:19px; "/>
  373. <output id="opt_instcdnm" ref="/root/send/retvcond/instcdnm" class="output_search" style="left:100px; top:7px; width:165px; height:19px; text-align:center; "/>
  374. <select1 id="cmb_reqmthd" ref="/root/send/retvcond/reqmthd" class="combo_s_essential" appearance="minimal" style="left:690px; top:7px; width:120px; height:19px; text-align:center; ">
  375. <choices>
  376. <itemset nodeset="/root/init/reqmthd">
  377. <label ref="label"/>
  378. <value ref="value"/>
  379. </itemset>
  380. </choices>
  381. <script type="javascript" ev:event="xforms-value-changed">
  382. <![CDATA[
  383. fGridChange(model.getValue(cmb_reqmthd.attribute("ref") ) );
  384. //btn_search.dispatch("DOMActivate");
  385. ]]>
  386. </script>
  387. </select1>
  388. <caption id="caption1" class="search_name" style="left:605px; top:7px; width:94px; height:17px; ">청구방법 :</caption>
  389. <select1 id="cmb_purcflag" ref="/root/send/retvcond/purcflag" class="combo_default" appearance="minimal" style="left:440px; top:30px; width:110px; height:19px; text-align:center; ">
  390. <choices>
  391. <itemset nodeset="/root/init/purcflag">
  392. <label ref="label"/>
  393. <value ref="value"/>
  394. </itemset>
  395. </choices>
  396. <script type="javascript" ev:event="xforms-value-changed">
  397. <![CDATA[
  398. btn_search.dispatch("DOMActivate");
  399. ]]>
  400. </script>
  401. </select1>
  402. <caption id="caption18" class="search_name" style="left:355px; top:30px; width:86px; height:17px; ">구매구분 :</caption>
  403. </group>
  404. <line id="line1" class="line_1" style="x1:0px; y1:105px; x2:1195px; y2:105px; "/>
  405. <caption id="cap_titlist" class="tit_2" style="left:3px; top:90px; width:190px; height:13px; "/>
  406. <button id="btn_grdadd" class="btn2_letter3" style="left:1011px; top:83px; width:53px; height:19px; ">
  407. <caption>행추가</caption>
  408. <script type="javascript" ev:event="DOMActivate">
  409. <![CDATA[
  410. if(fCheckKey())
  411. {
  412. return;
  413. }
  414. misfGridIUD(grd_goodbaseqtylist, "A");
  415. //행추가를 누를시 기간코드,청구구분,청구부서 값을 자동으로 Detail 그리드에 저장한다.
  416. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("rnum")) = grd_goodbaseqtylist.rows -1;
  417. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("instcd")) = opt_instcd.value;
  418. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("goodflag")) = cmb_goodflag.value;
  419. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("reqdeptcd")) = ipt_reqdeptcd.value;
  420. ]]>
  421. </script>
  422. </button>
  423. <button id="btn_grddel" class="btn2_letter3" style="left:1066px; top:83px; width:53px; height:19px; ">
  424. <caption>행삭제</caption>
  425. <script type="javascript" ev:event="DOMActivate">
  426. <![CDATA[
  427. misfGridIUD(grd_goodbaseqtylist,"D");
  428. model.refresh();
  429. ]]>
  430. </script>
  431. </button>
  432. <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtylist" allowuserresize="false" caption="No^물품코드^물품코드^물품명^규격^모델^제조회사^포장단위^환산수량^청구단위^안전재고량^상비품량^비고^reqmthd^tmpreqflag" colsep="^" colwidth="40, 96, 29, 231, 163, 127, 73, 66, 63, 63, 70, 70, 171, 100, 100, 0, 0, 0, 0, 0, 0, 0" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:110px; width:1195px; height:655px; ">
  433. <col ref="rnum" style="text-align:center; "/>
  434. <col class="input_essential" ref="goodcd" type="inputbutton" _key="true"/>
  435. <col ref="allsizespecid" style="text-align:center; "/>
  436. <col disabled="true" ref="goodnm"/>
  437. <col ref="goodspec" type="inputbutton"/>
  438. <col disabled="true" ref="goodmodel"/>
  439. <col disabled="true" ref="prodcmpynm" style="left:925px; top:23px; width:140px; height:23px; "/>
  440. <col disabled="true" ref="purcunit"/>
  441. <col disabled="true" ref="exchqty" format="#,###"/>
  442. <col disabled="true" ref="deliveunit"/>
  443. <col class="input_essential" ref="basevol" type="input" format="#,##9" style="text-align:right; background-color:#ccffcc; "/>
  444. <col class="input_essential" ref="prepargodqty" type="input" format="#,##9" style="text-align:right; background-color:#ffcc99; "/>
  445. <col ref="cmt" type="input"/>
  446. <col ref="reqmthd" visibility="hidden"/>
  447. <col ref="tmpreqflag" visibility="hidden"/>
  448. <col ref="ddavguseqty" visibility="hidden"/>
  449. <col ref="instcd" visibility="hidden"/>
  450. <col ref="goodflag" visibility="hidden"/>
  451. <col ref="reqdeptcd" visibility="hidden"/>
  452. <col ref="lrgcd" visibility="hidden"/>
  453. <col ref="allsizeyn" visibility="hidden"/>
  454. <col ref="oallsizespecid" visibility="hidden"/>
  455. <script type="javascript" ev:event="onbuttonclick">
  456. <![CDATA[
  457. if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") && grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) == "1" )
  458. {//구성물품코드를 눌렀을 경우
  459. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty";
  460. model.removenode("/root/copynode");
  461. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  462. model.makeNode("/root/copynode");
  463. if ( model.getValue("/root/send/retvcond/reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
  464. rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag,reqcheck","opt_instcd,cmb_goodflag,N", "Y");
  465. }
  466. else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
  467. rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag","opt_instcd,cmb_goodflag", "Y");
  468. }
  469. var cur_row = grd_goodbaseqtylist.row;
  470. var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
  471. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  472. setCSVToNode("/root/copynode", CSV, "goodbaseqtylist");
  473. fSettingGoodList("/root/copynode", "goodbaseqtylist" , "userqty");
  474. model.refresh();
  475. }
  476. //alert(grd_goodbaseqtylist.col +"=="+ grd_goodbaseqtylist.colRef("goodspec") +"&&"+ grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("allsizeyn")) +"== Y" );
  477. if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodspec") && grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("allsizeyn")) == "Y" )
  478. {
  479. fAllSizeRead(grd_goodbaseqtylist.row ,grd_goodbaseqtylist.col, event.clientY);
  480. }
  481. ]]>
  482. </script>
  483. <script type="javascript" ev:event="xforms-value-changed">
  484. <![CDATA[
  485. if(grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") && grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("goodcd")).length> 0)
  486. {
  487. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty,allsizeyn,allsizespecid";
  488. model.removenode("/root/copynode");
  489. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  490. model.makeNode("/root/copynode");
  491. if ( model.getValue("/root/send/retvcond/reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
  492. //alert("일반 청구일 경우 임.");
  493. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,reqcheck","goodcd," + opt_instcd.value + "," + cmb_goodflag.value + "," + model.getValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd")+",N","", recv_list, grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag,reqcheck","opt_instcd,cmb_goodflag,N", "Y");
  494. }
  495. else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
  496. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd","goodcd," + opt_instcd.value + "," + cmb_goodflag.value + "," + model.getValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd"),"", recv_list, grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag","opt_instcd,cmb_goodflag", "Y");
  497. }
  498. var sReqmThd = model.getValue("/root/init/main/goodlist/reqmthd");
  499. if(sReqmThd=="1"){
  500. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("basevol")) = true;
  501. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
  502. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("prepargodqty")) = model.getValue("/root/init/main/goodlist/safestocqty");
  503. }else if(sReqmThd=="3"){
  504. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("basevol")) = false;
  505. grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
  506. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("basevol")) = model.getValue("/root/init/main/goodlist/safestocqty");
  507. }
  508. grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("reqmthd")) = model.getValue("/root/init/main/goodlist/reqmthd");
  509. model.refresh();
  510. var cur_row = grd_goodbaseqtylist.row;
  511. var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
  512. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  513. if (CSV.length > 0)
  514. {
  515. model.setValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd","");
  516. setCSVToNode("/root/copynode", CSV, "goodbaseqtylist");
  517. fSettingGoodList("/root/copynode", "goodbaseqtylist" , "userqty");
  518. }
  519. }
  520. ]]>
  521. </script>
  522. <script type="javascript" ev:event="onaftersort">
  523. <![CDATA[
  524. grd_goodbaseqtylist.gridToInstance();
  525. ]]>
  526. </script>
  527. </datagrid>
  528. <caption id="caption4" style="left:770px; top:90px; width:40px; height:13px; background-color:#ccffcc; border-color:#000000; "/>
  529. <caption id="caption5" style="left:895px; top:90px; width:40px; height:13px; background-color:#ffcc99; border-color:#000000; "/>
  530. <caption id="caption8" style="left:815px; top:90px; width:70px; height:13px; ">안전재고량</caption>
  531. <caption id="caption9" style="left:940px; top:90px; width:55px; height:13px; ">상비품량</caption>
  532. <group id="grp_allsize" visibility="hidden" showeffect="slidepositive 500" style="left:205px; top:140px; width:364px; height:300px; ">
  533. <shape id="rectangle1" appearance="rectangle" style="left:0px; top:0px; width:362px; height:300px; border-color:#339966; border-width:2px; "/>
  534. <datagrid id="grd_codelist" nodeset="/root/main/codelist" class="grd_prodcmpylist" caption="C^ID^명칭^모델^수량" colsep="^" colwidth="30, 40, 140, 76, 51" dataheight="23" defaultrows="0" ellipsis="true" extendlastcol="false" rowheight="23" rowsep="|" selectionmode="free" tooltip="true" style="left:2px; top:40px; width:357px; height:257px; ">
  535. <col ref="chk" type="checkbox"/>
  536. <col ref="allsizespecid" style="text-align:center; "/>
  537. <col ref="goodspec"/>
  538. <col ref="goodmodel"/>
  539. <col ref="qty" type="input"/>
  540. <script type="javascript" ev:event="ondblclick">
  541. <![CDATA[
  542. //if (grd_codelist.isCell(event.target ) && grd_codelist.row >= grd_codelist.fixedRows ) {
  543. // fAllSizeSelect(grd_codelist.row) ;
  544. // btn_confirm.dispatch("DOMActivate");
  545. //}
  546. ]]>
  547. </script>
  548. <script type="javascript" ev:event="onaftersort">
  549. <![CDATA[
  550. grd_codelist.gridToInstance();
  551. ]]>
  552. </script>
  553. </datagrid>
  554. <button id="btn_confirm" class="btn4_letter2" style="left:285px; top:10px; width:56px; height:22px; ">
  555. <caption>확인</caption>
  556. <script type="javascript" ev:event="DOMActivate">
  557. <![CDATA[
  558. fAllSizeSelect(grd_goodbaseqtylist) ;
  559. ]]>
  560. </script>
  561. </button>
  562. </group>
  563. <button id="btn_save" class="btn4_letter2" style="left:1130px; top:81px; width:56px; height:22px; ">
  564. <caption>저장</caption>
  565. <script type="javascript" ev:event="DOMActivate">
  566. <![CDATA[
  567. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  568. if (updtdata == "" ) {
  569. messageBox("변경된 데이터가","I004");
  570. return;
  571. }
  572. var sReqmThd = "";
  573. var null_chech1 = "";
  574. var null_chech2 = "";
  575. for (var i=1;i<=grd_goodbaseqtylist.rows-1;i++)
  576. {
  577. sReqmThd = model.getValue(grd_goodbaseqtylist.nodeset+"["+i+"]/reqmthd");
  578. null_check1 = model.getValue(grd_goodbaseqtylist.nodeset+"["+i+"]/prepargodqty");
  579. null_check2 = model.getValue(grd_goodbaseqtylist.nodeset+"["+i+"]/basevol" );
  580. if (sReqmThd=="1"){
  581. sReqmThd = "";
  582. } else if(sReqmThd=="3"){
  583. sReqmThd = "";
  584. } else {
  585. null_chech1 = "0";
  586. null_chech2 = "0";
  587. }
  588. //
  589. if ((null_check2 == "")&&(null_check1=="")) {
  590. messageBox(i+ "번째 기준량은","I003");
  591. return;
  592. }
  593. }
  594. misfSave("TXRSD00101");
  595. //misfMsterDetailRetrieve();
  596. model.refresh();
  597. ]]>
  598. </script>
  599. </button>
  600. </group>
  601. <button id="btn_clear" class="btn4_letter3" style="left:1125px; top:5px; width:68px; height:22px; ">
  602. <caption>초기화</caption>
  603. <script type="javascript" ev:event="DOMActivate">
  604. <![CDATA[
  605. var updtdata = getGridUpdateData(grd_goodbaseqtylist);
  606. if (updtdata != "") {
  607. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  608. if (ret != 6) { // not OK
  609. return;
  610. }
  611. }
  612. fInitialize();
  613. ]]>
  614. </script>
  615. </button>
  616. </xhtml:body>
  617. </xhtml:html>