SMRSI05400_입고내역조회(영양팀).xrw 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>입고내역조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <nutrwin>
  12. <nutrwinlist/>
  13. </nutrwin>
  14. <nutrcustwin>
  15. <nutrcustwinlist/>
  16. </nutrcustwin>
  17. </list>
  18. <item/>
  19. </main>
  20. <send>
  21. <nutrwin>
  22. <instcd/>
  23. <goodflag/>
  24. <windd/>
  25. <winno/>
  26. <winpsn/>
  27. <winpsnnm/>
  28. <windeptcd/>
  29. <windeptnm/>
  30. <delivepsn/>
  31. <delivepsnnm/>
  32. <delivedeptcd/>
  33. <delivedeptnm/>
  34. <installplcecd/>
  35. <installplcenm/>
  36. <paycond/>
  37. <suplplcecd/>
  38. <suplplcenm/>
  39. <temppay/>
  40. <calcdocukind/>
  41. <elctstmntyn/>
  42. <calcdocudd/>
  43. <purcdmndfrdd/>
  44. <purcdmndtodd/>
  45. <addtax/>
  46. <iokind/>
  47. <winfrdd/>
  48. <wintodd/>
  49. <goodcd/>
  50. <goodnm/>
  51. <calccnfmyn/>
  52. <addtaxyn/>
  53. </nutrwin>
  54. <sendlist>
  55. <nutrwinlist/>
  56. <untrcustwinlist/>
  57. </sendlist>
  58. </send>
  59. <init>
  60. <winqty/>
  61. <patmealwinqty/>
  62. <curemealwinqty/>
  63. <empmealwinqty/>
  64. <empnigtmealwinqty/>
  65. <winamt/>
  66. <patmealwinamt/>
  67. <curemealwinamt/>
  68. <empmealwinamt/>
  69. <empnigtmealwinamt/>
  70. <custwinamt/>
  71. <custpatmealwinamt/>
  72. <custcuremealwinamt/>
  73. <custempmealwinamt/>
  74. <custempnigtmealwinamt/>
  75. <calccnfmdd/>
  76. </init>
  77. <hidden/>
  78. <temp/>
  79. <copynode/>
  80. <init>
  81. <calcdoukind/>
  82. </init>
  83. </root>
  84. </instance>
  85. <script type="javascript" ev:event="xforms-ready">
  86. <![CDATA[
  87. //화면 Control을 초기화한다
  88. fInitialize();
  89. ]]>
  90. </script>
  91. <submission id="TRRSI05402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/nutrwin" resultref="/root/main/list/nutrwin"/>
  92. <submission id="TXRSI05401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sendlist" resultref="/root/temp"/>
  93. <submission id="TRRSI05403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/nutrwin" resultref="/root/main/list/nutrcustwin"/>
  94. <submission id="TXRSI05404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sendlist" resultref="/root/temp"/>
  95. </model>
  96. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  97. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  98. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  99. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  100. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  101. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  102. <script type="javascript">
  103. <![CDATA[
  104. // <bind id="winunitcost" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/winunitcost" calculate="../goodunitcost"/>
  105. // <bind id="nonpatmealwinamt" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/patmealwinamt" calculate="../goodunitcost *../patmealwinqty"/>
  106. // <bind id="noncuremealwinamt" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/curemealwinamt" calculate="../goodunitcost *../curemealwinqty"/>
  107. // <bind id="nonempmealwinamt" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/empmealwinamt" calculate="../goodunitcost *../empmealwinqty"/>
  108. // <bind id="nonempnigtmealwinamt" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/empnigtmealwinamt" calculate="../goodunitcost *../empnigtmealwinqty"/>
  109. // <bind id="nonwinqty" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/winqty" calculate="../patmealwinqty +../curemealwinqty + ../empmealwinqty +../empnigtmealwinqty"/>
  110. // <bind id="nonwinamt" ref="/root/main/list/nutrtnonwin/nutrnonwinlist/winamt" calculate="../winqty * ../goodunitcost"/>
  111. // <bind id="patmealwinamt" ref="/root/main/list/nutrwin/nutrwinlist/patmealwinamt" calculate="../winunitcost *../patmealwinqty"/>
  112. // <bind id="curemealwinamt" ref="/root/main/list/nutrwin/nutrwinlist/curemealwinamt" calculate="../winunitcost *../curemealwinqty"/>
  113. // <bind id="empmealwinamt" ref="/root/main/list/nutrwin/nutrwinlist/empmealwinamt" calculate="../winunitcost *../empmealwinqty"/>
  114. // <bind id="empnigtmealwinamt" ref="/root/main/list/nutrwin/nutrwinlist/empnigtmealwinamt" calculate="../winunitcost *../empnigtmealwinqty"/>
  115. // <bind id="sumpatqty" ref="/root/main/list/nutrwin/nutrwinlist/sumpatqty" calculate="../patmealwinqty +../curemealwinqty"/>
  116. // <bind id="sumempqty" ref="/root/main/list/nutrwin/nutrwinlist/sumempqty" calculate="../empmealwinqty +../empnigtmealwinqty"/>
  117. // <bind id="sumpatamt" ref="/root/main/list/nutrwin/nutrwinlist/sumpatamt" calculate="../sumpatqty *../winunitcost"/>
  118. // <bind id="sumempamt" ref="/root/main/list/nutrwin/nutrwinlist/sumempamt" calculate="../sumempqty *../winunitcost"/>
  119. // <bind id="winqty" ref="/root/main/list/nutrwin/nutrwinlist/winqty" calculate="../patmealwinqty +../curemealwinqty + ../empmealwinqty +../empnigtmealwinqty"/>
  120. // <bind id="winamt" ref="/root/main/list/nutrwin/nutrwinlist/winamt" calculate="../sumpatamt +../sumempamt"/>
  121. var RetrYn = "Y";
  122. function fInitialize() {
  123. misfGridInit(grd_nutrwin);
  124. misfGridInit(grd_untrcustwinlist);
  125. grd_nutrwin.rowHeight(0) = "20";
  126. grd_nutrwin.rowHeight(1) = "20";
  127. model.resetInstanceNode("/root/send");
  128. rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  129. // misfComboComCdList("Z0007", cmb_instcd, "N");
  130. //misfComboComCdList("R0109", grd_untrcustwinlist.calcdocu);
  131. misfComboComCdListMulti("Z0007,R0109" ,"cmb_instcd,grd_untrcustwinlist.calcdocukind");
  132. //misfComboCopyItemSet(combo_calcdoukind,"",grd_untrcustwinlist,"calcdocu"); //물품구분 콤보 노드카피
  133. model.removenode("/root/main/list/nutrwin/nutrwinlist");
  134. model.removenode("/root/main/list/nutrcustwin/nutrcustwinlist");
  135. var curdate = getCurrentDate();
  136. var cvtdate = curdate.toDate("YYYYMMDD");
  137. model.setValue(ipt_winfrdd.attribute("ref") ,curdate);
  138. model.setValue(ipt_wintodd.attribute("ref") ,curdate);
  139. model.setValue(ipt_calccnfmdd.attribute("ref") ,curdate.substr(0,6));
  140. // hidden column
  141. model.setValue(cmb_goodflag.attribute("ref"),'SF');
  142. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  143. //model.setValue(ipt_windeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  144. //model.makeValue("/root/send/nutrwin/windeptcd" , '3251000000');
  145. model.makeValue("/root/send/nutrwin/windeptcd" , getUserInfo("dutplcecd"));
  146. grd_nutrwin.explorerbar = "sortshow";
  147. //빈센트는 보이게 만든다.
  148. if(model.getValue(cmb_instcd.attribute("ref"))=='017'){
  149. caption19.visible = true;
  150. ipt_windeptcd2.visible = true;
  151. btn_windeptcd2.visible = true;
  152. ipt_windeptnm2.visible = true;
  153. }
  154. model.refresh();
  155. }
  156. function fCheckRetrieveData(pmsg)
  157. {
  158. if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
  159. {
  160. if(pmsg == true)
  161. {
  162. messageBox("기관코드를 " ,"C002");
  163. model.setFocus("cmb_instcd");
  164. }
  165. return false;
  166. }
  167. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  168. {
  169. if(pmsg == true)
  170. {
  171. messageBox("물품구분을 " ,"C002");
  172. model.setFocus("cmb_goodflag");
  173. }
  174. return false;
  175. }
  176. /*
  177. if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
  178. {
  179. if(pmsg == true)
  180. {
  181. messageBox("공급처를 " ,"C001");
  182. model.setFocus("ipt_suplplcecd");
  183. }
  184. return false;
  185. }
  186. */
  187. if(model.getValue(ipt_windeptcd.attribute("ref")).length== 0 )
  188. {
  189. if(pmsg == true)
  190. {
  191. messageBox("입고부서를 " ,"C001");
  192. model.setFocus("ipt_windeptcd");
  193. }
  194. return false;
  195. }
  196. if(model.getValue(ipt_winfrdd.attribute("ref")).length== 0 )
  197. {
  198. if(pmsg == true)
  199. {
  200. messageBox("입고시작일자를 " ,"C001");
  201. model.setFocus("ipt_winfrdd");
  202. }
  203. return false;
  204. }
  205. if(model.getValue(ipt_wintodd.attribute("ref")).length== 0 )
  206. {
  207. if(pmsg == true)
  208. {
  209. messageBox("입고종료일자를 " ,"C001");
  210. model.setFocus("ipt_wintodd");
  211. }
  212. return false;
  213. }
  214. return true;
  215. }
  216. function fGetMaxWinSeqNo()
  217. {
  218. var maxwinseqno = "";
  219. for(var currow = grd_nutrwin.fixedRows ; currow < grd_nutrwin.rows; currow++)
  220. {
  221. if(maxwinseqno < grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("winseqno")))
  222. maxwinseqno = grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("winseqno"));
  223. }
  224. if(maxwinseqno.length == 0)maxwinseqno = "001";
  225. else maxwinseqno = parseInt(maxwinseqno) + 1;
  226. maxwinseqno = "" + maxwinseqno;
  227. return maxwinseqno.getLeftPad(3,"0");
  228. }
  229. function fAfterRetrieveDay()
  230. {
  231. var winqty = 0;
  232. var winamt = 0;
  233. var patmealwinqty = 0;
  234. var curemealwinqty = 0;
  235. var empmealwinqty = 0;
  236. var empnigtmealwinqty = 0;
  237. var patmealwinamt = 0;
  238. var curemealwinamt = 0;
  239. var empmealwinamt = 0;
  240. var empnigtmealwinamt = 0;
  241. for(var currow = grd_nutrwin.fixedRows ; currow < grd_nutrwin.rows ; currow++)
  242. {
  243. winqty = winqty + parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("winqty")));
  244. winamt = winamt + 0 + parseFloat(grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("winamt")));
  245. if (parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("patmealwinqty"))) != 0 ) {
  246. patmealwinqty += 1;
  247. }
  248. if (parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("curemealwinqty"))) != 0) {
  249. curemealwinqty += 1;
  250. }
  251. if (parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("empmealwinqty"))) != 0) {
  252. empmealwinqty += 1;
  253. }
  254. if (parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("empnigtmealwinqty"))) != 0) {
  255. empnigtmealwinqty += 1;
  256. }
  257. patmealwinamt = patmealwinamt +
  258. parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("patmealwinamt")));
  259. curemealwinamt = curemealwinamt +
  260. parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("curemealwinamt")));
  261. empmealwinamt = empmealwinamt +
  262. parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("empmealwinamt")));
  263. empnigtmealwinamt = empnigtmealwinamt +
  264. parseFloat( grd_nutrwin.valueMatrix(currow , grd_nutrwin.colRef("empnigtmealwinamt")));
  265. }
  266. model.setValue(ipt_sumwinqty.attribute("ref"),grd_nutrwin.rows - grd_nutrwin.fixedRows);
  267. model.setValue(opt_sumwinamt.attribute("ref"),winamt);
  268. model.setValue(opt_patmealwinqty.attribute("ref"), patmealwinqty);
  269. model.setValue(opt_curemealwinqty.attribute("ref"),curemealwinqty);
  270. model.setValue(opt_empmealwinqty.attribute("ref"),empmealwinqty);
  271. model.setValue(opt_empnigtmealwinqty.attribute("ref"),empnigtmealwinqty);
  272. model.setValue(opt_patmealwinamt.attribute("ref"), patmealwinamt);
  273. model.setValue(opt_curemealwinamt.attribute("ref"), curemealwinamt);
  274. model.setValue(opt_empmealwinamt.attribute("ref"), empmealwinamt);
  275. model.setValue(opt_empnigtmealwinamt.attribute("ref"), empnigtmealwinamt);
  276. }
  277. function fAfterRetrieveCust()
  278. {
  279. var winamt = 0;
  280. var patmealwinamt = 0;
  281. var curemealwinamt = 0;
  282. var empmealwinamt = 0;
  283. var empnigtmealwinamt = 0;
  284. for(var currow = grd_untrcustwinlist.fixedRows ; currow < grd_untrcustwinlist.rows ; currow++)
  285. {
  286. winamt = winamt + 0 + parseFloat(grd_untrcustwinlist.valueMatrix(currow , grd_untrcustwinlist.colRef("winamt")));
  287. patmealwinamt = patmealwinamt +
  288. parseFloat( grd_untrcustwinlist.valueMatrix(currow , grd_untrcustwinlist.colRef("patmealwinamt")));
  289. curemealwinamt = curemealwinamt +
  290. parseFloat( grd_untrcustwinlist.valueMatrix(currow , grd_untrcustwinlist.colRef("curemealwinamt")));
  291. empmealwinamt = empmealwinamt +
  292. parseFloat( grd_untrcustwinlist.valueMatrix(currow , grd_untrcustwinlist.colRef("empmealwinamt")));
  293. empnigtmealwinamt = empnigtmealwinamt +
  294. parseFloat( grd_untrcustwinlist.valueMatrix(currow , grd_untrcustwinlist.colRef("empnigtmealwinamt")));
  295. if(grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("paytaxyn")) == "Y" && grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("calcdocukind")) == '') {
  296. grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("calcdocukind")) = "1"
  297. } else if(grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("paytaxyn")) == "N" && grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("calcdocukind")) == '') {
  298. grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("calcdocukind")) = "2"
  299. }
  300. grd_untrcustwinlist.valueMatrix(currow, grd_untrcustwinlist.colRef("goodflag")) = "SF"
  301. }
  302. model.setValue(opt_custsumwinamt.attribute("ref"),winamt);
  303. model.setValue(opt_custpatmealwinamt.attribute("ref"), patmealwinamt);
  304. model.setValue(opt_custcuremealwinamt.attribute("ref"), curemealwinamt);
  305. model.setValue(opt_custempmealwinamt.attribute("ref"), empmealwinamt);
  306. model.setValue(opt_custempnigtmealwinamt.attribute("ref"), empnigtmealwinamt);
  307. }
  308. ]]>
  309. </script>
  310. </xhtml:head>
  311. <xhtml:body guideline="2,788;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  312. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  313. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">입고 내역 정산</caption>
  314. </group>
  315. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195; height:744px; ">
  316. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:10px; width:1195px; height:82px; "/>
  317. <input id="ipt_windeptcd" ref="/root/send/nutrwin/windeptcd" class="input_essential" visibility="hidden" maxlength="10" appearance="input" style="left:945px; top:70px; width:185px; height:19px; ">
  318. <script type="javascript" ev:event="xforms-value-changed">
  319. <![CDATA[
  320. misfValidationCheck("02", "", "windeptcd,windeptnm" );
  321. model.refresh();
  322. if(RetrYn == "Y")btn_search.dispatch("DOMActivate");
  323. ]]>
  324. </script>
  325. </input>
  326. <button id="bnt_suplplcecd" class="icon_search" style="left:184px; top:46px; width:16px; height:16px; ">
  327. <caption/>
  328. <script type="javascript" ev:event="DOMActivate">
  329. <![CDATA[
  330. rszfOpenPopUpListByWndName(ipt_suplplcecd,"","suplplcecd,suplplcenm","SPRSD00220","instcd","cmb_instcd");
  331. model.refresh();
  332. btn_search.dispatch("DOMActivate");
  333. ]]>
  334. </script>
  335. </button>
  336. <input id="ipt_suplplcecd" ref="/root/send/nutrwin/suplplcecd" class="input_default" maxlength="10" style="left:100px; top:45px; width:80px; height:19px; ">
  337. <script type="javascript" ev:event="xforms-value-changed">
  338. <![CDATA[
  339. if(ipt_suplplcecd.value.length == 0)
  340. ipt_suplplcenm.value = "";
  341. else
  342. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm", model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcecd.attribute("ref")),"","suplplcecd,suplplcenm" ,ipt_suplplcecd,"SPRSD00220","instcd","cmb_instcd");
  343. model.refresh();
  344. btn_search.dispatch("DOMActivate");
  345. ]]>
  346. </script>
  347. </input>
  348. <input id="ipt_suplplcenm" ref="/root/send/nutrwin/suplplcenm" class="input_fix" appearance="input" style="left:204px; top:45px; width:191px; height:19px; ">
  349. <script type="javascript" ev:event="xforms-value-changed">
  350. <![CDATA[
  351. if(ipt_suplplcenm.value.length == 0)
  352. ipt_suplplcecd.value = "";
  353. else
  354. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
  355. model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcenm.attribute("ref")),"","suplplcecd,suplplcenm" ,
  356. ipt_suplplcenm,"SPRSD00220","instcd","cmb_instcd");
  357. model.refresh();
  358. ]]>
  359. </script>
  360. </input>
  361. <select1 id="cmb_instcd" ref="/root/send/nutrwin/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:21px; width:295px; height:19px; ">
  362. <choices>
  363. <itemset nodeset="/root/init/instcd">
  364. <label ref="cdnm"/>
  365. <value ref="cdid"/>
  366. </itemset>
  367. </choices>
  368. <script type="javascript" ev:event="xforms-value-changed">
  369. <![CDATA[
  370. btn_search.dispatch("DOMActivate");
  371. ]]>
  372. </script>
  373. </select1>
  374. <select1 id="cmb_goodflag" ref="/root/send/nutrwin/goodflag" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:1155px; top:50px; width:35px; height:19px; ">
  375. <choices>
  376. <itemset nodeset="/root/init/goodflag">
  377. <label ref="cdnm"/>
  378. <value ref="cdid"/>
  379. </itemset>
  380. </choices>
  381. <script type="javascript" ev:event="xforms-value-changed">
  382. <![CDATA[
  383. btn_search.dispatch("DOMActivate");
  384. ]]>
  385. </script>
  386. </select1>
  387. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1120px; top:30px; width:56px; height:22px; text-align:left; ">
  388. <caption>조회</caption>
  389. <script type="javascript" ev:event="DOMActivate">
  390. <![CDATA[
  391. if(fCheckRetrieveData(false) == false)return;
  392. //misfMsterDetailRetrieve();
  393. if(sw_flag.selectedIndex == 0)
  394. {
  395. submit("TRRSI05402");
  396. fAfterRetrieveDay();
  397. var prev_windd = '';
  398. var next_windd = '';
  399. for(var i = 1 ; i <= model.instance1.selectNodes(grd_nutrwin.nodeset).length ; i++)
  400. {
  401. next_windd = model.getValue(grd_nutrwin.nodeset + "[" + i + "]/windd");
  402. if(prev_windd != next_windd && i != 1)
  403. {
  404. grd_nutrwin.rowStyle(i, "data", "border-bottom-color") = "#ffff00";
  405. grd_nutrwin.rowStyle(i, "data", "border-bottom-width") = "2";
  406. grd_nutrwin.rowStyle(i, "data", "border-bottom-style") = "outset";
  407. }
  408. prev_windd = next_windd;
  409. }
  410. }
  411. else if(sw_flag.selectedIndex == 1)
  412. {
  413. submit("TRRSI05403");
  414. fAfterRetrieveCust();
  415. }
  416. model.refresh();
  417. ]]>
  418. </script>
  419. </button>
  420. <input id="ipt_winfrdd" ref="/root/send/nutrwin/winfrdd" class="input_s_essential" inputtype="date" style="left:514px; top:18px; width:105px; height:19px; ">
  421. <script type="javascript" ev:event="xforms-value-changed">
  422. <![CDATA[
  423. //btn_search.dispatch("DOMActivate");
  424. ]]>
  425. </script>
  426. </input>
  427. <input id="ipt_wintodd" ref="/root/send/nutrwin/wintodd" class="input_s_essential" inputtype="date" style="left:641px; top:18px; width:104px; height:19px; ">
  428. <script type="javascript" ev:event="xforms-value-changed">
  429. <![CDATA[
  430. //btn_search.dispatch("DOMActivate");
  431. ]]>
  432. </script>
  433. </input>
  434. <caption id="caption22" style="left:624px; top:19px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
  435. <input id="ipt_goodcd" ref="/root/send/nutrwin/goodcd" class="input_search" _chartype="upper" style="left:514px; top:44px; width:105px; height:19px; ">
  436. <script type="javascript" ev:event="xforms-value-changed">
  437. <![CDATA[
  438. if(ipt_goodcd.value.length == 0)
  439. ipt_goodnm.value = "";
  440. else
  441. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd",
  442. "goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(cmb_goodflag.attribute("ref")) + "," + model.getValue(ipt_goodcd.attribute("ref")) ,"","goodcd,goodnm",
  443. ipt_goodcd,"SPRSD00210","instcd,goodflag","cmb_instcd,cmb_goodflag");
  444. model.refresh();
  445. ]]>
  446. </script>
  447. </input>
  448. <button id="button10" class="icon_search" style="left:622px; top:46px; width:16px; height:16px; ">
  449. <caption/>
  450. <script type="javascript" ev:event="DOMActivate">
  451. <![CDATA[
  452. rszfOpenPopUpListByWndName(ipt_goodcd,"","goodcd,goodnm","SPRSD00210","instcd,goodflag","cmb_instcd,cmb_goodflag");
  453. model.refresh();
  454. ]]>
  455. </script>
  456. </button>
  457. <input id="ipt_goodnm" ref="/root/send/nutrwin/goodnm" class="input_fix" appearance="input" style="left:641px; top:44px; width:154px; height:21px; ">
  458. <script type="javascript" ev:event="xforms-value-changed">
  459. <![CDATA[
  460. if(ipt_goodnm.value.length == 0)
  461. ipt_goodcd.value = "";
  462. else
  463. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodnm",
  464. "goodnm," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(cmb_goodflag.attribute("ref")) + "," + model.getValue(ipt_goodnm.attribute("ref")) ,"","goodcd,goodnm",
  465. ipt_goodcd,"SPRSD00210","instcd,goodflag","cmb_instcd,cmb_goodflag");
  466. model.refresh();
  467. ]]>
  468. </script>
  469. </input>
  470. <line id="line2" class="line_4" style="x1:1109px; y1:15px; x2:1109px; y2:62px; "/>
  471. <caption id="caption8" class="search_name" style="left:15px; top:45px; width:96px; height:17px; ">거 래 처 :</caption>
  472. <caption id="caption9" class="search_name" style="left:15px; top:19px; width:86px; height:17px; ">기관코드 :</caption>
  473. <caption id="caption11" class="search_name" style="left:413px; top:45px; width:99px; height:17px; ">식자재코드 :</caption>
  474. <caption id="caption12" class="search_name" style="left:413px; top:19px; width:120px; height:17px; ">입 고 일 자 :</caption>
  475. <select1 id="rdo_flag" ref="/root/send/nutrwin/calccnfmyn" appearance="full" cellspacing="20" cols="3" overflow="visible" style="left:890px; top:19px; width:220px; height:20px; border-style:none; ">
  476. <choices>
  477. <item>
  478. <label>전체</label>
  479. <value/>
  480. </item>
  481. <item>
  482. <label>미정산</label>
  483. <value>N</value>
  484. </item>
  485. <item>
  486. <label>정산확정</label>
  487. <value>Y</value>
  488. </item>
  489. </choices>
  490. </select1>
  491. <caption id="caption1" class="search_name" style="left:800px; top:19px; width:86px; height:17px; ">사용여부 :</caption>
  492. <button id="btn_custpr" class="btn_sw" group="tab" style="left:76px; top:100px; width:94px; height:22px; ">
  493. <caption>거 래 처 별</caption>
  494. <toggle case="case_grdmonthpr" ev:event="onclick"/>
  495. <script type="javascript" ev:event="DOMActivate">
  496. <![CDATA[
  497. sw_flag.selectedIndex = 1;
  498. ipt_goodcd.visible = false;
  499. ipt_goodnm.visible = false;
  500. caption11.visible = false;
  501. button10.visible = false;
  502. rdo_addtaxyn.visible = false;
  503. caption2.visible = false;
  504. model.refresh();
  505. ]]>
  506. </script>
  507. </button>
  508. <button id="btn_daypr" class="btn_sw" group="tab" selected="true" style="left:0px; top:100px; width:75px; height:22px; ">
  509. <caption>일 자 별</caption>
  510. <toggle case="case_grddaypr" ev:event="onclick"/>
  511. <script type="javascript" ev:event="DOMActivate">
  512. <![CDATA[
  513. sw_flag.selectedIndex = 0;
  514. ipt_goodcd.visible = true;
  515. ipt_goodnm.visible = true;
  516. caption11.visible = true;
  517. button10.visible = true;
  518. rdo_addtaxyn.visible = false;
  519. caption2.visible = false;
  520. model.refresh();
  521. ]]>
  522. </script>
  523. </button>
  524. <caption id="caption2" class="search_name" visibility="hidden" style="left:800px; top:44px; width:86px; height:17px; ">과세여부 :</caption>
  525. <select1 id="rdo_addtaxyn" ref="/root/send/nutrwin/addtaxyn" visibility="hidden" appearance="full" cellspacing="20" cols="3" overflow="visible" style="left:890px; top:44px; width:235px; height:20px; border-style:none; ">
  526. <choices>
  527. <item>
  528. <label>전체</label>
  529. <value/>
  530. </item>
  531. <item>
  532. <label>과 세</label>
  533. <value>Y</value>
  534. </item>
  535. <item>
  536. <label>비 과 세</label>
  537. <value>N</value>
  538. </item>
  539. </choices>
  540. </select1>
  541. <input id="ipt_windeptnm2" ref="/root/send/nutrwin/windeptnm" class="input_fix" visibility="hidden" appearance="input" style="left:225px; top:70px; width:170px; height:19px; ">
  542. <script type="javascript" ev:event="xforms-value-changed">
  543. <![CDATA[
  544. if(ipt_windeptnm2.value.length == 0)
  545. ipt_windeptcd2.value = "";
  546. else
  547. // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
  548. // "deptnm," + ipt_windeptnm.value, "", "windeptcd,windeptnm",
  549. // ipt_windeptnm, "SPRPZ00200", "","");
  550. misfValidationCheck("02", "", "windeptcd,windeptnm" );
  551. model.refresh();
  552. ]]>
  553. </script>
  554. </input>
  555. <button id="btn_windeptcd2" class="icon_search" visibility="hidden" style="left:203px; top:70px; width:16px; height:16px; ">
  556. <caption/>
  557. <script type="javascript" ev:event="DOMActivate">
  558. <![CDATA[
  559. var recv_list = "windeptcd,windeptnm";
  560. var instcd = cmb_instcd.value;
  561. misfOpenPopUpList("02", ipt_windeptcd2,"", recv_list, instcd, "instcd") ;
  562. model.refresh();
  563. //if(RetrYn == "Y")btn_search2.dispatch("DOMActivate");
  564. ]]>
  565. </script>
  566. </button>
  567. <input id="ipt_windeptcd2" ref="/root/send/nutrwin/windeptcd" class="input_essential" visibility="hidden" maxlength="10" appearance="input" style="left:100px; top:70px; width:95px; height:19px; ">
  568. <script type="javascript" ev:event="xforms-value-changed">
  569. <![CDATA[
  570. if(ipt_windeptcd2.value.length == 0)
  571. ipt_windeptnm2.value = "";
  572. else
  573. // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptcd",
  574. // "deptcd," + ipt_windeptcd.value, "", "windeptcd,windeptnm",
  575. // ipt_windeptcd, "SPRPZ00200", "","");
  576. misfValidationCheck("02", "", "windeptcd,windeptnm" );
  577. model.refresh();
  578. //if(RetrYn == "Y")btn_search2.dispatch("DOMActivate");
  579. ]]>
  580. </script>
  581. </input>
  582. <caption id="caption19" class="search_name" visibility="visible" style="left:15px; top:70px; width:93px; height:17px; ">입고부서:</caption>
  583. </group>
  584. <switch id="sw_flag" class="sw_box" style="left:0px; top:160px; width:1195px; height:620px; border-style:solid; ">
  585. <case id="case_grddaypr" selected="true">
  586. <datagrid id="grd_nutrwin" nodeset="/root/main/list/nutrwin/nutrwinlist" visibility="visible" caption="정산&#xA;확정^입고일자^순번^주거래처^보조거래처^입출유형^품목코드^발주번호^품목명칭^원산지^단가^단위^환자식입고수량*^환자식입고수량*^소계^직원식입고수량*^직원식입고수량*^소계^환자식 입고금액^환자식 입고금액^소계^직원식 입고금액^직원식 입고금액^소계^총입고금액^입고자^증빙유형^비고|정산&#xA;확정^입고일자^순번^주거래처^보조거래처^입출유형^품목코드^발주번호^품목명칭^원산지^단가^단위^일반식^치료식^소계^직원식^직원야식^소계^일반식^치료식^소계^직원식^직원야식^소계^총입고금액^입고자^증빙유형^비고" colsep="^" colwidth="40, 70, 31, 72, 73, 66, 76, 0, 127, 90, 63, 41, 50, 50, 50, 50, 54, 50, 80, 80, 80, 80, 80, 80, 80, 80, 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, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:53px; width:1193px; height:512px; ">
  587. <col ref="calccnfmyn" style="text-align:center; "/>
  588. <col ref="windd" format="9999-99-99"/>
  589. <col ref="winseqno"/>
  590. <col ref="suplplcenm"/>
  591. <col ref="suppcustnm"/>
  592. <col ref="iokindnm"/>
  593. <col ref="goodcd"/>
  594. <col ref="winno" visibility="hidden"/>
  595. <col ref="goodnm"/>
  596. <col ref="orgloc"/>
  597. <col ref="winunitcost" style="text-align:right; "/>
  598. <col ref="winunit" style="text-align:center; "/>
  599. <col ref="patmealwinqty" format="#,###.#" maxlength="11.2" style="text-align:right; "/>
  600. <col ref="curemealwinqty" format="#,###.#" maxlength="11.2" style="text-align:right; "/>
  601. <col ref="sumpatqty" format="#,###.0" maxlength="11.2" style="text-align:right; "/>
  602. <col ref="empmealwinqty" format="#,###.#" maxlength="11.2" style="text-align:right; "/>
  603. <col ref="empnigtmealwinqty" format="#,###.#" maxlength="11.2" style="text-align:right; "/>
  604. <col ref="sumempqty" format="#,###.0" maxlength="11.2" style="text-align:right; "/>
  605. <col ref="patmealwinamt" format="#,###.0" style="text-align:right; "/>
  606. <col ref="curemealwinamt" format="#,###.0" style="text-align:right; "/>
  607. <col ref="sumpatamt" format="#,###.0" style="text-align:right; "/>
  608. <col ref="empmealwinamt" format="#,###.0" style="text-align:right; "/>
  609. <col ref="empnigtmealwinamt" format="#,###.0" style="text-align:right; "/>
  610. <col ref="sumempamt" format="#,###.0" style="text-align:right; "/>
  611. <col ref="winamt" format="#,###.0" style="text-align:right; "/>
  612. <col ref="winpsnnm" style="text-align:center; "/>
  613. <col disabled="true" ref="calcdocukind" type="combo" visibility="hidden" style="text-align:center; ">
  614. <choices>
  615. <item>
  616. <label>과세</label>
  617. <value>Y</value>
  618. </item>
  619. <item>
  620. <label>비과세</label>
  621. <value>N</value>
  622. </item>
  623. </choices>
  624. </col>
  625. <col ref="cmt" visibility="hidden"/>
  626. <col ref="winpackqty" visibility="hidden"/>
  627. <col ref="winpackunit" visibility="hidden"/>
  628. <col ref="winpackcntperunit" visibility="hidden"/>
  629. <col ref="winqty" visibility="hidden"/>
  630. <col ref="reqqty" visibility="hidden"/>
  631. <col ref="winamt" visibility="hidden"/>
  632. <col ref="delivedeptqty" visibility="hidden"/>
  633. <col ref="stocqty" visibility="hidden"/>
  634. <col ref="instcd" visibility="hidden"/>
  635. <col ref="goodflag" visibility="hidden"/>
  636. <col ref="winpsn" visibility="hidden"/>
  637. <col ref="windeptcd" visibility="hidden"/>
  638. <col ref="installplcecd" visibility="hidden"/>
  639. <col ref="paycond" visibility="hidden"/>
  640. <col ref="temppay" visibility="hidden"/>
  641. <col ref="elctstmntyn" visibility="hidden"/>
  642. <col ref="iokind" visibility="hidden"/>
  643. <col ref="suplplcecd" visibility="hidden"/>
  644. <col ref="purcdmnddd" visibility="hidden"/>
  645. <col ref="purcdmndno" visibility="hidden"/>
  646. <col ref="purcdmndseq" visibility="hidden"/>
  647. <col ref="deliveno" visibility="hidden"/>
  648. <col ref="deliveseqno" visibility="hidden"/>
  649. <col ref="bnscd" visibility="hidden"/>
  650. <col ref="calcdocudd" visibility="hidden"/>
  651. <col ref="profno" visibility="hidden"/>
  652. <col ref="acntcd" visibility="hidden"/>
  653. <col ref="reqdd" visibility="hidden"/>
  654. <col ref="reqno" visibility="hidden"/>
  655. <col ref="reqseqno" visibility="hidden"/>
  656. <col ref="valiterm" visibility="hidden"/>
  657. <col ref="stocynindx" visibility="hidden"/>
  658. <col ref="chkdd" visibility="hidden"/>
  659. <col ref="chkpsn" visibility="hidden"/>
  660. <col ref="chkyn" visibility="hidden"/>
  661. <col ref="slipdd" visibility="hidden"/>
  662. <col ref="slipno" visibility="hidden"/>
  663. <col ref="suppcustcd" visibility="hidden"/>
  664. <col ref="prewinqty" visibility="hidden"/>
  665. <col ref="minexch" visibility="hidden"/>
  666. <col ref="prewinqty" visibility="hidden"/>
  667. <col ref="calccnfmdd" visibility="hidden"/>
  668. <col ref="winprcsflag" visibility="hidden"/>
  669. <script type="javascript" ev:event="onbuttonclick">
  670. <![CDATA[
  671. if (grd_nutrwin.col == grd_nutrwin.colRef("goodcd") && grd_nutrwin.rowStatus(grd_nutrwin.row) == "1" ) {//구성물품코드를 눌렀을 경우
  672. model.removenode("/root/copynode");
  673. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  674. model.makeNode("/root/copynode");
  675. rszfOpenPopUpListByWndName(grd_nutrwin,"","goodcd,goodnm","SPRSD00190","instcd,goodflag","cmb_instcd,cmb_goodflag");
  676. var cur_row = grd_nutrwin.row;
  677. var status = grd_nutrwin.valueMatrix(cur_row, grd_nutrwin.colRef("m"));
  678. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  679. setCSVToNode("/root/copynode", CSV, "nutrwinlist");
  680. fSettingGoodList("/root/copynode", "nutrwinlist" , "userqty");
  681. }
  682. ]]>
  683. </script>
  684. <script type="javascript" ev:event="xforms-value-changed">
  685. <![CDATA[
  686. if(grd_nutrwin.col == grd_nutrwin.colRef("goodcd") && grd_nutrwin.valueMatrix(grd_nutrwin.row, grd_nutrwin.colRef("goodcd")).length> 0) {
  687. model.removenode("/root/copynode");
  688. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  689. model.makeNode("/root/copynode");
  690. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," +model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/goodflag") + "," + model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/goodcd") + ",,,," ,"","goodcd,goodnm,minexch,goodunitcost",grd_nutrwin,"SPRSD00190","instcd,goodflag","cmb_instcd," + model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/goodflag"),"Y");
  691. model.refresh();
  692. if( grd_nutrwin.valueMatrix(cur_row, grd_nutrwin.colRef("goodnm")).length> 0)
  693. {
  694. // if(model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/minexch") > 0)
  695. // {
  696. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/patmealwinqty" , model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/minexch") );
  697. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/curemealwinqty" , model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/minexch") );
  698. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/empmealwinqty" , model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/minexch") );
  699. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/empnigtmealwinqty" , model.getValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/minexch") );
  700. // }
  701. // else
  702. // {
  703. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/patmealwinqty" , "1");
  704. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/curemealwinqty" , "1");
  705. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/empmealwinqty" , "1");
  706. // model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/empnigtmealwinqty" , "1");
  707. // }
  708. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  709. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/purcunit"));
  710. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winpackcntperunit" ,1);
  711. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winpackqty" ,1);
  712. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  713. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/iokind" ,model.getValue(cmb_instcd.attribute("ref")) );
  714. }
  715. model.recalculate();
  716. model.refresh();
  717. var cur_row = grd_nutrwin.row;
  718. var status = grd_nutrwin.valueMatrix(cur_row, grd_nutrwin.colRef("m"));
  719. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  720. if(CSV.length == 0 && grd_nutrwin.valueMatrix(cur_row, grd_nutrwin.colRef("goodnm")).length == 0)
  721. {
  722. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/goodcd" , "");
  723. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/goodnm" , "");
  724. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winpackqty" , "");
  725. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winpackunit" , "");
  726. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winunit" , "");
  727. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winqty" , "");
  728. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  729. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winunitcost" , "");
  730. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1) + "]/winamt" , "");
  731. grd_nutrwin.col = grd_nutrwin.colRef("goodcd");
  732. grd_nutrwin.editCell();
  733. }
  734. if(CSV.length > 0)
  735. {
  736. model.setValue(grd_nutrwin.nodeset + "[" + (grd_nutrwin.row - grd_nutrwin.fixedRows + 1)+ "]/goodcd","");
  737. setCSVToNode("/root/copynode", CSV, "nutrwinlist");
  738. fSettingGoodList("/root/copynode", "nutrwinlist" , "userqty");
  739. }
  740. }
  741. ]]>
  742. </script>
  743. <script type="javascript" ev:event="onkeydown">
  744. <![CDATA[
  745. if(event.keyCode == 9)
  746. {
  747. if(event.shiftKey)
  748. {
  749. if(grd_nutrwin.colAttribute(grd_nutrwin.col + 1, "type").indexOf ("input") > -1)
  750. {
  751. for(curcol = grd_nutrwin.col -1 ; curcol > -1 ; curcol--)
  752. {
  753. if(grd_nutrwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  754. {
  755. grd_nutrwin.col = curcol;
  756. grd_nutrwin.editCell();
  757. return;
  758. }
  759. }
  760. }
  761. }
  762. else
  763. {
  764. if(grd_nutrwin.colAttribute(grd_nutrwin.col, "type").indexOf ("input") == -1)
  765. {
  766. if(grd_nutrwin.col - 1 == grd_nutrwin.colRef("goodcd") && grd_nutrwin.valueMatrix(grd_nutrwin.row, grd_nutrwin.col - 1).length == 0)
  767. {
  768. grd_nutrwin.col = grd_nutrwin.colRef("goodcd");
  769. grd_nutrwin.editCell();
  770. return;
  771. }
  772. for(curcol = grd_nutrwin.col ; curcol <grd_nutrwin.cols ; curcol++)
  773. {
  774. if(grd_nutrwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  775. {
  776. grd_nutrwin.col = curcol;
  777. grd_nutrwin.editCell();
  778. return;
  779. }
  780. }
  781. }
  782. }
  783. }
  784. ]]>
  785. </script>
  786. <script type="javascript" ev:event="onaftersort">
  787. <![CDATA[
  788. grd_nutrwin.gridToInstance();
  789. ]]>
  790. </script>
  791. </datagrid>
  792. <output id="opt_empnigtmealwinqty" ref="/root/init/empnigtmealwinqty" class="output_default" style="left:1109px; top:7px; width:40px; height:19px; font-weight:bold; "/>
  793. <output id="opt_empnigtmealwinamt" ref="/root/init/empnigtmealwinamt" class="output_default" format="(-)#,###" style="left:1109px; top:30px; width:70px; height:19px; font-weight:bold; "/>
  794. <output id="opt_curemealwinqty" ref="/root/init/curemealwinqty" class="output_default" style="left:914px; top:7px; width:40px; height:19px; font-weight:bold; "/>
  795. <caption id="caption3" style="left:888px; top:6px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(T):</caption>
  796. <output id="opt_empmealwinqty" ref="/root/init/empmealwinqty" class="output_default" style="left:1012px; top:7px; width:40px; height:19px; font-weight:bold; "/>
  797. <output id="opt_patmealwinqty" ref="/root/init/patmealwinqty" class="output_default" style="left:817px; top:7px; width:40px; height:19px; font-weight:bold; "/>
  798. <output id="opt_curemealwinamt" ref="/root/init/curemealwinamt" class="output_default" format="(-)#,###" style="left:914px; top:30px; width:70px; height:19px; font-weight:bold; "/>
  799. <caption id="caption24" style="left:985px; top:6px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(S):</caption>
  800. <output id="ipt_sumwinqty" ref="/root/init/winqty" class="output_default" style="left:690px; top:7px; width:54px; height:19px; font-weight:bold; "/>
  801. <output id="opt_patmealwinamt" ref="/root/init/patmealwinamt" class="output_default" format="(-)#,###" style="left:817px; top:30px; width:70px; height:19px; font-weight:bold; "/>
  802. <output id="opt_empmealwinamt" ref="/root/init/empmealwinamt" class="output_default" format="(-)#,###" style="left:1012px; top:30px; width:70px; height:19px; font-weight:bold; "/>
  803. <caption id="caption25" style="left:1083px; top:6px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(N):</caption>
  804. <caption id="caption26" style="left:888px; top:29px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(T):</caption>
  805. <caption id="caption27" style="left:985px; top:29px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(S):</caption>
  806. <caption id="caption4" style="left:627px; top:6px; width:65px; height:23px; font-weight:bold; vertical-align:middle; ">입고건수 :</caption>
  807. <caption id="caption28" style="left:1083px; top:29px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(N):</caption>
  808. <caption id="caption5" style="left:627px; top:29px; width:65px; height:23px; font-weight:bold; vertical-align:middle; ">입고합계 :</caption>
  809. <output id="opt_sumwinamt" ref="/root/init/winamt" class="output_default" format="#,###" style="left:690px; top:30px; width:99px; height:19px; font-weight:bold; "/>
  810. <caption id="caption29" style="left:789px; top:29px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(G):</caption>
  811. <caption id="caption10" style="left:789px; top:6px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(G):</caption>
  812. <button id="button1" class="btn4_letter4" style="left:192px; top:28px; width:80px; height:22px; ">
  813. <caption>정산확정</caption>
  814. <script type="javascript" ev:event="DOMActivate">
  815. <![CDATA[
  816. if (rdo_flag.value != 'Y')
  817. {
  818. //model.setValue("/root/send/nutrwin/calccnfmyn", 'Y');
  819. for(var i = grd_nutrwin.fixedRows ; i < grd_nutrwin.rows ; i++)
  820. {
  821. grd_nutrwin.rowStatus(i) = 2;
  822. grd_nutrwin.valueMatrix(i, grd_nutrwin.colRef("calccnfmyn")) = "Y";
  823. grd_nutrwin.valueMatrix(i, grd_nutrwin.colRef("winprcsflag")) = "8";
  824. grd_nutrwin.valueMatrix(i, grd_nutrwin.colRef("calccnfmdd" )) = model.getValue(ipt_calccnfmdd.attribute("ref")) ;
  825. }
  826. model.setValue("/root/send/sendlist/nutrwinlist", grd_nutrwin.getUpdateData());
  827. if(grd_nutrwin.getUpdateData() != "")
  828. {
  829. submit("TXRSI05404");
  830. btn_search.dispatch("DOMActivate");
  831. }
  832. }
  833. ]]>
  834. </script>
  835. </button>
  836. <button id="button2" class="btn4_letter4" style="left:275px; top:28px; width:80px; height:22px; ">
  837. <caption>정산취소</caption>
  838. <script type="javascript" ev:event="DOMActivate">
  839. <![CDATA[
  840. if(rdo_flag.value != 'N')
  841. {
  842. //model.setValue("/root/send/nutrwin/calccnfmyn", 'N');
  843. for(var i = grd_nutrwin.fixedRows ; i < grd_nutrwin.rows ; i++)
  844. {
  845. grd_nutrwin.rowStatus(i) = 2;
  846. grd_nutrwin.valueMatrix(i, grd_nutrwin.colRef("calccnfmyn" )) = "N";
  847. grd_nutrwin.valueMatrix(i, grd_nutrwin.colRef("winprcsflag")) = "0";
  848. grd_nutrwin.valueMatrix(i, grd_nutrwin.colRef("calccnfmdd" )) = "0";
  849. }
  850. model.setValue("/root/send/sendlist/nutrwinlist", grd_nutrwin.getUpdateData());
  851. if(grd_nutrwin.getUpdateData() != "")
  852. {
  853. submit("TXRSI05404");
  854. btn_search.dispatch("DOMActivate");
  855. }
  856. }
  857. ]]>
  858. </script>
  859. </button>
  860. <input id="ipt_calccnfmdd" ref="/root/init/calccnfmdd" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:100px; top:28px; width:90px; height:19px; ">
  861. <script type="javascript" ev:event="xforms-value-changed">
  862. <![CDATA[
  863. //btn_search.dispatch("DOMActivate");
  864. ]]>
  865. </script>
  866. </input>
  867. <caption id="caption7" class="search_name" style="left:5px; top:28px; width:90px; height:17px; ">정산년월 :</caption>
  868. </case>
  869. <case id="case_grdmonthpr">
  870. <datagrid id="grd_untrcustwinlist" nodeset="/root/main/list/nutrcustwin/nutrcustwinlist" visibility="visible" caption="기관코드^주거래처코드^전표일자^전표번호^물품구분^입고시작^입고끝^입고부서코드^주거래처^환자식입고금액*^환자식입고금액*^소계^직원식입고금액*^직원식입고금액*^소계^입고금액^입고금액^총입고금액^과세여부^계산서유형^계산서일자|기관코드^주거래처코드^전표일자^전표번호^물품구분^입고시작^입고끝^입고부서코드^주거래처^일반식^치료식^소계^직원식^직원야식^소계^환자식^직원식^총입고금액^과세여부^계산서유형^계산서일자" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 0, 0, 140, 100, 100, 100, 60, 60, 80, 100, 100, 100, 29, 34, 15" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:30px; width:1100px; height:615px; ">
  871. <col ref="instcd" visibility="hidden"/>
  872. <col ref="suplplcecd" visibility="hidden"/>
  873. <col ref="slipdd" visibility="hidden"/>
  874. <col ref="slipno" visibility="hidden"/>
  875. <col ref="goodflag" visibility="hidden"/>
  876. <col ref="winfrdd" visibility="hidden"/>
  877. <col ref="wintodd" visibility="hidden"/>
  878. <col ref="windeptcd" visibility="hidden"/>
  879. <col ref="suplplcenm"/>
  880. <col ref="patmealwinamt" format="#,###.0" style="text-align:right; "/>
  881. <col ref="curemealwinamt" format="#,###.0" style="text-align:right; "/>
  882. <col ref="pattotamt" format="#,###.0" style="text-align:right; "/>
  883. <col ref="empmealwinamt" format="#,###.0" style="text-align:right; "/>
  884. <col ref="empnigtmealwinamt" format="#,###.0" style="text-align:right; "/>
  885. <col ref="emptotamt" format="#,###.0" style="text-align:right; "/>
  886. <col ref="patmealwintotamt" format="#,###.0" style="text-align:right; "/>
  887. <col ref="empmealwintotamt" format="#,###.0" style="text-align:right; "/>
  888. <col ref="winamt" format="#,###.0" style="text-align:right; "/>
  889. <col ref="paytaxyn" visibility="hidden" style="text-align:center; "/>
  890. <col ref="calcdocukind" type="combo" visibility="hidden" style="text-align:center; ">
  891. <choices>
  892. <itemset>
  893. <label/>
  894. <value/>
  895. </itemset>
  896. </choices>
  897. </col>
  898. <col ref="calcdocudd" type="input" visibility="hidden" format="yyyy-mm-dd" _required="true"/>
  899. </datagrid>
  900. <output id="opt_custempnigtmealwinamt" ref="/root/init/custempnigtmealwinamt" class="output_default" format="(-)#,###" style="left:1031px; top:5px; width:70px; height:19px; font-weight:bold; "/>
  901. <output id="opt_custcuremealwinamt" ref="/root/init/custcuremealwinamt" class="output_default" format="(-)#,###" style="left:836px; top:5px; width:70px; height:19px; font-weight:bold; "/>
  902. <output id="opt_custpatmealwinamt" ref="/root/init/custpatmealwinamt" class="output_default" format="(-)#,###" style="left:739px; top:5px; width:70px; height:19px; font-weight:bold; "/>
  903. <output id="opt_custempmealwinamt" ref="/root/init/custempmealwinamt" class="output_default" format="(-)#,###" style="left:934px; top:5px; width:70px; height:19px; font-weight:bold; "/>
  904. <caption id="caption14" style="left:810px; top:4px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(T):</caption>
  905. <caption id="caption15" style="left:907px; top:4px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(S):</caption>
  906. <caption id="caption16" style="left:1005px; top:4px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(N):</caption>
  907. <caption id="caption17" style="left:549px; top:4px; width:65px; height:23px; font-weight:bold; vertical-align:middle; ">입고합계 :</caption>
  908. <output id="opt_custsumwinamt" ref="/root/init/custwinamt" class="output_default" format="#,###" style="left:612px; top:5px; width:99px; height:19px; font-weight:bold; "/>
  909. <caption id="caption18" style="left:711px; top:4px; width:30px; height:23px; font-weight:bold; vertical-align:middle; ">(G):</caption>
  910. <button id="btn_wincnfmcacl" class="btn5_letter5" visibility="hidden" style="left:1107px; top:5px; width:75px; height:19px; ">
  911. <caption>계산서등록</caption>
  912. <script type="javascript" ev:event="DOMActivate">
  913. <![CDATA[
  914. if(!checkRequiredColumn("grd_untrcustwinlist")) return;
  915. model.setValue("/root/send/sendlist/untrcustwinlist", grd_untrcustwinlist.getUpdateData());
  916. submit("TXRSI05402");
  917. if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  918. ]]>
  919. </script>
  920. </button>
  921. </case>
  922. </switch>
  923. <group id="grp_head" style="left:0px; top:12; width:1195px; height:27px; ">
  924. <button id="button3" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  925. <caption>출력</caption>
  926. </button>
  927. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  928. <caption>초기화</caption>
  929. <script type="javascript" ev:event="DOMActivate">
  930. <![CDATA[
  931. fInitialize();
  932. ]]>
  933. </script>
  934. </button>
  935. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  936. </group>
  937. </xhtml:body>
  938. </xhtml:html>