SMRSC15000_고정자산이동확인.xfdl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSC15000" position="absolute 0 0 1197 796" titletext="고정자산이동확인" onload="SMRSC15000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 26 1195 53" id="group1" anchor="left top right">
  8. <Layouts>
  9. <Layout>
  10. <Shape position="absolute 0 21 1194 27" id="line17" class="line_6" anchor="left top right"/>
  11. <Button position="absolute 1138 0 1195 22" id="btn_save" class="btn4" text="저장" anchor="top right" onclick="group1_btn_save_onclick"/>
  12. </Layout>
  13. </Layouts>
  14. </Div>
  15. <Div position="absolute 0 51 1195 795" id="group3" scrollbars="autoboth" anchor="all">
  16. <Layouts>
  17. <Layout>
  18. <Div position="absolute 0 0 1195 40" align="align:center top;" id="grp_search" anchor="left top right" class="div_SA2">
  19. <Layouts>
  20. <Layout>
  21. <Button position="absolute 1127 9 1183 31" id="btn_search" class="btn1" taborder="6" text="조회" anchor="top right" onclick="group3_grp_search_btn_search_onclick"/>
  22. <Combo position="absolute 92 11 237 30" id="cmb_instcd" class="combo_default" enable="false" taborder="0" anchor="default"/>
  23. <Static text="기관코드" position="absolute 13 12 99 29" id="cap_instcd" class="search_name" anchor="default"/>
  24. <Shape position="absolute 1112 8 1118 32" linetype="vertical" id="line30" class="line_4" anchor="top right"/>
  25. <Edit position="absolute 329 11 452 30" id="ipt_mngtdeptcd" class="input_search" enable="false" taborder="1" anchor="default" autoselect="true" onkeydown="group3_grp_search_ipt_mngtdeptcd_onkeydown"/>
  26. <Button position="absolute 457 12 473 28" id="btn_mngtdeptcd" class="icon_search" enable="false" taborder="3" text="" anchor="default" onclick="group3_grp_search_btn_mngtdeptcd_onclick"/>
  27. <Edit position="absolute 476 11 667 30" id="ipt_mngtdeptnm" class="input_search" enable="false" anchor="default" autoselect="true" taborder="2"/>
  28. <Static text="인수부서" position="absolute 250 12 342 29" id="cap_mngtdeptcd_search" class="search_name" anchor="default"/>
  29. <Static text="요청일자" position="absolute 685 12 771 29" id="caption4" class="search_name" anchor="default"/>
  30. <Calendar position="absolute 765 11 883 30" align="align:center middle;" id="ipt_fromdd" taborder="4" mask="yyyy-mm-dd" anchor="default" autoselect="true"/>
  31. <Calendar position="absolute 903 11 1021 30" align="align:center middle;" id="ipt_todd" taborder="5" mask="yyyy-mm-dd" anchor="default" autoselect="true"/>
  32. <Static text="~" position="absolute 888 11 900 31" id="caption2" anchor="default"/>
  33. </Layout>
  34. </Layouts>
  35. </Div>
  36. <Shape position="absolute 0 66 1195 72" id="line1" class="line_10" anchor="left top right"/>
  37. <Static text="고정자산 내역" position="absolute 0 50 180 67" id="caption1" class="tit_2" anchor="default"/>
  38. <Grid position="absolute 0 71 1195 743" id="grd_fixedassetsconflist" binddataset="ds_main_fixedassetsconf_fixedassetsconflist" anchor="all" cellclickbound="cell" cellsizingtype="col" selecttype="multirow" ontextchanged="group3_grd_fixedassetsconflist_ontextchanged">
  39. <Formats>
  40. <Format id="default">
  41. <Columns>
  42. <Column size="25" band="left"/>
  43. <Column size="90"/>
  44. <Column size="110"/>
  45. <Column size="35"/>
  46. <Column size="70"/>
  47. <Column size="80"/>
  48. <Column size="70"/>
  49. <Column size="99"/>
  50. <Column size="100"/>
  51. <Column size="55"/>
  52. <Column size="80"/>
  53. <Column size="150"/>
  54. <Column size="70"/>
  55. <Column size="60"/>
  56. <Column size="100"/>
  57. <Column size="0"/>
  58. <Column size="0"/>
  59. <Column size="0"/>
  60. <Column size="0"/>
  61. </Columns>
  62. <Rows>
  63. <Row size="24" band="head"/>
  64. <Row size="24"/>
  65. </Rows>
  66. <Band id="head">
  67. <Cell/>
  68. <Cell col="1" text="자산코드"/>
  69. <Cell col="2" text="품명"/>
  70. <Cell col="3" text="수량"/>
  71. <Cell col="4" text="단가"/>
  72. <Cell col="5" text="금액"/>
  73. <Cell col="6" text="구입일자"/>
  74. <Cell col="7" text="인계부서"/>
  75. <Cell col="8" text="인수부서"/>
  76. <Cell col="9" text="변동유형"/>
  77. <Cell col="10" text="폐기번호"/>
  78. <Cell col="11" text="변동사유"/>
  79. <Cell col="12" text="요청일자"/>
  80. <Cell col="13" text="승인여부"/>
  81. <Cell col="14" text="승인일자"/>
  82. <Cell col="15"/>
  83. <Cell col="16"/>
  84. <Cell col="17"/>
  85. <Cell col="18"/>
  86. </Band>
  87. <Band id="body">
  88. <Cell celltype="head"/>
  89. <Cell col="1" displaytype="text" text="bind:fixasetcd"/>
  90. <Cell col="2" displaytype="text" style="align:left top;padding:4 2 2 2;" text="bind:goodflaghngnm" wordwrap="word"/>
  91. <Cell col="3" text="bind:fixasetqty"/>
  92. <Cell col="4" displaytype="number" text="bind:unicost"/>
  93. <Cell col="5" displaytype="number" text="bind:fixasetamt"/>
  94. <Cell col="6" displaytype="expr:utlf_isNull(possndd) ? 'normal' : 'date'" text="bind:possndd"/>
  95. <Cell col="7" displaytype="text" text="bind:takeoutdeptnm"/>
  96. <Cell col="8" displaytype="text" text="bind:takeindeptnm"/>
  97. <Cell col="9" displaytype="combo" style="align:center;" text="bind:chantype" combodataset="ds_cmb_chantype" combocodecol="value" combodatacol="label" enable="false"/>
  98. <Cell col="10" text="bind:disuserno"/>
  99. <Cell col="11" displaytype="text" style="align:left top;padding:4 2 2 2;" text="bind:cmt" wordwrap="word"/>
  100. <Cell col="12" displaytype="expr:utlf_isNull(reqdd) ? 'normal' : 'date'" text="bind:reqdd" enable="false"/>
  101. <Cell col="13" displaytype="checkbox" edittype="checkbox" text="bind:confyn" expr="expr:(confyn==&quot;Y&quot;||confyn==1)?1:0"/>
  102. <Cell col="14" displaytype="expr:utlf_isNull(confdt) ? 'normal' : 'date'" edittype="date" text="bind:confdt" calendardisplay="display"/>
  103. <Cell col="15" text="bind:takeoutdeptcd"/>
  104. <Cell col="16" text="bind:instcd"/>
  105. <Cell col="17" text="bind:reqno"/>
  106. <Cell col="18" text="bind:tretyn"/>
  107. </Band>
  108. </Format>
  109. </Formats>
  110. </Grid>
  111. <Button position="absolute 1115 44 1195 66" id="btn_excsave" class="btn7" text="엑셀저장" anchor="top right" onclick="group3_btn_excsave_onclick"/>
  112. </Layout>
  113. </Layouts>
  114. </Div>
  115. <Static id="caption6" text="고정자산 이동 확인" class="tit_1" position="absolute 0 0 160 25"/>
  116. </Layout>
  117. </Layouts>
  118. <Objects>
  119. <Dataset id="ds_main_fixedassetsconf_fixedassetsconflist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_fixedassetsconf_fixedassetsconflist_oncolumnchanged">
  120. <ColumnInfo>
  121. <Column id="instcd" type="STRING" size="255"/>
  122. <Column id="fixasetcd" type="STRING" size="255"/>
  123. <Column id="goodflaghngnm" type="STRING" size="255"/>
  124. <Column id="fixasetqty" type="BIGDECIMAL" size="255"/>
  125. <Column id="unicost" type="BIGDECIMAL" size="255"/>
  126. <Column id="fixasetamt" type="BIGDECIMAL" size="255"/>
  127. <Column id="possndd" type="STRING" size="255"/>
  128. <Column id="takeoutdeptcd" type="STRING" size="255"/>
  129. <Column id="takeoutdeptnm" type="STRING" size="255"/>
  130. <Column id="takeindeptcd" type="STRING" size="255"/>
  131. <Column id="takeindeptnm" type="STRING" size="255"/>
  132. <Column id="chantype" type="STRING" size="255"/>
  133. <Column id="cmt" type="STRING" size="255"/>
  134. <Column id="reqdd" type="STRING" size="255"/>
  135. <Column id="reqno" type="STRING" size="255"/>
  136. <Column id="confyn" type="STRING" size="255"/>
  137. <Column id="confdt" type="STRING" size="255"/>
  138. <Column id="confpsn" type="STRING" size="255"/>
  139. <Column id="tretyn" type="STRING" size="255"/>
  140. <Column id="disuseno" type="STRING" size="255"/>
  141. </ColumnInfo>
  142. </Dataset>
  143. <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_send_search_oncolumnchanged">
  144. <ColumnInfo>
  145. <Column id="instcd" type="STRING" size="256"/>
  146. <Column id="mngtdeptcd" type="STRING" size="256"/>
  147. <Column id="mngtdeptnm" type="STRING" size="256"/>
  148. <Column id="fromdd" type="STRING" size="256"/>
  149. <Column id="todd" type="STRING" size="256"/>
  150. </ColumnInfo>
  151. <Rows>
  152. <Row>
  153. <Col id="instcd"/>
  154. <Col id="mngtdeptcd"/>
  155. <Col id="mngtdeptnm"/>
  156. <Col id="fromdd"/>
  157. <Col id="todd"/>
  158. </Row>
  159. </Rows>
  160. </Dataset>
  161. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  162. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  163. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  164. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  165. <Dataset id="ds_send_save_fixedassetsconflist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  166. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  167. <Dataset id="ds_cmb_chantype" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  168. <ColumnInfo>
  169. <Column id="label" type="STRING" size="256"/>
  170. <Column id="value" type="STRING" size="256"/>
  171. </ColumnInfo>
  172. <Rows>
  173. <Row>
  174. <Col id="label">이동</Col>
  175. <Col id="value">0</Col>
  176. </Row>
  177. <Row>
  178. <Col id="label">폐기</Col>
  179. <Col id="value">1</Col>
  180. </Row>
  181. </Rows>
  182. </Dataset>
  183. </Objects>
  184. <Bind>
  185. <BindItem id="item0" compid="group3.grp_search.cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
  186. <BindItem id="item1" compid="group3.grp_search.ipt_mngtdeptcd" propid="value" datasetid="ds_send_search" columnid="mngtdeptcd"/>
  187. <BindItem id="item2" compid="group3.grp_search.ipt_mngtdeptnm" propid="value" datasetid="ds_send_search" columnid="mngtdeptnm"/>
  188. <BindItem id="item3" compid="group3.grp_search.ipt_fromdd" propid="value" datasetid="ds_send_search" columnid="fromdd"/>
  189. <BindItem id="item4" compid="group3.grp_search.ipt_todd" propid="value" datasetid="ds_send_search" columnid="todd"/>
  190. </Bind>
  191. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  192. * System Name :
  193. * Job Name :
  194. * Creator :
  195. * Make Date : 2017-06-19
  196. * Description :
  197. *---------------------------------------------------------------------------------------
  198. * Modify Date Modifier Modify Description
  199. *---------------------------------------------------------------------------------------
  200. * 2017-06-19 Live Converter TF->XP
  201. *
  202. *---------------------------------------------------------------------------------------
  203. ****************************************************************************************/
  204. //=======================================================================================
  205. // Lib Include
  206. //---------------------------------------------------------------------------------------
  207. include "com_commonxp::comm_main.xjs";
  208. include "mis_miscommonxp::MIS.xjs";
  209. include "mis_miscommonxp::RSZ001.xjs";
  210. //=======================================================================================
  211. // Global Form Variable
  212. //---------------------------------------------------------------------------------------
  213. var arErrorCode = new HashArray();
  214. //=======================================================================================
  215. // Function
  216. //---------------------------------------------------------------------------------------
  217. /****************************************************************************************
  218. * Argument : N/A
  219. * Description : 조회조건 변경시 Grid 초기화(사용안함)
  220. ****************************************************************************************/
  221. function fSearchCondChanged() {
  222. // model.removeNodeset(grd_stock.nodeset);
  223. // model.removeNodeset(grd_win.nodeset);
  224. // model.removeNodeset(grd_delive.nodeset);
  225. // model.removeNodeset(grd_deptstock.nodeset);
  226. }
  227. //=======================================================================================
  228. // Event
  229. //---------------------------------------------------------------------------------------
  230. /****************************************************************************************
  231. * Components : Form
  232. * Description : 화면 처음 초기화시 폼초기화
  233. ****************************************************************************************/
  234. function SMRSC15000_onload(obj:Form, e:LoadEventInfo) {
  235. frmf_initForm(obj);
  236. //grdf_initGrid(grd_XXX);
  237. grdf_setGridSort(group3.grd_fixedassetsconflist);
  238. grdf_setRowTypeIcon(group3.grd_fixedassetsconflist, 0);
  239. //화면 Control을 초기화한다
  240. misfGridInit(group3.grd_fixedassetsconflist);
  241. misfMsterDetailSet(group3.grd_fixedassetsconflist, null, "TRRSC15001" ,"Y","free");
  242. misfComboInstCdListMulti("group3.grp_search.cmb_instcd",utlf_getCurrentDate(),"","N");
  243. ds_send_search.setColumn( 0, "instcd", sysf_getUserInfo("dutplceinstcd")); //기관 설정
  244. ds_send_search.setColumn( 0, "mngtdeptcd", sysf_getUserInfo("dutplcecd")); //기관 설정
  245. ds_send_search.setColumn( 0, "mngtdeptnm", sysf_getUserInfo("dutplcenm")); //기관 설정
  246. misfMsterDetailRetrieve();
  247. ds_send_search.setColumn( 0, "fromdd", utlf_getCurrentDate().toDate("YYYYMMDD").getAddDate(-1, "M").getDateFormat("YYYYMMDD"));
  248. ds_send_search.setColumn( 0, "todd", utlf_getCurrentDate());
  249. if(sysf_getUserInfo("userid") == "MIS"){
  250. group3.grp_search.ipt_mngtdeptcd.enable = true;
  251. group3.grp_search.btn_mngtdeptcd.enable = true;
  252. }
  253. for(var i = 0 ; i < ds_main_fixedassetsconf_fixedassetsconflist.rowcount ; i++) {
  254. var confyn = ds_main_fixedassetsconf_fixedassetsconflist.getColumn(i, "tretyn");
  255. if(confyn == "Y"){
  256. misfSetReadOnlyCol(group3.grd_fixedassetsconflist, "confyn,tretyn", true, i);
  257. }
  258. }
  259. }
  260. /****************************************************************************************
  261. * Components : Button
  262. * Description : 저장
  263. ****************************************************************************************/
  264. function group1_btn_save_onclick(obj:Button, e:ClickEventInfo) {
  265. for(var i = 0 ; i < ds_main_fixedassetsconf_fixedassetsconflist.rowcount ; i++){
  266. var confyn = dsf_getColumnNullToEmpty(ds_main_fixedassetsconf_fixedassetsconflist, i, "confyn");
  267. var confdt = dsf_getColumnNullToEmpty(ds_main_fixedassetsconf_fixedassetsconflist, i, "confdt");
  268. if(confyn == "Y" && confdt == ""){
  269. sysf_messageBox(i+"번째행에 승인은 되었지만 승인일자가 없습니다. 입력하여주십시오.", "E999", "");
  270. ds_main_fixedassetsconf_fixedassetsconflist.rowposition = i;
  271. // group3.grd_fixedassetsconflist.col = group3.grd_fixedassetsconflist.colRef("confdt");
  272. group3.grd_fixedassetsconflist.setFocus();
  273. group3.grd_fixedassetsconflist.setCellPos(group3.grd_fixedassetsconflist.getBindCellIndex("body","confdt"));
  274. group3.grd_fixedassetsconflist.showEditor(true);
  275. return;
  276. }
  277. }
  278. misfSave("TXRSC15001");
  279. group3.grp_search.btn_search.click();
  280. }
  281. /****************************************************************************************
  282. * Components : Button
  283. * Description : 조회
  284. ****************************************************************************************/
  285. function group3_grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo) {
  286. misfGridInit(group3.grd_fixedassetsconflist);
  287. misfMsterDetailRetrieve();
  288. for(var i = 0 ; i < ds_main_fixedassetsconf_fixedassetsconflist.rowcount ; i++){
  289. var confyn = ds_main_fixedassetsconf_fixedassetsconflist.getColumn(i, "tretyn");
  290. if(confyn == "Y"){
  291. misfSetReadOnlyCol(group3.grd_fixedassetsmodifylist, "confyn,tretyn", true, i);
  292. }
  293. }
  294. }
  295. /****************************************************************************************
  296. * Components : Button
  297. * Description : 인수부서 조회
  298. ****************************************************************************************/
  299. function group3_grp_search_btn_mngtdeptcd_onclick(obj:Button, e:ClickEventInfo) {
  300. misfOpenPopUpList("02", group3.grp_search.ipt_mngtdeptcd,"","mngtdeptcd,mngtdeptnm");
  301. }
  302. /****************************************************************************************
  303. * Components : Grid
  304. * Description : 고정자선 내역 데이터수정
  305. ****************************************************************************************/
  306. function group3_grd_fixedassetsconflist_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo) {
  307. if(ds_main_fixedassetsconf_fixedassetsconflist.getColumn(e.row, "confyn") == "Y") {
  308. ds_main_fixedassetsconf_fixedassetsconflist.setColumn(e.row, "confdt", utlf_getCurrentDate());
  309. }
  310. }
  311. /****************************************************************************************
  312. * Components : Button
  313. * Description : 고정자선 내역 엑셀저장
  314. ****************************************************************************************/
  315. function group3_btn_excsave_onclick(obj:Button, e:ClickEventInfo) {
  316. misfSaveExcel(group3.grd_fixedassetsconflist);
  317. }
  318. /****************************************************************************************
  319. * Components : Edit
  320. * Description : 인수부서 조회
  321. ****************************************************************************************/
  322. function group3_grp_search_ipt_mngtdeptcd_onkeydown(obj:Edit, e:KeyEventInfo)
  323. {
  324. if(e.keycode == 13) obj.updateToDataset();
  325. }
  326. function ds_send_search_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  327. {
  328. if(e.columnid == "mngtdeptcd") {
  329. if(utlf_isNull(group3.grp_search.ipt_mngtdeptcd.value)){
  330. group3.grp_search.ipt_mngtdeptnm.value = "";
  331. }else {
  332. group3.grp_search.ipt_mngtdeptcd.setFocus();
  333. misfValidationCheck("02", "", "mngtdeptcd,mngtdeptnm");
  334. }
  335. }
  336. }
  337. function ds_main_fixedassetsconf_fixedassetsconflist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  338. {
  339. if( e.columnid == "confyn" ){
  340. if( e.newvalue == "Y" || e.newvalue == "1" ){
  341. obj.setColumn(e.row, e.columnid, "Y");
  342. }else{
  343. obj.setColumn(e.row, e.columnid, "N");
  344. }
  345. }
  346. }
  347. ]]></Script>
  348. </Form>
  349. </FDL>