SMLPR01800_검사결과이미지.xfdl 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLPR01800" position="absolute 0 0 1195 754" titletext="검사결과 이미지등록" oninit="SMLPR01800_oninit" onload="SMLPR01800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1136 1 1192 23" anchor="top right" onclick="btn_save_onclick"/>
  8. <Static id="caption6" text="검사결과 이미지등록" class="tit_1" position="absolute 0 0 157 25" anchor="left top"/>
  9. <Static id="caption4" text="접수목록" class="tit_2" position="absolute 0 68 74 85" anchor="left top"/>
  10. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 87 410 93" style="strokepen:3 solid #33bbbbff;"/>
  11. <Div id="group2" taborder="2" position="absolute 0 25 1195 60" class="div_SA" anchor="left top right">
  12. <Layouts>
  13. <Layout>
  14. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1105 7 1111 29" anchor="top right"/>
  15. <Edit id="ipt_seaval" taborder="11" class="input_search" position="absolute 617 8 715 27" anchor="left top" onkeyup="group2_ipt_seaval_onkeyup"/>
  16. <Static id="caption3" text="등록번호 :" class="search_name" position="absolute 526 9 612 26" anchor="left top"/>
  17. <Static id="caption5" text="~" class="search_no_b" position="absolute 979 8 991 25" anchor="top right"/>
  18. <Button id="btn_sea" taborder="12" text="조회" class="btn1" position="absolute 1123 7 1179 29" anchor="top right" onclick="group2_btn_sea_onclick"/>
  19. <Calendar id="ipt_cnclfromdd" taborder="13" class="input_s_essential" position="absolute 876 8 976 27" mask="yyyy-mm-dd" anchor="top right"/>
  20. <Calendar id="ipt_cncltodd" taborder="14" class="input_s_essential" position="absolute 995 8 1095 27" mask="yyyy-mm-dd" anchor="top right" onkeyup="group2_ipt_cncltodd_onkeyup"/>
  21. <Combo id="cbo_ptnocd" taborder="15" innerdataset="ds_init_cbo_ptnocd" codecolumn="ptnocd" datacolumn="ptnonm" position="absolute 109 8 265 27" anchor="left top"/>
  22. <Edit id="ipt_fromptno" taborder="16" class="text_center" position="absolute 298 8 348 27" anchor="left top"/>
  23. <Static id="caption1" text="병리번호 :" class="search_name" position="absolute 15 9 105 26" anchor="left top"/>
  24. <Static id="caption7" text="~" class="search_no_b" position="absolute 353 10 365 27" anchor="left top"/>
  25. <Edit id="input1" taborder="17" class="text_center" position="absolute 396 8 446 27" anchor="left top"/>
  26. <Edit id="input2" taborder="18" class="text_center" position="absolute 366 8 393 27" anchor="left top"/>
  27. <Edit id="ipt_fromyear" taborder="19" class="text_center" position="absolute 268 8 295 27" anchor="left top"/>
  28. <Static id="cap_refdd" text="접수일자 :" class="search_name" position="absolute 787 9 873 26" anchor="top right"/>
  29. </Layout>
  30. </Layouts>
  31. </Div>
  32. <Grid id="grd_ptnolist" class="datagrid2" taborder="3" binddataset="ds_grd_ptnolist" useinputpanel="false" position="absolute 0 91 410 481" anchor="left top" oncellclick="grd_ptnolist_oncellclick">
  33. <Formats>
  34. <Format id="default">
  35. <Columns>
  36. <Column size="24"/>
  37. <Column size="26"/>
  38. <Column size="0"/>
  39. <Column size="0"/>
  40. <Column size="80"/>
  41. <Column size="65"/>
  42. <Column size="55"/>
  43. <Column size="124"/>
  44. <Column size="100"/>
  45. <Column size="0"/>
  46. <Column size="0"/>
  47. <Column size="0"/>
  48. </Columns>
  49. <Rows>
  50. <Row size="24" band="head"/>
  51. <Row size="24"/>
  52. </Rows>
  53. <Band id="head">
  54. <Cell/>
  55. <Cell col="1" text="선&#10;택"/>
  56. <Cell col="2" text="기관코드"/>
  57. <Cell col="3" text="병리번호"/>
  58. <Cell col="4" text="병리번호"/>
  59. <Cell col="5" text="등록번호"/>
  60. <Cell col="6" text="환자명"/>
  61. <Cell col="7" text="검사명"/>
  62. <Cell col="8" text="인종/민족"/>
  63. <Cell col="9" text="rsltrgstdd"/>
  64. <Cell col="10" text="rsltrgstno"/>
  65. <Cell col="11" text="readdd"/>
  66. </Band>
  67. <Band id="body">
  68. <Cell celltype="head" text="expr:currow + 1"/>
  69. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
  70. <Cell col="2" text="bind:instcd"/>
  71. <Cell col="3" text="bind:ptno"/>
  72. <Cell col="4" class="text_center" text="bind:dispptno"/>
  73. <Cell col="5" class="text_center" text="bind:pid"/>
  74. <Cell col="6" class="text_center" text="bind:patnm"/>
  75. <Cell col="7" style="align:left middle;" text="bind:testnmlist"/>
  76. <Cell col="8" text="bind:humspec"/>
  77. <Cell col="9" class="text_center" text="bind:rsltrgstdd"/>
  78. <Cell col="10" class="text_center" text="bind:rsltrgstno"/>
  79. <Cell col="11" text="bind:readdd"/>
  80. </Band>
  81. </Format>
  82. </Formats>
  83. </Grid>
  84. <Static id="caption2" text="이미지목록" class="tit_2" position="absolute 0 493 90 510"/>
  85. <Static id="caption8" text="이미지" class="tit_2" position="absolute 414 68 480 84"/>
  86. <Shape id="line3" linetype="horizontal" class="line_1" position="absolute 415 86 1193 92" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
  87. <Button id="btn_delrow" taborder="4" text="행삭제" class="btn2" position="absolute 357 490 410 509" onclick="btn_delrow_onclick"/>
  88. <Button id="btn_addrow" taborder="5" text="행추가" class="btn2" position="absolute 302 490 355 509" onclick="btn_addrow_onclick"/>
  89. <ImageViewer id="img_source" taborder="6" visible="false" position="absolute 775 66 815 86"/>
  90. <Grid id="grd_imglist" taborder="8" binddataset="ds_grd_imglist" useinputpanel="false" position="absolute 0 516 410 751" anchor="left top bottom" oncellclick="grd_imglist_oncellclick" style="align:center middle;">
  91. <Formats>
  92. <Format id="default">
  93. <Columns>
  94. <Column size="0" band="left"/>
  95. <Column size="0" band="left"/>
  96. <Column size="0" band="left"/>
  97. <Column size="0" band="left"/>
  98. <Column size="0" band="left"/>
  99. <Column size="22" band="left"/>
  100. <Column size="70"/>
  101. <Column size="60"/>
  102. <Column size="70"/>
  103. <Column size="30"/>
  104. <Column size="0"/>
  105. <Column size="0"/>
  106. <Column size="490"/>
  107. <Column size="0"/>
  108. <Column size="0"/>
  109. <Column size="0"/>
  110. </Columns>
  111. <Rows>
  112. <Row size="24" band="head"/>
  113. <Row size="24"/>
  114. </Rows>
  115. <Band id="head">
  116. <Cell text="instcd"/>
  117. <Cell col="1" text="pid"/>
  118. <Cell col="2" text="bizflagcd"/>
  119. <Cell col="3" text="ptno"/>
  120. <Cell col="4" text="등록일자"/>
  121. <Cell col="5"/>
  122. <Cell col="6" text="등록시간"/>
  123. <Cell col="7" text="등록자ID"/>
  124. <Cell col="8" text="등록자"/>
  125. <Cell col="9" style="align:center middle;" text="찾기"/>
  126. <Cell col="10" text="imgno"/>
  127. <Cell col="11" text="imgseqno"/>
  128. <Cell col="12" text="파일명"/>
  129. <Cell col="13" text="rsltimg"/>
  130. <Cell col="14" text="caption1"/>
  131. <Cell col="15" text="caption2"/>
  132. </Band>
  133. <Band id="body">
  134. <Cell text="bind:instcd"/>
  135. <Cell col="1" text="bind:pid"/>
  136. <Cell col="2" text="bind:bizflagcd"/>
  137. <Cell col="3" text="bind:ptno"/>
  138. <Cell col="4" text="bind:rgstdd"/>
  139. <Cell col="5"/>
  140. <Cell col="6" text="bind:rgsttm"/>
  141. <Cell col="7" text="bind:rgstrid"/>
  142. <Cell col="8" text="bind:rgstrnm"/>
  143. <Cell col="9" edittype="none" style="align:center middle;padding: ;backgroundimage:URL('theme://images\theme_violet\icon_glassSearch4_N.PNG');" text="bind:dummy" expandimage="URL('theme://images\theme_violet\icon_glassSearch4_N.PNG')"/>
  144. <Cell col="10" text="bind:imgno"/>
  145. <Cell col="11" text="bind:imgseqno"/>
  146. <Cell col="12" text="bind:imgpath"/>
  147. <Cell col="13" text="bind:rsltimg"/>
  148. <Cell col="14" text="bind:exists"/>
  149. <Cell col="15" text="bind:orgimgpath"/>
  150. </Band>
  151. </Format>
  152. </Formats>
  153. </Grid>
  154. <Shape id="line2" linetype="horizontal" class="line_1" position="absolute 0 512 410 518" style="strokepen:3 solid #33bbbbff;"/>
  155. <ImageViewer id="img_src" taborder="9" position="absolute 415 90 1193 750" anchor="all" stretch="fit"/>
  156. </Layout>
  157. </Layouts>
  158. <Objects>
  159. <Dataset id="ds_init_cbo_ptnocd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  160. <ColumnInfo>
  161. <Column id="ptnonm" type="STRING"/>
  162. <Column id="ptnocd" type="STRING"/>
  163. </ColumnInfo>
  164. </Dataset>
  165. <Dataset id="ds_grd_ptnolist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  166. <ColumnInfo>
  167. <Column id="choi" type="STRING"/>
  168. <Column id="instcd" type="STRING"/>
  169. <Column id="ptno" type="STRING"/>
  170. <Column id="dispptno" type="STRING"/>
  171. <Column id="pid" type="STRING"/>
  172. <Column id="patnm" type="STRING"/>
  173. <Column id="testnmlist" type="STRING"/>
  174. <Column id="humspec" type="STRING"/>
  175. <Column id="rsltrgstdd" type="STRING"/>
  176. <Column id="rsltrgstno" type="STRING"/>
  177. <Column id="readdd" type="STRING"/>
  178. <Column id="imgno" type="STRING" size="256"/>
  179. <Column id="bizflagcd" type="STRING" size="256"/>
  180. </ColumnInfo>
  181. </Dataset>
  182. <Dataset id="ds_grd_imglist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  183. <ColumnInfo>
  184. <Column id="instcd" type="STRING"/>
  185. <Column id="pid" type="STRING"/>
  186. <Column id="bizflagcd" type="STRING"/>
  187. <Column id="ptno" type="STRING"/>
  188. <Column id="rgstdd" type="STRING"/>
  189. <Column id="rgsttm" type="STRING"/>
  190. <Column id="rgstrid" type="STRING"/>
  191. <Column id="rgstrnm" type="STRING"/>
  192. <Column id="dummy" type="STRING"/>
  193. <Column id="imgno" type="STRING"/>
  194. <Column id="imgseqno" type="STRING"/>
  195. <Column id="imgpath" type="STRING"/>
  196. <Column id="rsltimg" type="BLOB"/>
  197. <Column id="exists" type="STRING"/>
  198. <Column id="orgimgpath" type="STRING"/>
  199. <Column id="status" type="STRING" size="256"/>
  200. </ColumnInfo>
  201. </Dataset>
  202. <Dataset id="ds_data_sysdtinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  203. <ColumnInfo>
  204. <Column id="sysdd" type="STRING" size="256"/>
  205. <Column id="systm" type="STRING" size="256"/>
  206. </ColumnInfo>
  207. </Dataset>
  208. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  209. <ColumnInfo>
  210. <Column id="acptfromdd" type="STRING" size="256"/>
  211. <Column id="acpttodd" type="STRING" size="256"/>
  212. <Column id="refmthdcd" type="STRING" size="256"/>
  213. <Column id="refval" type="STRING" size="256"/>
  214. <Column id="ptnocode" type="STRING" size="256"/>
  215. <Column id="fromyear" type="STRING" size="256"/>
  216. <Column id="fromptno" type="STRING" size="256"/>
  217. <Column id="toyear" type="STRING" size="256"/>
  218. <Column id="toptno" type="STRING" size="256"/>
  219. <Column id="sysdt" type="STRING" size="256"/>
  220. <Column id="ptnocd" type="STRING" size="256"/>
  221. <Column id="imgsrc" type="BLOB" size="256"/>
  222. </ColumnInfo>
  223. <Rows>
  224. <Row/>
  225. </Rows>
  226. </Dataset>
  227. </Objects>
  228. <Bind>
  229. <BindItem id="item0" compid="group2.ipt_cncltodd" propid="value" datasetid="ds_init" columnid="acpttodd"/>
  230. <BindItem id="item1" compid="group2.ipt_cnclfromdd" propid="value" datasetid="ds_init" columnid="acptfromdd"/>
  231. <BindItem id="item2" compid="group2.ipt_seaval" propid="value" datasetid="ds_init" columnid="refval"/>
  232. <BindItem id="item3" compid="group2.input1" propid="value" datasetid="ds_init" columnid="toptno"/>
  233. <BindItem id="item4" compid="group2.input2" propid="value" datasetid="ds_init" columnid="toyear"/>
  234. <BindItem id="item5" compid="group2.ipt_fromptno" propid="value" datasetid="ds_init" columnid="fromptno"/>
  235. <BindItem id="item6" compid="group2.ipt_fromyear" propid="value" datasetid="ds_init" columnid="fromyear"/>
  236. <BindItem id="item7" compid="group2.cbo_ptnocd" propid="value" datasetid="ds_init" columnid="ptnocode"/>
  237. <BindItem id="item8" compid="img_src" propid="image" datasetid="ds_init" columnid="imgsrc"/>
  238. </Bind>
  239. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  240. * System Name :
  241. * Job Name :
  242. * Creator :
  243. * Make Date : 2015-11-13
  244. * Description :
  245. *---------------------------------------------------------------------------------------
  246. * Modify Date Modifier Modify Description
  247. *---------------------------------------------------------------------------------------
  248. * 2015-11-13 Live Converter TF->XP
  249. *
  250. *---------------------------------------------------------------------------------------
  251. ****************************************************************************************/
  252. include "com_commonxp::comm_main.xjs";
  253. function SMLPR01800_oninit(obj:Form, e:InitEventInfo)
  254. {
  255. frmf_initForm(obj);
  256. }
  257. function SMLPR01800_onload(obj:Form, e:LoadEventInfo)
  258. {
  259. grdf_initGrid(grd_ptnolist);
  260. grdf_initGrid(grd_imglist);
  261. grdf_setRowTypeIcon(grd_imglist, 5);
  262. fExeInitialize();
  263. if(frmf_checkOpener())
  264. {
  265. var param = opener.frmf_getParameter("opener_parameter_id");
  266. if( !utlf_isNull(param))
  267. {
  268. condarray = param.split("▦");
  269. ds_init.setColumn(0, "refval", condarray[0]);
  270. ds_init.setColumn(0, "ptnocode", condarray[1]);
  271. ds_init.setColumn(0, "fromyear", condarray[2]);
  272. ds_init.setColumn(0, "fromptno", condarray[3]);
  273. ds_init.setColumn(0, "toyear", condarray[2]);
  274. ds_init.setColumn(0, "toptno", condarray[3]);
  275. if( !utlf_isNull(ds_init.getColumn(0, "refval")) || !utlf_isNull(ds_init.getColumn(0, "ptnocode")))
  276. {
  277. fGetPtNoList();
  278. }
  279. }
  280. }
  281. }
  282. function fExeInitialize()
  283. {
  284. var sCurDate = "";
  285. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}]);
  286. var oParam = {};
  287. oParam.id = "TRLPZ00102";
  288. oParam.service = "plgycomnusemngtapp.BaseInfoCode";
  289. oParam.method = "reqGetSystemDateTimeInformation";
  290. oParam.inds = "refData=ds_send";
  291. oParam.outds = "ds_data_sysdtinfo=sysdtinfo";
  292. oParam.async = false;
  293. //oParam.callback = "cf_TRLPZ00102";
  294. tranf_submit(oParam);
  295. dsf_createDsRow("ds_send", [{col : "instcd", val : sysf_getUserInfo("dutplceinstcd")}
  296. ,{col : "refflagcd", val : "0"}]);
  297. var oParam = {};
  298. oParam.id = "TRLPZ00109";
  299. oParam.service = "plgycomnusemngtapp.BaseInfoCode";
  300. oParam.method = "reqGetPtNoCdList";
  301. oParam.inds = "refdata=ds_send";
  302. oParam.outds = "ds_init_cbo_ptnocd=rsltlist";
  303. oParam.async = false;
  304. //oParam.callback = "cf_TRLPZ00109";
  305. tranf_submit(oParam);
  306. var sCurDate = ds_data_sysdtinfo.getColumn(0, "sysdd");
  307. ds_init.setColumn(0, "acptfromdd", ds_data_sysdtinfo.getColumn(0, "sysdd"));
  308. ds_init.setColumn(0, "acpttodd", ds_data_sysdtinfo.getColumn(0, "sysdd"));
  309. ds_init.setColumn(0, "refmthdcd", "1");
  310. ds_init.setColumn(0, "refval", "");
  311. ds_init.setColumn(0, "ptnocode", "");
  312. ds_init.setColumn(0, "fromyear", sCurDate.substr(2,2));
  313. ds_init.setColumn(0, "toyear", sCurDate.substr(2,2));
  314. ds_init.setColumn(0, "fromptno", "");
  315. ds_init.setColumn(0, "toptno", "");
  316. }
  317. function fGetPtNoList()
  318. {
  319. var sTemp = "";
  320. var sFromDD = ds_init.getColumn(0, "acptfromdd");
  321. var sToDD = ds_init.getColumn(0, "acpttodd");
  322. if( !utlf_isNull(ds_init.getColumn(0, "ptnocode")))
  323. {
  324. if( utlf_isNull(ds_init.getColumn(0, "fromyear")))
  325. {
  326. ds_init.setColumn(0, "fromyear", sFromDD.substr(2,2));
  327. }
  328. else
  329. {
  330. sTemp = ds_init.getColumn(0, "fromyear");
  331. ds_init.setColumn(0, "fromyear", sTemp.getLeftPad(2, "0"));
  332. }
  333. if( utlf_isNull(ds_init.getColumn(0, "toyear")))
  334. {
  335. ds_init.setColumn(0, "toyear", sToDD.substr(2,2));
  336. }
  337. else
  338. {
  339. sTemp = ds_init.getColumn(0, "toyear");
  340. ds_init.setColumn(0, "toyear", sTemp.getLeftPad(2, "0"));
  341. }
  342. if( utlf_isNull(ds_init.getColumn(0, "fromptno")))
  343. {
  344. ds_init.setColumn(0, "fromptno", "000000");
  345. }
  346. else
  347. {
  348. sTemp = ds_init.getColumn(0, "fromptno");
  349. ds_init.setColumn(0, "fromptno", sTemp.getLeftPad(6, "0"));
  350. }
  351. if( utlf_isNull(ds_init.getColumn(0, "toptno")))
  352. {
  353. ds_init.setColumn(0, "toptno", "999999");
  354. }
  355. else
  356. {
  357. sTemp = ds_init.getColumn(0, "toptno");
  358. ds_init.setColumn(0, "toptno", sTemp.getLeftPad(6, "0"));
  359. }
  360. }
  361. sTemp = ds_init.getColumn(0, "ptnocode");
  362. dsf_createDsRow("ds_send", [{col : "instcd", val : sysf_getUserInfo("dutplceinstcd")}
  363. ,{col : "acptfromdd", val : ds_init.getColumn(0, "acptfromdd")}
  364. ,{col : "acpttodd", val : ds_init.getColumn(0, "acpttodd")}
  365. ,{col : "refmthdcd", val : ds_init.getColumn(0, "refmthdcd")}
  366. ,{col : "refval", val : ds_init.getColumn(0, "refval")}
  367. ,{col : "ptnocode", val : sTemp.replace("-", "")}
  368. ,{col : "fromyear", val : ds_init.getColumn(0, "fromyear")}
  369. ,{col : "fromptno", val : ds_init.getColumn(0, "fromptno")}
  370. ,{col : "toyear", val : ds_init.getColumn(0, "toyear")}
  371. ,{col : "toptno", val : ds_init.getColumn(0, "toptno")}]);
  372. var oParam = {};
  373. oParam.id = "TRLPR01801";
  374. oParam.service = "plgyrsltmngtapp.TestRsltRgst";
  375. oParam.method = "reqGetPtNoList";
  376. oParam.inds = "reqdata=ds_send";
  377. oParam.outds = "ds_grd_ptnolist=refrslt";
  378. oParam.async = false;
  379. //oParam.callback = "cf_TRLPR01801";
  380. tranf_submit(oParam);
  381. if(grd_ptnolist.rowcount == 2)
  382. {
  383. ds_grd_ptnolist.rowposition = 1;
  384. fExePtNoListChoi(1);
  385. }
  386. if(grd_imglist.rowcount == 2)
  387. {
  388. ds_grd_ptnolist.rowposition = 1;
  389. fExeImgListChoi(1);
  390. }
  391. }
  392. //접수목록 선택 처리
  393. function fExePtNoListChoi(pRowNo)
  394. {
  395. fExePtNoChoi(pRowNo);
  396. if(grd_imglist.rowcount == 1)
  397. {
  398. fExeImgListChoi(0);
  399. }
  400. }
  401. //이미지목록 선택 처리
  402. function fExeImgListChoi(pRowNo)
  403. {
  404. fExeImgChoi(pRowNo);
  405. }
  406. //이미지 선택 처리
  407. function fExeImgChoi(pRow)
  408. {
  409. if(grd_imglist.currentcol == "9")
  410. {
  411. fGetAppImg(pRow);
  412. }
  413. else
  414. {
  415. fExeImgDisp(pRow);
  416. }
  417. }
  418. //선택 이미지 보여주기 처리 함수
  419. function fExeImgDisp(pRow)
  420. {
  421. ds_init.setColumn(0, "imgsrc", ds_grd_imglist.getColumn(pRow, "rsltimg"));
  422. }
  423. //접수 병리번호 선택 처리
  424. function fExePtNoChoi(pRow)
  425. {
  426. var iFindNo = 0;
  427. var sNode = ds_grd_ptnolist;
  428. if( grd_ptnolist.currentcol != 0)
  429. {
  430. for(var iNo = 0; iNo < ds_grd_ptnolist.rowcount; iNo++)
  431. {
  432. ds_grd_ptnolist.setColumn(iNo, "choi", "false");
  433. }
  434. ds_grd_ptnolist.setColumn(pRow, "choi", "true");
  435. }
  436. else
  437. {
  438. var iFindNo = ds_grd_ptnolist.findRow("choi", "true");
  439. if (iFindNo <= 0)
  440. {
  441. //img_src.src = "";
  442. ds_init.setColumn(0, "imgsrc", "");
  443. //img_src.refresh();
  444. }
  445. }
  446. ds_send.clearData();
  447. dsf_createDsRow("ds_send", [{col : "instcd", val : sysf_getUserInfo("dutplceinstcd")}
  448. ,{col : "pid", val : ds_grd_ptnolist.getColumn(pRow, "pid")}
  449. ,{col : "ptno", val : ds_grd_ptnolist.getColumn(pRow, "ptno")}
  450. ,{col : "bizflagcd", val : 'PR'}
  451. ,{col : "imgno", val : "0"}
  452. ,{col : "imgseqno", val : "0"}]);
  453. var oParam = {};
  454. oParam.id = "TRLPR01802";
  455. oParam.service = "plgyrsltmngtapp.TestRsltRgst";
  456. oParam.method = "reqGetImgInfo";
  457. oParam.inds = "reqData=ds_send";
  458. oParam.outds = "ds_grd_imglist=refrslt";
  459. oParam.async = false;
  460. //oParam.callback = "cf_TRLPR01802";
  461. tranf_submit(oParam);
  462. }
  463. function fExeAddRow()
  464. {
  465. for(var iNo = 0; iNo < ds_grd_ptnolist.rowcount; iNo++)
  466. {
  467. if(ds_grd_ptnolist.getColumn(iNo, "choi") == "true")
  468. {
  469. if( utlf_isNull(ds_grd_ptnolist.getColumn(iNo, "readdd")) || ds_grd_ptnolist.getColumn(iNo, "readdd") == "-")
  470. {
  471. }
  472. else
  473. {
  474. sysf_messageBox("최종진단된 결과이미지는 수정할 수 없습니다.", "E999");
  475. return;
  476. }
  477. }
  478. }
  479. var addRow = ds_grd_imglist.addRow();
  480. fExeImgRowSet(addRow);
  481. }
  482. function fExeImgRowSet(pRowNo)
  483. {
  484. var iNo = 0;
  485. var iFindNo = ds_grd_ptnolist.findRow("choi", "true");
  486. trace("iFindNo = " + iFindNo);
  487. var sNode = ds_grd_imglist;
  488. var sSrcNode = ds_grd_ptnolist;
  489. if(pRowNo ==0)
  490. {
  491. ds_grd_imglist.setColumn(pRowNo, "instcd", sysf_getUserInfo("dutplceinstcd"));
  492. ds_grd_imglist.setColumn(pRowNo, "pid", ds_grd_ptnolist.getColumn(iFindNo, "pid"));
  493. ds_grd_imglist.setColumn(pRowNo, "bizflagcd", "PR");
  494. ds_grd_imglist.setColumn(pRowNo, "ptno", ds_grd_ptnolist.getColumn(iFindNo, "ptno"));
  495. ds_grd_imglist.setColumn(pRowNo, "rgstdd", "-");
  496. ds_grd_imglist.setColumn(pRowNo, "rgsttm", "-");
  497. ds_grd_imglist.setColumn(pRowNo, "rgstrid", "-");
  498. ds_grd_imglist.setColumn(pRowNo, "rgstrnm", "-");
  499. ds_grd_imglist.setColumn(pRowNo, "imgno", "0");
  500. ds_grd_imglist.setColumn(pRowNo, "imgseqno", "0");
  501. ds_grd_imglist.setColumn(pRowNo, "imgpath", " ");
  502. ds_grd_imglist.setColumn(pRowNo, "rsltimg", " ");
  503. ds_grd_imglist.setColumn(pRowNo, "exists", "N");
  504. ds_grd_imglist.setColumn(pRowNo, "orgimgpath", "");
  505. }
  506. else
  507. {
  508. iNo = Number(pRowNo) - 1;
  509. ds_grd_imglist.setColumn(pRowNo, "instcd", ds_grd_imglist.getColumn(iNo, "instcd"));
  510. ds_grd_imglist.setColumn(pRowNo, "pid", ds_grd_imglist.getColumn(iNo, "pid"));
  511. ds_grd_imglist.setColumn(pRowNo, "bizflagcd", ds_grd_imglist.getColumn(iNo, "bizflagcd"));
  512. ds_grd_imglist.setColumn(pRowNo, "ptno", ds_grd_imglist.getColumn(iNo, "ptno"));
  513. ds_grd_imglist.setColumn(pRowNo, "rgstdd", ds_data_sysdtinfo.getColumn(0, "sysdd"));
  514. ds_grd_imglist.setColumn(pRowNo, "rgsttm", ds_data_sysdtinfo.getColumn(0, "systm"));
  515. ds_grd_imglist.setColumn(pRowNo, "rgstrid", sysf_getUserInfo("userid"));
  516. ds_grd_imglist.setColumn(pRowNo, "rgstrnm", sysf_getUserInfo("usernm"));
  517. ds_grd_imglist.setColumn(pRowNo, "imgno", ds_grd_imglist.getColumn(iNo, "imgno"));
  518. ds_grd_imglist.setColumn(pRowNo, "imgseqno", "0");
  519. ds_grd_imglist.setColumn(pRowNo, "imgpath", " ");
  520. ds_grd_imglist.setColumn(pRowNo, "rsltimg", " ");
  521. ds_grd_imglist.setColumn(pRowNo, "exists", "N");
  522. ds_grd_imglist.setColumn(pRowNo, "orgimgpath", "");
  523. }
  524. fGetAppImg(pRowNo);
  525. }
  526. //이미지 선택 처리
  527. function fGetAppImg(pRow)
  528. {
  529. var fd = new FileDialog;
  530. fd.filter = "JPEG Files(*.jpg)|*.jpg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp";
  531. var vFile = fd.open("FileOpen", FileDialog.LOAD);
  532. if(utlf_isNull(vFile))
  533. {
  534. return;
  535. }
  536. //파일 열기
  537. vFile.open(VirtualFile.openRead | VirtualFile.openBinary);
  538. vFile.seek(0,VirtualFile.seekBegin);
  539. //데이터 BLOB으로 만들기
  540. var bData = new Buffer(vFile.read(vFile.getFileSize()));
  541. ds_grd_imglist.setColumn(pRow, "imgpath", vFile.path+vFile.filename);
  542. ds_grd_imglist.setColumn(pRow, "rsltimg", bData.data);
  543. ds_init.setColumn(0, "imgsrc", bData.data);
  544. }
  545. function fExeDelRow()
  546. {
  547. for(var iNo = 0; iNo < ds_grd_ptnolist.rowcount; iNo++)
  548. {
  549. if(ds_grd_ptnolist.getColumn(iNo, "choi") == "true")
  550. {
  551. if( utlf_isNull(ds_grd_ptnolist.getColumn(iNo, "readdd")) || ds_grd_ptnolist.getColumn(iNo, "readdd") == "-")
  552. {
  553. }
  554. else
  555. {
  556. sysf_messageBox("최종진단된 결과이미지는 수정할 수 없습니다.", "E999");
  557. return;
  558. }
  559. }
  560. }
  561. sNode= ds_grd_imglist;
  562. if(ds_grd_imglist.getColumn(ds_grd_imglist.rowposition, "exists") == "N")
  563. {
  564. ds_grd_imglist.deleteRow(ds_grd_imglist.rowposition);
  565. }
  566. else
  567. {
  568. ds_grd_imglist.setColumn(ds_grd_imglist.rowposition, "exists", "D");
  569. var arrPostion = new Array();
  570. arrPostion[0] = ds_grd_imglist.rowposition;
  571. grdf_setStatus(grd_imglist, "D", arrPostion);
  572. }
  573. }
  574. function fExeImgSave()
  575. {
  576. var re = /\\/g;
  577. var iRowNo = 1;
  578. var sNode = ds_grd_imglist;
  579. var sImgPath = "";
  580. var sRowNo = ds_grd_ptnolist.rowposition;
  581. for(var iNo = 0; iNo < ds_grd_ptnolist.rowcount; iNo++)
  582. {
  583. if(ds_grd_ptnolist.getColumn(iNo, "choi") == "true")
  584. {
  585. if( utlf_isNull(ds_grd_ptnolist.getColumn(iNo, "readdd")) || ds_grd_ptnolist.getColumn(iNo, "readdd") == "-")
  586. {
  587. }
  588. else
  589. {
  590. sysf_messageBox("최종진단된 결과이미지는 수정할 수 없습니다.", "E999");
  591. return;
  592. }
  593. }
  594. }
  595. if(sRowNo < 0)
  596. {
  597. sysf_messageBox("접수목록에서 검사를 선택하여 주세요.", "E999");
  598. return;
  599. }
  600. dsf_createDs("ds_imglist");
  601. trace("ds_grd_imglist.rowcount = " +ds_grd_imglist.rowcount);
  602. for(var iNo = 0; iNo < ds_grd_imglist.rowcount; iNo++)
  603. {
  604. if(ds_grd_imglist.getColumn(iNo, "exists") =="D")
  605. {
  606. ds_grd_imglist.setColumn(iNo, "status", "d");
  607. ds_imglist.copyData(ds_grd_imglist, true);
  608. }
  609. else
  610. {
  611. ds_grd_imglist.setColumn(iNo, "status", "i");
  612. ds_grd_imglist.setColumn(iNo, "imgseqno", iRowNo++);
  613. ds_imglist.copyData(ds_grd_imglist, true);
  614. }
  615. }
  616. //return;
  617. var oParam = {};
  618. oParam.id = "TXLPR01801";
  619. oParam.service = "plgyrsltmngtapp.TestRsltRgst";
  620. oParam.method = "reqExeImgList";
  621. oParam.inds = "reqData=ds_imglist";
  622. oParam.async = false;
  623. //oParam.callback = "cf_TXLPR01801";
  624. tranf_submit(oParam);
  625. fExePtNoChoi(sRowNo);
  626. ds_init.setColumn(0, "imgsrc", "");
  627. }
  628. //조회
  629. function group2_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  630. {
  631. fGetPtNoList();
  632. }
  633. function group2_ipt_cncltodd_onkeyup(obj:Calendar, e:KeyEventInfo)
  634. {
  635. if(e.keycode == 13)
  636. {
  637. fGetPtNoList();
  638. }
  639. }
  640. //접수목록 선택 처리
  641. function grd_ptnolist_oncellclick(obj:Grid, e:GridClickEventInfo)
  642. {
  643. fExePtNoListChoi(ds_grd_ptnolist.rowposition);
  644. }
  645. //행추가
  646. function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
  647. {
  648. fExeAddRow();
  649. }
  650. //행삭제
  651. function btn_delrow_onclick(obj:Button, e:ClickEventInfo)
  652. {
  653. fExeDelRow();
  654. }
  655. //저장
  656. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  657. {
  658. fExeImgSave();
  659. }
  660. //이미지 목록 찾기
  661. function grd_imglist_oncellclick(obj:Grid, e:GridClickEventInfo)
  662. {
  663. if(obj.currentcol == 9)
  664. {
  665. fGetAppImg(ds_grd_imglist.rowposition);
  666. }
  667. for(var iNo = 0; iNo < ds_grd_ptnolist.rowcount; iNo++)
  668. {
  669. //if(model.getValue("/root/main/ptnoinfo/ptnolist["+ iNo +"]/choi") == "true")
  670. if(ds_grd_ptnolist.getColumn(iNo, "choi") == "true")
  671. {
  672. //if((model.getValue("/root/main/ptnoinfo/ptnolist["+ iNo +"]/readdd") == "") || (model.getValue("/root/main/ptnoinfo/ptnolist["+ iNo +"]/readdd") == "-"))
  673. if( utlf_isNull(ds_grd_ptnolist.getColumn(iNo, "readdd")) || ds_grd_ptnolist.getColumn(iNo, "readdd") == "-")
  674. {
  675. }
  676. else
  677. {
  678. sysf_messageBox("최종진단된 결과이미지는 수정할 수 없습니다.", "E999");
  679. return;
  680. }
  681. }
  682. }
  683. fExeImgListChoi(ds_grd_imglist.rowposition);
  684. }
  685. function group2_ipt_seaval_onkeyup(obj:Edit, e:KeyEventInfo)
  686. {
  687. if(e.keycode ==13)
  688. {
  689. ds_init.setColumn(0, "refval", group2.ipt_seaval.value);
  690. fGetPtNoList();
  691. }
  692. }
  693. ]]></Script>
  694. </Form>
  695. </FDL>