SPPIZ00500_특정내역상세관리.xfdl 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPIZ00500" position="absolute 0 0 599 591" titletext="특정내역 상세 관리" oninit="SPPIZ00500_oninit" onload="SPPIZ00500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 595 564" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="특정내역 상세" position="absolute 0 9 108 30" id="caption1" class="tit_2"/>
  11. <Shape position="absolute 0 25 594 31" linetype="horizontal" id="line1" class="line_10" style="strokepen:3 solid #33bbbbff;"/>
  12. <Static text="수가코드" position="absolute 0 30 59 53" id="caption2" class="cell_1"/>
  13. <Edit readonly="true" position="absolute 62 32 162 51" id="opt_snglcalcscorcd" visible="true" enable="false"/>
  14. <Static text="줄번호" position="absolute 163 30 230 53" id="caption3" class="cell_1"/>
  15. <Edit readonly="true" position="absolute 231 32 260 51" id="opt_edilnno" enable="false"/>
  16. <Static text="특정코드" position="absolute 261 30 320 53" id="caption4" class="cell_1"/>
  17. <Shape position="absolute 0 51 594 57" linetype="horizontal" id="line2" class="line_2"/>
  18. <Static text="특정내역" position="absolute 0 194 59 340" id="caption5" class="cell_1"/>
  19. <TextArea position="absolute 62 195 594 337" id="tar_spclspec" taborder="2" scrollbars="autovert" wordwrap="word"/>
  20. <Shape position="absolute 0 336 594 342" linetype="horizontal" id="line3" class="line_2"/>
  21. <Static text="기재형식" position="absolute 0 341 59 364" id="caption6" class="cell_1"/>
  22. <Edit readonly="true" position="absolute 62 342 594 361" id="opt_spclformat"/>
  23. <Shape position="absolute 0 361 594 367" linetype="horizontal" id="line4" class="line_3"/>
  24. <Static text="특정내역 목록" position="absolute 0 370 108 391" id="caption7" class="tit_2"/>
  25. <Shape position="absolute 0 386 594 392" linetype="horizontal" id="line6" class="line_10" style="strokepen:3 solid #33bbbbff;"/>
  26. <Grid position="absolute 0 391 594 564" id="grd_clsplist" binddataset="ds_main_item1_clsp_list" autofittype="col" oncellclick="grp_biz_grd_clsplist_oncellclick" selecttype="multirow" cellsizingtype="col">
  27. <Formats>
  28. <Format id="default">
  29. <Columns>
  30. <Column size="0"/>
  31. <Column size="0"/>
  32. <Column size="27"/>
  33. <Column size="80"/>
  34. <Column size="0"/>
  35. <Column size="56"/>
  36. <Column size="300"/>
  37. <Column size="100"/>
  38. <Column size="0"/>
  39. <Column size="0"/>
  40. <Column size="0"/>
  41. <Column size="0"/>
  42. <Column size="0"/>
  43. </Columns>
  44. <Rows>
  45. <Row size="24" band="head"/>
  46. <Row size="24"/>
  47. </Rows>
  48. <Band id="head">
  49. <Cell text="flag"/>
  50. <Cell col="1" text="row"/>
  51. <Cell col="2"/>
  52. <Cell col="3" text="수가코드"/>
  53. <Cell col="4" text="줄번호"/>
  54. <Cell col="5" text="특정코드"/>
  55. <Cell col="6" text="특정내역"/>
  56. <Cell col="7" text="기재형식"/>
  57. <Cell col="8" text="특정내역명칭"/>
  58. <Cell col="9" text="상세설명"/>
  59. <Cell col="10" text="처방일련번호"/>
  60. <Cell col="11" text="기존특정코드"/>
  61. <Cell col="12" text="기존특정내역"/>
  62. </Band>
  63. <Band id="body">
  64. <Cell text="bind:flag"/>
  65. <Cell col="1" text="bind:rownum"/>
  66. <Cell col="2" celltype="head"/>
  67. <Cell col="3" style="align:left middle;" text="bind:snglcalcscorcd"/>
  68. <Cell col="4" style="align:left middle;" text="bind:edilnno"/>
  69. <Cell col="5" style="align:left middle;" text="bind:spclcd"/>
  70. <Cell col="6" style="align:left middle;" text="bind:spclspec"/>
  71. <Cell col="7" style="align:left middle;" text="bind:spclformat"/>
  72. <Cell col="8" text="bind:cdnm"/>
  73. <Cell col="9" text="bind:detldesc"/>
  74. <Cell col="10" text="bind:clodseqno"/>
  75. <Cell col="11" text="bind:oldspclcd"/>
  76. <Cell col="12" text="bind:oldspclspec"/>
  77. </Band>
  78. </Format>
  79. </Formats>
  80. </Grid>
  81. <Button position="absolute 552 367 594 386" id="btn_add" class="btn2" text="추가" onclick="grp_biz_btn_add_onclick"/>
  82. <Button position="absolute 462 367 504 386" id="btn_alter" class="btn5" enable="true" visible="false" text="수정" onclick="grp_biz_btn_alter_onclick"/>
  83. <Button position="absolute 507 367 549 386" id="btn_delete" class="btn2" text="삭제" onclick="grp_biz_btn_delete_onclick"/>
  84. <Shape position="absolute 0 190 594 196" linetype="horizontal" id="line7" class="line_2"/>
  85. <Static text="상세설명" position="absolute 0 54 59 192" id="caption8" class="cell_1"/>
  86. <TextArea position="absolute 62 55 594 191" id="tar_detldesc" enable="false" scrollbars="autovert" wordwrap="word"/>
  87. <Button position="absolute 294 6 369 25" id="btn_memohistory" class="btn2" text="줄단위메모" onclick="grp_biz_btn_memohistory_onclick"/>
  88. <Button position="absolute 372 6 414 25" id="btn_memohistory_drug" class="btn2" text="약" onclick="grp_biz_btn_memohistory_drug_onclick"/>
  89. <Button position="absolute 417 6 459 25" id="btn_memohistory_injection" class="btn2" text="주사" onclick="grp_biz_btn_memohistory_injection_onclick"/>
  90. <Button position="absolute 462 6 504 25" id="btn_memohistory_treat" class="btn2" text="처치" onclick="grp_biz_btn_memohistory_treat_onclick"/>
  91. <Button position="absolute 507 6 549 25" id="btn_memohistory_exam" class="btn2" text="검사" onclick="grp_biz_btn_memohistory_exam_onclick"/>
  92. <Button position="absolute 552 6 594 25" id="btn_memohistory_etc" class="btn2" text="기타" onclick="grp_biz_btn_memohistory_etc_onclick"/>
  93. <Combo position="absolute 321 32 594 51" id="cmb_spclcd" class="combo_default" taborder="1" innerdataset="@ds_init_P0117list" datacolumn="cdengabbrnm" codecolumn="cdid" onitemchanged="grp_biz_cmb_spclcd_onitemchanged"/>
  94. <Static text="seqno" position="absolute 3 60 56 83" id="caption9" class="cell_1" visible="false"/>
  95. <Edit readonly="true" position="absolute 15 84 44 103" id="output1" visible="false" enable="false"/>
  96. <Button position="absolute 227 6 291 25" id="btn_rsltsrch" class="btn2" text="결과조회" onclick="grp_biz_btn_rsltsrch_onclick"/>
  97. <Button position="absolute 344 367 460 386" id="button1" class="btn2" text="일괄특정내역입력" onclick="grp_biz_button1_onclick"/>
  98. </Layout>
  99. </Layouts>
  100. </Div>
  101. <Div position="absolute 0 563 595 590" id="grp_btn" scrollbars="autoboth">
  102. <Layouts>
  103. <Layout>
  104. <Shape position="absolute 0 0 594 6" linetype="horizontal" id="line5" class="line_6" anchor="default"/>
  105. <Button position="absolute 538 5 594 27" id="btn_cancel" class="btn4" text="취소" anchor="default" onclick="grp_btn_btn_cancel_onclick"/>
  106. <Button position="absolute 479 5 535 27" id="btn_confirm" class="btn4" text="확인" anchor="default" onclick="grp_btn_btn_confirm_onclick"/>
  107. </Layout>
  108. </Layouts>
  109. </Div>
  110. </Layout>
  111. </Layouts>
  112. <Objects>
  113. <Dataset id="ds_main_item1_clsp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  114. <Dataset id="ds_main_item1_clsp_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  115. <Dataset id="ds_init_P0117list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="cdid" type="STRING" size="256"/>
  118. <Column id="cdengabbrnm" type="STRING" size="256"/>
  119. </ColumnInfo>
  120. </Dataset>
  121. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  122. <ColumnInfo>
  123. <Column id="unitflag" type="STRING" size="256"/>
  124. </ColumnInfo>
  125. <Rows>
  126. <Row/>
  127. </Rows>
  128. </Dataset>
  129. <Dataset id="ds_init_P0117sublist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  130. <Dataset id="ds_hidden_sppiz00700_rslt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  131. <Dataset id="ds_hidden_sppiz00700_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  132. <ColumnInfo>
  133. <Column id="memoflag" type="STRING" size="256"/>
  134. <Column id="memocls" type="STRING" size="256"/>
  135. </ColumnInfo>
  136. <Rows>
  137. <Row/>
  138. </Rows>
  139. </Dataset>
  140. <Dataset id="ds_hidden_clsp_rslt_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  141. <Dataset id="ds_temp_memolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  142. </Objects>
  143. <Bind>
  144. <BindItem id="item0" compid="grp_biz.opt_snglcalcscorcd" propid="value" datasetid="ds_main_item1_clsp" columnid="snglcalcscorcd"/>
  145. <BindItem id="item1" compid="grp_biz.opt_edilnno" propid="value" datasetid="ds_main_item1_clsp" columnid="edilnno"/>
  146. <BindItem id="item2" compid="grp_biz.cmb_spclcd" propid="value" datasetid="ds_main_item1_clsp" columnid="spclcd"/>
  147. <BindItem id="item3" compid="grp_biz.output1" propid="value" datasetid="ds_main_item1_clsp" columnid="clodseqno"/>
  148. <BindItem id="item4" compid="grp_biz.tar_detldesc" propid="value" datasetid="ds_main_item1_clsp" columnid="detldesc"/>
  149. <BindItem id="item5" compid="grp_biz.tar_spclspec" propid="value" datasetid="ds_main_item1_clsp" columnid="spclspec"/>
  150. <BindItem id="item6" compid="grp_biz.opt_spclformat" propid="value" datasetid="ds_main_item1_clsp" columnid="spclformat"/>
  151. </Bind>
  152. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  153. * System Name :
  154. * Job Name :
  155. * Creator :
  156. * Make Date : 2016-05-24
  157. * Description :
  158. *---------------------------------------------------------------------------------------
  159. * Modify Date Modifier Modify Description
  160. *---------------------------------------------------------------------------------------
  161. * 2016-05-24 Live Converter TF->XP
  162. *
  163. *---------------------------------------------------------------------------------------
  164. ****************************************************************************************/
  165. include "com_commonxp::comm_main.xjs";
  166. include "pam_pamcomnxp::PAM001.xjs";
  167. include "pam_pamcomnxp::PAM.xjs";
  168. function SPPIZ00500_oninit(obj:Form, e:InitEventInfo)
  169. {
  170. frmf_initForm(obj);
  171. }
  172. function SPPIZ00500_onload(obj:Form, e:LoadEventInfo)
  173. {
  174. grdf_initGrid(grp_biz.grd_clsplist);
  175. grdf_setRowTypeIcon(grp_biz.grd_clsplist, 2);
  176. fInitialize();
  177. }
  178. function fInitialize()
  179. {
  180. if (frmf_checkOpener())
  181. {
  182. ds_main_item1_clsp.copyData(arg_ds_hidden_clsp);
  183. ds_main_item1_clsp_list.copyData(arg_ds_hidden_clsp_list);
  184. dsf_makeValue(ds_main_item1_clsp, "selectedrow", "string", "", 0);
  185. var unitflag = ds_main_item1_clsp.getColumn(0, "unitflag");
  186. var snglcalcscorcd = ds_main_item1_clsp.getColumn(0, "snglcalcscorcd");
  187. var edilnno = ds_main_item1_clsp.getColumn(0, "edilnno");
  188. var spclcd = ds_main_item1_clsp.getColumn(0, "spclcd");
  189. var seqno = ds_main_item1_clsp.getColumn(0, "seqno");
  190. ds_send.setColumn(0, "unitflag", unitflag);
  191. var oParam = {};
  192. oParam.id = "TRPIZ00501";
  193. oParam.service = "insucomapp.SpclSpecDetl";
  194. oParam.method = "reqGetSpclCdList";
  195. oParam.inds = "req=ds_send";
  196. oParam.outds = "ds_init_P0117list=P0117";
  197. oParam.async = false;
  198. //oParam.callback = "cf_TRPIZ00501";
  199. tranf_submit(oParam);
  200. var arrParam = new Array();
  201. arrParam = [{dsNm: "ds_init_P0117sublist", cdGrpId: "P0117", showValue: false}];
  202. pamfGetCodeList(arrParam, true, "");
  203. if (unitflag == "M")
  204. {
  205. grp_biz.btn_memohistory.visible = false;
  206. grp_biz.grd_clsplist.setFormatColProperty(3, "size", 0);
  207. }
  208. if (!utlf_isNull(seqno)){
  209. var frow = ds_main_item1_clsp_list.findRowExpr("snglcalcscorcd=='"+snglcalcscorcd+ "' && edilnno=='" + edilnno + "' && spclcd=='"+spclcd+"' && seqno=='"+seqno+"'");
  210. } else {
  211. var frow = ds_main_item1_clsp_list.findRowExpr("snglcalcscorcd=='"+snglcalcscorcd+ "' && edilnno=='" + edilnno + "' && spclcd=='"+spclcd+"'");
  212. }
  213. ds_main_item1_clsp_list.clearSelect();
  214. ds_main_item1_clsp_list.selectRow(frow);
  215. ds_main_item1_clsp_list.rowposition = frow;
  216. ds_main_item1_clsp.setColumn(0, "selectedrow", frow);
  217. }
  218. else
  219. {
  220. var oParam = {};
  221. oParam.id = "TRPIZ00501";
  222. oParam.service = "insucomapp.SpclSpecDetl";
  223. oParam.method = "reqGetSpclCdList";
  224. oParam.inds = "req=ds_send";
  225. oParam.outds = "ds_init_P0117list=P0117";
  226. oParam.async = false;
  227. //oParam.callback = "cf_TRPIZ00501";
  228. tranf_submit(oParam);
  229. }
  230. grp_biz.tar_spclspec.setFocus();
  231. }
  232. function fCheckAuth()
  233. {
  234. var xAuth = frmf_checkAuth("X");
  235. grp_biz.cmb_spclcd.enable = xAuth;
  236. grp_biz.tar_spclspec.enable = xAuth;
  237. grp_biz.grd_clsplist.enable = xAuth;
  238. grp_btn.btn_cancel.enable = xAuth;
  239. grp_biz.btn_delete.enable = xAuth;
  240. grp_biz.btn_alter.enable = xAuth;
  241. grp_biz.btn_add.enable = xAuth;
  242. grp_biz.btn_memohistory.enable = xAuth;
  243. grp_biz.btn_memohistory_drug.enable = xAuth;
  244. grp_biz.btn_memohistory_injection.enable = xAuth;
  245. grp_biz.btn_memohistory_treat.enable = xAuth;
  246. grp_biz.btn_memohistory_exam.enable = xAuth;
  247. grp_biz.btn_memohistory_etc.enable = xAuth;
  248. }
  249. function grp_biz_btn_rsltsrch_onclick(obj:Button, e:ClickEventInfo)
  250. {
  251. if (frmf_checkOpener())
  252. {
  253. opener.lf_fOrderRsltSrch();
  254. }
  255. else
  256. {
  257. sysf_messageBox("상위화면이 변경되어 데이터를 전달할 수", "I004");
  258. }
  259. }
  260. function grp_biz_btn_memohistory_onclick(obj:Button, e:ClickEventInfo)
  261. {
  262. fGetJudgComment("");
  263. }
  264. function grp_biz_btn_memohistory_drug_onclick(obj:Button, e:ClickEventInfo)
  265. {
  266. fGetJudgComment("01");
  267. }
  268. function grp_biz_btn_memohistory_injection_onclick(obj:Button, e:ClickEventInfo)
  269. {
  270. fGetJudgComment("02");
  271. }
  272. function grp_biz_btn_memohistory_treat_onclick(obj:Button, e:ClickEventInfo)
  273. {
  274. fGetJudgComment("03");
  275. }
  276. function grp_biz_btn_memohistory_exam_onclick(obj:Button, e:ClickEventInfo)
  277. {
  278. fGetJudgComment("04");
  279. }
  280. function grp_biz_btn_memohistory_etc_onclick(obj:Button, e:ClickEventInfo)
  281. {
  282. fGetJudgComment("99");
  283. }
  284. function fGetJudgComment(memocls)
  285. {
  286. var ordfildcd = "-";
  287. var insukind = "-";
  288. var ioflag = "-";
  289. var unitflag = ds_main_item1_clsp.getColumn(0, "unitflag");
  290. var memoflag = "";
  291. if (unitflag == "M")
  292. {
  293. memoflag = "2";
  294. }
  295. else
  296. {
  297. memoflag = "3";
  298. }
  299. var objArg = new Object();
  300. objArg.sMemocls = memocls;
  301. objArg.sInsukind = "";
  302. objArg.sIoflag = "";
  303. objArg.sOrdfildcd = "";
  304. objArg.sJudgrid = "";
  305. objArg.sMemoflag = memoflag;
  306. objArg.sEdiitem1 = "";
  307. var rtn = frmf_modal("SPPIZ00700", "SPPIZ00700", objArg, "", "", "", "", "", "", "", "", "", "M");
  308. var oldTxt = grp_biz.tar_spclspec.value;
  309. if( !utlf_isNull(rtn) ) {
  310. ds_temp_memolist.copyData(rtn);
  311. var rowCnt = ds_temp_memolist.rowcount;
  312. for ( i = 0 ; i < rowCnt ; i++) {
  313. if( utlf_isNull( oldTxt ) ) {
  314. oldTxt = ds_temp_memolist.getColumn(i, "memo");
  315. }
  316. else {
  317. oldTxt = oldTxt + "\n" + ds_temp_memolist.getColumn(i, "memo");
  318. }
  319. }
  320. }
  321. grp_biz.tar_spclspec.value = oldTxt;
  322. }
  323. function grp_biz_cmb_spclcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  324. {
  325. var spclcd = ds_main_item1_clsp.getColumn(0, "spclcd");
  326. if (spclcd)
  327. {
  328. var index = ds_main_item1_clsp.getColumn(0, "spclcd");
  329. var format = ds_init_P0117list.lookup("cdid", index, "cdval");
  330. var detldesc = ds_init_P0117list.lookup("cdid", index, "detldesc");
  331. var cdnm = ds_init_P0117list.lookup("cdid", index, "cdnm");
  332. ds_main_item1_clsp.setColumn(0, "detldesc", detldesc);
  333. ds_main_item1_clsp.setColumn(0, "spclformat", format);
  334. ds_main_item1_clsp.setColumn(0, "cdnm", cdnm);
  335. ds_main_item1_clsp.setColumn(0, "spclspec", ds_init_P0117sublist.lookup("cdid", index, "detldesc"));
  336. // ds_main_item1_clsp_list.updatecontrol = false;
  337. // for (var i = 0; i < ds_main_item1_clsp_list.rowcount; i++) {
  338. // ds_main_item1_clsp_list.setColumn(i, "spclcd", obj.value);
  339. // ds_main_item1_clsp_list.setColumn(i, "spclformat", format);
  340. // ds_main_item1_clsp_list.setColumn(i, "detldesc", detldesc);
  341. // ds_main_item1_clsp_list.setColumn(i, "cdnm", cdnm);
  342. // ds_main_item1_clsp_list.setColumn(i, "spclspec", ds_main_item1_clsp.getColumn(0, "spclspec"));
  343. // }
  344. // ds_main_item1_clsp_list.updatecontrol = true;
  345. ds_main_item1_clsp_list.rowposition = ds_main_item1_clsp_list.findRowExpr("spclcd=='"+spclcd+"'");
  346. } else {
  347. ds_main_item1_clsp.setColumn(0, "detldesc", "");
  348. ds_main_item1_clsp.setColumn(0, "spclformat", "");
  349. ds_main_item1_clsp.setColumn(0, "cdnm", "");
  350. ds_main_item1_clsp.setColumn(0, "spclspec", "");
  351. }
  352. }
  353. function grp_biz_grd_clsplist_oncellclick(obj:Grid, e:GridClickEventInfo)
  354. {
  355. var row = e.row;
  356. if(row > -1)
  357. {
  358. ds_main_item1_clsp.setColumn(0, "selectedrow", row);
  359. if (row != ds_main_item1_clsp.getColumn(0, "selectedrow"))
  360. {
  361. grp_biz_btn_alter_onclick();
  362. }
  363. ds_main_item1_clsp.setColumn(0, "flag", ds_main_item1_clsp_list.getColumn(row, "flag"));
  364. ds_main_item1_clsp.setColumn(0, "snglcalcscorcd", ds_main_item1_clsp_list.getColumn(row, "snglcalcscorcd"));
  365. ds_main_item1_clsp.setColumn(0, "edilnno", ds_main_item1_clsp_list.getColumn(row, "edilnno"));
  366. ds_main_item1_clsp.setColumn(0, "spclcd", ds_main_item1_clsp_list.getColumn(row, "spclcd"));
  367. ds_main_item1_clsp.setColumn(0, "detldesc", ds_main_item1_clsp_list.getColumn(row, "detldesc"));
  368. ds_main_item1_clsp.setColumn(0, "spclspec", ds_main_item1_clsp_list.getColumn(row, "spclspec"));
  369. ds_main_item1_clsp.setColumn(0, "spclformat", ds_main_item1_clsp_list.getColumn(row, "spclformat"));
  370. ds_main_item1_clsp.setColumn(0, "rownum", ds_main_item1_clsp_list.getColumn(row, "rownum"));
  371. ds_main_item1_clsp.setColumn(0, "cdnm", ds_main_item1_clsp_list.getColumn(row, "cdnm"));
  372. }
  373. }
  374. function grp_biz_button1_onclick(obj:Button, e:ClickEventInfo)
  375. {
  376. ds_main_item1_clsp_list.updatecontrol = false;
  377. for (var i = 0; i < ds_main_item1_clsp_list.rowcount; i++)
  378. {
  379. ds_main_item1_clsp_list.setColumn(i, "spclspec", ds_main_item1_clsp.getColumn(0, "spclspec"));
  380. }
  381. ds_main_item1_clsp_list.updatecontrol = true;
  382. }
  383. function grp_biz_btn_alter_onclick(obj:Button, e:ClickEventInfo)
  384. {
  385. var row = ds_main_item1_clsp.getColumn(0, "selectedrow");
  386. if (row > -1)
  387. {
  388. var spclcd = ds_main_item1_clsp.getColumn(0, "spclcd");
  389. var spclspec = ds_main_item1_clsp.getColumn(0, "spclspec");
  390. var snglcalcscorcd = ds_main_item1_clsp.getColumn(0, "snglcalcscorcd");
  391. var edilnno = ds_main_item1_clsp.getColumn(0, "edilnno");
  392. if (utlf_isNull(spclcd) || utlf_isNull(spclspec))
  393. {
  394. return;
  395. }
  396. var prespclcd = ds_main_item1_clsp_list.getColumn(row, "spclcd");
  397. var prespclspec = ds_main_item1_clsp_list.getColumn(row, "spclspec");
  398. if (spclcd == prespclcd && spclspec == prespclspec)
  399. {
  400. return;
  401. }
  402. for(var i = 0; i < ds_main_item1_clsp_list.rowcount; i++)
  403. {
  404. var grdspclcd = ds_main_item1_clsp_list.getColumn(row, "spclcd");
  405. var grdedilnno = ds_main_item1_clsp_list.getColumn(row, "edilnno");
  406. var frow = ds_main_item1_clsp_list.findRowExpr("flag != 'D' && "+edilnno+"=="+grdedilnno+"&&"+ spclcd +"=="+grdspclcd+" &&"+grdspclcd+"== 'JX999'", 0);
  407. if(frow != -1)
  408. {
  409. sysf_messageBox("특정코드 'JX999'가 존재하므로 'JX999'로 변경할 수", "I004");
  410. return;
  411. }
  412. var frow = ds_main_item1_clsp_list.findRowExpr("flag != 'D' && "+edilnno+"=="+grdedilnno+"&&"+ spclcd +"=="+grdspclcd+" &&"+grdspclcd+"== 'MT015'", 0);
  413. if(frow != -1)
  414. {
  415. sysf_messageBox("특정코드 'MT015'가 존재하므로 'MT015'로 변경할 수", "I004");
  416. return;
  417. }
  418. var frow = ds_main_item1_clsp_list.findRowExpr("flag != 'D' && "+edilnno+"=="+grdedilnno+"&&"+ spclcd +"=="+grdspclcd+" &&"+grdspclcd+"== 'MT016'", 0);
  419. if(frow != -1)
  420. {
  421. sysf_messageBox("특정코드 'MT016'가 존재하므로 'MT016'로 변경할 수", "I004");
  422. return;
  423. }
  424. }
  425. var flag = ds_main_item1_clsp.getColumn(0, "flag");
  426. var snglcalcscorcd = ds_main_item1_clsp.getColumn(0, "snglcalcscorcd");
  427. var clodseqno = ds_main_item1_clsp.getColumn(0, "clodseqno");
  428. var edilnno = ds_main_item1_clsp.getColumn(0, "edilnno");
  429. var detldesc = ds_main_item1_clsp.getColumn(0, "detldesc");
  430. var spclformat = ds_main_item1_clsp.getColumn(0, "spclformat");
  431. var cdnm = ds_main_item1_clsp.getColumn(0, "cdnm");
  432. if (utlf_isNull(snglcalcscorcd))
  433. {
  434. snglcalcscorcd = "-";
  435. }
  436. if (utlf_isNull(edilnno))
  437. {
  438. edilnno = "0";
  439. }
  440. var flagstat = ds_main_item1_clsp_list.getColumn(row, "flag");
  441. var rowstatus = ds_main_item1_clsp_list.getRowType(row);
  442. if (flagstat == "I" )
  443. {
  444. ds_main_item1_clsp_list.setColumn(row, "flag", flag);
  445. var arrRow = new Array();
  446. arrRow[0] = row;
  447. grdf_setStatus(grp_biz.grd_clsplist, "I", arrRow);
  448. }
  449. else if( rowstatus == 2)
  450. {
  451. }
  452. else
  453. {
  454. var arrRow = new Array();
  455. arrRow[0] = row;
  456. grdf_setStatus(grp_biz.grd_clsplist, "U", arrRow);
  457. ds_main_item1_clsp_list.setColumn(row, "flag", "U");
  458. }
  459. ds_main_item1_clsp_list.setColumn(row, "spclspec", spclspec);
  460. }
  461. }
  462. function grp_biz_btn_delete_onclick(obj:Button, e:ClickEventInfo)
  463. {
  464. var rows = grdf_getSelectedRows(grp_biz.grd_clsplist);
  465. if (ds_main_item1_clsp_list.rowposition > -1 )
  466. {
  467. for (var i = 0; i < rows.length; i++)
  468. {
  469. var row = rows[i];
  470. ds_main_item1_clsp_list.setColumn(row, "flag", "D");
  471. }
  472. ds_main_item1_clsp.setColumn(0, "selectedrow", "");
  473. ds_main_item1_clsp.setColumn(0, "spclcd", "");
  474. grp_biz_cmb_spclcd_onitemchanged();
  475. ds_main_item1_clsp_list.rowposition = -1;
  476. }
  477. else
  478. {
  479. sysf_messageBox("삭제할 특정내역 코드를 목록에서", "C002");
  480. }
  481. }
  482. function grp_biz_btn_add_onclick(obj:Button, e:ClickEventInfo)
  483. {
  484. var spclcd = ds_main_item1_clsp.getColumn(0, "spclcd");
  485. var snglcalcscorcd = ds_main_item1_clsp.getColumn(0, "snglcalcscorcd");
  486. var edilnno = ds_main_item1_clsp.getColumn(0, "edilnno");
  487. if (utlf_isNull(spclcd))
  488. {
  489. sysf_messageBox("특정코드를", "C002");
  490. return;
  491. }
  492. var setrow = 0;
  493. var rownum = "";
  494. for (var i = 0; i < ds_main_item1_clsp_list.rowcount; i++)
  495. {
  496. var grdspclcd = ds_main_item1_clsp_list.getColumn(i, "spclcd");
  497. var grdsnglcalcscorcd = ds_main_item1_clsp_list.getColumn(i, "snglcalcscorcd");
  498. var grdedilnno = ds_main_item1_clsp_list.getColumn(i, "edilnno");
  499. var frow = ds_main_item1_clsp_list.findRowExpr("'"+edilnno +"'=='"+grdedilnno+"'&&'"+spclcd+"'=='"+grdspclcd+"'&&'"+grdspclcd+"'== 'JX999'", 0);
  500. if(frow != -1)
  501. {
  502. sysf_messageBox("특정코드 'JX999'가 존재하므로 추가할 수", "I004");
  503. return;
  504. }
  505. var frow = ds_main_item1_clsp_list.findRowExpr("'"+edilnno+"' == '"+grdedilnno+"' && '"+spclcd+"' == '"+grdspclcd+"' && '"+grdspclcd+"' == 'MT015'", 0);
  506. if(frow != -1)
  507. {
  508. sysf_messageBox("특정코드 'MT015'가 존재하므로 추가할 수", "I004");
  509. return;
  510. }
  511. var frow = ds_main_item1_clsp_list.findRowExpr("'"+edilnno+"' == '"+grdedilnno+"' && '"+spclcd+"' == '"+grdspclcd+"' && '"+grdspclcd+"' == 'MT016'", 0);
  512. if(frow != -1)
  513. {
  514. sysf_messageBox("특정코드 'MT016'가 존재하므로 추가할 수", "I004");
  515. return;
  516. }
  517. }
  518. var row = 0;
  519. if (setrow == 0)
  520. {
  521. var row = ds_main_item1_clsp_list.addRow()
  522. ds_main_item1_clsp_list.setColumn(row, "flag", "I");
  523. }
  524. else
  525. {
  526. row = setrow;
  527. ds_main_item1_clsp_list.setColumn(row, "flag", "U");
  528. }
  529. var snglcalcscorcd = ds_main_item1_clsp.getColumn(0, "snglcalcscorcd");
  530. var clodseqno = ds_main_item1_clsp.getColumn(0, "clodseqno");
  531. var edilnno = ds_main_item1_clsp.getColumn(0, "edilnno");
  532. var detldesc = ds_main_item1_clsp.getColumn(0, "detldesc");
  533. var spclspec = ds_main_item1_clsp.getColumn(0, "spclspec");
  534. var spclformat = ds_main_item1_clsp.getColumn(0, "spclformat");
  535. spclformat = spclformat.substring(0,50);
  536. var cdnm = ds_main_item1_clsp.getColumn(0, "cdnm");
  537. if (utlf_isNull(snglcalcscorcd))
  538. {
  539. snglcalcscorcd = "-";
  540. }
  541. if (utlf_isNull(edilnno))
  542. {
  543. edilnno = "0";
  544. }
  545. ds_main_item1_clsp_list.setColumn(row, "snglcalcscorcd", snglcalcscorcd);
  546. if(!utlf_isNull(clodseqno))
  547. {
  548. ds_main_item1_clsp_list.setColumn(row, "clodseqno", clodseqno);
  549. }
  550. ds_main_item1_clsp_list.setColumn(row, "edilnno", edilnno);
  551. ds_main_item1_clsp_list.setColumn(row, "spclcd", spclcd);
  552. ds_main_item1_clsp_list.setColumn(row, "detldesc", detldesc);
  553. ds_main_item1_clsp_list.setColumn(row, "spclspec", spclspec);
  554. ds_main_item1_clsp_list.setColumn(row, "spclformat", spclformat);
  555. ds_main_item1_clsp_list.setColumn(row, "rownum", rownum);
  556. ds_main_item1_clsp_list.setColumn(row, "cdnm", cdnm);
  557. ds_main_item1_clsp.setColumn(0, "selectedrow", row);
  558. ds_main_item1_clsp.setColumn(0, "spclcd", "");
  559. grp_biz_cmb_spclcd_onitemchanged();
  560. }
  561. function grp_btn_btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  562. {
  563. if (frmf_checkOpener())
  564. {
  565. if (ds_main_item1_clsp_list.rowposition > -1)
  566. {
  567. grp_biz_btn_alter_onclick();
  568. }
  569. else
  570. {
  571. if (!utlf_isNull(grp_biz.cmb_spclcd.value) && !utlf_isNull(grp_biz.tar_spclspec.value))
  572. {
  573. grp_biz_btn_add_onclick();
  574. }
  575. }
  576. ds_hidden_clsp_rslt_list.clearData();
  577. for (var i = 0; i < ds_main_item1_clsp_list.rowcount; i++)
  578. {
  579. var spclcd = ds_main_item1_clsp_list.getColumn(i, "spclcd");
  580. var spclspec = String(ds_main_item1_clsp_list.getColumn(i,"spclspec"));
  581. if (spclcd != "MX999" && spclcd != "JX999")
  582. {
  583. if (utlf_getStringLength(spclspec) > 1750 )
  584. {
  585. sysf_messageBox("특정내역 입력 제한길이(1750 Byte)를", "E003");
  586. return;
  587. }
  588. }
  589. var flag = ds_main_item1_clsp_list.getColumn(i, "flag");
  590. var rownum = ds_main_item1_clsp_list.getColumn(i, "rownum");
  591. if (flag == "D" && utlf_isNull(rownum))
  592. {
  593. }
  594. else if (flag)
  595. {
  596. var cnt = ds_hidden_clsp_rslt_list.addRow();
  597. var clodseqno = ds_main_item1_clsp_list.getColumn(i, "clodseqno");
  598. var edilnno = ds_main_item1_clsp_list.getColumn(i, "edilnno");
  599. var cdnm = ds_main_item1_clsp_list.getColumn(i, "cdnm");
  600. var spclformat = ds_main_item1_clsp_list.getColumn(i, "spclformat");
  601. var detldesc = ds_main_item1_clsp_list.getColumn(i, "detldesc");
  602. var snglcalcscorcd = ds_main_item1_clsp_list.getColumn(i, "snglcalcscorcd");
  603. var oldspclcd = ds_main_item1_clsp_list.getColumn(i, "oldspclcd");
  604. var oldspclspec = ds_main_item1_clsp_list.getColumn(i, "oldspclspec");
  605. dsf_makeValue(ds_hidden_clsp_rslt_list, "flag", "string", flag, cnt);
  606. dsf_makeValue(ds_hidden_clsp_rslt_list, "rownum", "string", rownum, cnt);
  607. dsf_makeValue(ds_hidden_clsp_rslt_list, "clodseqno", "string", clodseqno, cnt);
  608. dsf_makeValue(ds_hidden_clsp_rslt_list, "edilnno", "string", edilnno, cnt);
  609. dsf_makeValue(ds_hidden_clsp_rslt_list, "spclcd", "string", spclcd, cnt);
  610. dsf_makeValue(ds_hidden_clsp_rslt_list, "cdnm", "string", cdnm, cnt);
  611. dsf_makeValue(ds_hidden_clsp_rslt_list, "spclspec", "string", spclspec, cnt);
  612. dsf_makeValue(ds_hidden_clsp_rslt_list, "spclformat", "string", spclformat, cnt);
  613. dsf_makeValue(ds_hidden_clsp_rslt_list, "detldesc", "string", detldesc, cnt);
  614. dsf_makeValue(ds_hidden_clsp_rslt_list, "snglcalcscorcd", "string", snglcalcscorcd, cnt);
  615. dsf_makeValue(ds_hidden_clsp_rslt_list, "oldspclcd", "string", oldspclcd, cnt);
  616. dsf_makeValue(ds_hidden_clsp_rslt_list, "oldspclspec", "string", oldspclspec, cnt);
  617. }
  618. }
  619. opener.ds_rslt_sppiz00500.copyData(ds_hidden_clsp_rslt_list);
  620. }
  621. else
  622. {
  623. sysf_messageBox("상위화면이 변경되어 데이터를 전달할 수", "I004"); ///상위화면이 변경되어 데이터를 전달할 수 없습니다.
  624. }
  625. this.close();
  626. }
  627. function grp_btn_btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  628. {
  629. this.close();
  630. }
  631. ]]></Script>
  632. </Form>
  633. </FDL>