마스터욱
Toggle navigation
  • 회원가입 | 정보찾기
ICON NAVIGATION
정보수정 쪽지함 주변맛집 익명채팅
공지사항 채팅 개발문의 방명록
  • MAIN NAVIGATION
  • 메인
  • 마스터욱 공간
    • 마스터욱 소개
    • 개발 리스트
    • 공지사항
    • 방명록
  • 마스터욱 외부자료
    • 네이버
    • 티스토리
    • 깃허브(github)
  • 개인 프로젝트
    • 랜덤 이성 채팅
    • Auto 크롤링
    • Javascript 카카오 채팅
    • 파이썬 뉴스매매
    • C# 키움 주식 자동매매
    • C# 키움 주식 패턴 분석
    • PHP 욱보드
    • 업비트 자동매매 개발
    • 업비트 자동매매 일지
  • 개발 의뢰
    • 개발 문의
    • 개발 견적
    • 개발 피드백
    • FAQ
  • 개발 경험 Tip
    • PHP
    • JSP
    • HTML
    • Javascript
    • Android
    • C#
    • MySQL
    • Linux
    • Python
    • NodeJS
    • React
    • Vue.js
    • Flutter
    • 정규식
    • 기타
  • 커뮤니티
    • 자유게시판
    • 추천사이트
    • 영화
    • 여행
    • 유머
    • Overseas News
  • 맛집&즐길 거리 탐방
    • 맛집 정보
    • 즐길 거리 정보
    • 내 주위 맛집&즐길 거리
  • 공유 사진
    • 음식
    • 여행
    • 캐릭터
    • 배경
    • 기타
    • 이모티콘
    • 일러스트
  • 놀이터
    • 블록뽀시기
    • 트레이딩뷰
    • 로또 시뮬레이션
    • 쳇쳇 익명 채팅
    • 랜덤 이성 채팅
    • AI 채팅
    • 미니 채팅
    • 바이너리 테스트
    • 마번호 생성기
    • 바카라 시뮬레이션
    • 홀짝점수 테스트
    • 로또 분석기
SITE STATISTICS
  • - 명 현재 접속자
  • 377 명 오늘 방문자
  • 1,712 명 어제 방문자
  • 5,192 명 최대 방문자
  • 701,124 명 전체 방문자
  • 2,571 개 전체 게시물
  • 496 개 전체 댓글수
Facebook Twitter GooglePlus KakaoStory NaverBand
  1. 홈
  2. 자바스크립트
목록으로

프레임 프린트 기능 메모

마스터욱 0 107 0 0 2017-08-19 03:37:29

<?php

if(!defined('_SCM_')) exit;

 

//print_r2($_POST);

 

$list = $_POST['list'];

 

$menu = array();

if(sizeof($list) > 0){

foreach($list[0] as $menuName => $value){

if(substr($menuName, 0, 1) == "_"){

continue;

}

 

$menu[] = $menuName;

}

}

?>

 

<table width="100%">

<tr>

<td align="left">

<button type="button" class="btn btn-primary" id="outGoingPrintBtn"><i class="fa fa-print"></i> 출고지시서 출력</button>

</td>

<td align="right">

<button type="button" class="btn btn-primary" onclick="ajy_modal.open(this);" json='{"name":"outGoingSheetItemAddModal","getParameter":{"idx":""}}'><i class="fa fa-plus"></i> 출고 등록</button>

</td>

</tr>

</table>

<div id="outGoingSheetItemListBox">

<table class="table xtable-bordered outGoingSheetItemListTable table-hover table_scroll" style="margin-top:10px;">

 

<?php

if(sizeof($menu) > 0){

?>

<thead>

<tr>

<?php

foreach($menu as $menuName){

echo "<th class='text-center'>".$menuName."</th>";

}

?>

</tr>

</thead>

<?php

}

?>

 

<tbody>

<?php

if(sizeof($list) > 0){

foreach($list as $key => $row) {

?>

<tr>

<?php

foreach($row as $menuName => $value){

if(substr($menuName, 0, 1) == "_"){

continue;

}

?>

<td class='text-left outGoingSheetItemListTd' style="cursor:pointer;" json='<?=json_encode($row)?>'><?=$value?></td>

<?php

}

?>

<?php

}

}

else{

?>

<tr>

<td align="center"> - </td>

</tr>

<?php

}

?>

</tbody>

</table>

</div>

<iframe id="printFrame" name="printFrame" src="?v=outGoingSheetItemListPrint" style="width:0px;height:0px;" onload="gogoPrint();"></iframe>

<div style="display:none;" id="printFormBox"></div>

<script>

var isPrintGo = false;

var frm = document.getElementById("printFrame").contentWindow;

$(document).off("click", "#outGoingPrintBtn");

$(document).on ("click", "#outGoingPrintBtn", function(){

var json = $.parseJSON($(".outGoingAccountTd_NOW").attr("json"));

//console.log(json);

 

var content = $("#outGoingSheetItemListBox").html();

var form = "";

form += "<form method='post' id='outGoingPrintForm' action='?v=outGoingSheetItemListPrint' target='printFrame'>";

form += " <input type='text' name='content' value='" + encodeURIComponent(content) + "' />";

form += " <input type='text' name='_OutSheetNum' value='" + encodeURIComponent(json._OutSheetNum) + "' />";

form += " <input type='text' name='_CltComName' value='" + encodeURIComponent(json._CltComName) + "' />";

form += "</form>";

$("#printFormBox").html(form);

 

$("#outGoingPrintForm").submit();

isPrintGo = true;

});

 

function gogoPrint(){

if(isPrintGo){

frm.focus();

frm.print();

}

}

</script>

 

<?php

/*

<script>

$(document).off("click", ".outGoingSheetItemListTd");

$(document).on ("click", ".outGoingSheetItemListTd", function(res){

$(".outGoingSheetItemListTd").parents("tr").css("background-color", "#FFFFFF");

$(this).parents("tr").css("background-color", "#f1f1f1");

 

//클릭데이터 유지

$(".outGoingSheetItemListTd").removeClass("outGoingSheetItemListTd_NOW");

$(this).addClass("outGoingSheetItemListTd_NOW");

 

var json = $.parseJSON($(this).attr("json"));

var param = {

"_TrgComRegNum" : json._CltRegNum,

};

 

$("#outGoingSheetItemList").html("<?=LOADING_IMAGE?>");

$.post("?v=proc&f=Out_GetOutSheetItemList", param, function(res){

$.post("?v=outGoingSheetItemList", res, function(html){

$("#outGoingSheetItemList").html(html);

}, "html");

}, "json");

});

 

$(document).ready(function(){

tableAutoResize();

$(".outGoingSheetItemListTd").eq(0).trigger("click");

});

</script>

*/

?>

0
0

목록

Facebook Twitter GooglePlus KakaoStory NaverBand
0 Comments

비밀번호 확인

확인
댓글은 자신을 나타내는 '얼굴'입니다. *^^*
등록
자동등록방지 숫자를 순서대로 입력하세요.

댓글수정


글쓰기
검색
번호 제목 이름 날짜 조회
  • 72
    leaflet 무료지도
    마스터욱
    조회수 197   25-12-29 19:13
    마스터욱
    25-12-29 19:13
    197
  • 71
    스마트폰 하단 태스크 바(task bar)에 따른 하단 bottom 자동으로 제어하기
    마스터욱
    조회수 239   25-08-31 22:06
    마스터욱
    25-08-31 22:06
    239
  • 70
    ajax 리스팅, 스크롤 위치 유지 스크립트
    마스터욱
    조회수 188   25-08-11 02:58
    마스터욱
    25-08-11 02:58
    188
  • 69
    [1] http 에러까지 return 해주는 jquery ajax post [1]
    마스터욱
    조회수 331   24-06-04 14:25
    마스터욱
    24-06-04 14:25
    331
  • 68
    아이폰 사파리에서 window.open 이 작동되지 않는 문제
    마스터욱
    조회수 299   23-07-29 09:25
    마스터욱
    23-07-29 09:25
    299
  • 67
    콜백(callback)지옥 탈출하기
    마스터욱
    조회수 295   23-02-27 16:28
    마스터욱
    23-02-27 16:28
    295
  • 66
    IntersectionObserver
    마스터욱
    조회수 159   22-11-24 14:42
    마스터욱
    22-11-24 14:42
    159
  • 65
    [1] async, await 사용예시 [1]
    마스터욱
    조회수 193   22-11-18 12:41
    마스터욱
    22-11-18 12:41
    193
  • 64
    스크롤 페이징
    마스터욱
    조회수 221   22-11-01 17:53
    마스터욱
    22-11-01 17:53
    221
  • 63
    callback function 을 넘길때 파라메터(매개변수) 까지 전달하는 방법
    마스터욱
    조회수 180   22-10-20 02:31
    마스터욱
    22-10-20 02:31
    180
  • 62
    내가 만든 Form SerializeArray
    마스터욱
    조회수 205   22-10-12 04:02
    마스터욱
    22-10-12 04:02
    205
  • 61
    모바일 주소창 안보이게 하는 소스코드
    마스터욱
    조회수 172   22-08-17 03:08
    마스터욱
    22-08-17 03:08
    172
  • 60
    Ajax 크로스 도메인(cross domain) 해결방법
    마스터욱
    조회수 148   21-11-26 02:01
    마스터욱
    21-11-26 02:01
    148
  • 59
    javascript : JSON 데이터 안의 데이터를 동적으로 바꾸는 방법
    마스터욱
    조회수 164   21-06-12 00:55
    마스터욱
    21-06-12 00:55
    164
  • 58
    JSON Object(오브젝트) 데이터를 표(Table) 형식으로 보여주게 하는 함수(자체제작)
    마스터욱
    조회수 154   21-06-07 15:06
    마스터욱
    21-06-07 15:06
    154
  • 57
    자바스크립트 팝업(POPUP) 자동(Auto) 리사이징(Resizing)
    마스터욱
    조회수 151   21-06-06 23:12
    마스터욱
    21-06-06 23:12
    151
  • 56
    자바스크립트 get 파라메터를 string 으로 리턴해주는 함수
    마스터욱
    조회수 180   21-05-06 15:41
    마스터욱
    21-05-06 15:41
    180
  • 55
    비트맥스API Javascript Websocket Private API 연결
    마스터욱
    조회수 177   21-04-17 16:29
    마스터욱
    21-04-17 16:29
    177
  • 54
    JSON 데이터를 Table 코드로 보기좋게 변경해주는 함수(재귀)
    마스터욱
    조회수 161   21-04-17 15:18
    마스터욱
    21-04-17 15:18
    161
  • 53
    navigator.geolocation 쉽게 사용하기
    마스터욱
    조회수 186   21-03-31 01:31
    마스터욱
    21-03-31 01:31
    186
글쓰기
검색
  • 1
  • 2
  • 3
  • 4
  • 다음

Search

개인정보처리방침
마스터욱. All rights reserved.

Close

0 명 접속중
Time Loading...