fix:1,修改

main
YuanJian 2025-09-04 09:21:45 +08:00
parent f962d2af4a
commit 609cc7b1b8
22 changed files with 881 additions and 79 deletions

BIN
dist.rar

Binary file not shown.

View File

@ -32,5 +32,12 @@ export function superAgentCommissionSum(query) {
params: query
})
}
//审计
export function superAgentQuotaAudit(data) {
return request({
url: '/super/agent/quota/flow/audit/audit',
method: 'post',
data: data
})
}

View File

@ -189,3 +189,46 @@ export function getSuperTenantWhiteList(query) {
method: 'delete',
})
}
// 审计
export function superTenantQuotaAudit(data) {
return request({
url: '/super/tenant/quota/audit',
method: 'post',
data: data
})
}
//流水列表
export function getSuperTenantQuotaFlowAuditList(query) {
return request({
url: '/super/tenant/quota/flow/audit/list',
method: 'get',
params: query
})
}
//流水操作类型
export function getSuperCommonOperationType(query) {
return request({
url: '/super/common/operation/type',
method: 'get',
params: query
})
}
//代理审计流水列表
export function getSuperAgentQuotaFlowAuditList(query) {
return request({
url: '/super/agent/quota/flow/audit/list',
method: 'get',
params: query
})
}
//佣金类型
export function getSuperCommonAgentCommissionType(query) {
return request({
url: '/super/common/agent/commission/type',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,102 @@
<template>
<div>
<template v-for="(item, index) in options">
<template v-if="values.includes(item.value)">
<span :key="item.value" :index="index"
:class="!item.elTagClass && colorValues.length ? colorValues[item.value - 1] : item.elTagClass">{{ item.label.toString()
}}</span>&nbsp;
</template>
</template>
<template v-if="unmatch && showValue &&isShow"> <!-- -->
{{ unmatchArray | handleArray }}
</template>
<slot></slot>
</div>
</template>
<script setup>
const { proxy } = getCurrentInstance();
//
//
const unmatchArray = ref([]);
const props = defineProps({
//
value: [Number, String, Array],
// value
showValue: {
type: Boolean,
default: true,
},
isShow:{ //
type: Boolean,
default: false,
},
separator: {
type: String,
default: ",",
},
optionsArr: { // dictKey
type: Array,
default: () => [],
},
dictKey: {
type: String,
default: "",
},
colorValues: {
type: Array,
default: [],
}
});
const values = computed(() => {
if (props.value === null || typeof props.value === 'undefined' || props.value === '') return [];
return Array.isArray(props.value) ? props.value.map(item => '' + item) : String(props.value).split(props.separator);
});
const unmatch = computed(() => {
unmatchArray.value = [];
// value
if (props.value === null || typeof props.value === 'undefined' || props.value === '' || options.value.length === 0) return false
//
let unmatch = false //
values.value.forEach(item => {
if (!options.value.some(v => v.value === item)) {
unmatchArray.value.push(item)
unmatch = true // true
}
})
return unmatch //
});
function handleArray(array) {
if (array.length === 0) return "";
return array.reduce((pre, cur) => {
return pre + " " + cur;
});
}
const options = ref([])
const initOptions = async () => {
if (props.optionsArr.length) {
options.value = props.optionsArr
return
}else if (props.dictKey) {
options.value = await proxy.useDict(props.dictKey)[props.dictKey]
// options.value.map(async (item) => {
// item.label = await getTranslations({label:item.label})?.label || item.label;
// })
}
}
onMounted( async() => {
initOptions();
})
</script>
<style scoped>
.el-tag+.el-tag {
margin-left: 10px;
}
</style>

View File

@ -0,0 +1,189 @@
<template>
<div class="app-container">
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
<template #left>
<table-search-date ref="searchDateRef" @dateChange="handleQuery" v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"></select-input-form>
<el-form-item :label="t('佣金类型')" prop="commissionType">
<el-select v-if="commissionTypeOption.length > 0" v-model="queryParams.commissionType" clearable style="width:220px;" :placeholder="t('请选择')">
<el-option
v-for="dict in commissionTypeOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</template>
<template #right>
</template>
</table-search-card>
<el-table v-loading="loading" :data="commissionList" stripe border class="c-table-main" height="672px">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column :label="t('代理账号')" align="center" prop="agentAccount" min-width="120px">
<template #default="{row}">
{{ row.agentAccount }}
</template>
</el-table-column>
<el-table-column :label="t('流水ID')" align="center" prop="agentQuotaFlowId" min-width="120px">
<template #default="{row}">
{{ row.agentQuotaFlowId }}
</template>
</el-table-column>
<el-table-column :label="t('操作类型')" align="center" min-width="90px">
<template #default="{row}">
<dict-text :value="row.commissionType" :optionsArr="commissionTypeOption"></dict-text>
</template>
</el-table-column>
<el-table-column :label="t('审计时间')" align="center" prop="createTime" min-width="130px">
<template #default="{row}">
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column :label="t('游戏额度之前')" align="center" prop="balanceBefore" min-width="130px">
<template #default="{row}">
{{ row.balanceBefore == null ? '--' : row.balanceBefore }}
</template>
</el-table-column>
<el-table-column :label="t('游戏额度')" align="center" prop="balance" min-width="100px">
<template #default="{row}">
{{ row.balance == null ? '--' : row.balance }}
</template>
</el-table-column>
<el-table-column :label="t('游戏额度之后')" align="center" prop="balanceAfter" min-width="130px">
<template #default="{row}">
{{ row.balanceAfter == null ? '--' : row.balanceAfter }}
</template>
</el-table-column>
<el-table-column :label="t('租户支付金额')" align="center" prop="payAmount" min-width="100px">
<template #default="{row}">
{{ row.payAmount }}
</template>
</el-table-column>
<el-table-column :label="t('审计订单ID')" align="center" prop="auditOrderId" min-width="100px">
<template #default="{row}">
{{ row.auditOrderId }}
</template>
</el-table-column>
<el-table-column :label="t('系统订单ID')" align="center" prop="orderId" min-width="100px">
<template #default="{row}">
{{ row.orderId }}
</template>
</el-table-column>
<el-table-column :label="t('佣金比例(%)')" align="center" prop="profitRatio" min-width="100px">
<template #default="{row}">
{{ row.profitRatio }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改定时任务对话框 -->
</div>
</template>
<script setup name="Commission">
import { getSuperAgentQuotaFlowAuditList,getSuperCommonAgentCommissionType } from "@/api/super/tenant";
import TableSearchDate from '@/components/TableSearchDate'
import DictText from '@/components/DictText'
import SelectInputForm from '@/components/SelectInputForm';
import Crontab from '@/components/Crontab'
import { parseTime } from '@/utils/ruoyi'; //
const router = useRouter();
const { proxy } = getCurrentInstance();
const commissionList = ref([]);
const loading = ref(true);
const total = ref(0);
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
tenantKey: "",
searchType:'agentAccount'
},
rules: {
}
});
const queryParamsList = reactive([{
label: proxy.t('代理账户'),
value: 'agentAccount',
},{ //
label: proxy.t('流水ID'),
value: 'agentQuotaFlowId',
},{ //
label: proxy.t('审计订单ID'),
value: 'auditAndOrderId',
}])
const { queryParams, form, rules } = toRefs(data);
const dateRange = ref([]),operateTimeType = ref("day");
/** 查询列表 */
function getList() {
loading.value = true;
getSuperAgentQuotaFlowAuditList(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
commissionList.value = response.rows
total.value = response.total;
loading.value = false;
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
const searchDateRef = ref(null);
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
operateTimeType.value = "day";
searchDateRef.value.timeTypeChange(operateTimeType.value)
}
const commissionTypeOption = ref([]);
const getSuperCommonAgentCommissionTypes = () => {
getSuperCommonAgentCommissionType({}).then(response => {
commissionTypeOption.value = response.data.map(item => {
return { label: item.name, value: `${item.code}` }
});
});
};
//
onMounted(() => {
getList();
getSuperCommonAgentCommissionTypes();
});
</script>
<style scoped lang="scss">
.label-scoreRatio{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
span{
width: 120px;
text-align: right;
font-weight: 700;
padding-right: 12px;
}
}
.scoreRatioTable{
width: calc(100% - 120px);
margin-left: 120px;
}
.flooter {
.el-tag{
margin: 8px;
}
}
</style>

View File

@ -0,0 +1,204 @@
<template>
<div class="app-container">
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
<template #left>
<table-search-date ref="searchDateRef" v-model:dateRange="dateRange" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"></select-input-form>
<!-- <el-form-item :label="t('操作类型')" prop="operationType">
<el-select v-if="operationTypeOption.length > 0" v-model="queryParams.operationType" clearable style="width:220px;" :placeholder="t('请选择')">
<el-option
v-for="dict in operationTypeOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> -->
</template>
<template #right>
</template>
</table-search-card>
<el-table v-loading="loading" :data="commissionList" stripe border class="c-table-main" height="672px">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" min-width="120px">
<template #default="{row}">
{{ row.tenantKey }}
</template>
</el-table-column>
<el-table-column :label="t('流水ID')" align="center" prop="gameQuotaFlowId" min-width="120px">
<template #default="{row}">
{{ row.gameQuotaFlowId }}
</template>
</el-table-column>
<el-table-column :label="t('操作类型')" align="center" min-width="120px">
<template #default="{row}">
<dict-text :value="row.operationType" :optionsArr="operationTypeOption"></dict-text>
</template>
</el-table-column>
<el-table-column :label="t('审计时间')" align="center" prop="createTime" min-width="130px">
<template #default="{row}">
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column :label="t('游戏额度之前')" align="center" prop="gameQuotaFlowId" min-width="130px">
<template #default="{row}">
{{ row.balanceBefore }}
</template>
</el-table-column>
<el-table-column :label="t('游戏额度')" align="center" prop="balance" min-width="100px">
<template #default="{row}">
{{ row.balance }}
</template>
</el-table-column>
<el-table-column :label="t('游戏额度之后')" align="center" prop="balanceAfter" min-width="130px">
<template #default="{row}">
{{ row.balanceAfter }}
</template>
</el-table-column>
<el-table-column :label="t('支付金额')" align="center" prop="payAmount" min-width="100px">
<template #default="{row}">
{{ row.payAmount }}
</template>
</el-table-column>
<el-table-column :label="t('审计订单ID')" align="center" prop="auditOrderId" min-width="100px">
<template #default="{row}">
{{ row.auditOrderId }}
</template>
</el-table-column>
<el-table-column :label="t('系统订单ID')" align="center" prop="orderId" min-width="100px">
<template #default="{row}">
{{ row.orderId }}
</template>
</el-table-column>
<el-table-column :label="t('买分比例(%)')" align="center" prop="scoreRatio" min-width="100px">
<template #default="{row}">
{{ row.scoreRatio }}
</template>
</el-table-column>
<el-table-column :label="t('汇率')" align="center" prop="exchangeRate" min-width="100px">
<template #default="{row}">
{{ row.exchangeRate }}
</template>
</el-table-column>
<el-table-column :label="t('代理商利润')" align="center" prop="agentProfit" min-width="100px">
<template #default="{row}">
{{ row.agentProfit }}
</template>
</el-table-column>
<el-table-column :label="t('平台利润')" align="center" prop="platformProfit" min-width="100px">
<template #default="{row}">
{{ row.platformProfit }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改定时任务对话框 -->
</div>
</template>
<script setup name="Commission">
import { getSuperTenantQuotaFlowAuditList,getSuperCommonOperationType } from "@/api/super/tenant";
import TableSearchDate from '@/components/TableSearchDate'
import DictText from '@/components/DictText'
import SelectInputForm from '@/components/SelectInputForm';
import Crontab from '@/components/Crontab'
import { parseTime } from '@/utils/ruoyi'; //
const router = useRouter();
const { proxy } = getCurrentInstance();
const commissionList = ref([]);
const loading = ref(true);
const total = ref(0);
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
tenantKey: "",
searchType:'tenantKey'
},
rules: {
}
});
const queryParamsList = reactive([{
label: proxy.t('商户账号'),
value: 'tenantKey',
},{ //
label: proxy.t('流水ID'),
value: 'gameQuotaFlowId',
},{ //
label: proxy.t('审计订单ID'),
value: 'auditAndOrderId',
}])
const { queryParams, form, rules } = toRefs(data);
const dateRange = ref([]),operateTimeType = ref("day");
/** 查询列表 */
function getList() {
loading.value = true;
getSuperTenantQuotaFlowAuditList(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
commissionList.value = response.rows
total.value = response.total;
loading.value = false;
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
const searchDateRef = ref(null);
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
operateTimeType.value = "day";
searchDateRef.value.timeTypeChange(operateTimeType.value)
}
const operationTypeOption = ref([]);
const getSuperCommonOperationTypes = () => {
getSuperCommonOperationType({}).then(response => {
operationTypeOption.value = response.data.map(item => {
return { label: item.name, value: `${item.code}` }
});
});
};
//
onMounted(() => {
getList();
getSuperCommonOperationTypes();
});
</script>
<style scoped lang="scss">
.label-scoreRatio{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
span{
width: 120px;
text-align: right;
font-weight: 700;
padding-right: 12px;
}
}
.scoreRatioTable{
width: calc(100% - 120px);
margin-left: 120px;
}
.flooter {
.el-tag{
margin: 8px;
}
}
</style>

View File

@ -61,6 +61,17 @@
<el-table-column :label="t('时间')" align="center" prop="createTime" :show-overflow-tooltip="true">
<template #default="scope">{{ parseTime(scope.row.createTime) }}</template>
</el-table-column>
<el-table-column :label="t('操作')" align="center" min-width="110px">
<template #default="{ row }">
<el-button
type="text"
v-if="row.auditStatus == 0"
v-hasPermi="['super:agent:flow:audit']"
icon="el-icon-edit"
@click="handleAudit(row)"
>{{ t('审计') }}</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
@ -131,7 +142,7 @@
<script setup name="Commission">
import { listCommission,getCommissionInfo,updateAgentCommission } from "@/api/commission";
import { superAgentCommissionList,superAgentCommissionSum } from "@/api/super/commissionList";
import { superAgentCommissionList,superAgentCommissionSum,superAgentQuotaAudit } from "@/api/super/commissionList";
import TableSearchDate from '@/components/TableSearchDate'
import Crontab from '@/components/Crontab'
import { parseTime } from '@/utils/ruoyi'; //
@ -263,6 +274,20 @@ function queryCode(type) {
return item
})
}
//
const handleAudit = (row) => {
proxy.$modal.confirm(proxy.t('是否审计?')).then(() => {
loading.value = true;
superAgentQuotaAudit({id:row.id}).then(res => {
loading.value = false;
proxy.$modal.msgSuccess(proxy.t('审计成功!'));
handleQuery();
}).catch(() => {
loading.value = false;
});
}).catch(() => { });
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["agentRef"].validate(valid => {

View File

@ -66,35 +66,35 @@
title: proxy.t('总商户统计'),
value: props?.cardData?.totalTenants||0,
percentage: '',
subtitle: proxy.t('会员总数')+`<a href="#" class="link" data-type="totalCharge" >${(props?.cardData?.totalMembers||0)}</a>`+proxy.t('人')
+' '+proxy.t('商户总数')+`<a href="#" class="link" data-type="totalAgent" >${(props?.cardData?.totalTenants||0)}</a>`
+' '+proxy.t('代理总数')+`<a href="#" class="link" data-type="totalBigR">${props?.cardData?.totalAgents||0}</a>`,
subtitle: proxy.t('会员总数')+`<a class="link" data-type="totalCharge" >${(props?.cardData?.totalMembers||0)}</a>`+proxy.t('人')
+' '+proxy.t('商户总数')+`<a class="link" data-type="totalAgent" >${(props?.cardData?.totalTenants||0)}</a>`
+' '+proxy.t('代理总数')+`<a class="link" data-type="totalBigR">${props?.cardData?.totalAgents||0}</a>`,
cardClass: 'blue',
},
{
title: proxy.t('商户充值总额'),
value: `${props?.cardData?.totalRecharge ||0}(U)`,
percentage: '',
subtitle: proxy.t('今日充值总额')+`<a href="#" class="link" data-type="differenceRecharge" >${(props?.cardData?.totalRecharge||0)}</a>`
+' '+proxy.t('今日充值人数')+`<a href="#" class="link" data-type="differenceWithdrawal" >${(props?.cardData?.totalRechargeUsers||0)}</a>`+proxy.t('人')
+' '+proxy.t('今日提现总额')+`<a href="#" class="link" data-type="differenceWithdrawal" >${(props?.cardData?.totalWithdrawal||0)}</a>`
+' '+proxy.t('今日提现人数')+`<a href="#" class="link" data-type="differenceWithdrawal" >${(props?.cardData?.totalWithdrawalUsers||0)}</a>`+proxy.t('人'),
subtitle: proxy.t('今日充值总额')+`<a class="link" data-type="differenceRecharge" >${(props?.cardData?.totalRecharge||0)}</a>`
+' '+proxy.t('今日充值人数')+`<a class="link" data-type="differenceWithdrawal1" >${(props?.cardData?.totalRechargeUsers||0)}</a>`+proxy.t('人')
+' '+proxy.t('今日提现总额')+`<a class="link" data-type="differenceWithdrawal2" >${(props?.cardData?.totalWithdrawal||0)}</a>`
+' '+proxy.t('今日提现人数')+`<a class="link" data-type="differenceWithdrawal3" >${(props?.cardData?.totalWithdrawalUsers||0)}</a>`+proxy.t('人'),
cardClass: 'pink',
},
{
title: proxy.t('投注金额/输赢金额'),
value: `${props?.cardData?.totalBetAmount ||0}(U)/${props?.cardData?.totalProfitLoss ||0}(U)`,
percentage:'',
subtitle: proxy.t('今日注单总数')+`<a href="#" class="link" data-type="betOnNoteOrder" >${(props?.cardData?.totalBets||0)}</a>`
+' '+proxy.t('今日杀率')+`<a href="#" class="link" data-type="betOnKillRate" >${(props?.cardData?.killRate||0)}%</a>`,
subtitle: proxy.t('今日注单总数')+`<a class="link" data-type="betOnNoteOrder" >${(props?.cardData?.totalBets||0)}</a>`
+' '+proxy.t('今日杀率')+`<a class="link" data-type="betOnKillRate" >${(props?.cardData?.killRate||0)}%</a>`,
cardClass: 'yellow',
},
{
title: proxy.t('商户可用余额'),
value: `${Number(props?.cardData?.currentBalance+props?.cardData?.platformBalance).toFixed(4) ||0}(U)`,
percentage: '',
subtitle: proxy.t('当前商户可用余额')+`<a href="#" class="link" data-type="profitStock" >${(props?.cardData?.currentBalance||0)}</a>`+'(U)'
+' '+ proxy.t('当前商户平台余额')+`<a href="#" class="link" data-type="profitStock" >${(props?.cardData?.platformBalance||0)}</a>`+'(U)',
subtitle: proxy.t('当前商户可用余额')+`<a class="link" data-type="profitStock" >${(props?.cardData?.currentBalance||0)}</a>`+'(U)'
+' '+ proxy.t('当前商户平台余额')+`<a class="link" data-type="profitStock" >${(props?.cardData?.platformBalance||0)}</a>`+'(U)',
cardClass: 'green',
},
{
@ -117,7 +117,28 @@
path = '/Merchant/businessInformation';
}else if (type == 'bigR') {
path = '/Agents/agentInformation';
}else if (type == 'totalCharge') {
path = '/member';
}else if (type == 'totalAgent'){
path = '/Merchant/businessInformation';
}else if (type == 'totalBigR'){
path = '/Agents/agentInformation';
}else if (type == 'differenceRecharge'){
path = '/Finance/prepaymentRecord';
}else if (type == 'differenceWithdrawal1'){
path = '/Finance/prepaymentRecord';
}else if (type == 'differenceWithdrawal2'){
path = '/CommissionList/agentCommissionReport';
}else if (type == 'differenceWithdrawal3') {
path = '/CommissionList/agentCommissionReport';
}else if (type == 'betOnNoteOrder'){
path = '/gameRecords';
}else if (type == 'betOnKillRate'){
path = '/gameRecords';
}else if (type == 'profitStock'){
path = '/Merchant/businessInformation';
}
proxy.$router.push({
path: path,
query: {

View File

@ -10,7 +10,7 @@
<el-form-item prop="dateRange">
<el-date-picker v-model="dateRange" :shortcuts="shortcuts" :style="`width: ${dateType == 'datetimerange' ? '380px' : '250px'}`"
:editable="false" :disabledDate="disabledDate" :type="dateType" :start-placeholder="t('开始时间')"
:end-placeholder="t('结束时间')" :format="formatType" value-format="YYYY-MM-DD HH:mm:ss" @change="dateRangeChange"
:end-placeholder="t('结束时间')" :format="formatType" value-format="YYYY-MM-DD" @change="dateRangeChange"
:clearable="clearable" />
</el-form-item>
</template>
@ -31,7 +31,7 @@ const props = defineProps({
});
const operateTimeType = defineModel('operateTimeType'), dateRange = defineModel('dateRange');
const formatType = 'YYYY-MM-DD HH:mm:ss'; //
const formatType = 'YYYY-MM-DD'; //
const emits = defineEmits(['dateChange']);
const isFirst = ref(true); //
@ -54,8 +54,8 @@ const timeTypeChange = (val) => {
break
case 'week':
dateRange.value = [
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss.SSS')
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD'),
dayjs().endOf('day').format('YYYY-MM-DD')
]
break
case 'month':
@ -151,8 +151,8 @@ const dateRangeChange = (dataValue) => {
start.setHours(0, 0, 0); // 00:00:00
end.setHours(23, 59, 59,999); // 23:59:59
dateRange.value[0] = dayjs(start).format('YYYY-MM-DD HH:mm:ss');
dateRange.value[1] = dayjs(end).format('YYYY-MM-DD HH:mm:ss.SSS');
dateRange.value[0] = dayjs(start).format('YYYY-MM-DD');
dateRange.value[1] = dayjs(end).format('YYYY-MM-DD');
}
//
@ -163,7 +163,7 @@ const dateRangeChange = (dataValue) => {
//
const getTimeFn = (startTime) => {
return [startTime.format('YYYY-MM-DD HH:mm:ss'), dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss.SSS')];
return [startTime.format('YYYY-MM-DD'), dayjs().endOf('day').format('YYYY-MM-DD')];
}
//

View File

@ -236,10 +236,10 @@ import { el } from 'element-plus/es/locales.mjs';
loadings.value = false;
let obj = {
operationType:tabPosition.value,
timeZone:timeZones,
currencyCodes:props.currencyType,
startTime:finalTimestamp(dateRange.value[0]),
endTime:finalTimestamp(dateRange.value[1]),
// timeZone:timeZones,
// currencyCodes:props.currencyType,
startTime:dateRange.value[0],
endTime:dateRange.value[1],
}
homeOperationList(obj).then(res => {
loadings.value = true;

View File

@ -26,10 +26,10 @@
<el-table v-loading="loading" class="c-table-main" :data="agentList" border>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column :label="t('订单号')" width="160" align="center" prop="orderId" :show-overflow-tooltip="true" />
<el-table-column :label="t('订单号')" min-width="160" align="center" prop="orderId" />
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" min-width="150" />
<!-- <el-table-column :label="t('前缀')" width="100" align="center" prop="tenantSn" /> -->
<el-table-column :label="t('平台币种')" align="center" prop="currencyCode" :show-overflow-tooltip="true" />
<el-table-column :label="t('平台币种')" align="center" prop="currencyCode" />
<el-table-column :label="t('汇率')" width="100" align="center" prop="exchangeRate" >
<template #default="{row}">
<span v-if="row.exchangeRate">{{ row.exchangeRate }}</span>
@ -85,7 +85,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"

View File

@ -89,6 +89,7 @@
</el-form>
</div>
<div v-if="activeName == 'second'">
<el-form ref="agentRef" :model="formAll" :rules="rules" label-width="120px">
<div style="display: flex;width: 100%;margin-bottom: 25px;">
<div style="width: 120px;text-align: right;">商户ID</div>
<div>{{ formAll.id }} <CopyIcon :colors="'#409EFF'" v-if="formAll.id" :text="String(formAll.id)"></CopyIcon></div>
@ -106,6 +107,7 @@
</div>
</div>
</el-form>
</div>
</el-scrollbar>
<template #footer>
@ -336,7 +338,7 @@ const getsuperCommonPlatformTypeSelect = async () => {
nextTick(() => {
getSelectPlatform();
getSuperCommonCurrencySelect();
getsuperCommonPlatformTypeSelect();
// getsuperCommonPlatformTypeSelect();
})
// DEMO

View File

@ -38,7 +38,11 @@
</div>
</template>
</el-table-column>
<el-table-column :label="t('币种')" align="center" prop="createTime" min-width="120">
<template #default="scope">
{{ scope.row.currencyCode || '--' }}
</template>
</el-table-column>
<el-table-column :label="t('余额')" min-width="160" align="center" >
<template #default="{row}">
<div style="display: flex;justify-content: space-between;">
@ -457,7 +461,6 @@ const beforeSwitchChange = async (row, undateKeys) => {
}
updateSuperTenantResetPwd(objItem).then(res => {
handleCopy(res.data);
getList();
openResetTiele.value = "账号信息";
openReset.value = true;
ConnectionArr.value ={
@ -552,8 +555,8 @@ const handleAdjustment = (row) => {
const renewShow = ref(false);
const edit = (row) => {
reset();
getSelectPlatform();
getSuperCommonCurrencySelect();
// getSelectPlatform();
// getSuperCommonCurrencySelect();
getSuperTenant(row.id).then(response => {
renewShow.value = true;
title.value = proxy.t('修改商户');

View File

@ -42,7 +42,16 @@
<el-form-item :label="t('游戏平台')" prop="platformCode">
<CustomSelect v-if="showLoding3" v-model="queryParams.platformCode" :options="quotaplatformCodeArr" filterable placeholder="请选择平台" style="width: 200px" />
</el-form-item>
<el-form-item :label="t('操作类型')" prop="operationType">
<el-select v-if="operationTypeOption.length > 0" v-model="queryParams.operationType" clearable style="width:220px;" :placeholder="t('请选择')">
<el-option
v-for="dict in operationTypeOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="t('开始时间')" prop="params.beginTime">
<el-date-picker
v-model="queryParams.params.beginTime"
@ -198,6 +207,17 @@
<el-table-column :label="t('创建时间')" align="center" prop="createTime" width="200" :show-overflow-tooltip="true">
<template #default="scope">{{ parseTime(scope.row.createTime) }}</template>
</el-table-column>
<el-table-column :label="t('操作')" align="center" min-width="110px">
<template #default="{ row }">
<el-button
type="text"
v-if="row.auditStatus == 0"
v-hasPermi="['super:agent:flow:audit']"
icon="el-icon-edit"
@click="handleAudit(row)"
>{{ t('审计') }}</el-button>
</template>
</el-table-column>
<!-- <el-table-column :label="t('操作')" align="center" width="200" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['agent:tenant:view']">{{ t('') }}</el-button>
@ -216,7 +236,7 @@
</template>
<script setup name="Agent">
import { superTenantQuotaflow,superCommonPlatSelect } from "@/api/super/tenant";
import { superTenantQuotaflow,superCommonPlatSelect,superTenantQuotaAudit,getSuperCommonOperationType } from "@/api/super/tenant";
import Crontab from '@/components/Crontab'
import { getLocalStorage } from "@/utils/auth";
import CopyIcon from '@/components/CopyIcon'
@ -374,7 +394,19 @@ const getsuperCommonPlatformTypeSelect = async () => {
// proxy.resetForm("queryRef");
handleQuery();
}
//
const handleAudit = (row) => {
proxy.$modal.confirm(proxy.t('是否审计?')).then(() => {
loading.value = true;
superTenantQuotaAudit({id:row.id}).then(res => {
loading.value = false;
proxy.$modal.msgSuccess(proxy.t('审计成功!'));
handleQuery();
}).catch(() => {
loading.value = false;
});
}).catch(() => { });
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.jobId);
@ -421,23 +453,19 @@ const getsuperCommonPlatformTypeSelect = async () => {
return item
})
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["agentRef"].validate(valid => {
if (valid) {
createAgent(form.value).then(response => {
proxy.$modal.msgSuccess(proxy.t('新增成功'));
open.value = false;
getList();
});
}
const operationTypeOption = ref([]);
const getSuperCommonOperationTypes = () => {
getSuperCommonOperationType({}).then(response => {
operationTypeOption.value = response.data.map(item => {
return { label: item.name, value: `${item.code}` }
});
});
}
};
//
onMounted(() => {
getList();
getsuperCommonCurrencySelect();
getSuperCommonOperationTypes();
getsuperCommonPlatformTypeSelect();
})

View File

@ -534,6 +534,7 @@ const switchBeforeChange = () => {
Object.assign(rowOpenRevise, row);
openRevise.value = true;
currencyCodes.value = 'VND';
oldForm.value = JSON.stringify(rowOpenRevise);
}
const gameCurrencies = ref([]);

View File

@ -650,9 +650,9 @@ const sys_job_status = ref([]);
const showLoding2 = ref(true);
const getsuperCommonPlatformTypeSelect = async () => {
showLoding2.value = false;
getSuperPlatformSelectList({}).then(response => {
getSuperPlatformSelectList({group:1}).then(response => {
sys_job_status.value = response.data.map(item => {
return { label: item.platformName, value: item.platformCode }
return { label: item.platformShowCode, value: item.platformShowCode }
});
showLoding2.value = true;
});
@ -784,42 +784,40 @@ const platformCodeDeff = ref('');
const searchTenantKey = ref('');
//
const searchSystemPlatforms = (currencyCode) => {
const keyword = currencyCode?.trim();
const keyword = currencyCode?.trim().toLowerCase(); //
if (!keyword) {
tenantSystemPlatformDTOSRow.value = PlatformRatioAll.value;
return;
}
// platformCode
// currencyCode
const matchedCodes = PlatformRatioAll.value
.filter(item => item.currencyCode?.includes(keyword))
.filter(item => item.currencyCode?.toLowerCase().includes(keyword))
.map(item => item.currencyCode);
// platformCode
// currencyCode
const result = PlatformRatioAll.value.filter(item =>
matchedCodes.includes(item.currencyCode)
);
tenantSystemPlatformDTOSRow.value = result; // 退 PlatformRatioAll
tenantSystemPlatformDTOSRow.value = result;
};
const searchSystemPlatforms1 = (tenantKey) => {
const keyword = tenantKey?.trim();
const keyword = tenantKey?.trim().toLowerCase(); //
if (!keyword) {
defaultCostSelect.value = defaultCostSelectAll.value;
return;
}
// platformCode
// tenantKey
const matchedCodes = defaultCostSelectAll.value
.filter(item => item.tenantKey?.includes(keyword))
.filter(item => item.tenantKey?.toLowerCase().includes(keyword))
.map(item => item.tenantKey);
// platformCode
// tenantKey
const result = defaultCostSelectAll.value.filter(item =>
matchedCodes.includes(item.tenantKey)
);
defaultCostSelect.value = result; // 退 PlatformRatioAll
defaultCostSelect.value = result; // 退
};
//

View File

@ -154,6 +154,7 @@ const title = ref("");
const deptOptions = ref([]);
const isExpandAll = ref(true);
const refreshTable = ref(true);
const oldForm = shallowRef({ });
const data = reactive({
form: {},
@ -245,6 +246,9 @@ function handleUpdate(row) {
form.value = response.data;
open.value = true;
title.value = "修改部门";
setTimeout(() => {
oldForm.value = JSON.stringify(form.value);
}, 500);
});
}
@ -253,11 +257,15 @@ function submitForm() {
proxy.$refs["deptRef"].validate(valid => {
if (valid) {
if (form.value.deptId != undefined) {
updateDept(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
if (JSON.stringify(form.value) != oldForm.value) {
updateDept(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
}else{
open.value = false;
}
} else {
addDept(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");

View File

@ -305,6 +305,7 @@ const menuOptions = ref([]);
const isExpandAll = ref(false);
const refreshTable = ref(true);
const iconSelectRef = ref(null);
const oldForm = shallowRef({ });
const data = reactive({
form: {},
@ -414,6 +415,9 @@ async function handleUpdate(row) {
form.value = response.data;
open.value = true;
title.value = "修改菜单";
setTimeout(() => {
oldForm.value = JSON.stringify(form.value);
}, 500);
});
}
@ -422,11 +426,15 @@ function submitForm() {
proxy.$refs["menuRef"].validate(valid => {
if (valid) {
if (form.value.menuId != undefined) {
updateMenu(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
if (JSON.stringify(form.value) != oldForm.value) {
updateMenu(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
}else{
open.value = false;
}
} else {
addMenu(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");

View File

@ -159,7 +159,7 @@ const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const oldForm = shallowRef({ });
const data = reactive({
form: {},
queryParams: {
@ -241,6 +241,9 @@ function handleUpdate(row) {
form.value = response.data;
open.value = true;
title.value = "修改岗位";
setTimeout(() => {
oldForm.value = JSON.stringify(form.value);
}, 500);
});
}
@ -249,11 +252,15 @@ function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.postId != undefined) {
updatePost(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
if (JSON.stringify(form.value) != oldForm.value) {
updatePost(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
}else{
open.value = false;
}
} else {
addPost(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");

View File

@ -159,6 +159,9 @@
<el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="角色等级" prop="roleLevel">
<NumberInput v-model="form.roleLevel" :placeholder="t('数字越高级别越高')" style="width: 200px;"></NumberInput>
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
@ -252,6 +255,7 @@
<script setup name="User">
import { addRole, changeRoleStatus, dataScope, delRole, getRole, listRole, updateRole, deptTreeSelect } from "@/api/system/role";
import { roleMenuTreeselect, treeselect as menuTreeselect } from "@/api/system/menu";
import NumberInput from "@/components/NumberInput";
import Render from "./render.vue";
const router = useRouter();
const { proxy } = getCurrentInstance();
@ -297,7 +301,8 @@ const data = reactive({
rules: {
roleName: [{ required: true, message: "角色名称不能为空", trigger: "blur" }],
roleKey: [{ required: true, message: "权限字符不能为空", trigger: "blur" }],
roleSort: [{ required: true, message: "角色顺序不能为空", trigger: "blur" }]
roleSort: [{ required: true, message: "角色顺序不能为空", trigger: "blur" }],
roleLevel: [{ required: true, message: "角色级别不能为空", trigger: "blur" }],
},
});

View File

@ -26,7 +26,7 @@ export default defineConfig(({ mode, command }) => {
open: true,
proxy: {
'/dev-api': {
target: 'http://192.168.50.139:9080',
target: 'http://192.168.50.233:9080',
// target: 'http://192.168.50.11:9080',
// target: 'http://192.168.50.178:8080',
// target: 'http://192.168.50.99:8080',

File diff suppressed because one or more lines are too long