|
 |
|
การส่งค่าจากหน้า popup มา form หลัก เราสามารถสั่งพริ้นได้รึเปล่าค่ะ |
|
 |
|
|
 |
 |
|
Print หน้าไหรครับ 
|
 |
 |
 |
 |
Date :
2013-11-18 09:55:50 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|



หลังจากที่กดปุ่มค้นหาภาพ 1 จะแสดงหน้าค้นหาภาพ 2 แล้วหน้า 2 จะส่งค่ามาหน้า 1 แล้วจะกดปุ่มสั่งพิมพ์ ภาพ 1 เป็นรายงานในภาพ 3
ไม่ทราบว่าทำได้รึเปล่าค่ัะ
Code (PHP)
<body bgcolor="#f2f9ff">
<?
include"connect.php";
$emp_no = $_SESSION["emp_no"];
$strNextSeq = $_SESSION["strNextSeq"];
$strSQL = "SELECT * FROM pref ORDER BY val ASC LIMIT 0,1 ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
$strNextSeq = $objResult["val"].'-00'.$objResult["seq"] ;
?>
<form name="frmMain" method="post" action="save_purchase.php" onSubmit="JavaScript:return fncSubmit();">
<input type="hidden" name="emp_no" value="<?=$emp_no;?>">
<div align="center">
<fieldset style="font-family:Verdana, Geneva, sans-serif; font-size:13px;color:#039; width:300px;">
<legend><b>ระบุจำนวนรถที่ต้องการเสนอซื้อ</b></legend>
<?
$prdate = date("Y-m-d");
$dd = substr($prdate,8,2);
$mm = substr($prdate,5,2);
$yy = substr($prdate,0,4)+543;
$prdate = $dd.'/'.$mm.'/'.$yy;
?>
<table width="400px" height="187" style="font-family:Verdana, Geneva, sans-serif; font-size:13px;"><br>
<tr>
<th align="left">เลขที่ใบสั่งซื้อ : </th>
<td ><input type="text" name="prno" id="prno" value="PR<?=$strNextSeq;?>" readonly /></td>
</tr>
<tr>
<th align="left">วันที่สั่งซื้อ : </th>
<td><input type="text" name="prdate" id="prdate" value="<?=$prdate;?>" readonly /></td>
</tr>
<tr>
<th align="left">จำนวน :</th>
<td><input type="text" name="txtprdetail" id="txtprdetail" size="5" onKeyDown="check_key_number()" /> คัน</td>
</tr>
<tr>
<th align="left">เกียร์ออโต้ :</th>
<td><input type="text" size="5" /> คัน</td>
</tr>
<tr>
<th align="left">เกียร์ธรรมดา :</th>
<td><input type="text" size="5" /> คัน <input type="submit" value="บันทึก" style="width:57px; height:30px;" ></td>
</tr>
</table>
</fieldset>
</div>
</form><br>
<!--พิมพ์ใบPR-->
<script type="text/javascript">
function OpenReport() {
var myWindow=window.open("MyPDF/report_buycar.pdf?pID=PR<?=$prno;?>",'windowRef','width=1600,height=900');
if (!myWindow.opener) myWindow.opener = self;
}
</script>
<!--ค้นหาใบเสนอซื้อ-->
<script type="text/javascript">
function OpenSebuy() {
var myWindow=window.open("search_buycar.php",'windowRef','width=650,height=500');
if (!myWindow.opener) myWindow.opener = self;
}
</script>
<!--เพิ่มใบเสนอซื้อ-->
<script type="text/javascript">
function OpenBuy() {
var myWindow= window.location.reload("buy_car.php",'windowRef');
if (!myWindow.opener) myWindow.opener = self;
}
</script>
<? include"report_buycar.php";?>
<div align="center">
<button onClick="OpenBuy()" style="width:90px; height:30px;">เพิ่มข้อมูล</button>
<button onClick="OpenSebuy()" style="width:127px; height:30px;">ค้นหาใบเสนอซื้อ</button>
<button onClick="OpenReport()" style="width:127px; height:30px;">พิมพ์ใบเสนอซื้อ</button>
</div>
</body>
</html>
|
ประวัติการแก้ไข 2013-11-18 10:01:18 2013-11-18 10:01:40
 |
 |
 |
 |
Date :
2013-11-18 10:00:18 |
By :
PALM26 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2013-11-18 13:45:09 |
By :
PALM26 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|