优化样式
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { isArray, isString } from 'lodash-es'
|
||||
import type { PropType, VNode } from 'vue'
|
||||
import { computed, createVNode, defineComponent, reactive, resolveComponent } from 'vue'
|
||||
import { dayjs } from 'element-plus'
|
||||
import { getArea } from '/@/api/common'
|
||||
import type { InputAttr, InputData, ModelValueTypes } from '/@/components/baInput'
|
||||
import { inputTypes } from '/@/components/baInput'
|
||||
@@ -40,6 +41,29 @@ export default defineComponent({
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
setup(props, { emit, slots }) {
|
||||
const normalizeDateTimeValue = (value: unknown, format: string) => {
|
||||
if (value === null || value === undefined || value === '') {
|
||||
return value
|
||||
}
|
||||
if (typeof value === 'number' && Number.isFinite(value)) {
|
||||
const ms = value > 9999999999 ? value : value * 1000
|
||||
const d = dayjs(ms)
|
||||
return d.isValid() ? d.format(format) : value
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
const trimmed = value.trim()
|
||||
if (/^\d{10,13}$/.test(trimmed)) {
|
||||
const num = Number(trimmed)
|
||||
if (Number.isFinite(num)) {
|
||||
const ms = trimmed.length === 13 ? num : num * 1000
|
||||
const d = dayjs(ms)
|
||||
return d.isValid() ? d.format(format) : value
|
||||
}
|
||||
}
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
// 合并 props.attr 和 props.data
|
||||
const attrs = computed(() => {
|
||||
return { ...props.attr, ...props.data }
|
||||
@@ -186,6 +210,7 @@ export default defineComponent({
|
||||
valueFormat = 'YYYY'
|
||||
break
|
||||
}
|
||||
const valueComputed = computed(() => normalizeDateTimeValue(props.modelValue, valueFormat))
|
||||
return () =>
|
||||
createVNode(
|
||||
resolveComponent('el-date-picker'),
|
||||
@@ -194,7 +219,7 @@ export default defineComponent({
|
||||
type: props.type,
|
||||
'value-format': valueFormat,
|
||||
...attrs.value,
|
||||
modelValue: props.modelValue,
|
||||
modelValue: valueComputed.value,
|
||||
'onUpdate:modelValue': onValueUpdate,
|
||||
},
|
||||
slots
|
||||
@@ -300,7 +325,7 @@ export default defineComponent({
|
||||
'year',
|
||||
() => {
|
||||
return () => {
|
||||
const valueComputed = computed(() => (!props.modelValue ? null : '' + props.modelValue))
|
||||
const valueComputed = computed(() => normalizeDateTimeValue(props.modelValue, 'YYYY'))
|
||||
return createVNode(
|
||||
resolveComponent('el-date-picker'),
|
||||
{
|
||||
|
||||
@@ -2,8 +2,11 @@ export default {
|
||||
'quick Search Fields': 'ID/Settlement period ID/Remark',
|
||||
id: 'ID',
|
||||
settlement_period_id: 'Settlement period ID',
|
||||
settlement_period_no: 'Settlement no.',
|
||||
channel_id: 'Channel ID',
|
||||
channel_name: 'Channel',
|
||||
admin_id: 'Agent admin ID',
|
||||
admin_username: 'Agent username',
|
||||
commission_rate: 'Commission rate',
|
||||
calc_base_amount: 'Calculation base amount',
|
||||
commission_amount: 'Commission amount',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export default {
|
||||
export default {
|
||||
'quick Search Fields': 'ID / Period / Idempotency',
|
||||
id: 'ID',
|
||||
period_id: 'Period ID',
|
||||
@@ -24,6 +24,12 @@ export default {
|
||||
update_time: 'Updated',
|
||||
gamePeriod_period_no: 'Period (relation)',
|
||||
gamePeriod_status: 'Period status',
|
||||
'gamePeriod_status 0': 'Open for betting',
|
||||
'gamePeriod_status 1': 'Closed',
|
||||
'gamePeriod_status 2': 'Settling tickets',
|
||||
'gamePeriod_status 3': 'Paying out',
|
||||
'gamePeriod_status 4': 'Finished',
|
||||
'gamePeriod_status 5': 'Voided',
|
||||
user_username: 'Username',
|
||||
channel_name: 'Channel',
|
||||
}
|
||||
|
||||
@@ -2,8 +2,11 @@ export default {
|
||||
'quick Search Fields': 'ID/结算周期ID/备注',
|
||||
id: 'ID',
|
||||
settlement_period_id: '结算周期ID',
|
||||
settlement_period_no: '结算周期号',
|
||||
channel_id: '渠道ID',
|
||||
channel_name: '渠道名称',
|
||||
admin_id: '代理管理员ID',
|
||||
admin_username: '代理账号',
|
||||
commission_rate: '佣金比例',
|
||||
calc_base_amount: '结算基数',
|
||||
commission_amount: '佣金金额',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default {
|
||||
'quick Search Fields': 'ID/期号/幂等键',
|
||||
id: 'ID',
|
||||
period_id: '期ID',
|
||||
period_id: '对局ID',
|
||||
period_no: '期号',
|
||||
user_id: '用户ID',
|
||||
channel_id: '渠道ID',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default {
|
||||
export default {
|
||||
'quick Search Fields': 'ID/期号/幂等键',
|
||||
id: 'ID',
|
||||
period_id: '期ID',
|
||||
period_id: '对局ID',
|
||||
period_no: '期号',
|
||||
user_id: '用户ID',
|
||||
channel_id: '渠道ID',
|
||||
@@ -24,6 +24,12 @@ export default {
|
||||
update_time: '更新时间',
|
||||
gamePeriod_period_no: '对局期号',
|
||||
gamePeriod_status: '期状态',
|
||||
'gamePeriod_status 0': '下注开放',
|
||||
'gamePeriod_status 1': '已封盘',
|
||||
'gamePeriod_status 2': '算票中',
|
||||
'gamePeriod_status 3': '派彩中',
|
||||
'gamePeriod_status 4': '已结束',
|
||||
'gamePeriod_status 5': '已作废',
|
||||
user_username: '用户名',
|
||||
channel_name: '渠道',
|
||||
}
|
||||
|
||||
@@ -37,9 +37,43 @@ const baTable = new baTableClass(
|
||||
column: [
|
||||
{ type: 'selection', align: 'center', operator: false },
|
||||
{ label: t('agent.commissionRecord.id'), prop: 'id', align: 'center', width: 80, operator: 'RANGE', sortable: 'custom' },
|
||||
{ label: t('agent.commissionRecord.settlement_period_id'), prop: 'settlement_period_id', align: 'center', width: 130, operator: 'RANGE' },
|
||||
{ label: t('agent.commissionRecord.channel_id'), prop: 'channel_id', align: 'center', width: 100, operator: 'RANGE' },
|
||||
{ label: t('agent.commissionRecord.admin_id'), prop: 'admin_id', align: 'center', width: 100, operator: 'RANGE' },
|
||||
{
|
||||
label: t('agent.commissionRecord.settlement_period_id'),
|
||||
prop: 'settlement_period_id',
|
||||
align: 'center',
|
||||
width: 130,
|
||||
operator: 'RANGE',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
label: t('agent.commissionRecord.settlement_period_no'),
|
||||
prop: 'settlementPeriod.settlement_no',
|
||||
align: 'center',
|
||||
minWidth: 170,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
render: 'tags',
|
||||
},
|
||||
{ label: t('agent.commissionRecord.channel_id'), prop: 'channel_id', align: 'center', width: 100, operator: 'RANGE', show: false },
|
||||
{
|
||||
label: t('agent.commissionRecord.channel_name'),
|
||||
prop: 'channel.name',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
render: 'tags',
|
||||
},
|
||||
{ label: t('agent.commissionRecord.admin_id'), prop: 'admin_id', align: 'center', width: 100, operator: 'RANGE', show: false },
|
||||
{
|
||||
label: t('agent.commissionRecord.admin_username'),
|
||||
prop: 'admin.username',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
render: 'tags',
|
||||
},
|
||||
{ label: t('agent.commissionRecord.commission_rate'), prop: 'commission_rate', align: 'center', minWidth: 110, operator: 'RANGE' },
|
||||
{ label: t('agent.commissionRecord.calc_base_amount'), prop: 'calc_base_amount', align: 'center', minWidth: 120, operator: 'RANGE' },
|
||||
{ label: t('agent.commissionRecord.commission_amount'), prop: 'commission_amount', align: 'center', minWidth: 120, operator: 'RANGE' },
|
||||
@@ -48,15 +82,59 @@ const baTable = new baTableClass(
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
effect: 'dark',
|
||||
custom: { 0: 'info', 1: 'warning', 2: 'success' },
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
replaceValue: { '0': t('agent.commissionRecord.status 0'), '1': t('agent.commissionRecord.status 1'), '2': t('agent.commissionRecord.status 2') },
|
||||
replaceValue: {
|
||||
'0': t('agent.commissionRecord.status 0'),
|
||||
'1': t('agent.commissionRecord.status 1'),
|
||||
'2': t('agent.commissionRecord.status 2'),
|
||||
},
|
||||
},
|
||||
{ label: t('agent.commissionRecord.settled_at'), prop: 'settled_at', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{ label: t('agent.commissionRecord.remark'), prop: 'remark', align: 'center', minWidth: 160, operator: 'LIKE', operatorPlaceholder: t('Fuzzy query'), showOverflowTooltip: true },
|
||||
{ label: t('agent.commissionRecord.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{ label: t('agent.commissionRecord.update_time'), prop: 'update_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{ label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
{
|
||||
label: t('agent.commissionRecord.settled_at'),
|
||||
prop: 'settled_at',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{
|
||||
label: t('agent.commissionRecord.remark'),
|
||||
prop: 'remark',
|
||||
align: 'center',
|
||||
minWidth: 160,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
{
|
||||
label: t('agent.commissionRecord.create_time'),
|
||||
prop: 'create_time',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{
|
||||
label: t('agent.commissionRecord.update_time'),
|
||||
prop: 'update_time',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{ label: t('Operate'), align: 'center', minWidth: 80, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -77,4 +155,3 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
|
||||
@@ -37,25 +37,99 @@ const baTable = new baTableClass(
|
||||
column: [
|
||||
{ type: 'selection', align: 'center', operator: false },
|
||||
{ label: t('agent.settlementPeriod.id'), prop: 'id', align: 'center', width: 80, operator: 'RANGE', sortable: 'custom' },
|
||||
{ label: t('agent.settlementPeriod.settlement_no'), prop: 'settlement_no', align: 'center', minWidth: 160, operator: 'LIKE', operatorPlaceholder: t('Fuzzy query') },
|
||||
{ label: t('agent.settlementPeriod.period_start_at'), prop: 'period_start_at', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{ label: t('agent.settlementPeriod.period_end_at'), prop: 'period_end_at', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{
|
||||
label: t('agent.settlementPeriod.settlement_no'),
|
||||
prop: 'settlement_no',
|
||||
align: 'center',
|
||||
minWidth: 160,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
},
|
||||
{
|
||||
label: t('agent.settlementPeriod.period_start_at'),
|
||||
prop: 'period_start_at',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{
|
||||
label: t('agent.settlementPeriod.period_end_at'),
|
||||
prop: 'period_end_at',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{ label: t('agent.settlementPeriod.total_bet_amount'), prop: 'total_bet_amount', align: 'center', operator: 'RANGE', minWidth: 120 },
|
||||
{ label: t('agent.settlementPeriod.total_payout_amount'), prop: 'total_payout_amount', align: 'center', operator: 'RANGE', minWidth: 120 },
|
||||
{ label: t('agent.settlementPeriod.platform_profit_amount'), prop: 'platform_profit_amount', align: 'center', operator: 'RANGE', minWidth: 120 },
|
||||
{
|
||||
label: t('agent.settlementPeriod.total_payout_amount'),
|
||||
prop: 'total_payout_amount',
|
||||
align: 'center',
|
||||
operator: 'RANGE',
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
label: t('agent.settlementPeriod.platform_profit_amount'),
|
||||
prop: 'platform_profit_amount',
|
||||
align: 'center',
|
||||
operator: 'RANGE',
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
label: t('agent.settlementPeriod.status'),
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
effect: 'dark',
|
||||
custom: { 0: 'info', 1: 'warning', 2: 'success', 3: 'danger' },
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
replaceValue: { '0': t('agent.settlementPeriod.status 0'), '1': t('agent.settlementPeriod.status 1'), '2': t('agent.settlementPeriod.status 2'), '3': t('agent.settlementPeriod.status 3') },
|
||||
replaceValue: {
|
||||
'0': t('agent.settlementPeriod.status 0'),
|
||||
'1': t('agent.settlementPeriod.status 1'),
|
||||
'2': t('agent.settlementPeriod.status 2'),
|
||||
'3': t('agent.settlementPeriod.status 3'),
|
||||
},
|
||||
},
|
||||
{ label: t('agent.settlementPeriod.remark'), prop: 'remark', align: 'center', minWidth: 160, operator: 'LIKE', operatorPlaceholder: t('Fuzzy query'), showOverflowTooltip: true },
|
||||
{ label: t('agent.settlementPeriod.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{ label: t('agent.settlementPeriod.update_time'), prop: 'update_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', width: 170, sortable: 'custom', timeFormat: 'yyyy-mm-dd hh:MM:ss' },
|
||||
{ label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
{
|
||||
label: t('agent.settlementPeriod.remark'),
|
||||
prop: 'remark',
|
||||
align: 'center',
|
||||
minWidth: 160,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
{
|
||||
label: t('agent.settlementPeriod.create_time'),
|
||||
prop: 'create_time',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{
|
||||
label: t('agent.settlementPeriod.update_time'),
|
||||
prop: 'update_time',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
width: 170,
|
||||
sortable: 'custom',
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{ label: t('Operate'), align: 'center', minWidth: 80, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -76,4 +150,3 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
|
||||
@@ -90,16 +90,18 @@ const baTable = new baTableClass(
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: { disable: 'danger', enable: 'success' },
|
||||
replaceValue: { disable: t('Disable'), enable: t('Enable') },
|
||||
},
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '100',
|
||||
minWidth: '80',
|
||||
render: 'buttons',
|
||||
buttons: optButtons,
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined, 'status'],
|
||||
|
||||
@@ -90,7 +90,17 @@ const baTable = new baTableClass(new baTableApi('/admin/auth.AdminLog/'), {
|
||||
showOverflowTooltip: true,
|
||||
render: 'url',
|
||||
},
|
||||
{ label: t('auth.adminLog.ip'), prop: 'ip', align: 'center', operator: 'LIKE', operatorPlaceholder: t('Fuzzy query'), render: 'tag' },
|
||||
{
|
||||
label: t('auth.adminLog.ip'),
|
||||
prop: 'ip',
|
||||
align: 'center',
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
render: 'tag',
|
||||
customRenderAttr: {
|
||||
tag: () => ({ type: 'info' }),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('auth.adminLog.useragent'),
|
||||
prop: 'useragent',
|
||||
@@ -111,10 +121,11 @@ const baTable = new baTableClass(new baTableApi('/admin/auth.AdminLog/'), {
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '100',
|
||||
minWidth: '80',
|
||||
render: 'buttons',
|
||||
buttons: optButtons,
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
|
||||
@@ -67,12 +67,20 @@ const baTable: baTableClass = new baTableClass(
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: { 0: 'danger', 1: 'success' },
|
||||
replaceValue: { 0: t('Disable'), 1: t('Enable') },
|
||||
},
|
||||
{ label: t('Update time'), prop: 'update_time', align: 'center', width: '160', render: 'datetime' },
|
||||
{ label: t('Create time'), prop: 'create_time', align: 'center', width: '160', render: 'datetime' },
|
||||
{ label: t('Operate'), align: 'center', width: '130', render: 'buttons', buttons: defaultOptButtons(['edit', 'delete']) },
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '80',
|
||||
render: 'buttons',
|
||||
buttons: defaultOptButtons(['edit', 'delete']),
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -68,9 +68,10 @@ const baTable = new baTableClass(
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '130',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: defaultOptButtons(),
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dragSortLimitField: 'pid',
|
||||
|
||||
@@ -22,6 +22,7 @@ import { defaultOptButtons } from '/@/components/table'
|
||||
import TableHeader from '/@/components/table/header/index.vue'
|
||||
import Table from '/@/components/table/index.vue'
|
||||
import baTableClass from '/@/utils/baTable'
|
||||
import createAxios from '/@/utils/axios'
|
||||
|
||||
defineOptions({
|
||||
name: 'channel',
|
||||
@@ -29,7 +30,29 @@ defineOptions({
|
||||
|
||||
const { t } = useI18n()
|
||||
const tableRef = useTemplateRef('tableRef')
|
||||
const optButtons: OptButton[] = defaultOptButtons(['edit', 'delete'])
|
||||
let optButtons: OptButton[] = [
|
||||
{
|
||||
render: 'confirmButton',
|
||||
name: 'manualSettle',
|
||||
title: 'channel.manual_settle',
|
||||
text: '',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Clock',
|
||||
class: 'table-row-manual-settle',
|
||||
popconfirm: {
|
||||
confirmButtonText: t('channel.manual_settle'),
|
||||
cancelButtonText: t('Cancel'),
|
||||
confirmButtonType: 'warning',
|
||||
title: t('channel.manual_settle_confirm'),
|
||||
},
|
||||
disabledTip: false,
|
||||
click: async (row: TableRow) => {
|
||||
await createAxios({ url: '/admin/channel/manualSettle', method: 'post', data: { id: row.id } }, { showSuccessMessage: true })
|
||||
baTable.onTableHeaderAction('refresh', { event: 'manual-settle' })
|
||||
},
|
||||
},
|
||||
]
|
||||
optButtons = optButtons.concat(defaultOptButtons(['edit', 'delete']))
|
||||
const formatRatePercent = (_row: any, _column: any, cellValue: number | string | null) => {
|
||||
if (cellValue === null || cellValue === undefined || cellValue === '') return '-'
|
||||
const num = Number(cellValue)
|
||||
@@ -74,6 +97,10 @@ const baTable = new baTableClass(
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
turnover: 'primary',
|
||||
affiliate: 'success',
|
||||
},
|
||||
replaceValue: {
|
||||
turnover: t('channel.agent_mode turnover'),
|
||||
affiliate: t('channel.agent_mode affiliate'),
|
||||
@@ -115,6 +142,80 @@ const baTable = new baTableClass(
|
||||
operator: 'RANGE',
|
||||
formatter: formatAmountInt,
|
||||
},
|
||||
{
|
||||
label: t('channel.affiliate_contract_no'),
|
||||
prop: 'affiliate_contract_no',
|
||||
align: 'center',
|
||||
minWidth: 140,
|
||||
sortable: false,
|
||||
operator: 'LIKE',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
{
|
||||
label: t('channel.settle_cycle'),
|
||||
prop: 'settle_cycle',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'tag',
|
||||
custom: { daily: 'info', weekly: 'primary', monthly: 'success' },
|
||||
replaceValue: {
|
||||
daily: t('channel.settle_cycle daily'),
|
||||
weekly: t('channel.settle_cycle weekly'),
|
||||
monthly: t('channel.settle_cycle monthly'),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('channel.settle_weekday'),
|
||||
prop: 'settle_weekday',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'tag',
|
||||
custom: { '1': 'info', '2': 'info', '3': 'info', '4': 'info', '5': 'info', '6': 'success', '7': 'success' },
|
||||
replaceValue: {
|
||||
'1': t('channel.weekday 1'),
|
||||
'2': t('channel.weekday 2'),
|
||||
'3': t('channel.weekday 3'),
|
||||
'4': t('channel.weekday 4'),
|
||||
'5': t('channel.weekday 5'),
|
||||
'6': t('channel.weekday 6'),
|
||||
'7': t('channel.weekday 7'),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('channel.settle_time'),
|
||||
prop: 'settle_time',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
operator: 'LIKE',
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
label: t('channel.affiliate_effective_start_at'),
|
||||
prop: 'affiliate_effective_start_at',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
sortable: 'custom',
|
||||
width: 160,
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{
|
||||
label: t('channel.affiliate_effective_end_at'),
|
||||
prop: 'affiliate_effective_end_at',
|
||||
align: 'center',
|
||||
render: 'datetime',
|
||||
operator: 'RANGE',
|
||||
comSearchRender: 'datetime',
|
||||
sortable: 'custom',
|
||||
width: 160,
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{
|
||||
label: t('channel.user_count'),
|
||||
prop: 'user_count',
|
||||
|
||||
@@ -63,6 +63,12 @@ const baTable = new baTableClass(
|
||||
width: 110,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
string: 'primary',
|
||||
int: 'success',
|
||||
decimal: 'warning',
|
||||
json: 'info',
|
||||
},
|
||||
replaceValue: {
|
||||
string: t('config.gameConfig.value_type string'),
|
||||
int: t('config.gameConfig.value_type int'),
|
||||
@@ -101,7 +107,7 @@ const baTable = new baTableClass(
|
||||
width: 170,
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{ label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
{ label: t('Operate'), align: 'center', width: 80, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
},
|
||||
|
||||
@@ -385,13 +385,14 @@ const baTable = new baTableClass(
|
||||
align: 'center',
|
||||
render: 'tag',
|
||||
sortable: false,
|
||||
effect: 'dark',
|
||||
replaceValue: {
|
||||
delete: t('crud.log.status delete'),
|
||||
success: t('crud.log.status success'),
|
||||
error: t('crud.log.status error'),
|
||||
start: t('crud.log.status start'),
|
||||
},
|
||||
custom: { delete: 'danger', success: 'success', error: 'warning', start: '' },
|
||||
custom: { delete: 'danger', success: 'success', error: 'warning', start: 'info' },
|
||||
},
|
||||
{
|
||||
label: t('crud.log.create_time'),
|
||||
|
||||
@@ -63,6 +63,12 @@ const baTable = new baTableClass(
|
||||
width: 110,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
string: 'primary',
|
||||
int: 'success',
|
||||
decimal: 'warning',
|
||||
json: 'info',
|
||||
},
|
||||
replaceValue: {
|
||||
string: t('game.config.value_type string'),
|
||||
int: t('game.config.value_type int'),
|
||||
|
||||
@@ -100,6 +100,15 @@ const baTable = new baTableClass(
|
||||
width: 110,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: {
|
||||
'0': 'success',
|
||||
'1': 'warning',
|
||||
'2': 'info',
|
||||
'3': 'primary',
|
||||
'4': 'warning',
|
||||
'5': 'danger',
|
||||
},
|
||||
replaceValue: {
|
||||
'0': t('game.period.status 0'),
|
||||
'1': t('game.period.status 1'),
|
||||
@@ -116,6 +125,10 @@ const baTable = new baTableClass(
|
||||
width: 110,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'0': 'info',
|
||||
'1': 'warning',
|
||||
},
|
||||
replaceValue: {
|
||||
'0': t('game.period.draw_mode 0'),
|
||||
'1': t('game.period.draw_mode 1'),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="default-main ba-table-box">
|
||||
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info" show-icon />
|
||||
|
||||
@@ -83,21 +83,37 @@ const baTable = new baTableClass(
|
||||
width: 100,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: {
|
||||
'0': 'success',
|
||||
'1': 'warning',
|
||||
'2': 'info',
|
||||
'3': 'primary',
|
||||
'4': 'warning',
|
||||
'5': 'danger',
|
||||
},
|
||||
replaceValue: {
|
||||
'0': '下注开放',
|
||||
'1': '已封盘',
|
||||
'2': '算票中',
|
||||
'3': '派彩中',
|
||||
'4': '已结束',
|
||||
'5': '已作废',
|
||||
'0': t('order.betOrder.gamePeriod_status 0'),
|
||||
'1': t('order.betOrder.gamePeriod_status 1'),
|
||||
'2': t('order.betOrder.gamePeriod_status 2'),
|
||||
'3': t('order.betOrder.gamePeriod_status 3'),
|
||||
'4': t('order.betOrder.gamePeriod_status 4'),
|
||||
'5': t('order.betOrder.gamePeriod_status 5'),
|
||||
},
|
||||
},
|
||||
{ label: t('order.betOrder.user_id'), prop: 'user_id', align: 'center', width: 90, operator: 'RANGE' },
|
||||
{
|
||||
label: t('order.betOrder.user_id'),
|
||||
prop: 'user_id',
|
||||
align: 'center',
|
||||
show: false,
|
||||
width: 90,
|
||||
operator: 'RANGE',
|
||||
},
|
||||
{
|
||||
label: t('order.betOrder.user_username'),
|
||||
prop: 'user.username',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
minWidth: 120,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
operator: 'LIKE',
|
||||
render: 'tags',
|
||||
@@ -144,6 +160,10 @@ const baTable = new baTableClass(
|
||||
width: 90,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'0': 'info',
|
||||
'1': 'primary',
|
||||
},
|
||||
replaceValue: {
|
||||
'0': t('order.betOrder.is_auto 0'),
|
||||
'1': t('order.betOrder.is_auto 1'),
|
||||
@@ -172,6 +192,12 @@ const baTable = new baTableClass(
|
||||
width: 100,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: {
|
||||
'1': 'warning',
|
||||
'2': 'success',
|
||||
'3': 'danger',
|
||||
},
|
||||
replaceValue: {
|
||||
'1': t('order.betOrder.status 1'),
|
||||
'2': t('order.betOrder.status 2'),
|
||||
@@ -228,6 +254,3 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +73,13 @@ const baTable = new baTableClass(
|
||||
width: 100,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: {
|
||||
'0': 'info',
|
||||
'1': 'warning',
|
||||
'2': 'success',
|
||||
'3': 'danger',
|
||||
},
|
||||
replaceValue: {
|
||||
'0': t('order.depositOrder.status 0'),
|
||||
'1': t('order.depositOrder.status 1'),
|
||||
@@ -130,7 +137,15 @@ const baTable = new baTableClass(
|
||||
width: 170,
|
||||
timeFormat: 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
{ label: t('Operate'), align: 'center', width: 90, render: 'buttons', buttons: optButtons, operator: false, fixed: 'right' },
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: 90,
|
||||
render: 'buttons',
|
||||
buttons: optButtons,
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="default-main ba-table-box">
|
||||
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info" show-icon />
|
||||
|
||||
@@ -52,6 +52,13 @@ const baTable = new baTableClass(
|
||||
width: 100,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: {
|
||||
'0': 'info',
|
||||
'1': 'warning',
|
||||
'2': 'success',
|
||||
'3': 'danger',
|
||||
},
|
||||
replaceValue: { '0': t('order.withdrawOrder.status 0'), '1': t('order.withdrawOrder.status 1'), '2': t('order.withdrawOrder.status 2'), '3': t('order.withdrawOrder.status 3') },
|
||||
},
|
||||
{ label: t('order.withdrawOrder.review_admin_username'), prop: 'reviewAdmin.username', align: 'center', minWidth: 100, operator: 'LIKE', operatorPlaceholder: t('Fuzzy query'), render: 'tags' },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="default-main ba-table-box">
|
||||
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info" show-icon />
|
||||
|
||||
@@ -54,6 +54,22 @@ const bizReplace = {
|
||||
adjust: t('record.userWalletRecord.biz adjust'),
|
||||
}
|
||||
|
||||
const bizTypeTagCustom = {
|
||||
deposit: 'success',
|
||||
withdraw: 'warning',
|
||||
withdraw_freeze: 'info',
|
||||
withdraw_unfreeze: 'info',
|
||||
platform_in: 'success',
|
||||
platform_out: 'danger',
|
||||
admin_credit: 'success',
|
||||
admin_deduct: 'danger',
|
||||
bet: 'primary',
|
||||
payout: 'success',
|
||||
fee: 'warning',
|
||||
void_refund: 'info',
|
||||
adjust: 'warning',
|
||||
}
|
||||
|
||||
const dirReplace = {
|
||||
'1': t('record.userWalletRecord.direction in'),
|
||||
'2': t('record.userWalletRecord.direction out'),
|
||||
@@ -70,6 +86,7 @@ const baTable = new baTableClass(
|
||||
prop: 'user_id',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
show: false,
|
||||
operator: 'RANGE',
|
||||
sortable: false,
|
||||
},
|
||||
@@ -100,6 +117,7 @@ const baTable = new baTableClass(
|
||||
minWidth: 120,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
custom: bizTypeTagCustom,
|
||||
replaceValue: bizReplace,
|
||||
},
|
||||
{
|
||||
@@ -109,11 +127,36 @@ const baTable = new baTableClass(
|
||||
width: 90,
|
||||
operator: 'eq',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'1': 'success',
|
||||
'2': 'danger',
|
||||
},
|
||||
replaceValue: dirReplace,
|
||||
},
|
||||
{ label: t('record.userWalletRecord.amount'), prop: 'amount', align: 'center', minWidth: 110, operator: 'RANGE', formatter: formatAmount },
|
||||
{ label: t('record.userWalletRecord.balance_before'), prop: 'balance_before', align: 'center', minWidth: 110, operator: 'RANGE', formatter: formatAmount },
|
||||
{ label: t('record.userWalletRecord.balance_after'), prop: 'balance_after', align: 'center', minWidth: 110, operator: 'RANGE', formatter: formatAmount },
|
||||
{
|
||||
label: t('record.userWalletRecord.amount'),
|
||||
prop: 'amount',
|
||||
align: 'center',
|
||||
minWidth: 110,
|
||||
operator: 'RANGE',
|
||||
formatter: formatAmount,
|
||||
},
|
||||
{
|
||||
label: t('record.userWalletRecord.balance_before'),
|
||||
prop: 'balance_before',
|
||||
align: 'center',
|
||||
minWidth: 110,
|
||||
operator: 'RANGE',
|
||||
formatter: formatAmount,
|
||||
},
|
||||
{
|
||||
label: t('record.userWalletRecord.balance_after'),
|
||||
prop: 'balance_after',
|
||||
align: 'center',
|
||||
minWidth: 110,
|
||||
operator: 'RANGE',
|
||||
formatter: formatAmount,
|
||||
},
|
||||
{
|
||||
label: t('record.userWalletRecord.ref_type'),
|
||||
prop: 'ref_type',
|
||||
@@ -178,5 +221,3 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
|
||||
|
||||
@@ -154,10 +154,11 @@ const baTable = new baTableClass(new baTableApi('/admin/routine.Attachment/'), {
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '100',
|
||||
width: '80',
|
||||
render: 'buttons',
|
||||
buttons: optBtn,
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
defaultOrder: { prop: 'last_upload_time', order: 'desc' },
|
||||
|
||||
@@ -76,6 +76,7 @@ const baTable = new baTableClass(
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: { 0: 'danger', 1: 'success' },
|
||||
replaceValue: { 0: t('Disable'), 1: t('security.dataRecycle.Deleting monitoring') },
|
||||
},
|
||||
@@ -84,10 +85,11 @@ const baTable = new baTableClass(
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '130',
|
||||
width: '80',
|
||||
render: 'buttons',
|
||||
buttons: defaultOptButtons(['edit', 'delete']),
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined, 'status'],
|
||||
|
||||
@@ -167,6 +167,7 @@ const baTable = new baTableClass(new baTableApi(url), {
|
||||
render: 'buttons',
|
||||
buttons: optButtons,
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
|
||||
@@ -85,6 +85,7 @@ const baTable = new sensitiveDataClass(
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
render: 'tag',
|
||||
effect: 'dark',
|
||||
custom: { 0: 'danger', 1: 'success' },
|
||||
replaceValue: { 0: t('Disable'), 1: t('security.sensitiveData.Modifying monitoring') },
|
||||
},
|
||||
@@ -93,10 +94,11 @@ const baTable = new sensitiveDataClass(
|
||||
{
|
||||
label: t('Operate'),
|
||||
align: 'center',
|
||||
width: '130',
|
||||
width: '80',
|
||||
render: 'buttons',
|
||||
buttons: defaultOptButtons(['edit', 'delete']),
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
|
||||
@@ -180,6 +180,7 @@ const baTable = new baTableClass(new baTableApi(url), {
|
||||
render: 'buttons',
|
||||
buttons: optButtons,
|
||||
operator: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
|
||||
Reference in New Issue
Block a user