This commit is contained in:
laodaming 2023-10-16 17:15:18 +08:00
parent d97fbfdebf
commit 49872fd620

View File

@ -1,244 +1 @@
package constants
// 发票主体页面
const MAIN_INVOICE_HTML = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invoice</title>
<style>
body {
margin: 0;
}
.header_warp {
background-color: #F8F8FA;
padding: 20px 5% 20px 6%;
}
.header_td {
width: 50%;
}
.header_td.logo {
vertical-align: top;
}
.header_logo {
max-height: 15px;
max-width: 100%;
margin-top: 5px;
}
.header_td.title {
color: #212121;
font-weight: 600;
font-size: 36px;
}
.information_warp {
padding: 30px 5% 30px 6%;
}
.information_td {
width: 50%;
font-size: 13px;
line-height: 20px;
font-weight: 300;
}
.information_td.bill {
color: #212121;
font-weight: 500;
}
.information_td.right {
color: #212121;
}
.information_td.info {
color: #666666;
line-height: 17px;
}
.bill_warp {
padding: 0 5% 0 6%;
}
.bill_td {
font-size: 13px;
}
.bill_td:first-child {
width: 47.59%;
}
.bill_td.title {
border-top: 2px solid #333;
padding: 13px 0 7px;
font-weight: 500;
color: #212121;
}
.bill_td.info {
color: #666;
border-bottom: 1px solid #ccc;
padding: 8px 0;
font-weight: 400;
}
.bill_warp tr:last-child .bill_td.info {
border-bottom: none;
}
.total_warp {
padding: 14px 5% 24px 0;
}
.total_td {
color: #212121;
padding: 8px 0 7px;
font-size: 12px;
font-weight: 500;
}
.total_td.info {
color: #666;
font-weight: 400;
}
.total_td.border-dashed {
border-bottom: 1px dashed #ccc;
}
.total_td.border-solid {
border-bottom: 2px solid #333;
padding-bottom: 12px;
}
.total_td.total {
padding-top: 12px;
font-size: 13px;
font-weight: 600;
}
.notes_warp {
padding: 0 5% 0 6%;
}
.notes_td {
font-size: 13px;
color: #666;
font-weight: 300;
width: 50%;
line-height: 21px;
}
.notes_td.title {
color: #212121;
font-weight: 500;
}
.notes_td.notes {
vertical-align: top;
}
</style>
</head>
<body>
<!-- header -->
<table class="header_warp" border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="header_td logo" align="left">
<img class="header_logo" src="https://fusenapi.kayue.cn:8010/storage/email/logo.png" alt="logo">
</td>
<td class="header_td title" align="right">Invoice</td>
</tr>
</table>
<!-- information -->
<table class="information_warp" border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="information_td bill" align="left">Bill To:</td>
<td class="information_td right" align="right">Invoice No. {{invoice_number}}</td>
</tr>
<tr>
<td class="information_td info" align="left">{{buyer_name}}</td>
<td class="information_td right" align="right">Date: {{buy_date}}</td>
</tr>
<tr>
<td class="information_td info" align="left">{{street}}</td>
<td class="information_td" align="right"></td>
</tr>
<tr>
<td class="information_td info" align="left">{{city}}</td>
<td class="information_td" align="right"></td>
</tr>
<tr>
<td class="information_td info" align="left">{{country}}</td>
<td class="information_td" align="right"></td>
</tr>
</table>
<!-- bill -->
<table class="bill_warp" border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
<!--循环部分-->
{{product_loop_html}}
<!--循环部分-->
</table>
<!-- total -->
<table class="total_warp" border="0" align="right" cellpadding="0" cellspacing="0" width="50%">
<tr>
<td class="total_td" align="right">Subtotal</td>
<td class="total_td info" align="right">${{subtotal_price}}</td>
</tr>
<tr>
<td class="total_td" align="right">Shipping Fee</td>
<td class="total_td info" align="right">Free</td>
</tr>
<tr>
<td class="total_td border-dashed" align="right">Tax</td>
<td class="total_td info border-dashed" align="right">${{tax}}</td>
</tr>
<tr>
<td class="total_td" align="right">Total</td>
<td class="total_td info" align="right">${{total_price}}</td>
</tr>
<tr>
<td class="total_td border-solid" align="right">Deposit Requested</td>
<td class="total_td info border-solid" align="right">${{deposit_price}}</td>
</tr>
<tr>
<td class="total_td total" align="right">Deposit Due</td>
<td class="total_td total" align="right">${{deposit_price}}</td>
</tr>
</table>
<!-- notes -->
<table class="notes_warp" border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="notes_td title" align="left">Payment Method:</td>
<td class="notes_td title" align="left">Notes:</td>
</tr>
<tr>
<td class="notes_td" align="left">{{payment_method}}</td>
<td class="notes_td notes" align="left" rowspan="2">{{notes}}</td>
</tr>
<tr>
<td class="notes_td" align="left">Account No. {{account_number}}</td>
</tr>
</table>
</body>
</html>
`
// 产品循环部分{{product_loop_html}}
const PRODUCT_LOOP_HTML_CONTENT = ` <tr>
<td class="bill_td title" align="left">{{product_name}}</td>
<td class="bill_td title" align="right">${{product_item_price}}</td>
<td class="bill_td title" align="right">{{purchase_quantity}}</td>
<td class="bill_td title" align="right">${{product_total_price}}</td>
</tr>`