SMRSD07000_청구분 접수승인 및 발주처리.xrw 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>청구분 접수승인 및 발주처리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <goodreq>
  12. <goodreqlist/>
  13. </goodreq>
  14. </list>
  15. <item/>
  16. <RsdhdemdTrees>
  17. <TreeList>
  18. <depth/>
  19. <pcode/>
  20. <codecd/>
  21. <codenm/>
  22. <dispnm/>
  23. </TreeList>
  24. </RsdhdemdTrees>
  25. </main>
  26. <send>
  27. <save>
  28. <goodreqlist/>
  29. </save>
  30. <goodreq>
  31. <instcd/>
  32. <reqflag/>
  33. <reqfrdd/>
  34. <reqtodd/>
  35. <reqdeptcd/>
  36. <reqdeptnm/>
  37. <deptaprvyn/>
  38. </goodreq>
  39. <reqdetaillist/>
  40. <reqaprvlist/>
  41. <gooddetail>
  42. <instcd/>
  43. <reqflag/>
  44. <reqfrdd/>
  45. <reqtodd/>
  46. <reqdeptcd/>
  47. <reqdeptnm/>
  48. <deptaprvyn/>
  49. </gooddetail>
  50. </send>
  51. <init>
  52. <popmenu>
  53. <grd_goodreq>
  54. <item>
  55. <name>행추가</name>
  56. <func>fInsertReqRow</func>
  57. </item>
  58. <item>
  59. <name>행삭제</name>
  60. <func>fDeleteReqRow</func>
  61. </item>
  62. <item>
  63. <name>-</name>
  64. <func/>
  65. </item>
  66. <item>
  67. <name>청구SET목록조회</name>
  68. <func>fGetReqSetList</func>
  69. </item>
  70. <item>
  71. <name>-</name>
  72. <func/>
  73. </item>
  74. <item>
  75. <name>접수</name>
  76. <func>fSetGoodnm</func>
  77. </item>
  78. <item>
  79. <name>승인</name>
  80. <func>fSetGoodnm</func>
  81. </item>
  82. <item>
  83. <name>발주생성</name>
  84. <func>fSetGoodnm</func>
  85. </item>
  86. </grd_goodreq>
  87. </popmenu>
  88. <deptaprvyn>
  89. <label>전체</label>
  90. <value/>
  91. <label>승인</label>
  92. <value>Y</value>
  93. <label>미승인</label>
  94. <value>N</value>
  95. </deptaprvyn>
  96. <workflag>
  97. <label>청 구</label>
  98. <value>1</value>
  99. <label>반 품</label>
  100. <value>2</value>
  101. </workflag>
  102. <reqdeptcd/>
  103. <reqdeptnm/>
  104. <requserno/>
  105. <requsernm/>
  106. <reqfinaldeptcd/>
  107. <reqfinaldeptnm/>
  108. <nonaprvcnt/>
  109. <aprvcnt/>
  110. <totaprvcnt/>
  111. </init>
  112. <hidden/>
  113. <temp/>
  114. <copynode/>
  115. </root>
  116. </instance>
  117. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  118. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  119. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  120. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  121. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  122. <script type="javascript" src="../../../mis/reqweb/js/SMRSD07000.js"/>
  123. <script type="javascript" ev:event="xforms-ready">
  124. <![CDATA[
  125. fInitialize();
  126. ]]>
  127. </script>
  128. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  129. <submission id="TXRSD00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp"/>
  130. <submission id="TXRSO03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdetaillist" resultref="/root/temp"/>
  131. <submission id="TXRSD07002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqaprvlist" resultref="/root/temp"/>
  132. <submission id="TRRSD07001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddetail" resultref="/root/main/list/goodreq"/>
  133. <submission id="TRRSD07002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodreq" resultref="/root/main/RsdhdemdTrees"/>
  134. </model>
  135. </xhtml:head>
  136. <xhtml:body guideline="1,332;2,33;2,776;1,487;">
  137. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  138. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:270px; height:14px; ">청구분 접수승인 및 발주처리</caption>
  139. </group>
  140. <group id="group2" style="left:0px; top:18px; width:1195px; height:744px; ">
  141. <group id="group3" style="left:0px; top:15px; width:325px; height:720px; vertical-align:top; ">
  142. <treeview id="trv_setcode" ref="/root/main/RsdhdemdTrees/TreeList" expanddepth="1" image="../../../com/commonweb/images/icon_folder_close.gif" itemsettype="depth" selectedimage="../../../com/commonweb/images/icon_folder_open.gif" style="left:5px; top:173px; width:320px; height:544px; ">
  143. <itemset nodeset="/root/main/RsdhdemdTrees/TreeList">
  144. <label ref="dispnm"/>
  145. <value ref="pcode"/>
  146. <depth ref="depth"/>
  147. </itemset>
  148. <script type="javascript" ev:event="onclick">
  149. <![CDATA[
  150. // fDataSearchDetail(trv_setcode.focusIndex);
  151. // fTreeClick(trv_setcode.focusIndex);
  152. ]]>
  153. </script>
  154. <script type="javascript" ev:event="xforms-value-changed">
  155. <![CDATA[
  156. fDataSearchDetail(trv_setcode.focusIndex);
  157. ]]>
  158. </script>
  159. </treeview>
  160. <group id="group4" style="left:5px; top:0px; width:320px; height:172px; vertical-align:top; ">
  161. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:318px; height:170px; background-color:#fffbf2; border-color:#ffd799; "/>
  162. <select1 id="rdo_viewcls" ref="/root/WorkData/HideData/viewcls" appearance="full" cols="2" overflow="visible" style="left:189px; top:151px; width:120px; height:15px; border-style:none; ">
  163. <choices>
  164. <item>
  165. <label>일자별</label>
  166. <value>D</value>
  167. </item>
  168. <item>
  169. <label>부서별</label>
  170. <value>C</value>
  171. </item>
  172. </choices>
  173. <script type="javascript" ev:event="xforms-value-changed">
  174. <![CDATA[
  175. fRscmggbnTree();
  176. ]]>
  177. </script>
  178. </select1>
  179. <button id="button5" style="left:5px; top:141px; width:310px; height:25px; text-align:center; background-image:C:\CMCOracle\application\webapps\com\commonweb\images\btn2_letter20.gif; background-repeat:repeat-x; background-stretch:stretch; ">
  180. <caption>트리 재구성</caption>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. if(fCheckRetrieveData(false) == false)return;
  184. submit("TRRSD07002");
  185. trv_setcode.rebuild();
  186. ]]>
  187. </script>
  188. </button>
  189. <input id="ipt_reqtodd" ref="/root/send/goodreq/reqtodd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:210px; top:91px; width:102px; height:19px; ">
  190. <script type="javascript" ev:event="xforms-value-changed">
  191. <![CDATA[
  192. btn_search.dispatch("DOMActivate");
  193. ]]>
  194. </script>
  195. </input>
  196. <input id="ipt_reqfrdd" ref="/root/send/goodreq/reqfrdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:91px; top:91px; width:102px; height:19px; ">
  197. <script type="javascript" ev:event="xforms-value-changed">
  198. <![CDATA[
  199. btn_search.dispatch("DOMActivate");
  200. ]]>
  201. </script>
  202. </input>
  203. <caption id="caption11" class="search_name" style="left:5px; top:91px; width:86px; height:17px; ">청구일자 :</caption>
  204. <caption id="caption13" style="left:195px; top:91px; width:15px; height:20px; font-weight:bold; ">~</caption>
  205. <select1 id="rbo_deptaprvyn" ref="/root/send/goodreq/deptaprvyn" appearance="full" cellspacing="5" cols="3" overflow="visible" style="left:91px; top:5px; width:155px; height:15px; background-color:transparent; border-style:none; ">
  206. <choices>
  207. <itemset nodeset="/root/init/deptaprvyn">
  208. <label ref="label"/>
  209. <value ref="value"/>
  210. </itemset>
  211. </choices>
  212. <script type="javascript" ev:event="xforms-value-changed">
  213. <![CDATA[
  214. btn_search.dispatch("DOMActivate");
  215. ]]>
  216. </script>
  217. </select1>
  218. <caption id="caption5" class="search_name" style="left:5px; top:5px; width:86px; height:17px; ">진행구분 :</caption>
  219. <caption id="caption9" class="search_name" style="left:5px; top:116px; width:86px; height:17px; ">청구구분 :</caption>
  220. <select1 id="cmb_reqflag" ref="/root/send/goodreq/reqflag" class="combo_default" appearance="minimal" style="left:91px; top:115px; width:127px; height:19px; ">
  221. <choices>
  222. <itemset nodeset="/root/init/reqflag">
  223. <label ref="cdnm"/>
  224. <value ref="cdid"/>
  225. </itemset>
  226. </choices>
  227. <script type="javascript" ev:event="xforms-value-changed">
  228. <![CDATA[
  229. fSetReqAuth();
  230. btn_search.dispatch("DOMActivate");
  231. ]]>
  232. </script>
  233. </select1>
  234. <line id="line4" class="line_3" style="x1:2px; y1:137px; x2:317px; y2:137px; "/>
  235. <select1 id="cmb_instcd" ref="/root/send/goodreq/instcd" class="combo_default" appearance="minimal" style="left:91px; top:24px; width:152px; height:19px; ">
  236. <choices>
  237. <itemset nodeset="/root/init/instcd">
  238. <label ref="cdnm"/>
  239. <value ref="cdid"/>
  240. </itemset>
  241. </choices>
  242. <script type="javascript" ev:event="xforms-value-changed">
  243. <![CDATA[
  244. misfGridInit(grd_goodreq);
  245. rszfReqFlagComboComCdList(getUserInfo("userid"),cmb_reqflag ,"N",model.getValue(cmb_instcd.attribute("ref")));
  246. model.refresh();
  247. fSetReqAuth();
  248. btn_search.dispatch("DOMActivate");
  249. ]]>
  250. </script>
  251. </select1>
  252. <caption id="caption4" class="search_name" style="left:5px; top:25px; width:86px; height:17px; ">기관코드 :</caption>
  253. <button id="button29" class="icon_search" style="left:211px; top:49px; width:16px; height:16px; ">
  254. <caption/>
  255. <script type="javascript" ev:event="DOMActivate">
  256. <![CDATA[
  257. var recv_list = "reqdeptcd,reqdeptnm";
  258. misfOpenPopUpList("02", ipt_reqdeptcd,"", recv_list) ;
  259. model.refresh();
  260. ]]>
  261. </script>
  262. </button>
  263. <caption id="caption12" class="search_name" style="left:5px; top:49px; width:86px; height:17px; ">청구부서 :</caption>
  264. <input id="ipt_reqdeptnm" ref="/root/send/goodreq/reqdeptnm" class="put_fix" appearance="input" style="left:90px; top:68px; width:222px; height:19px; ">
  265. <script type="javascript" ev:event="xforms-value-changed">
  266. <![CDATA[
  267. if(ipt_reqdeptcd.value.lenth == 0)
  268. ipt_reqdeptnm.value = "";
  269. else
  270. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  271. model.refresh();
  272. ]]>
  273. </script>
  274. </input>
  275. <input id="ipt_reqdeptcd" ref="/root/send/goodreq/reqdeptcd" class="input_default" appearance="output" style="left:91px; top:47px; width:102px; height:19px; ">
  276. <script type="javascript" ev:event="xforms-value-changed">
  277. <![CDATA[
  278. if(ipt_reqdeptcd.value.lenth == 0)
  279. ipt_reqdeptnm.value = "";
  280. else
  281. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  282. model.refresh();
  283. ]]>
  284. </script>
  285. </input>
  286. <button id="btn_search" class="btn1_letter2" style="left:260px; top:5px; width:56px; height:22px; ">
  287. <caption>조회</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. fDataSearchTree();
  291. ]]>
  292. </script>
  293. </button>
  294. </group>
  295. </group>
  296. <!--
  297. <group id="grp_main" style="left:0px; top:15px; width:1195px; height:720px; ">
  298. <group id="grp_button" style="left:485px; top:0px; width:706px; height:49px; ">
  299. -->
  300. <group id="grp_main" style="left:332px; top:15px; width:863px; height:720px; ">
  301. <group id="grp_button" style="left:155px; top:0px; width:706px; height:49px; ">
  302. <caption id="opt_nonaprvtitle" style="left:144px; top:28px; width:79px; height:20px; font-weight:bold; vertical-align:middle; ">미승인건수 :</caption>
  303. <output id="opt_aprvcnt" ref="/root/init/aprvcnt" class="output_default" format="#,###" style="left:357px; top:28px; width:65px; height:19px; font-weight:bold; "/>
  304. <caption id="caption3" style="left:0px; top:28px; width:64px; height:20px; font-weight:bold; vertical-align:middle; ">전체건수 :</caption>
  305. <button id="btn_excel" class="btn2_letter2" style="left:443px; top:3px; width:42px; height:19px; ">
  306. <caption>엑셀</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. misfSaveExcel(grd_goodreq);
  310. ]]>
  311. </script>
  312. </button>
  313. <caption id="opt_aprvcnttitle" style="left:293px; top:28px; width:65px; height:20px; font-weight:bold; vertical-align:middle; ">승인건수 :</caption>
  314. <output id="opt_nonaprvcnt" ref="/root/init/nonaprvcnt" class="output_default" format="#,###" style="left:220px; top:28px; width:65px; height:19px; font-weight:bold; "/>
  315. <button id="btn_accept" class="btn4_letter2" style="left:580px; top:2px; width:56px; height:22px; ">
  316. <caption>승인</caption>
  317. <script type="javascript" ev:event="DOMActivate">
  318. <![CDATA[
  319. fSaveReqAprv();
  320. ]]>
  321. </script>
  322. </button>
  323. <button id="btn_clear" class="btn4_letter3" style="left:638px; top:2px; width:68px; height:22px; ">
  324. <caption>초기화</caption>
  325. <script type="javascript" ev:event="DOMActivate">
  326. <![CDATA[
  327. fInitialize();
  328. ]]>
  329. </script>
  330. </button>
  331. <button id="btn_email" class="btn2_letter6" style="left:487px; top:3px; width:86px; height:19px; ">
  332. <caption>E-Mail 전송</caption>
  333. </button>
  334. <output id="opt_totalaprvcnt" ref="/root/init/totaprvcnt" class="output_default" format="#,###" style="left:70px; top:28px; width:65px; height:19px; font-weight:bold; "/>
  335. </group>
  336. <caption id="caption8" class="tit_2" style="left:0px; top:6px; width:98px; height:13px; ">청구현황내역</caption>
  337. <!--
  338. <datagrid id="grd_goodreq" nodeset="/root/main/list/goodreq/goodreqlist" caption="청구부서^청구번호^청구일자^청구번호^순번^물품코드^물품명^규격^모델^제조회사^구매단위^청구^청구^비고^전월^접수^승인^승인" colsep="^" colwidth="0, 90, 0, 0, 0, 80, 268, 87, 85, 81, 58, 40, 55, 30, 48, 48, 30, 48, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:49px; width:1195px; height:621px; ">
  339. -->
  340. <datagrid id="grd_goodreq" nodeset="/root/main/list/goodreq/goodreqlist" caption="청구부서^청구번호^청구일자^청구번호^순번^물품코드^물품명^규격^모델^제조회사^구매단위^청구^청구^비고^전월^접수^승인^승인" colsep="^" colwidth="0, 111, 0, 0, 0, 71, 268, 110, 37, 60, 54, 40, 55, 30, 48, 48, 30, 48, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:49px; width:860px; height:621px; ">
  341. <col ref="reqdeptnm"/>
  342. <col ref="reqnodisp"/>
  343. <col ref="reqdd" visibility="hidden"/>
  344. <col ref="reqno" visibility="hidden"/>
  345. <col ref="reqseqno" visibility="hidden"/>
  346. <col ref="goodcd"/>
  347. <col ref="goodnm"/>
  348. <col ref="goodspec" type="output"/>
  349. <col ref="goodmodel" type="output"/>
  350. <col ref="prodcmpynm" type="output"/>
  351. <col ref="purcunit"/>
  352. <col ref="reqqty" format="#,###" style="text-align:right; "/>
  353. <col ref="requnit"/>
  354. <col ref="chkcmt" style="text-align:center; "/>
  355. <col/>
  356. <col ref="jobstatus"/>
  357. <col checkvalue="Y,N" ref="deptaprvyn" type="checkbox"/>
  358. <col ref="deptaprvnm"/>
  359. <col ref="instcd" visibility="hidden"/>
  360. <col ref="reqflag" visibility="hidden"/>
  361. <col ref="acptflag" visibility="hidden"/>
  362. <col ref="workflag" visibility="hidden"/>
  363. <col ref="reqmthdflag" visibility="hidden"/>
  364. <col ref="deliveflag" visibility="hidden"/>
  365. <col ref="reqpridflag" visibility="hidden"/>
  366. <col ref="goodflag" visibility="hidden"/>
  367. <col ref="bugtcd" visibility="hidden"/>
  368. <col ref="stdysubjno" visibility="hidden"/>
  369. <col ref="reqdeptcd" visibility="hidden"/>
  370. <col ref="reqcollcdeptcd" visibility="hidden"/>
  371. <col ref="delivedeptcd" visibility="hidden"/>
  372. <col ref="delivehopedd" visibility="hidden"/>
  373. <col ref="reqpsnid" visibility="hidden"/>
  374. <col ref="reqtm" visibility="hidden"/>
  375. <col ref="ddavguseqty" visibility="hidden"/>
  376. <col ref="basevol" visibility="hidden"/>
  377. <col ref="deptaprvdd" visibility="hidden"/>
  378. <col ref="acptdd" visibility="hidden"/>
  379. <col ref="acptcharid" visibility="hidden"/>
  380. <col ref="purcdmnddd" visibility="hidden"/>
  381. <col ref="purcdmndno" visibility="hidden"/>
  382. <col ref="purcdmndseq" visibility="hidden"/>
  383. <col ref="colreqdept" visibility="hidden"/>
  384. <col ref="colreqno" visibility="hidden"/>
  385. <col ref="colreqseqno" visibility="hidden"/>
  386. <col ref="deliveqty" visibility="hidden"/>
  387. <col ref="unwinresn" visibility="hidden"/>
  388. <col ref="deliveprcsflag" visibility="hidden"/>
  389. <col ref="cmt" visibility="hidden"/>
  390. <col ref="fstrgstrid" visibility="hidden"/>
  391. <col ref="fstrgstdt" visibility="hidden"/>
  392. <col ref="lastupdtrid" visibility="hidden"/>
  393. <col ref="lastupdtdt" visibility="hidden"/>
  394. <script type="javascript" ev:event="xforms-value-changed">
  395. <![CDATA[
  396. if (grd_goodreq.col == grd_goodreq.colRef("reqqty") ) {//청구량조절할경우
  397. basevol = grd_goodreq.valueMatrix(grd_goodreq.row , grd_goodreq.colRef("basevol"));
  398. stocqty = grd_goodreq.valueMatrix(grd_goodreq.row , grd_goodreq.colRef("stocqty"));
  399. reqqty = grd_goodreq.valueMatrix(grd_goodreq.row , grd_goodreq.colRef("reqqty"));
  400. minexch = grd_goodreq.valueMatrix(grd_goodreq.row , grd_goodreq.colRef("minexch"));
  401. if(minexch > 0 && (reqqty%minexch != 0))
  402. {
  403. messageBox((grd_goodreq.row )+ "번째 물품은 최소청구량["+ minexch + "] 에 맞춰서" , "C001");
  404. grd_goodreq.row = grd_goodreq.row;
  405. grd_goodreq.col= grd_goodreq.colRef("reqqty");
  406. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/reqqty","");
  407. grd_goodreq.editCell();
  408. return;
  409. }
  410. if(basevol > 0 && (basevol - stocqty) < reqqty)
  411. {
  412. messageBox((grd_goodreq.row) + "번째 물품은 기준량과 재료량을 기준으로 과다 청구되었습니다.처리","E001" );
  413. grd_goodreq.row = grd_goodreq.row;
  414. grd_goodreq.col= grd_goodreq.colRef("reqqty");
  415. grd_goodreq.editCell();
  416. return;
  417. }
  418. }
  419. else if(grd_goodreq.col == grd_goodreq.colRef("goodcd") ) {
  420. model.removenode("/root/copynode");
  421. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  422. model.makeNode("/root/copynode");
  423. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm,reqflag","goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," +model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/goodflag") + "," + model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/goodcd") + ",,,," + model.getValue(cmb_reqflag.attribute("ref")) ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,purcunit,stocqty,minexch,goodflag,ddavguseqty,reqflag",grd_goodreq,"SPRSD00190","instcd,goodflag","cmb_instcd," + model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/goodflag"),"Y");
  424. model.refresh();
  425. if( grd_goodreq.valueMatrix(cur_row, grd_goodreq.colRef("goodnm")).length> 0)
  426. {
  427. if(model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/minexch") > 0) model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/reqqty",model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/minexch") );
  428. else model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/reqqty","1");
  429. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/basevol",model.getValue("/root/init/main/goodlist/minexch"));
  430. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/requnit",model.getValue("/root/init/main/goodlist/purcunit"));
  431. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/reqmthdflag",model.getValue("/root/init/main/goodlist/reqmthd"));
  432. }
  433. model.refresh();
  434. var cur_row = grd_goodreq.row;
  435. var status = grd_goodreq.valueMatrix(cur_row, grd_goodreq.colRef("m"));
  436. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  437. if(CSV.length == 0 && grd_goodreq.valueMatrix(cur_row, grd_goodreq.colRef("goodnm")).length == 0)
  438. {
  439. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/goodcd" , "");
  440. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/goodcd" , "");
  441. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/goodnm" , "");
  442. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/goodspec" , "");
  443. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/goodflag" , "");
  444. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/goodmodel" , "");
  445. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/prodcmpynm" , "");
  446. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/purcunit" , "");
  447. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/basevol" , "");
  448. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/stocqty" , "");
  449. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/reqqty" , "");
  450. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/requnit" , "");
  451. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/minexch" , "");
  452. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/ddavguseqty" , "");
  453. grd_goodreq.col = grd_goodreq.colRef("goodcd");
  454. grd_goodreq.editCell();
  455. }
  456. else if (CSV.length > 0)
  457. {
  458. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/goodcd","");
  459. setCSVToNode("/root/copynode", CSV, "goodreqlist");
  460. fSettingGoodList("/root/copynode", "goodreqlist" , "userqty");
  461. }
  462. }
  463. else if(grd_goodreq.col == grd_goodreq.colRef("deptaprvyn") ) {
  464. if(model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/acptflag") == "N" &&
  465. model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/deptaprvyn") == "Y" )
  466. {
  467. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/deptaprvyn","N");
  468. if(grd_goodreq.rowStatus(grd_goodreq.row) == "2")grd_goodreq.rowStatus(grd_goodreq.row) = "0"
  469. }
  470. }
  471. else if(grd_goodreq.col == grd_goodreq.colRef("acptflag") ) {
  472. if(model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/acptflag") == "N" &&
  473. model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/deptaprvyn") == "Y" )
  474. {
  475. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/acptflag","Y");
  476. if(grd_goodreq.rowStatus(grd_goodreq.row) == "2")grd_goodreq.rowStatus(grd_goodreq.row) = "0"
  477. }
  478. }
  479. ]]>
  480. </script>
  481. <script type="javascript" ev:event="onbuttonclick">
  482. <![CDATA[
  483. if (grd_goodreq.col == grd_goodreq.colRef("goodcd") && grd_goodreq.rowStatus(grd_goodreq.row) == "1" ) {//구성물품코드를 눌렀을 경우
  484. model.removenode("/root/copynode");
  485. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  486. model.makeNode("/root/copynode");
  487. rszfOpenPopUpListByWndName(grd_goodreq,"","goodcd,goodnm","SPRSD00190","instcd,goodflag,reqflag","cmb_instcd,opt_goodflag,cmb_reqflag");
  488. var cur_row = grd_goodreq.row;
  489. var status = grd_goodreq.valueMatrix(cur_row, grd_goodreq.colRef("m"));
  490. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  491. setCSVToNode("/root/copynode", CSV, "goodreqlist");
  492. fSettingGoodList("/root/copynode", "goodreqlist" , "userqty");
  493. }
  494. ]]>
  495. </script>
  496. <script type="javascript" ev:event="onrowchanged">
  497. <![CDATA[
  498. tar_cmt.value = model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/cmt");
  499. ]]>
  500. </script>
  501. <script type="javascript" ev:event="onkeydown">
  502. <![CDATA[
  503. if(event.keyCode == 9)
  504. {
  505. if(event.shiftKey)
  506. {
  507. if(grd_goodreq.colAttribute(grd_goodreq.col + 1, "type").indexOf ("input") > -1)
  508. {
  509. for(curcol = grd_goodreq.col -1 ; curcol > -1 ; curcol--)
  510. {
  511. if(grd_goodreq.colAttribute(curcol, "type").indexOf ("input") > -1)
  512. {
  513. grd_goodreq.col = curcol;
  514. grd_goodreq.editCell();
  515. return;
  516. }
  517. }
  518. }
  519. }
  520. else
  521. {
  522. if(grd_goodreq.colAttribute(grd_goodreq.col, "type").indexOf ("input") == -1)
  523. {
  524. if(grd_goodreq.col - 1 == grd_goodreq.colRef("goodcd") && grd_goodreq.valueMatrix(grd_goodreq.row, grd_goodreq.col - 1).length == 0)
  525. {
  526. grd_goodreq.col = grd_goodreq.colRef("goodcd");
  527. grd_goodreq.editCell();
  528. return;
  529. }
  530. for(curcol = grd_goodreq.col ; curcol <grd_goodreq.cols ; curcol++)
  531. {
  532. if(grd_goodreq.colAttribute(curcol, "type").indexOf ("input") > -1)
  533. {
  534. grd_goodreq.col = curcol;
  535. grd_goodreq.editCell();
  536. return;
  537. }
  538. }
  539. }
  540. }
  541. }
  542. ]]>
  543. </script>
  544. </datagrid>
  545. <!--
  546. <textarea id="tar_cmt" style="left:110px; top:675px; width:1084px; height:40px; ">
  547. -->
  548. <textarea id="tar_cmt" style="left:110px; top:675px; width:752px; height:40px; ">
  549. <script type="javascript" ev:event="xforms-value-changed">
  550. <![CDATA[
  551. if(grd_goodreq.row > 0 &&( tar_cmt.value != model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/cmt")))
  552. {
  553. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1)+ "]/cmt", tar_cmt.value);
  554. if(grd_goodreq.rowStatus(grd_goodreq.row) == "0")grd_goodreq.rowStatus(grd_goodreq.row) = "2";
  555. model.refresh();
  556. }
  557. ]]>
  558. </script>
  559. </textarea>
  560. <caption id="caption17" class="cell_1" style="left:0px; top:675px; width:108px; height:40px; text-align:center; vertical-align:middle; ">비고</caption>
  561. <!--
  562. <line id="lin_main" class="line_1" style="x1:0px; y1:24px; x2:1192px; y2:24px; "/>
  563. -->
  564. <line id="lin_main" class="line_1" style="x1:0px; y1:24px; x2:861px; y2:24px; "/>
  565. <caption id="cpt_disp" style="left:110px; top:6px; width:495px; height:15px; "/>
  566. <button id="button57" class="icon_pre_month" style="left:0px; top:30px; width:16px; height:16px; ">
  567. <caption/>
  568. <script type="javascript" ev:event="DOMActivate">
  569. <![CDATA[
  570. fDisplayToggle("1");
  571. ]]>
  572. </script>
  573. </button>
  574. <button id="button58" class="icon_next_month" style="left:20px; top:30px; width:16px; height:16px; ">
  575. <caption/>
  576. <script type="javascript" ev:event="DOMActivate">
  577. <![CDATA[
  578. fDisplayToggle("0");
  579. ]]>
  580. </script>
  581. </button>
  582. </group>
  583. </group>
  584. </xhtml:body>
  585. </xhtml:html>