SMRSO23200_부서창고반납.xfdl 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSO23200" position="absolute 0 0 1201 786" titletext="부서창고반납" oninit="SMRSO23200_oninit" onload="SMRSO23200_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_save" taborder="1" text="저장" class="btn4" position="absolute 1138 15 1194 37" anchor="top right" onclick="btn_save_onclick"/>
  10. <Div id="grp_search" taborder="2" class="div_SA2" position="absolute 0 40 1195 100" anchor="left top right">
  11. <Layouts>
  12. <Layout width="1195" height="60">
  13. <Button id="btn_search" taborder="6" text="조회" class="btn1" position="absolute 1128 20 1184 42" anchor="top right" onclick="grp_search_btn_search_onclick"/>
  14. <Combo id="cmb_instcd" taborder="7" innerdataset="ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 135 8 360 27"/>
  15. <Static id="cap_instcd" text="기관:" class="search_name" position="absolute 13 9 145 26"/>
  16. <Calendar id="ipt_fromdd" taborder="8" autoselect="true" autoskip="true" position="absolute 462 8 563 27" mask="yyyy-mm-dd"/>
  17. <Static id="caption20" text="물품보내는부서:" class="search_name" position="absolute 13 33 131 50"/>
  18. <Shape id="line30" linetype="vertical" class="line_4" position="absolute 1112 5 1118 55" anchor="top right"/>
  19. <Button id="btn_delivedeptcd" taborder="9" class="icon_search" position="absolute 217 35 233 51" onclick="grp_search_btn_delivedeptcd_onclick"/>
  20. <Edit id="ipt_fromdeptcd" taborder="10" autoselect="true" autoskip="true" class="input_default" position="absolute 135 33 215 52" onkeydown="grp_search_ipt_fromdeptcd_onkeydown"/>
  21. <Edit id="opt_fromdeptcd" taborder="11" readonly="true" class="output" position="absolute 235 33 360 52"/>
  22. <Static id="caption9" text="반납일자:" class="search_name" position="absolute 386 9 472 26"/>
  23. <Edit id="ipt_goodnm" taborder="12" position="absolute 886 8 1018 27"/>
  24. <Static id="caption5" text="물품코드 :" class="search_name" position="absolute 701 8 791 25"/>
  25. <Edit id="ipt_goodcd" taborder="13" autoselect="true" autoskip="true" position="absolute 786 8 866 27"/>
  26. <Button id="btn_goodcd" taborder="14" class="icon_search" position="absolute 868 9 884 25" onclick="grp_search_btn_goodcd_onclick"/>
  27. <Calendar id="ipt_todd" taborder="15" autoselect="true" autoskip="true" position="absolute 577 8 678 27" mask="yyyy-mm-dd"/>
  28. <Static id="caption1" text="~" position="absolute 565 9 580 29"/>
  29. </Layout>
  30. </Layouts>
  31. </Div>
  32. <Button id="btn_del" taborder="3" text="행삭제" class="btn2" position="absolute 1142 106 1195 125" anchor="top right" onclick="btn_del_onclick"/>
  33. <Static id="caption4" text="반납내역" class="tit_2" position="absolute 0 109 215 130"/>
  34. <Button id="btn_add" taborder="4" text="행추가" class="btn2" position="absolute 1088 106 1141 125" anchor="top right" onclick="btn_add_onclick"/>
  35. <Shape id="line3" class="line_10" position="absolute 0 125 1195 131" anchor="left top right"/>
  36. <Grid id="grd_deptreturnlist" taborder="5" binddataset="ds_main_deptreturn_deptreturnlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 130 1195 780" anchor="all" oncellclick="grd_deptreturnlist_oncellclick" onexpanddown="grd_deptreturnlist_onexpanddown">
  37. <Formats>
  38. <Format id="default">
  39. <Columns>
  40. <Column size="23"/>
  41. <Column size="80"/>
  42. <Column size="125"/>
  43. <Column size="181"/>
  44. <Column size="188"/>
  45. <Column size="60"/>
  46. <Column size="199"/>
  47. <Column size="130"/>
  48. <Column size="130"/>
  49. <Column size="60"/>
  50. <Column size="0"/>
  51. <Column size="0"/>
  52. <Column size="0"/>
  53. <Column size="0"/>
  54. <Column size="0"/>
  55. <Column size="0"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. </Columns>
  59. <Rows>
  60. <Row size="24" band="head"/>
  61. <Row size="24"/>
  62. </Rows>
  63. <Band id="head">
  64. <Cell/>
  65. <Cell col="1" text="반납일자"/>
  66. <Cell col="2" text="물품코드"/>
  67. <Cell col="3" text="물품명"/>
  68. <Cell col="4" text="규격"/>
  69. <Cell col="5" text="반납수량"/>
  70. <Cell col="6" text="반납사유"/>
  71. <Cell col="7" text="물품보내는부서"/>
  72. <Cell col="8" text="물품받는부서"/>
  73. <Cell col="9" text="이동요청"/>
  74. <Cell col="10" text="물보부"/>
  75. <Cell col="11" text="물받부"/>
  76. <Cell col="12" text="부서반납NO"/>
  77. <Cell col="13" text="창고구분"/>
  78. <Cell col="14" text="기관"/>
  79. <Cell col="15" text="삭제키(선납)"/>
  80. <Cell col="16" text="삭제키(창고)"/>
  81. <Cell col="17" text="단가"/>
  82. </Band>
  83. <Band id="body">
  84. <Cell celltype="head"/>
  85. <Cell col="1" displaytype="date" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' ? 'none' : 'date'" text="bind:returndd" editautoselect="true" calendardisplaynulltype="nulltext" enable="false"/>
  86. <Cell col="2" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' || getRowType(currow) != '2' ? 'none' : 'text'" text="bind:goodcd" editautoselect="true" expandshow="show" enable="false"/>
  87. <Cell col="3" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' ? 'none' : 'text'" text="bind:goodhngnm" editautoselect="true"/>
  88. <Cell col="4" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' ? 'none' : 'text'" text="bind:goodspec" editautoselect="true"/>
  89. <Cell col="5" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' ? 'none' : 'text'" style="align:center middle;" text="bind:returnqty" editautoselect="true"/>
  90. <Cell col="6" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' ? 'none' : 'text'" text="bind:cmt" editautoselect="true"/>
  91. <Cell col="7" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' || getRowType(currow) != '2' ? 'none' : 'text'" text="bind:fromdeptnm" editautoselect="true" expandshow="show" enable="false"/>
  92. <Cell col="8" displaytype="text" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' || getRowType(currow) != '2' ? 'none' : 'text'" text="bind:todeptnm" editautoselect="true" expandshow="show" enable="false"/>
  93. <Cell col="9" displaytype="combo" edittype="expr:ds_send_search.getColumn(0, 'granton') == 'N' &amp;&amp; returngubun == '3' ? 'none' : 'combo'" style="align:center middle;" text="bind:returngubun" editautoselect="true" combodataset="ds_cmb_returngubun" combocodecol="value" combodatacol="label"/>
  94. <Cell col="10" text="bind:fromdeptcd"/>
  95. <Cell col="11" text="bind:todeptcd"/>
  96. <Cell col="12" text="bind:returnno"/>
  97. <Cell col="13" text="bind:wareflag"/>
  98. <Cell col="14" text="bind:instcd"/>
  99. <Cell col="15" text="bind:instid"/>
  100. <Cell col="16" text="bind:wareinstid"/>
  101. <Cell col="17" text="bind:goodunitcost"/>
  102. </Band>
  103. </Format>
  104. </Formats>
  105. </Grid>
  106. <Button id="btn_jaego" taborder="6" text="부서재고" class="btn2" position="absolute 1023 106 1087 125" anchor="top right" onclick="btn_jaego_onclick"/>
  107. </Layout>
  108. </Layouts>
  109. <Objects>
  110. <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">
  111. <ColumnInfo>
  112. <Column id="instcd" type="STRING" size="256"/>
  113. <Column id="fromdeptcd" type="STRING" size="256"/>
  114. <Column id="fromdeptnm" type="STRING" size="256"/>
  115. <Column id="fromdd" type="STRING" size="256"/>
  116. <Column id="todd" type="STRING" size="256"/>
  117. <Column id="goodcd" type="STRING" size="256"/>
  118. <Column id="goodnm" type="STRING" size="256"/>
  119. </ColumnInfo>
  120. <Rows>
  121. <Row>
  122. <Col id="instcd"/>
  123. <Col id="fromdeptcd"/>
  124. <Col id="fromdeptnm"/>
  125. <Col id="fromdd"/>
  126. <Col id="todd"/>
  127. <Col id="goodcd"/>
  128. <Col id="goodnm"/>
  129. </Row>
  130. </Rows>
  131. </Dataset>
  132. <Dataset id="ds_main_deptreturn_deptreturnlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  133. <ColumnInfo>
  134. <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
  135. <Column id="returndd" type="STRING" size="256" sumtext="반납일자"/>
  136. <Column id="fromdeptcd" type="STRING" size="256" sumtext="From부서"/>
  137. <Column id="fromdeptnm" type="STRING" size="256" sumtext="From부서"/>
  138. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  139. <Column id="goodhngnm" type="STRING" size="256" sumtext="물품명"/>
  140. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  141. <Column id="deliveunit" type="STRING" size="256" sumtext="단가"/>
  142. <Column id="returnno" type="STRING" size="256" sumtext="반납번호"/>
  143. <Column id="returngubun" type="STRING" size="256" sumtext="반납구분"/>
  144. <Column id="todeptcd" type="STRING" size="256" sumtext="To부서"/>
  145. <Column id="todeptnm" type="STRING" size="256" sumtext="To부서"/>
  146. <Column id="returnqty" type="STRING" size="256" sumtext="반납수량"/>
  147. <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
  148. <Column id="cmt" type="STRING" size="256" sumtext="반납사유"/>
  149. <Column id="instid" type="STRING" size="256" sumtext="삭제키(선납)"/>
  150. <Column id="wareinstid" type="STRING" size="256" sumtext="삭제키(창고)"/>
  151. <Column id="goodunitcost" type="STRING" size="256" sumtext="제품단가"/>
  152. </ColumnInfo>
  153. </Dataset>
  154. <Dataset id="ds_cmb_returngubun" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  155. <ColumnInfo>
  156. <Column id="label" type="STRING" size="256"/>
  157. <Column id="value" type="STRING" size="256"/>
  158. </ColumnInfo>
  159. <Rows>
  160. <Row>
  161. <Col id="label">신규</Col>
  162. <Col id="value">1</Col>
  163. </Row>
  164. <Row>
  165. <Col id="label">요청</Col>
  166. <Col id="value">2</Col>
  167. </Row>
  168. <Row>
  169. <Col id="label">승인</Col>
  170. <Col id="value">3</Col>
  171. </Row>
  172. </Rows>
  173. </Dataset>
  174. <Dataset id="ds_main_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  175. <ColumnInfo>
  176. <Column id="cnstnm" type="STRING" size="256"/>
  177. <Column id="cnstcd" type="STRING" size="256"/>
  178. </ColumnInfo>
  179. </Dataset>
  180. <Dataset id="ds_popdelive" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  181. <ColumnInfo>
  182. <Column id="instcd" type="STRING" size="256"/>
  183. <Column id="delivedd" type="STRING" size="256"/>
  184. <Column id="delivedeptcd" type="STRING" size="256"/>
  185. <Column id="delivedeptnm" type="STRING" size="256"/>
  186. <Column id="opener" type="STRING" size="256"/>
  187. </ColumnInfo>
  188. <Rows>
  189. <Row>
  190. <Col id="instcd"/>
  191. <Col id="delivedd"/>
  192. <Col id="delivedeptcd"/>
  193. <Col id="delivedeptnm"/>
  194. <Col id="opener"/>
  195. </Row>
  196. </Rows>
  197. </Dataset>
  198. <Dataset id="ds_popreq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  199. <ColumnInfo>
  200. <Column id="count" type="STRING" size="256"/>
  201. </ColumnInfo>
  202. <Rows>
  203. <Row/>
  204. </Rows>
  205. </Dataset>
  206. <Dataset id="ds_popsubdata_stocklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  207. <ColumnInfo>
  208. <Column id="goodnm" type="STRING" size="256"/>
  209. <Column id="goodcd" type="STRING" size="256"/>
  210. <Column id="goodspec" type="STRING" size="256"/>
  211. <Column id="wareflag" type="STRING" size="256"/>
  212. </ColumnInfo>
  213. </Dataset>
  214. <Dataset id="ds_popgood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  215. <ColumnInfo>
  216. <Column id="instcd" type="STRING" size="256"/>
  217. <Column id="wareflag" type="STRING" size="256"/>
  218. <Column id="delivedd" type="STRING" size="256"/>
  219. <Column id="basedd" type="STRING" size="256"/>
  220. <Column id="selectyn" type="STRING" size="256"/>
  221. <Column id="goodcd" type="STRING" size="256"/>
  222. </ColumnInfo>
  223. <Rows>
  224. <Row>
  225. <Col id="instcd"/>
  226. <Col id="wareflag"/>
  227. <Col id="delivedd"/>
  228. <Col id="basedd"/>
  229. <Col id="selectyn"/>
  230. <Col id="goodcd"/>
  231. </Row>
  232. </Rows>
  233. </Dataset>
  234. <Dataset id="ds_popgood_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  235. <ColumnInfo>
  236. <Column id="goodcd" type="STRING" size="256"/>
  237. </ColumnInfo>
  238. </Dataset>
  239. <Dataset id="ds_main_good_gooddetail" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  240. <ColumnInfo>
  241. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  242. <Column id="goodnm" type="STRING" size="256" sumtext="물품명"/>
  243. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  244. <Column id="deliveunit" type="STRING" size="256" sumtext="출고단위"/>
  245. <Column id="exchqty" type="STRING" size="256" sumtext="환산배수"/>
  246. <Column id="siqty" type="STRING" size="256" sumtext="시점재고"/>
  247. <Column id="hunqty" type="STRING" size="256" sumtext="현재고"/>
  248. <Column id="goodunitcost" type="STRING" size="256" sumtext="단가"/>
  249. <Column id="allsizespecid" type="STRING" size="256" sumtext="ALLSIZE"/>
  250. <Column id="purcunit" type="STRING" size="256" sumtext="입고단위"/>
  251. <Column id="mainusedeptcd" type="STRING" size="256" sumtext="주사용부서코드"/>
  252. <Column id="maincustlastsuplplce" type="STRING" size="256" sumtext="최종공급처"/>
  253. <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
  254. <Column id="wstyn" type="STRING" size="256" sumtext="의료폐기물 용기 여부"/>
  255. </ColumnInfo>
  256. </Dataset>
  257. </Objects>
  258. <Bind>
  259. <BindItem id="item0" compid="grp_search.cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
  260. <BindItem id="item1" compid="grp_search.ipt_fromdd" propid="value" datasetid="ds_send_search" columnid="fromdd"/>
  261. <BindItem id="item2" compid="grp_search.ipt_todd" propid="value" datasetid="ds_send_search" columnid="todd"/>
  262. <BindItem id="item3" compid="grp_search.ipt_goodcd" propid="value" datasetid="ds_send_search" columnid="goodcd"/>
  263. <BindItem id="item4" compid="grp_search.ipt_goodnm" propid="value" datasetid="ds_send_search" columnid="goodnm"/>
  264. <BindItem id="item5" compid="grp_search.ipt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptcd"/>
  265. <BindItem id="item6" compid="grp_search.opt_fromdeptcd" propid="value" datasetid="ds_send_search" columnid="fromdeptnm"/>
  266. </Bind>
  267. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  268. * System Name :
  269. * Job Name :
  270. * Creator :
  271. * Make Date : 2017-06-19
  272. * Description :
  273. *---------------------------------------------------------------------------------------
  274. * Modify Date Modifier Modify Description
  275. *---------------------------------------------------------------------------------------
  276. * 2017-06-19 Live Converter TF->XP
  277. *
  278. *---------------------------------------------------------------------------------------
  279. ****************************************************************************************/
  280. include "com_commonxp::comm_main.xjs";
  281. include "mis_miscommonxp::MIS.xjs";
  282. include "mis_miscommonxp::RSZ001.xjs";
  283. var granton = "N"
  284. function SMRSO23200_oninit(obj:Form, e:InitEventInfo)
  285. {
  286. frmf_initForm(obj);
  287. }
  288. function SMRSO23200_onload(obj:Form, e:LoadEventInfo)
  289. {
  290. grdf_initGrid(grd_deptreturnlist);
  291. grdf_setRowTypeIcon(grd_deptreturnlist);
  292. misfComboInstCdListMulti("grp_search.cmb_instcd",utlf_getCurrentDate(),"","N");
  293. ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  294. ds_send_search.setColumn(0, "fromdd", utlf_getCurrentDate());
  295. ds_send_search.setColumn(0, "todd", utlf_getCurrentDate());
  296. ds_send_search.setColumn(0, "fromdeptcd", sysf_getUserInfo("dutunitcd"));
  297. ds_send_search.setColumn(0, "fromdeptnm", sysf_getUserInfo("dutunitnm"));
  298. dsf_makeValue(ds_send_search, "granton", "string", granton, 0);
  299. if(sysf_getUserInfo("dutunitcd") == "4020334000" || sysf_getUserInfo("userid") == "MIS")
  300. {
  301. dsf_makeValue(ds_send_search, "granton", "string", "Y", 0);
  302. }
  303. }
  304. function ds_send_search_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  305. {
  306. if(e.columnid == "goodcd")
  307. {
  308. if(String(e.newvalue).length == 0)
  309. {
  310. grp_search.ipt_goodnm.value = "";
  311. }
  312. else
  313. {
  314. grp_search.ipt_goodcd.value = e.newvalue;
  315. grp_search.ipt_goodcd.setFocus();
  316. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodcd","goodcd," + grp_search.cmb_instcd.value + "," + grp_search.ipt_goodcd.value ,"","goodcd,goodnm", grp_search.ipt_goodcd,"SPRSD00210","instcd","grp_search.cmb_instcd");
  317. //rszfValidationCheck("TRRAC00111", "acntlist", "acntflag,useyn,jobgb,srhtxt","1,,," + ds_main_gooddet_gooddetlist.getColumn( 0, "amtacnt") ,"","amtacnt,amtacntnm" ,grp_detail.ipt_amtacnt,"PPRAC00100","","");
  318. }
  319. }
  320. if(e.columnid == "goodnm")
  321. {
  322. if(String(e.newvalue).length == 0)
  323. {
  324. grp_search.ipt_goodcd.value = "";
  325. }
  326. else
  327. {
  328. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodnm", "goodcd," + grp_search.cmb_instcd.value + "," + grp_search.ipt_goodnm.value ,"","goodcd,goodnm",grp_search.ipt_goodnm,"SPRSD00210","instcd","grp_search.cmb_instcd");
  329. }
  330. }
  331. if(e.columnid == "fromdeptcd")
  332. {
  333. grp_search.ipt_fromdeptcd.value = e.newvalue;
  334. grp_search.ipt_fromdeptcd.setFocus();
  335. misfValidationCheck("02", "", "fromdeptcd,fromdeptnm" );
  336. }
  337. }
  338. function grp_search_btn_goodcd_onclick(obj:Button, e:ClickEventInfo)
  339. {
  340. //rszfOpenPopUpListByWndName(grp_search.ipt_goodcd,"","","SPRSD00210","instcd,goodcd,goodnm,goodflag,allsizespecid","grp_search.cmb_instcd");
  341. rszfOpenPopUpListByWndName(grp_search.ipt_goodcd,"","goodcd,allsizespecid,goodnm","SPRSD00210","instcd","grp_search.cmb_instcd");
  342. var goodcd = frmf_getParameter("goodcd")
  343. trace(goodcd)
  344. grp_search.ipt_goodcd.value = goodcd;
  345. }
  346. function grp_search_ipt_fromdeptcd_onkeydown(obj:Edit, e:KeyEventInfo)
  347. {
  348. if(e.keycode == 13)
  349. {
  350. obj.updateToDataset();
  351. }
  352. }
  353. function grp_search_btn_delivedeptcd_onclick(obj:Button, e:ClickEventInfo)
  354. {
  355. misfOpenPopUpList("02", ds_send_search,"", "fromdeptcd,fromdeptnm");
  356. }
  357. function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  358. {
  359. if(String(grp_search.ipt_fromdd.value).length < 8)
  360. {
  361. sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
  362. grp_search.ipt_fromdd.setFocus();
  363. return;
  364. }
  365. if(String(grp_search.ipt_todd.value).length < 8)
  366. {
  367. sysf_messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
  368. grp_search.ipt_todd.setFocus();
  369. return;
  370. }
  371. misfGridInit(grd_deptreturnlist);
  372. var oParam = {};
  373. oParam.id = "TRRSO23201";
  374. oParam.service = "deliveapp.DeliveMngt";
  375. oParam.method = "reqGetDeptReturnList";
  376. oParam.inds = "req=ds_send_search";
  377. oParam.outds = "ds_main_deptreturn_deptreturnlist=deptreturnlist";
  378. oParam.async = false;
  379. //oParam.callback = "cf_TRRSO23201";
  380. tranf_submit(oParam);
  381. }
  382. function btn_jaego_onclick(obj:Button, e:ClickEventInfo)
  383. {
  384. if(utlf_isNull(grp_search.ipt_fromdeptcd.value))
  385. {
  386. sysf_messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
  387. grp_search.ipt_fromdeptcd.setFocus();
  388. return;
  389. }
  390. ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  391. ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_fromdd.value);
  392. ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_fromdeptcd.value);
  393. ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_fromdeptcd.value);
  394. ds_popdelive.setColumn(0, "opener", "jaego");
  395. ds_popreq.setColumn(0, "count", "0");
  396. var objArg = new Object();
  397. objArg.arg_ds_popdata = ds_popdelive;
  398. frmf_modal("SMRSO21450", "SMRSO21450", objArg, "", "", "", "", "", "", "", "", "", "M");
  399. var cnt = ds_popreq.getColumn(0, "count");
  400. var mrows = ds_main_deptreturn_deptreturnlist.rowcount;
  401. var mcnt = parseInt(mrows)+parseInt(cnt);
  402. var j = 0;
  403. for(var i = mrows ; i < mcnt-1 ; i++)
  404. {
  405. ds_main_deptreturn_deptreturnlist.addRow();
  406. ds_main_deptreturn_deptreturnlist.setColumn(i, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goocd"));
  407. ds_main_deptreturn_deptreturnlist.setColumn(i, "goodhngnm", ds_popsubdata_stocklist.getColumn(j, "goodnm"));
  408. ds_main_deptreturn_deptreturnlist.setColumn(i, "goodspec", ds_popsubdata_stocklist.getColumn(j, "goodspec"));
  409. ds_main_deptreturn_deptreturnlist.setColumn(i, "wareflag", ds_popsubdata_stocklist.getColumn(j, "wareflag"));
  410. ds_main_deptreturn_deptreturnlist.setColumn(i, "instcd", grp_search.cmb_instcd.value);
  411. ds_main_deptreturn_deptreturnlist.setColumn(i, "returndd", grp_search.ipt_fromdd.value);
  412. ds_main_deptreturn_deptreturnlist.setColumn(i, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
  413. ds_main_deptreturn_deptreturnlist.setColumn(i, "fromdeptnm", grp_search.opt_fromdeptcd.value);
  414. ds_main_deptreturn_deptreturnlist.setColumn(i, "returngubun", "1");
  415. ds_main_deptreturn_deptreturnlist.setColumn(i, "todeptcd", "4020334000");
  416. ds_main_deptreturn_deptreturnlist.setColumn(i, "todeptnm", "물류파트");
  417. j++;
  418. }
  419. }
  420. function btn_add_onclick(obj:Button, e:ClickEventInfo)
  421. {
  422. var addRow = ds_main_deptreturn_deptreturnlist.addRow();
  423. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "instcd", grp_search.cmb_instcd.value);
  424. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "returndd", grp_search.ipt_fromdd.value);
  425. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "fromdeptcd", grp_search.ipt_fromdeptcd.value);
  426. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "fromdeptnm", grp_search.opt_fromdeptcd.value);
  427. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "returngubun", "1");
  428. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "todeptcd", "4020334000");
  429. ds_main_deptreturn_deptreturnlist.setColumn(addRow, "todeptnm", "물류파트");
  430. }
  431. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  432. {
  433. if(ds_main_deptreturn_deptreturnlist.getRowType(ds_main_deptreturn_deptreturnlist.rowposition) == "2")
  434. {
  435. ds_main_deptreturn_deptreturnlist.deleteRow(ds_main_deptreturn_deptreturnlist.rowposition)
  436. }
  437. else
  438. {
  439. ds_main_deptreturn_deptreturnlist.updatecontrol = false;
  440. ds_main_deptreturn_deptreturnlist.setRowType(ds_main_deptreturn_deptreturnlist.rowposition, "d");
  441. ds_main_deptreturn_deptreturnlist.updatecontrol = true;
  442. }
  443. }
  444. function fGetGoodDetail()
  445. {
  446. for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
  447. {
  448. var bDup = false;
  449. for(var i = 0; i < ds_main_deptreturn_deptreturnlist.rowcount; i++)
  450. {
  451. if( ds_main_deptreturn_deptreturnlist.getColumn(i, "goodcd") == ds_popgood_goodlist.getColumn(k, "goodcd"))
  452. {
  453. sysf_messageBox("물품코드가 중복되었습니다. [" + utlf_transEmptyToNull(ds_main_deptreturn_deptreturnlist.getColumn(i, "goodcd")) + "] ", "E999", "");
  454. bDup = true;
  455. continue;
  456. }
  457. }
  458. if( bDup == false )
  459. {
  460. ds_popgood.setColumn(0, "goodcd", ds_popgood_goodlist.getColumn(k, "goodcd"))
  461. var oParam = {};
  462. oParam.id = "TRRSO20104";
  463. oParam.service = "deliveapp.DeliveMngt";
  464. oParam.method = "reqGetGoodDetail";
  465. oParam.inds = "req=ds_popgood";
  466. oParam.outds = "ds_main_good_gooddetail=gooddetail";
  467. oParam.async = false;
  468. oParam.callback = "cf_TRRSO20104";
  469. tranf_submit(oParam);
  470. }
  471. }
  472. }
  473. function cf_TRRSO20104(sSvcId, nErrorCode, sErrorMsg)
  474. {
  475. if(nErrorCode < 0)
  476. {
  477. return;
  478. }
  479. else
  480. {
  481. if(!utlf_isNull(ds_main_deptreturn_deptreturnlist.getColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodcd")))
  482. {
  483. btn_add.click();
  484. }
  485. ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodcd", ds_main_good_gooddetail.getColumn(0, "goodcd"));
  486. ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodhngnm", ds_main_good_gooddetail.getColumn(0, "goodnm"));
  487. ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "goodspec", ds_main_good_gooddetail.getColumn(0, "goodspec"));
  488. ds_main_deptreturn_deptreturnlist.setColumn(ds_main_deptreturn_deptreturnlist.rowcount-1, "returnqty", "0");
  489. }
  490. }
  491. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  492. {
  493. for(var i = 0; i < ds_main_deptreturn_deptreturnlist.rowcount; i++)
  494. {
  495. var todeptnm = ds_main_deptreturn_deptreturnlist.getColumn(i, "todeptnm");
  496. if(utlf_isNull(todeptnm))
  497. {
  498. sysf_messageBox(i+1+"번째줄 물품받는부서가 없습니다. 확인해주십시오.", "E999", "");
  499. return;
  500. }
  501. }
  502. var oParam = {};
  503. oParam.id = "TXRSO23201";
  504. oParam.service = "deliveapp.DeliveMngt";
  505. oParam.method = "reqExeDeptReturnList";
  506. oParam.inds = "deptreturnlist=ds_main_deptreturn_deptreturnlist:u";
  507. oParam.outds = "";
  508. oParam.async = false;
  509. oParam.callback = "cf_TXRSO23201";
  510. tranf_submit(oParam);
  511. }
  512. function cf_TXRSO23201(sSvcId, nErrorCode, sErrorMsg)
  513. {
  514. if(nErrorCode < 0)
  515. {
  516. return;
  517. }
  518. else
  519. {
  520. grp_search.btn_search.click();
  521. }
  522. }
  523. function grd_deptreturnlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  524. {
  525. if(e.col == 2)
  526. {
  527. ds_popgood.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  528. ds_popgood.setColumn(0, "delivedd", grp_search.ipt_fromdd.value);
  529. ds_popgood.setColumn(0, "basedd", grp_search.ipt_fromdd.value);
  530. ds_popgood.setColumn(0, "selectyn", "");
  531. var objArg = new Object();
  532. objArg.arg_ds_popdata = ds_popgood;
  533. frmf_modal("SPRSO20700", "SPRSO20700", objArg, "", "", "", "", "", "", "", "", "", "M");
  534. if(ds_popgood.getColumn(0, "selectyn") == "Y")
  535. {
  536. fGetGoodDetail();
  537. grd_deptreturnlist.setCellPos(grd_deptreturnlist.getBindCellIndex("body", "returnqty"));
  538. grd_deptreturnlist.showEditor(true);
  539. }
  540. }
  541. else if(e.col == 7)
  542. {
  543. misfOpenPopUpList("02", ds_main_deptreturn_deptreturnlist,"", "fromdeptcd,fromdeptnm") ;
  544. }
  545. else if(e.col == 8)
  546. {
  547. misfOpenPopUpList("02", ds_main_deptreturn_deptreturnlist,"", "todeptcd,todeptnm") ;
  548. }
  549. }
  550. ]]></Script>
  551. </Form>
  552. </FDL>