SMRSO22800_물품이동내역.xfdl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSO22800" position="absolute 0 0 1200 771" titletext="물품이동내역(물품보내는부서)" oninit="SMRSO22800_oninit" onload="SMRSO22800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="물품이동내역(물품보내는부서)" class="tit_1" position="absolute 0 0 243 25"/>
  8. <Shape id="line17" class="line_6" position="absolute 0 36 1195 42" anchor="left top right"/>
  9. <Button id="btn_help" taborder="1" text="도움말" class="btn4" position="absolute 1070 15 1138 37" anchor="top right" onclick="btn_help_onclick"/>
  10. <Button id="btn_save" taborder="2" text="저장" class="btn4" position="absolute 1138 15 1194 37" anchor="top right" onclick="btn_save_onclick"/>
  11. <Div id="grp_search" taborder="3" class="div_SA2" position="absolute 0 40 1195 80" anchor="left top right">
  12. <Layouts>
  13. <Layout>
  14. <Button id="btn_search" taborder="6" text="조회" class="btn1" position="absolute 1129 8 1185 30" anchor="top right" onclick="grp_search_btn_search_onclick"/>
  15. <Combo id="cmb_instcd" taborder="7" innerdataset="@ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 67 10 203 29" anchor="default"/>
  16. <Static id="cap_instcd" text="기관:" class="search_name" position="absolute 13 11 99 28" anchor="default"/>
  17. <Calendar id="ipt_movefromdd" taborder="8" autoselect="true" autoskip="true" position="absolute 695 10 780 29" mask="yyyy-mm-dd" anchor="default"/>
  18. <Static id="caption20" text="부서:" class="search_name" position="absolute 235 11 316 28" anchor="default"/>
  19. <Shape id="line30" linetype="vertical" class="line_4" position="absolute 1113 7 1119 32" anchor="top right"/>
  20. <Button id="btn_delivedeptcd" taborder="9" class="icon_search" position="absolute 397 11 413 27" anchor="default" onclick="grp_search_btn_delivedeptcd_onclick"/>
  21. <Edit id="ipt_fromdeptcd" taborder="10" autoselect="true" autoskip="true" class="input_default" position="absolute 290 10 395 29" anchor="default" onkeydown="grp_search_ipt_fromdeptcd_onkeydown"/>
  22. <Edit id="opt_fromdeptcd" taborder="11" readonly="true" class="output" position="absolute 415 10 571 29" anchor="default"/>
  23. <Static id="caption9" text="이동일자:" class="search_name" position="absolute 614 11 700 28" anchor="default"/>
  24. <Calendar id="ipt_movetodd" taborder="12" autoselect="true" autoskip="true" position="absolute 800 10 885 29" mask="yyyy-mm-dd" anchor="default"/>
  25. <Static id="caption2" text="~" position="absolute 785 11 805 31" anchor="default"/>
  26. </Layout>
  27. </Layouts>
  28. </Div>
  29. <Button id="btn_del" taborder="4" text="행삭제" class="btn2" position="absolute 1142 88 1195 107" anchor="top right" onclick="btn_del_onclick"/>
  30. <Static id="caption4" text="이동요청내역(물품보내는부서)" class="tit_2" position="absolute 0 91 215 112"/>
  31. <Button id="btn_add" taborder="5" text="행추가" class="btn2" position="absolute 1088 88 1141 107" anchor="top right" onclick="btn_add_onclick"/>
  32. <Shape id="line3" class="line_10" position="absolute 0 107 1195 113" anchor="left top right"/>
  33. <Grid id="grd_movereqlist" class="datagrid2" taborder="6" binddataset="ds_main_movereq_movereqlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 112 1195 762" anchor="all" onexpanddown="grd_movereqlist_onexpanddown">
  34. <Formats>
  35. <Format id="default">
  36. <Columns>
  37. <Column size="23"/>
  38. <Column size="103"/>
  39. <Column size="125"/>
  40. <Column size="206"/>
  41. <Column size="201"/>
  42. <Column size="60"/>
  43. <Column size="60"/>
  44. <Column size="170"/>
  45. <Column size="170"/>
  46. <Column size="60"/>
  47. <Column size="0"/>
  48. <Column size="0"/>
  49. <Column size="0"/>
  50. <Column size="0"/>
  51. <Column size="0"/>
  52. </Columns>
  53. <Rows>
  54. <Row size="24" band="head"/>
  55. <Row size="24"/>
  56. </Rows>
  57. <Band id="head">
  58. <Cell/>
  59. <Cell col="1" text="이동일자"/>
  60. <Cell col="2" text="물품코드"/>
  61. <Cell col="3" text="물품명"/>
  62. <Cell col="4" text="규격"/>
  63. <Cell col="5" text="현재고량"/>
  64. <Cell col="6" text="이동수량"/>
  65. <Cell col="7" text="물품보내는부서"/>
  66. <Cell col="8" text="물품받는부서"/>
  67. <Cell col="9" text="이동요청"/>
  68. <Cell col="10" text="caption1"/>
  69. <Cell col="11" text="caption2"/>
  70. <Cell col="12"/>
  71. <Cell col="13"/>
  72. <Cell col="14"/>
  73. </Band>
  74. <Band id="body">
  75. <Cell celltype="head"/>
  76. <Cell col="1" displaytype="date" edittype="none" text="bind:movedd" editautoselect="true" editautoskip="true" calendardisplaynulltype="nulltext" enable="false"/>
  77. <Cell col="2" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'text' : 'none'" text="bind:goodcd" editautoselect="true" editautoskip="true" expandshow="show" enable="false"/>
  78. <Cell col="3" text="bind:goodhngnm" editautoselect="true" editautoskip="true"/>
  79. <Cell col="4" text="bind:goodspec" editautoselect="true" editautoskip="true"/>
  80. <Cell col="5" text="bind:jaegoqty" editautoselect="true" editautoskip="true"/>
  81. <Cell col="6" displaytype="text" edittype="text" style="align:center middle;" text="bind:moveqty" editautoselect="true" editautoskip="true"/>
  82. <Cell col="7" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'text' : 'none'" text="bind:fromdeptnm" editautoselect="true" editautoskip="true" expandshow="show" enable="false"/>
  83. <Cell col="8" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'text' : 'none'" text="bind:todeptnm" editautoselect="true" editautoskip="true" expandshow="show" enable="false"/>
  84. <Cell col="9" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:movegubun" editautoselect="true" editautoskip="true" combodataset="ds_cmb_movegubun" combocodecol="value" combodatacol="label"/>
  85. <Cell col="10" text="bind:instcd"/>
  86. <Cell col="11" text="bind:moveno"/>
  87. <Cell col="12" text="bind:fromdeptcd"/>
  88. <Cell col="13" text="bind:todeptcd"/>
  89. <Cell col="14" text="bind:allsizespecid"/>
  90. </Band>
  91. </Format>
  92. </Formats>
  93. </Grid>
  94. <Button id="btn_jaego" taborder="7" text="부서재고" class="btn2" position="absolute 1023 88 1087 107" anchor="top right" onclick="btn_jaego_onclick"/>
  95. <Static id="cap_magam" position="absolute 240 84 635 104"/>
  96. </Layout>
  97. </Layouts>
  98. <Objects>
  99. <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_search_oncolumnchanged">
  100. <ColumnInfo>
  101. <Column id="instcd" type="STRING" size="256"/>
  102. <Column id="fromdeptcd" type="STRING" size="256"/>
  103. <Column id="fromdeptnm" type="STRING" size="256"/>
  104. <Column id="movefromdd" type="STRING" size="256"/>
  105. <Column id="movetodd" type="STRING" size="256"/>
  106. <Column id="movegubun" type="STRING" size="256"/>
  107. </ColumnInfo>
  108. <Rows>
  109. <Row>
  110. <Col id="instcd"/>
  111. <Col id="fromdeptcd"/>
  112. <Col id="fromdeptnm"/>
  113. <Col id="movefromdd"/>
  114. <Col id="movetodd"/>
  115. <Col id="movegubun">1</Col>
  116. </Row>
  117. </Rows>
  118. </Dataset>
  119. <Dataset id="ds_main_movereq_movereqlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_movereq_movereqlist_oncolumnchanged">
  120. <ColumnInfo>
  121. <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
  122. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  123. <Column id="fromdeptcd" type="STRING" size="256" sumtext="From부서"/>
  124. <Column id="fromdeptnm" type="STRING" size="256" sumtext="From부서"/>
  125. <Column id="goodhngnm" type="STRING" size="256" sumtext="물품명"/>
  126. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  127. <Column id="movedd" type="STRING" size="256" sumtext="이동일자"/>
  128. <Column id="moveno" type="STRING" size="256" sumtext="이동번호"/>
  129. <Column id="movegubun" type="STRING" size="256" sumtext="이동구분"/>
  130. <Column id="todeptcd" type="STRING" size="256" sumtext="To부서"/>
  131. <Column id="todeptnm" type="STRING" size="256" sumtext="To부서"/>
  132. <Column id="moveqty" type="STRING" size="256" sumtext="이동수량"/>
  133. <Column id="jaegoqty" type="STRING" size="256" sumtext="현재고량"/>
  134. </ColumnInfo>
  135. </Dataset>
  136. <Dataset id="ds_cmb_movegubun" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  137. <ColumnInfo>
  138. <Column id="label" type="STRING" size="256"/>
  139. <Column id="value" type="STRING" size="256"/>
  140. </ColumnInfo>
  141. <Rows>
  142. <Row>
  143. <Col id="label">Y</Col>
  144. <Col id="value">1</Col>
  145. </Row>
  146. <Row>
  147. <Col id="label">N</Col>
  148. <Col id="value">0</Col>
  149. </Row>
  150. </Rows>
  151. </Dataset>
  152. <Dataset id="ds_main_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  153. <ColumnInfo>
  154. <Column id="cnstnm" type="STRING" size="256"/>
  155. <Column id="cnstcd" type="STRING" size="256"/>
  156. </ColumnInfo>
  157. </Dataset>
  158. <Dataset id="ds_magamsearch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  159. <ColumnInfo>
  160. <Column id="instcd" type="STRING" size="256"/>
  161. <Column id="dd" type="STRING" size="256"/>
  162. <Column id="deptcd" type="STRING" size="256"/>
  163. </ColumnInfo>
  164. <Rows>
  165. <Row/>
  166. </Rows>
  167. </Dataset>
  168. <Dataset id="ds_distrimagam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  169. <ColumnInfo>
  170. <Column id="endyn" type="STRING" size="256"/>
  171. </ColumnInfo>
  172. </Dataset>
  173. <Dataset id="ds_magam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  174. <ColumnInfo>
  175. <Column id="magamyn" type="STRING" size="256"/>
  176. </ColumnInfo>
  177. </Dataset>
  178. <Dataset id="ds_popgood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  179. <ColumnInfo>
  180. <Column id="instcd" type="STRING" size="256"/>
  181. <Column id="wareflag" type="STRING" size="256"/>
  182. <Column id="delivedd" type="STRING" size="256"/>
  183. <Column id="basedd" type="STRING" size="256"/>
  184. <Column id="selectyn" type="STRING" size="256"/>
  185. <Column id="goodcd" type="STRING" size="256"/>
  186. </ColumnInfo>
  187. <Rows>
  188. <Row>
  189. <Col id="instcd"/>
  190. <Col id="wareflag"/>
  191. <Col id="delivedd"/>
  192. <Col id="basedd"/>
  193. <Col id="selectyn"/>
  194. <Col id="goodcd"/>
  195. </Row>
  196. </Rows>
  197. </Dataset>
  198. <Dataset id="ds_popdelive" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  199. <ColumnInfo>
  200. <Column id="instcd" type="STRING" size="256"/>
  201. <Column id="delivedd" type="STRING" size="256"/>
  202. <Column id="delivedeptcd" type="STRING" size="256"/>
  203. <Column id="delivedeptnm" type="STRING" size="256"/>
  204. <Column id="opener" type="STRING" size="256"/>
  205. </ColumnInfo>
  206. <Rows>
  207. <Row>
  208. <Col id="instcd"/>
  209. <Col id="delivedd"/>
  210. <Col id="delivedeptcd"/>
  211. <Col id="delivedeptnm"/>
  212. <Col id="opener"/>
  213. </Row>
  214. </Rows>
  215. </Dataset>
  216. <Dataset id="ds_popreq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  217. <ColumnInfo>
  218. <Column id="count" type="STRING" size="256"/>
  219. </ColumnInfo>
  220. <Rows>
  221. <Row/>
  222. </Rows>
  223. </Dataset>
  224. <Dataset id="ds_popsubdata_stocklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  225. <ColumnInfo>
  226. <Column id="goodcd" type="STRING" size="256"/>
  227. <Column id="goodnm" type="STRING" size="256"/>
  228. <Column id="goodspec" type="STRING" size="256"/>
  229. </ColumnInfo>
  230. </Dataset>
  231. <Dataset id="ds_jaego_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  232. <ColumnInfo>
  233. <Column id="instcd" type="STRING" size="256"/>
  234. <Column id="goodcd" type="STRING" size="256"/>
  235. <Column id="ymd" type="STRING" size="256"/>
  236. <Column id="fromdeptcd" type="STRING" size="256"/>
  237. </ColumnInfo>
  238. <Rows>
  239. <Row>
  240. <Col id="instcd"/>
  241. <Col id="goodcd"/>
  242. <Col id="ymd"/>
  243. <Col id="fromdeptcd"/>
  244. </Row>
  245. </Rows>
  246. </Dataset>
  247. <Dataset id="ds_jaego_value" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  248. <ColumnInfo>
  249. <Column id="jaegoqty" type="STRING" size="256"/>
  250. </ColumnInfo>
  251. </Dataset>
  252. <Dataset id="ds_popgood_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  253. <ColumnInfo>
  254. <Column id="goodcd" type="STRING" size="256"/>
  255. </ColumnInfo>
  256. </Dataset>
  257. <Dataset id="ds_main_good_gooddetail" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  258. <ColumnInfo>
  259. <Column id="goodcd" type="STRING" size="256"/>
  260. <Column id="goodnm" type="STRING" size="256"/>
  261. <Column id="goodspec" type="STRING" size="256"/>
  262. </ColumnInfo>
  263. </Dataset>
  264. </Objects>
  265. <Bind>
  266. <BindItem id="item0" compid="grp_search.cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
  267. <BindItem id="item1" compid="grp_search.ipt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptcd"/>
  268. <BindItem id="item2" compid="grp_search.opt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptnm"/>
  269. <BindItem id="item3" compid="grp_search.ipt_movefromdd" propid="value" datasetid="ds_send_search" columnid="movefromdd"/>
  270. <BindItem id="item4" compid="grp_search.ipt_movetodd" propid="value" datasetid="ds_send_search" columnid="movetodd"/>
  271. </Bind>
  272. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  273. * System Name :
  274. * Job Name :
  275. * Creator :
  276. * Make Date : 2017-06-19
  277. * Description :
  278. *---------------------------------------------------------------------------------------
  279. * Modify Date Modifier Modify Description
  280. *---------------------------------------------------------------------------------------
  281. * 2017-06-19 Live Converter TF->XP
  282. *
  283. *---------------------------------------------------------------------------------------
  284. ****************************************************************************************/
  285. include "com_commonxp::comm_main.xjs";
  286. include "mis_miscommonxp::MIS.xjs";
  287. function SMRSO22800_oninit(obj:Form, e:InitEventInfo)
  288. {
  289. frmf_initForm(obj);
  290. }
  291. function SMRSO22800_onload(obj:Form, e:LoadEventInfo)
  292. {
  293. grdf_initGrid(grd_movereqlist);
  294. grdf_setRowTypeIcon(grd_movereqlist);
  295. misfComboInstCdListMulti("grp_search.cmb_instcd",utlf_getCurrentDate(),"","N");
  296. ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  297. ds_send_search.setColumn(0, "movefromdd", utlf_getCurrentDate());
  298. ds_send_search.setColumn(0, "movetodd", utlf_getCurrentDate());
  299. var instcd = ds_send_search.getColumn(0, "instcd");
  300. if(instcd == "031")
  301. {
  302. ds_send_search.setColumn(0, "fromdeptcd", sysf_getUserInfo("dutunitcd"));
  303. ds_send_search.setColumn(0, "fromdeptnm", sysf_getUserInfo("dutunitnm"));
  304. }
  305. else
  306. {
  307. ds_send_search.setColumn(0, "fromdeptcd", sysf_getUserInfo("dutplcecd"));
  308. ds_send_search.setColumn(0, "fromdeptnm", sysf_getUserInfo("dutplcenm"));
  309. }
  310. }
  311. function ds_send_search_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  312. {
  313. if(e.columnid == "fromdeptcd")
  314. {
  315. grp_search.ipt_fromdeptcd.value = e.newvalue;
  316. grp_search.ipt_fromdeptcd.setFocus();
  317. misfValidationCheck("02", "", "fromdeptcd,fromdeptnm" );
  318. }
  319. }
  320. function grp_search_ipt_fromdeptcd_onkeydown(obj:Edit, e:KeyEventInfo)
  321. {
  322. if(e.keycode == 13)
  323. {
  324. obj.updateToDataset();
  325. }
  326. }
  327. function grp_search_btn_delivedeptcd_onclick(obj:Button, e:ClickEventInfo)
  328. {
  329. misfOpenPopUpList("02", ds_send_search,"", "fromdeptcd,fromdeptnm");
  330. }
  331. function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  332. {
  333. if(utlf_isNull(grp_search.opt_fromdeptcd.value))
  334. {
  335. sysf_messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
  336. grp_search.ipt_fromdeptcd.setFocus();
  337. return;
  338. }
  339. if(String(grp_search.ipt_movefromdd.value).length < 8)
  340. {
  341. sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
  342. grp_search.ipt_movefromdd.setFocus();
  343. return;
  344. }
  345. if(String(grp_search.ipt_movetodd.value).length < 8)
  346. {
  347. sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
  348. grp_search.ipt_movetodd.setFocus();
  349. return;
  350. }
  351. misfGridInit(grd_movereqlist);
  352. var oParam = {};
  353. oParam.id = "TRRSO22801";
  354. oParam.service = "deliveapp.DeliveMngt";
  355. oParam.method = "reqGetMoveReqList";
  356. oParam.inds = "req=ds_send_search";
  357. oParam.outds = "ds_main_movereq_movereqlist=movereqlist";
  358. oParam.async = false;
  359. oParam.callback = "cf_TRRSO22801";
  360. tranf_submit(oParam);
  361. }
  362. function cf_TRRSO22801(sSvcId, nErrorCode, sErrorMsg)
  363. {
  364. if(nErrorCode < 0)
  365. {
  366. return;
  367. }
  368. else
  369. {
  370. ds_magamsearch.setColumn(0, "instcd", ds_send_search.getColumn(0, "instcd"));
  371. ds_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "movefromdd"));
  372. ds_magamsearch.setColumn(0, "deptcd", ds_send_search.getColumn(0, "fromdeptcd"));
  373. cap_magam.text = "";
  374. var oParam = {};
  375. oParam.id = "TRRSO21003";
  376. oParam.service = "deliveapp.DeliveMngt";
  377. oParam.method = "reqGetDistriDeptJaegoMagamChk";
  378. oParam.inds = "req=ds_magamsearch";
  379. oParam.outds = "ds_distrimagam=distrimagam";
  380. oParam.async = false;
  381. oParam.callback = "cf_TRRSO21003";
  382. tranf_submit(oParam);
  383. }
  384. }
  385. function cf_TRRSO21003(sSvcId, nErrorCode, sErrorMsg)
  386. {
  387. if(nErrorCode < 0)
  388. {
  389. return;
  390. }
  391. else
  392. {
  393. var endyn = ds_distrimagam.getColumn(0, "endyn");
  394. if(endyn == "Y")
  395. {
  396. cap_magam.text = "물류마감이 되어있습니다.";
  397. }
  398. else
  399. {
  400. cap_magam.text = "";
  401. var oParam = {};
  402. oParam.id = "TRRSO21002";
  403. oParam.service = "deliveapp.DeliveMngt";
  404. oParam.method = "reqGetDeptJaegoMagamChk";
  405. oParam.inds = "req=ds_magamsearch";
  406. oParam.outds = "ds_magam=magam";
  407. oParam.async = false;
  408. oParam.callback = "cf_TRRSO21002";
  409. tranf_submit(oParam);
  410. }
  411. }
  412. }
  413. function cf_TRRSO21002(sSvcId, nErrorCode, sErrorMsg)
  414. {
  415. if(nErrorCode < 0)
  416. {
  417. return;
  418. }
  419. else
  420. {
  421. var magamyn = ds_magam.getColumn(0, "magamyn");
  422. if(magamyn == "Y")
  423. {
  424. cap_magam.text = "해당부서는 현재 마감되어있습니다.";
  425. }
  426. else
  427. {
  428. cap_magam.text = "";
  429. }
  430. }
  431. }
  432. function fGetGoodDetail()
  433. {
  434. for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
  435. {
  436. var bDup = false;
  437. for(var i = 0; i < ds_main_movereq_movereqlist.rowcount; i++)
  438. {
  439. if( ds_main_movereq_movereqlist.getColumn(i, "goodcd") == ds_popgood_goodlist.getColumn(k, "goodcd"))
  440. {
  441. sysf_messageBox("물품코드가 중복되었습니다. [" + utlf_transEmptyToNull(ds_main_movereq_movereqlist.getColumn(i, "goodcd")) + "] ", "E999", "");
  442. bDup = true;
  443. continue;
  444. }
  445. }
  446. if( bDup == false )
  447. {
  448. ds_popgood.setColumn(0, "goodcd", ds_popgood_goodlist.getColumn(k, "goodcd"))
  449. var oParam = {};
  450. oParam.id = "TRRSO20104";
  451. oParam.service = "deliveapp.DeliveMngt";
  452. oParam.method = "reqGetGoodDetail";
  453. oParam.inds = "req=ds_popgood";
  454. oParam.outds = "ds_main_good_gooddetail=gooddetail";
  455. oParam.async = false;
  456. oParam.callback = "cf_TRRSO20104";
  457. tranf_submit(oParam);
  458. }
  459. }
  460. }
  461. function cf_TRRSO20104(sSvcId, nErrorCode, sErrorMsg)
  462. {
  463. if(nErrorCode < 0)
  464. {
  465. return;
  466. }
  467. else
  468. {
  469. if(!utlf_isNull(ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowcount-1, "goodcd")))
  470. {
  471. btn_add.click();
  472. }
  473. ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "goodcd", ds_main_good_gooddetail.getColumn(0, "goodcd"));
  474. ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "goodhngnm", ds_main_good_gooddetail.getColumn(0, "goodnm"));
  475. ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "goodspec", ds_main_good_gooddetail.getColumn(0, "goodspec"));
  476. ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowcount-1, "moveqty", "0");
  477. if(!utlf_isNull(ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "goodhngnm")))
  478. {
  479. ds_jaego_search.setColumn(0, "goodcd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "goodcd"));
  480. ds_jaego_search.setColumn(0, "ymd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "movedd"));
  481. ds_jaego_search.setColumn(0, "instcd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "instcd"));
  482. ds_jaego_search.setColumn(0, "fromdeptcd", ds_main_movereq_movereqlist.getColumn(ds_main_movereq_movereqlist.rowposition, "fromdeptcd"));
  483. var oParam = {};
  484. oParam.id = "TRRSO22802";
  485. oParam.service = "deliveapp.DeliveMngt";
  486. oParam.method = "reqGetMoveReqNowJaegoList";
  487. oParam.inds = "req=ds_jaego_search";
  488. oParam.outds = "ds_jaego_value=value";
  489. oParam.async = false;
  490. //oParam.callback = "cf_TRRSO22802";
  491. tranf_submit(oParam);
  492. var jaego = ds_jaego_value.getColumn(0, "jaegoqty");
  493. ds_main_movereq_movereqlist.setColumn(ds_main_movereq_movereqlist.rowposition, "jaegoqty", jaego);
  494. }
  495. }
  496. }
  497. function ds_main_movereq_movereqlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  498. {
  499. if(e.columnid == "moveqty")
  500. {
  501. var jaegoqty = obj.getColumn(e.row, "jaegoqty");
  502. var moveqty = obj.getColumn(e.row, "moveqty");
  503. if(parseFloat(jaegoqty) < parseFloat(moveqty))
  504. {
  505. sysf_messageBox("이동수량이 현재고량보다 많을 수는 없습니다.", "I999", "");
  506. obj.setColumn(e.row, "moveqty", "0");
  507. }
  508. }
  509. }
  510. function btn_help_onclick(obj:Button, e:ClickEventInfo)
  511. {
  512. frmf_modal("SMRSO22801", "SMRSO22801", "", "", "", "", "", "", "", "", "", "", "M");
  513. }
  514. function btn_jaego_onclick(obj:Button, e:ClickEventInfo)
  515. {
  516. if(utlf_isNull(grp_search.ipt_fromdeptcd.value))
  517. {
  518. sysf_messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
  519. grp_search.ipt_fromdeptcd.setFocus();
  520. return;
  521. }
  522. ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  523. ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_movefromdd.value);
  524. ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_fromdeptcd.value);
  525. ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_fromdeptcd.value);
  526. ds_popdelive.setColumn(0, "opener", "jaego");
  527. ds_popreq.setColumn(0, "count", "0");
  528. var objArg = new Object();
  529. objArg.arg_ds_popdata = ds_popdelive;
  530. frmf_modal("SMRSO21450", "SMRSO21450", objArg, "", "", "", "", "", "", "", "", "", "M");
  531. var cnt = ds_popreq.getColumn(0, "count");
  532. var mrows = ds_main_movereq_movereqlist.rowcount;
  533. var mcnt = parseInt(mrows)+parseInt(cnt);
  534. var j = 0;
  535. for(var i = mrows ; i < mcnt-1 ; i++)
  536. {
  537. ds_main_movereq_movereqlist.addRow();
  538. ds_main_movereq_movereqlist.setColumn(i, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goodcd"));
  539. ds_main_movereq_movereqlist.setColumn(i, "goodhngnm", ds_popsubdata_stocklist.getColumn(j, "goodnm"));
  540. ds_main_movereq_movereqlist.setColumn(i, "goodspec", ds_popsubdata_stocklist.getColumn(j, "goodspec"));
  541. ds_main_movereq_movereqlist.setColumn(i, "moveqty", "0");
  542. ds_main_movereq_movereqlist.setColumn(i, "instcd", grp_search.cmb_instcd.value);
  543. ds_main_movereq_movereqlist.setColumn(i, "movedd", grp_search.ipt_movefromdd.value);
  544. ds_main_movereq_movereqlist.setColumn(i, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
  545. ds_main_movereq_movereqlist.setColumn(i, "fromdeptnm", grp_search.opt_fromdeptcd.value);
  546. ds_main_movereq_movereqlist.setColumn(i, "movegubun", "1");
  547. ds_jaego_search.setColumn(0, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goodcd"));
  548. ds_jaego_search.setColumn(0, "ymd", grp_search.ipt_movefromdd.value);
  549. ds_jaego_search.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  550. ds_jaego_search.setColumn(0, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
  551. var oParam = {};
  552. oParam.id = "TRRSO22802";
  553. oParam.service = "deliveapp.DeliveMngt";
  554. oParam.method = "reqGetMoveReqNowJaegoList";
  555. oParam.inds = "req=ds_jaego_search";
  556. oParam.outds = "ds_jaego_value=value";
  557. oParam.async = false;
  558. //oParam.callback = "cf_TRRSO22802";
  559. tranf_submit(oParam);
  560. var jaego = ds_jaego_value.getColumn(0, "jaegoqty");
  561. ds_main_movereq_movereqlist.setColumn(i, "jaegoqty", jaego);
  562. j++;
  563. }
  564. }
  565. function btn_add_onclick(obj:Button, e:ClickEventInfo)
  566. {
  567. var addRow = ds_main_movereq_movereqlist.addRow();
  568. // grd_movereqlist.setCellProperty("Body", grd_movereqlist.getBindCellIndex("Body", "goodcd"), "edittype", "text");
  569. // grd_movereqlist.setCellProperty("Body", grd_movereqlist.getBindCellIndex("Body", "fromdeptnm"), "edittype", "text");
  570. // grd_movereqlist.setCellProperty("Body", grd_movereqlist.getBindCellIndex("Body", "todeptnm"), "edittype", "text");
  571. ds_main_movereq_movereqlist.setColumn(addRow, "instcd", grp_search.cmb_instcd.value);
  572. ds_main_movereq_movereqlist.setColumn(addRow, "movedd", grp_search.ipt_movefromdd.value);
  573. ds_main_movereq_movereqlist.setColumn(addRow, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
  574. ds_main_movereq_movereqlist.setColumn(addRow, "fromdeptnm", grp_search.opt_fromdeptcd.value);
  575. ds_main_movereq_movereqlist.setColumn(addRow, "movegubun", "1");
  576. }
  577. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  578. {
  579. if(ds_main_movereq_movereqlist.getRowType(ds_main_movereq_movereqlist.rowposition) == "2")
  580. {
  581. ds_main_movereq_movereqlist.deleteRow(ds_main_movereq_movereqlist.rowposition);
  582. }
  583. else
  584. {
  585. ds_main_movereq_movereqlist.updatecontrol = false;
  586. ds_main_movereq_movereqlist.setRowType(ds_main_movereq_movereqlist.rowposition, "d");
  587. ds_main_movereq_movereqlist.updatecontrol = true;
  588. }
  589. }
  590. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  591. {
  592. for(var i = 0 ; i < ds_main_movereq_movereqlist.rowcount; i++)
  593. {
  594. var todeptnm = ds_main_movereq_movereqlist.getColumn(i, "todeptnm");
  595. if(utlf_isNull(todeptnm))
  596. {
  597. sysf_messageBox(i+"번째줄 물품받는부서가 없습니다. 확인해주십시오.", "E999", "");
  598. return;
  599. }
  600. }
  601. if(ds_main_movereq_movereqlist.rowcount != 0)
  602. {
  603. var instcd = ds_main_movereq_movereqlist.getColumn(0, "instcd");
  604. var dd = ds_main_movereq_movereqlist.getColumn(0, "movedd");
  605. var fromdeptcd = ds_main_movereq_movereqlist.getColumn(0, "fromdeptcd");
  606. var todeptcd = ds_main_movereq_movereqlist.getColumn(0, "todeptcd");
  607. if(utlf_isNull(instcd))
  608. {
  609. ds_magamsearch.setColumn(0, "instcd", ds_send_search.getColumn(0, "instcd"));
  610. ds_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "movefromdd"));
  611. ds_magamsearch.setColumn(0, "deptcd", ds_send_search.getColumn(0, "fromdeptcd"));
  612. }
  613. else
  614. {
  615. ds_magamsearch.setColumn(0, "instcd", instcd);
  616. ds_magamsearch.setColumn(0, "dd", dd);
  617. ds_magamsearch.setColumn(0, "deptcd", fromdeptcd);
  618. }
  619. cap_magam.text = "";
  620. var oParam = {};
  621. oParam.id = "TRRSO21003";
  622. oParam.service = "deliveapp.DeliveMngt";
  623. oParam.method = "reqGetDistriDeptJaegoMagamChk";
  624. oParam.inds = "req=ds_magamsearch";
  625. oParam.outds = "ds_distrimagam=distrimagam";
  626. oParam.async = false;
  627. oParam.callback = "cf_TRRSO21003_1";
  628. tranf_submit(oParam);
  629. }
  630. else
  631. {
  632. return;
  633. }
  634. var oParam = {};
  635. oParam.id = "TXRSO22801";
  636. oParam.service = "deliveapp.DeliveMngt";
  637. oParam.method = "reqExeMoveReqList";
  638. oParam.inds = "movereqlist=ds_main_movereq_movereqlist:u";
  639. oParam.outds = "";
  640. oParam.async = false;
  641. oParam.callback = "cf_TXRSO22801";
  642. tranf_submit(oParam);
  643. }
  644. function cf_TXRSO22801(sSvcId, nErrorCode, sErrorMsg)
  645. {
  646. if(nErrorCode < 0)
  647. {
  648. return;
  649. }
  650. else
  651. {
  652. grp_search.btn_search.click();
  653. }
  654. }
  655. function cf_TRRSO21003_1(sSvcId, nErrorCode, sErrorMsg)
  656. {
  657. if(nErrorCode < 0)
  658. {
  659. return;
  660. }
  661. else
  662. {
  663. var endyn = ds_distrimagam.getColumn(0, "endyn");
  664. if(endyn == "Y")
  665. {
  666. cap_magam.text = "물류마감이 되어있습니다.";
  667. sysf_messageBox("물류마감이 되어 저장이 불가능합니다.", "E999", "");
  668. return;
  669. }
  670. else
  671. {
  672. cap_magam.text = "";
  673. var oParam = {};
  674. oParam.id = "TRRSO21002";
  675. oParam.service = "deliveapp.DeliveMngt";
  676. oParam.method = "reqGetDeptJaegoMagamChk";
  677. oParam.inds = "req=ds_magamsearch";
  678. oParam.outds = "ds_magam=magam";
  679. oParam.async = false;
  680. oParam.callback = "cf_TRRSO21002_1";
  681. tranf_submit(oParam);
  682. }
  683. }
  684. }
  685. function cf_TRRSO21002_1(sSvcId, nErrorCode, sErrorMsg)
  686. {
  687. if(nErrorCode < 0)
  688. {
  689. return;
  690. }
  691. else
  692. {
  693. var magamyn = ds_magam.getColumn(0, "magamyn");
  694. if(magamyn == "Y")
  695. {
  696. cap_magam.text = "해당부서는 현재 마감되어있습니다.";
  697. sysf_messageBox("물품보내는부서가 마감이 되어 저장이 불가능합니다.", "E999", "");
  698. }
  699. else
  700. {
  701. cap_magam.text = "";
  702. }
  703. }
  704. }
  705. function grd_movereqlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  706. {
  707. if(e.col == 2)
  708. {
  709. ds_popgood.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  710. ds_popgood.setColumn(0, "delivedd", grp_search.ipt_movefromdd.value);
  711. ds_popgood.setColumn(0, "basedd", grp_search.ipt_movefromdd.value);
  712. ds_popgood.setColumn(0, "selectyn", "");
  713. var objArg = new Object();
  714. objArg.arg_ds_popdata = ds_popgood;
  715. frmf_modal("SPRSO20700", "SPRSO20700", objArg, "", "", "", "", "", "", "", "", "", "M");
  716. if(ds_popgood.getColumn(0, "selectyn") == "Y")
  717. {
  718. fGetGoodDetail();
  719. grd_movereqlist.setCellPos(grd_movereqlist.getBindCellIndex("body", "moveqty"));
  720. grd_movereqlist.showEditor(true);
  721. }
  722. }
  723. else if(e.col == 7)
  724. {
  725. misfOpenPopUpList("02", grd_movereqlist,"", "fromdeptcd,fromdeptnm") ;
  726. }
  727. else if(e.col == 8)
  728. {
  729. misfOpenPopUpList("02", grd_movereqlist,"", "todeptcd,todeptnm") ;
  730. }
  731. }
  732. ]]></Script>
  733. </Form>
  734. </FDL>