SMAHA03220_공단연계문진코드관리.xfdl 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAHA03220" position="absolute 0 0 1196 792" titletext="문진코드 관리" oninit="SMAHA03220_oninit" onload="SMAHA03220_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="문진코드관리" class="tit_1" position="absolute 0 0 159 25"/>
  8. <Grid id="grd_answlst" taborder="1" binddataset="ds_main_answlst_item" useinputpanel="false" position="absolute 689 94 1195 762" cellsizingtype="col" anchor="top right bottom" selecttype="multirow" autoenter="key">
  9. <Formats>
  10. <Format id="default">
  11. <Columns>
  12. <Column size="20"/>
  13. <Column size="50"/>
  14. <Column size="250"/>
  15. <Column size="0"/>
  16. <Column size="60"/>
  17. <Column size="50"/>
  18. <Column size="60"/>
  19. <Column size="60"/>
  20. <Column size="100"/>
  21. </Columns>
  22. <Rows>
  23. <Row size="40" band="head"/>
  24. <Row size="24"/>
  25. </Rows>
  26. <Band id="head">
  27. <Cell/>
  28. <Cell col="1" text="코드"/>
  29. <Cell col="2" text="답안"/>
  30. <Cell col="3" text="영문답안"/>
  31. <Cell col="4" text="사용여부"/>
  32. <Cell col="5" text="점수"/>
  33. <Cell col="6" text="비고입력"/>
  34. <Cell col="7" text="하위문진사용" wordwrap="word"/>
  35. <Cell col="8" text="하위문진코드"/>
  36. </Band>
  37. <Band id="body">
  38. <Cell celltype="head"/>
  39. <Cell col="1" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:answcd" enable="false"/>
  40. <Cell col="2" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:answnm"/>
  41. <Cell col="3" displaytype="text" edittype="text" text="bind:answengnm"/>
  42. <Cell col="4" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:useyn == 'Y' ? 1 : 0"/>
  43. <Cell col="5" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:answpoint" mask="999" maskchar=" "/>
  44. <Cell col="6" displaytype="checkbox" edittype="checkbox" text="bind:reminptyn" expr="expr:reminptyn == 'Y' ? 1 : 0"/>
  45. <Cell col="7" displaytype="checkbox" edittype="checkbox" text="bind:infinqryn" expr="expr:infinqryn == 'Y' ? 1 : 0"/>
  46. <Cell col="8" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:infinqrcd"/>
  47. </Band>
  48. </Format>
  49. </Formats>
  50. </Grid>
  51. <Div id="grp_sea" anchor="left top right" taborder="2" class="div_SA" position="absolute 0 25 1195 65">
  52. <Layouts>
  53. <Layout>
  54. <Static id="caption2" text="문진분류 :" class="search_name" position="absolute 316 12 403 29"/>
  55. <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 1123 10 1179 32" onclick="grp_sea_btn_search_onclick" anchor="top right"/>
  56. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1104 10 1110 32" anchor="top right"/>
  57. <Combo id="cmb_inqrflag" taborder="2" innerdataset="@ds_init_baseinfo_inqrflaglst_G008" codecolumn="cdid" datacolumn="cdnm" class="combo_s_essential" position="absolute 405 11 555 30" onitemchanged="grp_sea_cmb_inqrflag_onitemchanged"/>
  58. <Static id="caption7" text="적용년도 :" class="search_name" position="absolute 16 12 103 29"/>
  59. <Combo id="cmb_appyear" taborder="3" innerdataset="@ds_init_baseinfo_yearlist_S900" codecolumn="cdid" datacolumn="cdnm" class="combo_s_essential" position="absolute 105 11 225 30" onitemchanged="grp_sea_cmb_appyear_onitemchanged"/>
  60. </Layout>
  61. </Layouts>
  62. </Div>
  63. <Static id="caption1" text="문진코드" class="tit_2" position="absolute 0 73 78 95"/>
  64. <Shape id="line1" class="line_10" position="absolute 0 89 685 95" anchor="left top right"/>
  65. <Grid id="grd_inqrlst" taborder="3" binddataset="ds_main_inqrlst_item" useinputpanel="false" position="absolute 0 94 685 762" cellsizingtype="col" anchor="all" oncelldblclick="grd_inqrlst_oncelldblclick" treeusecheckbox="false" treeinitstatus="expand,all" selecttype="multirow" autoenter="key">
  66. <Formats>
  67. <Format id="default">
  68. <Columns>
  69. <Column size="22" band="left"/>
  70. <Column size="0" band="left"/>
  71. <Column size="70" band="left"/>
  72. <Column size="89" band="left"/>
  73. <Column size="86" band="left"/>
  74. <Column size="70" band="left"/>
  75. <Column size="250"/>
  76. <Column size="0"/>
  77. <Column size="60"/>
  78. <Column size="50"/>
  79. <Column size="30"/>
  80. <Column size="30"/>
  81. <Column size="30"/>
  82. <Column size="30"/>
  83. <Column size="60"/>
  84. <Column size="80"/>
  85. <Column size="100"/>
  86. <Column size="0"/>
  87. <Column size="0"/>
  88. </Columns>
  89. <Rows>
  90. <Row size="40" band="head"/>
  91. <Row size="40"/>
  92. </Rows>
  93. <Band id="head">
  94. <Cell/>
  95. <Cell col="1" text="lvl"/>
  96. <Cell col="2" text="적용년도"/>
  97. <Cell col="3" colspan="2" text="코드" taborder="undefined"/>
  98. <Cell col="5" text="상위문진코드" wordwrap="word"/>
  99. <Cell col="6" text="문진내역"/>
  100. <Cell col="7" text="문진영문내역"/>
  101. <Cell col="8" text="답안구분"/>
  102. <Cell col="9" text="성별"/>
  103. <Cell col="10" text="사용여부" wordwrap="word"/>
  104. <Cell col="11" text="출력순서" wordwrap="word"/>
  105. <Cell col="12" text="제목여부" wordwrap="word"/>
  106. <Cell col="13" text="연령제한" wordwrap="word"/>
  107. <Cell col="14" text="적용나이"/>
  108. <Cell col="15" text="기본값"/>
  109. <Cell col="16" text="비고"/>
  110. <Cell col="17" text="문진구분"/>
  111. <Cell col="18" text="TempInqrCd"/>
  112. </Band>
  113. <Band id="body">
  114. <Cell celltype="head"/>
  115. <Cell col="1" text="bind:lvl"/>
  116. <Cell col="2" displaytype="combo" style="padding:0 0 0 3;" text="bind:appyear" combodataset="ds_init_baseinfo_yearlist_S900" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  117. <Cell col="3" displaytype="tree" edittype="tree" style="padding:0 0 0 3;linetype:onlyhorz;" treestartlevel="1" treelevel="bind:lvl" enable="false"/>
  118. <Cell col="4" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" style="align:left middle;padding:0 0 0 3;" text="bind:inqrcd" editautoselect="true"/>
  119. <Cell col="5" style="align:left middle;padding:0 0 0 3;" text="bind:supinqrcd"/>
  120. <Cell col="6" displaytype="text" edittype="text" style="padding:3 3 3 3;" text="bind:inqrnm" wordwrap="word"/>
  121. <Cell col="7" displaytype="text" edittype="text" text="bind:inqrengnm"/>
  122. <Cell col="8" displaytype="combo" edittype="expr:getRowType(currow) == 2 ? 'combo' : 'none'" style="padding:0 0 0 3;" text="bind:answflag" combodataset="ds_init_baseinfo_answflaglst_A0066" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
  123. <Cell col="9" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:gndrflag" combodataset="ds_init_baseinfo_gndrlst_P0391" combocodecol="cdid" combodatacol="cdnm"/>
  124. <Cell col="10" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:useyn == 'Y' ? 1 : 0"/>
  125. <Cell col="11" displaytype="text" edittype="text" text="bind:prntseq"/>
  126. <Cell col="12" displaytype="checkbox" edittype="checkbox" text="bind:titleyn" expr="expr:titleyn == 'Y' ? 1 : 0"/>
  127. <Cell col="13" displaytype="checkbox" edittype="checkbox" text="bind:ageyn" expr="expr:ageyn == 'Y' ? 1 : 0"/>
  128. <Cell col="14" displaytype="text" edittype="text" style="padding:0 0 0 3;" text="bind:appage"/>
  129. <Cell col="15" displaytype="text" edittype="text" style="padding:0 0 0 3;" text="bind:defltval"/>
  130. <Cell col="16" displaytype="text" edittype="text" style="padding:3 3 3 3;" text="bind:remark" wordwrap="word"/>
  131. <Cell col="17" text="bind:inqrflag"/>
  132. <Cell col="18" text="bind:tempinqrcd"/>
  133. </Band>
  134. </Format>
  135. </Formats>
  136. </Grid>
  137. <Static id="caption4" text="선택형답안" class="tit_2" position="absolute 689 73 796 94" anchor="top right"/>
  138. <Shape id="line2" class="line_10" position="absolute 689 89 1195 95" anchor="top right"/>
  139. <Button id="btn_grddel" taborder="4" text="행삭제" class="btn2" position="absolute 632 67 685 89" anchor="top right" onclick="btn_grddel_onclick"/>
  140. <Button id="btn_grdadd" taborder="5" text="문진추가" class="btn2" position="absolute 567 67 631 89" anchor="top right" onclick="btn_grdadd_onclick"/>
  141. <Button id="btn_ansadd" taborder="6" text="행추가" class="btn2" position="absolute 1088 67 1141 89" anchor="top right" onclick="btn_ansadd_onclick"/>
  142. <Button id="btn_ansdel" taborder="7" text="행삭제" class="btn2" position="absolute 1142 67 1195 89" anchor="top right" onclick="btn_ansdel_onclick"/>
  143. <Button id="button1" taborder="8" text="신규문진" class="btn2" position="absolute 502 67 566 89" anchor="top right" onclick="button1_onclick"/>
  144. <Button id="btn_save" taborder="11" text="문진저장" class="btn4" position="absolute 1033 766 1113 788" anchor="right bottom" onclick="btn_save_onclick"/>
  145. <Button id="button2" taborder="12" text="답안저장" class="btn4" position="absolute 1115 766 1195 788" anchor="right bottom" onclick="button2_onclick"/>
  146. <Button id="btn_reorder" taborder="13" text="재정렬" class="btn2" position="absolute 449 67 501 89" anchor="top right" onclick="btn_reorder_onclick"/>
  147. </Layout>
  148. </Layouts>
  149. <Objects>
  150. <Dataset id="ds_init_baseinfo_yearlist_S900" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  151. <Dataset id="ds_init_baseinfo_inqrflaglst_G008" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  152. <Dataset id="ds_init_baseinfo_answflaglst_A0066" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  153. <Dataset id="ds_init_baseinfo_gndrlst_P0391" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  154. <Dataset id="ds_main_inqrlst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_inqrlst_item_oncolumnchanged">
  155. <ColumnInfo>
  156. <Column id="lvl" type="STRING" size="256" sumtext="레벨"/>
  157. <Column id="appyear" type="STRING" size="256" sumtext="적용년도"/>
  158. <Column id="inqrcd" type="STRING" size="256" sumtext="문진코드"/>
  159. <Column id="supinqrcd" type="STRING" size="256" sumtext="상위문진코드"/>
  160. <Column id="inqrnm" type="STRING" size="256" sumtext="문진명"/>
  161. <Column id="inqrengnm" type="STRING" size="256" sumtext="문진영문명"/>
  162. <Column id="answflag" type="STRING" size="256" sumtext="단변구분"/>
  163. <Column id="gndrflag" type="STRING" size="256" sumtext="성별"/>
  164. <Column id="titleyn" type="STRING" size="256" sumtext="제목사용여부"/>
  165. <Column id="useyn" type="STRING" size="256" sumtext="사용여부"/>
  166. <Column id="ageyn" type="STRING" size="256" sumtext="나이제한여부"/>
  167. <Column id="appage" type="STRING" size="256" sumtext="적용나이"/>
  168. <Column id="defltval" type="STRING" size="256" sumtext="기본값"/>
  169. <Column id="prntseq" type="STRING" size="256" sumtext="출력순서"/>
  170. <Column id="remark" type="STRING" size="256" sumtext="비고"/>
  171. <Column id="inqrflag" type="STRING" size="256" sumtext="문진분류"/>
  172. <Column id="tempinqrcd" type="STRING" size="256" sumtext="임시문진코드"/>
  173. </ColumnInfo>
  174. </Dataset>
  175. <Dataset id="ds_main_answlst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_answlst_item_oncolumnchanged">
  176. <ColumnInfo>
  177. <Column id="answcd" type="STRING" size="256" sumtext="답변코드"/>
  178. <Column id="answnm" type="STRING" size="256" sumtext="답변명"/>
  179. <Column id="answengnm" type="STRING" size="256" sumtext="답변영문명"/>
  180. <Column id="infinqryn" type="STRING" size="256" sumtext="하위문진사용여부"/>
  181. <Column id="infinqrcd" type="STRING" size="256" sumtext="하위문진사용코드"/>
  182. <Column id="useyn" type="STRING" size="256" sumtext="사용여부"/>
  183. <Column id="reminptyn" type="STRING" size="256" sumtext="비고입력여부"/>
  184. <Column id="answpoint" type="INT" size="256" sumtext="답변점수"/>
  185. </ColumnInfo>
  186. </Dataset>
  187. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  188. <ColumnInfo>
  189. <Column id="srchappyear" type="STRING" size="256"/>
  190. <Column id="srchinqrflag" type="STRING" size="256"/>
  191. <Column id="ansinqrcd" type="STRING" size="256"/>
  192. </ColumnInfo>
  193. <Rows>
  194. <Row>
  195. <Col id="srchappyear"/>
  196. <Col id="srchinqrflag"/>
  197. </Row>
  198. </Rows>
  199. </Dataset>
  200. <Dataset id="ds_send_answinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  201. <ColumnInfo>
  202. <Column id="inqrflag" type="STRING" size="256"/>
  203. <Column id="inqrcd" type="STRING" size="256"/>
  204. <Column id="appyear" type="STRING" size="256"/>
  205. <Column id="answflag" type="STRING" size="256"/>
  206. <Column id="saveinqrans" type="STRING" size="256"/>
  207. </ColumnInfo>
  208. <Rows>
  209. <Row>
  210. <Col id="inqrflag"/>
  211. <Col id="inqrcd"/>
  212. <Col id="appyear"/>
  213. <Col id="answflag"/>
  214. <Col id="saveinqrans"/>
  215. </Row>
  216. </Rows>
  217. </Dataset>
  218. <Dataset id="ds_send_save_saveinqrcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  219. <Dataset id="ds_send_answinfo_saveinqrans" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  220. </Objects>
  221. <Bind>
  222. <BindItem id="item0" compid="grp_sea.cmb_appyear" propid="value" datasetid="ds_send" columnid="srchappyear"/>
  223. <BindItem id="item1" compid="grp_sea.cmb_inqrflag" propid="value" datasetid="ds_send" columnid="srchinqrflag"/>
  224. </Bind>
  225. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  226. * System Name :
  227. * Job Name :
  228. * Creator :
  229. * Make Date : 2015-11-13
  230. * Description :
  231. *---------------------------------------------------------------------------------------
  232. * Modify Date Modifier Modify Description
  233. *---------------------------------------------------------------------------------------
  234. * 2015-11-13 Live Converter TF->XP
  235. *
  236. *---------------------------------------------------------------------------------------
  237. ****************************************************************************************/
  238. include "com_commonxp::comm_main.xjs";
  239. include "ast_healexamxp::AHA001.xjs";
  240. include "ast_healthexambasexp::healcombolist.xjs";
  241. var arErrorCode = new HashArray();
  242. function SMAHA03220_oninit(obj:Form, e:InitEventInfo)
  243. {
  244. frmf_initForm(obj);
  245. }
  246. function SMAHA03220_onload(obj:Form, e:LoadEventInfo)
  247. {
  248. grdf_initGrid(grd_inqrlst);
  249. grdf_setRowTypeIcon(grd_inqrlst, 0);
  250. grdf_initGrid(grd_answlst);
  251. grdf_setRowTypeIcon(grd_answlst, 0);
  252. grp_sea.btn_search.enable = frmf_checkAuth("R") ;
  253. btn_save.enable = frmf_checkAuth("X") ;
  254. fGetBasicCode();
  255. fInit();
  256. }
  257. function fGetBasicCode()
  258. {
  259. var arrParam = [{dsNm: "ds_init_baseinfo_answflaglst_A0066", cdGrpId: "A0066"}
  260. ,{dsNm: "ds_init_baseinfo_gndrlst_P0391", cdGrpId: "P0391"}]
  261. appf_getCodeList(arrParam);
  262. var arrParam = [{dsNm: "ds_init_baseinfo_inqrflaglst_G008", cdGrpId: "G008"}
  263. ,{dsNm: "ds_init_baseinfo_yearlist_S900", cdGrpId: "S900"}];
  264. healGetCodeList(arrParam);
  265. }
  266. function fInit()
  267. {
  268. var cur_year = fGetCurrentYear();
  269. grp_sea.cmb_appyear.value = cur_year;
  270. }
  271. function fGetCurrentYear()
  272. {
  273. return utlf_getNewDate().getFullYear();
  274. }
  275. function grp_sea_cmb_appyear_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  276. {
  277. grp_sea.btn_search.click();
  278. }
  279. function grp_sea_cmb_inqrflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  280. {
  281. grp_sea.btn_search.click();
  282. }
  283. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  284. {
  285. fGetAssoInqrList();
  286. }
  287. function fGetAssoInqrList()
  288. {
  289. var oParam = {};
  290. oParam.id = "TRAHA03162";
  291. oParam.service = "healthexambaseapp.InqrCode";
  292. oParam.method = "reqGetAssoInqrCdList";
  293. oParam.inds = "req=ds_send";
  294. oParam.outds = "ds_main_inqrlst_item=item";
  295. oParam.async = false;
  296. //oParam.callback = "cf_TRAHA03162";
  297. tranf_submit(oParam);
  298. }
  299. function cf_submit(sSvcId, nErrorCode, sErrorMsg)
  300. {
  301. arErrorCode.push(sSvcId, nErrorCode);
  302. if(nErrorCode < 0) return;
  303. }
  304. function ds_main_inqrlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  305. {
  306. if(e.columnid == "useyn")
  307. {
  308. obj.setColumn(e.row, "useyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  309. }
  310. if(e.columnid == "titleyn")
  311. {
  312. obj.setColumn(e.row, "titleyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  313. }
  314. if(e.columnid == "ageyn")
  315. {
  316. obj.setColumn(e.row, "ageyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  317. }
  318. if(e.columnid == "inqrcd")
  319. {
  320. var level = obj.getColumn(e.row, "lvl");
  321. var inqrCd = e.newvalue;
  322. var tempInqrCd = obj.getColumn(e.row, "tempinqrcd");
  323. if(utlf_isNull(tempInqrCd))
  324. {
  325. obj.setColumn(e.row, "tempinqrcd", inqrCd);
  326. }
  327. else
  328. {
  329. for(var i = 0; i < obj.rowcount; i++)
  330. {
  331. var desLevel = obj.getColumn(i, "lvl");
  332. var supInqrCd = obj.getColumn(i, "supinqrcd");
  333. if(tempInqrCd == supInqrCd && (parseInt(level) + 1) == parseInt(level))
  334. {
  335. obj.setColumn(i, "supinqrcd", inqrCd);
  336. }
  337. }
  338. obj.setColumn(e.row, "tempinqrcd", inqrCd);
  339. }
  340. }
  341. }
  342. function grd_inqrlst_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  343. {
  344. var selRow = ds_main_inqrlst_item.rowposition;
  345. ds_send_answinfo.setColumn(0, "inqrflag", ds_main_inqrlst_item.getColumn(selRow, "inqrflag"));
  346. ds_send_answinfo.setColumn(0, "inqrcd", ds_main_inqrlst_item.getColumn(selRow, "inqrcd"));
  347. ds_send_answinfo.setColumn(0, "appyear", ds_main_inqrlst_item.getColumn(selRow, "appyear"));
  348. ds_send_answinfo.setColumn(0, "answflag", ds_main_inqrlst_item.getColumn(selRow, "answflag"));
  349. var oParam = {};
  350. oParam.id = "TRAHA03162";
  351. oParam.service = "healthexambaseapp.InqrCode";
  352. oParam.method = "reqGetAssoAnswCdList";
  353. oParam.inds = "req=ds_send_answinfo";
  354. oParam.outds = "ds_main_answlst_item=item";
  355. oParam.async = false;
  356. //oParam.callback = "cf_TRAHA03162";
  357. tranf_submit(oParam);
  358. }
  359. function ds_main_answlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  360. {
  361. if(e.columnid == "useyn")
  362. {
  363. obj.setColumn(e.row, "useyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  364. }
  365. if(e.columnid == "reminptyn")
  366. {
  367. obj.setColumn(e.row, "reminptyn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  368. }
  369. if(e.columnid == "infinqryn")
  370. {
  371. obj.setColumn(e.row, "infinqryn", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  372. }
  373. }
  374. function button1_onclick(obj:Button, e:ClickEventInfo)
  375. {
  376. fSetNewInqr();
  377. }
  378. function fSetNewInqr()
  379. {
  380. var cur_year = fGetCurrentYear();
  381. var inqrFlag = fGetInqrFlag();
  382. var addRow = fGetGrdAddRow(grd_inqrlst , false);
  383. if(utlf_isNull(inqrFlag))
  384. {
  385. sysf_messageBox("문진분류를 조회" , "I008");
  386. return;
  387. }
  388. //var addRow = ds_main_inqrlst_item.addRow();
  389. ds_main_inqrlst_item.insertRow(addRow);
  390. ds_main_inqrlst_item.setColumn(addRow , "lvl", "1");
  391. ds_main_inqrlst_item.setColumn(addRow , "appyear", cur_year);
  392. ds_main_inqrlst_item.setColumn(addRow , "inqrflag", inqrFlag);
  393. }
  394. function fGetInqrFlag()
  395. {
  396. var inqrFlag = ds_send.getColumn(0, "srchinqrflag");
  397. return inqrFlag;
  398. }
  399. function fGetGrdAddRow(vGrd , vAddFlag)
  400. {
  401. if(utlf_isNull(vGrd)) return;
  402. if(utlf_isNull(vAddFlag)) vAddFlag = true;
  403. var addRow = 0;
  404. if(vAddFlag == true)
  405. {
  406. addRow = this.objects[vGrd.binddataset].rowposition + 1;
  407. }
  408. else if(vAddFlag == false)
  409. {
  410. var cRow = this.objects[vGrd.binddataset].rowposition;
  411. var nRow = this.objects[vGrd.binddataset].findRowExpr("lvl == 1", cRow+1);
  412. addRow = nRow;
  413. }
  414. return addRow;
  415. }
  416. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  417. {
  418. fSetAddInqr();
  419. }
  420. function fSetAddInqr()
  421. {
  422. var cur_year = fGetCurrentYear();
  423. var inqrFlag = fGetInqrFlag();
  424. var addRow = fGetGrdAddRow(grd_inqrlst , true);
  425. if(utlf_isNull(inqrFlag))
  426. {
  427. sysf_messageBox("문진분류를 조회" , "I008");
  428. return;
  429. }
  430. var level = ds_main_inqrlst_item.getColumn(ds_main_inqrlst_item.rowposition, "lvl");
  431. var tempInqrCd = ds_main_inqrlst_item.getColumn(ds_main_inqrlst_item.rowposition, "tempinqrcd");
  432. if(level == "1" || level == "2")
  433. {
  434. if(utlf_isNull(tempInqrCd))
  435. {
  436. sysf_messageBox("문진코드를" , "C001");
  437. return;
  438. }
  439. ds_main_inqrlst_item.insertRow(addRow);
  440. ds_main_inqrlst_item.setColumn(addRow, "lvl", parseInt(level) +1);
  441. ds_main_inqrlst_item.setColumn(addRow, "appyear", cur_year);
  442. ds_main_inqrlst_item.setColumn(addRow, "inqrflag", inqrFlag);
  443. ds_main_inqrlst_item.setColumn(addRow, "supinqrcd", tempInqrCd);
  444. }
  445. else if(level == "3")
  446. {
  447. sysf_messageBox("하위메뉴를 생성 할 수 ", "E001");
  448. return;
  449. }
  450. }
  451. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  452. {
  453. var rows = grdf_getSelectedRows(grd_inqrlst);
  454. for(var i = rows.length-1; i >= 0; i--)
  455. {
  456. var m_row = rows[i];
  457. if(ds_main_inqrlst_item.getRowType(m_row) == 2)
  458. {
  459. ds_main_inqrlst_item.deleteRow(m_row);
  460. }
  461. else
  462. {
  463. ds_main_inqrlst_item.updatecontrol = false;
  464. ds_main_inqrlst_item.setRowType(m_row, "d");
  465. ds_main_inqrlst_item.updatecontrol = true;
  466. }
  467. }
  468. }
  469. function btn_ansadd_onclick(obj:Button, e:ClickEventInfo)
  470. {
  471. fNewAnswCd();
  472. }
  473. function fNewAnswCd()
  474. {
  475. var answFlag = ds_send_answinfo.getColumn(0, "answflag");
  476. if(answFlag == "O")
  477. {
  478. ds_main_answlst_item.addRow();
  479. }
  480. else
  481. {
  482. sysf_messageBox("문진의 답안구분을", "I007");
  483. return;
  484. }
  485. }
  486. function btn_ansdel_onclick(obj:Button, e:ClickEventInfo)
  487. {
  488. var rows = grdf_getSelectedRows(grd_answlst);
  489. for(var i = rows.length-1; i >= 0; i--)
  490. {
  491. var m_row = rows[i];
  492. if(ds_main_answlst_item.getRowType(m_row) == 2)
  493. {
  494. ds_main_answlst_item.deleteRow(m_row);
  495. }
  496. else
  497. {
  498. ds_main_answlst_item.updatecontrol = false;
  499. ds_main_answlst_item.setRowType(m_row, "d");
  500. ds_main_answlst_item.updatecontrol = true;
  501. }
  502. }
  503. }
  504. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  505. {
  506. fSaveAssoInqrCd();
  507. }
  508. function fSaveAssoInqrCd()
  509. {
  510. var rtnFlag = false;
  511. for(var i = 0; i < ds_main_inqrlst_item.rowcount; i++ )
  512. {
  513. var answFlag = ds_main_inqrlst_item.getColumn(i, "answflag");
  514. var gndrFlag = ds_main_inqrlst_item.getColumn(i, "gndrflag");
  515. var ageYn = ds_main_inqrlst_item.getColumn(i, "ageyn");
  516. var appAge = ds_main_inqrlst_item.getColumn(i, "appage");
  517. if(utlf_isNull(answFlag))
  518. {
  519. sysf_messageBox("답안구분은" , "I003");
  520. rtnFlag = true;
  521. break;
  522. }
  523. if(utlf_isNull(gndrFlag))
  524. {
  525. sysf_messageBox("성별구분은" , "I003");
  526. rtnFlag = true;
  527. break;
  528. }
  529. if(ageYn == "Y")
  530. {
  531. if(utlf_isNull(appAge))
  532. {
  533. sysf_messageBox("적용 나이를 " , "C001");
  534. rtnFlag = true;
  535. break;
  536. }
  537. }
  538. }
  539. if(rtnFlag)
  540. {
  541. return;
  542. }
  543. var saveInqr = grdf_getGridUpdateData(grd_inqrlst);
  544. grdf_setStatusColumn(saveInqr, "m");
  545. ds_send_save_saveinqrcd.copyData(saveInqr, true);
  546. if(ds_send_save_saveinqrcd.rowcount == 0)
  547. {
  548. sysf_messageBox("저장내역이","E014");
  549. return;
  550. }
  551. var oParam = {};
  552. oParam.id = "TXAHA03161";
  553. oParam.service = "healthexambaseapp.InqrCode";
  554. oParam.method = "reqExeAssoInqrCode";
  555. oParam.inds = "req=ds_send_save_saveinqrcd";
  556. oParam.outds = "ds_=item";
  557. oParam.async = false;
  558. oParam.callback = "cf_submit";
  559. tranf_submit(oParam);
  560. if(arErrorCode.pop("TXAHA03161") > -1)
  561. {
  562. fGetAssoInqrList();
  563. }
  564. }
  565. function button2_onclick(obj:Button, e:ClickEventInfo)
  566. {
  567. fSaveAssoAnswCd();
  568. }
  569. function fSaveAssoAnswCd()
  570. {
  571. var rtnFlag = false;
  572. for(var i = 0; i < ds_main_answlst_item.rowcount; i++)
  573. {
  574. var answCd = ds_main_answlst_item.getColumn(i, "answcd");
  575. var infInqrYn = ds_main_answlst_item.getColumn(i, "infinqryn");
  576. var infInqrCd = ds_main_answlst_item.getColumn(i, "infinqrcd");
  577. if(utlf_isNull(answCd))
  578. {
  579. sysf_messageBox("답변코드는" , "I003");
  580. rtnFlag = true;
  581. break;
  582. }
  583. if(infInqrYn == "Y")
  584. {
  585. if(utlf_isNull(infInqrCd ))
  586. {
  587. sysf_messageBox("하위문진코드를 입력" , "I008");
  588. rtnFlag = true;
  589. break;
  590. }
  591. }
  592. }
  593. if(rtnFlag)
  594. {
  595. return;
  596. }
  597. var saveAnsw = grdf_getGridUpdateData(grd_answlst);
  598. grdf_setStatusColumn(saveAnsw, "m");
  599. ds_send_answinfo_saveinqrans.copyData(saveAnsw, true);
  600. if(ds_send_answinfo_saveinqrans.rowcount == 0)
  601. {
  602. sysf_messageBox("저장내역이","E014");
  603. return;
  604. }
  605. var oParam = {};
  606. oParam.id = "TXAHA03161";
  607. oParam.service = "healthexambaseapp.InqrCode";
  608. oParam.method = "reqExeAssoAnswCode";
  609. oParam.inds = "req=ds_send_answinfo saveinqrans=ds_send_answinfo_saveinqrans";
  610. oParam.outds = "ds_=item";
  611. oParam.async = false;
  612. oParam.callback = "cf_submit";
  613. tranf_submit(oParam);
  614. if(arErrorCode.pop("TXAHA03161") > -1)
  615. {
  616. var oParam = {};
  617. oParam.id = "TRAHA03162";
  618. oParam.service = "healthexambaseapp.InqrCode";
  619. oParam.method = "reqGetAssoAnswCdList";
  620. oParam.inds = "req=ds_send_answinfo";
  621. oParam.outds = "ds_main_answlst_item=item";
  622. oParam.async = false;
  623. //oParam.callback = "cf_TRAHA03162";
  624. tranf_submit(oParam);
  625. }
  626. }
  627. function btn_reorder_onclick(obj:Button, e:ClickEventInfo)
  628. {
  629. for(var i = 0 ; i < ds_main_inqrlst_item.rowcount ; i++) {
  630. ds_main_inqrlst_item.setColumn(i, "prntseq", i+1);
  631. }
  632. }
  633. ]]></Script>
  634. </Form>
  635. </FDL>