SMRSM00300_부서별화학물질사용현황.xrw 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>부서별 목록조회(MSDS 조회)</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <condition>
  11. <deptcd/>
  12. <deptnm/>
  13. <matrcd/>
  14. <matrnm/>
  15. <basedd/>
  16. <chkmatrcd/>
  17. <instcd/>
  18. </condition>
  19. <matrlist>
  20. <matrcd/>
  21. <matrnm/>
  22. <deptcd/>
  23. <deptnm/>
  24. <harmcomp/>
  25. <harmcls/>
  26. <usge/>
  27. <sgnl/>
  28. <warnyn1/>
  29. <warnyn2/>
  30. <warnyn3/>
  31. <warnyn4/>
  32. <warnyn5/>
  33. <warnyn6/>
  34. <warnyn7/>
  35. <warnyn8/>
  36. <warnyn9/>
  37. <msdsfileyn/>
  38. <msdsfilepath/>
  39. <msdsfilenm/>
  40. <workfileyn/>
  41. <workfilepath/>
  42. <workfilenm/>
  43. <chk/>
  44. <gubun/>
  45. <useqtym/>
  46. <prodcmpynm/>
  47. <pos1/>
  48. <pos2/>
  49. <pos3/>
  50. <pos4/>
  51. <pos5/>
  52. <pos6/>
  53. <pos7/>
  54. <pos8/>
  55. <pos9/>
  56. <harm/>
  57. </matrlist>
  58. <harmlist>
  59. <matrnm/>
  60. <deptcd/>
  61. <deptnm/>
  62. <useqtym/>
  63. <usge/>
  64. <prodcmpynm/>
  65. <pos1/>
  66. <pos2/>
  67. <pos3/>
  68. <pos4/>
  69. <pos5/>
  70. <pos6/>
  71. <pos7/>
  72. <pos8/>
  73. <pos9/>
  74. <sgnl/>
  75. <harm/>
  76. <gubun/>
  77. </harmlist>
  78. </main>
  79. <send/>
  80. <init/>
  81. <temp>
  82. </temp>
  83. <popmatr>
  84. <matrcd/>
  85. <matrnm/>
  86. <deptcd/>
  87. <returntype/>
  88. <selectyn/>
  89. </popmatr>
  90. <popdata>
  91. <matrcd/>
  92. <matrnm/>
  93. <deptcd/>
  94. <deptnm/>
  95. <ym/>
  96. <popflag/>
  97. <confirmflag/>
  98. </popdata>
  99. </root>
  100. </instance>
  101. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  102. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  103. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  104. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  105. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  106. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  107. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  108. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  109. <script type="javascript" ev:event="xforms-ready">
  110. <![CDATA[
  111. fOpenForm();
  112. ]]>
  113. </script>
  114. <script type="javascript">
  115. <![CDATA[
  116. //========================================================================================
  117. //화면 로드시 초기화 함수
  118. //========================================================================================
  119. function fOpenForm() {
  120. misfGridInit(grd_matrlist);
  121. ipt_basedd.value = getCurrentDate(); //기준일자
  122. grd_matrlist.dataHeight = 44;
  123. //2016.04.11 박준범 - 칠곡은 인증평가 이전까지 "유해등급물질" 컬럼을 "분류" 란 명칭으로 사용
  124. if( getUserInfo("dutplceinstcd") == "032" ) {
  125. for(var i = 0; i < grd_matrlist.fixedRows; i++) {
  126. grd_matrlist.valueMatrix(i, grd_matrlist.colRef("harmgrde")) = "분류";
  127. }
  128. }
  129. }
  130. //========================================================================================
  131. //인스턴스 Copy 함수
  132. //========================================================================================
  133. function fCopyInstance() {
  134. //----model.copyNode("/root/hidden/matrinfo/detail", "/root/main/matrinfo/detail");
  135. model.copyNode("/root/hidden/matrinfo", "/root/main/matrinfo");
  136. model.refresh();
  137. }
  138. //========================================================================================
  139. //코드 목록 조회 함수
  140. //========================================================================================
  141. function fGetMatrList() {
  142. model.copyNode("/root/send", "/root/main/condition");
  143. submit("TRRSM00301");
  144. model.refresh();
  145. //2016.04.11 박준범 - 칠곡은 인증평가 이전까지 "유해등급물질" 컬럼을 "분류" 란 명칭으로 사용
  146. if( getUserInfo("dutplceinstcd") == "032" ) {
  147. for(var i = 0; i < grd_matrlist.fixedRows; i++) {
  148. grd_matrlist.valueMatrix(i, grd_matrlist.colRef("harmgrde")) = "분류";
  149. }
  150. }
  151. }
  152. //========================================================================================
  153. //화학물질 상세정보 및 조사표 조회
  154. //========================================================================================
  155. function fGetMatrInfo(pRow) {
  156. if ( pRow > 0 ) {
  157. model.resetInstanceNode("/root/send");
  158. model.copyNode("/root/send", "/root/main/matrlist["+ pRow + "]");
  159. submit("TRRSM00102");
  160. ipt_matrcd.disabled = true;
  161. fCopyInstance();
  162. }
  163. }
  164. //========================================================================================
  165. //신규 버턴 클릭시 인스턴스 초기화
  166. //========================================================================================
  167. function fSetMatrInfo() {
  168. ipt_matrcd.disabled = false;
  169. // 아래 두줄로 변경
  170. //model.resetInstanceNode("/root/main/matrinfo");
  171. model.resetInstanceNode("/root/main/matrinfo/detail");
  172. //model.resetInstanceNode("/root/main/matrinfo/deptlist");
  173. misfGridInit(grd_deptlist);
  174. //return;
  175. model.setFocus("ipt_matrcd");
  176. model.setValue("/root/main/matrinfo/detail/status", "i");
  177. model.setValue("/root/main/matrinfo/detail/msdsflag", "Y");
  178. // 서식에서 징수의무자 상호(법인명)으로 쓰임. 기본값으로 경북대학교병원장 셋팅.
  179. //model.setValue("/root/main/matrinfo/prntnm1" , "경북대학교병원장");
  180. fCopyInstance();
  181. }
  182. //========================================================================================
  183. // 저장버튼 클릭시 저장 수행 함수
  184. //========================================================================================
  185. function fClickSaveBtn() {
  186. if(!fIsValidForSave())//저장전 유효성 검사
  187. return;
  188. for(var i = 1; i <= grd_deptlist.rows; i++) {
  189. grd_deptlist.valueMatrix(i, grd_deptlist.colRef("matrcd")) = ipt_matrcd.value;
  190. }
  191. model.resetInstanceNode("/root/send");
  192. //model.makeNode("root/send/detail");
  193. model.copyNode("/root/send", "/root/main/matrinfo/detail");
  194. model.makeValue("/root/send/deptlist", grd_deptlist.getUpdateData());
  195. //return;
  196. if(submit("TXRSM00101")) {
  197. fGetMatrList();//코드 목록 재조회
  198. model.copyNode("/root/send", "/root/main/matrinfo/detail");
  199. submit("TRRSM00102"); //상세내역 및 조사표 재조회
  200. //model.setValue("/root/main/matrinfo/detail/status", "-");
  201. //grd_deptlist.clearStatus();
  202. //--model.makeNode("/root/hidden/matrinfo/detail");
  203. model.makeNode("/root/hidden/matrinfo");
  204. fCopyInstance();
  205. ipt_matrcd.disabled = true;
  206. }
  207. }
  208. //========================================================================================
  209. //저장전 유효성 검사
  210. //========================================================================================
  211. function fIsValidForSave() {
  212. //필수 입력 항목 체크(공통 ftHelper.js)
  213. if(!isRequiredControls("ipt_matrcd","ipt_matrnm")) { //,"ipt_prodcmpycd"
  214. return false;
  215. }
  216. var sStatus = model.getValue("/root/main/matrinfo/detail/status");
  217. var sNewData = fGetNodeText("/root/main/matrinfo/detail");
  218. var sOldData = fGetNodeText("/root/hidden/matrinfo/detail");
  219. //상세내역에 변경된 정보가 있는지 확인
  220. if(sNewData != sOldData && sStatus == "-") { // 데이터 수정일 경우
  221. model.setValue("/root/main/matrinfo/detail/status","u");
  222. return true;
  223. } else if(sNewData == sOldData && sStatus == "-" ) { //변경된 값이 없을경우
  224. //messageBox("변경된 정보가 ", "I004");
  225. //return false;
  226. return true;
  227. }else if(sStatus == "i") { //데이터 입력일 경우
  228. return true;
  229. }else if(sStatus = "d") { //데이터 삭제일 경우
  230. return true;
  231. }
  232. }
  233. //========================================================================================
  234. //엑셀입력(excel file을 그리드에 입력)
  235. //========================================================================================
  236. function fInputExcel(pGrid) {
  237. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  238. if(fileName != "") {
  239. pGrid.loadExcel(fileName, 1, true);
  240. pGrid.deleteRow(1);
  241. pGrid.refresh();
  242. }
  243. }
  244. //========================================================================================
  245. //동일한 Depth의 인스턴스의 값을 스트링형으로 변환
  246. //========================================================================================
  247. function fGetNodeText(pNode) {
  248. var trgNdoe = instance1.selectSingleNode(pNode);
  249. var trgNdoeList = trgNdoe.childNodes;
  250. var childNode;
  251. var allText = "";
  252. while( childNode = trgNdoeList.nextNode() ) {
  253. allText += childNode.text;
  254. }
  255. return allText;
  256. }
  257. function fOpenPopupDeptHelp(pControl, pInstance)
  258. {
  259. misfOpenPopUpList("02", pControl, "", pInstance);
  260. model.refresh();
  261. }
  262. function fdown(flag, irow){
  263. var filepath = "";
  264. var filenm = "";
  265. if(flag == "1") {
  266. filepath = model.getValue("/root/main/matrlist[" + (irow - 2) + "]/msdsfilepath");
  267. filenm = model.getValue("/root/main/matrlist[" + (irow - 2) + "]/msdsfilenm");
  268. } else if (flag == "2") {
  269. filepath = model.getValue("/root/main/matrlist[" + (irow - 2) + "]/workfilepath");
  270. filenm = model.getValue("/root/main/matrlist[" + (irow - 2) + "]/workfilenm");
  271. }
  272. //alert("filepath: " + filepath + ", filenm: " + filenm);
  273. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  274. if (localfile != "") {
  275. //2014.08.28 - fileDialog 사용하지 않고 바로 열어 보여주기 위해 수정
  276. //model.download(getActionURL("TRRWC03003")+"&filepath="+filepath, localfile);
  277. model.download(getActionURL("TRRWC03003")+"&filepath="+filepath, localfile, false);
  278. //2014.08.28 - 참고 : messageBox를 사용하지 않으면 열리는 경우도 있고, 안열리는 경우도 있음.
  279. var rtn = messageBox("파일을", "Q004");
  280. if( rtn == 6 ) {
  281. window.exec(localfile);
  282. }
  283. }
  284. }
  285. ]]>
  286. </script>
  287. <submission id="TRRSM00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrlist"/>
  288. <submission id="TRRSM00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/harmlist"/>
  289. </model>
  290. </xhtml:head>
  291. <xhtml:body guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  292. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  293. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">부서별 목록조회(MSDS 조회)</caption>
  294. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  295. </group>
  296. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  297. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  298. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  299. <caption id="caption7" class="search_name" style="left:432px; top:9px; width:76px; height:17px; ">물질코드</caption>
  300. <line id="line5" class="line_4" style="x1:1039px; y1:6px; x2:1039px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
  301. <button id="btn_search" class="btn1_letter2" navindex="5" style="left:1055px; top:7px; width:56px; height:22px; text-align:left; ">
  302. <caption>조회</caption>
  303. <script type="javascript" ev:event="DOMActivate">
  304. <![CDATA[
  305. fGetMatrList();
  306. ]]>
  307. </script>
  308. </button>
  309. <caption id="caption1" class="search_name" style="left:50px; top:9px; width:76px; height:17px; ">부서코드</caption>
  310. <output id="opt_deptnm" ref="/root/main/condition/deptnm" class="output_fix" appearance="output" style="left:228px; top:8px; width:187px; height:19px; "/>
  311. <button id="btn_deptcd" class="icon_search" navindex="2" style="left:209px; top:9px; width:16px; height:16px; ">
  312. <caption/>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. var vOrigDeptcd = ipt_deptcd.value; //popup을 열기전 부서 저장
  316. var recv_list = "deptcd,deptnm";
  317. misfOpenPopUpList("02", ipt_deptcd,"", recv_list) ;
  318. ipt_deptcd.refresh();
  319. opt_deptnm.refresh();
  320. if(vOrigDeptcd != ipt_deptcd.value) { //부서코드가 변경되었다면
  321. //조회조건 변경시 초기화 및 check
  322. //fSearchCondChanged("ipt_delivedeptcd");
  323. }
  324. ]]>
  325. </script>
  326. </button>
  327. <input id="ipt_deptcd" ref="/root/main/condition/deptcd" class="input_default" navindex="1" style="left:131px; top:8px; width:75px; height:19px; ">
  328. <script type="javascript" ev:event="xforms-value-changed">
  329. <![CDATA[
  330. //2013.02.26 박준범 : 부서코드 변경시 부서코드명을 먼저 지워준다.
  331. opt_deptnm.value = "";
  332. misfValidationCheck("02", "", "deptcd,deptnm" );
  333. ]]>
  334. </script>
  335. <script type="javascript" ev:event="onkeypress">
  336. <![CDATA[
  337. //if( event.keyCode == 13 ) {
  338. //btn_search.dispatch("DOMActivate");
  339. // --> 위의 코드를 사용하면 input에 입력된 값이 인식이 안됨. TrustForm bug 같습니다.
  340. // --> 대신, 아래 코드 사용하면 input의 값이 인식이 됨
  341. //input 에서 EnterKey 이벤트 인식시 아래 function을 사용하세요!!
  342. inputEnterKey("ipt_deptcd", "xforms-value-changed");
  343. //}
  344. ]]>
  345. </script>
  346. </input>
  347. <input id="ipt_matrcd" ref="/root/main/condition/matrcd" class="input_default" navindex="3" maxlength="12" style="left:510px; top:8px; width:45px; height:19px; ">
  348. <script type="javascript" ev:event="xforms-value-changed">
  349. <![CDATA[
  350. //조회조건 변경시 Grid 초기화
  351. //fSearchCondChanged();
  352. if(ipt_matrcd.value == ""){
  353. model.setValue("/root/main/condition/matrnm", "");
  354. opt_matrnm.refresh();
  355. }
  356. ]]>
  357. </script>
  358. </input>
  359. <button id="btn_matrcd" class="icon_search" navindex="4" style="left:559px; top:9px; width:16px; height:16px; ">
  360. <caption/>
  361. <script type="javascript" ev:event="DOMActivate">
  362. <![CDATA[
  363. //popup 에 전달할 parameter를 setting한다.
  364. //model.setValue("/root/popmatr/returntype", "2"); //matrnm도 함께 return 받고자 할때, returntype을 "2" 로 설정.
  365. model.setValue("/root/popmatr/deptcd", ipt_deptcd.value);
  366. //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
  367. model.setValue("/root/popmatr/selectyn", "");
  368. //popup 프로그램 호출
  369. window.load("SPRSM00100.xrw", "modal","", "", "/root/popmatr","/root/popdata");
  370. //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
  371. if(model.getValue("/root/popmatr/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
  372. //조회조건 변경시 Grid 초기화
  373. //fSearchCondChanged();
  374. model.setValue("/root/main/condition/matrcd", model.getValue("/root/popmatr/matrcd"));
  375. model.setValue("/root/main/condition/matrnm", model.getValue("/root/popmatr/matrnm"));
  376. ipt_matrcd.refresh();
  377. opt_matrnm.refresh();
  378. }
  379. ]]>
  380. </script>
  381. </button>
  382. <output id="opt_matrnm" ref="/root/main/condition/matrnm" class="output_fix" appearance="output" style="left:578px; top:8px; width:242px; height:19px; "/>
  383. <caption id="caption3" class="search_name" style="left:839px; top:9px; width:76px; height:17px; ">기준일자</caption>
  384. <input id="ipt_basedd" ref="/root/main/condition/basedd" class="input_default" navindex="1" inputtype="date" style="left:920px; top:8px; width:90px; height:19px; text-align:center; "/>
  385. </group>
  386. <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1193px; y2:75px; "/>
  387. <caption id="caption21" class="tit_2" style="left:5px; top:60px; width:144px; height:14px; ">부서별 화학물질 목록</caption>
  388. <datagrid id="grd_matrlist" nodeset="/root/main/matrlist" caption="선택^부서명^물질명^유해&#xA;구성성분^유해&#xA;등급^용도^신호어^경 고 표 시^경 고 표 시^경 고 표 시^경 고 표 시^경 고 표 시^경 고 표 시^경 고 표 시^경 고 표 시^경 고 표 시^물질안전&#xA;보건자료&#xA;(MSDS)^작업&#xA;공정별 &#xA;관리요령^부서코드^물질코드^gubun^useqtym^prodcmpynm^pos1^pos2^pos3^pos4^pos5^pos6^pos7^pos8^pos9^harm|선택^부서명^물질명^유해&#xA;구성성분^유해&#xA;등급^용도^신호어^인화성^흡인&#xA;유해성^급성&#xA;독성^부식성^산화성^고압&#xA;가스^폭발성^수생환경&#xA;유해성^경고^물질안전&#xA;보건자료&#xA;(MSDS)^작업&#xA;공정별 &#xA;관리요령^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14^caption15|선택^부서명^물질명^유해&#xA;구성성분^유해&#xA;등급^용도^신호어^인화성^흡인&#xA;유해성^급성&#xA;독성^부식성^산화성^고압&#xA;가스^폭발성^수생환경&#xA;유해성^경고^물질안전&#xA;보건자료&#xA;(MSDS)^작업&#xA;공정별 &#xA;관리요령^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14^caption15" colsep="^" colwidth="24, 128, 170, 103, 30, 102, 60, 46, 46, 46, 46, 46, 46, 46, 55, 46, 58, 58, 63, 60, 100, 100, 100, 61, 56, 56, 48, 39, 43, 43, 41, 42, 60" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="16" rowsep="|" navindex="6" style="left:0px; top:80px; width:1193px; height:610px; ">
  389. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  390. <col class="text_left" ref="deptnm"/>
  391. <col class="text_left" ref="matrnm" style="text-align:left; "/>
  392. <col class="text_left" ref="harmcomp" style="text-align:left; "/>
  393. <col class="text_center" ref="harmgrde"/>
  394. <col class="text_left" ref="usge"/>
  395. <col class="text_center" ref="sgnl"/>
  396. <col class="text_center" ref="warnyn1"/>
  397. <col class="text_center" ref="warnyn2"/>
  398. <col class="text_center" ref="warnyn3"/>
  399. <col class="text_center" ref="warnyn4"/>
  400. <col class="text_center" ref="warnyn5"/>
  401. <col class="text_center" ref="warnyn6"/>
  402. <col class="text_center" ref="warnyn7"/>
  403. <col class="text_center" ref="warnyn8"/>
  404. <col class="text_center" ref="warnyn9"/>
  405. <col class="text_center" ref="msdsfileyn" style="text-decoration:underline; color:#0000ff; "/>
  406. <col class="text_center" ref="workfileyn" style="text-decoration:underline; color:#0000ff; "/>
  407. <col ref="deptcd" visibility="hidden"/>
  408. <col ref="matrcd" visibility="hidden"/>
  409. <col ref="gubun" visibility="hidden"/>
  410. <col ref="useqtym" visibility="hidden"/>
  411. <col ref="prodcmpynm" visibility="hidden"/>
  412. <col ref="pos1" visibility="hidden"/>
  413. <col ref="pos2" visibility="hidden"/>
  414. <col ref="pos3" visibility="hidden"/>
  415. <col ref="pos4" visibility="hidden"/>
  416. <col ref="pos5" visibility="hidden"/>
  417. <col ref="pos6" visibility="hidden"/>
  418. <col ref="pos7" visibility="hidden"/>
  419. <col ref="pos8" visibility="hidden"/>
  420. <col ref="pos9" visibility="hidden"/>
  421. <col ref="harm" visibility="hidden"/>
  422. <script type="javascript" ev:event="onclick">
  423. <![CDATA[
  424. /*
  425. var cur_row = grd_matrlist.row;
  426. fGetMatrInfo(cur_row);
  427. */
  428. if (grd_matrlist.row < grd_matrlist.fixedRows) {
  429. if (grd_matrlist.col == grd_matrlist.colRef("chk")) {
  430. if (grd_matrlist.rows > grd_matrlist.fixedRows) {
  431. var sVal = "Y";
  432. if (grd_matrlist.valueMatrix(grd_matrlist.fixedRows, grd_matrlist.colRef("chk")) == "Y") {
  433. sVal = "N";
  434. }
  435. for(var i = 1; i <= instance1.selectNodes("/root/main/matrlist").length; i++) {
  436. grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("chk")) = sVal;
  437. }
  438. //그리드내 빈 자리를 click할 때, 본 이벤트가 먹지 않도록 강제로 col을 옮김
  439. grd_matrlist.col = grd_matrlist.colRef("matrnm");
  440. }
  441. }
  442. } else {
  443. if (grd_matrlist.col == grd_matrlist.colRef("msdsfileyn") && grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.col) == "다운") {
  444. fdown("1", grd_matrlist.row);
  445. grd_matrlist.col = 0; //강제로 위치를 옮김
  446. } else if (grd_matrlist.col == grd_matrlist.colRef("workfileyn") && grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.col) == "다운") {
  447. fdown("2", grd_matrlist.row);
  448. grd_matrlist.col = 0; //강제로 위치를 옮김
  449. }
  450. }
  451. ]]>
  452. </script>
  453. <script type="javascript" ev:event="onaftersort">
  454. <![CDATA[
  455. //grd_matrlist.gridToInstance();
  456. ]]>
  457. </script>
  458. <script type="javascript" ev:event="ondblclick">
  459. <![CDATA[
  460. if (grd_matrlist.row < grd_matrlist.fixedRows) return;
  461. if (grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.colRef("harmgrde")) == "1") {
  462. btn_gen.dispatch("DOMActivate");
  463. }
  464. ]]>
  465. </script>
  466. </datagrid>
  467. <button id="btn_excel" class="btn2_letter4" navindex="7" style="left:1129px; top:55px; width:64px; height:19px; text-align:left; ">
  468. <caption>엑셀출력</caption>
  469. <script type="javascript" ev:event="onclick">
  470. <![CDATA[
  471. //radfSaveExcel(ipt_detailist);
  472. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  473. grd_matrlist.saveExcel(fileName,"sheetname:savetype");
  474. ]]>
  475. </script>
  476. </button>
  477. <input id="ipt_updpath" ref="/root/hidden/file" visibility="hidden" style="left:970px; top:50px; width:100px; height:19px; "/>
  478. <upload id="upload1" nodeset="/root/hidden/file" style="left:950px; top:49px; width:15px; height:20px; "/>
  479. <!-- 파일 업로드와 관련하여 참고사항 : FTP 칠곡운영AP#1 에 /files/BEMR023/mis030/attach/mis/rpv/req/20140605 아래에 들어감.-->
  480. <caption id="caption2" style="left:15px; top:717px; width:570px; height:20px; ">2. 유해등급이 1등급인 화학물질을 더블클릭하면 특별관리물질 취급일지를 작성할 수 있습니다.</caption>
  481. <caption id="caption5" style="left:0px; top:700px; width:556px; height:20px; ">※ 1. 화학물질 목록 출력은 선택된 물품만을 대상으로 합니다.</caption>
  482. <datagrid id="grd_harmlist" nodeset="/root/main/harmlist" visibility="hidden" caption="caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14^caption15^caption16^caption17^caption18" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:180px; top:455px; width:580px; height:75px; ">
  483. <col ref="matrnm"/>
  484. <col ref="deptcd"/>
  485. <col ref="deptnm"/>
  486. <col ref="useqtym"/>
  487. <col ref="usge"/>
  488. <col ref="prodcmpynm"/>
  489. <col ref="pos1"/>
  490. <col ref="pos2"/>
  491. <col ref="pos3"/>
  492. <col ref="pos4"/>
  493. <col ref="pos5"/>
  494. <col ref="pos6"/>
  495. <col ref="pos7"/>
  496. <col ref="pos8"/>
  497. <col ref="pos9"/>
  498. <col ref="sgnl"/>
  499. <col ref="harm"/>
  500. <col ref="gubun"/>
  501. </datagrid>
  502. </group>
  503. <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  504. <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  505. <button id="btn_prt" class="btn4_letter9" visibility="visible" style="left:1054px; top:3px; width:140px; height:22px; ">
  506. <caption>화학물질 목록 출력</caption>
  507. <script type="javascript" ev:event="DOMActivate">
  508. <![CDATA[
  509. //조회된 자료가 없으면 먼저 조회하라고 message
  510. if(grd_matrlist.rows <= grd_matrlist.fixedRows) {
  511. messageBox("조회된 결과가 존재하지 않습니다. \n먼저 조회 후 출력하십시요.", "E999", "");
  512. return;
  513. }
  514. misfGridInit(grd_harmlist);
  515. /* 20150102 - 선택된 자료만 출력하기 위하여 comment처리후 아래에 별도 구현함
  516. submit("TRRSM00302");
  517. //창고명을 report 에 넘겨주기 위해 instance에 setting한다.
  518. //model.setValue("/root/send/search/wareflagnm", cmb_wareflag.label);
  519. */
  520. var chkcnt = 0; //grd_matrlist에서 선택되어있는 행의 갯수
  521. for(var i = 1; i <= instance1.selectNodes("/root/main/matrlist").length; i++) {
  522. if(grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("chk")) == "Y") {
  523. misfGridIUD(grd_harmlist, "A");
  524. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("matrnm")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("matrnm"));
  525. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("deptcd")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("deptcd"));
  526. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("deptnm")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("deptnm"));
  527. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("useqtym")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("useqtym"));
  528. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("usge")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("usge"));
  529. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("prodcmpynm")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("prodcmpynm"));
  530. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos1")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos1"));
  531. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos2")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos2"));
  532. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos3")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos3"));
  533. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos4")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos4"));
  534. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos5")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos5"));
  535. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos6")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos6"));
  536. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos7")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos7"));
  537. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos8")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos8"));
  538. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("pos9")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("pos9"));
  539. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("sgnl")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("sgnl"));
  540. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("harm")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("harm"));
  541. grd_harmlist.valueMatrix(grd_harmlist.row, grd_harmlist.colRef("gubun")) = grd_matrlist.valueMatrix(i+2, grd_matrlist.colRef("gubun"));
  542. chkcnt += 1;
  543. }
  544. }
  545. //조회된 자료가 없으면 먼저 조회하라고 message
  546. if(chkcnt == 0) {
  547. messageBox("선택된 자료가 없습니다. \n먼저 출력할 대상을 선택한 후 출력하십시요.", "E999", "");
  548. return;
  549. }
  550. //2016.04.11 박준범 - 칠곡은 인증평가 이전까지 "유해등급물질" 이 등급이 정해지지 않으므로 이에 따라
  551. // 출력물에 등급이 표시되지 않도록 출력물을 신규 생성(RPRSM00302) -> 향후 불필요함
  552. if(getUserInfo("dutplceinstcd") == "032") {
  553. exeReportPreview("RPRSM00302", "XMLSTR");//, "/root/main/payamt");
  554. } else {
  555. exeReportPreview("RPRSM00301", "XMLSTR");//, "/root/main/payamt");
  556. }
  557. ]]>
  558. </script>
  559. </button>
  560. <button id="btn_gen" class="btn4_letter4" style="left:971px; top:3px; width:80px; height:22px; ">
  561. <caption>취급일지</caption>
  562. <script type="javascript" ev:event="DOMActivate">
  563. <![CDATA[
  564. if (grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.colRef("harmgrde")) != "1") {
  565. //messageBox("유해등급이 1등급인 경우에만 취급일지를 작성합니다. ", "E999", "");
  566. //return;
  567. window.load("SMRSM00400.xrw", "modal","", "", "","");
  568. } else if (grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.colRef("harmgrde")) == "1") {
  569. /*
  570. if(ipt_matrcd.value.length == 0) {
  571. messageBox("화학물질이 선택되지 않았습니다. ", "I999", "");
  572. return;
  573. }
  574. else if(grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.colRef("harmgrde") != "1") {
  575. messageBox("신규 코드를 등록 중입니다." + "\n" + "저장 후에 종합관리 내역을 등록할 수 있습니다. ", "I999", "");
  576. return;
  577. }
  578. */
  579. model.setValue("/root/popdata/matrcd", model.getValue("/root/main/matrlist[" + (grd_matrlist.row - 2) + "]/matrcd"));
  580. model.setValue("/root/popdata/matrnm", model.getValue("/root/main/matrlist[" + (grd_matrlist.row - 2) + "]/matrnm"));
  581. model.setValue("/root/popdata/deptcd", model.getValue("/root/main/matrlist[" + (grd_matrlist.row - 2) + "]/deptcd"));
  582. model.setValue("/root/popdata/deptnm", model.getValue("/root/main/matrlist[" + (grd_matrlist.row - 2) + "]/deptnm"));
  583. //model.setValue("/root/popdata/fromdd" , getCurrentDate().toDate().getAddDate(-1, "M").getDateFormat("YYYYMMDD") ); //기간 설정 //getCurrentDate() //.substr(0,6)); //.toDate().getAddDate(-1, "D").getDateFormat("YYYYMMDD")
  584. //model.setValue("/root/popdata/todd" , getCurrentDate() ); //기간 설정 //.substr(0,6));
  585. //20140926 기준일자를 활용한다
  586. //model.setValue("/root/popdata/ym" , getCurrentDate().substr(0,6) ); //기간 설정 //.substr(0,6));
  587. model.setValue("/root/popdata/ym" , ipt_basedd.value.substr(0,6) ); //기간 설정 //.substr(0,6));
  588. model.setValue("/root/popdata/popflag", "Y"); //취급일지 화면에서 popup으로 호출되었는지의 여부를 확인하는 구분자
  589. window.load("SMRSM00400.xrw", "modal","", "", "/root/popdata","/root/main/condition");
  590. }
  591. ]]>
  592. </script>
  593. </button>
  594. </group>
  595. </xhtml:body>
  596. </xhtml:html>