SMLLF10100_통합계검사계코드관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF00100_계검사계코드관리.xrw
  4. * 설 명 : 검사시행부서코드관리 조회 및 등록
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2007.04.10
  8. * 수정이력 : 2007.07.27 박정은 lastupdtdt 수정함
  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>
  18. <main>
  19. <flag>
  20. <cond1>2</cond1>
  21. </flag>
  22. <sectlist>
  23. <sectfromdd/>
  24. <secttodd/>
  25. <sectcd/>
  26. <sectnm/>
  27. <sectscrnnm/>
  28. <sectabbrnm/>
  29. <sectprntnm/>
  30. <sectlblnm/>
  31. </sectlist>
  32. <tsectlist>
  33. <tsectfromdd/>
  34. <tsecttodd/>
  35. <sectcd/>
  36. <tsectcd/>
  37. <tsectnm/>
  38. <tsectscrnnm/>
  39. <tsectabbrnm/>
  40. <tsectprntnm/>
  41. <tsectlblnm/>
  42. </tsectlist>
  43. <MSG/>
  44. <getUsernm/>
  45. </main>
  46. <send>
  47. <refgbn/>
  48. <sectcd/>
  49. <sectdata/>
  50. <tsectdata/>
  51. <deptflag/>
  52. <codeflag/>
  53. </send>
  54. <init>
  55. </init>
  56. <hidden>
  57. <ref>
  58. <refgbn>1</refgbn>
  59. </ref>
  60. <deptflagcd/>
  61. </hidden>
  62. </root>
  63. </instance>
  64. <script src="../../../com/commonweb/js/common.js" type="javascript"/>
  65. <script src="../../../com/commonweb/js/dateHelper.js" type="javascript"/>
  66. <script src="../../../com/commonweb/js/tfHelper.js" type="javascript"/>
  67. <!-- 계코드 조회-->
  68. <submission id="TRLLF10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/sectlist"/>
  69. <!-- 검사계코드 조회-->
  70. <submission id="TRLLF10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tsectlist"/>
  71. <!-- 계코드 수정,등록-->
  72. <!-- 검사계코드 수정,등록-->
  73. <submission id="TXLLF10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/sectlist"/>
  74. <submission id="TXLLF10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tsectlist"/>
  75. <!--<submission id="TRLZZ00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getUsernm"/>-->
  76. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  77. <script ev:event="xforms-ready" type="javascript">
  78. <![CDATA[
  79. // 권한 설정
  80. //var auth = model.getValue("/root/properties/auth");
  81. //checkAuth(auth);
  82. //btn_save.disabled = !checkAuth("X") ;
  83. // 초기정보 조회
  84. model.setValue("/root/send/codeflag", "0000|"); // 0000= 유저과플래그
  85. submit("TRLZZ00101");
  86. model.removeNodeset("/root/main/sectlist");
  87. model.removeNodeset("/root/main/tsectlist");
  88. model.refresh();
  89. fSetHddentodd();
  90. ]]>
  91. </script>
  92. </model>
  93. <script type="javascript">
  94. <![CDATA[
  95. //조회구분에 따라 상용종료일 숨기기
  96. function fSetHddentodd(){
  97. if(cmb_refgbn.value == "1"){
  98. grd_sect.colHidden(2) = true;
  99. grd_tsect.colHidden(2) = true;
  100. }else if(cmb_refgbn.value =="2"){
  101. grd_sect.colHidden(2) = false;
  102. grd_tsect.colHidden(2) = false;
  103. }
  104. }
  105. // 행추가 버튼
  106. /*function fInsRowAdd(pGridId) {
  107. pGridId.addRow();
  108. }
  109. */
  110. // 시행부서코드목록 행추가
  111. function fSetSectRowAdd(){
  112. grd_sect.addRow();
  113. grd_sect.rowStatus(0) = 1;
  114. var today = getCurrentDate();
  115. model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectfromdd", today);
  116. model.setValue("/root/main/sectlist["+grd_sect.row+"]/secttodd", "99991231");
  117. model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectabbrnm", "-");
  118. model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectprntnm", "-");
  119. model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectlblnm", "-");
  120. model.removeNodeset("/root/main/tsectlist");
  121. grd_tsect.refresh();
  122. }
  123. // 시행부서 상세코드목록 행추가
  124. function fSetTsectRowAdd(){
  125. grd_tsect.addRow();
  126. var today = getCurrentDate();
  127. model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectfromdd", today);
  128. model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsecttodd", "99991231");
  129. model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectabbrnm", "-");
  130. model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectprntnm", "-");
  131. model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectlblnm", "-");
  132. }
  133. // 상세 행추가시 계 널값 체크
  134. function fGetSectNull(){
  135. var msg = "";
  136. var nullyn = "true";
  137. var sectRow = grd_sect.row;
  138. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectlblnm")==""){
  139. msg = "[계라벨명] 은 " ;
  140. nullyn = "false";
  141. }
  142. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectprntnm")==""){
  143. msg = "[계출력명] 은 " ;
  144. nullyn = "false";
  145. }
  146. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectabbrnm")==""){
  147. msg = "[계약어명] 은 " ;
  148. nullyn = "false";
  149. }
  150. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectscrnnm")==""){
  151. msg = "[계화면명] 은 " ;
  152. nullyn = "false";
  153. }
  154. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectnm")==""){
  155. msg = "[계명] 은 " ;
  156. nullyn = "false";
  157. }
  158. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectcd")==""){
  159. msg = "[계코드] 는 " ;
  160. nullyn = "false";
  161. }
  162. if(model.getValue("/root/main/sectlist["+sectRow+"]/secttodd")==""){
  163. msg = "[사용종료일] 은 " ;
  164. nullyn = "false";
  165. }
  166. if(model.getValue("/root/main/sectlist["+sectRow+"]/sectfromdd")==""){
  167. msg = "[사용시작일] 은 " ;
  168. nullyn = "false";
  169. }
  170. if(nullyn == "false"){
  171. messageBox(msg, "I003", "");
  172. }
  173. return nullyn;
  174. }
  175. // 초기화 버튼
  176. function fSetInit() {
  177. //model.reset();
  178. model.removeNodeset("/root/main/sectlist");
  179. model.removeNodeset("/root/main/tsectlist");
  180. model.refresh();
  181. }
  182. // 계리스트 조회
  183. function fGetSectTsect(){
  184. grd_sect.rebuildstyle();
  185. model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
  186. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  187. submit("TRLLF10101"); // 계 리스트 조회
  188. var gbn = model.getValue("/root/hidden/ref/refgbn");
  189. var today = getCurrentDate();
  190. // 전체조회일때 종료된 데이터 배경색 바꾸기
  191. if(gbn=="2"){
  192. setRowStyle("grd_sect", "0", today, "secttodd", "small");
  193. }
  194. // 계리스트 존재시 검사계 자동조회
  195. if(grd_sect.rows > 0){
  196. grd_sect.row = 1;
  197. fGetTsect(1);
  198. }
  199. }
  200. // 검사계 리스트 조회
  201. function fGetTsect(sectRow){
  202. grd_tsect.allStyle("all", "background-color") = "#FFFFFF";
  203. var cdd = model.getValue("/root/main/sectlist["+sectRow+"]/sectcd");
  204. model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
  205. model.setValue("/root/send/sectcd", cdd);
  206. submit("TRLLF10102");
  207. setRowStyle("grd_tsect", "0", getCurrentDate(), "tsecttodd", "small");
  208. }
  209. // 저장버튼 클릭시
  210. function fExeSectTsect(){
  211. //var sectdata = grd_sect.getUpdateData();
  212. var sectdata = getGridUpdateData(grd_sect);
  213. var row = grd_sect.row;
  214. var today = getCurrentDate();
  215. var tsectRow = grd_tsect.rows;
  216. var sectcd = model.getValue("/root/main/sectlist["+grd_sect.row+"]/sectcd");
  217. if(tsectRow <3){
  218. //alert("시행부서 상세 코드 정보를 입력하십시오.");
  219. messageBox("시행부서 상세 코드 정보를 ", "C001");
  220. return;
  221. }
  222. //계 정보 등록
  223. model.setValue("/root/send/sectdata", sectdata);
  224. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  225. submit("TXLLF10101");
  226. // 검사계 정보 등록
  227. //var tsectdata = grd_tsect.getUpdateData();
  228. var tsectdata = getGridUpdateData(grd_tsect);
  229. model.setValue("/root/send/sectcd", sectcd);
  230. model.setValue("/root/send/tsectdata", tsectdata);
  231. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  232. submit("TXLLF10102");
  233. var gbn = model.getValue("/root/hidden/ref/refgbn");
  234. // 전체조회일때 종료된 데이터 배경색 바꾸기
  235. /*
  236. if(gbn=="2"){
  237. // 계
  238. for(i=1; i<=grd_sect.rows; i++){
  239. grd_sect.rowStyle(i, "data", "background-color") = "#FFFFFF";
  240. if(model.getValue("/root/main/sectlist["+i+"]/secttodd") < today){
  241. grd_sect.rowStyle(i, "data", "background-color") = "#f3e1bf";
  242. //setRowStyle(grd_tube , "background-color" , "1" , i ); -- common js
  243. }
  244. }
  245. // 계검사계
  246. for(j=1; j<= grd_tsect.rows; j++){
  247. grd_tsect.rowStyle(i, "data", "background-color") = "#FFFFFF";
  248. if(model.getValue("/root/main/tsectlist["+j+"]/tsecttodd") < today){
  249. grd_tsect.rowStyle(j, "data", "background-color") = "#f3e1bf";
  250. }
  251. }
  252. }*/
  253. }
  254. // Null 체크
  255. function fNullCheck(){
  256. var msg = "";
  257. var nullyn = "true";
  258. if(grd_tsect.rows <3){
  259. //alert("시행부서 상세 코드 정보를 입력하십시오.");
  260. messageBox("시행부서 상세 코드 정보를 ", "C001");
  261. return;
  262. }
  263. for(i=1; i<grd_tsect.rows; i++ ){
  264. //if(grd_tsect.rowStatus(i) == 3 || grd_tsect.rowStatus(i) == 1){
  265. if(model.getValue("/root/main/tsectlist["+i+"]/tsectlblnm")==""){
  266. msg = "[검사계라벨명] 은 " ;
  267. nullyn = "false";
  268. }
  269. if(model.getValue("/root/main/tsectlist["+i+"]/tsectprntnm")==""){
  270. msg = "[검사계출력명] 은 " ;
  271. nullyn = "false";
  272. }
  273. if(model.getValue("/root/main/tsectlist["+i+"]/tsectabbrnm")==""){
  274. msg = "[검사계약어명] 은 " ;
  275. nullyn = "false";
  276. }
  277. if(model.getValue("/root/main/tsectlist["+i+"]/tsectscrnnm")==""){
  278. msg = "[검사계화면명] 은 " ;
  279. nullyn = "false";
  280. }
  281. if(model.getValue("/root/main/tsectlist["+i+"]/tsectnm")==""){
  282. msg = "[검사계명] 은 " ;
  283. nullyn = "false";
  284. }
  285. if(model.getValue("/root/main/tsectlist["+i+"]/tsectcd")==""){
  286. msg = "[검사계코드] 는 " ;
  287. nullyn = "false";
  288. }
  289. if(model.getValue("/root/main/tsectlist["+i+"]/tsecttodd")==""){
  290. msg = "[사용종료일] 은 " ;
  291. nullyn = "false";
  292. }
  293. if(model.getValue("/root/main/tsectlist["+i+"]/tsectfromdd")==""){
  294. msg = "[사용시작일] 은 " ;
  295. nullyn = "false";
  296. }
  297. //}
  298. if(nullyn == "false"){
  299. messageBox(msg, "I003", "");
  300. }
  301. return nullyn;
  302. }
  303. }
  304. ]]>
  305. </script>
  306. </xhtml:head>
  307. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  308. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  309. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검사시행부서코드관리</caption>
  310. </group>
  311. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  312. <group id="group2" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  313. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0; width:1195px; height:35px; "/>
  314. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90; height:17px; ">조회구분 :</caption>
  315. <line id="line11" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  316. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:57px; height:22px; ">
  317. <caption>조회</caption>
  318. <script ev:event="DOMActivate" type="javascript">
  319. <![CDATA[
  320. // 계코드 조회
  321. fGetSectTsect();
  322. ]]>
  323. </script>
  324. </button>
  325. <select1 id="cmb_refgbn" ref="/root/hidden/ref/refgbn" class="combo_s_essential" appearance="minimal" style="left:108px; top:8px; width:150px; height:19px; ">
  326. <choices>
  327. <item>
  328. <label>사용코드</label>
  329. <value>1</value>
  330. </item>
  331. <item>
  332. <label>전체코드</label>
  333. <value>2</value>
  334. </item>
  335. </choices>
  336. <script ev:event="xforms-select" type="javascript">
  337. <![CDATA[
  338. fSetHddentodd();
  339. ]]>
  340. </script>
  341. </select1>
  342. </group>
  343. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:134px; height:14px; ">시행부서코드목록</caption>
  344. <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:495px; y2:70px; "/>
  345. <line id="line1" class="line_1" style="x1:500px; y1:70px; x2:1194px; y2:70px; "/>
  346. <caption id="caption3" class="tit_2" style="left:505px; top:55px; width:147px; height:14px; ">시행부서상세코드목록</caption>
  347. <datagrid id="grd_sect" nodeset="/root/main/sectlist" caption="사용시작일^사용종료일^계코드^계명^계명(화면)^계명(약어)^계명(출력)^계명(라벨)^표시순서" colwidth="85, 85, 50, 70, 90, 80, 80, 80, 60" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:0px; top:75px; width:495px; height:669px; ">
  348. <col ref="sectfromdd" type="inputdate"/>
  349. <col ref="secttodd" type="inputdate"/>
  350. <col ref="sectcd" type="input"/>
  351. <col ref="sectnm" type="input"/>
  352. <col ref="sectscrnnm" type="input"/>
  353. <col ref="sectabbrnm" type="input"/>
  354. <col ref="sectprntnm" type="input"/>
  355. <col ref="sectlblnm" type="input"/>
  356. <script ev:event="onclick" type="javascript">
  357. <![CDATA[
  358. // 검사계코드 리스트 조회
  359. fGetTsect(grd_sect.row);
  360. ]]>
  361. </script>
  362. <script ev:event="onaftersort" type="javascript">
  363. <![CDATA[
  364. grd_sect.gridToInstance();
  365. ]]>
  366. </script>
  367. </datagrid>
  368. <datagrid id="grd_tsect" nodeset="/root/main/tsectlist" caption="사용시작일^사용종료일^검사계코드^검사계코드^검사계명^검사계명(화면)^검사계명(약어)^검사계명(출력)^검사계명(라벨)^계표시순서^검사계표시순서|사용시작일^사용종료일^계^검사계^검사계명^검사계명(화면)^검사계명(약어)^검사계명(출력)^검사계명(라벨)^계표시순서^검사계표시순서" colwidth="85, 85, 33, 38, 60, 90, 90, 90, 90, 60, 60" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:500px; top:75px; width:695px; height:669px; ">
  369. <col ref="tsectfromdd" type="inputdate"/>
  370. <col ref="tsecttodd" type="inputdate"/>
  371. <col ref="sectcd"/>
  372. <col ref="tsectcd" type="input"/>
  373. <col ref="tsectnm" type="input"/>
  374. <col ref="tsectscrnnm" type="input"/>
  375. <col ref="tsectabbrnm" type="input"/>
  376. <col ref="tsectprntnm" type="input"/>
  377. <col ref="tsectlblnm" type="input"/>
  378. <script ev:event="onaftersort" type="javascript">
  379. <![CDATA[
  380. grd_tsect.gridToInstance();
  381. ]]>
  382. </script>
  383. </datagrid>
  384. <button id="btn_addnew1" class="btn2_letter3" style="left:442px; top:49px; width:53px; height:19px; ">
  385. <caption>행추가</caption>
  386. <script ev:event="DOMActivate" type="javascript">
  387. <![CDATA[
  388. fSetSectRowAdd();
  389. ]]>
  390. </script>
  391. </button>
  392. <button id="btn_addnew2" class="btn2_letter3" style="left:1142px; top:49px; width:53px; height:19px; ">
  393. <caption>행추가</caption>
  394. <script ev:event="DOMActivate" type="javascript">
  395. <![CDATA[
  396. if(fGetSectNull()=="true"){
  397. fSetTsectRowAdd();
  398. }
  399. ]]>
  400. </script>
  401. </button>
  402. </group>
  403. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  404. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  405. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  406. <caption>초기화</caption>
  407. <script ev:event="DOMActivate" type="javascript">
  408. <![CDATA[
  409. fSetInit();
  410. ]]>
  411. </script>
  412. </button>
  413. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  414. <caption>저장</caption>
  415. <script ev:event="DOMActivate" type="javascript">
  416. <![CDATA[
  417. if(fNullCheck()=="true"){
  418. fExeSectTsect();
  419. }
  420. ]]>
  421. </script>
  422. </button>
  423. </group>
  424. </xhtml:body>
  425. </xhtml:html>