123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- /* ---------------------------------------------------------------------
- 일단위 물품 미불출 조회(SMMNP02100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By 김진명
- : 2009.12.18
- ---------------------------------------------------------------------- */
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 초기화 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fInit() {
- //model.removeNodeset("/root/main/stoclist");
- //submit("TRMNP04604");
- //var level = model.getValue("/root/temp/logginlevel/usrlevel");
- var curday = new Date();
- var dayflag = curday.getDay();
- var curdate = curday.getDateFormat();
- model.setValue("/root/main/cond/opfromdd", getDateAddc(curdate, -7));
- model.setValue("/root/main/cond/optodd", getDateAddc(curdate, -1));
- grd_undelivelist.explorerbar = "sort";
- grd_undelivelist.fixedcellcheckbox(0,1) = true;
- submit("TRMNP05001", false);
- addComboItem("cmb_oproomcd", "전체", "", "above" );
- submit("TRMNP03004") // 수술실(Rosette) 가져오기
- addComboItem("cmb_rosette","전체","","above");
- model.removenode("/root/send");
- model.makeValue("/root/send/cdgrupid", "038");
- submit("TRMNP00323", false);
- var deptflag = model.getValue("/root/viewctrl/viewctrllist/viewctrlinfo/cdnm");
- model.setValue("/root/main/cond/refdeptflag", deptflag);
- fSearch();
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 방재고실사입력 조회 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fSearch() {
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP02101");
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 물품 조회 팝업 후 처리 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fSetGoodCd(paramData) {
- var variable = "'";
- var goodcd = "";
- var goodnm = "";
- var oldgoodcd, oldgoodnm, oldvariable;
- oldgoodcd = model.getValue("/root/main/cond/goodcd");
- oldgoodnm = model.getValue("/root/main/cond/goodnm");
- oldvariable = model.getValue("/root/main/cond/variable");
- var getData = paramData;
- if( getData != "") {
- if( model.getValue("/root/temp/chkcncl") != "C" ) {
- var getDataTemp1 = getData.split("▩");
- for( var i = 0; i < getDataTemp1.length-1; i++) {
- var getDataTemp2 = getDataTemp1[i].split("|");
- variable = variable + getDataTemp2[0] + getDataTemp2[2] + "'";
- goodcd = goodcd + getDataTemp2[0];
- goodnm = goodnm + getDataTemp2[1];
- if(( i+1) != (getDataTemp1.length-1) ) {
- variable = variable + ", '";
- goodcd = goodcd + ", ";
- goodnm = goodnm + ", ";
- }
- }
- if( oldgoodcd != "" ) {
- goodcd = oldgoodcd + ", " + goodcd
- }
- if( oldgoodnm != "" ) {
- goodnm = oldgoodnm + ", " + goodnm
- }
- if( oldvariable != "" ) {
- variable = oldvariable + ", " + variable
- }
- model.setValue("/root/main/cond/goodcd", goodcd);
- model.setValue("/root/main/cond/goodnm", goodnm);
- model.setValue("/root/main/cond/variable", variable);
- model.refresh();
- fSearch();
- }
- }
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 일단위 물품 불출 확정 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fCnfmSave() {
- var iRows = -1;
- var chkflag, oproomcd, goodcd, allsizespecid, sumfromdd, sumtodd, deliveqty, cmt, refdeptflag, opcnfmdd, bfdeliveqty;
- var cnt = 0;
- iRows = grd_undelivelist.rows;
- var prcplist = "m▦goodcd▦allsizespecid▦deptflag▦oproomcd▦sumfromdd▦sumtodd▦deliveqty▦cmt▦delivedd▦seqno";
- for( var i = 1; i <= iRows; i++ ) {
- chkflag = model.getValue("/root/main/undelivelist[" + i + "]/chkflag");
- oproomcd = model.getValue("/root/main/undelivelist[" + i + "]/oproomcd");
- goodcd = model.getValue("/root/main/undelivelist[" + i + "]/goodcd");
- allsizespecid = model.getValue("/root/main/undelivelist[" + i + "]/allsizespecid");
- deliveqty = model.getValue("/root/main/undelivelist[" + i + "]/deliveqty");
- bfdeliveqty = model.getValue("/root/main/undelivelist[" + i + "]/bfdeliveqty");
- cmt = model.getValue("/root/main/undelivelist[" + i + "]/cmt");
- refdeptflag = model.getValue("/root/main/cond/refdeptflag");
- opcnfmdd = model.getValue("/root/main/undelivelist[" + i + "]/opcnfmdd");
- sumfromdd = model.getValue("/root/main/undelivelist[" + i + "]/sumfromdd");
- sumtodd = model.getValue("/root/main/undelivelist[" + i + "]/sumtodd");
- if( sumfromdd == "" ) { sumfromdd = opcnfmdd; }
- if( sumtodd == "" ) { sumtodd = opcnfmdd; }
- if( chkflag == "true" ) {
- cnt += 1;
- prcplist = prcplist + "▩" + "I" + "▦" + goodcd + "▦" + allsizespecid + "▦" + refdeptflag + "▦" + oproomcd + "▦" + sumfromdd + "▦" + sumtodd
- + "▦" + (parseInt(deliveqty) - parseInt(bfdeliveqty)) + "▦" + cmt + "▦" + "" + "▦" + "";
- }
- }
- if( cnt > 0 ) {
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.makeNode("/root/send/savedata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.setValue("/root/send/savedata", prcplist);
- submit("TXMNP02101", false);
- fSearch();
- }else {
- messageBox("선택한것이", "I004");
- }
- }
|