SMRSD07700_선납입고.xfdl 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSD07700" position="absolute 0 0 1202 761" titletext="선납입고" oninit="SMRSD07700_oninit" onload="SMRSD07700_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="선납입고" class="tit_1" position="absolute 0 0 243 25"/>
  8. <Shape id="line11" class="line_6" position="absolute 0 37 1194 43" anchor="left top right"/>
  9. <Button id="btn_print" taborder="1" text="출력" class="btn6" visible="false" position="absolute 929 16 985 38" anchor="top right" onclick="btn_print_onclick"/>
  10. <Button id="btn_init" taborder="2" text="초기화" class="btn4" position="absolute 986 16 1054 38" anchor="top right" onclick="btn_init_onclick"/>
  11. <Button id="btn_plceord" taborder="3" text="발주조회" class="btn4" position="absolute 1055 16 1135 38" anchor="top right" onclick="btn_plceord_onclick"/>
  12. <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1136 16 1192 38" anchor="top right" onclick="btn_save_onclick"/>
  13. <Div id="group4" taborder="5" position="absolute 0 41 1194 81" class="div_SA2" anchor="left top right">
  14. <Layouts>
  15. <Layout>
  16. <Static id="caption14" text="기관코드 :" class="search_name" position="absolute 10 11 88 28"/>
  17. <Combo id="cmb_instcd" taborder="1" class="combo_essential" position="absolute 90 11 260 30" style="align:center middle;"/>
  18. <Static id="caption22" text="입고일자 :" class="search_name" position="absolute 275 11 383 28"/>
  19. <Calendar id="ipt_windd" taborder="2" position="absolute 360 11 445 30" mask="yyyy-mm-dd" autoskip="true" autoselect="true"/>
  20. <Static id="caption2" text="~" position="absolute 447 10 462 30"/>
  21. <Calendar id="ipt_winddto" taborder="3" position="absolute 460 11 545 30" mask="yyyy-mm-dd" autoskip="true" autoselect="true"/>
  22. <Button id="btn_search" taborder="4" text="조회" class="btn1" position="absolute 1130 9 1186 31" anchor="top right" onclick="group4_btn_search_onclick"/>
  23. </Layout>
  24. </Layouts>
  25. </Div>
  26. <Static id="caption21" text="선납입고내역 마스터" class="tit_2" position="absolute 0 98 174 119"/>
  27. <Grid id="grd_predelivewinmasterlist" taborder="6" binddataset="ds_main_predelivewinmaster_predelivewinmasterlist" useinputpanel="false" position="absolute 0 119 1194 341" autoenter="select" cellsizingtype="col" anchor="all" onexpanddown="grd_predelivewinmasterlist_onexpanddown" oncellclick="grd_predelivewinmasterlist_oncellclick" autofittype="col">
  28. <Formats>
  29. <Format id="default">
  30. <Columns>
  31. <Column size="25"/>
  32. <Column size="84"/>
  33. <Column size="50"/>
  34. <Column size="100"/>
  35. <Column size="200"/>
  36. <Column size="100"/>
  37. <Column size="519"/>
  38. <Column size="0"/>
  39. <Column size="0"/>
  40. <Column size="0"/>
  41. <Column size="0"/>
  42. </Columns>
  43. <Rows>
  44. <Row size="24" band="head"/>
  45. <Row size="24"/>
  46. </Rows>
  47. <Band id="head">
  48. <Cell/>
  49. <Cell col="1" colspan="2" text="입고일자/번호" taborder="undefined"/>
  50. <Cell col="3" colspan="2" text="선납입고거래처" taborder="undefined"/>
  51. <Cell col="5" colspan="2" text="납품장소" taborder="undefined"/>
  52. <Cell col="7" text="창고구분"/>
  53. <Cell col="8" text="기관코드"/>
  54. <Cell col="9"/>
  55. <Cell col="10"/>
  56. </Band>
  57. <Band id="body">
  58. <Cell celltype="head"/>
  59. <Cell col="1" displaytype="date" edittype="date" text="bind:windd" calendardisplaynulltype="nulltext"/>
  60. <Cell col="2" text="bind:winno"/>
  61. <Cell col="3" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:wincustcd" expandshow="show"/>
  62. <Cell col="4" style="align:left middle;padding:0 0 0 3;" text="bind:wincustnm"/>
  63. <Cell col="5" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 3;" text="bind:acptdeptcd" expandshow="show"/>
  64. <Cell col="6" style="align:left middle;padding:0 0 0 3;" text="bind:acptdeptnm"/>
  65. <Cell col="7" text="bind:wareflag"/>
  66. <Cell col="8" text="bind:instcd"/>
  67. <Cell col="9" text="bind:orderdd"/>
  68. <Cell col="10" text="bind:orderno"/>
  69. </Band>
  70. </Format>
  71. </Formats>
  72. </Grid>
  73. <Static id="caption7" text="선납입고내역 디테일" class="tit_2" position="absolute 0 354 174 377" anchor="left bottom"/>
  74. <Grid id="grd_predelivewindetaillist" taborder="7" binddataset="ds_main_predelivewindetail_predelivewindetaillist" useinputpanel="false" position="absolute 0 375 1194 755" autoenter="select" cellsizingtype="col" anchor="left right bottom" onexpanddown="grd_predelivewindetaillist_onexpanddown" autofittype="col">
  75. <Formats>
  76. <Format id="default">
  77. <Columns>
  78. <Column size="24"/>
  79. <Column size="0"/>
  80. <Column size="0"/>
  81. <Column size="40"/>
  82. <Column size="110"/>
  83. <Column size="45"/>
  84. <Column size="263"/>
  85. <Column size="160"/>
  86. <Column size="55"/>
  87. <Column size="55"/>
  88. <Column size="55"/>
  89. <Column size="80"/>
  90. <Column size="214"/>
  91. <Column size="0"/>
  92. <Column size="0"/>
  93. <Column size="0"/>
  94. <Column size="0"/>
  95. <Column size="0"/>
  96. <Column size="0"/>
  97. <Column size="0"/>
  98. <Column size="0"/>
  99. <Column size="0"/>
  100. <Column size="0"/>
  101. <Column size="0"/>
  102. <Column size="0"/>
  103. <Column size="0"/>
  104. </Columns>
  105. <Rows>
  106. <Row size="24" band="head"/>
  107. <Row size="24"/>
  108. </Rows>
  109. <Band id="head">
  110. <Cell/>
  111. <Cell col="1" text="입고일자/번호"/>
  112. <Cell col="2" text="입고일자/번호"/>
  113. <Cell col="3" text="순번"/>
  114. <Cell col="4" text="물품코드"/>
  115. <Cell col="5" text="Allsize"/>
  116. <Cell col="6" text="물품명"/>
  117. <Cell col="7" text="규격"/>
  118. <Cell col="8" text="단위"/>
  119. <Cell col="9" text="발주수량"/>
  120. <Cell col="10" text="입고수량"/>
  121. <Cell col="11" text="단가"/>
  122. <Cell col="12" text="금액"/>
  123. <Cell col="13" text="재고량"/>
  124. <Cell col="14" text="파일"/>
  125. <Cell col="15"/>
  126. <Cell col="16"/>
  127. <Cell col="17"/>
  128. <Cell col="18"/>
  129. <Cell col="19"/>
  130. <Cell col="20"/>
  131. <Cell col="21"/>
  132. <Cell col="22"/>
  133. <Cell col="23"/>
  134. <Cell col="24"/>
  135. <Cell col="25"/>
  136. </Band>
  137. <Band id="body">
  138. <Cell celltype="head"/>
  139. <Cell col="1" text="bind:windd"/>
  140. <Cell col="2" text="bind:winno"/>
  141. <Cell col="3" text="bind:winseq"/>
  142. <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:goodcd" expandshow="show"/>
  143. <Cell col="5" text="bind:allsizespecid"/>
  144. <Cell col="6" style="align:left middle;padding:0 0 0 3;" text="bind:goodhngnm"/>
  145. <Cell col="7" style="align:left middle;padding:0 0 0 3;" text="bind:goodspec"/>
  146. <Cell col="8" text="bind:purcunit"/>
  147. <Cell col="9" displaytype="number" edittype="normal" text="bind:orderqty"/>
  148. <Cell col="10" displaytype="number" edittype="normal" text="bind:winqty"/>
  149. <Cell col="11" displaytype="number" edittype="normal" text="bind:winunitcost"/>
  150. <Cell col="12" displaytype="number" edittype="none" text="bind:winamt"/>
  151. <Cell col="13" text="bind:jaego" mask="(-)#,###"/>
  152. <Cell col="14" text="bind:instcd"/>
  153. <Cell col="15" text="bind:wareflag"/>
  154. <Cell col="16" text="bind:wincustcd"/>
  155. <Cell col="17" text="bind:maincustlastsuplplce"/>
  156. <Cell col="18" text="bind:mainusedeptcd"/>
  157. <Cell col="19" text="bind:orderdd"/>
  158. <Cell col="20" text="bind:orderno"/>
  159. <Cell col="21" text="bind:orderseq"/>
  160. <Cell col="22" text="bind:ordergb"/>
  161. <Cell col="23" text="bind:acptdeptcd"/>
  162. <Cell col="24" text="bind:goodunitcost"/>
  163. <Cell col="25" text="bind:orderstat"/>
  164. </Band>
  165. </Format>
  166. </Formats>
  167. </Grid>
  168. <Button id="btn_detaildel" taborder="8" text="행삭제" class="btn2" visible="false" position="absolute 1086 351 1139 370" anchor="right bottom" onclick="btn_detaildel_onclick"/>
  169. <Button id="btn_detailadd" taborder="9" text="행추가" class="btn2" position="absolute 1140 351 1193 370" anchor="right bottom" onclick="btn_detailadd_onclick"/>
  170. <Button id="btn_delapntrgst" taborder="10" text="행삭제" class="btn2" visible="false" position="absolute 1086 95 1139 114" anchor="top right" onclick="btn_delapntrgst_onclick"/>
  171. <Button id="btn_addapntrgst" taborder="11" text="행추가" class="btn2" position="absolute 1140 95 1193 114" anchor="top right" onclick="btn_addapntrgst_onclick"/>
  172. <Shape id="line00" class="line_10" position="absolute -1 113 1193 122"/>
  173. <Shape id="line01" class="line_10" position="absolute -1 369 1193 378"/>
  174. </Layout>
  175. </Layouts>
  176. <Objects>
  177. <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  178. <ColumnInfo>
  179. <Column id="instcd" type="STRING" size="256"/>
  180. <Column id="fromdd" type="STRING" size="256"/>
  181. <Column id="todd" type="STRING" size="256"/>
  182. </ColumnInfo>
  183. <Rows>
  184. <Row>
  185. <Col id="instcd"/>
  186. <Col id="fromdd"/>
  187. <Col id="todd"/>
  188. </Row>
  189. </Rows>
  190. </Dataset>
  191. <Dataset id="ds_main_predelivewinmaster_predelivewinmasterlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  192. <ColumnInfo>
  193. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  194. <Column id="wareflag" type="STRING" size="256" sumtext="청구구분"/>
  195. <Column id="windd" type="STRING" size="256" sumtext="선납입고일자"/>
  196. <Column id="winno" type="STRING" size="256" sumtext="선납입고번호"/>
  197. <Column id="wincustcd" type="STRING" size="256" sumtext="거래처코드"/>
  198. <Column id="wincustnm" type="STRING" size="256" sumtext="거래처코드명"/>
  199. <Column id="acntcd" type="STRING" size="256" sumtext="부서코드"/>
  200. <Column id="acptdeptcd" type="STRING" size="256" sumtext="부서코드"/>
  201. <Column id="acptdeptnm" type="STRING" size="256" sumtext="부서코드명"/>
  202. <Column id="orderdd" type="STRING" size="256" sumtext="발주일자"/>
  203. <Column id="orderno" type="STRING" size="256" sumtext="발주번호"/>
  204. <Column id="ordergb" type="STRING" size="256" sumtext="발주구분"/>
  205. <Column id="delivedd" type="STRING" size="256" sumtext="선납출고일자"/>
  206. <Column id="deliveno" type="STRING" size="256" sumtext="선납출고번호"/>
  207. </ColumnInfo>
  208. </Dataset>
  209. <Dataset id="ds_main_predelivewindetail_predelivewindetaillist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_predelivewindetail_predelivewindetaillist_oncolumnchanged">
  210. <ColumnInfo>
  211. <Column id="windd" type="STRING" size="256" sumtext="선납입고일자"/>
  212. <Column id="winno" type="STRING" size="256" sumtext="입고번호"/>
  213. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  214. <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
  215. <Column id="wincustcd" type="STRING" size="256" sumtext="선납입고거래처"/>
  216. <Column id="winseq" type="STRING" size="256" sumtext="순번"/>
  217. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  218. <Column id="allsizespecid" type="STRING" size="256" sumtext="allsize"/>
  219. <Column id="goodhngnm" type="STRING" size="256" sumtext="물품명"/>
  220. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  221. <Column id="purcunit" type="STRING" size="256" sumtext="단위"/>
  222. <Column id="orderqty" type="STRING" size="256" sumtext="발주수량"/>
  223. <Column id="winqty" type="STRING" size="256" sumtext="선납입고수량"/>
  224. <Column id="winunitcost" type="STRING" size="256" sumtext="선납입고단가"/>
  225. <Column id="winamt" type="STRING" size="256" sumtext="선납입고금액"/>
  226. <Column id="acntcd" type="STRING" size="256" sumtext="계정과목"/>
  227. <Column id="orderdd" type="STRING" size="256" sumtext="발주일자"/>
  228. <Column id="orderno" type="STRING" size="256" sumtext="발주번호"/>
  229. <Column id="ordergb" type="STRING" size="256" sumtext="발주구분"/>
  230. <Column id="maincustlastsuplplce" type="STRING" size="256" sumtext="창구구분"/>
  231. <Column id="mainusedeptcd" type="STRING" size="256" sumtext="납품장소"/>
  232. <Column id="acptdeptcd" type="STRING" size="256" sumtext="수령부서"/>
  233. <Column id="jaego" type="STRING" size="256" sumtext="재고"/>
  234. <Column id="orderstat" type="STRING" size="256" sumtext="발주상태"/>
  235. </ColumnInfo>
  236. </Dataset>
  237. <Dataset id="ds_send_detailsearch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  238. <ColumnInfo>
  239. <Column id="instcd" type="STRING" size="256"/>
  240. <Column id="wareflag" type="STRING" size="256"/>
  241. <Column id="windd" type="STRING" size="256"/>
  242. <Column id="winno" type="STRING" size="256"/>
  243. <Column id="wincustcd" type="STRING" size="256"/>
  244. </ColumnInfo>
  245. <Rows>
  246. <Row>
  247. <Col id="instcd"/>
  248. <Col id="wareflag"/>
  249. <Col id="windd"/>
  250. <Col id="winno"/>
  251. <Col id="wincustcd"/>
  252. </Row>
  253. </Rows>
  254. </Dataset>
  255. <Dataset id="ds_popgood" 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="selectyn" type="STRING" size="256"/>
  259. <Column id="goodcd" type="STRING" size="256"/>
  260. <Column id="delivedd" type="STRING" size="256"/>
  261. </ColumnInfo>
  262. <Rows>
  263. <Row>
  264. <Col id="instcd"/>
  265. <Col id="selectyn"/>
  266. <Col id="goodcd"/>
  267. <Col id="delivedd"/>
  268. </Row>
  269. </Rows>
  270. </Dataset>
  271. <Dataset id="ds_popgood_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  272. <ColumnInfo>
  273. <Column id="goodcd" type="STRING" size="256"/>
  274. </ColumnInfo>
  275. </Dataset>
  276. <Dataset id="ds_main_gooddetail" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  277. <ColumnInfo>
  278. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드"/>
  279. <Column id="goodnm" type="STRING" size="256" sumtext="물품명"/>
  280. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  281. <Column id="deliveunit" type="STRING" size="256" sumtext="출고단위"/>
  282. <Column id="exchqty" type="STRING" size="256" sumtext="환산배수"/>
  283. <Column id="siqty" type="STRING" size="256" sumtext="시점재고"/>
  284. <Column id="hunqty" type="STRING" size="256" sumtext="현재고"/>
  285. <Column id="goodunitcost" type="STRING" size="256" sumtext="단가"/>
  286. <Column id="allsizespecid" type="STRING" size="256" sumtext="ALLSIZE"/>
  287. <Column id="purcunit" type="STRING" size="256" sumtext="입고단위"/>
  288. <Column id="mainusedeptcd" type="STRING" size="256" sumtext="주사용부서코드"/>
  289. <Column id="maincustlastsuplplce" type="STRING" size="256" sumtext="최종공급처"/>
  290. <Column id="wareflag" type="STRING" size="256" sumtext="창고구분"/>
  291. <Column id="wstyn" type="STRING" size="256" sumtext="의료폐기물 용기 여부"/>
  292. </ColumnInfo>
  293. </Dataset>
  294. <Dataset id="ds_main_predelivewinspec_predelivewinspeclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  295. <Dataset id="ds_send_header" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  296. <ColumnInfo>
  297. <Column id="custcode" type="STRING" size="256"/>
  298. <Column id="wareflag" type="STRING" size="256"/>
  299. </ColumnInfo>
  300. <Rows>
  301. <Row/>
  302. </Rows>
  303. </Dataset>
  304. <Dataset id="ds_popreq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  305. <ColumnInfo>
  306. <Column id="count" type="INT" size="256"/>
  307. </ColumnInfo>
  308. <Rows>
  309. <Row/>
  310. </Rows>
  311. </Dataset>
  312. <Dataset id="ds_popsubdata_plceordlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  313. </Objects>
  314. <Bind>
  315. <BindItem id="item0" compid="group4.cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
  316. <BindItem id="item1" compid="group4.ipt_windd" propid="value" datasetid="ds_send_search" columnid="fromdd"/>
  317. <BindItem id="item2" compid="group4.ipt_winddto" propid="value" datasetid="ds_send_search" columnid="todd"/>
  318. </Bind>
  319. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  320. * System Name :
  321. * Job Name :
  322. * Creator :
  323. * Make Date : 2017-06-19
  324. * Description :
  325. *---------------------------------------------------------------------------------------
  326. * Modify Date Modifier Modify Description
  327. *---------------------------------------------------------------------------------------
  328. * 2017-06-19 Live Converter TF->XP
  329. *
  330. *---------------------------------------------------------------------------------------
  331. ****************************************************************************************/
  332. include "com_commonxp::comm_main.xjs";
  333. include "mis_miscommonxp::MIS.xjs";
  334. var arErrorCode = new HashArray();
  335. function SMRSD07700_oninit(obj:Form, e:InitEventInfo)
  336. {
  337. frmf_initForm(obj);
  338. }
  339. function SMRSD07700_onload(obj:Form, e:LoadEventInfo)
  340. {
  341. grdf_initGrid(grd_predelivewindetaillist);
  342. grdf_setRowTypeIcon(grd_predelivewindetaillist, 0);
  343. grdf_initGrid(grd_predelivewinmasterlist);
  344. grdf_setRowTypeIcon(grd_predelivewinmasterlist, 0);
  345. fInit();
  346. }
  347. function fInit()
  348. {
  349. misfGridInit(grd_predelivewinmasterlist);
  350. misfGridInit(grd_predelivewindetaillist);
  351. misfComboInstCdListMulti("group4.cmb_instcd",utlf_getCurrentDate(),"","N");
  352. group4.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
  353. ds_send_search.setColumn(0, "fromdd", utlf_getCurrentDate().toDate().getAddDate(-7).getDateFormat("YYYYMMDD"));
  354. ds_send_search.setColumn(0, "todd", utlf_getCurrentDate());
  355. if(sysf_getUserInfo("userid") == "MIS")
  356. {
  357. btn_delapntrgst.visible = true;
  358. btn_detaildel.visible = true;
  359. }
  360. }
  361. function group4_btn_search_onclick(obj:Button, e:ClickEventInfo)
  362. {
  363. if(utlf_isNull(group4.ipt_windd.value))
  364. {
  365. sysf_messageBox("입고일자가 없습니다. 확인하여 주십시오.", "E999", "");
  366. group4.ipt_windd.setFocus();
  367. return;
  368. }
  369. misfGridInit(grd_predelivewinmasterlist);
  370. misfGridInit(grd_predelivewindetaillist);
  371. var oParam = {};
  372. oParam.id = "TRRSD07701";
  373. oParam.service = "reqapp.ReqMngt";
  374. oParam.method = "reqGetPreDeliveWinMasterList";
  375. oParam.inds = "req=ds_send_search";
  376. oParam.outds = "ds_main_predelivewinmaster_predelivewinmasterlist=predelivewinmasterlist";
  377. oParam.async = false;
  378. //oParam.callback = "cf_TRRSD07701";
  379. tranf_submit(oParam);
  380. }
  381. function grd_predelivewinmasterlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  382. {
  383. if(e.cell == obj.getBindCellIndex("Body", "acptdeptcd"))
  384. {
  385. misfOpenPopUpList("02", grd_predelivewinmasterlist,"", "acptdeptcd,acptdeptnm") ;
  386. }
  387. else if (e.cell == obj.getBindCellIndex("Body", "wincustcd"))
  388. {
  389. rszfOpenPopUpListByWndName(grd_predelivewinmasterlist,"","wincustcd,wincustnm","SPRSD00220","instcd","group4.cmb_instcd");
  390. }
  391. }
  392. function grd_predelivewinmasterlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  393. {
  394. if(!(ds_main_predelivewinmaster_predelivewinmasterlist.getRowType(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition) == 2))
  395. {
  396. if(ds_main_predelivewindetail_predelivewindetaillist.getRowType(0) == 2 )
  397. {
  398. sysf_messageBox("현재 하단 디테일에 입력중인 자료가 있습니다.", "E999", "");
  399. return;
  400. }
  401. ds_send_detailsearch.setColumn(0, "instcd", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "instcd"));
  402. ds_send_detailsearch.setColumn(0, "wareflag", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wareflag"));
  403. ds_send_detailsearch.setColumn(0, "windd", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "windd"));
  404. ds_send_detailsearch.setColumn(0, "winno", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "winno"));
  405. ds_send_detailsearch.setColumn(0, "wincustcd", ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wincustcd"));
  406. var oParam = {};
  407. oParam.id = "TRRSD07704";
  408. oParam.service = "reqapp.ReqMngt";
  409. oParam.method = "reqGetPreDeliveWinDetailList";
  410. oParam.inds = "req=ds_send_detailsearch";
  411. oParam.outds = "ds_main_predelivewindetail_predelivewindetaillist=predelivewindetaillist";
  412. oParam.async = false;
  413. //oParam.callback = "cf_TRRSD07704";
  414. tranf_submit(oParam);
  415. }
  416. }
  417. function grd_predelivewindetaillist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  418. {
  419. ds_popgood.setColumn(0, "wareflag", "");
  420. ds_popgood.setColumn(0, "basedd", "");
  421. ds_popgood.setColumn(0, "selectyn", "");
  422. ds_popgood.setColumn(0, "instcd", group4.cmb_instcd.value);
  423. ds_popgood.setColumn(0, "selectyn", ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "windd"));
  424. var objArg = new Object();
  425. objArg.arg_ds_popdata = ds_popgood;
  426. frmf_modal("SPRSO20700", "SPRSO20700", objArg, "", "", "", "", "", "", "", "", "", "M");
  427. if(ds_popgood.getColumn(0, "selectyn") == "Y")
  428. {
  429. fGetGoodDetail();
  430. grd_predelivewindetaillist.col = grd_predelivewindetaillist.colRef("winqty");
  431. }
  432. }
  433. function fGetGoodDetail()
  434. {
  435. for(var k = 0; k < ds_popgood_goodlist.rowcount; k++)
  436. {
  437. var bDup = false;
  438. for(var i = 0; i < ds_main_predelivewindetail_predelivewindetaillist.rowcount; i++)
  439. {
  440. if( ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "goodcd") == ds_popgood_goodlist.getColumn(k, "goodcd"))
  441. {
  442. sysf_messageBox("물품코드가 중복되었습니다. [" + ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodcd") + "] ", "E999", "");
  443. bDup = true;
  444. continue;
  445. }
  446. }
  447. if( bDup == false )
  448. {
  449. ds_main_gooddetail.clearData();
  450. ds_popgood.setColumn(0, "goodcd", ds_popgood_goodlist.getColumn(k, "goodcd"));
  451. var oParam = {};
  452. oParam.id = "TRRSO20104";
  453. oParam.service = "deliveapp.DeliveMngt";
  454. oParam.method = "reqGetGoodDetail";
  455. oParam.inds = "req=ds_popgood";
  456. oParam.outds = "ds_main_gooddetail=gooddetail";
  457. oParam.async = false;
  458. oParam.callback = "cf_TRRSO20104";
  459. tranf_submit(oParam);
  460. if(arErrorCode.pop("TRRSO20104") > -1)
  461. {
  462. var maincustlastsuplplce = ""; //ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "maincustlastsuplplce");
  463. var wareflag = "";// ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "wareflag");
  464. for( var j = 0; j > ds_main_predelivewindetail_predelivewindetaillist.rowcount; j++ )
  465. {
  466. if(ds_main_predelivewindetail_predelivewindetaillist.getColumn(j, "wincustcd") != maincustlastsuplplce)
  467. {
  468. sysf_messageBox("이미 입력된 물품과 거래처가 달라 추가할 수 없습니다.", "E999", "");
  469. continue;
  470. }
  471. if(ds_main_predelivewindetail_predelivewindetaillist.getColumn(j, "wincustcd") != wareflag)
  472. {
  473. sysf_messageBox("이미 입력된 물품과 창고구분이 달라 추가할 수 없습니다.", "E999", "");
  474. continue;
  475. }
  476. }
  477. if(!utlf_isNull(ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodcd")))
  478. {
  479. btn_detailadd.click();
  480. }
  481. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodcd", ds_main_gooddetail.getColumn(0, "goodcd"));
  482. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodhngnm", ds_main_gooddetail.getColumn(0, "goodnm"));
  483. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodspec", ds_main_gooddetail.getColumn(0, "goodspec"));
  484. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "goodunitcost", ds_main_gooddetail.getColumn(0, "goodunitcost"));
  485. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "allsizespecid", ds_main_gooddetail.getColumn(0, "allsizespecid"));
  486. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "purcunit", ds_main_gooddetail.getColumn(0, "purcunit"));
  487. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "mainusedeptcd", ds_main_gooddetail.getColumn(0, "mainusedeptcd"));
  488. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "maincustlastsuplplce", ds_main_gooddetail.getColumn(0, "maincustlastsuplplce"));
  489. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "wareflag", ds_main_gooddetail.getColumn(0, "wareflag"));
  490. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowcount-1, "wincustcd", ds_main_gooddetail.getColumn(0, "maincustlastsuplplce"));
  491. for( var j = 0; j > ds_main_predelivewindetail_predelivewindetaillist.rowcount; j++ )
  492. {
  493. if(!(ds_send_header.getColumn(0, "custcode") == maincustlastsuplplce && ds_send_header.getColumn(0, "wareflag") == mainusedeptcd))
  494. {
  495. sysf_messageBox("선택한 물품의 공급업체나 창고구분이 위에 설정된 값과 다릅니다.", "E999", "");
  496. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "maincustlastsuplplce", "");
  497. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "mainusedeptcd", "");
  498. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodcd", "");
  499. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "allsizespecid", "");
  500. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodhngnm", "");
  501. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodspec", "");
  502. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "purcunit", "");
  503. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winunitcost", "");
  504. return
  505. }
  506. }
  507. var winqty = ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winqty");
  508. var goodunitcost = ds_main_predelivewindetail_predelivewindetaillist.getColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "goodunitcost");
  509. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winamt", winqty * goodunitcost);
  510. }
  511. }
  512. }
  513. }
  514. function cf_TRRSO20104(sSvcId, nErrorCode, sErrorMsg)
  515. {
  516. arErrorCode.push(sSvcId, nErrorCode);
  517. if(nErrorCode < 0) return;
  518. }
  519. function ds_main_predelivewindetail_predelivewindetaillist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  520. {
  521. var winqty = obj.getColumn(e.row, "winqty");
  522. var winunitcost = obj.getColumn(e.row, "winunitcost");
  523. if (e.columnid == "winqty")
  524. {
  525. winqty = e.newvalue;
  526. }
  527. if(e.columnid == "winunitcost")
  528. {
  529. winunitcost = e.newvalue;
  530. }
  531. obj.setColumn(e.row, "winamt", winqty * winunitcost);
  532. }
  533. function btn_delapntrgst_onclick(obj:Button, e:ClickEventInfo)
  534. {
  535. misfGridIUD(grd_predelivewinmasterlist,"D");
  536. }
  537. function btn_addapntrgst_onclick(obj:Button, e:ClickEventInfo)
  538. {
  539. for( var i = 0; i < ds_main_predelivewinmaster_predelivewinmasterlist.rowcount; i++ )
  540. {
  541. if(ds_main_predelivewinmaster_predelivewinmasterlist.getRowType(i) == 2)
  542. {
  543. sysf_messageBox("이미 입력중인 행이 있습니다. 한번에 한 건씩만 입력이 가능합니다.", "I999", "");
  544. return;
  545. }
  546. }
  547. var addRow = ds_main_predelivewinmaster_predelivewinmasterlist.addRow();
  548. misfGridInit(grd_predelivewindetaillist);
  549. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "instcd", group4.cmb_instcd.value);
  550. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "windd", group4.ipt_windd.value);
  551. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderdd", group4.ipt_windd.value);
  552. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "ordergb", "2");
  553. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderqty", "0");
  554. }
  555. function btn_detaildel_onclick(obj:Button, e:ClickEventInfo)
  556. {
  557. misfGridIUD(grd_predelivewindetaillist,"D");
  558. }
  559. function btn_detailadd_onclick(obj:Button, e:ClickEventInfo)
  560. {
  561. var addRow = ds_main_predelivewindetail_predelivewindetaillist.addRow();
  562. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "orderqty", "0");
  563. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winqty", "0");
  564. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winunitcost", "0");
  565. ds_main_predelivewindetail_predelivewindetaillist.setColumn(ds_main_predelivewindetail_predelivewindetaillist.rowposition, "winamt", "0");
  566. }
  567. function btn_print_onclick(obj:Button, e:ClickEventInfo)
  568. {
  569. group4.btn_search.click();
  570. var objDOM = rptf_createDOM();
  571. rptf_setNodeListToDOM(objDOM, "/root/main/predelivewinspec/predelivewinspeclist", ds_main_predelivewindetail_predelivewindetaillist);
  572. rptf_setNodeListToDOM(objDOM, "/root/main/predelivewinspec/predelivewinspecheader", ds_main_predelivewindetail_predelivewindetaillist);
  573. var objParam = new Object();
  574. objParam.xml_data_XML1 = objDOM.documentElement.source;
  575. objParam.instnm = group4.cmb_instcd.text;
  576. var option = "";
  577. rptf_exeReportPreview30(["RPRSD07701"],[objParam], option);
  578. }
  579. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  580. {
  581. fInit();
  582. }
  583. function btn_plceord_onclick(obj:Button, e:ClickEventInfo)
  584. {
  585. ds_popreq.setColumn(0, "count", 0);
  586. var objArg = new Object();
  587. objArg.arg_ds_popdata = ds_popreq;
  588. frmf_modal("SMRSD07710", "SMRSD07710", objArg, "", "", "", "", "", "", "", "", "", "M");
  589. var cnt = ds_popreq.getColumn(0, "count");
  590. var rowcomparison = 0;
  591. misfGridInit(grd_predelivewinmasterlist);
  592. misfGridInit(grd_predelivewindetaillist);
  593. if(!(utlf_isNull(cnt) || cnt == 0))
  594. {
  595. var addRow = ds_main_predelivewinmaster_predelivewinmasterlist.addRow();
  596. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "instcd", group4.cmb_instcd.value);
  597. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "windd", group4.ipt_windd.value);
  598. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderdd", ds_popsubdata_plceordlist.getColumn(0, "orderdd"));
  599. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "orderno", ds_popsubdata_plceordlist.getColumn(0, "orderno"));
  600. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "ordergb", "1");
  601. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "wincustcd", ds_popsubdata_plceordlist.getColumn(0, "custcode"));
  602. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "wincustnm", ds_popsubdata_plceordlist.getColumn(0, "custnm"));
  603. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "wareflag", ds_popsubdata_plceordlist.getColumn(0, "mainusedeptcd"));
  604. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "acptdeptcd", ds_popsubdata_plceordlist.getColumn(0, "acptdeptcd"));
  605. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(addRow, "acptdeptnm", ds_popsubdata_plceordlist.getColumn(0, "acptdeptnm"));
  606. }
  607. var oldmainusedeptcd = ds_popsubdata_plceordlist.getColumn(0, "mainusedeptcd");
  608. var oldcustcode = ds_popsubdata_plceordlist.getColumn(0, "custcode");
  609. var oldacptdeptcd = ds_popsubdata_plceordlist.getColumn(0, "acptdeptcd");
  610. for(var i = 0; i < cnt ; i++)
  611. {
  612. var newmainusedeptcd = ds_popsubdata_plceordlist.getColumn(i, "mainusedeptcd");
  613. var newcustcode = ds_popsubdata_plceordlist.getColumn(i, "custcode");
  614. var newacptdeptcd = ds_popsubdata_plceordlist.getColumn(i, "acptdeptcd");
  615. if(oldmainusedeptcd == newmainusedeptcd && oldcustcode == newcustcode && oldacptdeptcd == newacptdeptcd)
  616. {
  617. ds_main_predelivewindetail_predelivewindetaillist.addRow();
  618. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "windd", group4.ipt_windd.value);
  619. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "instcd", ds_popsubdata_plceordlist.getColumn(i, "instcd"));
  620. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "wareflag", ds_popsubdata_plceordlist.getColumn(i, "mainusedeptcd"));
  621. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "wincustcd", ds_popsubdata_plceordlist.getColumn(i, "custcode"));
  622. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "acptdeptcd", ds_popsubdata_plceordlist.getColumn(i, "acptdeptcd"));
  623. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "goodcd", ds_popsubdata_plceordlist.getColumn(i, "goodcd"));
  624. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "allsizespecid", ds_popsubdata_plceordlist.getColumn(i, "allsizespecid"));
  625. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "goodhngnm", ds_popsubdata_plceordlist.getColumn(i, "goodhngnm"));
  626. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "goodspec", ds_popsubdata_plceordlist.getColumn(i, "goodspec"));
  627. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "purcunit", ds_popsubdata_plceordlist.getColumn(i, "purcunit"));
  628. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderqty", ds_popsubdata_plceordlist.getColumn(i, "orderqty"));
  629. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderseq", ds_popsubdata_plceordlist.getColumn(i, "orderseq"));
  630. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "winqty", 0);
  631. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "winunitcost", ds_popsubdata_plceordlist.getColumn(i, "goodunitcost"));
  632. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "winamt", 0);
  633. }
  634. else
  635. {
  636. rowcomparison++;
  637. }
  638. }
  639. if(rowcomparison > 0)
  640. {
  641. sysf_messageBox("공급업체,창고구분,납품장소가 다른 발주내역을 제외하고 행추가를 완료하였습니다.", "E999", "");
  642. }
  643. }
  644. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  645. {
  646. if(utlf_isNull(ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "windd")))
  647. {
  648. sysf_messageBox("선납입고 마스터 입고일자가 없습니다. 입력하여주십시오.", "E999", "");
  649. return;
  650. }
  651. var wincustcd = ds_main_predelivewindetail_predelivewindetaillist.getColumn(0, "wincustcd");
  652. var wareflag = ds_main_predelivewindetail_predelivewindetaillist.getColumn(0, "wareflag");
  653. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wincustcd", wincustcd);
  654. ds_main_predelivewinmaster_predelivewinmasterlist.setColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wareflag", wareflag);
  655. var windd = ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "windd");
  656. var instcd = ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "instcd");
  657. if(utlf_isNull(ds_main_predelivewinmaster_predelivewinmasterlist.getColumn(ds_main_predelivewinmaster_predelivewinmasterlist.rowposition, "wincustcd")))
  658. {
  659. sysf_messageBox("선납입고 마스터 선납입고거래처가 없습니다. 입력하여주십시오.", "E999", "");
  660. return;
  661. }
  662. for(var i = 0; i < ds_main_predelivewindetail_predelivewindetaillist.rowcount; i++)
  663. {
  664. var goodcd = ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "goodcd");
  665. if(utlf_isNull(goodcd))
  666. {
  667. sysf_messageBox(parseInt(i+1) + "번째 선납입고 디테일에 물품코드가 없습니다. 입력하여 주십시오", "E999", "");
  668. return;
  669. }
  670. var orderqty = ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "orderqty");
  671. var winqty = ds_main_predelivewindetail_predelivewindetaillist.getColumn(i, "winqty");
  672. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "windd", windd);
  673. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "instcd", instcd);
  674. if(parseInt(orderqty) == parseInt(winqty))
  675. {
  676. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderstat", "07");
  677. }
  678. else if(parseInt(orderqty) != parseInt(winqty))
  679. {
  680. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderstat", "05");
  681. }
  682. else if(parseInt(winqty) == 0)
  683. {
  684. ds_main_predelivewindetail_predelivewindetaillist.setColumn(i, "orderstat", "03");
  685. }
  686. }
  687. var oParam = {};
  688. oParam.id = "TXRSD07701";
  689. oParam.service = "reqapp.ReqMngt";
  690. oParam.method = "reqExePreDeliveWInList";
  691. oParam.inds = "predelivewinmasterlist=ds_main_predelivewinmaster_predelivewinmasterlist:u predelivewindetaillist=ds_main_predelivewindetail_predelivewindetaillist:u";
  692. oParam.outds = "";
  693. oParam.async = false;
  694. oParam.callback = "cf_TXRSD07701";
  695. tranf_submit(oParam);
  696. }
  697. function cf_TXRSD07701(sSvcId, nErrorCode, sErrorMsg)
  698. {
  699. if(nErrorCode < 0)
  700. {
  701. return;
  702. }
  703. else
  704. {
  705. group4.btn_search.click();
  706. }
  707. }
  708. ]]></Script>
  709. </Form>
  710. </FDL>