SPLAF00300_물품코드관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPLAF00300_물품코드관리.xrw
  4. * 설 명 : 물품코드 저장 화면
  5. * 설 계 자 : 한음미
  6. * 작 성 자 : 한음미
  7. * 작 성 일 : 2007.08.06
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>SPLAF00300_물품코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <purccd>
  20. <purclist>
  21. <choi/>
  22. <purccd/>
  23. <purcnm/>
  24. <fromdd/>
  25. <todd/>
  26. <fstrgstrid/>
  27. <lastupdtrid/>
  28. <purcunit/>
  29. <exchqty/>
  30. <prodcmpycd/>
  31. <prodcustnm/>
  32. <suppcustcd/>
  33. <suppcustnm/>
  34. <goodspec/>
  35. <setunit/>
  36. </purclist>
  37. <lastPage>
  38. <lastPage/>
  39. </lastPage>
  40. </purccd>
  41. <goodcd>
  42. <goodcdlist>
  43. <choi/>
  44. <goodcd/>
  45. <goodnm/>
  46. <fromdd/>
  47. <todd/>
  48. <fstrgstrid/>
  49. <lastupdtrid/>
  50. <existyn/>
  51. <goodflagcd/>
  52. <tqty/>
  53. <tunitcd/>
  54. <useunitcd/>
  55. <useqty/>
  56. </goodcdlist>
  57. </goodcd>
  58. </main>
  59. <send>
  60. <req/>
  61. <postdeptcd/>
  62. <todd/>
  63. <instcd/>
  64. <goodcd/>
  65. <page/>
  66. <itemlimit>100</itemlimit>
  67. <seaVal/>
  68. <seamthdcd/>
  69. </send>
  70. <init>
  71. <sysdt>
  72. <sysdtinfo>
  73. <sysdd/>
  74. <systm/>
  75. </sysdtinfo>
  76. </sysdt>
  77. <codeinfo>
  78. <R0025>
  79. <cdid/>
  80. <cdnm/>
  81. </R0025>
  82. </codeinfo>
  83. <cdid/>
  84. </init>
  85. <hidden>
  86. <item>
  87. </item>
  88. <paval>1</paval>
  89. <seaVal/>
  90. <seamthdcd>0</seamthdcd>
  91. </hidden>
  92. </root>
  93. </instance>
  94. <submission id="TRLAF00102" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="/root/main/goodcd/goodcdlist"/>
  95. <script type="javascript" ev:event="xforms-ready">
  96. <![CDATA[
  97. fExeInitialize();
  98. ]]>
  99. </script>
  100. <submission id="TRLAF00108" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="/root/main/purccd"/>
  101. <submission id="TRLPZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/sysdt/sysdtinfo"/>
  102. <submission id="TXLAF00104" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="/root/message"/>
  103. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  104. </model>
  105. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  106. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  107. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  108. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  109. <script type="javascript">
  110. <![CDATA[
  111. /* @group : 물품코드관리(팝업)
  112. * @ver : 2007.07.24 (CMCDEV-0001)
  113. * @by : 한음미
  114. * @-----------------------------------
  115. * @type : function
  116. * @access : public
  117. * @desc : 메인화면과의 같은 매핑파일 작업으로 생기는 조건 Function
  118. */
  119. function fExeInitialize() {
  120. model.makeValue("/root/send/seamthdcd", "2"); // 0:물품코드, 1:물품명
  121. model.makeValue("/root/send/useflagcd", "0");
  122. model.makeNode("/root/init/sysdt/sysdtinfo");
  123. cap_title2.text = getUserInfo("posdeptnm"); // 세션값으로 화면에 화면 부서에 보이기
  124. //-----------------------
  125. // 물품구분 코드목록 조회
  126. zbcfGetCodeList( new Array("R0025"), new Array("/root/init/codeinfo") , null, null, null);
  127. cmb_cdid.refresh();
  128. model.makeValue("/root/init/cdid", "");
  129. //-----------------
  130. fExeGetMISGoods(1); // 구매팀 물품목록 보이기
  131. submit("TRLAF00102"); // 3개과의 물품목록 보이기
  132. model.refresh();
  133. }
  134. /* @group : 물품코드관리
  135. * @ver : 2007.08.06 (CMCDEV-0001)
  136. * @by : 한음미
  137. * @-----------------------------------
  138. * @type : function
  139. * @access : public
  140. * @desc : 구매팀에서의 물품 저장 Function
  141. */
  142. function fExeSave() {
  143. var sNode = "/root/main/goodcd/goodcdlist";
  144. //-------------------------
  145. grd_goodlist.clearStatus();
  146. //--------------------------------------------------------
  147. for (var irow=1; irow <= getNodesetCount(sNode); irow++) {
  148. if (model.getValue(sNode+"["+ irow +"]/existyn") != "Y") { // 데이터가 DB에 존재하면 'Y'
  149. if (model.getValue(sNode+"["+ irow +"]/choi") == "true") { // 선택에 체크가 존재하면 삽입
  150. grd_goodlist.addStatus(irow,"insert");
  151. }
  152. }
  153. }
  154. //---------------------------------------------------------------
  155. model.makeValue("/root/send/count",grd_goodlist.getUpdateData());
  156. //-----------
  157. setAlertOn();
  158. if(submit("TXLAF00104")) { // 구매팀 물품 목록에서 가져오기
  159. fExeInitialize();
  160. }
  161. }
  162. /* @group : 물품코드관리
  163. * @ver : 2007.08.06 (CMCDEV-0001)
  164. * @by : 한음미
  165. * @-----------------------------------
  166. * @type : function
  167. * @access : public
  168. * @desc : 진단검사의학과 물품 목록에서 선택 해제하면 row 삭제 Function
  169. */
  170. function fExeUnSelect(){
  171. if(model.getValue("/root/main/goodcd/goodcdlist["+grd_goodlist.row+"]/choi")=="false"){ // 선택에 체크가 되어 있지 않으면
  172. if(model.getValue("/root/main/goodcd/goodcdlist["+grd_goodlist.row+"]/existyn")!="Y"){ // 데이터가 DB에 존재하지 않으면 삭제 가능
  173. grd_goodlist.deleteItem(grd_goodlist.row);
  174. }
  175. }
  176. }
  177. /* @group : 물품코드관리
  178. * @ver : 2007.08.06 (CMCDEV-0001)
  179. * @by : 한음미
  180. * @-----------------------------------
  181. * @type : function
  182. * @access : public
  183. * @desc : 구매팀 물품 목록 선택 Function
  184. */
  185. function fExeSelect() {
  186. var sNode = "/root/main/purccd/purclist";
  187. var sDestNode = "/root/main/goodcd/goodcdlist";
  188. //------------------------------------------------------------------
  189. if (model.getValue(sNode+"["+grd_purclist.row+"]/choi") == "true") {
  190. //----------------------------------------------------------------------------------------------------
  191. var iNo = grd_goodlist.findRow(model.getValue(sNode+"["+grd_purclist.row+"]/purccd"),1,1,false,false);
  192. if(iNo < 0) {
  193. grd_goodlist.addRow();
  194. model.setValue(sDestNode+"["+grd_goodlist.row+"]/choi", "true");
  195. model.setValue(sDestNode+"["+grd_goodlist.row+"]/goodcd", model.getValue(sNode+"["+grd_purclist.row+"]/purccd"));
  196. model.setValue(sDestNode+"["+grd_goodlist.row+"]/goodnm", model.getValue(sNode+"["+grd_purclist.row+"]/purcnm"));
  197. model.setValue(sDestNode+"["+grd_goodlist.row+"]/fromdd", model.getValue(sNode+"["+grd_purclist.row+"]/fromdd"));
  198. model.setValue(sDestNode+"["+grd_goodlist.row+"]/todd", model.getValue(sNode+"["+grd_purclist.row+"]/todd"));
  199. model.setValue(sDestNode+"["+grd_goodlist.row+"]/fstrgstrid", model.getValue(sNode+"["+grd_purclist.row+"]/fstrgstrid"));
  200. model.setValue(sDestNode+"["+grd_goodlist.row+"]/lastupdtrid", model.getValue(sNode+"["+grd_purclist.row+"]/lastupdtrid"));
  201. model.setValue(sDestNode+"["+grd_goodlist.row+"]/useunitcd", model.getValue(sNode+"["+grd_purclist.row+"]/purcunit"));
  202. model.setValue(sDestNode+"["+grd_goodlist.row+"]/useqty", model.getValue(sNode+"["+grd_purclist.row+"]/exchqty"));
  203. model.setValue(sDestNode+"["+grd_goodlist.row+"]/tqty", "1");
  204. model.setValue(sDestNode+"["+grd_goodlist.row+"]/tunitcd", "-");
  205. model.setValue(sDestNode+"["+grd_goodlist.row+"]/goodflagcd", 0);
  206. grd_goodlist.toprow = grd_goodlist.rows-1;
  207. } else {
  208. messageBox("데이터가","E006");
  209. }
  210. //--------------------------------------------------------------------------------
  211. model.setValue("/root/main/purccd/purclist["+ grd_purclist.row +"]/choi","false");
  212. }
  213. }
  214. /* @group : 물품코드관리(팝업)
  215. * @ver : 2007.07.24 (CMCDEV-0001)
  216. * @by : 한음미
  217. * @-----------------------------------
  218. * @type : function
  219. * @access : public
  220. * @desc : 구매팀 물류 정보 보기
  221. */
  222. function fExeGetMISGoods(page) {
  223. // 이상 페이지 번호 처리
  224. if(page == '') page = 1;
  225. if(page < 1) page = 1;
  226. if(page > parseInt(cap_lastPage.value)) page = Number(cap_lastPage.value);
  227. //----------------------------------------------------------------------------
  228. model.makeValue("/root/send/seaVal", model.getValue("root/hidden/seaVal"));
  229. model.makeValue("/root/send/seamthdcd", model.getValue("root/hidden/seamthdcd"));
  230. model.makeValue("/root/send/page", page);
  231. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  232. model.makeValue("/root/send/goodflag", model.getValue("/root/init/cdid"));
  233. submit("TRLAF00108"); // 구매팀 물품목록 보이기
  234. //---------------------
  235. ipt_paval.value = page;
  236. }
  237. /* @group : 물품코드관리(팝업)
  238. * @ver : 2008.04.15 (CMCDEV-0001)
  239. * @by : 유동철
  240. * @-----------------------------------
  241. * @type : function
  242. * @access : public
  243. * @desc : 물품코드/품명 검색어 입력 시 처리
  244. */
  245. function fExeGoodKeyPress() {
  246. if (event.keyCode == 13) {
  247. model.setValue("root/hidden/seaVal", ipt_seaVal.currentText);
  248. ipt_seaVal.refresh();
  249. fExeGetMISGoods(1);
  250. }
  251. }
  252. /* @group : 물품코드관리(팝업)
  253. * @ver : 2008.04.15 (CMCDEV-0001)
  254. * @by : 유동철
  255. * @-----------------------------------
  256. * @type : function
  257. * @access : public
  258. * @desc : 검색 페이지번호 입력 시 처리
  259. */
  260. function fExePageKeyPress() {
  261. if(event.keyCode == '13' && ipt_paval.currentText != ipt_paval.value){
  262. model.setValue("/root/hidden/paval", ipt_paval.currentText);
  263. ipt_paval.dispatch("xforms-value-changed");
  264. }
  265. else if(event.keyCode != 8 && (event.keyCode < 48 || event.keyCode > 57)) {
  266. event.defaultAction = "cancel";
  267. }
  268. }
  269. ]]>
  270. </script>
  271. </xhtml:head>
  272. <xhtml:body pagewidth="1045" pageheight="818" guideline="1,1194;" style="top:0; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  273. <group id="group2" style="left:0px; top:0px; width:1027px; height:770px; ">
  274. <datagrid id="grd_goodlist" nodeset="/root/main/goodcd/goodcdlist" scroll="auto" autoresize="true" caption="선택^물품코드^물품명^시작일자^종료일자^처음ID^종료ID^유무^물품구분^T수량^T단위^환산단위^환산수량" colsep="^" colwidth="40, 80,200,0,0,0,0,0,0,0,0,0,0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:685px; top:42px; width:342px; height:727px; ">
  275. <col ref="choi" type="checkbox"/>
  276. <col ref="goodcd"/>
  277. <col ref="goodnm"/>
  278. <col ref="fromdd"/>
  279. <col ref="todd"/>
  280. <col ref="fstrgstrid"/>
  281. <col ref="lastupdtrid"/>
  282. <col ref="existyn"/>
  283. <col ref="goodflagcd"/>
  284. <col ref="tqty"/>
  285. <col ref="tunitcd"/>
  286. <col ref="useunitcd"/>
  287. <col ref="useqty"/>
  288. <script type="javascript" ev:event="onclick">
  289. <![CDATA[
  290. fExeUnSelect();
  291. ]]>
  292. </script>
  293. <script type="javascript" ev:event="onaftersort">
  294. <![CDATA[
  295. grd_goodlist.gridToInstance();
  296. ]]>
  297. </script>
  298. </datagrid>
  299. <line id="line12" class="line_1" style="x1:5px; y1:37px; x2:683px; y2:37px; "/>
  300. <caption id="caption1" class="tit_2" style="left:13; top:18; width:118px; height:13px; ">구매팀 물품 목록</caption>
  301. <line id="line1" class="line_1" style="x1:685px; y1:37px; x2:1027px; y2:37px; "/>
  302. <choices>
  303. <item>
  304. <label>checkbox1</label>
  305. <value>checkbox1</value>
  306. </item>
  307. </choices>
  308. <datagrid id="grd_purclist" nodeset="/root/main/purccd/purclist" class="datagrid2" scroll="auto" autoresize="true" caption="선&#xA;택^물품코드^물품명^시작일자^종료일자^처음ID^종료ID^환산단위^환산수량^prodcmpycd^제조사^suppcustcd^모델^납품처^규격^포장구성단위" colsep="^" colwidth="30, 80, 185, 0, 0, 0, 0, 0, 0, 0, 70, 0, 70, 70, 70, 80" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:42px; width:678px; height:727px; ">
  309. <col ref="choi" type="checkbox"/>
  310. <col ref="purccd"/>
  311. <col ref="purcnm"/>
  312. <col ref="fromdd"/>
  313. <col ref="todd"/>
  314. <col ref="fstrgstrid"/>
  315. <col ref="lastupdtrid"/>
  316. <col ref="purcunit"/>
  317. <col ref="exchqty"/>
  318. <col ref="prodcmpycd"/>
  319. <col ref="prodcustnm"/>
  320. <col ref="suppcustcd"/>
  321. <col ref="model"/>
  322. <col ref="suppcustnm"/>
  323. <col ref="goodspec"/>
  324. <col class="text_center" ref="setunit"/>
  325. <script type="javascript" ev:event="xforms-select">
  326. <![CDATA[
  327. fExeSelect();
  328. ]]>
  329. </script>
  330. <script type="javascript" ev:event="onaftersort">
  331. <![CDATA[
  332. grd_purclist.gridToInstance();
  333. ]]>
  334. </script>
  335. </datagrid>
  336. <caption id="caption2" class="tit_1" style="left:5px; top:0px; width:140px; height:13px; ">물품코드관리</caption>
  337. <caption id="cap_title2" class="tit_2" style="left:690px; top:21px; width:110px; height:13px; "/>
  338. <caption id="caption3" visibility="hidden" style="left:740px; top:5px; width:115px; height:15px; border-color:#333300; border-style:solid; "/>
  339. <input id="ipt_seaVal" ref="/root/hidden/seaVal" class="input_search" style="left:553px; top:17px; width:130px; height:19px; text-align:right; ">
  340. <script type="javascript" ev:event="onkeypress">
  341. <![CDATA[
  342. fExeGoodKeyPress();
  343. ]]>
  344. </script>
  345. </input>
  346. <select1 id="rdo_seamthdcd" ref="/root/hidden/seamthdcd" overflow="visible" appearance="full" cols="2" style="left:458px; top:17px; width:95px; height:20px; border-style:none; ">
  347. <choices>
  348. <item>
  349. <label>코드</label>
  350. <value>0</value>
  351. </item>
  352. <item>
  353. <label>품명</label>
  354. <value>1</value>
  355. </item>
  356. </choices>
  357. </select1>
  358. <select1 id="cmb_cdid" ref="/root/init/cdid" appearance="minimal" style="left:325px; top:17px; width:130px; height:19px; ">
  359. <choices>
  360. <itemset nodeset="/root/init/codeinfo/R0025">
  361. <label ref="cdnm"/>
  362. <value ref="cdid"/>
  363. </itemset>
  364. </choices>
  365. <script type="javascript" ev:event="xforms-value-changed">
  366. <![CDATA[
  367. fExeGetMISGoods(1);
  368. ]]>
  369. </script>
  370. </select1>
  371. </group>
  372. <group id="group3" style="left:0px; top:770px; width:1027px; height:30px; ">
  373. <button id="button3" class="btn4_letter2" style="left:969px; top:3px; width:56px; height:22px; ">
  374. <caption>저장</caption>
  375. <script type="javascript" ev:event="DOMActivate">
  376. <![CDATA[
  377. fExeSave();
  378. ]]>
  379. </script>
  380. </button>
  381. <input id="ipt_paval" ref="/root/hidden/paval" class="input_search" style="left:260px; top:5px; width:65px; height:19px; text-align:right; ">
  382. <script type="javascript" ev:event="xforms-value-changed">
  383. <![CDATA[
  384. fExeGetMISGoods(model.getValue("/root/hidden/paval"));
  385. ]]>
  386. </script>
  387. <script type="javascript" ev:event="onkeypress">
  388. <![CDATA[
  389. fExePageKeyPress();
  390. ]]>
  391. </script>
  392. </input>
  393. <caption id="cap_lastPage" ref="/root/main/purccd/lastPage/lastPage" style="left:355px; top:5px; width:60px; height:20px; font-size:9pt; font-weight:bold; border-width:1px; border-style:solid; ">1</caption>
  394. <caption id="caption4" style="left:337px; top:5px; width:11px; height:20px; font-size:9pt; font-weight:bold; ">/</caption>
  395. <button id="btn_prntexcel" class="btn3_letter2" style="left:61px; top:4px; width:56px; height:22px; ">
  396. <caption>이전</caption>
  397. <script type="javascript" ev:event="DOMActivate">
  398. <![CDATA[
  399. fExeGetMISGoods(parseInt(model.getValue("/root/hidden/paval")) - 1);
  400. ]]>
  401. </script>
  402. </button>
  403. <button id="button1" class="btn4_letter2" style="left:565px; top:5px; width:56px; height:22px; ">
  404. <caption>다음</caption>
  405. <script type="javascript" ev:event="DOMActivate">
  406. <![CDATA[
  407. fExeGetMISGoods(parseInt(model.getValue("/root/hidden/paval")) + 1);
  408. ]]>
  409. </script>
  410. </button>
  411. <button id="button2" class="btn3_letter2" style="left:2px; top:4px; width:56px; height:22px; ">
  412. <caption>처음</caption>
  413. <script type="javascript" ev:event="DOMActivate">
  414. <![CDATA[
  415. fExeGetMISGoods(1);
  416. ]]>
  417. </script>
  418. </button>
  419. <button id="button4" class="btn4_letter2" style="left:624px; top:5px; width:56px; height:22px; ">
  420. <caption>최종</caption>
  421. <script type="javascript" ev:event="DOMActivate">
  422. <![CDATA[
  423. fExeGetMISGoods(model.getValue("root/main/purccd/lastPage/lastPage"));
  424. ]]>
  425. </script>
  426. </button>
  427. </group>
  428. </xhtml:body>
  429. </xhtml:html>