SMMNG04700_장비정기점검일지.xfdl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNG04700" position="absolute 0 0 1195 737" titletext="장비정기점검일지" oninit="SMMNG04700_oninit" onload="SMMNG04700_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 20 1195 737" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Div position="absolute 0 5 1186 40" align="align:center top;" id="grp_sea" anchor="left top right" class="div_SA">
  11. <Layouts>
  12. <Layout>
  13. <Static text="업무년월 :" position="absolute 10 9 99 26" id="caption9" class="search_name" anchor="default"/>
  14. <Button position="absolute 1004 7 1060 29" align="align:left middle;" id="button2" class="btn1" taborder="7" text="조회" anchor="top right" onclick="grp_biz_grp_sea_button2_onclick"/>
  15. <Calendar position="absolute 84 8 150 27" align="align:center middle;" id="ipt_workmm" class="input_s_essential" mask="yyyy-mm" anchor="default" autoselect="true"/>
  16. <Button position="absolute 1063 7 1119 29" align="align:left middle;" id="button1" class="btn4" taborder="7" text="저장" anchor="top right" onclick="grp_biz_grp_sea_button1_onclick"/>
  17. <Button position="absolute 1122 7 1178 29" align="align:left middle;" id="button5" class="btn6" taborder="7" text="출력" anchor="top right" onclick="grp_biz_grp_sea_button5_onclick"/>
  18. </Layout>
  19. </Layouts>
  20. </Div>
  21. <Tab position="absolute 0 47 1195 717" id="switch1" anchor="all" tabindex="0">
  22. <Tabpages>
  23. <Tabpage text="체크리스트" id="case1">
  24. <Layouts>
  25. <Layout>
  26. <Grid position="absolute 0 28 1195 643" id="grd_chklist" binddataset="ds_main_chkinfo_chklist" anchor="default" autoenter="select" selecttype="cell" cellclickbound="cell" autofittype="col" cellsizebandtype="allband" cellsizingtype="col">
  27. <Formats>
  28. <Format id="default">
  29. <Columns>
  30. <Column size="63"/>
  31. <Column size="212"/>
  32. <Column size="80"/>
  33. <Column size="80"/>
  34. <Column size="80"/>
  35. <Column size="80"/>
  36. <Column size="80"/>
  37. <Column size="80"/>
  38. <Column size="80"/>
  39. <Column size="80"/>
  40. <Column size="80"/>
  41. <Column size="80"/>
  42. <Column size="80"/>
  43. <Column size="80"/>
  44. <Column size="80"/>
  45. </Columns>
  46. <Rows>
  47. <Row size="24" band="head"/>
  48. <Row size="40" band="head"/>
  49. <Row size="24"/>
  50. </Rows>
  51. <Band id="head">
  52. <Cell rowspan="2" text="표준" taborder="undefined"/>
  53. <Cell col="1" rowspan="2" text="Check List" taborder="undefined"/>
  54. <Cell col="2" taborder="undefined"/>
  55. <Cell col="3" taborder="undefined"/>
  56. <Cell col="4" taborder="undefined"/>
  57. <Cell col="5" taborder="undefined"/>
  58. <Cell col="6" taborder="undefined"/>
  59. <Cell col="7" taborder="undefined"/>
  60. <Cell col="8" taborder="undefined"/>
  61. <Cell col="9" taborder="undefined"/>
  62. <Cell col="10" taborder="undefined"/>
  63. <Cell col="11" taborder="undefined"/>
  64. <Cell col="12"/>
  65. <Cell col="13"/>
  66. <Cell col="14"/>
  67. <Cell row="1" col="2" text="caption7"/>
  68. <Cell row="1" col="3" text="caption11"/>
  69. <Cell row="1" col="4" text="caption10"/>
  70. <Cell row="1" col="5" text="caption9"/>
  71. <Cell row="1" col="6" text="caption8"/>
  72. <Cell row="1" col="7" text="caption6"/>
  73. <Cell row="1" col="8" text="caption5"/>
  74. <Cell row="1" col="9" text="caption4"/>
  75. <Cell row="1" col="10" text="caption3"/>
  76. <Cell row="1" col="11" text="caption2"/>
  77. <Cell row="1" col="12" text="caption1"/>
  78. <Cell row="1" col="13" text="caption12"/>
  79. <Cell row="1" col="14" text="caption13"/>
  80. </Band>
  81. <Band id="body">
  82. <Cell style="line:EXPR(line);font:arial,9,bold;" text="bind:chkdivsnm"/>
  83. <Cell col="1" style="align:left top;padding:5 2 0 2;line:EXPR(line);font:arial,9,bold;" text="bind:chknm" wordwrap="char"/>
  84. <Cell col="2" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq1" expr="expr:eq1 == 'Y' || eq1 == '1' ? '1' : '0'"/>
  85. <Cell col="3" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq2" expr="expr:eq2 == 'Y' || eq2 == '1' ? '1' : '0'"/>
  86. <Cell col="4" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq3" expr="expr:eq3 == 'Y' || eq3 == '1' ? '1' : '0'"/>
  87. <Cell col="5" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq4" expr="expr:eq4 == 'Y' || eq4 == '1' ? '1' : '0'"/>
  88. <Cell col="6" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq5" expr="expr:eq5 == 'Y' || eq5 == '1' ? '1' : '0'"/>
  89. <Cell col="7" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq6" expr="expr:eq6 == 'Y' || eq6 == '1' ? '1' : '0'"/>
  90. <Cell col="8" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq7" expr="expr:eq7 == 'Y' || eq7 == '1' ? '1' : '0'"/>
  91. <Cell col="9" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq8" expr="expr:eq8 == 'Y' || eq8 == '1' ? '1' : '0'"/>
  92. <Cell col="10" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq9" expr="expr:eq9 == 'Y' || eq9 == '1' ? '1' : '0'"/>
  93. <Cell col="11" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq10" expr="expr:eq10 == 'Y' || eq10 == '1' ? '1' : '0'"/>
  94. <Cell col="12" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq11" expr="expr:eq11 == 'Y' || eq11 == '1' ? '1' : '0'"/>
  95. <Cell col="13" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq12" expr="expr:eq12 == 'Y' || eq11 == '1' ? '1' : '0'"/>
  96. <Cell col="14" displaytype="checkbox" edittype="checkbox" style="line:EXPR(line);" text="bind:eq13" expr="expr:eq11 == 'Y' || eq13 == '1' ? '1' : '0'"/>
  97. </Band>
  98. </Format>
  99. </Formats>
  100. </Grid>
  101. <Static text="체크리스트" position="absolute 0 5 100 22" id="caption1" class="tit_2" anchor="default"/>
  102. <Shape position="absolute 0 24 1195 29" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
  103. </Layout>
  104. </Layouts>
  105. </Tabpage>
  106. <Tabpage text="점검일지" id="case2">
  107. <Layouts>
  108. <Layout>
  109. <Grid position="absolute 0 24 1195 643" id="grd_chklist2" class="datagrid2" binddataset="ds_main_chkinfo_chklist2" anchor="all" onexpanddown="grp_biz_switch1_case2_grd_chklist2_onexpanddown" autoenter="select" cellclickbound="cell" selecttype="cell" autofittype="col" cellsizebandtype="allband" cellsizingtype="col">
  110. <Formats>
  111. <Format id="default">
  112. <Columns>
  113. <Column size="0"/>
  114. <Column size="0"/>
  115. <Column size="24"/>
  116. <Column size="100"/>
  117. <Column size="89"/>
  118. <Column size="100"/>
  119. <Column size="100"/>
  120. <Column size="100"/>
  121. <Column size="569"/>
  122. <Column size="100"/>
  123. <Column size="0"/>
  124. <Column size="0"/>
  125. </Columns>
  126. <Rows>
  127. <Row size="28" band="head"/>
  128. <Row size="24"/>
  129. </Rows>
  130. <Band id="head">
  131. <Cell text="상태"/>
  132. <Cell col="1" text="workmm"/>
  133. <Cell col="2"/>
  134. <Cell col="3" text="장비명"/>
  135. <Cell col="4" text="점검후상태&#10;(양호여부)"/>
  136. <Cell col="5" text="점검일자"/>
  137. <Cell col="6" text="점검자"/>
  138. <Cell col="7" text="멸균팀확인자"/>
  139. <Cell col="8" text="수리요구 계획 : 특이사항"/>
  140. <Cell col="9" text="의공학팀&#10;확인자"/>
  141. <Cell col="10" text="멸균팀확인자ID"/>
  142. <Cell col="11" text="의공학팀&#10;확인자"/>
  143. </Band>
  144. <Band id="body">
  145. <Cell text="bind:stat"/>
  146. <Cell col="1" text="bind:workmm"/>
  147. <Cell col="2" celltype="head"/>
  148. <Cell col="3" displaytype="combo" edittype="combo" style="padding:1 2 1 2;" text="bind:fixasetcd" combodataset="ds_cond_codeinfo_codelist" combocodecol="cdid" combodatacol="cdnm" combodisplayrowcount="10"/>
  149. <Cell col="4" displaytype="checkbox" edittype="checkbox" text="bind:statyn" expr="expr:statyn == 'Y' || statyn == '1' ? '1' : '0'"/>
  150. <Cell col="5" displaytype="date" edittype="date" text="bind:chkdd" calendardisplaynulltype="none"/>
  151. <Cell col="6" displaytype="text" edittype="text" text="bind:chknm"/>
  152. <Cell col="7" displaytype="text" edittype="text" text="bind:certnm" expandshow="show"/>
  153. <Cell col="8" displaytype="text" edittype="text" text="bind:cmt"/>
  154. <Cell col="9" displaytype="text" edittype="text" text="bind:certnm2" expandshow="show"/>
  155. <Cell col="10" text="bind:certid"/>
  156. <Cell col="11" text="bind:certid2"/>
  157. </Band>
  158. </Format>
  159. </Formats>
  160. </Grid>
  161. <Static text="체크리스트" position="absolute 0 3 100 24" id="caption2" class="tit_2" anchor="default"/>
  162. <Shape position="absolute 0 20 1195 29" linetype="horizontal" id="line2" class="line_10" anchor="left top right"/>
  163. </Layout>
  164. </Layouts>
  165. </Tabpage>
  166. </Tabpages>
  167. </Tab>
  168. </Layout>
  169. </Layouts>
  170. </Div>
  171. <Static id="cap_title" text="장비 정기점검일지" class="tit_1" position="absolute 0 0 141 25"/>
  172. </Layout>
  173. </Layouts>
  174. <Objects>
  175. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  176. <ColumnInfo>
  177. <Column id="workmm" type="STRING" size="256"/>
  178. </ColumnInfo>
  179. <Rows>
  180. <Row>
  181. <Col id="workmm"/>
  182. </Row>
  183. </Rows>
  184. </Dataset>
  185. <Dataset id="ds_temp_titleinfo_titlelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  186. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  187. <Dataset id="ds_main_chkinfo_chklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  188. <Dataset id="ds_cond_codeinfo_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  189. <Dataset id="ds_main_chkinfo_chklist2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  190. <Dataset id="ds_temp_chkinfo_chklist2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  191. <Dataset id="ds_temp_chkinfo_chklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  192. <Dataset id="ds_send_savedata_chklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  193. <Dataset id="ds_send_savedata_chklist2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  194. <Dataset id="ds_printinfo_cmtinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  195. <Dataset id="ds_printinfo_statinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  196. <Dataset id="ds_printinfo_chkddinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  197. <Dataset id="ds_printinfo_chknminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  198. <Dataset id="ds_printinfo_certnm2info" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  199. <Dataset id="ds_temp_title" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  200. <Dataset id="ds_temp_title2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  201. <Dataset id="ds_printinfo_certnminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  202. </Objects>
  203. <Bind>
  204. <BindItem id="item0" compid="grp_biz.grp_sea.ipt_workmm" propid="value" datasetid="ds_main_cond" columnid="workmm"/>
  205. </Bind>
  206. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  207. * System Name :
  208. * Job Name :
  209. * Creator :
  210. * Make Date : 2017-07-11
  211. * Description :
  212. *---------------------------------------------------------------------------------------
  213. * Modify Date Modifier Modify Description
  214. *---------------------------------------------------------------------------------------
  215. * 2017-07-11 Live Converter TF->XP
  216. *
  217. *---------------------------------------------------------------------------------------
  218. ****************************************************************************************/
  219. include "com_commonxp::comm_main.xjs";
  220. var arErrorCode = new HashArray();
  221. var oGridFromat;
  222. function SMMNG04700_oninit(obj:Form, e:InitEventInfo)
  223. {
  224. frmf_initForm(obj); //폼 초기화
  225. grdf_setRowTypeIcon(grp_biz.switch1.case2.grd_chklist2, 2);
  226. grdf_initGrid(grp_biz.switch1.case1.grd_chklist);
  227. grdf_initGrid(grp_biz.switch1.case2.grd_chklist2);
  228. }
  229. function SMMNG04700_onload(obj:Form, e:LoadEventInfo)
  230. {
  231. //Grid 초기 포맷을 가지고 있음
  232. oGridFromat = grp_biz.switch1.case1.grd_chklist.formats;
  233. var curdd = utlf_getCurrentDate();
  234. grp_biz.grp_sea.ipt_workmm.value = curdd.substr(0,6);
  235. fSearch();
  236. }
  237. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  238. function fTitleInitialize() {
  239. //그리드 초기 포맷에서 그리드 수정을 하므로, 조회시 초기 포맷으로 초기화함
  240. grp_biz.switch1.case1.grd_chklist.formats = oGridFromat;
  241. var oParam = {};
  242. oParam.id = "TRMNG04701";
  243. oParam.service = "csrapp.CsrMngt";
  244. oParam.method = "reqGetEqCheckTitleInfo";
  245. oParam.inds = "req=ds_main_cond";
  246. oParam.outds = "ds_temp_titleinfo_titlelist=titlelist";
  247. oParam.async = false;
  248. tranf_submit(oParam);
  249. var caption1 = ds_temp_titleinfo_titlelist.getColumn(0, "caption");
  250. var caption2 = caption1.split("|");
  251. var arr1 = caption2[0].split("^");
  252. var arr2 = caption2[1].split("^");
  253. var count = 0;
  254. var colcount = 5;
  255. //DB 쿼리에 맞추어 최대 col num은 15로 설정
  256. var iTotalColNum = 15;
  257. //merge를 위한 시작 및 종료 col num 을 가지는 array
  258. var arrStartNum = new Array();
  259. var arrEndNum = new Array();
  260. var jIndex = 0;
  261. //하단 타이틀 시작 총컬럼수 15(0~14)개이므로 14부터 시작
  262. var zIndex = 14;
  263. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  264. //하단 타이틀 입력
  265. //총 컬럼 수 28(0~27)
  266. for(var iIndex = 27 ; iIndex >= 15; iIndex--){
  267. grp_biz.switch1.case1.grd_chklist.setCellProperty("head", iIndex, "text", arr2[zIndex]);
  268. zIndex = zIndex - 1;
  269. }
  270. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  271. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  272. //서로 merge할 cell들을 계산하여 array에 넣어줌
  273. for(var iIndex = 0 ; iIndex < iTotalColNum -1; iIndex++){
  274. //0 : 표준, 1 : checklist 이므로 continue
  275. if(iIndex == 0 || iIndex == 1){
  276. continue;
  277. }
  278. //null항목은 사이즈 0 설정, index가 2부터 null인 경우도 arrStartNum에 다음 iIndex를 넣어줌
  279. if(arr1[iIndex] == 'null'){
  280. //중간에 null이 있는 경우 시작 위치를 iIndex+1 부터 시작 되도록 설정
  281. arrStartNum[jIndex] = iIndex+1;
  282. grp_biz.switch1.case1.grd_chklist.setFormatColProperty(iIndex, "size", 0);
  283. continue;
  284. }
  285. //2 는 시작이므로 기본으로 시작점에 입력
  286. if(iIndex == 2){
  287. arrStartNum[jIndex] = iIndex;
  288. }
  289. else {
  290. //현재의 값과 다음 값이 다른 경우에 merge 처리
  291. if(arr1[iIndex] != arr1[iIndex+1]){
  292. arrEndNum[jIndex] = iIndex;
  293. jIndex++;
  294. //merge end 값을 넣어 주고 다음 merge 시작 값을 넣어줌
  295. arrStartNum[jIndex] = iIndex+1;
  296. }
  297. if(iIndex == iTotalColNum -2)
  298. {
  299. arrEndNum[jIndex] = iIndex+1;
  300. }
  301. }
  302. }
  303. trace(arrStartNum);
  304. trace(arrEndNum);
  305. //위의 루틴에서 iTotalColNum의 -2까지만 null check(iTotalColNum의 -1까지 merge 처리)하므로
  306. if(arr1[iTotalColNum-1] == 'null'){
  307. grp_biz.switch1.case1.grd_chklist.setFormatColProperty(iTotalColNum-1, "size", 0);
  308. }
  309. //merge 관련 array를 참고하여 merge 처리 : 앞에서 merge 처리 안되어서 뒤에서 부터 merge 처리
  310. for(var iIndex = arrEndNum.length-1 ; iIndex >= 0 ; iIndex--){
  311. //merge 처리
  312. grp_biz.switch1.case1.grd_chklist.mergeContentsCell("head", 0,arrStartNum[iIndex], 0,arrEndNum[iIndex], arrStartNum[iIndex], false);
  313. //title 입력 처리
  314. grp_biz.switch1.case1.grd_chklist.setCellProperty("head", arrStartNum[iIndex], "text", arr1[arrStartNum[iIndex]]);
  315. }
  316. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  317. }
  318. //20180124 이돈희 : 월별로 입력 자료 이므로 월별 code 조회
  319. function fInitCode()
  320. {
  321. var curdd = grp_biz.grp_sea.ipt_workmm.value + "01";
  322. dsf_makeValue(ds_send_reqdata, "srchdd", "string", curdd);
  323. dsf_makeValue(ds_send_reqdata, "cdgrupid", "string", "'U12'");
  324. dsf_makeValue(ds_send_reqdata, "flag", "string", "1");
  325. var oParam = {};
  326. oParam.id = "TRMNW00001";
  327. oParam.service = "wardcareapp.WardCareMngt";
  328. oParam.method = "reqGetNursHardCdInfo";
  329. oParam.inds = "req=ds_send_reqdata";
  330. oParam.outds = "ds_cond_codeinfo_codelist=codelist";
  331. oParam.async = false;
  332. tranf_submit(oParam);
  333. }
  334. function fSearch(){
  335. //타이틀 초기화
  336. fTitleInitialize();
  337. //조회할때 해당 월의 코드 조회
  338. fInitCode();
  339. dsf_makeValue(ds_send_reqdata, "workmm", "string", String(grp_biz.grp_sea.ipt_workmm.value).substr(0, 6));
  340. var oParam = {};
  341. oParam.id = "TRMNG04702";
  342. oParam.service = "csrapp.CsrMngt";
  343. oParam.method = "reqGetEqCheckInfo";
  344. oParam.inds = "req=ds_send_reqdata";
  345. oParam.outds = "ds_temp_chkinfo_chklist=chklist ds_temp_chkinfo_chklist2=chklist2";
  346. oParam.async = false;
  347. tranf_submit(oParam);
  348. ds_main_chkinfo_chklist.copyData(ds_temp_chkinfo_chklist);
  349. ds_main_chkinfo_chklist2.copyData(ds_temp_chkinfo_chklist2);
  350. ds_main_chkinfo_chklist.addColumn("line", "string");
  351. var rows = ds_main_chkinfo_chklist.rowcount;
  352. //var height = rows * 23 + 19;
  353. //grd_chklist.attribute("height") = height;
  354. var chkdivsnm;
  355. var chkdivsnm2;
  356. for(var i = 0; i < ds_main_chkinfo_chklist.rowcount; i++) {
  357. if(i == 0) {
  358. chkdivsnm = ds_main_chkinfo_chklist.getColumn(i, "chkdivsnm");
  359. chkdivsnm2 = ds_main_chkinfo_chklist.getColumn(i, "chkdivsnm");
  360. } else {
  361. chkdivsnm = ds_main_chkinfo_chklist.getColumn(i-1, "chkdivsnm");
  362. chkdivsnm2 = ds_main_chkinfo_chklist.getColumn(i, "chkdivsnm");
  363. }
  364. if(chkdivsnm != chkdivsnm2) {
  365. dsf_makeValue(ds_main_chkinfo_chklist, "chkflag", "string", "1", (i-2));
  366. dsf_makeValue(ds_temp_chkinfo_chklist, "chkflag", "string", "1", (i-2));
  367. ds_main_chkinfo_chklist.setColumn(i - 1, "line", "1 solid #B0B0B0, 1 solid #B0B0B0, 2 solid blue, 1 solid #B0B0B0");
  368. } else {
  369. dsf_makeValue(ds_main_chkinfo_chklist, "chkflag", "string", "0", (i-1));
  370. dsf_makeValue(ds_temp_chkinfo_chklist, "chkflag", "string", "0", (i-1));
  371. }
  372. }
  373. var stat;
  374. for(var i = 0; i < ds_main_chkinfo_chklist2.rowcount; i++) {
  375. stat = ds_main_chkinfo_chklist2.getColumn(i, "stat");
  376. if(stat=="1") {
  377. ds_main_chkinfo_chklist2.enableevent = false;
  378. ds_main_chkinfo_chklist2.updatecontrol = false;
  379. ds_main_chkinfo_chklist2.setRowType(i, 2);
  380. ds_main_chkinfo_chklist2.updatecontrol = true;
  381. ds_main_chkinfo_chklist2.enableevent = true;
  382. } else {
  383. ds_main_chkinfo_chklist2.enableevent = false;
  384. ds_main_chkinfo_chklist2.updatecontrol = false;
  385. ds_main_chkinfo_chklist2.setRowType(i, 1);
  386. ds_main_chkinfo_chklist2.updatecontrol = true;
  387. ds_main_chkinfo_chklist2.enableevent = true;
  388. }
  389. }
  390. }
  391. function grp_biz_grp_sea_button2_onclick(obj:Button, e:ClickEventInfo)
  392. {
  393. fSearch();
  394. }
  395. function grp_biz_grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
  396. {
  397. fSave();
  398. }
  399. function fSave() {
  400. var tempPath = ds_temp_chkinfo_chklist;
  401. var mainPath = ds_main_chkinfo_chklist;
  402. var nodecnt = ds_main_chkinfo_chklist.rowcount;
  403. var updtheader="workmm▦fixasetcd▦chkid▦chkyn▩";
  404. var updtdata = "";
  405. var tempval;
  406. var mainval;
  407. var eq;
  408. for(var i = 0; i < nodecnt; i++) {
  409. for(var j = 1; j <= 11; j++) {
  410. tempval = tempPath.getColumn(i, "eq" + j);
  411. mainval = mainPath.getColumn(i, "eq" + j);
  412. if(tempval != mainval) {
  413. if(mainPath.getColumn(i, "eq" + j) == "Y" || mainPath.getColumn(i, "eq" + j) == "1"){
  414. eq = "Y";
  415. }else{
  416. // 20200129 김현석 N 체크를 안 하도록
  417. //eq = "N";
  418. eq = "";
  419. }
  420. updtdata += mainPath.getColumn(i, "workmm") + "▦"
  421. + mainPath.getColumn(i, "eqcd" + j) + "▦"
  422. + mainPath.getColumn(i, "chkid") + "▦"
  423. + eq + "▩"
  424. }
  425. }
  426. }
  427. ds_main_chkinfo_chklist2.enableevent = false;
  428. ds_main_chkinfo_chklist2.updatecontrol = false;
  429. for(var i = 0; i < ds_main_chkinfo_chklist2.rowcount ;i++){
  430. // 20191210 김현석, 점검일자가 들어간 경우에만 Y,N를 입력 되도록 수정
  431. if (! utlf_isNull(ds_main_chkinfo_chklist2.getColumn(i, "chkdd")))
  432. {
  433. if(ds_main_chkinfo_chklist2.getColumn(i, "statyn") == "Y" || ds_main_chkinfo_chklist2.getColumn(i, "statyn") == "1"){
  434. ds_main_chkinfo_chklist2.setColumn(i, "statyn", "Y");
  435. }else{
  436. ds_main_chkinfo_chklist2.setColumn(i, "statyn", "N");
  437. }
  438. }
  439. else
  440. {
  441. ds_main_chkinfo_chklist2.setColumn(i, "statyn", "");
  442. }
  443. }
  444. ds_main_chkinfo_chklist2.updatecontrol = true;
  445. ds_main_chkinfo_chklist2.enableevent = true;
  446. var updtdata2 = grdf_getGridUpdateData(grp_biz.switch1.case2.grd_chklist2);
  447. grdf_setStatusColumn(updtdata2, "status");
  448. if(utlf_isNull(updtdata) && (utlf_isNull(updtdata2) || updtdata2.rowcount == 0)) {
  449. sysf_messageBox("저장할 데이터가 존재하지 않습니다.", "E");
  450. return;
  451. }
  452. dsf_setCSVToDs("ds_send_savedata_chklist", updtheader + updtdata);
  453. ds_send_savedata_chklist2.copyData(updtdata2);
  454. var oParam = {};
  455. oParam.id = "TXMNG04701";
  456. oParam.service = "csrapp.CsrMngt";
  457. oParam.method = "reqExeEqCheckInfo";
  458. oParam.inds = "req=ds_send_savedata_chklist req2=ds_send_savedata_chklist2";
  459. oParam.outds = "";
  460. oParam.async = false;
  461. tranf_submit(oParam);
  462. sysf_messageBox("저장하였습니다.", "E");
  463. fSearch();
  464. }
  465. function grp_biz_switch1_case2_grd_chklist2_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  466. {
  467. var iCol = grp_biz.switch1.case2.grd_chklist2.currentcol;
  468. var iRow = ds_main_chkinfo_chklist2.rowposition;
  469. if(iCol == grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "certnm")) {
  470. ds_main_chkinfo_chklist2.setColumn(iRow, "certnm", sysf_getUserInfo("usernm"));
  471. ds_main_chkinfo_chklist2.setColumn(iRow, "certid", sysf_getUserInfo("userid"));
  472. }
  473. if(iCol == grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "certnm2")) {
  474. ds_main_chkinfo_chklist2.setColumn(iRow, "certnm2", sysf_getUserInfo("usernm"));
  475. ds_main_chkinfo_chklist2.setColumn(iRow, "certid2", sysf_getUserInfo("userid"));
  476. }
  477. if(ds_main_chkinfo_chklist2.getRowType(iRow) == "1" ) {
  478. ds_main_chkinfo_chklist2.enableevent = false;
  479. ds_main_chkinfo_chklist2.updatecontrol = false;
  480. ds_main_chkinfo_chklist2.setRowType(iRow, 4);
  481. ds_main_chkinfo_chklist2.updatecontrol = true;
  482. ds_main_chkinfo_chklist2.enableevent = true;
  483. }
  484. }
  485. function grp_biz_grp_sea_button5_onclick(obj:Button, e:ClickEventInfo)
  486. {
  487. fPrint();
  488. }
  489. function fPrint() {
  490. for(var i = 0; i < grp_biz.switch1.case1.grd_chklist.getCellCount("Head"); i++) {
  491. var title = grp_biz.switch1.case1.grd_chklist.getCellProperty("Head", i, "text");
  492. // 20191210, 김현석, null 값인 경우 ""으로 치환
  493. if (title == "null")
  494. title = "";
  495. if(i < 5){
  496. dsf_makeValue(ds_temp_title , "title" + grp_biz.switch1.case1.grd_chklist.getCellProperty("Head", i, "col"), "string", title);
  497. }else{
  498. dsf_makeValue(ds_temp_title2, "title" + grp_biz.switch1.case1.grd_chklist.getCellProperty("Head", i, "col"), "string", title);
  499. }
  500. }
  501. var colCnt = grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "certnm2") - grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "statyn");
  502. var idx = grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "statyn");
  503. var cnt = 0;
  504. var fixasetcd ="";
  505. var fixasetcd2 = "";
  506. var grupdetldesc = "";
  507. var grupdetldesc2 = "";
  508. var str="";
  509. var cmt = "";
  510. var idx= 0;
  511. for(var i = 0; i < ds_main_chkinfo_chklist2.rowcount; i++) {
  512. cmt = grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "cmt"));
  513. if(i == 0) {
  514. fixasetcd = grp_biz.switch1.case2.grd_chklist2.getCellValue(i , grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "fixasetcd"));
  515. fixasetcd2 = grp_biz.switch1.case2.grd_chklist2.getCellValue(i , grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "fixasetcd"));
  516. } else {
  517. fixasetcd = grp_biz.switch1.case2.grd_chklist2.getCellValue(i-1 , grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "fixasetcd"));
  518. fixasetcd2 = grp_biz.switch1.case2.grd_chklist2.getCellValue(i , grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "fixasetcd"));
  519. }
  520. grupdetldesc = ds_cond_codeinfo_codelist.lookup("cdid", fixasetcd, "grupdetldesc");
  521. grupdetldesc2 = ds_cond_codeinfo_codelist.lookup("cdid", fixasetcd2, "grupdetldesc");
  522. if(grupdetldesc != grupdetldesc2) {
  523. dsf_makeValue(ds_printinfo_cmtinfo,"cmt" + cnt,"string",str);
  524. str = cmt;
  525. cnt++;
  526. if(i == ds_main_chkinfo_chklist2.rowcount - 1) {
  527. dsf_makeValue(ds_printinfo_cmtinfo,"cmt" + cnt,"string",str);
  528. }
  529. } else {
  530. if( !utlf_isNull(cmt) ) {
  531. if(idx == 0) {
  532. str += cmt;
  533. idx++;
  534. } else {
  535. str += ", " + cmt;
  536. }
  537. }
  538. }
  539. for(var j = idx; j <= idx + colCnt; j++) {
  540. var statyn = "";
  541. if (!utlf_isNull(grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "chkdd"))))
  542. {
  543. statyn = grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "statyn"));
  544. }
  545. //dsf_makeValue(ds_printinfo_statinfo ,"stat" + (i +1) ,"string", grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "statyn")) );
  546. dsf_makeValue(ds_printinfo_statinfo ,"stat" + (i +1) ,"string", statyn );
  547. dsf_makeValue(ds_printinfo_chkddinfo,"chkdd" + (i+ 1),"string",grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "chkdd")) );
  548. dsf_makeValue(ds_printinfo_chknminfo,"chknm" + (i+1),"string",utlf_transNullToEmpty(grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "chknm"))) + "/" + utlf_transNullToEmpty(grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "certnm"))) );
  549. dsf_makeValue(ds_printinfo_certnm2info,"certnm2" + (i+1),"string",grp_biz.switch1.case2.grd_chklist2.getCellValue(i, grp_biz.switch1.case2.grd_chklist2.getBindCellIndex("body", "certnm2")) );
  550. }
  551. }
  552. //미리보기출력
  553. var objDOM = rptf_createDOM();
  554. rptf_setNodeListToDOM(objDOM, "root/main/chkinfo/chklist" , ds_main_chkinfo_chklist); // 데이터셋 1
  555. rptf_setNodeListToDOM(objDOM, "root/temp/title" , ds_temp_title);
  556. rptf_setNodeListToDOM(objDOM, "root/temp/title2" , ds_temp_title2);
  557. rptf_setNodeListToDOM(objDOM, "root/printinfo/statinfo" , ds_printinfo_statinfo);
  558. rptf_setNodeListToDOM(objDOM, "root/printinfo/chkddinfo" , ds_printinfo_chkddinfo);
  559. rptf_setNodeListToDOM(objDOM, "root/printinfo/chknminfo" , ds_printinfo_chknminfo);
  560. rptf_setNodeListToDOM(objDOM, "root/printinfo/certnminfo" , ds_printinfo_certnminfo);
  561. rptf_setNodeListToDOM(objDOM, "root/printinfo/cmtinfo" , ds_printinfo_cmtinfo);
  562. rptf_setNodeListToDOM(objDOM, "root/printinfo/certnm2info" , ds_printinfo_certnm2info);
  563. var objParam = new Object();
  564. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  565. var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
  566. rptf_exeReportPreview30(["RPMNG04700"],[objParam], option);
  567. }]]></Script>
  568. </Form>
  569. </FDL>