SPADB64100_시럽제제한품목관리.xfdl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPADB64100" position="absolute 0 0 630 616" titletext="시럽제 제한 약품 리스트 조회" oninit="SPADB64100_oninit" onload="SPADB64100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="시럽제 제한 조건 관리" class="tit_1" position="absolute 0 0 162 26"/>
  8. <Static id="caption3" text="시럽제 제한 조건 리스트" class="tit_2" position="absolute 0 31 188 47"/>
  9. <Button id="button3" taborder="1" text="저장" class="btn4" visible="false" position="absolute 574 25 630 47"/>
  10. <Grid id="grd_hardcodespec" taborder="2" binddataset="ds_grd_hardcodespec" useinputpanel="false" position="absolute 0 52 630 232" autofittype="col" onlbuttonup="grd_hardcodespec_onlbuttonup" cellsizingtype="both" extendsizetype="row">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="25" band="left"/>
  15. <Column size="100"/>
  16. <Column size="494"/>
  17. </Columns>
  18. <Rows>
  19. <Row size="24" band="head"/>
  20. <Row size="24"/>
  21. </Rows>
  22. <Band id="head">
  23. <Cell/>
  24. <Cell col="1" text="조건코드"/>
  25. <Cell col="2" text="조건명"/>
  26. </Band>
  27. <Band id="body">
  28. <Cell celltype="head" text="expr:currow+1"/>
  29. <Cell col="1" text="bind:hardcdno"/>
  30. <Cell col="2" displaytype="text" edittype="none" text="bind:hardcdnm"/>
  31. </Band>
  32. </Format>
  33. </Formats>
  34. </Grid>
  35. <Static id="cpt_worktitle" text="시럽제 제한 약품 리스트" class="tit_2" position="absolute 0 244 175 262"/>
  36. <Button id="button7" taborder="3" text="신규" class="btn2" position="absolute 433 241 475 260" onclick="button7_onclick"/>
  37. <Button id="button8" taborder="4" text="삭제" class="btn2" position="absolute 478 241 520 260" onclick="button8_onclick"/>
  38. <Button id="button9" taborder="5" text="저장" class="btn5" position="absolute 523 241 565 260" onclick="button9_onclick"/>
  39. <Button id="btn_excel" taborder="6" text="Excel" class="btn7" position="absolute 568 241 629 260" onclick="btn_excel_onclick"/>
  40. <Grid id="grd_hardcodespecdetl" taborder="7" binddataset="ds_grd_hardcodespecdetl" useinputpanel="false" position="absolute 0 265 630 616" autofittype="col" onexpanddown="grd_hardcodespecdetl_onexpanddown" autoenter="select" cellsizingtype="both" extendsizetype="row">
  41. <Formats>
  42. <Format id="default">
  43. <Columns>
  44. <Column size="25" band="left"/>
  45. <Column size="0"/>
  46. <Column size="0"/>
  47. <Column size="100"/>
  48. <Column size="315"/>
  49. <Column size="0"/>
  50. <Column size="90"/>
  51. <Column size="90"/>
  52. </Columns>
  53. <Rows>
  54. <Row size="24" band="head"/>
  55. <Row size="24"/>
  56. </Rows>
  57. <Band id="head">
  58. <Cell/>
  59. <Cell col="1" text="status"/>
  60. <Cell col="2" text="hardcd"/>
  61. <Cell col="3" text="처방코드"/>
  62. <Cell col="4" text="제한 사유"/>
  63. <Cell col="5" text="코드일련번호"/>
  64. <Cell col="6" text="시작일자"/>
  65. <Cell col="7" text="종료일자"/>
  66. </Band>
  67. <Band id="body">
  68. <Cell celltype="head" displaytype="image"/>
  69. <Cell col="1" text="bind:status"/>
  70. <Cell col="2" text="bind:hardcd"/>
  71. <Cell col="3" displaytype="text" edittype="text" text="bind:trgtcd" expandshow="show"/>
  72. <Cell col="4" displaytype="text" edittype="text" text="bind:trgtcdnm"/>
  73. <Cell col="5" text="bind:cdseqno"/>
  74. <Cell col="6" displaytype="date" edittype="date" text="bind:valifromdd"/>
  75. <Cell col="7" displaytype="date" edittype="date" text="bind:valitodd"/>
  76. </Band>
  77. </Format>
  78. </Formats>
  79. </Grid>
  80. <Shape id="line1" class="line_1" position="absolute 0 47 630 53"/>
  81. <Shape id="line00" class="line_1" position="absolute 0 260 630 266"/>
  82. <Div id="group1" taborder="10" text="group1" position="absolute 7 319 604 549" style="background:white;border:2 solid #808080ff ;" visible="false">
  83. <Layouts>
  84. <Layout>
  85. <Grid id="grd_limantibioapplist" taborder="0" binddataset="ds_grd_limantibioapplist" useinputpanel="false" autofittype="col" oncelldblclick="grd_limantibioapplist_oncelldblclick" visible="true" position="absolute 1 1 592 201" cellsizingtype="both" extendsizetype="row">
  86. <Formats>
  87. <Format id="default">
  88. <Columns>
  89. <Column size="25" band="left"/>
  90. <Column size="100"/>
  91. <Column size="260"/>
  92. <Column size="100"/>
  93. <Column size="100"/>
  94. </Columns>
  95. <Rows>
  96. <Row size="24" band="head"/>
  97. <Row size="24"/>
  98. </Rows>
  99. <Band id="head">
  100. <Cell/>
  101. <Cell col="1" text="처방코드"/>
  102. <Cell col="2" text="제한 사유"/>
  103. <Cell col="3" text="시작일자"/>
  104. <Cell col="4" text="종료일자"/>
  105. </Band>
  106. <Band id="body">
  107. <Cell celltype="head" text="expr:currow+1"/>
  108. <Cell col="1" style="align:left middle;padding:0 5 0 5;" text="bind:prcpcd"/>
  109. <Cell col="2" style="align:left middle;padding:0 5 0 5;" text="bind:prcpnm"/>
  110. <Cell col="3" displaytype="date" edittype="date" text="bind:valifromdd"/>
  111. <Cell col="4" displaytype="date" edittype="date" text="bind:valitodd"/>
  112. </Band>
  113. </Format>
  114. </Formats>
  115. </Grid>
  116. <Button id="btn_grdhidden" taborder="1" text="닫기" onclick="btn_grdhidden_onclick" class="btn2" position="absolute 550 204 592 223"/>
  117. </Layout>
  118. </Layouts>
  119. </Div>
  120. <Shape id="line02" class="line_1" position="absolute 0 46 630 52"/>
  121. <Shape id="line03" class="line_1" position="absolute 0 48 630 54"/>
  122. <Shape id="line04" class="line_1" position="absolute 0 259 630 265"/>
  123. <Shape id="line05" class="line_1" position="absolute 0 261 630 267"/>
  124. </Layout>
  125. </Layouts>
  126. <Objects>
  127. <Dataset id="ds_grd_hardcodespec" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  128. <ColumnInfo>
  129. <Column id="hardcdno" type="STRING"/>
  130. <Column id="hardcdnm" type="STRING"/>
  131. </ColumnInfo>
  132. <Rows>
  133. <Row/>
  134. </Rows>
  135. </Dataset>
  136. <Dataset id="ds_grd_hardcodespecdetl" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  137. <ColumnInfo>
  138. <Column id="status" type="STRING"/>
  139. <Column id="hardcd" type="STRING"/>
  140. <Column id="trgtcd" type="STRING"/>
  141. <Column id="trgtcdnm" type="STRING"/>
  142. <Column id="cdseqno" type="STRING"/>
  143. <Column id="valifromdd" type="STRING"/>
  144. <Column id="valitodd" type="STRING"/>
  145. </ColumnInfo>
  146. <Rows>
  147. <Row/>
  148. </Rows>
  149. </Dataset>
  150. <Dataset id="ds_grd_limantibioapplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  151. <ColumnInfo>
  152. <Column id="prcpcd" type="STRING"/>
  153. <Column id="prcpnm" type="STRING"/>
  154. <Column id="valifromdd" type="STRING"/>
  155. <Column id="valitodd" type="STRING"/>
  156. </ColumnInfo>
  157. <Rows>
  158. <Row/>
  159. </Rows>
  160. </Dataset>
  161. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  162. <ColumnInfo>
  163. <Column id="hardcdlist" type="STRING" size="256"/>
  164. <Column id="prcpcd" type="STRING" size="256"/>
  165. </ColumnInfo>
  166. <Rows>
  167. <Row>
  168. <Col id="hardcdlist">319</Col>
  169. </Row>
  170. </Rows>
  171. </Dataset>
  172. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  173. <ColumnInfo>
  174. <Column id="hardcdno" type="STRING" size="256"/>
  175. <Column id="hardcdnm" type="STRING" size="256"/>
  176. <Column id="status" type="STRING" size="256"/>
  177. </ColumnInfo>
  178. <Rows>
  179. <Row/>
  180. </Rows>
  181. </Dataset>
  182. <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  183. </Objects>
  184. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  185. * System Name :
  186. * Job Name :
  187. * Creator :
  188. * Make Date : 2015-11-03
  189. * Description :
  190. *---------------------------------------------------------------------------------------
  191. * Modify Date Modifier Modify Description
  192. *---------------------------------------------------------------------------------------
  193. * 2015-11-03 Live Converter TF->XP
  194. *
  195. *---------------------------------------------------------------------------------------
  196. ****************************************************************************************/
  197. //=======================================================================================
  198. // Lib Include
  199. //---------------------------------------------------------------------------------------
  200. include "com_commonxp::comm_main.xjs";
  201. //=======================================================================================
  202. // Global Form Variable
  203. //---------------------------------------------------------------------------------------
  204. var arErrorCode = new HashArray();
  205. //=======================================================================================
  206. // Event
  207. //---------------------------------------------------------------------------------------
  208. /****************************************************************************************
  209. * Components : Form
  210. * Components ID : SPADB64100
  211. * Event : oninit
  212. * Argument : 01.obj : Object Event has occurred
  213. * : 02.e : Event Object
  214. * Description : 화면 처음 초기화시 폼초기화
  215. ****************************************************************************************/
  216. function SPADB64100_oninit(obj:Form, e:InitEventInfo)
  217. {
  218. frmf_initForm(obj);
  219. }
  220. /****************************************************************************************
  221. * Components : Form
  222. * Components ID : SPADB64100
  223. * Event : onload
  224. * Argument : 01.obj : Object Event has occurred
  225. * : 02.e : Event Object
  226. * Description : 화면 처음 초기화시 폼초기화
  227. ****************************************************************************************/
  228. function SPADB64100_onload(obj:Form, e:LoadEventInfo)
  229. {
  230. try {
  231. ds_hidden.copyData(arg_ds_hidden);
  232. } catch(e) {}
  233. //상태값 설정
  234. grdf_setRowTypeIcon(grd_hardcodespecdetl, 0);
  235. ds_grd_hardcodespec.clearData();
  236. ds_grd_hardcodespecdetl.clearData();
  237. ds_grd_limantibioapplist.clearData();
  238. grdf_setGridSort(grd_hardcodespecdetl); // 그리드 소트만
  239. //시럽제 제한 조건 리스트 조회
  240. var oParam = {};
  241. oParam.id = "TRMMO33101";
  242. oParam.service = "prcpmngtapp.LimAntibioMngt";
  243. oParam.method = "reqGetLimAntiBioCondList";
  244. oParam.inds = "req=ds_send_reqdata";
  245. oParam.outds = "ds_grd_hardcodespec=speclist";
  246. oParam.async = false;
  247. //oParam.callback = "cf_TRMMO33101";
  248. tranf_submit(oParam);
  249. }
  250. /****************************************************************************************
  251. * Components : Button
  252. * Components ID : button7
  253. * Event : onclick
  254. * Argument : 01.obj : Object Event has occurred
  255. * : 02.e : Event Object
  256. * Description : 신규 Button Event
  257. ****************************************************************************************/
  258. function button7_onclick(obj:Button, e:ClickEventInfo)
  259. {
  260. if( ds_grd_hardcodespec.rowposition < 0 ){
  261. alert("시럽제 제한 조건을 선택해주십시오.");
  262. return;
  263. }
  264. var iRow = ds_grd_hardcodespecdetl.addRow();
  265. if( ds_grd_hardcodespecdetl.rowcount > 0 ){
  266. ds_grd_hardcodespecdetl.setColumn(iRow, "status", "I");
  267. ds_grd_hardcodespecdetl.setColumn(iRow, "hardcd", ds_grd_hardcodespec.getColumn(ds_grd_hardcodespec.rowposition, "hardcdno"));
  268. ds_grd_hardcodespecdetl.setColumn(iRow, "valifromdd", utlf_getCurrentDate());
  269. ds_grd_hardcodespecdetl.setColumn(iRow, "valitodd", "99991231");
  270. }
  271. }
  272. /****************************************************************************************
  273. * Components : Button
  274. * Components ID : button8
  275. * Event : onclick
  276. * Argument : 01.obj : Object Event has occurred
  277. * : 02.e : Event Object
  278. * Description : 삭제 Button Event
  279. ****************************************************************************************/
  280. function button8_onclick(obj:Button, e:ClickEventInfo)
  281. {
  282. var cRow = ds_grd_hardcodespecdetl.rowposition;
  283. var getStatus = ds_grd_hardcodespecdetl.getColumn(cRow, "status");
  284. //sysf_trace("getStatus : " + getStatus);
  285. if( getStatus == "I" ){
  286. ds_grd_hardcodespecdetl.deleteRow(cRow);
  287. } else if( getStatus == "D" ){
  288. ds_grd_hardcodespecdetl.setColumn(cRow, "status", "");
  289. grdf_setStatus(grd_hardcodespecdetl, "", grdf_getSelectedRows(grd_hardcodespecdetl));
  290. } else {
  291. ds_grd_hardcodespecdetl.setColumn(cRow, "status", "D");
  292. grdf_setStatus(grd_hardcodespecdetl, "D", grdf_getSelectedRows(grd_hardcodespecdetl));
  293. }
  294. }
  295. /****************************************************************************************
  296. * Components : Grid
  297. * Components ID : grd_hardcodespecdetl
  298. * Event : onexpanddown
  299. * Argument : 01.obj : Object Event has occurred
  300. * : 02.e : Event Object
  301. * Description : 처방코드 검색
  302. ****************************************************************************************/
  303. function grd_hardcodespecdetl_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  304. {
  305. if(e.col == 3) {
  306. obj.updateToDataset();
  307. ds_send_reqdata.clear();
  308. ds_send_reqdata.addColumn("prcpcd", "string");
  309. ds_send_reqdata.addColumn("prcpnm", "string");
  310. var nRow = ds_send_reqdata.addRow();
  311. ds_send_reqdata.setColumn(nRow, "prcpcd", ds_grd_hardcodespecdetl.getColumn(e.row, "trgtcd"));
  312. //ds_send_reqdata.setColumn(nRow, "prcpnm", ds_grd_hardcodespecdetl.getColumn(e.row, "trgtcdnm"));
  313. var oParam = {};
  314. oParam.id = "TRMMD08701";
  315. oParam.service = "prcpmngtapp.LimAntibioMngt";
  316. oParam.method = "reqGetLimAntibioMasterPrcpList";
  317. oParam.inds = "req=ds_send_reqdata";
  318. oParam.outds = "ds_grd_limantibioapplist=limantibiodruglist";
  319. oParam.async = true;
  320. //oParam.callback = "cf_TRMMD08701";
  321. tranf_submit(oParam);
  322. group1.visible = true;
  323. }
  324. }
  325. /****************************************************************************************
  326. * Components : Button
  327. * Components ID : btn_excel
  328. * Event : onclick
  329. * Argument : 01.obj : Object Event has occurred
  330. * : 02.e : Event Object
  331. * Description : Excel Button Event
  332. ****************************************************************************************/
  333. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  334. {
  335. if( ds_grd_hardcodespecdetl.rowcount > 0 ){
  336. grdf_exportExcel(grd_hardcodespecdetl,"시럽제 제한 조건코드","sheet1");
  337. } else {
  338. sysf_messageBox("시럽제 제한 조건을 선택해주십시오.", "I");
  339. return;
  340. }
  341. }
  342. /****************************************************************************************
  343. * Components : Button
  344. * Components ID : button9
  345. * Event : onclick
  346. * Argument : 01.obj : Object Event has occurred
  347. * : 02.e : Event Object
  348. * Description : 저장
  349. ****************************************************************************************/
  350. function button9_onclick(obj:Button, e:ClickEventInfo)
  351. {
  352. // var oDsUpdate = grdf_getGridUpdateData(grd_limantibioapplist);
  353. var oDsUpdate = grdf_getGridUpdateData(grd_hardcodespecdetl,"all");
  354. if( oDsUpdate.rowcount < 1 ){
  355. sysf_messageBox("입력","E013");
  356. return;
  357. }
  358. ds_send_req.clear();
  359. dsf_makeValue(ds_send_req,"hardcdno","string",ds_grd_hardcodespec.getColumn(ds_grd_hardcodespec.rowposition, "hardcdno"));
  360. dsf_makeValue(ds_send_req,"hardcdnm","string",ds_grd_hardcodespec.getColumn(ds_grd_hardcodespec.rowposition, "hardcdnm"));
  361. // ds_send_reqdata.clearData();
  362. // grdf_setStatusColumn(oDsUpdate, "status"); // 각행의 status에 rowType 값에 따라 'i', 'u', 'd'로 업데이트 시켜준다
  363. // ds_send_reqdata.copyData(oDsUpdate, true);
  364. for(var i = 0 ; i < oDsUpdate.rowcount ; i++) {
  365. if(oDsUpdate.getRowType(i) == 4) {
  366. oDsUpdate.setColumn(i,"status","U");
  367. }
  368. }
  369. ds_send_reqdata.clear();
  370. ds_send_reqdata.copyData(oDsUpdate, true);
  371. for( var i = 0; i < ds_send_reqdata.rowcount; i++ ){
  372. // 처방코드 null check
  373. if( utlf_isNull(ds_send_reqdata.getColumn(i, "trgtcd")) ){
  374. sysf_messageBox("처방코드는 ","I003");
  375. return;
  376. }
  377. // 처방명칭 null check
  378. if( utlf_isNull(ds_send_reqdata.getColumn(i, "trgtcdnm")) ){
  379. sysf_messageBox("처방명칭(제한사유)은 ","I003");
  380. return;
  381. }
  382. // 시작일자 null check
  383. if( utlf_isNull(ds_send_reqdata.getColumn(i, "valifromdd")) ){
  384. sysf_messageBox("시작일자는 ","I003");
  385. return;
  386. }
  387. // 종료일자 null check
  388. if( utlf_isNull(ds_send_reqdata.getColumn(i, "valitodd")) ){
  389. sysf_messageBox("종료일자는 ","I003");
  390. return;
  391. }
  392. }
  393. var oParam = {};
  394. oParam.id = "TRMMO33102";
  395. oParam.service = "prcpmngtapp.LimAntibioMngt";
  396. oParam.method = "reqExeLimAntiBioCondInfo";
  397. oParam.inds = "req=ds_send_req savedata=ds_send_reqdata";
  398. oParam.outds = "ds_grd_hardcodespecdetl=specdetllist";
  399. oParam.async = false;
  400. //oParam.callback = "cf_TRMMO33102";
  401. tranf_submit(oParam);
  402. }
  403. /****************************************************************************************
  404. * Components : Button
  405. * Components ID : group1.btn_grdhidden
  406. * Event : onclick
  407. * Argument : 01.obj : Object Event has occurred
  408. * : 02.e : Event Object
  409. * Description : 처방코드조회 POPUP 닫기Event
  410. ****************************************************************************************/
  411. function btn_grdhidden_onclick(obj:Button, e:ClickEventInfo)
  412. {
  413. group1.visible = false;
  414. }
  415. /****************************************************************************************
  416. * Components : Grid
  417. * Components ID : group1.grd_limantibioapplist
  418. * Event : oncelldblclick
  419. * Argument : 01.obj : Object Event has occurred
  420. * : 02.e : Event Object
  421. * Description : 처방코드조회 리스트 선택 Event
  422. ****************************************************************************************/
  423. function grd_limantibioapplist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  424. {
  425. var pRow = ds_grd_hardcodespecdetl.rowposition;
  426. var cRow = e.row;
  427. if(cRow > -1) {
  428. ds_grd_hardcodespecdetl.setColumn(pRow, "trgtcd" , ds_grd_limantibioapplist.getColumn(cRow, "prcpcd"));
  429. ds_grd_hardcodespecdetl.setColumn(pRow, "trgtcdnm" , ds_grd_limantibioapplist.getColumn(cRow, "prcpnm"));
  430. group1.visible = false;
  431. }
  432. }
  433. /****************************************************************************************
  434. * Components : Grid
  435. * Components ID : group1.grd_hardcodespec
  436. * Event : onlbuttonup
  437. * Argument : 01.obj : Object Event has occurred
  438. * : 02.e : Event Object
  439. * Description : 제한조건 리스트 선택
  440. ****************************************************************************************/
  441. function grd_hardcodespec_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
  442. {
  443. if(e.row > -1) {
  444. ds_main_cond.setColumn(0, "hardcdno", ds_grd_hardcodespec.getColumn(e.row, "hardcdno"));
  445. ds_main_cond.setColumn(0, "hardcdnm", ds_grd_hardcodespec.getColumn(e.row, "hardcdnm"));
  446. //MIX 처방 약품 리스트 조회
  447. var oParam = {};
  448. oParam.id = "TRMMO33101";
  449. oParam.service = "prcpmngtapp.LimAntibioMngt";
  450. oParam.method = "reqGetLimAntiBioCondInfo";
  451. oParam.inds = "req=ds_main_cond";
  452. oParam.outds = "ds_grd_hardcodespecdetl=specdetllist";
  453. oParam.async = true;
  454. //oParam.callback = "cf_TRMMO33101";
  455. tranf_submit(oParam);
  456. }
  457. }
  458. ]]></Script>
  459. </Form>
  460. </FDL>