SMLPC02800_검사항목조회등록.xfdl 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLPC02800" position="absolute 0 0 1199 779" titletext="검사항목조회등록" oninit="SMLPC02800_oninit" onload="SMLPC02800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1139 14 1195 36" onclick="btn_save_onclick" anchor="top right"/>
  8. <Static id="caption6" text="검사항목조회등록" onclick="grp_tle_caption6_onclick" class="tit_1" position="absolute 0 0 136 25"/>
  9. <Static id="caption1" text="대분류" class="tit_2" position="absolute 1 40 60 57"/>
  10. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 56 190 62" style="strokepen:3 solid #33bbbbff;" anchor="left top"/>
  11. <Static id="caption3" text="검사코드목록" class="tit_2" position="absolute 720 39 819 56" anchor="left top"/>
  12. <Grid id="grd_testcdlist" taborder="2" binddataset="ds_grd_testcdlist" useinputpanel="false" position="absolute 720 60 1195 774" autofittype="col" oncellclick="grd_testcdlist_oncellclick" anchor="all" autosizingtype="row" cellsizingtype="row" extendsizetype="row">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="29"/>
  17. <Column size="30"/>
  18. <Column size="0"/>
  19. <Column size="80"/>
  20. <Column size="200"/>
  21. <Column size="115"/>
  22. <Column size="0"/>
  23. <Column size="0"/>
  24. <Column size="0"/>
  25. </Columns>
  26. <Rows>
  27. <Row size="24" band="head"/>
  28. <Row size="24"/>
  29. </Rows>
  30. <Band id="head">
  31. <Cell/>
  32. <Cell col="1" text="선택"/>
  33. <Cell col="2" text="기관코드"/>
  34. <Cell col="3" text="검사코드"/>
  35. <Cell col="4" text="검사코드명"/>
  36. <Cell col="5" text="검사약칭"/>
  37. <Cell col="6" text="workflagcd"/>
  38. <Cell col="7" text="workkindcd"/>
  39. <Cell col="8" text="delyn"/>
  40. </Band>
  41. <Band id="body">
  42. <Cell celltype="head" text="expr:currow + 1"/>
  43. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
  44. <Cell col="2" text="bind:instcd"/>
  45. <Cell col="3" displaytype="normal" edittype="none" style="align:left;" text="bind:testcd"/>
  46. <Cell col="4" displaytype="normal" edittype="none" style="align:left middle;" text="bind:testnm" wordwrap="both" autosizerow="limitmin"/>
  47. <Cell col="5" displaytype="normal" edittype="none" style="align:left middle;" text="bind:testabbr" wordwrap="both" autosizerow="limitmin"/>
  48. <Cell col="6" text="bind:workflagcd"/>
  49. <Cell col="7" text="bind:workkindcd"/>
  50. <Cell col="8" text="bind:delyn"/>
  51. </Band>
  52. </Format>
  53. </Formats>
  54. </Grid>
  55. <Shape id="line2" linetype="horizontal" class="line_1" position="absolute 720 56 1195 62" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
  56. <Button id="btn_add" taborder="3" text="행추가" class="btn2" position="absolute 607 35 660 54" onclick="btn_add_onclick" anchor="left top"/>
  57. <Grid id="grd_lrgcd" taborder="4" binddataset="ds_grd_lrgcd" useinputpanel="false" position="absolute 0 60 190 774" autofittype="col" oncellclick="grd_lrgcd_oncellclick" anchor="left top bottom">
  58. <Formats>
  59. <Format id="default">
  60. <Columns>
  61. <Column size="27"/>
  62. <Column size="30"/>
  63. <Column size="120"/>
  64. <Column size="0"/>
  65. <Column size="0"/>
  66. </Columns>
  67. <Rows>
  68. <Row size="24" band="head"/>
  69. <Row size="24"/>
  70. </Rows>
  71. <Band id="head">
  72. <Cell/>
  73. <Cell col="1" text="선택"/>
  74. <Cell col="2" text="대분류"/>
  75. <Cell col="3" text="instcd"/>
  76. <Cell col="4" text="baseflagcd"/>
  77. </Band>
  78. <Band id="body">
  79. <Cell celltype="head" text="expr:currow + 1"/>
  80. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
  81. <Cell col="2" text="bind:baseflagnm"/>
  82. <Cell col="3" text="bind:instcd"/>
  83. <Cell col="4" text="bind:baseflagcd"/>
  84. </Band>
  85. </Format>
  86. </Formats>
  87. </Grid>
  88. <Grid id="grd_mdlcd" taborder="5" binddataset="ds_grd_mdlcd" useinputpanel="false" position="absolute 195 60 425 774" autofittype="col" oncellclick="grd_mdlcd_oncellclick" anchor="left top bottom">
  89. <Formats>
  90. <Format id="default">
  91. <Columns>
  92. <Column size="27"/>
  93. <Column size="30"/>
  94. <Column size="160"/>
  95. <Column size="0"/>
  96. <Column size="0"/>
  97. <Column size="0"/>
  98. <Column size="0"/>
  99. </Columns>
  100. <Rows>
  101. <Row size="24" band="head"/>
  102. <Row size="24"/>
  103. </Rows>
  104. <Band id="head">
  105. <Cell/>
  106. <Cell col="1" text="선택"/>
  107. <Cell col="2" text="중분류"/>
  108. <Cell col="3" text="baseflagcd"/>
  109. <Cell col="4" text="resncd"/>
  110. <Cell col="5" text="instcd"/>
  111. <Cell col="6" text="mdlflagcd"/>
  112. </Band>
  113. <Band id="body">
  114. <Cell celltype="head" text="expr:currow + 1"/>
  115. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
  116. <Cell col="2" text="bind:resncnts"/>
  117. <Cell col="3" text="bind:baseflagcd"/>
  118. <Cell col="4" text="bind:resncd"/>
  119. <Cell col="5" text="bind:instcd"/>
  120. <Cell col="6" text="bind:mdlflagcd"/>
  121. </Band>
  122. </Format>
  123. </Formats>
  124. </Grid>
  125. <Grid id="grd_smlcd" taborder="6" binddataset="ds_grd_smlcd" useinputpanel="false" position="absolute 430 60 715 774" autofittype="col" oncellclick="grd_smlcd_oncellclick" anchor="left top bottom">
  126. <Formats>
  127. <Format id="default">
  128. <Columns>
  129. <Column size="26"/>
  130. <Column size="30"/>
  131. <Column size="170"/>
  132. <Column size="54"/>
  133. <Column size="0"/>
  134. <Column size="0"/>
  135. <Column size="0"/>
  136. <Column size="0"/>
  137. <Column size="0"/>
  138. </Columns>
  139. <Rows>
  140. <Row size="24" band="head"/>
  141. <Row size="24"/>
  142. </Rows>
  143. <Band id="head">
  144. <Cell/>
  145. <Cell col="1" text="선택"/>
  146. <Cell col="2" text="소분류"/>
  147. <Cell col="3" text="표시순서"/>
  148. <Cell col="4" text="baseflagcd"/>
  149. <Cell col="5" text="resncd"/>
  150. <Cell col="6" text="instcd"/>
  151. <Cell col="7" text="smlflagcd"/>
  152. <Cell col="8" text="delyn"/>
  153. </Band>
  154. <Band id="body">
  155. <Cell celltype="head" text="expr:currow + 1"/>
  156. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:choi"/>
  157. <Cell col="2" displaytype="text" edittype="text" text="bind:resncnts"/>
  158. <Cell col="3" displaytype="text" edittype="text" text="bind:dispseqno"/>
  159. <Cell col="4" text="bind:baseflagcd"/>
  160. <Cell col="5" text="bind:resncd"/>
  161. <Cell col="6" text="bind:instcd"/>
  162. <Cell col="7" text="bind:smlflagcd"/>
  163. <Cell col="8" text="bind:delyn"/>
  164. </Band>
  165. </Format>
  166. </Formats>
  167. </Grid>
  168. <Div id="group1" taborder="7" visible="false" position="absolute 0 185 1194 220">
  169. <Layouts>
  170. <Layout>
  171. <Shape id="roundrect1" type="roundrectangle" class="roundrect_search" position="absolute 0 0 1194 35"/>
  172. <Shape id="line14" linetype="vertical" class="line_4" position="absolute 1105 6 1111 28"/>
  173. <Static id="caption23" text="작업구분 :" class="search_name" position="absolute 15 9 105 26"/>
  174. <Combo id="cmb_workflag" taborder="7" innerdataset="ds_init_cmb_workflag" codecolumn="baseflagcd" datacolumn="baseflagnm" class="combo_search" position="absolute 108 8 228 27"/>
  175. <Combo id="cmb_workkind" taborder="8" innerdataset="ds_init_cmb_workkind" codecolumn="resncd" datacolumn="resncnts" class="combo_search" position="absolute 943 8 1093 27"/>
  176. <Static id="caption2" text="작업유형 :" class="search_name" position="absolute 849 9 939 26"/>
  177. <Button id="btn_sea" taborder="9" text="조회" class="btn1" position="absolute 1123 7 1179 29"/>
  178. </Layout>
  179. </Layouts>
  180. </Div>
  181. <Static id="caption4" text="중분류" class="tit_2" position="absolute 195 40 254 56"/>
  182. <Static id="caption5" text="소분류" class="tit_2" position="absolute 430 40 497 56" anchor="left top"/>
  183. <Shape id="line3" linetype="horizontal" class="line_1" position="absolute 195 56 425 62" style="strokepen:3 solid #33bbbbff;" anchor="left top"/>
  184. <Shape id="line4" linetype="horizontal" class="line_1" position="absolute 430 56 715 62" style="strokepen:3 solid #33bbbbff;" anchor="left top"/>
  185. <Button id="btn_del" taborder="8" text="행삭제" class="btn2" position="absolute 662 35 715 54" onclick="btn_del_onclick" anchor="left top"/>
  186. </Layout>
  187. </Layouts>
  188. <Objects>
  189. <Dataset id="ds_grd_testcdlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  190. <ColumnInfo>
  191. <Column id="choi" type="STRING"/>
  192. <Column id="instcd" type="STRING"/>
  193. <Column id="testcd" type="STRING"/>
  194. <Column id="testnm" type="STRING"/>
  195. <Column id="testabbr" type="STRING"/>
  196. <Column id="workflagcd" type="STRING"/>
  197. <Column id="workkindcd" type="STRING"/>
  198. <Column id="delyn" type="STRING"/>
  199. </ColumnInfo>
  200. </Dataset>
  201. <Dataset id="ds_grd_lrgcd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  202. <ColumnInfo>
  203. <Column id="choi" type="STRING"/>
  204. <Column id="baseflagnm" type="STRING"/>
  205. <Column id="instcd" type="STRING"/>
  206. <Column id="baseflagcd" type="STRING"/>
  207. </ColumnInfo>
  208. </Dataset>
  209. <Dataset id="ds_grd_mdlcd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  210. <ColumnInfo>
  211. <Column id="choi" type="STRING"/>
  212. <Column id="resncnts" type="STRING"/>
  213. <Column id="baseflagcd" type="STRING"/>
  214. <Column id="resncd" type="STRING"/>
  215. <Column id="instcd" type="STRING"/>
  216. <Column id="mdlflagcd" type="STRING"/>
  217. </ColumnInfo>
  218. </Dataset>
  219. <Dataset id="ds_grd_smlcd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  220. <ColumnInfo>
  221. <Column id="choi" type="STRING"/>
  222. <Column id="resncnts" type="STRING"/>
  223. <Column id="dispseqno" type="STRING"/>
  224. <Column id="baseflagcd" type="STRING"/>
  225. <Column id="resncd" type="STRING"/>
  226. <Column id="instcd" type="STRING"/>
  227. <Column id="smlflagcd" type="STRING"/>
  228. <Column id="delyn" type="STRING"/>
  229. <Column id="mdlflagcd" type="STRING" size="256"/>
  230. </ColumnInfo>
  231. </Dataset>
  232. <Dataset id="ds_init_cmb_workflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  233. <ColumnInfo>
  234. <Column id="baseflagnm" type="STRING"/>
  235. <Column id="baseflagcd" type="STRING"/>
  236. </ColumnInfo>
  237. </Dataset>
  238. <Dataset id="ds_init_cmb_workkind" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  239. <ColumnInfo>
  240. <Column id="resncnts" type="STRING"/>
  241. <Column id="resncd" type="STRING"/>
  242. </ColumnInfo>
  243. </Dataset>
  244. <Dataset id="ds_smlcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  245. <Dataset id="ds_testcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  246. <Dataset id="ds_testData" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  247. <ColumnInfo>
  248. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  249. <Column id="workflagcd" type="STRING" size="256" sumtext="대분류코드"/>
  250. <Column id="workkindcd" type="STRING" size="256" sumtext="중소분류"/>
  251. <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
  252. <Column id="delyn" type="STRING" size="256" sumtext="삭제여부"/>
  253. </ColumnInfo>
  254. </Dataset>
  255. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  256. </Objects>
  257. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  258. * System Name :
  259. * Job Name :
  260. * Creator :
  261. * Make Date : 2015-11-13
  262. * Description :
  263. *---------------------------------------------------------------------------------------
  264. * Modify Date Modifier Modify Description
  265. *---------------------------------------------------------------------------------------
  266. * 2015-11-13 Live Converter TF->XP
  267. *
  268. *---------------------------------------------------------------------------------------
  269. ****************************************************************************************/
  270. include "com_commonxp::comm_main.xjs";
  271. function SMLPC02800_oninit(obj:Form, e:InitEventInfo)
  272. {
  273. frmf_initForm(obj);
  274. }
  275. function SMLPC02800_onload(obj:Form, e:LoadEventInfo)
  276. {
  277. grdf_initGrid(grd_lrgcd); //대분류
  278. grdf_initGrid(grd_mdlcd); //중분류
  279. grdf_initGrid(grd_smlcd); //소분류
  280. grdf_initGrid(grd_testcdlist); //검사코드목록
  281. //grdf_setRowTypeIcon(grd_testcdlist, 0);
  282. //grdf_setRowTypeIcon(grd_smlcd, 1);
  283. //grdf_setRowTypeIcon(grd_testcdlist, 1);
  284. //초기화
  285. fExeInitialize();
  286. }
  287. //화면초기화 함수
  288. function fExeInitialize()
  289. {
  290. // 전체 검사코드목록 조회
  291. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
  292. ,{col: "delflagcd", val:"0"}
  293. ,{col: "workflagcd", val: "-"}
  294. ,{col: "workkindcd", val: "-"}]);
  295. var oParam = {};
  296. oParam.id = "TRLPC02804";
  297. oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
  298. oParam.method = "reqGetTestCdList";
  299. oParam.inds = "refData=ds_send";
  300. oParam.outds = "ds_grd_testcdlist=refrslt";
  301. oParam.async = false;
  302. //oParam.callback = "cf_TRLPC02804";
  303. tranf_submit(oParam);
  304. //대분류 조회.
  305. fGetRefData();
  306. }
  307. //설정목록 검색 함수
  308. function fGetRefData()
  309. {
  310. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
  311. ,{col: "delflagcd", val:"0"}
  312. ,{col: "frombaseflagcd", val: "ZA"}
  313. ,{col: "tobaseflagcd", val: "ZZ"}]);
  314. //submit("TRLPC02801");
  315. var oParam = {};
  316. oParam.id = "TRLPC02801";
  317. oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
  318. oParam.method = "reqGetLrgCdList";
  319. oParam.inds = "refData=ds_send";
  320. oParam.outds = "ds_grd_lrgcd=baseflagcdinfo";
  321. oParam.async = false;
  322. //oParam.callback = "cf_TRLPC02801";
  323. tranf_submit(oParam);
  324. }
  325. function fGetMdlData()
  326. {
  327. var iRowNo = ds_grd_lrgcd.findRow("choi", 1, ds_grd_lrgcd.setColumn(0, "choi"), 1, 1);
  328. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
  329. ,{col: "delflagcd", val: "0"}
  330. ,{col: "baseflagcd", val: ds_grd_lrgcd.getColumn(iRowNo, "baseflagcd")}
  331. ,{col: "resncd", val: ds_grd_lrgcd.getColumn(iRowNo, "baseflagcd")}
  332. ,{col: "seaflag", val: "M"}]);
  333. //submit("TRLPC02802");
  334. var oParam = {};
  335. oParam.id = "TRLPC02802";
  336. oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
  337. oParam.method = "reqGetMdlCdList";
  338. oParam.inds = "refData=ds_send";
  339. oParam.outds = "ds_grd_mdlcd=baseflagcdinfo";
  340. oParam.async = false;
  341. //oParam.callback = "cf_TRLPC02802";
  342. tranf_submit(oParam);
  343. }
  344. //중분류조회
  345. function fGetSmlData()
  346. {
  347. //var iRowNo = grd_mdlcd.findRow("true", 0, grd_mdlcd.colRef("choi"), true, true);
  348. var iRowNo = ds_grd_mdlcd.findRow("choi", 1);
  349. //var iRowNo = ds_grd_mdlcd.rowcount;
  350. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
  351. ,{col: "delflagcd", val: "0"}
  352. ,{col: "baseflagcd", val: ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd")}
  353. ,{col: "resncd", val: ds_grd_mdlcd.getColumn(iRowNo, "mdlflagcd")}
  354. ,{col: "seaflag", val: "S"}]);
  355. //submit("TRLPC02803");
  356. var oParam = {};
  357. oParam.id = "TRLPC02803";
  358. oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
  359. oParam.method = "reqGetMdlCdList";
  360. oParam.inds = "refData=ds_send";
  361. oParam.outds = "ds_grd_smlcd=baseflagcdinfo";
  362. oParam.async = false;
  363. //oParam.callback = "cf_TRLPC02803";
  364. tranf_submit(oParam);
  365. }
  366. function fExeDataAddDel(pFlagCd)
  367. {
  368. var iRowNo = 0;
  369. var iSmlCdNo = 1;
  370. var iCurNo = 1;
  371. var sUsedYN = "Y";
  372. var iMaxNo = 1;
  373. if(pFlagCd == "DEL")
  374. {
  375. //행삭제
  376. //iRowNo = grd_smlcd.findRow("true", 0, grd_smlcd.colRef("choi"), true, true);
  377. iRowNo = ds_grd_smlcd.findRow("choi", 1);
  378. if(iRowNo < 0)
  379. {
  380. sysf_messageBox("삭제할 소분류 항목을 선택하여 주세요", "I999");
  381. return;
  382. }
  383. ds_grd_smlcd.deleteRow(iRowNo);
  384. fGetTestCdList("CLEAR");
  385. }
  386. else if(pFlagCd == "ADD")
  387. {
  388. //행추가
  389. //iRowNo = grd_mdlcd.findRow("true", 0, grd_mdlcd.colRef("choi"), true, true);
  390. iRowNo = ds_grd_mdlcd.findRow("choi", 1);
  391. if(iRowNo < 0)
  392. {
  393. sysf_messageBox("중분류 항목을 선택하여 주세요", "I999");
  394. return;
  395. }
  396. ds_grd_smlcd.addRow();
  397. // for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/smlcdlist/smlcdinfo") ; iNo++)
  398. for(var iNo = 0; iNo < ds_grd_smlcd.rowcount; iNo++)
  399. {
  400. //iCurNo = Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo +"]/smlflagcd"));
  401. iCurNo = Number(ds_grd_smlcd.getColumn(iNo, "mdlflagcd"));
  402. iCurNo = iCurNo + 1;
  403. // //현재값 +1 을 이미 사용하고 있는지 확인한다.
  404. // for(var iNo2 = 1 ; iNo2 < grd_smlcd.rows ; iNo2++)
  405. for(var iNo2= 0; iNo2 < ds_grd_smlcd.rowcount; iNo2++)
  406. {
  407. // if(iCurNo == Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo2 +"]/smlflagcd")))
  408. if(iCurNo == Number(ds_grd_smlcd.getColumn(iNo2, "mdlflagcd")))
  409. {
  410. sUsedYN = "Y";
  411. break;
  412. }
  413. //if(iNo2 == (grd_smlcd.rows-1))
  414. if(iNo2 == (ds_grd_smlcd.rowcount)-1)
  415. {
  416. sUsedYN = "N";
  417. iSmlCdNo = iCurNo-1;
  418. }
  419. }
  420. if(sUsedYN == "N")
  421. {
  422. break;
  423. }
  424. //맥스 값을 구한다.
  425. //if(iMaxNo < Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo +"]/smlflagcd")))
  426. if(iMaxNo < Number(ds_grd_smlcd.getColumn(iNo, "mdlflagcd")))
  427. {
  428. //iMaxNo = Number(model.getValue("/root/main/smlcdlist/smlcdinfo["+ iNo +"]/smlflagcd"));
  429. iMaxNo = Number(ds_grd_smlcd.getColumn(iNo, "mdlflagcd"));
  430. }
  431. //if(iNo == (grd_smlcd.rows-1))
  432. if(iNo == (ds_grd_smlcd.rowcount)-1)
  433. {
  434. iSmlCdNo = iMaxNo;
  435. }
  436. }
  437. iSmlCdNo = iSmlCdNo+1;
  438. if(iSmlCdNo > 9)
  439. {
  440. //model.setValue("/root/main/smlcdlist/smlcdinfo["+ grd_smlcd.row +"]/smlflagcd", iSmlCdNo);
  441. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "mdlflagcd", iSmlCdNo);
  442. }
  443. else
  444. {
  445. //model.setValue("/root/main/smlcdlist/smlcdinfo["+ grd_smlcd.row +"]/smlflagcd", "0" + iSmlCdNo);
  446. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "mdlflagcd", "0"+iSmlCdNo);
  447. }
  448. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "instcd", ds_grd_mdlcd.getColumn(iRowNo, "instcd"));
  449. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "baseflagcd", ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd"));
  450. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "resncd", ds_grd_mdlcd.getColumn(iRowNo, "mdlflagcd") + ds_grd_smlcd.getColumn(ds_grd_smlcd.rowposition, "mdlflagcd"));
  451. }
  452. }
  453. //중분류조회
  454. function grd_lrgcd_oncellclick(obj:Grid, e:GridClickEventInfo)
  455. {
  456. //if(model.getValue("/root/main/lrgcdlist/lrgcdinfo["+ grd_lrgcd.row +"]/choi") == "true")
  457. if(ds_grd_lrgcd.getColumn(ds_grd_lrgcd.rowposition, "choi") == "1")
  458. {
  459. //for(var iRowNo = 1 ; iRowNo < grd_lrgcd.rows ; iRowNo++)
  460. for(var iRowNo = 1; iRowNo < ds_grd_lrgcd.rowcount; iRowNo++)
  461. {
  462. //if(iRowNo != grd_lrgcd.row)
  463. if(iRowNo != ds_grd_lrgcd.rowposition)
  464. {
  465. //model.setValue("/root/main/lrgcdlist/lrgcdinfo["+ iRowNo+"]/choi", "false");
  466. ds_grd_lrgcd.setColumn(iRowNo, "choi", "false");
  467. }
  468. }
  469. fGetMdlData();
  470. fGetTestCdList("CLEAR"); //검사코드 클리어
  471. }
  472. else
  473. {
  474. ds_grd_mdlcd.clearData(); //중분류클리어
  475. ds_grd_smlcd.clearData(); //소분류클리어
  476. fGetTestCdList("CLEAR"); //검사코드클리어
  477. }
  478. }
  479. //검사코드조회
  480. function fGetTestCdList(pFlagcd)
  481. {
  482. if(pFlagcd == "GET")
  483. {
  484. //var iRowNo = ds_grd_smlcd.findRow("true", 0, ds_grd_smlcd.setColumn(0, "choi"), 0, 0);
  485. var iRowNo = ds_grd_smlcd.findRow("choi", 1);
  486. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
  487. ,{col: "workflagcd", val: ds_grd_smlcd.getColumn(iRowNo, "baseflagcd")}
  488. ,{col: "workkindcd", val: ds_grd_smlcd.getColumn(iRowNo, "resncd")}]);
  489. }
  490. else
  491. {
  492. dsf_createDsRow("ds_send", [{col: "instcd", val: sysf_getUserInfo("dutplceinstcd")}
  493. ,{col: "workflagcd", val: "-"}
  494. ,{col: "workkindcd", val: "-"}]);
  495. }
  496. var oParam = {};
  497. oParam.id = "TRLPC02804";
  498. oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
  499. oParam.method = "reqGetTestCdList";
  500. oParam.inds = "refData=ds_send";
  501. oParam.outds = "ds_grd_testcdlist=refrslt";
  502. oParam.async = false;
  503. //oParam.callback = "cf_TRLPC02804";
  504. tranf_submit(oParam);
  505. }
  506. //소분류조회
  507. function grd_mdlcd_oncellclick(obj:Grid, e:GridClickEventInfo)
  508. {
  509. //if(model.getValue("/root/main/mdlcdlist/mdlcdinfo["+ grd_mdlcd.row +"]/choi") == "true")
  510. if(ds_grd_mdlcd.getColumn(ds_grd_mdlcd.rowposition, "choi") == "1")
  511. {
  512. //for(var iRowNo = 1 ; iRowNo < grd_mdlcd.rows ; iRowNo++)
  513. for(var iRowNo = 0; iRowNo < ds_grd_mdlcd.rowcount; iRowNo++)
  514. {
  515. if(iRowNo != ds_grd_mdlcd.rowposition)
  516. {
  517. //model.setValue("/root/main/mdlcdlist/mdlcdinfo["+ iRowNo+"]/choi", "false");
  518. ds_grd_mdlcd.setColumn(iRowNo, "choi", "false");
  519. }
  520. }
  521. fGetSmlData();
  522. fGetTestCdList("CLEAR"); //검사코드 클리어
  523. }
  524. else
  525. {
  526. //model.removeNodeset("/root/main/smlcdlist/smlcdinfo"); //소분류 클리어
  527. ds_grd_smlcd.clearData();
  528. fGetTestCdList("CLEAR"); //검사코드클리어
  529. }
  530. }
  531. function grd_smlcd_oncellclick(obj:Grid, e:GridClickEventInfo)
  532. {
  533. ds_grd_smlcd.updatecontrol = false;
  534. if(ds_grd_smlcd.getColumn(ds_grd_smlcd.rowposition, "choi") == "1")
  535. {
  536. for(var iRowNo = 0; iRowNo < ds_grd_smlcd.rowcount; iRowNo++)
  537. {
  538. if(iRowNo != ds_grd_smlcd.rowposition)
  539. {
  540. ds_grd_smlcd.setColumn(iRowNo, "choi", "false");
  541. }
  542. }
  543. fGetTestCdList("GET");
  544. }
  545. else
  546. {
  547. fGetTestCdList("CLEAR"); //검사코드 클리어
  548. }
  549. ds_grd_smlcd.updatecontrol = true;
  550. }
  551. //자료저장 처리 함수
  552. function fExeRefData()
  553. {
  554. var iRowNo = 0;
  555. var iSmlRowNo = iRowNo =ds_grd_smlcd.findRow("choi", 1);
  556. var ICnt = 0;
  557. iRowNo = ds_grd_mdlcd.findRow("choi", 1);
  558. if(iRowNo < 0)
  559. {
  560. sysf_messageBox("중분류 항목을 선택하여 주세요", "I999");
  561. return;
  562. }
  563. //소분류노드가 없을 경우 삭제만 한다.
  564. if(ds_grd_smlcd.rowcount <= 0)
  565. {
  566. ds_grd_smlcd.addRow();
  567. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "instcd", ds_grd_mdlcd.getColumn(iRowNo, "instcd"));
  568. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "baseflagcd", ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd"));
  569. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "resncd", ds_grd_mdlcd.getColumn(iRowNo, "mdlflagcd"));
  570. ds_grd_smlcd.setColumn(ds_grd_smlcd.rowposition, "delyn", "Y");
  571. }
  572. else
  573. {
  574. for(var iNo = 0; iNo < ds_grd_smlcd.rowcount; iNo++)
  575. {
  576. grdf_setStatus(grd_smlcd, "insert", iNo);
  577. }
  578. }
  579. //검사코드저장
  580. //grd_testcdlist.clearStatus();
  581. for(var iNo = 0; iNo < ds_grd_testcdlist.rowcount; iNo++)
  582. {
  583. if(ds_grd_testcdlist.getColumn(iNo, "choi") == "1")
  584. {
  585. grdf_setStatus(grd_testcdlist, "insert", iNo);
  586. ICnt++;
  587. }
  588. }
  589. //선택된 검사목록이 없을 경우
  590. if(ICnt <= 0)
  591. {
  592. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "choi", "true");
  593. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "delyn", "Y");
  594. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "instcd", ds_grd_mdlcd.getColumn(iRowNo, "instcd"));
  595. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workflagcd", ds_grd_mdlcd.getColumn(iRowNo, "baseflagcd"));
  596. //소분류 항목은 선택되어 있고 검사코드 목록은 선택되어 있지 않을 경우 해당 소1분류 항목의 검사코드를 삭제 하여 준다.
  597. if(iSmlRowNo > 0)
  598. {
  599. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workkindcd", ds_grd_smlcd.getColumn(iSmlRowNo, "resncd"));
  600. }
  601. grdf_setStatus(grd_testcdlist, "insert", ds_grd_testcdlist.rowposition);
  602. }
  603. ds_grd_testcdlist.filterstr = "choi == '1' || choi == 'true'";
  604. ds_testData.copyData(ds_grd_testcdlist, true);
  605. ds_grd_testcdlist.filterstr = "";
  606. //return;
  607. var oParam = {};
  608. oParam.id = "TXLPC02801";
  609. oParam.service = "plgybaseinfomngtapp.BaseFlagCode";
  610. oParam.method = "reqExeSmlCdList";
  611. oParam.inds = "refData=ds_grd_smlcd testData=ds_testData";
  612. //oParam.inds = "refData=ds_grd_smlcd:I testData=ds_grd_testcdlist";
  613. oParam.async = false;
  614. //oParam.callback = "cf_TXLPC02801";
  615. tranf_submit(oParam);
  616. fGetSmlData();
  617. fGetTestCdList("CLEAR");
  618. }
  619. //행추가
  620. function btn_add_onclick(obj:Button, e:ClickEventInfo)
  621. {
  622. fExeDataAddDel("ADD");
  623. }
  624. //행삭제
  625. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  626. {
  627. fExeDataAddDel("DEL");
  628. }
  629. //저장
  630. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  631. {
  632. fExeRefData();
  633. }
  634. function grd_testcdlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  635. {
  636. //if(model.getValue("/root/init/testcodecnts/testcodelist["+ grd_testcdlist.row +"]/choi") == "true")
  637. if(ds_grd_testcdlist.getColumn(ds_grd_testcdlist.rowposition, "choi") == "1")
  638. {
  639. //var iRowNo = grd_smlcd.findRow("true", 0, grd_smlcd.colRef("choi"), true, true);
  640. var iRowNo = ds_grd_smlcd.findRow("choi", 1);
  641. if(iRowNo < 0)
  642. {
  643. sysf_messageBox("소분류 항목을 선택하여 주세요", "I999");
  644. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "choi", "false");
  645. return;
  646. }
  647. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workflagcd", ds_grd_smlcd.getColumn(iRowNo, "baseflagcd"));
  648. ds_grd_testcdlist.setColumn(ds_grd_testcdlist.rowposition, "workkindcd", ds_grd_smlcd.getColumn(iRowNo, "resncd"));
  649. }
  650. }
  651. ]]></Script>
  652. </Form>
  653. </FDL>