Просмотр исходного кода

feat: EK-3320: 订单增加 Invoice 下载

zhangl 2 месяцев назад
Родитель
Сommit
d110d655ea
1 измененных файлов с 24 добавлено и 81 удалено
  1. 24 81
      common/libs/export/BaseExport.php

+ 24 - 81
common/libs/export/BaseExport.php

@@ -1601,17 +1601,17 @@ ORDER;
                 // 订单详情
                 $orderDetails .= <<<EOT
                 <tr>
-                    <td width="10%" style="font-size: 14px; text-align: center;">{$key}</td>
-                    <td>{$value['SKU_CODE']}</td>
-                    <td>{$value['GOODS_TITLE']}</td>
-                    <td>{$value['BUY_NUMS']}</td>
-                    <td style="text-align: right;">{$value['REAL_PRICE']}</td>
-                    <td style="text-align: right;">{$value['REAL_PRICE']}</td>
-                    <td style="text-align: right;">{$value['REAL_PRICE']}</td>
-                    <td style="text-align: right;">{$taxAmount}</td>
-                    <td style="text-align: right;">{$value['TAX_RATE']}</td>
-                    <td style="text-align: right;">{$taxAmount}</td>
-                    <td style="text-align: right;">{$totalAmount}</td> 
+                    <td style="text-align: left;">{$key}</td>
+                    <td style="text-align: left;">{$value['SKU_CODE']}</td>
+                    <td style="text-align: left;">{$value['GOODS_TITLE']}</td>
+                    <td style="text-align: left;">{$value['BUY_NUMS']}</td>
+                    <td style="text-align: left;">{$value['REAL_PRICE']}</td>
+                    <td style="text-align: left;">{$value['REAL_PRICE']}</td>
+                    <td style="text-align: left;">{$value['REAL_PRICE']}</td>
+                    <td style="text-align: left;">{$taxAmount}</td>
+                    <td style="text-align: left;">{$value['TAX_RATE']}</td>
+                    <td style="text-align: left;">{$taxAmount}</td>
+                    <td style="text-align: left;">{$totalAmount}</td> 
                 </tr>
 EOT;
             }
@@ -1636,52 +1636,6 @@ EOT;
 
             // 订单基本信息
             $orderBase = <<<ORDER
-            <table border="1" style="table-layout: fixed; padding: 10px 20px;" width="100%">
-                <tr>
-                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                        <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                            Bill to
-                        </td>
-                        <td width="50%">
-                            Invoce No.: 123213123123
-                        </td>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                        <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                            Name of Distributor: {$userName}
-                        </td>
-                        <td width="50%">
-                            Date: {$orderAt}
-                        </td>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                        <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                            Member ID: {$userId}
-                        </td>
-                        <td width="50%">
-                            Payment status: {$paymentStatus}
-                        </td>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                        <td width="100%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                            Address: {$address}
-                        </td>
-                    </td>
-                </tr>
-                <tr>
-                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                        <td width="100%" style="font-weight: bold; text-align: center; font-size: 14px;">
-                            Contact: {$mobile}
-                        </td>
-                    </td>
-                </tr>
-            </table>
 ORDER;
 
             $l['a_meta_charset'] = 'UTF-8';
@@ -1729,19 +1683,19 @@ ORDER;
                         <div style="display: block; width: 100%;">
                             {$orderBase}
                             
-                            <table border="1" width="100%" style="padding: 10px 5px; text-align: center;">
+                            <table border="1" width="100%" style="padding: 10px 5px; text-align: left;">
                                 <tr>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">No</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">{$productCode}</th>
-                                    <th width="20%" style="font-size: 14px; font-weight: bold; text-align: center;">{$productName}</th>
-                                    <th width="10%" style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Unit Price(AED)</th>
-                                    <th width="12%" style="font-size: 14px; font-weight: bold; text-align: center;">Unit BV</th>
-                                    <th width="12%" style="font-size: 14px; font-weight: bold; text-align: center;">Total BV</th>
-                                    <th width="12%" style="font-size: 14px; font-weight: bold; text-align: center;">Taxable Amount(AED)</th>
-                                    <th width="12%" style="font-size: 14px; font-weight: bold; text-align: center;">VAT Rate</th>
-                                    <th width="13%" style="font-size: 14px; font-weight: bold; text-align: center;">VAT Amount(AED)</th>
-                                    <th width="15%" style="font-size: 14px; font-weight: bold; text-align: center;">Total(AED)</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">No.</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">{$productCode}</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">{$productName}</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Unit Price(AED)</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Unit BV</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Total BV</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Taxable Amount(AED)</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">VAT Rate</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">VAT Amount(AED)</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Total(AED)</th>
                                 </tr>
                                 
                                 <tr>
@@ -1754,18 +1708,7 @@ ORDER;
                             </table>
                         </div>
                         
-                        <div style="width: 100%; margin-top: 50px; height: 30px;">
-                            <table width="100%" style="border: none; padding: 10px 20px; text-align: center;">
-                                <tr style="border: none;">
-                                    <td width="70%" style="border: none;"></td>
-                                    <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">{$signature}:</td>
-                                </tr>
-                                <tr style="border: none;">
-                                    <td width="70%" style="border: none;"></td>
-                                    <td width="30%" style="font-weight: bold; text-align: left; font-size: 14px; border: none;">{$date}:</td>
-                                </tr>
-                            </table>
-                        </div>
+                        
                     </div>
                 </div>
             </body>