SPADB62900_물류정보갱신.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>물류정보갱신</xhtml:title>
  7. <model id="model1">
  8. <instance id="instance1">
  9. <root xmlns="">
  10. <main>
  11. <updategood>
  12. <goodlist>
  13. <ifid/>
  14. <sel/>
  15. <chggubn/>
  16. <chggubnnm/>
  17. <drugfromdd/>
  18. <condd/>
  19. <goodcd/>
  20. <dupexpgoodcd/>
  21. <deptnm/>
  22. <oldcd/>
  23. <edicd/>
  24. <hngnm/>
  25. <goodengnm/>
  26. <comnm/>
  27. <lrgcd/>
  28. <lrgnm/>
  29. <mdlcd/>
  30. <mdlnm/>
  31. <smlcd/>
  32. <smlnm/>
  33. <welfprt/>
  34. <welfprtnm/>
  35. <prcpqty/>
  36. <prcpunit/>
  37. <cntsqty/>
  38. <cntsunit/>
  39. <hospdrguvol/>
  40. <hospdrguunit/>
  41. <gnrlspcl/>
  42. <gnrlspclnm/>
  43. <keepmthd/>
  44. <keepmthdnm/>
  45. <pemtkeepmthd/>
  46. <todd/>
  47. <drugtoddhis/>
  48. <ifstatus/>
  49. <calcmthdcd/>
  50. <usernm/>
  51. <grupsnglflag/>
  52. <shadelight/>
  53. </goodlist>
  54. </updategood>
  55. </main>
  56. <send>
  57. <srchinfo>
  58. <fromdd/>
  59. <todd/>
  60. <goodcd/>
  61. <chggubn/>
  62. </srchinfo>
  63. <drugdata>
  64. <druginfo/>
  65. </drugdata>
  66. </send>
  67. <init>
  68. <baseinfo>
  69. <calcmthdcd>
  70. <P0133>
  71. <cdid/>
  72. <cdnm/>
  73. </P0133>
  74. </calcmthdcd>
  75. </baseinfo>
  76. </init>
  77. <hidden>
  78. <item/>
  79. </hidden>
  80. </root>
  81. </instance>
  82. <script type="javascript" ev:event="xforms-ready">
  83. <![CDATA[
  84. //2010-03-12 물류갱신정보 속도개선 (MIS interface데이타을 전체가 아닌 구간별일자(일주일)를 가져오도록처리)
  85. var date = getCurrentDate();
  86. model.setValue("/root/send/srchinfo/fromdd" , date.toDate().getAddDate(-7).getDateFormat()); //검색구간- 시작일자
  87. model.setValue("/root/send/srchinfo/todd" , getCurrentDate()); //검색구간- 종료일자
  88. zbcfGetCodeList( new Array("P0133"), new Array("/root/init/baseinfo/calcmthdcd"));
  89. grd_data.rowHeight(0) = 50;
  90. grd_data.fixedcellcheckbox(0,1) = true;
  91. model.setValue("/root/send/srchinfo/chggubn","A");
  92. fGetGoodList();
  93. model.refresh();
  94. ]]>
  95. </script>
  96. <script type="javascript">
  97. <![CDATA[
  98. // 현재일자를 적용일자로 설정하여 과거일자로의 변경을 막기 위함 2008-12-10
  99. //var gv_fromdd = "";
  100. function fGetGoodList(){
  101. submit("TRADB62901");
  102. // 현재일자로 적용일자 설정.
  103. // 이력변경 사항 설정을 위해 drugtoddhis를 현재일자 하루 전으로 설정
  104. /*
  105. gv_fromdd = getCurrentDate();
  106. var initFromdd = gv_fromdd;
  107. var initToddHis = initFromdd.toDate("YYYYMMDD"); // 문자형을 date 타입으로 변환 *getAddDate가 date타입만을 취급..
  108. initToddHis = initToddHis.getAddDate(-1).getDateFormat(); // 특정일의 상대일자를 구함
  109. */
  110. var lrgcd = "";
  111. for(var i = grd_data.fixedRows ; i < grd_data.rows; i++){
  112. var gv_fromdd = model.getValue("/root/main/updategood/goodlist["+i+"]/condd");
  113. var initFromdd = gv_fromdd;
  114. var initToddHis = initFromdd.toDate("YYYYMMDD"); // 문자형을 date 타입으로 변환 *getAddDate가 date타입만을 취급..
  115. initToddHis = initToddHis.getAddDate(-1).getDateFormat(); // 특정일의 상대일자를 구함
  116. model.setValue("/root/main/updategood/goodlist["+i+"]/drugfromdd", initFromdd);
  117. model.setValue("/root/main/updategood/goodlist["+i+"]/drugtoddhis",initToddHis);
  118. lrgcd = model.getValue("/root/main/updategood/goodlist["+i+"]/lrgcd");
  119. mdlcd = model.getValue("/root/main/updategood/goodlist["+i+"]/mdlcd");
  120. smlcd = model.getValue("/root/main/updategood/goodlist["+i+"]/smlcd");
  121. // RSCDGIUD와 ADBMDRUG의 대분류,중분류,소분류 코드 형식의 동기화.
  122. if(isSearchString(lrgcd, 0) != true){
  123. model.setValue("/root/main/updategood/goodlist["+i+"]/lrgcd", "0"+lrgcd);
  124. }else if(isSearchString(mdlcd, 0) != true){
  125. model.setValue("/root/main/updategood/goodlist["+i+"]/mdlcd", "0"+mdlcd);
  126. }else if(isSearchString(smlcd, 0) != true){
  127. model.setValue("/root/main/updategood/goodlist["+i+"]/smlcd", "0"+smlcd);
  128. }
  129. }
  130. }
  131. ]]>
  132. </script>
  133. <submission id="TRZBC00101"/>
  134. <submission id="TRADB62901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/updategood"/>
  135. <submission id="TXADB62901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/drugdata" replace="instance" resultref="/root/hidden"/>
  136. </model>
  137. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  138. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  139. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  140. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  141. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  142. </xhtml:head>
  143. <xhtml:body class="radio_search" pagewidth="1000" pageheight="500" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  144. <group id="grp_biz" scroll="auto" style="left:0px; top:50px; width:965px; height:400px; ">
  145. <line id="line1" class="line_1" style="x1:0px; y1:35px; x2:965px; y2:35px; "/>
  146. <caption id="caption1" class="tit_2" style="left:5px; top:16px; width:100px; height:13px; ">물류정보갱신</caption>
  147. <button id="btn_excsave" class="btn2_letter4" style="left:900px; top:10px; width:64px; height:19px; ">
  148. <caption>엑셀저장</caption>
  149. </button>
  150. <datagrid id="grd_data" nodeset="/root/main/updategood/goodlist" scroll="auto" caption="인터페이스 id^^구분코드^구분^적용일자^물류적용일자^약품코드^중복제외&#xA;대표코드^마지막수정부서^구코드^EDI코드^한글명^영문명^성분명^대분류코드^대분류^중분류코드^중분류^소분류코드^소분류^welfprt^복지부분류^처방수량^처방단위^함량용량^함량단위^병원용량^병원단위^gnrlspcl^일반/전문^keepmthd^실제보관법^허가보관방법^불용일^drugtoddhis^ifstatus^수가계산방법^그룹여부(G:그룹 S:싱글)^마지막수정자" colsep="^" colwidth="51, 24, 56, 30, 100, 100, 100, 100, 100, 100, 80, 150, 165, 150, 35, 60, 35, 130, 35, 150, 40, 200, 35, 35, 30, 30, 33, 30, 40, 70, 30, 70, 200, 100, 100, 100, 138, 56, 100, 100" explorerbar="sortshow" frozencols="9" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:40px; width:965px; height:360px; ">
  151. <col ref="ifid" visibility="hidden"/>
  152. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  153. <col ref="chggubn" visibility="hidden"/>
  154. <col ref="chggubnnm" visibility="hidden"/>
  155. <col ref="drugfromdd" type="inputdate" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
  156. <col ref="condd" type="inputdate" visibility="hidden" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
  157. <col ref="goodcd"/>
  158. <col ref="dupexpgoodcd"/>
  159. <col ref="deptnm" style="text-align:center; "/>
  160. <col ref="oldcd"/>
  161. <col ref="edicd" style="text-align:center; "/>
  162. <col ref="hngnm"/>
  163. <col ref="goodengnm"/>
  164. <col ref="comnm"/>
  165. <col ref="lrgcd" visibility="hidden"/>
  166. <col ref="lrgnm" style="text-align:center; "/>
  167. <col ref="mdlcd" visibility="hidden"/>
  168. <col ref="mdlnm"/>
  169. <col ref="smlcd" visibility="hidden"/>
  170. <col ref="smlnm"/>
  171. <col ref="welfprt" visibility="hidden"/>
  172. <col ref="welfprtnm"/>
  173. <col ref="prcpqty"/>
  174. <col ref="prcpunit"/>
  175. <col ref="cntsqty"/>
  176. <col ref="cntsunit"/>
  177. <col ref="hospdrguvol"/>
  178. <col ref="hospdrguunit"/>
  179. <col ref="gnrlspcl" visibility="hidden"/>
  180. <col ref="gnrlspclnm" style="text-align:center; "/>
  181. <col ref="keepmthd" visibility="hidden"/>
  182. <col ref="keepmthdnm" style="text-align:center; "/>
  183. <col ref="pemtkeepmthd"/>
  184. <col ref="todd" visibility="hidden"/>
  185. <col ref="drugtoddhis" visibility="hidden"/>
  186. <col ref="ifstatus" visibility="hidden"/>
  187. <col ref="shadelight" visibility="hidden"/>
  188. <col disabled="true" ref="calcmthdcd" type="combo">
  189. <choices>
  190. <itemset nodeset="/root/init/baseinfo/calcmthdcd/P0133">
  191. <label ref="cdnm"/>
  192. <value ref="cdid"/>
  193. </itemset>
  194. </choices>
  195. </col>
  196. <col ref="usernm" style="text-align:center; "/>
  197. <col ref="grupsnglflag"/>
  198. <script type="javascript" ev:event="xforms-select">
  199. <![CDATA[
  200. // '체크상태' 변화에 따른 status값 변경
  201. if((grd_data.row == 0) && (grd_data.col== grd_data.colRef("sel"))){
  202. for(var i = grd_data.fixedRows; i < grd_data.rows; i++){
  203. grd_data.addStatus(parseInt(i), "update");
  204. }
  205. }else if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("sel"))){
  206. grd_data.addStatus(parseInt(grd_data.row), "update");
  207. }
  208. model.refresh();
  209. ]]>
  210. </script>
  211. <script type="javascript" ev:event="xforms-deselect">
  212. <![CDATA[
  213. // '체크상태' 변화에 따른 status값 변경
  214. if((grd_data.row == 0) && (grd_data.col== grd_data.colRef("sel"))){
  215. for(var i = grd_data.fixedRows; i < grd_data.rows; i++){
  216. grd_data.removeStatus(parseInt(i), "update");
  217. }
  218. }else if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("sel"))){
  219. grd_data.removeStatus(parseInt(grd_data.row), "update");
  220. }
  221. model.refresh();
  222. ]]>
  223. </script>
  224. <script type="javascript" ev:event="xforms-value-changed">
  225. <![CDATA[
  226. // 적용일자 변경시
  227. /* 적용일자 = 물류적용일자 // 변경가능토록 변경 2009-02-16 김귀남
  228. if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("drugfromdd"))){
  229. var drugfromdd = model.getValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugfromdd");
  230. if(gv_fromdd > drugfromdd){
  231. model.setValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugfromdd",gv_fromdd);
  232. messageBox("과거일자로 적용일자를 변경","E001");
  233. return;
  234. }else{
  235. drugfromdd = drugfromdd.toDate("YYYYMMDD");
  236. model.setValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugtoddhis", drugfromdd.getAddDate(-1).getDateFormat());
  237. }
  238. model.refresh();
  239. }
  240. */
  241. if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("drugfromdd"))){
  242. var drugfromdd = model.getValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugfromdd");
  243. drugfromdd = drugfromdd.toDate("YYYYMMDD");
  244. model.setValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugtoddhis", drugfromdd.getAddDate(-1).getDateFormat());
  245. model.refresh();
  246. }
  247. ]]>
  248. </script>
  249. <script type="javascript" ev:event="onaftersort">
  250. <![CDATA[
  251. grd_data.gridToInstance();
  252. ]]>
  253. </script>
  254. </datagrid>
  255. <button id="btn_grddel" class="btn2_letter3" navindex="7" visibility="hidden" style="left:840px; top:10px; width:53px; height:19px; ">
  256. <caption>행삭제</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. grd_data.addstatus(grd_data.row,"delete");
  260. ]]>
  261. </script>
  262. </button>
  263. </group>
  264. <group id="grp_btn" scroll="auto" style="left:0px; top:450px; width:965px; height:30px; ">
  265. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:965px; y2:0px; "/>
  266. <button id="btn_insert" class="btn4_letter2" style="left:848px; top:8px; width:56px; height:22px; ">
  267. <caption>등록</caption>
  268. <script type="javascript" ev:event="DOMActivate">
  269. <![CDATA[
  270. var chk = messageBox("물류정보를 갱신", "S001");
  271. var cnt = 0;
  272. if(chk == 6){
  273. for(var i = grd_data.fixedRows; i < grd_data.rows; i++){ // 체크박스 선택 유무 판단
  274. if(model.getValue("/root/main/updategood/goodlist["+i+"]/sel") == 'Y') {
  275. //2008-12-10 물류데이타 삭제 상태 추가
  276. model.setValue("/root/main/updategood/goodlist["+i+"]/ifstatus","S"); //"S" 등록
  277. grd_data.addStatus(i,"update");
  278. cnt ++;
  279. }
  280. }
  281. if(cnt != 0){
  282. var updateData = grd_data.getUpdateData("update");
  283. model.setValue("/root/send/drugdata/druginfo", updateData);
  284. submit("TXADB62901");
  285. fGetGoodList();
  286. }else messageBox("선택된 사항이","I004");
  287. }
  288. model.refresh();
  289. ]]>
  290. </script>
  291. </button>
  292. <button id="btn_close" class="btn4_letter2" style="left:909px; top:7px; width:56px; height:22px; ">
  293. <caption>닫기</caption>
  294. <script type="javascript" ev:event="DOMActivate">
  295. <![CDATA[
  296. window.close();
  297. ]]>
  298. </script>
  299. </button>
  300. <button id="btn_delete" class="btn4_letter2" style="left:5px; top:8px; width:56px; height:22px; ">
  301. <caption>삭제</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. var chk = messageBox("정말 ", "Q001");
  305. var cnt = 0;
  306. if(chk == 6){
  307. for(var i = grd_data.fixedRows; i < grd_data.rows; i++){ // 체크박스 선택 유무 판단
  308. if(model.getValue("/root/main/updategood/goodlist["+i+"]/sel") == 'Y') {
  309. //2008-12-10 물류데이타 삭제 상태 추가
  310. model.setValue("/root/main/updategood/goodlist["+i+"]/ifstatus","D"); //"D"삭제
  311. grd_data.addStatus(i,"update");
  312. cnt ++;
  313. }
  314. }
  315. if(cnt != 0){
  316. var updateData = grd_data.getUpdateData("update");
  317. model.setValue("/root/send/drugdata/druginfo", updateData);
  318. submit("TXADB62901");
  319. fGetGoodList();
  320. }else messageBox("선택된 사항이","I004");
  321. }
  322. model.refresh();
  323. ]]>
  324. </script>
  325. </button>
  326. <caption id="caption5" style="left:265px; top:5px; width:580px; height:25px; font-weight:bold; color:#ff0000; ">* 등록하면 임시저장 상태이므로 약품정보관리 화면에서 개별약품의 확정저장을 반드시 하십시요.</caption>
  327. </group>
  328. <group id="group1" style="left:0px; top:10px; width:965px; height:40px; ">
  329. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:965px; height:40px; "/>
  330. <caption id="caption2" class="search_name" style="left:5px; top:10px; width:95px; height:17px; ">검색구간 :</caption>
  331. <input id="ipt_fromdd" ref="/root/send/srchinfo/fromdd" class="input_search" inputtype="date" style="left:95px; top:10px; width:100px; height:19px; "/>
  332. <input id="ipt_todd" ref="/root/send/srchinfo/todd" class="input_search" inputtype="date" style="left:200px; top:10px; width:100px; height:19px; "/>
  333. <caption id="caption3" class="search_name" style="left:315px; top:10px; width:90px; height:17px; ">약품코드 :</caption>
  334. <input id="ipt_goodcd" ref="/root/send/srchinfo/goodcd" class="input_search" style="left:405px; top:10px; width:100px; height:19px; ">
  335. <script type="javascript" ev:event="onkeyup">
  336. <![CDATA[
  337. inputEnterKey("btn_sea","DOMActivate");
  338. ]]>
  339. </script>
  340. </input>
  341. <caption id="caption4" class="search_name" visibility="hidden" style="left:525px; top:12px; width:95px; height:17px; ">구 분 1 :</caption>
  342. <select1 id="rdo_chggubn" ref="/root/send/srchinfo/chggubn" visibility="hidden" appearance="full" cols="3" rows="1" overflow="visible" style="left:615px; top:13px; width:140px; height:16px; border-style:none; ">
  343. <choices>
  344. <item>
  345. <label>전체</label>
  346. <value>A</value>
  347. </item>
  348. <item>
  349. <label>신규</label>
  350. <value>I</value>
  351. </item>
  352. <item>
  353. <label>변경</label>
  354. <value>U</value>
  355. </item>
  356. </choices>
  357. </select1>
  358. <button id="btn_sea" class="btn1_letter2" style="left:895px; top:10px; width:56px; height:22px; ">
  359. <caption>조회</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. var fromdd = model.getValue("/root/send/srchinfo/fromdd");
  363. var todd = model.getValue("/root/send/srchinfo/todd");
  364. if(fromdd != "" || todd != ""){
  365. if(fromdd == ""){
  366. messageBox("검색구간을 입력하지","E007");
  367. model.setFocus("ipt_fromdd");
  368. return;
  369. }else if(todd == ""){
  370. messageBox("검색구간을 입력하지","E007");
  371. model.setFocus("ipt_todd");
  372. return;
  373. }
  374. }
  375. fGetGoodList();
  376. model.refresh();
  377. ]]>
  378. </script>
  379. </button>
  380. </group>
  381. </xhtml:body>
  382. </xhtml:html>