feat(dashboard): 从专业财富观角度重构升级后台收益与分成统计仪表盘

这个提交包含在:
chen
2026-09-17 08:22:23 +08:00
父节点 64a9563779
当前提交 b6287bf2e0
共有 40 个文件被更改,包括 5145 次插入 和 1015 次删除

文件差异内容过多而无法显示 加载差异

查看文件

@@ -7,6 +7,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
setup() {
const state = reactive({ data: [], kpi: {} })
const pagination = reactive({ page: 1, list_rows: 10, total: 0 })
const previewDialog = reactive({
visible: false,
loading: false,
date: '',
result: null
})
function getData() {
Fast.api.ajax({
url: 'shopro/partner/daily',
@@ -36,8 +43,32 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}, function () { getData() })
}).catch(() => {})
}
function onOpenPreview() {
const yesterday = new Date(Date.now() - 86400000).toISOString().slice(0, 10)
previewDialog.date = yesterday
previewDialog.visible = true
runPreview()
}
function runPreview() {
if (!previewDialog.date) {
ElementPlus.ElMessage.warning('请选择试算日期')
return
}
previewDialog.loading = true
Fast.api.ajax({
url: 'shopro/partner/daily/preview',
type: 'GET',
data: { settle_date: previewDialog.date },
}, function (ret, res) {
previewDialog.loading = false
previewDialog.result = res.data || null
return false
}, function () {
previewDialog.loading = false
})
}
onMounted(() => { getData() })
return { state, pagination, getData, onDetail, onRerun }
return { state, pagination, getData, onDetail, onRerun, previewDialog, onOpenPreview, runPreview }
}
}
createApp('index', index);

查看文件

@@ -89,6 +89,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
})
const ext = reactive({ visible: false, text: '' })
const reissue = reactive({ visible: false, form: { user_id: '', reward_type: 'push3', amount: '', order_id: '', memo: '' } })
const orderTreeDialog = reactive({ visible: false, loading: false, data: {} })
function getData() {
let tempSearch = JSON.parse(JSON.stringify(state.filter.data));
@@ -180,6 +181,26 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
getData()
})
}
function onOrderTree(row) {
const orderId = row.order_id || (row.order && row.order.id);
if (!orderId || orderId <= 0) {
ElementPlus.ElMessage.warning('非业务订单流水,无整单透视数据');
return;
}
orderTreeDialog.loading = true;
orderTreeDialog.visible = true;
Fast.api.ajax({
url: 'shopro/partner/reward/orderTree',
type: 'GET',
data: { order_id: orderId },
}, function (ret, res) {
orderTreeDialog.loading = false;
orderTreeDialog.data = res.data || {};
return false;
}, function () {
orderTreeDialog.loading = false;
});
}
onMounted(() => {
const params = new URLSearchParams(location.search)
if (params.get('user_id')) {
@@ -194,7 +215,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
getData()
})
return { state, getData, onOpenFilter, onChangeFilter, pagination, exportLoading, onExport, ext, onViewExt, onBack, onBackOrder, reissue, onReissue }
return { state, getData, onOpenFilter, onChangeFilter, pagination, exportLoading, onExport, ext, onViewExt, onBack, onBackOrder, reissue, onReissue, orderTreeDialog, onOrderTree }
}
}
createApp('index', index);