SMPIE00200_의약품구입내역신고관리.xrw 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520
  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. <send>
  10. <fromdd/>
  11. <todd/>
  12. <list1>
  13. <h801/>
  14. </list1>
  15. <list2>
  16. <h802/>
  17. </list2>
  18. <list3>
  19. <h803/>
  20. </list3>
  21. <item1>
  22. <reptcd/>
  23. </item1>
  24. <appno/>
  25. <appyearmnth/>
  26. <repttotcnt/>
  27. <searchreptcd/>
  28. </send>
  29. <send_createappno>
  30. <appno1/>
  31. <appno2/>
  32. </send_createappno>
  33. <send_appno>
  34. <appno/>
  35. <appyearmnth/>
  36. </send_appno>
  37. <send_reptcd>
  38. <appno/>
  39. <reptcd/>
  40. </send_reptcd>
  41. <send_save801>
  42. <save801/>
  43. </send_save801>
  44. <send_save802>
  45. <save802/>
  46. </send_save802>
  47. <send_save803>
  48. <save803/>
  49. </send_save803>
  50. <main>
  51. <list01>
  52. <gridpiehh801>
  53. <appno/>
  54. <docuno/>
  55. <corpmark/>
  56. <chrgnm/>
  57. <cnfmnm/>
  58. <appyearmnth/>
  59. <repttotcnt/>
  60. <rem/>
  61. <insudt/>
  62. <insurid/>
  63. <insucnt/>
  64. <insuflag/>
  65. <winfromdd/>
  66. <wintodd/>
  67. <avgdt/>
  68. </gridpiehh801>
  69. </list01>
  70. <list02>
  71. <gridpiehh802>
  72. <reptcd/>
  73. <itemflagno/>
  74. <makecmpynm/>
  75. <item/>
  76. <spec/>
  77. <unit/>
  78. <lnnoremark/>
  79. <avg/>
  80. <fstpurcflag/>
  81. <calcscorcd/>
  82. </gridpiehh802>
  83. </list02>
  84. <list03>
  85. <gridpiehh803>
  86. <reptcd/>
  87. <lnno/>
  88. <cmpyno/>
  89. <cmpynm/>
  90. <purcdd/>
  91. <purcqty/>
  92. <purcunitcost/>
  93. <purctotamt/>
  94. <cmpyremark/>
  95. <itemflaglnkno/>
  96. </gridpiehh803>
  97. </list03>
  98. <temp>
  99. <appno>200101151</appno>
  100. </temp>
  101. <item1>
  102. <rscdgood>
  103. <reptcd/>
  104. <makecmpynm/>
  105. <item/>
  106. <spec/>
  107. <unit/>
  108. <fstpurcflag/>
  109. <calcscorcd/>
  110. </rscdgood>
  111. </item1>
  112. <result/>
  113. </main>
  114. <init>
  115. <P0280list>
  116. <P0280>
  117. <cdid/>
  118. <cdnm/>
  119. </P0280>
  120. </P0280list>
  121. <U0001list>
  122. <U0001>
  123. <cdid/>
  124. <cdnm/>
  125. </U0001>
  126. </U0001list>
  127. <P0131list>
  128. <P0131>
  129. <cdid/>
  130. <cdnm/>
  131. </P0131>
  132. </P0131list>
  133. <P0300list>
  134. <P0300>
  135. <cdid/>
  136. <cdnm/>
  137. </P0300>
  138. </P0300list>
  139. <temp>
  140. <newappnoinfo>
  141. <appno/>
  142. <appseqno/>
  143. <proccorpcd/>
  144. <chrgnm/>
  145. <prsdnm/>
  146. <appyearmnth/>
  147. </newappnoinfo>
  148. </temp>
  149. </init>
  150. <popupdata>
  151. <popupmenu>
  152. <gridpiehh702>
  153. <item>
  154. <name>신고조회</name>
  155. <func>fMenu1</func>
  156. </item>
  157. </gridpiehh702>
  158. </popupmenu>
  159. </popupdata>
  160. <hidden>
  161. <sppie00130_h802>
  162. <cond>
  163. <fromdd/>
  164. <todd/>
  165. <srchcond1/>
  166. <srchcond2/>
  167. <dtlselectyn/>
  168. <iokindyn/>
  169. </cond>
  170. <rslt>
  171. <h802>
  172. <reptcd/>
  173. <itemflagno/>
  174. <makecmpynm/>
  175. <item/>
  176. <spec/>
  177. <unit/>
  178. <lnnoremark/>
  179. <avg/>
  180. <fstpurcflag/>
  181. <calcscorcd/>
  182. </h802>
  183. </rslt>
  184. </sppie00130_h802>
  185. <sppie00130_h803>
  186. <rslt>
  187. <h803>
  188. <reptcd/>
  189. <lnno/>
  190. <cmpyno/>
  191. <cmpynm/>
  192. <purcdd/>
  193. <purcqty/>
  194. <purcunitcost/>
  195. <purctotamt/>
  196. <cmpyremark/>
  197. <itemflaglnkno/>
  198. </h803>
  199. </rslt>
  200. </sppie00130_h803>
  201. <getseqnoinfo>
  202. <getseqno>
  203. <seqno/>
  204. </getseqno>
  205. </getseqnoinfo>
  206. <addrowno>
  207. <number_h802/>
  208. <number_h803/>
  209. </addrowno>
  210. <appnolnno>
  211. <newlnno>
  212. <lnno/>
  213. </newlnno>
  214. </appnolnno>
  215. <selectlist>
  216. <appno/>
  217. <lnno/>
  218. </selectlist>
  219. <popupmenu>
  220. <h802>
  221. <item>
  222. <name>입고세부내역 조회</name>
  223. <func>fSelectDtlInpt</func>
  224. </item>
  225. </h802>
  226. </popupmenu>
  227. </hidden>
  228. <send2>
  229. <fromdd/>
  230. <todd/>
  231. <offset/>
  232. <pagesize>5000</pagesize>
  233. </send2>
  234. </root>
  235. </instance>
  236. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  237. <submission id="TRPIE00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list01"/>
  238. <submission id="TRPIE00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_appno" resultref="/root/main/list02"/>
  239. <submission id="TRPIE00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_reptcd" resultref="/root/main/list03"/>
  240. <submission id="TRPIE00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_createappno" resultref="/root/init/temp"/>
  241. <submission id="TRPIE00205" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_appno" resultref="/root/main/list01"/>
  242. <submission id="TRPIE00206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/main/item1"/>
  243. <submission id="TXPIE00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  244. <submission id="TXPIE00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list2/h802" resultref="/root/main/result"/>
  245. <submission id="TXPIE00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list3/h803" resultref="/root/main/result"/>
  246. <submission id="TXPIE00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_appno" resultref="/root/main/result"/>
  247. <submission id="TXPIE00205" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_appno" resultref="/root/main/result"/>
  248. <submission id="TXPIE00206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send_appno" resultref="/root/main/result"/>
  249. <submission id="TRPIE00131" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send2" add="bottom" resultref="/root/main/list02/gridpiehh802"/>
  250. <submission id="TRPIE00132" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send2" add="bottom" resultref="/root/main/list03/gridpiehh803"/>
  251. </model>
  252. <script type="javascript" ev:event="xforms-ready">
  253. <![CDATA[
  254. model.removeNode("/root/main/list02/gridpiehh802" );
  255. model.removeNode("/root/main/list03/gridpiehh803" );
  256. ipt_fromdd.value = getCurrentDate();
  257. ipt_todd.value = getCurrentDate();
  258. ipt_appno1.value = getCurrentDate();
  259. //grd_piehh801.frozenCols = grd_piehh801.colRef("itemnm");
  260. grd_piehh802.frozenCols = grd_piehh802.colRef("item");
  261. grd_piehh803.frozenCols = grd_piehh803.colRef("cmpynm");
  262. ]]>
  263. </script>
  264. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  265. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  266. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  267. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  268. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  269. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  270. <script type="javascript" src="../../../com/batchinfoweb/js/ZSB001.js"/>
  271. <script type="javascript">
  272. <![CDATA[
  273. // 신청일자조회 Valid Check
  274. function fSendChk() {
  275. var fromdd = model.getValue("/root/send/fromdd");
  276. var todd = model.getValue("/root/send/todd");
  277. var appno1 = model.getValue("/root/send_createappno/appno1");
  278. var appno2 = model.getValue("/root/send_createappno/appno2");
  279. var appno = appno1 + appno2;
  280. if(fromdd == ""){
  281. messageBox("신청일자 시작일을","C001");
  282. return false;
  283. }
  284. if(todd == ""){
  285. messageBox("신청일자 종료일","C001");
  286. return false;
  287. }
  288. }
  289. // 신청번호생성 신청일자 Valid Check
  290. function fDayChk(){
  291. var appno = model.getValue("/root/send_createappno/appno1");
  292. var dd = getCurrentDate();
  293. if(appno != dd){
  294. var chk = messageBox("신청일자가 오늘일자와 다릅니다.","Q003");
  295. if(chk == "6"){
  296. return true;
  297. }else{
  298. return false;
  299. }
  300. }
  301. }
  302. // 전체조회 H803
  303. function fReSelectAllF080(nowRow) {
  304. // H801조회
  305. submit("TRPIE00205");
  306. grd_piehh801.row = 1;
  307. // H802조회
  308. var appno = grd_piehh801.valueMatrix(nowRow, grd_piehh801.colRef("appno"));
  309. if (appno != "") {
  310. model.setValue("/root/send_appno/appno", appno);
  311. submit("TRPIE00202");
  312. //grd_piehh802.select(1);
  313. //fSelectH083();
  314. // H803조회
  315. /* 803 전체조회 막기
  316. var appno = grd_piehh802.valueMatrix(1, grd_piehh802.colRef("appno"));
  317. var reptcd = grd_piehh802.valueMatrix(1, grd_piehh802.colRef("reptcd"));
  318. if (appno != "" && reptcd != "") {
  319. model.setValue("/root/send_reptcd/appno", appno);
  320. model.setValue("/root/send_reptcd/reptcd", "");
  321. submit("TRPIE00203");
  322. }
  323. */
  324. }
  325. }
  326. // 입고세부조회
  327. function fSelectDtlInpt() {
  328. var reptcd = grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("reptcd"));
  329. if (reptcd == "") {
  330. messageBox("조회할 품목코드를", "C002"); //선택하십시오 !
  331. } else {
  332. model.resetInstanceNode("/root/hidden/sppie00130_h802/cond");
  333. model.setValue("/root/hidden/sppie00130_h802/cond/fromdd", grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("winfromdd"))); // 입고일자 연동
  334. model.setValue("/root/hidden/sppie00130_h802/cond/todd", grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("wintodd"))); // 입고일자 연동
  335. model.setValue("/root/hidden/sppie00130_h802/cond/srchcond1", "1"); // 검색구분 1:edi, 2:처방코드
  336. model.setValue("/root/hidden/sppie00130_h802/cond/srchcond2", reptcd); // 검색코드
  337. model.setValue("/root/hidden/sppie00130_h802/cond/dtlselectyn", "Y"); // 입고상세조회여부
  338. model.setValue("/root/hidden/sppie00130_h802/cond/iokindyn", ""); // 이송입고포함여부
  339. // 입고내역조회 팝업화면
  340. modal("SPPIE00130", 1, "10", "10", "SPPIE00130", "/root/hidden/sppie00130_h802/cond", "/root/init", "", "");
  341. // H803 그리드에 새로 신규추가할 maxrow 찾기
  342. maxRow = grd_piehh803.rows -1;
  343. var tmpreptcd = grd_piehh803.valueMatrix(maxRow, grd_piehh803.colRef("reptcd"));
  344. if (tmpreptcd != "") {
  345. maxRow = maxRow + 1;
  346. }
  347. var rsltRow = 1;
  348. var rsltNode = instance1.selectSingleNode("/root/hidden/sppie00130_h803/rslt");
  349. if (rsltNode != null) {
  350. for (var i = maxRow; i < rsltNode.childNodes.length + maxRow; i++) {
  351. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/appno", grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("appno")));
  352. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/reptcd", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/reptcd"));
  353. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/lnno", "0");
  354. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/cmpyno", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/cmpyno"));
  355. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/cmpynm", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/cmpynm"));
  356. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purcdd", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purcdd"));
  357. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purcqty", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purcqty"));
  358. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purcunitcost", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purcunitcost"));
  359. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purctotamt", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purctotamt"));
  360. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/cmpyremark", "-");
  361. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/itemflaglnkno", 1);
  362. rsltRow += 1;
  363. }
  364. grd_piehh803.refresh();
  365. }
  366. for (var i = maxRow; i < grd_piehh803.rows; i++) {
  367. grd_piehh803.rowStatus(i) = 1; // 1:insert 상태로 변경
  368. }
  369. }
  370. }
  371. // H083 조회
  372. function fSelectH083( ) {
  373. //if (grd_piehh802.colRef("reptcd") || grd_piehh802.colRef("itemflagno") || grd_piehh802.colRef("makecmpynm") || grd_piehh802.colRef("item")) {
  374. var reptcd = grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("reptcd"));
  375. if (grd_piehh802.isCell(event.target) && grd_piehh802.mouseRow >= grd_piehh802.fixedrows && reptcd != "") {
  376. var appno = grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("appno"));
  377. var reptcd = grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("reptcd"));
  378. if (appno != "" && reptcd != "") {
  379. model.setValue("/root/send_reptcd/appno", appno);
  380. model.setValue("/root/send_reptcd/reptcd", reptcd);
  381. submit("TRPIE00203");
  382. grd_piehh803.refresh();
  383. }
  384. }
  385. //}
  386. }
  387. function fSelectH082() {
  388. //if (grd_piehh801.colRef("appno") || grd_piehh801.colRef("docuno") || grd_piehh801.colRef("corpmark") || grd_piehh801.colRef("appyearmnth")) {
  389. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  390. if (grd_piehh801.isCell(event.target) && grd_piehh801.mouseRow >= grd_piehh801.fixedrows && appno != "") {
  391. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  392. if (appno != "") {
  393. //model.resetInstanceNode("/root/main/list02/gridpiehh802");
  394. //model.resetInstanceNode("/root/main/list03/gridpiehh803");
  395. model.setValue("/root/send_appno/appno", appno);
  396. submit("TRPIE00202");
  397. // 약가가 적용되었거나 만료된 경우, h802, h803 모두 수정 불가
  398. if (model.getValue("/root/main/list01/gridpiehh801[" + grd_piehh801.row + "]/insuflag") != "N") {
  399. fEditable(false);
  400. } else {
  401. fEditable(true);
  402. }
  403. /* 803 전체조회 막기
  404. var appno = grd_piehh802.valueMatrix(1, grd_piehh802.colRef("appno"));
  405. var reptcd = grd_piehh802.valueMatrix(1, grd_piehh802.colRef("reptcd"));
  406. if (appno != "" && reptcd != "") {
  407. model.setValue("/root/send_reptcd/appno", appno);
  408. model.setValue("/root/send_reptcd/reptcd", "");
  409. submit("TRPIE00203");
  410. }
  411. */
  412. }
  413. }
  414. }
  415. function fEditable(flag) {
  416. for (var i = 0; i < grd_piehh802.cols; i++) {
  417. grd_piehh802.colDisabled(i) = !flag;
  418. }
  419. input4.visible = flag;
  420. btn_addrow.visible = flag;
  421. btn_delrow.visible = flag;
  422. for (var i = 0; i < grd_piehh803.cols; i++) {
  423. grd_piehh803.colDisabled(i) = !flag;
  424. }
  425. input1.visible = flag;
  426. button6.visible = flag;
  427. button9.visible = flag;
  428. button3.visible = flag;
  429. }
  430. ]]>
  431. </script>
  432. </xhtml:head>
  433. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  434. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  435. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">의약품 구입내역 신고서 관리</caption>
  436. </group>
  437. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  438. <group id="group2" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  439. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  440. <caption id="caption3" class="search_name" style="left:473px; top:9px; width:86px; height:17px; ">신청번호 :</caption>
  441. <button id="btn_select" class="btn1_letter2" style="left:340px; top:7px; width:56px; height:22px; ">
  442. <caption>조회</caption>
  443. <script type="javascript" ev:event="DOMActivate">
  444. <![CDATA[
  445. fSendChk();
  446. submit("TRPIE00201");
  447. model.resetInstanceNode("/root/main/list02/gridpiehh802");
  448. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  449. model.removeNode("/root/main/list02/gridpiehh802" );
  450. model.removeNode("/root/main/list03/gridpiehh803" );
  451. grd_piehh802.refresh();
  452. grd_piehh803.refresh();
  453. ]]>
  454. </script>
  455. </button>
  456. <line id="line13" class="line_4" style="x1:323px; y1:7px; x2:323px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  457. <caption id="caption41" class="search_name" style="left:19px; top:9px; width:112px; height:17px; ">신청일자 :</caption>
  458. <caption id="caption11" style="left:204px; top:12px; width:15px; height:15px; ">~</caption>
  459. <input id="ipt_todd" ref="/root/send/todd" class="input_search" inputtype="date" format="yyyy-mm-dd" appearance="input" style="left:220px; top:8px; width:90px; height:19px; "/>
  460. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_search" inputtype="date" format="yyyy-mm-dd" appearance="input" style="left:110px; top:8px; width:90px; height:19px; ">
  461. <caption id="caption7"/>
  462. <script type="javascript" ev:event="DOMFocusOut">
  463. <![CDATA[
  464. //model.setValue("/root/send/todd",model.getValue("/root/send/fromdd"));
  465. //model.refreshpart("/root/send/todd");
  466. ]]>
  467. </script>
  468. </input>
  469. <button id="button11" class="btn1_letter6" style="left:695px; top:7px; width:104px; height:22px; ">
  470. <caption>신청번호생성</caption>
  471. <script type="javascript" ev:event="onclick">
  472. <![CDATA[
  473. // 신청일자 체크
  474. fDayChk();
  475. submit("TRPIE00204");
  476. var appno = model.getValue("/root/init/temp/newappnoinfo/appno");
  477. var appno2 = model.getValue("/root/init/temp/newappnoinfo/appseqno");
  478. if (appno2 != "") {
  479. messageBox(" 신청번호 "+appno+"(이)가 생성","I002");
  480. var app1 = model.getValue("/root/init/temp/newappnoinfo/appno");
  481. var app2 = app1.substr(0,8);
  482. var app3 = app1.substr(8,4);
  483. model.setValue("/root/send_createappno/appno1", app2);
  484. model.setValue("/root/send_createappno/appno2", app3);
  485. model.refreshpart("/root/send_createappno/appno1");
  486. model.refreshpart("/root/send_createappno/appno2")
  487. // H080.1 그리드신규추가;------------------------------------------------------------------------------------------------------------
  488. var nowRow = 0;
  489. var maxRow = grd_piehh801.rows -1;
  490. var tmpAppno = grd_piehh801.valueMatrix(maxRow, grd_piehh801.colRef("appno"));
  491. if (tmpAppno == "") {
  492. grd_piehh801.rowStatus(maxRow) = 1; // 1:insert 로 업데이트
  493. nowRow = maxRow;
  494. } else {
  495. grd_piehh801.addRow(true, false);
  496. nowRow = grd_piehh801.row;
  497. }
  498. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/appno", model.getValue("/root/init/temp/newappnoinfo/appno"));
  499. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/docuno", "H080");
  500. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/corpmark", model.getValue("/root/init/temp/newappnoinfo/proccorpcd"));
  501. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/chrgnm", model.getValue("/root/init/temp/newappnoinfo/chrgnm"));
  502. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/cnfmnm", model.getValue("/root/init/temp/newappnoinfo/prsdnm"));
  503. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/appyearmnth", model.getValue("/root/init/temp/newappnoinfo/appyearmnth"));
  504. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/repttotcnt", "0");
  505. model.setValue("/root/main/list01/gridpiehh801["+ nowRow +"]/rem", "");
  506. grd_piehh801.row = nowRow;
  507. grd_piehh801.refresh();
  508. grd_piehh801.refresh();
  509. model.refresh();
  510. //--------------------------------------------------------------------------------------------------------------------------------
  511. }
  512. ]]>
  513. </script>
  514. </button>
  515. <input id="ipt_appno1" ref="/root/send_createappno/appno1" class="input_search" autonext="false" maxlength="8" appearance="input" style="left:560px; top:8px; width:66px; height:19px; ">
  516. <script type="javascript" ev:event="onkeydown">
  517. <![CDATA[
  518. //inputEnterKey("button108", "DOMActivate");
  519. ]]>
  520. </script>
  521. </input>
  522. <input id="ipt_appno2" ref="/root/send_createappno/appno2" class="input_search" maxlength="4" appearance="input" style="left:628px; top:8px; width:60px; height:19px; "/>
  523. </group>
  524. <caption id="caption1" class="tit_2" style="left:5px; top:56px; width:165px; height:14px; ">의약품구입내역(H080.1)</caption>
  525. <line id="line1" class="line_1" style="x1:0px; y1:76px; x2:1194px; y2:75px; "/>
  526. <caption id="caption57" class="tit_2" style="left:5px; top:269px; width:162px; height:13px; ">의약품구입내역(H080.2)</caption>
  527. <line id="line24" class="line_1" style="x1:0px; y1:287px; x2:585px; y2:287px; "/>
  528. <datagrid id="grd_piehh802" nodeset="/root/main/list02/gridpiehh802" caption="품목코드^품목번호^품 목^규격^단위^제약(수입)회사명^비고사항^가중평균가^최초구입구분^수가코드^신청번호" colsep="^" colwidth="69, 55, 177, 61, 62, 109, 125, 97, 100, 100, 100" dataheight="25" defaultrows="1" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:292px; width:585px; height:450px; ">
  529. <col ref="reptcd" type="input" _chartype="upper" style="text-align:left; "/>
  530. <col ref="itemflagno" style="text-align:center; "/>
  531. <col ref="item" type="input" style="text-align:left; "/>
  532. <col ref="spec" type="input" style="text-align:right; "/>
  533. <col ref="unit" type="input" style="text-align:right; "/>
  534. <col ref="makecmpynm" type="input" style="text-align:left; "/>
  535. <col ref="lnnoremark" type="input" style="text-align:left; "/>
  536. <col ref="avg" type="input" format="#,###.#" style="text-align:right; "/>
  537. <col ref="fstpurcflag" type="combo" style="text-align:center; ">
  538. <choices>
  539. <item>
  540. <label>최초구입분</label>
  541. <value>A</value>
  542. </item>
  543. <item>
  544. <label>반복구입분</label>
  545. <value>B</value>
  546. </item>
  547. <item>
  548. <label>단가변경</label>
  549. <value>D</value>
  550. </item>
  551. </choices>
  552. </col>
  553. <col ref="calcscorcd" style="text-align:left; "/>
  554. <col ref="appno" style="text-align:left; "/>
  555. <col ref="fromdd" visibility="hidden"/>
  556. <col ref="todd" visibility="hidden"/>
  557. <script type="javascript" ev:event="onclick">
  558. <![CDATA[
  559. // H083조회
  560. fSelectH083();
  561. ]]>
  562. </script>
  563. <script type="javascript" ev:event="xforms-value-changed">
  564. <![CDATA[
  565. var row = grd_piehh802.row;
  566. var col = grd_piehh802.col;
  567. var reptcdlength = 0;
  568. if (col == grd_piehh802.colRef("reptcd")) {
  569. model.setValue("/root/send/item1/reptcd", grd_piehh802.valueMatrix(row, grd_piehh802.colRef("reptcd")));
  570. if (submit("TRPIE00206")) {
  571. var reptcdNodes = instance1.selectNodes("/root/main/item1/rscdgood");
  572. if (reptcdNodes.length > 0 && reptcdNodes != null) {
  573. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  574. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/appno", appno);
  575. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/reptcd", model.getValue("/root/main/item1/rscdgood/reptcd "));
  576. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/itemflagno", "0");
  577. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/makecmpynm", model.getValue("/root/main/item1/rscdgood/makecmpynm"));
  578. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/item", model.getValue("/root/main/item1/rscdgood/item"));
  579. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/spec", model.getValue("/root/main/item1/rscdgood/spec"));
  580. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/unit", model.getValue("/root/main/item1/rscdgood/unit"));
  581. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/lnnoremark", "-");
  582. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/avg", 1);
  583. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/fstpurcflag", model.getValue("/root/main/item1/rscdgood/fstpurcflag"));
  584. model.setValue("/root/main/list02/gridpiehh802["+ row +"]/calcscorcd", model.getValue("/root/main/item1/rscdgood/calcscorcd"));
  585. grd_piehh802.refresh();
  586. }
  587. }
  588. }
  589. ]]>
  590. </script>
  591. <script type="javascript" ev:event="onmousedown">
  592. <![CDATA[
  593. if (event.button == 3) { // 3 : 오른쪽 버튼
  594. if (grd_piehh802.mouseRow >= grd_piehh802.fixedrows) {
  595. setPopupMenu("grd_piehh802", false, "/root/hidden/popupmenu/h802/item", "name", "func"); // (tfHelper.js) 컨트롤에서 사용자 팝업 설정 함수
  596. }
  597. }
  598. ]]>
  599. </script>
  600. <script type="javascript" ev:event="onentercell">
  601. <![CDATA[
  602. // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
  603. if (event.button != 3 && grd_piehh802.colType(grd_piehh802.col) == "input") {
  604. var status = grd_piehh802.rowStatus(grd_piehh802.row);
  605. var col = grd_piehh802.col;
  606. if (col == grd_piehh802.colRef("reptcd") && (status == 0)) {
  607. } else {
  608. grd_piehh802.editCell();
  609. }
  610. }
  611. ]]>
  612. </script>
  613. <script type="javascript" ev:event="onscroll">
  614. <![CDATA[
  615. var rowno = grd_piehh802.rows - 1;
  616. var cvalue = 0;
  617. if(rowno / 5000 >= 1) {
  618. cvalue = (rowno/5000) / Math.floor(rowno/5000);
  619. }
  620. if(grd_piehh802.vscroll.attribute("max") == grd_piehh802.vscroll.attribute("pos") && grd_piehh801.row > 0 && cvalue == 1) {
  621. // end of scroll
  622. model.setValue("/root/send2/offset", grd_piehh802.rows-grd_piehh802.fixedRows); // grid의 header row는 제외
  623. submit("TRPIE00131");
  624. grd_piehh802.dispatch("onmouseup"); // 스크롤바 처리를 위한 이벤트 발생
  625. for (var i = 1; i < grd_piehh802.rows; i++) {
  626. if(grd_piehh802.valueMatrix(i, grd_piehh802.colRef("itemflagno")) == 0) {
  627. grd_piehh802.rowStatus(i) = 1; // 1:insert 상태로 변경
  628. grd_piehh802.valueMatrix(i, grd_piehh802.colRef("appno")) = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  629. }
  630. }
  631. }
  632. ]]>
  633. </script>
  634. </datagrid>
  635. <datagrid id="grd_piehh801" nodeset="/root/main/list01/gridpiehh801" caption="신청번호^서식번호^요양기관기호^작성자명^확인자명^입고분기^총건수^입고시작일^입고종료일^가중평균가생성일시^약가적용^약가건수^약가적용일시^약가생성자^참조란" colsep="^" colwidth="90, 0, 90, 60, 60, 70, 60, 70, 70, 120, 60, 60, 120, 70, 160" dataheight="25" defaultrows="2" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:79px; width:1194px; height:171px; ">
  636. <col ref="appno" style="text-align:center; "/>
  637. <col ref="docuno" style="text-align:center; "/>
  638. <col ref="corpmark" style="text-align:center; "/>
  639. <col ref="chrgnm" type="input" style="text-align:center; "/>
  640. <col ref="cnfmnm" type="input" style="text-align:center; "/>
  641. <col ref="appyearmnth" style="text-align:center; "/>
  642. <col ref="repttotcnt" type="input" format="#,###" style="text-align:center; "/>
  643. <col ref="winfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  644. <col ref="wintodd" format="yyyy-mm-dd" style="text-align:center; "/>
  645. <col ref="avgdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  646. <col disabled="true" ref="insuflag" type="combo" style="text-align:center; ">
  647. <choices>
  648. <item>
  649. <label>적용</label>
  650. <value>Y</value>
  651. </item>
  652. <item>
  653. <label>만료</label>
  654. <value>C</value>
  655. </item>
  656. <item>
  657. <label>미적용</label>
  658. <value>N</value>
  659. </item>
  660. </choices>
  661. </col>
  662. <col ref="insucnt" format="#,###" style="text-align:center; "/>
  663. <col ref="insudt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  664. <col ref="insurid" style="text-align:center; "/>
  665. <col ref="rem" type="input" maxlength="1750" style="text-align:left; "/>
  666. <script type="javascript" ev:event="onclick">
  667. <![CDATA[
  668. fSelectH082();
  669. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  670. model.removeNode("/root/main/list03/gridpiehh803" );
  671. grd_piehh803.refresh();
  672. ]]>
  673. </script>
  674. <script type="javascript" ev:event="onentercell">
  675. <![CDATA[
  676. // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
  677. if (event.button != 3 && grd_piehh801.colType(grd_piehh801.col) == "input") {
  678. grd_piehh801.editCell();
  679. }
  680. ]]>
  681. </script>
  682. </datagrid>
  683. <datagrid id="grd_piehh803" nodeset="/root/main/list03/gridpiehh803" caption="품목코드^줄번호^구입기관번호^구입기관상호^구입일자^구입량^구입단가^구입총액^구입기관별 비고사항^품목연계번호^신청번호" colsep="^" colwidth="69, 44, 90, 86, 88, 51, 66, 87, 200, 84, 100" dataheight="25" defaultrows="1" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:586px; top:292px; width:604px; height:450px; ">
  684. <col ref="reptcd" type="input" _chartype="upper" style="text-align:left; "/>
  685. <col ref="lnno" style="text-align:center; "/>
  686. <col ref="cmpyno" type="input" style="text-align:center; "/>
  687. <col ref="cmpynm" type="input" style="text-align:left; "/>
  688. <col ref="purcdd" type="inputdate" style="text-align:center; "/>
  689. <col ref="purcqty" type="input" format="#,###.#" style="text-align:right; "/>
  690. <col ref="purcunitcost" format="#,###.#" style="text-align:right; "/>
  691. <col ref="purctotamt" type="input" format="#,###.#" style="text-align:right; "/>
  692. <col ref="cmpyremark" type="input" style="text-align:left; "/>
  693. <col ref="itemflaglnkno" style="text-align:center; "/>
  694. <col ref="appno" style="text-align:left; "/>
  695. <script type="javascript" ev:event="onentercell">
  696. <![CDATA[
  697. // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
  698. if (event.button != 3 && grd_piehh803.colType(grd_piehh803.col) == "input") {
  699. var status = grd_piehh803.rowStatus(grd_piehh803.row);
  700. var col = grd_piehh803.col;
  701. if (col == grd_piehh803.colRef("reptcd") && (status == 0)) {
  702. } else {
  703. grd_piehh803.editCell();
  704. }
  705. }
  706. ]]>
  707. </script>
  708. <script type="javascript" ev:event="onscroll">
  709. <![CDATA[
  710. var rowno = grd_piehh803.rows - 1;
  711. var cvalue = 0;
  712. if(rowno/5000 >= 1) {
  713. cvalue = (rowno/5000) / Math.floor(rowno/5000);
  714. }
  715. if(grd_piehh803.vscroll.attribute("max") == grd_piehh803.vscroll.attribute("pos") && grd_piehh801.row > 0 && cvalue == 1) {
  716. // end of scroll
  717. model.setValue("/root/send2/offset", grd_piehh803.rows-grd_piehh803.fixedRows); // grid의 header row는 제외
  718. submit("TRPIE00132");
  719. grd_piehh803.dispatch("onmouseup"); // 스크롤바 처리를 위한 이벤트 발생
  720. for (var i = 1; i < grd_piehh803.rows; i++) {
  721. if(grd_piehh803.valueMatrix(i, grd_piehh803.colRef("lnno")) == 0) {
  722. grd_piehh803.rowStatus(i) = 1; // 1:insert 상태로 변경
  723. grd_piehh803.valueMatrix(i, grd_piehh803.colRef("appno")) = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  724. }
  725. }
  726. grd_piehh803.refresh();
  727. }
  728. ]]>
  729. </script>
  730. <script type="javascript" ev:event="onendedit">
  731. <![CDATA[
  732. var qty = 0;
  733. var amt = 0;
  734. var cost = 0;
  735. for (var i = 1; i <= grd_piehh803.rows; i++) {
  736. if (grd_piehh803.rowStatus(i) > 0 && grd_piehh803.rowStatus(i) < 4) {
  737. qty = parseInt(model.getValue("/root/main/list03/gridpiehh803[" + i + "]/purcqty"));
  738. amt = parseInt(model.getValue("/root/main/list03/gridpiehh803[" + i + "]/purctotamt"));
  739. cost = Math.round(amt / (qty == 0 ? 1 : qty));
  740. model.setValue("/root/main/list03/gridpiehh803[" + i + "]/purcunitcost", cost);
  741. grd_piehh803.refresh();
  742. }
  743. }
  744. ]]>
  745. </script>
  746. </datagrid>
  747. <button id="button90" class="btn2_letter4" style="left:818px; top:53px; width:64px; height:19px; ">
  748. <caption>저 장</caption>
  749. <script type="javascript" ev:event="onclick">
  750. <![CDATA[
  751. var saveNoMsg = "";
  752. var saveOkMsg = "";
  753. // H801 update check
  754. var updtdata = getGridUpdateData(grd_piehh801);
  755. if (updtdata) {
  756. model.makeValue("/root/send/list1/h801", updtdata);
  757. }
  758. if (updtdata != "" && grd_piehh801.rows > 1) {
  759. saveOkMsg += "[H801] ";
  760. } else {
  761. saveNoMsg += "[H801] ";
  762. }
  763. //model.alert(updtdata);
  764. // H802 update check
  765. var updtdata = getGridUpdateData(grd_piehh802);
  766. if (updtdata) {
  767. model.makeValue("/root/send/list2/h802", updtdata);
  768. }
  769. if (updtdata != "" && grd_piehh802.rows > 1) {
  770. saveOkMsg += "[H802] ";
  771. } else {
  772. saveNoMsg += "[H802] ";
  773. }
  774. //model.alert(updtdata);
  775. // H803 update check
  776. /*
  777. var updtdata = getGridUpdateData(grd_piehh803);
  778. if (updtdata) {
  779. model.makeValue("/root/send/list3/h803", updtdata);
  780. }
  781. if (updtdata != "" && grd_piehh803.rows > 1) {
  782. saveOkMsg += "[H803] ";
  783. } else {
  784. saveNoMsg += "[H803] ";
  785. }
  786. */
  787. //model.alert(updtdata);
  788. //model.alert(saveOkMsg);
  789. // 저장루틴
  790. if (saveOkMsg) {
  791. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  792. var appyearmnth = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appyearmnth"));
  793. var repttotcnt = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("repttotcnt"));
  794. model.setValue("/root/send/appno", appno);
  795. model.setValue("/root/send/appyearmnth", appyearmnth);
  796. model.setValue("/root/send/repttotcnt", repttotcnt);
  797. model.setValue("/root/send_createappno/appno1", appno.substring(0, 8));
  798. model.setValue("/root/send_createappno/appno2", appno.substring(8, 12));
  799. if (submit("TXPIE00201")) {
  800. // 저장한 신청내역 재조회
  801. model.resetInstanceNode("/root/main/list01/gridpiehh801");
  802. model.resetInstanceNode("/root/main/list02/gridpiehh802");
  803. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  804. grd_piehh801.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  805. grd_piehh802.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  806. grd_piehh803.clearStatus();
  807. btn_init.dispatch("DOMActivate");
  808. model.setValue("/root/send_appno/appno", appno);
  809. if (appno != "") {
  810. fReSelectAllF080(1);
  811. }
  812. model.refresh();
  813. }
  814. }
  815. ]]>
  816. </script>
  817. <hint>
  818. <![CDATA[H080.1, H080.2, H080.3 생성]]>
  819. </hint>
  820. </button>
  821. <line id="line7" class="line_1" style="x1:587px; y1:287px; x2:1190px; y2:287px; "/>
  822. <caption id="caption2" class="tit_2" style="left:594px; top:269px; width:167px; height:13px; ">의약품구입내역(H080.3)</caption>
  823. <button id="btn_delrow" class="btn2_letter3" visibility="visible" style="left:529px; top:265px; width:53px; height:19px; ">
  824. <caption>행삭제</caption>
  825. <script type="javascript" ev:event="DOMActivate">
  826. <![CDATA[
  827. if (grd_piehh802.row >= grd_piehh802.fixedrows) {
  828. var row = grd_piehh802.row;
  829. var status = grd_piehh802.rowStatus(row);
  830. var reptcd = grd_piehh802.valueMatrix(row, grd_piehh802.colRef("reptcd"));
  831. if ( reptcd != "" ) {
  832. // h802 삭제
  833. if (status == 1 || status == 3) {
  834. grd_piehh802.deleteRow(row);
  835. } else {
  836. grd_piehh802.rowStatus(row) = 4;
  837. }
  838. // h803 삭제
  839. var reptcd_h802 = grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("reptcd"));
  840. for(i=1; i<grd_piehh803.rows; i++) {
  841. var reptcd_h803 = grd_piehh803.valueMatrix(i, grd_piehh803.colRef("reptcd"));
  842. if (reptcd_h802 == reptcd_h803) {
  843. if (grd_piehh803.rowStatus(i) == 1 || grd_piehh803.rowStatus(i) == 3) {
  844. grd_piehh803.deleteRow(i);
  845. } else {
  846. grd_piehh803.rowStatus(i) = 4;
  847. }
  848. }
  849. }
  850. }
  851. grd_piehh802.refresh();
  852. grd_piehh803.refresh();
  853. }
  854. ]]>
  855. </script>
  856. </button>
  857. <button id="button7" class="btn5_letter2" visibility="hidden" style="left:398px; top:265px; width:42px; height:19px; ">
  858. <caption>저장</caption>
  859. <script type="javascript" ev:event="DOMActivate">
  860. <![CDATA[
  861. // H802 저장
  862. model.setValue("/root/send/list2/h802", grd_piehh802.getUpdateData());
  863. submit("TXPIE00202");
  864. // H082
  865. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  866. if (grd_piehh801.isCell(event.target) && grd_piehh801.mouseRow >= grd_piehh801.fixedrows && appno != "") {
  867. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  868. if (appno != "") {
  869. model.resetInstanceNode("/root/main/list02/gridpiehh802");
  870. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  871. model.setValue("/root/send_appno/appno", appno);
  872. submit("TRPIE00202");
  873. grd_piehh802.refresh();
  874. }
  875. }
  876. ]]>
  877. </script>
  878. </button>
  879. <button id="btn_addrow" class="btn2_letter3" visibility="visible" style="left:474px; top:265px; width:53px; height:19px; ">
  880. <caption>행추가</caption>
  881. <script type="javascript" ev:event="DOMActivate">
  882. <![CDATA[
  883. var appno = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  884. if (appno == "") {
  885. messageBox("선택된 신청번호가", "I004"); //I004=없습니다.
  886. } else {
  887. var num = model.getValue("/root/hidden/addrowno/number_h802");
  888. if(num == "" || num == "0"){
  889. grd_piehh802.addRow();
  890. var rows = grd_piehh802.rows;
  891. var frows = grd_piehh802.fixedRows;
  892. var nrows = rows - frows;
  893. //alert(rows + "-----" + frows + "-------" + nrows);
  894. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/appno", appno);
  895. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/reptcd", "");
  896. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/itemflagno", "");
  897. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/makecmpynm", "");
  898. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/item", "");
  899. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/spec", "");
  900. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/unit", "");
  901. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/lnnoremark", "");
  902. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/avg", "");
  903. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/fstpurcflag", "B");
  904. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/calcscorcd", "");
  905. grd_piehh802.refresh();
  906. }else{
  907. for(var i=1; i<=num; i++){
  908. grd_piehh802.addRow();
  909. var rows = grd_piehh802.rows;
  910. var frows = grd_piehh802.fixedRows;
  911. var nrows = rows - frows;
  912. //alert(rows + "-----" + frows + "-------" + nrows);
  913. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/appno", appno);
  914. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/reptcd", "");
  915. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/itemflagno", "");
  916. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/makecmpynm", "");
  917. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/item", "");
  918. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/spec", "");
  919. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/unit", "");
  920. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/lnnoremark", "");
  921. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/avg", "");
  922. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/fstpurcflag", "B");
  923. model.setValue("/root/main/list02/gridpiehh802["+ nrows +"]/calcscorcd", "");
  924. grd_piehh802.refresh();
  925. }
  926. }
  927. }
  928. ]]>
  929. </script>
  930. </button>
  931. <button id="button3" class="btn2_letter3" visibility="visible" style="left:1137px; top:265px; width:53px; height:19px; ">
  932. <caption>행삭제</caption>
  933. <script type="javascript" ev:event="DOMActivate">
  934. <![CDATA[
  935. if (grd_piehh803.row >= grd_piehh803.fixedrows) {
  936. var row = grd_piehh803.row;
  937. var status = grd_piehh803.rowStatus(row);
  938. var reptcd = grd_piehh803.valueMatrix(row, grd_piehh803.colRef("reptcd"));
  939. if ( reptcd != "" ) {
  940. if (status == 1 || status == 3) {
  941. grd_piehh803.deleteRow(row);
  942. } else {
  943. grd_piehh803.rowStatus(row) = 4;
  944. }
  945. grd_piehh803.refresh();
  946. }
  947. }
  948. ]]>
  949. </script>
  950. </button>
  951. <button id="button5" class="btn5_letter3" visibility="visible" style="left:943px; top:265px; width:53px; height:19px; ">
  952. <caption>저장</caption>
  953. <script type="javascript" ev:event="DOMActivate">
  954. <![CDATA[
  955. // H803 저장
  956. model.setValue("/root/send/list3/h803", grd_piehh803.getUpdateData());
  957. submit("TXPIE00203");
  958. // H083조회
  959. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  960. var reptcd = grd_piehh802.valueMatrix(grd_piehh802.row, grd_piehh802.colRef("reptcd"));
  961. if (appno != "" && reptcd != "") {
  962. model.setValue("/root/send_reptcd/appno", appno);
  963. model.setValue("/root/send_reptcd/reptcd", reptcd);
  964. submit("TRPIE00203");
  965. grd_piehh802.refresh();
  966. fReSelectAllF080(1);
  967. }
  968. ]]>
  969. </script>
  970. </button>
  971. <button id="button6" class="btn2_letter3" visibility="visible" style="left:1029px; top:265px; width:53px; height:19px; ">
  972. <caption>행추가</caption>
  973. <script type="javascript" ev:event="DOMActivate">
  974. <![CDATA[
  975. var appno = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  976. var reptcd = grd_piehh802.valueMatrix(grd_piehh802.row,grd_piehh802.colRef("reptcd"));
  977. if (appno == "") {
  978. messageBox("선택된 신청번호가", "I004"); //I004=없습니다.
  979. } else if (reptcd == ""){
  980. messageBox("선택된 신고품목코드가", "I004"); //I004=없습니다.
  981. } else {
  982. var num = model.getValue("/root/hidden/addrowno/number_h803");
  983. if(num == "" || num == "0"){
  984. grd_piehh803.addRow();
  985. var rows = grd_piehh803.rows;
  986. var frows = grd_piehh803.fixedRows;
  987. var nrows = rows - frows;
  988. //alert(rows + "-----" + frows + "-------" + nrows);
  989. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/appno", appno);
  990. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/reptcd", reptcd);
  991. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/lnno", "0");
  992. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpyno", "");
  993. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpynm", "");
  994. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcdd", getCurrentDate());
  995. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcqty", "1");
  996. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcunitcost", "1000");
  997. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purctotamt", "1000");
  998. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpyremark", "-");
  999. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/itemflaglnkno", "0");
  1000. grd_piehh803.refresh();
  1001. }else{
  1002. for(var i=1; i<=num; i++){
  1003. grd_piehh803.addRow();
  1004. var rows = grd_piehh803.rows;
  1005. var frows = grd_piehh803.fixedRows;
  1006. var nrows = rows - frows;
  1007. //alert(rows + "-----" + frows + "-------" + nrows);
  1008. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/appno", appno);
  1009. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/reptcd", reptcd);
  1010. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/lnno", "");
  1011. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpyno", "");
  1012. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpynm", "");
  1013. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcdd", getCurrentDate());
  1014. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcqty", "1");
  1015. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcunitcost", "1000");
  1016. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purctotamt", "1000");
  1017. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpyremark", "");
  1018. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/itemflaglnkno", 1);
  1019. grd_piehh803.refresh();
  1020. }
  1021. }
  1022. }
  1023. ]]>
  1024. </script>
  1025. </button>
  1026. <button id="button9" class="btn2_letter3" visibility="visible" style="left:1083px; top:265px; width:53px; height:19px; ">
  1027. <caption>행복사</caption>
  1028. <script type="javascript" ev:event="DOMActivate">
  1029. <![CDATA[
  1030. var row = grd_piehh703.row;
  1031. grd_piehh703.addRow();
  1032. var rows = grd_piehh703.rows;
  1033. var frows = grd_piehh703.fixedRows;
  1034. var nrows = rows - frows;
  1035. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/appno", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/appno"));
  1036. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/reptcd", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/reptcd"));
  1037. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/lnno", "");
  1038. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpyno", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/cmpyno"));
  1039. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpynm", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/cmpynm"));
  1040. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcdd", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/purcdd"));
  1041. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcqty", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/purcqty"));
  1042. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purcunitcost", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/purcunitcost"));
  1043. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/purctotamt", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/purctotamt"));
  1044. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/cmpyremark", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/cmpyremark"));
  1045. model.setValue("/root/main/list03/gridpiehh803["+ nrows +"]/itemflaglnkno", model.getValue("/root/main/list03/gridpiehh803["+ row +"]/itemflaglnkno"));
  1046. grd_piehh803.refresh();
  1047. ]]>
  1048. </script>
  1049. </button>
  1050. <button id="button15" class="btn5_letter6" style="left:1041px; top:53px; width:86px; height:19px; ">
  1051. <caption>SAM생성확인</caption>
  1052. <script type="javascript" ev:event="DOMActivate">
  1053. <![CDATA[
  1054. var todd = getCurrentDate();
  1055. todd = todd.toDate().getAddDate(+1, 'D');
  1056. zsbfOpenBatchLogPopup("samfilemngtmgr.DrugInptReptBatch",getCurrentDate(),todd.getDateFormat());
  1057. ]]>
  1058. </script>
  1059. </button>
  1060. <button id="button10" class="btn2_letter4" visibility="visible" style="left:1130px; top:53px; width:64px; height:19px; ">
  1061. <caption>삭 제</caption>
  1062. <script type="javascript" ev:event="DOMActivate">
  1063. <![CDATA[
  1064. // 선택된 row가 있는지 확인한다.
  1065. var selectCnt = 0;
  1066. selectCnt = grd_piehh801.selectedRows;
  1067. // 선택된 row가 없을때..
  1068. if (selectCnt == 0) {
  1069. model.alert("삭제할 신청번호를 선택후 다시 시도해 주세요");
  1070. return;
  1071. }
  1072. var ans = messageBox("데이터가 완전삭제됩니다. 정말 삭제", "S001"); ///정말 삭제하시려면 예(Yes)\n아니면 아니오(No)
  1073. if (ans == 6) { // 6: yes
  1074. submit("TXPIE00206");
  1075. model.resetInstanceNode("/root/main/list01/gridpiehh801");
  1076. model.resetInstanceNode("/root/main/list02/gridpiehh802");
  1077. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  1078. btn_select.dispatch("DOMActivate");
  1079. model.refresh();
  1080. } else {
  1081. return;
  1082. }
  1083. ]]>
  1084. </script>
  1085. </button>
  1086. <button id="button16" class="btn5_letter4" style="left:974px; top:53px; width:64px; height:19px; ">
  1087. <caption>SAM생성</caption>
  1088. <script type="javascript" ev:event="onclick">
  1089. <![CDATA[
  1090. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  1091. // sam생성하기.
  1092. if(appno != ""){
  1093. submit("TXPIE00205");
  1094. }
  1095. ]]>
  1096. </script>
  1097. </button>
  1098. <button id="button12" class="btn3_letter6" visibility="hidden" style="left:806px; top:17px; width:104px; height:22px; ">
  1099. <caption>입고내역조회</caption>
  1100. <script type="javascript" ev:event="onclick">
  1101. <![CDATA[
  1102. var appno = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  1103. if (appno == "") {
  1104. messageBox("선택된 신청번호가", "I004"); //I004=없습니다.
  1105. }
  1106. else {
  1107. model.resetInstanceNode("/root/hidden/sppie00130_h802/cond");
  1108. model.setValue("/root/hidden/sppie00130_h802/cond/fromdd", getCurrentDate()); // 검색시작일자
  1109. model.setValue("/root/hidden/sppie00130_h802/cond/todd", getCurrentDate()); // 검색종료일자
  1110. model.setValue("/root/hidden/sppie00130_h802/cond/srchcond1", "1"); // 검색구분 1:edi, 2:처방코드
  1111. model.setValue("/root/hidden/sppie00130_h802/cond/srchcond2", ""); // 검색코드
  1112. model.setValue("/root/hidden/sppie00130_h802/cond/dtlselectyn", "N"); // 입고상세조회여부
  1113. // 입고내역조회 팝업화면
  1114. modal("SPPIE00130", 1, "10", "10", "SPPIE00130", "/root/hidden/sppie00130_h802/cond", "/root/init", "", "");
  1115. var h802Node = instance1.selectNodes("/root/main/list02/gridpiehh802");
  1116. if (h802Node.length == null || h802Node.length == 0) {
  1117. grd_piehh802.addRow();
  1118. }
  1119. // H802 그리드에 새로 신규추가할 maxrow 찾기
  1120. var nowRow = 0;
  1121. var maxRow = grd_piehh802.rows -1;
  1122. var tmpreptcd = grd_piehh802.valueMatrix(maxRow, grd_piehh802.colRef("reptcd"));
  1123. if (tmpreptcd != "") {
  1124. maxRow = maxRow + 1;
  1125. }
  1126. var rsltRow = 1;
  1127. var rsltNode = instance1.selectSingleNode("/root/hidden/sppie00130_h802/rslt");
  1128. if (rsltNode.childNodes != null) {
  1129. for (var i = maxRow; i < rsltNode.childNodes.length + maxRow; i++) {
  1130. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/appno", appno);
  1131. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/reptcd", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/reptcd"));
  1132. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/itemflagno", "0");
  1133. //model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/itemflagno", itemno);
  1134. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/makecmpynm", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/makecmpynm"));
  1135. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/item", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/item"));
  1136. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/spec", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/spec"));
  1137. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/unit", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/unit"));
  1138. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/lnnoremark", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/lnnoremark"));
  1139. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/avg", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/avg"));
  1140. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/fstpurcflag", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/fstpurcflag"));
  1141. model.makeValue("/root/main/list02/gridpiehh802["+ i +"]/calcscorcd", model.getValue("/root/hidden/sppie00130_h802/rslt/h802["+ rsltRow +"]/calcscorcd"));
  1142. rsltRow += 1;
  1143. }
  1144. grd_piehh802.refresh();
  1145. }
  1146. for (var i = maxRow; i < grd_piehh802.rows; i++) {
  1147. grd_piehh802.rowStatus(i) = 1; // 1:insert 상태로 변경
  1148. }
  1149. var h803Node = instance1.selectNodes("/root/main/list03/gridpiehh803");
  1150. if (h803Node.length == null || h803Node.length == 0) {
  1151. grd_piehh803.addRow();
  1152. }
  1153. // H803 그리드에 새로 신규추가할 maxrow 찾기
  1154. maxRow = grd_piehh803.rows -1;
  1155. var tmpreptcd = grd_piehh803.valueMatrix(maxRow, grd_piehh803.colRef("reptcd"));
  1156. if (tmpreptcd != "") {
  1157. maxRow = maxRow + 1;
  1158. }
  1159. rsltRow = 1;
  1160. var rsltNode = instance1.selectSingleNode("/root/hidden/sppie00130_h803/rslt");
  1161. if (rsltNode != null) {
  1162. for (var i = maxRow; i < rsltNode.childNodes.length + maxRow; i++) {
  1163. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/appno", appno);
  1164. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/reptcd", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/reptcd"));
  1165. //model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/lnno", lineno);
  1166. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/lnno", "0");
  1167. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/cmpyno", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/cmpyno"));
  1168. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/cmpynm", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/cmpynm"));
  1169. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purcdd", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purcdd"));
  1170. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purcqty", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purcqty"));
  1171. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purcunitcost", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purcunitcost"));
  1172. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/purctotamt", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/purctotamt"));
  1173. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/cmpyremark", model.getValue("/root/hidden/sppie00130_h803/rslt/h803["+ rsltRow +"]/cmpyremark"));
  1174. model.makeValue("/root/main/list03/gridpiehh803["+ i +"]/itemflaglnkno", "0");
  1175. rsltRow += 1;
  1176. }
  1177. grd_piehh803.refresh();
  1178. }
  1179. for (var i = maxRow; i < grd_piehh803.rows; i++) {
  1180. grd_piehh803.rowStatus(i) = 1; // 1:insert 상태로 변경
  1181. }
  1182. }
  1183. ]]>
  1184. </script>
  1185. </button>
  1186. <button id="button13" class="btn5_letter6" style="left:885px; top:53px; width:86px; height:19px; ">
  1187. <caption>연계번호생성</caption>
  1188. <script type="javascript" ev:event="onclick">
  1189. <![CDATA[
  1190. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  1191. var appyearmnth = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appyearmnth"));
  1192. model.setValue("/root/send_appno/appno", appno);
  1193. model.setValue("/root/send_appno/appyearmnth", appyearmnth);
  1194. if (appno != "") {
  1195. if (submit("TXPIE00204")) {
  1196. messageBox("총건수, 가중평균가, 연계번호, 줄번호 생성이", "I002"); //I002=완료되었습니다.
  1197. // 전체 재조회 H801, H802, H803
  1198. //----------------------------
  1199. fReSelectAllF080(1);
  1200. //----------------------------
  1201. }
  1202. } else {
  1203. messageBox("연계번호 생성할 신청번호가 선택되지", "E007"); //E007=않았습니다.
  1204. }
  1205. ]]>
  1206. </script>
  1207. <hint>
  1208. <![CDATA[총건수, 품목구분번호, 가중평균값, 연계번호, 줄번호 업데이트]]>
  1209. </hint>
  1210. </button>
  1211. <button id="button2" class="btn2_letter4" visibility="hidden" style="left:759px; top:265px; width:64px; height:19px; ">
  1212. <caption>전체조회</caption>
  1213. <script type="javascript" ev:event="DOMActivate">
  1214. <![CDATA[
  1215. var appno = grd_piehh801.valueMatrix(grd_piehh801.row, grd_piehh801.colRef("appno"));
  1216. if (appno != "") {
  1217. model.setValue("/root/send_reptcd/appno", appno);
  1218. model.setValue("/root/send_reptcd/reptcd", "");
  1219. submit("TRPIE00203");
  1220. }
  1221. ]]>
  1222. </script>
  1223. </button>
  1224. <input id="input4" ref="/root/hidden/addrowno/number_h802" class="input_default" style="left:443px; top:265px; width:28px; height:19px; text-align:left; ">
  1225. <script type="javascript" ev:event="onkeydown">
  1226. <![CDATA[
  1227. inputEnterKey("btn_addrow", "DOMActivate");
  1228. ]]>
  1229. </script>
  1230. </input>
  1231. <input id="input1" ref="/root/hidden/addrowno/number_h803" class="input_default" style="left:999px; top:265px; width:28px; height:19px; text-align:left; ">
  1232. <script type="javascript" ev:event="onkeydown">
  1233. <![CDATA[
  1234. inputEnterKey("btn_addrow", "DOMActivate");
  1235. ]]>
  1236. </script>
  1237. </input>
  1238. <button id="button4" class="btn3_letter6" style="left:168px; top:263px; width:104px; height:22px; ">
  1239. <caption>입고세부내역</caption>
  1240. <script type="javascript" ev:event="onclick">
  1241. <![CDATA[
  1242. fSelectDtlInpt();
  1243. ]]>
  1244. </script>
  1245. </button>
  1246. <caption id="caption4" style="left:320px; top:57px; width:455px; height:14px; font-weight:bold; color:#ff0000; ">※ 의약품구입내역 수정 후 반드시 '저장", "연계번호생성"버튼을 눌러주세요</caption>
  1247. <button id="button1" class="btn3_letter6" style="left:165px; top:50px; width:104px; height:22px; ">
  1248. <caption>입고내역조회</caption>
  1249. <script type="javascript" ev:event="onclick">
  1250. <![CDATA[
  1251. var appno = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  1252. if (appno == "") {
  1253. messageBox("선택된 신청번호가", "I004"); //I004=없습니다.
  1254. } else {
  1255. group8.visible = true;
  1256. model.setValue("/root/send2/fromdd", model.getValue("/root/send/fromdd"));
  1257. model.setValue("/root/send2/todd", model.getValue("/root/send/todd"));
  1258. group8.refresh();
  1259. }
  1260. ]]>
  1261. </script>
  1262. </button>
  1263. <group id="group8" visibility="hidden" style="left:250px; top:80px; width:280px; height:75px; ">
  1264. <line id="line23" class="line_2" style="x1:5px; y1:33px; x2:235px; y2:33px; "/>
  1265. <shape id="roundrect5" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:280px; height:75px; "/>
  1266. <line id="line26" class="line_2" style="x1:6px; y1:32px; x2:273px; y2:32px; "/>
  1267. <caption id="caption27" class="cell_1" style="left:5px; top:10px; width:78px; height:23px; text-align:center; vertical-align:middle; ">입고 일자</caption>
  1268. <line id="line27" class="line_1" style="x1:6px; y1:5px; x2:273px; y2:6px; "/>
  1269. <button id="button22" class="btn4_letter2" style="left:220px; top:45px; width:56px; height:22px; ">
  1270. <caption>닫기</caption>
  1271. <script type="javascript" ev:event="DOMActivate">
  1272. <![CDATA[
  1273. group8.visible = false;
  1274. ]]>
  1275. </script>
  1276. </button>
  1277. <input id="input11" ref="/root/send2/fromdd" inputtype="date" format="yyyy-mm-dd" style="left:85px; top:11px; width:85px; height:19px; "/>
  1278. <input id="input12" ref="/root/send2/todd" inputtype="date" format="yyyy-mm-dd" style="left:190px; top:11px; width:85px; height:19px; "/>
  1279. <caption id="caption28" style="left:175px; top:15px; width:15px; height:14px; ">~</caption>
  1280. <button id="button8" class="btn1_letter2" style="left:160px; top:45px; width:56px; height:22px; ">
  1281. <caption>조회</caption>
  1282. <script type="javascript" ev:event="DOMActivate">
  1283. <![CDATA[
  1284. model.resetInstanceNode("/root/main/list02/gridpiehh802");
  1285. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  1286. model.removeNode("/root/main/list02/gridpiehh802" );
  1287. model.removeNode("/root/main/list03/gridpiehh803" );
  1288. grd_piehh802.refresh();
  1289. grd_piehh803.refresh();
  1290. model.makeValue("/root/send2/offset", "0");
  1291. model.makeValue("/root/send2/pagesize", "10000");
  1292. var maxRow = 0;
  1293. maxRow = grd_piehh802.rows -1;
  1294. submit("TRPIE00131");
  1295. for (var i = maxRow; i < grd_piehh802.rows; i++) {
  1296. if(grd_piehh802.valueMatrix(i, grd_piehh802.colRef("itemflagno")) == 0) {
  1297. grd_piehh802.rowStatus(i) = 1; // 1:insert 상태로 변경
  1298. grd_piehh802.valueMatrix(i, grd_piehh802.colRef("fromdd")) = model.getValue("/root/send2/fromdd");
  1299. grd_piehh802.valueMatrix(i, grd_piehh802.colRef("todd")) = model.getValue("/root/send2/todd");
  1300. grd_piehh802.valueMatrix(i, grd_piehh802.colRef("appno")) = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  1301. }
  1302. }
  1303. /*
  1304. maxRow = grd_piehh803.rows -1;
  1305. submit("TRPIE00132");
  1306. for (var i = maxRow; i < grd_piehh803.rows; i++) {
  1307. if(grd_piehh803.valueMatrix(i, grd_piehh803.colRef("lnno")) == 0) {
  1308. grd_piehh803.rowStatus(i) = 1; // 1:insert 상태로 변경
  1309. grd_piehh803.valueMatrix(i, grd_piehh803.colRef("appno")) = grd_piehh801.valueMatrix(grd_piehh801.row,grd_piehh801.colRef("appno"));
  1310. }
  1311. // grd_piehh803.rowStatus(i) = 1; // 1:insert 상태로 변경
  1312. // grd_piehh803.valueMatrix(i, grd_piehh803.colRef("appno")) = grd_piehh803.valueMatrix(grd_piehh803.row,grd_piehh803.colRef("appno"));
  1313. }
  1314. */
  1315. ]]>
  1316. </script>
  1317. </button>
  1318. </group>
  1319. <button id="button14" class="btn1_letter2" style="left:881px; top:265px; width:56px; height:22px; ">
  1320. <caption>엑셀</caption>
  1321. <script type="javascript" ev:event="DOMActivate">
  1322. <![CDATA[
  1323. var fileName = window.fileDialog("save", ",", false, "의약품구입내역(H080.3)", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  1324. if (fileName != "")
  1325. {
  1326. grd_piehh803.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  1327. }
  1328. ]]>
  1329. </script>
  1330. </button>
  1331. <input id="input2" ref="/root/send/searchreptcd" imemode="alpha" style="left:276px; top:265px; width:94px; height:19px; ">
  1332. <script type="javascript" ev:event="onkeypress">
  1333. <![CDATA[
  1334. if (event.keyCode == "13") {
  1335. setInputNodeCurText();
  1336. // 스타일 리셋
  1337. grd_piehh802.rebuildStyle();
  1338. var count = getNodesetCount("/root/main/list02/gridpiehh802");
  1339. var searchreptcd = model.getValue("/root/send/searchreptcd");
  1340. var isExists = false;
  1341. for (i = 0; i < count; i++) {
  1342. if (model.getValue("/root/main/list02/gridpiehh802[" + i + "]/reptcd") == searchreptcd) {
  1343. // 배경색 표시
  1344. grd_piehh802.rowStyle(i,"data","background-color") = "#FFFF99"; //병아리
  1345. grd_piehh802.topRow = i - 8;
  1346. isExists = true;
  1347. break;
  1348. }
  1349. }
  1350. if (!isExists) {
  1351. alert("해당 품목코드를 찾을 수 없습니다.");
  1352. }
  1353. }
  1354. ]]>
  1355. </script>
  1356. <hint>
  1357. <![CDATA[품목번호]]>
  1358. </hint>
  1359. </input>
  1360. <button id="button17" class="btn1_letter2" style="left:379px; top:265px; width:56px; height:22px; ">
  1361. <caption>엑셀</caption>
  1362. <script type="javascript" ev:event="DOMActivate">
  1363. <![CDATA[
  1364. var fileName = window.fileDialog("save", ",", false, "의약품구입내역(H080.2)", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  1365. if (fileName != "")
  1366. {
  1367. grd_piehh802.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  1368. }
  1369. ]]>
  1370. </script>
  1371. </button>
  1372. </group>
  1373. <group id="grp_btn" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  1374. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  1375. <button id="btn_closepredocupopup" class="btn4_letter2" style="left:1127px; top:2px; width:56px; height:22px; ">
  1376. <caption>닫기</caption>
  1377. <close ev:event="DOMActivate"/>
  1378. </button>
  1379. <button id="btn_init" class="btn4_letter3" style="left:1056px; top:2px; width:68px; height:22px; ">
  1380. <caption>초기화</caption>
  1381. <script type="javascript" ev:event="DOMActivate">
  1382. <![CDATA[
  1383. model.resetInstanceNode("/root/main/list01/gridpiehh801");
  1384. model.resetInstanceNode("/root/main/list02/gridpiehh802");
  1385. model.resetInstanceNode("/root/main/list03/gridpiehh803");
  1386. grd_piehh801.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  1387. grd_piehh802.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  1388. grd_piehh803.clearStatus();
  1389. model.refresh();
  1390. ]]>
  1391. </script>
  1392. </button>
  1393. <button id="btnInsuCompare" class="btn4_letter9" style="left:912px; top:2px; width:140px; height:22px; ">
  1394. <caption>약가 변경 내역 조회</caption>
  1395. <script type="javascript" ev:event="DOMActivate">
  1396. <![CDATA[
  1397. var row = grd_piehh801.row;
  1398. if (row > 0) {
  1399. setParameter("SMPIE00200_appyearmnth", model.getValue("/root/main/list01/gridpiehh801[" + row + "]/appyearmnth"));
  1400. setParameter("SMPIE00200_appno", model.getValue("/root/main/list01/gridpiehh801[" + row + "]/appno"));
  1401. }
  1402. open("SPPIE04120", "1", "50", "50", "SMPMB00700", "", "");
  1403. ]]>
  1404. </script>
  1405. </button>
  1406. </group>
  1407. </xhtml:body>
  1408. </xhtml:html>