SMRSD07600_발주관리.xrw 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>발주관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <plceord>
  11. <plceordlist/>
  12. <plceorddetllist/>
  13. </plceord>
  14. <list>
  15. <goodreq>
  16. <goodreqmainlist>
  17. <instcd/>
  18. <reqdd/>
  19. <reqno/>
  20. <reqdeptcd/>
  21. </goodreqmainlist>
  22. </goodreq>
  23. </list>
  24. </main>
  25. <send>
  26. <search>
  27. <instcd/>
  28. <plcefromdd/>
  29. <plcetodd/>
  30. <listselect>1</listselect>
  31. <prcpfromdd/>
  32. <prcptodd/>
  33. <emplno/>
  34. <emplnm/>
  35. <orderno/>
  36. <plceordgoodcd/>
  37. <plceordgoodnm/>
  38. <prcpgoodcd/>
  39. <prcpgoodnm/>
  40. <prcpcd/>
  41. <plceordmainusedeptcd/>
  42. <prcpmainusedeptcd/>
  43. <roomdeptcd/>
  44. <prcpdeptcd/>
  45. <prcpdeptnm/>
  46. <receivedeptcd/>
  47. <receivedeptnm/>
  48. <allsizespecid/>
  49. </search>
  50. <save>
  51. <plceordlist/>
  52. <plceorddetllist/>
  53. </save>
  54. <warepop>
  55. <wareflag/>
  56. <delivedd/>
  57. <deliveno/>
  58. <delivedeptcd/>
  59. <delivedeptnm/>
  60. </warepop>
  61. </send>
  62. <init/>
  63. <temp/>
  64. <tempdata>
  65. <search>
  66. <goodcd/>
  67. <allsize/>
  68. <goodnm/>
  69. <instcd/>
  70. </search>
  71. <goodresult/>
  72. </tempdata>
  73. <plceorddetl>
  74. <search>
  75. <instcd/>
  76. <orderdd/>
  77. <orderno/>
  78. <orderseq/>
  79. </search>
  80. <result>
  81. <plceorddetllist/>
  82. </result>
  83. </plceorddetl>
  84. <combotemp>
  85. <operationcombo>
  86. <value/>
  87. <label/>
  88. </operationcombo>
  89. <unit/>
  90. </combotemp>
  91. <checkbox/>
  92. <popreq>
  93. <instcd/>
  94. <wareflag/>
  95. <wareflagnm/>
  96. <delivedd/>
  97. <reqdeptcd/>
  98. <reqdeptnm/>
  99. <saveyn/>
  100. <openflag/>
  101. <count/>
  102. </popreq>
  103. <popsubdata/>
  104. </root>
  105. </instance>
  106. <script type="javascript" ev:event="xforms-ready">
  107. <![CDATA[
  108. fInitialize();
  109. ]]>
  110. </script>
  111. <submission id="TRRSD07601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/plceord"/>
  112. <submission id="TXRSD07601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  113. <submission id="TRRSD07605" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/tempdata/search" add="top" resultref="/root/tempdata/goodresult"/>
  114. <submission id="TXRSD07602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/plceord" resultref="/root/temp"/>
  115. <submission id="TRRSD07602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/plceorddetl/search" resultref="/root/plceorddetl/result"/>
  116. <submission id="TRRSD07606" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/combotemp"/>
  117. <submission id="TXRSD07603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  118. <submission id="TXRSD07604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  119. <submission id="TXRSD07605" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  120. <submission id="TXRSD07607" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  121. </model>
  122. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  123. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  124. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  125. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  126. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  127. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  128. <script type="javascript" src="../../../mis/purcbaseweb/js/SMRFE00200.js"/>
  129. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  130. <script type="javascript" src="../../../mis/reqconsweb/js/SMRSD20000.js"/>
  131. <script type="javascript">
  132. <![CDATA[
  133. function fInitialize()
  134. {
  135. misfGridInit(grd_plceordlist);
  136. misfGridInit(grd_plceorddetllist);
  137. misfMsterDetailSet(grd_plceordlist,null, "TRRSD07601" ,"Y","free"); // 화면에서 Grid의 마스터 Detail관계 설정
  138. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
  139. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  140. misfComboComCdListMulti("R0450,R0450,R0470,R0460,030M0001", "cmb_plceordmainusedeptcd,cmb_prcpmainusedeptcd,grd_plceordlist.orderstat,grd_plceordlist.reqflag,cmb_wareflag");
  141. cmb_plceordmainusedeptcd.select(0);
  142. cmb_prcpmainusedeptcd.select(0);
  143. model.setValue("/root/send/search/plcefromdd", getCurrentDate().substr(0,8));
  144. model.setValue("/root/send/search/plcetodd", getCurrentDate().substr(0,8));
  145. model.setValue("/root/send/search/prcpfromdd", getCurrentDate().substr(0,8));
  146. model.setValue("/root/send/search/prcptodd", getCurrentDate().substr(0,8));
  147. model.setValue("/root/send/search/receivedeptcd", "4020334000"); //수령부서 물류파트기본 설정
  148. model.setValue("/root/send/search/receivedeptnm", "물류파트");
  149. // model.setValue("/root/send/search/prcpfromdd", "20110101");
  150. // model.setValue("/root/send/search/prcptodd", "20110101");
  151. //창고출고등록관련
  152. //misfComboComCdList("",cmb_wareflag); //창고
  153. model.setValue("/root/send/warepop/delivedd" , getCurrentDate()); //출고일자 설정
  154. submit("TRRSD07606");
  155. rszfComboUnitList(cmb_unit, cmb_instcd.value, "A");
  156. //misfComboCopyItemSet(cmb_unit, "", grd_plceordlist, "orderunit");
  157. addComboItem( "cmb_plceordmainusedeptcd", "전체", "", "above");
  158. model.setValue(cmb_plceordmainusedeptcd.attribute("ref"), "");
  159. misfComboCopyItemSet(cmb_roomdeptcd, "", grd_plceordlist, "roomdeptcd");
  160. cmb_roomdeptcd.disabled = true;
  161. model.refresh();
  162. }
  163. function fGetGoodInfo(pnode, nodename)
  164. {
  165. var flag = "Y", rowno = "", wflag = "Y", wrowno = "";
  166. var codynode = instance1.selectNodes(pnode + "/*");
  167. var checkFlag = true;
  168. for (var i = 1; i <= codynode.length ; i++) {
  169. for(var j=grd_plceordlist.fixedRows; j < grd_plceordlist.rows;j++){
  170. var srcgoodcd = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodcd");
  171. var goodcd = grd_plceordlist.valueMatrix(j,grd_plceordlist.colRef("goodcd"));
  172. var srcallsizespecid = model.getValue(pnode +"/" + nodename + "[" + i + "]/allsizespecid");
  173. var allsizespecid = grd_plceordlist.valueMatrix(j,grd_plceordlist.colRef("allsizespecid"));
  174. if (srcgoodcd == goodcd && srcallsizespecid == allsizespecid){
  175. flag = "N";
  176. rowno = rowno + ","+j; // 이미 존재하는 코드 check
  177. //messageBox("물품조회 "+i+"번째에 동일 물품이 존재합니다.", "I");
  178. }
  179. }
  180. if (flag == "Y"){
  181. var pGoodcd = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodcd" );
  182. var pAllsizespecid = model.getValue(pnode +"/" + nodename + "[" + i + "]/allsizespecid" );
  183. var pGoodnm = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodnm" );
  184. var pGoodspec = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodspec" );
  185. var pGoodunitcost = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodunitcost" );
  186. var pProdcmpynm = model.getValue(pnode +"/" + nodename + "[" + i + "]/prodcmpynm" );
  187. var pPprodcmpycd = model.getValue(pnode +"/" + nodename + "[" + i + "]/pprodcmpycd" );
  188. var pWinacnt = model.getValue(pnode +"/" + nodename + "[" + i + "]/winacnt" );
  189. var pWinacntnm = model.getValue(pnode +"/" + nodename + "[" + i + "]/winacntnm" );
  190. var pPurcunit = model.getValue(pnode +"/" + nodename + "[" + i + "]/purcunit" );
  191. var pdeliveunit = model.getValue(pnode +"/" + nodename + "[" + i + "]/deliveunit" );
  192. var pGoodflag = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodflag" );
  193. var pInstcd = model.getValue(pnode +"/" + nodename + "[" + i + "]/instcd" );
  194. var pGoodmodel = model.getValue(pnode +"/" + nodename + "[" + i + "]/goodmodel" );
  195. var pExchqty = model.getValue(pnode +"/" + nodename + "[" + i + "]/exchqty" );
  196. var pMaincustlastsuplplce = model.getValue(pnode +"/" + nodename + "[" + i + "]/maincustlastsuplplce" );
  197. var pMaincustlastsuplplcenm = model.getValue(pnode +"/" + nodename + "[" + i + "]/maincustlastsuplplcenm");
  198. var pwareflag = model.getValue(pnode +"/" + nodename + "[" + i + "]/pwareflag");
  199. grd_plceordlist.addRow(false);
  200. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("goodcd" )) = pGoodcd;
  201. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("allsizespecid" )) = pAllsizespecid;
  202. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("goodhngnm" )) = pGoodnm;
  203. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("goodspec" )) = pGoodspec;
  204. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("acntcd" )) = pWinacnt;
  205. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("acntnm" )) = pWinacntnm;
  206. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("custcode" )) = pMaincustlastsuplplce;
  207. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("custnm" )) = pMaincustlastsuplplcenm;
  208. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("orderdd" )) = getCurrentDate().substr(0,8);
  209. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("instcd" )) = pInstcd;
  210. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("orderstat" )) = "01";
  211. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("wareflag" )) = pwareflag;
  212. grd_plceordlist.valueMatrix(grd_plceordlist.row,grd_plceordlist.colRef("orderunit" )) = pdeliveunit;
  213. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("instcd")) = cmb_instcd.value;
  214. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("reqflag")) = "02";
  215. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("workspce2")) = ipt_receivedeptnm.value;
  216. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("workspce4")) = ipt_receivedeptcd.value;
  217. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderdd")) = getCurrentDate().substr(0,8);
  218. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("reqflag")) = "true";
  219. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("orderstat")) = "true";
  220. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "true";
  221. var orderno = ipt_orderno.value;
  222. if(orderno != ""){
  223. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderno")) = orderno;
  224. }
  225. }
  226. flag = "Y";
  227. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd"), grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "true";
  228. }
  229. for(var j=grd_plceordlist.rows;j >= 0 ;j--){
  230. if (grd_plceordlist.valueMatrix(j, grd_plceordlist.colRef("goodcd")) == ""){
  231. grd_plceordlist.deleteRow(j);
  232. }
  233. }
  234. // if (rowno != ""){
  235. // messageBox("발주내역 "+rowno.substr(1, rowno.length-1)+"번째에 동일 물품이 존재합니다.", "I");
  236. // checkFlag = false;
  237. // }
  238. }
  239. function fGetGridCellValue(){
  240. var sRowIdxes = "";
  241. var iSelectedCnt = grd_plceordlist.selectedCells.length;
  242. for(var i=0; i<iSelectedCnt; i++){
  243. var iRowIdx = grd_plceordlist.selectedCells.item(i).row;
  244. var iRowIdx1 = grd_plceordlist.selectedCells.item(0).row;
  245. if(!misfGetRowIdxExists(sRowIdxes, iRowIdx)) continue;
  246. var orderno = model.getValue("/root/main/plceord/plceordlist[" + iRowIdx + "]/orderno");
  247. var orderno1 = model.getValue("/root/main/plceord/plceordlist[" + iRowIdx1 + "]/orderno");
  248. }
  249. if(orderno != orderno1){
  250. messageBox("거래업체가 두군데 이상", "E008", "");
  251. }
  252. }
  253. ]]>
  254. </script>
  255. </xhtml:head>
  256. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  257. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  258. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:15px; ">발주관리</caption>
  259. </group>
  260. <group id="grp_biz" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  261. <caption id="caption21" class="tit_2" style="left:5px; top:112px; width:174px; height:13px; ">발주내역</caption>
  262. <line id="line16" class="line_1" style="x1:0px; y1:129px; x2:1194px; y2:128px; "/>
  263. <datagrid id="grd_plceordlist" nodeset="/root/main/plceord/plceordlist" caption="__선택^발주일자^발주번호^순번^청구순번^물품코드^물품명^규격^Allsize^발주수량^발주단위^발주상태^청구증^SMS^시행부서^시행부서^수술실방^계정과목^거래처^수령^청구구분^처방량^발주자사번^발주자성명^비고^시행부서^수술실방번호^파일" colsep="^" colwidth="50, 75, 55, 55, 55, 85, 140, 75, 40, 55, 0, 60, 45, 45, 90, 80, 80, 100, 100, 80, 60, 50, 80, 80, 150, 80, 80, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" frozencols="5" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" tooltip="true" navindex="15" style="left:0px; top:132px; width:885px; height:608px; ">
  264. <col checkvalue="1,0" ref="selectstat" type="checkbox" visibility="hidden"/>
  265. <col disabled="true" ref="orderdd" format="yyyy-mm-dd" style="text-align:center; "/>
  266. <col ref="orderno" style="text-align:center; "/>
  267. <col ref="orderseq" style="text-align:center; "/>
  268. <col ref="seq"/>
  269. <col disabled="true" ref="goodcd" type="inputbutton"/>
  270. <col ref="goodhngnm"/>
  271. <col ref="goodspec"/>
  272. <col ref="allsizespecid"/>
  273. <col ref="orderqty" type="input"/>
  274. <col ref="orderunit" type="output" visibility="hidden"/>
  275. <col disabled="true" ref="orderstat" type="combo">
  276. <choices>
  277. <itemset>
  278. <label/>
  279. <value/>
  280. </itemset>
  281. </choices>
  282. </col>
  283. <col ref="reqmakeyn" type="output" style="text-align:center; "/>
  284. <col ref="smstrsmyn" type="output" style="text-align:center; "/>
  285. <col disabled="true" ref="prcpdeptcd" type="inputbutton"/>
  286. <col ref="prcpdeptnm" type="output"/>
  287. <col disabled="true" ref="roomdeptcd" type="combo">
  288. <choices>
  289. <itemset>
  290. <label/>
  291. <value/>
  292. </itemset>
  293. </choices>
  294. </col>
  295. <col ref="acntnm"/>
  296. <col ref="custnm"/>
  297. <col ref="workspce2" type="output"/>
  298. <col disabled="true" ref="reqflag" type="combo">
  299. <choices>
  300. <itemset>
  301. <label/>
  302. <value/>
  303. </itemset>
  304. </choices>
  305. </col>
  306. <col ref="prcpqty"/>
  307. <col ref="orderpsnid"/>
  308. <col ref="name"/>
  309. <col disabled="true" ref="cmt" type="input"/>
  310. <col ref="workspce1" visibility="hidden"/>
  311. <col ref="workspce4" visibility="hidden"/>
  312. <col ref="roomdeptnm" visibility="hidden"/>
  313. <col ref="custcode" visibility="hidden"/>
  314. <col ref="acntcd" visibility="hidden"/>
  315. <col ref="instcd" visibility="hidden"/>
  316. <col ref="acntchrgtelno" visibility="hidden"/>
  317. <col ref="rsdhinstcd" visibility="hidden"/>
  318. <col ref="rsdhreqflag" visibility="hidden"/>
  319. <col ref="rsdhreqdd" visibility="hidden"/>
  320. <col ref="rsdhreqno" visibility="hidden"/>
  321. <col ref="rsdhreqseqno" visibility="hidden"/>
  322. <col ref="rsdhreqdeptcd" visibility="hidden"/>
  323. <col ref="wareflag" visibility="hidden"/>
  324. <script type="javascript" ev:event="onaftersort">
  325. <![CDATA[
  326. grd_plceordlist.gridToInstance();
  327. ]]>
  328. </script>
  329. <script type="javascript" ev:event="onrowchanged">
  330. <![CDATA[
  331. if(rbo_select.value == 1){
  332. if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") != "selectstat"){
  333. var rowSt = grd_plceordlist.rowStatus(grd_plceordlist.row);
  334. if(rowSt == "1" || rowSt == "3"){
  335. }else{
  336. //발주내역조회일경우
  337. model.setValue("/root/plceorddetl/search/instcd",model.getValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/instcd"));
  338. model.setValue("/root/plceorddetl/search/orderdd",model.getValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/orderdd"));
  339. model.setValue("/root/plceorddetl/search/orderno",model.getValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/orderno"));
  340. model.setValue("/root/plceorddetl/search/orderseq",model.getValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/orderseq"));
  341. submit("TRRSD07602");
  342. //model.copyNode("/root/main/plceord","/root/plceorddetl/result");
  343. grd_plceorddetllist.nodeset = "/root/plceorddetl/result/plceorddetllist";
  344. grd_plceorddetllist.refresh();
  345. grd_plceordlist.dispatch("onmouseup");
  346. for(i = 1 ; i < grd_plceorddetllist.rows ; i++){
  347. grd_plceorddetllist.cellAttribute("disabled", i ,grd_plceorddetllist.colRef("selectprcp")) = "true";
  348. }
  349. }
  350. }
  351. }else if(rbo_select.value == 2){
  352. //처방내역조회일경우
  353. var goodcd = grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("goodcd"));
  354. var prcpdeptcd = grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("prcpdeptcd"));
  355. var roomdeptcd = grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd"));
  356. if(roomdeptcd == ""){
  357. roomdeptcd = "-";
  358. }
  359. var selectoption = "";
  360. if(goodcd != "") {
  361. selectoption = "[goodcd = '"+goodcd+"' and prcpdeptcd = '"+prcpdeptcd+"' and roomdeptcd = '"+roomdeptcd+"']";
  362. }
  363. //grd_plceorddetllist.attribute("nodeset") = "/root/main/plceord/plceorddetllist" + selectoption;
  364. grd_plceorddetllist.nodeset = "/root/main/plceord/plceorddetllist" + selectoption;
  365. //grd_plceorddetllist.refresh();
  366. }
  367. ]]>
  368. </script>
  369. <script type="javascript" ev:event="onbuttonclick">
  370. <![CDATA[
  371. if(rbo_select.value == 1){
  372. //발주내역조회일경우
  373. if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") == "goodcd"){
  374. model.removenode("/root/copynode");
  375. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  376. model.makeNode("/root/copynode");
  377. setParameter("paramwinacnt" , "");
  378. setParameter("paramgoodflag" , "");
  379. setParameter("paramwareflag" , "");
  380. setParameter("parammaincustlastsuplplce" , "");
  381. setParameter("parampurcdmnddd", "");
  382. modal("SPRSD01100");
  383. var cur_row = grd_plceordlist.row;
  384. var status = grd_plceordlist.valueMatrix(cur_row, grd_plceordlist.colRef("m"));
  385. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  386. setCSVToNode("/root/copynode", CSV, "plceordlist");
  387. fGetGoodInfo("/root/copynode", "plceordlist");
  388. //rszfOpenPopUpListByWndName(grd_plceordlist,"","goodcd,allsizespecid,goodhngnm","SPRSD00210","instcd,reqflag","cmb_instcd,cmb_reqflag");
  389. //model.resetInstanceNode("/root/tempdata/tempdata");
  390. // if(model.getValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/goodcd") != ""){
  391. // model.setValue("/root/tempdata/search/goodcd",model.getValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/goodcd"));
  392. // model.setValue("/root/tempdata/search/instcd",cmb_instcd.value);
  393. //
  394. // submit("TRRSD07605");
  395. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/goodcd", model.getValue("/root/tempdata/tempdata/goodresult[1]/goodcd"));
  396. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/goodhngnm", model.getValue("/root/tempdata/tempdata/goodresult[1]/goodnm"));
  397. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/allsizespecid", model.getValue("/root/tempdata/tempdata/goodresult[1]/allsizespecid"));
  398. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/acntcd", model.getValue("/root/tempdata/tempdata/goodresult[1]/winacnt"));
  399. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/acntnm", model.getValue("/root/tempdata/tempdata/goodresult[1]/acntnm"));
  400. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/custcode", model.getValue("/root/tempdata/tempdata/goodresult[1]/maincustlastsuplplce"));
  401. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/custnm", model.getValue("/root/tempdata/tempdata/goodresult[1]/custnm"));
  402. // model.setValue("/root/main/plceord/plceordlist["+grd_plceordlist.row+"]/goodspec", model.getValue("/root/tempdata/tempdata/goodresult[1]/goodspec"));
  403. // }
  404. grd_plceordlist.refresh();
  405. }
  406. if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") == "prcpdeptcd"){
  407. var recv_list = "prcpdeptcd,prcpdeptnm";
  408. misfOpenPopUpList("02", grd_plceordlist, "", recv_list, cmb_instcd.value, "instcd") ;
  409. if(grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("prcpdeptcd")) == "3070000000"){
  410. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd"), grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "false";
  411. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "3070200000";
  412. }else{
  413. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd"), grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "true";
  414. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "";
  415. }
  416. grd_plceordlist.refresh();
  417. }
  418. }else{
  419. //처방내역조회일경우
  420. }
  421. ]]>
  422. </script>
  423. <script type="javascript" ev:event="onkeypress">
  424. <![CDATA[
  425. if(rbo_select.value == 1){
  426. //발주내역조회일경우
  427. if(event.keyCode == "13"){
  428. if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") == "prcpdeptcd"){
  429. misfValidationCheck("02", "", "prcpdeptcd,prcpdeptnm", cmb_instcd.value, "instcd" );
  430. if(grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("prcpdeptcd")).length == 0)
  431. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("prcpdeptcd")) = "";
  432. if(grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("prcpdeptcd")) == "3070000000"){
  433. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd"), grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "false";
  434. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "3070200000";
  435. }else{
  436. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd"), grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "true";
  437. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "";
  438. }
  439. grd_plceordlist.refresh();
  440. }else if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") == "orderqty"){ //Enter키 입력시 한줄밑으로
  441. if( grd_plceordlist.row+1 == grd_plceordlist.rows ){
  442. }else{
  443. grd_plceordlist.row = grd_plceordlist.row + 1;
  444. grd_plceordlist.editCell();
  445. grd_plceordlist.dispatch("onrowchanged");
  446. }
  447. }
  448. }
  449. }else{
  450. //처방내역조회일경우
  451. }
  452. ]]>
  453. </script>
  454. <script type="javascript" ev:event="xforms-value-changed">
  455. <![CDATA[
  456. if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") == "selectstat"){
  457. if(rbo_select.value == 2){
  458. for( var k = 1 ; k < grd_plceorddetllist.rows ; k++ ){
  459. grd_plceorddetllist.valueMatrix(k, grd_plceorddetllist.colRef("selectprcp")) = 1;
  460. }
  461. grd_plceorddetllist.dispatch("xforms-value-changed");
  462. grd_plceordlist.rowStatus(grd_plceordlist.row) = 1;
  463. }else{
  464. var selectstat = grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("selectstat"));
  465. if(selectstat == "1"){
  466. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderstat")) = "02";
  467. grd_plceordlist.refresh();
  468. }else{
  469. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderstat")) = "01";
  470. grd_plceordlist.refresh();
  471. }
  472. }
  473. }
  474. ]]>
  475. </script>
  476. <script type="javascript" ev:event="ondblclick">
  477. <![CDATA[
  478. if(grd_plceordlist.colAttribute(grd_plceordlist.col,"ref") == "reqmakeyn"){
  479. model.setValue("/root/main/list/goodreq/goodreqmainlist/instcd",grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("instcd")));
  480. model.setValue("/root/main/list/goodreq/goodreqmainlist/reqdd",grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderdd")));
  481. model.setValue("/root/main/list/goodreq/goodreqmainlist/reqno",grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("reqmakeyn")));
  482. model.setValue("/root/main/list/goodreq/goodreqmainlist/reqdeptcd",grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("workspce4")));
  483. fPrintReqList();
  484. }
  485. ]]>
  486. </script>
  487. </datagrid>
  488. <button id="btn_delapntrgst" class="btn2_letter3" style="left:765px; top:107px; width:53px; height:19px; ">
  489. <caption>행삭제</caption>
  490. <script type="javascript" ev:event="DOMActivate">
  491. <![CDATA[
  492. if(rbo_select.value == "1"){
  493. var req = messageBox("삭제 하시겠습니까?", "Q003");
  494. if(req == 6){
  495. fGetGridCellValue();
  496. misfGridIUD(grd_plceordlist, "D");
  497. // for(i = 1 ; i < grd_plceorddetllist.rows ; i++){
  498. // grd_plceorddetllist.valueMatrix(i, grd_plceorddetllist.colRef("selectprcp")) = "0";
  499. // grd_plceorddetllist.rowStatus(i) = 2;
  500. // }
  501. model.setValue("/root/send/save/plceordlist", grd_plceordlist.getUpdateData());
  502. // model.setValue("/root/send/save/plceorddetllist", grd_plceorddetllist.getUpdateData());
  503. submit("TXRSD07607");
  504. btn_search.dispatch("DOMActivate");
  505. }else{
  506. return;
  507. }
  508. }else if(rbo_select.value == "3"){
  509. misfGridIUD(grd_plceordlist, "D");
  510. }
  511. ]]>
  512. </script>
  513. </button>
  514. <button id="btn_addapntrgst" class="btn2_letter3" navindex="14" style="left:711px; top:107px; width:53px; height:19px; text-align:left; ">
  515. <caption>행추가</caption>
  516. <script type="javascript" ev:event="DOMActivate">
  517. <![CDATA[
  518. if(ipt_receivedeptnm.value == ""){
  519. messageBox("수령부서 조회되지 않았습니다. 확인해주십시오.", "E999", "");
  520. model.setFocus("ipt_receivedeptcd");
  521. return;
  522. }
  523. messageBox("행추가가 완료되면 물품코드부터 선택하십시오.", "E999", "");
  524. misfGridIUD(grd_plceordlist,"A");
  525. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("instcd")) = cmb_instcd.value;
  526. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("reqflag")) = "02";
  527. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderstat")) = "01";
  528. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("workspce2")) = ipt_receivedeptnm.value;
  529. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("workspce4")) = ipt_receivedeptcd.value;
  530. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderdd")) = getCurrentDate().substr(0,8);
  531. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("reqflag")) = "true";
  532. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("orderstat")) = "true";
  533. grd_plceordlist.cellAttribute("disabled", grd_plceordlist.row, grd_plceordlist.colRef("roomdeptcd")) = "true";
  534. ]]>
  535. </script>
  536. </button>
  537. <datagrid id="grd_plceorddetllist" nodeset="/root/main/plceord/plceorddetllist" caption="선택^처방일자^등록번호^환자명^처방량^처방코드^처방자ID^처방자성명^수술실방" colsep="^" colwidth="31, 55, 60, 55, 55, 70, 80, 80, 80, 0, 0, 0, 0, 0" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" tooltip="true" navindex="16" style="left:887px; top:132px; width:305px; height:608px; ">
  538. <col checkvalue="1,0" ref="selectprcp" type="checkbox"/>
  539. <col ref="prcpdd"/>
  540. <col ref="pid"/>
  541. <col ref="patnm"/>
  542. <col ref="goodqty"/>
  543. <col ref="prcpcd"/>
  544. <col ref="rgstrid"/>
  545. <col ref="rgstrnm"/>
  546. <col ref="roomdeptnm"/>
  547. <col ref="roomdeptcd" visibility="hidden"/>
  548. <col ref="prcpdeptcd" visibility="hidden"/>
  549. <col ref="goodcd" visibility="hidden"/>
  550. <col ref="instcd" visibility="hidden"/>
  551. <col ref="genrdd" visibility="hidden"/>
  552. <col ref="genrno" visibility="hidden"/>
  553. <col ref="genrseq" visibility="hidden"/>
  554. <col ref="workspce1" visibility="hidden"/>
  555. <col ref="orderdd" visibility="hidden"/>
  556. <col ref="orderno" visibility="hidden"/>
  557. <col ref="orderseq" visibility="hidden"/>
  558. <script type="javascript" ev:event="onaftersort">
  559. <![CDATA[
  560. grd_plceorddetllist.gridToInstance();
  561. ]]>
  562. </script>
  563. <script type="javascript" ev:event="xforms-value-changed">
  564. <![CDATA[
  565. var orderqty = 0;
  566. var workspce1 = grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("workspce1"));
  567. for(i = 1 ; i < grd_plceorddetllist.rows ; i++){
  568. var selectprcp = grd_plceorddetllist.valueMatrix(i, grd_plceorddetllist.colRef("selectprcp"));
  569. if(selectprcp == "1"){
  570. orderqty++;
  571. }
  572. }
  573. grd_plceordlist.valueMatrix(grd_plceordlist.row, grd_plceordlist.colRef("orderqty")) = orderqty;
  574. grd_plceorddetllist.valueMatrix(grd_plceorddetllist.row, grd_plceorddetllist.colRef("workspce1")) = workspce1;
  575. if(grd_plceorddetllist.col == grd_plceorddetllist.colRef("selectprcp")){
  576. grd_plceordlist.rowStatus(grd_plceordlist.row) = 1;
  577. }
  578. ]]>
  579. </script>
  580. </datagrid>
  581. <caption id="caption14" class="tit_2" style="left:885px; top:112px; width:174px; height:15px; ">발주세부내역</caption>
  582. <output id="ipt_receivedeptnm" ref="/root/send/search/receivedeptnm" class="output_fix" appearance="output" style="left:551px; top:107px; width:158px; height:19px; "/>
  583. <input id="ipt_receivedeptcd" ref="/root/send/search/receivedeptcd" class="input_s_essential" disabled="false" navindex="6" style="left:439px; top:107px; width:90px; height:19px; ">
  584. <script type="javascript" ev:event="xforms-value-changed">
  585. <![CDATA[
  586. if(ipt_receivedeptcd.value.length == 0)
  587. ipt_receivedeptnm.value = "";
  588. else
  589. misfValidationCheck("02", "", "receivedeptcd,receivedeptnm", cmb_instcd.value, "instcd" );
  590. ipt_receivedeptcd.refresh();
  591. ipt_receivedeptnm.refresh();
  592. ]]>
  593. </script>
  594. </input>
  595. <button id="btn_receivedeptcd" class="icon_search" disabled="false" navindex="13" style="left:532px; top:108px; width:16px; height:16px; ">
  596. <caption/>
  597. <script type="javascript" ev:event="DOMActivate">
  598. <![CDATA[
  599. var recv_list = "receivedeptcd,receivedeptnm";
  600. misfOpenPopUpList("02", ipt_receivedeptcd,"", recv_list, cmb_instcd.value, "instcd");
  601. ipt_receivedeptcd.refresh();
  602. ipt_receivedeptnm.refresh();
  603. ]]>
  604. </script>
  605. </button>
  606. <caption id="caption17" class="tit_2" style="left:361px; top:110px; width:85px; height:13px; ">수령부서 :</caption>
  607. <select id="chk_allselect" ref="/root/checkbox" visibility="hidden" overflow="visible" appearance="full" style="left:25px; top:137px; width:20px; height:20px; border-style:none; ">
  608. <choices>
  609. <item>
  610. <label/>
  611. <value>1</value>
  612. </item>
  613. </choices>
  614. <script type="javascript" ev:event="xforms-value-changed">
  615. <![CDATA[
  616. if(chk_allselect.value == "1"){
  617. for(i = 1 ; i < grd_plceordlist.rows ; i++){
  618. grd_plceordlist.rowStatus(i) = 2;
  619. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderstat")) = "02";
  620. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("selectstat")) = "1";
  621. }
  622. }else{
  623. for(i = 1 ; i < grd_plceordlist.rows ; i++){
  624. grd_plceordlist.rowStatus(i) = 2;
  625. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderstat")) = "01";
  626. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("selectstat")) = "0";
  627. }
  628. }
  629. grd_plceordlist.refresh();
  630. ]]>
  631. </script>
  632. </select>
  633. <button id="button3" class="btn2_letter4" style="left:819px; top:107px; width:64px; height:19px; ">
  634. <caption>전체삭제</caption>
  635. <script type="javascript" ev:event="DOMActivate">
  636. <![CDATA[
  637. if(rbo_select.value == "1"){
  638. var req = messageBox("전체 삭제 하시겠습니까?", "Q003");
  639. if(req == 6){
  640. // misfGridIUD(grd_plceordlist, "D");
  641. for(i = 1 ; i < grd_plceordlist.rows ; i++){
  642. // grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("selectprcp")) = "0";
  643. grd_plceordlist.rowStatus(i) = 4;
  644. }
  645. model.setValue("/root/send/save/plceordlist", grd_plceordlist.getUpdateData());
  646. // model.setValue("/root/send/save/plceorddetllist", grd_plceorddetllist.getUpdateData());
  647. submit("TXRSD07607");
  648. btn_search.dispatch("DOMActivate");
  649. }else{
  650. return;
  651. }
  652. }else if(rbo_select.value == "3"){
  653. misfGridIUD(grd_plceordlist, "D");
  654. }
  655. ]]>
  656. </script>
  657. </button>
  658. </group>
  659. <group id="group4" style="left:0px; top:13; width:1195px; height:27px; ">
  660. <line id="line11" class="line_6" style="x1:0px; y1:25; x2:1194px; y2:25; "/>
  661. <button id="btn_save" class="btn4_letter2" style="left:1000px; top:3px; width:56px; height:22px; ">
  662. <caption>저장</caption>
  663. <script type="javascript" ev:event="DOMActivate">
  664. <![CDATA[
  665. for(var i = 1 ; i < grd_plceordlist.rows ; i++)
  666. {
  667. var orderqty = grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderqty"));
  668. if(orderqty == "" || orderqty == 0){ //발주수량이 빈칸이 거나 0일경우
  669. messageBox(i+"행 발주수량 확인바랍니다.", "E999", "");
  670. return;
  671. }
  672. }
  673. var selectoption = "[selectprcp = '1']";
  674. grd_plceorddetllist.nodeset = "/root/main/plceord/plceorddetllist" + selectoption;
  675. grd_plceorddetllist.refresh();
  676. // for(i = 1 ; i < grd_plceorddetllist.rows ; i++){
  677. // grd_plceorddetllist.rowStatus(i) = 2;
  678. // }
  679. grd_plceordlist.sort(1, grd_plceordlist.colRef("custcode"), grd_plceordlist.rows-1, grd_plceordlist.colRef("custcode")) = "asc";
  680. grd_plceordlist.gridToInstance();
  681. if(rbo_select.value == 3){
  682. for( var j = 1 ; j < grd_plceordlist.rows ; j++ ){
  683. var orderqty = grd_plceordlist.valueMatrix(j, grd_plceordlist.colRef("orderqty"));
  684. if(parseInt(orderqty) > 0){
  685. grd_plceordlist.rowStatus(j) = 1;
  686. }
  687. }
  688. }
  689. model.setValue("/root/send/save/plceordlist", grd_plceordlist.getUpdateData());
  690. if(rbo_select.value == 2){
  691. for( var k = 1 ; k < grd_plceorddetllist.rows ; k++ ){
  692. var selectprcp = grd_plceorddetllist.valueMatrix(k, grd_plceorddetllist.colRef("selectprcp"));
  693. if(selectprcp == 1){
  694. grd_plceorddetllist.rowStatus(k) = 2;
  695. }
  696. }
  697. model.setValue("/root/send/save/plceorddetllist", grd_plceorddetllist.getUpdateData());
  698. }else{
  699. model.setValue("/root/send/save/plceorddetllist", "");
  700. }
  701. if(submit("TXRSD07601")){
  702. if(rbo_select.value == 1){
  703. //발주내역조회일경우
  704. btn_search.dispatch("DOMActivate");
  705. }else{
  706. //처방내역조회일경우
  707. model.setValue("/root/send/search/plcefromdd", getCurrentDate().substr(0,8));
  708. model.setValue("/root/send/search/plcetodd", getCurrentDate().substr(0,8));
  709. model.setValue("/root/send/search/orderno", "");
  710. model.setValue("/root/send/search/plceordgoodcd", "");
  711. model.setValue("/root/send/search/plceordmainusedeptcd",model.getValue("/root/send/search/prcpmainusedeptcd"));
  712. switch1.refresh();
  713. rbo_select.value = "1";
  714. caption2.visible = true;
  715. caption13.visible = false;;
  716. btn_addapntrgst.visible = true;
  717. btn_delapntrgst.visible = true;
  718. caption16.visible = false;
  719. model.toggle("plceord");
  720. btn_search.dispatch("DOMActivate");
  721. }
  722. }
  723. ]]>
  724. </script>
  725. </button>
  726. <button id="btn_upload" class="btn4_letter3" style="left:1057px; top:3px; width:68px; height:22px; ">
  727. <caption>업로드</caption>
  728. <script type="javascript" ev:event="DOMActivate">
  729. <![CDATA[
  730. var orderstatchk = 0;
  731. var rowstatchk = 0;
  732. for(var i = 1 ; i < grd_plceordlist.rows ; i++)
  733. {
  734. var orderstat = grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderstat"));
  735. var rowStat = grd_plceordlist.rowStatus(i);
  736. if(parseInt(orderstat) > 02){ //발주상태 완료이상일 경우
  737. orderstatchk++;
  738. messageBox(i+"행 발주상태가 완료이상이라 업로드가 불가능합니다.", "E999", "");
  739. return;
  740. }
  741. if(rowStat != 0){ //입력,수정,삭제중인 ROW가 있을경우
  742. rowstatchk++;
  743. messageBox("입력,수정,삭제중인 경우 업로드가 불가능합니다. ["+i+"행]", "E999", "");
  744. return;
  745. }
  746. }
  747. for(var i = 1 ; i < grd_plceordlist.rows ; i++)
  748. {
  749. grd_plceordlist.rowStatus(i) = 2;
  750. //grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderstat")) = "02";
  751. model.setValue("/root/main/plceord/plceordlist["+i+"]/orderstat", "02");
  752. }
  753. model.setValue("/root/send/save/plceordlist", grd_plceordlist.getUpdateData());
  754. if(submit("TXRSD07603")){
  755. btn_plceordsearch.dispatch("DOMActivate");
  756. }
  757. ]]>
  758. </script>
  759. </button>
  760. <button id="btn_search" class="btn1_letter2" navindex="12" visibility="hidden" style="left:165px; top:4px; width:56px; height:22px; ">
  761. <caption>조회</caption>
  762. <script type="javascript" ev:event="DOMActivate">
  763. <![CDATA[
  764. misfGridInit(grd_plceordlist);
  765. misfGridInit(grd_plceorddetllist);
  766. misfMsterDetailRetrieve();
  767. if(rbo_select.value == 1){
  768. //발주내역조회일경우
  769. }else{
  770. //처방내역조회일경우
  771. for(i = 1 ; i < grd_plceordlist.rows ; i++){
  772. //grd_plceordlist.rowStatus(i) = 1;
  773. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderdd")) = getCurrentDate().substr(0,8);
  774. grd_plceordlist.cellAttribute("disabled", i ,grd_plceordlist.colRef("cmt")) = "false";
  775. }
  776. }
  777. ]]>
  778. </script>
  779. </button>
  780. <button id="button2" class="btn4_letter2" style="left:1126px; top:3px; width:56px; height:22px; ">
  781. <caption>SMS</caption>
  782. <script type="javascript" ev:event="DOMActivate">
  783. <![CDATA[
  784. var req = messageBox("새로 입력중이거나 수정중인 자료는 적용이 되지 않을수도 있습니다.\n", "Q003");
  785. if(req != 6){
  786. return;
  787. }
  788. for(var i = 1 ; i < grd_plceordlist.rows ; i++){
  789. grd_plceordlist.rowStatus(i) = 2;
  790. }
  791. model.setValue("/root/send/save/plceordlist", grd_plceordlist.getUpdateData());
  792. if(submit("TXRSD07604")){
  793. btn_search.dispatch("DOMActivate");
  794. }
  795. ]]>
  796. </script>
  797. </button>
  798. <button id="btn_fInitialize" class="btn4_letter3" style="left:930px; top:3px; width:68px; height:22px; ">
  799. <caption>초기화</caption>
  800. <script type="javascript" ev:event="DOMActivate">
  801. <![CDATA[
  802. fInitialize();
  803. ]]>
  804. </script>
  805. </button>
  806. </group>
  807. <group id="btn_madd" style="left:0px; top:47px; width:1195px; height:98px; vertical-align:top; ">
  808. <caption id="caption2" class="tit_2" style="left:5px; top:4px; width:100px; height:13px; ">발주내역조회</caption>
  809. <caption id="caption13" class="tit_2" visibility="hidden" style="left:5px; top:4px; width:100px; height:13px; ">처방내역조회</caption>
  810. <switch id="switch1" style="left:0px; top:25px; width:1195px; height:70px; ">
  811. <case id="plceord" selected="true">
  812. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1193px; height:62px; background-color:#fffbf2; border-color:#ffd799; "/>
  813. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_s_essential" navindex="-1" appearance="minimal" style="left:90px; top:10px; width:170px; height:19px; text-align:center; ">
  814. <choices>
  815. <itemset>
  816. <label/>
  817. <value/>
  818. </itemset>
  819. </choices>
  820. <script type="javascript" ev:event="xforms-value-changed">
  821. <![CDATA[
  822. misfGridInit(grd_fixasetlist);
  823. misfGridInit(grd_rfchprvnlist);
  824. // rszfLMSComboList(model.getValue(cmb_goodflag.attribute("ref")), "", "", "cmb_lrgcd_search", "", "L", "", "Y");
  825. //rszfLMSComboList(pGood_flag, pLrgcd, pMdlcd, pControl_name, pGrid_id, pLMSflag, pAllflag, pResultFlag){
  826. // rszfLMSComboList("EQ", "", "", "cmb_lrgcd_search", "", "L", "Y", "Y");
  827. cmb_mdlcd_search.value='';
  828. model.refresh();
  829. //이현민
  830. /*if(cmb_instcd.value =="012") {
  831. rbo_inventoryflag.value = "Y";
  832. }else{
  833. rbo_inventoryflag.value = "A";
  834. }*/
  835. ]]>
  836. </script>
  837. </select1>
  838. <caption id="cap_mngtdeptcd" class="search_name" style="left:5px; top:38px; width:86px; height:17px; ">사용부서 :</caption>
  839. <caption id="cap_instcd_search" class="search_name" style="left:265px; top:10px; width:90px; height:17px; ">발주일자 :</caption>
  840. <caption id="caption4" style="left:437px; top:12px; width:15px; height:20px; ">~</caption>
  841. <caption id="caption5" class="search_name" style="left:265px; top:38px; width:90px; height:17px; ">물품코드 :</caption>
  842. <input id="ipt_plcetodd" ref="/root/send/search/plcetodd" navindex="0" inputtype="date" format="yyyy-mm-dd" style="left:450px; top:10px; width:85px; height:19px; text-align:center; ">
  843. <script type="javascript" ev:event="onkeypress">
  844. <![CDATA[
  845. if(event.keyCode == "13"){
  846. ipt_plcetodd.value = ipt_plcetodd.currentText;
  847. btn_search.dispatch("DOMActivate");
  848. }
  849. ]]>
  850. </script>
  851. </input>
  852. <caption id="cap_instcd" class="search_name" style="left:5px; top:10px; width:86px; height:17px; ">기관코드 :</caption>
  853. <input id="ipt_plceordgoodcd" ref="/root/send/search/plceordgoodcd" style="left:350px; top:38px; width:160px; height:19px; ">
  854. <script type="javascript" ev:event="xforms-value-changed">
  855. <![CDATA[
  856. if(ipt_plceordgoodcd.value.length == 0)
  857. ipt_plceordgoodnm.value = "";
  858. else
  859. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodcd",
  860. "goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(ipt_plceordgoodcd.attribute("ref")) ,"","plceordgoodcd,plceordgoodnm",
  861. ipt_plceordgoodcd,"SPRSD00210","instcd","cmb_instcd");
  862. ipt_plceordgoodcd.refresh();
  863. ipt_plceordgoodnm.refresh();
  864. ]]>
  865. </script>
  866. </input>
  867. <input id="ipt_orderno" ref="/root/send/search/orderno" style="left:635px; top:10px; width:70px; height:19px; ">
  868. <script type="javascript" ev:event="onkeydown">
  869. <![CDATA[
  870. inputEnterKey("btn_search", "DOMActivate");
  871. ]]>
  872. </script>
  873. </input>
  874. <input id="ipt_plcefromdd" ref="/root/send/search/plcefromdd" navindex="-2" inputtype="date" format="yyyy-mm-dd" style="left:350px; top:10px; width:85px; height:19px; text-align:center; ">
  875. <script type="javascript" ev:event="onkeypress">
  876. <![CDATA[
  877. if(event.keyCode == "13"){
  878. ipt_plcefromdd.value = ipt_plcefromdd.currentText;
  879. btn_search.dispatch("DOMActivate");
  880. }
  881. ]]>
  882. </script>
  883. </input>
  884. <button id="btn_plceordsearch" class="btn1_letter2" navindex="11" style="left:1010px; top:24px; width:56px; height:22px; ">
  885. <caption>조회</caption>
  886. <script type="javascript" ev:event="DOMActivate">
  887. <![CDATA[
  888. if(ipt_plcefromdd.value.length != 8){
  889. messageBox("발주일자가 비었거나 잘못되었습니다. 확인해주십시오.", "E999", "");
  890. model.setFocus("ipt_plcefromdd");
  891. return;
  892. }
  893. // if(ipt_plcetodd.value.length != 8){
  894. // messageBox("발주일자가 비었거나 잘못되었습니다. 확인해주십시오.", "E999", "");
  895. // model.setFocus("ipt_plcetodd");
  896. // return;
  897. // }
  898. btn_search.dispatch("DOMActivate");
  899. ]]>
  900. </script>
  901. </button>
  902. <line id="line1" class="line_4" style="x1:995px; y1:10px; x2:995px; y2:60px; border-color:#ffd799; "/>
  903. <select1 id="cmb_plceordmainusedeptcd" ref="/root/send/search/plceordmainusedeptcd" appearance="minimal" style="left:90px; top:38px; width:170px; height:19px; ">
  904. <choices>
  905. <itemset>
  906. <label/>
  907. <value/>
  908. </itemset>
  909. </choices>
  910. </select1>
  911. <input id="ipt_goodcd" ref="/root/tempdata/search/goodcd" visibility="hidden" style="left:730px; top:25px; width:100px; height:19px; "/>
  912. <select1 id="cmb_reqflag" visibility="hidden" appearance="minimal" style="left:775px; top:10px; width:100px; height:19px; ">
  913. <choices>
  914. <item>
  915. <label>combo1</label>
  916. <value>combo1</value>
  917. </item>
  918. </choices>
  919. </select1>
  920. <input id="ipt_goodnm" ref="/root/tempdata/search/goodnm" visibility="hidden" style="left:765px; top:40px; width:100px; height:19px; "/>
  921. <input id="input1" ref="/root/tempdata/search/allsize" visibility="hidden" style="left:715px; top:10px; width:100px; height:19px; "/>
  922. <select1 id="cmb_unit" ref="/root/combotemp/unit" visibility="hidden" appearance="minimal" style="left:745px; top:40px; width:100px; height:20px; ">
  923. <choices>
  924. <itemset>
  925. <label/>
  926. <value/>
  927. </itemset>
  928. </choices>
  929. </select1>
  930. <input id="ipt_plceordgoodnm" ref="/root/send/search/plceordgoodnm" style="left:533px; top:38px; width:192px; height:19px; ">
  931. <script type="javascript" ev:event="xforms-value-changed">
  932. <![CDATA[
  933. if(ipt_plceordgoodnm.value.length == 0)
  934. ipt_plceordgoodcd.value = "";
  935. else
  936. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodnm",
  937. "goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(ipt_plceordgoodnm.attribute("ref")) ,"","plceordgoodcd,plceordgoodnm",
  938. ipt_plceordgoodnm,"SPRSD00210","instcd","cmb_instcd");
  939. ipt_plceordgoodcd.refresh();
  940. ipt_plceordgoodnm.refresh();
  941. ]]>
  942. </script>
  943. </input>
  944. <button id="btn_plceordgoodcd" class="icon_search" style="left:513px; top:40px; width:16px; height:16px; ">
  945. <caption/>
  946. <script type="javascript" ev:event="DOMActivate">
  947. <![CDATA[
  948. rszfOpenPopUpListByWndName(ipt_plceordgoodcd,"","plceordgoodcd,allsizespecid,plceordgoodnm","SPRSD00210","instcd","cmb_instcd,");
  949. ipt_plceordgoodcd.refresh();
  950. ipt_plceordgoodnm.refresh();
  951. ]]>
  952. </script>
  953. </button>
  954. <caption id="caption7" class="search_name" style="left:550px; top:10px; width:90px; height:17px; ">발주번호 :</caption>
  955. <button id="btn_req" class="btn4_letter5" style="left:1085px; top:25px; width:92px; height:22px; ">
  956. <caption>청구증생성</caption>
  957. <script type="javascript" ev:event="DOMActivate">
  958. <![CDATA[
  959. if(rbo_select.value == "1"){
  960. // if(ipt_orderno.value == ""){
  961. // messageBox("발주번호로 조회 후에 청구증생성을 눌러주십시오.", "E999", "");
  962. // return;
  963. // }
  964. var row = grd_plceordlist.rows;
  965. for(i = 1 ; i < row ; i++){
  966. var reqmakeyn = grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("reqmakeyn"));
  967. if(reqmakeyn != "N"){
  968. messageBox("이미 청구증이 생선된 자료가 있습니다.", "E999", "");
  969. return;
  970. }
  971. var orderno2 = model.getValue("/root/main/plceord/plceordlist[" + i + "]/orderno");
  972. var orderno3 = grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("orderno"));
  973. }
  974. if(orderno2 == orderno3){
  975. for(i = 1 ; i < row ; i++){
  976. grd_plceordlist.rowStatus(i) = 2;
  977. }
  978. }else{
  979. messageBox("거래업체가 두군데 이상", "E008", "");
  980. }
  981. model.setValue("/root/send/save/plceordlist", grd_plceordlist.getUpdateData());
  982. if(submit("TXRSD07605")){
  983. btn_plceordsearch.dispatch("DOMActivate");
  984. var reqmakeyn = grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("reqmakeyn"));
  985. if(reqmakeyn != "N"){
  986. if(messageBox("청구 불출서를 출력 하시겠습니까?" ,"Q") == "6") {
  987. model.setValue("/root/main/list/goodreq/goodreqmainlist/instcd",grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("instcd")));
  988. model.setValue("/root/main/list/goodreq/goodreqmainlist/reqdd",grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("orderdd")));
  989. model.setValue("/root/main/list/goodreq/goodreqmainlist/reqno",grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("reqmakeyn")));
  990. model.setValue("/root/main/list/goodreq/goodreqmainlist/reqdeptcd",grd_plceordlist.valueMatrix(1, grd_plceordlist.colRef("workspce4")));
  991. fPrintReqList();
  992. }
  993. }
  994. }
  995. }
  996. ]]>
  997. </script>
  998. </button>
  999. </case>
  1000. <case id="prcp">
  1001. <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1193px; height:62px; background-color:#fffbf2; border-color:#ffd799; "/>
  1002. <input id="ipt_prcpcd" ref="/root/send/search/prcpcd" navindex="4" visibility="hidden" style="left:670px; top:40px; width:68px; height:19px; "/>
  1003. <caption id="caption10" class="search_name" style="left:885px; top:10px; width:117px; height:17px; ">수술실방번호 :</caption>
  1004. <caption id="caption1" class="search_name" style="left:5px; top:40px; width:87px; height:17px; ">물품코드 :</caption>
  1005. <caption id="caption11" class="search_name" visibility="hidden" style="left:660px; top:40px; width:42px; height:17px; ">처방코드 :</caption>
  1006. <select1 id="cmb_roomdeptcd" ref="/root/send/search/roomdeptcd" navindex="7" appearance="minimal" style="left:997px; top:10px; width:100px; height:19px; ">
  1007. <choices>
  1008. <itemset nodeset="/root/combotemp/operationcombo">
  1009. <label ref="label"/>
  1010. <value ref="value"/>
  1011. </itemset>
  1012. </choices>
  1013. </select1>
  1014. <caption id="caption12" class="search_name" visibility="hidden" style="left:725px; top:40px; width:27px; height:17px; ">사원번호 :</caption>
  1015. <caption id="caption3" class="search_name" style="left:240px; top:10px; width:85px; height:17px; ">처방일자 :</caption>
  1016. <input id="ipt_emplnm" ref="/root/send/search/emplnm" class="input_search" disabled="true" navindex="9" visibility="hidden" style="left:794px; top:38px; width:16px; height:19px; "/>
  1017. <input id="ipt_emplno" ref="/root/send/search/emplno" class="input_search" navindex="8" visibility="hidden" style="left:745px; top:38px; width:25px; height:19px; text-align:center; ">
  1018. <script type="javascript" ev:event="onkeypress">
  1019. <![CDATA[
  1020. if(event.keyCode == 13)
  1021. {
  1022. if(ipt_emplno.value == ipt_emplno.currentText) return;
  1023. ipt_emplno.value = ipt_emplno.currentText;
  1024. rpbfValidationCheck("EMPLNO", "emplno,emplnm");
  1025. model.refresh();
  1026. if(model.getValue("/root/send/search/emplnm") != "")
  1027. btn_search.dispatch("DOMActivate");
  1028. }
  1029. ]]>
  1030. </script>
  1031. <script type="javascript" ev:event="xforms-value-changed">
  1032. <![CDATA[
  1033. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  1034. model.refresh();
  1035. if(model.getValue("/root/send/search/emplnm") != "")
  1036. btn_search.dispatch("DOMActivate");
  1037. ]]>
  1038. </script>
  1039. </input>
  1040. <button id="btn_emplno" class="icon_search" visibility="hidden" style="left:774px; top:38px; width:16px; height:16px; ">
  1041. <caption/>
  1042. <script type="javascript" ev:event="DOMActivate">
  1043. <![CDATA[
  1044. rpbfOpenPopUpList("SPRPB00101", ipt_emplno, "emplno,emplnm", "", "N");
  1045. model.refresh();
  1046. if(model.getValue("/root/send/search/emplnm") != "")
  1047. btn_search.dispatch("DOMActivate");
  1048. ]]>
  1049. </script>
  1050. </button>
  1051. <input id="ipt_prcptodd" ref="/root/send/search/prcptodd" navindex="3" inputtype="date" format="yyyy-mm-dd" style="left:425px; top:10px; width:85px; height:19px; text-align:center; ">
  1052. <script type="javascript" ev:event="onkeypress">
  1053. <![CDATA[
  1054. if(event.keyCode == "13"){
  1055. ipt_prcptodd.value = ipt_prcptodd.currentText;
  1056. btn_search.dispatch("DOMActivate");
  1057. }
  1058. ]]>
  1059. </script>
  1060. </input>
  1061. <input id="ipt_prcpfromdd" ref="/root/send/search/prcpfromdd" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:325px; top:10px; width:85px; height:19px; text-align:center; ">
  1062. <script type="javascript" ev:event="onkeypress">
  1063. <![CDATA[
  1064. if(event.keyCode == "13"){
  1065. ipt_prcpfromdd.value = ipt_prcpfromdd.currentText;
  1066. btn_search.dispatch("DOMActivate");
  1067. }
  1068. ]]>
  1069. </script>
  1070. </input>
  1071. <caption id="caption8" style="left:412px; top:10px; width:15px; height:20px; ">~</caption>
  1072. <caption id="caption9" class="search_name" style="left:5px; top:10px; width:86px; height:17px; ">사용부서 :</caption>
  1073. <input id="ipt_prcpgoodcd" ref="/root/send/search/prcpgoodcd" navindex="1" style="left:90px; top:38px; width:140px; height:19px; ">
  1074. <script type="javascript" ev:event="xforms-value-changed">
  1075. <![CDATA[
  1076. if(ipt_prcpgoodcd.value.length == 0)
  1077. ipt_prcpgoodnm.value = "";
  1078. else
  1079. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodcd",
  1080. "goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(ipt_prcpgoodcd.attribute("ref")) ,"","prcpgoodcd,prcpgoodnm",
  1081. ipt_prcpgoodcd,"SPRSD00210","instcd","cmb_instcd");
  1082. ipt_prcpgoodcd.refresh();
  1083. ipt_prcpgoodnm.refresh();
  1084. ]]>
  1085. </script>
  1086. </input>
  1087. <input id="ipt_prcpgoodnm" ref="/root/send/search/prcpgoodnm" navindex="1" style="left:251px; top:38px; width:155px; height:19px; ">
  1088. <script type="javascript" ev:event="xforms-value-changed">
  1089. <![CDATA[
  1090. if(ipt_prcpgoodnm.value.length == 0)
  1091. ipt_prcpgoodcd.value = "";
  1092. else
  1093. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodnm",
  1094. "goodnm," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(ipt_prcpgoodnm.attribute("ref")) ,"","prcpgoodcd,prcpgoodnm",
  1095. ipt_prcpgoodcd,"SPRSD00210","instcd","cmb_instcd");
  1096. ipt_prcpgoodcd.refresh();
  1097. ipt_prcpgoodnm.refresh();
  1098. ]]>
  1099. </script>
  1100. </input>
  1101. <button id="btn_prcpgoodcd" class="icon_search" style="left:233px; top:39px; width:16px; height:16px; ">
  1102. <caption/>
  1103. <script type="javascript" ev:event="DOMActivate">
  1104. <![CDATA[
  1105. rszfOpenPopUpListByWndName(ipt_prcpgoodcd,"","prcpgoodcd,allsizespecid,prcpgoodnm","SPRSD00210","instcd","cmb_instcd,");
  1106. ipt_prcpgoodcd.refresh();
  1107. ipt_prcpgoodnm.refresh();
  1108. ]]>
  1109. </script>
  1110. </button>
  1111. <line id="line12" class="line_4" style="x1:1121px; y1:10px; x2:1121px; y2:60px; border-color:#ffd799; "/>
  1112. <button id="btn_prcpsearch" class="btn1_letter2" navindex="10" style="left:1130px; top:24px; width:56px; height:22px; ">
  1113. <caption>조회</caption>
  1114. <script type="javascript" ev:event="DOMActivate">
  1115. <![CDATA[
  1116. if(ipt_prcpfromdd.value.length != 8){
  1117. messageBox("상세내역조회 발주일자가 비었거나 잘못되었습니다. 확인해주십시오.", "E999", "");
  1118. model.setFocus("ipt_prcpfromdd");
  1119. return;
  1120. }
  1121. if(ipt_prcptodd.value.length != 8){
  1122. messageBox("상세내역조회 발주일자가 비었거나 잘못되었습니다. 확인해주십시오.", "E999", "");
  1123. model.setFocus("ipt_prcptodd");
  1124. return;
  1125. }
  1126. if(ipt_receivedeptnm.value == ""){
  1127. messageBox("수령부서 조회되지 않았습니다. 확인해주십시오.", "E999", "");
  1128. model.setFocus("ipt_receivedeptcd");
  1129. return;
  1130. }
  1131. btn_search.dispatch("DOMActivate");
  1132. ]]>
  1133. </script>
  1134. </button>
  1135. <select1 id="cmb_prcpmainusedeptcd" ref="/root/send/search/prcpmainusedeptcd" navindex="5" appearance="minimal" style="left:90px; top:10px; width:140px; height:19px; ">
  1136. <choices>
  1137. <itemset>
  1138. <label/>
  1139. <value/>
  1140. </itemset>
  1141. </choices>
  1142. </select1>
  1143. <output id="ipt_prcpdeptnm" ref="/root/send/search/prcpdeptnm" class="output_fix" appearance="output" style="left:722px; top:10px; width:148px; height:19px; "/>
  1144. <button id="btn_prcpdeptcd" class="icon_search" disabled="false" navindex="13" style="left:703px; top:11px; width:16px; height:16px; ">
  1145. <caption/>
  1146. <script type="javascript" ev:event="DOMActivate">
  1147. <![CDATA[
  1148. var recv_list = "prcpdeptcd,prcpdeptnm";
  1149. misfOpenPopUpList("02", ipt_prcpdeptcd,"", recv_list, cmb_instcd.value, "instcd");
  1150. ipt_prcpdeptcd.refresh();
  1151. ipt_prcpdeptnm.refresh();
  1152. if(ipt_prcpdeptcd.value == "3070000000"){
  1153. cmb_roomdeptcd.disabled = false;
  1154. cmb_roomdeptcd.select(0);
  1155. cmb_roomdeptcd.refresh();
  1156. }else{
  1157. cmb_roomdeptcd.disabled = true;
  1158. cmb_roomdeptcd.value = "";
  1159. cmb_roomdeptcd.refresh();
  1160. }
  1161. ]]>
  1162. </script>
  1163. </button>
  1164. <input id="ipt_prcpdeptcd" ref="/root/send/search/prcpdeptcd" class="input_s_essential" disabled="false" navindex="6" style="left:610px; top:10px; width:90px; height:19px; ">
  1165. <script type="javascript" ev:event="xforms-value-changed">
  1166. <![CDATA[
  1167. if(ipt_prcpdeptcd.value.length == 0)
  1168. ipt_prcpdeptnm.value = "";
  1169. else
  1170. misfValidationCheck("02", "", "prcpdeptcd,prcpdeptnm", cmb_instcd.value, "instcd" );
  1171. ipt_prcpdeptcd.refresh();
  1172. ipt_prcpdeptnm.refresh();
  1173. if(ipt_prcpdeptcd.value == "3070000000"){
  1174. cmb_roomdeptcd.disabled = false;
  1175. cmb_roomdeptcd.select(0);
  1176. cmb_roomdeptcd.refresh();
  1177. }else{
  1178. cmb_roomdeptcd.disabled = true;
  1179. cmb_roomdeptcd.value = "";
  1180. cmb_roomdeptcd.refresh();
  1181. }
  1182. ]]>
  1183. </script>
  1184. </input>
  1185. <caption id="caption15" class="search_name" style="left:520px; top:10px; width:95px; height:17px; ">시행부서 :</caption>
  1186. </case>
  1187. <case id="ware">
  1188. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1193px; height:62px; background-color:#fffbf2; border-color:#ffd799; "/>
  1189. <line id="line2" class="line_4" style="x1:1086px; y1:10px; x2:1086px; y2:60px; border-color:#ffd799; "/>
  1190. <button id="button1" class="btn1_letter5" navindex="10" style="left:1095px; top:24px; width:92px; height:22px; ">
  1191. <caption>청구 data</caption>
  1192. <script type="javascript" ev:event="DOMActivate">
  1193. <![CDATA[
  1194. if(ipt_receivedeptnm.value == ""){
  1195. messageBox("수령부서 조회되지 않았습니다. 확인해주십시오.", "E999", "");
  1196. model.setFocus("ipt_receivedeptcd");
  1197. return;
  1198. }
  1199. //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
  1200. if(cmb_wareflag.value == "") {
  1201. messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
  1202. model.setFocus("cmb_wareflag");
  1203. return;
  1204. }
  1205. // //출고일자에 선택된 값이 없으면, 출고일자를 선택하라고 alert함
  1206. // if(ipt_delivedd.value.length < 8) {
  1207. // messageBox("출고일자가 올바로 선택되지 않았습니다. \n\n먼저 출고일자를 선택하십시요.", "E999", "");
  1208. // model.setFocus("ipt_delivedd");
  1209. // return;
  1210. // }
  1211. // //출고부서에 선택된 값이 없으면, 출고부서를 선택하라고 alert함
  1212. // if(ipt_delivedeptcd.value == "") {
  1213. // messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
  1214. // model.setFocus("ipt_delivedeptcd");
  1215. // return;
  1216. // }
  1217. //출고부서명에 값이 없으면, 출고부서를 선택하라고 alert함 - 2013.02.26 박준범
  1218. if(opt_delivedeptnm.value == "") {
  1219. messageBox("출고부서가 정확하게 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
  1220. model.setFocus("ipt_delivedeptcd");
  1221. return;
  1222. }
  1223. //popup 에 전달할 parameter를 setting한다.
  1224. model.setValue("/root/popreq/instcd", cmb_instcd.value);
  1225. model.setValue("/root/popreq/wareflag", cmb_wareflag.value);
  1226. model.setValue("/root/popreq/wareflagnm", cmb_wareflag.label);
  1227. model.setValue("/root/popreq/delivedd", ipt_delivedd.value);
  1228. model.setValue("/root/popreq/reqdeptcd", ipt_delivedeptcd.value);
  1229. model.setValue("/root/popreq/reqdeptnm", opt_delivedeptnm.value);
  1230. model.setValue("/root/popreq/openflag", "SMRSD07600");
  1231. //saveyn(popup 창에서 저장버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
  1232. model.setValue("/root/popreq/saveyn", "");
  1233. //갯수초기화
  1234. model.setValue("/root/popreq/count", 0);
  1235. //popup 프로그램 호출
  1236. window.load("SPRSO20200.xrw", "modal","", "", "/root/popreq","/root/popdata");
  1237. var cnt = model.getValue("/root/popreq/count");
  1238. var mrows = grd_plceordlist.rows;
  1239. var mcnt = parseInt(mrows)+parseInt(cnt);
  1240. var j = 1;
  1241. for(i = mrows ; i <= mcnt-1 ; i++){
  1242. misfGridIUD(grd_plceordlist,"A");
  1243. grd_plceordlist.rowStatus(i) = 0;
  1244. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("instcd")) = cmb_instcd.value;
  1245. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("reqflag")) = "02";
  1246. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderstat")) = "01";
  1247. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("workspce2")) = ipt_receivedeptnm.value;
  1248. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("workspce4")) = ipt_receivedeptcd.value;
  1249. grd_plceordlist.valueMatrix(i, grd_plceordlist.colRef("orderdd")) = getCurrentDate().substr(0,8);
  1250. grd_plceordlist.cellAttribute("disabled", i, grd_plceordlist.colRef("reqflag")) = "true";
  1251. grd_plceordlist.cellAttribute("disabled", i, grd_plceordlist.colRef("orderstat")) = "true";
  1252. grd_plceordlist.cellAttribute("disabled", i, grd_plceordlist.colRef("roomdeptcd")) = "true";
  1253. model.setValue("/root/main/plceord/plceordlist["+i+"]/goodcd", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/goodcd")); //물품코드
  1254. model.setValue("/root/main/plceord/plceordlist["+i+"]/goodhngnm", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/goodnm")); //물품명
  1255. model.setValue("/root/main/plceord/plceordlist["+i+"]/orderqty", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/deliveqty")); //발주수량
  1256. model.setValue("/root/main/plceord/plceordlist["+i+"]/custcode", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/custcode")); //거래처코드
  1257. model.setValue("/root/main/plceord/plceordlist["+i+"]/custnm", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/custnm")); //거래처명
  1258. model.setValue("/root/main/plceord/plceordlist["+i+"]/allsizespecid", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/allsizespecid")); //allsize
  1259. model.setValue("/root/main/plceord/plceordlist["+i+"]/goodspec", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/goodspec")); //규격
  1260. model.setValue("/root/main/plceord/plceordlist["+i+"]/acntcd", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/acntcd")); //계정과목
  1261. model.setValue("/root/main/plceord/plceordlist["+i+"]/acntnm", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/acntnm")); //계정과목명
  1262. model.setValue("/root/main/plceord/plceordlist["+i+"]/rsdhinstcd", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/instcd")); //청구 기관코드
  1263. model.setValue("/root/main/plceord/plceordlist["+i+"]/rsdhreqflag", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/reqflag")); //청구 물품구분
  1264. model.setValue("/root/main/plceord/plceordlist["+i+"]/rsdhreqdd", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/reqdd")); //청구 청구일자
  1265. model.setValue("/root/main/plceord/plceordlist["+i+"]/rsdhreqno", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/reqno")); //청구 청구번호
  1266. model.setValue("/root/main/plceord/plceordlist["+i+"]/rsdhreqseqno", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/reqseqno")); //청구 청구일련번호
  1267. model.setValue("/root/main/plceord/plceordlist["+i+"]/rsdhreqdeptcd", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/reqdeptcd")); //청구 청구부서
  1268. model.setValue("/root/main/plceord/plceordlist["+i+"]/seq", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/seq")); //청구순번
  1269. model.setValue("/root/main/plceord/plceordlist["+i+"]/orderunit", model.getValue("/root/popsubdata/reqdetaillist["+j+"]/deliveunit")); //청구순번
  1270. j++;
  1271. }
  1272. grd_plceordlist.refresh();
  1273. ]]>
  1274. </script>
  1275. </button>
  1276. <input id="ipt_delivedeptcd" ref="/root/send/warepop/delivedeptcd" class="input_default" navindex="2" style="left:315px; top:10px; width:70px; height:19px; ">
  1277. <script type="javascript" ev:event="xforms-value-changed">
  1278. <![CDATA[
  1279. //2013.02.26 박준범 : 부서코드 변경시 부서코드명을 먼저 지워준다.
  1280. opt_delivedeptnm.value = "";
  1281. misfValidationCheck("02", "", "delivedeptcd,delivedeptnm" );
  1282. ]]>
  1283. </script>
  1284. <script type="javascript" ev:event="onkeypress">
  1285. <![CDATA[
  1286. inputEnterKey("ipt_delivedeptcd", "xforms-value-changed");
  1287. ]]>
  1288. </script>
  1289. </input>
  1290. <button id="btn_delivedeptcd" class="icon_search" navindex="3" style="left:387px; top:10px; width:16px; height:16px; ">
  1291. <caption/>
  1292. <script type="javascript" ev:event="DOMActivate">
  1293. <![CDATA[
  1294. var vOrigDeptcd = ipt_delivedeptcd.value; //popup을 열기전 부서 저장
  1295. var recv_list = "delivedeptcd,delivedeptnm";
  1296. misfOpenPopUpList("02", ipt_delivedeptcd,"", recv_list) ;
  1297. ipt_delivedeptcd.refresh();
  1298. opt_delivedeptnm.refresh();
  1299. ]]>
  1300. </script>
  1301. </button>
  1302. <output id="opt_delivedeptnm" ref="/root/send/warepop/delivedeptnm" class="output_fix" appearance="output" style="left:405px; top:10px; width:126px; height:19px; "/>
  1303. <caption id="caption18" class="search_name" style="left:11px; top:10px; width:64px; height:17px; ">창고:</caption>
  1304. <select1 id="cmb_wareflag" ref="/root/send/warepop/wareflag" class="combo_default" navindex="4" appearance="minimal" style="left:65px; top:10px; width:145px; height:19px; ">
  1305. <choices>
  1306. <itemset nodeset="/root/init/wareflag">
  1307. <label ref="cdnm"/>
  1308. <value ref="cdid"/>
  1309. </itemset>
  1310. </choices>
  1311. <script type="javascript" ev:event="xforms-value-changed">
  1312. <![CDATA[
  1313. ]]>
  1314. </script>
  1315. </select1>
  1316. <input id="ipt_delivedd" ref="/root/send/warepop/delivedd" navindex="5" visibility="hidden" inputtype="date" style="left:640px; top:10px; width:89px; height:19px; ">
  1317. <script type="javascript" ev:event="xforms-value-changed">
  1318. <![CDATA[
  1319. ]]>
  1320. </script>
  1321. </input>
  1322. <input id="ipt_deliveno" ref="/root/send/warepop/deliveno" class="input_default" disabled="true" navindex="6" visibility="hidden" maxbyte="4" style="left:730px; top:10px; width:32px; height:19px; text-align:center; ">
  1323. <script type="javascript" ev:event="xforms-value-changed">
  1324. <![CDATA[
  1325. /* 출고번호를 disabled 했기 때문에 아래 script 수행되지 않기에 모두 comment처리
  1326. var vDeliveno = model.getValue("/root/send/search/deliveno");
  1327. //입력된 값이 없으면 return
  1328. if( vDeliveno.length == 0 ) return;
  1329. if (!vDeliveno.isNumber()) {
  1330. messageBox("번호(숫자)를 " ,"C001");
  1331. model.setFocus("ipt_deliveno");
  1332. return;
  1333. }
  1334. //입력된 값이 숫자인 경우만 아래 실행
  1335. //setInputNodeCurText(); //input의 ref 노드에 현재 label setValue (tfHelper.js)
  1336. vDeliveno = model.getValue("/root/send/search/deliveno").getLeftPad(4,"0");
  1337. model.setValue("/root/send/search/deliveno", vDeliveno);
  1338. model.refreshpart("/root/send/search/deliveno");
  1339. */
  1340. ]]>
  1341. </script>
  1342. </input>
  1343. <caption id="caption19" class="search_name" visibility="hidden" style="left:560px; top:10px; width:85px; height:17px; ">청구일자:</caption>
  1344. <caption id="caption20" class="search_name" style="left:235px; top:10px; width:87px; height:17px; vertical-align:middle; ">청구부서:</caption>
  1345. </case>
  1346. </switch>
  1347. <select1 id="rbo_select" ref="/root/send/search/listselect" appearance="full" cols="3" overflow="visible" style="left:110px; top:6px; width:370px; height:20px; border-style:none; ">
  1348. <choices>
  1349. <item>
  1350. <label>발주내역조회</label>
  1351. <value>1</value>
  1352. </item>
  1353. <item>
  1354. <label>처방내역조회</label>
  1355. <value>2</value>
  1356. </item>
  1357. <item>
  1358. <label>청구내역조회</label>
  1359. <value>3</value>
  1360. </item>
  1361. </choices>
  1362. <script type="javascript" ev:event="xforms-value-changed">
  1363. <![CDATA[
  1364. var chk = 0;
  1365. var selectvalue = rbo_select.value;
  1366. for(i = 1 ; i < grd_plceordlist.rows ; i++){
  1367. if(grd_plceordlist.rowStatus(i) == 1){
  1368. chk++;
  1369. }
  1370. }
  1371. if(chk != 0){
  1372. var req = messageBox("저장하지 않은 자료는 지워집니다..", "Q003");
  1373. if(req == 6){
  1374. }else{
  1375. if(selectvalue == "1"){
  1376. rbo_select.value = 2;
  1377. }else{
  1378. rbo_select.value = 1;
  1379. }
  1380. return;
  1381. }
  1382. }
  1383. misfGridInit(grd_plceordlist);
  1384. misfGridInit(grd_plceorddetllist);
  1385. if(rbo_select.value == 1){
  1386. caption2.visible = true;
  1387. caption13.visible = false;
  1388. model.toggle("plceord");
  1389. btn_addapntrgst.visible = true;
  1390. btn_delapntrgst.visible = true;
  1391. caption16.visible = false;
  1392. //chk_allselect.visible = true;
  1393. btn_upload.visible = true;
  1394. grd_plceordlist.colWidth(grd_plceordlist.colRef("selectstat")) = "50";
  1395. grd_plceordlist.caption = "__선택^발주일자^발주번호^순번^청구순번^물품코드^물품명^규격^Allsize^발주수량^발주단위^발주상태^청구증^SMS^시행부서^시행부서^수술실방^계정과목^거래처^수령^청구구분^처방량^발주자사번^발주자성명^비고^시행부서^수술실방번호^파일";
  1396. grd_plceordlist.refresh();
  1397. }else if(rbo_select.value == 2){
  1398. caption13.visible = true;
  1399. caption2.visible = false;
  1400. model.toggle("prcp");
  1401. btn_addapntrgst.visible = false;
  1402. btn_delapntrgst.visible = false;
  1403. caption16.visible = true;
  1404. //chk_allselect.visible = false;
  1405. btn_upload.visible = false;
  1406. //grd_plceordlist.colWidth(grd_plceordlist.colRef("selectstat")) = "0";
  1407. grd_plceordlist.caption = "선택^발주일자^발주번호^순번^청구순번^물품코드^물품명^규격^Allsize^발주수량^발주단위^발주상태^청구증^SMS^시행부서^시행부서^수술실방^계정과목^거래처^수령^청구구분^처방량^발주자사번^발주자성명^비고^시행부서^수술실방번호^파일";
  1408. grd_plceordlist.refresh();
  1409. }else{
  1410. caption2.visible = true;
  1411. caption13.visible = false;
  1412. model.toggle("ware");
  1413. btn_addapntrgst.visible = false;
  1414. btn_delapntrgst.visible = true;
  1415. caption16.visible = false;
  1416. //chk_allselect.visible = true;
  1417. btn_upload.visible = true;
  1418. grd_plceordlist.colWidth(grd_plceordlist.colRef("selectstat")) = "50";
  1419. grd_plceordlist.caption = "__선택^발주일자^발주번호^순번^청구순번^물품코드^물품명^규격^Allsize^발주수량^발주단위^발주상태^청구증^SMS^시행부서^시행부서^수술실방^계정과목^거래처^수령^청구구분^처방량^발주자사번^발주자성명^비고^시행부서^수술실방번호^파일";
  1420. grd_plceordlist.refresh();
  1421. }
  1422. ]]>
  1423. </script>
  1424. </select1>
  1425. <caption id="caption16" visibility="hidden" style="left:545px; top:5px; width:650px; height:20px; font-weight:bold; color:#ff0000; ">※ 발주세부내역 조회건이 10,000건이 넘을 경우 에러메시지가 나올 수 있습니다. 조회조건을 더 넣어주세요.</caption>
  1426. </group>
  1427. </xhtml:body>
  1428. </xhtml:html>