123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLAW00300_물품사용.xfm
- * 설 명 : 물품불출관리
- * 설 계 자 : 설계자가 별도로 존재시 작성
- * 작 성 자 : 서승현
- * 작 성 일 : 2007.10.13
- * 수정이력 : 최종작성일 기준으로 변경사항 이력관리 2009
- * 기 타 : 주석문에 반영되어야 할 사항 표기
- -->
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <goodcd>
- <goodcdlist>
- <choi/>
- <goodcd/>
- <goodnm/>
- <goodengnm/>
- </goodcdlist>
- </goodcd>
- <usegood>
- <usegoodlist>
- <choi/>
- <goodcd/>
- <goodnm/>
- <lotno/>
- <spec/>
- <unit/>
- <useqty/>
- <bfuseqty/>
- <unitcost/>
- <valiterm/>
- <instcd/>
- <posdeptcd/>
- <dutdeptcd/>
- <usedg/>
- <usedd/>
- <prodcustnm/>
- <suppcustnm/>
- <allsizespecid/>
- <adjtflagcd/>
- <adjtflagnm/>
- <outdeptcd/>
- <outdeptnm/>
- <stocqty/>
- <setunit/>
- <model/>
- </usegoodlist>
- </usegood>
- </main>
- <send/>
- <init>
- <seaval/>
- <seamthdcd>0</seamthdcd>
- <useflagcd/>
- <dutdept>
- <appdeptcd>
- <cd/>
- <nm/>
- </appdeptcd>
- </dutdept>
- <seamthdcd/>
- <popupmenu>
- <item>
- <name>행추가</name>
- <func>fExeInsertRow</func>
- </item>
- <item>
- <name>행삭제</name>
- <func>fExeDeleteRow</func>
- </item>
- </popupmenu>
- <fromdd/>
- <todd/>
- <appdeptcd>-</appdeptcd>
- <seaflagcd>2</seaflagcd>
- <adjtflagcd>0</adjtflagcd>
- </init>
- <hidden>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fExeInitialize();
- ]]>
- </script>
- <submission id="TRLAF00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/deptinfo"/>
- <submission id="TRLAA00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/dutdept/appdeptcd"/>
- <submission id="TRLAW00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/usegood/usegoodlist"/>
- <submission id="TRLAW00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" add="bottom" resultref="/root/main/usegood/usegoodlist"/>
- <submission id="TXLAW00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/message"/>
- <submission id="TXLAW00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/message"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LZZ001.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LAZ001.js"/>
- <script type="javascript">
- <![CDATA[
- /* @group : 초기화
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화 Function
- */
- function fExeInitialize() {
-
- //현재날짜
- var toDay = getCurrentDate();
-
- //--------------------------------
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/goodcd/goodcdlist"); // 물품코드목록 초기화
- model.removeNodeset("/root/main/useappgood/useappgoodlist"); // 사용등록 물품목록 초기화
- model.removeNodeset("/root/main/usegood/usegoodlist"); // 사용물품 목록 초기화
-
- //-----------------------------------------
- //model.setValue("/root/init/seaval", ""); // 검색값 초기화
- //model.setValue("/root/init/seamthdcd", "0"); // 검색방법 초기화(0:바코드, 1:물품코드, 2:물품명)
- //model.setValue("/root/init/seaflagcd", "2"); // 검색구분 초기화(1:불출, 2:재고)
- model.setValue("/root/init/fromdd", toDay);
- model.setValue("/root/init/todd", toDay);
- //model.setValue("/root/init/appdeptcd", "-");
- //model.setValue("/root/init/adjtflagcd", "0"); // 재고보정코드(0:정상, 1:보정)
-
- //--------------------------------------------------------------------
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
- model.makeValue("/root/send/userid", getUserInfo("userid"));
- submit("TRLAF00402", false); // 사용자가 속한 과코드 조회
-
- model.makeValue("/root/send/posdeptcd", model.getValue("/root/init/deptinfo/cd"));
- submit("TRLAA00103"); // 부서코드 목록
-
- //--------------------------------------
- // 헤더 부분의 전체선택 체크박스가 보임.
- grd_uselist.fixedcellcheckbox(0, 1) = true;
- grd_uselist.colStyle(8, "data", "background-color") = "yellow";
- cmb_seadept.select(0);
-
- fExeSeaFlagChange(); //검색구분에 따른 hidden, disabled Control...
- ipt_fromdd.disabled = true;
- ipt_todd.disabled = true;
- }
-
-
- /* @group : 그리드 행 추가
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 행 추가 Function
- */
- function fExeInsertRow() {
-
- if(getNodesetCount("/root/main/usegood/usegoodlist") > 0) {
- grd_uselist.insertRow(grd_uselist.row, true);
- model.copyNode("/root/main/usegood/usegoodlist["+ grd_uselist.row+"]" , "/root/main/usegood/usegoodlist["+ (grd_uselist.row-1)+"]");
- model.setValue("/root/main/usegood/usegoodlist["+ grd_uselist.row+"]/useqty", "0");
- model.makeValue("/root/main/usegood/usegoodlist["+ grd_uselist.row+"]/usedg", "0");
- grd_uselist.refresh();
- }
- }
-
-
- /* @group : 그리드 행 삭제
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 행 삭제 Function
- */
- function fExeDeleteRow() {
- grd_uselist.deleteRow(grd_uselist.row, true);
- }
-
-
- /* @group : 파일입고
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 피일입고 Function
- */
- function fFileUse(){
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls|CSV Files(*.csv)|*.csv");
-
-
- if (fileName == "" || fileName == null) {
- messageBox("사용할 파일을 선택하세요", "E", "");
- return;
- }
-
- var sStr = fileName.substring(fileName.length - 3);
-
- if(sStr.toLowerCase() == "csv"){
- grd_uselist.loadText(fileName);
- }
- else if(sStr.toLowerCase() == "xls"){
- grd_uselist.loadExcel(fileName);
- }
- else{
- messageBox("Excel파일을 선택하세요", "E", "");
- return;
- }
- }
-
- /* @group : 엑셀저장
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 엑셀저장 Function
- */
- function fExeExcel() {
- var fileName = window.fileDialog("save", ",", false, "물품사용목록", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
-
- if (fileName != ""){
- grd_uselist.saveExcel(fileName);
- }
-
- }
-
- /* @group :사용물품 목록
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용된 물품 목록 조회 Function
- */
- function fGetUseGoodList() {
-
- //-----------------------------------------------------------------------------------------
- if (model.getValue("/root/init/fromdd") == "" || model.getValue("/root/init/todd") == "") {
- messageBox("조회기간이 입력되지 않았습니다.","I007");
- return false;
- }
-
- //--------------------------------
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/usegood/usegoodlist");
-
- //--------------------------------------------------------------------
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd")); // 기관코드
- model.makeValue("/root/send/posdeptcd", model.getValue("/root/init/deptinfo/cd")); // 로그인 사용자의 부서코드
- model.makeValue("/root/send/dutdeptcd", model.getValue("/root/init/appdeptcd")); // 부서코드
- model.makeValue("/root/send/subdutdeptcd", model.getValue("/root/init/subappdeptcd")); // 재고부서코드
- model.makeValue("/root/send/seaval", model.getValue("/root/init/seaval")); // 검색값
- model.makeValue("/root/send/seamthdcd", model.getValue("/root/init/seamthdcd")); // 검색방법
- model.makeValue("/root/send/fromdd", model.getValue("/root/init/fromdd")); // 사용일자(From)
- model.makeValue("/root/send/todd", model.getValue("/root/init/todd")); // 사용일자(To)
- model.makeValue("/root/send/seaflagcd", model.getValue("/root/init/seaflagcd")); // 검색구분(0:입고, 1:사용량, 2:부서물품(재고))
-
- if(model.getValue("/root/hidden/goodflag") != ""){
- model.makeValue("/root/send/goodflag", model.getValue("/root/hidden/goodflag"));
- }
-
- //-------------------
- submit("TRLAW00301");
- }
-
- /* @group : 사용등록 물품 목록
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 사용등록 물품 목록 조회 Function
- */
- function fUseAppGoodSearch(pFlagCd) {
-
- //----------------------------------------------------------------------------------------
- if(model.getValue("/root/init/fromdd") == "" || model.getValue("/root/init/todd") == "") {
- messageBox("조회기간이 입력되지 않았습니다.","I");
- return false;
- }
-
- //--------------------------------
- model.removeNodeset("/root/send");
-
- //-------------------------------------------------------------------------
- // 바코드검색의 경우 그리드에 연속적으로 추가되어야 하기에 삭제하지 않는다.
- if (pFlagCd == "") model.removeNodeset("/root/main/usegood/usegoodlist");
-
- //--------------------------------------------------------------------
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd")); // 기관코드
- model.makeValue("/root/send/posdeptcd", model.getValue("/root/init/deptinfo/cd")); // 로그인 사용자의 부서코드
- model.makeValue("/root/send/dutdeptcd", model.getValue("/root/init/appdeptcd"));
- model.makeValue("/root/send/seaval", model.getValue("/root/init/seaval"));
- model.makeValue("/root/send/seamthdcd", model.getValue("/root/init/seamthdcd"));
- model.makeValue("/root/send/fromdd", model.getValue("/root/init/fromdd"));
- model.makeValue("/root/send/todd", model.getValue("/root/init/todd"));
- model.makeValue("/root/send/goodflag", "");
-
- submit("TRLAW00302");
- }
-
- /* @group : 물품사용
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 물품코드 목록 선택 체크시 사용물품 목록으로 값 추가 Function
- */
- function fExeChoiTrue(str) {
-
- var sSrcNode = "/root/main/useappgood/useappgoodlist";
- var sDescNode = "/root/main/usegood/usegoodlist";
- var sGoodNode = "/root/main/goodcd/goodcdlist";
-
-
- if (str == "good") { //물품목록
-
- if (model.getValue(sGoodNode+"["+ grd_goodlist.row +"]/choi") == "true") {
-
- var goodcd = model.getValue(sGoodNode+"["+ grd_goodlist.row+"]/goodcd");
- if(model.getValue("/root/init/appdeptcd") == "-"){
- alert("실사용부서를 선택 하세요");
- return;
- }
- //-------------------
- grd_uselist.addRow();
-
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/choi", "true");
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/goodcd", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/goodcd"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/allsizespecid", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/allsizespecid"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/goodnm", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/goodnm"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/lotno", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/lotno"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/spec", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/goodspec"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/unit", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/deliveunit"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/unitcost", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/goodunitcost"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/stocqty", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/stocqty"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/useqty", "1");
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/bfuseqty", "0");
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/instcd", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/instcd"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/posdeptcd", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/posdeptcd"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/dutdeptcd", model.getValue("/root/init/appdeptcd"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/valiterm", "99991231");
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/usedd", "-");
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/usedg", "0");
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/prodcustnm", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/prodcustnm"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/suppcustnm", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/suppcustnm"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/outdeptcd", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/dutdeptcd"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/outdeptnm", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/dutdeptnm"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/setunit", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/setunit"));
- model.makeValue(sDescNode+"["+ grd_uselist.row+"]/model", model.getValue(sGoodNode+"["+grd_goodlist.row+"]/model"));
-
- //-------------------------------------------------------------
- grd_uselist.colStyle(grd_uselist.colRef("stocqty"), "data", "background-color") = "yellow";
- }
- }
-
- //--------------------
- grd_uselist.refresh();
- }
-
- /* @group : 물품사용
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 물품사용 처리 Function
- */
- function fExeGoodUse() {
-
- var toDay = getCurrentDate();
- var valiterm = "";
- var iFindNo = 0;
- var sDescNode = "/root/main/usegood/usegoodlist";
-
- //-----------------------------------------------------
- iFindNo = grd_uselist.findRow("true", 1, 1, true, true);
- if (Number(iFindNo) <= 0) {
- messageBox("사용할 물품을 선택하여 주십시오!", "I007");
- return false;
- }
- //------------------------
- grd_uselist.clearStatus();
- for (var iNo=1; iNo <= getNodesetCount(sDescNode); iNo++) {
-
- //---------------------------------------------------------
- if (model.getValue(sDescNode+"["+iNo+"]/choi") == "true") {
-
- //------------------------------------------------------
- if (model.getValue(sDescNode+"["+iNo+"]/lotno") == "") {
- messageBox(iNo+" 행에 Lot번호가 입력되지 않았습니다.","I007");
- return false;
- }
-
- //------------------------------------------------------
- if (model.getValue(sDescNode+"["+iNo+"]/useqty") == "" || Number(model.getValue(sDescNode+"["+iNo+"]/useqty")) == 0) {
- messageBox(iNo+" 행에 사용수량이 입력되지 않았습니다.","I007");
- return false;
- }
-
- //--------------------------------------------------------
- valiterm = model.getValue(sDescNode+"["+iNo+"]/valiterm");
- if( Number(valiterm - toDay) < 0 && model.getValue(sDescNode+"["+iNo+"]/valiterm") != "") {
- messageBox(iNo+" 행에 유효기간이 지났습니다.","I007");
- return false;
- }
- //------------------
- // 재고보정구분 설정
- model.makeValue(sDescNode+"["+iNo+"]/adjtflagcd", model.getValue("/root/init/adjtflagcd"));
- //------------------------------------------------------
- if (model.getValue(sDescNode+"["+iNo+"]/usedg") == "" || model.getValue(sDescNode+"["+iNo+"]/usedg") == "0") {
- grd_uselist.addStatus(iNo, "insert");
- } else {
- grd_uselist.addStatus(iNo, "update");
- }
- }
- }
-
- //--------------------------------
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/usegoodlist", grd_uselist.getUpdateData());
- //-----------
- setAlertOn();
- if (submit("TXLAW00301")) {
- //model.removeNodeset("/root/main/usegood/usegoodlist"); // 사용물품 목록 초기화
- model.removeNodeset(sDescNode+"[choi='true']");
- fGetGoodCodeSubList();
- grd_uselist.clearStatus();
-
- fExeChoiInit();
- model.refresh();
- }
- }
-
- /* @group : 사용취소
- * @ver : 2007.10.13 (CMCDEV-0001)
- * @by : 서승현
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc :사용취소 Function
- */
- function fExeCancelUse() {
-
- var iCnt = 0;
- var iFindNo = 0;
- var sNode = "/root/main/usegood/usegoodlist";
-
- //------------------------------------------------------
- iFindNo = grd_uselist.findRow("true", 1, 1, true, true);
- if (Number(iFindNo) <= 0) {
- messageBox("취소할 물품을 선택하여 주십시오!", "I007");
- return false;
- }
-
- //------------------------
- grd_uselist.clearStatus();
- for (var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
-
- //-----------------------------------------------------
- if (model.getValue(sNode+"["+iNo+"]/choi") == "true") {
-
- if (model.getValue(sNode+"["+iNo+"]/usedg") == "0" || model.getValue(sNode+"["+iNo+"]/usedg") == "") {
- messageBox("사용 된 내역만 취소 할 수 있습니다.", "I007");
- return false;
- }
-
- //-----------------------------------
- grd_uselist.addStatus(iNo, "delete");
- }
- }
-
- //--------------------------------
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/usecancel", grd_uselist.getUpdateData());
-
- //-----------------------------------
- if(messageBox("취소", "Q004") == 6) {
-
- //-----------
- setAlertOn();
- if (submit("TXLAW00302")) {
- model.removeNodeset(sNode+"[choi='true']"); // 사용물품 목록 초기화
- fGetGoodCodeSubList();
- grd_uselist.clearStatus();
-
- fExeChoiInit();
- }
- }
-
- //-------------
- model.refresh();
- }
-
- //----------------------------
- // 검색부서 선택시 그리드 리셋
- function fGridReSet(){
-
- //fGetGoodCodeSubList();
- model.removeNodeset("/root/main/useappgood/useappgoodlist"); // 사용등록 물품목록 초기화
- model.removeNodeset("/root/main/usegood/usegoodlist"); // 사용등록 목록 초기화
- model.refresh();
-
-
- }
-
- //---------------------
- // 물품 사용내역을 검색
- function fGetWInGoodList(pFlagCd) {
-
- var sNode = "/root/main/usegood/usegoodlist";
-
- //-------------------------
- fUseAppGoodSearch(pFlagCd);
-
- //------------------------------------------------------
- for (var iNo=1 ; iNo <= getNodesetCount(sNode); iNo++) {
- if ((model.getValue(sNode+"["+ iNo +"]/valiterm")-getCurrentDate()) <= 7 ) {
- grd_uselist.rowstyle(i,"data","color")="red";
- }
- }
- }
-
- //------------------------
- // 사용등록 물품 선택 해제
- function fExeChoiInit() {
-
- //-------------------------
- // 물품재고현황 목록 초기화
- for (var iNo=1; iNo <= getNodesetCount("/root/main/goodcd/goodcdlist"); iNo++) {
- model.setValue("/root/main/goodcd/goodcdlist["+iNo+"]/choi", "false");
- }
-
- //---------------------
- grd_goodlist.refresh();
- }
-
- //-------------------------------------
- // 검색구분에 따라 물품목록을 조회한다.
- function fExeGoodSea(pAddFlagCd) {
-
- //--------------------------------------------------
- if (model.getValue("/root/init/seaflagcd") == "0") {
-
- //-------------------------------------
- // 검색값 입력 시 는 그리드에 계속 추가
- TRLAW00302.attribute("add") = pAddFlagCd;
-
- //--------------------------
- fGetWInGoodList(pAddFlagCd); // 입고량 조회
- grd_uselist.colDisabled(grd_uselist.colRef("useqty")) = false;
-
- } else {
- fGetUseGoodList(); // 사용량, 부서물품 조회
-
- if (model.getValue("/root/init/seaflagcd") == "1") {
- grd_uselist.colDisabled(grd_uselist.colRef("useqty")) = true;
- } else {
- grd_uselist.colDisabled(grd_uselist.colRef("useqty")) = false;
- }
- }
-
- //-------------------------------------------------------------
- grd_uselist.colStyle(grd_uselist.colRef("stocqty"), "data", "background-color") = "yellow";
- }
-
- //----------------------------
- // 검색값 입력 후 Enter키 입력
- function fExeSeaValOnKeyPress() {
-
- if (event.keyCode == "13") {
- model.setValue("/root/init/seaval", ipt_seaval.currentText);
- ipt_seaval.refresh();
-
- //--------------------
- fExeGoodSea("bottom");
- }
- }
-
- //----------------------------
- // 검색구분이 변경될 경우 처리
- function fExeSeaFlagChange() {
-
- if (model.getValue("/root/init/seaflagcd") == "0") { // 0이 없는데 뭘까요?
- btn_save.disabled = false;
- btn_can.disabled = true;
- ipt_fromdd.disabled = false;
- ipt_todd.disabled = false;
- grd_uselist.colHidden(grd_uselist.colRef("usedd")) = true;
- grd_uselist.colHidden(grd_uselist.colRef("dutdeptnm")) = true;
-
- } else if (model.getValue("/root/init/seaflagcd") == "1") { //불출
- btn_save.disabled = true;
- btn_can.disabled = false;
- ipt_fromdd.disabled = false;
- ipt_todd.disabled = false;
- grd_uselist.colHidden(grd_uselist.colRef("usedd")) = false;
- grd_uselist.colHidden(grd_uselist.colRef("dutdeptnm")) = false;
-
- } else { //재고??
- btn_save.disabled = false;
- btn_can.disabled = true;
- ipt_fromdd.disabled = false;
- ipt_todd.disabled = false;
- grd_uselist.colHidden(grd_uselist.colRef("usedd")) = true;
- grd_uselist.colHidden(grd_uselist.colRef("dutdeptnm")) = true;
- }
-
- //----------------------------------------------------
- model.removeNodeset("/root/main/usegood/usegoodlist");
- grd_uselist.rebuildStyle();
- grd_uselist.rebuild();
- grd_uselist.refresh();
- }
-
- //-----------------------
- // 사용목록을 선택시 처리
- function fExeUseGridSelect(pRowNo) {
-
- var iSNo = Number(pRowNo);
- var iENo = Number(pRowNo);
- var sNode = "/root/main/usegood/usegoodlist";
-
- //--------------------------------------------------
- if (model.getValue("/root/init/seaflagcd") == "1") {
-
- if (Number(pRowNo) > 0) {
-
- //--------------------------------------------------
- // 선입선출법에 의해 마지막 Row만 취소 가능토록 처리
- if (getNodesetCount(sNode) > Number(pRowNo)) {
-
- /*
- if (model.getValue(sNode+"["+(Number(pRowNo)+1)+"]/choi") == "false") {
- model.setValue(sNode+"["+pRowNo+"]/choi", "false");
- messageBox("최종 사용내역부터 취소가 가능합니다!", "I007");
- return false;
- }
- */
- }
- }
- }
- }
-
- //---------------------------------------
- // 사용수량 변경시 선택여부 자동체크 기능
- function fExeQtyChange(pGridObj) {
-
- //------------------------------
- if (Number(pGridObj.col) != pGridObj.colRef("useqty")) {
- return false;
- }
-
- var sNode = "/root/main/usegood/usegoodlist";
- //var iUseQty = Number(model.getValue(sNode+"["+Number(pGridObj.row)+"]/useqty"));
-
- //---------------------------------------------------------------
- model.makeValue(sNode+"["+Number(pGridObj.row)+"]/choi", "true");
- //pGridObj.refresh();
- //---------------------------------------------------
- //if (getNodesetCount(sNode) > Number(pGridObj.row)) { //엔터 누르면 onkeypress 이벤트에서 한칸 내려가므로 주석처리함
- /*if ( (Number(pGridObj.rows) - 1) > Number(pGridObj.row)) {
- pGridObj.row = Number(pGridObj.row) + 1;
- //pGridObj.col = 9;
- //pGridObj.selected = true;
- }*/
- }
-
- //---------------------------------------
- // 사용수량 변경시 선택여부 자동체크 기능
- function fExeNextColMove(pGridObj) {
-
- var sNode = "/root/main/usegood/usegoodlist";
-
- //------------------------------
- if (Number(pGridObj.col) != pGridObj.colRef("useqty")) {
- return false;
- }
-
- if (event.keyCode == 13) {
-
- if (getNodesetCount(sNode) == pGridObj.row) {
- // Continue
- } else {
- pGridObj.row = Number(pGridObj.row) + 1;
- pGridObj.col = pGridObj.colRef("useqty");
- pGridObj.selected = true;
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">물품불출관리</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:35px; width:1195px; height:744px; ">
- <group id="group2" style="left:0px; top:10px; width:1194; height:35; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194; height:35; "/>
- <caption id="caption1" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">검색값 :</caption>
- <caption id="caption7" class="search_name" style="left:350px; top:9px; width:86px; height:17px; ">검색구분 :</caption>
- <line id="line1" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29; "/>
- <input id="ipt_seaval" ref="/root/init/seaval" class="input_search" navindex="2" style="left:188px; top:8px; width:142px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fExeSeaValOnKeyPress();
- ]]>
- </script>
- </input>
- <caption id="caption3" class="search_name" style="left:527px; top:10px; width:105px; height:17px; ">조회기간 :</caption>
- <caption id="caption4" class="search_no_b" style="left:723px; top:9px; width:12px; height:17px; ">~</caption>
- <input id="ipt_todd" ref="/root/init/todd" class="input_s_essential" navindex="5" inputtype="date" required="true" style="left:738px; top:8px; width:100px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
- <input id="ipt_fromdd" ref="/root/init/fromdd" class="input_s_essential" navindex="4" inputtype="date" required="true" style="left:620px; top:8px; width:100px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
- <caption id="caption26" class="search_name" style="left:859px; top:9px; width:99px; height:17px; ">실사용부서 :</caption>
- <select1 id="cmb_seadept" ref="/root/init/appdeptcd" navindex="6" appearance="minimal" style="left:963px; top:8px; width:128px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/dutdept/appdeptcd">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fGridReSet();
- ]]>
- </script>
- </select1>
- <button id="btn_sea" class="btn1_letter2" navindex="7" style="left:1125; top:7; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeGoodSea("");
- ]]>
- </script>
- </button>
- <select1 id="cmb_seamthdcd" ref="/root/init/seamthdcd" class="combo_search" navindex="1" appearance="minimal" style="left:95px; top:8px; width:90px; height:19px; ">
- <choices>
- <item>
- <label>바코드번호</label>
- <value>0</value>
- </item>
- <item>
- <label>물품코드</label>
- <value>1</value>
- </item>
- <item>
- <label>물품명</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <select1 id="cbo_seaflagcd" ref="/root/init/seaflagcd" navindex="3" appearance="minimal" style="left:440px; top:8px; width:70px; height:19px; ">
- <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[
- fExeSeaFlagChange();
- ]]>
- </script>
- </select1>
- </group>
- <line id="line2" class="line_1" style="x1:304px; y1:70px; x2:1193px; y2:70px; "/>
- <caption id="caption5" class="tit_2" style="left:310px; top:55px; width:144px; height:14px; ">사용물품목록</caption>
- <button id="btn_del" class="btn2_letter3" navindex="10" visibility="hidden" style="left:1072px; top:50px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeDeleteRow();
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter3" navindex="9" visibility="hidden" style="left:1016px; top:50px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeInsertRow();
- ]]>
- </script>
- </button>
- <button id="btn_excsave" class="btn2_letter4" navindex="11" style="left:1128px; top:50px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeExcel();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter4" navindex="8" visibility="hidden" style="left:949px; top:50px; width:64px; height:19px; ">
- <caption>파일등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fFileUse();
- ]]>
- </script>
- </button>
- <datagrid id="grd_uselist" nodeset="/root/main/usegood/usegoodlist" class="datagrid2" caption="선
택^불출일시^보정
여부^물품코드^물품명^Lot번호^규격^기준
단위^재고
수량^불출
수량^단가^instcd^posdeptcd^deptcd^usedg^usedd^bfuseqty^유효기간^포장구성단위^제조사^모델^납품처^ALL SIZE^adjtflagcd^outdeptcd^재고부서^불출부서" colsep="^" colwidth="40, 80, 40, 70, 160, 110, 60, 50, 50, 50, 0, 0, 0, 0, 0, 0, 0, 90, 80, 80, 80, 80, 0, 0, 0, 80, 80" dataheight="23" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:304px; top:75px; width:889px; height:668px; ">
- <col ref="choi" type="checkbox"/>
- <col ref="usedd" format="yyyy-mm-dd"/>
- <col ref="adjtflagnm"/>
- <col ref="goodcd" style="text-align:center; "/>
- <col ref="goodnm" style="text-align:left; "/>
- <col ref="lotno" type="input" style="text-align:center; "/>
- <col ref="spec" style="text-align:center; "/>
- <col ref="unit" style="text-align:center; "/>
- <col class="text_right" ref="stocqty" format="(-)#,###" mask="exclude" showmask="true"/>
- <col autonext="true" ref="useqty" type="input" format="(-)#,###" maxlength="6" style="text-align:right; "/>
- <col ref="unitcost" secretendposition="20" secretmark="*" secretstartposition="0" format="#,###" style="text-align:right; "/>
- <col ref="instcd"/>
- <col ref="posdeptcd"/>
- <col ref="dutdeptcd"/>
- <col ref="usedg"/>
- <col ref="usedd"/>
- <col ref="bfuseqty"/>
- <col ref="valiterm" type="inputdate" format="yyyy-mm-dd" mask="exclude" showmask="true" style="text-align:center; "/>
- <col class="text_center" ref="setunit"/>
- <col ref="prodcustnm"/>
- <col ref="model"/>
- <col ref="suppcustnm"/>
- <col ref="allsizespecid"/>
- <col ref="adjtflagcd"/>
- <col ref="outdeptcd"/>
- <col ref="outdeptnm"/>
- <col ref="dutdeptnm"/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- //fExeUseGridSelect(grd_uselist.row);
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fExeQtyChange(grd_uselist);
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
-
- fExeNextColMove(grd_uselist);
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_uselist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <import id="import1" src="../../../lis/gooddelivemngtweb/xrw/SSLAW00100_물품목록.xrw" style="left:0px; top:55px; width:300px; height:688px; "/>
- <caption id="caption2" style="left:842px; top:51px; width:100px; height:20px; ">재고보정</caption>
- <bool id="bool_adjtflagcd" checkvalue="1,0" ref="/root/init/adjtflagcd" style="left:819px; top:50px; width:25px; height:20px; font-weight:bold; "/>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" navindex="12" style="left:1079; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeGoodUse();
- ]]>
- </script>
- </button>
- <button id="btn_can" class="btn4_letter2" disabled="true" navindex="13" style="left:1138px; top:3px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeCancelUse();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|