SMRFC00402_재물대상품목관리.xfdl 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRFC00402" position="absolute 0 0 1193 800" titletext="부서별 대상품목 관리(재물조사)" oninit="SMRFC00402_oninit" onload="SMRFC00402_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="부서별 대상품목 관리" class="tit_1" position="absolute 0 0 164 25"/>
  8. <Shape id="line16" class="line_2" position="absolute 0 44 1185 50" anchor="left top right"/>
  9. <Button id="btn_clear" taborder="1" text="초기화" class="btn4" visible="false" position="absolute 740 23 808 45" anchor="top right" onclick="btn_clear_onclick"/>
  10. <Button id="btn_cancel" taborder="2" text="승인취소" class="btn2" position="absolute 894 23 974 45" anchor="top right" onclick="btn_cancel_onclick"/>
  11. <Button id="btn_deptaprv" taborder="3" text="부서장승인&amp;최종제출" class="btn2" position="absolute 976 23 1128 45" anchor="top right" onclick="btn_deptaprv_onclick"/>
  12. <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1130 23 1186 45" anchor="top right" onclick="btn_save_onclick"/>
  13. <Div id="grp_sea" anchor="left top right" taborder="5" class="div_SA2" position="absolute 0 48 1185 88">
  14. <Layouts>
  15. <Layout>
  16. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1107 6 1113 31" anchor="top right"/>
  17. <Static id="cap_instcd" text="기관코드 :" class="search_name" position="absolute 15 11 101 28"/>
  18. <Combo id="cmb_instcd" taborder="7" class="combo_essential" enable="false" position="absolute 98 10 275 29" onitemchanged="grp_sea_cmb_instcd_onitemchanged"/>
  19. <Edit id="ipt_yyyy" taborder="8" class="input_search" position="absolute 445 10 550 29" autoselect="true" autoskip="true" maxlength="4" style="align:center middle;"/>
  20. <Static id="cap_dept031" text="사용부서 :" class="search_name" position="absolute 698 11 782 28"/>
  21. <Edit id="ipt_mngtdeptcd_search" taborder="9" enable="true" position="absolute 780 10 875 29" autoselect="true" autoskip="true"/>
  22. <Button id="btn_mngtdeptcd_search" taborder="10" class="icon_search" position="absolute 878 12 894 28" onclick="grp_sea_btn_mngtdeptcd_search_onclick" enable="true"/>
  23. <Edit id="ipt_mngtdeptnm_search" taborder="11" position="absolute 897 10 1047 29" class="output" readonly="true"/>
  24. <Button id="btn_search" taborder="12" text="조회" class="btn1" position="absolute 1120 8 1176 30" anchor="top right" onclick="grp_sea_btn_search_onclick"/>
  25. <Static id="caption5" text="기준년도 :" class="search_name" position="absolute 363 11 449 28"/>
  26. <Button id="btn_next" taborder="13" position="absolute 574 12 589 27" class="icon_next" onclick="grp_sea_btn_next_onclick"/>
  27. <Button id="btn_before" taborder="14" class="icon_pre" position="absolute 558 12 573 27" onclick="grp_sea_btn_before_onclick"/>
  28. <Static id="cap_dept032" text="설치장소 :" class="search_name" position="absolute 698 11 782 28"/>
  29. </Layout>
  30. </Layouts>
  31. </Div>
  32. <Static id="caption11" text="재물조사 정보" class="tit_2" position="absolute 0 103 205 126" onclick="caption11_onclick"/>
  33. <Div id="group1" taborder="6" style="background:#fffbf2ff;border:1 solid #ffd799ff ;" position="absolute 0 123 1185 183" anchor="left top right">
  34. <Layouts>
  35. <Layout>
  36. <Static id="caption12" text="부서 확인기간 :" class="cell_1" position="absolute 225 4 330 27"/>
  37. <MaskEdit id="input8" taborder="9" mask="####-##-##" maskchar=" " enable="false" position="absolute 333 5 438 24" style=":disabled {align:center middle;}" type="string" trimtype="both" displaynulltext=" " autoselect="true"/>
  38. <MaskEdit id="input9" taborder="10" mask="####-##-##" maskchar=" " enable="false" position="absolute 457 5 562 24" style=":disabled {align:center middle;}" type="string" trimtype="both" displaynulltext=" " autoselect="true"/>
  39. <Static id="caption13" text="기준일자 :" class="cell_1" position="absolute 10 4 100 27"/>
  40. <Edit id="input10" taborder="11" enable="false" position="absolute 103 5 195 24" style=":disabled {align:center middle;}" autoselect="true"/>
  41. <Static id="caption14" text="사용여부 :" class="cell_1" position="absolute 590 30 670 53" visible="false"/>
  42. <Edit id="input11" taborder="12" enable="false" position="absolute 673 32 718 51" style=":disabled {align:center middle;}" visible="false" autoselect="true"/>
  43. <Static id="caption16" text="~" position="absolute 442 6 462 26"/>
  44. <Static id="caption1" text="부서장 승인자명 :" class="cell_1" position="absolute 590 4 703 27"/>
  45. <Static id="caption2" text="최종제출일자 :" class="cell_1" position="absolute 817 4 922 27"/>
  46. <Edit id="input1" taborder="13" enable="false" position="absolute 706 5 796 24" autoselect="true"/>
  47. <MaskEdit id="input2" taborder="14" mask="####-##-##" maskchar=" " enable="false" position="absolute 925 6 1010 25" style=":disabled {align:center middle;}" type="string" trimtype="both" autoselect="true" displaynulltext=" "/>
  48. <MaskEdit id="input3" taborder="15" mask="#,###" enable="false" position="absolute 104 32 209 51" style=":disabled {align:center middle;}" autoselect="true"/>
  49. <MaskEdit id="input4" taborder="16" mask="#,###" enable="false" position="absolute 228 32 333 51" style=":disabled {align:center middle;}" autoselect="true"/>
  50. <Static id="caption4" text="~" position="absolute 213 33 233 53"/>
  51. <Static id="caption3" text="기준금액 :" class="cell_1" position="absolute 10 31 100 54"/>
  52. </Layout>
  53. </Layouts>
  54. </Div>
  55. <Button id="button4" taborder="7" text="엑셀저장" class="btn7" position="absolute 1105 203 1185 222" anchor="top right" onclick="button4_onclick"/>
  56. <Shape id="line3" class="line_10" position="absolute 0 222 1185 228" anchor="left top right"/>
  57. <Grid id="grd_degolist" taborder="8" binddataset="ds_main_grid_degolist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 227 1185 790" anchor="all">
  58. <Formats>
  59. <Format id="default">
  60. <Columns>
  61. <Column size="22" band="left"/>
  62. <Column size="0"/>
  63. <Column size="100"/>
  64. <Column size="100"/>
  65. <Column size="216"/>
  66. <Column size="131"/>
  67. <Column size="35"/>
  68. <Column size="75"/>
  69. <Column size="70"/>
  70. <Column size="75"/>
  71. <Column size="60"/>
  72. <Column size="115"/>
  73. <Column size="90"/>
  74. <Column size="90"/>
  75. <Column size="0"/>
  76. <Column size="0"/>
  77. <Column size="0"/>
  78. <Column size="0"/>
  79. <Column size="0"/>
  80. <Column size="0"/>
  81. <Column size="0"/>
  82. <Column size="0"/>
  83. <Column size="0"/>
  84. <Column size="0"/>
  85. </Columns>
  86. <Rows>
  87. <Row size="24" band="head"/>
  88. <Row size="24"/>
  89. </Rows>
  90. <Band id="head">
  91. <Cell/>
  92. <Cell col="1" text="계정과목"/>
  93. <Cell col="2" text="계정과목"/>
  94. <Cell col="3" text="자산코드"/>
  95. <Cell col="4" text="자산명"/>
  96. <Cell col="5" text="규격"/>
  97. <Cell col="6" text="수량"/>
  98. <Cell col="7" text="취득금액"/>
  99. <Cell col="8" text="취득일"/>
  100. <Cell col="9" text="잔존가"/>
  101. <Cell col="10" text="보유상태"/>
  102. <Cell col="11" text="부서비고"/>
  103. <Cell col="12" text="사용부서"/>
  104. <Cell col="13" text="설치부서"/>
  105. <Cell col="14" text="년도"/>
  106. <Cell col="15" text="기준일자"/>
  107. <Cell col="16" text="부서확인(fromdd)"/>
  108. <Cell col="17" text="부서확인(todd)"/>
  109. <Cell col="18" text="사용여부"/>
  110. <Cell col="19" text="기준금액(min)"/>
  111. <Cell col="20" text="기준금액(max)"/>
  112. <Cell col="21" text="사용부서코드"/>
  113. <Cell col="22" text="부서장승인자명"/>
  114. <Cell col="23" text="최종제출일자"/>
  115. </Band>
  116. <Band id="body">
  117. <Cell celltype="head"/>
  118. <Cell col="1" text="bind:acntcd"/>
  119. <Cell col="2" style="align:left top;padding:4 2 2 2;" text="bind:acntnm" wordwrap="word"/>
  120. <Cell col="3" text="bind:fixasetcd"/>
  121. <Cell col="4" style="align:left;" text="bind:goodflaghngnm"/>
  122. <Cell col="5" style="align:left;" text="bind:goodspec"/>
  123. <Cell col="6" text="bind:goodqty"/>
  124. <Cell col="7" displaytype="number" text="bind:possnamt"/>
  125. <Cell col="8" displaytype="date" text="bind:possndd" calendardisplaynulltype="nulltext"/>
  126. <Cell col="9" displaytype="number" text="bind:janjonsak"/>
  127. <Cell col="10" displaytype="combo" edittype="combo" style="align:center middle;background:#c4e693ff;" text="bind:status" combodataset="ds_cmb_status" combocodecol="value" combodatacol="label"/>
  128. <Cell col="11" displaytype="text" edittype="text" style="background:#c4e693ff;" text="bind:remark"/>
  129. <Cell col="12" text="bind:mngtdeptnm"/>
  130. <Cell col="13" text="bind:installplcenm"/>
  131. <Cell col="14" text="bind:yyyy"/>
  132. <Cell col="15" text="bind:basedd"/>
  133. <Cell col="16" text="bind:dfromdd"/>
  134. <Cell col="17" text="bind:dtodd"/>
  135. <Cell col="18" text="bind:useyn"/>
  136. <Cell col="19" text="bind:passnmin"/>
  137. <Cell col="20" text="bind:passnmax"/>
  138. <Cell col="21" text="bind:mngtdeptcd"/>
  139. <Cell col="22" text="bind:deptaprvnm"/>
  140. <Cell col="23" text="bind:senddd"/>
  141. </Band>
  142. </Format>
  143. </Formats>
  144. </Grid>
  145. <Static id="caption10" text="부서별 대상품목 리스트" class="tit_2" position="absolute 0 206 205 227"/>
  146. </Layout>
  147. </Layouts>
  148. <Objects>
  149. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_oncolumnchanged">
  150. <ColumnInfo>
  151. <Column id="instcd" type="STRING" size="256"/>
  152. <Column id="yyyy" type="STRING" size="256"/>
  153. <Column id="mngtdeptcd_search" type="STRING" size="256"/>
  154. <Column id="mngtdeptnm_search" type="STRING" size="256"/>
  155. <Column id="dfromdd" type="STRING" size="256"/>
  156. <Column id="dtodd" type="STRING" size="256"/>
  157. <Column id="basedd" type="STRING" size="256"/>
  158. <Column id="useyn" type="STRING" size="256"/>
  159. <Column id="deptaprvnm" type="STRING" size="256"/>
  160. <Column id="senddd" type="STRING" size="256"/>
  161. <Column id="passnmin" type="STRING" size="256"/>
  162. <Column id="passnmax" type="STRING" size="256"/>
  163. </ColumnInfo>
  164. <Rows>
  165. <Row>
  166. <Col id="instcd"/>
  167. <Col id="yyyy"/>
  168. <Col id="mngtdeptcd_search"/>
  169. <Col id="mngtdeptnm_search"/>
  170. <Col id="dfromdd"/>
  171. <Col id="dtodd"/>
  172. <Col id="basedd"/>
  173. <Col id="useyn"/>
  174. <Col id="deptaprvnm"/>
  175. <Col id="senddd"/>
  176. <Col id="passnmin"/>
  177. <Col id="passnmax"/>
  178. </Row>
  179. </Rows>
  180. </Dataset>
  181. <Dataset id="ds_main_grid_degolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_grid_degolist_oncolumnchanged">
  182. <ColumnInfo>
  183. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  184. <Column id="acntcd" type="STRING" size="256" sumtext="계정코드"/>
  185. <Column id="acntnm" type="STRING" size="256" sumtext="계정명"/>
  186. <Column id="fixasetcd" type="STRING" size="256" sumtext="자산코드"/>
  187. <Column id="goodflaghngnm" type="STRING" size="256" sumtext="자산명"/>
  188. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  189. <Column id="goodqty" type="STRING" size="256" sumtext="수량"/>
  190. <Column id="possnamt" type="STRING" size="256" sumtext="취득금액"/>
  191. <Column id="possndd" type="STRING" size="256" sumtext="취득일자"/>
  192. <Column id="janjonsak" type="STRING" size="256" sumtext="잔존가액"/>
  193. <Column id="status" type="STRING" size="256" sumtext="보유상태"/>
  194. <Column id="remark" type="STRING" size="256" sumtext="부서비고"/>
  195. <Column id="mngtdeptnm" type="STRING" size="256" sumtext="사용부서"/>
  196. <Column id="installplcenm" type="STRING" size="256" sumtext="설치부서"/>
  197. <Column id="yyyy" type="STRING" size="256" sumtext="년도"/>
  198. <Column id="basedd" type="STRING" size="256" sumtext="기준일자"/>
  199. <Column id="dfromdd" type="STRING" size="256" sumtext="부서확인(fromdd)"/>
  200. <Column id="dtodd" type="STRING" size="256" sumtext="부서확인(todd)"/>
  201. <Column id="useyn" type="STRING" size="256" sumtext="사용여부"/>
  202. <Column id="passnmin" type="STRING" size="256" sumtext="기준금액(min)"/>
  203. <Column id="passnmax" type="STRING" size="256" sumtext="기준금액(max)"/>
  204. <Column id="mngtdeptcd" type="STRING" size="256" sumtext="사용부서코드"/>
  205. <Column id="installplcecd" type="STRING" size="256" sumtext="설치장소코드"/>
  206. <Column id="deptaprvnm" type="STRING" size="256" sumtext="부서장승인자명"/>
  207. <Column id="senddd" type="STRING" size="256" sumtext="최종제출일자"/>
  208. <Column id="silstatus" type="STRING" size="256" sumtext="실사결과"/>
  209. <Column id="silcmt" type="STRING" size="256" sumtext="실사비고"/>
  210. </ColumnInfo>
  211. </Dataset>
  212. <Dataset id="ds_cmb_status" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  213. <ColumnInfo>
  214. <Column id="label" type="STRING" size="256"/>
  215. <Column id="value" type="STRING" size="256"/>
  216. </ColumnInfo>
  217. <Rows>
  218. <Row>
  219. <Col id="label">보유</Col>
  220. <Col id="value">1</Col>
  221. </Row>
  222. <Row>
  223. <Col id="label">미보유</Col>
  224. <Col id="value">2</Col>
  225. </Row>
  226. <Row>
  227. <Col id="label">불용</Col>
  228. <Col id="value">3</Col>
  229. </Row>
  230. </Rows>
  231. </Dataset>
  232. <Dataset id="ds_temp_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  233. <ColumnInfo>
  234. <Column id="flag" type="STRING" size="256" sumtext="부서징여부"/>
  235. </ColumnInfo>
  236. </Dataset>
  237. </Objects>
  238. <Bind>
  239. <BindItem id="item0" compid="grp_sea.cmb_instcd" propid="value" datasetid="ds_send" columnid="instcd"/>
  240. <BindItem id="item1" compid="grp_sea.ipt_yyyy" propid="value" datasetid="ds_send" columnid="yyyy"/>
  241. <BindItem id="item2" compid="grp_sea.ipt_mngtdeptcd_search" propid="value" datasetid="ds_send" columnid="mngtdeptcd_search"/>
  242. <BindItem id="item3" compid="grp_sea.ipt_mngtdeptnm_search" propid="value" datasetid="ds_send" columnid="mngtdeptnm_search"/>
  243. <BindItem id="item4" compid="group1.input10" propid="value" datasetid="ds_send" columnid="basedd"/>
  244. <BindItem id="item5" compid="group1.input8" propid="value" datasetid="ds_send" columnid="dfromdd"/>
  245. <BindItem id="item6" compid="group1.input9" propid="value" datasetid="ds_send" columnid="dtodd"/>
  246. <BindItem id="item7" compid="group1.input11" propid="value" datasetid="ds_send" columnid="useyn"/>
  247. <BindItem id="item8" compid="group1.input1" propid="value" datasetid="ds_send" columnid="deptaprvnm"/>
  248. <BindItem id="item9" compid="group1.input2" propid="value" datasetid="ds_send" columnid="senddd"/>
  249. <BindItem id="item10" compid="group1.input3" propid="value" datasetid="ds_send" columnid="passnmin"/>
  250. <BindItem id="item11" compid="group1.input4" propid="value" datasetid="ds_send" columnid="passnmax"/>
  251. </Bind>
  252. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  253. * System Name :
  254. * Job Name :
  255. * Creator :
  256. * Make Date : 2017-06-19
  257. * Description :
  258. *---------------------------------------------------------------------------------------
  259. * Modify Date Modifier Modify Description
  260. *---------------------------------------------------------------------------------------
  261. * 2017-06-19 Live Converter TF->XP
  262. *
  263. *---------------------------------------------------------------------------------------
  264. ****************************************************************************************/
  265. include "com_commonxp::comm_main.xjs";
  266. include "mis_miscommonxp::MIS.xjs";
  267. var arErrorCode = new HashArray();
  268. function SMRFC00402_oninit(obj:Form, e:InitEventInfo)
  269. {
  270. frmf_initForm(obj);
  271. }
  272. function SMRFC00402_onload(obj:Form, e:LoadEventInfo)
  273. {
  274. grdf_initGrid(grd_degolist);
  275. grdf_setRowTypeIcon(grd_degolist, 0);
  276. fInitialize();
  277. }
  278. function fInitialize()
  279. {
  280. misfGridInit(grd_degolist);
  281. misfComboComCdList("C0048",grp_sea.cmb_instcd,"Y");
  282. grp_sea.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
  283. ds_send.enableevent = false;
  284. ds_send.setColumn(0, "yyyy", String(utlf_getCurrentDate()).substring(0, 4));
  285. ds_send.enableevent = true;
  286. if(sysf_getUserInfo("dutplceinstcd") == "031")
  287. {
  288. grp_sea.cap_dept031.visible = true;
  289. grp_sea.cap_dept032.visible = false;
  290. }
  291. else
  292. {
  293. grp_sea.cap_dept031.visible = false;
  294. grp_sea.cap_dept032.visible = true;
  295. }
  296. //misfMsterDetailSet(grd_degolist, null, "TRRFC00403","Y"); //마스터 설정
  297. grp_sea.ipt_mngtdeptcd_search.value = sysf_getUserInfo("dutplcecd");
  298. grp_sea.ipt_mngtdeptnm_search.value = sysf_getUserInfo("dutplcenm");
  299. grp_sea.btn_search.click();
  300. }
  301. function grp_sea_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  302. {
  303. grp_sea.btn_search.click();
  304. }
  305. function ds_send_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  306. {
  307. if(e.columnid == "yyyy")
  308. {
  309. var dd = e.newvalue;
  310. var dday = String(utlf_getCurrentDate()).substring(0, 4);
  311. if(dday != dd)
  312. {
  313. btn_deptaprv.enable = false;
  314. btn_save.enable = false;
  315. }
  316. else
  317. {
  318. Displayflag(); //버튼활성화 여부
  319. }
  320. }
  321. if(e.columnid == "mngtdeptcd_search")
  322. {
  323. grp_sea.ipt_mngtdeptcd_search.value = e.newvalue;
  324. grp_sea.ipt_mngtdeptcd_search.setFocus();
  325. misfSearchDept(grp_sea.ipt_mngtdeptnm_search);
  326. }
  327. }
  328. function Displayflag()
  329. {
  330. dsf_makeValue(ds_send, "emplno", "string", sysf_getUserInfo("userid"), 0);
  331. var oParam = {};
  332. oParam.id = "TRRFC00404";
  333. oParam.service = "purcbaseapp.PurcBaseMngt";
  334. oParam.method = "reqGetDeptaprvlist";
  335. oParam.inds = "req=ds_send";
  336. oParam.outds = "ds_temp_userinfo=userinfo";
  337. oParam.async = false;
  338. //oParam.callback = "cf_TRRFC00404";
  339. tranf_submit(oParam);
  340. var flag = ds_temp_userinfo.getColumn(0, "flag");
  341. var deptaprvnm = ds_send.getColumn(0, "deptaprvnm");
  342. var dutplcecd = sysf_getUserInfo("dutplcecd");
  343. if (utlf_isNull(deptaprvnm))
  344. {
  345. btn_save.enable = true;
  346. if(!utlf_isNull(flag) || sysf_getUserInfo("userid") == "MIS" || dutplcecd == "2240000000")
  347. {
  348. btn_deptaprv.enable = true;
  349. }
  350. else
  351. {
  352. btn_deptaprv.enable = false;
  353. }
  354. }
  355. else
  356. {
  357. btn_save.enable = false;
  358. btn_deptaprv.enable = false;
  359. }
  360. if(dutplcecd == "4020334000")
  361. {
  362. if (!utlf_isNull(deptaprvnm))
  363. {
  364. btn_cancel.enable = true;
  365. }
  366. else
  367. {
  368. btn_cancel.enable = false;
  369. }
  370. }
  371. else
  372. {
  373. btn_cancel.visible = false;
  374. }
  375. }
  376. function grp_sea_btn_before_onclick(obj:Button, e:ClickEventInfo)
  377. {
  378. var dd = ds_send.getColumn(0, "yyyy");
  379. var cvtdate = dd.toDate("YYYY");
  380. var tobasedd = cvtdate.getAddDate(-2,"Y").getDateFormat("YYYY");
  381. var dday = String(utlf_getCurrentDate()).substring(0, 4);
  382. ds_send.setColumn(0, "yyyy", tobasedd)
  383. if(dday != tobasedd)
  384. {
  385. btn_deptaprv.enable = false;
  386. btn_save.enable = false;
  387. }
  388. else
  389. {
  390. Displayflag();
  391. }
  392. }
  393. function grp_sea_btn_next_onclick(obj:Button, e:ClickEventInfo)
  394. {
  395. var dd = ds_send.getColumn(0, "yyyy");
  396. var cvtdate = dd.toDate("YYYY");
  397. var tobasedd = cvtdate.getDateFormat("YYYY");
  398. var dday = String(utlf_getCurrentDate()).substring(0, 4);
  399. ds_send.setColumn(0, "yyyy", tobasedd);
  400. if(dday != tobasedd)
  401. {
  402. btn_deptaprv.enable = false;
  403. btn_save.enable = false;
  404. }
  405. else
  406. {
  407. Displayflag() ;
  408. }
  409. }
  410. function grp_sea_btn_mngtdeptcd_search_onclick(obj:Button, e:ClickEventInfo)
  411. {
  412. misfOpenPopUpList("02", grp_sea.ipt_mngtdeptcd_search,"","mngtdeptcd_search,mngtdeptnm_search");
  413. }
  414. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  415. {
  416. var oParam = {};
  417. oParam.id = "TRRFC00403";
  418. oParam.service = "purcbaseapp.PurcBaseMngt";
  419. oParam.method = "reqGetDegolist";
  420. oParam.inds = "req=ds_send";
  421. oParam.outds = "ds_main_grid_degolist=degolist";
  422. oParam.async = false;
  423. //oParam.callback = "cf_TRRFC00403";
  424. tranf_submit(oParam);
  425. var cnt = ds_main_grid_degolist.rowcount;
  426. if(cnt == 0)
  427. {
  428. sysf_messageBox("대상품목 리스트가 존재하지" ,"I011");
  429. }
  430. else
  431. {
  432. var yyyy = ds_main_grid_degolist.getColumn(0, "yyyy");
  433. var basedd = String(ds_main_grid_degolist.getColumn(0, "basedd"));
  434. var tbasedd = yyyy + "-" + basedd.substr(0,2) + "-" + basedd.substr(2,2);
  435. var dfromdd = ds_main_grid_degolist.getColumn(0, "dfromdd");
  436. var dtodd = ds_main_grid_degolist.getColumn(0, "dtodd");
  437. //var useyn = ds_main_grid_degolist.getColumn(0, "useyn");
  438. var passnmin = ds_main_grid_degolist.getColumn(0, "passnmin");
  439. var passnmax = ds_main_grid_degolist.getColumn(0, "passnmax");
  440. var deptaprvnm = ds_main_grid_degolist.getColumn(0, "deptaprvnm");
  441. var senddd = ds_main_grid_degolist.getColumn(0, "senddd");
  442. var dd = utlf_getCurrentDate();
  443. ds_send.setColumn(0, "basedd", tbasedd);
  444. ds_send.setColumn(0, "dfromdd", dfromdd);
  445. ds_send.setColumn(0, "dtodd", dtodd);
  446. //ds_send.setColumn(0, "useyn", useyn);
  447. ds_send.setColumn(0, "deptaprvnm", deptaprvnm);
  448. ds_send.setColumn(0, "senddd", senddd);
  449. ds_send.setColumn(0, "passnmin", passnmin);
  450. ds_send.setColumn(0, "passnmax", passnmax);
  451. var tbasedd = String(ds_send.getColumn(0, "basedd"));
  452. var ttbasedd = tbasedd.substr(0,4) ;
  453. var fbasedd = tbasedd.substr(0,4) + "-" + tbasedd.substr(4,2) + "-" + tbasedd.substr(6,2) ;
  454. if(dfromdd <= dd && dd <= dtodd)
  455. {
  456. Displayflag() ; //버튼활성화 여부
  457. sysf_messageBox("물품 보유상태의 기준일자는 " + tbasedd ,"I009");
  458. }
  459. else
  460. {
  461. if(ttbasedd < dd) { //과거
  462. btn_save.enable = false;
  463. btn_clear.enable = false;
  464. }else{ //올해
  465. if(sysf_getUserInfo("dutplceinstcd") == "032")
  466. {
  467. sysf_messageBox("부서확인 기간 또는 사용가능한 기간이 아닙니다. \n물류팀 담당자(T.2052)에 확인하세요! ");
  468. }
  469. else
  470. {
  471. sysf_messageBox("부서확인 기간 또는 사용가능한 기간이 아닙니다. \n물류팀 담당자(T.5948)에 확인하세요! ");
  472. }
  473. ds_main_grid_degolist.clearData();
  474. grp_sea.btn_search.enable = false;
  475. btn_save.enable = false;
  476. btn_clear.enable = false;
  477. }
  478. }
  479. }
  480. }
  481. function ds_main_grid_degolist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  482. {
  483. if(e.columnid == "status")
  484. {
  485. var status = e.newvalue;
  486. if(status == "3")
  487. {
  488. sysf_messageBox("불용 선택은 수리요구 후 6월 30일 이전에 담당부서에서\n폐기 판정된 물품에 한함.");
  489. return;
  490. }
  491. }
  492. }
  493. function button4_onclick(obj:Button, e:ClickEventInfo)
  494. {
  495. var deptnm = ds_send.getColumn(0, "mngtdeptnm_search");
  496. if( ds_main_grid_degolist.rowcount > 0)
  497. {
  498. var fileName ="("+ deptnm +")"+"재물대상품목_" + utlf_getCurrentDate();
  499. grdf_exportExcel(grd_degolist, fileName, "Sheet", "true", "", "");
  500. }
  501. else
  502. {
  503. sysf_messageBox("저장 데이터가","I004");
  504. }
  505. }
  506. function btn_clear_onclick(obj:Button, e:ClickEventInfo)
  507. {
  508. fInitialize();
  509. }
  510. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  511. {
  512. var deptaprvnm = ds_send.getColumn(0, "deptaprvnm");
  513. if(utlf_isNull(deptaprvnm))
  514. {
  515. sysf_messageBox("부서장 승인되지", "E007")
  516. return;
  517. }
  518. else
  519. {
  520. for(var i = 0; i < ds_main_grid_degolist.rowcount; i++)
  521. {
  522. var deptaprvnm = ds_main_grid_degolist.getColumn(i, "deptaprvnm");
  523. ds_main_grid_degolist.setColumn(i, "deptaprvnm", "");
  524. ds_main_grid_degolist.setColumn(i, "senddd", "");
  525. ds_main_grid_degolist.updatecontrol = false;
  526. ds_main_grid_degolist.setRowType(i, "u");
  527. ds_main_grid_degolist.updatecontrol = true;
  528. }
  529. if ( sysf_messageBox("부서장승인취소를", "Q002") == 6 )
  530. {
  531. ds_main_grid_degolist.enableevent = false;
  532. ds_main_grid_degolist.updatecontrol = false;
  533. grdf_setStatusColumn(ds_main_grid_degolist, "mode");
  534. ds_main_grid_degolist.updatecontrol = true;
  535. ds_main_grid_degolist.enableevent = true;
  536. var oParam = {};
  537. oParam.id = "TXRFC00405";
  538. oParam.service = "purcbaseapp.PurcBaseMngt";
  539. oParam.method = "setDegolist";
  540. oParam.inds = "req=ds_main_grid_degolist:u";
  541. oParam.outds = "";
  542. oParam.async = false;
  543. oParam.typeStr = "mode";
  544. oParam.callback = "cf_TXRFC00405";
  545. tranf_submit(oParam);
  546. if(arErrorCode.pop("TXRFC00405") > -1)
  547. {
  548. grp_sea.btn_search.click();
  549. }
  550. }
  551. }
  552. }
  553. function cf_TXRFC00405(sSvcId, nErrorCode, sErrorMsg)
  554. {
  555. arErrorCode.push(sSvcId, nErrorCode);
  556. if(nErrorCode < 0) return;
  557. }
  558. function btn_deptaprv_onclick(obj:Button, e:ClickEventInfo)
  559. {
  560. for(var i = 0; i < ds_main_grid_degolist.rowcount; i++)
  561. {
  562. var status = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "status"));
  563. var goodflaghngnm = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "goodflaghngnm"));
  564. var fixasetcd = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "fixasetcd"));
  565. if(utlf_isNull(status))
  566. {
  567. sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 보유상태 정보가 없습니다.\n부서장승인&최종제출 할 수","I004");
  568. return;
  569. }
  570. else if(status == "2")
  571. {
  572. if(sysf_getUserInfo("dutplceinstcd") == "032")
  573. {
  574. sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.2052) 확인 후 처리 요망");
  575. }
  576. else
  577. {
  578. sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.5948) 확인 후 처리 요망");
  579. }
  580. return;
  581. }
  582. else
  583. {
  584. ds_main_grid_degolist.setColumn(i, "deptaprvnm", sysf_getUserInfo("userid"));
  585. ds_main_grid_degolist.setColumn(i, "senddd", utlf_getCurrentDate());
  586. ds_main_grid_degolist.updatecontrol = false;
  587. ds_main_grid_degolist.setRowType(i, "u");
  588. ds_main_grid_degolist.updatecontrol = true;
  589. }
  590. }
  591. var dday = String(utlf_getCurrentDate()).substring(0, 4);
  592. var dd = ds_send.getColumn(0, "yyyy");
  593. if(dday != dd)
  594. {
  595. sysf_messageBox("기준년도가 올해만 저장","I006");
  596. return;
  597. }
  598. else
  599. {
  600. if ( sysf_messageBox("부서장승인&최종제출을", "Q002") == 6 )
  601. {
  602. ds_main_grid_degolist.enableevent = false;
  603. ds_main_grid_degolist.updatecontrol = false;
  604. grdf_setStatusColumn(ds_main_grid_degolist, "mode");
  605. ds_main_grid_degolist.updatecontrol = true;
  606. ds_main_grid_degolist.enableevent = true;
  607. var oParam = {};
  608. oParam.id = "TXRFC00405";
  609. oParam.service = "purcbaseapp.PurcBaseMngt";
  610. oParam.method = "setDegolist";
  611. oParam.inds = "req=ds_main_grid_degolist:u";
  612. oParam.outds = "";
  613. oParam.async = false;
  614. oParam.typeStr = "mode";
  615. oParam.callback = "cf_TXRFC00405";
  616. tranf_submit(oParam);
  617. if(arErrorCode.pop("TXRFC00405") > -1)
  618. {
  619. grp_sea.btn_search.click();
  620. sysf_messageBox("부서장승인&최종제출이", "I002");
  621. }
  622. }
  623. }
  624. }
  625. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  626. {
  627. var updtdata = grdf_getGridUpdateData(grd_degolist);
  628. if (updtdata.rowcount == 0)
  629. {
  630. sysf_messageBox("변경된 데이터가","I004");
  631. return;
  632. }
  633. for(var i = 0; i < ds_main_grid_degolist.rowcount; i++)
  634. {
  635. var status = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "status"));
  636. var goodflaghngnm = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "goodflaghngnm"));
  637. var fixasetcd = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "fixasetcd"));
  638. if(status == "2")
  639. {
  640. if(sysf_getUserInfo("dutplceinstcd") == "032")
  641. {
  642. sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.2052) 확인 후 처리 요망");
  643. }
  644. else
  645. {
  646. sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.5948) 확인 후 처리 요망");
  647. }
  648. return;
  649. }
  650. }
  651. var dday = String(utlf_getCurrentDate()).substring(0, 4);
  652. var dd = ds_send.getColumn(0, "yyyy");
  653. ds_main_grid_degolist.enableevent = false;
  654. ds_main_grid_degolist.updatecontrol = false;
  655. grdf_setStatusColumn(ds_main_grid_degolist, "mode");
  656. ds_main_grid_degolist.updatecontrol = true;
  657. ds_main_grid_degolist.enableevent = true;
  658. if(dday != dd)
  659. {
  660. sysf_messageBox("기준년도가 올해만 저장","I006");
  661. return;
  662. }
  663. else
  664. {
  665. var oParam = {};
  666. oParam.id = "TXRFC00405";
  667. oParam.service = "purcbaseapp.PurcBaseMngt";
  668. oParam.method = "setDegolist";
  669. oParam.inds = "req=ds_main_grid_degolist";
  670. oParam.outds = "";
  671. oParam.async = false;
  672. oParam.typeStr = "mode";
  673. //oParam.callback = "cf_TXRFC00405";
  674. tranf_submit(oParam);
  675. grp_sea.btn_search.click();
  676. sysf_messageBox("저장", "I002");
  677. }
  678. }
  679. function caption11_onclick(obj:Static, e:ClickEventInfo)
  680. {
  681. for(var i = 0; i < ds_main_grid_degolist.rowcount; i++){
  682. ds_main_grid_degolist.setColumn(i, "status", "1");
  683. ds_main_grid_degolist.setRowType(i, "u");
  684. }
  685. }
  686. ]]></Script>
  687. </Form>
  688. </FDL>