SMMNG02301_세탁물청구관리.xrw 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <lnrqinfo>
  11. <lnrqlist>
  12. <goodcd/>
  13. <goodnm/>
  14. <goodspec/>
  15. <goodunit/>
  16. <reqcnt/>
  17. <reqid/>
  18. <outcnt/>
  19. <outid/>
  20. <stockcnt/>
  21. <remark1/>
  22. <reqdd/>
  23. <deptcd/>
  24. <ioflag/>
  25. <instcd/>
  26. <deptnm/>
  27. <reqnm/>
  28. <outnm/>
  29. </lnrqlist>
  30. <csrdeptlist/>
  31. </lnrqinfo>
  32. <cond>
  33. <reqfromdd/>
  34. <deptcd/>
  35. <instcd/>
  36. <lowdept/>
  37. <reqtodd/>
  38. </cond>
  39. <csrdeptlist/>
  40. <possmenucnt/>
  41. <possmenulist/>
  42. </main>
  43. <send>
  44. <reqfromdd/>
  45. <deptcd/>
  46. <rexport/>
  47. <grupid/>
  48. <gubuncd>01</gubuncd>
  49. <cdid/>
  50. <lowflag/>
  51. <cdgrupid>T64</cdgrupid>
  52. <lnrqflag/>
  53. <reqtodd/>
  54. <grupdeptcd/>
  55. <date/>
  56. </send>
  57. <init>
  58. <csrdeptinfo/>
  59. <grupcdinfo/>
  60. <grupdeptlist/>
  61. <timeinfo/>
  62. </init>
  63. <temp>
  64. </temp>
  65. <tmp>
  66. <prtinfo/>
  67. </tmp>
  68. </root>
  69. </instance>
  70. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  73. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  74. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  75. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  76. <script type="javascript" ev:event="xforms-ready">
  77. <![CDATA[
  78. grd_lnrqlist.fixedcellcheckbox(0,1) = true;
  79. fInitialize();
  80. ]]>
  81. </script>
  82. <submission id="TRMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/csrdeptlist"/>
  83. <submission id="TRMNG02303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/lnrqinfo"/>
  84. <submission id="TRMNG02305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/grupcdinfo"/>
  85. <submission id="TRMNG02308" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/lncal"/>
  86. <submission id="TRMNG00506" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/timedata" resultref="/root/time"/>
  87. <submission id="TXMNG02303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  88. <submission id="TRMNG00404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/deptcodelist"/>
  89. <submission id="TRMNV00001" mediatype="application/x-www-form-urlencoded" method="post"/>
  90. <submission id="TXMNG02305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/prntdata" resultref="/root/temp"/>
  91. <submission id="TRMNG02302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  92. <submission id="TRMNG00405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/grupdeptlist"/>
  93. <submission id="TXMNG02306" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send1/reqdata" resultref="/root/temp"/>
  94. <submission id="TRMNG02106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  95. <submission id="TRMNG02309" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/tmp/prtinfo"/>
  96. <submission id="TXMNG02307" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  97. </model>
  98. <script type="javascript">
  99. <![CDATA[
  100. var da = getCurrentDate();
  101. var dat = ((da.toDate("YYYYMMDD")).getAddDate(-1, "D")).getDateFormat("YYYYMMDD") ;
  102. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  103. function fInitialize()
  104. {
  105. model.setValue(opt_instcdnm.attribute("ref"), getUserInfo("dutplceinstnm")); //기관코드
  106. model.setValue(ipt_reqtodd.attribute("ref"), getCurrentDate());
  107. //model.setValue(ipt_reqfromdd.attribute("ref"), dat);
  108. model.setValue(ipt_reqfromdd.attribute("ref"), getCurrentDate());
  109. rdo_lnrqlist.value = "00";
  110. submit("TRMNG02305");
  111. fGetHardCodeInfo("/root/send/grupid", "/root/init/csrdeptinfo", "160"); // 중앙공급실 부서코드 조회
  112. var userdutplcecd = model.getValue("/root/init/csrdeptinfo/codelist[cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
  113. if (!isNull(userdutplcecd)) {
  114. model.setValue(cmb_deptcd.attribute("ref"), "");
  115. model.setValue("/root/send/cdid", "Y");
  116. btn_cmtsav.visible =true;
  117. } else {
  118. model.setValue(cmb_deptcd.attribute("ref"), getUserInfo("dutplcecd"));
  119. model.setValue("/root/send/cdid", "N");
  120. cmb_deptcd.disabled = true; //중앙공급실이 아닐 경우 부서선택 숨김
  121. btn_time.visible = false;
  122. btn_cmtsav.visible = false;
  123. }
  124. cmb_deptcd.refresh();
  125. // 화면 권한 설정
  126. fOrdChk();
  127. // 청구 가능 시간 체크
  128. // if ( model.getValue("/root/send/cdid") == "N" ) {
  129. // fTimeChk();
  130. // }
  131. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  132. model.makeValue("/root/send/reqdata/useyn", "Y");
  133. model.makeValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd"));
  134. submit("TRMNG00402");
  135. submit("TRMNG00404");
  136. addComboItem("cmb_deptcd","--전체--", "","above");
  137. submit("TRMNG02302");
  138. var getuserinstcd = model.getValue("/root/temp/useinfo/cdid");
  139. if (getuserinstcd == "Y" ) {
  140. chk_low.visible = true;
  141. } else {
  142. chk_low.visible = false;
  143. cmb_lowdept.visible = false;
  144. }
  145. submit("TRMNG00405");
  146. addComboItem("cmb_grupdept", "전체", "");
  147. if ( model.getValue("/root/send/cdid") == "N" ) {
  148. fChkInfo();
  149. }
  150. fSearch();
  151. }
  152. function fChkInfo() {
  153. model.setValue("/root/send/reqtodd", getCurrentDate());
  154. var lowdeptflag = chk_low.value;
  155. if(lowdeptflag == "Y") {
  156. model.setValue("/root/send/deptcd", model.getValue(cmb_lowdept.attribute("ref")));
  157. } else {
  158. model.setValue("/root/send/deptcd", model.getValue(cmb_deptcd.attribute("ref")));
  159. }
  160. submit("TRMNG02106");
  161. var chk = model.getValue("/root/temp/chkinfo/chkyn");
  162. var chkday = model.getValue("/root/temp/chkinfo/reqdd");
  163. submit("TRMNG02106");
  164. var date = (chkday.toDate("YYYYMMDD")).getDateFormat("YYYY년MM월DD일");
  165. if (chk == "Y") {
  166. alert(date + " 청구목록중 미수령한 목록이 있습니다. 미수령 목록이 있을시 청구를 할수 없습니다. 일반청구 및 응급청구 목록을 확인하세요.");
  167. btn_add.visible = false;
  168. btn_req.visible = false;
  169. btn_del.visible = false;
  170. } else {
  171. btn_add.visible = true;
  172. btn_req.visible = true;
  173. btn_del.visible = true;
  174. }
  175. }
  176. function fTimeChk() {
  177. var date = getCurrentDate();
  178. var time = getCurrentTime();
  179. var week = getCurrentWeek();
  180. var deptcd = getUserInfo("dutplcecd");
  181. model.setValue("/root/send/date", date);
  182. submit("TRMNG02308");
  183. var holiflag = model.getValue("/root/lncal/lncalinfo/holiflag");
  184. var supcdid = model.getValue("/root/lncal/lncalinfo/supcdid");
  185. if (supcdid == "Y") {
  186. model.makeValue("/root/send/timedata/daykind", "2");
  187. } else if ( holiflag == "Y" && week != "0") {
  188. model.makeValue("/root/send/timedata/daykind", "2");
  189. } else if ( week == "6" ) {
  190. model.makeValue("/root/send/timedata/daykind", "3");
  191. } else if (week == "0" ) {
  192. model.makeValue("/root/send/timedata/daykind", "4");
  193. } else if ( holiflag != "Y") {
  194. model.makeValue("/root/send/timedata/daykind", "1");
  195. }
  196. model.makeValue("/root/send/timedata/reqdd", date);
  197. model.makeValue("/root/send/timedata/time", time);
  198. model.makeValue("/root/send/timedata/erflag", "N");
  199. if ( chk_low.value == "Y" ) {
  200. model.makeValue("/root/send/timedata/deptcd", cmb_lowdept.value );
  201. } else {
  202. model.makeValue("/root/send/timedata/deptcd", deptcd);
  203. }
  204. submit("TRMNG00506");
  205. var timechk = model.getValue("/root/time/timeinfo/timechk");
  206. if ( timechk !="Y") {
  207. alert("청구 가능시간이 아닙니다. 청구 가능시간을 확인하십시오.");
  208. btn_add.disabled = true;
  209. btn_req.disabled = true;
  210. btn_del.disabled = true;
  211. return 6;
  212. } else {
  213. return 0;
  214. }
  215. }
  216. function fOrdChk() {
  217. var ord = model.getValue("/root/send/cdid");
  218. if( ord == "Y" ) {
  219. btn_grup.visible = false;
  220. btn_add.visible = false;
  221. btn_del.visible = false;
  222. btn_req.visible = false;
  223. btn_rec.visible = false;
  224. caption4.visible = true;
  225. cmb_grupdept.visible = true;
  226. btn_outconf.attribute("left") = 1123;
  227. btn_outpr.attribute("left") = 1080;
  228. btn_allout.attribute("left") = 1013;
  229. btn_reqcancle.attribute("left") = 923;
  230. btn_reqconf.attribute("left") = 856;
  231. } else if ( ord == "N") {
  232. btn_outconf.visible = false;
  233. btn_outpr.visible = false;
  234. btn_allout.visible = false;
  235. btn_reqcancle.visible = false;
  236. btn_reqconf.visible =false;
  237. caption4.visible = false;
  238. cmb_grupdept.visible = false;
  239. btn_req.attribute("left") = 1099;
  240. btn_del.attribute("left") = 1053;
  241. btn_add.attribute("left") = 1008;
  242. btn_grup.attribute("left") = 897;
  243. }
  244. }
  245. function fUsrSetting() {
  246. var ioflag;
  247. var userdutplcecd = model.getValue("/root/init/csrdeptinfo/codelist[cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
  248. submit("TRMNG02302");
  249. var getuserinstcd = model.getValue("/root/temp/useinfo/cdid");
  250. for(var i = 1; i < grd_lnrqlist.rows; i++) {
  251. ioflag = model.getValue("/root/main/lnrqinfo/lnrqlist[" + i + "]/ioflag");
  252. outidflag = model.getValue("/root/main/lnrqinfo/lnrqlist[" + i + "]/outid");
  253. reqidflag = model.getValue("/root/main/lnrqinfo/lnrqlist[" + i + "]/reqid");
  254. if(ioflag == "N") {
  255. grd_lnrqlist.rowStatus(i) = "1";
  256. if (!isNull(userdutplcecd) && isNull(outidflag)) {
  257. grd_lnrqlist.colType(grd_lnrqlist.colRef("reqcnt")) = 'output'; //중앙공급실에서 병동 청구수량 비활성화
  258. } else if (isNull(userdutplcecd) && isNull(outidflag)) {
  259. grd_lnrqlist.colType(grd_lnrqlist.colRef("outcnt")) = 'output'; //병동에서에서 병동 불출수량 비활성화
  260. }
  261. }
  262. if (ioflag == "O" && !isNull(userdutplcecd)) {
  263. grd_lnrqlist.colType(grd_lnrqlist.colRef("reqcnt")) = 'output'; //중앙공급실에서 병동 청구수량 비활성화
  264. if (isNull(outidflag)) {
  265. grd_lnrqlist.rowStatus(i) = "2";
  266. }
  267. } else if (ioflag == "O" && isNull(userdutplcecd)) {
  268. grd_lnrqlist.colType(grd_lnrqlist.colRef("outcnt")) = 'output'; //병동에서에서 병동 불출수량 비활성화
  269. if (isNull(reqidflag)) {
  270. grd_lnrqlist.rowStatus(i) = "2";
  271. }
  272. }
  273. }
  274. }
  275. function fSearch() {
  276. model.setValue("/root/send/reqfromdd", model.getValue(ipt_reqfromdd.attribute("ref")));
  277. model.setValue("/root/send/reqtodd", model.getValue(ipt_reqtodd.attribute("ref")));
  278. model.setValue("/root/send/deptcd", model.getValue(cmb_deptcd.attribute("ref")));
  279. model.setValue("/root/send/gubuncd", model.getValue(rdo_gubuncd.attribute("ref"))); //마스터코드구분 01:물품마스터02:창고마스터
  280. model.makeValue("/root/send/erflag", "N");
  281. submit("TRMNG02303", "false");
  282. fUsrSetting();
  283. fStyleChk();
  284. }
  285. function fStyleChk() {
  286. for ( i = grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++ ) {
  287. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "06" ) {
  288. grd_lnrqlist.cellStyle("background-color", i, grd_lnrqlist.colRef("lnrqflag")) = "#99CC00";
  289. } else {
  290. grd_lnrqlist.cellStyle("background-color", i, grd_lnrqlist.colRef("lnrqflag")) = "#FFFFFF";
  291. }
  292. }
  293. }
  294. function fPrintRex() {
  295. var fromdd = model.getValue(ipt_reqfromdd.attribute("ref"));
  296. var todd = model.getValue(ipt_reqtodd.attribute("ref"));
  297. model.removenode("/root/send/report/porqlist");
  298. model.makeNode("/root/send/report/porqlist");
  299. copyNodesetType("/root/send/report/porqlist", "/root/main/lnrqinfo/lnrqlist");
  300. var userdutplcecd = model.getValue("/root/init/csrdeptinfo/codelist[cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
  301. // 중앙공급실 유저만 출력여부 업데이트
  302. if (getUserInfo("dutplcecd") == userdutplcecd) {
  303. fSaveprnt();
  304. }
  305. // exeReportPreview("RPMNG02301", "XMLSTR", "/root/main/lnrqinfo/lnrqlist");
  306. if(cmb_grupdept.value == "") {
  307. exeReportPreview("RPMNG02301", "XMLSTR", "/root/main/lnrqinfo/lnrqlist");
  308. } else {
  309. if(todd != fromdd) {
  310. messageBox("그룹별 출력은 기간별로 출력하실 수 없습니다. ", "E");
  311. return;
  312. }
  313. model.makeNode("/root/temp/prtinfo");
  314. submit("TRMNG02309");
  315. model.makeValue("/root/tmp/flag", "정규");
  316. exeReportPreview("RPMNG02302", "XMLSTR");
  317. }
  318. fSearch();
  319. }
  320. function fSearch2() {
  321. model.setValue("/root/send/reqfromdd", model.getValue(ipt_reqfromdd.attribute("ref")));
  322. model.setValue("/root/send/reqtodd", model.getValue(ipt_reqtodd.attribute("ref")));
  323. model.setValue("/root/send/deptcd", model.getValue(cmb_lowdept.attribute("ref")));
  324. model.setValue("/root/send/gubuncd", model.getValue(rdo_gubuncd.attribute("ref"))); //마스터코드구분 01:물품마스터02:창고마스터
  325. model.makeValue("/root/send/erflag", "N");
  326. submit("TRMNG02303", "false");
  327. fUsrSetting();
  328. fStyleChk();
  329. }
  330. function fSaveprnt() {
  331. for (i=0; i< grd_lnrqlist.rows; i++) {
  332. if(grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("prntdt")) == "" || grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("prntdt")) == null ) {
  333. grd_lnrqlist.rowStatus(i) = 2;
  334. }
  335. }
  336. model.makeValue("/root/send/prntdata/porqlist", getGridUpdateData(grd_lnrqlist) );
  337. submit("TXMNG02305");
  338. }
  339. function fSettingGoodList(pnode) {
  340. var codynode = instance1.selectNodes(pnode + "/*");
  341. var addRow = grd_lnrqlist.rows - grd_lnrqlist.fixedRows;
  342. for (var j = 1; j <= codynode.length; j++)
  343. {
  344. if(addRow > grd_lnrqlist.rows - grd_lnrqlist.fixedRows)
  345. {
  346. misfGridIUD(grd_lnrqlist,"A");
  347. addRow = grd_lnrqlist.rows - grd_lnrqlist.fixedRows;
  348. }
  349. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/deptcd" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/deptcd"));
  350. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/goodcd"));
  351. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/goodcdseq" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/goodcdseq"));
  352. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/lngoodnm" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/lngoodnm"));
  353. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/goodmodel"));
  354. // model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/goodspec"));
  355. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/goodunit" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/goodunit"));
  356. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/reqnm" , getUserInfo("usernm"));
  357. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/reqid" , getUserInfo("userid"));
  358. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/lnrqflag" , "01"); // 청구구분( 01: 청구 , 02 : 불출, 03: 수령, 04:운송)
  359. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/lnsfcnt" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/lnsfcnt"));
  360. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/lnrlcnt" , model.getValue(pnode +"/" + "grd_lnrqlist" + "[" + j + "]/lnrlcnt"));
  361. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/reqdd" , ipt_reqtodd.value);
  362. model.setValue(grd_lnrqlist.nodeset + "[" + addRow + "]/erflag" , "N");
  363. addRow = addRow + 1;
  364. }
  365. grd_lnrqlist.colDisabled(grd_lnrqlist.colRef("lnrqflag")) = true;
  366. grd_lnrqlist.colDisabled(grd_lnrqlist.colRef("deptcd")) = true;
  367. model.recalculate();
  368. model.refresh();
  369. }
  370. ]]>
  371. </script>
  372. </xhtml:head>
  373. <xhtml:body guideline="1,1196;2,786;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  374. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  375. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">린넨보관실청구관리</caption>
  376. </group>
  377. <group id="grp_biz" scroll="auto" style="left:0px; top:100px; width:1195px; height:680px; ">
  378. <caption id="caption12" class="tit_2" style="left:5px; top:9px; width:134px; height:14px; font-family:돋움체; ">린넨보관실청구관리</caption>
  379. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1193px; y2:26px; font-family:돋움체; "/>
  380. <button id="btn_req" class="btn5_letter2" style="left:770px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  381. <caption>청구</caption>
  382. <script type="javascript" ev:event="DOMActivate">
  383. <![CDATA[
  384. // 청구 가능 시간 체크
  385. if ( model.getValue("/root/send/cdid") == "N" ) {
  386. var time = fTimeChk();
  387. if (time == 6 ) {
  388. return;
  389. }
  390. }
  391. var userid = getUserInfo("userid");
  392. for ( i = grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++ ) {
  393. if (grd_lnrqlist.valueMatrix( i , grd_lnrqlist.colRef("nowcnt") ) == "" ) {
  394. alert( "현재고량을 입력하십시오" );
  395. return;
  396. }
  397. if ( grd_lnrqlist.rowStatus(i) == 2 ) {
  398. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("reqid") ) = userid;
  399. }
  400. }
  401. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  402. if ( submit("TXMNG02303") ) {
  403. alert("청구 처리되었습니다.");
  404. }
  405. if ( chk_low.value == "Y") {
  406. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  407. } else {
  408. fSearch();
  409. }
  410. ]]>
  411. </script>
  412. </button>
  413. <datagrid id="grd_lnrqlist" nodeset="/root/main/lnrqinfo/lnrqlist" caption="^응급여부^구분^부서명^품목코드^상세코드^린넨품명^상세규격^단위^안전재고량^현재고량^청구요청량^청구자^불출량^불출자^운송량^운송자^수령량^수령자^실재고 수량^비고^상세설명^출력여부^출력시간" colsep="^" colwidth="50, 65, 65, 96, 86, 65, 100, 70, 67, 80, 80, 80, 75, 75, 80, 65, 70, 70, 70, 77, 125, 100, 60, 120, 34, 30, 28, 100, 100, 100, 100" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:26px; width:1190px; height:640px; font-family:돋움체; ">
  414. <col checkvalue="Y,N" ref="chkyn" type="checkbox"/>
  415. <col checkvalue="Y,N" ref="erflag" type="checkbox" visibility="hidden"/>
  416. <col disabled="true" editable="false" ref="lnrqflag" type="combo" style="text-align:center; ">
  417. <choices>
  418. <itemset nodeset="/root/init/grupcdinfo/grupcdlist">
  419. <label ref="cdnm"/>
  420. <value ref="cdid"/>
  421. </itemset>
  422. </choices>
  423. </col>
  424. <col ref="deptcd" type="combo" style="text-align:center; ">
  425. <choices>
  426. <itemset nodeset="/root/main/csrdeptlist">
  427. <label ref="deptnm"/>
  428. <value ref="deptcd"/>
  429. </itemset>
  430. </choices>
  431. </col>
  432. <col editable="false" ref="goodcd" type="inputbutton" visibility="visible" style="text-align:center; "/>
  433. <col ref="goodcdseq" visibility="visible" style="text-align:right; "/>
  434. <col ref="lngoodnm" visibility="visible" style="text-align:center; "/>
  435. <col ref="goodmodel" visibility="visible" style="text-align:center; "/>
  436. <col ref="goodunit" visibility="visible" style="text-align:center; "/>
  437. <col ref="lnsfcnt" format="#,###"/>
  438. <col ref="nowcnt" type="input" format="#,###"/>
  439. <col ref="reqcnt" format="#,###"/>
  440. <col ref="reqnm" visibility="visible"/>
  441. <col ref="outcnt" type="input" visibility="visible" format="#,###"/>
  442. <col ref="outnm" visibility="visible"/>
  443. <col ref="trscnt" format="#,###"/>
  444. <col ref="trsnm"/>
  445. <col ref="reccnt" format="#,###"/>
  446. <col ref="recnm"/>
  447. <col ref="lnrlcnt" visibility="hidden" format="#,###"/>
  448. <col ref="remark" type="input"/>
  449. <col ref="gooddesc" visibility="visibile"/>
  450. <col ref="prntyn" visibility="visible"/>
  451. <col ref="prntdt" visibility="visible" format="yyyy/mm/dd hh:nn:ss"/>
  452. <col ref="prntnm" visibility="hidden"/>
  453. <col ref="reqdd" visibility="hidden"/>
  454. <col ref="deptcd" visibility="hidden"/>
  455. <col ref="instcd" visibility="hidden"/>
  456. <col ref="reqid" visibility="hidden"/>
  457. <col ref="outid" visibility="hidden"/>
  458. <col ref="seqno" visibility="hidden"/>
  459. <col ref="outdt" visibility="hidden"/>
  460. <col ref="trsdt" visibility="hidden"/>
  461. <col ref="lnedflag" visibility="hidden"/>
  462. <script type="javascript" ev:event="xforms-value-changed">
  463. <![CDATA[
  464. var ord = model.getValue("/root/send/cdid");
  465. if ( grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("lnedflag") ) == "A" ) {
  466. alert("마감된 청구내역은 변경하실수 없습니다.");
  467. if ( chk_low.value == "Y") {
  468. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  469. } else {
  470. fSearch();
  471. }
  472. return;
  473. }
  474. else if (grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("lnedflag") ) = "B" && grd_lnrqlist.col == grd_lnrqlist.colRef("outcnt") && ord == "Y" ) {
  475. if ( grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("lnrqflag") ) > "03" ) {
  476. var btn = messageBox("불출량을 수정하시겠습니까?", "Q");
  477. if (btn == "6") {
  478. var lnrlcnt = parseInt(grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("outcnt")), 10)
  479. + parseInt(grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("nowcnt")), 10);
  480. model.makeValue("/root/send1/reqdata/lnrlcnt", lnrlcnt);
  481. model.makeValue("/root/send1/reqdata/reqdd", grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("reqdd")) );
  482. model.makeValue("/root/send1/reqdata/seqno", grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("seqno")) );
  483. model.makeValue("/root/send1/reqdata/outcnt", grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("outcnt")) );
  484. model.makeValue("/root/send1/reqdata/lnrqflag", grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("lnrqflag")) );
  485. if ( submit("TXMNG02306") ) {
  486. alert("불출량 수정되었습니다.");
  487. if ( chk_low.value == "Y") {
  488. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  489. } else {
  490. fSearch();
  491. }
  492. return;
  493. }
  494. model.removenode("/root/send1/reqdata");
  495. } else {
  496. if ( chk_low.value == "Y") {
  497. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  498. } else {
  499. fSearch();
  500. }
  501. return;
  502. }
  503. }
  504. }
  505. var lnsfcnt = grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("lnsfcnt"));
  506. var nowcnt = grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("nowcnt"));
  507. if ( grd_lnrqlist.col == grd_lnrqlist.colRef("nowcnt") ) {
  508. if (grd_lnrqlist.valueMatrix(grd_lnrqlist.row, grd_lnrqlist.colRef("lnrqflag") ) != "01" ) {
  509. alert("청구 상태가 아니면 현재고량을 수정하실수 없습니다.");
  510. if ( chk_low.value == "Y") {
  511. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  512. } else {
  513. fSearch();
  514. }
  515. return;
  516. }
  517. lnsfcnt = parseInt(lnsfcnt);
  518. if(nowcnt == "") {
  519. nowcnt = 0;
  520. }
  521. nowcnt = parseInt(nowcnt);
  522. if(nowcnt > lnsfcnt) {
  523. messageBox("현재고량은 안전재고량보다 크게 입력할 수 없습니다.", "E");
  524. grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("nowcnt") ) = "";
  525. grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("reqcnt") ) = "";
  526. return;
  527. }
  528. if ( nowcnt != "") {
  529. if ( nowcnt == lnsfcnt ) {
  530. alert("현재고량이 안전재고량과 동일합니다. 청구요청량이 0 입니다.");
  531. grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("nowcnt") ) = "";
  532. grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("reqcnt") ) = "";
  533. } else {
  534. grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("reqcnt")) = lnsfcnt - nowcnt;
  535. }
  536. }
  537. if(nowcnt == 0) {
  538. grd_lnrqlist.valueMatrix( grd_lnrqlist.row, grd_lnrqlist.colRef("reqcnt")) = lnsfcnt - nowcnt;
  539. }
  540. }
  541. ]]>
  542. </script>
  543. <script type="javascript" ev:event="onkeypress">
  544. <![CDATA[
  545. var row = grd_lnrqlist.row;
  546. if(event.keyCode == 13) { // Enter 쳤을 경우 아래 수량으로
  547. if(grd_lnrqlist.col == grd_lnrqlist.colRef("reqcnt") || grd_lnrqlist.col == grd_lnrqlist.colRef("outcnt")) { //불출수량이나 미불출수량 엔터시
  548. if(grd_lnrqlist.row + 1 < grd_lnrqlist.rows) {
  549. grd_lnrqlist.row = row + 1;
  550. }
  551. }
  552. }
  553. ]]>
  554. </script>
  555. <script type="javascript" ev:event="onbuttonclick">
  556. <![CDATA[
  557. if ( model.getValue("/root/temp/reqflag") == "S") {
  558. model.removeNodeset(gvParamPath + "/SPMNG02301_/SPMNG02301_value");
  559. if(grd_lnrqlist.col == grd_lnrqlist.colRef("goodcd") ) {
  560. model.removeNodeset("/root/copynode");
  561. model.makeNode("/root/copynode");
  562. model.refresh();
  563. if ( chk_low.value == "Y") {
  564. setParameter("deptcd", cmb_lowdept.value);
  565. } else {
  566. setParameter("deptcd", cmb_deptcd.value);
  567. }
  568. rszfOpenPopUpListByWndName(grd_lnrqlist,"","goodcd,goodcdseq,goodnm,goodmodel,goodspec,goodunit,lnsfcnt,lnrlcnt,deptcd","SPMNG02301","","", "Y");
  569. var CSV = model.getValue(gvParamPath +"/SPMNG02301_/SPMNG02301_value");
  570. setCSVToNode("/root/copynode", CSV, "grd_lnrqlist");
  571. fSettingGoodList("/root/copynode");
  572. }
  573. } else if ( model.getValue("/root/temp/reqflag") == "G") {
  574. model.removeNodeset(gvParamPath + "/SPMNG02302_/SPMNG02302_value");
  575. if(grd_lnrqlist.col == grd_lnrqlist.colRef("goodcd") ) {
  576. model.removeNodeset("/root/copynode");
  577. model.makeNode("/root/copynode");
  578. model.refresh();
  579. if ( chk_low.value == "Y") {
  580. setParameter("deptcd", cmb_lowdept.value);
  581. } else {
  582. setParameter("deptcd", cmb_deptcd.value);
  583. }
  584. rszfOpenPopUpListByWndName(grd_lnrqlist,"","goodcd,goodcdseq,goodnm,goodmodel,goodspec,goodunit,lnsfcnt,lnrlcnt,deptcd","SPMNG02302","","", "Y");
  585. var CSV = model.getValue(gvParamPath +"/SPMNG02302_/SPMNG02302_value");
  586. setCSVToNode("/root/copynode", CSV, "grd_lnrqlist");
  587. fSettingGoodList("/root/copynode");
  588. }
  589. }
  590. ]]>
  591. </script>
  592. <script type="javascript" ev:event="onaftersort">
  593. <![CDATA[
  594. grd_lnrqlist.gridToInstance();
  595. ]]>
  596. </script>
  597. </datagrid>
  598. <select1 id="rdo_gubuncd" ref="/root/send/gubuncd" disabled="true" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:220px; top:5px; width:165px; height:15px; font-family:돋움체; border-style:none; ">
  599. <choices>
  600. <item>
  601. <label>물품마스터</label>
  602. <value>01</value>
  603. </item>
  604. <item>
  605. <label>창고마스터</label>
  606. <value>02</value>
  607. </item>
  608. </choices>
  609. </select1>
  610. <button id="btn_add" class="btn2_letter2" style="left:680px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  611. <caption>추가</caption>
  612. <script type="javascript" ev:event="DOMActivate">
  613. <![CDATA[
  614. // 청구 가능 시간 체크
  615. // if ( model.getValue("/root/send/cdid") == "N" ) {
  616. // var time = fTimeChk();
  617. // if (time == 6 ) {
  618. // return;
  619. // }
  620. // }
  621. model.makeValue("/root/temp/reqflag", "S");
  622. grd_lnrqlist.addRow();
  623. ]]>
  624. </script>
  625. </button>
  626. <button id="btn_del" class="btn5_letter2" style="left:725px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  627. <caption>삭제</caption>
  628. <script type="javascript" ev:event="DOMActivate">
  629. <![CDATA[
  630. // 청구 가능 시간 체크
  631. if ( model.getValue("/root/send/cdid") == "N" ) {
  632. var time = fTimeChk();
  633. if (time == 6 ) {
  634. return;
  635. }
  636. }
  637. var cnt = 0;
  638. var dnt = 0;
  639. var inscnt = 0;
  640. var rows = grd_lnrqlist.rows;
  641. for ( i=grd_lnrqlist.fixedRows; i <= rows; i++ ) {
  642. var j = i - dnt;
  643. if ( grd_lnrqlist.valueMatrix( j , grd_lnrqlist.colRef("chkyn") ) == "Y" && grd_lnrqlist.valueMatrix(j, grd_lnrqlist.colRef("lnrqflag")) == "01" && grd_lnrqlist.rowStatus(j) != 3) {
  644. grd_lnrqlist.rowStatus(j) = 4;
  645. cnt++;
  646. } else if ( grd_lnrqlist.valueMatrix( j , grd_lnrqlist.colRef("chkyn") ) == "Y" && grd_lnrqlist.valueMatrix(j, grd_lnrqlist.colRef("lnrqflag")) == "01" && grd_lnrqlist.rowStatus(j) == 3) {
  647. grd_lnrqlist.deleteRow(j);
  648. dnt++;
  649. } else if ( grd_lnrqlist.valueMatrix( j , grd_lnrqlist.colRef("chkyn") ) != "Y" && grd_lnrqlist.valueMatrix(j, grd_lnrqlist.colRef("lnrqflag")) == "01" && grd_lnrqlist.rowStatus(j) == 1 ) {
  650. alert(1);
  651. inscnt ++;
  652. }
  653. }
  654. if ( dnt < 1 && cnt < 1) {
  655. alert("선택된 삭제목록이 없습니다.");
  656. return;
  657. }
  658. if ( inscnt > 0 ) {
  659. var btn = messageBox("신규 청구내역이 있습니다. 청구하시겠습니까?", "Q");
  660. if (btn == "6") {
  661. for ( i = grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++ ) {
  662. if (grd_lnrqlist.valueMatrix( i , grd_lnrqlist.colRef("nowcnt") ) == "" ) {
  663. alert( "현재고량을 입력하십시오" );
  664. return;
  665. }
  666. if ( grd_lnrqlist.rowStatus(i) == 2 ) {
  667. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("reqid") ) = userid;
  668. }
  669. }
  670. } else {
  671. if ( chk_low.value == "Y") {
  672. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  673. } else {
  674. fSearch();
  675. }
  676. return;
  677. }
  678. }
  679. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  680. if ( submit("TXMNG02303") ) {
  681. alert(cnt + "건이 삭제 처리되었습니다");
  682. }
  683. if ( chk_low.value == "Y") {
  684. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  685. } else {
  686. fSearch();
  687. }
  688. ]]>
  689. </script>
  690. </button>
  691. <button id="btn_outpr" class="btn5_letter2" style="left:1034px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  692. <caption>불출</caption>
  693. <script type="javascript" ev:event="DOMActivate">
  694. <![CDATA[
  695. var cnt = 0;
  696. for ( i=grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++) {
  697. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("chkyn")) == "Y" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "02" &&
  698. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("outcnt")) == "0") {
  699. alert("선택한 청구확인 목록중 불출량이 입력되지 않은 목록이 있습니다.");
  700. return;
  701. }
  702. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("chkyn")) == "Y" &&
  703. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "02" &&
  704. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("outcnt")) != "0" ) {
  705. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "03"
  706. grd_lnrqlist.rowStatus(i) = 2;
  707. cnt ++;
  708. }
  709. }
  710. if (cnt < 1) {
  711. alert("선택된 청구확인목록이 없습니다.");
  712. return;
  713. }
  714. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  715. if ( submit("TXMNG02303") ) {
  716. alert(cnt + "건이 불출 처리되었습니다.");
  717. }
  718. if ( chk_low.value == "Y") {
  719. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  720. } else {
  721. fSearch();
  722. }
  723. ]]>
  724. </script>
  725. </button>
  726. <button id="btn_rec" class="btn5_letter2" style="left:1145px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  727. <caption>수령</caption>
  728. <script type="javascript" ev:event="DOMActivate">
  729. <![CDATA[
  730. var cnt = 0;
  731. for ( i=grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++) {
  732. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("chkyn")) == "Y" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "05" ) {
  733. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "06"
  734. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("reccnt")) = grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("trscnt"))
  735. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrlcnt")) = parseInt(grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("trscnt")), 10) + parseInt(grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("nowcnt")), 10);
  736. grd_lnrqlist.rowStatus(i) = 2;
  737. cnt++;
  738. }
  739. }
  740. if (cnt < 1 ) {
  741. alert("선택된 운송목록이 없습니다.");
  742. return;
  743. }
  744. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  745. if ( submit("TXMNG02303") ) {
  746. alert(cnt + "건이 수령 처리되었습니다.");
  747. }
  748. if ( chk_low.value == "Y") {
  749. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  750. } else {
  751. fSearch();
  752. }
  753. ]]>
  754. </script>
  755. </button>
  756. <button id="btn_allout" class="btn5_letter4" style="left:968px; top:3px; width:64px; height:19px; font-family:돋움체; ">
  757. <caption>일괄불출</caption>
  758. <script type="javascript" ev:event="DOMActivate">
  759. <![CDATA[
  760. var cnt = 0;
  761. for ( i=grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++) {
  762. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "02" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("outcnt")) == "0" ) {
  763. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("outcnt")) = grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("reqcnt"));
  764. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "03"
  765. grd_lnrqlist.rowStatus(i) = 2;
  766. cnt++;
  767. } else if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "02" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("outcnt")) != "0") {
  768. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "03"
  769. grd_lnrqlist.rowStatus(i) = 2;
  770. cnt++;
  771. }
  772. }
  773. if (cnt< 1) {
  774. alert("선택된 청구확인목록이 없습니다.");
  775. return;
  776. }
  777. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  778. if ( submit("TXMNG02303") ) {
  779. alert(cnt + "건이 일괄불출 처리되었습니다.");
  780. }
  781. if ( chk_low.value == "Y") {
  782. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  783. } else {
  784. fSearch();
  785. }
  786. ]]>
  787. </script>
  788. </button>
  789. <button id="btn_reqconf" class="btn5_letter4" style="left:814px; top:3px; width:64px; height:19px; font-family:돋움체; ">
  790. <caption>청구확인</caption>
  791. <script type="javascript" ev:event="DOMActivate">
  792. <![CDATA[
  793. var cnt = 0; // 선택한 청구목록 count
  794. for (i = grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++) {
  795. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("chkyn")) == "Y" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "01" ) {
  796. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "02";
  797. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrlcnt")) = grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("nowcnt"));
  798. grd_lnrqlist.rowStatus(i) = 2;
  799. cnt++; // 선택한 횟수 계산
  800. }
  801. }
  802. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  803. if ( cnt < 1 ) { // 선택한 청구목록이 없으면
  804. alert("선택된 청구목록이 없습니다.");
  805. return;
  806. }
  807. if ( submit("TXMNG02303")) {
  808. alert(cnt + "건이 청구확인 처리되었습니다.");
  809. }
  810. if ( chk_low.value == "Y") {
  811. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  812. } else {
  813. fSearch();
  814. }
  815. ]]>
  816. </script>
  817. </button>
  818. <button id="btn_outconf" class="btn5_letter4" style="left:1078px; top:3px; width:64px; height:19px; font-family:돋움체; ">
  819. <caption>불출확인</caption>
  820. <script type="javascript" ev:event="DOMActivate">
  821. <![CDATA[
  822. var cnt = 0;
  823. for ( i=grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++) {
  824. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("chkyn")) == "Y" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "03" ) {
  825. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "04"
  826. grd_lnrqlist.rowStatus(i) = 2;
  827. cnt++;
  828. }
  829. }
  830. if (cnt < 1) {
  831. alert("선택된 불출목록이 없습니다.");
  832. return;
  833. }
  834. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  835. if ( submit("TXMNG02303") ) {
  836. alert(cnt + "건이 불출확인 처리되었습니다.");
  837. }
  838. if ( chk_low.value == "Y") {
  839. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  840. } else {
  841. fSearch();
  842. }
  843. ]]>
  844. </script>
  845. </button>
  846. <button id="btn_grup" class="btn2_letter4" visibility="hidden" style="left:614px; top:3px; width:64px; height:19px; font-family:돋움체; ">
  847. <caption>그룹청구</caption>
  848. <script type="javascript" ev:event="DOMActivate">
  849. <![CDATA[
  850. model.makeValue("/root/temp/reqflag", "G");
  851. grd_lnrqlist.addRow();
  852. ]]>
  853. </script>
  854. </button>
  855. <button id="btn_reqcancle" class="btn5_letter6" style="left:880px; top:3px; width:86px; height:19px; font-family:맑은 고딕; ">
  856. <caption>청구확인취소</caption>
  857. <script type="javascript" ev:event="DOMActivate">
  858. <![CDATA[
  859. var cnt = 0; // 선택한 청구확인목록 count
  860. for (i = grd_lnrqlist.fixedRows; i < grd_lnrqlist.rows; i++) {
  861. if ( grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("chkyn")) == "Y" && grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) == "02" ) {
  862. grd_lnrqlist.valueMatrix(i, grd_lnrqlist.colRef("lnrqflag")) = "01";
  863. grd_lnrqlist.rowStatus(i) = 2;
  864. cnt++; // 선택한 청구확인목록 횟수
  865. }
  866. }
  867. model.makeValue("/root/send/savedata/lnrqlist", getGridUpdateData(grd_lnrqlist) );
  868. if ( cnt < 1 ) { // 선택한 청구확인목록이 없으면
  869. alert("선택된 청구확인목록이 없습니다.");
  870. return;
  871. }
  872. if (submit("TXMNG02303") ) {
  873. alert(cnt + "건이 청구확인취소 처리되었습니다");
  874. }
  875. if ( chk_low.value == "Y") {
  876. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  877. } else {
  878. fSearch();
  879. }
  880. ]]>
  881. </script>
  882. </button>
  883. <button id="btn_time" class="btn3_letter6" style="left:160px; top:1px; width:104px; height:22px; font-family:돋움체; ">
  884. <caption>청구시간관리</caption>
  885. <script type="javascript" ev:event="DOMActivate">
  886. <![CDATA[
  887. modal("SMMNG00501");
  888. ]]>
  889. </script>
  890. </button>
  891. <output id="output1" ref="/root/time/timeinfo/endtm" format="hh:nn:ss" style="left:485px; top:3px; width:55px; height:19px; font-family:돋움체; font-weight:bold; color:#0000ff; "/>
  892. <output id="output2" ref="/root/time/timeinfo/starttm" format="hh:nn:ss" style="left:420px; top:3px; width:55px; height:19px; font-family:돋움체; font-weight:bold; color:#0000ff; "/>
  893. <caption id="caption5" class="hand" style="left:300px; top:5px; width:130px; height:15px; font-family:돋움체; ">청구 가능시간 :</caption>
  894. <caption id="caption7" style="left:472px; top:4px; width:20px; height:20px; font-family:돋움체; ">~</caption>
  895. <output id="output3" ref="/root/send/date" visibility="hidden" style="left:560px; top:2px; width:45px; height:19px; font-family:돋움체; "/>
  896. <button id="btn_cmtsav" class="btn5_letter4" visibility="hidden" style="left:788px; top:3px; width:64px; height:19px; ">
  897. <caption>비고저장</caption>
  898. <script type="javascript" ev:event="DOMActivate">
  899. <![CDATA[
  900. var updtdata = getGridUpdateData(grd_lnrqlist);
  901. if(updtdata == "" || updtdata == null) {
  902. messageBox("수정할 내역이 없습니다.");
  903. }
  904. model.makeValue("/root/send/savedata/reqlist", updtdata);
  905. submit("TXMNG02307");
  906. btn_search.dispatch("DOMActivate");
  907. ]]>
  908. </script>
  909. </button>
  910. </group>
  911. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1195px; height:70px; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  912. <select1 id="cmb_lowdept" ref="/root/main/cond/lowdept" appearance="minimal" style="left:690px; top:30px; width:100px; height:19px; ">
  913. <choices>
  914. <itemset nodeset="/root/main/deptcodelist">
  915. <label ref="deptnm"/>
  916. <value ref="deptcd"/>
  917. </itemset>
  918. </choices>
  919. <script type="javascript" ev:event="xforms-value-changed">
  920. <![CDATA[
  921. if ( model.getValue("/root/send/cdid") == "Y" ) {
  922. fTimeChk();
  923. }
  924. btn_search.dispatch("DOMActivate");
  925. ]]>
  926. </script>
  927. </select1>
  928. <caption id="caption2" class="search_name" style="left:620px; top:30px; width:78px; height:17px; ">부서명:</caption>
  929. <caption id="cap_csrreqdeptcd" class="search_name" style="left:260px; top:30px; width:68px; height:17px; ">청구일:</caption>
  930. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:1018px; top:46px; width:56px; height:22px; ">
  931. <caption>조회</caption>
  932. <script type="javascript" ev:event="DOMActivate">
  933. <![CDATA[
  934. if ( chk_low.value == "Y") {
  935. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  936. } else {
  937. fSearch();
  938. }
  939. if (model.getValue("/root/send/cdid") == "N") {
  940. fChkInfo();
  941. }
  942. ]]>
  943. </script>
  944. </button>
  945. <input id="ipt_reqfromdd" ref="/root/main/cond/reqfromdd" class="input_default" inputtype="date" maxlength="6" format="yyyy-mm-dd" style="left:330px; top:30px; width:90px; height:19px; ">
  946. <script type="javascript" ev:event="xforms-value-changed">
  947. <![CDATA[
  948. fSearch();
  949. ]]>
  950. </script>
  951. </input>
  952. <line id="line2" class="line_4" style="x1:1012px; y1:25px; x2:1012px; y2:85px; "/>
  953. <caption id="cap_instcd" class="search_name" style="left:10px; top:30px; width:86px; height:17px; ">기관코드 :</caption>
  954. <output id="opt_instcdnm" ref="/root/main/cond/instcd" class="output_fix" style="left:100px; top:30px; width:150px; height:19px; text-align:center; "/>
  955. <button id="button3" class="btn1_letter2" style="left:1076px; top:46px; width:56px; height:22px; ">
  956. <caption>엑셀</caption>
  957. <script type="javascript" ev:event="DOMActivate">
  958. <![CDATA[
  959. var fileName = window.fileDialog("save", ",", false, "린넨보관실청구내역", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  960. if (fileName != "")
  961. {
  962. grd_lnrqlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  963. }
  964. ]]>
  965. </script>
  966. </button>
  967. <button id="btn_prt" class="btn1_letter2" style="left:1134px; top:46px; width:56px; height:22px; ">
  968. <caption>출력</caption>
  969. <script type="javascript" ev:event="DOMActivate">
  970. <![CDATA[
  971. fPrintRex();
  972. ]]>
  973. </script>
  974. </button>
  975. <select id="chk_low" ref="/root/send/lowflag" overflow="visible" appearance="full" style="left:910px; top:30px; width:75px; height:20px; border-style:none; ">
  976. <choices>
  977. <item>
  978. <label>하위부서</label>
  979. <value>Y</value>
  980. </item>
  981. </choices>
  982. <script type="javascript" ev:event="xforms-value-changed">
  983. <![CDATA[
  984. var ord = model.getValue("/root/send/cdid");
  985. if ( chk_low.value == "Y" ) {
  986. cmb_deptcd.visible = false;
  987. cmb_lowdept.visible = true;
  988. if( ord == "Y" ) {
  989. btn_grup.visible = false;
  990. btn_add.visible = true;
  991. btn_del.visible = true;
  992. btn_req.visible = true;
  993. btn_rec.visible = true;
  994. btn_outconf.visible = false;
  995. btn_outpr.visible = false;
  996. btn_allout.visible = false;
  997. btn_reqcancle.visible = false;
  998. btn_reqconf.visible =false;
  999. btn_req.attribute("left") = 1099;
  1000. btn_del.attribute("left") = 1053;
  1001. btn_add.attribute("left") = 1008;
  1002. btn_grup.attribute("left") = 897;
  1003. }
  1004. if ( cmb_lowdept.value != null && cmb_lowdept.value != "") {
  1005. fSearch2();
  1006. }
  1007. } else {
  1008. cmb_deptcd.visible = true;
  1009. cmb_lowdept.visible = false;
  1010. if ( ord == "Y" ) {
  1011. btn_grup.visible = false;
  1012. btn_add.visible = false;
  1013. btn_del.visible = false;
  1014. btn_req.visible = false;
  1015. btn_rec.visible = false;
  1016. btn_outconf.visible = true;
  1017. btn_outpr.visible = true;
  1018. btn_allout.visible = true;
  1019. btn_reqcancle.visible = true;
  1020. btn_reqconf.visible =true;
  1021. btn_outconf.attribute("left") = 1123;
  1022. btn_outpr.attribute("left") = 1080;
  1023. btn_allout.attribute("left") = 1013;
  1024. btn_reqcancle.attribute("left") = 923;
  1025. btn_reqconf.attribute("left") = 856;
  1026. }
  1027. fSearch();
  1028. }
  1029. ]]>
  1030. </script>
  1031. </select>
  1032. <select1 id="cmb_deptcd" ref="/root/main/cond/deptcd" disabled="false" appearance="minimal" style="left:690px; top:30px; width:100px; height:19px; ">
  1033. <choices>
  1034. <itemset nodeset="/root/main/csrdeptlist">
  1035. <label ref="deptnm"/>
  1036. <value ref="deptcd"/>
  1037. </itemset>
  1038. </choices>
  1039. <script type="javascript" ev:event="xforms-value-changed">
  1040. <![CDATA[
  1041. btn_search.dispatch("DOMActivate");
  1042. ]]>
  1043. </script>
  1044. </select1>
  1045. <caption id="caption1" class="search_name" style="left:10px; top:60px; width:83px; height:17px; ">구 분 :</caption>
  1046. <select1 id="rdo_lnrqlist" ref="/root/send/lnrqflag" appearance="full" cols="8" overflow="visible" style="left:95px; top:60px; width:380px; height:20px; border-style:none; ">
  1047. <choices>
  1048. <itemset nodeset="/root/init/grupcdinfo/grupcdlist">
  1049. <label ref="cdnm"/>
  1050. <value ref="cdid"/>
  1051. </itemset>
  1052. </choices>
  1053. <script type="javascript" ev:event="xforms-value-changed">
  1054. <![CDATA[
  1055. if ( chk_low.value == "Y") {
  1056. fSearch2(); // 하위부서 check시 조회는 하위부서로.
  1057. } else {
  1058. fSearch();
  1059. }
  1060. ]]>
  1061. </script>
  1062. </select1>
  1063. <caption id="caption3" style="left:420px; top:30px; width:15px; height:20px; ">~</caption>
  1064. <input id="ipt_reqtodd" ref="/root/main/cond/reqtodd" class="input_default" inputtype="date" maxlength="6" format="yyyy-mm-dd" style="left:430px; top:30px; width:90px; height:19px; ">
  1065. <script type="javascript" ev:event="xforms-value-changed">
  1066. <![CDATA[
  1067. fSearch();
  1068. ]]>
  1069. </script>
  1070. </input>
  1071. <caption id="caption4" class="search_name" style="left:620px; top:60px; width:88px; height:17px; ">그룹명:</caption>
  1072. <select1 id="cmb_grupdept" ref="/root/send/grupdeptcd" appearance="minimal" style="left:690px; top:60px; width:100px; height:19px; ">
  1073. <choices>
  1074. <itemset nodeset="/root/init/grupdeptlist">
  1075. <label ref="grupdeptnm"/>
  1076. <value ref="grupdeptcd"/>
  1077. </itemset>
  1078. </choices>
  1079. <script type="javascript" ev:event="xforms-value-changed">
  1080. <![CDATA[
  1081. btn_search.dispatch("DOMActivate");
  1082. ]]>
  1083. </script>
  1084. </select1>
  1085. <button id="button1" class="btn1_letter7" navindex="2" style="left:1018px; top:24px; width:128px; height:22px; ">
  1086. <caption>청구관리(응급)</caption>
  1087. <script type="javascript" ev:event="DOMActivate">
  1088. <![CDATA[
  1089. open("SMMNG02302");
  1090. ]]>
  1091. </script>
  1092. </button>
  1093. </xhtml:body>
  1094. </xhtml:html>