1234 lines
29 KiB
HTML
1234 lines
29 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
||
<title>{{ name }} - 制作成本计算</title>
|
||
|
||
<style>
|
||
* {
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: "Microsoft YaHei", Arial, sans-serif;
|
||
background: #f1f2f6;
|
||
margin: 0;
|
||
padding: 24px;
|
||
color: #25262b;
|
||
font-size: 18px;
|
||
}
|
||
|
||
.container {
|
||
width: 100%;
|
||
max-width: 1500px;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
/* ==============================
|
||
页面标题
|
||
============================== */
|
||
|
||
.page-header {
|
||
margin-bottom: 24px;
|
||
text-align: center;
|
||
}
|
||
|
||
.page-title {
|
||
margin: 0 0 10px;
|
||
font-size: 40px;
|
||
line-height: 1.3;
|
||
font-weight: 800;
|
||
color: #222;
|
||
}
|
||
|
||
.page-subtitle {
|
||
margin: 0;
|
||
color: #777;
|
||
font-size: 19px;
|
||
line-height: 1.7;
|
||
}
|
||
|
||
/* ==============================
|
||
主卡片
|
||
============================== */
|
||
|
||
.main-card {
|
||
overflow: hidden;
|
||
margin-bottom: 30px;
|
||
background: #fff;
|
||
border-radius: 20px;
|
||
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
|
||
}
|
||
|
||
.main-card-top {
|
||
display: grid;
|
||
grid-template-columns: 210px minmax(0, 1fr);
|
||
gap: 30px;
|
||
padding: 32px;
|
||
text-align: left;
|
||
}
|
||
|
||
.main-icon-wrapper {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
justify-content: center;
|
||
}
|
||
|
||
.main-icon {
|
||
display: flex;
|
||
width: 190px;
|
||
height: 190px;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
background: #f4f1f9;
|
||
border: 3px solid rgba(138, 79, 211, 0.3);
|
||
border-radius: 22px;
|
||
box-shadow: 0 5px 18px rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
.main-icon img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.main-info {
|
||
min-width: 0;
|
||
}
|
||
|
||
.main-name-row {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
gap: 14px;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.main-name {
|
||
margin: 0;
|
||
font-size: 36px;
|
||
line-height: 1.35;
|
||
font-weight: 800;
|
||
color: #222;
|
||
}
|
||
|
||
.quality-badge {
|
||
display: inline-flex;
|
||
min-height: 38px;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 7px 16px;
|
||
border-radius: 999px;
|
||
font-size: 17px;
|
||
font-weight: 700;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.quality-1 {
|
||
color: #555;
|
||
background: #efefef;
|
||
}
|
||
|
||
.quality-2 {
|
||
color: #237a3b;
|
||
background: #e5f6e9;
|
||
}
|
||
|
||
.quality-3 {
|
||
color: #1e6bd6;
|
||
background: #e7f0fd;
|
||
}
|
||
|
||
.quality-4 {
|
||
color: #7c3fc2;
|
||
background: #f0e7fb;
|
||
}
|
||
|
||
.quality-5 {
|
||
color: #c76b00;
|
||
background: #fff0d9;
|
||
}
|
||
|
||
.tip-list {
|
||
margin: 0 0 22px;
|
||
padding: 0;
|
||
list-style: none;
|
||
}
|
||
|
||
.tip-list li {
|
||
position: relative;
|
||
margin-bottom: 9px;
|
||
padding-left: 22px;
|
||
color: #555;
|
||
font-size: 19px;
|
||
line-height: 1.8;
|
||
}
|
||
|
||
.tip-list li::before {
|
||
position: absolute;
|
||
top: 14px;
|
||
left: 2px;
|
||
width: 8px;
|
||
height: 8px;
|
||
background: #8a4fd3;
|
||
border-radius: 50%;
|
||
content: "";
|
||
}
|
||
|
||
/* ==============================
|
||
主信息参数
|
||
============================== */
|
||
|
||
.stat-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(5, minmax(120px, 1fr));
|
||
gap: 14px;
|
||
}
|
||
|
||
.stat-item {
|
||
padding: 18px 15px;
|
||
background: #f7f7fa;
|
||
border: 1px solid #ededf2;
|
||
border-radius: 13px;
|
||
text-align: center;
|
||
}
|
||
|
||
.stat-label {
|
||
margin-bottom: 8px;
|
||
color: #777;
|
||
font-size: 16px;
|
||
}
|
||
|
||
.stat-value {
|
||
color: #333;
|
||
font-size: 22px;
|
||
line-height: 1.4;
|
||
font-weight: 800;
|
||
}
|
||
|
||
/* ==============================
|
||
汇总区域
|
||
============================== */
|
||
|
||
.summary-section {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: 1px;
|
||
background: #e9e9ef;
|
||
border-top: 1px solid #e9e9ef;
|
||
}
|
||
|
||
.summary-panel {
|
||
padding: 28px 30px 30px;
|
||
background: #fff;
|
||
text-align: left;
|
||
}
|
||
|
||
.summary-title {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 12px;
|
||
margin-bottom: 20px;
|
||
font-size: 25px;
|
||
font-weight: 800;
|
||
}
|
||
|
||
.summary-title.market {
|
||
color: #d93939;
|
||
}
|
||
|
||
.summary-title.cost {
|
||
color: #2e8b57;
|
||
}
|
||
|
||
.summary-count {
|
||
color: #888;
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.price-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||
gap: 14px;
|
||
}
|
||
|
||
.price-box {
|
||
padding: 20px 14px;
|
||
background: #f8f8fa;
|
||
border-radius: 13px;
|
||
text-align: center;
|
||
}
|
||
|
||
.price-box-label {
|
||
margin-bottom: 10px;
|
||
color: #777;
|
||
font-size: 16px;
|
||
}
|
||
|
||
.price-box-value {
|
||
color: #333;
|
||
font-size: 21px;
|
||
font-weight: 800;
|
||
line-height: 1.55;
|
||
}
|
||
|
||
.price-box.lowest .price-box-value {
|
||
color: #2e8b57;
|
||
}
|
||
|
||
.price-box.average .price-box-value {
|
||
color: #d98b16;
|
||
}
|
||
|
||
.price-box.highest .price-box-value {
|
||
color: #d93939;
|
||
}
|
||
|
||
.summary-footer {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 12px 22px;
|
||
margin-top: 18px;
|
||
color: #777;
|
||
font-size: 16px;
|
||
line-height: 1.7;
|
||
}
|
||
|
||
.subtotal-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 16px;
|
||
margin-top: 17px;
|
||
padding: 17px 18px;
|
||
background: #f4f4f8;
|
||
border-radius: 11px;
|
||
}
|
||
|
||
.subtotal-label {
|
||
color: #555;
|
||
font-size: 18px;
|
||
}
|
||
|
||
.subtotal-value {
|
||
color: #2e8b57;
|
||
font-size: 23px;
|
||
font-weight: 800;
|
||
}
|
||
|
||
/* ==============================
|
||
游戏币显示
|
||
============================== */
|
||
|
||
.money {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex-wrap: wrap;
|
||
gap: 4px;
|
||
}
|
||
|
||
.money-gold {
|
||
color: #cc8b00;
|
||
}
|
||
|
||
.money-silver {
|
||
color: #697581;
|
||
}
|
||
|
||
.money-copper {
|
||
color: #b5673b;
|
||
}
|
||
|
||
.raw-price {
|
||
display: block;
|
||
margin-top: 5px;
|
||
color: #999;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* ==============================
|
||
材料区域标题
|
||
============================== */
|
||
|
||
.material-section {
|
||
margin-top: 12px;
|
||
}
|
||
|
||
.section-header {
|
||
display: flex;
|
||
align-items: flex-end;
|
||
justify-content: space-between;
|
||
gap: 20px;
|
||
margin-bottom: 18px;
|
||
}
|
||
|
||
.section-title {
|
||
margin: 0;
|
||
font-size: 31px;
|
||
font-weight: 800;
|
||
color: #222;
|
||
}
|
||
|
||
.section-desc {
|
||
color: #777;
|
||
font-size: 18px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
/* ==============================
|
||
材料卡片
|
||
============================== */
|
||
|
||
.material-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: 22px;
|
||
}
|
||
|
||
.material-card {
|
||
overflow: hidden;
|
||
background: #fff;
|
||
border: 1px solid #e5e5eb;
|
||
border-radius: 17px;
|
||
box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
|
||
text-align: left;
|
||
transition:
|
||
transform 0.18s ease,
|
||
box-shadow 0.18s ease;
|
||
}
|
||
|
||
.material-card:hover {
|
||
transform: translateY(-3px);
|
||
box-shadow: 0 9px 25px rgba(0, 0, 0, 0.11);
|
||
}
|
||
|
||
.material-card-header {
|
||
display: grid;
|
||
grid-template-columns: 98px minmax(0, 1fr) auto;
|
||
gap: 18px;
|
||
align-items: center;
|
||
padding: 22px;
|
||
border-bottom: 1px solid #eeeeef;
|
||
}
|
||
|
||
.material-icon {
|
||
display: flex;
|
||
width: 98px;
|
||
height: 98px;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
background: #f4f1f9;
|
||
border: 2px solid rgba(138, 79, 211, 0.18);
|
||
border-radius: 14px;
|
||
}
|
||
|
||
.material-icon img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.material-info {
|
||
min-width: 0;
|
||
}
|
||
|
||
.material-name {
|
||
margin: 0 0 10px;
|
||
font-size: 26px;
|
||
line-height: 1.35;
|
||
font-weight: 800;
|
||
color: #222;
|
||
}
|
||
|
||
.material-meta {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
gap: 9px;
|
||
}
|
||
|
||
.material-tag {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
min-height: 31px;
|
||
padding: 5px 11px;
|
||
border-radius: 999px;
|
||
color: #666;
|
||
background: #f0f0f3;
|
||
font-size: 15px;
|
||
line-height: 1.3;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.tag-trading {
|
||
color: #1e6bd6;
|
||
background: #e9f1fe;
|
||
}
|
||
|
||
.tag-store {
|
||
color: #2e8b57;
|
||
background: #e7f5ed;
|
||
}
|
||
|
||
.tag-quality-1 {
|
||
color: #555;
|
||
background: #efefef;
|
||
}
|
||
|
||
.tag-quality-2 {
|
||
color: #237a3b;
|
||
background: #e5f6e9;
|
||
}
|
||
|
||
.tag-quality-3 {
|
||
color: #1e6bd6;
|
||
background: #e7f0fd;
|
||
}
|
||
|
||
.tag-quality-4 {
|
||
color: #7c3fc2;
|
||
background: #f0e7fb;
|
||
}
|
||
|
||
.tag-quality-5 {
|
||
color: #c76b00;
|
||
background: #fff0d9;
|
||
}
|
||
|
||
.material-quantity {
|
||
min-width: 90px;
|
||
text-align: right;
|
||
}
|
||
|
||
.quantity-label {
|
||
margin-bottom: 4px;
|
||
color: #888;
|
||
font-size: 15px;
|
||
}
|
||
|
||
.quantity-value {
|
||
color: #333;
|
||
font-size: 29px;
|
||
font-weight: 800;
|
||
}
|
||
|
||
.material-card-body {
|
||
padding: 20px 22px 23px;
|
||
}
|
||
|
||
.material-price-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||
gap: 12px;
|
||
}
|
||
|
||
.material-price-item {
|
||
padding: 15px 10px;
|
||
background: #f8f8fa;
|
||
border-radius: 11px;
|
||
text-align: center;
|
||
}
|
||
|
||
.material-price-label {
|
||
margin-bottom: 8px;
|
||
color: #777;
|
||
font-size: 15px;
|
||
}
|
||
|
||
.material-price-value {
|
||
color: #333;
|
||
font-size: 18px;
|
||
font-weight: 700;
|
||
line-height: 1.55;
|
||
}
|
||
|
||
.material-total {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 14px;
|
||
margin-top: 16px;
|
||
padding: 16px 17px;
|
||
background: #f5f5f8;
|
||
border-radius: 10px;
|
||
}
|
||
|
||
.material-total-label {
|
||
color: #555;
|
||
font-size: 17px;
|
||
}
|
||
|
||
.material-total-value {
|
||
color: #d93939;
|
||
font-size: 21px;
|
||
font-weight: 800;
|
||
}
|
||
|
||
.material-footer {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 10px 18px;
|
||
margin-top: 15px;
|
||
color: #888;
|
||
font-size: 15px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
/* ==============================
|
||
商店材料
|
||
============================== */
|
||
|
||
.store-price-box {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: 14px;
|
||
}
|
||
|
||
.store-price-item {
|
||
padding: 20px 14px;
|
||
background: #f8f8fa;
|
||
border-radius: 11px;
|
||
text-align: center;
|
||
}
|
||
|
||
.store-price-label {
|
||
margin-bottom: 9px;
|
||
color: #777;
|
||
font-size: 16px;
|
||
}
|
||
|
||
.store-price-value {
|
||
color: #2e8b57;
|
||
font-size: 22px;
|
||
font-weight: 800;
|
||
line-height: 1.55;
|
||
}
|
||
|
||
.empty-card {
|
||
grid-column: 1 / -1;
|
||
min-height: 170px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: #fff;
|
||
border: 2px dashed #ccc;
|
||
border-radius: 16px;
|
||
color: #888;
|
||
font-size: 20px;
|
||
}
|
||
|
||
/* ==============================
|
||
响应式
|
||
============================== */
|
||
|
||
@media (max-width: 1100px) {
|
||
.main-card-top {
|
||
grid-template-columns: 180px minmax(0, 1fr);
|
||
}
|
||
|
||
.main-icon {
|
||
width: 165px;
|
||
height: 165px;
|
||
}
|
||
|
||
.stat-grid {
|
||
grid-template-columns: repeat(3, minmax(120px, 1fr));
|
||
}
|
||
|
||
.summary-section {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.material-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 760px) {
|
||
body {
|
||
padding: 12px;
|
||
font-size: 17px;
|
||
}
|
||
|
||
.page-title {
|
||
font-size: 31px;
|
||
}
|
||
|
||
.page-subtitle {
|
||
font-size: 17px;
|
||
}
|
||
|
||
.main-card-top {
|
||
grid-template-columns: 1fr;
|
||
padding: 22px 17px;
|
||
}
|
||
|
||
.main-icon-wrapper {
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
.main-icon {
|
||
width: 135px;
|
||
height: 135px;
|
||
}
|
||
|
||
.main-name {
|
||
font-size: 29px;
|
||
}
|
||
|
||
.tip-list li {
|
||
font-size: 17px;
|
||
}
|
||
|
||
.stat-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
|
||
.stat-value {
|
||
font-size: 19px;
|
||
}
|
||
|
||
.summary-panel {
|
||
padding: 22px 17px;
|
||
}
|
||
|
||
.summary-title {
|
||
font-size: 22px;
|
||
}
|
||
|
||
.price-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.section-header {
|
||
align-items: flex-start;
|
||
flex-direction: column;
|
||
gap: 7px;
|
||
}
|
||
|
||
.section-title {
|
||
font-size: 27px;
|
||
}
|
||
|
||
.section-desc {
|
||
font-size: 16px;
|
||
}
|
||
|
||
.material-card-header {
|
||
grid-template-columns: 78px minmax(0, 1fr);
|
||
padding: 18px;
|
||
}
|
||
|
||
.material-icon {
|
||
width: 78px;
|
||
height: 78px;
|
||
}
|
||
|
||
.material-name {
|
||
font-size: 22px;
|
||
}
|
||
|
||
.material-quantity {
|
||
grid-column: 1 / -1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
min-width: 0;
|
||
text-align: left;
|
||
}
|
||
|
||
.quantity-value {
|
||
font-size: 24px;
|
||
}
|
||
|
||
.material-price-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.store-price-box {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
{# ==========================================================
|
||
游戏币格式化宏
|
||
|
||
接口价格单位按铜处理:
|
||
100 铜 = 1 银
|
||
100 银 = 1 金
|
||
========================================================== #}
|
||
|
||
{% macro format_money(value) %}
|
||
{% set amount = value|default(0, true)|int %}
|
||
{% set gold = amount // 10000 %}
|
||
{% set silver = (amount % 10000) // 100 %}
|
||
{% set copper = amount % 100 %}
|
||
|
||
<span class="money">
|
||
{% if gold > 0 %}
|
||
<span class="money-gold">{{ gold }}金</span>
|
||
{% endif %}
|
||
|
||
{% if silver > 0 or gold > 0 %}
|
||
<span class="money-silver">{{ silver }}银</span>
|
||
{% endif %}
|
||
|
||
<span class="money-copper">{{ copper }}铜</span>
|
||
</span>
|
||
|
||
<span class="raw-price">
|
||
{{ "{:,}".format(amount) }} 铜
|
||
</span>
|
||
{% endmacro %}
|
||
|
||
|
||
<div class="container">
|
||
|
||
<header class="page-header">
|
||
<h1 class="page-title">制作成本计算</h1>
|
||
|
||
<p class="page-subtitle">
|
||
根据交易行实时行情与商店固定价格计算制作材料成本
|
||
</p>
|
||
</header>
|
||
|
||
|
||
<!-- ==================================================
|
||
主卡片
|
||
=================================================== -->
|
||
|
||
<section class="main-card">
|
||
|
||
<div class="main-card-top">
|
||
|
||
<div class="main-icon-wrapper">
|
||
<div class="main-icon">
|
||
<img
|
||
src="https://icon.jx3box.com/icon/{{ iconId }}.png"
|
||
alt="{{ name }}"
|
||
>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="main-info">
|
||
|
||
<div class="main-name-row">
|
||
<h2 class="main-name">{{ name }}</h2>
|
||
|
||
<span class="quality-badge quality-{{ quality }}">
|
||
品质 {{ quality }}
|
||
</span>
|
||
</div>
|
||
|
||
|
||
{% if tipInfo %}
|
||
<ul class="tip-list">
|
||
{% for tip in tipInfo %}
|
||
<li>{{ tip.text }}</li>
|
||
{% endfor %}
|
||
</ul>
|
||
{% endif %}
|
||
|
||
|
||
<div class="stat-grid">
|
||
|
||
<div class="stat-item">
|
||
<div class="stat-label">使用等级</div>
|
||
<div class="stat-value">{{ level }} 级</div>
|
||
</div>
|
||
|
||
<div class="stat-item">
|
||
<div class="stat-label">技艺经验</div>
|
||
<div class="stat-value">+{{ exp }}</div>
|
||
</div>
|
||
|
||
<div class="stat-item">
|
||
<div class="stat-label">精力消耗</div>
|
||
<div class="stat-value">{{ costVigor }}</div>
|
||
</div>
|
||
|
||
<div class="stat-item">
|
||
<div class="stat-label">制作产出</div>
|
||
<div class="stat-value">
|
||
{{ createItemMin }}~{{ createItemMax }} 个
|
||
</div>
|
||
</div>
|
||
|
||
<div class="stat-item">
|
||
<div class="stat-label">物品编号</div>
|
||
<div class="stat-value">{{ createItemIndex }}</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<!-- ==================================================
|
||
价格汇总
|
||
=================================================== -->
|
||
|
||
<div class="summary-section">
|
||
|
||
<div class="summary-panel">
|
||
|
||
<div class="summary-title market">
|
||
<span>成品市场价格</span>
|
||
|
||
<span class="summary-count">
|
||
样本 {{ price.sampleSize }} 条
|
||
</span>
|
||
</div>
|
||
|
||
<div class="price-grid">
|
||
|
||
<div class="price-box lowest">
|
||
<div class="price-box-label">最低价格</div>
|
||
|
||
<div class="price-box-value">
|
||
{{ format_money(price.lowestPrice) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="price-box average">
|
||
<div class="price-box-label">平均价格</div>
|
||
|
||
<div class="price-box-value">
|
||
{{ format_money(price.avgPrice) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="price-box highest">
|
||
<div class="price-box-label">最高价格</div>
|
||
|
||
<div class="price-box-value">
|
||
{{ format_money(price.highestPrice) }}
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="summary-footer">
|
||
<span>
|
||
产出数量:{{ createItemMin }}~{{ createItemMax }} 个
|
||
</span>
|
||
|
||
<span>
|
||
更新时间:
|
||
<span data-unix="{{ price.updatedAt }}">
|
||
{{ price.updatedAt }}
|
||
</span>
|
||
</span>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="summary-panel">
|
||
|
||
<div class="summary-title cost">
|
||
<span>制作材料总成本</span>
|
||
|
||
<span class="summary-count">
|
||
共 {{ items|length }} 种材料
|
||
</span>
|
||
</div>
|
||
|
||
<div class="price-grid">
|
||
|
||
<div class="price-box lowest">
|
||
<div class="price-box-label">最低采购成本</div>
|
||
|
||
<div class="price-box-value">
|
||
{{ format_money(total.lowestTotal) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="price-box average">
|
||
<div class="price-box-label">平均采购成本</div>
|
||
|
||
<div class="price-box-value">
|
||
{{ format_money(total.avgTotal) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="price-box highest">
|
||
<div class="price-box-label">最高采购成本</div>
|
||
|
||
<div class="price-box-value">
|
||
{{ format_money(total.highestTotal) }}
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="subtotal-row">
|
||
<span class="subtotal-label">接口成本小计</span>
|
||
|
||
<span class="subtotal-value">
|
||
{{ format_money(total.subtotal) }}
|
||
</span>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</section>
|
||
|
||
|
||
<!-- ==================================================
|
||
合成材料
|
||
=================================================== -->
|
||
|
||
<section class="material-section">
|
||
|
||
<div class="section-header">
|
||
<h2 class="section-title">合成所需物品</h2>
|
||
|
||
<div class="section-desc">
|
||
交易行材料按市场行情计算,商店材料按固定单价计算
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="material-grid">
|
||
|
||
{% for item in items %}
|
||
|
||
<article class="material-card">
|
||
|
||
<div class="material-card-header">
|
||
|
||
<div class="material-icon">
|
||
<img
|
||
src="https://icon.jx3box.com/icon/{{ item.iconId }}.png"
|
||
alt="{{ item.name }}"
|
||
loading="lazy"
|
||
>
|
||
</div>
|
||
|
||
|
||
<div class="material-info">
|
||
|
||
<h3 class="material-name">
|
||
{{ item.name }}
|
||
</h3>
|
||
|
||
<div class="material-meta">
|
||
|
||
{% if item.type == "trading" %}
|
||
<span class="material-tag tag-trading">
|
||
交易行
|
||
</span>
|
||
{% elif item.type == "store" %}
|
||
<span class="material-tag tag-store">
|
||
商店购买
|
||
</span>
|
||
{% else %}
|
||
<span class="material-tag">
|
||
{{ item.type }}
|
||
</span>
|
||
{% endif %}
|
||
|
||
<span class="material-tag tag-quality-{{ item.quality }}">
|
||
品质 {{ item.quality }}
|
||
</span>
|
||
|
||
{% if item.genre is not none %}
|
||
<span class="material-tag">
|
||
分类 {{ item.genre }}
|
||
</span>
|
||
{% endif %}
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="material-quantity">
|
||
<div class="quantity-label">需求数量</div>
|
||
|
||
<div class="quantity-value">
|
||
× {{ item.quantity }}
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="material-card-body">
|
||
|
||
{% if item.type == "trading" %}
|
||
|
||
<div class="material-price-grid">
|
||
|
||
<div class="material-price-item">
|
||
<div class="material-price-label">
|
||
最低单价
|
||
</div>
|
||
|
||
<div class="material-price-value">
|
||
{{ format_money(item.price.lowestPrice) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="material-price-item">
|
||
<div class="material-price-label">
|
||
平均单价
|
||
</div>
|
||
|
||
<div class="material-price-value">
|
||
{{ format_money(item.price.avgPrice) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="material-price-item">
|
||
<div class="material-price-label">
|
||
最高单价
|
||
</div>
|
||
|
||
<div class="material-price-value">
|
||
{{ format_money(item.price.highestPrice) }}
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="material-total">
|
||
<span class="material-total-label">
|
||
最低采购小计
|
||
</span>
|
||
|
||
<span class="material-total-value">
|
||
{{ format_money(
|
||
item.price.lowestPrice * item.quantity
|
||
) }}
|
||
</span>
|
||
</div>
|
||
|
||
|
||
<div class="material-footer">
|
||
<span>
|
||
市场样本:{{ item.price.sampleSize }} 条
|
||
</span>
|
||
|
||
<span>
|
||
更新时间:
|
||
<span data-unix="{{ item.price.updatedAt }}">
|
||
{{ item.price.updatedAt }}
|
||
</span>
|
||
</span>
|
||
</div>
|
||
|
||
|
||
{% elif item.type == "store" %}
|
||
|
||
<div class="store-price-box">
|
||
|
||
<div class="store-price-item">
|
||
<div class="store-price-label">
|
||
商店单价
|
||
</div>
|
||
|
||
<div class="store-price-value">
|
||
{{ format_money(item.price) }}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="store-price-item">
|
||
<div class="store-price-label">
|
||
采购小计
|
||
</div>
|
||
|
||
<div class="store-price-value">
|
||
{{ format_money(
|
||
item.price * item.quantity
|
||
) }}
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
{% else %}
|
||
|
||
<div class="material-total">
|
||
<span class="material-total-label">
|
||
暂无价格计算方式
|
||
</span>
|
||
|
||
<span class="material-total-value">
|
||
-
|
||
</span>
|
||
</div>
|
||
|
||
{% endif %}
|
||
|
||
</div>
|
||
|
||
</article>
|
||
|
||
{% else %}
|
||
|
||
<div class="empty-card">
|
||
暂无合成材料数据
|
||
</div>
|
||
|
||
{% endfor %}
|
||
|
||
</div>
|
||
|
||
</section>
|
||
|
||
</div>
|
||
|
||
|
||
<script>
|
||
document.querySelectorAll("[data-unix]").forEach(function (element) {
|
||
const timestamp = Number(element.dataset.unix);
|
||
|
||
if (!Number.isFinite(timestamp) || timestamp <= 0) {
|
||
element.textContent = "未知";
|
||
return;
|
||
}
|
||
|
||
const date = new Date(timestamp * 1000);
|
||
|
||
element.textContent = date.toLocaleString("zh-CN", {
|
||
year: "numeric",
|
||
month: "2-digit",
|
||
day: "2-digit",
|
||
hour: "2-digit",
|
||
minute: "2-digit",
|
||
second: "2-digit",
|
||
hour12: false
|
||
});
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |