SMMRI02000_미비기준관리.xfdl 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMRI02000" position="absolute 0 0 813 759" titletext="미비기준관리" oninit="SMMRI02000_oninit" onload="SMMRI02000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="미비기준관리" position="absolute 0 0 189 25" id="caption6" class="tit_1"/>
  8. <Static id="caption2" text="미비기준리스트" class="tit_2" position="absolute 0 35 116 57"/>
  9. <Shape id="line1" linetype="horizontal" class="line_10" position="absolute 0 51 808 57" anchor="left top right"/>
  10. <Grid id="grd_unpreplist" taborder="1" binddataset="ds_main_unprep_list" useinputpanel="false" position="absolute 0 56 808 748" autoenter="select" cellsizingtype="col" anchor="all">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="20"/>
  15. <Column size="0"/>
  16. <Column size="80"/>
  17. <Column size="41"/>
  18. <Column size="0"/>
  19. <Column size="124"/>
  20. <Column size="100"/>
  21. <Column size="100"/>
  22. <Column size="89"/>
  23. <Column size="74"/>
  24. <Column size="62"/>
  25. <Column size="55"/>
  26. <Column size="58"/>
  27. <Column size="0"/>
  28. <Column size="0"/>
  29. <Column size="0"/>
  30. <Column size="0"/>
  31. <Column size="0"/>
  32. <Column size="0"/>
  33. <Column size="0"/>
  34. <Column size="0"/>
  35. <Column size="0"/>
  36. <Column size="0"/>
  37. <Column size="0"/>
  38. <Column size="0"/>
  39. </Columns>
  40. <Rows>
  41. <Row size="30" band="head"/>
  42. <Row size="24"/>
  43. </Rows>
  44. <Band id="head">
  45. <Cell/>
  46. <Cell col="1" text="서식코드"/>
  47. <Cell col="2" text="서식명"/>
  48. <Cell col="3" text="선택"/>
  49. <Cell col="4" text="미비항목코드"/>
  50. <Cell col="5" text="미비항목명"/>
  51. <Cell col="6" text="미비기준시작일자"/>
  52. <Cell col="7" text="미비기준종료일자"/>
  53. <Cell col="8" text="의사구분"/>
  54. <Cell col="9" text="sortno"/>
  55. <Cell col="10" text="작성미비&#13;&#10;구분"/>
  56. <Cell col="11" text="인증미비&#13;&#10;구분"/>
  57. <Cell col="12" text="갯수구분"/>
  58. <Cell col="13" text="공통미비구분"/>
  59. <Cell col="14" text="setdd"/>
  60. <Cell col="15" text="디자인항목코드"/>
  61. <Cell col="16" text="디자인항목레벨코드"/>
  62. <Cell col="17" text="최초등록자ID"/>
  63. <Cell col="18" text="최초등록자"/>
  64. <Cell col="19" text="최초등록일시"/>
  65. <Cell col="20" text="최종수정자ID"/>
  66. <Cell col="21" text="최종수정자"/>
  67. <Cell col="22" text="최종수정일시"/>
  68. <Cell col="23" text="조회구분"/>
  69. <Cell col="24" text="정렬번호"/>
  70. </Band>
  71. <Band id="body">
  72. <Cell celltype="head"/>
  73. <Cell col="1" text="bind:formcd"/>
  74. <Cell col="2" style="align:left;padding:0 0 0 3;" text="bind:formnm" wordwrap="word" suppress="1" suppressalign="middle,over"/>
  75. <Cell col="3" displaytype="checkbox" edittype="checkbox" text="bind:check" expr="expr:check == 'true' ? 1 : 0"/>
  76. <Cell col="4" text="bind:unprepitemcd"/>
  77. <Cell col="5" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:unprepitemnm"/>
  78. <Cell col="6" displaytype="date" edittype="date" style="align:left middle;padding:0 0 0 3;" text="bind:unprepbasefromdd" calendardisplaynulltype="nulltext"/>
  79. <Cell col="7" displaytype="date" edittype="date" style="align:left middle;padding:0 0 0 3;" text="bind:unprepbasetodd" calendardisplaynulltype="nulltext"/>
  80. <Cell col="8" displaytype="combo" edittype="combo" style="padding:0 0 0 3;" text="bind:jobposflag" combodataset="ds_cmb_jobposflag" combocodecol="value" combodatacol="label"/>
  81. <Cell col="9" displaytype="text" edittype="text" style="padding:0 0 0 3;" text="bind:sortno"/>
  82. <Cell col="10" displaytype="checkbox" edittype="checkbox" text="bind:wrteunprepflag" expr="expr:wrteunprepflag == 'Y' ? 1 : 0"/>
  83. <Cell col="11" displaytype="checkbox" edittype="checkbox" text="bind:certunprepflag" expr="expr:certunprepflag == 'Y' ? 1 : 0"/>
  84. <Cell col="12" displaytype="checkbox" edittype="checkbox" text="bind:cntflag" expr="expr:cntflag == 'Y' ? 1 : 0"/>
  85. <Cell col="13" displaytype="checkbox" edittype="checkbox" text="bind:commflag"/>
  86. <Cell col="14" text="bind:setdd"/>
  87. <Cell col="15" text="bind:degnitemcd"/>
  88. <Cell col="16" text="bind:degnitemlevlcd"/>
  89. <Cell col="17" text="bind:fstrgstrid"/>
  90. <Cell col="18" text="bind:fstrgstrnm"/>
  91. <Cell col="19" displaytype="date" edittype="date" text="bind:fstrgstdt" mask="yyyy-mm-dd hh:nn:ss" enable="false"/>
  92. <Cell col="20" text="bind:lastupdtrid"/>
  93. <Cell col="21" text="bind:lastrgstrnm"/>
  94. <Cell col="22" displaytype="date" edittype="date" text="bind:lastupdtdt" mask="yyyy-mm-dd hh:nn:ss" enable="false"/>
  95. <Cell col="23" text="bind:formrecdd"/>
  96. <Cell col="24" text="bind:sortno"/>
  97. </Band>
  98. </Format>
  99. </Formats>
  100. </Grid>
  101. <Button id="btn_save" taborder="2" text="저장" class="btn5" position="absolute 715 32 757 51" onclick="btn_save_onclick" anchor="top right"/>
  102. <Button id="button1" taborder="3" text="항목추가" class="btn2" position="absolute 605 32 669 51" onclick="button1_onclick" anchor="top right"/>
  103. <Button id="button3" taborder="4" text="미비서식추가" class="btn2" position="absolute 427 32 513 51" onclick="button3_onclick" anchor="top right"/>
  104. <Button id="btn_ex" taborder="5" text="엑셀" class="btn7" position="absolute 758 32 808 51" onclick="btn_ex_onclick" anchor="top right"/>
  105. <Button id="btn_req" taborder="6" text="조회" class="btn1" position="absolute 367 29 423 51" onclick="btn_req_onclick" anchor="top right"/>
  106. <CheckBox id="chk_total" taborder="7" position="absolute 303 33 369 53" text="전체" truevalue="total" onclick="chk_total_onclick" anchor="top right"/>
  107. <Button id="button2" taborder="8" text="공통항목추가" class="btn2" position="absolute 516 32 602 51" onclick="button2_onclick" anchor="top right"/>
  108. <Button id="button4" taborder="9" text="삭제" class="btn2" position="absolute 671 32 713 51" onclick="button4_onclick" anchor="top right"/>
  109. </Layout>
  110. </Layouts>
  111. <Objects>
  112. <Dataset id="ds_main_unprep_list" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_unprep_list_oncolumnchanged">
  113. <ColumnInfo>
  114. <Column id="formcd" type="STRING" size="256" sumtext="서식코드"/>
  115. <Column id="formnm" type="STRING" size="256" sumtext="서식명"/>
  116. <Column id="check" type="STRING" size="256" sumtext="선택"/>
  117. <Column id="unprepitemcd" type="STRING" size="256" sumtext="미비항목코드"/>
  118. <Column id="unprepitemnm" type="STRING" size="256" sumtext="미비항목명칭"/>
  119. <Column id="degnitemcd" type="STRING" size="256" sumtext="디자인항목코드"/>
  120. <Column id="degnitemlevlcd" type="STRING" size="256" sumtext="디자인항목레벨코드"/>
  121. <Column id="unprepbasefromdd" type="STRING" size="256" sumtext="미비기준시작일자"/>
  122. <Column id="unprepbasetodd" type="STRING" size="256" sumtext="미비기준종료일자"/>
  123. <Column id="sortno" type="INT" size="256" sumtext="정렬번호"/>
  124. <Column id="setdd" type="STRING" size="256" sumtext="날짜구분"/>
  125. <Column id="jobposflag" type="STRING" size="256" sumtext="직위구분"/>
  126. <Column id="wrteunprepflag" type="STRING" size="256" sumtext="작성미비구분"/>
  127. <Column id="certunprepflag" type="STRING" size="256" sumtext="인증미비구분"/>
  128. <Column id="cntflag" type="STRING" size="256" sumtext="갯수구분"/>
  129. <Column id="commflag" type="STRING" size="256" sumtext="공통미비구분"/>
  130. <Column id="fstrgstrid" type="STRING" size="256" sumtext="최초등록자ID"/>
  131. <Column id="fstrgstrnm" type="STRING" size="256" sumtext="최초등록자"/>
  132. <Column id="fstrgstdt" type="STRING" size="256" sumtext="최초등록일시"/>
  133. <Column id="lastupdtrid" type="STRING" size="256" sumtext="최종수정자ID"/>
  134. <Column id="lastrgstrnm" type="STRING" size="256" sumtext="최종수정자"/>
  135. <Column id="lastupdtdt" type="STRING" size="256" sumtext="최종등록일시"/>
  136. <Column id="formrecdd" type="STRING" size="256"/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  140. <ColumnInfo>
  141. <Column id="itemflag" type="STRING" size="256"/>
  142. <Column id="total" type="STRING" size="256"/>
  143. <Column id="formrecdd" type="STRING" size="256"/>
  144. </ColumnInfo>
  145. <Rows>
  146. <Row>
  147. <Col id="itemflag">N</Col>
  148. <Col id="total"/>
  149. <Col id="formrecdd"/>
  150. </Row>
  151. </Rows>
  152. </Dataset>
  153. <Dataset id="ds_cmb_jobposflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  154. <ColumnInfo>
  155. <Column id="label" type="STRING" size="256"/>
  156. <Column id="value" type="STRING" size="256"/>
  157. </ColumnInfo>
  158. <Rows>
  159. <Row>
  160. <Col id="label">스태프</Col>
  161. <Col id="value">0</Col>
  162. </Row>
  163. <Row>
  164. <Col id="label">레지던트</Col>
  165. <Col id="value">1</Col>
  166. </Row>
  167. <Row>
  168. <Col id="label">인턴</Col>
  169. <Col id="value">2</Col>
  170. </Row>
  171. <Row>
  172. <Col id="label">의사</Col>
  173. <Col id="value">3</Col>
  174. </Row>
  175. </Rows>
  176. </Dataset>
  177. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  178. <ColumnInfo>
  179. <Column id="addflag" type="STRING" size="256"/>
  180. <Column id="unprepmngt" type="STRING" size="256"/>
  181. </ColumnInfo>
  182. <Rows>
  183. <Row/>
  184. </Rows>
  185. </Dataset>
  186. <Dataset id="ds_temp_unprepmngt_unprepsublist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  187. <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  188. <Dataset id="ds_temp_unprepitem_templist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  189. <Dataset id="ds_send_savebase" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  190. <Dataset id="ds_sort" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  191. <ColumnInfo>
  192. <Column id="status" type="STRING" size="256" sumtext="상태값"/>
  193. <Column id="formcd" type="STRING" size="256" sumtext="서식코드"/>
  194. <Column id="sortno" type="STRING" size="256" sumtext="정렬번호"/>
  195. </ColumnInfo>
  196. <Rows>
  197. <Row/>
  198. </Rows>
  199. </Dataset>
  200. </Objects>
  201. <Bind>
  202. <BindItem id="item0" compid="chk_total" propid="value" datasetid="ds_send_reqdata" columnid="total"/>
  203. </Bind>
  204. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  205. * System Name :
  206. * Job Name :
  207. * Creator :
  208. * Make Date : 2015-05-01
  209. * Description :
  210. *---------------------------------------------------------------------------------------
  211. * Modify Date Modifier Modify Description
  212. *---------------------------------------------------------------------------------------
  213. * 2015-05-01 Live Converter TF->XP
  214. *
  215. *---------------------------------------------------------------------------------------
  216. ****************************************************************************************/
  217. include "com_commonxp::comm_main.xjs";
  218. function SMMRI02000_oninit(obj:Form, e:InitEventInfo)
  219. {
  220. frmf_initForm(obj);
  221. }
  222. function SMMRI02000_onload(obj:Form, e:LoadEventInfo)
  223. {
  224. grdf_initGrid(grd_unpreplist);
  225. grdf_setRowTypeIcon(grd_unpreplist, 0);
  226. fInitialize();
  227. }
  228. function fInitialize()
  229. {
  230. dsf_setDefaultVal(ds_send_reqdata, "itemflag:N");
  231. var oParam = {};
  232. oParam.id = "TRMRI02001";
  233. oParam.service = "unprepmngtapp.ChrtUnprepMngt";
  234. oParam.method = "reqGetUnprepSaveItem";
  235. oParam.inds = "req=ds_send_reqdata";
  236. oParam.outds = "ds_main_unprep_list=unpreplist";
  237. oParam.async = false;
  238. //oParam.callback = "cf_TRMRI02001";
  239. tranf_submit(oParam);
  240. fItemCheck();
  241. }
  242. function fItemCheck()
  243. {
  244. var fromdd;
  245. var todd;
  246. for(var j = 0; j < ds_main_unprep_list.rowcount; j++)
  247. {
  248. fromdd = ds_main_unprep_list.getColumn(j, "unprepbasefromdd");
  249. todd = ds_main_unprep_list.getColumn(j, "unprepbasetodd");
  250. if(todd > utlf_getCurrentDate())
  251. {
  252. ds_main_unprep_list.updatecontrol = false;
  253. ds_main_unprep_list.enableevent = false;
  254. ds_main_unprep_list.setColumn(j, "check", "true");
  255. ds_main_unprep_list.enableevent = true;
  256. ds_main_unprep_list.updatecontrol = true;
  257. }
  258. }
  259. }
  260. function ds_main_unprep_list_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  261. {
  262. if(e.columnid == "check")
  263. {
  264. obj.setColumn(e.row, "check", (e.newvalue == "true" || e.newvalue == 1) ? "true" : "false");
  265. fRowStatusCheck();
  266. }
  267. else
  268. {
  269. if(e.columnid == "wrteunprepflag")
  270. {
  271. obj.setColumn(e.row, "wrteunprepflag", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  272. }
  273. if(e.columnid == "certunprepflag")
  274. {
  275. obj.setColumn(e.row, "certunprepflag", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  276. }
  277. if(e.columnid == "cntflag")
  278. {
  279. obj.setColumn(e.row, "cntflag", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  280. }
  281. fGridValueChng();
  282. }
  283. }
  284. function fRowStatusCheck()
  285. {
  286. var iRow = ds_main_unprep_list.rowposition;
  287. var check = ds_main_unprep_list.getColumn(iRow, "check");
  288. var setdd = ds_main_unprep_list.getColumn(iRow, "setdd");
  289. var todd = ds_main_unprep_list.getColumn(iRow, "unprepbasetodd");
  290. var stat = ds_main_unprep_list.getRowType(iRow);
  291. var addflag = ds_temp.getColumn(0, "addflag");
  292. if(addflag != "1")
  293. {
  294. if(check == "true" && utlf_isNull(setdd))
  295. {
  296. ds_main_unprep_list.updatecontrol = false;
  297. ds_main_unprep_list.setRowType(iRow, "u");
  298. ds_main_unprep_list.setColumn(iRow, "unprepbasefromdd", utlf_getCurrentDate());
  299. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", "29991231");
  300. ds_main_unprep_list.setColumn(iRow, "jobposflag", "3");
  301. ds_main_unprep_list.updatecontrol = true;
  302. }
  303. if(check == "true" && !utlf_isNull(setdd) && (todd <= utlf_getCurrentDate() ))
  304. {
  305. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", "29991231");
  306. ds_main_unprep_list.setColumn(iRow, "jobposflag", "3");
  307. }
  308. else if(check == "true" && !utlf_isNull(setdd))
  309. {
  310. ds_main_unprep_list.updatecontrol = false;
  311. ds_main_unprep_list.setRowType(iRow, "");
  312. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", "29991231");
  313. ds_main_unprep_list.setColumn(iRow, "jobposflag", "3");
  314. ds_main_unprep_list.updatecontrol = true;
  315. }
  316. if(check == "false" && utlf_isNull(setdd))
  317. {
  318. ds_main_unprep_list.updatecontrol = false;
  319. ds_main_unprep_list.setRowType(iRow, "");
  320. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", "");
  321. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", "");
  322. ds_main_unprep_list.setColumn(iRow, "jobposflag", "");
  323. ds_main_unprep_list.updatecontrol = true;
  324. }
  325. if(check == "false" && !utlf_isNull(setdd))
  326. {
  327. ds_main_unprep_list.updatecontrol = false;
  328. ds_main_unprep_list.setRowType(iRow, "d");
  329. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", utlf_getCurrentDate());
  330. ds_main_unprep_list.updatecontrol = true;
  331. }
  332. }
  333. else if(addflag == "1")
  334. {
  335. if(check == "true")
  336. {
  337. fromdd = ds_main_unprep_list.getColumn(iRow, "unprepbasefromdd");
  338. todd = ds_main_unprep_list.getColumn(iRow, "unprepbasetodd");
  339. if(utlf_isNull(fromdd) && utlf_isNull(todd))
  340. {
  341. ds_main_unprep_list.setColumn(iRow, "unprepbasefromdd" , utlf_getCurrentDate());
  342. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd" , "29991231");
  343. ds_main_unprep_list.setColumn(iRow, "jobposflag" , "3");
  344. }
  345. }
  346. }
  347. }
  348. function chk_total_onclick(obj:CheckBox, e:ClickEventInfo)
  349. {
  350. if(obj.value == "total")
  351. {
  352. }
  353. else
  354. {
  355. ds_send_reqdata.setColumn(0, "total", "");
  356. }
  357. }
  358. function btn_req_onclick(obj:Button, e:ClickEventInfo)
  359. {
  360. dsf_setDefaultVal(ds_send_reqdata, "itemflag:N");
  361. var oParam = {};
  362. oParam.id = "TRMRI02001";
  363. oParam.service = "unprepmngtapp.ChrtUnprepMngt";
  364. oParam.method = "reqGetUnprepSaveItem";
  365. oParam.inds = "req=ds_send_reqdata";
  366. oParam.outds = "ds_main_unprep_list=unpreplist";
  367. oParam.async = false;
  368. //oParam.callback = "cf_TRMRI02001";
  369. tranf_submit(oParam);
  370. fItemCheck();
  371. }
  372. function fGridValueChng()
  373. {
  374. var iRow = ds_main_unprep_list.rowposition;
  375. var setdd = ds_main_unprep_list.getColumn(iRow, "setdd");
  376. var check = ds_main_unprep_list.getColumn(iRow, "check");
  377. if(utlf_isNull(setdd) && check =="false")
  378. {
  379. ds_main_unprep_list.setColumn(iRow, "check","true");
  380. if(utlf_isNull(String(ds_main_unprep_list.getColumn(iRow, "unprepbasefromdd")).getTrim()))
  381. {
  382. ds_main_unprep_list.setColumn(iRow, "unprepbasefromdd" , utlf_getCurrentDate());
  383. }
  384. if(utlf_isNull(String(ds_main_unprep_list.getColumn(iRow, "unprepbasetodd")).getTrim()))
  385. {
  386. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd" ,"29991231");
  387. }
  388. ds_main_unprep_list.setColumn(iRow, "jobposflag", "3");
  389. }
  390. }
  391. function button3_onclick(obj:Button, e:ClickEventInfo)
  392. {
  393. ds_temp_unprepmngt_unprepsublist.clearData();
  394. frmf_modal("SPMRI01600", "SPMRI01600", "", "", "", "", "", "", "", "", "", "", "M");
  395. fAddUnprepForm();
  396. }
  397. function fAddUnprepForm()
  398. {
  399. if(ds_temp_unprepmngt_unprepsublist.rowcount > 0)
  400. {
  401. var formcd = ds_temp_unprepmngt_unprepsublist.getColumn(0, "formcd");
  402. var tmp = ds_main_unprep_list.lookup("formcd", formcd, "formcd");
  403. if(utlf_isNull(tmp))
  404. {
  405. var formcd = ds_temp_unprepmngt_unprepsublist.getColumn(0, "formcd");
  406. dsf_makeValue(ds_send_reqdata, "formcd", "string", formcd);
  407. var oParam = {};
  408. oParam.id = "TRMRI02002";
  409. oParam.service = "unprepmngtapp.ChrtUnprepMngt";
  410. oParam.method = "reqGetUnprepBase";
  411. oParam.inds = "req=ds_send_reqdata";
  412. oParam.outds = "ds_main_unprep_list=unpreplist";
  413. oParam.async = false;
  414. //oParam.callback = "cf_TRMRI02002";
  415. tranf_submit(oParam);
  416. fAddRow();
  417. fSetSortNo();
  418. }
  419. }
  420. }
  421. function fAddRow()
  422. {
  423. var node = ds_main_unprep_list;
  424. if(node.rowcount== 0 )
  425. {
  426. var addRow = ds_main_unprep_list.addRow();
  427. var formcd = ds_temp_unprepmngt_unprepsublist.getColumn(0, "formcd");
  428. var formnm = ds_temp_unprepmngt_unprepsublist.getColumn(0, "formnm");
  429. ds_main_unprep_list.enableevent = false;
  430. ds_main_unprep_list.setColumn(0, "formcd", formcd);
  431. ds_main_unprep_list.setColumn(0, "formnm", formnm);
  432. ds_main_unprep_list.enableevent = true;
  433. }
  434. }
  435. function fSetSortNo()
  436. {
  437. for(var j = 0; j < ds_main_unprep_list.rowcount; j++)
  438. {
  439. ds_main_unprep_list.enableevent = false;
  440. ds_main_unprep_list.setColumn(j, "sortno",parseInt(j+1));
  441. ds_main_unprep_list.setColumn(j, "jobposflag",-1);
  442. ds_main_unprep_list.enableevent = true;
  443. ds_main_unprep_list.updatecontrol = false;
  444. ds_main_unprep_list.setRowType(j, "i");
  445. ds_main_unprep_list.updatecontrol = true;
  446. }
  447. dsf_makeValue(ds_temp, "addflag", "string","1");
  448. }
  449. function button2_onclick(obj:Button, e:ClickEventInfo)
  450. {
  451. fCommflagAddRow();
  452. }
  453. function fCommflagAddRow()
  454. {
  455. ds_main_unprep_list.clearData();
  456. var iRow = ds_main_unprep_list.addRow();
  457. ds_main_unprep_list.updatecontrol = false;
  458. ds_main_unprep_list.enableevent = false;
  459. ds_main_unprep_list.setRowType(iRow, "i");
  460. ds_main_unprep_list.setColumn(iRow, "formcd", "-");
  461. ds_main_unprep_list.setColumn(iRow, "formnm", "-");
  462. ds_main_unprep_list.setColumn(iRow, "degnitemlevlcd", "0");
  463. ds_main_unprep_list.setColumn(iRow, "degnitemcd", "0");
  464. ds_main_unprep_list.setColumn(iRow, "sortno", "0");
  465. ds_main_unprep_list.setColumn(iRow, "check", "true");
  466. ds_main_unprep_list.setColumn(iRow, "commflag", "true");
  467. ds_main_unprep_list.setColumn(iRow, "unprepbasefromdd", utlf_getCurrentDate());
  468. ds_main_unprep_list.setColumn(iRow, "unprepbasetodd", "29991231");
  469. ds_main_unprep_list.setColumn(iRow, "jobposflag", "3");
  470. ds_main_unprep_list.enableevent = true;
  471. ds_main_unprep_list.updatecontrol = true;
  472. dsf_makeValue(ds_temp, "addflag", "string","1");
  473. }
  474. function button1_onclick(obj:Button, e:ClickEventInfo)
  475. {
  476. fUnprepaddRow();
  477. }
  478. function fUnprepaddRow()
  479. {
  480. var curRow = ds_main_unprep_list.rowposition;
  481. if(curRow < 0)
  482. {
  483. sysf_messageBox("항목을 추가할 행을 ","C002");
  484. return;
  485. }
  486. var iRow = ds_main_unprep_list.rowposition;
  487. ds_main_unprep_list.insertRow(iRow+1);
  488. var iRow1 = ds_main_unprep_list.rowposition;
  489. var formcd = ds_main_unprep_list.getColumn(iRow, "formcd");
  490. var formnm = ds_main_unprep_list.getColumn(iRow, "formnm");
  491. ds_main_unprep_list.updatecontrol = false;
  492. ds_main_unprep_list.enableevent = false;
  493. ds_main_unprep_list.setRowType(iRow1, "i");
  494. ds_main_unprep_list.setColumn(iRow1, "formcd", formcd);
  495. ds_main_unprep_list.setColumn(iRow1, "formnm", formnm);
  496. ds_main_unprep_list.setColumn(iRow1, "degnitemlevlcd", "0");
  497. ds_main_unprep_list.setColumn(iRow1, "degnitemcd", "0");
  498. ds_main_unprep_list.setColumn(iRow1, "sortno", "0");
  499. ds_main_unprep_list.setColumn(iRow1, "check", "true");
  500. ds_main_unprep_list.setColumn(iRow1, "unprepbasefromdd", utlf_getCurrentDate());
  501. ds_main_unprep_list.setColumn(iRow1, "unprepbasetodd", "29991231");
  502. ds_main_unprep_list.setColumn(iRow1, "jobposflag", "3");
  503. ds_main_unprep_list.enableevent = true;
  504. ds_main_unprep_list.updatecontrol = true;
  505. dsf_makeValue(ds_temp, "addflag", "string","1");
  506. }
  507. function button4_onclick(obj:Button, e:ClickEventInfo)
  508. {
  509. fDelUnprepRow();
  510. }
  511. function fDelUnprepRow()
  512. {
  513. var curRow = ds_main_unprep_list.rowposition;
  514. if(curRow < 0)
  515. {
  516. alert("삭제할 아이템을 선택하세요");
  517. return;
  518. }
  519. var useYN = sysf_messageBox("선택된 미비기준을 삭제 ", "S001");
  520. if(useYN == 6 )
  521. {
  522. dsf_makeValue(ds_send_savedata, "unprepitemcd", "string", ds_main_unprep_list.getColumn(curRow, "unprepitemcd"));
  523. dsf_makeValue(ds_send_savedata, "total", "string", ds_send_reqdata.getColumn(0, "total"));
  524. dsf_makeValue(ds_send_savedata, "formrecdd", "string", "");
  525. var oParam = {};
  526. oParam.id = "TXMRI02002";
  527. oParam.service = "unprepmngtapp.ChrtUnprepMngt";
  528. oParam.method = "reqExeUnprepBaseDel";
  529. oParam.inds = "req=ds_send_savedata";
  530. oParam.outds = "ds_main_unprep_list=unpreplist";
  531. oParam.async = false;
  532. //oParam.callback = "cf_TXMRI02002";
  533. tranf_submit(oParam);
  534. }
  535. }
  536. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  537. {
  538. fSaveUnprepBase();
  539. }
  540. function fSaveUnprepBase()
  541. {
  542. var updategrid = grdf_getGridUpdateData(grd_unpreplist);
  543. grdf_setStatusColumn(updategrid, "status");
  544. ds_send_savebase.copyData(updategrid, true);
  545. ds_temp_unprepitem_templist.clearData();
  546. var CSV = dsf_getDsCSV(ds_send_savebase, "", "", "","");
  547. if(ds_send_savebase.rowcount > 0)
  548. {
  549. dsf_setCSVToDs("ds_temp_unprepitem_templist", CSV);
  550. }
  551. var nodeList = ds_temp_unprepitem_templist;
  552. var iRow;
  553. var sTmp ="";
  554. var flag = false;
  555. if(nodeList.rowcount == 0) return;
  556. for(var i = 0; i < nodeList.rowcount; i++)
  557. {
  558. var itemsNode = ds_temp_unprepitem_templist.getColumn(i, "unprepitemnm");
  559. if(utlf_isNull(String(itemsNode).getTrim()))
  560. {
  561. sysf_messageBox("항목명칭을 ", "C001");
  562. flag = true;
  563. break;
  564. }
  565. }
  566. if(flag) return;
  567. dsf_makeValue(ds_temp, "addflag", "string",""); //서식추가, 항목추가 구분 flag
  568. dsf_setDefaultVal(ds_temp_unprepitem_templist, "formrecdd:''");
  569. var oParam = {};
  570. oParam.id = "TXMRI02001";
  571. oParam.service = "unprepmngtapp.ChrtUnprepMngt";
  572. oParam.method = "reqExeUnprepBase";
  573. oParam.inds = "req=ds_send_savebase sort=ds_sort";
  574. oParam.outds = "ds_main_unprep_list=unpreplist";
  575. oParam.async = false;
  576. //oParam.callback = "cf_TXMRI02001";
  577. tranf_submit(oParam);
  578. fItemCheck();
  579. }
  580. function btn_ex_onclick(obj:Button, e:ClickEventInfo)
  581. {
  582. fSaveExcel();
  583. }
  584. function fSaveExcel()
  585. {
  586. grdf_exportExcel(grd_unpreplist, "excel", "SheetName", "true", "", "");
  587. }
  588. ]]></Script>
  589. </Form>
  590. </FDL>