SMLAF00200_신청물품관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLAF00200_신청물품관리.xrw
  4. * 설 명 : 사용자의 선택적 물품 목록 저장
  5. * 설 계 자 : 한음미
  6. * 작 성 자 : 한음미
  7. * 작 성 일 : 2007.08.07
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>신청물품관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <goodcd>
  20. <goodcdlist>
  21. <choi/>
  22. <goodcd/>
  23. <goodnm/>
  24. <goodhngnm/>
  25. <todd/>
  26. <fromdd/>
  27. <fstrgstrid/>
  28. <lastupdtrid/>
  29. </goodcdlist>
  30. </goodcd>
  31. <choigoodcd>
  32. <choigoodcdlist>
  33. <choi/>
  34. <goodcd/>
  35. <goodnm/>
  36. <goodhngnm/>
  37. <existyn/>
  38. <todd/>
  39. <fromdd/>
  40. <fstrgstrid/>
  41. <lastupdtrid/>
  42. </choigoodcdlist>
  43. </choigoodcd>
  44. </main>
  45. <send/>
  46. <init>
  47. <seaval/>
  48. <seamthdcd>0</seamthdcd>
  49. <useflagcd>0</useflagcd>
  50. <sysdt>
  51. <sysdtinfo>
  52. <sysdd/>
  53. <systm/>
  54. </sysdtinfo>
  55. </sysdt>
  56. </init>
  57. <hidden/>
  58. </root>
  59. </instance>
  60. <script type="javascript" ev:event="xforms-ready">
  61. <![CDATA[
  62. fExeInitialize();
  63. ]]>
  64. </script>
  65. <submission id="TRLPZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/sysdt/sysdtinfo"/>
  66. <submission id="TXLAF00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/message"/>
  67. <submission id="TRLAF00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/choigoodcd/choigoodcdlist"/>
  68. <submission id="TRLAF00107" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/goodcd/goodcdlist"/>
  69. <submission id="TXLAF00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/message"/>
  70. </model>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  74. <script type="javascript">
  75. <![CDATA[
  76. /* @group : 신청물품관리
  77. * @ver : 2007.08.07 (CMCDEV-0001)
  78. * @by : 한음미
  79. * @-----------------------------------
  80. * @type : function
  81. * @access : public
  82. * @desc : 화면 로딩시 기본값 Function
  83. */
  84. function fExeInitialize() {
  85. model.removeNodeset("/root/send");
  86. model.removeNodeset("/root/main/choigoodcd/choigoodcdlist");
  87. //-------------
  88. fGetGoodList(); // 사용자별 물품코드 목록조회
  89. //--------------------------------
  90. model.removeNodeset("/root/send");
  91. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  92. submit("TRLAF00107"); // 물품코드 목록 보여주기
  93. //------------------------------------------
  94. model.makeValue("/root/init/seaval", "");
  95. model.makeValue("/root/init/seamthdcd", "0");
  96. model.makeValue("/root/init/useflagcd", "0");
  97. model.makeValue("/root/send/userid", getUserInfo("userid"));
  98. model.makeNode("/root/init/sysdt/sysdtinfo");
  99. submit("TRLPZ00102"); // 현재의 time 가져오기
  100. model.refresh();
  101. }
  102. /* @group : 신청물품관리
  103. * @ver : 2007.08.07 (CMCDEV-0001)
  104. * @by : 한음미
  105. * @-----------------------------------
  106. * @type : function
  107. * @access : public
  108. * @desc : 사용자별 물품코드 목록 조회 Function
  109. */
  110. function fGetGoodList() {
  111. model.makeValue("/root/send/seaval", model.getValue("/root/init/seaval"));
  112. model.makeValue("/root/send/seamthdcd", model.getValue("/root/init/seamthdcd"));
  113. model.makeValue("/root/send/useflagcd", model.getValue("/root/init/useflagcd"));
  114. submit("TRLAF00106"); // 선택 물품코드목록 조회하기
  115. }
  116. /* @group : 신청물품관리
  117. * @ver : 2007.08.07 (CMCDEV-0001)
  118. * @by : 한음미
  119. * @-----------------------------------
  120. * @type : function
  121. * @access : public
  122. * @desc : 선택 물품코드 목록에서 불필요한 데이터 삭제 Function
  123. */
  124. function fExeDelete() {
  125. grd_choigoodlist.clearStatus();
  126. for(var iRow=1;iRow<=getNodesetCount("/root/main/choigoodcd/choigoodcdlist");iRow++) {
  127. if(model.getValue("/root/main/choigoodcd/choigoodcdlist[" + iRow + "]/choi")=="true") {
  128. if(model.getValue("/root/main/choigoodcd/choigoodcdlist[" + iRow + "]/existyn")=="Y") {
  129. grd_choigoodlist.addStatus(iRow,"delete");
  130. }else {
  131. grd_choigoodlist.deleteItem(iRow);
  132. }
  133. }
  134. model.setValue("/root/main/goodcd/goodcdlist[" + iRow + "]/choi","false"); // 작업이 끝나고 저장버튼 누름과 동시에 빈 체크박스
  135. }
  136. model.makeValue("/root/send/counta",grd_choigoodlist.getUpdateData());
  137. if(submit("TXLAF00103")==true){ // 선택 물품코드 저장 되어있는 데이터 중 불필요한것 삭제
  138. fGetGoodList();
  139. }
  140. }
  141. /* @group : 신청물품관리
  142. * @ver : 2007.08.07 (CMCDEV-0001)
  143. * @by : 한음미
  144. * @-----------------------------------
  145. * @type : function
  146. * @access : public
  147. * @desc : 선택물품코드목록에서 필요한 데이터 저장 Function
  148. */
  149. function fExeSave() {
  150. var sOrgNode = "/root/main/choigoodcd/choigoodcdlist";
  151. //-----------------------------
  152. grd_choigoodlist.clearStatus();
  153. for(var iRow=1; iRow <= getNodesetCount(sOrgNode+""); iRow++) {
  154. //-------------------------------------------------------------
  155. if (model.getValue(sOrgNode+"[" + iRow + "]/existyn") == "Y") { // DB에 데이터가 있고
  156. if (model.getValue(sOrgNode+"[" + iRow + "]/choi") == "true") { // 체크박스에 체크가 되어있고
  157. grd_choigoodlist.addStatus(iRow,"delete"); // delete후 insert
  158. }
  159. } else { // DB에 데이터가 없고
  160. if(model.getValue(sOrgNode+"[" + iRow + "]/choi")=="true") {
  161. grd_choigoodlist.addStatus(iRow, "insert"); // insert 만
  162. }
  163. }
  164. //------------------------------------------------------------------------
  165. model.setValue("/root/main/goodcd/goodcdlist[" + iRow + "]/choi","false"); // 작업이 끝나고 저장버튼 누름과 동시에 빈 체크박스
  166. }
  167. //--------------------------------
  168. model.removeNodeset("/root/send");
  169. model.makeValue("/root/send/count", grd_choigoodlist.getUpdateData());
  170. //-----------
  171. setAlertOn();
  172. if(submit("TXLAF00102")) { // 선택 물품코드 저장 되어있는 데이터 중 필요한것 저장
  173. fGetGoodList();
  174. model.setValue("/root/main/goodcd/goodcdlist[*]/choi", "false");
  175. }
  176. }
  177. /* @group : 신청물품관리
  178. * @ver : 2007.08.07 (CMCDEV-0001)
  179. * @by : 한음미
  180. * @-----------------------------------
  181. * @type : function
  182. * @access : public
  183. * @desc : 물품코드 목록에서 선택시 선택물품코드 목록으로 이전 Function
  184. */
  185. function fExeSelect() {
  186. var iNo = 0;
  187. var iRowNo = 0;
  188. var sOrgNode = "/root/main/goodcd/goodcdlist";
  189. var sDestNode = "/root/main/choigoodcd/choigoodcdlist";
  190. //-----------------------------------------------------------------------
  191. if (model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/choi") == "true") {
  192. //---------------------------------------------------------------------------------------------------------
  193. iNo = grd_choigoodlist.findRow(model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/goodcd"),1,2,false,false);
  194. if(iNo < 0) {
  195. grd_choigoodlist.addRow();
  196. //----------------------------------
  197. iRowNo = getNodesetCount(sDestNode);
  198. model.setValue(sDestNode+"["+iRowNo+"]/choi", "true");
  199. model.setValue(sDestNode+"["+iRowNo+"]/goodcd", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/goodcd"));
  200. model.setValue(sDestNode+"["+iRowNo+"]/goodnm", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/goodnm"));
  201. model.setValue(sDestNode+"["+iRowNo+"]/goodhngnm", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/goodhngnm"));
  202. model.setValue(sDestNode+"["+iRowNo+"]/todd", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/todd"));
  203. model.setValue(sDestNode+"["+iRowNo+"]/fromdd", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/fromdd"));
  204. model.setValue(sDestNode+"["+iRowNo+"]/fstrgstrid", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/fstrgstrid"));
  205. model.setValue(sDestNode+"["+iRowNo+"]/lastupdtrid", model.getValue(sOrgNode+"["+grd_goodcdlist.row+"]/lastupdtrid"));
  206. } else {
  207. messageBox("데이터가","E006");
  208. model.setValue(sOrgNode+"[" + grd_goodcdlist.row + "]/choi", "false");
  209. }
  210. }
  211. }
  212. /* @group : 신청물품관리
  213. * @ver : 2007.08.07 (CMCDEV-0001)
  214. * @by : 한음미
  215. * @-----------------------------------
  216. * @type : function
  217. * @access : public
  218. * @desc : 선택물품코드 목록에서 선택해제시 물품코드 목록으로 이전 Function
  219. */
  220. function fExeUnSelect() {
  221. if(model.getValue("/root/main/choigoodcd/choigoodcdlist["+ grd_choigoodlist.row + "]/choi")=="false"){
  222. if(model.getValue("/root/main/choigoodcd/choigoodcdlist["+ grd_choigoodlist.row + "]/existyn")!="Y"){
  223. grd_choigoodlist.deleteItem(grd_choigoodlist.row);
  224. }
  225. }
  226. }
  227. ]]>
  228. </script>
  229. </xhtml:head>
  230. <xhtml:body guideline="1,-5;1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  231. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  232. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">신청물품관리</caption>
  233. </group>
  234. <group id="grp_biz" scroll="auto" style="left:0px; top:35px; width:1195px; height:744px; ">
  235. <group id="group2" style="left:0px; top:10px; width:1194; height:35; vertical-align:top; ">
  236. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194; height:35; "/>
  237. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">검색값 :</caption>
  238. <caption id="caption7" class="search_name" style="left:395; top:9px; width:86px; height:17px; ">검색방법 :</caption>
  239. <line id="line1" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29; "/>
  240. <input id="ipt_seaval" ref="/root/init/seaval" class="input_search" navindex="1" style="left:95px; top:8px; width:100px; height:19px; "/>
  241. <caption id="caption2" class="search_name" style="left:902px; top:9px; width:86px; height:17px; ">사용구분 :</caption>
  242. <select1 id="rdo_seamthdcd" ref="/root/init/seamthdcd" navindex="2" overflow="visible" appearance="full" cols="2" style="left:487; top:9; width:123; height:20px; border-style:none; ">
  243. <choices>
  244. <item>
  245. <label>물품코드</label>
  246. <value>0</value>
  247. </item>
  248. <item>
  249. <label>물품명</label>
  250. <value>1</value>
  251. </item>
  252. </choices>
  253. </select1>
  254. <select1 id="rdo_useflagcd" ref="/root/init/useflagcd" navindex="4" overflow="visible" appearance="full" cols="2" style="left:994px; top:8px; width:97px; height:20px; border-style:none; ">
  255. <choices>
  256. <item>
  257. <label>사용</label>
  258. <value>0</value>
  259. </item>
  260. <item>
  261. <label>미사용</label>
  262. <value>1</value>
  263. </item>
  264. </choices>
  265. </select1>
  266. <button id="btn_sea" class="btn1_letter2" navindex="5" style="left:1125; top:7; width:56px; height:22px; ">
  267. <caption>조회</caption>
  268. <script type="javascript" ev:event="DOMActivate">
  269. <![CDATA[
  270. fGetGoodList();
  271. ]]>
  272. </script>
  273. </button>
  274. </group>
  275. <line id="line12" class="line_1" style="x1:0px; y1:70px; x2:595px; y2:70px; "/>
  276. <caption id="caption3" class="tit_2" style="left:5px; top:55px; width:175px; height:14px; ">선택 물품코드 목록</caption>
  277. <line id="line2" class="line_1" style="x1:600px; y1:70px; x2:1194px; y2:70px; "/>
  278. <caption id="caption5" class="tit_2" style="left:605px; top:55px; width:144px; height:14px; ">물품코드 목록</caption>
  279. <datagrid id="grd_goodcdlist" nodeset="/root/main/goodcd/goodcdlist" autoresize="true" caption="선택^물품코드^물품명^물품명(한글)^종료날짜^시작날짜^최초아이디^종료아아디" colsep="^" colwidth="40, 130, 200, 200, 0, 0, 0, 0" dataheight="23" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:600px; top:75px; width:594; height:667px; ">
  280. <col ref="choi" type="checkbox"/>
  281. <col ref="goodcd"/>
  282. <col ref="goodnm"/>
  283. <col ref="goodhngnm"/>
  284. <col ref="todd" visible="hidden"/>
  285. <col ref="fromdd"/>
  286. <col ref="fstrgstrid"/>
  287. <col ref="lastupdtrid"/>
  288. <script type="javascript" ev:event="xforms-select">
  289. <![CDATA[
  290. fExeSelect();
  291. ]]>
  292. </script>
  293. <script type="javascript" ev:event="onaftersort">
  294. <![CDATA[
  295. grd_goodcdlist.gridToInstance();
  296. ]]>
  297. </script>
  298. </datagrid>
  299. <datagrid id="grd_choigoodlist" nodeset="/root/main/choigoodcd/choigoodcdlist" autoresize="true" caption="선택^물품코드^물품명^물품명(한글)^종료날짜^시작날짜^최초아이디^종료아아디^데이터" colsep="^" colwidth="40, 130, 200, 200, 0, 0, 0, 0, 0" dataheight="23" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:595px; height:667px; ">
  300. <col ref="choi" type="checkbox"/>
  301. <col ref="goodcd"/>
  302. <col ref="goodnm"/>
  303. <col ref="goodhngnm"/>
  304. <col ref="todd" visible="hidden"/>
  305. <col ref="fromdd"/>
  306. <col ref="fstrgstrid"/>
  307. <col ref="lastupdtrid"/>
  308. <col ref="existyn"/>
  309. <script type="javascript" ev:event="onclick">
  310. <![CDATA[
  311. fExeUnSelect();
  312. ]]>
  313. </script>
  314. <script type="javascript" ev:event="onaftersort">
  315. <![CDATA[
  316. grd_choigoodlist.gridToInstance();
  317. ]]>
  318. </script>
  319. </datagrid>
  320. </group>
  321. <group id="grp_btn" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  322. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  323. <button id="btn_del" class="btn4_letter2" navindex="7" style="left:1138px; top:3px; width:56px; height:22px; ">
  324. <caption>삭제</caption>
  325. <script type="javascript" ev:event="DOMActivate">
  326. <![CDATA[
  327. fExeDelete();
  328. ]]>
  329. </script>
  330. </button>
  331. <button id="btn_save" class="btn4_letter2" navindex="6" style="left:1079; top:3px; width:56px; height:22px; ">
  332. <caption>저장</caption>
  333. <script type="javascript" ev:event="DOMActivate">
  334. <![CDATA[
  335. fExeSave();
  336. ]]>
  337. </script>
  338. </button>
  339. </group>
  340. </xhtml:body>
  341. </xhtml:html>