SMRSO21400_출고등록(부서재고)(경북대).xfdl 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSO21400" position="absolute 0 0 1200 768" titletext="출고등록(부서재고)" oninit="SMRSO21400_oninit" onload="SMRSO21400_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 45 1195 51" anchor="left top right"/>
  9. <Button id="btn_help" taborder="1" text="도움말" class="btn4" position="absolute 1069 24 1137 46" anchor="top right" onclick="btn_help_onclick"/>
  10. <Button id="btn_save" taborder="2" text="저장" class="btn4" position="absolute 1138 24 1194 46" anchor="top right" onclick="btn_save_onclick"/>
  11. <Div id="grp_search" anchor="left top right" taborder="3" class="div_SA2" position="absolute 0 49 1195 109">
  12. <Layouts>
  13. <Layout>
  14. <Button id="btn_search" taborder="4" text="조회" class="btn1" position="absolute 1121 19 1177 41" anchor="top right" onclick="grp_search_btn_search_onclick"/>
  15. <Combo id="cmb_instcd" taborder="5" innerdataset="ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 117 8 253 27" style="align:center middle;"/>
  16. <Static id="cap_instcd" text="기관코드:" class="search_name" position="absolute 33 9 119 26"/>
  17. <Calendar id="ipt_delivedd" taborder="6" position="absolute 422 8 561 27" mask="yyyy-mm-dd" autoselect="true" autoskip="true" onchanged="grp_search_ipt_delivedd_onchanged" style="align:center middle;"/>
  18. <Static id="caption20" text="요구부서:" class="search_name" position="absolute 661 9 742 26"/>
  19. <Shape id="line30" linetype="vertical" class="line_4" position="absolute 1097 15 1103 47" anchor="top right"/>
  20. <Button id="btn_delivedeptcd" taborder="7" class="icon_search" position="absolute 853 9 869 25" onclick="grp_search_btn_delivedeptcd_onclick"/>
  21. <Edit id="ipt_reqdeptcd" taborder="8" class="input_default" position="absolute 746 8 851 27" autoselect="true" autoskip="true"/>
  22. <Edit id="opt_reqdeptnm" taborder="9" readonly="true" position="absolute 871 8 1027 27" class="output"/>
  23. <Static id="caption9" text="출고일자:" class="search_name" position="absolute 336 9 422 26"/>
  24. <Static id="caption3" text="출고유형:" class="search_name" position="absolute 33 35 165 52"/>
  25. <Combo id="cmb_outkind" taborder="10" class="combo_default" position="absolute 117 34 253 53" onitemchanged="grp_search_cmb_outkind_onitemchanged" style="align:center middle;"/>
  26. <Edit id="ipt_delivedeptcd" taborder="11" class="input_default" position="absolute 745 34 850 53" autoselect="true" autoskip="true"/>
  27. <Button id="button1" taborder="12" class="icon_search" position="absolute 852 35 868 51" onclick="grp_search_button1_onclick"/>
  28. <Edit id="opt_delivedeptnm" taborder="13" readonly="true" position="absolute 870 34 1026 53" class="output"/>
  29. <Static id="caption2" text="출고부서:" class="search_name" position="absolute 661 35 742 52"/>
  30. <Combo id="cmb_winkind" taborder="14" class="combo_default" position="absolute 422 34 561 53" style="align:center middle;"/>
  31. <Static id="caption4" text="입고유형:" class="search_name" position="absolute 336 35 416 52"/>
  32. </Layout>
  33. </Layouts>
  34. </Div>
  35. <Shape id="line1" class="line_10" position="absolute 0 148 1195 154" anchor="left top right"/>
  36. <Static id="caption1" text="출고내역" class="tit_2" position="absolute 0 132 180 154"/>
  37. <Button id="btn_rowinsert" taborder="4" text="행추가" class="btn2" position="absolute 1088 129 1141 148" anchor="top right" onclick="btn_rowinsert_onclick"/>
  38. <Grid id="grd_deptoutlist" class="datagrid2" taborder="5" binddataset="ds_main_deptoutinfo_deptoutlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 153 1195 765" anchor="all" onexpanddown="grd_deptoutlist_onexpanddown" oncelldblclick="grd_deptoutlist_oncelldblclick" onkeydown="grd_deptoutlist_onkeydown">
  39. <Formats>
  40. <Format id="default">
  41. <Columns>
  42. <Column size="24"/>
  43. <Column size="46"/>
  44. <Column size="56"/>
  45. <Column size="70"/>
  46. <Column size="84"/>
  47. <Column size="103"/>
  48. <Column size="206"/>
  49. <Column size="174"/>
  50. <Column size="69"/>
  51. <Column size="70"/>
  52. <Column size="70"/>
  53. <Column size="70"/>
  54. <Column size="0"/>
  55. <Column size="0"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. <Column size="0"/>
  59. <Column size="0"/>
  60. <Column size="0"/>
  61. <Column size="0"/>
  62. <Column size="0"/>
  63. <Column size="0"/>
  64. <Column size="0"/>
  65. </Columns>
  66. <Rows>
  67. <Row size="31" band="head"/>
  68. <Row size="24"/>
  69. </Rows>
  70. <Band id="head">
  71. <Cell/>
  72. <Cell col="1" text="순번"/>
  73. <Cell col="2" text="출고번호"/>
  74. <Cell col="3" text="출고유형"/>
  75. <Cell col="4" text="입고유형"/>
  76. <Cell col="5" text="품목코드"/>
  77. <Cell col="6" text="품목명"/>
  78. <Cell col="7" text="규격"/>
  79. <Cell col="8" text="단위"/>
  80. <Cell col="9" text="당일&#10;출고수량"/>
  81. <Cell col="10" text="현재고량"/>
  82. <Cell col="11" text="변경재고량"/>
  83. <Cell col="12" text="사유"/>
  84. <Cell col="13" text="기관코드"/>
  85. <Cell col="14" text="요구부서"/>
  86. <Cell col="15" text="출고부서"/>
  87. <Cell col="16" text="마감여부"/>
  88. <Cell col="17" text="출고일자"/>
  89. <Cell col="18" text="출고유형"/>
  90. <Cell col="19"/>
  91. <Cell col="20"/>
  92. <Cell col="21"/>
  93. <Cell col="22"/>
  94. </Band>
  95. <Band id="body">
  96. <Cell celltype="head"/>
  97. <Cell col="1" text="bind:row_num"/>
  98. <Cell col="2" text="bind:deliveno" enable="false"/>
  99. <Cell col="3" displaytype="none" edittype="none" text="bind:outkindnm"/>
  100. <Cell col="4" displaytype="combo" text="bind:winkind" enable="false"/>
  101. <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:goodcd" editautoselect="true" expandshow="show"/>
  102. <Cell col="6" text="bind:goodnm"/>
  103. <Cell col="7" text="bind:goodspec"/>
  104. <Cell col="8" text="bind:deliveunit"/>
  105. <Cell col="9" displaytype="number" text="bind:deliveqty"/>
  106. <Cell col="10" displaytype="number" text="bind:hun_jaego"/>
  107. <Cell col="11" displaytype="number" text="bind:realjaego"/>
  108. <Cell col="12" displaytype="text" edittype="text" text="bind:reason"/>
  109. <Cell col="13" text="bind:instcd"/>
  110. <Cell col="14" text="bind:reqdeptcd"/>
  111. <Cell col="15" text="bind:delivedeptcd"/>
  112. <Cell col="16" text="bind:endyn"/>
  113. <Cell col="17" text="bind:delivedd"/>
  114. <Cell col="18" text="bind:outkind"/>
  115. <Cell col="19" text="bind:wareflag"/>
  116. <Cell col="20" text="bind:flag"/>
  117. <Cell col="21" text="bind:freeflag"/>
  118. <Cell col="22" text="bind:windd"/>
  119. </Band>
  120. </Format>
  121. </Formats>
  122. </Grid>
  123. <Button id="btn_chulpop" taborder="6" text="입고내역조회" class="btn2" visible="true" position="absolute 741 129 827 148" anchor="top right" onclick="btn_chulpop_onclick"/>
  124. <Button id="button2" taborder="7" text="전체삭제" class="btn2" position="absolute 893 129 957 148" anchor="top right" onclick="button2_onclick"/>
  125. <Button id="btn_choidel" taborder="8" text="행삭제" class="btn2" position="absolute 1142 129 1195 148" anchor="top right" onclick="btn_choidel_onclick"/>
  126. <Button id="btn_jaego" taborder="9" text="부서재고" class="btn2" position="absolute 958 129 1022 148" anchor="top right" onclick="btn_jaego_onclick"/>
  127. <Button id="btn_prcpsum" taborder="10" text="처방집계" class="btn2" visible="true" position="absolute 828 129 892 148" anchor="top right" onclick="btn_prcpsum_onclick"/>
  128. <Button id="btn_deptwin" taborder="11" text="처방출고" class="btn2" position="absolute 1023 129 1087 148" anchor="top right" onclick="btn_deptwin_onclick"/>
  129. <Static id="cap_magam" position="absolute 240 120 635 140"/>
  130. </Layout>
  131. </Layouts>
  132. <Objects>
  133. <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_cond_oncolumnchanged">
  134. <ColumnInfo>
  135. <Column id="instcd" type="STRING" size="256"/>
  136. <Column id="delivedd" type="STRING" size="256"/>
  137. <Column id="outkind" type="STRING" size="256"/>
  138. <Column id="reqdeptcd" type="STRING" size="256"/>
  139. <Column id="reqdeptnm" type="STRING" size="256"/>
  140. <Column id="delivedeptcd" type="STRING" size="256"/>
  141. <Column id="delivedeptnm" type="STRING" size="256"/>
  142. <Column id="winkind" type="STRING" size="256"/>
  143. </ColumnInfo>
  144. <Rows>
  145. <Row>
  146. <Col id="instcd"/>
  147. <Col id="delivedd"/>
  148. <Col id="outkind"/>
  149. <Col id="reqdeptcd"/>
  150. <Col id="reqdeptnm"/>
  151. <Col id="delivedeptcd"/>
  152. <Col id="delivedeptnm"/>
  153. <Col id="winkind"/>
  154. </Row>
  155. </Rows>
  156. </Dataset>
  157. <Dataset id="ds_main_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  158. <ColumnInfo>
  159. <Column id="cnstcd" type="STRING" size="256"/>
  160. <Column id="cnstnm" type="STRING" size="256"/>
  161. </ColumnInfo>
  162. </Dataset>
  163. <Dataset id="ds_main_deptoutinfo_deptoutlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_deptoutinfo_deptoutlist_oncolumnchanged">
  164. <ColumnInfo>
  165. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  166. <Column id="goodnm" type="STRING" size="256" sumtext="물퓸명"/>
  167. <Column id="deliveunit" type="STRING" size="256" sumtext="수불단위"/>
  168. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  169. <Column id="deliveqty" type="STRING" size="256" sumtext="출고수량"/>
  170. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  171. <Column id="reqdeptcd" type="STRING" size="256" sumtext="요구부서"/>
  172. <Column id="delivedeptcd" type="STRING" size="256" sumtext="출고부서"/>
  173. <Column id="endyn" type="STRING" size="256" sumtext="마감여부"/>
  174. <Column id="delivedd" type="STRING" size="256" sumtext="출고일자"/>
  175. <Column id="outkind" type="STRING" size="256" sumtext="출고유형"/>
  176. <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
  177. <Column id="reason" type="STRING" size="256" sumtext="사유"/>
  178. <Column id="hun_jaego" type="STRING" size="256" sumtext="재고량"/>
  179. <Column id="realjaego" type="STRING" size="256" sumtext="실재고"/>
  180. <Column id="winkind" type="STRING" size="256" sumtext="입고유형"/>
  181. <Column id="freeflag" type="STRING" size="256" sumtext="무산정"/>
  182. <Column id="outkindnm" type="STRING" size="256" sumtext="출고유형"/>
  183. <Column id="windd" type="STRING" size="256" sumtext="입고일자"/>
  184. <Column id="deliveno" type="STRING" size="256" sumtext="출고번호"/>
  185. <Column id="row_num" type="STRING" size="256" sumtext="순번"/>
  186. </ColumnInfo>
  187. </Dataset>
  188. <Dataset id="ds_magamsearch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  189. <ColumnInfo>
  190. <Column id="instcd" type="STRING" size="256"/>
  191. <Column id="dd" type="STRING" size="256"/>
  192. <Column id="deptcd" type="STRING" size="256"/>
  193. </ColumnInfo>
  194. <Rows>
  195. <Row>
  196. <Col id="instcd"/>
  197. <Col id="dd"/>
  198. <Col id="deptcd"/>
  199. </Row>
  200. </Rows>
  201. </Dataset>
  202. <Dataset id="ds_distrimagam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  203. <ColumnInfo>
  204. <Column id="endyn" type="STRING" size="256"/>
  205. </ColumnInfo>
  206. </Dataset>
  207. <Dataset id="ds_magam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  208. <ColumnInfo>
  209. <Column id="magamyn" type="STRING" size="256"/>
  210. </ColumnInfo>
  211. </Dataset>
  212. <Dataset id="ds_popgood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  213. <ColumnInfo>
  214. <Column id="instcd" type="STRING" size="256"/>
  215. <Column id="wareflag" type="STRING" size="256"/>
  216. <Column id="delivedd" type="STRING" size="256"/>
  217. <Column id="basedd" type="STRING" size="256"/>
  218. <Column id="selectyn" type="STRING" size="256"/>
  219. <Column id="goodcd" type="STRING" size="256"/>
  220. </ColumnInfo>
  221. <Rows>
  222. <Row>
  223. <Col id="instcd"/>
  224. <Col id="wareflag"/>
  225. <Col id="delivedd"/>
  226. <Col id="basedd"/>
  227. <Col id="selectyn"/>
  228. <Col id="goodcd"/>
  229. </Row>
  230. </Rows>
  231. </Dataset>
  232. <Dataset id="ds_popgood_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  233. <ColumnInfo>
  234. <Column id="goodcd" type="STRING" size="256"/>
  235. </ColumnInfo>
  236. </Dataset>
  237. <Dataset id="ds_main_good_gooddetail" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  238. <ColumnInfo>
  239. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  240. <Column id="goodnm" type="STRING" size="256" sumtext="물품명"/>
  241. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  242. <Column id="deliveunit" type="STRING" size="256" sumtext="출고단위"/>
  243. <Column id="exchqty" type="STRING" size="256" sumtext="환산배수"/>
  244. <Column id="siqty" type="STRING" size="256" sumtext="시점재고"/>
  245. <Column id="hunqty" type="STRING" size="256" sumtext="현재고"/>
  246. <Column id="goodunitcost" type="STRING" size="256" sumtext="단가"/>
  247. <Column id="allsizespecid" type="STRING" size="256" sumtext="ALLSIZE"/>
  248. <Column id="purcunit" type="STRING" size="256" sumtext="입고단위"/>
  249. <Column id="mainusedeptcd" type="STRING" size="256" sumtext="주사용부서코드"/>
  250. <Column id="maincustlastsuplplce" type="STRING" size="256" sumtext="최종공급처"/>
  251. <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
  252. <Column id="wstyn" type="STRING" size="256" sumtext="의료폐기물 용기 여부"/>
  253. </ColumnInfo>
  254. </Dataset>
  255. <Dataset id="ds_popdelive" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  256. <ColumnInfo>
  257. <Column id="instcd" type="STRING" size="256"/>
  258. <Column id="delivedd" type="STRING" size="256"/>
  259. <Column id="delivedeptcd" type="STRING" size="256"/>
  260. <Column id="delivedeptnm" type="STRING" size="256"/>
  261. <Column id="opener" type="STRING" size="256"/>
  262. </ColumnInfo>
  263. <Rows>
  264. <Row>
  265. <Col id="instcd"/>
  266. <Col id="delivedd"/>
  267. <Col id="delivedeptcd"/>
  268. <Col id="delivedeptnm"/>
  269. <Col id="opener"/>
  270. </Row>
  271. </Rows>
  272. </Dataset>
  273. <Dataset id="ds_popreq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  274. <ColumnInfo>
  275. <Column id="count" type="STRING" size="256"/>
  276. </ColumnInfo>
  277. <Rows>
  278. <Row/>
  279. </Rows>
  280. </Dataset>
  281. <Dataset id="ds_popsubdata_copylist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  282. <Dataset id="ds_popsubdata_prcpsum" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  283. <Dataset id="ds_popsubdata_stocklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  284. </Objects>
  285. <Bind>
  286. <BindItem id="item0" compid="grp_search.cmb_instcd" propid="value" datasetid="ds_cond" columnid="instcd"/>
  287. <BindItem id="item1" compid="grp_search.ipt_delivedd" propid="value" datasetid="ds_cond" columnid="delivedd"/>
  288. <BindItem id="item2" compid="grp_search.ipt_reqdeptcd" propid="value" datasetid="ds_cond" columnid="reqdeptcd"/>
  289. <BindItem id="item3" compid="grp_search.opt_reqdeptnm" propid="value" datasetid="ds_cond" columnid="reqdeptnm"/>
  290. <BindItem id="item4" compid="grp_search.opt_delivedeptnm" propid="value" datasetid="ds_cond" columnid="delivedeptnm"/>
  291. <BindItem id="item5" compid="grp_search.ipt_delivedeptcd" propid="value" datasetid="ds_cond" columnid="delivedeptcd"/>
  292. <BindItem id="item6" compid="grp_search.cmb_winkind" propid="value" datasetid="ds_cond" columnid="winkind"/>
  293. <BindItem id="item7" compid="grp_search.cmb_outkind" propid="value" datasetid="ds_cond" columnid="outkind"/>
  294. </Bind>
  295. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  296. * System Name :
  297. * Job Name :
  298. * Creator :
  299. * Make Date : 2017-06-19
  300. * Description :
  301. *---------------------------------------------------------------------------------------
  302. * Modify Date Modifier Modify Description
  303. *---------------------------------------------------------------------------------------
  304. * 2017-06-19 Live Converter TF->XP
  305. *
  306. *---------------------------------------------------------------------------------------
  307. ****************************************************************************************/
  308. include "com_commonxp::comm_main.xjs";
  309. include "mis_miscommonxp::MIS.xjs";
  310. function SMRSO21400_oninit(obj:Form, e:InitEventInfo)
  311. {
  312. frmf_initForm(obj);
  313. }
  314. function SMRSO21400_onload(obj:Form, e:LoadEventInfo)
  315. {
  316. grdf_initGrid(grd_deptoutlist);
  317. grdf_setRowTypeIcon(grd_deptoutlist, 0);
  318. misfGetAndSetUserInfo();
  319. misfComboComCdListMulti("Z0007,030R0020,030R0019,030R0019","grp_search.cmb_instcd,grp_search.cmb_outkind,grd_deptoutlist.winkind,grp_search.cmb_winkind");
  320. frmf_addComboItem( "grp_search.cmb_winkind", "전체", "", "above");
  321. grp_search.cmb_winkind.value = "";
  322. grp_search.cmb_winkind.index = 0;
  323. frmf_addComboItem( "grp_search.cmb_outkind", "전체", "", "above");
  324. grp_search.cmb_outkind.value = "";
  325. grp_search.cmb_outkind.index = 0;
  326. var instcd = ds_cond.getColumn(0, "instcd");
  327. if(instcd == "031")
  328. {
  329. ds_cond.setColumn(0, "reqdeptcd", DUT_PLCEDEPT_CD);
  330. ds_cond.setColumn(0, "reqdeptnm", DUT_PLCEDEPT_NM);
  331. ds_cond.setColumn(0, "delivedeptcd", DUT_PLCEDEPT_CD);
  332. ds_cond.setColumn(0, "delivedeptnm", DUT_PLCEDEPT_NM);
  333. }
  334. else
  335. {
  336. ds_cond.setColumn(0, "reqdeptcd", sysf_getUserInfo("dutplcecd"));
  337. ds_cond.setColumn(0, "reqdeptnm", sysf_getUserInfo("dutplcenm"));
  338. ds_cond.setColumn(0, "delivedeptcd", sysf_getUserInfo("dutplcecd"));
  339. ds_cond.setColumn(0, "delivedeptnm", sysf_getUserInfo("dutplcenm"));
  340. }
  341. ds_cond.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  342. ds_cond.setColumn(0, "delivedd", utlf_getCurrentDate());
  343. }
  344. function grp_search_ipt_delivedd_onchanged(obj:Calendar, e:ChangeEventInfo)
  345. {
  346. if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
  347. {
  348. ds_main_deptoutinfo_deptoutlist.clearData();
  349. }
  350. }
  351. function ds_cond_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  352. {
  353. if(e.columnid == "reqdeptcd")
  354. {
  355. grp_search.ipt_reqdeptcd.value = e.newvalue;
  356. grp_search.ipt_reqdeptcd.setFocus();
  357. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  358. ds_cond.setColumn(0, "delivedeptcd", ds_cond.getColumn(0, "reqdeptcd"));
  359. ds_cond.setColumn(0, "delivedeptnm", ds_cond.getColumn(0, "reqdeptnm"));
  360. if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
  361. {
  362. ds_main_deptoutinfo_deptoutlist.clearData();
  363. }
  364. }
  365. if(e.columnid == "delivedeptcd")
  366. {
  367. grp_search.ipt_delivedeptcd.value = e.newvalue;
  368. grp_search.ipt_delivedeptcd.setFocus();
  369. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  370. if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
  371. {
  372. ds_main_deptoutinfo_deptoutlist.clearData();
  373. }
  374. }
  375. }
  376. function grp_search_btn_delivedeptcd_onclick(obj:Button, e:ClickEventInfo)
  377. {
  378. var vOrigDeptcd = grp_search.ipt_reqdeptcd.value;
  379. var recv_list = "reqdeptcd,reqdeptnm";
  380. misfOpenPopUpList("02", ds_cond,"", recv_list) ;
  381. ds_cond.setColumn(0, "delivedeptcd", ds_cond.getColumn(0, "reqdeptcd"));
  382. ds_cond.setColumn(0, "delivedeptnm", ds_cond.getColumn(0, "reqdeptnm"));
  383. }
  384. function grp_search_button1_onclick(obj:Button, e:ClickEventInfo)
  385. {
  386. var recv_list = "delivedeptcd,delivedeptnm";
  387. misfOpenPopUpList("02", ds_cond,"", recv_list) ;
  388. }
  389. function grp_search_cmb_outkind_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  390. {
  391. if(ds_main_deptoutinfo_deptoutlist.rowcount > 0)
  392. {
  393. ds_main_deptoutinfo_deptoutlist.clearData();
  394. }
  395. if(obj.value == "10")
  396. {
  397. grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 235);
  398. }
  399. else
  400. {
  401. grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 0);
  402. }
  403. }
  404. function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  405. {
  406. if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
  407. {
  408. sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  409. grp_search.ipt_reqdeptcd.setFocus();
  410. return;
  411. }
  412. if(utlf_isNull(grp_search.ipt_delivedeptcd.value))
  413. {
  414. sysf_messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
  415. grp_search.ipt_delivedeptcd.setFocus();
  416. return;
  417. }
  418. var oParam = {};
  419. oParam.id = "TRRSO21401";
  420. oParam.service = "deliveapp.DeliveMngt";
  421. oParam.method = "reqGetDeptOutList";
  422. oParam.inds = "cond=ds_cond";
  423. oParam.outds = "ds_main_deptoutinfo_deptoutlist=deptoutlist";
  424. oParam.async = false;
  425. oParam.callback = "cf_TRRSO21401";
  426. tranf_submit(oParam);
  427. }
  428. function cf_TRRSO21401(sSvcId, nErrorCode, sErrorMsg)
  429. {
  430. if(nErrorCode < 0)
  431. {
  432. return;
  433. }
  434. else
  435. {
  436. if(grp_search.cmb_outkind.value == "10")
  437. {
  438. grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 235);
  439. }
  440. else
  441. {
  442. grd_deptoutlist.setFormatColProperty(grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 0);
  443. }
  444. ds_magamsearch.setColumn(0, "instcd", ds_cond.getColumn(0, "instcd"));
  445. ds_magamsearch.setColumn(0, "dd", ds_cond.getColumn(0, "delivedd"));
  446. ds_magamsearch.setColumn(0, "deptcd", ds_cond.getColumn(0, "delivedeptcd"));
  447. cap_magam.text = "";
  448. var oParam = {};
  449. oParam.id = "TRRSO21003";
  450. oParam.service = "deliveapp.DeliveMngt";
  451. oParam.method = "reqGetDistriDeptJaegoMagamChk";
  452. oParam.inds = "req=ds_magamsearch";
  453. oParam.outds = "ds_distrimagam=distrimagam";
  454. oParam.async = false;
  455. oParam.callback = "cf_TRRSO21003";
  456. tranf_submit(oParam);
  457. }
  458. }
  459. function cf_TRRSO21003(sSvcId, nErrorCode, sErrorMsg)
  460. {
  461. if(nErrorCode < 0)
  462. {
  463. return;
  464. }
  465. else
  466. {
  467. var endyn = ds_distrimagam.getColumn(0, "endyn");
  468. if(endyn == "Y")
  469. {
  470. cap_magam.text = "물류마감이 되어있습니다.";
  471. }
  472. else
  473. {
  474. cap_magam.text = "";
  475. var oParam = {};
  476. oParam.id = "TRRSO21002";
  477. oParam.service = "deliveapp.DeliveMngt";
  478. oParam.method = "reqGetDeptJaegoMagamChk";
  479. oParam.inds = "req=ds_magamsearch";
  480. oParam.outds = "ds_magam=magam";
  481. oParam.async = false;
  482. oParam.callback = "cf_TRRSO21002";
  483. tranf_submit(oParam);
  484. }
  485. }
  486. }
  487. function cf_TRRSO21002(sSvcId, nErrorCode, sErrorMsg)
  488. {
  489. if(nErrorCode < 0)
  490. {
  491. return;
  492. }
  493. else
  494. {
  495. var magamyn = ds_magam.getColumn(0, "magamyn");
  496. if(magamyn == "Y")
  497. {
  498. cap_magam.text = "해당부서는 현재 마감되어있습니다.";
  499. }
  500. else
  501. {
  502. cap_magam.text = "";
  503. }
  504. }
  505. }
  506. function grd_deptoutlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  507. {
  508. if(ds_main_deptoutinfo_deptoutlist.getRowType(e.row) == 1 || ds_main_deptoutinfo_deptoutlist.getRowType(e.row) == 4)
  509. {
  510. return;
  511. }
  512. ds_popgood.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  513. ds_popgood.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
  514. ds_popgood.setColumn(0, "basedd", grp_search.ipt_delivedd.value);
  515. ds_popgood.setColumn(0, "selectyn", "");
  516. var objArg = new Object();
  517. objArg.arg_ds_popdata = ds_popgood;
  518. frmf_modal("SPRSO20700", "SPRSO20700", objArg, "", "", "", "", "", "", "", "", "", "M");
  519. if(ds_popgood.getColumn(0, "selectyn") == "Y")
  520. {
  521. fGetGoodDetail();
  522. grd_deptoutlist.setCellPos(grd_deptoutlist.getBindCellIndex("body", "deliveqty"));
  523. grd_deptoutlist.showEditor(true);
  524. }
  525. }
  526. function fGetGoodDetail()
  527. {
  528. for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
  529. {
  530. var bDup = false;
  531. if( bDup == false )
  532. {
  533. ds_popgood.setColumn(0, "goodcd", ds_popgood_goodlist.getColumn(k, "goodcd"));
  534. var oParam = {};
  535. oParam.id = "TRRSO20104";
  536. oParam.service = "deliveapp.DeliveMngt";
  537. oParam.method = "reqGetGoodDetail";
  538. oParam.inds = "req=ds_popgood";
  539. oParam.outds = "ds_main_good_gooddetail=gooddetail";
  540. oParam.async = false;
  541. oParam.callback = "cf_TRRSO20104";
  542. tranf_submit(oParam);
  543. }
  544. }
  545. }
  546. function cf_TRRSO20104(sSvcId, nErrorCode, sErrorMsg)
  547. {
  548. if(nErrorCode < 0)
  549. {
  550. return;
  551. }
  552. else
  553. {
  554. if(!utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodcd")))
  555. {
  556. btn_rowinsert_onclick();
  557. }
  558. ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodcd", ds_main_good_gooddetail.getColumn(0, "goodcd"));
  559. ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodnm", ds_main_good_gooddetail.getColumn(0, "goodnm"));
  560. ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "goodspec", ds_main_good_gooddetail.getColumn(0, "goodspec"));
  561. ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "deliveunit", ds_main_good_gooddetail.getColumn(0, "deliveunit"));
  562. ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "wareflag", ds_main_good_gooddetail.getColumn(0, "wareflag"));
  563. ds_main_deptoutinfo_deptoutlist.setColumn(ds_main_deptoutinfo_deptoutlist.rowcount-1, "deliveqty", "0");
  564. }
  565. }
  566. function ds_main_deptoutinfo_deptoutlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  567. {
  568. if( e.columnid == "deliveqty")
  569. {
  570. if(utlf_isNull(obj.getColumn(e.row, "deliveqty")) || obj.getColumn(e.row, "deliveqty") == "." || obj.getColumn(e.row, "deliveqty") == "-" || obj.getColumn(e.row, "deliveqty") == "-.")
  571. {
  572. obj.setColumn(e.row, "deliveqty", "0");
  573. }
  574. else
  575. {
  576. var sBef = obj.getColumn(e.row, "deliveqty");
  577. var iIndex = sBef.indexOf(".");
  578. if (iIndex >= 0 )
  579. {
  580. var sAft = sBef.substr(0, iIndex + 3);
  581. obj.setColumn(e.row, "deliveqty", sAft);
  582. }
  583. }
  584. var hun_jaego = obj.getColumn(e.row, "hun_jaego");
  585. if(utlf_isNull(hun_jaego))
  586. {
  587. return;
  588. }
  589. var deliveqty = obj.getColumn(e.row, "deliveqty");
  590. var realjaego = parseFloat(hun_jaego) - parseFloat(deliveqty);
  591. obj.setColumn(e.row, "realjaego", realjaego);
  592. }
  593. else if(e.columnid == "realjaego")
  594. {
  595. var hun_jaego = obj.getColumn(e.row, "hun_jaego");
  596. if(utlf_isNull(hun_jaego))
  597. {
  598. return;
  599. }
  600. var realjaego = obj.getColumn(e.row, "realjaego");
  601. var deliveqty_bf = obj.getColumn(e.row, "deliveqty");
  602. if(utlf_isNull(deliveqty_bf))
  603. {
  604. deliveqty_bf = 0;
  605. }
  606. if(utlf_isNull(realjaego))
  607. {
  608. realjaego = 0;
  609. }
  610. if(obj.getRowType(e.row) == "2")
  611. {
  612. var deliveqty = parseFloat(hun_jaego) - parseFloat(realjaego);
  613. }
  614. else
  615. {
  616. var deliveqty = parseFloat(hun_jaego) - parseFloat(realjaego) + parseFloat(deliveqty_bf);
  617. }
  618. obj.setColumn(e.row, "deliveqty", deliveqty);
  619. }
  620. }
  621. function grd_deptoutlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  622. {
  623. // if(grd_deptoutlist.row == "0")
  624. // {
  625. // if(grd_deptoutlist.col == grd_deptoutlist.colRef("hun_jaego")){
  626. // for(var i = 1 ; i < grd_deptoutlist.rows ; i++){
  627. // grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("deliveqty")) = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("hun_jaego"));
  628. // if(!(grd_deptoutlist.rowStatus(i) == 1 || grd_deptoutlist.rowStatus(i) == 3)){
  629. // grd_deptoutlist.rowStatus(i) = 2;
  630. // }
  631. // }
  632. // }
  633. // }
  634. }
  635. function grd_deptoutlist_onkeydown(obj:Grid, e:KeyEventInfo)
  636. {
  637. if(e.keycode == 13)
  638. {
  639. ds_main_deptoutinfo_deptoutlist.rowposition = ds_main_deptoutinfo_deptoutlist.rowposition+1
  640. }
  641. }
  642. function btn_chulpop_onclick(obj:Button, e:ClickEventInfo)
  643. {
  644. if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
  645. {
  646. sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  647. grp_search.ipt_reqdeptcd.setFocus();
  648. return;
  649. }
  650. ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  651. ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
  652. ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
  653. ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.value);
  654. ds_popdelive.setColumn(0, "opener", "out");
  655. ds_popreq.setColumn(0, "count", "0");
  656. var objArg = new Object();
  657. objArg.arg_ds_popdelive = ds_popdelive;
  658. frmf_modal("SMRSO21050", "SMRSO21050", objArg, "", "", "", "", "", "", "", "", "", "M");
  659. var cnt = ds_popreq.getColumn(0, "count");
  660. var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
  661. var mcnt = parseInt(mrows)+parseInt(cnt);
  662. var j = 0;
  663. for(var i = mrows ; i < mcnt-1 ; i++)
  664. {
  665. ds_main_deptoutinfo_deptoutlist.addRow();
  666. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_copylist.getColumn(j, "goodcd"));
  667. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_copylist.getColumn(j, "goodnm"));
  668. ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_copylist.getColumn(j, "deliveunit"));
  669. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_copylist.getColumn(j, "goodspec"));
  670. ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveqty", ds_popsubdata_copylist.getColumn(j, "deliveqty"));
  671. j++;
  672. }
  673. }
  674. function btn_prcpsum_onclick(obj:Button, e:ClickEventInfo)
  675. {
  676. if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
  677. {
  678. sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  679. grp_search.ipt_reqdeptcd.setFocus();
  680. return;
  681. }
  682. ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  683. ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
  684. ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
  685. ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.value);
  686. ds_popdelive.setColumn(0, "opener", "jaego");
  687. ds_popreq.setColumn(0, "count", "0");
  688. var objArg = new Object();
  689. objArg.arg_ds_popdata = ds_popdelive;
  690. frmf_modal("SMRSO21460", "SMRSO21460", objArg, "", "", "", "", "", "", "", "", "", "M");
  691. var cnt = ds_popreq.getColumn(0, "count");
  692. var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
  693. var mcnt = parseInt(mrows)+parseInt(cnt);
  694. var j = 0;
  695. for(var i = mrows ; i < mcnt-1 ; i++)
  696. {
  697. ds_main_deptoutinfo_deptoutlist.addRow();
  698. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_prcpsum.getColumn(j, "goodcd"));
  699. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_prcpsum.getColumn(j, "goodnm"));
  700. ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_prcpsum.getColumn(j, "deliveunit"));
  701. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_prcpsum.getColumn(j, "goodspec"));
  702. ds_main_deptoutinfo_deptoutlist.setColumn(i, "hun_jaego", ds_popsubdata_prcpsum.getColumn(j, "deliveqty"));
  703. j++;
  704. }
  705. }
  706. function button2_onclick(obj:Button, e:ClickEventInfo)
  707. {
  708. var req = sysf_messageBox("출고내역이 전체삭제됩니다.", "Q003");
  709. if(req == 6)
  710. {
  711. if(ds_main_deptoutinfo_deptoutlist.rowcount == 0)
  712. {
  713. return;
  714. }
  715. ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
  716. for(var i = 0; i < ds_main_deptoutinfo_deptoutlist.rowcount; i++)
  717. {
  718. ds_main_deptoutinfo_deptoutlist.setRowType(i, "d");
  719. }
  720. ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
  721. btn_save_onclick();
  722. }
  723. else
  724. {
  725. return;
  726. }
  727. }
  728. function btn_jaego_onclick(obj:Button, e:ClickEventInfo)
  729. {
  730. if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
  731. {
  732. sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  733. grp_search.ipt_reqdeptcd.setFocus();
  734. return;
  735. }
  736. ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  737. ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
  738. ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
  739. ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.value);
  740. ds_popdelive.setColumn(0, "opener", "jaego");
  741. ds_popreq.setColumn(0, "count", "0");
  742. var objArg = new Object();
  743. objArg.arg_ds_popdata = ds_popdelive;
  744. frmf_modal("SMRSO21450", "SMRSO21450", objArg, "", "", "", "", "", "", "", "", "", "M");
  745. var cnt = ds_popreq.getColumn(0, "count");
  746. var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
  747. var mcnt = parseInt(mrows)+parseInt(cnt);
  748. var j = 0;
  749. for(var i = mrows ; i < mcnt-1 ; i++)
  750. {
  751. ds_main_deptoutinfo_deptoutlist.addRow();
  752. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_stocklist.getColumn(j, "goodcd"));
  753. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_stocklist.getColumn(j, "goodnm"));
  754. ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_stocklist.getColumn(j, "purcunit"));
  755. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_stocklist.getColumn(j, "goodspec"));
  756. ds_main_deptoutinfo_deptoutlist.setColumn(i, "wareflag", ds_popsubdata_stocklist.getColumn(j, "wareflag"));
  757. ds_main_deptoutinfo_deptoutlist.setColumn(i, "hun_jaego", ds_popsubdata_stocklist.getColumn(j, "hun_jaego"));
  758. ds_main_deptoutinfo_deptoutlist.setColumn(i, "winkind", ds_popsubdata_stocklist.getColumn(j, "winkind"));
  759. j++;
  760. }
  761. grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "winkind"), "edittype", "none");
  762. }
  763. function btn_deptwin_onclick(obj:Button, e:ClickEventInfo)
  764. {
  765. if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
  766. {
  767. sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  768. grp_search.ipt_reqdeptcd.setFocus();
  769. return;
  770. }
  771. ds_popdelive.setColumn(0, "instcd", grp_search.cmb_instcd.value);
  772. ds_popdelive.setColumn(0, "delivedd", grp_search.ipt_delivedd.value);
  773. ds_popdelive.setColumn(0, "delivedeptcd", grp_search.ipt_reqdeptcd.value);
  774. ds_popdelive.setColumn(0, "delivedeptnm", grp_search.opt_reqdeptnm.value);
  775. ds_popdelive.setColumn(0, "opener", "out");
  776. ds_popreq.setColumn(0, "count", "0");
  777. var objArg = new Object();
  778. objArg.arg_ds_popdata = ds_popdelive;
  779. frmf_modal("SMRSO21470", "SMRSO21470", objArg, "", "", "", "", "", "", "", "", "", "M");
  780. var cnt = ds_popreq.getColumn(0, "count");
  781. var mrows = ds_main_deptoutinfo_deptoutlist.rowcount;
  782. var mcnt = parseInt(mrows)+parseInt(cnt);
  783. var j = 0;
  784. for(var i = mrows ; i < mcnt-1 ; i++)
  785. {
  786. ds_main_deptoutinfo_deptoutlist.addRow();
  787. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodcd", ds_popsubdata_copylist.getColumn(j, "goodcd"));
  788. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodnm", ds_popsubdata_copylist.getColumn(j, "goodnm"));
  789. ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveunit", ds_popsubdata_copylist.getColumn(j, "deliveunit"));
  790. ds_main_deptoutinfo_deptoutlist.setColumn(i, "goodspec", ds_popsubdata_copylist.getColumn(j, "goodspec"));
  791. ds_main_deptoutinfo_deptoutlist.setColumn(i, "wareflag", ds_popsubdata_copylist.getColumn(j, "wareflag"));
  792. ds_main_deptoutinfo_deptoutlist.setColumn(i, "deliveqty", ds_popsubdata_copylist.getColumn(j, "deliveqty"));
  793. ds_main_deptoutinfo_deptoutlist.setColumn(i, "realjaego", ds_popsubdata_copylist.getColumn(j, "deliveqty"));
  794. ds_main_deptoutinfo_deptoutlist.setColumn(i, "flag", ds_popsubdata_copylist.getColumn(j, "flag"));
  795. ds_main_deptoutinfo_deptoutlist.setColumn(i, "winkind", ds_popsubdata_copylist.getColumn(j, "winkind"));
  796. ds_main_deptoutinfo_deptoutlist.setColumn(i, "windd", ds_popsubdata_copylist.getColumn(j, "windd"));
  797. j++;
  798. }
  799. grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "winkind"), "edittype", "none");
  800. }
  801. function btn_rowinsert_onclick(obj:Button, e:ClickEventInfo)
  802. {
  803. if(utlf_isNull(grp_search.ipt_reqdeptcd.value))
  804. {
  805. sysf_messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  806. grp_search.ipt_reqdeptcd.setFocus();
  807. return;
  808. }
  809. if(utlf_isNull(grp_search.ipt_delivedeptcd.value))
  810. {
  811. sysf_messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
  812. grp_search.ipt_delivedeptcd.setFocus();
  813. return;
  814. }
  815. ds_main_deptoutinfo_deptoutlist.addRow();
  816. grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "winkind"), "edittype", "none");
  817. }
  818. function btn_choidel_onclick(obj:Button, e:ClickEventInfo)
  819. {
  820. if(ds_main_deptoutinfo_deptoutlist.getRowType(ds_main_deptoutinfo_deptoutlist.rowposition) == "2")
  821. {
  822. ds_main_deptoutinfo_deptoutlist.deleteRow(ds_main_deptoutinfo_deptoutlist.rowposition);
  823. }
  824. else
  825. {
  826. ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
  827. ds_main_deptoutinfo_deptoutlist.setRowType(ds_main_deptoutinfo_deptoutlist.rowposition, "d");
  828. ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
  829. }
  830. }
  831. function btn_help_onclick(obj:Button, e:ClickEventInfo)
  832. {
  833. frmf_modal("SMRSO21401", "SMRSO21401", "", "", "", "", "", "", "", "", "", "", "M");
  834. }
  835. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  836. {
  837. if(ds_main_deptoutinfo_deptoutlist.rowcount != 0)
  838. {
  839. var instcd = ds_main_deptoutinfo_deptoutlist.getColumn(0, "instcd");
  840. var dd = ds_main_deptoutinfo_deptoutlist.getColumn(0, "delivedd");
  841. var deptcd = ds_main_deptoutinfo_deptoutlist.getColumn(0, "delivedeptcd");
  842. if(utlf_isNull(instcd))
  843. {
  844. ds_magamsearch.setColumn(0, "instcd", ds_cond.getColumn(0, "instcd"));
  845. ds_magamsearch.setColumn(0, "dd", ds_cond.getColumn(0, "delivedd"));
  846. ds_magamsearch.setColumn(0, "deptcd", ds_cond.getColumn(0, "delivedeptcd"));
  847. }
  848. else
  849. {
  850. ds_magamsearch.setColumn(0, "instcd", instcd);
  851. ds_magamsearch.setColumn(0, "dd", dd);
  852. ds_magamsearch.setColumn(0, "deptcd", deptcd);
  853. }
  854. cap_magam.text = "";
  855. var oParam = {};
  856. oParam.id = "TRRSO21003";
  857. oParam.service = "deliveapp.DeliveMngt";
  858. oParam.method = "reqGetDistriDeptJaegoMagamChk";
  859. oParam.inds = "req=ds_magamsearch";
  860. oParam.outds = "ds_distrimagam=distrimagam";
  861. oParam.async = false;
  862. oParam.callback = "cf_TRRSO21003_1";
  863. tranf_submit(oParam);
  864. }
  865. else
  866. {
  867. return;
  868. }
  869. for(var j = ds_main_deptoutinfo_deptoutlist.rowcount; j > 0 ; j-- )
  870. {
  871. var deliveqty = ds_main_deptoutinfo_deptoutlist.getColumn(j, "deliveqty");
  872. var realjaego = ds_main_deptoutinfo_deptoutlist.getColumn(j, "realjaego");
  873. var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(j, "deliveno");
  874. if((utlf_isNull(deliveqty) || deliveqty == 0) && utlf_isNull(deliveno))
  875. {
  876. ds_main_deptoutinfo_deptoutlist.deleteRow(j);
  877. }
  878. else if(utlf_isNull(realjaego) && utlf_isNull(deliveno))
  879. {
  880. ds_main_deptoutinfo_deptoutlist.deleteRow(j);
  881. }
  882. }
  883. if(utlf_isNull(grp_search.cmb_outkind.value))
  884. {
  885. grp_search.cmb_outkind.value = "01";
  886. }
  887. if(grp_search.cmb_outkind.value == "10")
  888. {
  889. for(var j = ds_main_deptoutinfo_deptoutlist.rowcount; j > 0 ; j-- )
  890. {
  891. var reason = ds_main_deptoutinfo_deptoutlist.getColumn(j, "reason");
  892. var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(j, "deliveno");
  893. if(utlf_isNull(reason) && utlf_isNull(deliveno))
  894. {
  895. ds_main_deptoutinfo_deptoutlist.deleteRow(j);
  896. }
  897. }
  898. }
  899. for(var k = 0; k < ds_main_deptoutinfo_deptoutlist.rowcount; k++ )
  900. {
  901. ds_main_deptoutinfo_deptoutlist.setColumn(k, "instcd", ds_cond.getColumn(0, "instcd"));
  902. ds_main_deptoutinfo_deptoutlist.setColumn(k, "delivedd", ds_cond.getColumn(0, "delivedd"));
  903. ds_main_deptoutinfo_deptoutlist.setColumn(k, "outkind", ds_cond.getColumn(0, "outkind"));
  904. ds_main_deptoutinfo_deptoutlist.setColumn(k, "reqdeptcd", ds_cond.getColumn(0, "reqdeptcd"));
  905. ds_main_deptoutinfo_deptoutlist.setColumn(k, "delivedeptcd", ds_cond.getColumn(0, "delivedeptcd"));
  906. if(utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(k, "goocd")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "goodnm")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "deliveqty")))
  907. {
  908. ds_main_deptoutinfo_deptoutlist.deleteRow(k);
  909. k--;
  910. }
  911. }
  912. for(var k = 0; k < ds_main_deptoutinfo_deptoutlist.rowcount; k++)
  913. {
  914. if(utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(k, "goocd")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "goodnm")) && utlf_isNull(ds_main_deptoutinfo_deptoutlist.getColumn(0, "deliveqty")))
  915. {
  916. sysf_messageBox("내역이 정상적으로 입력되지 않았습니다. \n\n입력한 값을 확인하십시요. ", "E999", "");
  917. grd_deptoutlist.setFocus();
  918. ds_main_deptoutinfo_deptoutlist.rowposition = k;
  919. return;
  920. }
  921. }
  922. var minuscnt = 0;
  923. if(grp_search.cmb_outkind.value != "10")
  924. {
  925. ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
  926. for(var i = 0 ; i < ds_main_deptoutinfo_deptoutlist.rowcount; i++)
  927. {
  928. var deliveqty = ds_main_deptoutinfo_deptoutlist.getColumn(i, "deliveqty");
  929. var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(i, "deliveno");
  930. if(parseFloat(deliveqty) < 0 && utlf_isNul(deliveno))
  931. {
  932. ds_main_deptoutinfo_deptoutlist.setRowType(i, "");
  933. minuscnt++;
  934. }
  935. }
  936. ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
  937. }
  938. if(minuscnt == 0)
  939. {
  940. var oParam = {};
  941. oParam.id = "TXRSO21401";
  942. oParam.service = "deliveapp.DeliveMngt";
  943. oParam.method = "reqExeDeptOutList";
  944. oParam.inds = "deptoutlist=ds_main_deptoutinfo_deptoutlist:u";
  945. oParam.outds = "";
  946. oParam.async = false;
  947. oParam.callback = "cf_TXRSO21401";
  948. tranf_submit(oParam);
  949. }
  950. else
  951. {
  952. var oParam = {};
  953. oParam.id = "TXRSO21401";
  954. oParam.service = "deliveapp.DeliveMngt";
  955. oParam.method = "reqExeDeptOutList";
  956. oParam.inds = "deptoutlist=ds_main_deptoutinfo_deptoutlist:u";
  957. oParam.outds = "";
  958. oParam.async = false;
  959. oParam.callback = "cf_TXRSO21401_1";
  960. tranf_submit(oParam);
  961. grp_search.cmb_outkind.value = "10";
  962. grd_deptoutlist.setCellProperty("Body", grd_deptoutlist.getBindCellIndex("Body", "reason"), "size", 235)
  963. sysf_messageBox("출고수량이 (-)인 물품들은 출고유형을 보정으로 저장하시기 바랍니다.", "I999", "");
  964. }
  965. }
  966. function cf_TRRSO21003_1(sSvcId, nErrorCode, sErrorMsg)
  967. {
  968. if(nErrorCode < 0)
  969. {
  970. return;
  971. }
  972. else
  973. {
  974. var endyn = ds_distrimagam.getColumn(0, "endyn");
  975. if(endyn == "Y")
  976. {
  977. cap_magam.text = "물류마감이 되어있습니다.";
  978. sysf_messageBox("물류마감이 되어 저장이 불가능합니다.", "E999", "");
  979. return;
  980. }
  981. else
  982. {
  983. cap_magam.text = "";
  984. var oParam = {};
  985. oParam.id = "TRRSO21002";
  986. oParam.service = "deliveapp.DeliveMngt";
  987. oParam.method = "reqGetDeptJaegoMagamChk";
  988. oParam.inds = "req=ds_magamsearch";
  989. oParam.outds = "ds_magam=magam";
  990. oParam.async = false;
  991. oParam.callback = "cf_TRRSO21002_1";
  992. tranf_submit(oParam);
  993. }
  994. }
  995. }
  996. function cf_TRRSO21002_1(sSvcId, nErrorCode, sErrorMsg)
  997. {
  998. if(nErrorCode < 0)
  999. {
  1000. return;
  1001. }
  1002. else
  1003. {
  1004. var magamyn = ds_magam.getColumn(0, "magamyn");
  1005. if(magamyn == "Y")
  1006. {
  1007. cap_magam.text = "해당부서는 현재 마감되어있습니다.";
  1008. sysf_messageBox("해당부서는 마감이 되어 저장이 불가능합니다.", "E999", "");
  1009. return;
  1010. }
  1011. else
  1012. {
  1013. cap_magam.text = "";
  1014. }
  1015. }
  1016. }
  1017. function cf_TXRSO21401(sSvcId, nErrorCode, sErrorMsg)
  1018. {
  1019. if(nErrorCode < 0)
  1020. {
  1021. return;
  1022. }
  1023. else
  1024. {
  1025. grp_search.btn_search.click();
  1026. }
  1027. }
  1028. function cf_TXRSO21401_1(sSvcId, nErrorCode, sErrorMsg)
  1029. {
  1030. if(nErrorCode < 0)
  1031. {
  1032. return;
  1033. }
  1034. else
  1035. {
  1036. ds_main_deptoutinfo_deptoutlist.updatecontrol = false;
  1037. for(var i = ds_main_deptoutinfo_deptoutlist.rowcount; i > 0 ; i-- )
  1038. {
  1039. var rowStatus = ds_main_deptoutinfo_deptoutlist.getRowType(i);
  1040. var deliveno = ds_main_deptoutinfo_deptoutlist.getColumn(i, "deliveno");
  1041. var realjaego = ds_main_deptoutinfo_deptoutlist.getColumn(i, "realjaego");
  1042. if(rowStatus == 0 && !utlf_isNull(realjaego))
  1043. {
  1044. if(utlf_isNull(deliveno))
  1045. {
  1046. ds_main_deptoutinfo_deptoutlist.setRowType(i, "");
  1047. }
  1048. else
  1049. {
  1050. ds_main_deptoutinfo_deptoutlist.setRowType(i, "u");
  1051. }
  1052. }
  1053. else
  1054. {
  1055. if(utlf_isNull(deliveno))
  1056. {
  1057. ds_main_deptoutinfo_deptoutlist.deleteRow(i);
  1058. }
  1059. }
  1060. }
  1061. ds_main_deptoutinfo_deptoutlist.updatecontrol = true;
  1062. }
  1063. }]]></Script>
  1064. </Form>
  1065. </FDL>