diff --git a/src/layout/index.vue b/src/layout/index.vue index 9eb7f32..d5135f9 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -62,7 +62,7 @@ export default { { path: '/jd-instruction/index', label: '中控', icon: 'el-icon-s-operation', permissions: ['jdorder:instruction:list'] }, { path: '/mobile/fadan', label: '发单', icon: 'el-icon-edit-outline' }, { path: '/mobile/xianyu-publish', label: '发品', icon: 'el-icon-goods' }, - { path: '/mobile/zhongcao', label: '种草', icon: 'el-icon-chat-dot-round' } + { path: '/mobile/profit', label: '报表', icon: 'el-icon-data-analysis' } ] return items.filter(it => !it.permissions || auth.hasPermiOr(it.permissions)) }, diff --git a/src/router/index.js b/src/router/index.js index 4e1d905..c1a0590 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -136,11 +136,15 @@ export const constantRoutes = [ name: 'MobileXianyuPublish', meta: { title: '发品' } }, + { + path: 'profit', + component: () => import('@/views/system/jdorder/profit-analysis'), + name: 'MobileProfit', + meta: { title: '报表' } + }, { path: 'zhongcao', - component: () => import('@/views/mobile/zhongcao/index'), - name: 'MobileZhongcao', - meta: { title: '种草' } + redirect: '/mobile/profit' } ] } diff --git a/src/views/mobile/zhongcao/index.vue b/src/views/mobile/zhongcao/index.vue deleted file mode 100644 index 700f1cf..0000000 --- a/src/views/mobile/zhongcao/index.vue +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - - - - 生成种草文案 - - 清空 - - - - - - - - 种草文案(AI) - - 高转化种草 - 复制 - - {{ result.seedNote }} - - - - - - - 代下单 - 复制 - - {{ result.daixiadan }} - - - - 教你下单 - 复制 - - {{ result.jiaonixiadan }} - - - - - - - - - - - diff --git a/src/views/system/jdorder/profit-analysis.vue b/src/views/system/jdorder/profit-analysis.vue index b484a7d..c652fb5 100644 --- a/src/views/system/jdorder/profit-analysis.vue +++ b/src/views/system/jdorder/profit-analysis.vue @@ -1,19 +1,20 @@ - + 慢单利润 / 订单 AI 分析 - + - + 日报 周报 月报 @@ -26,23 +27,30 @@ :value-format="dateValueFormat" :placeholder="datePlaceholder" clearable - style="width: 220px" + :style="{ width: mobileLayout ? '100%' : '220px' }" /> - + 预览统计 AI 分析 分析并推送 测试推送 最近一次 + + 看数据 + 最近一次 + 分析并推送 + 只分析 + 测试推送 + 统计区间 {{ current.beginDate }} ~ {{ current.endDate }} · {{ current.label }} - + {{ item.title }} {{ item.display }} @@ -51,7 +59,27 @@ - + + 分销类型 + + {{ row.name }} + 有效 {{ fmtNum(row.validOrderCount) }} · 退款 {{ fmtNum(row.refundCount) }} · 利润 {{ money(row.totalProfit) }} · {{ fmtNum(row.profitRatePct) }}% + + 分销标记 + + {{ row.name }} {{ row.kind }} + {{ fmtNum(row.orderCount) }} 单 · 付款 {{ money(row.payment) }} · 利润 {{ money(row.profit) }} + + 无 + 型号 + + {{ row.name }} + {{ fmtNum(row.orderCount) }} 单 · 利润 {{ money(row.profit) }} + + 无 + + + 分销类型(自有单 / 代下单 F-W·F-H / 代下单单) @@ -73,7 +101,7 @@ - + 分销标记 @@ -133,7 +161,18 @@ 发送记录 刷新 - + + 暂无发送记录 + + + {{ row.periodLabel || '—' }} + {{ row.pushed ? '已推送' : '失败' }} + + {{ row.sentAt }} · {{ triggerLabel(row.trigger) }} · 利润 {{ money(row.totalProfit) }} + {{ row.pushError || row.aiError }} + + + @@ -162,12 +201,12 @@ - + {{ logDialogMeta }} {{ logDialogReport }} - + 提交给模型 {{ llmChars }} 字符(无缩进列数组;框内换行只为方便看,上方卡片仍是完整对象) @@ -201,6 +240,9 @@ export default { } }, computed: { + mobileLayout() { + return this.$store.getters.device === 'mobile' + }, datePickerType() { if (this.periodType === 'month') return 'month' return 'date' @@ -537,4 +579,88 @@ export default { font-size: 14px; color: #303133; } +.profit-analysis--mobile .period-group { + display: flex; + width: 100%; +} +.profit-analysis--mobile .period-group ::v-deep .el-radio-button { + flex: 1; +} +.profit-analysis--mobile .period-group ::v-deep .el-radio-button__inner { + width: 100%; + padding-left: 0; + padding-right: 0; +} +.profit-analysis--mobile .el-form-item { + display: block; + margin-right: 0; +} +.profit-analysis--mobile .el-date-editor.el-input { + width: 100%; +} +.mobile-actions { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 8px; +} +.mobile-actions .el-button { + margin: 0; + width: 100%; +} +.mobile-actions .span-2 { + grid-column: 1 / -1; +} +.profit-analysis--mobile .summary-value { + font-size: 18px; +} +.mobile-groups, +.log-list { + margin-bottom: 12px; +} +.group-title { + margin: 12px 0 6px; + font-size: 14px; + font-weight: 600; + color: #303133; +} +.group-row, +.log-item { + margin-bottom: 8px; + padding: 10px 12px; + background: #fff; + border: 1px solid #ebeef5; + border-radius: 6px; +} +.group-name, +.log-item-top { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + font-size: 14px; + color: #303133; + word-break: break-all; +} +.group-kind { + flex: none; + color: #909399; + font-size: 12px; +} +.group-meta, +.log-item-sub { + margin-top: 4px; + color: #606266; + font-size: 12px; + line-height: 1.5; +} +.log-item-err, +.group-empty { + margin-top: 4px; + color: #e6a23c; + font-size: 12px; +} +.group-empty { + margin-top: 0; + color: #909399; +}
{{ result.daixiadan }}
{{ result.jiaonixiadan }}
{{ logDialogMeta }}
{{ logDialogReport }}