MRF04500.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. /**
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 진료기록 - 서명이미지관리( SMMRF04500_서명이미지관리.xrw - JScript )
  4. - Version :
  5. 1) : Ver.1.00.01
  6. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  7. **/
  8. /**
  9. * @group :
  10. * @ver : 2007.10.19
  11. * @by : 손형준
  12. * @---------------------------------------------------
  13. * @desc : 초기화
  14. * @
  15. * @param :수정(이창록),2008/07/21
  16. * @return :
  17. * @---------------------------------------------------
  18. */
  19. function fInitialize()
  20. {
  21. model.setValue("/root/main/userinfo/userid", getUserId());
  22. model.setValue("/root/main/userinfo/usernm", getUserName());
  23. model.removeNodeset("/root/main/list/signimglist");
  24. mmbfGetDeptCodeComboList("/root/send", "/root/init/orddept", "D");//진료과 가져오기
  25. addComboItem("cmb_orddept", "전체", "-", "above");//진료과에 전체 추가
  26. addComboItem("cmb_orddrid", "전체", "-", "above");//진료과에 전체 추가
  27. cmb_orddept.Value="-";
  28. cmb_orddrid.Value="-";
  29. fSetCtrlDisabled(true);
  30. model.refresh();
  31. }
  32. /**
  33. * @group :
  34. * @ver : 2007.10.19
  35. * @by : 손형준
  36. * @---------------------------------------------------
  37. * @type : function
  38. * @access : public
  39. * @desc : 서명 이미지 조회
  40. * @param :
  41. * @return :
  42. * @---------------------------------------------------
  43. */
  44. function fSearch() {
  45. if(submit("TRMRF04501"))
  46. {
  47. }
  48. }
  49. /**
  50. * @group :
  51. * @ver : 2007.10.19
  52. * @by : 손형준
  53. * @---------------------------------------------------
  54. * @type : function
  55. * @access : public
  56. * @desc : 해당 진료과에 주치의 가져오기
  57. * @param :
  58. * @return :
  59. * @---------------------------------------------------
  60. */
  61. function fChgMedirecd()
  62. {
  63. model.resetInstanceNode("/root/init/userlist/usercombo");
  64. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , cmb_orddept.value, "0330");
  65. if(getNodesetCnt(model, "/root/init/userlist/usercombo") == 0)
  66. model.makeNode("/root/init/userlist/usercombo");
  67. addComboInstance("/root/init/userlist" , "userid^usernm" , "-^전체", "usercombo"); //의사콤보(담당교수) 전체항목 추가
  68. model.setValue("/root/main/cond/orddrid", "-");
  69. }
  70. /**
  71. * @group :
  72. * @ver : 2007.10.19
  73. * @by : 손형준
  74. * @---------------------------------------------------
  75. * @type : function
  76. * @access : public
  77. * @desc : 화면 정리
  78. * @param :
  79. * @return :
  80. * @---------------------------------------------------
  81. */
  82. function fClearSignImgInfo() {
  83. var xPath ="/root/main/signimginfo";
  84. model.setValue(xPath + "/userid", "");
  85. model.setValue(xPath + "/usernm", "");
  86. model.setValue(xPath + "/fstrgstrnm", "");
  87. model.setValue(xPath + "/fstrgstdt", "");
  88. model.setValue(xPath + "/lastrgstrnm", "");
  89. model.setValue(xPath + "/lastrgstdt", "");
  90. model.setValue(xPath + "/signdata","");
  91. model.refresh();
  92. }
  93. /**
  94. * @group :
  95. * @ver : 2007.10.19
  96. * @by : 손형준
  97. * @---------------------------------------------------
  98. * @type : function
  99. * @access : public
  100. * @desc : 서명 이미지를 수정한다.
  101. * @param :
  102. * @return :
  103. * @---------------------------------------------------
  104. */
  105. function fSetSignImgelist()
  106. {
  107. var repryn = model.getValue("/root/main/signimginfo/repryn");
  108. var iRow = grd_signimglist.row;
  109. if (iRow < 1) {
  110. return;
  111. }
  112. grd_signimglist.rowStatus(iRow) = 2;
  113. model.makeValue("/root/main/signimginfo/status" ,"u");
  114. model.makeValue("/root/main/signimginfo/fstrgstrid" ,model.getValue("/root/main/userinfo/userid"));
  115. model.makeValue("/root/main/signimginfo/lastupdtrid",getUserId());
  116. model.makeValue("/root/main/signimginfo/lastupdtrnm",getUserInfo("usernm"));
  117. model.setValue("/root/main/signimginfo/lastupdtdt" ,getCurrentDate());
  118. ipt_lastrgstrnm.disabled = true;
  119. btn_srch.disabled = true;
  120. btn_imgsrch.disabled = false;
  121. btn_save.disabled = false;
  122. cmb_repryn.disabled = false;
  123. model.refresh();
  124. }
  125. /**
  126. * @group :
  127. * @ver : 2007.10.19
  128. * @by : 손형준
  129. * @---------------------------------------------------
  130. * @type : function
  131. * @access : public
  132. * @desc : 저장한다.
  133. * @param :
  134. * @return :
  135. * @---------------------------------------------------
  136. */
  137. function fSave()
  138. {
  139. var userid = model.getValue("/root/main/signimginfo/userid");
  140. var signdata = model.getValue("/root/main/signimginfo/signdata");
  141. var repryn = model.getValue("/root/main/signimginfo/repryn");
  142. if (userid == "" || userid == null) {
  143. messageBox("사용자정보는","I003");
  144. return;
  145. }
  146. if(signdata==""){
  147. messageBox("서명이미지는","I003");
  148. return;
  149. }
  150. if(repryn==""){
  151. messageBox("대표여부는","I003");
  152. return;
  153. }
  154. var xPath = "/root/main/signimginfo";
  155. model.makeValue("/root/send/savedata/signimgeseqno" ,model.getValue("/root/main/signimginfo/signimgeseqno"));
  156. model.makeValue("/root/send/savedata/userid" ,userid);
  157. model.makeValue("/root/send/savedata/repryn" ,model.getValue("/root/main/signimginfo/repryn"));
  158. model.makeValue("/root/send/savedata/status" ,model.getValue("/root/main/signimginfo/status"));
  159. model.makeValue("/root/send/savedata/fstrgstrid" ,model.getValue("/root/main/signimginfo/fstrgstrid"));
  160. model.makeValue("/root/send/savedata/lastupdtrid" ,model.getValue("/root/main/signimginfo/lastupdtrid"));
  161. model.makeValue("/root/send/savedata/signimgefromdd" ,model.getValue("/root/main/signimginfo/signimgefromdd"));
  162. model.makeValue("/root/send/savedata/signimgetodd" ,model.getValue("/root/main/signimginfo/signimgetodd"));
  163. model.makeValue("/root/send/savedata/orddeptcd" ,model.getValue("/root/main/cond/orddeptcd"));
  164. model.makeValue("/root/send/savedata/orddrid" ,model.getValue("/root/main/cond/orddrid"));
  165. model.makeValue("/root/send/savedata/signdata" ,signdata);
  166. if(submit("TXMRF04501")==true){
  167. messageBox("저장이", "I002");
  168. }else{
  169. messageBox("저장을", "E009");
  170. }
  171. btn_save.disabled = true;
  172. btn_srch.disabled = true;
  173. btn_imgsrch.disabled = true;
  174. cmb_repryn.disabled = true;
  175. model.removeNodeset("/root/send");
  176. model.refresh();
  177. }
  178. /**
  179. * @group :
  180. * @ver : 2007.10.19
  181. * @by : 손형준
  182. * @---------------------------------------------------
  183. * @type : function
  184. * @access : public
  185. * @desc : 파일 열기
  186. * @param :
  187. * @return :
  188. * @---------------------------------------------------
  189. */
  190. function fOpenFile()
  191. {
  192. var file = openImageFileDialog(1048576);
  193. if (file == "") {
  194. return;
  195. }
  196. img_hidden.src = file;
  197. var data = img_hidden.getbase64data();
  198. model.setValue("/root/main/signimginfo/signdata", data, true);
  199. setImageRefInstance("/root/main/signimginfo/signdata");
  200. model.refresh();
  201. }
  202. /**
  203. * @group :
  204. * @ver : 2007.10.19
  205. * @by : 손형준
  206. * @---------------------------------------------------
  207. * @type : function
  208. * @access : public
  209. * @desc : 선택한 그리드의 이미지를 보여준다.
  210. * @param :
  211. * @return :
  212. * @---------------------------------------------------
  213. */
  214. function fShowSignImgInfo()
  215. {
  216. img_imgView.visible = false;
  217. if (grd_signimglist.isCell(event.target)
  218. && grd_signimglist.row >= grd_signimglist.fixedRows)
  219. {
  220. fSetCtrlDisabled(true);
  221. var iRow = grd_signimglist.row;
  222. var xImglistPath = "/root/main/list/signimglist";
  223. var xImgInfoPath = "/root/main/signimginfo";
  224. model.setValue(xImgInfoPath + "/userid" ,model.getValue(xImglistPath+"[" + iRow + "]/userid"));
  225. model.setValue(xImgInfoPath + "/usernm" ,model.getValue(xImglistPath+"[" + iRow + "]/usernm"));
  226. model.setValue(xImgInfoPath + "/repryn" ,model.getValue(xImglistPath+"[" + iRow + "]/repryn"));
  227. model.setValue(xImgInfoPath + "/signimgeseqno" ,model.getValue(xImglistPath+"[" + iRow + "]/signimgeseqno"));
  228. model.makeValue(xImgInfoPath + "/fstrgstrid" ,model.getValue(xImglistPath+"[" + iRow + "]/fstrgstrid"));
  229. model.setValue(xImgInfoPath + "/fstrgstrnm" ,model.getValue(xImglistPath+"[" + iRow + "]/fstrgstrnm"));
  230. model.setValue(xImgInfoPath + "/fstrgstdt" ,model.getValue(xImglistPath+"[" + iRow + "]/fstrgstdt"));
  231. model.makeValue(xImgInfoPath + "/lastupdtrid" ,model.getValue(xImglistPath+"[" + iRow + "]/lastupdtrid"));
  232. model.setValue(xImgInfoPath + "/lastupdtrnm" ,model.getValue(xImglistPath+"[" + iRow + "]/lastupdtrnm"));
  233. model.setValue(xImgInfoPath + "/lastupdtdt" ,model.getValue(xImglistPath+"[" + iRow + "]/lastupdtdt"));
  234. model.setValue(xImgInfoPath + "/signimgefromdd" ,model.getValue(xImglistPath+"[" + iRow + "]/signimgefromdd"));
  235. model.setValue(xImgInfoPath + "/signimgetodd" ,model.getValue(xImglistPath+"[" + iRow + "]/signimgetodd"));
  236. model.makevalue(xImgInfoPath + "/signdata" ,model.getValue(xImglistPath+"[" + iRow + "]/signdata"));
  237. model.makeValue("/root/send/userid" ,model.getValue(xImgInfoPath + "/userid"));
  238. model.makeValue("/root/send/signimgeseqno" ,model.getValue(xImgInfoPath + "/signimgeseqno"));
  239. model.makeValue("/root/send/srchflag" ,"Y");
  240. img_imgView.src = "../../../com/commonweb/images/no_image.gif";//빈값 으로 초기화
  241. img_imgView.refresh();
  242. if(submit("TRMRF04502")){
  243. setImageRefInstance("/root/main/signimginfo/signdata");
  244. img_imgView.refresh();
  245. }
  246. }
  247. img_imgView.visible = true;
  248. model.removeNodeset("/root/send");
  249. }
  250. /**
  251. * @group :
  252. * @ver : 2007.10.19
  253. * @by : 손형준
  254. * @---------------------------------------------------
  255. * @type : function
  256. * @access : public
  257. * @desc : 신규 서명이미지 추가
  258. * @param :
  259. * @return :
  260. * @---------------------------------------------------
  261. */
  262. function fAddSignImglist()
  263. {
  264. var signdata = model.getValue("/root/main/signimginfo/signdata");
  265. var xPath ="/root/main/signimginfo";
  266. model.makeValue(xPath + "/status" ,"i");
  267. model.makeValue(xPath + "/userid" ,"");
  268. model.makeValue(xPath + "/usernm" ,"");
  269. model.makeValue(xPath + "/repryn" ,"");
  270. model.makeValue(xPath + "/fstrgstdt" ,getCurrentDate());
  271. model.makeValue(xPath + "/fstrgstrid" ,getUserId());
  272. model.makeValue(xPath + "/fstrgstrnm" ,getUserInfo("usernm"));
  273. model.makeValue(xPath + "/lastupdtrid" ,getUserId());
  274. model.makeValue(xPath + "/lastupdtrnm" ,getUserInfo("usernm"));
  275. model.makeValue(xPath + "/lastupdtdt" ,getCurrentDate());
  276. model.makeValue(xPath + "/signdata" ,"");
  277. model.setValue(xPath + "/signimgefromdd",getCurrentDate());
  278. model.setValue(xPath + "/signimgetodd" ,"");
  279. model.setValue(xPath + "/signimgeseqno" ,"");
  280. ipt_userid.disabled = true;
  281. ipt_lastrgstrnm.disabled = true;
  282. ipt_fstrgstrnm.disabled = true;
  283. ipt_usernm.disabled = true;
  284. btn_save.disabled = false;
  285. btn_srch.disabled = false;
  286. btn_imgsrch.disabled = false;
  287. cmb_repryn.disabled = false;
  288. ipt_stnddd.disabled = false;
  289. model.refresh();
  290. }
  291. /**
  292. * @group :
  293. * @ver : 2007.10.19
  294. * @by : 손형준
  295. * @---------------------------------------------------
  296. * @type : function
  297. * @access : public
  298. * @desc : 컨트롤 enable 설정
  299. * @param :
  300. * @return :
  301. * @---------------------------------------------------
  302. */
  303. function fSetCtrlDisabled(bool)
  304. {
  305. btn_srch.disabled = bool;
  306. btn_imgsrch.disabled = bool;
  307. btn_save.disabled = bool;
  308. ipt_userid.disabled = bool;
  309. ipt_lastrgstrnm.disabled = bool;
  310. ipt_fstrgstrnm.disabled = bool;
  311. ipt_usernm.disabled = bool;
  312. cmb_repryn.disabled = bool;
  313. ipt_stnddd.disabled = bool;
  314. }
  315. /**
  316. * @ver : 2007-11-21 1:17오후
  317. * @desc : 사용자정보
  318. * @
  319. * @by : 이창록
  320. * @param :
  321. * @return :
  322. * @---------------------------------------------------
  323. */
  324. function fGetUserInfo(userid,usernm)
  325. {
  326. model.setValue("/root/main/signimginfo/userid", userid);
  327. model.setValue("/root/main/signimginfo/usernm", usernm);
  328. model.refresh();
  329. }
  330. /**
  331. * @ver : 2008/07/21
  332. * @desc : 대표여부 설정
  333. * @
  334. * @by : 이창록
  335. * @param :
  336. * @return :
  337. * @---------------------------------------------------
  338. */
  339. function fSelectReprYN()
  340. {
  341. var repryn = model.getValue("/root/main/signimginfo/repryn");
  342. var fStatus = model.getValue("/root/main/signimginfo/status");
  343. var userid = model.getValue("/root/main/signimginfo/userid");
  344. var usernm = model.getValue("/root/main/signimginfo/usernm");
  345. var signdata = model.getValue("/root/main/signimginfo/signdata");
  346. if(signdata==""){
  347. messageBox("서명이미지를 먼저 입력","I008");
  348. cmb_repryn.value="";
  349. return;
  350. }
  351. if(fStatus=="i"){
  352. if(repryn=="N"){
  353. cmb_repryn.value="N";
  354. opt_imgetodd.refresh();
  355. model.setValue("/root/main/signimginfo/signimgetodd",getCurrentDate());
  356. }else if(repryn=="Y"){
  357. model.makeValue("/root/send/reqdata/userid" ,model.getValue("/root/main/signimginfo/userid"));
  358. model.makeValue("/root/send/reqdata/reprflag" ,"Y");
  359. if(submit("TRMRF04504")){
  360. if(model.getValue("/root/temp/reprinfo/repryn")=="Y"){
  361. messageBox("대표사인이 이미 등록되어 ","I010");
  362. return;
  363. }else{
  364. model.setValue("/root/main/signimginfo/repryn","Y");
  365. opt_imgetodd.refresh();
  366. model.setValue("/root/main/signimginfo/signimgetodd","99991231");
  367. }
  368. }
  369. }
  370. }else if(fStatus=="u"){
  371. if(repryn=="N"){
  372. opt_imgetodd.refresh();
  373. model.setValue("/root/main/signimginfo/signimgetodd",getCurrentDate());
  374. }else if(repryn=="Y"){
  375. model.makeValue("/root/send/reqdata/userid" ,model.getValue("/root/main/signimginfo/userid"));
  376. model.makeValue("/root/send/reqdata/reprflag" ,"Y");
  377. if(submit("TRMRF04504")){
  378. if(model.getValue("/root/temp/reprinfo/repryn")=="Y"){
  379. messageBox("대표사인이 이미 등록되어 ","I010");
  380. return;
  381. }else{
  382. model.setValue("/root/main/signimginfo/repryn","Y");
  383. opt_imgetodd.refresh();
  384. model.setValue("/root/main/signimginfo/signimgetodd","99991231");
  385. }
  386. }
  387. }
  388. }
  389. model.removeNodeset("/root/send/reqdate");
  390. model.refresh();
  391. }