SPPIJ02200_중간계산마감.xfdl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml" />
  4. <Form id="SPPIJ02200" position="absolute 0 0 480 390" titletext="중간계산마감" onload="SPPIJ02200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group1" position="absolute 0 15 460 322" style="">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption10" position="absolute 18 15 104 35" style="" text="중간계산마감일" />
  11. <Shape id="line6" class="line_1" linetype="horizontal" position="absolute 5 38 452 41" style="" anchor="default" />
  12. <Shape id="roundrect1" anchor="default" class="roundrect_example" type="roundrectangle" position="absolute 10 14 114 34" style="" />
  13. <Button id="btn_mdlcalcend" class="btn2_letter2" position="absolute 335 15 377 34" style="" text="마감" onclick="group1_btn_mdlcalcend_onclick" />
  14. <Shape id="line4" class="line_3" linetype="horizontal" position="absolute 5 303 452 306" style="" anchor="default" />
  15. <Button id="btn_mdlcalccancel" class="btn2_letter4" position="absolute 380 15 444 34" style="" text="마감취소" onclick="group1_btn_mdlcalccancel_onclick" />
  16. <Calendar id="ipt_judgenddd" class="input_search" taborder="4" mask="yyyy-mm-dd" position="absolute 119 15 219 34" style="" anchor="default" />
  17. <Grid id="grd_mdlcalcend" binddataset="ds_main_list1_mdlcalcend" position="absolute 5 43 452 302" style="">
  18. <Formats>
  19. <Format id="default">
  20. <Columns>
  21. <Column size="30" />
  22. <Column size="100" />
  23. <Column size="100" />
  24. <Column size="100" />
  25. <Column size="135" />
  26. <Column size="100" />
  27. <Column size="100" />
  28. <Column size="120" />
  29. <Column size="135" />
  30. </Columns>
  31. <Rows>
  32. <Row size="24" band="head" />
  33. <Row size="24" />
  34. </Rows>
  35. <Band id="head">
  36. <Cell text="선택" />
  37. <Cell col="1" text="pid" />
  38. <Cell col="2" text="indd" />
  39. <Cell col="3" text="cretno" />
  40. <Cell col="4" text="마감일자" />
  41. <Cell col="5" text="fstrgstrid" />
  42. <Cell col="6" text="fstrgstdt" />
  43. <Cell col="7" text="심사자" />
  44. <Cell col="8" text="심사일시" />
  45. </Band>
  46. <Band id="body">
  47. <Cell text="bind:chk" />
  48. <Cell col="1" text="bind:pid" />
  49. <Cell col="2" text="bind:indd" />
  50. <Cell col="3" text="bind:cretno" />
  51. <Cell col="4" text="bind:judgenddd" />
  52. <Cell col="5" text="bind:fstrgstrid" />
  53. <Cell col="6" text="bind:fstrgstdt" />
  54. <Cell col="7" text="bind:lastupdtrid" />
  55. <Cell col="8" text="bind:lastupdtdt" />
  56. </Band>
  57. </Format>
  58. </Formats>
  59. </Grid>
  60. </Layout>
  61. </Layouts>
  62. </Div>
  63. <Static id="caption3" class="tit_1" position="absolute 0 0 180 14" style="align: middle;" text="중간계산마감" />
  64. <Button id="btn_close" class="btn4_letter2" position="absolute 395 325 451 347" style="" text="닫기" onclick="btn_close_onclick" />
  65. </Layout>
  66. </Layouts>
  67. <Objects>
  68. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  69. <ColumnInfo>
  70. <Column id="judgenddd" type="STRING" size="256" />
  71. <Column id="data2" type="STRING" size="256" />
  72. <Column id="data3" type="STRING" size="256" />
  73. </ColumnInfo>
  74. <Rows>
  75. <Row>
  76. <Col id="judgenddd"></Col>
  77. </Row>
  78. </Rows>
  79. </Dataset>
  80. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  81. <ColumnInfo />
  82. </Dataset>
  83. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  84. <ColumnInfo>
  85. <Column id="hidden" type="STRING" size="256" />
  86. </ColumnInfo>
  87. </Dataset>
  88. <Dataset id="ds_send_data1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  89. <ColumnInfo>
  90. <Column id="pid" type="STRING" size="256" />
  91. <Column id="indd" type="STRING" size="256" />
  92. <Column id="cretno" type="STRING" size="256" />
  93. </ColumnInfo>
  94. <Rows>
  95. <Row>
  96. <Col id="pid"></Col>
  97. <Col id="indd"></Col>
  98. <Col id="cretno"></Col>
  99. </Row>
  100. </Rows>
  101. </Dataset>
  102. <Dataset id="ds_main_list1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  103. <ColumnInfo>
  104. <Column id="mdlcalcend" type="STRING" size="256" />
  105. </ColumnInfo>
  106. <Rows>
  107. <Row>
  108. <Col id="mdlcalcend"></Col>
  109. </Row>
  110. </Rows>
  111. </Dataset>
  112. </Objects>
  113. <Bind>
  114. <BindItem id="item0" compid="group1.ipt_judgenddd" propid="value" datasetid="ds_send" columnid="judgenddd" />
  115. </Bind>
  116. <Script type="xscript4.0"><![CDATA[function SPPIJ02200_onload(obj:Form, e:LoadEventInfo) {
  117. frmf_initForm(obj);
  118. //grdf_initGrid(grd_XXX);
  119. //grdf_setGridSort(grd_XXX);
  120. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  121. // 중간계산마감일 초기화 (default : 현재일)
  122. ds_send.setColumn( 0, "judgenddd", utlf_getCurrentDate());
  123. // 중간계산마감이력 조회
  124. // submit("TRPIJ02201");
  125. var oParam = {};
  126. oParam.id = "TRPIJ02201";
  127. oParam.service = "bfjudgapp.MdlCalcEnd";
  128. oParam.method = "reqGetMdlCalcEndList";
  129. oParam.inds = "req=ds_";
  130. oParam.outds = "ds_=mdlcalcend";
  131. oParam.async = false;
  132. oParam.callback = "cf_TRPIJ02201";
  133. tranf_submit(oParam);
  134. /*
  135. function cf_TRPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  136. if(nErrorCode < 0) return;
  137. }
  138. function cf_TRPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  139. arErrorCode.push(sSvcId, nErrorCode);
  140. }
  141. arErrorCode.pop("TRPIJ02201") > -1
  142. arErrorCode.pop("TRPIJ02201") < 0
  143. */
  144. }
  145. include '../../.._com_commonweb_js_common.js'
  146. include '../../.._com_commonweb_js_dateHelper.js'
  147. include '../../.._com_commonweb_js_tfHelper.js'
  148. function group1_btn_mdlcalcend_onclick(obj:Button, e:ClickEventInfo) {
  149. // 중간계산 마감일자 검사
  150. var judgenddd = ds_send.getColumn(0, "judgenddd");
  151. if (!utlf_isValidDateTime(judgenddd)) {
  152. sysf_messageBox("올바른 형식의 시작일자를", "C001"); // 올바른 형식의 시작일자를 입력하십시오.
  153. return;
  154. }
  155. var indd = ds_send_data1.getColumn(0, "indd");
  156. var dateDif = utlf_getDateInterval(indd, judgenddd); // (dateHelper.js) 두 일자사이의 차를 일단위로 반환
  157. if (dateDif < 0) {
  158. sysf_messageBox("마감일자가 입원일자 보다 이전", "E008");
  159. return;
  160. }
  161. if (sysf_messageBox("중간계산 마감을", "Q004") != 6) {
  162. return;
  163. }
  164. ds_send_data2.clearData();
  165. dsf_makeValue( ds_send, "data2", "string", "" );
  166. dsf_makeValue( ds_send_data2, "pid", "string", ds_send_data1.getColumn(0, "pid"));
  167. dsf_makeValue( ds_send_data2, "indd", "string", indd);
  168. dsf_makeValue( ds_send_data2, "cretno", "string", ds_send_data1.getColumn(0, "cretno"));
  169. dsf_makeValue( ds_send_data2, "judgenddd", "string", judgenddd);
  170. // 중간계산마감 수행
  171. // if (submit("TXPIJ02201")) {
  172. var oParam = {};
  173. oParam.id = "TXPIJ02201";
  174. oParam.service = "bfjudgapp.MdlCalcEnd";
  175. oParam.method = "reqInsertMdlCalcEnd";
  176. oParam.inds = "req=ds_";
  177. oParam.outds = "";
  178. oParam.async = false;
  179. oParam.callback = "cf_TXPIJ02201";
  180. tranf_submit(oParam);
  181. /*
  182. function cf_TXPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  183. if(nErrorCode < 0) return;
  184. }
  185. function cf_TXPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  186. arErrorCode.push(sSvcId, nErrorCode);
  187. }
  188. arErrorCode.pop("TXPIJ02201") > -1
  189. arErrorCode.pop("TXPIJ02201") < 0
  190. */
  191. // 다시 조회한다.
  192. // submit("TRPIJ02201");
  193. var oParam = {};
  194. oParam.id = "TRPIJ02201";
  195. oParam.service = "bfjudgapp.MdlCalcEnd";
  196. oParam.method = "reqGetMdlCalcEndList";
  197. oParam.inds = "req=ds_";
  198. oParam.outds = "ds_=mdlcalcend";
  199. oParam.async = false;
  200. oParam.callback = "cf_TRPIJ02201";
  201. tranf_submit(oParam);
  202. /*
  203. function cf_TRPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  204. if(nErrorCode < 0) return;
  205. }
  206. function cf_TRPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  207. arErrorCode.push(sSvcId, nErrorCode);
  208. }
  209. arErrorCode.pop("TRPIJ02201") > -1
  210. arErrorCode.pop("TRPIJ02201") < 0
  211. */
  212. }
  213. }
  214. function group1_btn_mdlcalccancel_onclick(obj:Button, e:ClickEventInfo) {
  215. // 선택된 row 가 있는지 체크
  216. var status = false;
  217. for (var i = 1; i < group1.grd_mdlcalcend.rows; i++) {
  218. var chk = ds_main_list1_mdlcalcend.getColumn(i, "chk");
  219. if (chk == "true") {
  220. status = true;
  221. i = group1.grd_mdlcalcend.rows;
  222. }
  223. }
  224. // 선택된 row 가 없는 경우 메세지 처리
  225. if (status == false) {
  226. sysf_messageBox("마감을 취소할 데이터가 선택되지", "E007");
  227. return;
  228. }
  229. // 선택된 row 의 마감이력을 삭제한다.
  230. if (sysf_messageBox("마감취소를", "Q003") != 6) {
  231. return;
  232. }
  233. ds_send_data3.clearData();
  234. dsf_makeValue( ds_send, "data3", "string", "" );
  235. var idx = 1;
  236. for (var j = 1; j < group1.grd_mdlcalcend.rows; j++) {
  237. var chk = ds_main_list1_mdlcalcend.getColumn(j, "chk");
  238. if (chk == "true") {
  239. ds_send_data3_mdlcalcend.setColumn( idx, "pid", ds_main_list1_mdlcalcend.getColumn(j, "pid"));
  240. ds_send_data3_mdlcalcend.setColumn( idx, "indd", ds_main_list1_mdlcalcend.getColumn(j, "indd"));
  241. ds_send_data3_mdlcalcend.setColumn( idx, "cretno", ds_main_list1_mdlcalcend.getColumn(j, "cretno"));
  242. ds_send_data3_mdlcalcend.setColumn( idx, "judgenddd", ds_main_list1_mdlcalcend.getColumn(j, "judgenddd"));
  243. idx++;
  244. }
  245. }
  246. // if (submit("TXPIJ02202")) {
  247. var oParam = {};
  248. oParam.id = "TXPIJ02202";
  249. oParam.service = "bfjudgapp.MdlCalcEnd";
  250. oParam.method = "reqCancelMdlCalcEndList";
  251. oParam.inds = "req=ds_";
  252. oParam.outds = "";
  253. oParam.async = false;
  254. oParam.callback = "cf_TXPIJ02202";
  255. tranf_submit(oParam);
  256. /*
  257. function cf_TXPIJ02202(sSvcId, nErrorCode, sErrorMsg) {
  258. if(nErrorCode < 0) return;
  259. }
  260. function cf_TXPIJ02202(sSvcId, nErrorCode, sErrorMsg) {
  261. arErrorCode.push(sSvcId, nErrorCode);
  262. }
  263. arErrorCode.pop("TXPIJ02202") > -1
  264. arErrorCode.pop("TXPIJ02202") < 0
  265. */
  266. // 다시 조회한다.
  267. // submit("TRPIJ02201");
  268. var oParam = {};
  269. oParam.id = "TRPIJ02201";
  270. oParam.service = "bfjudgapp.MdlCalcEnd";
  271. oParam.method = "reqGetMdlCalcEndList";
  272. oParam.inds = "req=ds_";
  273. oParam.outds = "ds_=mdlcalcend";
  274. oParam.async = false;
  275. oParam.callback = "cf_TRPIJ02201";
  276. tranf_submit(oParam);
  277. /*
  278. function cf_TRPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  279. if(nErrorCode < 0) return;
  280. }
  281. function cf_TRPIJ02201(sSvcId, nErrorCode, sErrorMsg) {
  282. arErrorCode.push(sSvcId, nErrorCode);
  283. }
  284. arErrorCode.pop("TRPIJ02201") > -1
  285. arErrorCode.pop("TRPIJ02201") < 0
  286. */
  287. }
  288. }
  289. function btn_close_onclick(obj:Button, e:ClickEventInfo) {
  290. window.close();
  291. }
  292. ]]></Script>
  293. </Form>
  294. </FDL>