feat(dashboard): 从专业财富观角度重构升级后台收益与分成统计仪表盘
这个提交包含在:
@@ -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);
|
||||
|
||||
在新工单中引用
屏蔽一个用户