SPLPP02400_관련병리번호수정사유.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPLPP02400" position="absolute 0 0 846 490" titletext="관련병리번호수정사유" class="frm_POP" onload="SPLPP02400_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="Static02" class="sta_DA_box" position="absolute 12 46 834 72" anchor="top right"/>
  8. <Button id="btn_save" class="btn4" taborder="7" visible="false" position="absolute 714 458 770 478" anchor="default" positiontype="position" text="저장" onclick="btn_save_onclick"/>
  9. <Button id="btn_close" class="btn4" taborder="7" position="absolute 776 458 832 478" anchor="default" positiontype="position" text="닫기" visible="true" onclick="btn_close_onclick"/>
  10. <Edit id="edt_pid" taborder="8" readonly="true" position="absolute 76 49 157 69" positiontype="position"/>
  11. <TextArea id="tar_chresn" taborder="9" position="absolute 12 102 834 217" imemode="hangul" positiontype="position"/>
  12. <Edit id="edt_pnm" taborder="10" readonly="true" position="absolute 222 49 304 69" positiontype="position"/>
  13. <Edit id="edt_ptno" taborder="11" readonly="true" position="absolute 370 49 452 69" positiontype="position"/>
  14. <Edit id="edt_bfptno" taborder="12" readonly="true" position="absolute 557 49 639 69" positiontype="position"/>
  15. <Edit id="edt_afptno" taborder="13" readonly="true" position="absolute 744 49 831 69" positiontype="position"/>
  16. <Static id="cap_ptnm" text="환 자 명" class="cell_1" position="absolute 160 47 219 71" positiontype="position"/>
  17. <Static id="cap_pid" text="등록번호" class="cell_1" position="absolute 13 47 73 71" positiontype="position"/>
  18. <Static id="cap_ptno" text="병리번호" class="cell_1" position="absolute 307 47 367 71" positiontype="position"/>
  19. <Static id="cap_afptno" text="변경후 병리번호" class="cell_1" position="absolute 642 47 741 71" positiontype="position"/>
  20. <Static id="cap_bfptno" text="변경전 병리번호" class="cell_1" position="absolute 455 47 554 71" positiontype="position"/>
  21. <Static id="cap_resnlist" text="변경 이력" class="tit_2" position="absolute 12 227 102 247" positiontype="position"/>
  22. <Grid id="grd_chngresnlist" taborder="14" useinputpanel="false" position="absolute 12 247 834 455" binddataset="ds_grid_grd_chngresnlist" positiontype="position">
  23. <Formats>
  24. <Format id="default">
  25. <Columns>
  26. <Column size="80"/>
  27. <Column size="80"/>
  28. <Column size="80"/>
  29. <Column size="480"/>
  30. <Column size="75"/>
  31. <Column size="0"/>
  32. <Column size="0"/>
  33. </Columns>
  34. <Rows>
  35. <Row size="24" band="head"/>
  36. <Row size="24"/>
  37. </Rows>
  38. <Band id="head">
  39. <Cell text="변경일자"/>
  40. <Cell col="1" text="변경전"/>
  41. <Cell col="2" text="변경후"/>
  42. <Cell col="3" text="변경 사유"/>
  43. <Cell col="4" text="변경자"/>
  44. <Cell col="5" text="ptno"/>
  45. <Cell col="6" text="pid"/>
  46. </Band>
  47. <Band id="body">
  48. <Cell text="bind:udptdd"/>
  49. <Cell col="1" text="bind:bfrelaptno"/>
  50. <Cell col="2" text="bind:afrelaptno"/>
  51. <Cell col="3" style="align:left;" text="bind:chngresn"/>
  52. <Cell col="4" text="bind:updtusernm"/>
  53. <Cell col="5" text="bind:ptno"/>
  54. <Cell col="6" text="bind:pid"/>
  55. </Band>
  56. </Format>
  57. </Formats>
  58. </Grid>
  59. <Static id="cap_chresn" text="변경 사유" class="tit_2" position="absolute 12 82 102 102" positiontype="position"/>
  60. <Static id="stt_titleText" text="관련병리번호수정 사유" class="sta_POP_title" position="absolute 12 8 193 28"/>
  61. <Button id="btn_cls" taborder="16" class="btn_POP_cls" position="absolute 822 12 836 25" onclick="btn_close_onclick"/>
  62. </Layout>
  63. </Layouts>
  64. <Objects>
  65. <Dataset id="ds_grid_grd_chngresnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  66. <ColumnInfo>
  67. <Column id="udptdd" type="STRING"/>
  68. <Column id="bfrelaptno" type="STRING"/>
  69. <Column id="afrelaptno" type="STRING"/>
  70. <Column id="chngresn" type="STRING"/>
  71. <Column id="updtusernm" type="STRING"/>
  72. <Column id="ptno" type="STRING"/>
  73. <Column id="pid" type="STRING"/>
  74. </ColumnInfo>
  75. </Dataset>
  76. <Dataset id="ds_patinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  77. <ColumnInfo>
  78. <Column id="instcd" type="STRING"/>
  79. <Column id="pid" type="STRING"/>
  80. <Column id="patnm" type="STRING"/>
  81. </ColumnInfo>
  82. </Dataset>
  83. <Dataset id="ds_saveyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  84. <ColumnInfo>
  85. <Column id="saveyn" type="STRING"/>
  86. </ColumnInfo>
  87. </Dataset>
  88. </Objects>
  89. <Bind>
  90. <BindItem id="item0" compid="edt_pid" propid="bindgestureset" datasetid="ds_grid_grd_chngresnlist" columnid="pid"/>
  91. <BindItem id="item1" compid="grd_chngresnlist" propid="binddataset" datasetid="ds_grid_grd_chngresnlist" columnid=""/>
  92. <BindItem id="item2" compid="edt_pnm" propid="bindgestureset" datasetid="ds_patinfo" columnid="patnm"/>
  93. <BindItem id="item3" compid="edt_ptno" propid="bindgestureset" datasetid="ds_grid_grd_chngresnlist" columnid="ptno"/>
  94. <BindItem id="item4" compid="edt_bfptno" propid="bindgestureset" datasetid="ds_grid_grd_chngresnlist" columnid="bfrelaptno"/>
  95. <BindItem id="item5" compid="edt_afptno" propid="bindgestureset" datasetid="ds_grid_grd_chngresnlist" columnid="afrelaptno"/>
  96. </Bind>
  97. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  98. * System Name : KU2.0
  99. * Job Name :
  100. * File Name : SPLPP02400_관련병리번호수정사유.xfdl
  101. * Creator :
  102. * Make Date : 2015-11-11
  103. *
  104. * Description :
  105. *---------------------------------------------------------------------------------------
  106. * Modify Date Modifier Modify Description
  107. *---------------------------------------------------------------------------------------
  108. * 2015-11-11 DBS Converting Program(TF->XP)
  109. *
  110. *---------------------------------------------------------------------------------------
  111. ****************************************************************************************/
  112. //=======================================================================================
  113. // xjs Include
  114. //---------------------------------------------------------------------------------------
  115. include "com_commonxp::comm_main.xjs";
  116. include "lis_commonxp::LPZ001.xjs";
  117. var lgv_sPtNo = "";
  118. var lgv_sBfRelaPtNo = "-";
  119. var lgv_sAfRelaPtNo = "-";
  120. var lgv_sResnTxt = "";
  121. //=======================================================================================
  122. // Function
  123. //---------------------------------------------------------------------------------------
  124. function lf_exeInitialize(){
  125. lgv_sPtNo = (opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"ptno")).replace("-","");
  126. if( opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"relaptno")!="-" ){
  127. lgv_sBfRelaPtNo = (opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"relaptno")).replace("-","");
  128. }
  129. if( plgv_sRelaPtNo != "-"){
  130. lgv_sAfRelaPtNo = plgv_sRelaPtNo.replace("-","");
  131. }
  132. edt_pid.value = opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"pid");
  133. edt_pnm.value = opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"hngnm"); //수정 : 테스트데이터셋 값을 부모화면에서 받은 값으로.
  134. ds_saveyn.setColumn(0,"saveyn","0");
  135. if(lgv_sPtNo.length > 1){
  136. edt_ptno.value = lgv_sPtNo.substr(0,lgv_sPtNo.length-6) + "-" + lgv_sPtNo.substr(lgv_sPtNo.length-6,6);
  137. }
  138. if(lgv_sBfRelaPtNo.length > 1){
  139. edt_bfptno.value = lgv_sBfRelaPtNo.substr(0, lgv_sBfRelaPtNo.length-6) + "-" + lgv_sBfRelaPtNo.substr(lgv_sBfRelaPtNo.length-6,6);
  140. }
  141. if(lgv_sAfRelaPtNo.length > 0){
  142. edt_afptno.value = lgv_sAfRelaPtNo.substr(0,lgv_sAfRelaPtNo.length-6) + "-" + lgv_sAfRelaPtNo.substr(lgv_sAfRelaPtNo.length-6,6);
  143. btn_save.visible="true";
  144. }
  145. if (plgv_sFlag == "SEARCH") {
  146. btn_save.visible = false;
  147. tar_chresn.enable = false;
  148. } else {
  149. btn_save.visible = true;
  150. tar_chresn.enable = true;
  151. }
  152. lf_exeSelRsntLis(1);
  153. }
  154. function lf_exeSaveData(){
  155. var lgv_sResnTxt = tar_chresn.text;
  156. if(lgv_sResnTxt.getLength() > 0){
  157. lf_exeSelRsntLis(2);
  158. //수정 : 메인에서 관련병리번호 전송한거 받아야함
  159. ds_test_1.setColumn(0,"afptno", lgv_sAfRelaPtNo);
  160. ds_saveyn.setColumn(0,"saveyn","1");
  161. lf_exeWindowClose();
  162. } else {
  163. sysf_messageBox("관련번호 변경 사유를","C001","");
  164. }
  165. }
  166. //변경사유 이력조회
  167. function lf_exeSelRsntLis(nKindCd){
  168. var sTmpAFPTNO = "";
  169. var sTmpBFPTNO = "";
  170. // nKindCd : 1.data select , 2.data insert
  171. if (nKindCd == 1){
  172. //데이터셋 동적생성
  173. var sInDsName = dsf_createDsRow("ds_temp_search"
  174. , [{col: "instcd" , val: sysf_getUserInfo("posinstcd") }
  175. , {col: "pid" , val: opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"pid")} //edt_pid.value
  176. , {col: "ptno" , val: lgv_sPtNo}
  177. , {col: "datakind" , val: nKindCd} ]);
  178. tranf_submit({
  179. id: "TRLPP02401"
  180. , service: "plgyrefmngtapp.AcptSpecRef"
  181. , method: "reqRelaptnoResnInfo"
  182. , inds : "refData="+sInDsName
  183. , outds: "ds_grid_grd_chngresnlist=ptnochngresnlist"
  184. , callback: "cbf_TRLPP02401"
  185. , async: false
  186. });
  187. } else if(nKindCd == 2){
  188. var sInDsName2 = dsf_createDsRow("ds_temp_search"
  189. , [{col: "instcd" , val:sysf_getUserInfo("posinstcd") }
  190. , {col: "pid" , val:opener.ds_grid_grd_workrsltlist.getColumn(opener.ds_grid_grd_workrsltlist.rowposition,"pid")} //edt_pid.value
  191. , {col: "ptno" , val:lgv_sPtNo}
  192. , {col: "bfrelaptno", val:lgv_sBfRelaPtNo }
  193. , {col: "afrelaptno", val:lgv_sAfRelaPtNo } //edt_pid.value
  194. , {col: "updtuserid", val:sysf_getUserId() }
  195. , {col: "chngresn" , val:lgv_sResnTxt}
  196. , {col: "datakind" , val: nKindCd}
  197. , {col: "workflag" , val: plgv_sFlag} ]);
  198. tranf_submit({ id: "TXLPR02401"
  199. , service: "plgyrefmngtapp.AcptSpecRef"
  200. , method: "reqRelaptnoResnInfo"
  201. , inds : "refData="+sInDsName2
  202. , outds: "ds_grid_grd_chngresnlist=ptnochngresnlist"
  203. , callback: "cbf_TRLPP02401"
  204. , async: false
  205. });
  206. }
  207. }
  208. function cbf_TRLPP02401(strSvcID, nErrorCode, strErrorMag)
  209. {
  210. if(nErrorCode != 0) {
  211. sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  212. return;
  213. }
  214. if (strSvcID == "TXLPR02401") {
  215. var objRetVal = new Object();
  216. objRetVal.plgv_sRelaPtNo = lgv_sAfRelaPtNo;
  217. objRetVal.plgv_sSaveYn = "Y";
  218. this.close(objRetVal);
  219. } else {
  220. tar_chresn.setFocus();
  221. }
  222. }
  223. function lf_exeWindowClose(){
  224. var objRetVal = new Object();
  225. objRetVal.plgv_sRelaPtNo = "";
  226. objRetVal.plgv_sSaveYn = "N";
  227. this.close(objRetVal);
  228. }
  229. function lf_exeSaveData(){
  230. tar_chresn.value = tar_chresn.text;
  231. lgv_sResnTxt = tar_chresn.value;
  232. //관련병리번호 변경 이력 저장
  233. if(lgv_sResnTxt.length>0){
  234. lf_exeSelRsntLis(2);
  235. } else {
  236. sysf_messageBox("관련번호 병경 사유를","C001");
  237. }
  238. }
  239. //=======================================================================================
  240. // Event
  241. //---------------------------------------------------------------------------------------
  242. /****************************************************************************************
  243. * Components :
  244. * Components ID : SPLPP02400
  245. * Event : onload
  246. * Argument : 01.obj : Object Event has occurred
  247. * : 02.e : Event Object
  248. * Description :
  249. ****************************************************************************************/
  250. function SPLPP02400_onload(obj:Form, e:LoadEventInfo)
  251. {
  252. frmf_initForm(obj); // 화면공통
  253. lf_exeInitialize();
  254. }
  255. /****************************************************************************************
  256. * Components :
  257. * Components ID : btn_cls
  258. * Event : onclick
  259. * Argument : 01.obj : Object Event has occurred
  260. * : 02.e : Event Object
  261. * Description :
  262. ****************************************************************************************/
  263. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  264. {
  265. lf_exeWindowClose();
  266. }
  267. /****************************************************************************************
  268. * Components :
  269. * Components ID : btn_save
  270. * Event : onclick
  271. * Argument : 01.obj : Object Event has occurred
  272. * : 02.e : Event Object
  273. * Description :
  274. ****************************************************************************************/
  275. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  276. {
  277. lf_exeSaveData();
  278. }
  279. ]]></Script>
  280. </Form>
  281. </FDL>