123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>조혈모세포 일괄폐기</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <celltretdetl>
- <celltretdetail>
- <keepdd/>
- <scs/>
- <pid/>
- <hngnm/>
- <abndd/>
- <abnresn/>
- <abnnm/>
- <abnrem/>
- <chk/>
- <abnid/>
- <cellbcno/>
- </celltretdetail>
- </celltretdetl>
- <popupendflag/>
- </main>
- <init>
- <cmbinfo>
- <abnresn>
- <A0155>
- <cdid/>
- <cdnm/>
- </A0155>
- </abnresn>
- <stemcellsource>
- <A0159>
- <cdid/>
- <cdnm/>
- </A0159>
- </stemcellsource>
- </cmbinfo>
- </init>
- <send>
- <baseinfo>
- <sdate/>
- <tdate/>
- <gb/>
- </baseinfo>
- <globalinstance>
- <instance1/>
- </globalinstance>
- <execdata>
- <celltretdetail/>
- </execdata>
- </send>
- <hidden>
- <count/>
- </hidden>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- /* @group : 조혈모세포 일괄폐기
- * @ver : 2008.01.30
- * @by : 남수현
- * @type : function
- * @access : public
- * @desc : 보관중인 세포에 대한 일괄 폐기관리
- * @param :
- */
- function fReadFunc(){
- if (fDataCheck() == false){
- return;
- }
- model.removeNodeset("/root/main/celltretdetl/celltretdetail");
- submit("TRABC00701");
- if (model.getValue("/root/main/celltretdetl/celltretdetail[" + 1 + "]/pid") == ""){
- model.removeNodeset("/root/main/celltretdetl/celltretdetail");
- }
- if (model.getValue("/root/send/baseinfo/gb") == "1"){
- grd_abnlist.colDisabled(grd_abnlist.colRef("abnresn")) = false;
- }else{
- grd_abnlist.colDisabled(grd_abnlist.colRef("abnresn")) = true;
- }
- model.refresh();
- }
- /* @group : 조혈모세포 일괄폐기
- * @ver : 2008.01.30
- * @by : 남수현
- * @type : function
- * @access : public
- * @desc : 데이터 유효성 체크
- * @param :
- */
- function fDataCheck(){
- if (isDate(model.getValue("/root/send/baseinfo/sdate")) == false){
- messageBox("보관 시작일의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/send/baseinfo/sdate") == ""){
- messageBox("보관 시작일은 필수 입력 또는 선택 항목입니다.", "E999", "");
- return false;
- }
- if (isDate(model.getValue("/root/send/baseinfo/tdate")) == false){
- messageBox("보관 종료일의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/send/baseinfo/tdate") == ""){
- messageBox("보관 종료일은 필수 입력 또는 선택 항목입니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/send/baseinfo/sdate") > model.getValue("/root/send/baseinfo/tdate")){
- messageBox("보관 기간일이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- return true;
- }
- /* @group : 조혈모세포 일괄폐기
- * @ver : 2008.01.30
- * @by : 남수현
- * @type : function
- * @access : public
- * @desc : 저장시 데이터 유효성 체크
- * @param :
- */
- function fSaveChk(){
- k = 0;
- for (var i = 1; i < grd_abnlist.rows; i++){
- if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/chk") == "Y"){
- k = parseInt(k) + 1;
- if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/abndd") == ""){
- messageBox("폐기일자는 필수 입력항목입니다.", "E999", "");
- return false;
- }
- if (isDate(model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/abndd")) == false){
- messageBox("폐기일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/abnresn") == ""){
- messageBox("폐기사유는 필수 선택항목입니다.", "E999", "");
- return false;
- }
- }
- }
- if (k == 0){
- messageBox("폐기처리할 자료를 선택하지 않았습니다.", "E999", "");
- return false;
- }
- return true;
- }
- /* @group : 조혈모세포 일괄폐기
- * @ver : 2008.01.28
- * @by : 남수현
- * @type : function
- * @access : public
- * @desc : 일괄폐기내역 저장
- * @param :
- */
- function fSaveData(){
- var update = getGridUpdateData(grd_abnlist);
- model.setValue("/root/send/execdata/celltretdetail",update);
- if (submit("TXABC00701")){
- fReadFunc();
- }
- }
- /* @group : 조혈모세포 일괄폐기
- * @ver : 2008.01.28
- * @by : 남수현
- * @type : function
- * @access : public
- * @desc : 폐기취소내역 저장
- * @param :
- */
- function fSaveData2(){
- var update = getGridUpdateData(grd_abnlist);
- model.setValue("/root/send/execdata/celltretdetail",update);
- if (submit("TXABC00702")){
- fReadFunc();
- }
- }
- function isDate(str) { // 날짜 형식에 대한 적합여부 체크
- if (str == "") return true; // 빈건 체크안함
- if (trim(str) == "") return true; // 빈건 체크안함
- if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
- if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
-
- var yy = new Number(str.substring(0, 4));
- var mm = new Number(str.substring(4, 6)) - 1;
- var dd = new Number(str.substring(6, 8));
- var date = new Date(yy, mm, dd);
- //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
- if (yy != date.getFullYear() ||
- mm != date.getMonth() ||
- dd != date.getDate()) {
- return false; // 존재하지 않는 날짜
- }
-
- return true; // 존재하는 날짜
- }
- function trim(data){ // 문자에 대한 TRIM 작업
- return data.replace(/(^\s*)|(\s*$)/g, "");
- }
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
- <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <submission id="TRZBC00101"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- zbcfGetCodeList( new Array("A0155", "A0159"),
- new Array("/root/init/cmbinfo/abnresn", "/root/init/cmbinfo/stemcellsource"));
- model.removeNodeset("/root/main/celltretdetl/celltretdetail");
- model.setValue("/root/send/baseinfo/sdate", getCurrentDate());
- model.setValue("/root/send/baseinfo/tdate", ipt_sdate.value);
- ipt_sdate.value = ipt_sdate.value.toDate().getAddDate(-365 * 4,"D").getDateFormat("YYYYMMDD") ;
- btn_save.disabled = false;
- btn_can.disabled = true;
- model.setValue("/root/send/baseinfo/gb", "1");
- model.refresh();
- ]]>
- </script>
- <submission id="TRABC00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/baseinfo" replace="instance" resultref="/root/main/celltretdetl"/>
- <submission id="TXABC00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/execdata/celltretdetail" resultref="/root/hidden"/>
- <submission id="TXABC00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/execdata/celltretdetail" resultref="/root/hidden"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">조혈모세포일괄폐기</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:200px; height:13px; ">조혈모세포 일괄폐기 대상</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
- <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
- <button id="btn_sea" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fReadFunc();
- ]]>
- </script>
- </button>
- <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; ">
- <choices>
- <item>
- <label>폐기대상만</label>
- <value>1</value>
- </item>
- <item>
- <label>폐기된것만</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (model.getValue("/root/send/baseinfo/gb") == "1"){
- btn_save.disabled = false;
- btn_can.disabled = true;
- ipt_edate.disabled = true;
- ipt_sdate.value = ipt_edate.value.toDate().getAddDate(-365 * 4,"D").getDateFormat("YYYYMMDD") ;
- cpt_days.attribute("text") = "보관일자";
-
- }else{
- btn_save.disabled = true;
- btn_can.disabled = false;
- ipt_edate.disabled = false;
- ipt_sdate.value = ipt_edate.value.toDate().getAddDate(-7,"D").getDateFormat("YYYYMMDD") ;
- cpt_days.attribute("text") = "폐기일자";
- }
- fReadFunc();
- ]]>
- </script>
- </select1>
- <caption id="caption5" class="search_no_b" style="left:207px; top:10px; width:12px; height:17px; ">~</caption>
- <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; "/>
- <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; "/>
- <caption id="cpt_days" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">보관일자 :</caption>
- </group>
- <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; ">
- <col ref="keepdd" type="output" format="yyyy-mm-dd"/>
- <col disabled="true" ref="scs" type="combo">
- <choices>
- <itemset nodeset="/root/init/cmbinfo/stemcellsource/A0159">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="pid" type="output"/>
- <col ref="hngnm"/>
- <col ref="abndd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="abnresn" type="combo" style="text-align:left; ">
- <choices>
- <itemset nodeset="/root/init/cmbinfo/abnresn/A0155">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="abnnm"/>
- <col ref="abnrem" type="input" style="text-align:left; "/>
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="abnid" visibility="hidden"/>
- <col ref="cellbcno" visibility="hidden"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_abnlist.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (model.getValue("/root/send/baseinfo/gb") == "1"){
- if ( model.getValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/chk") == "Y"){
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abndd", getCurrentDate());
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnnm", getUserName());
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnid", getUserId());
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnresn", "6");
- } else {
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abndd", "");
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnnm", "");
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnid", "");
- model.setValue("/root/main/celltretdetl/celltretdetail[" + grd_abnlist.row + "]/abnresn", "");
- }
- }
- model.refresh();
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_can" class="btn4_letter4" style="left:1108px; top:5px; width:80px; height:22px; ">
- <caption>폐기취소</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- k = 0;
- for (var i = 1; i < grd_abnlist.rows; i++){
- if (model.getValue("/root/main/celltretdetl/celltretdetail[" + i + "]/chk") == "Y"){
- k = parseInt(k) + 1;
- }
- }
- if (k == 0){
- messageBox("폐기취소할 자료를 선택하지 않았습니다.", "E999", "");
- return false;
- }
- fSaveData2();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter4" style="left:1024px; top:5px; width:80px; height:22px; ">
- <caption>폐기처리</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if (fSaveChk() == false){
- return;
- }
- fSaveData();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|