SPPMC02010_보호자연락처관리.xfdl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPMC02010" position="absolute 0 0 716 300" titletext="보호자연락처관리" onload="SPPMC02010_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button position="absolute 651 273 707 295" id="btn_cancel" class="btn4" taborder="7" text="닫기" onclick="btn_cancel_onclick"/>
  8. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 75 707 81" style="strokepen:3 solid #33bbbbff;"/>
  9. <Static id="caption1" text="통장입금내역" class="tit_2" position="absolute 5 -65 113 19"/>
  10. <Grid id="datagrid1" taborder="8" binddataset="ds_main_protlist" useinputpanel="false" position="absolute 0 79 707 269" oncelldblclick="datagrid1_oncelldblclick">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="25"/>
  15. <Column size="70"/>
  16. <Column size="70"/>
  17. <Column size="82"/>
  18. <Column size="70"/>
  19. <Column size="111"/>
  20. <Column size="266"/>
  21. <Column size="0"/>
  22. <Column size="0"/>
  23. </Columns>
  24. <Rows>
  25. <Row size="24" band="head"/>
  26. <Row size="24"/>
  27. </Rows>
  28. <Band id="head">
  29. <Cell/>
  30. <Cell col="1" text="등록번호"/>
  31. <Cell col="2" text="환자성명"/>
  32. <Cell col="3" text="관계"/>
  33. <Cell col="4" text="보호자성명"/>
  34. <Cell col="5" text="연락처"/>
  35. <Cell col="6" text="비고"/>
  36. <Cell col="7" text="pid"/>
  37. <Cell col="8" text="seqno"/>
  38. </Band>
  39. <Band id="body">
  40. <Cell celltype="head"/>
  41. <Cell col="1" style="align:center middle;" text="bind:pid"/>
  42. <Cell col="2" style="align:center middle;" text="bind:hngnm"/>
  43. <Cell col="3" displaytype="combo" edittype="combo" text="bind:protflag" combodataset="ds_init_protflag" combocodecol="value" combodatacol="label"/>
  44. <Cell col="4" displaytype="text" edittype="text" text="bind:name"/>
  45. <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:phone"/>
  46. <Cell col="6" displaytype="text" edittype="text" text="bind:remark"/>
  47. <Cell col="7" text="bind:pid"/>
  48. <Cell col="8" text="bind:seqno"/>
  49. </Band>
  50. </Format>
  51. </Formats>
  52. </Grid>
  53. <Static id="caption2" text="보호자 연락처" class="tit_2" position="absolute 5 58 114 75"/>
  54. <Button id="button1" taborder="9" text="초기화" class="btn2" position="absolute 448 54 501 73" onclick="button1_onclick"/>
  55. <Button id="button2" taborder="10" text="추가" class="btn2" position="absolute 503 54 545 73" onclick="button2_onclick"/>
  56. <Button id="button3" taborder="11" text="삭제" class="btn2" position="absolute 547 54 589 73" onclick="button3_onclick"/>
  57. <Button id="button4" taborder="12" text="저장" class="btn5" position="absolute 591 54 633 73" onclick="button4_onclick"/>
  58. <Static id="caption5" text="인적사항" class="tit_2" position="absolute 5 0 89 16"/>
  59. <Button id="button7" taborder="19" text="엑셀저장" class="btn2" position="absolute 643 54 707 73" onclick="button7_onclick"/>
  60. <Div id="grp" taborder="20" position="absolute 0 19 707 49" class="div_SA2">
  61. <Layouts>
  62. <Layout>
  63. <Edit id="input1" taborder="0" position="absolute 105 5 171 24" onkeydown="grp_input1_onkeydown"/>
  64. <Static id="caption3" text="등록번호 :" class="search_name" position="absolute 9 6 94 23"/>
  65. <Button id="button5" taborder="1" text="조회" class="btn1" position="absolute 640 4 696 26" onclick="grp_button5_onclick"/>
  66. <Edit id="input2" taborder="2" enable="false" position="absolute 171 5 234 24"/>
  67. <Button id="button6" taborder="3" class="icon_search" position="absolute 86 8 102 21" onclick="grp_button6_onclick"/>
  68. <Static id="caption4" text="조회구분 :" class="search_name" position="absolute 260 6 360 23"/>
  69. <Radio id="radio1" taborder="4" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 332 5 447 25" style="textpadding:0 2 0 4;padding:1 1 0 2;" onitemchanged="grp_radio1_onitemchanged" columncount="-1" index="-1" rowcount="-1">
  70. <Dataset id="innerdataset">
  71. <ColumnInfo>
  72. <Column id="codecolumn"/>
  73. <Column id="datacolumn"/>
  74. </ColumnInfo>
  75. <Rows>
  76. <Row>
  77. <Col id="codecolumn">1</Col>
  78. <Col id="datacolumn">환자</Col>
  79. </Row>
  80. <Row>
  81. <Col id="codecolumn">2</Col>
  82. <Col id="datacolumn">보호자</Col>
  83. </Row>
  84. </Rows>
  85. </Dataset>
  86. </Radio>
  87. <Static id="caption6" text="보호자성명 :" class="search_name" position="absolute 460 6 560 23"/>
  88. <Edit id="input3" taborder="5" enable="false" position="absolute 550 5 613 24" onkeydown="grp_input3_onkeydown"/>
  89. </Layout>
  90. </Layouts>
  91. </Div>
  92. </Layout>
  93. </Layouts>
  94. <Objects>
  95. <Dataset id="ds_main_protlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  96. <ColumnInfo>
  97. <Column id="pid" type="STRING" size="256" sumtext="환자 등록번호"/>
  98. <Column id="hngnm" type="STRING" size="256" sumtext="환자성명"/>
  99. <Column id="protflag" type="STRING" size="256" sumtext="환자와의 관계"/>
  100. <Column id="name" type="STRING" size="256" sumtext="보호자 성명"/>
  101. <Column id="phone" type="STRING" size="256" sumtext="보호자 연락처"/>
  102. <Column id="remark" type="STRING" size="256" sumtext="비고"/>
  103. <Column id="seqno" type="STRING" size="256" sumtext="순번"/>
  104. </ColumnInfo>
  105. </Dataset>
  106. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  107. <ColumnInfo>
  108. <Column id="pid" type="STRING" size="256"/>
  109. <Column id="srchcnd" type="STRING" size="256"/>
  110. <Column id="prothngnm" type="STRING" size="256"/>
  111. </ColumnInfo>
  112. <Rows>
  113. <Row>
  114. <Col id="srchcnd">1</Col>
  115. </Row>
  116. </Rows>
  117. </Dataset>
  118. <Dataset id="ds_main_patinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  119. <ColumnInfo>
  120. <Column id="hngnm" type="STRING" size="256"/>
  121. <Column id="patinfolist" type="STRING" size="256"/>
  122. </ColumnInfo>
  123. <Rows>
  124. <Row/>
  125. </Rows>
  126. </Dataset>
  127. <Dataset id="ds_patinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  128. <Dataset id="ds_tmp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  129. <Dataset id="ds_init_protflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  130. <ColumnInfo>
  131. <Column id="label" type="STRING" size="256"/>
  132. <Column id="value" type="STRING" size="256"/>
  133. </ColumnInfo>
  134. <Rows>
  135. <Row>
  136. <Col id="label">본인</Col>
  137. <Col id="value">1</Col>
  138. </Row>
  139. <Row>
  140. <Col id="label">배우자</Col>
  141. <Col id="value">2</Col>
  142. </Row>
  143. <Row>
  144. <Col id="label">자녀</Col>
  145. <Col id="value">3</Col>
  146. </Row>
  147. <Row>
  148. <Col id="label">부모</Col>
  149. <Col id="value">4</Col>
  150. </Row>
  151. <Row>
  152. <Col id="label">기타</Col>
  153. <Col id="value">5</Col>
  154. </Row>
  155. </Rows>
  156. </Dataset>
  157. </Objects>
  158. <Bind>
  159. <BindItem id="item0" compid="grp.input1" propid="value" datasetid="ds_send" columnid="pid"/>
  160. <BindItem id="item1" compid="grp.input2" propid="value" datasetid="ds_main_patinfo" columnid="hngnm"/>
  161. <BindItem id="item2" compid="grp.radio1" propid="value" datasetid="ds_send" columnid="srchcnd"/>
  162. <BindItem id="item3" compid="grp.input3" propid="value" datasetid="ds_send" columnid="prothngnm"/>
  163. </Bind>
  164. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  165. * System Name :
  166. * Job Name :
  167. * Creator :
  168. * Make Date : 2016-05-24
  169. * Description :
  170. *---------------------------------------------------------------------------------------
  171. * Modify Date Modifier Modify Description
  172. *---------------------------------------------------------------------------------------
  173. * 2016-05-24 Live Converter TF->XP
  174. *
  175. *---------------------------------------------------------------------------------------
  176. ****************************************************************************************/
  177. //=======================================================================================
  178. // Lib Include
  179. //---------------------------------------------------------------------------------------
  180. include 'com_commonxp::comm_main.xjs';
  181. var arErrorCode = new HashArray();
  182. //=======================================================================================
  183. // Local methods
  184. //---------------------------------------------------------------------------------------
  185. /****************************************************************************************
  186. * Argument :
  187. * Description : fSearch
  188. ****************************************************************************************/
  189. function fSearch(){
  190. var srchCnd = utlf_transNullToEmpty(ds_send.getColumn(0, 'srchcnd'));
  191. var sPid = ds_send.getColumn(0, 'pid');
  192. if(srchCnd == '' && srchCnd == '1'){
  193. alert('환자조회 시 환자정보는 필수입니다.');
  194. return;
  195. }
  196. ds_main_protlist.clearData();
  197. ds_main_protlist.addRow();
  198. // 재조회
  199. var oParam = {};
  200. oParam.id = "TRPMC01404";
  201. oParam.service = "patinfomngtapp.PatBaseInfo";
  202. oParam.method = "reqGetProtList";
  203. oParam.inds = "req=ds_send";
  204. oParam.outds = "ds_main_protlist=protlist";
  205. oParam.async = false;
  206. //oParam.callback = "cf_TRPMC01404";
  207. tranf_submit(oParam);
  208. if(ds_main_protlist.rowcount < 1){
  209. alert('검색결과가 존재하지 않습니다.');
  210. }
  211. }
  212. //=======================================================================================
  213. // callback
  214. //---------------------------------------------------------------------------------------
  215. function callback(sSvcId, nErrorCode, sErrorMsg){
  216. arErrorCode.push(sSvcId, nErrorCode);
  217. }
  218. //=======================================================================================
  219. // Events
  220. //---------------------------------------------------------------------------------------
  221. /****************************************************************************************
  222. * Argument :
  223. * Description : onload
  224. ****************************************************************************************/
  225. function SPPMC02010_onload(obj:Form, e:LoadEventInfo){
  226. frmf_initForm(obj);
  227. if(frmf_isPopup()){
  228. var sPid = utlf_transNullToEmpty(opener.frmf_getParameter('SPPMC02010_PID'));
  229. var sHngnm = opener.frmf_getParameter('SPPMC02010_HNGNM');
  230. if(sPid == ''){
  231. //
  232. }
  233. else{
  234. ds_send.setColumn(0, 'pid', sPid);
  235. ds_main_patinfo.setColumn(0, 'hngnm', sHngnm);
  236. fSearch();
  237. }
  238. }
  239. grdf_setRowTypeIcon(datagrid1, 0);
  240. }
  241. /****************************************************************************************
  242. * Argument :
  243. * Description : 등록번호 검색 아이콘 클릭 이벤트
  244. ****************************************************************************************/
  245. function grp_button6_onclick(obj:Button, e:ClickEventInfo){
  246. var ptbs_pid = utlf_transNullToEmpty(ds_send.getColumn(0, 'pid'));
  247. dsf_createDsRow('ds_req', [
  248. { col: 'pid', type: '', size: 256, val: '' },
  249. { col: 'srchcond', type: '', size: 256, val: '' },
  250. { col: 'checkfnexam', type: '', size: 256, val: '' },
  251. { col: 'autoflag', type: '', size: 256, val: '' }
  252. ], false);
  253. if(ptbs_pid == '' || ptbs_pid == ' '){
  254. // do nothing
  255. }
  256. else{
  257. ds_req.setColumn(0, 'pid', ptbs_pid);
  258. ds_req.setColumn(0, 'srchcond', '1');
  259. }
  260. ds_req.setColumn(0, 'checkfnexam', '1');
  261. ds_req.setColumn(0, 'autoflag', 'Y'); // 조회내역이 1건인 경우 자동 화면 닫기
  262. frmf_modal("SPPMC02500", "SPPMC02500", { arg_ds_send: ds_req }, "", '', '', '', "", "", "", "", "", "M");
  263. if(frmf_getParameter('SPPMC02500_popupendflag') == 'ok'){
  264. ds_send.setColumn(0, 'pid', ds_patinfolist.getColumn(0, 'pid'));
  265. ds_main_patinfo.setColumn(0, 'hngnm', ds_patinfolist.getColumn(0, 'hngnm'));
  266. fSearch();
  267. }
  268. else{
  269. return;
  270. }
  271. }
  272. /****************************************************************************************
  273. * Argument :
  274. * Description : 등록번호 input1 키보드 입력 이벤트
  275. ****************************************************************************************/
  276. function grp_input1_onkeydown(obj:Edit, e:KeyEventInfo){
  277. if(e.keycode == 13){
  278. obj.updateToDataset();
  279. grp.button6.click();
  280. }
  281. }
  282. /****************************************************************************************
  283. * Argument :
  284. * Description : 조회구분 라디오 아이템 변경 이벤트
  285. ****************************************************************************************/
  286. function grp_radio1_onitemchanged(obj:Radio, e:ItemChangeEventInfo){
  287. var srchCnd = ds_send.getColumn(0, 'srchcnd');
  288. if(srchCnd == '1'){
  289. ds_send.setColumn(0, 'prothngnm', '');
  290. grp.input3.enable = false;
  291. grp.input1.enable = true;
  292. }
  293. else{
  294. ds_send.setColumn(0, 'pid', '');
  295. ds_main_patinfo.setColumn(0, 'hngnm', '');
  296. grp.input3.enable = true;
  297. grp.input1.enable = false;
  298. }
  299. }
  300. /****************************************************************************************
  301. * Argument :
  302. * Description : 보호자성명 키보드 입력 이벤트
  303. ****************************************************************************************/
  304. function grp_input3_onkeydown(obj:Edit, e:KeyEventInfo){
  305. if(e.keycode == 13){
  306. obj.updateToDataset();
  307. grp.button5.click();
  308. }
  309. }
  310. /****************************************************************************************
  311. * Argument :
  312. * Description : 조회 버튼 클릭 이벤트
  313. ****************************************************************************************/
  314. function grp_button5_onclick(obj:Button, e:ClickEventInfo){
  315. fSearch();
  316. }
  317. /****************************************************************************************
  318. * Argument :
  319. * Description : 초기화 버튼 클릭 이벤트
  320. ****************************************************************************************/
  321. function button1_onclick(obj:Button, e:ClickEventInfo){
  322. fSearch();
  323. }
  324. /****************************************************************************************
  325. * Argument :
  326. * Description : 추가 버튼 클릭 이벤트
  327. ****************************************************************************************/
  328. function button2_onclick(obj:Button, e:ClickEventInfo){
  329. var srchCnd = ds_send.getColumn(0, 'srchcnd');
  330. var sHngnm = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, 'hngnm'));
  331. if(srchCnd != '1'){
  332. alert('환자조회시에만 가능합니다.');
  333. return;
  334. }
  335. else if(srchCnd == '1' && sHngnm == ''){
  336. alert('환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.');
  337. return;
  338. }
  339. var idx = ds_main_protlist.addRow();
  340. ds_main_protlist.setColumn(idx, 'pid', ds_send.getColumn(0, 'pid'));
  341. }
  342. /****************************************************************************************
  343. * Argument :
  344. * Description : 삭제 버튼 클릭 이벤트
  345. ****************************************************************************************/
  346. function button3_onclick(obj:Button, e:ClickEventInfo){
  347. var srchCnd = ds_send.getColumn(0, 'srchcnd');
  348. var sHngnm = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, 'hngnm'));
  349. if(srchCnd != '1'){
  350. alert('환자조회시에만 가능합니다.');
  351. return;
  352. }
  353. else if(srchCnd == '1' && sHngnm == ''){
  354. alert('환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.');
  355. return;
  356. }
  357. var status = ds_main_protlist.getRowType(datagrid1.currentrow);
  358. if(status = Dataset.ROWTYPE_INSERT){
  359. ds_main_protlist.deleteRow(datagrid1.currentrow);
  360. }
  361. else{
  362. ds_main_protlist.setRowType(datagrid1.currentrow, Dataset.ROWTYPE_DELETE);
  363. }
  364. }
  365. /****************************************************************************************
  366. * Argument :
  367. * Description : 저장 버튼 클릭 이벤트
  368. ****************************************************************************************/
  369. function button4_onclick(obj:Button, e:ClickEventInfo){
  370. var srchCnd = ds_send.getColumn(0, 'srchcnd');
  371. var sHngnm = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, 'hngnm'));
  372. if(srchCnd != '1'){
  373. alert('환자조회시에만 가능합니다.');
  374. return;
  375. }
  376. else if(srchCnd == '1' && sHngnm == ''){
  377. alert('환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.');
  378. return;
  379. }
  380. for(var i = 0; i < ds_main_protlist.rowcount; i++){
  381. var status = ds_main_protlist.getRowType(i);
  382. if(status == Dataset.ROWTYPE_INSERT || status == Dataset.ROWTYPE_UPDATE){
  383. if(utlf_transNullToEmpty(ds_main_protlist.getColumn(0, 'protflag')) == '' ||
  384. utlf_transNullToEmpty(ds_main_protlist.getColumn(0, 'name')) == ''){
  385. sysf_messageBox('관계, 성명은 필수입력값입니다.', 'E999');
  386. return;
  387. }
  388. }
  389. }
  390. var updated = grdf_getGridUpdateData(datagrid1, 'all');
  391. grdf_setStatusColumn(updated, 'status');
  392. ds_tmp.copyData(updated);
  393. var oParam = {};
  394. oParam.id = "TXPMC01404";
  395. oParam.service = "patinfomngtapp.PatBaseInfo";
  396. oParam.method = "reqExeProtList";
  397. oParam.inds = "req=ds_tmp";
  398. oParam.outds = "";
  399. oParam.async = false;
  400. //oParam.callback = "cf_TXPMC01404";
  401. tranf_submit(oParam);
  402. // 재조회
  403. oParam = {};
  404. oParam.id = "TRPMC01404";
  405. oParam.service = "patinfomngtapp.PatBaseInfo";
  406. oParam.method = "reqGetProtList";
  407. oParam.inds = "req=ds_send";
  408. oParam.outds = "ds_main_protlist=protlist";
  409. oParam.async = false;
  410. //oParam.callback = "cf_TRPMC01404";
  411. tranf_submit(oParam);
  412. }
  413. /****************************************************************************************
  414. * Argument :
  415. * Description : 엑셀저장 버튼 클릭 이벤트
  416. ****************************************************************************************/
  417. function button7_onclick(obj:Button, e:ClickEventInfo){
  418. if(ds_main_patinfo.rowcount < 1){
  419. sysf_messageBox('저장할 데이터가', 'I004');
  420. return false;
  421. }
  422. grdf_exportExcel(datagrid1, '보호자리스트', 'SheetName1', true, '', 'user', true);
  423. }
  424. /****************************************************************************************
  425. * Argument :
  426. * Description : 닫기 버튼 클릭 이벤트
  427. ****************************************************************************************/
  428. function btn_cancel_onclick(obj:Button, e:ClickEventInfo){
  429. if(frmf_checkOpener()){
  430. this.close();
  431. }
  432. }
  433. /****************************************************************************************
  434. * Argument :
  435. * Description : datagrid1 그리드 더블 클릭 이벤트
  436. ****************************************************************************************/
  437. function datagrid1_oncelldblclick(obj:Grid, e:GridClickEventInfo){
  438. var row = obj.currentrow;
  439. var colnm = obj.getCellProperty('Body', obj.currentcell, 'text');
  440. if(colnm == 'pid' || colnm == 'hngnm'){
  441. // 검색조건 재설정
  442. ds_send.setColumn(0, 'srchcnd', '1');
  443. ds_send.setColumn(0, 'prothngnm', '');
  444. grp.input3.enable = false;
  445. grp.input1.enable = true;
  446. ds_send.setColumn(0, 'pid', ds_main_protlist.getColumn(row, 'pid'));
  447. grp.button6.click();
  448. }
  449. }
  450. ]]></Script>
  451. </Form>
  452. </FDL>