SMLIF00100_장비코드관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLIF00100_장비코드관리.xrw
  4. * 설 명 : 장비코드관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2007.05.11
  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>장비코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <eqmtcdlist>
  20. <eqmtfromdd/>
  21. <eqmttodd/>
  22. <eqmtcd/>
  23. <eqmtnm/>
  24. <eqmtabbrnm/>
  25. <rsltreptid/>
  26. <rsltreptkind/>
  27. <rsltreptresn/>
  28. <retestyn/>
  29. <meterno/>
  30. <qcyn/>
  31. </eqmtcdlist>
  32. </main>
  33. <send>
  34. <refgbn/>
  35. <eqmtdata/>
  36. <lasc/>
  37. <deptflag/>
  38. <dept/>
  39. </send>
  40. <init>
  41. </init>
  42. <hidden>
  43. <refgbn>1</refgbn>
  44. <lasc/>
  45. <dept>00</dept>
  46. </hidden>
  47. </root>
  48. </instance>
  49. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  52. <!-- 장비코드 상세내역 조회-->
  53. <submission id="TRLIF00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/eqmtcdlist"/>
  54. <!-- 장비코드 상세내역 수정, 등록-->
  55. <submission id="TXLIF00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/eqmtcdlist"/>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. // 권한 설정
  59. var auth = model.getValue("/root/properties/auth");
  60. checkAuth(auth);
  61. btn_save.disabled = !checkAuth("X") ;
  62. //사용자부서코드 조회 *추가 20080703 -승현-
  63. model.makeValue("/root/send/codeflag","0000|0111|"); //0000:사용자부서코드
  64. submit("TRLZZ00101");
  65. //핵의학 일경우에 LASC관련 숨기기
  66. if(model.getValue("/root/init/LB0000/nm") == "N"){
  67. ipt_lasc.visible = false;
  68. btn_lasc.visible = false;
  69. }
  70. fGetEqmtCdList(); //화면 로드시 장비코드 내역 조회 -승현추가080719
  71. ]]>
  72. </script>
  73. <submission id="TXLIF00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  74. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/LB0000"/>
  75. </model>
  76. <script type="javascript">
  77. <![CDATA[
  78. // 초기화
  79. function fSetInit(){
  80. //model.reset();
  81. model.removeNodeset("/root/main/eqmtcdlist");
  82. grd_eqmtcd.refresh();
  83. }
  84. // 조회
  85. function fGetEqmtCdList(){
  86. model.setValue("/root/send/refgbn", model.getValue("/root/hidden/refgbn"));
  87. model.setValue("/root/send/deptflag" , model.getValue("/root/init/LB0000/nm")); //20080703 승현 추가
  88. model.setValue("/root/send/dept" , model.getValue("/root/hidden/dept"));
  89. submit("TRLIF00101");
  90. }
  91. // 저장
  92. function fExeEqmtSave(){
  93. //alert("!!!!!");
  94. for( i = 1 ; i < grd_eqmtcd.rows ; i++){
  95. var eqmtfromdd = model.getValue("/root/main/eqmtcdlist["+i+"]/eqmtfromdd");
  96. eqmtfromdd = eqmtfromdd.getTrim();
  97. var eqmttodd = model.getValue("/root/main/eqmtcdlist["+i+"]/eqmttodd");
  98. eqmttodd = eqmttodd.getTrim();
  99. var eqmtcd = model.getValue("/root/main/eqmtcdlist["+i+"]/eqmtcd");
  100. eqmtcd = eqmtcd.getTrim();
  101. var eqmtnm = model.getValue("/root/main/eqmtcdlist["+i+"]/eqmtnm");
  102. eqmtnm = eqmtnm.getTrim();
  103. var eqmtabbrnm = model.getValue("/root/main/eqmtcdlist["+i+"]/eqmtabbrnm");
  104. eqmtabbrnm = eqmtabbrnm.getTrim();
  105. var rsltreptid = model.getValue("/root/main/eqmtcdlist["+i+"]/rsltreptid");
  106. rsltreptid = rsltreptid.getTrim();
  107. var rsltreptkind = model.getValue("/root/main/eqmtcdlist["+i+"]/rsltreptkind");
  108. rsltreptkind = rsltreptkind.getTrim();
  109. var rsltreptresn = model.getValue("/root/main/eqmtcdlist["+i+"]/rsltreptresn");
  110. rsltreptresn = rsltreptresn.getTrim();
  111. var meterno = model.getValue("/root/main/eqmtcdlist["+i+"]/meterno");
  112. meterno = meterno.getTrim();
  113. var retestyn = model.getValue("/root/main/eqmtcdlist["+i+"]/retestyn");
  114. var qcyn = model.getValue("/root/main/eqmtcdlist["+i+"]/qcyn");
  115. var a = "";
  116. var b ;
  117. if(grd_eqmtcd.rowStatus(i) != 0){
  118. if( eqmtfromdd == ""){
  119. //grd_eqmtcd.rowStatus(i) = 0;
  120. a = a + grd_eqmtcd.labelMatrix(0,1);
  121. //alert( grd_eqmtcd.labelMatrix(0,1) + "를 입력해 주십시요");
  122. //return;
  123. }
  124. }
  125. if(grd_eqmtcd.rowStatus(i) != 0){
  126. if( eqmttodd == ""){
  127. //grd_eqmtcd.rowStatus(i) = 0;
  128. if(a == ""){
  129. a = a + grd_eqmtcd.labelMatrix(0,2);
  130. }
  131. else{
  132. a = a +", " +grd_eqmtcd.labelMatrix(0,2);
  133. }
  134. //alert( grd_eqmtcd.labelMatrix(0,2) + "를 입력해 주십시요");
  135. //return;
  136. }
  137. }
  138. if(grd_eqmtcd.rowStatus(i) != 0){
  139. if( eqmtcd == ""){
  140. //grd_eqmtcd.rowStatus(i) = 0;
  141. if(a == ""){
  142. a = a + grd_eqmtcd.labelMatrix(0,3);
  143. }
  144. else{
  145. a = a +", " +grd_eqmtcd.labelMatrix(0,3);
  146. }
  147. //alert( grd_eqmtcd.labelMatrix(0,3) + "를 입력해 주십시요");
  148. //return;
  149. }
  150. }
  151. if(grd_eqmtcd.rowStatus(i) != 0){
  152. if( eqmtnm == ""){
  153. //alert("!!!!!");
  154. //grd_eqmtcd.rowStatus(i) = 0;
  155. if(a == ""){
  156. a = a + grd_eqmtcd.labelMatrix(0,4);
  157. }
  158. else{
  159. a = a +", " +grd_eqmtcd.labelMatrix(0,4);
  160. }
  161. //alert( grd_eqmtcd.labelMatrix(0,4) + "을 입력해 주십시요");
  162. //return;
  163. }
  164. }
  165. if(grd_eqmtcd.rowStatus(i) != 0){
  166. if( meterno == ""){
  167. //grd_eqmtcd.rowStatus(i) = 0;
  168. if(a ==""){
  169. a = a + grd_eqmtcd.labelMatrix(0,5);
  170. }
  171. else{
  172. a = a +", " +grd_eqmtcd.labelMatrix(0,5);
  173. }
  174. //alert( grd_eqmtcd.labelMatrix(0,5) + "를 입력해 주십시요");
  175. //return;
  176. }
  177. }
  178. if(grd_eqmtcd.rowStatus(i) != 0){
  179. if( eqmtabbrnm == ""){
  180. //grd_eqmtcd.rowStatus(i) = 0;
  181. if(a == ""){
  182. a = a + grd_eqmtcd.labelMatrix(0,6);
  183. }
  184. else{
  185. a = a +", " +grd_eqmtcd.labelMatrix(0,6);
  186. }
  187. //alert( grd_eqmtcd.labelMatrix(0,6) + "를 입력해 주십시요");
  188. //return;
  189. }
  190. }
  191. if(grd_eqmtcd.rowStatus(i) != 0){
  192. if( rsltreptid == ""){
  193. //grd_eqmtcd.rowStatus(i) = 0;
  194. if(a == ""){
  195. a = a + grd_eqmtcd.labelMatrix(0,7);
  196. }
  197. else{
  198. a = a +", " +grd_eqmtcd.labelMatrix(0,7);
  199. }
  200. //alert( grd_eqmtcd.labelMatrix(0,7) + "을 입력해 주십시요");
  201. //return;
  202. }
  203. }
  204. if(grd_eqmtcd.rowStatus(i) != 0){
  205. if( rsltreptkind == 0){
  206. //grd_eqmtcd.rowStatus(i) = 0;
  207. if(a == ""){
  208. a = a + grd_eqmtcd.labelMatrix(0,8);
  209. }
  210. else{
  211. a = a +", " +grd_eqmtcd.labelMatrix(0,8);
  212. }
  213. //alert( grd_eqmtcd.labelMatrix(0,8) + "를 입력해 주십시요");
  214. //return;
  215. }
  216. }
  217. if(grd_eqmtcd.rowStatus(i) != 0){
  218. if( rsltreptresn == ""){
  219. //grd_eqmtcd.rowStatus(i) = 0;
  220. if(a == ""){
  221. a = a + grd_eqmtcd.labelMatrix(0,9);
  222. }
  223. else{
  224. a = a +", " +grd_eqmtcd.labelMatrix(0,9);
  225. }
  226. //alert( grd_eqmtcd.labelMatrix(0,9) + "를 입력해 주십시요");
  227. //return;
  228. }
  229. }
  230. if(grd_eqmtcd.rowStatus(i) != 0){
  231. if( retestyn == ""){
  232. //grd_eqmtcd.rowStatus(i) = 0;
  233. if(a == ""){
  234. a = a + grd_eqmtcd.labelMatrix(0,10);
  235. }
  236. else{
  237. a = a +", " +grd_eqmtcd.labelMatrix(0,10);
  238. }
  239. //alert( grd_eqmtcd.labelMatrix(0,10) + "를 입력해 주십시요");
  240. //return;
  241. }
  242. }
  243. if(grd_eqmtcd.rowStatus(i) != 0){
  244. if( qcyn == ""){
  245. //grd_eqmtcd.rowStatus(i) = 0;
  246. if(a == ""){
  247. a = a + grd_eqmtcd.labelMatrix(0,11);
  248. }
  249. else{
  250. a = a +", " +grd_eqmtcd.labelMatrix(0,11);
  251. }
  252. //alert( grd_eqmtcd.labelMatrix(0,11) + "를 입력해 주십시요");
  253. //return;
  254. }
  255. }
  256. if(a !=""){
  257. b = a.split(",");
  258. //alert(b);
  259. var ii = b.length - 1
  260. // alert("!!!!!");
  261. // alert(b[ii] + "0");
  262. if( b[ii].getTrim().toString() == "장비코드" || b[ii].getTrim().toString() == "장비SirialNo"
  263. || b[ii].getTrim().toString() == "결과보고자ID" || b[ii].getTrim().toString() == "결과보고사유" ){
  264. // alert("!!!!!");
  265. model.alert( i +"번째줄의 "+a+"를 추가하여 입력하여주십시요","항목오류");
  266. // grd_eqmtcd.rowStatus(i) = 0;
  267. return;
  268. }else{
  269. model.alert( i +"번째줄의 "+a+"을 추가하여 입력하여주십시요","항목오류");
  270. // grd_eqmtcd.rowStatus(i) = 0;
  271. return;
  272. }
  273. // else{
  274. // exit for
  275. // }
  276. }
  277. //return;
  278. // alert("!!!!!");
  279. }// for
  280. var eqmtdata = grd_eqmtcd.getUpdateData();
  281. model.setValue("/root/send/eqmtdata" , eqmtdata);
  282. model.setValue("/root/send/deptflag" , model.getValue("/root/init/LB0000/nm")); //20080703 승현추가
  283. //alert("!!!!!");
  284. if(submit("TXLIF00101")){
  285. fGetEqmtCdList();
  286. }
  287. // 저장 후 조회
  288. //fGetEqmtCdList();
  289. }
  290. // 행추가
  291. function fInsRowAdd(){
  292. grd_eqmtcd.addRow();
  293. //alert(grd_eqmtcd.row);
  294. //alert(grd_eqmtcd.rows);
  295. grd_eqmtcd.topRow = grd_eqmtcd.row;
  296. var tDay = getCurrentDate();
  297. var checked = "N"
  298. model.setValue("/root/main/eqmtcdlist["+grd_eqmtcd.row+"]/eqmtfromdd", tDay);
  299. model.setValue("/root/main/eqmtcdlist["+grd_eqmtcd.row+"]/eqmttodd", "99991231");
  300. model.setvalue("/root/main/eqmtcdlist["+grd_eqmtcd.row+"]/retestyn", checked);
  301. model.setvalue("/root/main/eqmtcdlist["+grd_eqmtcd.row+"]/qcyn", checked);
  302. }
  303. //LASC변경
  304. function fSetLasc() {
  305. if(model.getValue("/root/hidden/lasc") != "" && getUserId() == "LIS") {
  306. model.setValue("/root/send/lasc", model.getValue("/root/hidden/lasc"));
  307. if(submit("TXLIF00102")) {
  308. model.setValue("/root/hidden/lasc", "");
  309. }
  310. model.refresh();
  311. } else {
  312. if(getUserId() != "LIS") {
  313. alert("LIS 개발자들만 변경이 가능합니다.");
  314. }else {
  315. alert("LASC를 입력하세요..");
  316. }
  317. }
  318. }
  319. function Checked(){
  320. }
  321. ]]>
  322. </script>
  323. </xhtml:head>
  324. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  325. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  326. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  327. <caption id="caption2" class="tit_2" style="left:5px; top:55px; width:134px; height:13px; ">장비코드상세내역</caption>
  328. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  329. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  330. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  331. <line id="line14" class="line_4" style="x1:448px; y1:6px; x2:448px; y2:28px; "/>
  332. <select1 id="cmb_refgbn" ref="/root/hidden/refgbn" class="combo_search" appearance="minimal" style="left:108px; top:8px; width:150px; height:19px; ">
  333. <choices>
  334. <item>
  335. <label>사용가능자료</label>
  336. <value>1</value>
  337. </item>
  338. <item>
  339. <label>전체자료</label>
  340. <value>2</value>
  341. </item>
  342. </choices>
  343. </select1>
  344. <button id="btn_search" class="btn1_letter2" style="left:458px; top:7px; width:56px; height:22px; ">
  345. <caption>조회</caption>
  346. <script type="javascript" ev:event="DOMActivate">
  347. <![CDATA[
  348. fGetEqmtCdList();
  349. ]]>
  350. </script>
  351. </button>
  352. <input id="ipt_lasc" ref="/root/hidden/lasc" style="left:880px; top:8px; width:165px; height:19px; "/>
  353. <button id="btn_lasc" class="btn1_letter6" style="left:1075px; top:7px; width:104px; height:22px; ">
  354. <caption>LASC 변경</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. fSetLasc();
  358. ]]>
  359. </script>
  360. </button>
  361. <line id="line2" class="line_4" style="x1:1060px; y1:6px; x2:1060px; y2:28px; "/>
  362. <caption id="caption3" class="search_name" style="left:265px; top:10px; width:86px; height:17px; ">검사실 :</caption>
  363. <select1 id="cbo_execDept" ref="/root/hidden/dept" class="combo_s_essential" appearance="minimal" style="left:340px; top:9px; width:100px; height:19px; ">
  364. <choices>
  365. <itemset nodeset="/root/init/LB0111">
  366. <label ref="nm"/>
  367. <value ref="cd"/>
  368. </itemset>
  369. </choices>
  370. </select1>
  371. </group>
  372. <button id="btn_addrow" class="btn2_letter3" style="left:1141px; top:49px; width:53px; height:19px; ">
  373. <caption>행추가</caption>
  374. <script type="javascript" ev:event="DOMActivate">
  375. <![CDATA[
  376. fInsRowAdd();
  377. ]]>
  378. </script>
  379. </button>
  380. <datagrid id="grd_eqmtcd" nodeset="/root/main/eqmtcdlist" caption="사용시작일자^사용종료일자^장비코드^장비명^장비SirialNo^장비약어명^결과보고자ID^결과보고유형^결과보고사유^재검여부^QC여부" colwidth="100, 100, 80, 190, 100, 100, 110, 110, 100, 80, 80" dataheight="25" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:647px; ">
  381. <col ref="eqmtfromdd" type="inputdate" format="yyyy-mm-dd"/>
  382. <col ref="eqmttodd" type="inputdate" format="yyyy-mm-dd"/>
  383. <col ref="eqmtcd" type="input"/>
  384. <col ref="eqmtnm" type="input"/>
  385. <col ref="meterno" type="input"/>
  386. <col ref="eqmtabbrnm" type="input"/>
  387. <col ref="rsltreptid" type="input"/>
  388. <col ref="rsltreptkind" type="combo">
  389. <choices>
  390. <item>
  391. <label>결과저장</label>
  392. <value>1</value>
  393. </item>
  394. <item>
  395. <label>중간보고</label>
  396. <value>2</value>
  397. </item>
  398. <item>
  399. <label>최종보고</label>
  400. <value>4</value>
  401. </item>
  402. </choices>
  403. </col>
  404. <col ref="rsltreptresn" type="input"/>
  405. <col checkvalue="Y,N" ref="retestyn" type="checkbox"/>
  406. <col checkvalue="Y,N" ref="qcyn" type="checkbox"/>
  407. <script type="javascript" ev:event="onaftersort">
  408. <![CDATA[
  409. grd_eqmtcd.gridToInstance();
  410. ]]>
  411. </script>
  412. </datagrid>
  413. </group>
  414. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  415. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  416. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  417. <caption>저장</caption>
  418. <script type="javascript" ev:event="DOMActivate">
  419. <![CDATA[
  420. fExeEqmtSave();
  421. ]]>
  422. </script>
  423. </button>
  424. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  425. <caption>초기화</caption>
  426. <script type="javascript" ev:event="DOMActivate">
  427. <![CDATA[
  428. fSetInit();
  429. ]]>
  430. </script>
  431. </button>
  432. </group>
  433. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  434. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">장비코드관리</caption>
  435. </group>
  436. </xhtml:body>
  437. </xhtml:html>