SMRSO20500_월마감(부서재고)(경북대).xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSO20500" position="absolute 0 0 745 495" titletext="월마감(부서재고)" oninit="SMRSO20500_oninit" onload="SMRSO20500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="월마감(부서재고)" class="tit_1" position="absolute 0 0 230 25"/>
  8. <Button id="btn_distriendY" taborder="1" text="물류마감작업" class="btn4" visible="false" position="absolute 128 27 232 49" anchor="left top" onclick="btn_distriendY_onclick"/>
  9. <Button id="btn_distriendN" taborder="2" text="물류마감취소" class="btn4" visible="false" position="absolute 233 27 337 49" anchor="left top" onclick="btn_distriendN_onclick"/>
  10. <Button id="btn_exec" taborder="3" text="실행" class="btn4" position="absolute 338 27 394 49" anchor="left top" onclick="btn_exec_onclick"/>
  11. <Shape id="line1" class="line_10" position="absolute 0 89 400 95" anchor="left top"/>
  12. <Static id="caption1" text="부서재고 월마감 작업" class="tit_2" position="absolute 0 73 180 95" anchor="left top"/>
  13. <Shape id="line2" class="line_1" position="absolute 0 194 400 200" anchor="left top"/>
  14. <Static id="caption26" text="부 서" class="cell_1" position="absolute 0 146 110 169" anchor="left top"/>
  15. <Shape id="line4" class="line_2" position="absolute 0 142 400 148" anchor="left top" onclick="line4_onclick"/>
  16. <Shape id="line5" class="line_2" position="absolute 0 168 400 174" anchor="left top"/>
  17. <Static id="cap_purccondd" text="기관코드" class="cell_1" position="absolute 0 94 110 117" anchor="left top"/>
  18. <Static id="caption5" text="마감년월" class="cell_1" position="absolute 0 120 110 143"/>
  19. <Static id="cap_concmpycd1" text="작업구분" class="cell_1" position="absolute 0 172 110 195" anchor="left top"/>
  20. <Shape id="line10" class="line_2" position="absolute 0 116 400 122" anchor="left top"/>
  21. <Combo id="cmb_instcd" taborder="4" innerdataset="@ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 112 96 255 115" anchor="left top"/>
  22. <Calendar id="ipt_endmonth" taborder="5" position="absolute 112 122 255 141" mask="yyyy-mm" autoselect="true" autoskip="true" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" onchanged="ipt_endmonth_onchanged"/>
  23. <Radio id="rdo_workyn" taborder="6" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 114 174 259 194" anchor="left top">
  24. <Dataset id="innerdataset">
  25. <ColumnInfo>
  26. <Column id="codecolumn"/>
  27. <Column id="datacolumn"/>
  28. </ColumnInfo>
  29. <Rows>
  30. <Row>
  31. <Col id="codecolumn">Y</Col>
  32. <Col id="datacolumn">마감작업</Col>
  33. </Row>
  34. <Row>
  35. <Col id="codecolumn">N</Col>
  36. <Col id="datacolumn">마감취소</Col>
  37. </Row>
  38. </Rows>
  39. </Dataset>
  40. </Radio>
  41. <Edit id="ipt_deptcd" taborder="7" class="input_default" position="absolute 112 148 182 167" anchor="left top" autoselect="true" autoskip="true" onkeydown="ipt_deptcd_onkeydown"/>
  42. <Edit id="opt_deptnm" taborder="8" readonly="true" position="absolute 202 148 390 167" anchor="left top" class="output" onsetfocus="opt_deptnm_onsetfocus"/>
  43. <Button id="btn_deptcd" taborder="9" class="icon_search" position="absolute 184 150 200 166" anchor="left top" onclick="btn_deptcd_onclick"/>
  44. <Grid id="grd_magam" taborder="10" binddataset="ds_main_magam_magamlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 410 50 740 490" anchor="all" visible="false">
  45. <Formats>
  46. <Format id="default">
  47. <Columns>
  48. <Column size="23"/>
  49. <Column size="184"/>
  50. <Column size="100"/>
  51. </Columns>
  52. <Rows>
  53. <Row size="24" band="head"/>
  54. <Row size="24"/>
  55. </Rows>
  56. <Band id="head">
  57. <Cell/>
  58. <Cell col="1" text="부서"/>
  59. <Cell col="2" text="마감여부"/>
  60. </Band>
  61. <Band id="body">
  62. <Cell celltype="head" expr="currow+1"/>
  63. <Cell col="1" style="background:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');background2:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');" text="bind:deptnm"/>
  64. <Cell col="2" style="background:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');background2:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');" text="bind:magamyn"/>
  65. </Band>
  66. </Format>
  67. </Formats>
  68. </Grid>
  69. <Static id="cap_magam" position="absolute 5 205 400 235"/>
  70. </Layout>
  71. </Layouts>
  72. <Objects>
  73. <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  74. <ColumnInfo>
  75. <Column id="instcd" type="STRING" size="256"/>
  76. <Column id="endmonth" type="STRING" size="256"/>
  77. <Column id="deptcd" type="STRING" size="256"/>
  78. <Column id="deptnm" type="STRING" size="256"/>
  79. <Column id="workyn" type="STRING" size="256"/>
  80. <Column id="endyn" type="STRING" size="256"/>
  81. </ColumnInfo>
  82. <Rows>
  83. <Row>
  84. <Col id="instcd"/>
  85. <Col id="endmonth"/>
  86. <Col id="deptcd"/>
  87. <Col id="deptnm"/>
  88. <Col id="workyn"/>
  89. <Col id="endyn"/>
  90. </Row>
  91. </Rows>
  92. </Dataset>
  93. <Dataset id="ds_main_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  94. <ColumnInfo>
  95. <Column id="cnstnm" type="STRING" size="256"/>
  96. <Column id="cnstcd" type="STRING" size="256"/>
  97. </ColumnInfo>
  98. </Dataset>
  99. <Dataset id="ds_main_magam_magamlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  100. <ColumnInfo>
  101. <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
  102. <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
  103. <Column id="magamyn" type="STRING" size="256" sumtext="마감여부"/>
  104. </ColumnInfo>
  105. </Dataset>
  106. <Dataset id="ds_send_magamsearch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  107. <ColumnInfo>
  108. <Column id="instcd" type="STRING" size="256"/>
  109. <Column id="dd" type="STRING" size="256"/>
  110. <Column id="deptcd" type="STRING" size="256"/>
  111. </ColumnInfo>
  112. <Rows>
  113. <Row>
  114. <Col id="instcd"/>
  115. <Col id="dd"/>
  116. <Col id="deptcd"/>
  117. </Row>
  118. </Rows>
  119. </Dataset>
  120. <Dataset id="ds_distrimagam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  121. <ColumnInfo>
  122. <Column id="endyn" type="STRING" size="256" sumtext="마감여부"/>
  123. </ColumnInfo>
  124. </Dataset>
  125. <Dataset id="ds_magam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  126. <ColumnInfo>
  127. <Column id="magamyn" type="STRING" size="256"/>
  128. </ColumnInfo>
  129. </Dataset>
  130. </Objects>
  131. <Bind>
  132. <BindItem id="item0" compid="cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
  133. <BindItem id="item1" compid="ipt_endmonth" propid="value" datasetid="ds_send_search" columnid="endmonth"/>
  134. <BindItem id="item2" compid="ipt_deptcd" propid="value" datasetid="ds_send_search" columnid="deptcd"/>
  135. <BindItem id="item3" compid="opt_deptnm" propid="value" datasetid="ds_send_search" columnid="deptnm"/>
  136. <BindItem id="item4" compid="rdo_workyn" propid="value" datasetid="ds_send_search" columnid="workyn"/>
  137. </Bind>
  138. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  139. * System Name :
  140. * Job Name :
  141. * Creator :
  142. * Make Date : 2017-06-19
  143. * Description :
  144. *---------------------------------------------------------------------------------------
  145. * Modify Date Modifier Modify Description
  146. *---------------------------------------------------------------------------------------
  147. * 2017-06-19 Live Converter TF->XP
  148. *
  149. *---------------------------------------------------------------------------------------
  150. ****************************************************************************************/
  151. include "com_commonxp::comm_main.xjs";
  152. include "mis_miscommonxp::MIS.xjs";
  153. function SMRSO20500_oninit(obj:Form, e:InitEventInfo)
  154. {
  155. frmf_initForm(obj);
  156. }
  157. function SMRSO20500_onload(obj:Form, e:LoadEventInfo)
  158. {
  159. grdf_initGrid(grd_magam);
  160. misfComboInstCdListMulti("cmb_instcd",utlf_getCurrentDate(),"","N");
  161. misfGridInit(grd_magam);
  162. misfGetAndSetUserInfo();
  163. ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  164. ds_send_search.setColumn(0, "endmonth", String(utlf_getCurrentDate()).substr(0,6));
  165. ds_send_search.setColumn(0, "workyn", "Y");
  166. ds_send_search.setColumn(0, "deptcd", DUT_PLCEDEPT_CD);
  167. ds_send_search.setColumn(0, "deptnm", DUT_PLCEDEPT_NM);
  168. if(DUT_PLCEDEPT_CD == "4020334000")
  169. {
  170. btn_distriendY.visible = true;
  171. btn_distriendN.visible = true;
  172. }
  173. else
  174. {
  175. btn_distriendY.visible = false;
  176. btn_distriendN.visible = false;
  177. }
  178. ds_send_magamsearch.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  179. ds_send_magamsearch.setColumn(0, "dd", String(utlf_getCurrentDate()).substr(0,6));
  180. ds_send_magamsearch.setColumn(0, "deptcd", DUT_PLCEDEPT_CD);
  181. reMagamYN();
  182. reEndDeptList();
  183. }
  184. var distriyn = "N";
  185. function reMagamYN()
  186. {
  187. cap_magam.value = "";
  188. var oParam = {};
  189. oParam.id = "TRRSO21003";
  190. oParam.service = "deliveapp.DeliveMngt";
  191. oParam.method = "reqGetDistriDeptJaegoMagamChk";
  192. oParam.inds = "req=ds_send_magamsearch";
  193. oParam.outds = "ds_distrimagam=distrimagam";
  194. oParam.async = false;
  195. oParam.callback = "cf_TRRSO21003";
  196. tranf_submit(oParam);
  197. }
  198. function cf_TRRSO21003(sSvcId, nErrorCode, sErrorMsg)
  199. {
  200. if(nErrorCode < 0)
  201. {
  202. return;
  203. }
  204. else
  205. {
  206. var endyn = ds_distrimagam.getColumn(0, "endyn");
  207. if(endyn == "Y")
  208. {
  209. cap_magam.value = "물류마감이 되어있습니다.";
  210. btn_distriendY.enable = false;
  211. btn_distriendN.enable = true;
  212. btn_exec.enable = false;
  213. distriyn = "Y";
  214. }
  215. else
  216. {
  217. cap_magam.value = "";
  218. btn_distriendY.enable = true;
  219. btn_distriendN.enable = false;
  220. btn_exec.enable = true;
  221. distriyn = "N";
  222. var oParam = {};
  223. oParam.id = "TRRSO21002";
  224. oParam.service = "deliveapp.DeliveMngt";
  225. oParam.method = "reqGetDeptJaegoMagamChk";
  226. oParam.inds = "req=ds_send_magamsearch";
  227. oParam.outds = "ds_magam=magam";
  228. oParam.async = false;
  229. oParam.callback = "cf_TRRSO21002";
  230. tranf_submit(oParam);
  231. }
  232. }
  233. }
  234. function cf_TRRSO21002(sSvcId, nErrorCode, sErrorMsg)
  235. {
  236. if(nErrorCode < 0)
  237. {
  238. return;
  239. }
  240. else
  241. {
  242. var magamyn = ds_magam.getColumn(0, "magamyn");
  243. if(magamyn == "Y")
  244. {
  245. cap_magam.value = "해당부서는 현재 마감되어있습니다.";
  246. rdo_workyn.value = "N"
  247. }
  248. else
  249. {
  250. cap_magam.value = "";
  251. rdo_workyn.value = "Y"
  252. }
  253. }
  254. }
  255. function reEndDeptList()
  256. {
  257. var oParam = {};
  258. oParam.id = "TRRSO20502";
  259. oParam.service = "deliveapp.DeliveMngt";
  260. oParam.method = "reqGetDeptMagamYN";
  261. oParam.inds = "req=ds_send_search";
  262. oParam.outds = "ds_main_magam_magamlist=magamlist";
  263. oParam.async = false;
  264. //oParam.callback = "cf_TRRSO20502";
  265. tranf_submit(oParam);
  266. }
  267. function ipt_endmonth_onchanged(obj:Calendar, e:ChangeEventInfo)
  268. {
  269. var date = String(obj.value).substr(0, 6);
  270. ds_send_search.setColumn(0, "endmonth", date);
  271. ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
  272. ds_send_magamsearch.setColumn(0, "dd", date);
  273. ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
  274. reMagamYN();
  275. reEndDeptList();
  276. }
  277. function btn_deptcd_onclick(obj:Button, e:ClickEventInfo)
  278. {
  279. var recv_list = "deptcd,deptnm";
  280. misfOpenPopUpList("02", ds_send_search,"", recv_list) ;
  281. if(distriyn == "Y")
  282. {
  283. return;
  284. }
  285. if(!utlf_isNull(opt_deptnm.value))
  286. {
  287. ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
  288. ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
  289. ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
  290. var oParam = {};
  291. oParam.id = "TRRSO21002";
  292. oParam.service = "deliveapp.DeliveMngt";
  293. oParam.method = "reqGetDeptJaegoMagamChk";
  294. oParam.inds = "req=ds_send_magamsearch";
  295. oParam.outds = "ds_magam=magam";
  296. oParam.async = false;
  297. oParam.callback = "cf_TRRSO21002";
  298. tranf_submit(oParam);
  299. }
  300. }
  301. function opt_deptnm_onsetfocus(obj:Edit, e:SetFocusEventInfo)
  302. {
  303. misfValidationCheck("02", "", "deptcd,deptnm" );
  304. if(distriyn == "Y")
  305. {
  306. return;
  307. }
  308. if(!utlf_isNull(opt_deptnm.value))
  309. {
  310. ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
  311. ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
  312. ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
  313. var oParam = {};
  314. oParam.id = "TRRSO21002";
  315. oParam.service = "deliveapp.DeliveMngt";
  316. oParam.method = "reqGetDeptJaegoMagamChk";
  317. oParam.inds = "req=ds_send_magamsearch";
  318. oParam.outds = "ds_magam=magam";
  319. oParam.async = false;
  320. oParam.callback = "cf_TRRSO21002";
  321. tranf_submit(oParam);
  322. }
  323. }
  324. function btn_distriendY_onclick(obj:Button, e:ClickEventInfo)
  325. {
  326. if(String(ipt_endmonth.value).length < 6)
  327. {
  328. sysf_messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
  329. ipt_endmonth.setFocus();
  330. return;
  331. }
  332. ds_send_search.setColumn(0, "endyn", "Y");
  333. var oParam = {};
  334. oParam.id = "TXRSO20502";
  335. oParam.service = "deliveapp.DeliveMngt";
  336. oParam.method = "reqExeDistriMagamDept";
  337. oParam.inds = "req=ds_send_search";
  338. oParam.outds = "";
  339. oParam.async = false;
  340. oParam.callback = "cf_TXRSO20502";
  341. tranf_submit(oParam);
  342. }
  343. function cf_TXRSO20502(sSvcId, nErrorCode, sErrorMsg)
  344. {
  345. if(nErrorCode < 0)
  346. {
  347. return;
  348. }
  349. else
  350. {
  351. var oParam = {};
  352. oParam.id = "TRRSO21003";
  353. oParam.service = "deliveapp.DeliveMngt";
  354. oParam.method = "reqGetDistriDeptJaegoMagamChk";
  355. oParam.inds = "req=ds_send_magamsearch";
  356. oParam.outds = "ds_distrimagam=distrimagam";
  357. oParam.async = false;
  358. oParam.callback = "cf_TRRSO21003";
  359. tranf_submit(oParam);
  360. }
  361. }
  362. function btn_distriendN_onclick(obj:Button, e:ClickEventInfo)
  363. {
  364. if(String(ipt_endmonth.value).length < 6)
  365. {
  366. sysf_messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
  367. ipt_endmonth.setFocus();
  368. return;
  369. }
  370. ds_send_search.setColumn(0, "endyn", "N");
  371. var oParam = {};
  372. oParam.id = "TXRSO20502";
  373. oParam.service = "deliveapp.DeliveMngt";
  374. oParam.method = "reqExeDistriMagamDept";
  375. oParam.inds = "req=ds_send_search";
  376. oParam.outds = "";
  377. oParam.async = false;
  378. oParam.callback = "cf_TXRSO20502";
  379. tranf_submit(oParam);
  380. }
  381. function btn_exec_onclick(obj:Button, e:ClickEventInfo)
  382. {
  383. if(String(ipt_endmonth.value).length < 6)
  384. {
  385. sysf_messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
  386. ipt_endmonth.setFocus();
  387. return;
  388. }
  389. if(utlf_isNull(ipt_deptcd.value))
  390. {
  391. sysf_messageBox("부서가 선택되지 않았습니다. \n\n부서를 선택하십시요.", "E999", "");
  392. ipt_deptcd.setFocus();
  393. return;
  394. }
  395. if(distriyn = "N")
  396. {
  397. var oParam = {};
  398. oParam.id = "TXRSO20501";
  399. oParam.service = "deliveapp.DeliveMngt";
  400. oParam.method = "reqExeMagamDept";
  401. oParam.inds = "req=ds_send_search";
  402. oParam.outds = "";
  403. oParam.async = false;
  404. oParam.callback = "cf_TXRSO20501";
  405. tranf_submit(oParam);
  406. }
  407. }
  408. function cf_TXRSO20501(sSvcId, nErrorCode, sErrorMsg)
  409. {
  410. if(nErrorCode < 0)
  411. {
  412. return;
  413. }
  414. else
  415. {
  416. ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
  417. ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
  418. ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
  419. reMagamYN();
  420. reEndDeptList();
  421. }
  422. }
  423. function ipt_deptcd_onkeydown(obj:Edit, e:KeyEventInfo)
  424. {
  425. if(e.keycode == 13)
  426. {
  427. obj.updateToDataset();
  428. misfValidationCheck("02", "", "deptcd,deptnm" );
  429. if(distriyn == "Y")
  430. {
  431. return;
  432. }
  433. if(!utlf_isNull(opt_deptnm.value))
  434. {
  435. ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
  436. ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
  437. ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
  438. var oParam = {};
  439. oParam.id = "TRRSO21002";
  440. oParam.service = "deliveapp.DeliveMngt";
  441. oParam.method = "reqGetDeptJaegoMagamChk";
  442. oParam.inds = "req=ds_send_magamsearch";
  443. oParam.outds = "ds_magam=magam";
  444. oParam.async = false;
  445. oParam.callback = "cf_TRRSO21002";
  446. tranf_submit(oParam);
  447. }
  448. }
  449. }
  450. ]]></Script>
  451. </Form>
  452. </FDL>