feat: 新增发布额度权益与订单管理功能,优化多端交互细节
这个提交包含在:
@@ -229,8 +229,8 @@
|
||||
<div class="form-group layer-footer fc-modal-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed"><i class="fa fa-undo"></i> 重置</button>
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">保存</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<div style="color: #92400E; font-size: 13px; font-weight: 600;">
|
||||
<span class="label label-warning" style="font-size: 11px; margin-right: 6px;">待审核</span> 该信息正在等待人工审核处理
|
||||
</div>
|
||||
<a href="javascript:;" id="btn-banner-to-audit" style="color: #D97706; font-size: 12px; font-weight: 600; text-decoration: underline;">立即前往审核</a>
|
||||
<a href="javascript:;" id="btn-banner-to-audit" title="立即前往审核" style="color: #D97706; font-size: 12px; font-weight: 600; text-decoration: underline;">审核</a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -106,7 +106,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}
|
||||
@@ -175,7 +182,7 @@
|
||||
<!-- 详情专属底部栏:清爽关闭 + 重审引导 -->
|
||||
<div class="fc-detail-footer" style="position: fixed; bottom: 0; left: 0; right: 0; background: #FFFFFF; border-top: 1px solid #E2E8F0; padding: 12px 20px; z-index: 99; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);">
|
||||
<div>
|
||||
<button type="button" class="btn btn-default btn-xs" id="btn-to-audit" style="color: #64748B;">重审此条信息</button>
|
||||
<button type="button" class="btn btn-default btn-xs" id="btn-to-audit" style="color: #64748B;" title="重审此条信息">重审</button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-default btn-embossed" id="btn-close" style="padding: 6px 22px;">关闭</button>
|
||||
|
||||
@@ -236,8 +236,8 @@
|
||||
<div class="form-group layer-footer fc-modal-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed"><i class="fa fa-undo"></i> 重置</button>
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">保存</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -7,27 +7,18 @@
|
||||
<div class="widget-body no-padding">
|
||||
<!-- 工具栏 -->
|
||||
<div id="toolbar" class="toolbar">
|
||||
<!-- 常态操作区(统一无图标,二字动词) -->
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}">刷新</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('fc/post/add')?'':'hide'}" title="{:__('Add')}">添加</a>
|
||||
<a class="btn btn-default btn-recyclebin btn-dialog {:$auth->check('fc/post/recyclebin')?'':'hide'}" href="fc/post/recyclebin" title="{:__('Recycle bin')}">回收</a>
|
||||
|
||||
<!-- 动态批量操作栏(统一无图标,二字动词) -->
|
||||
<div id="batch-bar" class="fc-batch-bar hide" style="display:inline-block;vertical-align:middle;margin-left:12px;">
|
||||
<span class="fc-batch-bar__tag">已选 <strong id="selected-count" class="text-primary">0</strong> 项</span>
|
||||
<button type="button" class="btn btn-sm btn-success btn-audit-pass" title="通过">通过</button>
|
||||
<button type="button" class="btn btn-sm btn-danger btn-audit-reject" title="驳回">驳回</button>
|
||||
<button type="button" class="btn btn-sm btn-warning btn-offline" title="下架">下架</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-top" title="置顶">置顶</button>
|
||||
<button type="button" class="btn btn-sm btn-danger btn-del" title="删除">删除</button>
|
||||
<button type="button" class="btn btn-sm btn-link text-muted btn-clear-selection" title="取消">取消</button>
|
||||
</div>
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}">{:__('Refresh')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('fc/post/add')?'':'hide'}" title="{:__('Add')}">{:__('Add')}</a>
|
||||
<a class="btn btn-default btn-recyclebin btn-dialog {:$auth->check('fc/post/recyclebin')?'':'hide'}" href="fc/post/recyclebin" title="{:__('Recycle bin')}">回收站</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('fc/post/del')?'':'hide'}" title="{:__('Delete')}">删除所选</a>
|
||||
</div>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('fc/post/edit')}"
|
||||
data-operate-del="{:$auth->check('fc/post/del')}"
|
||||
data-operate-top="{:$auth->check('fc/post/top')}"
|
||||
data-operate-status="{:$auth->check('fc/post/offline')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh')}
|
||||
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('fc/post/restore')?'':'hide'}" href="javascript:;" data-url="fc/post/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
|
||||
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('fc/post/destroy')?'':'hide'}" href="javascript:;" data-url="fc/post/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
|
||||
<a class="btn btn-success btn-restoreall {:$auth->check('fc/post/restore')?'':'hide'}" href="javascript:;" data-url="fc/post/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
|
||||
<a class="btn btn-danger btn-destroyall {:$auth->check('fc/post/destroy')?'':'hide'}" href="javascript:;" data-url="fc/post/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
|
||||
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('fc/post/restore')?'':'hide'}" href="javascript:;" data-url="fc/post/restore" data-action="restore" title="还原">还原</a>
|
||||
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('fc/post/destroy')?'':'hide'}" href="javascript:;" data-url="fc/post/destroy" data-action="destroy" title="销毁">销毁</a>
|
||||
<a class="btn btn-success btn-restoreall {:$auth->check('fc/post/restore')?'':'hide'}" href="javascript:;" data-url="fc/post/restore" title="还原全部">全还</a>
|
||||
<a class="btn btn-danger btn-destroyall {:$auth->check('fc/post/destroy')?'':'hide'}" href="javascript:;" data-url="fc/post/destroy" title="销毁全部">全毁</a>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover"
|
||||
data-operate-restore="{:$auth->check('fc/post/restore')}"
|
||||
|
||||
在新工单中引用
屏蔽一个用户