文件
yjyf/server/application/admin/view/service/detail.html
MiAn 0370cb9bd6 feat: 新增师傅入驻审核与接单状态联动功能
- 新增师傅资质审核模块及权限
- 未审核通过的师傅默认禁用接单状态
- 新增售后退款申诉功能与相关界面
- 新增用户钱包管理及充值功能
- 更新服务定价矩阵相关数据库结构
- 修复微信支付证书验证问题
2026-11-17 10:28:01 +08:00

271 行
13 KiB
HTML

<style>
.sd-wrap { padding: 4px 8px; color: #1e293b; }
.sd-hero {
background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
border: 1px solid #fed7aa;
border-radius: 10px;
padding: 14px 18px;
margin-bottom: 14px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.sd-hero-left { display: flex; align-items: center; gap: 14px; }
.sd-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid #fdba74; background: #fff; }
.sd-title { font-size: 17px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.sd-sub { font-size: 12.5px; color: #64748b; margin-top: 4px; }
.sd-stats { display: flex; gap: 10px; }
.sd-stat { background: #fff; border: 1px solid #fed7aa; border-radius: 8px; padding: 6px 14px; text-align: center; min-width: 92px; }
.sd-stat b { display: block; font-size: 16px; color: #ea580c; font-weight: 700; }
.sd-stat span { font-size: 11px; color: #64748b; }
.sd-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.sd-card-hd { font-size: 14px; font-weight: 700; color: #0f172a; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; }
.sd-card-hd i { color: #ea580c; margin-right: 6px; }
.price-inherit-tag {
display: inline-block;
padding: 1px 6px;
border-radius: 4px;
background: #f1f5f9;
color: #64748b;
font-size: 11px;
margin-right: 4px;
margin-bottom: 3px;
}
.price-custom-tag {
display: inline-block;
padding: 2px 7px;
border-radius: 4px;
background: #eff6ff;
color: #1d4ed8;
border: 1px solid #93c5fd;
font-size: 11px;
font-weight: 700;
margin-right: 4px;
margin-bottom: 3px;
}
.price-addon-custom-tag {
display: inline-block;
padding: 2px 7px;
border-radius: 4px;
background: #fff7ed;
color: #c2410c;
border: 1px solid #fdba74;
font-size: 11px;
font-weight: 700;
margin-right: 4px;
margin-bottom: 3px;
}
</style>
<div class="sd-wrap">
<div class="sd-hero">
<div class="sd-hero-left">
<img class="sd-thumb" src="{$row.image|default='/assets/img/qrcode.png'|htmlentities}" onerror="this.src='/assets/img/qrcode.png'">
<div>
<div class="sd-title">
{$row.name|htmlentities}
<span class="label label-warning">{$catName|htmlentities}</span>
{if $row.status == 'normal'}
<span class="label label-success">上架中</span>
{else /}
<span class="label label-default">已隐藏</span>
{/if}
</div>
<div class="sd-sub">
计价单位:{$row.unit|htmlentities} &nbsp;|&nbsp;
步梯搬运:¥{$row.floor_fee}/层({$row.free_floor}层及以下免费) &nbsp;|&nbsp;
排序权重:{$row.weigh}
</div>
</div>
</div>
<div class="sd-stats">
<div class="sd-stat">
<b>{$orderCount}</b>
<span>历史订单(笔)</span>
</div>
<div class="sd-stat">
<b>¥{$orderGmv}</b>
<span>累计成交额</span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="sd-card">
<div class="sd-card-hd">
<span><i class="fa fa-check-circle"></i> 已启用主服务工项及基准定价 ({:count($serviceTypes)})</span>
</div>
{if empty($serviceTypes)}
<div class="text-muted text-center" style="padding:18px 0;">暂未配置主服务</div>
{else /}
<table class="table table-bordered table-condensed" style="margin-bottom:0;">
<thead>
<tr class="active">
<th>工项名称</th>
<th>标识</th>
<th>基准定价</th>
<th>默认首选</th>
</tr>
</thead>
<tbody>
{foreach name="serviceTypes" item="st"}
<tr>
<td><strong>{$st.name|default='-'|htmlentities}</strong></td>
<td><code>{$st.code|default='-'|htmlentities}</code></td>
<td>
{if (isset($st.support_fixed) && $st.support_fixed == 0) || $st.price <= 0}
<span class="label label-default">师傅报价</span>
{else /}
<strong style="color:#16a34a;">¥{$st.price}/{$row.unit|htmlentities}</strong>
{/if}
</td>
<td>
{if !empty($st.is_default)}
<span class="label label-primary">默认首选</span>
{else /}
<span class="text-muted">-</span>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</div>
<div class="col-sm-6">
<div class="sd-card">
<div class="sd-card-hd">
<span><i class="fa fa-plus-square"></i> 顺带增项服务及加价 ({:count($addons)})</span>
</div>
{if empty($addons)}
<div class="text-muted text-center" style="padding:18px 0;">未开启增项服务</div>
{else /}
<table class="table table-bordered table-condensed" style="margin-bottom:0;">
<thead>
<tr class="active">
<th>增项名称</th>
<th>标识</th>
<th>增项加价</th>
</tr>
</thead>
<tbody>
{foreach name="addons" item="ad"}
<tr>
<td><strong>{$ad.name|default='-'|htmlentities}</strong></td>
<td><code>{$ad.code|default='-'|htmlentities}</code></td>
<td><strong style="color:#ea580c;">+¥{$ad.price}/{$ad.unit|default=$row.unit|htmlentities}</strong></td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</div>
</div>
<div class="sd-card" style="margin-bottom:0;">
<div class="sd-card-hd">
<span><i class="fa fa-cubes"></i> 细分型号与规格专属多维定价矩阵 ({:count($specs)})</span>
<small class="text-muted" style="font-weight:400;">(支持每个规格一套独立工项价格,未单独设价自动沿用父级基准价)</small>
</div>
{if empty($specs)}
<div class="text-muted text-center" style="padding:14px 0;">未设置细分型号规格,下单全量按商品通用基准计价</div>
{else /}
<table class="table table-bordered table-hover table-condensed" style="margin-bottom:0;">
<thead>
<tr class="active">
<th style="width:46px;text-align:center;">序号</th>
<th style="width:160px;">细分规格/款式</th>
<th style="width:90px;text-align:center;">参考图</th>
<th style="min-width:260px;">主服务工项生效价(专属价 / 继承父级基准)</th>
<th style="min-width:260px;">增值服务生效加价(专属加价 / 继承父级增项)</th>
<th style="width:160px;">施工说明</th>
</tr>
</thead>
<tbody>
{foreach name="specs" item="sp" key="k"}
<?php
$spPrices = isset($sp['prices_map']) ? $sp['prices_map'] : [];
$spAddonPrices = isset($sp['addon_prices_map']) ? $sp['addon_prices_map'] : [];
$spImgRaw = isset($sp['image']) ? trim((string)$sp['image']) : '';
$spImgFull = $spImgRaw !== '' ? (strpos($spImgRaw, 'http') === 0 ? $spImgRaw : cdnurl($spImgRaw, true)) : '';
?>
<tr>
<td class="text-center text-muted" style="vertical-align:middle;">{$k+1}</td>
<td style="vertical-align:middle;"><strong>{$sp.name|htmlentities}</strong></td>
<td style="text-align:center;vertical-align:middle;">
{if $spImgFull}
<img src="{$spImgFull|htmlentities}" style="width:34px;height:34px;border-radius:4px;object-fit:cover;border:1px solid #e2e8f0;cursor:pointer;" onclick="window.open(this.src)" title="点击查看大图">
{else /}
<span class="text-muted" style="font-size:11.5px;">无图</span>
{/if}
</td>
<td style="vertical-align:middle;">
{if empty($serviceTypes)}
<span class="text-muted" style="font-size:12px;">父级未开启工项</span>
{else /}
<div style="display:flex;flex-wrap:wrap;gap:4px;">
{foreach name="serviceTypes" item="st"}
<?php
$c = $st['code'];
$hasCustom = isset($spPrices[$c]) && (float)$spPrices[$c] > 0;
$effectivePrice = $hasCustom ? (float)$spPrices[$c] : (float)$st['price'];
?>
{if $hasCustom}
<span class="price-custom-tag" title="该规格专属一口价">
{$st.name}: ¥{$effectivePrice} <span style="font-size:10px;font-weight:normal;">(专属)</span>
</span>
{else /}
<span class="price-inherit-tag" title="沿用父级基准一口价">
{$st.name}: ¥{$effectivePrice} <span style="font-size:10px;color:#94a3b8;">(继承)</span>
</span>
{/if}
{/foreach}
</div>
{/if}
</td>
<td style="vertical-align:middle;">
{if empty($addons)}
<span class="text-muted" style="font-size:12px;">未开启增值服务</span>
{else /}
<div style="display:flex;flex-wrap:wrap;gap:4px;">
{foreach name="addons" item="ad"}
<?php
$ac = !empty($ad['code']) ? $ad['code'] : $ad['name'];
$hasAddonCustom = isset($spAddonPrices[$ac]) && (float)$spAddonPrices[$ac] > 0;
$effectiveAddonPrice = $hasAddonCustom ? (float)$spAddonPrices[$ac] : (float)$ad['price'];
?>
{if $hasAddonCustom}
<span class="price-addon-custom-tag" title="该规格专属增值加价">
{$ad.name}: +¥{$effectiveAddonPrice} <span style="font-size:10px;font-weight:normal;">(专属)</span>
</span>
{else /}
<span class="price-inherit-tag" title="沿用父级增项基准加价">
{$ad.name}: +¥{$effectiveAddonPrice} <span style="font-size:10px;color:#94a3b8;">(继承)</span>
</span>
{/if}
{/foreach}
</div>
{/if}
</td>
<td class="text-muted" style="vertical-align:middle;">{$sp.description|default='-'|htmlentities}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" class="btn btn-primary btn-embossed" onclick="parent.Layer.closeAll();"><i class="fa fa-check"></i> 关闭窗口</button>
</div>
</div>
</div>