SMRSD00600_부서별 정량보충 기준량 등록.xfdl 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSD00600" position="absolute 0 0 1197 777" titletext="부서별 기준량 등록" oninit="SMRSD00600_oninit" onload="SMRSD00600_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 10 1195 775" id="grp_biz" scrollbars="autoboth" anchor="all">
  8. <Layouts>
  9. <Layout>
  10. <Div position="absolute 0 15 1195 75" align="align:center top;" id="grp_sea" anchor="left top right" class="div_SA">
  11. <Layouts>
  12. <Layout>
  13. <Static text="기관코드 :" position="absolute 15 10 104 27" id="caption2" class="search_name" anchor="default"/>
  14. <Static text="부 서 :" position="absolute 605 33 691 50" id="caption3" class="search_name" anchor="default"/>
  15. <Button position="absolute 1125 20 1181 42" id="btn_search" class="btn1" text="조회" anchor="top right" onclick="grp_biz_grp_sea_btn_search_onclick"/>
  16. <Combo position="absolute 440 10 550 29" align="align:center middle;" id="cmb_goodflag" class="combo_essential" innerdataset="@ds_init_goodflag" datacolumn="label" codecolumn="value" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_goodflag_onitemchanged"/>
  17. <Edit position="absolute 690 33 810 52" align="align:center middle;" id="ipt_reqdeptcd" class="input_essential" anchor="default" ontextchanged="grp_biz_grp_sea_ipt_reqdeptcd_ontextchanged" style="align:center middle;"/>
  18. <Button position="absolute 815 33 831 49" id="btn_reqdeptcd" class="icon_search" text="" anchor="default" onclick="grp_biz_grp_sea_btn_reqdeptcd_onclick"/>
  19. <Edit position="absolute 835 33 1000 52" align="align:center middle;" id="ipt_reqdeptnm" class="input_fix" anchor="default" ontextchanged="grp_biz_grp_sea_ipt_reqdeptnm_ontextchanged" style="align:center middle;"/>
  20. <Static text="물품구분 :" position="absolute 355 10 449 27" id="caption7" class="search_name" anchor="default"/>
  21. <Shape position="absolute 1107 12 1113 51" linetype="vertical" id="line3" class="line_4" anchor="top right"/>
  22. <Edit readonly="true" position="absolute 274 10 304 29" id="opt_instcd" visible="false" anchor="default" class="output"/>
  23. <Edit readonly="true" position="absolute 100 10 265 29" align="align:center middle;" id="opt_instcdnm" class="output" anchor="default"/>
  24. <Combo position="absolute 690 10 810 29" align="align:center middle;" id="cmb_reqmthd" class="combo_essential" innerdataset="@ds_init_reqmthd" datacolumn="label" codecolumn="value" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_reqmthd_onitemchanged"/>
  25. <Static text="청구방법 :" position="absolute 605 10 699 27" id="caption1" class="search_name" anchor="default"/>
  26. <Combo position="absolute 440 33 550 52" align="align:center middle;" id="cmb_purcflag" class="combo_default" innerdataset="@ds_init_purcflag" datacolumn="label" codecolumn="value" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_purcflag_onitemchanged"/>
  27. <Static text="구매구분 :" position="absolute 355 33 441 50" id="caption18" class="search_name" anchor="default"/>
  28. </Layout>
  29. </Layouts>
  30. </Div>
  31. <Shape position="absolute 0 99 1195 105" linetype="horizontal" id="line1" class="line_10" anchor="left top right"/>
  32. <Static position="absolute 1 83 191 100" id="cap_titlist" class="tit_2" anchor="default"/>
  33. <Button position="absolute 1020 77 1073 99" id="btn_grdadd" class="btn2" text="행추가" anchor="top right" onclick="grp_biz_btn_grdadd_onclick"/>
  34. <Button position="absolute 1075 77 1128 99" id="btn_grddel" class="btn2" text="행삭제" anchor="top right" onclick="grp_biz_btn_grddel_onclick"/>
  35. <Grid position="absolute 0 104 1195 765" id="grd_goodbaseqtylist" binddataset="ds_main_goodbaseqtylist" anchor="all" onexpanddown="grp_biz_grd_goodbaseqtylist_onexpanddown" autoenter="select">
  36. <Formats>
  37. <Format id="default">
  38. <Columns>
  39. <Column size="24"/>
  40. <Column size="40"/>
  41. <Column size="96"/>
  42. <Column size="29"/>
  43. <Column size="231"/>
  44. <Column size="163"/>
  45. <Column size="127"/>
  46. <Column size="73"/>
  47. <Column size="66"/>
  48. <Column size="63"/>
  49. <Column size="63"/>
  50. <Column size="70"/>
  51. <Column size="70"/>
  52. <Column size="171"/>
  53. <Column size="0"/>
  54. <Column size="0"/>
  55. <Column size="0"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. <Column size="0"/>
  59. <Column size="0"/>
  60. <Column size="0"/>
  61. <Column size="0"/>
  62. </Columns>
  63. <Rows>
  64. <Row size="24" band="head"/>
  65. <Row size="24"/>
  66. </Rows>
  67. <Band id="head">
  68. <Cell/>
  69. <Cell col="1" text="No"/>
  70. <Cell col="2" text="물품코드"/>
  71. <Cell col="3" text="물품코드"/>
  72. <Cell col="4" text="물품명"/>
  73. <Cell col="5" text="규격"/>
  74. <Cell col="6" text="모델"/>
  75. <Cell col="7" text="제조회사"/>
  76. <Cell col="8" text="포장단위"/>
  77. <Cell col="9" text="환산수량"/>
  78. <Cell col="10" text="청구단위"/>
  79. <Cell col="11" text="안전재고량"/>
  80. <Cell col="12" text="상비품량"/>
  81. <Cell col="13" text="비고"/>
  82. <Cell col="14" text="reqmthd"/>
  83. <Cell col="15" text="tmpreqflag"/>
  84. <Cell col="16"/>
  85. <Cell col="17"/>
  86. <Cell col="18"/>
  87. <Cell col="19"/>
  88. <Cell col="20"/>
  89. <Cell col="21"/>
  90. <Cell col="22"/>
  91. </Band>
  92. <Band id="body">
  93. <Cell celltype="head"/>
  94. <Cell col="1" text="bind:rnum"/>
  95. <Cell col="2" displaytype="text" edittype="text" class="input_essential" text="bind:goodcd" expandshow="show"/>
  96. <Cell col="3" text="bind:allsizespecid"/>
  97. <Cell col="4" text="bind:goodnm" enable="false"/>
  98. <Cell col="5" displaytype="text" edittype="text" text="bind:goodspec" expandshow="show"/>
  99. <Cell col="6" text="bind:goodmodel" enable="false"/>
  100. <Cell col="7" text="bind:prodcmpynm" enable="false"/>
  101. <Cell col="8" text="bind:purcunit" enable="false"/>
  102. <Cell col="9" displaytype="number" text="bind:exchqty" enable="false"/>
  103. <Cell col="10" text="bind:deliveunit" enable="false"/>
  104. <Cell col="11" displaytype="number" edittype="expr:basevoledit" style="background:#ccffccff;background2:#ccffccff;" class="input_essential" text="bind:basevol"/>
  105. <Cell col="12" displaytype="number" edittype="expr:prepargodqtyedit" style="background:#ffcc99ff;background2:#ffcc99ff;" class="input_essential" text="bind:prepargodqty"/>
  106. <Cell col="13" displaytype="text" edittype="text" text="bind:cmt"/>
  107. <Cell col="14" text="bind:reqmthd"/>
  108. <Cell col="15" text="bind:tmpreqflag"/>
  109. <Cell col="16" text="bind:ddavguseqty"/>
  110. <Cell col="17" text="bind:instcd"/>
  111. <Cell col="18" text="bind:goodflag"/>
  112. <Cell col="19" text="bind:reqdeptcd"/>
  113. <Cell col="20" text="bind:lrgcd"/>
  114. <Cell col="21" text="bind:allsizeyn"/>
  115. <Cell col="22" text="bind:oallsizespecid"/>
  116. </Band>
  117. </Format>
  118. </Formats>
  119. </Grid>
  120. <Static position="absolute 779 84 819 97" id="caption4" anchor="top right" style="background:#ccffccff;"/>
  121. <Static position="absolute 904 84 944 97" id="caption5" anchor="top right" style="background:#ffcc99ff;"/>
  122. <Static text="안전재고량" position="absolute 824 84 894 97" id="caption8" anchor="top right"/>
  123. <Static text="상비품량" position="absolute 949 84 1004 97" id="caption9" anchor="top right"/>
  124. <Div position="absolute 205 140 569 440" id="grp_allsize" visible="false" anchor="default">
  125. <Layouts>
  126. <Layout>
  127. <Shape position="absolute 0 0 362 300" id="rectangle1" type="rectangle" anchor="default"/>
  128. <Grid position="absolute 2 40 359 297" id="grd_codelist" class="grd_prodcmpylist" binddataset="ds_main_codelist" anchor="default">
  129. <Formats>
  130. <Format id="default">
  131. <Columns>
  132. <Column size="30"/>
  133. <Column size="40"/>
  134. <Column size="140"/>
  135. <Column size="76"/>
  136. <Column size="51"/>
  137. </Columns>
  138. <Rows>
  139. <Row size="24" band="head"/>
  140. <Row size="24"/>
  141. </Rows>
  142. <Band id="head">
  143. <Cell text="C"/>
  144. <Cell col="1" text="ID"/>
  145. <Cell col="2" text="명칭"/>
  146. <Cell col="3" text="모델"/>
  147. <Cell col="4" text="수량"/>
  148. </Band>
  149. <Band id="body">
  150. <Cell text="bind:chk" edittype="checkbox" displaytype="checkbox"/>
  151. <Cell col="1" text="bind:allsizespecid"/>
  152. <Cell col="2" text="bind:goodspec"/>
  153. <Cell col="3" text="bind:goodmodel"/>
  154. <Cell col="4" text="bind:qty" edittype="text" displaytype="text"/>
  155. </Band>
  156. </Format>
  157. </Formats>
  158. </Grid>
  159. <Button position="absolute 303 10 359 32" id="btn_confirm" class="btn4" text="확인" anchor="default" onclick="grp_biz_grp_allsize_btn_confirm_onclick"/>
  160. </Layout>
  161. </Layouts>
  162. </Div>
  163. <Button position="absolute 1139 77 1195 99" id="btn_save" class="btn3" text="저장" anchor="top right" onclick="grp_biz_btn_save_onclick"/>
  164. </Layout>
  165. </Layouts>
  166. </Div>
  167. <Static id="caption6" text="부서별 기준량 등록" class="tit_1" position="absolute 0 0 186 25"/>
  168. <Button position="absolute 1127 2 1195 24" id="btn_clear" class="btn4" text="초기화" onclick="btn_clear_onclick" anchor="top right"/>
  169. </Layout>
  170. </Layouts>
  171. <Objects>
  172. <Dataset id="ds_send_retvcond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  173. <ColumnInfo>
  174. <Column id="instcd" type="STRING" size="256"/>
  175. <Column id="goodflag" type="STRING" size="256"/>
  176. <Column id="reqdeptcd" type="STRING" size="256"/>
  177. <Column id="reqdeptnm" type="STRING" size="256"/>
  178. <Column id="instcdnm" type="STRING" size="256"/>
  179. <Column id="reqmthd" type="STRING" size="256"/>
  180. <Column id="purcflag" type="STRING" size="256"/>
  181. </ColumnInfo>
  182. <Rows>
  183. <Row>
  184. <Col id="instcd"/>
  185. <Col id="goodflag"/>
  186. <Col id="reqdeptcd"/>
  187. <Col id="reqdeptnm"/>
  188. <Col id="instcdnm"/>
  189. <Col id="reqmthd"/>
  190. <Col id="purcflag"/>
  191. </Row>
  192. </Rows>
  193. </Dataset>
  194. <Dataset id="ds_init_goodflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  195. <ColumnInfo>
  196. <Column id="label" type="STRING" size="256"/>
  197. <Column id="value" type="STRING" size="256"/>
  198. </ColumnInfo>
  199. <Rows>
  200. <Row>
  201. <Col id="label">의료소모품</Col>
  202. <Col id="value">Y</Col>
  203. </Row>
  204. <Row>
  205. <Col id="label">일반소모품</Col>
  206. <Col id="value">Z</Col>
  207. </Row>
  208. <Row>
  209. <Col id="label">의료비품</Col>
  210. <Col id="value">U</Col>
  211. </Row>
  212. <Row>
  213. <Col id="label">약품</Col>
  214. <Col id="value">P</Col>
  215. </Row>
  216. </Rows>
  217. </Dataset>
  218. <Dataset id="ds_init_purcflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  219. <Dataset id="ds_init_reqmthd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  220. <ColumnInfo>
  221. <Column id="label" type="STRING" size="256"/>
  222. <Column id="value" type="STRING" size="256"/>
  223. </ColumnInfo>
  224. <Rows>
  225. <Row>
  226. <Col id="label">전체</Col>
  227. <Col id="value"/>
  228. </Row>
  229. <Row>
  230. <Col id="label">처방집계</Col>
  231. <Col id="value">1</Col>
  232. </Row>
  233. <Row>
  234. <Col id="label">일반청구</Col>
  235. <Col id="value">3</Col>
  236. </Row>
  237. </Rows>
  238. </Dataset>
  239. <Dataset id="ds_main_goodbaseqtylist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_goodbaseqtylist_oncolumnchanged">
  240. <ColumnInfo>
  241. <Column id="rnum" type="STRING" size="256" sumtext="순번 "/>
  242. <Column id="instcd" type="STRING" size="256" sumtext="기관코드 "/>
  243. <Column id="lrgcd" type="STRING" size="256" sumtext="대분류코드 "/>
  244. <Column id="mdlcd" type="STRING" size="256" sumtext="중분류코드 "/>
  245. <Column id="smlcd" type="STRING" size="256" sumtext="소분류코드 "/>
  246. <Column id="reqmthdnm" type="STRING" size="256" sumtext="청구기준 "/>
  247. <Column id="goodflag" type="STRING" size="256" sumtext="물품구분 "/>
  248. <Column id="goodflagnm" type="STRING" size="256" sumtext="물품구분명 "/>
  249. <Column id="reqdeptcd" type="STRING" size="256" sumtext="부서 "/>
  250. <Column id="lrgnm" type="STRING" size="256" sumtext="대분류 "/>
  251. <Column id="mdlnm" type="STRING" size="256" sumtext="중분류 "/>
  252. <Column id="smlnm" type="STRING" size="256" sumtext="소분류 "/>
  253. <Column id="goodcd" type="STRING" size="256" sumtext="물품코드 "/>
  254. <Column id="allsizespecid" type="STRING" size="256" sumtext="All Size "/>
  255. <Column id="goodnm" type="STRING" size="256" sumtext="물품명 "/>
  256. <Column id="goodspec" type="STRING" size="256" sumtext="규격 "/>
  257. <Column id="goodmodel" type="STRING" size="256" sumtext="모델 "/>
  258. <Column id="prodcmpynm" type="STRING" size="256" sumtext="제조회사 "/>
  259. <Column id="purcunit" type="STRING" size="256" sumtext="포장단위 "/>
  260. <Column id="deliveunit" type="STRING" size="256" sumtext="청구단위 "/>
  261. <Column id="exchqty" type="STRING" size="256" sumtext="환상수량 "/>
  262. <Column id="ddavguseqty" type="STRING" size="256" sumtext="일평균수량 "/>
  263. <Column id="basevol" type="STRING" size="256" sumtext="기준량 "/>
  264. <Column id="basevolamt" type="STRING" size="256" sumtext="기준량금액 "/>
  265. <Column id="purcunit" type="STRING" size="256" sumtext="포장단위 "/>
  266. <Column id="stocqty" type="STRING" size="256" sumtext="Online 재고량 "/>
  267. <Column id="cmt" type="STRING" size="256" sumtext="비고 "/>
  268. <Column id="reqmthd" type="STRING" size="256" sumtext="청구구분 "/>
  269. <Column id="tmpreqflag" type="STRING" size="256" sumtext="임의청구구분 "/>
  270. <Column id="reqpackconcat" type="STRING" size="256" sumtext="reqpackconcat "/>
  271. <Column id="allsizeyn" type="STRING" size="256" sumtext="allsizeyn "/>
  272. <Column id="oallsizespecid" type="STRING" size="256" sumtext="All Size "/>
  273. <Column id="prepargodqty" type="STRING" size="256" sumtext="부서상비품량 "/>
  274. <Column id="qnspflag" type="STRING" size="256" sumtext="정량보충구분 "/>
  275. <Column id="reqflag" type="STRING" size="256" sumtext="청구구분 "/>
  276. <Column id="reqflagnm" type="STRING" size="256" sumtext="청구구분 "/>
  277. <Column id="reqprid" type="STRING" size="256" sumtext="청구주기 "/>
  278. <Column id="reqpridnm" type="STRING" size="256" sumtext="청구주기명 "/>
  279. <Column id="select" type="STRING" size="256" sumtext="Check "/>
  280. <Column id="userqty" type="STRING" size="256" sumtext="수량 "/>
  281. </ColumnInfo>
  282. </Dataset>
  283. <Dataset id="ds_main_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  284. <Dataset id="ds_save" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  285. <Dataset id="ds_copynode_goodbaseqtylist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  286. <Dataset id="ds_send_allsize" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  287. <ColumnInfo>
  288. <Column id="goodcd" type="STRING" size="256"/>
  289. <Column id="instcd" type="STRING" size="256"/>
  290. <Column id="goodspec" type="STRING" size="256"/>
  291. </ColumnInfo>
  292. <Rows>
  293. <Row>
  294. <Col id="goodcd"/>
  295. <Col id="instcd"/>
  296. <Col id="goodspec"/>
  297. </Row>
  298. </Rows>
  299. </Dataset>
  300. <Dataset id="ds_init_main_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  301. </Objects>
  302. <Bind>
  303. <BindItem id="item0" compid="grp_biz.grp_sea.opt_instcdnm" propid="value" datasetid="ds_send_retvcond" columnid="instcdnm"/>
  304. <BindItem id="item1" compid="grp_biz.grp_sea.opt_instcd" propid="value" datasetid="ds_send_retvcond" columnid="instcd"/>
  305. <BindItem id="item2" compid="grp_biz.grp_sea.cmb_goodflag" propid="value" datasetid="ds_send_retvcond" columnid="goodflag"/>
  306. <BindItem id="item3" compid="grp_biz.grp_sea.cmb_purcflag" propid="value" datasetid="ds_send_retvcond" columnid="purcflag"/>
  307. <BindItem id="item4" compid="grp_biz.grp_sea.cmb_reqmthd" propid="value" datasetid="ds_send_retvcond" columnid="reqmthd"/>
  308. <BindItem id="item5" compid="grp_biz.grp_sea.ipt_reqdeptcd" propid="value" datasetid="ds_send_retvcond" columnid="reqdeptcd"/>
  309. <BindItem id="item6" compid="grp_biz.grp_sea.ipt_reqdeptnm" propid="value" datasetid="ds_send_retvcond" columnid="reqdeptnm"/>
  310. </Bind>
  311. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  312. * System Name :
  313. * Job Name :
  314. * Creator :
  315. * Make Date : 2017-06-19
  316. * Description :
  317. *---------------------------------------------------------------------------------------
  318. * Modify Date Modifier Modify Description
  319. *---------------------------------------------------------------------------------------
  320. * 2017-06-19 Live Converter TF->XP
  321. *
  322. *---------------------------------------------------------------------------------------
  323. ****************************************************************************************/
  324. include "com_commonxp::comm_main.xjs";
  325. include "mis_miscommonxp::MIS.xjs";
  326. include "mis_miscommonxp::misMemo.xjs";
  327. include "mis_miscommonxp::RSZ001.xjs";
  328. include "mis_humtrafactmngtxp::RPB001.xjs";
  329. include "mis_educationmngtxp::RPS001.xjs";
  330. var arErrorCode = new HashArray();
  331. function SMRSD00600_oninit(obj:Form, e:InitEventInfo)
  332. {
  333. frmf_initForm(obj); //폼 초기화
  334. grdf_initGrid(grp_biz.grd_goodbaseqtylist);
  335. grdf_initGrid(grp_biz.grp_allsize.grd_codelist);
  336. }
  337. function SMRSD00600_onload(obj:Form, e:LoadEventInfo)
  338. {
  339. fInitialize();
  340. misfGridInit(grp_biz.grd_goodbaseqtylist);
  341. misfMsterDetailSet("grp_biz.grd_goodbaseqtylist",null,"TRRSD00102","Y");
  342. //화면 권한 설정
  343. grp_biz.btn_save.enable = (frmf_checkAuth("X"));
  344. }
  345. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  346. function fInitialize() {
  347. // misfComboComCdListMulti("R0111", "cmb_purcflag"); //구매구분
  348. misfComboComCdList('R0111', grp_biz.grp_sea.cmb_purcflag, "Y"); //구매구분
  349. ds_main_goodbaseqtylist.clearData();
  350. ds_send_retvcond.clearData();
  351. ds_send_retvcond.addRow();
  352. grp_biz.grp_sea.opt_instcd.value = sysf_getUserInfo("dutplceinstcd");
  353. grp_biz.grp_sea.opt_instcdnm.value = sysf_getUserInfo("dutplceinstnm");
  354. grp_biz.grp_sea.ipt_reqdeptcd.value = sysf_getUserInfo("dutplcecd");
  355. grp_biz.grp_sea.ipt_reqdeptnm.value = sysf_getUserInfo("dutplcenm");
  356. grp_biz.grp_sea.cmb_goodflag.index = 0;//물품구분
  357. grp_biz.grp_sea.cmb_reqmthd.index = 0;//청구방법
  358. grp_biz.grp_sea.cmb_purcflag.value = 0;
  359. }
  360. function grp_biz_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  361. {
  362. var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
  363. if ( !utlf_isNull(updtdata) && updtdata.rowcount > 1) {
  364. var ret = sysf_messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  365. if (ret != 6) { // not OK
  366. return;
  367. }
  368. }
  369. if(fCheckKey())
  370. {
  371. return;
  372. }
  373. misfMsterDetailRetrieve();
  374. ds_main_goodbaseqtylist.enableevent = false;
  375. ds_main_goodbaseqtylist.updatecontrol = false;
  376. ds_main_goodbaseqtylist.addColumn("basevoledit", "string");
  377. ds_main_goodbaseqtylist.addColumn("prepargodqtyedit", "string");
  378. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  379. for(var k =0; k < ds_main_goodbaseqtylist.rowcount; k++){
  380. var Reqmthd = ds_main_goodbaseqtylist.getColumn(k, "reqmthd");
  381. var Tmpreqflag = ds_main_goodbaseqtylist.getColumn(k, "tmpreqflag");
  382. if(Reqmthd=="1"){ //처방집계
  383. ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "none");
  384. ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "text");
  385. }else if(Reqmthd=="3"){//일반청구
  386. ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "text");
  387. ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "none");
  388. }
  389. }
  390. ds_main_goodbaseqtylist.updatecontrol = true;
  391. ds_main_goodbaseqtylist.enableevent = true;
  392. }
  393. function fCheckKey()
  394. {
  395. var bool = false;
  396. //기관코드 및 물품청구 구분값 체크
  397. if( utlf_isNull(grp_biz.grp_sea.opt_instcd.value)) {
  398. sysf_messageBox("기관코드를","C002");
  399. bool = true;
  400. } else if(utlf_isNull(grp_biz.grp_sea.cmb_goodflag.value)) {
  401. sysf_messageBox("물품청구 구분","C002");
  402. bool = true;
  403. } else if(utlf_isNull(grp_biz.grp_sea.ipt_reqdeptcd.value)) {
  404. sysf_messageBox("부서 코드를","C002");
  405. bool = true;
  406. }
  407. return bool
  408. }
  409. function grp_biz_grp_sea_cmb_goodflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  410. {
  411. grp_biz_grp_sea_btn_search_onclick();
  412. }
  413. function grp_biz_grp_sea_cmb_purcflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  414. {
  415. grp_biz_grp_sea_btn_search_onclick();
  416. }
  417. function grp_biz_grp_sea_cmb_reqmthd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  418. {
  419. fGridChange(e.postvalue);
  420. }
  421. function fGridChange ( pValue ) {
  422. if( pValue == "1" )// 처방 집계 물품 상비품량 항목 활성화 / 안전재고 항목 비활성화
  423. {
  424. grp_biz.cap_titlist.text = "부서 상비품 List";
  425. }
  426. else// 일반청구 물품.. 상비품량 항목 비활성화 / 안전재고 항목 활성화
  427. {
  428. grp_biz.cap_titlist.text = "부서 안전재고 List";
  429. }
  430. }
  431. function grp_biz_grp_sea_ipt_reqdeptcd_ontextchanged(obj:Edit, e:TextChangedEventInfo)
  432. {
  433. if(grp_biz.grp_sea.ipt_reqdeptcd.value.length == 0)
  434. grp_biz.grp_sea.ipt_reqdeptnm.value = "";
  435. else
  436. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  437. }
  438. function grp_biz_grp_sea_btn_reqdeptcd_onclick(obj:Button, e:ClickEventInfo)
  439. {
  440. var recv_list = "reqdeptcd,reqdeptnm";
  441. misfOpenPopUpList("02", grp_biz.grp_sea.ipt_reqdeptcd,"",recv_list);
  442. }
  443. function grp_biz_grp_sea_ipt_reqdeptnm_ontextchanged(obj:Edit, e:TextChangedEventInfo)
  444. {
  445. if(grp_biz.grp_sea.ipt_reqdeptnm.value.length == 0)
  446. grp_biz.grp_sea.ipt_reqdeptcd.value = "";
  447. else
  448. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  449. }
  450. function btn_clear_onclick(obj:Button, e:ClickEventInfo)
  451. {
  452. var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
  453. if (!utlf_isNull(updtdata) && updtdata.rowcount > 1) {
  454. var ret = sysf_messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  455. if (ret != 6) { // not OK
  456. return;
  457. }
  458. }
  459. fInitialize();
  460. }
  461. function grp_biz_btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  462. {
  463. if(fCheckKey())
  464. {
  465. return;
  466. }
  467. misfGridIUD(grp_biz.grd_goodbaseqtylist, "A");
  468. //행추가를 누를시 기간코드,청구구분,청구부서 값을 자동으로 Detail 그리드에 저장한다.
  469. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "rnum", ds_main_goodbaseqtylist.rowcount);
  470. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "instcd", grp_biz.grp_sea.opt_instcd.value);
  471. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "goodflag", grp_biz.grp_sea.cmb_goodflag.value);
  472. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowcount - 1, "reqdeptcd", grp_biz.grp_sea.ipt_reqdeptcd.value);
  473. }
  474. function grp_biz_btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  475. {
  476. misfGridIUD(grp_biz.grd_goodbaseqtylist,"D");
  477. }
  478. function grp_biz_btn_save_onclick(obj:Button, e:ClickEventInfo)
  479. {
  480. var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
  481. if (utlf_isNull(updtdata) || updtdata.rowcount == 0 ) {
  482. sysf_messageBox("변경된 데이터가","I004");
  483. return;
  484. }
  485. var sReqmThd = "";
  486. var null_chech1 = "";
  487. var null_chech2 = "";
  488. for (var i=0; i < ds_main_goodbaseqtylist.rowcount; i++)
  489. {
  490. sReqmThd = ds_main_goodbaseqtylist.getColumn(i, "reqmthd");
  491. null_check1 = ds_main_goodbaseqtylist.getColumn(i, "prepargodqty");
  492. null_check2 = ds_main_goodbaseqtylist.getColumn(i, "basevol" );
  493. if (sReqmThd=="1"){
  494. sReqmThd = "";
  495. } else if(sReqmThd=="3"){
  496. sReqmThd = "";
  497. } else {
  498. null_chech1 = "0";
  499. null_chech2 = "0";
  500. }
  501. if ((utlf_isNull(null_check2))&&(utlf_isNull(null_check1))) {
  502. sysf_messageBox(i+ "번째 기준량은","I003");
  503. return;
  504. }
  505. }
  506. call_TXRSD00101("TXRSD00101");
  507. }
  508. function call_TXRSD00101() {
  509. var updtdata = grdf_getGridUpdateData(grp_biz.grd_goodbaseqtylist);
  510. grdf_setStatusColumn(updtdata, "status");
  511. ds_save.copyData(updtdata);
  512. dsf_setDefaultVal(ds_save, "ddavguseqty:0,basevol:0,prepargodqty:0");
  513. var oParam = {};
  514. oParam.id = "TXRSD00101";
  515. oParam.service = "reqapp.ReqMngt";
  516. oParam.method = "reqExeSaveGoodBaseQty";
  517. oParam.inds = "req=ds_save";
  518. oParam.outds = "";
  519. oParam.async = false;
  520. tranf_submit(oParam);
  521. grp_biz_grp_sea_btn_search_onclick();
  522. }
  523. function grp_biz_grd_goodbaseqtylist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  524. {
  525. if (grp_biz.grd_goodbaseqtylist.currentcol == grp_biz.grd_goodbaseqtylist.getBindCellIndex("body", "goodcd") &&
  526. ds_main_goodbaseqtylist.getRowType(ds_main_goodbaseqtylist.rowposition) == "2" )
  527. {
  528. //구성물품코드를 눌렀을 경우
  529. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty";
  530. ds_copynode_goodbaseqtylist.clearData();
  531. frmf_setParameter("SMRSD00400_", "");
  532. if ( ds_send_retvcond.getColumn(0, "reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
  533. rszfOpenPopUpListByWndName(grp_biz.grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag,reqcheck","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag,N", "Y");
  534. }
  535. else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
  536. rszfOpenPopUpListByWndName(grp_biz.grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag", "Y");
  537. }
  538. var cur_row = ds_main_goodbaseqtylist.rowposition;
  539. var status = ds_main_goodbaseqtylist.getColumn(cur_row, "m");
  540. var CSV = frmf_getParameter("SMRSD00400_");
  541. ds_copynode_goodbaseqtylist.copyData(CSV);
  542. fSettingGoodList("userqty");
  543. }
  544. if (grp_biz.grd_goodbaseqtylist.currentcol == grp_biz.grd_goodbaseqtylist.getBindCellIndex("body", "goodspec") &&
  545. (ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "allsizeyn") == "Y" || ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "allsizeyn") == "1") )
  546. {
  547. fAllSizeRead(ds_main_goodbaseqtylist.rowposition, grp_biz.grd_goodbaseqtylist.currentcol, e.clientY);
  548. }
  549. }
  550. // --------------------------------------------------
  551. // All Size 읽어오는 함수
  552. // --------------------------------------------------
  553. var vAllSizeCol = 0;
  554. var vAllSizeRow = 0;
  555. var vAllSizePath:Dataset;
  556. vAllSizePath = ds_main_codelist;
  557. var vGoodReqPath:Dataset;
  558. vGoodReqPath = ds_main_goodbaseqtylist;
  559. function fAllSizeRead(pRow, pCol, pPos){
  560. var iClickY = pPos - 100;
  561. vAllSizeCol = pCol;
  562. vAllSizeRow = pRow;
  563. if (iClickY > 375) iClickY = iClickY - 319;
  564. grp_biz.grp_allsize.position.top = iClickY;
  565. grp_biz.grp_allsize.visible = true;
  566. ds_send_allsize.setColumn(0, "instcd", grp_biz.grp_sea.opt_instcd.value);
  567. ds_send_allsize.setColumn(0, "goodcd", ds_main_goodbaseqtylist.getColumn(pRow, pCol-3));
  568. var oParam = {};
  569. oParam.id = "TRRSD00281";
  570. oParam.service = "purccommonapp.PurcCommon";
  571. oParam.method = "reqGetGoodCode";
  572. oParam.inds = "req=ds_send_allsize";
  573. oParam.outds = "ds_main_codelist=codelist";
  574. oParam.async = false;
  575. tranf_submit(oParam);
  576. }
  577. function fSettingGoodList(userqtynm) {
  578. var addRow = ds_main_goodbaseqtylist.rowposition;
  579. for (var j = 0; j < ds_copynode_goodbaseqtylist.rowcount; j++) {
  580. if (addRow == ds_main_goodbaseqtylist.rowcount) {
  581. misfGridIUD(grd_goodbaseqtylist, "A");
  582. addRow = ds_main_goodbaseqtylist.rowcount - 1;
  583. }
  584. ds_main_goodbaseqtylist.setColumn(addRow, "goodcd", ds_copynode_goodbaseqtylist.getColumn(j, "goodcd"));
  585. ds_main_goodbaseqtylist.setColumn(addRow, "goodnm", ds_copynode_goodbaseqtylist.getColumn(j, "goodnm"));
  586. ds_main_goodbaseqtylist.setColumn(addRow, "goodmodel", ds_copynode_goodbaseqtylist.getColumn(j, "goodmodel"));
  587. ds_main_goodbaseqtylist.setColumn(addRow, "goodspec", ds_copynode_goodbaseqtylist.getColumn(j, "goodspec"));
  588. ds_main_goodbaseqtylist.setColumn(addRow, "prodcmpynm", ds_copynode_goodbaseqtylist.getColumn(j, "prodcmpynm"));
  589. ds_main_goodbaseqtylist.setColumn(addRow, "purcunit", ds_copynode_goodbaseqtylist.getColumn(j, "purcunit"));
  590. ds_main_goodbaseqtylist.setColumn(addRow, "exchqty", ds_copynode_goodbaseqtylist.getColumn(j, "exchqty"));
  591. ds_main_goodbaseqtylist.setColumn(addRow, "deliveunit", ds_copynode_goodbaseqtylist.getColumn(j, "deliveunit"));
  592. dsf_makeValue(ds_main_goodbaseqtylist, "reqmthd", "string", ds_copynode_goodbaseqtylist.getColumn(j, "reqmthd"), addRow);
  593. var sReqmThd = ds_copynode_goodbaseqtylist.getColumn(j, "reqmthd");
  594. if (sReqmThd == "1") {
  595. ds_main_goodbaseqtylist.setColumn(addRow, "prepargodqty", ds_copynode_goodbaseqtylist.getColumn(j, "safestocqty"));
  596. } else if (sReqmThd == "3") {
  597. ds_main_goodbaseqtylist.setColumn(addRow, "basevol", ds_copynode_goodbaseqtylist.getColumn(j, "safestocqty"));
  598. }
  599. ds_main_goodbaseqtylist.setColumn(addRow, "ddavguseqty", ds_copynode_goodbaseqtylist.getColumn(j, "ddavguseqty"));
  600. ds_main_goodbaseqtylist.setColumn(addRow, "allsizespecid", ds_copynode_goodbaseqtylist.getColumn(j, "allsizespecid"));
  601. ds_main_goodbaseqtylist.setColumn(addRow, "allsizeyn", ds_copynode_goodbaseqtylist.getColumn(j, "allsizeyn"));
  602. dsf_makeValue(ds_main_goodbaseqtylist, "tmpreqflag", "string", ds_copynode_goodbaseqtylist.getColumn(j, "tmpreqflag"), addRow);
  603. addRow = addRow + 1;
  604. }
  605. // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
  606. // 2009.12.29 수정 tmpreqflag 임의청구 가능여부 삭제
  607. for (var k = 0; k < ds_main_goodbaseqtylist.rowcount; k++) {
  608. var Reqmthd = ds_main_goodbaseqtylist.getColumn(k, "reqmthd");
  609. var Tmpreqflag = ds_main_goodbaseqtylist.getColumn(k, "tmpreqflag");
  610. if (Reqmthd == "1") { //처방집계시
  611. ds_main_goodbaseqtylist.setColumn(k, "basevol", "0");
  612. ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "none");
  613. ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "text");
  614. } else if (Reqmthd == "3") { //일반청구시
  615. ds_main_goodbaseqtylist.setColumn(k, "prepargodqty", "0");
  616. ds_main_goodbaseqtylist.setColumn(k, "basevoledit", "text");
  617. ds_main_goodbaseqtylist.setColumn(k, "prepargodqtyedit", "none");
  618. }
  619. }
  620. }
  621. function ds_main_goodbaseqtylist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  622. {
  623. if(grp_biz.grd_goodbaseqtylist.currentcol == grp_biz.grd_goodbaseqtylist.getBindCellIndex("body", "goodcd") &&
  624. utlf_transNullToEmpty(ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "goodcd")).length> 0)
  625. {
  626. var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty,allsizeyn,allsizespecid";
  627. ds_copynode_goodbaseqtylist.clearData();
  628. frmf_setParameter("SMRSD00400_", "");
  629. if ( ds_send_retvcond.getColumn(0, "reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
  630. //alert("일반 청구일 경우 임.");
  631. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,reqcheck","goodcd," + grp_biz.grp_sea.opt_instcd.value + "," + grp_biz.grp_sea.cmb_goodflag.value + "," + ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "goodcd")+",N","", recv_list, grp_biz.grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag,reqcheck","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag,N", "Y");
  632. }
  633. else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
  634. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd","goodcd," + grp_biz.grp_sea.opt_instcd.value + "," + grp_biz.grp_sea.cmb_goodflag.value + "," + ds_main_goodbaseqtylist.getColumn(ds_main_goodbaseqtylist.rowposition, "goodcd"),"", recv_list, grp_biz.grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag","grp_biz.grp_sea.opt_instcd,grp_biz.grp_sea.cmb_goodflag", "Y");
  635. }
  636. var sReqmThd = ds_init_main_goodlist.getColumn(0, "reqmthd");
  637. if(sReqmThd=="1"){
  638. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "prepargodqty", ds_init_main_goodlist.getColumn(0, "safestocqty"));
  639. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "basevoledit", "none");
  640. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "prepargodqtyedit", "text");
  641. }else if(sReqmThd=="3"){
  642. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "basevol", ds_init_main_goodlist.getColumn(0, "safestocqty"));
  643. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "basevoledit", "text");
  644. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "prepargodqtyedit", "none");
  645. }
  646. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "reqmthd", ds_init_main_goodlist.getColumn(0, "reqmthd"));
  647. var cur_row = ds_main_goodbaseqtylist.rowposition;
  648. var status = ds_main_goodbaseqtylist.getColumn(cur_row, "m");
  649. var CSV = frmf_getParameter("SMRSD00400_");
  650. if (CSV.rowcount > 0)
  651. {
  652. ds_main_goodbaseqtylist.setColumn(ds_main_goodbaseqtylist.rowposition, "goodcd","");
  653. ds_copynode_goodbaseqtylist.copyData(CSV);
  654. fSettingGoodList("userqty");
  655. }
  656. }
  657. }
  658. function grp_biz_grp_allsize_btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  659. {
  660. fAllSizeSelect(grp_biz.grd_goodbaseqtylist);
  661. }
  662. ]]></Script>
  663. </Form>
  664. </FDL>