文件
fenleixinxi/application/admin/view/fc/merchant/audit.html
MiAn 3a2fcf7142 feat: 重构后台管理界面样式并新增商户/帖子审核功能
- 重构后台所有管理页面工具栏,移除图标改用纯文字按钮
- 新增商户管理的批量审核功能与商家详情/审核页面
- 新增帖子管理的批量审核/上下架功能与帖子详情/审核页面
- 新增多媒体相册字段的前后台处理逻辑
- 新增微信订阅消息兼容导出层
- 更新站点版本号并优化品牌色变量
- 新增商户/帖子控制器的详情与审核方法
- 新增 .sql 文件忽略规则
2026-10-23 09:26:22 +08:00

179 行
9.8 KiB
HTML

<div class="fc-detail-container" style="padding: 15px 15px 75px 15px; background: #F8FAFC;">
<!-- 状态与入驻用户卡片 -->
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
<div class="panel-body" style="padding: 16px;">
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;">
<div style="display: flex; align-items: center; gap: 12px;">
<img src="{$row.logo|default='/assets/img/avatar.png'}" style="width: 50px; height: 50px; border-radius: 8px; object-fit: cover; border: 1px solid #E2E8F0;">
<div>
<div style="font-size: 16px; font-weight: 700; color: #1E293B;">
{$row.name|htmlentities}
<span class="label label-info" style="font-weight: normal; font-size: 11px; margin-left: 6px;">商户ID: {$row.id}</span>
</div>
<div style="font-size: 12px; color: #64748B; margin-top: 3px;">
行业分类:<strong>{$row.category|default='未归类'}</strong> · 绑定用户:{$userInfo.nickname|htmlentities} (UID: {$userInfo.id}) · 申请时间:{$row.createtime|date='Y-m-d H:i:s',###}
</div>
</div>
</div>
<div>
{if $row.audit_status == 1}
<span class="label label-success" style="font-size: 13px; padding: 6px 12px; border-radius: 4px;">已审核通过</span>
{elseif $row.audit_status == 2 /}
<span class="label label-danger" style="font-size: 13px; padding: 6px 12px; border-radius: 4px;">已驳回</span>
{else /}
<span class="label label-warning" style="font-size: 13px; padding: 6px 12px; border-radius: 4px;">待资质审核</span>
{/if}
</div>
</div>
{if $row.audit_status == 2 && $row.audit_reason}
<div style="margin-top: 14px; padding: 10px 14px; background: #FEF2F2; border: 1px solid #FCA5A5; border-radius: 6px; color: #991B1B; font-size: 13px;">
<strong>上次驳回原因:</strong>{$row.audit_reason|htmlentities}
</div>
{/if}
</div>
</div>
<!-- 联系与经营信息卡片 -->
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
<div class="panel-body" style="padding: 16px;">
<div class="row" style="margin: 0; font-size: 13px; color: #334155;">
<div class="col-xs-12 col-sm-6" style="margin-bottom: 10px;">
<span style="color: #64748B;">联系人姓名:</span><strong>{$row.contact|default='-'}</strong>
</div>
<div class="col-xs-12 col-sm-6" style="margin-bottom: 10px;">
<span style="color: #64748B;">绑定手机号:</span><strong>{$userInfo.mobile|default='未绑定'}</strong>
</div>
<div class="col-xs-12 col-sm-6" style="margin-bottom: 10px;">
<span style="color: #64748B;">营业状态:</span>
{if $row.shop_status == 'normal'}
<span class="text-success font-weight-bold">正常营业</span>
{else /}
<span class="text-muted">暂停歇业</span>
{/if}
</div>
<div class="col-xs-12 col-sm-6" style="margin-bottom: 10px;">
<span style="color: #64748B;">推荐状态:</span>
{if $row.recommend == 1}
<span class="label label-warning">首页推荐</span>
{else /}
<span class="text-muted">普通</span>
{/if}
</div>
<div class="col-xs-12" style="margin-top: 5px;">
<span style="color: #64748B;">商户公告/简介:</span>
<div style="background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 4px; padding: 10px; margin-top: 6px; line-height: 1.6;">
{$row.notice|default='(暂未设置商户公告)'|htmlentities}
</div>
</div>
</div>
</div>
</div>
<!-- 资质证照卡片 -->
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 20px;">
<div class="panel-heading" style="background: #FFFFFF; border-bottom: 1px solid #F1F5F9; font-weight: 700; color: #1E293B; font-size: 14px; padding: 12px 16px;">
资质证照与门头宣传图核验
</div>
<div class="panel-body" style="padding: 16px;">
<div class="row">
<div class="col-xs-12 col-sm-6">
<div style="font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px;">营业执照 / 经营凭据:</div>
{if !empty($row.license)}
<a href="{$row.license}" target="_blank" title="点击查看清晰原件" style="display: inline-block; max-width: 100%; border: 1px solid #CBD5E1; border-radius: 6px; overflow: hidden;">
<img src="{$row.license}" style="max-height: 180px; max-width: 100%; object-fit: contain;">
</a>
{else /}
<div style="padding: 20px; background: #F8FAFC; border: 1px dashed #E2E8F0; border-radius: 6px; text-align: center; color: #94A3B8;">未上传营业执照</div>
{/if}
</div>
<div class="col-xs-12 col-sm-6">
<div style="font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px;">门店横幅 / 环境宣传图:</div>
{if !empty($row.banner)}
<a href="{$row.banner}" target="_blank" title="点击查看大图" style="display: inline-block; max-width: 100%; border: 1px solid #CBD5E1; border-radius: 6px; overflow: hidden;">
<img src="{$row.banner}" style="max-height: 180px; max-width: 100%; object-fit: contain;">
</a>
{else /}
<div style="padding: 20px; background: #F8FAFC; border: 1px dashed #E2E8F0; border-radius: 6px; text-align: center; color: #94A3B8;">未上传横幅图</div>
{/if}
</div>
</div>
</div>
</div>
<!-- 审核专属底部操作栏:清爽三键 -->
<div class="fc-detail-footer" style="position: fixed; bottom: 0; left: 0; right: 0; background: #FFFFFF; border-top: 1px solid #E2E8F0; padding: 12px 24px; z-index: 99; display: flex; align-items: center; justify-content: flex-end; gap: 12px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);">
<button type="button" class="btn btn-danger btn-embossed" id="btn-reject" style="padding: 6px 22px; font-weight: 600;">驳回</button>
<button type="button" class="btn btn-success btn-embossed" id="btn-pass" style="padding: 6px 22px; font-weight: 600;">通过</button>
<button type="button" class="btn btn-default btn-embossed" id="btn-close" style="padding: 6px 18px;">关闭</button>
</div>
</div>
<script>
/**
* 商家资质审核交互逻辑
*/
$(function () {
var merchantId = {$row.id};
var lastRejectReason = {$row.audit_reason ? json_encode($row.audit_reason) : '""'};
function submitAudit(status, reason) {
Fast.api.ajax({
url: 'fc/merchant/audit',
type: 'POST',
data: {
ids: merchantId,
auditStatus: status,
reason: reason || ''
}
}, function (data, ret) {
Toastr.success(ret.msg || '操作成功');
setTimeout(function () {
var index = parent.Layer.getFrameIndex(window.name);
parent.Layer.close(index);
if (parent.$ && parent.$('#table').length) {
parent.$('#table').bootstrapTable('refresh');
}
}, 400);
return false;
}, function (data, ret) {
Toastr.error(ret.msg || '操作失败');
return false;
});
}
// 点击审核通过
$('#btn-pass').on('click', function () {
Layer.confirm('确认审核通过此商家的入驻申请吗?', {
title: '通过确认',
btn: ['通过', '取消']
}, function (index) {
Layer.close(index);
submitAudit(1, '');
});
});
// 点击驳回:弹窗确认输入驳回原因
$('#btn-reject').off('click').on('click', function () {
Layer.prompt({
title: '请输入驳回原因(将通知给申请商户)',
formType: 2,
value: (lastRejectReason || '')
}, function (value, promptIndex) {
var reason = $.trim(value);
if (!reason) {
Toastr.warning('驳回原因不可为空');
return;
}
Layer.close(promptIndex);
submitAudit(2, reason);
});
});
$('#btn-close').on('click', function () {
var index = parent.Layer.getFrameIndex(window.name);
parent.Layer.close(index);
});
});
</script>