SMAEB03500_조영제약품코드관리.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAEB03500" position="absolute 0 0 1192 782" titletext="조영제/재료 코드 관리" oninit="SMAEB03500_oninit" onload="SMAEB03500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="조영제/재료 코드 관리" position="absolute 0 0 180 25" id="caption19" class="tit_1"/>
  8. <Shape position="absolute 0 90 1190 96" linetype="horizontal" id="line2" class="line_10" anchor="left top right"/>
  9. <Button position="absolute 1080 68 1133 90" id="btn_grdadd" class="btn2" text="행추가" onclick="btn_grdadd_onclick" anchor="top right"/>
  10. <Button position="absolute 1137 68 1190 90" id="btn_grddel" class="btn2" text="행삭제" onclick="btn_grddel_onclick" anchor="top right"/>
  11. <Div position="absolute 0 749 1191 780" id="grp_btn" anchor="left right bottom">
  12. <Layouts>
  13. <Layout>
  14. <Shape position="absolute 0 0 1190 6" linetype="horizontal" id="line32" class="line_6" anchor="left top right"/>
  15. <Button position="absolute 1073 6 1129 28" id="button1" class="btn4" text="저장" anchor="top right" onclick="grp_btn_button1_onclick"/>
  16. <Button position="absolute 1133 6 1189 28" id="btn_close" class="btn4" text="닫기" anchor="top right" onclick="grp_btn_btn_close_onclick"/>
  17. </Layout>
  18. </Layouts>
  19. </Div>
  20. <Grid position="absolute 0 95 1190 751" id="grd_goodlist" binddataset="ds_main_goodlist_item" cellsizingtype="both" onexpandup="grd_goodlist_onexpandup" autoenter="select" anchor="all" selecttype="multirow">
  21. <Formats>
  22. <Format id="default">
  23. <Columns>
  24. <Column size="25" band="left"/>
  25. <Column size="160"/>
  26. <Column size="540"/>
  27. <Column size="109"/>
  28. <Column size="118"/>
  29. <Column size="0"/>
  30. <Column size="0"/>
  31. <Column size="88"/>
  32. </Columns>
  33. <Rows>
  34. <Row size="24" band="head"/>
  35. <Row size="24"/>
  36. </Rows>
  37. <Band id="head">
  38. <Cell/>
  39. <Cell col="1" text="조영제/재료코드"/>
  40. <Cell col="2" text="조영제/재료명"/>
  41. <Cell col="3" text="안전재고량"/>
  42. <Cell col="4" text="용량"/>
  43. <Cell col="5"/>
  44. <Cell col="6"/>
  45. <Cell col="7" text="구분"/>
  46. </Band>
  47. <Band id="body">
  48. <Cell celltype="head"/>
  49. <Cell col="1" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" text="bind:goodcd" editautoselect="true" expandshow="expr:getRowType(currow) == 2 ? 'show' : 'hide'" enable="false"/>
  50. <Cell col="2" displaytype="text" edittype="text" text="bind:goodnm" editautoselect="true"/>
  51. <Cell col="3" edittype="masknumber" style="align:right middle;" text="bind:safestocqty" editautoselect="true"/>
  52. <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:speccd" editautoselect="true"/>
  53. <Cell col="5" text="bind:instcd"/>
  54. <Cell col="6" text="bind:suppdeptcd"/>
  55. <Cell col="7" displaytype="combo" edittype="combo" style="align:center;" text="bind:itemcd" combodataset="ds_itemcd" combocodecol="itemcd" combodatacol="itemnm"/>
  56. </Band>
  57. </Format>
  58. </Formats>
  59. </Grid>
  60. <Div id="grp_srch" taborder="1" position="absolute 0 25 1190 65" class="div_SA" anchor="left top right">
  61. <Layouts>
  62. <Layout>
  63. <Button id="btn_sea" taborder="0" text="조회" class="btn1" position="absolute 1118 10 1174 32" anchor="top right" onclick="grp_srch_btn_sea_onclick"/>
  64. <Edit id="input1" taborder="1" class="input_search" position="absolute 416 11 516 30" anchor="default" onkeydown="grp_srch_input1_onkeydown"/>
  65. <Static id="caption2" text="조영제재료명 :" class="search_name" position="absolute 300 14 408 31" anchor="default"/>
  66. <Edit id="input8" taborder="2" class="input_search" position="absolute 142 12 242 31" anchor="default" onkeydown="grp_srch_input8_onkeydown"/>
  67. <Static id="caption1" text="조영제/재료코드 :" class="search_name" position="absolute 12 14 136 31" anchor="default"/>
  68. <Shape id="line6" linetype="vertical" class="line_4" position="absolute 1097 10 1103 32" anchor="top right"/>
  69. </Layout>
  70. </Layouts>
  71. </Div>
  72. </Layout>
  73. </Layouts>
  74. <Objects>
  75. <Dataset id="ds_main_goodlist_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  76. <ColumnInfo>
  77. <Column id="goodcd" type="STRING" size="256"/>
  78. <Column id="goodnm" type="STRING" size="256"/>
  79. <Column id="speccd" type="STRING" size="256"/>
  80. <Column id="safestocqty" type="STRING" size="256"/>
  81. <Column id="instcd" type="STRING" size="256"/>
  82. <Column id="suppdeptcd" type="STRING" size="256"/>
  83. <Column id="itemcd" type="STRING" size="256"/>
  84. </ColumnInfo>
  85. <Rows>
  86. <Row>
  87. <Col id="goodcd"/>
  88. <Col id="goodnm"/>
  89. <Col id="speccd"/>
  90. <Col id="safestocqty"/>
  91. <Col id="instcd"/>
  92. <Col id="suppdeptcd"/>
  93. </Row>
  94. </Rows>
  95. </Dataset>
  96. <Dataset id="ds_send_srch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  97. <ColumnInfo>
  98. <Column id="srchgoodcd" type="STRING" size="256"/>
  99. <Column id="srchgoodnm" type="STRING" size="256"/>
  100. </ColumnInfo>
  101. <Rows>
  102. <Row>
  103. <Col id="srchgoodcd"/>
  104. <Col id="srchgoodnm"/>
  105. </Row>
  106. </Rows>
  107. </Dataset>
  108. <Dataset id="ds_send_req_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  109. <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="suppdeptcd" type="STRING" size="256"/>
  112. </ColumnInfo>
  113. <Rows>
  114. <Row/>
  115. </Rows>
  116. </Dataset>
  117. <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  118. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  119. <ColumnInfo>
  120. <Column id="goodcd" type="STRING" size="256"/>
  121. <Column id="goodnm" type="STRING" size="256"/>
  122. <Column id="speccd" type="STRING" size="256"/>
  123. <Column id="safestocqty" type="STRING" size="256"/>
  124. </ColumnInfo>
  125. <Rows>
  126. <Row>
  127. <Col id="goodcd"/>
  128. <Col id="goodnm"/>
  129. <Col id="speccd"/>
  130. <Col id="safestocqty"/>
  131. </Row>
  132. </Rows>
  133. </Dataset>
  134. <Dataset id="ds_itemcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  135. <ColumnInfo>
  136. <Column id="itemcd" type="STRING" size="256"/>
  137. <Column id="itemnm" type="STRING" size="256"/>
  138. </ColumnInfo>
  139. <Rows>
  140. <Row>
  141. <Col id="itemcd">C</Col>
  142. <Col id="itemnm">조영제</Col>
  143. </Row>
  144. <Row>
  145. <Col id="itemcd">M</Col>
  146. <Col id="itemnm">재료</Col>
  147. </Row>
  148. </Rows>
  149. </Dataset>
  150. </Objects>
  151. <Bind>
  152. <BindItem id="item0" compid="grp_srch.input1" propid="value" datasetid="ds_send_srch" columnid="srchgoodnm"/>
  153. <BindItem id="item1" compid="grp_srch.input8" propid="value" datasetid="ds_send_srch" columnid="srchgoodcd"/>
  154. </Bind>
  155. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  156. * System Name :
  157. * Job Name :
  158. * Creator :
  159. * Make Date : 2016-06-17
  160. * Description :
  161. *---------------------------------------------------------------------------------------
  162. * Modify Date Modifier Modify Description
  163. *---------------------------------------------------------------------------------------
  164. * 2016-06-17 Live Converter TF->XP
  165. *
  166. *---------------------------------------------------------------------------------------
  167. ****************************************************************************************/
  168. //=======================================================================================
  169. // Lib Include
  170. //---------------------------------------------------------------------------------------
  171. include "com_commonxp::comm_main.xjs"
  172. include "ast_examcurexp::AEZ0001.xjs"
  173. include "ast_commonxp::AST.xjs"
  174. //=======================================================================================
  175. // Global Form Variable
  176. //---------------------------------------------------------------------------------------
  177. var arErrorCode = new HashArray();
  178. var gSuppdeptcd = "";
  179. //=======================================================================================
  180. // Function
  181. //---------------------------------------------------------------------------------------
  182. /****************************************************************************************
  183. * Argument : N/A
  184. * Description :
  185. ****************************************************************************************/
  186. function fnGetMainList() {
  187. ds_main_goodlist_item.clearData();
  188. dsf_createDsRow("ds_req", [
  189. {col:"srchgoodcd", type:"STRING", size:256, val:ds_send_srch.getColumn(0,"srchgoodcd")}
  190. , {col:"srchgoodnm", type:"STRING", size:256, val:ds_send_srch.getColumn(0,"srchgoodnm")}
  191. , {col:"basesuppdeptcd", type:"STRING", size:256, val:gSuppdeptcd}
  192. ]);
  193. var oParam = {};
  194. oParam.id = "TRAEB03501";
  195. oParam.service = "examcurebaseapp.DyeCode";
  196. oParam.method = "reqGetDyeCodeList";
  197. oParam.inds = "req=ds_req";
  198. oParam.outds = "ds_main_goodlist_item=item";
  199. oParam.async = true;
  200. //oParam.callback = "cf_TRAEB03501";
  201. tranf_submit(oParam);
  202. }
  203. //=======================================================================================
  204. // Event
  205. //---------------------------------------------------------------------------------------
  206. /****************************************************************************************
  207. * Components : Form
  208. * Components ID : SMAEB03500
  209. * Event : oninit
  210. * Argument : 01.obj : Object Event has occurred
  211. * : 02.e : Event Object
  212. * Description : 화면 처음 초기화시 폼초기화
  213. ****************************************************************************************/
  214. function SMAEB03500_oninit(obj:Form, e:InitEventInfo)
  215. {
  216. frmf_initForm(obj); // 폼 초기화
  217. }
  218. /****************************************************************************************
  219. * Components : Form
  220. * Components ID : SMAEB03500
  221. * Event : onload
  222. * Argument : 01.obj : Object Event has occurred
  223. * : 02.e : Event Object
  224. * Description : 화면 처음 초기화시 폼초기화
  225. ****************************************************************************************/
  226. function SMAEB03500_onload(obj:Form, e:LoadEventInfo)
  227. {
  228. // 메뉴 파라미터가 지정되어 있으면 해당 값으로 셋팅하고 그렇치 않으면 기본값 셋팅
  229. var suppdeptcd = "";
  230. suppdeptcd = frmf_getMenuParam();
  231. if (utlf_isNull(suppdeptcd)){
  232. lf_aezfSetSuppDeptcd(); //AEZ0001.xjs
  233. gSuppdeptcd = frmf_getParameter("AST_DEPTCD");
  234. }else{
  235. gSuppdeptcd = suppdeptcd;
  236. }
  237. ds_main_goodlist_item.clearData();
  238. grdf_setRowTypeIcon(grd_goodlist, 0); // 그리드 상태 표시
  239. }
  240. /****************************************************************************************
  241. * Components : Edit
  242. * Components ID : grp_srch.input8
  243. * Event : onkeydown
  244. * Argument : 01.obj : Object Event has occurred
  245. * : 02.e : Event Object
  246. * Description : 조영제/재료코드 입력 후 조회
  247. ****************************************************************************************/
  248. function grp_srch_input8_onkeydown(obj:Edit, e:KeyEventInfo)
  249. {
  250. if ( e.keycode == 13 ) {
  251. obj.updateToDataset();
  252. fnGetMainList();
  253. }
  254. }
  255. /****************************************************************************************
  256. * Components : Edit
  257. * Components ID : grp_srch.input8
  258. * Event : onkeydown
  259. * Argument : 01.obj : Object Event has occurred
  260. * : 02.e : Event Object
  261. * Description : 조영제재료명 입력 후 조회
  262. ****************************************************************************************/
  263. function grp_srch_input1_onkeydown(obj:Edit, e:KeyEventInfo)
  264. {
  265. if ( e.keycode == 13 ) {
  266. obj.updateToDataset();
  267. fnGetMainList();
  268. }
  269. }
  270. /****************************************************************************************
  271. * Components : Button
  272. * Components ID : grp_srch.btn_sea
  273. * Event : onclick
  274. * Argument : 01.obj : Object Event has occurred
  275. * : 02.e : Event Object
  276. * Description : 조회
  277. ****************************************************************************************/
  278. function grp_srch_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  279. {
  280. fnGetMainList();
  281. }
  282. /****************************************************************************************
  283. * Components : Button
  284. * Components ID : btn_grdadd
  285. * Event : onclick
  286. * Argument : 01.obj : Object Event has occurred
  287. * : 02.e : Event Object
  288. * Description : 행추가
  289. ****************************************************************************************/
  290. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  291. {
  292. var cnt = ds_main_goodlist_item.addRow();
  293. ds_main_goodlist_item.setColumn(cnt,"suppdeptcd",gSuppdeptcd);
  294. // grd_goodlist.isReadOnly(cnt, 1) = false; //신규추가일 경우만 조영제/재료코드 에디트 가능 EXPR서 처리
  295. }
  296. /****************************************************************************************
  297. * Components : Button
  298. * Components ID : btn_grddel
  299. * Event : onclick
  300. * Argument : 01.obj : Object Event has occurred
  301. * : 02.e : Event Object
  302. * Description : 행삭제
  303. ****************************************************************************************/
  304. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  305. {
  306. if(ds_main_goodlist_item.getRowType(ds_main_goodlist_item.rowposition)==2) {
  307. ds_main_goodlist_item.deleteRow(ds_main_goodlist_item.rowposition);
  308. } else {
  309. grdf_setStatus(grd_goodlist, "D", [ds_main_goodlist_item.rowposition]);
  310. }
  311. }
  312. /****************************************************************************************
  313. * Components : Grid
  314. * Components ID : grd_goodlist
  315. * Event : onexpandup
  316. * Argument : 01.obj : Object Event has occurred
  317. * : 02.e : Event Object
  318. * Description : 조영제/재료코드 조회 팝업 오픈
  319. ****************************************************************************************/
  320. function grd_goodlist_onexpandup(obj:Grid, e:GridMouseEventInfo)
  321. {
  322. // modal("SPAEB00402", "", "200", "200", "popup", "/root/hidden/pseursrvinfo", "/root/init/pseursrvinfo");
  323. ds_temp.clearData();
  324. if ( ds_temp.rowcount < 1 ) {
  325. ds_temp.addRow();
  326. }
  327. frmf_modal("SPAEB00402", "SPAEB00402", null, null, 0, 200, 200, null, null, null, null, null, "M");
  328. if(!utlf_isNull(ds_temp.getColumn(0,"goodcd"))) {
  329. ds_main_goodlist_item.setColumn(e.row,"goodcd" , ds_temp.getColumn(0,"goodcd"));
  330. ds_main_goodlist_item.setColumn(e.row,"goodnm" , ds_temp.getColumn(0,"goodnm"));
  331. ds_main_goodlist_item.setColumn(e.row,"safestocqty" , ds_temp.getColumn(0,"safestocqty"));
  332. ds_main_goodlist_item.setColumn(e.row,"speccd" , ds_temp.getColumn(0,"speccd"));
  333. }
  334. // ds_temp.setColumn(0,"goodcd", "");
  335. }
  336. /****************************************************************************************
  337. * Components : Button
  338. * Components ID : grp_btn.button1
  339. * Event : onclick
  340. * Argument : 01.obj : Object Event has occurred
  341. * : 02.e : Event Object
  342. * Description : 저장
  343. ****************************************************************************************/
  344. function grp_btn_button1_onclick(obj:Button, e:ClickEventInfo)
  345. {
  346. if(!astfNullValidation(ds_main_goodlist_item, "goodcd", "제품코드를")) return false;
  347. if(!astfNullValidation(ds_main_goodlist_item, "goodnm", "제품명을")) return false;
  348. ds_send_req.setColumn(0, "suppdeptcd", gSuppdeptcd);
  349. for(var i = 0; i < ds_main_goodlist_item.rowcount; i++) {
  350. var goodcd = ds_main_goodlist_item.getColumn(i,"goodcd");
  351. var cnt = ds_main_goodlist_item.getCaseCount("goodcd == '"+goodcd+"'");
  352. if(cnt > 1) {
  353. sysf_messageBox("약품코드[" + goodcd + "]가 ", "E006");
  354. return false;
  355. }
  356. }
  357. if ( sysf_messageBox("","Q002")==6 ) {
  358. var update = grdf_getGridUpdateData(grd_goodlist, "all");
  359. if(update.rowcount < 1) {
  360. sysf_messageBox("업데이트 정보가 없습니다.", "I");
  361. return 0;
  362. } else {
  363. grdf_setStatusColumn(update, "m");
  364. ds_send_req_data.copyData(update,true);
  365. //dsf_setFixVal(ds_send_req_data, "bdioflag:-,itemflag:-,itemcd:-");
  366. dsf_setFixVal(ds_send_req_data, "bdioflag:-,itemflag:-");
  367. var oParam = {};
  368. oParam.id = "TXAEB03501";
  369. oParam.service = "examcurebaseapp.DyeCode";
  370. oParam.method = "reqExeDyeCodeList";
  371. oParam.inds = "req=ds_send_req_data";
  372. oParam.outds = "ds_hidden_item=item";
  373. oParam.async = false;
  374. oParam.callback = "cf_TXAEB03501";
  375. tranf_submit(oParam);
  376. // if (submit("TXAEB03501")) {
  377. // // 저장 후 팝업인 경우 변경 여부 returng하고 창을 닫는다
  378. // submit("TRAEB03501");
  379. // }
  380. }
  381. }
  382. }
  383. function cf_TXAEB03501(sSvcId, nErrorCode, sErrorMsg) {
  384. if(nErrorCode < 0) return;
  385. fnGetMainList();
  386. }
  387. /****************************************************************************************
  388. * Components : Button
  389. * Components ID : grp_btn.btn_close
  390. * Event : onclick
  391. * Argument : 01.obj : Object Event has occurred
  392. * : 02.e : Event Object
  393. * Description : 닫기
  394. ****************************************************************************************/
  395. function grp_btn_btn_close_onclick(obj:Button, e:ClickEventInfo)
  396. {
  397. this.close();
  398. }
  399. ]]></Script>
  400. </Form>
  401. </FDL>