fix:1,修改
parent
9eba581f57
commit
05598451be
|
|
@ -31,6 +31,14 @@ export function createTenantCreate(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
//谷歌验证解除
|
||||
export function updateSuperResetGoogleCode(data) {
|
||||
return request({
|
||||
url: '/super/tenant/resetGoogleCode',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//更新商户
|
||||
export function updateSuperTenantEdit(data) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
<!-- 字典下拉框选择组件 -->
|
||||
<template>
|
||||
<el-select v-model="model" :placeholder="t('请选择')">
|
||||
<el-option v-for="item in optionsData" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
||||
const props = defineProps({
|
||||
// 字典key
|
||||
dictKey: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// localStorage的key值
|
||||
localKey: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
// 是否需要设置默认值
|
||||
isDefault: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 满足添加全选的选项
|
||||
addOptions: {
|
||||
type: Object
|
||||
},
|
||||
config: { // 更多配置
|
||||
type: Object,
|
||||
default: {
|
||||
hasCheckAll: true,
|
||||
filterValue: []
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const model = defineModel(); // 选中值
|
||||
const optionsData = ref([]); // 下拉框选项
|
||||
|
||||
// 初始化下拉框数据
|
||||
const { dictKey, localKey, addOptions, isDefault } = props;
|
||||
|
||||
// localStorage或者字典取值
|
||||
if (localKey) {
|
||||
const _optionsData = [];
|
||||
|
||||
switch (localKey) {
|
||||
case 'langList':
|
||||
const langList = getLocalStorage('langList')?.filter(v => v.langType == 1 && v.langStatus); // 语种选项
|
||||
langList.forEach(v => {
|
||||
_optionsData.push({
|
||||
label: v.name,
|
||||
value: v.id
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
optionsData.value = _optionsData?.filter(item => {
|
||||
return !props.config.filterValue.includes(item.value);
|
||||
});
|
||||
} else {
|
||||
optionsData.value = proxy.useDict(dictKey)[dictKey]?.filter(item => {
|
||||
return !props.config.filterValue.includes(item.value);
|
||||
});
|
||||
}
|
||||
|
||||
// 增加全选
|
||||
if (addOptions) {
|
||||
optionsData.value.unshift(addOptions);
|
||||
}
|
||||
|
||||
// 默认值
|
||||
if (isDefault) {
|
||||
model.value = optionsData.value[0].value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<template>
|
||||
<el-form-item :prop="keyName">
|
||||
<el-select v-model="queryParams[keyName]" :placeholder="t('请选择')" :style="'width:' + width[0] + 'px'"
|
||||
@change="keyChange('selectChange')">
|
||||
<el-option v-for="item in queryParamsList" :key="item.value" :label="t(item.label)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :prop="queryParams[keyName]" v-if="queryParams[keyName]" :style="'width:' + width[1] + 'px'">
|
||||
<!-- 数字输入框 -->
|
||||
<NumberInput v-if="inputType === 'number'" v-model="queryParams[queryParams[keyName]]"
|
||||
:placeholder="t(inputPlaceholder || `请输入${currentLabel}`)" @keyup.enter="handleQuery" clearable
|
||||
@clear="handleQuery" :maxlength="inputConfig.maxlength" :isCalculable="false" :show-word-limit="inputConfig.showWordLimit">
|
||||
</NumberInput>
|
||||
<!-- 下拉选择框字典放到inputConfig.dictKey -->
|
||||
<custom-select v-else-if="inputType === 'select' && showLoding" :placeholder="t(inputPlaceholder || `请选择${currentLabel}`)" v-model="queryParams[queryParams[keyName]]" @change="handleQuery" clearable
|
||||
@clear="handleQuery" :options="inputConfig.options"></custom-select>
|
||||
<!-- 普通输入框 -->
|
||||
<el-input v-else v-model="queryParams[queryParams[keyName]]"
|
||||
:placeholder="t(inputPlaceholder || `请输入${currentLabel}`)" @keyup.enter="handleQuery" clearable
|
||||
@clear="handleQuery" :maxlength="inputConfig.maxlength" :show-word-limit="inputConfig.showWordLimit" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||
import DictSelect from "@/components/DictSelect/index.vue"; // 字典选择框
|
||||
import CustomSelect from "@/components/CustomSelect/index.vue";
|
||||
import { el } from "element-plus/es/locales.mjs";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
width: {
|
||||
type: Array,
|
||||
default: [120, 160]
|
||||
},
|
||||
keyName: {
|
||||
type: String,
|
||||
default: 'searchType'
|
||||
},
|
||||
queryParamsList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
queryParams: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const queryParams = defineModel();
|
||||
queryParams.value = props.queryParams;
|
||||
|
||||
const currentLabel = ref(''), inputPlaceholder = ref(''); // 输入框提示
|
||||
const inputType = ref(''); // 输入框类型
|
||||
const inputConfig = ref({}); // input框配置
|
||||
const showLoding = ref(true);
|
||||
// 参数切换
|
||||
const keyChange = (type) => {
|
||||
props.queryParamsList.forEach(item => {
|
||||
if (item.value === queryParams.value[props.keyName]) {
|
||||
// placeholder设置
|
||||
if (item.placeholder) {
|
||||
inputPlaceholder.value = item.placeholder
|
||||
} else {
|
||||
inputPlaceholder.value = '';
|
||||
currentLabel.value = item.label;
|
||||
}
|
||||
// value和输入框配置
|
||||
inputType.value = item.inputType || '';
|
||||
inputConfig.value = item.inputConfig || {}
|
||||
} else {
|
||||
// 把其他的值清空
|
||||
queryParams.value[item.value] = null
|
||||
}
|
||||
});
|
||||
showLoding.value = false;
|
||||
setTimeout(() => {
|
||||
showLoding.value = true;
|
||||
},500)
|
||||
if (type === 'selectChange') handleQuery();
|
||||
}
|
||||
//清空所有
|
||||
const clearAll = () => {
|
||||
props.queryParamsList.forEach(item => {
|
||||
//除了searchType这个字段其他都清空了
|
||||
if (item.value !== 'searchType') {
|
||||
delete queryParams.value[item.value];
|
||||
}else {
|
||||
queryParams.value[item.value] = props.queryParams.searchType;
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始时监听,监听只执行一次
|
||||
let flag = true;
|
||||
watch(() => queryParams.value[props.keyName], val => {
|
||||
if (val && flag) {
|
||||
keyChange();
|
||||
flag = false;
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
// 输入框值改变
|
||||
const emits = defineEmits(['handleQuery']);
|
||||
const handleQuery = () => {
|
||||
emits('handleQuery');
|
||||
}
|
||||
defineExpose({
|
||||
keyChange,
|
||||
clearAll,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
<tags-view v-if="needTagsView" />
|
||||
</div>
|
||||
<app-main />
|
||||
<settings ref="settingRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ function handleView(row) {
|
|||
currencyAgreement:row.currencyAgreement,
|
||||
tenantType: 1,
|
||||
}
|
||||
getSelectPlatform();
|
||||
// getSelectPlatform();
|
||||
openView.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -408,7 +408,7 @@ function getSelectPlatform() {
|
|||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
getSelectPlatform();
|
||||
// getSelectPlatform();
|
||||
open.value = true;
|
||||
form.value.proportion = 20;
|
||||
title.value = proxy.t('添加代理');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container">
|
||||
<table-search-card :leftSpan="24" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<table-search-date ref="searchDateRef" v-model:dateRange="dateRange" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<el-form-item :label="t('商户账号')" prop="tenantKey">
|
||||
<el-input
|
||||
v-model="queryParams.tenantKey"
|
||||
|
|
@ -199,12 +199,13 @@
|
|||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const searchDateRef = ref(null);
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
operateTimeType.value = "day";
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
searchDateRef.value.timeTypeChange(operateTimeType.value)
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<div class="card-title">{{ card.title }}</div>
|
||||
|
||||
<div class="card-value">
|
||||
<span class="" :style="card.cardClass =='pink' ? '':card.cardClass =='green'?'':'cursor: pointer;'" @click="goPage(card.cardClass)">{{ card.value }}</span>
|
||||
<span class="" :style="card.cardClass =='pink' ? 'cursor: pointer;':card.cardClass =='green'?'cursor: pointer;':'cursor: pointer;'" @click="goPage(card.cardClass)">{{ card.value }}</span>
|
||||
</div>
|
||||
<div class="card-subtitle" v-html="card.subtitle" @click="handleClick"></div>
|
||||
</div>
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
title: proxy.t('新增商户数'),
|
||||
value: props?.cardData?.newTenants || 0,
|
||||
percentage: '',
|
||||
subtitle: proxy.t('新增会员数')+`<a href="#" class="link" data-type="first" >${props?.cardData?.newMembers || 0}</a>`+proxy.t('人')
|
||||
+proxy.t('新增商户数')+ `<a href="#" class="link" data-type="proxy">${props?.cardData?.newTenants || 0}</a>`
|
||||
+proxy.t('新增代理数')+`<a href="#" class="link" data-type="bigR">${props?.cardData?.newAgents||0}</a> `,
|
||||
subtitle: proxy.t('新增会员数')+`<a class="link" data-type="first" >${props?.cardData?.newMembers || 0}</a>`+proxy.t('人')
|
||||
+' '+proxy.t('新增商户数')+ `<a class="link" data-type="newTenants">${props?.cardData?.newTenants || 0}</a>`
|
||||
+' '+proxy.t('新增代理数')+`<a class="link" data-type="bigR">${props?.cardData?.newAgents||0}</a> `,
|
||||
cardClass: 'orange'
|
||||
},
|
||||
{
|
||||
|
|
@ -106,92 +106,58 @@
|
|||
}
|
||||
]);
|
||||
const handleClick = (e) => {
|
||||
// const type = e.target.dataset.type
|
||||
// let path = '';
|
||||
// let typeDay = '';
|
||||
// let activeName = '';
|
||||
// let timeType = '';
|
||||
// if (type == 'first') {
|
||||
// path = '/member/member';
|
||||
// typeDay = 'day';
|
||||
// timeType = 3;
|
||||
// }else if (type == 'proxy') {
|
||||
// path = '/agent/agent-info';
|
||||
// typeDay = 'day';
|
||||
// timeType = '';
|
||||
// }else if (type == 'totalCharge') {
|
||||
// path = '/member/member';
|
||||
// typeDay = '';
|
||||
// timeType = 3;
|
||||
// }else if (type == 'totalAgent') {
|
||||
// path = '/agent/agent-info';
|
||||
// typeDay = '';
|
||||
// timeType = '';
|
||||
// }else if (type == 'differenceRecharge') {
|
||||
// path = '/finance/recharge-order';
|
||||
// typeDay = 'day';
|
||||
// timeType = '';
|
||||
// }else if (type == 'differenceWithdrawal') {
|
||||
// path = '/finance/withdrawal';
|
||||
// typeDay = 'day';
|
||||
// timeType = '';
|
||||
// activeName = 'allWithdrawal';
|
||||
// }else if (type == 'betOnNoteOrder') {
|
||||
// path = '/game/details';
|
||||
// typeDay = 'day';
|
||||
// timeType = '';
|
||||
// activeName = 'details';
|
||||
// }else if (type == 'discountParticipants') {
|
||||
// path = '/discounts/discount-details';
|
||||
// typeDay = 'day';
|
||||
// timeType = '';
|
||||
// activeName = '';
|
||||
// }
|
||||
// else if (type == 'discountTask') {
|
||||
// path = '/discounts/task';
|
||||
// typeDay = '';
|
||||
// timeType = '';
|
||||
// activeName = '';
|
||||
// }else if (type == 'discountActivity') {
|
||||
// path = '/discounts/activity-center';
|
||||
// typeDay = '';
|
||||
// timeType = '';
|
||||
// activeName = '';
|
||||
// }
|
||||
// proxy.$router.push({
|
||||
// path: path,
|
||||
// query: {
|
||||
// activeName: activeName,
|
||||
// operateTimeType: typeDay,
|
||||
// timeType:timeType,
|
||||
// currencyType:props.currencyType,
|
||||
// }
|
||||
// });
|
||||
const type = e.target.dataset.type
|
||||
let path = '';
|
||||
let typeDay = '';
|
||||
let activeName = '';
|
||||
let timeType = '';
|
||||
if (type == 'first') {
|
||||
path = '/member';
|
||||
}else if (type == 'newTenants') {
|
||||
path = '/Merchant/businessInformation';
|
||||
}else if (type == 'bigR') {
|
||||
path = '/Agents/agentInformation';
|
||||
}
|
||||
proxy.$router.push({
|
||||
path: path,
|
||||
query: {
|
||||
activeName: activeName,
|
||||
operateTimeType: typeDay,
|
||||
timeType:timeType,
|
||||
currencyType:props.currencyType,
|
||||
}
|
||||
});
|
||||
}
|
||||
// proxy.t('利润')+(props?.cardData?.profit||0)+' '+
|
||||
const goPage = (cardClass) => {
|
||||
// let path = '';
|
||||
// let typeDay = '';
|
||||
// if (cardClass == 'orange'){
|
||||
// path = '/member/member';
|
||||
// typeDay = 'day';
|
||||
// }else if (cardClass == 'blue'){
|
||||
// path = '/member/member';
|
||||
// typeDay = '';
|
||||
// }else if (cardClass == 'yellow'){
|
||||
// path = '/game/details';
|
||||
// typeDay = 'day';
|
||||
// }else if (cardClass == 'purple'){
|
||||
// path = '/discounts/discount-details';
|
||||
// typeDay = 'day';
|
||||
// }
|
||||
// proxy.$router.push({
|
||||
// path: path,
|
||||
// query: {
|
||||
// activeName: 'details',
|
||||
// operateTimeType: typeDay
|
||||
// }
|
||||
// });
|
||||
let path = '';
|
||||
let typeDay = '';
|
||||
if (cardClass == 'orange'){
|
||||
path = '/Merchant/businessInformation';
|
||||
typeDay = 'day';
|
||||
}else if (cardClass == 'blue'){
|
||||
path = '/Merchant/businessInformation';
|
||||
typeDay = '';
|
||||
}else if (cardClass == 'pink'){
|
||||
path = '/Finance/prepaymentRecord';
|
||||
typeDay = 'day';
|
||||
}else if (cardClass == 'yellow'){
|
||||
path = '/gameRecords';
|
||||
typeDay = 'day';
|
||||
}else if (cardClass == 'green'){
|
||||
path = '/Merchant/businessInformation';
|
||||
typeDay = 'day';
|
||||
}else if (cardClass == 'purple'){
|
||||
path = '/Agents/agentInformation';
|
||||
typeDay = 'day';
|
||||
}
|
||||
proxy.$router.push({
|
||||
path: path,
|
||||
query: {
|
||||
activeName: 'details',
|
||||
operateTimeType: typeDay
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const timeTypeChange = (val) => {
|
|||
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')
|
||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss.SSS')
|
||||
]
|
||||
break
|
||||
case 'month':
|
||||
|
|
@ -150,9 +150,9 @@ const dateRangeChange = (dataValue) => {
|
|||
const end = new Date(dataValue[1]);
|
||||
|
||||
start.setHours(0, 0, 0); // 设置开始时间为当天的00:00:00点
|
||||
end.setHours(23, 59, 59); // 设置结束时间为当天的23:59:59
|
||||
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');
|
||||
dateRange.value[1] = dayjs(end).format('YYYY-MM-DD HH:mm:ss.SSS');
|
||||
}
|
||||
|
||||
// 初始化时不触发父组件的查询
|
||||
|
|
@ -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')];
|
||||
return [startTime.format('YYYY-MM-DD HH:mm:ss'), dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss.SSS')];
|
||||
}
|
||||
|
||||
// 父组件重置
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container">
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<table-search-date ref="searchDateRef" v-model:dateRange="dateRange" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<el-form-item :label="t('商户账号')" prop="tenantKey">
|
||||
<el-input
|
||||
v-model="queryParams.tenantKey"
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<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('商户账号')" align="center" prop="tenantKey" :show-overflow-tooltip="true" />
|
||||
<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('汇率')" width="100" align="center" prop="exchangeRate" >
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('创建时间')" align="center" prop="createTime" :show-overflow-tooltip="true">
|
||||
<el-table-column :label="t('创建时间')" align="center" prop="createTime" min-width="180">
|
||||
<template #default="scope">{{ parseTime(scope.row.createTime) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('操作')" align="center" width="200" class-name="small-padding fixed-width">
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
import TableSearchDate from '@/components/TableSearchDate'
|
||||
import Crontab from '@/components/Crontab'
|
||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
import { nextTick } from "vue";
|
||||
import { nextTick, onMounted } from "vue";
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { ff_tenant_type, ff_tenant_status } = proxy.useDict("ff_tenant_type", "ff_tenant_status");
|
||||
|
|
@ -339,13 +339,14 @@ const usdtSelect = ref([
|
|||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
const searchDateRef = ref(null);
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
operateTimeType.value = "";
|
||||
operateTimeType.value = "day";
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
searchDateRef.value.timeTypeChange(operateTimeType.value)
|
||||
}
|
||||
//取消订单
|
||||
const forcedCancel = (row) => {
|
||||
|
|
@ -482,8 +483,12 @@ const paymentOpen = ref(false);
|
|||
}
|
||||
});
|
||||
}
|
||||
getsuperCommonCurrencySelect();
|
||||
getList();
|
||||
//初始化
|
||||
onMounted(() => {
|
||||
getsuperCommonCurrencySelect();
|
||||
getList();
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<el-form-item prop="username" class="el-form-item-class">
|
||||
<el-input v-model="loginForm.username" type="text" size="large" style="height: 52px;" class="backgr-class"
|
||||
:autocomplete="'new-password'" auto-complete="off" placeholder="账号">
|
||||
:autocomplete="'new-password'" auto-complete="off" placeholder="账号">
|
||||
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -151,8 +151,8 @@ const router = useRouter();
|
|||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const loginForm = ref({
|
||||
username: "admin",
|
||||
password: "aaa111",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
isShowEnabled: false,
|
||||
code: "",
|
||||
|
|
|
|||
|
|
@ -92,6 +92,15 @@
|
|||
<el-button type="primary" @click="queryCode('add')" :disabled="!formAll.tenantSystemPlatforms.length">+0.5</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;margin-left: 120px;justify-content: space-between;margin-bottom: 10px;">
|
||||
<div>
|
||||
<CustomSelect v-if="showLoding2" v-model="searchPlatformCode" clearable :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||
<CustomSelect v-model="searchCurrencyCode" :options="currencySelectArr" clearable placeholder="请选择币种" style="width: 200px"/>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="searchSystemPlatforms">{{ t('搜索') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="formAll.tenantSystemPlatforms" loading="loading2" class="scoreRatioTable">
|
||||
|
||||
<el-table-column :label="t('平台')" align="center" prop="platformCode" />
|
||||
|
|
@ -134,6 +143,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,superCommonTimeZone } from "@/api/super/tenant.js";
|
||||
import { getPlatformShowSelect } from "@/api/super/platform.js";
|
||||
import { nextTick, ref } from "vue";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import NumberInput from '@/components/NumberInput'
|
||||
|
|
@ -180,6 +190,7 @@ const formAll = reactive({ // 表单验证数据
|
|||
realBalance: [],
|
||||
})
|
||||
const currencySelectArr = ref([]);
|
||||
const PlatformRatioAll = ref([]);
|
||||
let res = getLocalStorage('currencySelect');
|
||||
currencySelectArr.value = res.map(item => {
|
||||
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
||||
|
|
@ -218,6 +229,8 @@ const rules = ref({
|
|||
numbers.value = Number(itemObj.useCost)- Number(itemObj.cost);
|
||||
totalPlatform.value = resData.length;
|
||||
tenantSystemPlatforms.value = JSON.parse(JSON.stringify(resData));
|
||||
PlatformRatioAll.value = JSON.parse(JSON.stringify(resData));
|
||||
|
||||
nextTick(() => {
|
||||
changeCurrency('VND')
|
||||
});
|
||||
|
|
@ -225,11 +238,20 @@ const rules = ref({
|
|||
function findByConditions(arr, conditions = {}) {
|
||||
// 如果 conditions 为空对象,就直接返回全部
|
||||
if (conditions.currencyCode == '') {
|
||||
let arr11 = [];
|
||||
arr.map(item => {
|
||||
arr11.push(...item.list);
|
||||
})
|
||||
return arr11||[];
|
||||
// ✅ 用 ref 包装成响应式
|
||||
const arr11 = ref([]);
|
||||
// 异步小步处理,避免一次性塞太多
|
||||
const mergeData = async () => {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
arr11.value.push(...arr[i].list);
|
||||
if (i % 1 == 0) {
|
||||
// 每处理20组,给浏览器一点空闲时间
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
}
|
||||
}
|
||||
};
|
||||
mergeData();
|
||||
return arr11.value || [];
|
||||
}
|
||||
const found = arr.find(item => item.currencyCode == conditions.currencyCode);
|
||||
return found ? found.list : [];
|
||||
|
|
@ -240,11 +262,35 @@ const loading2 = ref(false);
|
|||
const changeCurrency = (val) => {
|
||||
loading2.value = true;
|
||||
formAll.tenantSystemPlatforms = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||
PlatformRatioAll.value = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||
|
||||
totalPlatform.value = formAll.tenantSystemPlatforms.length;
|
||||
|
||||
nextTick(() => {
|
||||
loading2.value = false;
|
||||
});
|
||||
};
|
||||
const searchPlatformCode = ref('');
|
||||
const searchCurrencyCode = ref('');
|
||||
//搜索平台费
|
||||
const searchSystemPlatforms = () => {
|
||||
const result = [];
|
||||
|
||||
PlatformRatioAll.value.forEach(item => {
|
||||
// 两个条件都填写时,同时匹配;只填写一个条件时,匹配对应条件
|
||||
const match =
|
||||
(searchPlatformCode.value && searchCurrencyCode.value)
|
||||
? item.platformCode === searchPlatformCode.value && item.currencyCode === searchCurrencyCode.value
|
||||
: (searchPlatformCode.value ? item.platformCode === searchPlatformCode.value : false) ||
|
||||
(searchCurrencyCode.value ? item.currencyCode === searchCurrencyCode.value : false);
|
||||
|
||||
if (match) {
|
||||
result.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
formAll.tenantSystemPlatforms = result;
|
||||
};
|
||||
const loading1 = ref(false);
|
||||
/** 获取货币 */
|
||||
function getSuperCommonCurrencySelect() {
|
||||
|
|
@ -313,11 +359,24 @@ const handleBlur = (row) => {
|
|||
// this.$message.warning(`不能小于最小成本:${cost}`);
|
||||
}
|
||||
}
|
||||
const sys_job_status = ref([]);
|
||||
const showLoding2 = ref(true);
|
||||
const getsuperCommonPlatformTypeSelect = async () => {
|
||||
showLoding2.value = false;
|
||||
getPlatformShowSelect().then(response => {
|
||||
sys_job_status.value = response.data.map(item => {
|
||||
return { label: item.platformName, value: item.platformCode }
|
||||
});
|
||||
showLoding2.value = true;
|
||||
});
|
||||
}
|
||||
//修改时数据更新区域
|
||||
nextTick(() => {
|
||||
getSelectPlatform();
|
||||
getSuperCommonCurrencySelect();
|
||||
superCommonTimeZones();
|
||||
getsuperCommonPlatformTypeSelect();
|
||||
|
||||
})
|
||||
|
||||
// DEMO加载完成后
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button @click="handleAddType" type="primary" v-h="['super:tenant:quota:add']" plain icon="Plus">新增</el-button>
|
||||
<el-button @click="handleAddType" type="primary" v-hasPermi="['super:tenant:quota:add']" plain icon="Plus">新增</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="platAdjustmentList" class="" border>
|
||||
|
|
@ -44,10 +44,8 @@
|
|||
<el-table-column :label="t('操作')" align="center" prop="balance" width="130px">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex;justify-content: space-between;align-items: center;">
|
||||
|
||||
<el-button @click="handleAdd($event,row)">调额</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -99,6 +97,11 @@
|
|||
</NumberInput>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台额度" prop="platformBalanceJson">
|
||||
<div style="width: 100%;">
|
||||
{{sumPlatformBalance(formAdjustment.platformBalanceJson)}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台额度" prop="platformBalanceJson">
|
||||
<el-table :data="parsePlatformBalance(formAdjustment.platformBalanceJson)" height="200" ref="myTable" >
|
||||
<el-table-column :label="t('平台')" align="center" prop="name" />
|
||||
|
|
@ -152,9 +155,13 @@ const props = defineProps({ // 父组件向子组件传值
|
|||
})
|
||||
let resData = getLocalStorage('currencySelect');
|
||||
const currencyCodesOptions = ref([]);
|
||||
currencyCodesOptions.value = resData.map(item => {
|
||||
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
||||
})
|
||||
currencyCodesOptions.value = [
|
||||
{ label: '全部', value: '0' },
|
||||
...resData.map(item => ({
|
||||
label: `${item.currencyName}(${item.currencyCode})`,
|
||||
value: item.currencyCode
|
||||
}))
|
||||
];
|
||||
const currencySelectAll = getLocalStorage('currencySelect').map(item => {
|
||||
return {...item, label: item.currencyCode, value: item.currencyCode }
|
||||
});
|
||||
|
|
@ -281,16 +288,20 @@ const platAdjustment = ref({
|
|||
pageSize: 100,
|
||||
orderByColumn: 'currencyCode',
|
||||
isAsc: 'asc',
|
||||
tenantKey: ''
|
||||
tenantKey: '',
|
||||
currencyCode:'0',
|
||||
});
|
||||
const totalAdjustment = ref(0);
|
||||
const platAdjustmentList = ref([]);
|
||||
const handleAdjustment = (row) => {
|
||||
platAdjustment.value.tenantKey = row.tenantKey;
|
||||
superTenantQuotaList(platAdjustment.value).then(response => {
|
||||
let obj = {
|
||||
...platAdjustment.value,
|
||||
currencyCode: platAdjustment.value.currencyCode == 0 ? '' : platAdjustment.value.currencyCode,
|
||||
}
|
||||
superTenantQuotaList(obj).then(response => {
|
||||
platAdjustmentList.value = response.rows;
|
||||
totalAdjustment.value = response.total;
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -384,31 +395,48 @@ superCommonCurrencySelects();
|
|||
superCommonQuotaTypeSelects();
|
||||
const openCreditType = ref(false);
|
||||
const handleAddType = (value) => {
|
||||
if (!platAdjustment.value.currencyCode){
|
||||
if (!platAdjustment.value.currencyCode || platAdjustment.value.currencyCode == 0){
|
||||
ElMessage.warning('请选择币种!');
|
||||
return
|
||||
}
|
||||
// openCreditType.value = true;
|
||||
visible.value = true;
|
||||
formAdjustment.value.id = '';
|
||||
formAdjustment.value.platformBalanceJson = '{}';
|
||||
formAdjustment.value.realBalance = 0;
|
||||
formAdjustment.value.creditBalance = 0;
|
||||
if ( platAdjustmentList.value.length == 0 ){
|
||||
formAdjustment.value.realBalance = 0;
|
||||
formAdjustment.value.creditBalance = 0;
|
||||
formAdjustment.value.platformBalanceJson = '{}';
|
||||
}else{
|
||||
formAdjustment.value.id = platAdjustmentList.value[0]?.id;
|
||||
formAdjustment.value.realBalance = platAdjustmentList.value[0]?.realBalance;
|
||||
formAdjustment.value.platformBalanceJson = platAdjustmentList.value[0]?.platformBalanceJson;
|
||||
formAdjustment.value.creditBalance = platAdjustmentList.value[0]?.creditBalance;
|
||||
}
|
||||
formAdjustment.value.balanceReal = 0;
|
||||
formAdjustment.value.balanceCredit = 0;
|
||||
formAdjustment.value.tenantKey = props.modifyDate.tenantKey;
|
||||
formAdjustment.value.currencyCode = platAdjustment.value.currencyCode;
|
||||
visible.value = false;
|
||||
setTimeout(() => {
|
||||
visible.value = true;
|
||||
}, 50);
|
||||
}
|
||||
const visible = ref(false);
|
||||
const handleAdd = (value,row) => {
|
||||
let rowOpen = JSON.parse(JSON.stringify(row));
|
||||
visible.value = true;
|
||||
formAdjustment.value.id = rowOpen.id;
|
||||
formAdjustment.value = rowOpen;
|
||||
formAdjustment.value.balanceReal = 0;
|
||||
formAdjustment.value.balanceCredit = 0;
|
||||
visible.value = false;
|
||||
nextTick(()=>{
|
||||
visible.value = true;
|
||||
})
|
||||
}
|
||||
const onSubmit = () => {
|
||||
proxy.$refs["formAdjustmentRef"].validate(valid => {
|
||||
if (valid) {
|
||||
let numBalance = 0;
|
||||
if(Number(formAdjustment.value.balanceReal) <= 0 || Number(formAdjustment.value.balanceCredit) <= 0){
|
||||
if(Number(formAdjustment.value.balanceReal) < 0 || Number(formAdjustment.value.balanceCredit) < 0){
|
||||
formAdjustment.value.isOut = false;
|
||||
if (formAdjustment.value.balanceReal !=0){
|
||||
numBalance = Math.abs(formAdjustment.value.balanceReal);
|
||||
|
|
@ -427,6 +455,9 @@ const onSubmit = () => {
|
|||
id: formAdjustment.value.id,
|
||||
balance:numBalance,
|
||||
googleCode: formAdjustment.value.googleCode,
|
||||
tenantKey: formAdjustment.value.tenantKey,
|
||||
currencyCode: formAdjustment.value.currencyCode,
|
||||
quotaType: props.modifyDate.tenantType == 1?'BALANCE':'REPUTATION',
|
||||
isOut: formAdjustment.value.isOut,
|
||||
remark: formAdjustment.value.remark
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,15 @@
|
|||
:disabled="!formAll.tenantSystemPlatforms.length">+0.5</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;margin-left: 120px;justify-content: space-between;margin-bottom: 10px;">
|
||||
<div>
|
||||
<CustomSelect v-if="showLoding2" v-model="searchPlatformCode" clearable :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||
<CustomSelect v-model="searchCurrencyCode" :options="currencySelectArr" clearable placeholder="请选择币种" style="width: 200px"/>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="searchSystemPlatforms">{{ t('搜索') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="formAll.tenantSystemPlatforms" ref="myTable" class="scoreRatioTable" >
|
||||
<!-- <el-table-column :label="t('id')" align="center" >
|
||||
<template #default="{row,$index}">
|
||||
|
|
@ -106,6 +115,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { updateSuperTenantEdit } from "@/api/super/tenant.js";
|
||||
import { getPlatformShowSelect } from "@/api/super/platform.js";
|
||||
import { superPlatformSystem } from "@/api/agent";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import { nextTick, ref } from "vue";
|
||||
|
|
@ -145,7 +155,7 @@ const forceUpdateTable = async () => {
|
|||
// 假设 allData 已经有 1000 条数据
|
||||
// 每次塞 10 条进去
|
||||
let index = 0
|
||||
const batchSize = 20
|
||||
const batchSize = 100
|
||||
|
||||
const loadBatch = () => {
|
||||
if (index < props.modifyDate.tenantSystemPlatforms.length) {
|
||||
|
|
@ -156,6 +166,7 @@ const forceUpdateTable = async () => {
|
|||
// 下一帧再加载,避免阻塞 UI
|
||||
requestAnimationFrame(loadBatch)
|
||||
}
|
||||
PlatformRatioAll.value = props.modifyDate.tenantSystemPlatforms;
|
||||
oldForm.value = JSON.stringify(formAll);
|
||||
}
|
||||
loadBatch()
|
||||
|
|
@ -179,6 +190,7 @@ const formAll = reactive({ // 表单验证数据
|
|||
realBalance: [],
|
||||
})
|
||||
const currencySelectArr = ref([]);
|
||||
const PlatformRatioAll = ref([]);
|
||||
let res = getLocalStorage('currencySelect');
|
||||
currencySelectArr.value = res.map(item => {
|
||||
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
||||
|
|
@ -198,7 +210,30 @@ function getSelectPlatform() {
|
|||
let resData = getLocalStorage('tenantSystemPlatforms');
|
||||
tenantSystemPlatforms.value = resData;
|
||||
}
|
||||
const searchPlatformCode = ref('');
|
||||
const searchCurrencyCode = ref('');
|
||||
//搜索平台
|
||||
const searchSystemPlatforms = () => {
|
||||
const result = [];
|
||||
PlatformRatioAll.value.forEach(item => {
|
||||
// 两个条件都填写时,同时匹配;只填写一个条件时,匹配对应条件
|
||||
const match =
|
||||
(searchPlatformCode.value && searchCurrencyCode.value)
|
||||
? item.platformCode === searchPlatformCode.value && item.currencyCode === searchCurrencyCode.value
|
||||
: (searchPlatformCode.value ? item.platformCode === searchPlatformCode.value : false) ||
|
||||
(searchCurrencyCode.value ? item.currencyCode === searchCurrencyCode.value : false);
|
||||
|
||||
if (match) {
|
||||
result.push(item);
|
||||
}
|
||||
});
|
||||
if (result.length > 0) {
|
||||
formAll.tenantSystemPlatforms = result;
|
||||
}else{
|
||||
formAll.tenantSystemPlatforms = PlatformRatioAll.value;
|
||||
}
|
||||
|
||||
};
|
||||
const loading1 = ref(false);
|
||||
/** 获取货币 */
|
||||
function getSuperCommonCurrencySelect() {
|
||||
|
|
@ -246,21 +281,35 @@ const changeCurrency = (val) => {
|
|||
loading2.value = true;
|
||||
console.log(tenantSystemPlatforms.value.length);
|
||||
formAll.tenantSystemPlatforms = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||
PlatformRatioAll.value = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||
totalPlatform.value = formAll.tenantSystemPlatforms.length;
|
||||
nextTick(() => {
|
||||
loading2.value = false;
|
||||
});
|
||||
};
|
||||
const sys_job_status = ref([]);
|
||||
const showLoding2 = ref(true);
|
||||
const getsuperCommonPlatformTypeSelect = async () => {
|
||||
showLoding2.value = false;
|
||||
getPlatformShowSelect().then(response => {
|
||||
sys_job_status.value = response.data.map(item => {
|
||||
return { label: item.platformName, value: item.platformCode }
|
||||
});
|
||||
showLoding2.value = true;
|
||||
});
|
||||
}
|
||||
//修改时数据更新区域
|
||||
nextTick(() => {
|
||||
getSelectPlatform();
|
||||
getSuperCommonCurrencySelect();
|
||||
getsuperCommonPlatformTypeSelect();
|
||||
})
|
||||
|
||||
// DEMO加载完成后
|
||||
nextTick(() => {
|
||||
// 监听自定义语言
|
||||
// formAll.tenantSystemPlatforms = props.modifyDate.tenantSystemPlatforms;
|
||||
PlatformRatioAll.value = props.modifyDate.tenantSystemPlatforms;
|
||||
formAll.account = props.modifyDate.account;
|
||||
formAll.tenantType = props.modifyDate.tenantType;
|
||||
formAll.scoreRatio = props.modifyDate.scoreRatio;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,17 @@
|
|||
<span v-if="row.agentAccount">{{ t('代理') }}: {{ row.agentAccount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" width="160px" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" width="170px" >
|
||||
<template #default="{row}">
|
||||
<div style="width: 100%;text-align: left;">{{ t('账号') }}: {{ row.tenantKey }}</div>
|
||||
<div style="width: 100%;text-align: left;">{{ t('谷歌') }}:
|
||||
<span v-if="row.googleCode == null || row.googleCode == ''" style="color: #909399;">{{ t('未绑定') }}</span>
|
||||
<span v-else style="color: #1ab394;">{{ t('已绑定') }} <el-button link type="primary" @click="handleUnbindGoogle(row)" v-hasPermi="['super:tenant:resetGoogleCode']">{{ t('解除') }}</el-button></span>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="t('商户额度')" width="100" align="center" >
|
||||
<template #default="{row}">
|
||||
<el-button link type="primary" @click="handleAdjustment(row)" v-hasPermi="['super:tenant:quota:update']">{{ t('调额') }}</el-button>
|
||||
|
|
@ -183,7 +193,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="Agent">
|
||||
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,updateSuperTenantSwitch } from "@/api/super/tenant.js";
|
||||
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,updateSuperResetGoogleCode,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,updateSuperTenantSwitch } from "@/api/super/tenant.js";
|
||||
import { superPlatformSystem } from "@/api/agent";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import AddMerchantsDialog from './components/AddMerchantsDialog'
|
||||
|
|
@ -316,6 +326,25 @@ const beforeSwitchChange = async (row, undateKeys) => {
|
|||
openResetTiele.value = "对接信息";
|
||||
ConnectionArr.value = row;
|
||||
}
|
||||
|
||||
//解除
|
||||
const handleUnbindGoogle = (row) => {
|
||||
proxy.$confirm('确定解除绑定吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
console.log(row)
|
||||
|
||||
updateSuperResetGoogleCode({
|
||||
id: row.id,
|
||||
}).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t('解除成功'));
|
||||
getList();
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
const handleCopy = async(text) => {
|
||||
// 支持现代 API:需 HTTPS 或 localhost
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
<el-table-column :label="t('操作')" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleView(scope.row)">{{ t('详情') }}</el-button>
|
||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['sys:notice:remove']">{{ t('删除') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -72,7 +73,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="Commission">
|
||||
import { listNotice,createSysNotice } from "@/api/notice";
|
||||
import { listNotice,createSysNotice,sysNoticeDelete } from "@/api/notice";
|
||||
import Crontab from '@/components/Crontab'
|
||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
const router = useRouter();
|
||||
|
|
@ -109,10 +110,13 @@ const data = reactive({
|
|||
isAsc:'desc'
|
||||
},
|
||||
rules: {
|
||||
account: [{ required: true, message: proxy.t('商户账号不能为空'), trigger: "blur" }],
|
||||
password: [{ required: true, message: proxy.t('密码不能为空'), trigger: "blur" }],
|
||||
scoreRatio: [{ required: true, message: proxy.t('买分比例不能为空'), trigger: "blur" }],
|
||||
tenantType: [{ required: true, message: proxy.t('商户模式不能为空'), trigger: "change" }],
|
||||
title: [
|
||||
{ required: true, message: "请输入标题", trigger: "change" }
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: "请输入内容", trigger: "change" }
|
||||
]
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -165,6 +169,16 @@ function handleView(row) {
|
|||
openView.value = true;
|
||||
}
|
||||
|
||||
//删除
|
||||
function handleDelete(row) {
|
||||
proxy.$modal.confirm(proxy.t('确认删除标题名称为“ ' + row?.title + ' ”的数据?')).then(() => {
|
||||
return sysNoticeDelete(row.id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess(proxy.t('删除成功!'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
function queryCode(type) {
|
||||
form.value.tenantAgentPlatforms = form.value.tenantAgentPlatforms.map((item, index) => {
|
||||
if (type === 'del' && item.cost > tenantAgentPlatforms.value[index].cost) {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,13 @@
|
|||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<el-form-item :label="t('游戏平台')" prop="platformCode">
|
||||
<CustomSelect v-if="showLoding2" v-model="queryParams.platformCode" :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||
</el-form-item>
|
||||
<CustomSelect v-if="showLoding2" v-model="queryParams.platformCode" :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||
</el-form-item>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item :label="t('状态')" prop="stopStatus">
|
||||
<CustomSelect v-model="queryParams.stopStatus" :options="stopStatusOptions" filterable placeholder="请选择状态" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-form-item>
|
||||
|
|
@ -228,6 +233,7 @@
|
|||
import NumberInput from '@/components/NumberInput'
|
||||
import CustomSelect from '@/components/CustomSelect'
|
||||
import BaseSwitch from '@/components/BaseSwitch'
|
||||
import SelectInputForm from '@/components/SelectInputForm';
|
||||
import { id } from "element-plus/es/locales.mjs";
|
||||
import { nextTick, ref } from "vue";
|
||||
const router = useRouter();
|
||||
|
|
@ -257,7 +263,20 @@ import { nextTick, ref } from "vue";
|
|||
|
||||
});
|
||||
const oldForm = shallowRef({ });
|
||||
|
||||
const queryParamsList = reactive([{
|
||||
label: proxy.t('游戏ID'),
|
||||
value: 'gameId',
|
||||
},{ //查询条件选择
|
||||
label: proxy.t('游戏编码'),
|
||||
value: 'gameCode',
|
||||
},{ //查询条件选择
|
||||
label: proxy.t('游戏名称'),
|
||||
value: 'gameName',
|
||||
}])
|
||||
const stopStatusOptions = [
|
||||
{ label: proxy.t('启用'), value: false },
|
||||
{ label: proxy.t('关闭'), value: true },
|
||||
]
|
||||
const rulesInterface = reactive({
|
||||
})
|
||||
const platformTypeOptions = [
|
||||
|
|
@ -308,7 +327,8 @@ import { nextTick, ref } from "vue";
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
platformCode: "",
|
||||
platformCode: "AE",
|
||||
searchType:'gameId'
|
||||
},
|
||||
rules: {
|
||||
account: [{ required: true, message: proxy.t('商户账号不能为空'), trigger: "blur" }],
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<div class="app-container">
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<el-form-item :label="t('接口名称')" prop="platformName">
|
||||
<el-input v-model="queryParams.platformName" style="width: 200px" placeholder="请输入接口名称" clearable />
|
||||
<el-form-item :label="t('厂商名称')" prop="platformName">
|
||||
<el-input v-model="queryParams.platformName" style="width: 200px" placeholder="请输入厂商名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('游戏平台')" prop="platformShowCode">
|
||||
<el-form-item :label="t('平台编码')" prop="platformShowCode">
|
||||
<CustomSelect v-if="showLoding2" v-model="queryParams.platformShowCode" filterable :options="sys_job_status" placeholder="请选择游戏平台" style="width: 200px" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('开启状态')" prop="stopStatus">
|
||||
|
|
@ -127,7 +127,9 @@
|
|||
|
||||
<!-- 修改平台 -->
|
||||
<el-dialog v-if="openRevise" :title="rowOpenRevise.id == '' ? t('新增平台') : t('修改平台')" align-center v-model="openRevise" width="1300px" append-to-body>
|
||||
|
||||
<el-form ref="openReviseRef" :model="rowOpenRevise" :rules="ruleForm" label-width="120px">
|
||||
<custom-select v-if="versionItem.length !=0" v-model="versionValue" :options="versionItem" @change="switchingVersions" style="width: 200px;margin-bottom: 10px;"></custom-select>
|
||||
<el-descriptions border :column="2" class="c-descriptions" >
|
||||
<el-descriptions-item label-width="150" label-align="right">
|
||||
<template #label>
|
||||
|
|
@ -235,7 +237,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 详情/修改对话框 -->
|
||||
<el-dialog v-model="openView" align-center width="1300px" append-to-body>
|
||||
<el-dialog v-if="openView" v-model="openView" align-center width="1300px" append-to-body>
|
||||
<template #header>
|
||||
<div style="width: 100%;text-align: center;">{{ titlePlatForm }}</div>
|
||||
</template>
|
||||
|
|
@ -317,9 +319,8 @@ import { ref } from "vue";
|
|||
{ label: "开启", value: false },
|
||||
{ label: "关闭", value: true },
|
||||
])
|
||||
|
||||
const versionItem = ref([]);// 版本
|
||||
const formInterface = reactive({
|
||||
|
||||
});
|
||||
const oldForm = shallowRef({ });
|
||||
|
||||
|
|
@ -650,23 +651,34 @@ const switchBeforeChange = () => {
|
|||
const titlePlatForm = ref('');
|
||||
const handleRevise = (row) => {
|
||||
titlePlatForm.value = proxy.t('修改');
|
||||
tenantSystemPlatformDTOSRow.value = row.tenantSystemPlatformDTOS;
|
||||
let objForm = JSON.parse(JSON.stringify(row.tenantSystemPlatformDTOS));
|
||||
tenantSystemPlatformDTOSRow.value = objForm;
|
||||
|
||||
oldForm.value = JSON.stringify(tenantSystemPlatformDTOSRow.value);
|
||||
openView.value = true;
|
||||
openView.value = false;
|
||||
setTimeout(() => {
|
||||
openView.value = true;
|
||||
}, 100);
|
||||
}
|
||||
const openInterface = ref(false);
|
||||
const rowInterface = ref({});
|
||||
|
||||
|
||||
//接口信息
|
||||
const handleInterface = (row) => {
|
||||
getSuperPlatformInf(row.id).then(response => {
|
||||
Object.assign(formInterface, response.data);
|
||||
oldForm.value = JSON.stringify(formInterface);
|
||||
openInterface.value = true;
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const openRevise = ref(false);
|
||||
const versionValue = ref('');
|
||||
const formInterfaceVersion = ref({});
|
||||
const platformHistoryList = ref([]);
|
||||
const rowOpenRevise = reactive({});
|
||||
const handleOpenRevise = (row) => {
|
||||
getSuperPlatformInf(row.id).then(response => {
|
||||
|
|
@ -678,11 +690,45 @@ const switchBeforeChange = () => {
|
|||
rowOpenRevise.extInfo = JSON.stringify(rowOpenRevise.extInfo);
|
||||
rowOpenRevise.urlInfo = JSON.stringify(rowOpenRevise.urlInfo);
|
||||
oldForm.value = JSON.stringify(rowOpenRevise);
|
||||
formInterfaceVersion.value = response.data;
|
||||
let arr = [];
|
||||
|
||||
arr.push({
|
||||
label: proxy.t('当前版本'),
|
||||
value: 0
|
||||
});
|
||||
|
||||
platformHistoryList.value = response.data.platformHistoryList;
|
||||
response.data.platformHistoryList.map(item => {
|
||||
arr.push({
|
||||
label: proxy.t('历史版本')+item.versionCode,
|
||||
value: item.versionCode
|
||||
})
|
||||
});
|
||||
versionItem.value = arr;
|
||||
openRevise.value = true;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 切换版本
|
||||
const switchingVersions = (value) =>{
|
||||
if (value == 0){
|
||||
Object.assign(formInterface, formInterfaceVersion.value);
|
||||
}else{
|
||||
platformHistoryList.value.map(item => {
|
||||
if (item.versionCode == value){
|
||||
let objitem = JSON.parse(item.content);
|
||||
Object.assign(formInterface, objitem);
|
||||
rowOpenRevise.platformInfo = JSON.stringify(objitem.platformInfo);
|
||||
rowOpenRevise.keyInfo = JSON.stringify(objitem.keyInfo);
|
||||
rowOpenRevise.langInfo = JSON.stringify(objitem.langInfo);
|
||||
rowOpenRevise.currencyInfo = JSON.stringify(objitem.currencyInfo);
|
||||
rowOpenRevise.extInfo = JSON.stringify(objitem.extInfo);
|
||||
rowOpenRevise.urlInfo = JSON.stringify(objitem.urlInfo);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 详细信息 */
|
||||
function handleView(row) {
|
||||
titlePlatForm.value = proxy.t('详情');
|
||||
|
|
|
|||
Loading…
Reference in New Issue