SMABC00700_조혈모세포일괄폐기.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>조혈모세포 일괄폐기</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <celltretdetl>
  11. <celltretdetail>
  12. <keepdd/>
  13. <scs/>
  14. <pid/>
  15. <hngnm/>
  16. <abndd/>
  17. <abnresn/>
  18. <abnnm/>
  19. <abnrem/>
  20. <chk/>
  21. <abnid/>
  22. <cellbcno/>
  23. </celltretdetail>
  24. </celltretdetl>
  25. <popupendflag/>
  26. </main>
  27. <init>
  28. <cmbinfo>
  29. <abnresn>
  30. <A0155>
  31. <cdid/>
  32. <cdnm/>
  33. </A0155>
  34. </abnresn>
  35. <stemcellsource>
  36. <A0159>
  37. <cdid/>
  38. <cdnm/>
  39. </A0159>
  40. </stemcellsource>
  41. </cmbinfo>
  42. </init>
  43. <send>
  44. <baseinfo>
  45. <sdate/>
  46. <tdate/>
  47. <gb/>
  48. </baseinfo>
  49. <globalinstance>
  50. <instance1/>
  51. </globalinstance>
  52. <execdata>
  53. <celltretdetail/>
  54. </execdata>
  55. </send>
  56. <hidden>
  57. <count/>
  58. </hidden>
  59. </root>
  60. </instance>
  61. <script type="javascript">
  62. <![CDATA[
  63. /* @group : 조혈모세포 일괄폐기
  64. * @ver : 2008.01.30
  65. * @by : 남수현
  66. * @type : function
  67. * @access : public
  68. * @desc : 보관중인 세포에 대한 일괄 폐기관리
  69. * @param :
  70. */
  71. function fReadFunc(){
  72. if (fDataCheck() == false){
  73. return;
  74. }
  75. model.removeNodeset("/root/main/celltretdetl/celltretdetail");
  76. submit("TRABC00701");
  77. if (model.getValue("/root/main/celltretdetl/celltretdetail[" + 1 + "]/pid") == ""){
  78. model.removeNodeset("/root/main/celltretdetl/celltretdetail");
  79. }
  80. if (model.getValue("/root/send/baseinfo/gb") == "1"){
  81. grd_abnlist.colDisabled(grd_abnlist.colRef("abnresn")) = false;
  82. }else{
  83. grd_abnlist.colDisabled(grd_abnlist.colRef("abnresn")) = true;
  84. }
  85. model.refresh();
  86. }
  87. /* @group : 조혈모세포 일괄폐기
  88. * @ver : 2008.01.30
  89. * @by : 남수현
  90. * @type : function
  91. * @access : public
  92. * @desc : 데이터 유효성 체크
  93. * @param :
  94. */
  95. function fDataCheck(){
  96. if (isDate(model.getValue("/root/send/baseinfo/sdate")) == false){
  97. messageBox("보관 시작일의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
  98. return false;
  99. }
  100. if (model.getValue("/root/send/baseinfo/sdate") == ""){
  101. messageBox("보관 시작일은 필수 입력 또는 선택 항목입니다.", "E999", "");
  102. return false;
  103. }
  104. if (isDate(model.getValue("/root/send/baseinfo/tdate")) == false){
  105. messageBox("보관 종료일의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
  106. return false;
  107. }
  108. if (model.getValue("/root/send/baseinfo/tdate") == ""){
  109. messageBox("보관 종료일은 필수 입력 또는 선택 항목입니다.", "E999", "");
  110. return false;
  111. }
  112. if (model.getValue("/root/send/baseinfo/sdate") > model.getValue("/root/send/baseinfo/tdate")){
  113. messageBox("보관 기간일이 잘못 입력되었습니다.", "E999", "");
  114. return false;
  115. }
  116. return true;
  117. }
  118. /* @group : 조혈모세포 일괄폐기
  119. * @ver : 2008.01.30
  120. * @by : 남수현
  121. * @type : function
  122. * @access : public
  123. * @desc : 저장시 데이터 유효성 체크
  124. * @param :
  125. */
  126. function fSaveChk(){
  127. k = 0;
  128. for (var i = 1; i < grd_abnlist.rows; i++){
  129. if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/chk") == "Y"){
  130. k = parseInt(k) + 1;
  131. if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/abndd") == ""){
  132. messageBox("폐기일자는 필수 입력항목입니다.", "E999", "");
  133. return false;
  134. }
  135. if (isDate(model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/abndd")) == false){
  136. messageBox("폐기일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
  137. return false;
  138. }
  139. if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/abnresn") == ""){
  140. messageBox("폐기사유는 필수 선택항목입니다.", "E999", "");
  141. return false;
  142. }
  143. }
  144. }
  145. if (k == 0){
  146. messageBox("폐기처리할 자료를 선택하지 않았습니다.", "E999", "");
  147. return false;
  148. }
  149. return true;
  150. }
  151. /* @group : 조혈모세포 일괄폐기
  152. * @ver : 2008.01.28
  153. * @by : 남수현
  154. * @type : function
  155. * @access : public
  156. * @desc : 일괄폐기내역 저장
  157. * @param :
  158. */
  159. function fSaveData(){
  160. var update = getGridUpdateData(grd_abnlist);
  161. model.setValue("/root/send/execdata/celltretdetail",update);
  162. if (submit("TXABC00701")){
  163. fReadFunc();
  164. }
  165. }
  166. /* @group : 조혈모세포 일괄폐기
  167. * @ver : 2008.01.28
  168. * @by : 남수현
  169. * @type : function
  170. * @access : public
  171. * @desc : 폐기취소내역 저장
  172. * @param :
  173. */
  174. function fSaveData2(){
  175. var update = getGridUpdateData(grd_abnlist);
  176. model.setValue("/root/send/execdata/celltretdetail",update);
  177. if (submit("TXABC00702")){
  178. fReadFunc();
  179. }
  180. }
  181. function isDate(str) { // 날짜 형식에 대한 적합여부 체크
  182. if (str == "") return true; // 빈건 체크안함
  183. if (trim(str) == "") return true; // 빈건 체크안함
  184. if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
  185. if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
  186. var yy = new Number(str.substring(0, 4));
  187. var mm = new Number(str.substring(4, 6)) - 1;
  188. var dd = new Number(str.substring(6, 8));
  189. var date = new Date(yy, mm, dd);
  190. //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
  191. if (yy != date.getFullYear() ||
  192. mm != date.getMonth() ||
  193. dd != date.getDate()) {
  194. return false; // 존재하지 않는 날짜
  195. }
  196. return true; // 존재하는 날짜
  197. }
  198. function trim(data){ // 문자에 대한 TRIM 작업
  199. return data.replace(/(^\s*)|(\s*$)/g, "");
  200. }
  201. ]]>
  202. </script>
  203. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  204. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  205. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  206. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  207. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  208. <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
  209. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  210. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  211. <submission id="TRZBC00101"/>
  212. <script type="javascript" ev:event="xforms-ready">
  213. <![CDATA[
  214. zbcfGetCodeList( new Array("A0155", "A0159"),
  215. new Array("/root/init/cmbinfo/abnresn", "/root/init/cmbinfo/stemcellsource"));
  216. model.removeNodeset("/root/main/celltretdetl/celltretdetail");
  217. model.setValue("/root/send/baseinfo/sdate", getCurrentDate());
  218. model.setValue("/root/send/baseinfo/tdate", ipt_sdate.value);
  219. ipt_sdate.value = ipt_sdate.value.toDate().getAddDate(-365 * 4,"D").getDateFormat("YYYYMMDD") ;
  220. btn_save.disabled = false;
  221. btn_can.disabled = true;
  222. model.setValue("/root/send/baseinfo/gb", "1");
  223. model.refresh();
  224. ]]>
  225. </script>
  226. <submission id="TRABC00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/baseinfo" replace="instance" resultref="/root/main/celltretdetl"/>
  227. <submission id="TXABC00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/execdata/celltretdetail" resultref="/root/hidden"/>
  228. <submission id="TXABC00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/execdata/celltretdetail" resultref="/root/hidden"/>
  229. </model>
  230. </xhtml:head>
  231. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  232. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  233. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">조혈모세포일괄폐기</caption>
  234. </group>
  235. <group id="grp_biz" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  236. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:200px; height:13px; ">조혈모세포 일괄폐기 대상</caption>
  237. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  238. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  239. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  240. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  241. <button id="btn_sea" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  242. <caption>조회</caption>
  243. <script type="javascript" ev:event="onclick">
  244. <![CDATA[
  245. fReadFunc();
  246. ]]>
  247. </script>
  248. </button>
  249. <select1 id="radio2" ref="/root/send/baseinfo/gb" class="radio_search" navindex="3" appearance="full" cols="2" rows="1" overflow="visible" style="left:335px; top:8px; width:176px; height:20px; border-style:none; ">
  250. <choices>
  251. <item>
  252. <label>폐기대상만</label>
  253. <value>1</value>
  254. </item>
  255. <item>
  256. <label>폐기된것만</label>
  257. <value>2</value>
  258. </item>
  259. </choices>
  260. <script type="javascript" ev:event="xforms-value-changed">
  261. <![CDATA[
  262. if (model.getValue("/root/send/baseinfo/gb") == "1"){
  263. btn_save.disabled = false;
  264. btn_can.disabled = true;
  265. ipt_edate.disabled = true;
  266. ipt_sdate.value = ipt_edate.value.toDate().getAddDate(-365 * 4,"D").getDateFormat("YYYYMMDD") ;
  267. cpt_days.attribute("text") = "보관일자";
  268. }else{
  269. btn_save.disabled = true;
  270. btn_can.disabled = false;
  271. ipt_edate.disabled = false;
  272. ipt_sdate.value = ipt_edate.value.toDate().getAddDate(-7,"D").getDateFormat("YYYYMMDD") ;
  273. cpt_days.attribute("text") = "폐기일자";
  274. }
  275. fReadFunc();
  276. ]]>
  277. </script>
  278. </select1>
  279. <caption id="caption5" class="search_no_b" style="left:207px; top:10px; width:12px; height:17px; ">~</caption>
  280. <input id="ipt_sdate" ref="/root/send/baseinfo/sdate" class="input_s_essential" navindex="1" inputtype="date" style="left:104px; top:9px; width:100px; height:19px; "/>
  281. <input id="ipt_edate" ref="/root/send/baseinfo/tdate" class="input_s_essential" disabled="true" navindex="2" inputtype="date" style="left:222px; top:9px; width:100px; height:19px; "/>
  282. <caption id="cpt_days" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">보관일자 :</caption>
  283. </group>
  284. <datagrid id="grd_abnlist" nodeset="/root/main/celltretdetl/celltretdetail" caption="보관일자^Stem Cell Source^등록번호^환자명^폐기일자^폐기사유^폐기자^비고^확인^caption1^caption2" colsep="^" colwidth="102, 142, 113, 92, 108, 116, 80, 358, 40, 18, 26" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" focuscolor="#b9e5fb" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" navindex="5" style="left:0px; top:75px; width:1194px; height:665px; text-align:center; ">
  285. <col ref="keepdd" type="output" format="yyyy-mm-dd"/>
  286. <col disabled="true" ref="scs" type="combo">
  287. <choices>
  288. <itemset nodeset="/root/init/cmbinfo/stemcellsource/A0159">
  289. <label ref="cdnm"/>
  290. <value ref="cdid"/>
  291. </itemset>
  292. </choices>
  293. </col>
  294. <col ref="pid" type="output"/>
  295. <col ref="hngnm"/>
  296. <col ref="abndd" type="inputdate" format="yyyy-mm-dd"/>
  297. <col ref="abnresn" type="combo" style="text-align:left; ">
  298. <choices>
  299. <itemset nodeset="/root/init/cmbinfo/abnresn/A0155">
  300. <label ref="cdnm"/>
  301. <value ref="cdid"/>
  302. </itemset>
  303. </choices>
  304. </col>
  305. <col ref="abnnm"/>
  306. <col ref="abnrem" type="input" style="text-align:left; "/>
  307. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  308. <col ref="abnid" visibility="hidden"/>
  309. <col ref="cellbcno" visibility="hidden"/>
  310. <script type="javascript" ev:event="onaftersort">
  311. <![CDATA[
  312. grd_abnlist.gridToInstance();
  313. ]]>
  314. </script>
  315. <script type="javascript" ev:event="xforms-value-changed">
  316. <![CDATA[
  317. if (model.getValue("/root/send/baseinfo/gb") == "1"){
  318. if ( model.getValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/chk") == "Y"){
  319. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abndd", getCurrentDate());
  320. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnnm", getUserName());
  321. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnid", getUserId());
  322. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnresn", "6");
  323. } else {
  324. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abndd", "");
  325. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnnm", "");
  326. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnid", "");
  327. model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnresn", "");
  328. }
  329. }
  330. model.refresh();
  331. ]]>
  332. </script>
  333. </datagrid>
  334. </group>
  335. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  336. <button id="btn_can" class="btn4_letter4" style="left:1108px; top:5px; width:80px; height:22px; ">
  337. <caption>폐기취소</caption>
  338. <script type="javascript" ev:event="onclick">
  339. <![CDATA[
  340. k = 0;
  341. for (var i = 1; i < grd_abnlist.rows; i++){
  342. if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/chk") == "Y"){
  343. k = parseInt(k) + 1;
  344. }
  345. }
  346. if (k == 0){
  347. messageBox("폐기취소할 자료를 선택하지 않았습니다.", "E999", "");
  348. return false;
  349. }
  350. fSaveData2();
  351. ]]>
  352. </script>
  353. </button>
  354. <button id="btn_save" class="btn4_letter4" style="left:1024px; top:5px; width:80px; height:22px; ">
  355. <caption>폐기처리</caption>
  356. <script type="javascript" ev:event="onclick">
  357. <![CDATA[
  358. if (fSaveChk() == false){
  359. return;
  360. }
  361. fSaveData();
  362. ]]>
  363. </script>
  364. </button>
  365. </group>
  366. </xhtml:body>
  367. </xhtml:html>