SMMRT01300_과색인관리.xfdl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMRT01300" position="absolute 0 0 1196 800" titletext="과색인 관리" onload="SMMRT01300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape id="line4" linetype="horizontal" class="line_2" position="absolute 542 187 1191 193"/>
  8. <Shape id="line6" linetype="horizontal" class="line_2" position="absolute 542 114 1191 120"/>
  9. <Shape id="line21" linetype="horizontal" class="line_2" position="absolute 542 138 1191 144"/>
  10. <Shape id="line22" linetype="horizontal" class="line_2" position="absolute 542 162 1191 168"/>
  11. <Div id="grp_sea" taborder="18" position="absolute 0 25 535 65" class="div_SA"/>
  12. <Static id="caption6" text="과색인 관리" class="tit_1" position="absolute 0 0 120 25"/>
  13. <Shape id="line1" class="line_10" position="absolute 0 89 535 95"/>
  14. <Shape id="line10" linetype="horizontal" class="line_3" position="absolute 0 769 535 775"/>
  15. <Static id="caption19" text="색인명" class="cell_1" position="absolute 0 94 535 117" style="padding:0 0 0 0;align:center middle;"/>
  16. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 450 34 456 56"/>
  17. <Static id="caption3" text="색인구분 :" class="search_name" position="absolute 10 38 96 55"/>
  18. <Static id="caption26" text="진료부서 :" class="search_name" position="absolute 216 38 302 55"/>
  19. <Static id="caption16" text="색인코드" class="cell_1" position="absolute 542 94 621 117" style="padding:0 0 0 4;"/>
  20. <Static id="caption17" text="상위색인코드" class="cell_1" position="absolute 542 142 621 165" style="padding:0 0 0 4;"/>
  21. <Static id="caption18" text="부서코드" class="cell_1" position="absolute 542 167 621 190" style="padding:0 0 0 4;"/>
  22. <Shape id="line24" linetype="horizontal" class="line_10" position="absolute 542 89 1192 95"/>
  23. <Grid id="trv_deptindx" taborder="1" useinputpanel="false" treeusecheckbox="false" position="absolute 0 118 535 799" autofit="col" binddataset="ds_main_deptindxlist_item" oncellclick="trv_deptindx_oncellclick" onlbuttondown="trv_deptindx_onlbuttondown" onlbuttonup="trv_deptindx_onlbuttonup">
  24. <Formats>
  25. <Format id="default">
  26. <Columns>
  27. <Column size="535"/>
  28. </Columns>
  29. <Rows>
  30. <Row size="20"/>
  31. </Rows>
  32. <Band id="body">
  33. <Cell displaytype="tree" edittype="tree" text="bind:deptindxnm" treestartlevel="1" treelevel="bind:depth"/>
  34. </Band>
  35. </Format>
  36. </Formats>
  37. </Grid>
  38. <Combo id="cmb_indxflag" taborder="2" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 100 36 190 55">
  39. <Dataset id="innerdataset">
  40. <ColumnInfo>
  41. <Column id="codecolumn"/>
  42. <Column id="datacolumn"/>
  43. </ColumnInfo>
  44. <Rows>
  45. <Row>
  46. <Col id="codecolumn">0</Col>
  47. <Col id="datacolumn">진단</Col>
  48. </Row>
  49. <Row>
  50. <Col id="codecolumn">9</Col>
  51. <Col id="datacolumn">수술</Col>
  52. </Row>
  53. <Row>
  54. <Col id="codecolumn">2</Col>
  55. <Col id="datacolumn">주호소</Col>
  56. </Row>
  57. </Rows>
  58. </Dataset>
  59. </Combo>
  60. <Edit id="ipt_srcheddeptnm" taborder="3" class="input_essential" position="absolute 305 36 405 55" onkeydown="ipt_srcheddeptnm_onkeydown"/>
  61. <Button id="btn_srchedindx" taborder="4" text="조회" class="btn1" position="absolute 466 34 522 56" onclick="btn_srchedindx_onclick"/>
  62. <Button id="btn_addindx" taborder="5" text="색인추가" class="btn2" position="absolute 471 67 535 89" onclick="btn_addindx_onclick"/>
  63. <Static id="caption1" text="색인명" class="cell_1" position="absolute 542 118 621 141" style="padding:0 0 0 4;"/>
  64. <Edit id="ipt_deptnm" taborder="6" class="input_essential" enable="false" position="absolute 624 168 724 187"/>
  65. <Edit id="ipt_deptupindxcd" taborder="7" class="input_essential" enable="false" position="absolute 624 143 724 162"/>
  66. <Edit id="ipt_deptindxcd" taborder="8" class="input_essential" enable="false" position="absolute 624 95 724 114" onkeydown="ipt_deptindxcd_onkeydown"/>
  67. <Edit id="ipt_deptindxnm" taborder="9" class="input_essential" position="absolute 624 119 1191 138"/>
  68. <Edit id="ipt_deptupindxnm" taborder="10" class="input_default" enable="false" position="absolute 747 143 1190 162"/>
  69. <Button id="btn_clear" taborder="11" text="CLEAR" class="btn2" position="absolute 1038 67 1102 89" onclick="btn_clear_onclick"/>
  70. <Static id="cap_indxinfo" text="진단 색인 정보" class="tit_2" position="absolute 542 73 671 91"/>
  71. <Button id="btn_upindxcd" taborder="12" class="icon_search" position="absolute 727 145 743 161" onclick="btn_upindxcd_onclick"/>
  72. <Button id="btn_deptsrch" taborder="13" class="icon_search" position="absolute 410 38 426 52" onclick="btn_deptsrch_onclick"/>
  73. <CheckBox id="cmb_highestlvel" taborder="14" position="absolute 726 95 826 115" text="최상위" truevalue="Y" onclick="cmb_highestlvel_onclick"/>
  74. <Button id="button90" taborder="15" text="삭제" class="btn5" position="absolute 1105 67 1147 89" onclick="button90_onclick"/>
  75. <Button id="button1" taborder="16" text="저장" class="btn5" position="absolute 1150 67 1192 89" onclick="button1_onclick"/>
  76. <Edit id="input1" taborder="17" class="input_default" enable="false" visible="false" position="absolute 737 168 815 187"/>
  77. </Layout>
  78. </Layouts>
  79. <Objects>
  80. <Dataset id="ds_hidden_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  81. <ColumnInfo>
  82. <Column id="indxflag" type="STRING" size="256"/>
  83. <Column id="selectedindxcd" type="STRING" size="256"/>
  84. <Column id="getdata" type="STRING" size="256"/>
  85. <Column id="srcheddeptnm" type="STRING" size="256"/>
  86. <Column id="srcheddeptcd" type="STRING" size="256"/>
  87. <Column id="highestlvel" type="STRING" size="256"/>
  88. </ColumnInfo>
  89. <Rows>
  90. <Row>
  91. <Col id="indxflag">0</Col>
  92. <Col id="selectedindxcd"/>
  93. <Col id="getdata"/>
  94. <Col id="srcheddeptnm"/>
  95. <Col id="srcheddeptcd"/>
  96. <Col id="highestlvel"/>
  97. </Row>
  98. </Rows>
  99. </Dataset>
  100. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  101. <ColumnInfo>
  102. <Column id="today" type="STRING" size="256"/>
  103. </ColumnInfo>
  104. </Dataset>
  105. <Dataset id="ds_main_indxinfo_deptindx" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  106. <ColumnInfo>
  107. <Column id="deptindxcd" type="STRING" size="256"/>
  108. <Column id="deptindxflag" type="STRING" size="256"/>
  109. <Column id="deptindxnm" type="STRING" size="256"/>
  110. <Column id="deptupindxcd" type="STRING" size="256"/>
  111. <Column id="deptupindxnm" type="STRING" size="256"/>
  112. <Column id="deptnm" type="STRING" size="256"/>
  113. <Column id="deptcd" type="STRING" size="256"/>
  114. <Column id="status" type="STRING" size="256"/>
  115. <Column id="srchdeptindxcd" type="STRING" size="256"/>
  116. <Column id="deptseqno" type="STRING" size="256"/>
  117. </ColumnInfo>
  118. <Rows>
  119. <Row>
  120. <Col id="deptindxcd"/>
  121. <Col id="deptindxflag"/>
  122. <Col id="deptindxnm"/>
  123. <Col id="deptupindxcd"/>
  124. <Col id="deptupindxnm"/>
  125. <Col id="deptnm"/>
  126. <Col id="deptcd"/>
  127. <Col id="status"/>
  128. <Col id="srchdeptindxcd"/>
  129. <Col id="deptseqno"/>
  130. </Row>
  131. </Rows>
  132. </Dataset>
  133. <Dataset id="ds_main_deptindxlist_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  134. <ColumnInfo>
  135. <Column id="depth" type="STRING" size="256"/>
  136. <Column id="deptindxcd" type="STRING" size="256"/>
  137. <Column id="deptupindxcd" type="STRING" size="256"/>
  138. <Column id="deptindxnm" type="STRING" size="256"/>
  139. <Column id="deptseqno" type="STRING" size="256"/>
  140. </ColumnInfo>
  141. <Rows>
  142. <Row>
  143. <Col id="depth"/>
  144. <Col id="deptindxcd"/>
  145. <Col id="deptupindxcd"/>
  146. <Col id="deptindxnm"/>
  147. <Col id="deptseqno"/>
  148. </Row>
  149. </Rows>
  150. </Dataset>
  151. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  152. <ColumnInfo>
  153. <Column id="send" type="STRING" size="256"/>
  154. </ColumnInfo>
  155. <Rows>
  156. <Row>
  157. <Col id="send"/>
  158. </Row>
  159. </Rows>
  160. </Dataset>
  161. <Dataset id="ds_hidden_condition_getdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  162. </Objects>
  163. <Bind>
  164. <BindItem id="item0" compid="cmb_indxflag" propid="value" datasetid="ds_hidden_condition" columnid="indxflag"/>
  165. <BindItem id="item1" compid="ipt_srcheddeptnm" propid="value" datasetid="ds_hidden_condition" columnid="srcheddeptnm"/>
  166. <BindItem id="item2" compid="ipt_deptnm" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptnm"/>
  167. <BindItem id="item3" compid="ipt_deptupindxcd" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptupindxcd"/>
  168. <BindItem id="item4" compid="ipt_deptindxcd" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptindxcd"/>
  169. <BindItem id="item5" compid="ipt_deptindxnm" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptindxnm"/>
  170. <BindItem id="item6" compid="ipt_deptupindxnm" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptupindxnm"/>
  171. <BindItem id="item7" compid="cmb_highestlvel" propid="value" datasetid="ds_hidden_condition" columnid="highestlvel"/>
  172. <BindItem id="item8" compid="input1" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptseqno"/>
  173. </Bind>
  174. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  175. * System Name :
  176. * Job Name :
  177. * Creator :
  178. * Make Date : 2017-12-04
  179. * Description :
  180. *---------------------------------------------------------------------------------------
  181. * Modify Date Modifier Modify Description
  182. *---------------------------------------------------------------------------------------
  183. * 2017-06-19 Live Converter TF->XP
  184. *
  185. *---------------------------------------------------------------------------------------
  186. ****************************************************************************************/
  187. //=======================================================================================
  188. // Lib Include
  189. //---------------------------------------------------------------------------------------
  190. include "com_commonxp::comm_main.xjs";
  191. //include "emr_termmngtxp::SMMRT01300.xjs";
  192. //include "emr_termmngtxp::MRTCommon.xjs";
  193. //include "com_departmentcodexp::ZSD001.xjs";
  194. //=======================================================================================
  195. // Global Form Variable
  196. //---------------------------------------------------------------------------------------
  197. var arErrorCode = new HashArray();
  198. var startRow = -1;
  199. var endRow = -1;
  200. var xCondPath = "ds_hidden_condition"; // 조회조건
  201. var xIndxInfoPath = "ds_main_indxinfo_deptindx"; // 색인정보
  202. var xIndxInfoBKPath = "ds_hidden_main_indxinfo_deptindx"; // 색인정보
  203. var xDeptIndxPath = "ds_main_deptindxlist_item"; // 과색인정보
  204. //=======================================================================================
  205. // Function
  206. //---------------------------------------------------------------------------------------
  207. /*-**************************************************************************************
  208. * Argument : N/A
  209. * Description : 조회
  210. ****************************************************************************************/
  211. function fn_TRMRT01301() {
  212. var oParam = {};
  213. oParam.id = "TRMRT01301";
  214. oParam.service = "termmngtapp.DeptSetMngt";
  215. oParam.method = "reqGetDeptIndxList";
  216. oParam.inds = "reqCond=ds_send";
  217. oParam.outds = "ds_main_deptindxlist_item=item";
  218. oParam.async = false;
  219. oParam.callback = "cf_TRMRT01301";
  220. tranf_submit(oParam);
  221. }
  222. function cf_TRMRT01301(sSvcId, nErrorCode, sErrorMsg) {
  223. arErrorCode.push(sSvcId, nErrorCode);
  224. }
  225. /*-**************************************************************************************
  226. * Argument : N/A
  227. * Description : 과색인 조회
  228. ****************************************************************************************/
  229. function fSrchDeptIndxList(){
  230. var sIndxFlag = this.objects[xCondPath].getColumn(0, "indxflag");
  231. if(sIndxFlag == "0"){ // 진단
  232. cap_indxinfo.text = "진단 색인 정보";
  233. }else if(sIndxFlag == "9"){ // 수술
  234. cap_indxinfo.text = "수술 색인 정보";
  235. }else if(sIndxFlag == "2"){ // 주호소
  236. cap_indxinfo.text = "주호소 색인 정보";
  237. }
  238. if(utlf_isNull(this.objects[xCondPath].getColumn(0, "srcheddeptcd"))) {
  239. return;
  240. }
  241. this.objects[xDeptIndxPath].clearData();
  242. ds_send.clearData();
  243. dsf_makeValue( ds_send, "indxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
  244. dsf_makeValue( ds_send, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  245. fn_TRMRT01301();
  246. if(arErrorCode.pop("TRMRT01301") > -1) {
  247. this.objects[xCondPath].setColumn( 0, "selectedindxcd", "");
  248. }
  249. }
  250. /*-**************************************************************************************
  251. * Argument : N/A
  252. * Description : 과색인 상세 조회
  253. ****************************************************************************************/
  254. function fSrchIndxInfo(){
  255. ipt_deptindxcd.enable = false;
  256. ds_send.clearData();
  257. dsf_makeValue( ds_send, "deptindxcd", "string", this.objects[xCondPath].getColumn(0, "selectedindxcd"));
  258. dsf_makeValue( ds_send, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  259. dsf_makeValue( ds_send, "indxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
  260. var oParam = {};
  261. oParam.id = "TRMRT01302";
  262. oParam.service = "termmngtapp.DeptSetMngt";
  263. oParam.method = "reqGetDeptIndxInfo";
  264. oParam.inds = "reqCond=ds_send";
  265. oParam.outds = "ds_main_indxinfo_deptindx=deptindx";
  266. oParam.async = false;
  267. oParam.callback = "cf_TRMRT01302";
  268. tranf_submit(oParam);
  269. if(arErrorCode.pop("TRMRT01301") > -1) {
  270. dsf_makeValue(this.objects[xCondPath], "highestlvel", "string", "");
  271. ds_hidden_main_indxinfo_deptindx.copyData(ds_main_indxinfo_deptindx);
  272. dsf_makeValue(this.objects[xIndxInfoPath], "deptnm", "string", this.objects[xCondPath].getColumn(0, "srcheddeptnm"));
  273. }
  274. }
  275. function cf_TRMRT01302(sSvcId, nErrorCode, sErrorMsg) {
  276. arErrorCode.push(sSvcId, nErrorCode);
  277. ds_main_indxinfo_deptindx.updateColID("depthngnm","deptnm");
  278. dsf_makeValue(ds_main_indxinfo_deptindx, "srchdeptindxcd", "string", ds_main_indxinfo_deptindx.getColumn(0, "deptindxcd"));
  279. }
  280. /*-**************************************************************************************
  281. * Argument : N/A
  282. * Description : 과색인 조회
  283. ****************************************************************************************/
  284. function fInit(){
  285. dsf_makeValue(this.objects[xIndxInfoPath], "status", "string", "I");
  286. var sIndxflag = this.objects[xCondPath+"_getdata"].getColumn(0, "indxflag");
  287. if(!utlf_isNull(sIndxflag)) {
  288. this.objects[xCondPath].setColumn(0, "indxflag", sIndxflag);
  289. this.objects[xCondPath].setColumn(0, "srcheddeptnm", this.objects[xCondPath+"_getdata"].getColumn(0, "deptnm"));
  290. this.objects[xCondPath].setColumn(0, "srcheddeptcd", this.objects[xCondPath+"_getdata"].getColumn(0, "deptcd"));
  291. fSrchDeptIndxList();
  292. opener.frmf_setParameter("saveyn","");
  293. }
  294. }
  295. /*-**************************************************************************************
  296. * Argument : N/A
  297. * Description : 색인 추가
  298. ****************************************************************************************/
  299. function fAddIndx(){
  300. var sIndxFlag = this.objects[xCondPath].getColumn(0, "indxflag");
  301. var sDeptCd = this.objects[xCondPath].getColumn(0, "srcheddeptcd");
  302. var sUpIndxCd = this.objects[xCondPath].getColumn(0, "selectedindxcd");
  303. if(trv_deptindx.currentrow < 0 && this.objects[xDeptIndxPath].rowcount > 0) {
  304. sysf_messageBox("색인을 선택하지", "E007");
  305. }
  306. if(utlf_isNull(sIndxFlag)){
  307. sysf_messageBox("색인구분을","C002");
  308. return;
  309. }
  310. if(utlf_isNull(sDeptCd)){
  311. sysf_messageBox("부서를","C002");
  312. return;
  313. }
  314. fIndxClear();
  315. this.objects[xCondPath].setColumn( 0, "highestlvel", "");
  316. this.objects[xIndxInfoPath].setColumn(0, "deptupindxcd", sUpIndxCd); // 상위색인코드
  317. dsf_makeValue(this.objects[xIndxInfoPath], "deptupindxnm", "string", this.objects[xDeptIndxPath].lookup("deptindxcd", sUpIndxCd, "deptindxnm")); // 상위색인명
  318. if(this.objects[xDeptIndxPath].rowcount == 0){
  319. dsf_makeValue(this.objects[xIndxInfoPath], "deptseqno", "string", "0");
  320. }
  321. }
  322. /*-**************************************************************************************
  323. * Argument : N/A
  324. * Description : 색인 정보 Clear
  325. ****************************************************************************************/
  326. function fIndxClear(){
  327. ipt_deptindxcd.enable = true;
  328. var iIndx = trv_deptindx.currentrow;
  329. ds_hidden_condition.setColumn( 0, "highestlvel", "Y");
  330. dsf_makeValue(this.objects[xIndxInfoPath], "deptindxcd", "string", "");
  331. dsf_makeValue(this.objects[xIndxInfoPath], "deptindxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
  332. dsf_makeValue(this.objects[xIndxInfoPath], "deptindxnm", "string", "");
  333. dsf_makeValue(this.objects[xIndxInfoPath], "deptupindxcd", "string", "-");
  334. dsf_makeValue(this.objects[xIndxInfoPath], "deptupindxnm", "string", "");
  335. dsf_makeValue(this.objects[xIndxInfoPath], "deptnm", "string", this.objects[xCondPath].getColumn(0, "srcheddeptnm"));
  336. dsf_makeValue(this.objects[xIndxInfoPath], "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  337. dsf_makeValue(this.objects[xIndxInfoPath], "status", "string", "I"); // 상태
  338. }
  339. /*-**************************************************************************************
  340. * Argument : N/A
  341. * Description : 색인 정보 저장
  342. ****************************************************************************************/
  343. function fSaveIndxInfo(){
  344. var sStatus = this.objects[xIndxInfoPath].getColumn(0, "status");
  345. var sIndxCd = this.objects[xIndxInfoPath].getColumn(0, "deptindxcd");
  346. var rtn = 0;
  347. var sNodeInfo ="deptindxcd▦deptindxnm▩색인코드▦색인명";
  348. var csvIndxInfoPath = dsf_getDsCSV(this.objects[xIndxInfoPath]);
  349. var csvIndxInfoBKPath = dsf_getDsCSV(this.objects[xIndxInfoBKPath]);
  350. if(fChkValueEmpty(xIndxInfoPath,sNodeInfo)){
  351. return;
  352. }
  353. if(!utlf_isNull(this.objects[xDeptIndxPath].lookup("deptindxcd", sIndxCd, "deptindxcd"))){
  354. if(sStatus == "I" || (sStatus == "U" && sIndxCd != this.objects[xIndxInfoPath].getColumn(0, "srchdeptindxcd"))){
  355. sysf_messageBox("이미 등록된 색인코드","E008");
  356. return;
  357. }
  358. }
  359. if(sStatus == "U"){
  360. if( csvIndxInfoPath == csvIndxInfoBKPath) {
  361. sysf_messageBox("변경된 데이터가","I004");
  362. return;
  363. }
  364. }
  365. if(sStatus != "D") {
  366. rtn = sysf_messageBox("","Q002");
  367. }else{
  368. rtn = sysf_messageBox("","Q001");
  369. }
  370. if(rtn != 6){
  371. if(sStatus == "D"){
  372. if( csvIndxInfoPath == csvIndxInfoBKPath ) {
  373. this.objects[xIndxInfoPath].getColumn(0, "status", "-");
  374. }else{
  375. this.objects[xIndxInfoPath].setColumn( 0, "status", "U");
  376. }
  377. }
  378. return;
  379. }
  380. ds_send.clearData();
  381. dsf_makeValue( ds_send, "srchedindxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
  382. dsf_makeValue( ds_send, "srcheddeptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  383. dsf_createDs("ds_send_deptindxinfo");
  384. ds_send_deptindxinfo.copyData(this.objects[xIndxInfoPath]);
  385. var oParam = {};
  386. oParam.id = "TXMRT01301";
  387. oParam.service = "termmngtapp.DeptSetMngt";
  388. oParam.method = "reqExeDeptIndxInfo";
  389. oParam.inds = "reqCond=ds_send deptindxinfo=ds_send_deptindxinfo";
  390. oParam.outds = "ds_main_deptindxlist_item=item";
  391. oParam.async = false;
  392. oParam.callback = "cf_TXMRT01301";
  393. tranf_submit(oParam);
  394. if(arErrorCode.pop("TXMRT01301") > -1) {
  395. fIndxClear();
  396. if(!utlf_isNull(this.objects[xCondPath+"_getdata"].getColumn(0, "indxflag")) &&
  397. this.objects[xCondPath+"_getdata"].getColumn(0, "deptcd") == this.objects[xCondPath].getColumn(0, "srcheddeptcd")){
  398. opener.frmf_setParameter("saveyn","Y");
  399. }
  400. //이윤주 수정(20130312)
  401. fSrchDeptIndxList();
  402. }
  403. }
  404. function cf_TXMRT01301(sSvcId, nErrorCode, sErrorMsg) {
  405. arErrorCode.push(sSvcId, nErrorCode);
  406. }
  407. /*-**************************************************************************************
  408. * Argument : N/A
  409. * Description : 빈 공백 check
  410. ****************************************************************************************/
  411. function fChkValueEmpty(pRef, pNodeInfo){
  412. var sNodeInfo = pNodeInfo.split("▩");
  413. var sNode = sNodeInfo[0].split("▦");
  414. var sNodeNm = sNodeInfo[1].split("▦");
  415. for(var i=0; i<sNode.length; i++){
  416. if(utlf_isNull(this.objects[pRef].getColumn(0, sNode[i]))) {
  417. sysf_messageBox(sNodeNm[i]+"는 ","I003");
  418. return true;
  419. }
  420. }
  421. return false;
  422. }
  423. /*-**************************************************************************************
  424. * Argument : N/A
  425. * Description : Drag & Drop
  426. ****************************************************************************************/
  427. function fDragDropIndx(){
  428. if(utlf_isNull(ds_hidden_condition.getColumn(0, "selectedindxcd"))){
  429. return;
  430. }
  431. var treePath = ds_main_deptindxlist_item;
  432. var srcValue = treePath.getColumn(startRow, "indxcd");
  433. if(treePath.getColumn(startRow, "deptindxcd") != treePath.getColumn(endRow, "deptindxcd")) {
  434. var rtn = sysf_messageBox("색인 순서 변경을", "Q004");
  435. dsf_createDs("ds_send_reqdata_dragdrop");
  436. if(treePath.getColumn(startRow, "deptupindxcd") == treePath.getColumn(endRow, "deptupindxcd") && (rtn == 6)) {
  437. //같은 level에서만 순서변경이 가능하다
  438. //indxseqno 값을 변경
  439. //if(parseInt(model.getValue(treePath + "[indxcd='"+srcValue+"']_indxseqno")) < parseInt(model.getValue(treePath + "[indxcd='"+trv_deptindx.value+"']_indxseqno"))){
  440. if(treePath.getColumn(startRow, "deptseqno") > treePath.getColumn(endRow, "deptseqno")) {
  441. //alert("위로");
  442. dsf_makeValue( ds_send_reqdata_dragdrop, "status", "string", "PLUS");
  443. dsf_makeValue( ds_send_reqdata_dragdrop, "deptindxcd", "string", treePath.getColumn(startRow, "deptindxcd"));
  444. dsf_makeValue( ds_send_reqdata_dragdrop, "deptseqno", "string", treePath.getColumn(endRow, "deptseqno"));
  445. dsf_makeValue( ds_send_reqdata_dragdrop, "predeptseqno", "string", treePath.getColumn(startRow, "deptseqno"));
  446. dsf_makeValue( ds_send_reqdata_dragdrop, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  447. dsf_makeValue( ds_send_reqdata_dragdrop, "indxflag", "string", ds_hidden_condition.getColumn(0, "indxflag"));
  448. } else {
  449. //alert("아래로");
  450. dsf_makeValue( ds_send_reqdata_dragdrop, "status", "string", "MINUS");
  451. dsf_makeValue( ds_send_reqdata_dragdrop, "deptindxcd", "string", treePath.getColumn(startRow, "deptindxcd"));
  452. dsf_makeValue( ds_send_reqdata_dragdrop, "deptseqno", "string", treePath.getColumn(endRow, "deptseqno"));
  453. dsf_makeValue( ds_send_reqdata_dragdrop, "predeptseqno", "string", treePath.getColumn(startRow, "deptseqno"));
  454. dsf_makeValue( ds_send_reqdata_dragdrop, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  455. dsf_makeValue( ds_send_reqdata_dragdrop, "indxflag", "string", ds_hidden_condition.getColumn(0, "indxflag"));
  456. }
  457. fn_changeRow();
  458. ds_main_deptindxlist_item.clearData();
  459. var oParam = {};
  460. oParam.id = "TXMRT01302";
  461. oParam.service = "termmngtapp.DeptSetMngt";
  462. oParam.method = "reqExeDeptIndxSeqNo";
  463. oParam.inds = "req=ds_send_reqdata_dragdrop";
  464. oParam.outds = "ds_main_deptindxlist_item=item";
  465. oParam.async = false;
  466. oParam.callback = "cf_TXMRT01302";
  467. tranf_submit(oParam);
  468. if(arErrorCode.pop("TXMRT01302") > -1){
  469. sysf_messageBox("색인변경이", "I001");
  470. var cRow = ds_main_deptindxlist_item.findRow("indxcd",srcValue);
  471. grdf_expandTree(trv_deptindx, cRow);
  472. }
  473. } else if(rtn == 6){
  474. sysf_messageBox("다른 Level로 색인변경을", "E001");
  475. }
  476. }
  477. fIndxClear();
  478. }
  479. function cf_TXMRT01302(sSvcId, nErrorCode, sErrorMsg) {
  480. arErrorCode.push(sSvcId, nErrorCode);
  481. }
  482. function fn_changeRow() {
  483. var cDepth = ds_main_deptindxlist_item.getColumn(startRow, "depth");
  484. var nextRow = ds_main_deptindxlist_item.findRow("depth", cDepth, startRow+1);
  485. var nextRow2 = -1;
  486. if(nextRow != startRow+1) nextRow2 = ds_main_deptindxlist_item.findRow("depth", cDepth, endRow+1);
  487. dsf_createDs("ds_temp_copydata");
  488. dsf_copyColInfo(ds_temp_copydata, ds_main_deptindxlist_item);
  489. for(var i = nextRow - 1 ; i >= startRow ; i--) {
  490. ds_temp_copydata.copyRow(ds_temp_copydata.addRow(), ds_main_deptindxlist_item, i);
  491. ds_main_deptindxlist_item.deleteRow(i);
  492. }
  493. var insertRow = -1;
  494. if(ds_send_reqdata_dragdrop.getColumn(0, "state") == "MINUS") {
  495. if(ds_temp_copydata.rowcount > 1) {
  496. //뎁스 그룹 전체 이동시
  497. insertRow = nextRow2 - ds_temp_copydata.rowcount-1;
  498. } else {
  499. //최하위 뎁스 한건만 이동시키는 경우
  500. insertRow = endRow - ds_temp_copydata.rowcount+1;
  501. }
  502. } else {
  503. insertRow = endRow;
  504. }
  505. for(var j = 0 ; j < ds_temp_copydata.rowcount ; j++) {
  506. var nRow = ds_main_deptindxlist_item.insertRow(insertRow);
  507. ds_main_deptindxlist_item.copyRow(nRow, ds_temp_copydata, j);
  508. }
  509. }
  510. //=======================================================================================
  511. // Event
  512. //---------------------------------------------------------------------------------------
  513. /****************************************************************************************
  514. * Components : Form
  515. * Description : 화면 처음 초기화시 폼초기화
  516. ****************************************************************************************/
  517. function SMMRT01300_onload(obj:Form, e:LoadEventInfo) {
  518. frmf_initForm(obj);
  519. //grdf_initGrid(grd_XXX);
  520. //grdf_setGridSort(grd_XXX);
  521. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  522. try{
  523. ds_hidden_condition_getdata.copyData(arg_ds_hidden_condition_getdata);
  524. }catch(e){}
  525. fInit();
  526. }
  527. /****************************************************************************************
  528. * Components : Grid
  529. * Description : 색인명 선택
  530. ****************************************************************************************/
  531. function trv_deptindx_oncellclick(obj:Grid, e:GridClickEventInfo) {
  532. //해당 정보 조회_등록화면에 뿌려준다.
  533. this.objects[xCondPath].setColumn(0, "selectedindxcd", ds_main_deptindxlist_item.getColumn(e.row, "deptindxcd"));
  534. fSrchIndxInfo();
  535. }
  536. /****************************************************************************************
  537. * Components : Edit
  538. * Description : 진료부서 조회 팝업
  539. ****************************************************************************************/
  540. function ipt_srcheddeptnm_onkeyup(obj:Edit, e:KeyEventInfo) {
  541. if(e.keycode == 13) {
  542. obj.updateToDataset();
  543. btn_deptsrch.click();
  544. }
  545. }
  546. /****************************************************************************************
  547. * Components : Button
  548. * Description : 조회
  549. ****************************************************************************************/
  550. function btn_srchedindx_onclick(obj:Button, e:ClickEventInfo) {
  551. fSrchDeptIndxList();
  552. }
  553. /****************************************************************************************
  554. * Components : Button
  555. * Description : 색인추가
  556. ****************************************************************************************/
  557. function btn_addindx_onclick(obj:Button, e:ClickEventInfo) {
  558. fAddIndx();
  559. }
  560. /****************************************************************************************
  561. * Components : Edit
  562. * Description : 키 입력시 색인추가버튼 활성화
  563. ****************************************************************************************/
  564. function ipt_deptindxcd_onkeydown(obj:Edit, e:KeyEventInfo) {
  565. btn_upindxcd.enable = true;
  566. }
  567. /****************************************************************************************
  568. * Components : Button
  569. * Description : clear
  570. ****************************************************************************************/
  571. function btn_clear_onclick(obj:Button, e:ClickEventInfo) {
  572. fIndxClear();
  573. }
  574. /****************************************************************************************
  575. * Components : Button
  576. * Description : 상위색인코드 검색팝업
  577. ****************************************************************************************/
  578. function btn_upindxcd_onclick(obj:Button, e:ClickEventInfo) {
  579. frmf_setParameter("indxflag", this.objects[xCondPath].getColumn(0, "indxflag"));
  580. frmf_setParameter("deptcd", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
  581. frmf_modal("SPMRT01100", "SPMRT01100", "", "", 1, 100, 100, "", "", "", "", "", "M");
  582. var sIndxCd = frmf_getParameter("indxcd");
  583. if(!utlf_isNull(sIndxCd)){
  584. this.objects[xIndxInfoPath].setColumn(0, "deptupindxcd", sIndxCd);
  585. this.objects[xIndxInfoPath].setColumn(0, "deptupindxnm", frmf_getParameter("indxnm"));
  586. }
  587. frmf_setParameter("indxcd", "");
  588. frmf_setParameter("indxnm", "");
  589. }
  590. /****************************************************************************************
  591. * Components : Button
  592. * Description : 진료부서 조회 팝업
  593. ****************************************************************************************/
  594. function btn_deptsrch_onclick(obj:Button, e:ClickEventInfo) {
  595. // zbcfOpenInstDeptCodeList("deptnm", this.objects[xCondPath].getColumn(0, "srcheddeptnm"), xCondPath].getColumn(0, "srcheddeptcd", xCondPath].getColumn(0, "srcheddeptnm", "ordduseryn", "D");
  596. var rtnObj = appf_openInstDeptCodeList("deptnm", this.objects[xCondPath].getColumn(0,"srcheddeptnm"), "ordduseryn", "D", "deptcd depthngnm");
  597. dsf_makeValue(this.objects[xCondPath],"srcheddeptcd","string",rtnObj.deptcd);
  598. dsf_makeValue(this.objects[xCondPath],"srcheddeptnm","string",rtnObj.depthngnm);
  599. fSrchDeptIndxList();
  600. }
  601. /****************************************************************************************
  602. * Components : Button
  603. * Description : 삭제
  604. ****************************************************************************************/
  605. function button90_onclick(obj:Button, e:ClickEventInfo) {
  606. if(this.objects[xIndxInfoPath].getColumn(0, "status") != "I"){
  607. this.objects[xIndxInfoPath].setColumn( 0, "status", "D");
  608. fSaveIndxInfo();
  609. }else{
  610. fIndxClear();
  611. }
  612. }
  613. /****************************************************************************************
  614. * Components : Button
  615. * Description : 저장
  616. ****************************************************************************************/
  617. function button1_onclick(obj:Button, e:ClickEventInfo) {
  618. fSaveIndxInfo();
  619. }
  620. /****************************************************************************************
  621. * Components : CheckBox
  622. * Description : 값변경시
  623. ****************************************************************************************/
  624. function cmb_highestlvel_onclick(obj:CheckBox, e:ClickEventInfo)
  625. {
  626. if(obj.value == false) ds_hidden_condition.setColumn(0,"highestlvel","");
  627. fIndxClear();
  628. }
  629. function trv_deptindx_onlbuttondown(obj:Grid, e:GridMouseEventInfo)
  630. {
  631. startRow = e.row;
  632. }
  633. function trv_deptindx_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
  634. {
  635. endRow = e.row;
  636. if(startRow > -1 && endRow > -1 && startRow != endRow) fDragDropIndx();
  637. }
  638. function ipt_srcheddeptnm_onkeydown(obj:Edit, e:KeyEventInfo)
  639. {
  640. if(e.keycode == 13) {
  641. obj.updateToDataset();
  642. btn_deptsrch.click();
  643. }
  644. }
  645. ]]></Script>
  646. </Form>
  647. </FDL>