Changeset 17305
- Timestamp:
- 2008/05/13 12:15:47 (16 years ago)
- Location:
- branches/comu-ver2/data
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/Smarty/templates/default/admin/order/index.tpl
r17269 r17305 305 305 <td><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="8" height="1" alt=""></td> 306 306 <td><a href="../contents/csv.php?tpl_subno_csv=order"><span class="fs12n"> >> CSV出力項目設定 </span></a></td> 307 <td><input type="button" name="pdf" value="PDF一括出力" onclick="fnSelectCheckSubmit();"></td> 307 308 </tr> 308 309 </table> … … 340 341 <td width="100"><span class="white">全商品発送日</span></td> 341 342 <td width="75"><span class="white">対応状況</span></td> 342 <td width="90"><span class="white">帳票</span>< /td>343 <td width="90"><span class="white">帳票</span><br /><input type="button" name="btn01" value="全て選択" onclick="fnBoxChecked(true);"> <input type="button" name="btn01" value="全て解除" onclick="fnBoxChecked(false);"></td> 343 344 <td width="45"><span class="white">編集</span></td> 344 345 <td width="45"><span class="white">メール</span></td> … … 357 358 <td align="center"><!--{$arrResults[cnt].commit_date|sfDispDBDate|default:"未発送"}--></td> 358 359 <td align="center"><!--{$arrORDERSTATUS[$status]}--></td> 359 <td align="center"><a href="./" onClick="win02('pdf.php?order_id=<!--{$arrResults[cnt].order_id}-->','pdf','1000','800'); return false;">帳票生成</a><br />< /td>360 <td align="center"><a href="./" onClick="win02('pdf.php?order_id=<!--{$arrResults[cnt].order_id}-->','pdf','1000','800'); return false;">帳票生成</a><br /><input type="checkbox" name="pdf_order_id[]" value="<!--{$arrResults[cnt].order_id}-->" ></td> 360 361 <td align="center"><a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.const.URL_ORDER_EDIT}-->'); fnModeSubmit('pre_edit', 'order_id', '<!--{$arrResults[cnt].order_id}-->'); return false;"><span class="icon_edit">編集</span></a></td> 361 362 <td align="center"><a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.const.URL_ORDER_MAIL}-->'); fnModeSubmit('pre_edit', 'order_id', '<!--{$arrResults[cnt].order_id}-->'); return false;"><span class="icon_mail">通知</span></a></td> … … 379 380 380 381 <!--{/if}--> 382 <script type="text/javascript"> 383 <!-- 384 function fnSelectCheckSubmit(){ 385 386 var fm = document.form1; 387 388 var i; 389 var checkflag = 0; 390 var max = fm["pdf_order_id[]"].length; 391 392 if(max) { 393 for (i=0;i<max;i++){ 394 if(fm["pdf_order_id[]"][i].checked == true){ 395 checkflag = 1; 396 } 397 } 398 } else { 399 if(fm["pdf_order_id[]"].checked == true) { 400 checkflag = 1; 401 } 402 } 403 404 if(checkflag == 0){ 405 alert('チェックボックスが選択されていません'); 406 return false; 407 } 408 409 if(checkflag == 1){ 410 window.open("about:blank", "pdf", "width=1000,height=800,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no"); 411 document.form1.target = "pdf"; 412 document.form1.mode.value = 'pdf'; 413 document.form1.action = 'pdf.php'; 414 document.form1.submit(); 415 } 416 } 417 418 function fnBoxChecked(check){ 419 var count; 420 var fm = document.form1; 421 var max = fm["pdf_order_id[]"].length; 422 for(count=0; count<max; count++){ 423 fm["pdf_order_id[]"][count].checked = check; 424 } 425 } 426 427 //--> 428 </script> -
branches/comu-ver2/data/Smarty/templates/default/admin/order/pdf_input.tpl
r17182 r17305 27 27 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF}-->"> 28 28 <input type="hidden" name="mode" value="confirm"> 29 <input type="hidden" name="order_id" value="<!--{$arrForm.order_id}-->"> 29 <!--{foreach from=$arrForm.order_id item=order_id}--> 30 <input type="hidden" name="order_id[]" value="<!--{$order_id}-->"> 31 <!--{/foreach}--> 30 32 <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->"> 31 33 … … 39 41 <tr class="fs12n"> 40 42 <td width="120" bgcolor="#f3f3f3">受注番号</td> 41 <td width="307" bgcolor="#ffffff"><!--{$arrForm.order_id}--></td> 43 <td width="307" bgcolor="#ffffff"> 44 <!--{foreach from=$arrForm.order_id item=order_id}--> 45 <!--{$order_id}-->, 46 <!--{/foreach}--> 47 </td> 42 48 </tr> 43 49 <tr class="fs12n"> -
branches/comu-ver2/data/class/SC_Fpdf.php
r17182 r17305 33 33 class SC_Fpdf { 34 34 35 function SC_Fpdf($arrData, $tpl_pdf = "template_nouhin01.pdf") { 36 $this->arrData = $arrData; 35 function SC_Fpdf($download, $title, $tpl_pdf = "template_nouhin01.pdf") { 37 36 // デフォルトの設定 38 37 $this->tpl_pdf = PDF_TEMPLATE_DIR . $tpl_pdf; // テンプレートファイル 39 $this->pdf_download = $ arrData[download]; // PDFのダウンロード形式(0:表示、1:ダウンロード)40 $this->tpl_title = $ arrData['title'];38 $this->pdf_download = $download; // PDFのダウンロード形式(0:表示、1:ダウンロード) 39 $this->tpl_title = $title; 41 40 $this->tpl_dispmode = "real"; // 表示モード 42 41 $masterData = new SC_DB_MasterData_Ex(); … … 68 67 // PDFを読み込んでページ数を取得 69 68 $pageno = $this->pdf->setSourceFile($this->tpl_pdf); 69 #$this->createPdf(); 70 } 71 72 function setData($arrData) { 73 $this->arrData = $arrData; 70 74 71 75 // ページ番号よりIDを取得 … … 92 96 93 97 //ロゴ画像 94 $ this->pdf->Image(PDF_TEMPLATE_DIR . 'logo.png', 124, 46, 60);95 96 $this->createPdf(); 98 $logo_file = PDF_TEMPLATE_DIR . 'logo.png'; 99 $this->pdf->Image($logo_file, 124, 46, 40); 100 97 101 } 98 102 … … 111 115 $this->lfText(125, 74, $text, 8); //都道府県+住所1 112 116 $this->lfText(125, 77, $arrInfo['addr02'], 8); //住所2 113 $text = "TEL: ".$arrInfo['tel01']."-".$arrInfo['tel02']."-".$arrInfo['tel03']." "."FAX: ".$arrInfo['fax01']."-".$arrInfo['fax02']."-".$arrInfo['fax03']; 117 118 $text = "TEL: ".$arrInfo['tel01']."-".$arrInfo['tel02']."-".$arrInfo['tel03']; 119 if (!empty($arrInfo['fax01']) && $arrInfo['fax02'] && $arrInfo['fax03']) { 120 $text .= " FAX: ".$arrInfo['fax01']."-".$arrInfo['fax02']."-".$arrInfo['fax03']; 121 } 114 122 $this->lfText(125, 80, $text, 8); //TEL・FAX 115 $text = "Email: ".$arrInfo['law_email']; 116 $this->lfText(125, 83, $text, 8); //Email 123 124 if (!empty($arrInfo['law_email'])) { 125 $text = "Email: ".$arrInfo['law_email']; 126 $this->lfText(125, 83, $text, 8); //Email 127 } 117 128 } 118 129 … … 159 170 $this->pdf->Cell(0, 45, '', 0, 2, '', 0, ''); 160 171 161 $this->pdf->SetFont('SJIS', '', 9);172 $this->pdf->SetFont('SJIS', '', 8); 162 173 163 174 $monetary_unit = $this->sjis_conv("円"); … … 270 281 ob_clean(); 271 282 if($this->pdf_download == 1) { 272 $filename = "nouhinsyo-No".$this->arrData['order_id'].".pdf"; 283 if ($this->pdf->PageNo() == 1) { 284 $filename = "nouhinsyo-No".$this->arrData['order_id'].".pdf"; 285 } else { 286 $filename = "nouhinsyo.pdf"; 287 } 273 288 $this->pdf->Output($this->sjis_conv($filename), D); 274 289 } else { -
branches/comu-ver2/data/class/pages/admin/order/LC_Page_Admin_Order.php
r17279 r17305 124 124 case 'delete': 125 125 case 'csv': 126 case 'pdf': 126 127 case 'delete_all': 127 128 case 'search': … … 289 290 SC_Utils_Ex::sfCSVDownload($head.$data); 290 291 exit; 292 break; 293 case 'pdf': 294 $objFpdf = new SC_Fpdf(1, '納品書'); 295 $objFpdf->setData($arrRet); 296 $objFpdf->createPdf(); 291 297 break; 292 298 case 'delete_all': -
branches/comu-ver2/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php
r17182 r17305 102 102 // エラー入力なし 103 103 if (count($this->arrErr) == 0) { 104 $objFpdf = new SC_Fpdf($arrRet); 104 $i = 0; 105 $objFpdf = new SC_Fpdf($arrRet['download'], $arrRet['title']); 106 foreach ($arrRet['order_id'] AS $key=>$val) { 107 $arrPdfData = $arrRet; 108 $arrPdfData['order_id'] = $val; 109 $objFpdf->setData($arrPdfData); 110 ++$i; 111 } 112 $objFpdf->createPdf(); 105 113 } 106 114 break; … … 121 129 // 受注番号があったら、セットする 122 130 if(SC_Utils_Ex::sfIsInt($_GET['order_id'])) { 123 $arrForm['order_id'] = $_GET['order_id']; 131 $arrForm['order_id'][0] = $_GET['order_id']; 132 } elseif (is_array($_POST['pdf_order_id'])) { 133 sort($_POST['pdf_order_id']); 134 foreach ($_POST['pdf_order_id'] AS $key=>$val) { 135 $arrForm['order_id'][] = $val; 136 } 124 137 } 125 138 -
branches/comu-ver2/data/pdf/japanese.php
r17182 r17305 533 533 $this->SetFont('Arial','I',8); 534 534 //¸½ºß¤Î¥Ú¡¼¥¸ÈÖ¹æ¤ÈÁí¥Ú¡¼¥¸¿ô¤ò½ÐÎÏ 535 $this->Cell(0,10,''.$this->PageNo().' / {nb}',0,0,'C');535 #$this->Cell(0,10,''.$this->PageNo().' / {nb}',0,0,'C'); 536 536 } 537 537
Note: See TracChangeset
for help on using the changeset viewer.