SMPIC90000_행위재료관리.xrw 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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>행위재료마스터화면</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <act>
  11. <actlist/>
  12. </act>
  13. <actmas>
  14. <actmaslist/>
  15. </actmas>
  16. <actmatrinfo>
  17. <actmatrlist/>
  18. </actmatrinfo>
  19. <actmatrhistinfo>
  20. <actmatrhistlist/>
  21. </actmatrhistinfo>
  22. <actmatrcdinfo>
  23. <actmatrcdcomnlist/>
  24. <actmatrcddetllist/>
  25. <historylist/>
  26. </actmatrcdinfo>
  27. </main>
  28. <send>
  29. <actmatrlist>
  30. <instcd/>
  31. <actcd/>
  32. <actnm/>
  33. <actdeptcd/>
  34. <actdeptnm/>
  35. <actprcpdrid/>
  36. <actprcpdrnm/>
  37. <stodd/>
  38. <todd/>
  39. <fromdd/>
  40. <efromdd/>
  41. <deptflag/>
  42. <hngnm/>
  43. <engnm/>
  44. <goodcd/>
  45. <goodnm/>
  46. <goodflag/>
  47. <allsizespecid/>
  48. </actmatrlist>
  49. <actmatrhistlist/>
  50. <goodcdlist/>
  51. <reslist>
  52. <actcd/>
  53. <actdeptnm/>
  54. <actdeptcd/>
  55. <actprcpdrid/>
  56. <actprcpdrnm/>
  57. <hngnm/>
  58. <fromdd/>
  59. <todd/>
  60. <fstrgstrid/>
  61. <fstrgstdt/>
  62. <lastupdtrid/>
  63. <lastupdtdt/>
  64. </reslist>
  65. <srchlist/>
  66. </send>
  67. <init/>
  68. <temp>
  69. <insert/>
  70. <update/>
  71. <delete/>
  72. <end/>
  73. </temp>
  74. <save>
  75. <actmasterlist/>
  76. <appdd/>
  77. </save>
  78. <hidden>
  79. <actmas>
  80. <actmaslist/>
  81. <actsublist/>
  82. <templist/>
  83. </actmas>
  84. </hidden>
  85. </root>
  86. </instance>
  87. <script type="javascript" ev:event="xforms-ready">
  88. <![CDATA[
  89. //화면 Control을 초기화한다
  90. fInitialize();
  91. ]]>
  92. </script>
  93. <submission id="TXPIC90003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save/actmasterlist" resultref="/root/temp/insert"/>
  94. <submission id="TRPIC90007" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodcdlist" resultref="/root/main/"/>
  95. <submission id="TXPIC90004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save" resultref="/root/temp/update"/>
  96. <submission id="TRPIC90008" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/actmatrlist" resultref="/root/main/actmatrinfo"/>
  97. <submission id="TRPIC90009" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/actmatrhistlist" resultref="/root/main/actmatrhistinfo"/>
  98. <submission id="TXPIC90011" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save/actmasterlist" resultref="/root/temp/end"/>
  99. <submission id="TRPIC90013" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchlist" resultref="/root/hidden/actmas"/>
  100. <submission id="TXPIC90014" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save/actmasterlist" resultref="/root/temp/delete"/>
  101. <submission id="TRPIC90015" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/resData" resultref="/root/hidden/actmas"/>
  102. <submission id="TXPIC90016" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save/actmasterlist" resultref="/root/temp/dsave"/>
  103. <submission id="TRPIC90017" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchlist" resultref="/root/hidden/actmas"/>
  104. </model>
  105. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  106. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  107. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  108. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  109. <script type="javascript" src="../../../pam/actmatrweb/js/SMPIC90000.js"/>
  110. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  111. <script type="javascript">
  112. <![CDATA[
  113. // var actflag = null;
  114. var Gfocus = "";
  115. function fInitialize()
  116. {
  117. model.removeNodeset("/root/main/actmatrinfo/actmatrlist");
  118. model.removeNodeset("/root/main/actmatrhistinfo/actmatrhistlist");
  119. model.removeNodeset("/root/hidden/rscdgood/rscdgoodlist");
  120. model.removeNodeset("/root/main/actmatrcdinfo/actmatrcdcomnlist");
  121. model.removeNodeset("/root/main/actmatrcdinfo/actmatrcddetllist");
  122. model.removeNodeset("/root/main/actmatrcdinfo/historylist");
  123. model.setValue(ipt_actcd.attribute("ref") , "");
  124. model.setValue(ipt_actdeptcd.attribute("ref") , "");
  125. model.setValue(ipt_actdeptnm.attribute("ref") , "");
  126. model.setValue(ipt_actnm.attribute("ref") , "");
  127. model.makeValue("/root/send/actmatrlist/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
  128. btn_ShrtAx.selected = true;
  129. btn_goodinsert.disabled = true;
  130. //btn_histsave.disabled = true;
  131. btn_rowdel.disabled = true;
  132. btn_save.disabled = true;
  133. btn_tmpsave.disabled = true;
  134. btn_del.disabled = true;
  135. btn_actend.disabled = true;
  136. model.refresh();
  137. }
  138. function fsetting()
  139. {
  140. var flag = "Y", rowno = "";
  141. if(opt_actcd.value !=""){
  142. for(i=grd_gresult.fixedRows; i < grd_gresult.rows;i++){
  143. if(grd_gresult.valueMatrix(i,grd_gresult.colRef("select")) == "Y"){
  144. for(var j=grd_actmaster.fixedRows; j < grd_actmaster.rows;j++){
  145. var srcgoodcd = grd_gresult.valueMatrix(i,grd_gresult.colRef( "goodcd"));
  146. var goodcd = grd_actmaster.valueMatrix(j,grd_actmaster.colRef("goodcd"));
  147. var srcallsizespecid = grd_gresult.valueMatrix( i,grd_gresult.colRef( "allsizespecid"));
  148. var allsizespecid = grd_actmaster.valueMatrix(j,grd_actmaster.colRef("allsizespecid"));
  149. if (srcgoodcd == goodcd && srcallsizespecid == allsizespecid){
  150. flag = "N";
  151. rowno = rowno + "," + i; // 이미 존재하는 코드 check
  152. }
  153. }
  154. if (flag == "Y"){
  155. var pgoodcd = grd_gresult.valueMatrix(i,grd_gresult.colRef("goodcd"));
  156. var pallsizeid = grd_gresult.valueMatrix(i,grd_gresult.colRef("allsizespecid"));
  157. var pgoodnm = grd_gresult.valueMatrix(i,grd_gresult.colRef("goodnm"));
  158. var pgoodmodel = grd_gresult.valueMatrix(i,grd_gresult.colRef("goodmodel"));
  159. var pgoodspec = grd_gresult.valueMatrix(i,grd_gresult.colRef("goodspec"));
  160. var pmaincustlastsuplplce = grd_gresult.valueMatrix(i,grd_gresult.colRef("maincustlastsuplplce"));
  161. var pmaincustlastsuplplcenm = grd_gresult.valueMatrix(i,grd_gresult.colRef("maincustlastsuplplcenm"));
  162. var psuppcustcd = grd_gresult.valueMatrix(i,grd_gresult.colRef("suppcustcd"));
  163. var psuppcustnm = grd_gresult.valueMatrix(i,grd_gresult.colRef("suppcustnm"));
  164. var pedicd = grd_gresult.valueMatrix(i,grd_gresult.colRef("edicd"));
  165. var pdeliveunit = grd_gresult.valueMatrix(i,grd_gresult.colRef("deliveunit"));
  166. var pgoodunitcost = grd_gresult.valueMatrix(i,grd_gresult.colRef("goodunitcost"));
  167. var pdrugqty = grd_gresult.valueMatrix(i,grd_gresult.colRef("drugqty"));
  168. var pactcd = model.getValue(opt_actcd.attribute("ref"));
  169. var pinstcd = getUserInfo("dutplceinstcd"); //기관 설정
  170. var pactprcpdrid = model.getValue(opt_actprcpdrid.attribute("ref"));
  171. var pactdeptcd = model.getValue(opt_actdeptcd.attribute("ref"));
  172. var ptodd = model.getValue(opt_todd.attribute("ref"));
  173. var pfromdd = model.getValue(opt_fromdd.attribute("ref"));
  174. //부서구분 추가
  175. var pdeptflag = model.getValue(opt_deptflag.attribute("ref"));
  176. grd_actmaster.addRow(false);
  177. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("rowstat")) = "1";
  178. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("goodcd")) = pgoodcd;
  179. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("allsizespecid")) = pallsizeid;
  180. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("goodnm")) = pgoodnm;
  181. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("goodmodel")) = pgoodmodel;
  182. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("goodspec")) = pgoodspec;
  183. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("maincustlastsuplplce")) = pmaincustlastsuplplce;
  184. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("maincustlastsuplplcenm")) = pmaincustlastsuplplcenm;
  185. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("suppcustcd")) = psuppcustcd;
  186. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("suppcustnm")) = psuppcustnm;
  187. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("edicd")) = pedicd;
  188. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("deliveunit")) = pdeliveunit;
  189. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("goodunitcost")) = pgoodunitcost;
  190. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("actcd")) = pactcd;
  191. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("instcd")) = pinstcd;
  192. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("actprcpdrid")) = pactprcpdrid;
  193. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("actdeptcd")) = pactdeptcd;
  194. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("todd")) = ptodd;
  195. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("fromdd")) = pfromdd;
  196. //부서구분 추가
  197. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("deptflag")) = pdeptflag;
  198. grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("qty")) = pdrugqty;
  199. var status = grd_actmaster.valueMatrix(grd_actmaster.row, grd_actmaster.colRef("m")); //상태설정
  200. /* if(actflag == 1){
  201. grd_actmaster.rowStatus(grd_actmaster.row) = 1;
  202. }else{
  203. grd_actmaster.rowStatus(grd_actmaster.row) = 0;
  204. }*/
  205. }
  206. grd_gresult.valueMatrix(i,grd_gresult.colRef("select")) = "N";
  207. flag = "Y";
  208. }
  209. }
  210. if (rowno != ""){
  211. messageBox("물품조회 "+rowno.substr(1, rowno.length-1)+"번째에 동일 물품이 존재합니다.", "I");
  212. }
  213. }else{
  214. messageBox("행위처방코드와 물품코드는","I003");
  215. }
  216. grd_actmaster.refresh();
  217. }
  218. function fmatch()
  219. {
  220. var actcd = getParameter("calcscorcd"); //parameter값으로 설정
  221. var userid = getParameter("actprcpdrid");
  222. var usernm = getParameter("actprcpdrnm");
  223. var deptcd = getParameter("actdeptcd");
  224. var deptnm = getParameter("actdeptnm");
  225. var fromdd = getParameter("fromdd");
  226. var todd = getParameter("todd");
  227. model.setValue("/root/send/reslist/actcd" , actcd ); //값 셋팅해주는 역할
  228. model.setValue("/root/send/reslist/actdeptcd" , deptcd );
  229. model.setValue("/root/send/reslist/actdeptnm" , deptnm );
  230. model.setValue("/root/send/reslist/actprcpdrid" , userid );
  231. model.setValue("/root/send/reslist/actprcpdrnm" , usernm );
  232. model.setValue("/root/send/reslist/fromdd" , fromdd );
  233. model.setValue("/root/send/reslist/todd" , todd );
  234. opt_actcd.refresh();
  235. opt_actdeptnm.refresh();
  236. opt_actdeptcd.refresh();
  237. opt_actprcpdrid.refresh();
  238. opt_actprcpdrnm.refresh();
  239. opt_fromdd.refresh();
  240. opt_todd.refresh();
  241. }
  242. function fset(){
  243. var userid = getParameter("actprcpdrid");
  244. var usernm = getParameter("actprcpdrnm");
  245. var deptcd = getParameter("actdeptcd");
  246. var deptnm = getParameter("actdeptnm");
  247. model.setValue("/root/send/actmatrlist/actdeptcd",deptcd ); //값 셋팅해주는 역할
  248. model.setValue("/root/send/actmatrlist/actdeptnm",deptnm );
  249. model.setValue("/root/send/actmatrlist/actprcpdrid",userid );
  250. model.setValue("/root/send/actmatrlist/actprcpdrnm",usernm );
  251. ipt_actdeptcd.refresh();
  252. ipt_actdeptnm.refresh();
  253. ipt_actprcpdrid.refresh();
  254. ipt_actprcpdrnm.refresh();
  255. }
  256. function fSave(msg, stat){
  257. var updtdata = "", rowno = "";
  258. for(i=0;i<grd_actmaster.rows;i++){
  259. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("instcd" )) = model.getValue(ipt_instcd.attribute("ref"));
  260. // grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actdeptcd" )) = model.getValue(opt_actdeptcd.attribute("ref"));
  261. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actcd" )) = model.getValue(opt_actcd.attribute("ref"));
  262. // grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actprcpdrid")) = model.getValue(opt_actprcpdrid.attribute("ref"));
  263. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("fromdd" )) = model.getValue(opt_fromdd.attribute("ref"));
  264. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("todd" )) = model.getValue(opt_todd.attribute("ref"));
  265. // grd_actmaster.valueMatrix(i, grd_actmaster.colRef("deptflag" )) = model.getValue(opt_deptflag.attribute("ref"));
  266. if(grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actdeptcd")) == null || grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actdeptcd")) == ""){
  267. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actdeptcd")) = "-"; // 시행부서 입력
  268. }
  269. if(grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actprcpdrid")) == null || grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actprcpdrid")) == ""){
  270. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("actprcpdrid")) = "00000"; // 행위처방의사
  271. }
  272. if(grd_actmaster.valueMatrix(i, grd_actmaster.colRef("deptflag")) == null || grd_actmaster.valueMatrix(i, grd_actmaster.colRef("deptflag")) == ""){
  273. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("deptflag")) = "-"; // 부서구분코드
  274. }
  275. /* if (stat == "T"){
  276. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("tmpflag" )) = "Y";
  277. }else{
  278. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("tmpflag" )) = "N";
  279. } */
  280. if(grd_actmaster.valueMatrix(i,grd_actmaster.colRef("qty")) == "" || grd_actmaster.valueMatrix(i,grd_actmaster.colRef("qty")) == 0){
  281. rowno += "," + i;
  282. }
  283. }
  284. if (rowno != ""){
  285. messageBox(rowno.substr(1, rowno.length-1)+"번째건의 수량이 입력되지 ", "I011");
  286. return false;
  287. }
  288. if (msg == "저장") {
  289. updtdata = getGridUpdateData(grd_actmaster);
  290. if(updtdata == ""){
  291. messageBox(msg+"할 데이타가 ","E014");
  292. return false;
  293. }
  294. model.setValue("/root/save/actmasterlist", updtdata);
  295. } else {
  296. // updtdata = getGridUpdateData(grd_actmaster);
  297. // if(updtdata == ""){
  298. // messageBox(msg+"할 데이타가 ","E014");
  299. // return false;
  300. // }
  301. //
  302. // model.copyNode("/root/save/actmasterlist", updtdata);
  303. copyNodesetType("/root/save/actmasterlist" , "/root/main/actmatrcdinfo/actmatrcddetllist","replace");
  304. }
  305. }
  306. function fViewToggle(pCls) {
  307. var focus = "";
  308. if (pCls == 0) {
  309. focus = grd_actnmview.row;
  310. model.setFocus("grd_actnmview");
  311. grd_actnmview.row = focus;
  312. //grd_actnmview.dispatch("onclick");
  313. fSrchGood(grd_actnmview);
  314. } else {
  315. focus = grd_acthisview.row;
  316. model.setFocus("grd_acthisview");
  317. grd_acthisview.row = focus;
  318. //grd_acthisview.dispatch("onclick");
  319. fSrchGood(grd_acthisview);
  320. }
  321. }
  322. function fSrchCondInfo() {
  323. model.setValue(ipt_actcd.attribute("ref") , model.getValue(opt_actcd.attribute("ref") ));
  324. // model.setValue(ipt_actdeptcd.attribute("ref") , model.getValue(opt_actdeptcd.attribute("ref") ));
  325. // model.setValue(ipt_actdeptnm.attribute("ref") , model.getValue(opt_actdeptnm.attribute("ref") ));
  326. // model.setValue(ipt_actprcpdrid.attribute("ref") , model.getValue(opt_actprcpdrid.attribute("ref")));
  327. // model.setValue(ipt_actprcpdrnm.attribute("ref") , model.getValue(opt_actprcpdrnm.attribute("ref")));
  328. model.refresh();
  329. btn_actsearch.dispatch("DOMActivate");
  330. }
  331. function fSrchGood(pGrid) {
  332. var savestatcd = "";
  333. var tmpflag="", todd="",deptflag="";
  334. grd_actmaster.clearStatus();
  335. if (pGrid.rows - pGrid.fixedRows <= 0) return;
  336. model.copyNode("/root/send/goodcdlist", pGrid.nodeset + "[" + pGrid.row + "]");
  337. model.removeNode("/root/main/actmatrcdinfo");
  338. // model.makeNode("/root/main/actmatrcdinfo");
  339. //misfGridInit
  340. if(submit("TRPIC90007")) {
  341. todd = model.getValue("/root/send/goodcdlist/todd");
  342. if(todd != '99991231' ){
  343. grd_actmaster.colDisabled(grd_actmaster.colRef("qty")) = true;
  344. //fDisableCheck(true);
  345. }else{
  346. grd_actmaster.colDisabled(grd_actmaster.colRef("qty")) = false;
  347. //fDisableCheck(false);
  348. }
  349. model.makeNode("/root/main/actmatrcdinfo/actmatrcdcomnlist");
  350. model.copyNode("/root/main/actmatrcdinfo/actmatrcdcomnlist", pGrid.nodeset + "[" + pGrid.row + "]");
  351. //tmpflag = grd_actnmview.valueMatrix(grd_actnmview.row, grd_actnmview.colRef("tmpflag")).getTrim();
  352. //todd = grd_actnmview.valueMatrix(grd_actnmview.row, grd_actnmview.colRef("todd")).getTrim();
  353. //deptflag = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("deptflag")).getTrim();
  354. if(todd != '99991231' ){
  355. btn_del.disabled = true; // 삭제 비활성화
  356. btn_actend.disabled = true; // 행위종료 비활성화
  357. btn_goodinsert.disabled = true; // 물품추가 비활성화
  358. btn_rowdel.disabled = true; // 물품삭제 비활성화
  359. btn_save.disabled = true; // 저장 비활성화
  360. }else{
  361. btn_del.disabled = false; // 삭제 활성화
  362. btn_actend.disabled = false; // 행위종료 활성화
  363. btn_goodinsert.disabled = false; // 물품추가 활성화
  364. btn_rowdel.disabled = false; // 물품삭제 활성화
  365. btn_save.disabled = false; // 저장 비활성화
  366. }
  367. //부서구분 추가
  368. deptflag = pGrid.valueMatrix(pGrid.row,pGrid.colRef("deptflag")).getTrim();
  369. if (deptflag =="1") {
  370. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/deptflagnm", "구매");
  371. } else if (deptflag =="2") {
  372. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/deptflagnm", "약국");
  373. } else {
  374. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/deptflagnm", "-");
  375. }
  376. // 그룹수가 내 싱글수가 조회화면 전달용
  377. model.setValue("/root/subsend/rscdgoodlist/actcd", model.getValue("/root/send/goodcdlist/actcd"));
  378. model.setValue("/root/subsend/rscdgoodlist/basedd", model.getValue("/root/send/goodcdlist/fromdd"));
  379. }
  380. /*
  381. if (tmpflag == "Y"){
  382. model.makeValue(opt_savestatcd.attribute("ref"), "T");
  383. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatnm", "임시저장");
  384. }else if (tmpflag == "N"){
  385. model.makeValue(opt_savestatcd.attribute("ref"), "S");
  386. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatnm", "저장");
  387. if(todd == '99991231' ){
  388. model.makeValue(opt_savestatcd.attribute("ref"), "S");
  389. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatnm", "저장");
  390. }else{
  391. model.makeValue(opt_savestatcd.attribute("ref"), "H");
  392. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatnm", "이력저장");
  393. }
  394. }else{
  395. if (grd_acthisview.rows - grd_acthisview.fixedRows != 0){
  396. model.makeValue(opt_savestatcd.attribute("ref"), "H");
  397. model.makeValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatnm", "이력저장");
  398. }
  399. }
  400. savestatcd = model.getValue(opt_savestatcd.attribute("ref"));
  401. if (savestatcd == "T"){ // 저장상태가 임시저장일 경우
  402. btn_tmpsave.disabled = false; // 임시저장 활성화
  403. btn_save.disabled = false; // 저장 활성화
  404. btn_histsave.disabled = true; // 이력저장 비활성화
  405. btn_rowdel.disabled = false; // 행삭제 활성화
  406. btn_goodinsert.disabled = false; // 행추가 활성화
  407. }else if (savestatcd == "S"){ // 저장상태가 저장일 경우{
  408. btn_tmpsave.disabled = true; // 임시저장 비활성화
  409. btn_save.disabled = false; // 저장 활성화
  410. btn_histsave.disabled = false; // 이력저장 활성화
  411. btn_rowdel.disabled = false; // 행삭제 활성화
  412. btn_goodinsert.disabled = false; // 행추가 활성화
  413. }else{
  414. btn_tmpsave.disabled = true; // 임시저장 비활성화
  415. btn_save.disabled = true; // 저장 비활성화
  416. btn_histsave.disabled = true; // 이력저장 비활성화
  417. btn_rowdel.disabled = true; // 행삭제 비활성화
  418. btn_goodinsert.disabled = true; // 행추가 비활성화
  419. }
  420. for(i=grd_actmaster.fixedRows;i<grd_actmaster.rows;i++){
  421. grd_actmaster.valueMatrix(i, grd_actmaster.colRef("tmpflag")) = savestatcd;
  422. }
  423. */
  424. model.refresh();
  425. // fActcdSearch(model.getValue(opt_actcd.attribute("ref")),
  426. // model.getValue(opt_hngnm.attribute("ref")));
  427. }
  428. function fSelectChoiDel(pGrid)
  429. {
  430. if (pGrid.rows - pGrid.fixedRows == 0){
  431. messageBox("처리할 데이타가 존재하지 ","I011");
  432. return;
  433. }
  434. if (pGrid.selectedRows > 0) {
  435. for ( var i=pGrid.selectedRows-1 ; i >= 0 ; i--){
  436. if (pGrid.valueMatrix(i, pGrid.colRef("rowstat")) == "1"){
  437. pGrid.deleteitem(pGrid.selectedRow(i));
  438. } else {
  439. pGrid.rowStatus(pGrid.selectedRow(i)) = "4";
  440. }
  441. }
  442. }
  443. pGrid.refresh();
  444. }
  445. ]]>
  446. </script>
  447. </xhtml:head>
  448. <xhtml:body style="text-align:center; ">
  449. <output id="opt_deptflagnm" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/deptflagnm" visibility="hidden" appearance="output" style="left:757px; top:145px; width:13px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  450. <caption id="caption18" class="cell_1" visibility="hidden" style="left:710px; top:145px; width:45px; height:19px; text-align:center; ">부서</caption>
  451. <button id="btn_actend" class="btn2_letter4" navindex="17" visibility="hidden" selected="true" style="left:987px; top:145px; width:64px; height:19px; ">
  452. <caption>행위종료</caption>
  453. <script type="javascript" ev:event="DOMActivate">
  454. <![CDATA[
  455. if (grd_actnmview.rows - grd_actnmview.fixedRows == 0){
  456. messageBox("처리할 데이타가 존재하지 ","I011");
  457. return;
  458. }
  459. var toddvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("todd"));
  460. var instvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("instcd"));
  461. var actvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("actcd"));
  462. var deptvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("actdeptcd"));
  463. var dridvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("actprcpdrid"));
  464. var drnmvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("actprcpdrnm"));
  465. var fromvalue = grd_actnmview.valueMatrix(grd_actnmview.row, grd_actnmview.colRef("fromdd"));
  466. var tmpflag = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("tmpflag"));
  467. // model.makeValue("/root/send/srchlist/instcd",instvalue);
  468. // model.makeValue("/root/send/srchlist/actcd",actvalue);
  469. // model.makeValue("/root/send/srchlist/todd",toddvalue);
  470. // model.makeValue("/root/send/srchlist/actdeptcd",deptvalue);
  471. // model.makeValue("/root/send/srchlist/actprcpdrid",dridvalue);
  472. // model.makeValue("/root/send/srchlist/actprcpdrnm",drnmvalue);
  473. // model.makeValue("/root/send/srchlist/fromdd",fromvalue);
  474. if(tmpflag == "Y"){
  475. messageBox("임시저장한 행위코드는 종료를 ","E001");
  476. return;
  477. }else{
  478. var frddvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("fromdd"));
  479. if(frddvalue == getCurrentDate()){
  480. messageBox("당일 등록한 행위코드는 종료를","E001");
  481. }else{
  482. var retMes = messageBox("처방집계시 행위재료코드와 참조할수 있는 물품마스터 코드가 종료됩니다.","Q009");
  483. // var retMes = messageBox("행위코드와 관련 데이터 사용이 불가합니다.행위코드 종료를","Q009");
  484. if ( retMes != 6) {
  485. return;
  486. }else{
  487. grd_actnmview.addStatus(grd_actnmview.row,"update");
  488. }
  489. model.setValue("/root/save/actmasterlist", grd_actnmview.getUpdateData());
  490. Gfocus = grd_actnmview.row;
  491. if (submit("TXPIC90011")){
  492. messageBox("행위 종료","I001");
  493. }else{
  494. messageBox("행위 종료","E009");
  495. }
  496. btn_actsearch.dispatch("DOMActivate");
  497. model.setFocus("grd_actnmview");
  498. grd_actnmview.row = Gfocus;
  499. //grd_actnmview.dispatch("onclick");
  500. fSrchGood(grd_actnmview);
  501. model.refresh();
  502. }
  503. }
  504. ]]>
  505. </script>
  506. </button>
  507. <button id="btn_del" class="btn2_letter2" navindex="15" visibility="hidden" style="left:1054px; top:145px; width:42px; height:19px; ">
  508. <caption>삭제</caption>
  509. <script type="javascript" ev:event="DOMActivate">
  510. <![CDATA[
  511. var retMes = "", tmpflag = grd_actnmview.valueMatrix(grd_actnmview.row, grd_actnmview.colRef("tmpflag"));
  512. if (grd_actnmview.rows - grd_actnmview.fixedRows == 0){
  513. messageBox("처리할 데이타가 존재하지 ","I011");
  514. return;
  515. }
  516. if (tmpflag == "N"){
  517. retMes = messageBox("처방집계시 행위재료코드와 참조할수 있는 물품마스터 코드가 삭제됩니다.","Q001");
  518. }else{
  519. retMes = messageBox("임시 저장된 행위코드를 ","Q001");
  520. }
  521. if ( retMes != 6) {
  522. return;
  523. }else{
  524. grd_actnmview.addStatus(grd_actnmview.row,"delete");
  525. }
  526. model.setValue("/root/save/actmasterlist", grd_actnmview.getUpdateData());
  527. if (submit("TXPIC90011")){
  528. messageBox("삭제","I001");
  529. }else{
  530. messageBox("삭제","E009");
  531. }
  532. // model.removeNodeset("/root/main/actmatrinfo/actmatrlist");
  533. model.removeNodeset("/root/main/actmatrcdinfo/actmatrcdcomnlist");
  534. model.removeNodeset("/root/main/actmatrcdinfo/actmatrcddetllist");
  535. btn_actsearch.dispatch("DOMActivate");
  536. //grd_actnmview.dispatch("ondblclick");
  537. fSrchGood(grd_actnmview);
  538. model.refresh();
  539. ]]>
  540. </script>
  541. </button>
  542. <line id="line5" class="line_3" style="x1:100px; y1:192px; x2:1175px; y2:192px; "/>
  543. <line id="line3" class="line_1" style="x1:100px; y1:168px; x2:1175px; y2:167px; "/>
  544. <button id="btn_tmpsave" class="btn3_letter4" disabled="true" navindex="8" visibility="hidden" style="left:765px; top:471px; width:80px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  545. <caption>임시저장</caption>
  546. <script type="javascript" ev:event="DOMActivate">
  547. <![CDATA[
  548. if(opt_actcd.value == ""){
  549. messageBox("등록 후에 저장","I008");
  550. return;
  551. }
  552. if (fSave("임시 저장", "T") == false) return;
  553. if (submit("TXPIC90016")){
  554. messageBox("임시 저장이","I002");
  555. fSrchCondInfo();
  556. }else{
  557. messageBox("임시 저장","E009");
  558. return;
  559. }
  560. ]]>
  561. </script>
  562. </button>
  563. <button id="btn_init" class="btn3_letter3" navindex="14" style="left:1105px; top:471px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  564. <caption>초기화</caption>
  565. <script type="javascript" ev:event="DOMActivate">
  566. <![CDATA[
  567. fInitialize();
  568. ]]>
  569. </script>
  570. </button>
  571. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:140px; height:14px; ">행위재료/약품 관리</caption>
  572. <line id="line16" class="line_1" style="x1:100px; y1:217px; x2:1175px; y2:216px; "/>
  573. <caption id="caption21" class="tit_2" style="left:0px; top:149px; width:177px; height:13px; ">행위재료/약품 리스트</caption>
  574. <import id="import1" src="SMPIC90200_물품조회(행위재료).xrw" style="left:5px; top:505px; width:1172px; height:270px; "/>
  575. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:5px; top:20px; width:520px; height:120px; "/>
  576. <caption id="caption2" class="search_name" style="left:18px; top:40px; width:112px; height:17px; ">행위처방코드 :</caption>
  577. <caption id="caption3" class="search_name" visibility="hidden" style="left:430px; top:25px; width:87px; height:17px; ">시행부서 :</caption>
  578. <input id="ipt_actcd" ref="/root/send/actmatrlist/actcd" class="input_search" navindex="1" imemode="alpha" _chartype="upper" style="left:140px; top:39px; width:125px; height:19px; text-align:left; ">
  579. <script type="javascript" ev:event="onkeyup">
  580. <![CDATA[
  581. if(event.keyCode == "13" ){
  582. setInputNodeCurText();
  583. ipt_actcd.refresh();
  584. btn_actsearch.dispatch("DOMActivate");
  585. }
  586. ]]>
  587. </script>
  588. <script type="javascript" ev:event="xforms-value-changed">
  589. <![CDATA[
  590. model.removeNodeset("/root/main/actmatrinfo/actmatrlist");
  591. model.removeNodeset("/root/hidden/rscdgood/rscdgoodlist");
  592. model.removeNodeset("/root/main/actmatrinfo/actmatrhistlist");
  593. ]]>
  594. </script>
  595. </input>
  596. <input id="ipt_actdeptcd" ref="/root/send/actmatrlist/actdeptcd" class="input_essential" navindex="11" visibility="hidden" style="left:455px; top:40px; width:17px; height:19px; ">
  597. <script type="javascript" ev:event="onkeyup">
  598. <![CDATA[
  599. if(event.keyCode == "13" && ipt_actcd.value =="") {
  600. messageBox("행위코드와 시행부서는","I003");
  601. return;
  602. }
  603. if(event.keyCode == "13") {
  604. setInputNodeCurText();
  605. ipt_actdeptcd.refresh();
  606. btn_actsearch.dispatch("DOMActivate");
  607. }
  608. ]]>
  609. </script>
  610. <script type="javascript" ev:event="xforms-value-changed">
  611. <![CDATA[
  612. if(ipt_actdeptcd.value != ""){
  613. fSmCodeValidationCheck("02", "", "actdeptcd,actdeptnm" );
  614. model.setFocus("btn_actsearch");
  615. }else{
  616. ipt_actdeptnm.value = "";
  617. }
  618. model.refresh();
  619. ]]>
  620. </script>
  621. </input>
  622. <input id="ipt_actdeptnm" ref="/root/send/actmatrlist/actdeptnm" visibility="hidden" style="left:494px; top:40px; width:22px; height:19px; ">
  623. <script type="javascript" ev:event="xforms-value-changed">
  624. <![CDATA[
  625. if(ipt_actdeptnm.value != ""){
  626. fSmValidationCheck("TRPIC90404", "reqcustomlist", "instcd,usndeptch,actdeptnm",
  627. model.getValue(ipt_instcd.attribute("ref")) +",," + model.getValue(ipt_actdeptnm.attribute("ref"))
  628. ,"","actdeptcd,actdeptnm" ,ipt_actdeptcd,"SMPIC90400","instcd","ipt_instcd");
  629. }/*else{
  630. ipt_actdeptcd.value = "";
  631. }*/
  632. model.refresh();
  633. ]]>
  634. </script>
  635. </input>
  636. <button id="btn_actcd" class="icon_search" style="left:270px; top:39px; width:16px; height:16px; ">
  637. <caption/>
  638. <script type="javascript" ev:event="DOMActivate">
  639. <![CDATA[
  640. modal("SMPIC90600");
  641. fSmSet();
  642. ]]>
  643. </script>
  644. </button>
  645. <button id="btn_actdeptcd" class="icon_search" visibility="hidden" style="left:475px; top:40px; width:16px; height:16px; ">
  646. <caption/>
  647. <script type="javascript" ev:event="DOMActivate">
  648. <![CDATA[
  649. modal("SMPIC90400");
  650. fset();
  651. // opener.javascript.setParameter("vflag","Y");
  652. ]]>
  653. </script>
  654. </button>
  655. <line id="line1" class="line_4" style="x1:450px; y1:30px; x2:450px; y2:133px; "/>
  656. <button id="btn_actsearch" class="btn1_letter2" navindex="5" style="left:460px; top:69px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  657. <caption>조회</caption>
  658. <script type="javascript" ev:event="DOMActivate">
  659. <![CDATA[
  660. if(submit("TRPIC90008")){
  661. grd_actnmview.rebuildStyle();
  662. for(var i=1;i<grd_actnmview.rows;i++){
  663. var todd = grd_actnmview.valueMatrix(i,grd_actnmview.colRef("todd"));
  664. if(todd != '99991231' ){
  665. grd_actnmview.rowStyle(i,"data","background-color") = "#FFFF66";
  666. }
  667. }
  668. fViewToggle(0);
  669. //grd_actnmview.row = 1;
  670. //fSrchGood(grd_actnmview);
  671. //model.refresh();
  672. }
  673. ]]>
  674. </script>
  675. </button>
  676. <button id="btn_ShrtAx" class="btn_sw" group="tab" selected="true" style="left:996px; top:0px; width:90px; height:22px; ">
  677. <caption>단축조회</caption>
  678. <toggle case="case1" ev:event="onclick"/>
  679. <!--onclick 이벤트시 발생-->
  680. <script type="javascript" ev:event="DOMActivate">
  681. <![CDATA[
  682. fViewToggle(0);
  683. ]]>
  684. </script>
  685. </button>
  686. <button id="btn_hist" class="btn_sw" group="tab" style="left:1085px; top:0px; width:90px; height:22px; ">
  687. <caption>이력조회</caption>
  688. <toggle case="case2" ev:event="onclick"/>
  689. <script type="javascript" ev:event="DOMActivate">
  690. <![CDATA[
  691. model.copyNode("/root/send/actmatrhistlist", grd_actnmview.nodeset + "[" + grd_actnmview.row + "]");
  692. submit("TRPIC90009");
  693. if (grd_acthisview.rows - grd_acthisview.fixedRows == 0){
  694. btn_goodinsert.disabled = true;
  695. //btn_histsave.disabled = true;
  696. btn_rowdel.disabled = true;
  697. btn_save.disabled = true;
  698. btn_tmpsave.disabled = true;
  699. btn_del.disabled = true;
  700. btn_actend.disabled = true;
  701. }
  702. btn_actend.disabled = true;
  703. fViewToggle(1);
  704. ]]>
  705. </script>
  706. </button>
  707. <button id="btn_save" class="btn4_letter2" disabled="true" navindex="13" style="left:986px; top:471px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  708. <caption>저장</caption>
  709. <script type="javascript" ev:event="DOMActivate">
  710. <![CDATA[
  711. var savestatcd = "";
  712. savestatcd = model.getValue(opt_savestatcd.attribute("ref"));
  713. if(opt_actcd.value == ""){
  714. messageBox("등록 후에 저장","I008");
  715. return;
  716. }
  717. if (savestatcd == "T"){ // 임시저장 -> 저장
  718. if(grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("tmpflag")) == "Y"){
  719. var retMes = messageBox("처방집계시 참조됩니다. 적용 하시겠습니까?", "Q999");
  720. if ( retMes != 6) return;
  721. }
  722. for(i=grd_actmaster.fixedRows;i<grd_actmaster.rows;i++){
  723. if (grd_actmaster.rowStatus(i) == 0){
  724. grd_actmaster.rowStatus(i) = 2;
  725. }
  726. }
  727. }
  728. if (fSave("저장", "S") == false) return;
  729. if (submit("TXPIC90016")){
  730. messageBox("저장이","I002");
  731. fSrchCondInfo();
  732. }else{
  733. messageBox("저장","E009");
  734. return;
  735. }
  736. ]]>
  737. </script>
  738. </button>
  739. <caption id="caption7" class="cell_1" style="left:100px; top:172px; width:85px; height:19px; text-align:center; ">행위처방코드</caption>
  740. <output id="opt_actcd" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/actcd" appearance="output" style="left:188px; top:172px; width:108px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  741. <caption id="caption8" class="cell_1" visibility="hidden" style="left:334px; top:146px; width:60px; height:19px; text-align:center; ">시행부서</caption>
  742. <output id="opt_actdeptnm" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/actdeptnm" visibility="hidden" appearance="output" style="left:398px; top:146px; width:20px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  743. <caption id="caption9" class="cell_1" visibility="hidden" style="left:422px; top:146px; width:45px; height:19px; text-align:center; ">의사ID</caption>
  744. <output id="opt_actprcpdrid" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/actprcpdrid" visibility="hidden" appearance="output" style="left:471px; top:146px; width:20px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  745. <caption id="caption10" class="cell_1" visibility="hidden" style="left:495px; top:146px; width:45px; height:19px; text-align:center; ">의사명</caption>
  746. <output id="opt_actprcpdrnm" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/actprcpdrnm" visibility="hidden" appearance="output" style="left:544px; top:146px; width:20px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  747. <caption id="caption11" class="cell_1" style="left:100px; top:195px; width:85px; height:19px; text-align:center; ">적용일자</caption>
  748. <caption id="caption12" class="cell_1" style="left:302px; top:195px; width:85px; height:19px; text-align:center; ">종료일자</caption>
  749. <output id="opt_fromdd" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/fromdd" format="yyyy-mm-dd" inputtype="date" appearance="output" style="left:188px; top:195px; width:108px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  750. <output id="opt_todd" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/todd" format="yyyy-mm-dd" inputtype="date" appearance="output" style="left:390px; top:195px; width:108px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  751. <datagrid id="grd_actmaster" nodeset="/root/main/actmatrcdinfo/actmatrcddetllist" caption="상태^기관코드^행위코드^의사id^부서코드^todd^fromdd^부서구분^물품코드^물품코드^물품명^규격^단가^수량^모델^EDICD^수불단위^주거래처명^보조거래처명^임시저장상태" colsep="^" colwidth="18, 43, 29, 47, 40, 36, 37, 37, 87, 23, 194, 119, 70, 45, 114, 88, 69, 120, 120, 28" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" navindex="7" style="left:100px; top:220px; width:1075px; height:245px; ">
  752. <col ref="rowstat" visibility="hidden"/>
  753. <col ref="instcd" visibility="hidden"/>
  754. <col ref="actcd" visibility="hidden"/>
  755. <col ref="actprcpdrid" visibility="hidden"/>
  756. <col ref="actdeptcd" visibility="hidden"/>
  757. <col ref="todd" visibility="hidden"/>
  758. <col ref="fromdd" visibility="hidden"/>
  759. <col ref="deptflag" visibility="hidden"/>
  760. <col ref="goodcd" style="text-align:left; padding-left:5; "/>
  761. <col ref="allsizespecid" style="text-align:center; "/>
  762. <col ref="goodnm" style="text-align:left; padding-left:5; "/>
  763. <col ref="goodspec" style="text-align:left; padding-left:5; "/>
  764. <col ref="goodunitcost" format="#,###" style="text-align:right; padding-right:5; "/>
  765. <col ref="qty" type="input" format="#,###.##" style="text-align:right; padding-right:5; "/>
  766. <col ref="goodmodel" style="text-align:left; padding-left:5; "/>
  767. <col ref="edicd" style="text-align:center; "/>
  768. <col ref="deliveunit" style="text-align:center; "/>
  769. <col ref="maincustlastsuplplcenm" style="text-align:left; padding-left:5; "/>
  770. <col ref="suppcustnm" style="text-align:left; padding-left:5; "/>
  771. <col ref="tmpflag" visibility="hidden" style="text-align:center; "/>
  772. <script type="javascript" ev:event="ondblclick">
  773. <![CDATA[
  774. ]]>
  775. </script>
  776. </datagrid>
  777. <button id="btn_rgst" class="btn4_letter2" navindex="12" style="left:1046px; top:471px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  778. <caption>등록</caption>
  779. <script type="javascript" ev:event="DOMActivate">
  780. <![CDATA[
  781. var retMes = messageBox("새로", "Q014");
  782. if ( retMes != 6) return;
  783. modal("SMPIC90100");
  784. if(getParameter("calcscorcd") == ""){
  785. return;
  786. }else{
  787. btn_tmpsave.disabled = false; // 임시저장 활성화
  788. btn_save.disabled = false; // 저장 활성화
  789. //btn_histsave.disabled = true; // 이력저장 비활성화
  790. btn_rowdel.disabled = false; // 행삭제 활성화
  791. btn_goodinsert.disabled = false; // 행추가 활성화
  792. fActcdSearch(getParameter("calcscorcd"),
  793. getParameter("hngnm"));
  794. }
  795. model.removeNodeset("/root/main/actmatrcdinfo");
  796. //fDisableCheck(false);
  797. //btn_histsave.disabled = "true"
  798. fmatch();
  799. model.makeValue(opt_actprcpdrid.attribute("ref"), getParameter("actprcpdrid"));
  800. model.makeValue(opt_actcd.attribute("ref"), getParameter("calcscorcd" ));
  801. model.makeValue(opt_actprcpdrnm.attribute("ref"), getParameter("actprcpdrnm"));
  802. model.makeValue(opt_actdeptnm.attribute("ref"), getParameter("actdeptnm" ));
  803. model.makeValue(opt_todd.attribute("ref"), '99991231');
  804. model.makeValue(opt_fromdd.attribute("ref"), getCurrentDate());
  805. model.makeValue(ipt_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  806. model.makeValue(opt_actdeptcd.attribute("ref"), getParameter("actdeptcd" ));
  807. model.makeValue(opt_savestatnm.attribute("ref"), "");
  808. model.makeValue(opt_hngnm.attribute("ref"), getParameter("hngnm" ));
  809. model.makeValue(opt_engnm.attribute("ref"), getParameter("engnm" ));
  810. model.makeValue(opt_deptflag.attribute("ref"), getParameter("deptflag"));
  811. if(model.getValue(opt_deptflag.attribute("ref")) == '1'){
  812. model.makeValue(opt_deptflagnm.attribute("ref"),'구매');
  813. } else if (model.getValue(opt_deptflag.attribute("ref")) == '2'){
  814. model.makeValue(opt_deptflagnm.attribute("ref"),'약국');
  815. } else {
  816. alert(model.getValue(opt_deptflag.attribute("ref")));
  817. model.makeValue(opt_deptflagnm.attribute("ref"),'-');
  818. }
  819. model.refresh();
  820. ]]>
  821. </script>
  822. </button>
  823. <caption id="caption6">이력저장</caption>
  824. <button id="btn_histsave" class="btn4_letter4" disabled="false" navindex="9" visibility="visible" style="left:902px; top:471px; width:80px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  825. <script type="javascript" ev:event="DOMActivate">
  826. <![CDATA[
  827. var frddvalue = grd_actnmview.valueMatrix(grd_actnmview.row,grd_actnmview.colRef("fromdd"));
  828. var chngyn = "N";
  829. if(frddvalue == getCurrentDate()){
  830. messageBox("당일 등록한 행위코드는 이력변경을","E001");
  831. return;
  832. }
  833. // if( grd_actmaster.valueMatrix(grd_actmaster.row,grd_actmaster.colRef("tmpflag")) == "Y"){
  834. // messageBox("임시저장한 행위코드는 이력변경을","E001");
  835. // return;
  836. // }
  837. // for(i=grd_actmaster.fixedRows;i<grd_actmaster.rows;i++){
  838. // if (grd_actmaster.rowStatus(i) != 0){
  839. // chngyn = "Y";
  840. // break;
  841. // }
  842. // }
  843. //
  844. // if( chngyn == "N"){
  845. // messageBox("한 건이상의 변경 데이타 존재시 이력 저장이","I006");
  846. // return;
  847. // }
  848. //grd_actmaster.clearStatus();
  849. var retMes = messageBox("행위코드 이력을","Q002");
  850. if ( retMes != 6) {
  851. return;
  852. }
  853. // for(i=grd_actmaster.fixedRows;i<grd_actmaster.rows;i++){
  854. // if (grd_actmaster.rowStatus(i) == 0){
  855. // grd_actmaster.rowStatus(i) = 2;
  856. // }
  857. // }
  858. if (fSave("이력 저장", "H") == false) return;
  859. // 적용일자 설정
  860. model.setValue("/root/save/appdd", model.getValue("/root/main/actmatrcdinfo/actmatrcdcomnlist/fromdd"));
  861. if (submit("TXPIC90004")){
  862. messageBox("이력 저장이","I002");
  863. fSrchCondInfo();
  864. }else{
  865. messageBox("이력 저장","E009");
  866. return;
  867. }
  868. ]]>
  869. </script>
  870. <caption>이력저장</caption>
  871. </button>
  872. <line id="line2" class="line_3" style="x1:5px; y1:497px; x2:1175px; y2:497px; "/>
  873. <output id="opt_actdeptcd" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/actdeptcd" visibility="hidden" appearance="output" style="left:190px; top:145px; width:65px; height:19px; "/>
  874. <button id="btn_rowdel" class="btn2_letter3" disabled="true" navindex="10" style="left:844px; top:471px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  875. <caption>행삭제</caption>
  876. <script type="javascript" ev:event="DOMActivate">
  877. <![CDATA[
  878. fSelectChoiDel(grd_actmaster);
  879. ]]>
  880. </script>
  881. </button>
  882. <input id="ipt_instcd" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/instcd" visibility="hidden" appearance="input" style="left:130px; top:145px; width:50px; height:19px; "/>
  883. <img id="img2" src="../../../com/commonweb/images/grid_scroll_v_up.gif" style="left:537px; top:0px; width:16px; height:17px; background-stretch:stretch; ">
  884. <script type="javascript" ev:event="onclick">
  885. <![CDATA[
  886. switch1.attribute("height") = "120";
  887. //grd_sngllist.attribute("height") = "100";
  888. grd_actnmview.attribute("height") = "118";
  889. grd_acthisview.attribute("height") = "118";
  890. ]]>
  891. </script>
  892. </img>
  893. <img id="img1" src="../../../com/commonweb/images/grid_scroll_v_down.gif" style="left:557px; top:0px; width:16px; height:17px; background-stretch:stretch; ">
  894. <script type="javascript" ev:event="onclick">
  895. <![CDATA[
  896. switch1.attribute("height") = "490";
  897. //grd_sngllist.attribute("height") = "505";
  898. grd_actnmview.attribute("height") = "488";
  899. grd_acthisview.attribute("height") = "488";
  900. ]]>
  901. </script>
  902. </img>
  903. <output id="opt_savestatnm" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatnm" visibility="hidden" appearance="output" style="left:820px; top:0px; width:75px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  904. <caption id="caption16" class="cell_1" visibility="hidden" style="left:750px; top:0px; width:60px; height:19px; text-align:center; ">저장상태</caption>
  905. <output id="opt_savestatcd" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/savestatcd" visibility="hidden" appearance="output" style="left:260px; top:145px; width:65px; height:19px; "/>
  906. <caption id="caption17" visibility="hidden" style="left:601px; top:0px; width:67px; height:15px; font-weight:bold; ">: 행위종료</caption>
  907. <output id="output1" visibility="hidden" style="left:580px; top:0px; width:15px; height:19px; background-color:#ffff00; border-style:solid; "/>
  908. <output id="opt_deptflag" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/deptflag" visibility="hidden" appearance="output" style="left:925px; top:144px; width:25px; height:19px; text-align:center; border-color:#c0c0c0; border-style:solid; "/>
  909. <button id="btn_excel" class="btn5_letter5" navindex="16" style="left:1099px; top:145px; width:75px; height:19px; ">
  910. <caption>Excel 저장</caption>
  911. <script type="javascript" ev:event="DOMActivate">
  912. <![CDATA[
  913. if(grd_actnmview.fixedRows != grd_actnmview.rows)
  914. {
  915. var fileName = window.fileDialog("save", ",", false, "행위재료약품관리", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  916. if (fileName != "")
  917. {
  918. grd_actnmview.saveExcel(fileName, "행위재료약품관리");
  919. }
  920. }else{
  921. messageBox("저장할 Data가 없습니다. Data 조회 후 다시 실행하세요.", "I999");
  922. }
  923. ]]>
  924. </script>
  925. </button>
  926. <caption id="caption20" class="cell_1" style="left:302px; top:172px; width:85px; height:19px; text-align:center; ">수가명(한글)</caption>
  927. <output id="opt_hngnm" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/hngnm" appearance="output" style="left:390px; top:172px; width:342px; height:19px; text-align:left; padding-left:5; border-color:#c0c0c0; border-style:solid; "/>
  928. <caption id="caption14" class="cell_1" style="left:738px; top:172px; width:85px; height:19px; text-align:center; ">수가명(영문)</caption>
  929. <output id="opt_engnm" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/engnm" appearance="output" style="left:826px; top:172px; width:349px; height:19px; text-align:left; padding-left:5; border-color:#c0c0c0; border-style:solid; "/>
  930. <caption id="caption15" class="search_name" style="left:18px; top:71px; width:113px; height:17px; ">수가명(한글) :</caption>
  931. <input id="ipt_actnm" ref="/root/send/actmatrlist/actnm" class="input_search" navindex="3" style="left:140px; top:71px; width:295px; height:19px; text-align:left; ">
  932. <script type="javascript" ev:event="onkeydown">
  933. <![CDATA[
  934. inputEnterKey("btn_actsearch", "DOMActivate");
  935. ]]>
  936. </script>
  937. </input>
  938. <switch id="switch1" style="left:535px; top:20px; width:640px; height:120px; ">
  939. <case id="case2">
  940. <datagrid id="grd_acthisview" nodeset="/root/main/actmatrhistinfo/actmatrhistlist" caption="행위코드^시행부서^시행부서^의사ID^의사명^적용일^종료일^부서구분" colsep="^" colwidth="101, 4, 133, 87, 75, 102, 105, 62" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:0px; width:638px; height:120px; ">
  941. <col ref="actcd" style="text-align:center; "/>
  942. <col ref="actdeptcd" visibility="hidden"/>
  943. <col ref="actdeptnm" style="text-align:center; "/>
  944. <col ref="actprcpdrid" style="text-align:center; "/>
  945. <col ref="actprcpdrnm" style="text-align:center; "/>
  946. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  947. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  948. <col ref="deptflag" style="text-align:center; "/>
  949. <script type="javascript" ev:event="onclick">
  950. <![CDATA[
  951. if(isDataCell() == true) {
  952. fSrchGood(grd_acthisview);
  953. }
  954. ]]>
  955. </script>
  956. </datagrid>
  957. </case>
  958. <case id="case1" selected="true">
  959. <datagrid id="grd_actnmview" nodeset="/root/main/actmatrinfo/actmatrlist" caption="행위코드^수가명(한글)^수가명(영문)^시행부서^시행부서^의사ID^의사명^적용일^종료일^임시저장^부서구분" colsep="^" colwidth="103, 250, 250, 6, 111, 85, 81, 80, 78, 19, 33" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="byrow" navindex="6" style="left:0px; top:0px; width:638px; height:118px; ">
  960. <col ref="actcd" style="text-align:left; padding-left:10; "/>
  961. <col ref="hngnm" style="text-align:left; padding-left:5; "/>
  962. <col ref="engnm" style="text-align:left; padding-left:5; "/>
  963. <col ref="actdeptcd" visibility="hidden"/>
  964. <col ref="actdeptnm" visibility="hidden" style="text-align:center; "/>
  965. <col ref="actprcpdrid" visibility="hidden" style="text-align:center; "/>
  966. <col ref="actprcpdrnm" visibility="hidden" style="text-align:center; "/>
  967. <col ref="fromdd" visibility="visible" format="yyyy-mm-dd" style="text-align:center; "/>
  968. <col ref="todd" visibility="visible" format="yyyy-mm-dd" style="text-align:center; "/>
  969. <col checkvalue="Y,N" disabled="true" ref="tmpflag" type="checkbox" visibility="hidden"/>
  970. <col ref="deptflag" visibility="hidden" style="text-align:center; "/>
  971. <script type="javascript" ev:event="onclick">
  972. <![CDATA[
  973. if(isDataCell() == true) {
  974. fSrchGood(grd_actnmview);
  975. }
  976. ]]>
  977. </script>
  978. </datagrid>
  979. </case>
  980. </switch>
  981. <button id="button1" class="icon_search" style="left:225px; top:103px; width:16px; height:16px; ">
  982. <caption/>
  983. <script type="javascript" ev:event="DOMActivate">
  984. <![CDATA[
  985. fSmOpenPopUpListByWndName(ipt_searchgoodcd,"","goodcd,allsizespecid,goodnm,goodflag","SPRSD00210");
  986. model.refresh();
  987. ]]>
  988. </script>
  989. </button>
  990. <caption id="caption23" class="search_name" style="left:18px; top:104px; width:126px; height:17px; ">물 품 코 드 :</caption>
  991. <input id="ipt_searchgoodnm" ref="/root/send/actmatrlist/goodnm" class="output_fix" navindex="2" editable="false" style="left:248px; top:103px; width:187px; height:19px; "/>
  992. <input id="ipt_searchgoodcd" ref="/root/send/actmatrlist/goodcd" class="input_search" navindex="1" imemode="alpha" _chartype="upper" style="left:140px; top:103px; width:80px; height:19px; text-align:left; ">
  993. <script type="javascript" ev:event="onkeyup">
  994. <![CDATA[
  995. inputEnterKey("btn_actsearch", "DOMActivate");
  996. ]]>
  997. </script>
  998. <script type="javascript" ev:event="xforms-value-changed">
  999. <![CDATA[
  1000. var goodcd = model.getValue(ipt_searchgoodcd.attribute("ref")).getTrim();
  1001. ipt_searchgoodnm.value = "";
  1002. ipt_searchgoodnm.refresh();
  1003. ipt_searchgoodcd.refresh();
  1004. ]]>
  1005. </script>
  1006. </input>
  1007. <datagrid id="grd_historyview" nodeset="/root/main/actmatrcdinfo/historylist" caption="기관코드^행위코드^적용일자^종료일자^수가명(한글)^수가명(영문)" colsep="^" colwidth="40, 30, 83, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" navindex="7" style="left:5px; top:170px; width:85px; height:295px; ">
  1008. <col ref="instcd" visibility="hidden"/>
  1009. <col ref="actcd" visibility="hidden"/>
  1010. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1011. <col ref="todd" visibility="hidden"/>
  1012. <col ref="hngnm" visibility="hidden"/>
  1013. <col ref="engnm" visibility="hidden"/>
  1014. <script type="javascript" ev:event="onclick">
  1015. <![CDATA[
  1016. if (isDataCell() == true) {
  1017. fSrchGood(grd_historyview);
  1018. }
  1019. ]]>
  1020. </script>
  1021. </datagrid>
  1022. <input id="input1" ref="/root/main/actmatrcdinfo/actmatrcdcomnlist/fromdd" inputtype="date" style="left:188px; top:195px; width:108px; height:19px; "/>
  1023. </xhtml:body>
  1024. </xhtml:html>