SMRSC01600_구매팀부서등록.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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. <main>
  10. <rscmdodtlist/>
  11. <zsdddeptlist/>
  12. </main>
  13. <send>
  14. <instcd/>
  15. <goodflag/>
  16. <deptcd/>
  17. <deptnm/>
  18. </send>
  19. <init/>
  20. <hidden/>
  21. <temp/>
  22. </root>
  23. </instance>
  24. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  25. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  26. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  27. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  28. <script type="javascript" ev:event="xforms-ready">
  29. <![CDATA[
  30. fInitialize();
  31. ]]>
  32. </script>
  33. <submission id="TRRSC01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rscmdodtlist"/>
  34. <submission id="TRRSC01602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/zsdddeptlist"/>
  35. <submission id="TXRSC01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/rscmdodtlist" resultref="/root/temp"/>
  36. </model>
  37. <script type="javascript">
  38. <![CDATA[
  39. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  40. function fInitialize() {
  41. misfGridInit(grd_rscmdodtlist);
  42. misfGridInit(grd_zsdddeptlist);
  43. model.resetInstanceNode("/root/send");
  44. misfMsterDetailSet(grd_rscmdodtlist,null,"TRRSC01601","Y");
  45. misfMsterDetailSet(grd_zsdddeptlist,null,"TRRSC01602","N");
  46. misfComboComCdList("C0048", cmb_instcd); //기관코드
  47. misfComboComCdList(cmb_instcd.value + "R0029", cmb_deptflag); //부서구분 공통코드 031R0029 : 본원 부서구분, 032R0029 : 칠곡 부서구분
  48. misfComboCopyItemSet(cmb_deptflag,"",grd_rscmdodtlist,"deptflag");
  49. rszfGoodFlagListByPgmGubn(cmb_goodflag,"1","N");
  50. cmb_goodflag.refresh();
  51. model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  52. //화면 권한 설정
  53. btn_save.disabled = !(checkAuth("X"));
  54. btn_prt.disabled= !(checkAuth("P"));
  55. // cmb_goodflag.select(0);
  56. cmb_goodflag.value = 'Y';
  57. //부서 리스트 조회
  58. fSearchDeptList();
  59. }
  60. function fSearchDeptList()
  61. {
  62. if(submit("TRRSC01602")){
  63. model.resetInstanceNode(grd_rscmdodtlist.attribute("nodeset"));
  64. misfComboComCdList(cmb_instcd.value + "R0029", cmb_deptflag); //부서구분 공통코드 031R0029 : 본원 부서구분, 032R0029 : 칠곡 부서구분
  65. btn_search.dispatch("DOMActivate");
  66. }
  67. }
  68. function fGridDbclick()
  69. {
  70. var fInstcd = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("instcd"));
  71. var fDeptcd = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("deptcd"));
  72. if( fGridDataCheck( fInstcd, fDeptcd) )
  73. {
  74. return;
  75. }
  76. misfGridIUD(grd_rscmdodtlist, "A");
  77. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptcd")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("deptcd"));
  78. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptnm")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("depthngnm"));
  79. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("demddeptcd")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("deptcd"));
  80. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("demddeptnm")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("depthngnm"));
  81. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("instcd")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("instcd"));
  82. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptgr")) = 'A';
  83. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptflag")) = 'I';
  84. grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("goodflag")) = cmb_goodflag.value;
  85. }
  86. //Data중복 Check.
  87. function fGridDataCheck( pInstcd, pDeptcd)
  88. {
  89. for( fRow = grd_rscmdodtlist.fixedRows; fRow < grd_rscmdodtlist.rows; fRow++)
  90. {
  91. if( grd_rscmdodtlist.valueMatrix(fRow, grd_rscmdodtlist.colRef("deptcd")) == pDeptcd)
  92. {
  93. if( grd_rscmdodtlist.valueMatrix(fRow, grd_rscmdodtlist.colRef("instcd")) == pInstcd )
  94. {
  95. model.setFocus("grd_rscmdodtlist");
  96. grd_rscmdodtlist.row = fRow;
  97. grd_rscmdodtlist.select(fRow,1,fRow,6) = true;
  98. messageBox("등록된 Data가 있습니다. 확인하시고 다시 입력하세요.", "");
  99. return true;
  100. }
  101. }
  102. }
  103. return false;
  104. }
  105. function fsearch()
  106. {
  107. var updtdata = getGridUpdateData(grd_rscmdodtlist);
  108. if ( updtdata != "") {
  109. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  110. if (ret != 6) { // not OK
  111. return;
  112. }
  113. }
  114. submit("TRRSC01601");
  115. }
  116. ]]>
  117. </script>
  118. </xhtml:head>
  119. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  120. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  121. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">구매팀 부서 등록</caption>
  122. </group>
  123. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  124. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:40px; vertical-align:top; ">
  125. <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; "/>
  126. <caption id="cap_instcd" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">기관코드 :</caption>
  127. <line id="line13" class="line_4" style="x1:1110px; y1:0px; x2:1110px; y2:34px; border-color:#ffe4bb; border-left-style:solid; "/>
  128. <button id="btn_search" class="btn1_letter2" style="left:1124px; top:7px; width:56px; height:22px; ">
  129. <caption>조회</caption>
  130. <script type="javascript" ev:event="DOMActivate">
  131. <![CDATA[
  132. fsearch();
  133. ]]>
  134. </script>
  135. </button>
  136. <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_s_essential" appearance="minimal" style="left:102px; top:8px; width:188px; height:19px; text-align:center; ">
  137. <choices>
  138. <itemset>
  139. <label/>
  140. <value/>
  141. </itemset>
  142. </choices>
  143. </select1>
  144. <script type="javascript" ev:event="xforms-value-changed">
  145. <![CDATA[
  146. fSearchDeptList();
  147. ]]>
  148. </script>
  149. <select1 id="cmb_goodflag" ref="/root/send/goodflag" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:897px; top:9px; width:188px; height:19px; text-align:center; ">
  150. <choices>
  151. <itemset>
  152. <label/>
  153. <value/>
  154. </itemset>
  155. </choices>
  156. <script type="javascript" ev:event="xforms-value-changed">
  157. <![CDATA[
  158. btn_search.dispatch("DOMActivate");
  159. ]]>
  160. </script>
  161. </select1>
  162. <caption id="cap_goodflag" class="search_name" visibility="hidden" style="left:810px; top:10px; width:86px; height:17px; ">물품구분 :</caption>
  163. <caption id="caption11" class="search_name" style="left:351px; top:9px; width:86px; height:17px; ">부 서 명 :</caption>
  164. <button id="btn_deptcd" class="icon_search" visibility="visible" style="left:551px; top:9px; width:16px; height:16px; ">
  165. <caption/>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. var recv_list = "deptcd,deptnm";
  169. misfOpenPopUpList("02", ipt_deptcd,"", "deptcd,deptnm") ;
  170. model.refresh();
  171. btn_search.dispatch("DOMActivate");
  172. ]]>
  173. </script>
  174. </button>
  175. <input id="ipt_deptnm" ref="/root/send/deptnm" class="output_fix" editable="false" appearance="input" style="left:575px; top:8px; width:165px; height:19px; text-align:left; "/>
  176. <input id="ipt_deptcd" ref="/root/send/deptcd" class="input_s_essential" style="left:441px; top:8px; width:104px; height:19px; text-align:left; ">
  177. <script type="javascript" ev:event="xforms-value-changed">
  178. <![CDATA[
  179. misfSearchDept(ipt_deptnm);
  180. btn_search.dispatch("DOMActivate");
  181. ]]>
  182. </script>
  183. </input>
  184. </group>
  185. <line id="line2" class="line_1" style="x1:352px; y1:80px; x2:1194px; y2:79px; "/>
  186. <caption id="caption8" class="tit_2" style="left:5px; top:64px; width:129px; height:14px; ">부서 List</caption>
  187. <button id="btn_grddel" class="btn2_letter3" style="left:1141px; top:58px; width:53px; height:19px; ">
  188. <caption>행삭제</caption>
  189. <script type="javascript" ev:event="DOMActivate">
  190. <![CDATA[
  191. misfGridIUD(grd_rscmdodtlist, "D");
  192. ]]>
  193. </script>
  194. </button>
  195. <datagrid id="grd_rscmdodtlist" nodeset="/root/main/rscmdodtlist" caption="부서코드^부서명^부서그룹^부서구분^집계부서^집계부서^기관코드^물품구분" colsep="^" colwidth="116, 154, 122, 89, 141, 157, 100, 100" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:352px; top:84px; width:842px; height:640px; ">
  196. <col ref="deptcd" _key="true" style="text-align:left; "/>
  197. <col ref="deptnm" _key="true" style="text-align:left; "/>
  198. <col ref="deptgr" type="combo" _key="true">
  199. <choices>
  200. <item>
  201. <label>외래</label>
  202. <value>A</value>
  203. </item>
  204. <item>
  205. <label>병동</label>
  206. <value>B</value>
  207. </item>
  208. <item>
  209. <label>수술실</label>
  210. <value>C</value>
  211. </item>
  212. <item>
  213. <label>마취</label>
  214. <value>D</value>
  215. </item>
  216. <item>
  217. <label>방사선과</label>
  218. <value>E</value>
  219. </item>
  220. <item>
  221. <label>진단검사</label>
  222. <value>F</value>
  223. </item>
  224. <item>
  225. <label>Angio</label>
  226. <value>G</value>
  227. </item>
  228. <item>
  229. <label>가정간호</label>
  230. <value>H</value>
  231. </item>
  232. </choices>
  233. </col>
  234. <col ref="deptflag" type="combo" _key="true">
  235. <choices>
  236. <itemset>
  237. <label ref="cdnm"/>
  238. <value ref="cdid"/>
  239. </itemset>
  240. </choices>
  241. </col>
  242. <col ref="demddeptcd" type="inputbutton" style="text-align:left; "/>
  243. <col ref="demddeptnm" _key="true" style="text-align:left; "/>
  244. <col ref="instcd" visibility="hidden" _key="true"/>
  245. <col ref="goodflag" visibility="hidden" _key="true"/>
  246. <script type="javascript" ev:event="onbuttonclick">
  247. <![CDATA[
  248. if (grd_rscmdodtlist.col == grd_rscmdodtlist.colRef("demddeptcd"))
  249. {
  250. misfOpenPopUpList("02", grd_rscmdodtlist, "", "demddeptcd,demddeptnm");
  251. }
  252. ]]>
  253. </script>
  254. <script type="javascript" ev:event="xforms-value-changed">
  255. <![CDATA[
  256. if (grd_rscmdodtlist.col == grd_rscmdodtlist.colRef("demddeptcd")) {
  257. misfValidationCheck("02", "", "demddeptcd,demddeptnm" );
  258. }
  259. ]]>
  260. </script>
  261. <script type="javascript" ev:event="onaftersort">
  262. <![CDATA[
  263. grd_rscmdodtlist.gridToInstance();
  264. ]]>
  265. </script>
  266. </datagrid>
  267. <datagrid id="grd_zsdddeptlist" nodeset="/root/main/zsdddeptlist" caption="부서코드^부서명^기관코드" colsep="^" colwidth="86, 168, 100" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:84px; width:320px; height:635px; ">
  268. <col ref="deptcd" style="text-align:left; "/>
  269. <col ref="depthngnm" style="text-align:left; "/>
  270. <col ref="instcd" visibility="hidden"/>
  271. <script type="javascript" ev:event="ondblclick">
  272. <![CDATA[
  273. fGridDbclick();
  274. ]]>
  275. </script>
  276. <script type="javascript" ev:event="onaftersort">
  277. <![CDATA[
  278. grd_rscmdodtlist.gridToInstance();
  279. ]]>
  280. </script>
  281. </datagrid>
  282. <line id="line1" class="line_1" style="x1:0px; y1:80px; x2:320px; y2:79px; "/>
  283. <caption id="caption1" class="tit_2" style="left:355px; top:64px; width:129px; height:13px; ">구매팀 부서 List</caption>
  284. <caption id="caption2" style="left:326px; top:250px; width:23px; height:20px; font-weight:bold; ">
  285. <![CDATA[>>]]>
  286. </caption>
  287. <caption id="caption3" style="left:326px; top:265px; width:23px; height:20px; font-weight:bold; ">
  288. <![CDATA[>>]]>
  289. </caption>
  290. <caption id="caption4" style="left:326px; top:280px; width:23px; height:20px; font-weight:bold; ">
  291. <![CDATA[>>]]>
  292. </caption>
  293. <caption id="caption5" style="left:326px; top:430px; width:24px; height:20px; font-weight:bold; ">
  294. <![CDATA[>>]]>
  295. </caption>
  296. <caption id="caption7" style="left:326px; top:445px; width:24px; height:20px; font-weight:bold; ">
  297. <![CDATA[>>]]>
  298. </caption>
  299. <caption id="caption9" style="left:326px; top:460px; width:24px; height:20px; font-weight:bold; ">
  300. <![CDATA[>>]]>
  301. </caption>
  302. <caption id="caption10" style="left:705px; top:59px; width:356px; height:23px; font-weight:bold; color:#ff6600; ">※부서 List 를 더블클릭시 구매팀 부서 List에 추가됩니다.</caption>
  303. <button id="button1" class="btn2_letter4" style="left:1072px; top:58px; width:64px; height:19px; ">
  304. <caption>엑셀저장</caption>
  305. <script type="javascript" ev:event="DOMActivate">
  306. <![CDATA[
  307. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  308. if (fileName != "") {
  309. grd_rscmdodtlist.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:true;rowhiddenextend:false;exportfalsecols:0,0;col_1:value;");
  310. }
  311. ]]>
  312. </script>
  313. </button>
  314. <select1 id="cmb_deptflag" class="combo_default" visibility="hidden" appearance="minimal" style="left:480px; top:190px; width:90px; height:19px; text-align:center; ">
  315. <choices>
  316. <itemset>
  317. <label/>
  318. <value/>
  319. </itemset>
  320. </choices>
  321. </select1>
  322. </group>
  323. <group id="group2" style="left:0px; top:12px; width:1195px; height:27px; ">
  324. <line id="line16" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  325. <button id="btn_clear" class="btn4_letter3" style="left:1127px; top:3; width:68px; height:22px; ">
  326. <caption>초기화</caption>
  327. <script type="javascript" ev:event="DOMActivate">
  328. <![CDATA[
  329. fInitialize();
  330. ]]>
  331. </script>
  332. </button>
  333. <button id="btn_save" class="btn4_letter2" style="left:1069px; top:3; width:56px; height:22px; ">
  334. <caption>저장</caption>
  335. <script type="javascript" ev:event="DOMActivate">
  336. <![CDATA[
  337. var updtdata = getGridUpdateData(grd_rscmdodtlist);
  338. if (updtdata == "")
  339. {
  340. messageBox("변경된 데이터가","I004");
  341. return;
  342. }
  343. if(!checkKeyColumn("grd_rscmdodtlist")) return;
  344. rtn = messageBox("", "Q002");
  345. if(rtn != "6" ) return false;
  346. misfSave("TXRSC01601");
  347. fsearch();
  348. ]]>
  349. </script>
  350. </button>
  351. <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3; width:56px; height:22px; ">
  352. <caption>출력</caption>
  353. </button>
  354. </group>
  355. </xhtml:body>
  356. </xhtml:html>