feat: 新增发布额度权益与订单管理功能,优化多端交互细节
这个提交包含在:
@@ -38,7 +38,14 @@
|
||||
<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: 20px;">
|
||||
<div style="display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px;">
|
||||
<span class="label label-default" style="font-size: 12px; padding: 4px 8px;">{$row.category_name|default='未分类'}</span>
|
||||
<div>
|
||||
<span class="label label-default" style="font-size: 12px; padding: 4px 8px;">{$row.category_name|default='未分类'}</span>
|
||||
{if isset($row.identity_type) && $row.identity_type == 2}
|
||||
<span class="label label-warning" style="font-size: 11px; padding: 3px 6px; margin-left: 6px;">商家发布</span>
|
||||
{else /}
|
||||
<span class="label label-info" style="font-size: 11px; padding: 3px 6px; margin-left: 6px;">个人发布</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="font-size: 20px; font-weight: 700; color: #EA580C;">
|
||||
{if $row.price > 0}
|
||||
¥ {$row.price} {if $row.price_unit}<small style="color: #64748B; font-size: 13px;">{$row.price_unit}</small>{/if}
|
||||
@@ -104,79 +111,27 @@
|
||||
</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 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: space-between; gap: 12px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);">
|
||||
<div class="fc-audit-nav">
|
||||
<button type="button" class="btn btn-default btn-sm" id="btn-prev" {if !$queue.prev}disabled{/if}>‹ 上一条</button>
|
||||
{if $queue.index > 0}
|
||||
<span class="fc-audit-nav__pos">第 <strong>{$queue.index}</strong> / {$queue.total} 条</span>
|
||||
{else /}
|
||||
<span class="fc-audit-nav__pos text-muted">不在待审核队列</span>
|
||||
{/if}
|
||||
<button type="button" class="btn btn-default btn-sm" id="btn-next" {if !$queue.next}disabled{/if}>下一条 ›</button>
|
||||
</div>
|
||||
<div class="fc-audit-actions">
|
||||
<span class="fc-audit-kbd">快捷键:A 通过 · R 驳回 · ← → 切换</span>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* 审核专属交互逻辑
|
||||
*/
|
||||
$(function () {
|
||||
var postId = {$row.id};
|
||||
var lastRejectReason = {$row.audit_reason ? json_encode($row.audit_reason) : '""'};
|
||||
|
||||
function submitAudit(status, reason) {
|
||||
Fast.api.ajax({
|
||||
url: 'fc/post/audit',
|
||||
type: 'POST',
|
||||
data: {
|
||||
ids: postId,
|
||||
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);
|
||||
});
|
||||
});
|
||||
// 队列信息供 post.js 的审核工作台使用
|
||||
window.postQueue = {:json_encode($queue)};
|
||||
</script>
|
||||
|
||||
在新工单中引用
屏蔽一个用户