fix:1,tapdbug
parent
c839bf276f
commit
9e3907e7bf
|
|
@ -267,3 +267,22 @@ export function listRanking(query) {
|
|||
})
|
||||
}
|
||||
/* ------------------------------- 游戏全网排名end ------------------------------- */
|
||||
|
||||
|
||||
// 查询不存在图片的游戏
|
||||
export function getImgNotExist(data) {
|
||||
return request({
|
||||
url: '/game/game/get/img/not/exist',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//图片专用上传接口
|
||||
export function postFileGameUpload(platformCode,gameCode,data) {
|
||||
return request({
|
||||
url: `/file/game/upload/${platformCode}/${gameCode}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ const handleCheckedCitiesChange = (value) => {
|
|||
|
||||
// 币种label设置
|
||||
const getCurrencyTypeList = () => {
|
||||
const list = getLocalStorage('currencyList')?.filter(v => v.status == 0) || [];
|
||||
const list = getLocalStorage('currencySelect')?.filter(v => v.status == 0) || [];
|
||||
needOptions.value = list.map(item => {
|
||||
return {
|
||||
label: getCurrencyDisplay(item.currencyCode, 'currencyDisplay'),
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const options = ref([]), radioValue = defineModel();
|
|||
|
||||
// 币种选择
|
||||
const getCurrencyTypeList = () => {
|
||||
const list = getLocalStorage('currencyList')?.filter(v => v.status == 0) || [];
|
||||
const list = getLocalStorage('currencySelect')?.filter(v => v.status == 0) || [];
|
||||
options.value = list.map(item => {
|
||||
return {
|
||||
label: item.currencyCode,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ const handleCheckAll = (checked) => {
|
|||
|
||||
// 币种选择
|
||||
const getCurrencyTypeList = () => {
|
||||
const localList = getLocalStorage('currencyList')?.filter(v => v.status == 0) || []; // 本地缓存
|
||||
const localList = getLocalStorage('currencySelect')?.filter(v => v.status == 0) || []; // 本地缓存
|
||||
|
||||
if (localList.length) {
|
||||
needOptions.value = localList.map(item => {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isUrl: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
uploadImgUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
|
@ -88,6 +96,9 @@ const fileList = ref([]);
|
|||
const showTip = computed(
|
||||
() => props.isShowTip && (props.fileType || props.fileSize)
|
||||
);
|
||||
if (props.isUrl == true){ //
|
||||
uploadImgUrl.value = props.uploadImgUrl
|
||||
}
|
||||
watch(() => props.modelValue, val => {
|
||||
if (val) {
|
||||
// 首先将值转为数组
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import elementIcons from '@/components/SvgIcon/svgicon'
|
|||
import BaseSelect from '@/components/BaseSelect';
|
||||
// 字典下拉组件
|
||||
import DictSelect from '@/components/DictSelect';
|
||||
// 币种下拉列表
|
||||
import CurrencySelect from '@/components/CurrencySelect';
|
||||
import './permission' // permission control
|
||||
|
||||
import { useDict } from '@/utils/dict'
|
||||
|
|
@ -82,6 +84,7 @@ app.component('SelectInputForm', SelectInputForm);
|
|||
app.component('TableOperation', TableOperation);
|
||||
app.component('DictSelect', DictSelect);
|
||||
app.component('BaseSelect', BaseSelect);
|
||||
app.component('CurrencySelect', CurrencySelect);
|
||||
app.component('Editor', Editor)
|
||||
app.use(router)
|
||||
app.use(store)
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ export function moneyFormat(num, patch = false, decimal = 2, split = ',') {
|
|||
}
|
||||
// 获取币种比例
|
||||
export function getCurrencyDisplay(currencyCode, key) {
|
||||
const currencylist = getLocalStorage('currencyList') || [];
|
||||
const currencylist = getLocalStorage('currencySelect') || [];
|
||||
if (currencylist.length > 0) {
|
||||
return currencylist.find(v => v.currencyCode === currencyCode)[key];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,257 @@
|
|||
<template>
|
||||
<el-dialog :title="t('{}银行信息', addEditStatus === 'add' ? '新增' : '修改')" align-center v-model="isShowDialog" width="750px"
|
||||
append-to-body @close="closeDialog('close')">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px" v-loading="loading">
|
||||
<el-form-item :label="t('币种:')" prop="currencyType">
|
||||
<currency-select v-model="formData.currencyType" style="width: 100%;"></currency-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('银行名称')" prop="bankName">
|
||||
<el-input v-model="formData.bankName" :placeholder="t('请输入银行名称')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('银行图标')" prop="bankIcon">
|
||||
<div class="upload-box">
|
||||
<image-upload v-model="formData.bankIcon" :typeUpImg="24" :limit="1" :isShowTip="false"></image-upload>
|
||||
<div class="upload-tips">
|
||||
<div>{{ t('图标大小60*60') }}</div>
|
||||
<div>{{ t('PNG或JPG格式') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('启用状态')" prop="status">
|
||||
<el-switch v-model="formData.status" active-value="0" inactive-value="1" />
|
||||
</el-form-item>
|
||||
<div v-for="(item,index) in formData.bankCodeList">
|
||||
<el-form-item :label="t('渠道代码')" :prop="`bankCodeList[${index}].channelCode`" :rules="rules.channelCode">
|
||||
<div style="width: 100%;display: flex;">
|
||||
<custom-select v-model="item.channelCode" v-if="showloding" :options="channelCodeList" :placeholder="t('请选择渠道代码')" />
|
||||
<div style="display: flex;width: 150px;margin-left: 10px;">
|
||||
<el-button v-if="formData.bankCodeList.length > 1" class="mt-2"
|
||||
@click.prevent="dealWithItem1(item, 'delete')">
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-button v-if="index !== 0 || formData.bankCodeList.length == 1" class="mt-2"
|
||||
@click.prevent="dealWithItem1(item, 'add')">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('银行代码')" prop="bankCodeList.bankCode">
|
||||
<el-input v-model="item.bankCode" :placeholder="t('请输入银行代码')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item :label="t('备注')" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" :placeholder="t('请输入内容')" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button v-if="addEditStatus === 'add'" @click="resetForm">{{ t('重 置') }}</el-button>
|
||||
<el-button v-else @click="closeDialog('close')">{{ t('取 消') }}</el-button>
|
||||
|
||||
<el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getBank, addBank, updateBank } from "@/api/payment/bank";
|
||||
import CurrencySelect from "@/components/CurrencySelect";
|
||||
import CustomSelect from "@/components/CustomSelect";
|
||||
import { getChannelExternalList } from '@/api/finance/recharge'
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
|
||||
const props = defineProps({
|
||||
addEditStatus: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
},
|
||||
id: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits(['closeDialog']);
|
||||
const loading = ref(false);
|
||||
const loadingButton = ref(false);
|
||||
const oldForm = shallowRef({ });
|
||||
const isShowDialog = ref(true); // 弹窗是否显示
|
||||
const formRef = ref();
|
||||
const formData = reactive({ // 表单参数
|
||||
currencyType: null,
|
||||
bankName: null,
|
||||
bankCode: '',
|
||||
bankIcon: null,
|
||||
status: '1',
|
||||
bankCodeList: [
|
||||
{
|
||||
channelCode: null,
|
||||
bankCode: null
|
||||
}
|
||||
],
|
||||
remark: null
|
||||
});
|
||||
const channelCodeList = ref([]);
|
||||
// 表单校验
|
||||
const rules = reactive({
|
||||
channelCode: [
|
||||
{ required: true, message: proxy.t('渠道代码不能为空'), trigger: 'change' }
|
||||
],
|
||||
currencyType: [
|
||||
{ required: true, message: proxy.t('币种不能为空'), trigger: 'change' }
|
||||
],
|
||||
bankName: [
|
||||
{ required: true, message: proxy.t('银行名称不能为空'), trigger: 'blur' }
|
||||
],
|
||||
bankCode: [
|
||||
{ required: true, message: proxy.t('银行代码不能为空'), trigger: 'blur' }
|
||||
],
|
||||
bankIcon: [
|
||||
{ required: true, message: proxy.t('银行图标地址不能为空'), trigger: 'blur' }
|
||||
]
|
||||
});
|
||||
const dealWithItem1 = (item, type) => {
|
||||
if (type == 'delete') {
|
||||
const index = formData.bankCodeList.indexOf(item)
|
||||
if (index !== -1) {
|
||||
formData.bankCodeList.splice(index, 1)
|
||||
}
|
||||
} else {
|
||||
formData.bankCodeList.push({
|
||||
channelCode: null,
|
||||
bankCode: null
|
||||
})
|
||||
}
|
||||
}
|
||||
const showloding = ref(true);
|
||||
const getChannelExternalLists = async () => {
|
||||
let _data = {
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
}
|
||||
showloding.value = false;
|
||||
getChannelExternalList(_data).then(response => {
|
||||
channelCodeList.value = response.rows.map(item => ({
|
||||
label: item.name,
|
||||
value: item.code
|
||||
}))
|
||||
showloding.value = true;
|
||||
})
|
||||
};
|
||||
// 获取修改详情
|
||||
if (props.addEditStatus === 'edit' && props.id) {
|
||||
getChannelExternalLists();
|
||||
console.log('修改详情');
|
||||
loading.value = true;
|
||||
getBank(props.id).then(res => {
|
||||
loading.value = false;
|
||||
|
||||
// 回填
|
||||
for (var key in formData) {
|
||||
if (formData.hasOwnProperty(key)) formData[key] = res.data[key];
|
||||
}
|
||||
formData.id = res.data.id; // 修改时加入ID
|
||||
setTimeout(() => {
|
||||
let objForm = { ...formData }
|
||||
oldForm.value = JSON.stringify(objForm);
|
||||
}, 500);
|
||||
});
|
||||
}else{
|
||||
getChannelExternalLists();
|
||||
Object.assign(formData, {
|
||||
currencyType: null,
|
||||
bankName: null,
|
||||
bankCode: '',
|
||||
bankIcon: null,
|
||||
status: '1',
|
||||
bankCodeList: [
|
||||
{
|
||||
channelCode: null,
|
||||
bankCode: null
|
||||
}
|
||||
],
|
||||
remark: null
|
||||
})
|
||||
}
|
||||
|
||||
// 提交
|
||||
const submitForm = () => {
|
||||
formRef.value.validate(valid => {
|
||||
if (valid) {
|
||||
loadingButton.value = true;
|
||||
if (props.addEditStatus === 'add') {
|
||||
addBank(formData).then(res => {
|
||||
loadingButton.value = false;
|
||||
proxy.$modal.msgSuccess(proxy.t('新增成功!'));
|
||||
closeDialog('add-edit');
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
});
|
||||
} else if (props.addEditStatus === 'edit') {
|
||||
if (JSON.stringify(formData) != oldForm.value) {
|
||||
updateBank(formData).then(res => {
|
||||
loadingButton.value = false;
|
||||
proxy.$modal.msgSuccess(proxy.t('修改成功!'));
|
||||
closeDialog('add-edit');
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
});
|
||||
}else{
|
||||
loadingButton.value = false;
|
||||
closeDialog('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetForm = () => {
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
const closeDialog = (type) => {
|
||||
emit('closeDialog',type);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
.upload-box {
|
||||
height: 60px;
|
||||
overflow: hidden;
|
||||
|
||||
.upload-tips {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
:deep(.el-upload-list) {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
|
||||
.el-upload,
|
||||
.el-upload-list__item {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.el-upload-list__item {
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,52 +1,173 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- <el-tabs v-model="activeName">
|
||||
<el-tab-pane name="rateConfiguration" :label="t('汇率配置')"></el-tab-pane>
|
||||
<el-tab-pane name="syncHistory" :label="t('同步历史记录')"></el-tab-pane>
|
||||
<el-tab-pane name="bankManagement" :label="t('银行管理')"></el-tab-pane>
|
||||
</el-tabs> -->
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<el-form-item prop="currencyType">
|
||||
<currency-select v-model="queryParams.currencyType" style="width: 180px;" clearable @clear="handleQuery"
|
||||
@change="handleQuery"></currency-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="bankName">
|
||||
<el-input v-model="queryParams.bankName" :placeholder="t('请输入银行名称')" clearable @clear="handleQuery"
|
||||
@keyup.enter="handleQuery" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="bankCode">
|
||||
<el-input v-model="queryParams.bankCode" :placeholder="t('请输入银行代码')" clearable @clear="handleQuery"
|
||||
@keyup.enter="handleQuery" style="width: 220px;" />
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
<template #right>
|
||||
<el-button @click="handleAdd" type="primary" plain icon="Plus" v-hasPermi="['operation:bank:add']">{{
|
||||
t('新增') }}</el-button>
|
||||
</template>
|
||||
</table-search-card>
|
||||
|
||||
<!-- 列表组件 -->
|
||||
<bank-management v-if="activeName == 'bankManagement'"></bank-management>
|
||||
<!-- <div class="tabs-main-box">
|
||||
<rate-configuration v-if="activeName == 'rateConfiguration'"></rate-configuration>
|
||||
<sync-history v-if="activeName == 'syncHistory'"></sync-history>
|
||||
<!-- 查询表格 -->
|
||||
<el-table v-loading="loading" :data="bankList" class="c-table-main" stripe border>
|
||||
<el-table-column :label="t('序号')" align="center" type="index" width="80">
|
||||
<template #default="{ $index }">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + $index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('币种')" align="center" prop="currencyType" min-width="100" />
|
||||
<el-table-column :label="t('银行名称')" align="center" prop="bankName" min-width="100" />
|
||||
<!-- <el-table-column :label="t('银行代码')" align="center" prop="bankCode" min-width="100" /> -->
|
||||
<el-table-column :label="t('银行图标')" align="center" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<el-image class="table-icon-image" :src="fileHost + row.bankIcon" fit="contain" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('是否开启')" align="center" min-width="160">
|
||||
<template #default="{ row }">
|
||||
<el-switch v-model="row.status" active-value="0" inactive-value="1" :before-change="switchBeforeChange"
|
||||
@click="changeStatus(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('备注')" align="center" min-width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.remark || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('操作')" align="center" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleUpdate(row)" v-hasPermi="['operation:bank:edit']">{{ t('修改')
|
||||
}}</el-button>
|
||||
<!-- <el-button link type="primary" @click="handleDelete(row)" v-hasPermi="['operation:bank:remove']">{{
|
||||
t('删除') }}</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div> -->
|
||||
<!-- 会员信息弹窗 -->
|
||||
<!-- <user-info ref="userInfoRef"></user-info> -->
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改银行管理对话框 -->
|
||||
<add-edit-dialog :id="editDataId" :addEditStatus="addEditStatus" v-if="isShowDialog"
|
||||
@closeDialog="closeDialog" v-model:show="isShowDialog"></add-edit-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 稽核管理 -->
|
||||
<script setup name="BankingRegulations">
|
||||
import { listBank, delBank, changeBankStatus } from "@/api/payment/bank";
|
||||
import AddEditDialog from "./components/AddEditDialog.vue";
|
||||
import CurrencySelect from '@/components/CurrencySelect'; // 币种选择
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
||||
import BankManagement from "./bankManagement"; // 银行管理
|
||||
import RateConfiguration from "./rateConfiguration"; // 汇率配置
|
||||
import SyncHistory from "./syncHistory";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const activeName = ref('bankManagement'); // 默认展示稽核管理
|
||||
const memberAccount = ref(''); // 跳转参数
|
||||
|
||||
// 组件激活时获取路由参数
|
||||
onActivated(() => {
|
||||
const routeParams = useRoute().query;
|
||||
|
||||
// 路由跳转过来
|
||||
if (Object.keys(routeParams).length) {
|
||||
activeName.value = routeParams.activeName || 'auditManage';
|
||||
memberAccount.value = routeParams.memberAccount || '';
|
||||
}
|
||||
|
||||
// 路由跳转过来,清空跳转参数
|
||||
useRouter().replace({ query: {} });
|
||||
const fileHost = getLocalStorage('fileUrl') || ''; // 文件host
|
||||
const bankList = ref([]);
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
currencyType: 'VND',
|
||||
bankCode: null,
|
||||
status: null
|
||||
});
|
||||
|
||||
// 会员详情
|
||||
const userInfoRef = ref(null);
|
||||
const showUserInfo = (id) => {
|
||||
userInfoRef.value.showModal(id);
|
||||
}
|
||||
</script>
|
||||
// 查询银行管理列表
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
||||
<style scoped lang='scss'></style>
|
||||
listBank(queryParams).then(res => {
|
||||
bankList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref('');
|
||||
const handleAdd = () => {
|
||||
isShowDialog.value = true;
|
||||
addEditStatus.value = 'add';
|
||||
}
|
||||
|
||||
// 修改
|
||||
const handleUpdate = (row) => {
|
||||
editDataId.value = row.id;
|
||||
isShowDialog.value = true;
|
||||
addEditStatus.value = 'edit';
|
||||
}
|
||||
|
||||
// 关闭新增修改弹窗
|
||||
const closeDialog = (type) => {
|
||||
switch (type) {
|
||||
case 'add-edit': // 新增-修改弹窗
|
||||
addEditStatus.value = 'add'; // 每次关闭还原为新增模式
|
||||
isShowDialog.value = false;
|
||||
// 刷新列表
|
||||
getList();
|
||||
break
|
||||
case 'close': // 新增-修改弹窗
|
||||
addEditStatus.value = 'add'; // 每次关闭还原为新增模式
|
||||
isShowDialog.value = false;
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 表格中开启状态开关
|
||||
const switchBeforeChange = () => {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 银行启用状态更改
|
||||
const changeStatus = (row) => { // row.status: 0-停用 1-启用
|
||||
proxy.$modal.confirm( proxy.t('确认{}“' + row.bankName + '”?', +row.status === 1 ? '启用' : '停用')).then(() => {
|
||||
changeBankStatus({ id: row.id, status: +row.status === 1 ? 0 : 1 }).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t(row.bankName + ' {}成功!', +row.status === 1 ? '启用' : '停用'));
|
||||
getList();
|
||||
})
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row) => {
|
||||
proxy.$modal.confirm(proxy.t('确认删除“' + row.bankName + '”的数据?')).then(() => {
|
||||
return delBank(row.id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess(proxy.t('删除成功!'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container{
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-table class="c-table-main" ref="tableRef" v-loading="loading" row-key="id" :data="dataList" stripe border>
|
||||
<el-table-column prop="currencyCode" :label="t('原币种')" align="center">
|
||||
<template #default="{row}">
|
||||
{{ row.currencyCode }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="currencyCode" :label="t('基础币种')" align="center">
|
||||
<template #default="{row}">
|
||||
{{ row.currencyCode }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exchangeCurrencyCode" :label="t('兑换币种')" align="center">
|
||||
<template #default="{row}">
|
||||
{{ row.exchangeCurrencyCode }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exchangeRate" :label="t('站点汇率')" align="center">
|
||||
<template #default="{row}">
|
||||
{{row.exchangeRate}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label-class-name="c-table-column-center12">
|
||||
<template #header>
|
||||
<div style="width: 100%;text-align: center;">汇率差设置</div>
|
||||
<div style="width: 100%;text-align: center;color: #8b8b8b;font-weight: 400;">(即比市场更高或更低的部分)</div>
|
||||
</template>
|
||||
<el-table-column prop="exchangeRate" :label="t('单位')" label-class-name="c-table-column-center12" align="center">
|
||||
<template #default="{row}">
|
||||
<span v-if="row.differenceType == 1">{{ t('百分比') }}</span>
|
||||
<span v-if="row.differenceType == 2">{{ t('固定值') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exchangeRate" :label="t('汇率差')" label-class-name="c-table-column-center12" align="center">
|
||||
<template #default="{row}">
|
||||
<span v-if="row.differenceType == 1">{{row.exchangeCurrencyCode}}+{{row.differenceValue}}%</span>
|
||||
<span v-if="row.differenceType == 2">{{row.differenceValue}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exchangeRate" label-class-name="c-table-column-center12" align="center">
|
||||
<template #header>
|
||||
<div style="width: 100%;text-align: center;">{{ t('生效汇率') }}</div>
|
||||
<div style="width: 100%;text-align: center;color: #8b8b8b;font-weight: 400;">{{ t('(市场汇率 + 汇率差)') }}</div>
|
||||
</template>
|
||||
<template #default="{row}">
|
||||
{{row.actualBalance}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exchangeRate" :label="t('操作')" align="center">
|
||||
<template #default="{row}">
|
||||
<!-- <el-button link type="primary" >{{
|
||||
t('修改') }}</el-button> -->
|
||||
--
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="BankingRegulations">
|
||||
import { listBank, delBank, changeBankStatus } from "@/api/bank";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import { getTenantExchangeSelect } from "@/api/system/siteInformation";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const fileHost = getLocalStorage('fileUrl') || ''; // 文件host
|
||||
const bankList = ref([]);
|
||||
const loading = ref(true);
|
||||
const dataList = ref([]);
|
||||
const total = ref(0);
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
currencyType: null,
|
||||
bankCode: null,
|
||||
status: null
|
||||
});
|
||||
|
||||
// 查询银行管理列表
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getTenantExchangeSelect({}).then(res => {
|
||||
dataList.value = res.data;
|
||||
loading.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref('');
|
||||
const handleAdd = () => {
|
||||
isShowDialog.value = true;
|
||||
addEditStatus.value = 'add';
|
||||
}
|
||||
|
||||
// 修改
|
||||
const handleUpdate = (row) => {
|
||||
editDataId.value = row.id;
|
||||
isShowDialog.value = true;
|
||||
addEditStatus.value = 'edit';
|
||||
}
|
||||
|
||||
// 关闭新增修改弹窗
|
||||
const closeDialog = (type) => {
|
||||
switch (type) {
|
||||
case 'add-edit': // 新增-修改弹窗
|
||||
addEditStatus.value = 'add'; // 每次关闭还原为新增模式
|
||||
isShowDialog.value = false;
|
||||
break
|
||||
}
|
||||
|
||||
// 刷新列表
|
||||
getList();
|
||||
}
|
||||
|
||||
// 表格中开启状态开关
|
||||
const switchBeforeChange = () => {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 银行启用状态更改
|
||||
const changeStatus = (row) => { // row.status: 0-停用 1-启用
|
||||
proxy.$modal.confirm( proxy.t('确认{}“' + row.bankName + '”?', +row.status === 1 ? '启用' : '停用')).then(() => {
|
||||
changeBankStatus({ id: row.id, status: +row.status === 1 ? 0 : 1 }).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t(row.bankName + ' {}成功!', +row.status === 1 ? '启用' : '停用'));
|
||||
getList();
|
||||
})
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row) => {
|
||||
proxy.$modal.confirm(proxy.t('确认删除“' + row.bankName + '”的数据?')).then(() => {
|
||||
return delBank(row.id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess(proxy.t('删除成功!'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.c-table-column-center12){
|
||||
background: #fbf4c4!important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
研发中...
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="BankingRegulations">
|
||||
import { listBank, delBank, changeBankStatus } from "@/api/payment/bank";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const fileHost = getLocalStorage('fileUrl') || ''; // 文件host
|
||||
const bankList = ref([]);
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
currencyType: null,
|
||||
bankCode: null,
|
||||
status: null
|
||||
});
|
||||
|
||||
// 查询银行管理列表
|
||||
function getList() {
|
||||
}
|
||||
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref('');
|
||||
const handleAdd = () => {
|
||||
isShowDialog.value = true;
|
||||
addEditStatus.value = 'add';
|
||||
}
|
||||
|
||||
// 修改
|
||||
const handleUpdate = (row) => {
|
||||
editDataId.value = row.id;
|
||||
isShowDialog.value = true;
|
||||
addEditStatus.value = 'edit';
|
||||
}
|
||||
|
||||
// 关闭新增修改弹窗
|
||||
const closeDialog = (type) => {
|
||||
switch (type) {
|
||||
case 'add-edit': // 新增-修改弹窗
|
||||
addEditStatus.value = 'add'; // 每次关闭还原为新增模式
|
||||
isShowDialog.value = false;
|
||||
break
|
||||
}
|
||||
|
||||
// 刷新列表
|
||||
getList();
|
||||
}
|
||||
|
||||
// 表格中开启状态开关
|
||||
const switchBeforeChange = () => {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 银行启用状态更改
|
||||
const changeStatus = (row) => { // row.status: 0-停用 1-启用
|
||||
proxy.$modal.confirm( proxy.t('确认{}“' + row.bankName + '”?', +row.status === 1 ? '启用' : '停用')).then(() => {
|
||||
changeBankStatus({ id: row.id, status: +row.status === 1 ? 0 : 1 }).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t(row.bankName + ' {}成功!', +row.status === 1 ? '启用' : '停用'));
|
||||
getList();
|
||||
})
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row) => {
|
||||
proxy.$modal.confirm(proxy.t('确认删除“' + row.bankName + '”的数据?')).then(() => {
|
||||
return delBank(row.id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess(proxy.t('删除成功!'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<select-input-form ref="selectInputFormRef" :width="[150, 170]" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :width="[150, 170]" v-if="showLodings" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="currency">
|
||||
<checkbox-select style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.currency" filterable :options="currencySelectArr" :placeholder="t('币种')"></checkbox-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supportedFeatures">
|
||||
<checkbox-select style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.supportedFeatures" :options="supportedFeaturesSelectArr" :placeholder="t('支持功能')"></checkbox-select>
|
||||
<CustomSelect style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.supportedFeatures" :options="supportedFeaturesSelectArr" :placeholder="t('支持功能')"></CustomSelect>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -134,6 +133,7 @@
|
|||
<script setup name="PaymentRanking">
|
||||
import {getPayRankingList} from "@/api/finance";
|
||||
import CheckboxSelect from "@/components/CheckboxSelect"; // 多选框
|
||||
import CustomSelect from "@/components/CustomSelect"; // 多选框
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import Crontab from '@/components/Crontab'
|
||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
|
|
@ -167,7 +167,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
currency:['VND'],
|
||||
supportedFeatures:[],
|
||||
supportedFeatures:'',
|
||||
searchType: 'thirdPartyName',
|
||||
orderByColumn:'totalRechargeCount',
|
||||
isAsc:'desc',
|
||||
|
|
@ -183,7 +183,6 @@ loading.value = true;
|
|||
let params = {
|
||||
...queryParams.value,
|
||||
currency: queryParams.value.currency.join(','),
|
||||
supportedFeatures: queryParams.value.supportedFeatures.join(','),
|
||||
|
||||
}
|
||||
getPayRankingList(params).then(response => {
|
||||
|
|
@ -198,13 +197,16 @@ function handleQuery() {
|
|||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const showLodings = ref(true);
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
queryParams.value.currency = ['VND'];
|
||||
|
||||
handleQuery();
|
||||
proxy.resetForm("queryRef");
|
||||
queryParams.value.currency = ['VND'];
|
||||
showLodings.value = false;
|
||||
nextTick(() => {
|
||||
showLodings.value = true;
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<select-input-form ref="selectInputFormRef" :width="[150, 170]" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :width="[150, 170]" v-if="showLodings" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="currency">
|
||||
<checkbox-select style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.currency" filterable :options="currencySelectArr" :placeholder="t('币种')"></checkbox-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supportedFeatures">
|
||||
<checkbox-select style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.supportedFeatures" :options="supportedFeaturesSelectArr" :placeholder="t('支持功能')"></checkbox-select>
|
||||
<CustomSelect style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.supportedFeatures" :options="supportedFeaturesSelectArr" :placeholder="t('支持功能')"></CustomSelect>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -131,6 +130,7 @@
|
|||
<script setup name="PaymentRanking">
|
||||
import {getPayRankingList} from "@/api/finance";
|
||||
import CheckboxSelect from "@/components/CheckboxSelect"; // 多选框
|
||||
import CustomSelect from "@/components/CustomSelect"; // 自定义下拉选择框
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import Crontab from '@/components/Crontab'
|
||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
|
|
@ -165,7 +165,7 @@ queryParams: {
|
|||
pageSize: 10,
|
||||
thirdPartyStatus:0,
|
||||
currency:['VND'],
|
||||
supportedFeatures:[],
|
||||
supportedFeatures:'',
|
||||
searchType: 'thirdPartyName',
|
||||
orderByColumn:'totalRechargeCount',
|
||||
isAsc:'desc',
|
||||
|
|
@ -181,8 +181,6 @@ loading.value = true;
|
|||
let params = {
|
||||
...queryParams.value,
|
||||
currency: queryParams.value.currency.join(','),
|
||||
supportedFeatures: queryParams.value.supportedFeatures.join(','),
|
||||
|
||||
}
|
||||
getPayRankingList(params).then(response => {
|
||||
agentList.value = response.rows;
|
||||
|
|
@ -196,11 +194,15 @@ function handleQuery() {
|
|||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const showLodings = ref(true);
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
queryParams.value.currency = ['VND'];
|
||||
showLodings.value = false;
|
||||
nextTick(() => {
|
||||
showLodings.value = true;
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<select-input-form ref="selectInputFormRef" :width="[150, 170]" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :width="[150, 170]" v-if="showLodings" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="currency">
|
||||
<checkbox-select style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.currency" filterable :options="currencySelectArr" :placeholder="t('币种')"></checkbox-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supportedFeatures">
|
||||
<checkbox-select style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.supportedFeatures" :options="supportedFeaturesSelectArr" :placeholder="t('支持功能')"></checkbox-select>
|
||||
<CustomSelect style="width: 230px;" collapse-tags collapse-tags-tooltip v-model="queryParams.supportedFeatures" :options="supportedFeaturesSelectArr" :placeholder="t('支持功能')"></CustomSelect>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -134,6 +133,7 @@
|
|||
<script setup name="PaymentRanking">
|
||||
import {getPayRankingList} from "@/api/finance";
|
||||
import CheckboxSelect from "@/components/CheckboxSelect"; // 多选框
|
||||
import CustomSelect from "@/components/CustomSelect"; // 多选框
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import Crontab from '@/components/Crontab'
|
||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
|
|
@ -168,7 +168,7 @@ queryParams: {
|
|||
pageSize: 10,
|
||||
thirdPartyStatus:1,
|
||||
currency:['VND'],
|
||||
supportedFeatures:[],
|
||||
supportedFeatures:'',
|
||||
searchType: 'thirdPartyName',
|
||||
orderByColumn:'totalRechargeCount',
|
||||
isAsc:'desc',
|
||||
|
|
@ -184,7 +184,6 @@ loading.value = true;
|
|||
let params = {
|
||||
...queryParams.value,
|
||||
currency: queryParams.value.currency.join(','),
|
||||
supportedFeatures: queryParams.value.supportedFeatures.join(','),
|
||||
|
||||
}
|
||||
getPayRankingList(params).then(response => {
|
||||
|
|
@ -199,11 +198,15 @@ function handleQuery() {
|
|||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const showLodings = ref(true);
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
queryParams.value.currency = ['VND'];
|
||||
showLodings.value = false;
|
||||
nextTick(() => {
|
||||
showLodings.value = true;
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
<el-input v-model="queryParams.id" style="width: 120px" :placeholder="t('编号')" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="changeType">
|
||||
<custom-select style="width: 130px;" v-model="queryParams.changeType" :options="changeTypeArr" :placeholder="t('账变类型')"></custom-select>
|
||||
<custom-select style="width: 220px;" v-model="queryParams.changeType" :options="changeTypeArr" :placeholder="t('账变类型')"></custom-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="changeTarget">
|
||||
<custom-select style="width: 130px;" v-model="queryParams.changeTarget" :options="changeTargetArr" :placeholder="t('交易对象')"></custom-select>
|
||||
<custom-select style="width: 220px;" v-model="queryParams.changeTarget" :options="changeTargetArr" :placeholder="t('交易对象')"></custom-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
|
|||
|
|
@ -1,95 +1,69 @@
|
|||
<template>
|
||||
<el-form v-if="lodingForm" :ref="(el) =>formRefs[index] = el " :model="item" :rules="rules" label-width="120"
|
||||
v-for="(item, index) in fieldConfigList" :key="new Date()" style="margin-bottom: 15px;">
|
||||
<el-row :span="24">
|
||||
|
||||
<el-col :span="9" class="position-top">
|
||||
<el-form-item prop="fieldName" :label="t('字段名称')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('字段名称') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.fieldName" :maxlength="50" :placeholder="t('请输入字段名称')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9" class="position-top">
|
||||
<el-form-item prop="fieldCode" :label="t('字段编码')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('字段编码') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.fieldCode" :maxlength="50" :placeholder="t('请输入字段编码')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="position-bottm">
|
||||
<el-form-item>
|
||||
<el-button icon="Delete" v-if="fieldConfigList.length > 1" @click="handleDelete(index,item)">{{ t('删除')
|
||||
}}</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd" v-if="index === fieldConfigList.length - 1">{{
|
||||
t('渠道配置') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="position-top">
|
||||
<el-form-item prop="pcId" :label="t('第三方渠道ID')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('第三方渠道ID') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.pcId" :maxlength="50" :placeholder="t('请输入第三方渠道ID')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="position-top">
|
||||
<el-form-item prop="defaultValue" :label="t('默认值')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('默认值') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.defaultValue" :maxlength="50" :placeholder="t('请输入默认值')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="position-top">
|
||||
<el-form-item prop="remark" :label="t('描述')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('描述') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.remark" :maxlength="50" :placeholder="t('请输入描述')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="position-top">
|
||||
<el-form-item prop="mustFlag" :label="t('是否必填')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('是否必填') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-radio-group v-model="item.mustFlag">
|
||||
<el-radio :value="1">{{ t('必填') }}</el-radio>
|
||||
<el-radio :value="0">{{ t('非必填') }}</el-radio>
|
||||
<el-form v-if="lodingForm" ref="formRefs" :model="formData" :rules="rules" label-width="120" style="margin-bottom: 15px;">
|
||||
<el-table :data="formData.fieldConfigList" style="width: 100%" border>
|
||||
<el-table-column prop="fieldName" label="字段名称" min-width="180" >
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`fieldConfigList[${$index}].fieldName`" label-width="0" :rules="rules.fieldName">
|
||||
<el-input v-model="row.fieldName" :maxlength="50" :placeholder="t('请输入字段名称')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fieldCode" label="字段编码" min-width="180" >
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`fieldConfigList[${$index}].fieldCode`" label-width="0"
|
||||
:rules="[
|
||||
{ required: true, message: '请输入字段编码', trigger: ['blur', 'change'] },
|
||||
{ validator: (rule, value, callback) => validateUniqueFieldCode(value, $index, callback), trigger: ['blur', 'change'] }
|
||||
]"
|
||||
>
|
||||
<el-input v-model="row.fieldCode" :maxlength="50" :placeholder="t('请输入字段编码')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="defaultValue" label="默认值" min-width="180" >
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-input v-model="row.defaultValue" :maxlength="50" :placeholder="t('请输入默认值')" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="描述" min-width="180" >
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" :maxlength="50" :placeholder="t('请输入描述')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mustFlag" label="是否必填" min-width="150" >
|
||||
<template #default="{ row }">
|
||||
<el-radio-group v-model="row.mustFlag">
|
||||
<el-radio :value="1">{{ t('必填') }}</el-radio>
|
||||
<el-radio :value="0">{{ t('非必填') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="merchantFlag" label="是否是商户号" min-width="150" >
|
||||
<template #default="{ row }">
|
||||
<el-radio-group v-model="row.merchantFlag" @change="onMerchantChange(row)">
|
||||
<el-radio :value="1" :disabled="hasMerchant && row.merchantFlag !== 1">是商户号</el-radio>
|
||||
<el-radio :value="0">非商户号</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="position-top">
|
||||
<el-form-item prop="merchantFlag" :label="t('是否是商户号')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('是否是商户号') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-radio-group v-model="item.merchantFlag">
|
||||
<el-radio :value="1">{{ t('是商户号') }}</el-radio>
|
||||
<el-radio :value="0">{{ t('非商户号') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" min-width="260">
|
||||
<template #default="{row, $index}">
|
||||
<el-button link type="primary" icon="Delete" v-if="formData.fieldConfigList.length > 1" @click="handleDelete($index,row)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd" v-if="$index === formData.fieldConfigList.length - 1">{{
|
||||
t('渠道配置') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
|
||||
<fee-reduction v-if="dialogShowData.showFeeReduction" v-model:show="dialogShowData.showFeeReduction" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></fee-reduction>
|
||||
<recharge-config v-if="dialogShowData.showRechargeConfig" v-model:show="dialogShowData.showRechargeConfig" v-model:data="addQuery" @submit="settingSubmit"
|
||||
|
|
@ -128,17 +102,17 @@ const props = defineProps({
|
|||
})
|
||||
const emits = defineEmits(['update:data'])
|
||||
|
||||
const fieldConfigList = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
// const fieldConfigList = computed({
|
||||
// get() {
|
||||
// return props.data
|
||||
// },
|
||||
// set(value) {
|
||||
// emits('update:data', value)
|
||||
// }
|
||||
// })
|
||||
const validateUniqueCombo = (rule, value, callback, index) => {
|
||||
const currentItem = fieldConfigList.value[index];
|
||||
const duplicate = fieldConfigList.value.some((item, i) => {
|
||||
const currentItem = props.formData.fieldConfigList[index];
|
||||
const duplicate = props.formData.fieldConfigList.some((item, i) => {
|
||||
return (
|
||||
i !== index &&
|
||||
item.parentId === currentItem.parentId &&
|
||||
|
|
@ -156,34 +130,54 @@ const validateUniqueCombo = (rule, value, callback, index) => {
|
|||
const field1 = `channelProductCode`;
|
||||
formRefs.value[index]?.clearValidate(field1);
|
||||
};
|
||||
// ✅ 自定义校验规则:不能重复
|
||||
const validateUniqueFieldCode = (value, index, callback) => {
|
||||
const allCodes = props.formData.fieldConfigList.map(f => f.fieldCode).filter(Boolean)
|
||||
const duplicates = allCodes.filter(v => v === value)
|
||||
|
||||
if (duplicates.length > 1) {
|
||||
callback(new Error('字段编码不能重复'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const rules = ref({
|
||||
fieldName: [
|
||||
{ required: true, message: '请输入字段名称', trigger: ['blur', 'change'] }
|
||||
],
|
||||
defaultValue: [
|
||||
{ required: true, message: '请输入默认值', trigger: ['blur', 'change'] }
|
||||
],
|
||||
|
||||
})
|
||||
const formRefs = ref([])
|
||||
// 添加校验所有表单的方法
|
||||
const validateForms = async () => {
|
||||
let isValid = true;
|
||||
for (let i = 0; i < formRefs.value.length; i++) {
|
||||
try {
|
||||
await formRefs.value[i].validate();
|
||||
} catch (error) {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let valid = formRefs.value.validate();
|
||||
|
||||
return isValid;
|
||||
};
|
||||
|
||||
|
||||
// 计算当前是否已经有一条是商户号
|
||||
const hasMerchant = computed(() => props.formData.fieldConfigList.some(item => item.merchantFlag === 1))
|
||||
// 当某一行被选中为“是商户号”时,清空其他行
|
||||
const onMerchantChange = (row) => {
|
||||
if (row.merchantFlag === 1) {
|
||||
props.formData.fieldConfigList.forEach(item => {
|
||||
if (item.fieldCode !== row.fieldCode) item.merchantFlag = 0
|
||||
})
|
||||
}
|
||||
}
|
||||
// 新增通道
|
||||
const handleAdd = () => {
|
||||
fieldConfigList.value.push({
|
||||
props.formData.fieldConfigList.push({
|
||||
pcId:null,
|
||||
fieldName:null,
|
||||
fieldCode:null,
|
||||
defaultValue:null,
|
||||
mustFlag:1,
|
||||
merchantFlag:1,
|
||||
merchantFlag:0,
|
||||
remark:null,
|
||||
})
|
||||
}
|
||||
|
|
@ -193,7 +187,7 @@ const lodingForm = ref(true);
|
|||
const handleDelete = (index,item) => {
|
||||
IdArr.value.push(item.id);
|
||||
props.formData.deleteIdList = IdArr.value;
|
||||
fieldConfigList.value.splice(index, 1)
|
||||
props.formData.fieldConfigList.splice(index, 1)
|
||||
// vue更新是异步的,所以得用nextTick(),不然删除后,formRefs.value[index]会赋值为null
|
||||
lodingForm.value = false;
|
||||
nextTick(() => {
|
||||
|
|
@ -227,7 +221,7 @@ const resetChannelProductList = () => {
|
|||
}
|
||||
|
||||
const settingSubmit = () => {
|
||||
// console.log(fieldConfigList.value, '------')
|
||||
// console.log(props.formData.fieldConfigList, '------')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
|
|
|||
|
|
@ -1,88 +1,101 @@
|
|||
<template>
|
||||
<el-form v-if="lodingForm" :ref="(el) =>formRefs[index] = el " :model="item" :rules="rules" label-width="120"
|
||||
v-for="(item, index) in paymentList" :key="new Date()" style="margin-bottom: 15px;">
|
||||
<el-row :span="24">
|
||||
<el-col :span="4" class="position-top">
|
||||
<el-form-item prop="productCode" :key="index" :label="t('产品编号')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品编号') }}</span>
|
||||
<icon-tips trigger="hover">{{ t('与三方支付确认支付的产品编号') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.productCode" :maxlength="50" :placeholder="t('请输入产品编号')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" class="position-top">
|
||||
<el-form-item prop="productName" :label="t('产品名称')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品名称') }}</span>
|
||||
<icon-tips trigger="hover">{{ t('大厅充值界面的通道显示名称') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="item.productName" :maxlength="50" :placeholder="t('请输入产品名称')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" class="position-top">
|
||||
<el-form-item prop="productType" :label="t('产品类型')">
|
||||
<template #label>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品类型') }}</span>
|
||||
<icon-tips trigger="hover">{{
|
||||
t('与三方支付对接确认的,该通道所属的类型,默认为普通类型,USDT及支付宝SDK为对应选择') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<dict-select style="width: 100%;" v-model="item.productType"
|
||||
dictKey="ff_channel_product_type" :placeholder="t('请选择产品类型')" ></dict-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="position-bottm">
|
||||
<el-form-item>
|
||||
<el-button icon="Delete" v-if="paymentList.length > 1" @click="handleDelete(index,item)">{{ t('删除')
|
||||
}}</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd" v-if="index === paymentList.length - 1">{{
|
||||
t('新增渠道产品') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20" style="margin-top: 10px;">
|
||||
<el-form-item :label="t('通道单笔限额')" required>
|
||||
<div class="input-group">
|
||||
<el-form-item prop="limitMin" :rules="[{
|
||||
required: true,
|
||||
message: '请输入最大通道单笔限额'
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value >= item.limitMax) {
|
||||
return callback(new Error('最小金额应小于最大金额'))
|
||||
} else {
|
||||
return callback()
|
||||
}
|
||||
}
|
||||
}]">
|
||||
<number-input v-model="item.limitMin" :maxlength="16"
|
||||
:placeholder="t('请输入最小通道单笔限额')" />
|
||||
</el-form-item>
|
||||
<span class="ml20 mr20">~</span>
|
||||
<el-form-item prop="limitMax" :rules="[{
|
||||
required: true,
|
||||
message: '请输入最大通道单笔限额'
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value <= item.limitMin) {
|
||||
return callback(new Error('最大金额应大于最小金额'))
|
||||
} else {
|
||||
return callback()
|
||||
}
|
||||
}
|
||||
}]">
|
||||
<number-input v-model="item.limitMax" :maxlength="16"
|
||||
:placeholder="t('请输入最大通道单笔限额')" />
|
||||
<el-form v-if="lodingForm" ref="formRefs" :model="formData" :rules="rules" label-width="120" style="margin-bottom: 15px;">
|
||||
<el-table :data="formData.productList" style="width: 100%" border stripe>
|
||||
<el-table-column prop="productCode" min-width="180" >
|
||||
<template #header>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品编号') }}</span>
|
||||
<icon-tips trigger="hover">{{ t('与三方支付确认支付的产品编号') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`productList[${$index}].productCode`" label-width="0" :rules="rules.productCode">
|
||||
<el-input v-model="row.productCode" :maxlength="50" :placeholder="t('请输入产品编号')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productName" min-width="180" >
|
||||
<template #header>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品名称') }}</span>
|
||||
<icon-tips trigger="hover">{{ t('大厅充值界面的通道显示名称') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row,$index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`productList[${$index}].productName`" label-width="0" :rules="rules.productName">
|
||||
<el-input v-model="row.productName" :maxlength="50" :placeholder="t('请输入产品名称')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productType" min-width="180" >
|
||||
<template #header>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品类型') }}</span>
|
||||
<icon-tips trigger="hover">{{
|
||||
t('与三方支付对接确认的,该通道所属的类型,默认为普通类型,USDT及支付宝SDK为对应选择') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row,$index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`productList[${$index}].productType`" label-width="0" :rules="rules.productType">
|
||||
<dict-select style="width: 100%;" v-model="row.productType"
|
||||
dictKey="ff_channel_product_type" :placeholder="t('请选择产品类型')" ></dict-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="通道单笔限额" min-width="360" >
|
||||
<template #default="{ row,$index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<div class="input-group">
|
||||
<el-form-item :prop="`productList[${$index}].limitMin`" :rules="[{
|
||||
required: true,
|
||||
message: '请输入最大通道单笔限额'
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value >= row.limitMax) {
|
||||
return callback(new Error('最小金额应小于最大金额'))
|
||||
} else {
|
||||
return callback()
|
||||
}
|
||||
}
|
||||
}]">
|
||||
<number-input v-model="row.limitMin" :maxlength="16"
|
||||
:placeholder="t('请输入最小通道单笔限额')" />
|
||||
</el-form-item>
|
||||
<span class="ml20 mr20">~</span>
|
||||
<el-form-item :prop="`productList[${$index}].limitMax`" :rules="[{
|
||||
required: true,
|
||||
message: '请输入最大通道单笔限额'
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value <= row.limitMin) {
|
||||
return callback(new Error('最大金额应大于最小金额'))
|
||||
} else {
|
||||
return callback()
|
||||
}
|
||||
}
|
||||
}]">
|
||||
<number-input v-model="row.limitMax" :maxlength="16"
|
||||
:placeholder="t('请输入最大通道单笔限额')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" min-width="280">
|
||||
<template #default="{row, $index}">
|
||||
<el-button icon="Delete" v-if="formData.productList.length > 1" @click="handleDelete($index,row)">{{ t('删除')
|
||||
}}</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd" v-if="$index === formData.productList.length - 1">{{
|
||||
t('新增渠道产品') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<fee-reduction v-if="dialogShowData.showFeeReduction" v-model:show="dialogShowData.showFeeReduction" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></fee-reduction>
|
||||
|
|
@ -122,33 +135,15 @@ const props = defineProps({
|
|||
})
|
||||
const emits = defineEmits(['update:data'])
|
||||
|
||||
const paymentList = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
|
||||
const rules = ref({
|
||||
parentId: [
|
||||
{ required: true, message: proxy.t('请选择通道所属大类') }
|
||||
productCode: [
|
||||
{ required: true, message: proxy.t('请输入产品编号') }
|
||||
],
|
||||
channelProductCode: [
|
||||
{ required: true, message: proxy.t('请选择通道编码') },
|
||||
productName: [
|
||||
{ required: true, message: proxy.t('请输入产品名称') }
|
||||
],
|
||||
channelProductName: [
|
||||
{ required: true, message: proxy.t('请输入通道名称') }
|
||||
],
|
||||
channelProductType: [
|
||||
{ required: true, message: proxy.t('请选择通道类型') }
|
||||
],
|
||||
levelIds: [
|
||||
{ required: true, message: proxy.t('请选择会员层级') }
|
||||
],
|
||||
terminals: [
|
||||
{ required: true, message: proxy.t('请选择终端') }
|
||||
productType: [
|
||||
{ required: true, message: proxy.t('请选择产品类型') }
|
||||
],
|
||||
moneyMin: [
|
||||
{ required: true, message: proxy.t('请输入最小通道单笔限额') }
|
||||
|
|
@ -157,26 +152,19 @@ const rules = ref({
|
|||
{ required: true, message: proxy.t('请输入最大通道单笔限额') }
|
||||
],
|
||||
})
|
||||
const formRefs = ref([])
|
||||
const formRefs = ref(null)
|
||||
// 添加校验所有表单的方法
|
||||
const validateForms = async () => {
|
||||
let isValid = true;
|
||||
for (let i = 0; i < formRefs.value.length; i++) {
|
||||
try {
|
||||
await formRefs.value[i].validate();
|
||||
} catch (error) {
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let valid = formRefs.value.validate();
|
||||
|
||||
return isValid;
|
||||
};
|
||||
|
||||
|
||||
// 新增通道
|
||||
const handleAdd = () => {
|
||||
paymentList.value.push({
|
||||
productCode:'',
|
||||
props.formData.productList.push({
|
||||
productCode:'',
|
||||
productType:'',
|
||||
limitMin:'',
|
||||
|
|
@ -190,11 +178,11 @@ const lodingForm = ref(true);
|
|||
const handleDelete = (index,item) => {
|
||||
IdArr.value.push(item.id);
|
||||
props.formData.deleteIdList = IdArr.value;
|
||||
paymentList.value.splice(index, 1)
|
||||
props.formData.productList.splice(index, 1)
|
||||
// vue更新是异步的,所以得用nextTick(),不然删除后,formRefs.value[index]会赋值为null
|
||||
lodingForm.value = false;
|
||||
nextTick(() => {
|
||||
formRefs.value.splice(index, 1);
|
||||
// formRefs.value.splice(index, 1);
|
||||
lodingForm.value = true;
|
||||
})
|
||||
}
|
||||
|
|
@ -224,7 +212,7 @@ const resetChannelProductList = () => {
|
|||
}
|
||||
|
||||
const settingSubmit = () => {
|
||||
// console.log(paymentList.value, '------')
|
||||
// console.log(props.formData.productList, '------')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('缴纳保证金')" prop="deposit">
|
||||
<NumberInput v-model="formData.deposit" :digit="2" :maxlength="50" :placeholder="t('请输入缴纳保证金')" />
|
||||
<el-input v-model="formData.deposit" :digit="2" :maxlength="50" :placeholder="t('请输入缴纳保证金')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
|
|
@ -59,13 +59,29 @@
|
|||
:placeholder="t('请输入查询余额地址')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('状态')" prop="icon">
|
||||
<el-switch style="margin-right: 10px; --el-switch-on-color: #13ce66;" :active-value="0" :inactive-value="1" inline-prompt
|
||||
:active-text="t('启用')" :inactive-text="t('停用')"
|
||||
v-model="formData.status" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('充值图标')" prop="icon">
|
||||
<div class="el-image upload-box-logo" style="width: 56px;height: 56px;">
|
||||
<image-upload :typeUpImg="3" v-model="formData.icon" :limit="1" :isShowTip="false"
|
||||
:isdrag="true"></image-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('渠道产品')" prop="productList">
|
||||
<recharge-channel ref="rechargeChannelRef" v-if="isShow" :formData="formData" v-model:data="formData.productList"
|
||||
:currencySign="currencySign"></recharge-channel> <!-- 渠道产品 -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="24" style="margin-top: 20px;">
|
||||
<el-form-item :label="t('渠道配置')" prop="productList">
|
||||
<field-configList ref="fieldConfigListRef" v-if="isShow" :formData="formData" v-model:data="formData.fieldConfigList"
|
||||
:currencySign="currencySign"></field-configList> <!-- 渠道产品 -->
|
||||
|
|
@ -90,6 +106,7 @@ import { listThirdChannel } from "@/api/payment/thirdChannel";
|
|||
import useInitDataStore from "@/store/modules/initData";
|
||||
import CurrencySelect from "@/components/CurrencySelect";
|
||||
import NumberInput from "@/components/NumberInput";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
import { getCurrencyDisplay } from "@/utils/index";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import { nextTick } from 'vue';
|
||||
|
|
@ -100,6 +117,7 @@ const emits = defineEmits(['submit'])
|
|||
|
||||
const isShowDialog = ref(false);
|
||||
const loadingButton = ref(false);
|
||||
const oldForm = shallowRef({ });
|
||||
const formData = ref({
|
||||
currencyCode: 'VND',
|
||||
code: null,
|
||||
|
|
@ -191,6 +209,10 @@ const getThirdChannelQuery = async (id) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
let objForm = formData.value
|
||||
oldForm.value = JSON.stringify(objForm);
|
||||
}, 500);
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -204,17 +226,23 @@ const submitForm = async () => {
|
|||
let _data = '';
|
||||
_data = {
|
||||
...formData.value,
|
||||
type:0,
|
||||
}
|
||||
loadingButton.value = true;
|
||||
if (isEdit.value) {
|
||||
recharge.updateChannelExternal(_data).then(res => {
|
||||
loadingButton.value = false;
|
||||
proxy.$modal.msgSuccess(proxy.t("修改成功"));
|
||||
if (JSON.stringify(formData.value) != oldForm.value) {
|
||||
recharge.updateChannelExternal(_data).then(res => {
|
||||
loadingButton.value = false;
|
||||
proxy.$modal.msgSuccess(proxy.t("修改成功"));
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
})
|
||||
}else{
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
})
|
||||
}
|
||||
} else {
|
||||
recharge.addChannelExternal(_data).then(res => {
|
||||
loadingButton.value = false;
|
||||
|
|
@ -247,4 +275,31 @@ defineExpose({ openDialog })
|
|||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.upload-box-logo {
|
||||
height: 56px !important;
|
||||
overflow: hidden;
|
||||
|
||||
.upload-tips {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
:deep(.el-upload-list) {
|
||||
width:56px!important;
|
||||
height: 56px!important;
|
||||
.el-upload,
|
||||
.el-upload-list__item {
|
||||
width: 56px!important;
|
||||
height: 56px!important;
|
||||
}
|
||||
|
||||
.el-upload-list__item {
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
:value-on-clear="null" clearable></CustomSelect>
|
||||
</el-form-item>
|
||||
<el-form-item prop="currencyCode">
|
||||
<CustomSelect v-if="currencyTypeOptions.length > 0" v-model="queryParams.currencyCode" style="width: 200px;" :placeholder="t('币种')"
|
||||
<CustomSelect v-if="currencyTypeOptions?.length > 0" v-model="queryParams.currencyCode" style="width: 200px;" :placeholder="t('币种')"
|
||||
:options="currencyTypeOptions"></CustomSelect>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="levelIdList">
|
||||
|
|
@ -74,7 +74,13 @@
|
|||
<span >{{ row.currencyCode }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('下单地址')" align="center" prop="payUrl" min-width="200" >
|
||||
<el-table-column :label="t('状态')" align="center" prop="status" min-width="130" >
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.status == 1">{{ t('停用') }}</span>
|
||||
<span v-if="row.status == 0">{{ t('正常') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('下单地址')" align="center" prop="payUrl" min-width="200" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.payUrl|| '--' }}</span>
|
||||
</template>
|
||||
|
|
@ -93,7 +99,7 @@
|
|||
<template v-slot="{row}">
|
||||
<span >{{ row.balanceUrl || '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('操作')" align="center" prop="operate"
|
||||
width="170" fixed="right">
|
||||
<template #default="{ row }">
|
||||
|
|
@ -120,11 +126,11 @@ import CustomSelect from "@/components/CustomSelect"; // 自定义下拉框
|
|||
import TableDragSort from '@/components/TableDragSort'; // 拖拽排序
|
||||
import TextDragSort from "@/components/TextDragSort"; // 拖拽
|
||||
import * as recharge from '@/api/finance/recharge';
|
||||
import { getChannelExternalList } from '@/api/finance/recharge'
|
||||
import { getChannelExternalList } from '@/api/finance/recharge';
|
||||
import { listLevel } from '@/api/member/level'
|
||||
import { getCurrencyDisplay } from "@/utils/index";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { ff_device_type } = proxy.useDict('ff_device_type')
|
||||
const data = reactive({
|
||||
|
|
@ -204,10 +210,11 @@ const getList = () => {
|
|||
terminalsList: terminalsList.join(','),
|
||||
currencyCode: currencyCode,
|
||||
levelIdList: levelIdList.join(','),
|
||||
parentId: parentId
|
||||
parentId: parentId,
|
||||
type: 0,
|
||||
}
|
||||
getChannelExternalList(_data).then(response => {
|
||||
listData.value = response.rows.map(item => {
|
||||
listData.value = response.rows?.map(item => {
|
||||
return item
|
||||
})
|
||||
loading.value = false;
|
||||
|
|
@ -222,7 +229,7 @@ const lodingShow = ref(true);
|
|||
const getListChannel = async () => {
|
||||
lodingShow.value = false;
|
||||
const { data } = await recharge.listChannel({ parentId: 0 })
|
||||
channelOptions.value = data.map(item => {
|
||||
channelOptions.value = data?.map(item => {
|
||||
return {
|
||||
label: item.channelName,
|
||||
value: item.id
|
||||
|
|
@ -235,8 +242,8 @@ const getListChannel = async () => {
|
|||
// 币种
|
||||
const currencyTypeOptions = ref([]);
|
||||
const getListCurrencyType = () => {
|
||||
const list = JSON.parse(localStorage.getItem('currencyList'))
|
||||
currencyTypeOptions.value = list.map(item => {
|
||||
const list = getLocalStorage('currencySelect');
|
||||
currencyTypeOptions.value = list?.map(item => {
|
||||
return {
|
||||
label: item.currencyCode,
|
||||
value: item.currencyCode
|
||||
|
|
@ -255,7 +262,7 @@ const handleConfigSubmit = () => {
|
|||
let { deduceRateType } = addQuery.value
|
||||
if (deduceRateType === 1) {
|
||||
addQuery.value.chargeRateList = []
|
||||
addQuery.value.chargeRateLevelList.map(item => {
|
||||
addQuery.value.chargeRateLevelList?.map(item => {
|
||||
item.chargeRateList = item.chargeRateList.filter(rateItem => rateItem.maxAmount && rateItem.minAmount >= 0 && rateItem.chargeRate)
|
||||
})
|
||||
} else if (deduceRateType === 0) {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane name="AddThirdPartyList" :label="t('共用三方支付')"></el-tab-pane>
|
||||
<el-tab-pane name="AddThirdPartyList" :label="t('共用三方代收')"></el-tab-pane>
|
||||
<!-- <el-tab-pane name="ThirdPartyPayment" :label="t('共用三方支付')"></el-tab-pane> -->
|
||||
<!-- <el-tab-pane name="ThirdOthersPayment" :label="t('共用三方代付')"></el-tab-pane> -->
|
||||
<el-tab-pane name="ThirPartyPaymentShared" :label="t('共用三方代付')"></el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
<!-- 列表组件 -->
|
||||
<div class="tabs-main-box">
|
||||
<add-third-party-list :typeOS="typeOS" :typeName="typeName" v-if="activeName == 'AddThirdPartyList'"></add-third-party-list>
|
||||
<third-payment v-if="activeName == 'ThirdOthersPayment'"></third-payment>
|
||||
<third-channel-list :typeOS="typeOS" :typeName="typeName" v-if="activeName === 'ThirdPartyPayment'"></third-channel-list>
|
||||
<ThirPartyPaymentShared :typeOS="typeOS" :typeName="typeName" v-if="activeName == 'ThirPartyPaymentShared'"></ThirPartyPaymentShared>
|
||||
<!-- <third-payment v-if="activeName == 'ThirdOthersPayment'"></third-payment>
|
||||
<third-channel-list :typeOS="typeOS" :typeName="typeName" v-if="activeName === 'ThirdPartyPayment'"></third-channel-list> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -20,9 +21,10 @@
|
|||
import BillingRecords from "./billingRecords/list.vue";
|
||||
import AccountChanges from "./accountChanges/list.vue";
|
||||
import DepositOrder from "./depositOrder/list.vue";
|
||||
import ThirdChannelList from "./thirdChannelList/list"
|
||||
import AddThirdPartyList from "./addThirdPartyList/list"
|
||||
import ThirdPayment from "./thirdPayment"
|
||||
import ThirdChannelList from "./thirdChannelList/list";
|
||||
import AddThirdPartyList from "./addThirdPartyList/list";
|
||||
import ThirdPayment from "./thirdPayment";
|
||||
import ThirPartyPaymentShared from "./thirPartyPaymentShared/list";
|
||||
const activeName = ref('AddThirdPartyList'); // 默认展示稽核管理
|
||||
const memberAccount = ref(''); // 跳转参数
|
||||
const typeOS = ref('1');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
<template>
|
||||
<el-dialog :title="t('修改备注')" v-model="showDialog" width="800" append-to-body @close="closeDialog">
|
||||
<el-form class="form-bg" ref="formRef" :model="form" :rules="rules" label-width="50">
|
||||
<el-form-item :label="t('备注')" prop="remark">
|
||||
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">
|
||||
{{ t('全选') }}
|
||||
</el-checkbox>
|
||||
<el-checkbox-group v-model="form.levelIds" @change="handleCheckedCitiesChange">
|
||||
<el-checkbox v-for="item in levelList" :key="item.id" :value="String(item.id)">
|
||||
{{ item.levelName }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ t('取 消') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { levelConfig } from '@/api/finance/recharge'
|
||||
import { listLevel } from "@/api/member/level";
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const emits = defineEmits(['update:show', 'update:data'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const form = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
const showDialog = computed({
|
||||
get() {
|
||||
return props.show
|
||||
},
|
||||
set(value) {
|
||||
emits('update:show', value)
|
||||
}
|
||||
})
|
||||
|
||||
const rules = ref([]);
|
||||
const loadingButton = ref(false)
|
||||
const closeDialog = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
const submitForm = () => {
|
||||
form.value.levelIds = form.value.levelIds.join(',');
|
||||
loadingButton.value = true;
|
||||
levelConfig(form.value).then(res => {
|
||||
loadingButton.value = false;
|
||||
closeDialog()
|
||||
proxy.$modal.msgSuccess(proxy.t('修改会员层级成功!'))
|
||||
emits('submit')
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const checkAll = ref(false)
|
||||
const isIndeterminate = ref(true)
|
||||
|
||||
const handleCheckAllChange = (val) => {
|
||||
form.value.levelIds = val ? levelList.value.map(item => { return String(item.id) }) : []
|
||||
isIndeterminate.value = false
|
||||
}
|
||||
const handleCheckedCitiesChange = (value) => {
|
||||
const checkedCount = value.length
|
||||
checkAll.value = checkedCount === levelList.value.length
|
||||
isIndeterminate.value = checkedCount > 0 && checkedCount < levelList.value.length
|
||||
}
|
||||
|
||||
/** 查询会员层级列表 */
|
||||
const levelList = ref([])
|
||||
const getLevelList = async () => {
|
||||
await listLevel({ pageNum: 1, pageSize: 1000 }).then(response => {
|
||||
levelList.value = response.rows
|
||||
});
|
||||
}
|
||||
getLevelList()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<template>
|
||||
<el-dialog :title="t('修改备注')" v-model="showDialog" width="500" append-to-body @close="closeDialog">
|
||||
<el-form class="form-bg" ref="formRef" :model="form" :rules="rules" label-width="50">
|
||||
<el-form-item :label="t('备注')" prop="remark">
|
||||
<el-input type="textarea" v-model="form.remark" :placeholder="t('请输入备注')" :rows="4" maxlength="250"
|
||||
show-word-limit />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ t('取 消') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { editRemark } from '@/api/finance/recharge'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const emits = defineEmits(['update:show', 'update:data'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const form = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
const showDialog = computed({
|
||||
get() {
|
||||
return props.show
|
||||
},
|
||||
set(value) {
|
||||
emits('update:show', value)
|
||||
}
|
||||
})
|
||||
const loadingButton = ref(false)
|
||||
const rules = ref([])
|
||||
const closeDialog = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
const submitForm = () => {
|
||||
form.value.remark = form.value.remark.trim();
|
||||
loadingButton.value = true;
|
||||
editRemark(form.value).then(res => {
|
||||
loadingButton.value = false;
|
||||
closeDialog()
|
||||
proxy.$modal.msgSuccess(proxy.t('修改备注成功!'))
|
||||
emits('submit')
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<el-dialog :title="t('配置手续费减免')" v-model="showDialog" width="700" append-to-body @close="closeDialog">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="140">
|
||||
<el-form-item :label="t('限前多少次充值')" prop="payCount">
|
||||
<number-input class="num-input" v-model="form.payCount" :placeholder="t('请输入限前多少次充值')">
|
||||
<template #append>{{ t('次') }}</template>
|
||||
</number-input>
|
||||
<div class="mt10 tips">{{ t('可限定前多少次充值,才减免手续费') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('单笔充值金额限定')" prop="payAmount">
|
||||
<number-input class="num-input" v-model="form.payAmount" :placeholder="t('请输入单笔充值金额限定')">
|
||||
<template #prepend>{{ currencySign }}</template>
|
||||
</number-input>
|
||||
<div class="mt10 tips">{{ t('单笔金额小于此金额,才减免手续费,按充值金额填写(非游戏分数)') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('减免百分比')" prop="reduceRate">
|
||||
<number-input class="num-input" v-model="form.reduceRate" :digit="2" :placeholder="t('请输入减免百分比')" :min="0"
|
||||
:max="100">
|
||||
<template #append>%</template>
|
||||
</number-input>
|
||||
<div class="mt10 tips">{{ t('例如:填入60%,表示减免总手续费的60%') }}</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ t('取 消') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" >{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submit', 'update:data', 'update:show'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
show: Boolean,
|
||||
currencySign: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
const showDialog = computed({
|
||||
get() {
|
||||
return props.show
|
||||
},
|
||||
set(value) {
|
||||
emits('update:show', value)
|
||||
}
|
||||
})
|
||||
|
||||
const rules = reactive({})
|
||||
const closeDialog = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
const submitForm = async () => {
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.tips {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.num-input {
|
||||
width:50%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
<template>
|
||||
<el-form v-if="lodingForm" ref="formRefs" :model="formData" :rules="rules" label-width="120" style="margin-bottom: 15px;">
|
||||
<el-table :data="formData.fieldConfigList" style="width: 100%" border>
|
||||
<el-table-column prop="fieldName" label="字段名称" min-width="180" >
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`fieldConfigList[${$index}].fieldName`" label-width="0" :rules="rules.fieldName">
|
||||
<el-input v-model="row.fieldName" :maxlength="50" :placeholder="t('请输入字段名称')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fieldCode" label="字段编码" min-width="180" >
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`fieldConfigList[${$index}].fieldCode`" label-width="0" :rules="rules.fieldCode">
|
||||
<el-input v-model="row.fieldCode" :maxlength="50" :placeholder="t('请输入字段编码')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="defaultValue" label="默认值" min-width="180" >
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-input v-model="row.defaultValue" :maxlength="50" :placeholder="t('请输入默认值')" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="描述" min-width="180" >
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" :maxlength="50" :placeholder="t('请输入描述')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mustFlag" label="是否必填" min-width="150" >
|
||||
<template #default="{ row }">
|
||||
<el-radio-group v-model="row.mustFlag">
|
||||
<el-radio :value="1">{{ t('必填') }}</el-radio>
|
||||
<el-radio :value="0">{{ t('非必填') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="merchantFlag" label="是否是商户号" min-width="150" >
|
||||
<template #default="{ row }">
|
||||
<el-radio-group v-model="row.merchantFlag">
|
||||
<el-radio :value="1">{{ t('是商户号') }}</el-radio>
|
||||
<el-radio :value="0">{{ t('非商户号') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
|
||||
<fee-reduction v-if="dialogShowData.showFeeReduction" v-model:show="dialogShowData.showFeeReduction" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></fee-reduction>
|
||||
<recharge-config v-if="dialogShowData.showRechargeConfig" v-model:show="dialogShowData.showRechargeConfig" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></recharge-config>
|
||||
<recommended-amount v-if="dialogShowData.showRecommendedAmount" v-model:show="dialogShowData.showRecommendedAmount" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></recommended-amount>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import CheckboxSelect from "@/components/CheckboxSelect";
|
||||
import IconTips from "@/components/IconTips"; // 小图标提示
|
||||
import SetLangContent from "@/components/SetLangContent"; // 多语言内容
|
||||
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||
import FeeReduction from "./FeeReduction.vue";
|
||||
import RecommendedAmount from "./RecommendedAmount.vue";
|
||||
import RechargeConfig from "./RechargeConfig.vue";
|
||||
import { listLevel } from "@/api/member/level";
|
||||
import { listChannelProduct } from "@/api/payment/channelProduct";
|
||||
import { el } from "element-plus/es/locales.mjs";
|
||||
import { nextTick, ref } from "vue";
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
currencySign: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
const emits = defineEmits(['update:data'])
|
||||
|
||||
// const fieldConfigList = computed({
|
||||
// get() {
|
||||
// return props.data
|
||||
// },
|
||||
// set(value) {
|
||||
// emits('update:data', value)
|
||||
// }
|
||||
// })
|
||||
const validateUniqueCombo = (rule, value, callback, index) => {
|
||||
const currentItem = props.formData.fieldConfigList[index];
|
||||
const duplicate = props.formData.fieldConfigList.some((item, i) => {
|
||||
return (
|
||||
i !== index &&
|
||||
item.parentId === currentItem.parentId &&
|
||||
item.channelProductCode === currentItem.channelProductCode
|
||||
);
|
||||
});
|
||||
|
||||
if (duplicate) {
|
||||
callback(new Error('所属大类与编码组合重复'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
const field = `parentId`;
|
||||
formRefs.value[index]?.clearValidate(field);
|
||||
const field1 = `channelProductCode`;
|
||||
formRefs.value[index]?.clearValidate(field1);
|
||||
};
|
||||
const rules = ref({
|
||||
fieldName: [
|
||||
{ required: true, message: '请输入字段名称', trigger: ['blur', 'change'] }
|
||||
],
|
||||
fieldCode: [
|
||||
{ required: true, message: '请输入字段编码', trigger: ['blur', 'change'] }
|
||||
],
|
||||
defaultValue: [
|
||||
{ required: true, message: '请输入默认值', trigger: ['blur', 'change'] }
|
||||
],
|
||||
|
||||
})
|
||||
const formRefs = ref([])
|
||||
// 添加校验所有表单的方法
|
||||
const validateForms = async () => {
|
||||
let isValid = true;
|
||||
let valid = formRefs.value.validate();
|
||||
|
||||
return isValid;
|
||||
};
|
||||
|
||||
|
||||
// 新增通道
|
||||
const handleAdd = () => {
|
||||
props.formData.fieldConfigList.push({
|
||||
pcId:null,
|
||||
fieldName:null,
|
||||
fieldCode:null,
|
||||
defaultValue:null,
|
||||
mustFlag:1,
|
||||
merchantFlag:1,
|
||||
remark:null,
|
||||
})
|
||||
}
|
||||
const IdArr = ref([]);
|
||||
const lodingForm = ref(true);
|
||||
// 删除通道
|
||||
const handleDelete = (index,item) => {
|
||||
IdArr.value.push(item.id);
|
||||
props.formData.deleteIdList = IdArr.value;
|
||||
props.formData.fieldConfigList.splice(index, 1)
|
||||
// vue更新是异步的,所以得用nextTick(),不然删除后,formRefs.value[index]会赋值为null
|
||||
lodingForm.value = false;
|
||||
nextTick(() => {
|
||||
formRefs.value.splice(index, 1);
|
||||
lodingForm.value = true;
|
||||
})
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const dialogShowData = ref({
|
||||
showFeeReduction: false,
|
||||
showRechargeConfig: false,
|
||||
showRecommendedAmount: false,
|
||||
})
|
||||
const addQuery = ref({})
|
||||
|
||||
// 获取通道编码下拉列表
|
||||
const channelProductList = ref([])
|
||||
const getListChannelProduct = async (rows) => {
|
||||
// const params = { pageNum: 1, pageSize: 1000, thirdChannelId: id, productType: 0 }
|
||||
// await listChannelProduct(params).then(response => {
|
||||
|
||||
// channelProductList.value = response.rows
|
||||
// });
|
||||
channelProductList.value = rows
|
||||
}
|
||||
|
||||
// 重置通道编码下拉列表 切换通道币种、第三方支付时回调
|
||||
const resetChannelProductList = () => {
|
||||
channelProductList.value = []
|
||||
}
|
||||
|
||||
const settingSubmit = () => {
|
||||
// console.log(props.formData.fieldConfigList, '------')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getListChannelProduct,
|
||||
resetChannelProductList,
|
||||
validateForms
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.channel-form {
|
||||
--el-collapse-header-bg-color: #f5f7fa;
|
||||
--el-collapse-content-bg-color: #f5f7fa;
|
||||
|
||||
:deep(.el-collapse-item__header) {
|
||||
border-bottom: 1px solid #ddd !important;
|
||||
}
|
||||
}
|
||||
|
||||
.position-top .el-form-item {
|
||||
display: block;
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
justify-content: start;
|
||||
}
|
||||
}
|
||||
|
||||
.position-bottm {
|
||||
display: flex;
|
||||
|
||||
.el-form-item {
|
||||
align-items: end;
|
||||
}
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.channel-title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.collapse-icon {
|
||||
width: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-right: 10px;
|
||||
|
||||
.collapse-active {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.label-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,286 @@
|
|||
<template>
|
||||
<el-form v-if="lodingForm" ref="formRefs" :model="formData" :rules="rules" label-width="120" style="margin-bottom: 15px;">
|
||||
<el-table :data="formData.productList" style="width: 100%" border stripe>
|
||||
<el-table-column prop="productCode" min-width="180" >
|
||||
<template #header>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品编号') }}</span>
|
||||
<icon-tips trigger="hover">{{ t('与三方支付确认支付的产品编号') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row, $index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`productList[${$index}].productCode`" label-width="0" :rules="rules.productCode">
|
||||
<el-input v-model="row.productCode" :maxlength="50" :placeholder="t('请输入产品编号')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productName" min-width="180" >
|
||||
<template #header>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品名称') }}</span>
|
||||
<icon-tips trigger="hover">{{ t('大厅充值界面的通道显示名称') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row,$index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`productList[${$index}].productName`" label-width="0" :rules="rules.productName">
|
||||
<el-input v-model="row.productName" :maxlength="50" :placeholder="t('请输入产品名称')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productType" min-width="180" >
|
||||
<template #header>
|
||||
<div class="label-center">
|
||||
<span>{{ t('产品类型') }}</span>
|
||||
<icon-tips trigger="hover">{{
|
||||
t('与三方支付对接确认的,该通道所属的类型,默认为普通类型,USDT及支付宝SDK为对应选择') }}</icon-tips>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row,$index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<el-form-item :prop="`productList[${$index}].productType`" label-width="0" :rules="rules.productType">
|
||||
<dict-select style="width: 100%;" v-model="row.productType"
|
||||
dictKey="ff_channel_product_type" :placeholder="t('请选择产品类型')" ></dict-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="通道单笔限额" min-width="360" >
|
||||
<template #default="{ row,$index }">
|
||||
<div style="margin-top: 16px;margin-bottom: 16px;">
|
||||
<div class="input-group">
|
||||
<el-form-item :prop="`productList[${$index}].limitMin`" :rules="[{
|
||||
required: true,
|
||||
message: '请输入最大通道单笔限额'
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value >= row.limitMax) {
|
||||
return callback(new Error('最小金额应小于最大金额'))
|
||||
} else {
|
||||
return callback()
|
||||
}
|
||||
}
|
||||
}]">
|
||||
<number-input v-model="row.limitMin" :maxlength="16"
|
||||
:placeholder="t('请输入最小通道单笔限额')" />
|
||||
</el-form-item>
|
||||
<span class="ml20 mr20">~</span>
|
||||
<el-form-item :prop="`productList[${$index}].limitMax`" :rules="[{
|
||||
required: true,
|
||||
message: '请输入最大通道单笔限额'
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value <= row.limitMin) {
|
||||
return callback(new Error('最大金额应大于最小金额'))
|
||||
} else {
|
||||
return callback()
|
||||
}
|
||||
}
|
||||
}]">
|
||||
<number-input v-model="row.limitMax" :maxlength="16"
|
||||
:placeholder="t('请输入最大通道单笔限额')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column fixed="right" label="操作" min-width="280">
|
||||
<template #default="{row, $index}">
|
||||
<el-button icon="Delete" v-if="formData.productList.length > 1" @click="handleDelete($index,row)">{{ t('删除')
|
||||
}}</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd" v-if="$index === formData.productList.length - 1">{{
|
||||
t('新增渠道产品') }}</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</el-form>
|
||||
<fee-reduction v-if="dialogShowData.showFeeReduction" v-model:show="dialogShowData.showFeeReduction" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></fee-reduction>
|
||||
<recharge-config v-if="dialogShowData.showRechargeConfig" v-model:show="dialogShowData.showRechargeConfig" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></recharge-config>
|
||||
<recommended-amount v-if="dialogShowData.showRecommendedAmount" v-model:show="dialogShowData.showRecommendedAmount" v-model:data="addQuery" @submit="settingSubmit"
|
||||
:currencySign="currencySign"></recommended-amount>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import CheckboxSelect from "@/components/CheckboxSelect";
|
||||
import IconTips from "@/components/IconTips"; // 小图标提示
|
||||
import SetLangContent from "@/components/SetLangContent"; // 多语言内容
|
||||
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||
import FeeReduction from "./FeeReduction.vue";
|
||||
import RecommendedAmount from "./RecommendedAmount.vue";
|
||||
import RechargeConfig from "./RechargeConfig.vue";
|
||||
import { listLevel } from "@/api/member/level";
|
||||
import { listChannelProduct } from "@/api/payment/channelProduct";
|
||||
import { el } from "element-plus/es/locales.mjs";
|
||||
import { nextTick, ref } from "vue";
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
currencySign: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
const emits = defineEmits(['update:data'])
|
||||
|
||||
const rules = ref({
|
||||
productCode: [
|
||||
{ required: true, message: proxy.t('请输入产品编号') }
|
||||
],
|
||||
productName: [
|
||||
{ required: true, message: proxy.t('请输入产品名称') }
|
||||
],
|
||||
productType: [
|
||||
{ required: true, message: proxy.t('请选择产品类型') }
|
||||
],
|
||||
moneyMin: [
|
||||
{ required: true, message: proxy.t('请输入最小通道单笔限额') }
|
||||
],
|
||||
moneyMax: [
|
||||
{ required: true, message: proxy.t('请输入最大通道单笔限额') }
|
||||
],
|
||||
})
|
||||
const formRefs = ref(null)
|
||||
// 添加校验所有表单的方法
|
||||
const validateForms = async () => {
|
||||
let isValid = true;
|
||||
let valid = formRefs.value.validate();
|
||||
|
||||
return isValid;
|
||||
};
|
||||
|
||||
|
||||
// 新增通道
|
||||
const handleAdd = () => {
|
||||
props.formData.productList.push({
|
||||
productCode:'',
|
||||
productType:'',
|
||||
limitMin:'',
|
||||
limitMax:'',
|
||||
status:0,
|
||||
})
|
||||
}
|
||||
const IdArr = ref([]);
|
||||
const lodingForm = ref(true);
|
||||
// 删除通道
|
||||
const handleDelete = (index,item) => {
|
||||
IdArr.value.push(item.id);
|
||||
props.formData.deleteIdList = IdArr.value;
|
||||
props.formData.productList.splice(index, 1)
|
||||
// vue更新是异步的,所以得用nextTick(),不然删除后,formRefs.value[index]会赋值为null
|
||||
lodingForm.value = false;
|
||||
nextTick(() => {
|
||||
// formRefs.value.splice(index, 1);
|
||||
lodingForm.value = true;
|
||||
})
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const dialogShowData = ref({
|
||||
showFeeReduction: false,
|
||||
showRechargeConfig: false,
|
||||
showRecommendedAmount: false,
|
||||
})
|
||||
const addQuery = ref({})
|
||||
|
||||
// 获取通道编码下拉列表
|
||||
const channelProductList = ref([])
|
||||
const getListChannelProduct = async (rows) => {
|
||||
// const params = { pageNum: 1, pageSize: 1000, thirdChannelId: id, productType: 0 }
|
||||
// await listChannelProduct(params).then(response => {
|
||||
|
||||
// channelProductList.value = response.rows
|
||||
// });
|
||||
channelProductList.value = rows
|
||||
}
|
||||
|
||||
// 重置通道编码下拉列表 切换通道币种、第三方支付时回调
|
||||
const resetChannelProductList = () => {
|
||||
channelProductList.value = []
|
||||
}
|
||||
|
||||
const settingSubmit = () => {
|
||||
// console.log(props.formData.productList, '------')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getListChannelProduct,
|
||||
resetChannelProductList,
|
||||
validateForms
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.channel-form {
|
||||
--el-collapse-header-bg-color: #f5f7fa;
|
||||
--el-collapse-content-bg-color: #f5f7fa;
|
||||
|
||||
:deep(.el-collapse-item__header) {
|
||||
border-bottom: 1px solid #ddd !important;
|
||||
}
|
||||
}
|
||||
|
||||
.position-top .el-form-item {
|
||||
display: block;
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
justify-content: start;
|
||||
}
|
||||
}
|
||||
|
||||
.position-bottm {
|
||||
display: flex;
|
||||
|
||||
.el-form-item {
|
||||
align-items: end;
|
||||
}
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.channel-title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.collapse-icon {
|
||||
width: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-right: 10px;
|
||||
|
||||
.collapse-active {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.label-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<template>
|
||||
<el-dialog :title="t('配置充值赠送')" v-model="showDialog" width="1000" append-to-body @close="closeDialog">
|
||||
<el-form class="form-bg" ref="rechargeConfigForm" :model="form" :rules="rules" label-width="180">
|
||||
<el-form-item :label="t('会员层级')" prop="deduceRateType">
|
||||
<el-radio-group v-model="form.deduceRateType" @change="deduceRateTypeChange">
|
||||
<el-radio :value="0" :label="t('不区分层级')"></el-radio>
|
||||
<el-radio :value="1" :label="t('按层级分别配置充值赠送')"></el-radio>
|
||||
</el-radio-group>
|
||||
<div class="tips">{{ t('可所有会员统一配置赠送,也可按不同会员层级分别配置充值赠送;') }}</div>
|
||||
<div class="tips">{{ t('未配置充值赠送的会员层级,无充值赠送。') }}</div>
|
||||
</el-form-item>
|
||||
<el-tabs v-model="activeTab" type="card" v-if="form.deduceRateType === 1" class="tab-bg">
|
||||
<el-tab-pane v-for="item in form.chargeRateLevelList" :key="item.leavelId" :label="item.leavelName" />
|
||||
</el-tabs>
|
||||
<recharge-config-item v-model:data="addQuery" :currencySign="currencySign"></recharge-config-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ t('取 消') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import RechargeConfigItem from './RechargeConfigItem.vue'
|
||||
import * as recharge from "@/api/finance/recharge"
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submit', 'update:data', 'update:show'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
show: Boolean,
|
||||
currencySign: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
const showDialog = computed({
|
||||
get() {
|
||||
return props.show
|
||||
},
|
||||
set(value) {
|
||||
emits('update:show', value)
|
||||
}
|
||||
})
|
||||
|
||||
const activeTab = ref('0')
|
||||
const addQuery = ref({})
|
||||
const loadingButton = ref(false)
|
||||
const rules = reactive({
|
||||
deduceRateType: [
|
||||
{ required: true, message: proxy.t('请选择会员层级') },
|
||||
],
|
||||
})
|
||||
const closeDialog = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
const submitForm = async () => {
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}
|
||||
|
||||
const deduceRateTypeChange = (val) => {
|
||||
if (val === 1 && form.value.chargeRateLevelList.length === 0) {
|
||||
form.value.deduceRateType = 0
|
||||
return proxy.$modal.msgError('请先添加会员层级')
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => form.value.deduceRateType, (val) => {
|
||||
if (val === 0) {
|
||||
addQuery.value = form.value
|
||||
} else if (val === 1) {
|
||||
addQuery.value = form.value.chargeRateLevelList[activeTab.value || 0]
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
watch(() => activeTab.value, (val) => {
|
||||
addQuery.value = form.value.chargeRateLevelList[activeTab.value || 0]
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.form-bg {
|
||||
padding: 20px 0;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.num-input {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tab-bg {
|
||||
background: #f5f7fa;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<template>
|
||||
<el-form-item :class="{ 'form-item-center': index === 0 }"
|
||||
:label="`${item.minAmount ?? 0} ${t('到')} ${item.maxAmount ?? ''}`" v-for="(item, index) in form.chargeRateList"
|
||||
:key="index">
|
||||
<el-row :span="24" style="width: 100%;">
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="index === 0 ? t('充值金额区间(含)') : ''" label-position="top">
|
||||
<number-input v-model="item.maxAmount" :placeholder="t('请输入金额')" :digit="2" :maxlength="12">
|
||||
<template #prepend>{{ currencySign }}</template>
|
||||
</number-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="index === 0 ? t('赠送比例') : ''" label-position="top">
|
||||
<number-input v-model="item.chargeRate" :placeholder="t('请输入赠送比例')" :digit="2" :max="100">
|
||||
<template #append>%</template>
|
||||
</number-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" v-if="form.chargeRateList">
|
||||
<el-form-item label-position="top">
|
||||
<template #label v-if="index === 0">
|
||||
<div style="height: 22px;"></div>
|
||||
</template>
|
||||
<el-button v-if="form.chargeRateList.length > 1" icon="Delete" circle
|
||||
@click="handleDelete(index)" />
|
||||
<el-button v-if="index === form.chargeRateList.length - 1" type="primary" icon="Plus" circle
|
||||
@click="handleAdd(item)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="tips">
|
||||
{{ t('预计赠送金额') }}
|
||||
<span>{{ ((item.minAmount * item.chargeRate) / 100).toFixed(2) ?? '--' }}</span> ~
|
||||
<span>{{ ((item.maxAmount * item.chargeRate) / 100).toFixed(2) ?? '--' }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('赠送金额上限')" prop="deduceLimit">
|
||||
<number-input v-model="form.deduceLimit" :placeholder="t('请输入赠送金额上限')" :maxlength="12"></number-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('赠送次数上限')" prop="deduceCountType">
|
||||
<el-radio-group style="width: 100%;" v-model="form.deduceCountType">
|
||||
<el-radio :value="0" :label="t('每日赠送上限次数')"></el-radio>
|
||||
<el-radio :value="1" :label="t('总共赠送上限次数')"></el-radio>
|
||||
</el-radio-group>
|
||||
<number-input class="num-input" v-model="form.deduceCount" :maxlength="12"
|
||||
:placeholder="t('请输入赠送上限次数,不填表示不限次数')"></number-input>
|
||||
<div class="tips">{{ t('可选择每日、总共其中一种,设置会员充值赠送次数上限') }}</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<script setup>
|
||||
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['update:data', 'update:show'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
currencySign: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
|
||||
// 新增按钮
|
||||
const handleAdd = (item) => {
|
||||
if (!item.maxAmount) {
|
||||
return proxy.$message.error(proxy.t('请输入金额'))
|
||||
} else if (!item.chargeRate) {
|
||||
return proxy.$message.error(proxy.t('请输入赠送比例'))
|
||||
} else if (item.maxAmount <= item.minAmount) {
|
||||
return proxy.$message.error(proxy.t('最大金额必须大于最小金额'))
|
||||
}
|
||||
form.value.chargeRateList.push({
|
||||
minAmount: '',
|
||||
maxAmount: '',
|
||||
chargeRate: ''
|
||||
})
|
||||
}
|
||||
|
||||
// 监听 chargeRateList 的变化
|
||||
watch(
|
||||
() => form.value.chargeRateList,
|
||||
(newVal) => {
|
||||
if (newVal && newVal.length > 0) {
|
||||
newVal[0].minAmount = 0; // 第一行的 minAmount 始终为 0
|
||||
for (let i = 1; i < newVal.length; i++) {
|
||||
newVal[i].minAmount = Number(newVal[i - 1].maxAmount) + 0.01;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
)
|
||||
|
||||
// 删除按钮
|
||||
const handleDelete = (index) => {
|
||||
form.value.chargeRateList.splice(index, 1)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.form-item-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.num-input {
|
||||
width: 50%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<el-dialog :title="t('推荐金额')" v-model="showDialog" width="1000" append-to-body @close="closeDialog">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="140">
|
||||
<el-form-item :label="t('充值限制')" prop="rechargeLimit">
|
||||
<el-radio-group v-model="form.rechargeLimit">
|
||||
<el-radio :value="1">{{ t('可输入任意金额') }}</el-radio>
|
||||
<el-radio :value="2">{{ t('仅限固定金额') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('推荐金额设置')" prop="referrerAmountList">
|
||||
<div style="background-color:transparent;border-left:1px solid rgb(235,238,245);border-bottom:1px solid rgb(235,238,245)">
|
||||
<div class="row-view" style="background-color:rgb(245,247,250)">
|
||||
<div class="row-item-1">推荐金额(₫)</div>
|
||||
<div class="row-item-2 border-right">此推荐金额叠加赠送(选填)</div>
|
||||
<div class="row-item-1 border-right">推荐金额(₫)</div>
|
||||
<div class="row-item-2">此推荐金额叠加赠送(选填)</div>
|
||||
</div>
|
||||
<div class="row-view-push">
|
||||
<div class="row-view-push--items" style="align-items: center;" v-for="(row,index) in form.referrerAmountList">
|
||||
<div class="row-item-a">
|
||||
<el-form-item label-width="0">
|
||||
<el-input style="width: 100%;" v-model="row.referrerAmount" class="num-input" :placeholder="t('通道推荐金额')"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row-item-b">
|
||||
<el-form-item label-width="0" :prop="`referrerAmountList.${index}.giveAmount`">
|
||||
<div style="display: flex;">
|
||||
<el-select
|
||||
v-model="row.type"
|
||||
style="width: 45%;"
|
||||
clearable>
|
||||
<el-option
|
||||
:label="t('按比例')"
|
||||
:key="1"
|
||||
:value="1"
|
||||
/>
|
||||
<el-option
|
||||
:label="t('按金额')"
|
||||
:key="2"
|
||||
:value="2"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="row.giveAmount" style="width: 65%;" class="num-input" :placeholder="t('请输入加赠比例')"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="label-tip border-right" style="line-height:42px;padding-left:10px">
|
||||
{{ t('说明:会员按推荐金额充值才可获对应加赠,加赠金额与充值赠送金额叠加送出。') }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ t('取 消') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submit', 'update:data', 'update:show'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
show: Boolean,
|
||||
currencySign: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = computed({
|
||||
get() {
|
||||
return props.data
|
||||
},
|
||||
set(value) {
|
||||
emits('update:data', value)
|
||||
}
|
||||
})
|
||||
const showDialog = computed({
|
||||
get() {
|
||||
return props.show
|
||||
},
|
||||
set(value) {
|
||||
emits('update:show', value)
|
||||
}
|
||||
})
|
||||
|
||||
const rules = reactive({
|
||||
referrerAmountList: [
|
||||
{ required: true, message: proxy.t('请输入推荐金额'), trigger: 'change' },
|
||||
]
|
||||
})
|
||||
const closeDialog = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
const submitForm = async () => {
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.tips {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.num-input {
|
||||
width:50%;
|
||||
}
|
||||
.border-right{
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
border-right: 1px solid #ebeef5;
|
||||
border-left: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
.label-tip {
|
||||
color: #979797;
|
||||
font-size: 12px;
|
||||
}
|
||||
.row-view {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
}
|
||||
.row-item-1 {
|
||||
flex: 4;
|
||||
}
|
||||
.border-right {
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
border-right: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.row-item-2 {
|
||||
flex: 6;
|
||||
}
|
||||
.row-view-push {
|
||||
border-right: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.row-view-push .row-view-push--items:nth-child(odd) {
|
||||
border-left: 1px solid #ebeef5;
|
||||
}
|
||||
.row-view-push .row-view-push--items{
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
border-left: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
min-height: 60px;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
}
|
||||
.row-view-push--items .row-item-a {
|
||||
border-right: 1px solid #ebeef5;
|
||||
flex: 2;
|
||||
margin-right: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.row-view-push .row-view-push--items .row-item-b{
|
||||
display: flex;
|
||||
flex: 3;
|
||||
justify-content: space-evenly;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
<template>
|
||||
<el-dialog :title="!isEdit ? t('新增三方渠道') : t('修改三方渠道')" align-center v-model="isShowDialog" width="1300" append-to-body
|
||||
@close="closeDialog">
|
||||
<el-scrollbar max-height="700px" >
|
||||
<el-form ref="formRef" v-if="isShow" :model="formData" :rules="rules" label-width="150">
|
||||
<el-row :span="24">
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('通道币种')" prop="currencyCode">
|
||||
<currency-select style="width: 100%;" v-model="formData.currencyCode" :placeholder="t('请选择通道币种')"></currency-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('渠道名称')" prop="name">
|
||||
<el-input v-model="formData.name" :maxlength="50" :placeholder="t('请输入渠道名称,最多50个字')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('渠道编码')" prop="code">
|
||||
<el-input v-model="formData.code" :maxlength="50" :placeholder="t('请输入渠道编码')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('联系方式')" prop="contact">
|
||||
<el-input v-model="formData.contact" :maxlength="50" :placeholder="t('请输入联系方式')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('三方费率')" prop="tripartiteRate">
|
||||
<NumberInput v-model="formData.tripartiteRate" :digit="2" :maxlength="50" :placeholder="t('请输入三方费率')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="t('缴纳保证金')" prop="deposit">
|
||||
<NumberInput v-model="formData.deposit" :digit="2" :maxlength="50" :placeholder="t('请输入缴纳保证金')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('下单地址')" prop="payUrl">
|
||||
<el-input v-model="formData.payUrl" :maxlength="255" show-word-limit
|
||||
:placeholder="t('请输入下单地址')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('查询地址')" prop="payQueryUrl">
|
||||
<el-input v-model="formData.payQueryUrl" :maxlength="255" show-word-limit
|
||||
:placeholder="t('请输入查询地址')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('回调地址')" prop="notifyUrl">
|
||||
<el-input v-model="formData.notifyUrl" :maxlength="255" show-word-limit
|
||||
:placeholder="t('请输入回调地址')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('查询余额地址')" prop="balanceUrl">
|
||||
<el-input v-model="formData.balanceUrl" :maxlength="255" show-word-limit
|
||||
:placeholder="t('请输入查询余额地址')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item :label="t('状态')" prop="icon">
|
||||
<el-switch style="margin-right: 10px; --el-switch-on-color: #13ce66;" :active-value="0" :inactive-value="1" inline-prompt
|
||||
:active-text="t('启用')" :inactive-text="t('停用')"
|
||||
v-model="formData.status" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('渠道产品')" prop="productList">
|
||||
<recharge-channel ref="rechargeChannelRef" v-if="isShow" :formData="formData" v-model:data="formData.productList"
|
||||
:currencySign="currencySign"></recharge-channel> <!-- 渠道产品 -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top: 20px;">
|
||||
<el-form-item :label="t('渠道配置')" prop="productList">
|
||||
<field-configList ref="fieldConfigListRef" v-if="isShow" :formData="formData" v-model:data="formData.fieldConfigList"
|
||||
:currencySign="currencySign"></field-configList> <!-- 渠道产品 -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closeDialog">{{ t('取 消') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import RechargeChannel from './RechargeChannel' // 充值通道
|
||||
import FieldConfigList from './FieldConfigList'
|
||||
import * as recharge from "@/api/finance/recharge"
|
||||
import { listThirdChannel } from "@/api/payment/thirdChannel";
|
||||
import useInitDataStore from "@/store/modules/initData";
|
||||
import CurrencySelect from "@/components/CurrencySelect";
|
||||
import NumberInput from "@/components/NumberInput";
|
||||
import { getCurrencyDisplay } from "@/utils/index";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const useInitData = useInitDataStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['submit'])
|
||||
|
||||
const isShowDialog = ref(false);
|
||||
const loadingButton = ref(false);
|
||||
const formData = ref({
|
||||
currencyCode: 'VND',
|
||||
code: null,
|
||||
name: null,
|
||||
type: null,
|
||||
status:null,
|
||||
contact: null,
|
||||
tripartiteRate: null,
|
||||
deposit: null,
|
||||
payUrl: null,
|
||||
ipWhitelist:null,
|
||||
payQueryUrl: null,
|
||||
notifyUrl:null,
|
||||
balanceUrl:null,
|
||||
productList: [
|
||||
{
|
||||
productCode:'',
|
||||
productCode:'',
|
||||
productType:'',
|
||||
limitMin:'',
|
||||
limitMax:'',
|
||||
status:0,
|
||||
}
|
||||
],
|
||||
fieldConfigList:[
|
||||
{
|
||||
pcId:null,
|
||||
fieldName:null,
|
||||
fieldCode:null,
|
||||
defaultValue:null,
|
||||
mustFlag:1,
|
||||
merchantFlag:1,
|
||||
remark:null,
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const rules = reactive({
|
||||
currencyCode: [
|
||||
{ required: true, message: proxy.t('请选择通道币种'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: proxy.t('请输入渠道名称'), trigger: 'change' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: proxy.t('请输入渠道编码'), trigger: 'change' }
|
||||
],
|
||||
payUrl: [
|
||||
{ required: true, message: proxy.t('请输入下单地址'), trigger: 'change' }
|
||||
],
|
||||
payQueryUrl: [
|
||||
{ required: true, message: proxy.t('请输入查询地址'), trigger: 'change' }
|
||||
],
|
||||
})
|
||||
const isEdit = ref(false)
|
||||
const reset = () => {
|
||||
nextTick(() => {
|
||||
proxy.$refs['rechargeChannelRef'].resetChannelProductList()
|
||||
})
|
||||
isEdit.value = false
|
||||
proxy.resetForm("formRef");
|
||||
}
|
||||
const closeDialog = () => {
|
||||
isShowDialog.value = false
|
||||
}
|
||||
const isShow = ref(true)
|
||||
const openDialog = (id = null) => {
|
||||
isShowDialog.value = true
|
||||
isShow.value = false
|
||||
nextTick(() => {
|
||||
isShow.value = true
|
||||
reset();
|
||||
if (id) {
|
||||
isEdit.value = true
|
||||
getThirdChannelQuery(id)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据merchName查询详情
|
||||
const getThirdChannelQuery = async (id) => {
|
||||
await recharge.getChannelExternal(id).then(res => {
|
||||
formData.value = {
|
||||
...res.data,
|
||||
productList:res.data.productList.map((item)=>{
|
||||
return {
|
||||
...item,
|
||||
productType:`${item.productType}`
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const submitForm = async () => {
|
||||
// 校验主表单
|
||||
const isChannelValid = await proxy.$refs['rechargeChannelRef'].validateForms();
|
||||
const isConfigListValid = await proxy.$refs['fieldConfigListRef'].validateForms();
|
||||
const isFormValid = await proxy.$refs.formRef.validate();
|
||||
// 校验 RechargeChannel 组件中的所有表单
|
||||
if (isFormValid && isChannelValid && isConfigListValid) {
|
||||
let _data = '';
|
||||
_data = {
|
||||
...formData.value,
|
||||
type:1,
|
||||
}
|
||||
loadingButton.value = true;
|
||||
if (isEdit.value) {
|
||||
recharge.updateChannelExternal(_data).then(res => {
|
||||
loadingButton.value = false;
|
||||
proxy.$modal.msgSuccess(proxy.t("修改成功"));
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
})
|
||||
} else {
|
||||
recharge.addChannelExternal(_data).then(res => {
|
||||
loadingButton.value = false;
|
||||
proxy.$modal.msgSuccess(proxy.t("新增成功"));
|
||||
closeDialog()
|
||||
emits('submit')
|
||||
}).catch(() => {
|
||||
loadingButton.value = false;
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// RechargeChannel 组件中的表单校验未通过
|
||||
console.log('RechargeChannel 组件中的表单校验未通过');
|
||||
}
|
||||
}
|
||||
|
||||
const currencySign = ref(null)
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
defineExpose({ openDialog })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.input-group {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,292 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="handleQuery"
|
||||
:leftSpan="22" :rightSpan="2">
|
||||
<template #left>
|
||||
<!-- <el-form-item prop="queryType">
|
||||
<el-select style="width: 200px;" v-model="queryParams.queryType">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="queryValue">
|
||||
<el-input v-model="queryParams.queryValue"
|
||||
:placeholder="`${t('请输入')}${queryTypeOptions[queryParams.queryType - 1].label}`"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="name">
|
||||
<el-input v-model="queryParams.name"
|
||||
:placeholder="`${t('请输入渠道名称')}`"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<CustomSelect v-model="queryParams.status" style="width: 200px;" :options="switchStatusOptions" :placeholder="t('状态')" :empty-values="[null, undefined]"
|
||||
:value-on-clear="null" clearable></CustomSelect>
|
||||
</el-form-item>
|
||||
<el-form-item prop="currencyCode">
|
||||
<CustomSelect v-if="currencyTypeOptions?.length > 0" v-model="queryParams.currencyCode" style="width: 200px;" :placeholder="t('币种')"
|
||||
:options="currencyTypeOptions"></CustomSelect>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="levelIdList">
|
||||
<checkbox-select v-model="queryParams.levelIdList" style="width: 200px;" collapse-tags :placeholder="t('会员层级')"
|
||||
:options="levelOptions"></checkbox-select>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
<template #right>
|
||||
<el-button v-hasPermi="['payment:thirdChannel:add']" type="primary" icon="Plus" @click="handleAdd"
|
||||
payment:channel:add>{{ t('新增第三方')
|
||||
}}</el-button>
|
||||
</template>
|
||||
</table-search-card>
|
||||
|
||||
<el-table v-loading="loading" :data="listData" class="c-table-main" stripe border >
|
||||
<el-table-column :label="t('渠道名称')" align="center" prop="name" min-width="150" fixed="left" >
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.name">{{ row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('联系方式')" align="center" prop="contact" min-width="130" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.contact||'--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('三方费率')" align="center" prop="tripartiteRate" min-width="130">
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.tripartiteRate ==null ? '--' : row.tripartiteRate}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('类型')" align="center" prop="type" width="130" >
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.type == 0">{{ t('代收') }}</span>
|
||||
<span v-if="row.type == 1">{{ t('代付') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="t('缴纳保证金')" align="center" prop="deposit" min-width="130" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.deposit == null ? '--' : row.deposit }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('渠道编码')" align="center" prop="code" min-width="130" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('币种编号')" align="center" prop="currencyCode" min-width="130">
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.currencyCode }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('状态')" align="center" prop="status" min-width="130" >
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.status == 1">{{ t('停用') }}</span>
|
||||
<span v-if="row.status == 0">{{ t('正常') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('下单地址')" align="center" prop="payUrl" min-width="200" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.payUrl|| '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('查询地址')" align="center" prop="payQueryUrl" min-width="200" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.payQueryUrl || '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('回调地址')" align="center" prop="notifyUrl" min-width="200" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.notifyUrl || '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('查询余额地址')" align="center" prop="balanceUrl" min-width="200" >
|
||||
<template v-slot="{row}">
|
||||
<span >{{ row.balanceUrl || '--' }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('操作')" align="center" prop="operate"
|
||||
width="170" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleAdd(row)" >
|
||||
{{ t('修改') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<third-channel-add v-if="showLodings" ref="thirdChannelAddRef" @submit="handleQuery"></third-channel-add> <!-- 添加第三方渠道 -->
|
||||
<edit-remark v-if="editRemarkDialog" v-model:show="editRemarkDialog" v-model:data="addQuery" @submit="handleQuery"></edit-remark> <!-- 编辑备注 -->
|
||||
<recharge-config v-if="configDialog" v-model:show="configDialog" v-model:data="addQuery" @submit="handleConfigSubmit"
|
||||
:currencySign="currencySign"></recharge-config> <!-- 充值配置 -->
|
||||
<edit-level v-if="levelDialog" v-model:show="levelDialog" v-model:data="addQuery" @submit="handleQuery"></edit-level> <!-- 充值等级 -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import CheckboxSelect from "@/components/CheckboxSelect"; // 多选下拉框
|
||||
import baseSwitch from "@/components/BaseSwitch"; // 切换开关
|
||||
import ThirdChannelAdd from "./components/ThirdChannelAdd" // 第三方渠道新增
|
||||
import EditRemark from "./components/EditRemark.vue"; // 充值备注
|
||||
import EditLevel from "./components/EditLevel.vue"; // 充值等级
|
||||
import RechargeConfig from "./components/RechargeConfig.vue";// 充值配置
|
||||
import CustomSelect from "@/components/CustomSelect"; // 自定义下拉框
|
||||
import TableDragSort from '@/components/TableDragSort'; // 拖拽排序
|
||||
import TextDragSort from "@/components/TextDragSort"; // 拖拽
|
||||
import * as recharge from '@/api/finance/recharge';
|
||||
import { getChannelExternalList } from '@/api/finance/recharge'
|
||||
import { listLevel } from '@/api/member/level'
|
||||
import { getCurrencyDisplay } from "@/utils/index";
|
||||
import { nextTick } from "vue";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { ff_device_type } = proxy.useDict('ff_device_type')
|
||||
const data = reactive({
|
||||
loading: false,
|
||||
queryParams: {
|
||||
queryType: '',
|
||||
parentId: '',
|
||||
terminalsList: [],
|
||||
currencyCode: '',
|
||||
levelIdList: [],
|
||||
switchStatus: ''
|
||||
},
|
||||
listData: [],
|
||||
})
|
||||
const props = defineProps({
|
||||
typeName: String,
|
||||
typeOS: String,
|
||||
})
|
||||
const switchStatusOptions = [
|
||||
{ value: '', label: proxy.t('全部状态') },
|
||||
{ label: proxy.t('停用'), value: '0' },
|
||||
{ label: proxy.t('启用'), value: '1' },
|
||||
|
||||
]
|
||||
const { loading, queryParams, listData } = toRefs(data)
|
||||
|
||||
const queryTypeOptions = [
|
||||
{
|
||||
value: 1,
|
||||
label: '商户名称'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '第三方支付名称'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: '商户号'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '通道编码'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '通道名称'
|
||||
}
|
||||
]
|
||||
//跳转切换
|
||||
data.queryParams.queryType = Number(props.typeOS)
|
||||
data.queryParams.queryValue = props.typeName
|
||||
const showLodings = ref(true) // 新增第三方
|
||||
/**
|
||||
* 打开新增、修改第三方弹窗
|
||||
* @param row
|
||||
*/
|
||||
const handleAdd = (row) => {
|
||||
showLodings.value = false;
|
||||
nextTick(() => {
|
||||
showLodings.value = true;
|
||||
setTimeout(() => {
|
||||
proxy.$refs['thirdChannelAddRef'].openDialog(row.id)
|
||||
}, 300);
|
||||
})
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
getList();
|
||||
}
|
||||
|
||||
// 获取列表数据
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
const { parentId, terminalsList, currencyCode, levelIdList, ...other } = queryParams.value
|
||||
const _data = {
|
||||
...other,
|
||||
terminalsList: terminalsList.join(','),
|
||||
currencyCode: currencyCode,
|
||||
levelIdList: levelIdList.join(','),
|
||||
parentId: parentId,
|
||||
type: 1,
|
||||
}
|
||||
getChannelExternalList(_data).then(response => {
|
||||
listData.value = response.rows?.map(item => {
|
||||
return item
|
||||
})
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 所有下拉框的数据
|
||||
*/
|
||||
// 所属大类
|
||||
const channelOptions = ref([]);
|
||||
const lodingShow = ref(true);
|
||||
const getListChannel = async () => {
|
||||
lodingShow.value = false;
|
||||
const { data } = await recharge.listChannel({ parentId: 0 })
|
||||
channelOptions.value = data?.map(item => {
|
||||
return {
|
||||
label: item.channelName,
|
||||
value: item.id
|
||||
}
|
||||
})
|
||||
nextTick(() => {
|
||||
lodingShow.value = true;
|
||||
})
|
||||
}
|
||||
// 币种
|
||||
const currencyTypeOptions = ref([]);
|
||||
const getListCurrencyType = () => {
|
||||
const list = getLocalStorage('currencySelect');
|
||||
currencyTypeOptions.value = list?.map(item => {
|
||||
return {
|
||||
label: item.currencyCode,
|
||||
value: item.currencyCode
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改备注
|
||||
const editRemarkDialog = ref(false)
|
||||
const addQuery = ref({})
|
||||
|
||||
// 配置
|
||||
const configDialog = ref(false)
|
||||
const currencySign = ref(null)
|
||||
// 配置提交
|
||||
const handleConfigSubmit = () => {
|
||||
let { deduceRateType } = addQuery.value
|
||||
if (deduceRateType === 1) {
|
||||
addQuery.value.chargeRateList = []
|
||||
addQuery.value.chargeRateLevelList?.map(item => {
|
||||
item.chargeRateList = item.chargeRateList.filter(rateItem => rateItem.maxAmount && rateItem.minAmount >= 0 && rateItem.chargeRate)
|
||||
})
|
||||
} else if (deduceRateType === 0) {
|
||||
addQuery.value.chargeRateList = addQuery.value.chargeRateList.filter(rateItem => rateItem.maxAmount && rateItem.minAmount >= 0 && rateItem.chargeRate)
|
||||
}
|
||||
recharge.chargeRateConfig(addQuery.value).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t("修改成功"))
|
||||
getList()
|
||||
})
|
||||
}
|
||||
|
||||
// 会员层级
|
||||
const levelDialog = ref(false)
|
||||
|
||||
const initOptions = () => {
|
||||
getListCurrencyType()
|
||||
getListChannel()
|
||||
// getListLabel()
|
||||
}
|
||||
onMounted(() => {
|
||||
initOptions()
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -466,13 +466,12 @@ const currencyTypeChange = () => {
|
|||
const currencySign = ref(null)
|
||||
watch( () => formData.value.currencyType, async(val) => {
|
||||
getListThirdChannel(val)
|
||||
console.log('currencySign', val)
|
||||
currencySign.value = getCurrencyDisplay(val, 'currencySign')
|
||||
}, { immediate: true })
|
||||
|
||||
const fieldConfigList = ref([])
|
||||
const thirdChannelChange = (val) => {
|
||||
const localList = getLocalStorage('currencyList')?.filter(v => v.status == 0) || []; // 本地缓存
|
||||
const localList = getLocalStorage('currencySelect')?.filter(v => v.status == 0) || []; // 本地缓存
|
||||
let gameItem = localList.find(v=>formData.value.currencyType == v.currencyCode)
|
||||
if (thirdChannelList?.value.length == 0) return
|
||||
const find = thirdChannelList?.value?.find(item => item.code === val);
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ import * as recharge from '@/api/finance/recharge'
|
|||
import { listLevel } from '@/api/member/level'
|
||||
import { getCurrencyDisplay } from "@/utils/index";
|
||||
import { nextTick } from "vue";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { ff_device_type } = proxy.useDict('ff_device_type')
|
||||
|
|
@ -248,7 +249,6 @@ const rowClassName = ({ row }) => {
|
|||
}
|
||||
// 拖拽结束事件
|
||||
const dragEnd = (row) => {
|
||||
console.log(row)
|
||||
recharge.updateSort(row).then(() => {
|
||||
if (row.sort) {
|
||||
// proxy.$modal.msgSuccess("");
|
||||
|
|
@ -365,7 +365,7 @@ const getListChannel = async () => {
|
|||
// 币种
|
||||
const currencyTypeOptions = ref([])
|
||||
const getListCurrencyType = () => {
|
||||
const list = JSON.parse(localStorage.getItem('currencyList'))
|
||||
const list = getLocalStorage('currencySelect');
|
||||
currencyTypeOptions.value = list.map(item => {
|
||||
return {
|
||||
label: item.currencyCode,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div style="margin-bottom: 15px;">
|
||||
<custom-select v-model="currencyType" filterable :options="currencySelectArr" style="width: 220px;"
|
||||
@change="getHomeIndexs"></custom-select>
|
||||
<custom-select style="width: 130px;" filterable v-if="siteSelect.length > 0" @change="getHomeIndexs" collapse-tags collapse-tags-tooltip v-model="tenantId" clearable :options="siteSelect" :placeholder="t('请选择')"></custom-select>
|
||||
<custom-select style="width: 220px;" filterable v-if="siteSelect.length > 0" @change="getHomeIndexs" collapse-tags collapse-tags-tooltip v-model="tenantId" clearable :options="siteSelect" :placeholder="t('请选择')"></custom-select>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="24" style="background:rgb(255,255,255);padding:16px 16px 0px;margin-bottom:32px">
|
||||
|
|
|
|||
|
|
@ -12,11 +12,14 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<!-- <table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date> -->
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form>
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="currencyType">
|
||||
<custom-select style="width: 130px;" collapse-tags collapse-tags-tooltip v-model="queryParams.currencyType" filterable :options="currencySelectArr" :placeholder="t('币种')"></custom-select>
|
||||
<custom-select style="width: 260px;" collapse-tags collapse-tags-tooltip v-model="queryParams.currencyType" filterable :options="currencySelectArr" :placeholder="t('币种')"></custom-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -120,7 +123,12 @@ const currencySelectArr = getLocalStorage('currencySelect')?.map(item => {
|
|||
});
|
||||
const openView = ref(false);
|
||||
|
||||
const siteList = ref(getLocalStorage('siteSelect'));
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'siteName',
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@
|
|||
<div class="app-container">
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<el-form-item >
|
||||
<!-- <el-form-item >
|
||||
<custom-select style="width: 130px;" v-if="siteSelect.length > 0" collapse-tags collapse-tags-tooltip v-model="siteIdNo" :options="siteSelect" :placeholder="t('请选择')"></custom-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item >
|
||||
<CustomSelect v-model="siteIdNo" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="timeType">
|
||||
<el-select v-model="queryParams.timeType" :placeholder="t('请选择')" style="width: 150px;">
|
||||
<el-option :label="t('最后登录时间')" :value="1" />
|
||||
|
|
@ -13,11 +16,10 @@
|
|||
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="currencyType">
|
||||
<custom-select style="width: 130px;" collapse-tags collapse-tags-tooltip filterable v-model="queryParams.currencyType" :options="currencySelectArr" :placeholder="t('币种')"></custom-select>
|
||||
<custom-select style="width: 230px;" collapse-tags collapse-tags-tooltip filterable v-model="queryParams.currencyType" :options="currencySelectArr" :placeholder="t('币种')"></custom-select>
|
||||
</el-form-item>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList2" keyName="accountType" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
|
|
@ -148,6 +150,7 @@ const loading = ref(true);
|
|||
const total = ref(0);
|
||||
|
||||
const openView = ref(false);
|
||||
const siteIdNo = ref('');
|
||||
const accountStatusArr = [
|
||||
{
|
||||
label: proxy.t('冻结'),
|
||||
|
|
@ -202,7 +205,13 @@ const accountStatusArr1 = [
|
|||
value: '10',
|
||||
}
|
||||
];
|
||||
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.value,
|
||||
}
|
||||
}));
|
||||
siteIdNo.value = siteList.value[0].value;
|
||||
const currencySelectArr = getLocalStorage('currencySelect')?.map(item => {
|
||||
return {
|
||||
label: `${item.currencyName}(${item.currencyCode})`,
|
||||
|
|
@ -220,10 +229,10 @@ const queryParamsList = ref([{
|
|||
label: proxy.t('登录IP'),
|
||||
value: 'ip',
|
||||
},
|
||||
{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
},
|
||||
// {
|
||||
// label: proxy.t('站点ID'),
|
||||
// value: 'siteId',
|
||||
// },
|
||||
{
|
||||
label: proxy.t('所属公司'),
|
||||
value: 'company',
|
||||
|
|
@ -254,7 +263,7 @@ queryParams: {
|
|||
|
||||
},
|
||||
});
|
||||
const siteIdNo = ref('');
|
||||
|
||||
// 批量操作
|
||||
const tableRef = ref(),
|
||||
isAllSelection = ref(false), // 是否全选
|
||||
|
|
@ -288,23 +297,23 @@ total.value = response.total;
|
|||
loading.value = false;
|
||||
});
|
||||
}
|
||||
const siteSelect = ref([]);
|
||||
// const siteSelect = ref([]);
|
||||
|
||||
const getSiteSelects = () => {
|
||||
getSiteSelect().then(response => {
|
||||
siteSelect.value = response.data.map((item,index) => {
|
||||
if (index == 0){
|
||||
siteIdNo.value = item.id;
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
label: item.siteName,
|
||||
value: item.id,
|
||||
}
|
||||
});
|
||||
getList();
|
||||
})
|
||||
}
|
||||
// const getSiteSelects = () => {
|
||||
// getSiteSelect().then(response => {
|
||||
// siteSelect.value = response.data.map((item,index) => {
|
||||
// if (index == 0){
|
||||
// siteIdNo.value = item.id;
|
||||
// }
|
||||
// return {
|
||||
// ...item,
|
||||
// label: item.siteName,
|
||||
// value: item.id,
|
||||
// }
|
||||
// });
|
||||
// getList();
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
const handleView = (row) => {
|
||||
|
|
@ -324,7 +333,7 @@ handleQuery();
|
|||
}
|
||||
//初始化
|
||||
onMounted(() => {
|
||||
getSiteSelects();
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog :title="t('{}银行信息', addEditStatus === 'add' ? '新增' : '修改')" align-center v-model="isShowDialog" width="600px"
|
||||
<el-dialog :title="t('{}银行信息', addEditStatus === 'add' ? '新增' : '修改')" align-center v-model="isShowDialog" width="750px"
|
||||
append-to-body @close="closeDialog('close')">
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px" v-loading="loading">
|
||||
<el-form-item :label="t('币种:')" prop="currencyType">
|
||||
|
|
@ -8,9 +8,6 @@
|
|||
<el-form-item :label="t('银行名称')" prop="bankName">
|
||||
<el-input v-model="formData.bankName" :placeholder="t('请输入银行名称')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('银行代码')" prop="bankCode">
|
||||
<el-input v-model="formData.bankCode" :placeholder="t('请输入银行代码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('银行图标')" prop="bankIcon">
|
||||
<div class="upload-box">
|
||||
<image-upload v-model="formData.bankIcon" :typeUpImg="24" :limit="1" :isShowTip="false"></image-upload>
|
||||
|
|
@ -23,6 +20,32 @@
|
|||
<el-form-item :label="t('启用状态')" prop="status">
|
||||
<el-switch v-model="formData.status" active-value="0" inactive-value="1" />
|
||||
</el-form-item>
|
||||
<div v-for="(item,index) in formData.bankCodeList">
|
||||
<el-form-item :label="t('渠道代码')" prop="bankCodeList.channelCode">
|
||||
<div style="width: 100%;display: flex;">
|
||||
<custom-select v-model="item.channelCode" :options="channelCodeList" :placeholder="t('请选择渠道代码')" />
|
||||
<div style="display: flex;width: 150px;margin-left: 10px;">
|
||||
<el-button v-if="formData.bankCodeList.length > 1" class="mt-2"
|
||||
@click.prevent="dealWithItem1(item, 'delete')">
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-button v-if="index !== 0 || formData.bankCodeList.length == 1" class="mt-2"
|
||||
@click.prevent="dealWithItem1(item, 'add')">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('银行代码')" prop="bankCodeList.bankCode">
|
||||
<el-input v-model="item.bankCode" :placeholder="t('请输入银行代码')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item :label="t('备注')" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" :placeholder="t('请输入内容')" />
|
||||
</el-form-item>
|
||||
|
|
@ -31,6 +54,7 @@
|
|||
<div class="dialog-footer">
|
||||
<el-button v-if="addEditStatus === 'add'" @click="resetForm">{{ t('重 置') }}</el-button>
|
||||
<el-button v-else @click="closeDialog('close')">{{ t('取 消') }}</el-button>
|
||||
|
||||
<el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -38,7 +62,9 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getBank, addBank, updateBank } from "@/api/bank";
|
||||
import { getBank, addBank, updateBank } from "@/api/payment/bank";
|
||||
import CurrencySelect from "@/components/CurrencySelect";
|
||||
import CustomSelect from "@/components/CustomSelect";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -65,9 +91,15 @@ const formData = reactive({ // 表单参数
|
|||
bankCode: null,
|
||||
bankIcon: null,
|
||||
status: '1',
|
||||
bankCodeList: [
|
||||
{
|
||||
channelCode: null,
|
||||
bankCode: null
|
||||
}
|
||||
],
|
||||
remark: null
|
||||
});
|
||||
|
||||
const channelCodeList = ref([]);
|
||||
// 表单校验
|
||||
const rules = reactive({
|
||||
currencyType: [
|
||||
|
|
@ -83,9 +115,22 @@ const rules = reactive({
|
|||
{ required: true, message: proxy.t('银行图标地址不能为空'), trigger: 'blur' }
|
||||
]
|
||||
});
|
||||
|
||||
const dealWithItem1 = (item, type) => {
|
||||
if (type == 'delete') {
|
||||
const index = formData.bankCodeList.indexOf(item)
|
||||
if (index !== -1) {
|
||||
formData.bankCodeList.splice(index, 1)
|
||||
}
|
||||
} else {
|
||||
formData.bankCodeList.push({
|
||||
channelCode: null,
|
||||
bankCode: null
|
||||
})
|
||||
}
|
||||
}
|
||||
// 获取修改详情
|
||||
if (props.addEditStatus === 'edit' && props.id) {
|
||||
console.log('修改详情');
|
||||
loading.value = true;
|
||||
getBank(props.id).then(res => {
|
||||
loading.value = false;
|
||||
|
|
@ -100,6 +145,22 @@ if (props.addEditStatus === 'edit' && props.id) {
|
|||
oldForm.value = JSON.stringify(objForm);
|
||||
}, 500);
|
||||
});
|
||||
}else{
|
||||
console.log('修改详情');
|
||||
Object.assign(formData, {
|
||||
currencyType: null,
|
||||
bankName: null,
|
||||
bankCode: null,
|
||||
bankIcon: null,
|
||||
status: '1',
|
||||
bankCodeList: [
|
||||
{
|
||||
channelCode: null,
|
||||
bankCode: null
|
||||
}
|
||||
],
|
||||
remark: null
|
||||
})
|
||||
}
|
||||
|
||||
// 提交
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<el-form-item prop="currencyType">
|
||||
<currency-select v-model="queryParams.currencyType" filterable style="width: 180px;" clearable @clear="handleQuery"
|
||||
<currency-select v-model="queryParams.currencyType" style="width: 180px;" clearable @clear="handleQuery"
|
||||
@change="handleQuery"></currency-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="bankName">
|
||||
|
|
@ -62,12 +62,12 @@
|
|||
|
||||
<!-- 添加或修改银行管理对话框 -->
|
||||
<add-edit-dialog :id="editDataId" :addEditStatus="addEditStatus" v-if="isShowDialog"
|
||||
@closeDialog="closeDialog"></add-edit-dialog>
|
||||
@closeDialog="closeDialog" v-model:show="isShowDialog"></add-edit-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="BankingRegulations">
|
||||
import { listBank, delBank, changeBankStatus } from "@/api/bank";
|
||||
import { listBank, delBank, changeBankStatus } from "@/api/payment/bank";
|
||||
import AddEditDialog from "./components/AddEditDialog.vue";
|
||||
import CurrencySelect from '@/components/CurrencySelect'; // 币种选择
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<el-input v-model="form.currencyAisle" :placeholder="t('请输入币种通道')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('币种展示内容')" prop="currencyDisplay">
|
||||
<el-input v-model="currencyDisplay" :placeholder="t('请输入币种展示内容')" disabled />
|
||||
<el-input v-model="currencyDisplay" :placeholder="t('请输入币种展示内容')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('币种全称')" prop="fullName">
|
||||
<el-input v-model="form.fullName" :placeholder="t('请输入币种全称')" />
|
||||
|
|
@ -345,7 +345,7 @@ getList();
|
|||
// 更新币种缓存
|
||||
const updateLocalStorage = () => {
|
||||
currency.listCurrency({ pageNum: 1, pageSize: 1000 }).then(res => {
|
||||
setLocalStorage('currencyList', res.rows);
|
||||
setLocalStorage('currencySelect', res.rows);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
<table-search-card :model="queryParams" @getList="getList" :leftSpan="16" :rightSpan="8" @handleQuery="handleQuery()"
|
||||
@resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<select-input-form :queryParamsList="queryParamsList" v-model:queryParams="queryParams" :width="[130, 260]"
|
||||
@handleQuery="handleQuery"></select-input-form>
|
||||
<select-input-form :queryParamsList="queryParamsList" v-if="showLodings" v-model:queryParams="queryParams" :width="[130, 260]"></select-input-form>
|
||||
<el-form-item prop="domainStatus" style="width: 150px;">
|
||||
<CustomSelect clearable v-model="queryParams.domainStatus" :placeholder="t('主域名状态')"
|
||||
:options="domainStatusOptions" @change="handleQuery"></CustomSelect>
|
||||
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -204,7 +202,7 @@ import SupplierButton from "../components/SupplierButton.vue"; // 供应商
|
|||
import DictSelect from '@/components/DictSelect';
|
||||
import DictText from '@/components/DictText';
|
||||
import CustomSelect from '@/components/CustomSelect';
|
||||
import { ref } from "vue";
|
||||
import { nextTick, ref } from "vue";
|
||||
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
|
@ -421,10 +419,14 @@ const handleQuery = () => {
|
|||
queryParams.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const showLodings = ref(true);
|
||||
// 重置按钮操作
|
||||
const resetQuery = () => {
|
||||
handleQuery();
|
||||
showLodings.value = false;
|
||||
nextTick(() => {
|
||||
showLodings.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
|
|
|
|||
|
|
@ -190,16 +190,16 @@ const data = reactive({
|
|||
{ required: true, message: "请选择供应商类型", trigger: "change" },
|
||||
],
|
||||
analysisType: [
|
||||
{ required: true, message: "请选择供应商类型", trigger: "change" },
|
||||
{ required: true, message: "请选择自定义解析类型", trigger: "change" },
|
||||
],
|
||||
freeNode: [
|
||||
{ required: true, message: "请选择供应商类型", trigger: "change" },
|
||||
{ required: true, message: "请输入免费节点数量", trigger: "change" },
|
||||
],
|
||||
exceedFreeNode: [
|
||||
{ required: true, message: "请选择供应商类型", trigger: "change" },
|
||||
{ required: true, message: "请输入允许超出免费节点数量", trigger: "change" },
|
||||
],
|
||||
exceedCost: [
|
||||
{ required: true, message: "请选择供应商类型", trigger: "change" },
|
||||
{ required: true, message: "请输入超出费用/节点/月", trigger: "change" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@
|
|||
<el-scrollbar max-height="900px">
|
||||
<el-form ref="formRef" :model="formAll" :rules="rules" label-width="130px" class="add-form">
|
||||
<el-form-item :label="t('api平台代码')" prop="apiPlatformCode">
|
||||
<el-input v-model="formAll.apiPlatformCode" />
|
||||
<el-input v-model="formAll.apiPlatformCode" :placeholder="t('请输入api平台代码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('平台代码')" prop="platformCode">
|
||||
<el-input v-model="formAll.platformCode" />
|
||||
<el-input v-model="formAll.platformCode" :placeholder="t('请输入平台代码')"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('平台展示代码')" prop="platformShowCode">
|
||||
<el-input v-model="formAll.platformShowCode" />
|
||||
<el-input v-model="formAll.platformShowCode" :placeholder="t('请输入平台展示代码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('语言信息')" prop="langInfo">
|
||||
<el-input v-model="formAll.langInfo" type="textarea" :rows="5" />
|
||||
<el-input v-model="formAll.langInfo" type="textarea" :placeholder="t('请输入语言信息')" :rows="5" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('货币信息')" prop="currencyInfo">
|
||||
<el-input v-model="formAll.currencyInfo" type="textarea" :rows="5" />
|
||||
<el-input v-model="formAll.currencyInfo" type="textarea" :placeholder="t('请输入货币信息')" :rows="5" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
|
@ -96,17 +96,20 @@ nextTick(() => {
|
|||
//表单验证规则
|
||||
const rules = reactive({
|
||||
apiPlatformCode: [
|
||||
{ required: true, message: '请输入平台编码', trigger: 'change' },
|
||||
{ required: true, message: '请输入api平台代码', trigger: 'change' },
|
||||
],
|
||||
platformCode: [
|
||||
{ required: true, message: '请输入游戏编码', trigger: 'change' },
|
||||
{ required: true, message: '请输入平台代码', trigger: 'change' },
|
||||
],
|
||||
platformShowCode: [
|
||||
{ required: true, message: '请输入游戏显示编码', trigger: 'change' },
|
||||
{ required: true, message: '请输入平台展示编码', trigger: 'change' },
|
||||
],
|
||||
langInfo: [
|
||||
{ required: true, message: '请输入语言信息', trigger: 'change' },
|
||||
],
|
||||
currencyInfo: [
|
||||
{ required: true, message: '请输入货币信息', trigger: 'change' },
|
||||
],
|
||||
})
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ function resetQuery() {
|
|||
queryParams.value.gameType = useInitData.dictInitData.platformType
|
||||
queryParams.value.platformId = useInitData.dictInitData.platformId
|
||||
queryParams.value.pageNum = 1;
|
||||
platformListInit(true)
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
|
|
@ -179,15 +179,15 @@ const handleApiGame = () => {
|
|||
}
|
||||
|
||||
// 获取游戏平台下拉
|
||||
const platformList = ref([])
|
||||
const platformListInit = async (isFirst = false) => {
|
||||
let { platformId, gameType } = queryParams.value
|
||||
await platformSelect({ platformType: gameType,currencyCode:queryParams.value.currencyCode }).then(res => {
|
||||
platformList.value = res.data
|
||||
queryParams.value.platformId = isFirst && platformId ? platformId : res?.data?.length ? res.data[0].id : null
|
||||
getList();
|
||||
})
|
||||
}
|
||||
// const platformList = ref([])
|
||||
// const platformListInit = async (isFirst = false) => {
|
||||
// let { platformId, gameType } = queryParams.value
|
||||
// await platformSelect({ platformType: gameType,currencyCode:queryParams.value.currencyCode }).then(res => {
|
||||
// platformList.value = res.data
|
||||
// queryParams.value.platformId = isFirst && platformId ? platformId : res?.data?.length ? res.data[0].id : null
|
||||
|
||||
// })
|
||||
// }
|
||||
//初始化
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,394 @@
|
|||
<template>
|
||||
<!-- 新增 -->
|
||||
<el-dialog :title="t('缺图游戏列表')" align-center :close-on-click-modal="false" width="1000" v-model="showDialog" append-to-body>
|
||||
<el-scrollbar height="600px" >
|
||||
<table-search-card :model="queryParams" @getList="getImgNotExists" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<el-form-item prop="currencys">
|
||||
<CheckboxSelect style="width: 200px;" dataType="currency" filterable v-model="queryParams.currencys"></CheckboxSelect>
|
||||
</el-form-item>
|
||||
<el-form-item prop="platformCodes">
|
||||
<CheckboxSelect style="width: 200px;" v-if="showPlatform" :options="platformList" filterable v-model="queryParams.platformCodes"></CheckboxSelect>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
</template>
|
||||
</table-search-card>
|
||||
<el-table v-loading="loading" :data="translateList" class="c-table-main" stripe
|
||||
ref="dragTable" row-key="id" border>
|
||||
<el-table-column :label="t('游戏代码')" align="center" min-width="120px" prop="gameCode" />
|
||||
<el-table-column :label="t('游戏类型')" align="center" min-width="120px" prop="platformName" />
|
||||
<el-table-column :label="t('游戏名称')" align="center" min-width="120px" prop="gameName" />
|
||||
<el-table-column :label="t('图片')" align="center" min-width="120px" prop="gameIcon" >
|
||||
<template #default="{row}">
|
||||
<img :src="fileHost+row.gameIcon" style="width: 50px; height: 50px;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('币种')" align="center" min-width="120px" prop="currencyCode" />
|
||||
|
||||
<el-table-column :label="t('操作')" align="center" min-width="120px" class-name="small-padding fixed-width">
|
||||
<template #default="{row}">
|
||||
<!-- {{ row.gameCode }} -->
|
||||
<div class="upload-box">
|
||||
<ImageUpload v-if="!loading" v-model="row.gameIcon" :isUrl="true" :isShowTip="false" :uploadImgUrl="`${uploadUrl}/file/game/upload/${row.platformCode}/${row.gameCode}`" :limit="1"></ImageUpload>
|
||||
</div>
|
||||
<!-- <el-button link type="primary" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['game:game:edit']">{{ t('修改') }}</el-button> -->
|
||||
</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" /> -->
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<div class="dialog-footer" style="display: flex;justify-content: center;">
|
||||
<!-- <el-button type="primary" @click="submitForm" :loading="loadingButton">{{ t('确 定') }}</el-button> -->
|
||||
<el-button @click="closeDialog">{{ t('关 闭') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<el-dialog v-if="showPreview" :title="addEditType == 'add'?t('新增'):t('修改')" align-center v-model="showPreview" width="700px" append-to-body>
|
||||
<el-scrollbar>
|
||||
<el-form ref="formRef" :model="formAll" :rules="rules" label-width="130px" class="add-form">
|
||||
<el-form-item :label="t('游戏代码')" prop="gameCode">
|
||||
<el-input v-model="formAll.gameCode" :placeholder="t('请输入游戏代码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('游戏名称')" prop="gameName">
|
||||
<el-input v-model="formAll.gameName" :placeholder="t('请输入游戏名称')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('语言')" prop="langCode">
|
||||
<CustomSelect v-model="formAll.langCode" :options="langCodeSelect" :placeholder="t('请选择语言')" ></CustomSelect>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormPreview" :loading="loadingButton">{{ t('确 定') }}</el-button>
|
||||
<el-button @click="closeDialogPreview">{{ t('取 消') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { formatTime,finalTimestamp } from '@/utils/ruoyi'; // 时间格式化
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
import NumberInput from "@/components/NumberInput";
|
||||
import { getGameNameList,updateGameName,postGameName,platformSelect } from "@/api/game/platform";
|
||||
import { getImgNotExist,postFileGameUpload } from "@/api/game/game";
|
||||
import BannerColour from "@/components/BannerColour"; // Banner图颜色
|
||||
import BannerIcon from "@/components/BannerIcon"; // Banner图标
|
||||
import CustomSelect from "@/components/CustomSelect";
|
||||
import CheckboxSelect from "@/components/CheckboxSelect";
|
||||
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { nextTick, onMounted, ref } from "vue"; // 获取当前实例
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
const fileHost = getLocalStorage('fileUrl') || ''; // 文件host
|
||||
const uploadUrl = getLocalStorage('uploadUrl');
|
||||
const uploadImgUrl = ref(''); // 上传的图片服务器地址
|
||||
// /file/game/upload/{platformCode}/{gameCode}
|
||||
const loadingButton = ref(false);
|
||||
const oldForm = shallowRef({ });
|
||||
const { proxy } = getCurrentInstance() // 获取当前实例
|
||||
const emits = defineEmits(['submit', 'update:show']) // 自定义事件
|
||||
const props = defineProps({ // 父组件向子组件传值
|
||||
data: {
|
||||
type: Object, // 父组件传值
|
||||
default: {}
|
||||
},
|
||||
show: {
|
||||
type: Boolean, // 显示
|
||||
default: false
|
||||
},
|
||||
addEditStatus:{ // 添加/修改
|
||||
type: String,
|
||||
default: 'add'
|
||||
},
|
||||
modifyDate: { //修改数据
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
const showDialog = computed({ //弹窗显示控制
|
||||
get() {
|
||||
return props.show
|
||||
},
|
||||
set(value) {
|
||||
emits('update:show', value)
|
||||
}
|
||||
})
|
||||
const translateList = ref([]),loading = ref(false);
|
||||
const langCodeSelect = ref(getLocalStorage('langSelect')?.filter(v => v.langType == 1 && v.langStatus).map((item)=>{
|
||||
return {label: `${item.name}(${item.langDisplay})`, value: item.countryLang};
|
||||
}))
|
||||
const queryParams = reactive({
|
||||
currencys: ['VND'],
|
||||
platformCodes:['JILI'],
|
||||
})
|
||||
const formAll = reactive({
|
||||
})
|
||||
|
||||
const getImgNotExists = () => {
|
||||
loading.value = true;
|
||||
getImgNotExist(queryParams).then(res => {
|
||||
if (res.code === 200) {
|
||||
translateList.value = res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
gameIcon:'',
|
||||
};
|
||||
});
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleUpload = (row) => {
|
||||
uploadImgUrl.value = uploadUrl + "/file/game/upload/" +row.platformCode+ "/" + row.gameCode;
|
||||
}
|
||||
// 获取游戏平台下拉
|
||||
const platformList = ref([])
|
||||
const showPlatform = ref(true);
|
||||
const platformListInit = async (isFirst = false) => {
|
||||
queryParams.platformCodes = [];
|
||||
showPlatform.value = false;
|
||||
await platformSelect({ groupType: 1 }).then(res => {
|
||||
platformList.value = res.data.map(item => {
|
||||
return {
|
||||
label: item.platformName,
|
||||
value: item.platformCode
|
||||
}
|
||||
})
|
||||
queryParams.platformCodes.push(res.data[0].platformCode);
|
||||
showPlatform.value = true;
|
||||
})
|
||||
}
|
||||
// 修改时数据更新相关内容
|
||||
nextTick(async () => {
|
||||
getImgNotExists();
|
||||
platformListInit();
|
||||
});
|
||||
|
||||
|
||||
//表单验证规则
|
||||
const rules = reactive({
|
||||
gameCode: [
|
||||
{ required: true, message: '请输入游戏名称', trigger: 'blur' }
|
||||
],
|
||||
gameName: [
|
||||
{ required: true, message: '请输入游戏名称', trigger: 'blur' }
|
||||
],
|
||||
langCode: [
|
||||
{ required: true, message: '请选择语言', trigger: 'change' }
|
||||
],
|
||||
})
|
||||
const showPreview = ref(false);
|
||||
const addEditType = ref('add');
|
||||
const addTranslate = () => {
|
||||
addEditType.value = 'add';
|
||||
formAll.langCode = '';
|
||||
formAll.gameCode = props.modifyDate.gameCode;
|
||||
formAll.gameName = props.modifyDate.gameName;
|
||||
showPreview.value = false;
|
||||
nextTick(() => {
|
||||
showPreview.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
const handleUpdate = (row) => {
|
||||
showPreview.value = true;
|
||||
Object.assign(formAll, row);
|
||||
addEditType.value = 'edit';
|
||||
showPreview.value = false;
|
||||
nextTick(() => {
|
||||
showPreview.value = true;
|
||||
});
|
||||
}
|
||||
const handleQuery = () => {
|
||||
getImgNotExists();
|
||||
}
|
||||
const resetQuery = () => {
|
||||
getImgNotExists();
|
||||
}
|
||||
const closeDialogPreview = () => {
|
||||
showPreview.value = false
|
||||
}
|
||||
// 提交
|
||||
const formRef = ref(null)
|
||||
const submitFormPreview = () => {
|
||||
formRef.value.validate(async(valid) => {
|
||||
if (valid) {
|
||||
let formData = {
|
||||
...formAll,
|
||||
gamePlatformId:props.modifyDate.id
|
||||
}
|
||||
if(addEditType.value == 'add'){
|
||||
postGameName(formData).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t('添加成功!'));
|
||||
getGameNameLists();
|
||||
closeDialogPreview();
|
||||
})
|
||||
}else if(addEditType.value == 'edit'){
|
||||
updateGameName(formData).then(res => {
|
||||
proxy.$modal.msgSuccess(proxy.t('修改成功!'));
|
||||
getGameNameLists();
|
||||
closeDialogPreview();
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
showDialog.value = false
|
||||
}
|
||||
</script>
|
||||
<style scope lang="scss">
|
||||
.w100 {
|
||||
width: 100%;
|
||||
}
|
||||
.upload-box {
|
||||
height: 60px !important;
|
||||
overflow: hidden;
|
||||
.upload-tips {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.component-upload-image .el-upload--picture-card {
|
||||
width: 60px !important;
|
||||
height: 60px !important;
|
||||
}
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 60px!important;
|
||||
height: 60px!important;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width:60px!important;
|
||||
height: 60px!important;
|
||||
.el-upload,
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 60px!important;
|
||||
height: 60px!important;
|
||||
}
|
||||
|
||||
.el-upload-list__item {
|
||||
margin: 0;
|
||||
border: none;
|
||||
width: 60px!important;
|
||||
height: 60px!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.upload-box-vioce{
|
||||
height: 90px !important;
|
||||
overflow: hidden;
|
||||
.upload-tips {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.component-upload-image .el-upload--picture-card {
|
||||
width: 180px !important;
|
||||
height: 90px !important;
|
||||
}
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 180px!important;
|
||||
height: 90px!important;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width:180px!important;
|
||||
height: 90px!important;
|
||||
.el-upload,
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 180px!important;
|
||||
height: 90px!important;
|
||||
}
|
||||
|
||||
.el-upload-list__item {
|
||||
margin: 0;
|
||||
border: none;
|
||||
width: 180px!important;
|
||||
height: 90px!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.upload-box-vioce11{
|
||||
height: 400px !important;
|
||||
overflow: hidden;
|
||||
.upload-tips {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.component-upload-image .el-upload--picture-card {
|
||||
width: 300px !important;
|
||||
height: 400px !important;
|
||||
}
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 300px!important;
|
||||
height: 400px!important;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width:300px!important;
|
||||
height: 400px!important;
|
||||
.el-upload,
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 300px!important;
|
||||
height: 400px!important;
|
||||
}
|
||||
|
||||
.el-upload-list__item {
|
||||
margin: 0;
|
||||
border: none;
|
||||
width: 300px!important;
|
||||
height: 400px!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.upload-box-vioce22{
|
||||
height: 200px !important;
|
||||
overflow: hidden;
|
||||
.upload-tips {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.component-upload-image .el-upload--picture-card {
|
||||
width: 400px !important;
|
||||
height: 200px !important;
|
||||
}
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 400px!important;
|
||||
height: 200px!important;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width:400px!important;
|
||||
height: 200px!important;
|
||||
.el-upload,
|
||||
.el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 400px!important;
|
||||
height: 200px!important;
|
||||
}
|
||||
|
||||
.el-upload-list__item {
|
||||
margin: 0;
|
||||
border: none;
|
||||
width: 400px!important;
|
||||
height: 200px!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.disable-click {
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -21,10 +21,9 @@
|
|||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-button type="primary" @click="handleImgNotExist" >{{ t('缺图游戏') }}</el-button>
|
||||
<el-button type="primary" @click="handleApiGame" >{{ t('同步API游戏') }}</el-button>
|
||||
<el-button type="primary" @click="handleGamesTenants" >{{ t('同步游戏到租户') }}</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
</table-search-card>
|
||||
|
||||
|
|
@ -80,11 +79,15 @@
|
|||
<translate-dialog v-if="translateShowDialog"
|
||||
:addEditStatus="addEditStatus" :modifyDate="modifyDate" @submit="getList"
|
||||
v-model:show="translateShowDialog"></translate-dialog>
|
||||
<img-not-exist-dialog v-if="imgNotExistShowDialog"
|
||||
:addEditStatus="addEditStatus" :modifyDate="modifyDate" @submit="getList"
|
||||
v-model:show="imgNotExistShowDialog"></img-not-exist-dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="Game">
|
||||
import AddDialog from "./AddDialog"//新增/修改弹窗
|
||||
import TranslateDialog from "./TranslateDialog"
|
||||
import TranslateDialog from "./TranslateDialog";
|
||||
import ImgNotExistDialog from "./ImgNotExistDialog";
|
||||
import * as game from "@/api/game/game";
|
||||
import { platformSelect,getGamePlatformApiSync,getGamePlatformTenantSync } from "@/api/game/platform";
|
||||
import useInitDataStore from "@/store/modules/initData";
|
||||
|
|
@ -204,6 +207,11 @@ const handleSynchronous = (row) => {
|
|||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
// 缺图游戏
|
||||
const imgNotExistShowDialog = ref(false);
|
||||
const handleImgNotExist = (row) => {
|
||||
imgNotExistShowDialog.value = true
|
||||
}
|
||||
// 游戏api同步
|
||||
const handleApiGame = () => {
|
||||
proxy.$modal.confirm(proxy.t('是否确认同步?')).then(() => {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,13 @@
|
|||
<custom-select v-model="queryParams.platformType" filterable style="width: 200px;" :options="gameTypeOptions" :clearable="false"></custom-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="platformName">
|
||||
<el-input v-model="queryParams.platformName" :placeholder="t('请输入平台名称')" clearable @keyup.enter="handleQuery" />
|
||||
<el-select v-if="showLoading" v-model="queryParams.platformName" filterable style="width: 200px;">
|
||||
<el-option v-for="item in platformSelectList" :key="item.id" :label="item.platformName" :value="item.platformName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="platformName">
|
||||
<el-input v-model="queryParams.platformName" :placeholder="t('请输入平台名称')" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="platformJump">
|
||||
<el-select v-model="queryParams.platformJump" style="width: 200px;" :placeholder="t('请选择平台跳转方式')">
|
||||
<el-option v-for="dict in jump_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
|
|
@ -125,6 +130,7 @@ import IconTips from "@/components/IconTips";
|
|||
import CurrencySelect from "@/components/CurrencySelect";
|
||||
import DictSelect from "@/components/DictSelect";
|
||||
import CustomSelect from "@/components/CustomSelect";
|
||||
import { platformSelect } from "@/api/game/platform";
|
||||
import { formatTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
import { nextTick, ref } from "vue";
|
||||
import { ElMessageBox, ElCheckbox } from 'element-plus'
|
||||
|
|
@ -214,7 +220,8 @@ function handleQuery() {
|
|||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
queryParams.value.platformType = useInitData.dictInitData.platformType
|
||||
queryParams.value.platformType = useInitData.dictInitData.platformType || '1';
|
||||
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +313,18 @@ const beforeSwitchChange = async (row, undateKeys) => {
|
|||
return
|
||||
|
||||
}
|
||||
|
||||
// 获取游戏平台下拉
|
||||
const platformSelectList = ref([]);
|
||||
const showLoading = ref(true);
|
||||
const platformListInit = async (isFirst = false) => {
|
||||
let { platformId, platformType } = queryParams.value
|
||||
showLoading.value = false;
|
||||
await platformSelect({ platformType: platformType,currencyCode:queryParams.value.currencyCode }).then(res => {
|
||||
platformSelectList.value = res.data;
|
||||
showLoading.value = true;
|
||||
// queryParams.value.platformId = isFirst && platformId ? platformId : res?.data?.length ? res.data[0].id : null
|
||||
})
|
||||
}
|
||||
// 子游戏管理
|
||||
const toGameManage = (row) => {
|
||||
const { id, platformType,currencyCode } = row
|
||||
|
|
@ -331,7 +349,9 @@ watch(() => queryParams.value.platformType, (newValue) => {
|
|||
getList()
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
onMounted(() => {
|
||||
platformListInit(true)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<el-table-column :label="t('语种')" align="center" prop="langCode" min-width="100" />
|
||||
<el-table-column :label="t('是否默认')" align="center" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<el-switch v-model="row.langDefault" :active-value="true" :inactive-value="false"
|
||||
<el-switch v-model="row.langDefault" :disabled="row.langStatus == false" :active-value="true" :inactive-value="false"
|
||||
:before-change="switchBeforeChange" @click="handleUpdate(row, 'langDefault')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -116,6 +116,9 @@ const switchBeforeChange = () => {
|
|||
|
||||
// 修改
|
||||
const handleUpdate = (row, type) => {
|
||||
if(!row.langStatus){
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
id: row.id
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,15 +15,16 @@
|
|||
</el-form-item>
|
||||
<table-search-date ref="searchDateRef" v-model:dateRange="dateRange"
|
||||
v-model:operateTimeType="operateTimeType" @dateChange="handleQuery"></table-search-date>
|
||||
|
||||
<el-form-item >
|
||||
<!-- <el-form-item >
|
||||
<custom-select style="width: 130px;" v-if="siteSelect.length > 0" collapse-tags collapse-tags-tooltip v-model="queryParams.tenantId" :options="siteSelect" :placeholder="t('请选择')"></custom-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="currencyCode" class="w120px">
|
||||
<custom-select v-model="queryParams.currencyCode" :options="currencySelectArr" filterable style="width: 130px;" :placeholder="t('请选择币种')" clearable @change="handleQuery"></custom-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item >
|
||||
<CustomSelect v-model="queryParams.tenantId" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<select-input-form :queryParamsList="queryParamsList" v-model:queryParams="queryParams" :width="[120, 260]"
|
||||
@handleQuery="handleQuery"></select-input-form>
|
||||
<el-form-item prop="currencyCode" class="w120px">
|
||||
<custom-select v-model="queryParams.currencyCode" :options="currencySelectArr" filterable style="width: 260px;" :placeholder="t('请选择币种')" clearable @change="handleQuery"></custom-select>
|
||||
</el-form-item>
|
||||
<select-input-form :queryParamsList="queryParamsList" v-model:queryParams="queryParams" :width="[120, 260]"></select-input-form>
|
||||
<el-form-item prop="type" class="w120px">
|
||||
<dict-select dictKey="ff_feedback_type" style="width: 130px;" v-model="queryParams.type" clearable :placeholder="t('反馈类型')"
|
||||
@change="handleQuery"></dict-select>
|
||||
|
|
@ -180,6 +181,7 @@ const queryParamsList = ref([{
|
|||
label: proxy.t('来源页面'),
|
||||
value: 'source'
|
||||
}]);
|
||||
|
||||
const currencySelectArr = getLocalStorage('currencySelect')?.map(item => {
|
||||
let labels = '';
|
||||
if (item.currencyCode == 'VND(1:1)'){
|
||||
|
|
@ -209,7 +211,14 @@ const queryParams = reactive({
|
|||
type: '', // 反馈类型
|
||||
importantType: '' // 重要性
|
||||
});
|
||||
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
...item,
|
||||
label: `${item.label}(${item.tenantId})`,
|
||||
value: item.tenantId,
|
||||
}
|
||||
}));
|
||||
queryParams.tenantId = siteList.value[0].value;
|
||||
// 请求列表
|
||||
const dataList = ref([]);
|
||||
const total = ref(0); // 总数
|
||||
|
|
@ -281,24 +290,27 @@ const opInfo = (row, type) => {
|
|||
}
|
||||
const siteSelect = ref([]);
|
||||
|
||||
const getSiteSelects = () => {
|
||||
getSiteSelect().then(response => {
|
||||
siteSelect.value = response.data.map((item,index) => {
|
||||
if (index == 0){
|
||||
queryParams.tenantId = item.tenantId;
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
label: item.siteName,
|
||||
value: item.tenantId,
|
||||
}
|
||||
});
|
||||
// 接口完成后手动初始化
|
||||
initByListType(props.listType)
|
||||
})
|
||||
}
|
||||
// const getSiteSelects = () => {
|
||||
// getSiteSelect().then(response => {
|
||||
// siteSelect.value = response.data.map((item,index) => {
|
||||
// if (index == 0){
|
||||
// queryParams.tenantId = item.tenantId;
|
||||
// }
|
||||
// return {
|
||||
// ...item,
|
||||
// label: item.siteName,
|
||||
// value: item.tenantId,
|
||||
// }
|
||||
// });
|
||||
|
||||
getSiteSelects();
|
||||
// })
|
||||
// }
|
||||
|
||||
// getSiteSelects();
|
||||
onMounted(() => {
|
||||
// 接口完成后手动初始化
|
||||
initByListType(props.listType)
|
||||
})
|
||||
|
||||
// 关闭弹窗
|
||||
const closeDialog = (type) => {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="noticeStatus">
|
||||
<custom-select style="width: 130px;" v-model="queryParams.noticeStatus" :options="noticeStatusArr" :placeholder="t('读取状态')"></custom-select>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="noticeType">
|
||||
<custom-select style="width: 130px;" v-model="queryParams.noticeType" :options="noticeTypeArr" :placeholder="t('全部类型')"></custom-select>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="noticeType">
|
||||
<custom-select style="width: 130px;" v-model="queryParams.noticeType" :options="noticeTypeArr" :placeholder="t('全部类型')"></custom-select>
|
||||
|
|
|
|||
|
|
@ -24,22 +24,22 @@
|
|||
主站点
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('站点ID')" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点ID')" align="center" fixed="left" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" align="center" fixed="left" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column :label="t('持有人')" width="100" align="center" prop="platformCode" /> -->
|
||||
<el-table-column :label="t('对接商务')" width="100" align="center" prop="gameType" >
|
||||
<el-table-column :label="t('对接商务')" fixed="left" width="100" align="center" prop="gameType" >
|
||||
<template #default="{row}">
|
||||
{{ getJobStatusName(row.gameType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('推荐方式')" width="100" align="center" prop="gameName" />
|
||||
<el-table-column :label="t('推荐人/推荐单位')" width="100" align="center" prop="betAmount" /> -->
|
||||
<el-table-column :label="t('皮肤版式')" width="100" align="center" prop="clientSkinStyle" >
|
||||
<el-table-column :label="t('皮肤版式')" fixed="left" width="100" align="center" prop="clientSkinStyle" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinStyleName(row.clientSkinStyle) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('客户端皮肤')" width="100" align="center" prop="clientSkin" >
|
||||
<el-table-column :label="t('客户端皮肤')" fixed="left" width="100" align="center" prop="clientSkin" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinName(row) }}
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -63,22 +63,22 @@
|
|||
主站点
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('站点ID')" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点ID')" fixed="left" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" fixed="left" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column :label="t('持有人')" width="100" align="center" prop="platformCode" /> -->
|
||||
<el-table-column :label="t('对接商务')" width="100" align="center" prop="gameType" >
|
||||
<el-table-column :label="t('对接商务')" fixed="left" width="100" align="center" prop="gameType" >
|
||||
<template #default="{row}">
|
||||
{{ getJobStatusName(row.gameType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('推荐方式')" width="100" align="center" prop="gameName" />
|
||||
<el-table-column :label="t('推荐人/推荐单位')" width="100" align="center" prop="betAmount" /> -->
|
||||
<el-table-column :label="t('皮肤版式')" width="100" align="center" prop="clientSkinStyle" >
|
||||
<el-table-column :label="t('皮肤版式')" fixed="left" width="100" align="center" prop="clientSkinStyle" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinStyleName(row.clientSkinStyle) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('客户端皮肤')" width="100" align="center" prop="clientSkin" >
|
||||
<el-table-column :label="t('客户端皮肤')" fixed="left" width="100" align="center" prop="clientSkin" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinName(row) }}
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -63,22 +63,22 @@
|
|||
主站点
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('站点ID')" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点ID')" fixed="left" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" fixed="left" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column :label="t('持有人')" width="100" align="center" prop="platformCode" /> -->
|
||||
<el-table-column :label="t('对接商务')" width="100" align="center" prop="gameType" >
|
||||
<el-table-column :label="t('对接商务')" fixed="left" width="100" align="center" prop="gameType" >
|
||||
<template #default="{row}">
|
||||
{{ getJobStatusName(row.gameType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('推荐方式')" width="100" align="center" prop="gameName" />
|
||||
<el-table-column :label="t('推荐人/推荐单位')" width="100" align="center" prop="betAmount" /> -->
|
||||
<el-table-column :label="t('皮肤版式')" width="100" align="center" prop="clientSkinStyle" >
|
||||
<el-table-column :label="t('皮肤版式')" fixed="left" width="100" align="center" prop="clientSkinStyle" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinStyleName(row.clientSkinStyle) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('客户端皮肤')" width="100" align="center" prop="clientSkin" >
|
||||
<el-table-column :label="t('客户端皮肤')" fixed="left" width="100" align="center" prop="clientSkin" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinName(row) }}
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -63,22 +63,22 @@
|
|||
主站点
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('站点ID')" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点ID')" fixed="left" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" fixed="left" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column :label="t('持有人')" width="100" align="center" prop="platformCode" /> -->
|
||||
<el-table-column :label="t('对接商务')" width="100" align="center" prop="gameType" >
|
||||
<el-table-column :label="t('对接商务')" fixed="left" width="100" align="center" prop="gameType" >
|
||||
<template #default="{row}">
|
||||
{{ getJobStatusName(row.gameType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('推荐方式')" width="100" align="center" prop="gameName" />
|
||||
<el-table-column :label="t('推荐人/推荐单位')" width="100" align="center" prop="betAmount" /> -->
|
||||
<el-table-column :label="t('皮肤版式')" width="100" align="center" prop="clientSkinStyle" >
|
||||
<el-table-column :label="t('皮肤版式')" fixed="left" width="100" align="center" prop="clientSkinStyle" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinStyleName(row.clientSkinStyle) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('客户端皮肤')" width="100" align="center" prop="clientSkin" >
|
||||
<el-table-column :label="t('客户端皮肤')" fixed="left" width="100" align="center" prop="clientSkin" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinName(row) }}
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -63,22 +63,22 @@
|
|||
主站点
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="t('站点ID')" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点ID')" fixed="left" align="center" width="120" prop="id" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="t('站点名称')" fixed="left" align="center" width="150" prop="siteName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column :label="t('持有人')" width="100" align="center" prop="platformCode" /> -->
|
||||
<el-table-column :label="t('对接商务')" width="100" align="center" prop="gameType" >
|
||||
<el-table-column :label="t('对接商务')" width="100" fixed="left" align="center" prop="gameType" >
|
||||
<template #default="{row}">
|
||||
{{ getJobStatusName(row.gameType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="t('推荐方式')" width="100" align="center" prop="gameName" />
|
||||
<el-table-column :label="t('推荐人/推荐单位')" width="100" align="center" prop="betAmount" /> -->
|
||||
<el-table-column :label="t('皮肤版式')" width="100" align="center" prop="clientSkinStyle" >
|
||||
<el-table-column :label="t('皮肤版式')" fixed="left" width="100" align="center" prop="clientSkinStyle" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinStyleName(row.clientSkinStyle) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('客户端皮肤')" width="100" align="center" prop="clientSkin" >
|
||||
<el-table-column :label="t('客户端皮肤')" fixed="left" width="100" align="center" prop="clientSkin" >
|
||||
<template v-slot="{row}">
|
||||
{{ getClientSkinName(row) }}
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<table-search-card :model="queryParams" :rules="rules" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<div style="display: flex;">
|
||||
<el-form-item prop="quotaValueType">
|
||||
|
|
@ -136,7 +136,29 @@ const quotaStatusArr = ref([
|
|||
]);
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
/** 查询列表 */
|
||||
// ✅ 自定义验证规则
|
||||
const validateQuotaRange = (rule, value, callback) => {
|
||||
const begin = Number(queryParams.value.quotaBegin)
|
||||
const end = Number(queryParams.value.quotaEnd)
|
||||
if (begin && end && begin > end) {
|
||||
callback(new Error('区间下限不能大于上限'))
|
||||
} else {
|
||||
//触发另外一个也验证
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const rules = {
|
||||
quotaBegin: [
|
||||
{ required: true, message: '请输入区间下限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
],
|
||||
quotaEnd: [
|
||||
{ required: true, message: '请输入区间上限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<table-search-card :model="queryParams" :rules="rules" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<div style="display: flex;">
|
||||
<el-form-item prop="quotaValueType">
|
||||
|
|
@ -136,6 +136,28 @@ const quotaStatusArr = ref([
|
|||
]);
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
// ✅ 自定义验证规则
|
||||
const validateQuotaRange = (rule, value, callback) => {
|
||||
const begin = Number(queryParams.value.quotaBegin)
|
||||
const end = Number(queryParams.value.quotaEnd)
|
||||
if (begin && end && begin > end) {
|
||||
callback(new Error('区间下限不能大于上限'))
|
||||
} else {
|
||||
//触发另外一个也验证
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const rules = {
|
||||
quotaBegin: [
|
||||
{ required: true, message: '请输入区间下限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
],
|
||||
quotaEnd: [
|
||||
{ required: true, message: '请输入区间上限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<table-search-card :rules="rules" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<div style="display: flex;">
|
||||
<el-form-item prop="quotaValueType">
|
||||
|
|
@ -136,6 +136,28 @@ const quotaStatusArr = ref([
|
|||
]);
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
// ✅ 自定义验证规则
|
||||
const validateQuotaRange = (rule, value, callback) => {
|
||||
const begin = Number(queryParams.value.quotaBegin)
|
||||
const end = Number(queryParams.value.quotaEnd)
|
||||
if (begin && end && begin > end) {
|
||||
callback(new Error('区间下限不能大于上限'))
|
||||
} else {
|
||||
//触发另外一个也验证
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const rules = {
|
||||
quotaBegin: [
|
||||
{ required: true, message: '请输入区间下限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
],
|
||||
quotaEnd: [
|
||||
{ required: true, message: '请输入区间上限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<table-search-card :rules="rules" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<div style="display: flex;">
|
||||
<el-form-item prop="quotaValueType">
|
||||
|
|
@ -136,6 +136,28 @@ const quotaStatusArr = ref([
|
|||
]);
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
// ✅ 自定义验证规则
|
||||
const validateQuotaRange = (rule, value, callback) => {
|
||||
const begin = Number(queryParams.value.quotaBegin)
|
||||
const end = Number(queryParams.value.quotaEnd)
|
||||
if (begin && end && begin > end) {
|
||||
callback(new Error('区间下限不能大于上限'))
|
||||
} else {
|
||||
//触发另外一个也验证
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const rules = {
|
||||
quotaBegin: [
|
||||
{ required: true, message: '请输入区间下限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
],
|
||||
quotaEnd: [
|
||||
{ required: true, message: '请输入区间上限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<table-search-card :rules="rules" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<div style="display: flex;">
|
||||
<el-form-item prop="quotaValueType">
|
||||
|
|
@ -136,6 +136,28 @@ const quotaStatusArr = ref([
|
|||
]);
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
// ✅ 自定义验证规则
|
||||
const validateQuotaRange = (rule, value, callback) => {
|
||||
const begin = Number(queryParams.value.quotaBegin)
|
||||
const end = Number(queryParams.value.quotaEnd)
|
||||
if (begin && end && begin > end) {
|
||||
callback(new Error('区间下限不能大于上限'))
|
||||
} else {
|
||||
//触发另外一个也验证
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const rules = {
|
||||
quotaBegin: [
|
||||
{ required: true, message: '请输入区间下限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
],
|
||||
quotaEnd: [
|
||||
{ required: true, message: '请输入区间上限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<table-search-card :rules="rules" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<div style="display: flex;">
|
||||
<el-form-item prop="quotaValueType">
|
||||
|
|
@ -139,6 +139,28 @@ const quotaStatusArr = ref([
|
|||
]);
|
||||
// 新增按钮操作
|
||||
const addEditStatus = ref('add'), isShowDialog = ref(false), editDataId = ref(''),modifyDate = ref({});
|
||||
// ✅ 自定义验证规则
|
||||
const validateQuotaRange = (rule, value, callback) => {
|
||||
const begin = Number(queryParams.value.quotaBegin)
|
||||
const end = Number(queryParams.value.quotaEnd)
|
||||
if (begin && end && begin > end) {
|
||||
callback(new Error('区间下限不能大于上限'))
|
||||
} else {
|
||||
//触发另外一个也验证
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const rules = {
|
||||
quotaBegin: [
|
||||
{ required: true, message: '请输入区间下限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
],
|
||||
quotaEnd: [
|
||||
{ required: true, message: '请输入区间上限', trigger: ['blur', 'change'] },
|
||||
{ validator: validateQuotaRange, trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
|
|
|||
|
|
@ -130,10 +130,10 @@
|
|||
<custom-select style="width: 550px;" v-model="formAll.timeZoneId" :options="optionsTimeZone"></custom-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('币种')" prop="currencyPattern">
|
||||
<checkbox-select style="width: 550px;" collapse-tags collapse-tags-tooltip @allSelect="changeCurrencyPattern" @change="changeCurrencyPattern" v-model="formAll.currencyPattern" :options="currencySelectArr"></checkbox-select>
|
||||
<checkbox-select style="width: 550px;" filterable collapse-tags collapse-tags-tooltip @allSelect="changeCurrencyPattern" @change="changeCurrencyPattern" v-model="formAll.currencyPattern" :options="currencySelectArr"></checkbox-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('默认币种')" prop="currencyDefault">
|
||||
<custom-select style="width: 550px;" v-model="formAll.currencyDefault" v-if="showLOding2" :options="currencySelectArr1"></custom-select>
|
||||
<custom-select style="width: 550px;" filterable v-model="formAll.currencyDefault" v-if="showLOding2" :options="currencySelectArr1"></custom-select>
|
||||
</el-form-item>
|
||||
<h3 style="font-weight: 700;">{{ t('站点收费标准') }}</h3>
|
||||
<el-form-item :label="t('开站费(U)')" >
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<el-dialog v-model="showPreview" align-center width="500px">
|
||||
<img :src="'https://zfapi.usdt7777.com/ff-api'+currentPreviewImg" class="preview-img" />
|
||||
<img :src="'/ff-api'+currentPreviewImg" class="preview-img" />
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
<el-input v-model="formAll.secretKey" placeholder="请输入密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="币种" prop="currencyCode">
|
||||
<custom-select v-model="formAll.currencyCode" :options="currencySelectArr" style="width: 100%;"></custom-select>
|
||||
<custom-select v-model="formAll.currencyCode" filterable :options="currencySelectArr" style="width: 100%;"></custom-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -191,16 +196,32 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
}]);
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
const data = reactive({
|
||||
|
|
@ -209,6 +230,7 @@ const data = reactive({
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
isAsc:'desc',
|
||||
tenantKey: "",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -180,15 +185,31 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
|
|
@ -198,6 +219,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
isAsc:'desc',
|
||||
tenantKey: "",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -180,15 +185,31 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
|
|
@ -198,6 +219,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
isAsc:'desc',
|
||||
status:1,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -180,15 +185,31 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
|
|
@ -198,6 +219,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
status:0,
|
||||
isAsc:'desc',
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -182,15 +187,31 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
|
|
@ -200,6 +221,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
isAsc:'desc',
|
||||
status:3,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -180,15 +185,31 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
|
|
@ -198,6 +219,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
isAsc:'desc',
|
||||
status:2,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" ref="searchDateRef" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form> -->
|
||||
|
|
@ -180,15 +185,31 @@ const optionsType = ref([
|
|||
{ label: proxy.t('商户账号'), value: "account" },
|
||||
{ label: proxy.t('商户状态'), value: "status" },
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'memberAccount',
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'id',
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属主站'),
|
||||
value: 'id',
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const dateRange = ref([]),operateTimeType = ref("day");
|
||||
const formatType = 'YYYY-MM-DD HH:mm:ss'; // 时间格式
|
||||
|
|
@ -198,6 +219,7 @@ queryParams: {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
timeType:1,
|
||||
searchType:'siteName',
|
||||
orderByColumn:'createTime',
|
||||
isAsc:'desc',
|
||||
tenantKey: "",
|
||||
|
|
|
|||
|
|
@ -10,13 +10,16 @@
|
|||
value-format="YYYY-MM"
|
||||
:placeholder="t('账单月份')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<!-- <table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date> -->
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
<!-- <select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form>
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="currencyType">
|
||||
<custom-select style="width: 130px;" collapse-tags collapse-tags-tooltip filterable v-model="queryParams.currencyType" :options="currencySelectArr" :placeholder="t('币种')"></custom-select>
|
||||
<custom-select style="width: 260px;" collapse-tags collapse-tags-tooltip filterable v-model="queryParams.currencyType" :options="currencySelectArr" :placeholder="t('币种')"></custom-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -25,35 +28,35 @@
|
|||
</table-search-card>
|
||||
|
||||
<el-table v-loading="loading" class="c-table-main" :data="agentList" border >
|
||||
<el-table-column :label="t('线路ID')" min-width="100" align="center" prop="siteId" >
|
||||
<el-table-column :label="t('线路ID')" fixed="left" min-width="100" align="center" prop="siteId" >
|
||||
<template #default="{row}">
|
||||
{{ row.siteId|| '--' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('线路名称')" align="center" min-width="150" >
|
||||
<el-table-column :label="t('线路名称')" fixed="left" align="center" min-width="150" >
|
||||
<template #default="{row}">
|
||||
<span v-if="row.siteName">{{ `${row.siteName}(${row.siteId})` }}</span>
|
||||
<span v-else>--</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('租户')" align="center" min-width="150" >
|
||||
<el-table-column :label="t('租户')" fixed="left" align="center" min-width="150" >
|
||||
<template #default="{row}">
|
||||
{{ row.tenantId || '--' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="t('币种')" align="center" min-width="150" prop="createTime" >
|
||||
<el-table-column :label="t('币种')" fixed="left" align="center" min-width="150" prop="createTime" >
|
||||
<template #default="{row}">
|
||||
{{ row.currencyDisplay }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('账单月份')" align="center" min-width="150" prop="month" >
|
||||
<el-table-column :label="t('账单月份')" fixed="left" align="center" min-width="150" prop="month" >
|
||||
<template #default="{row}">
|
||||
{{ row.month }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('账单总额')" align="center" min-width="150" prop="profitAmount" >
|
||||
<el-table-column :label="t('账单总额')" fixed="left" align="center" min-width="150" prop="profitAmount" >
|
||||
<template #default="{row}">
|
||||
{{ row.profitAmount }}
|
||||
</template>
|
||||
|
|
@ -147,27 +150,13 @@ const currencySelectArr = getLocalStorage('currencySelect')?.map(item => {
|
|||
};
|
||||
});
|
||||
const openView = ref(false);
|
||||
const siteList = ref(getLocalStorage('siteSelect'));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
}]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,16 @@
|
|||
<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>
|
||||
<select-input-form ref="selectInputFormRef" v-if="loadingShow" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
<!-- <select-input-form ref="selectInputFormRef" v-if="loadingShow" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form>
|
||||
</select-input-form> -->
|
||||
|
||||
<el-form-item prop="number">
|
||||
<el-input v-model="queryParams.number" placeholder="请输入编号" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="changeType">
|
||||
<custom-select style="width: 130px;" v-model="queryParams.changeType" :options="changeTypeArr" :placeholder="t('账变类型')"></custom-select>
|
||||
</el-form-item>
|
||||
|
|
@ -117,33 +124,13 @@ const loading = ref(true);
|
|||
const total = ref(0);
|
||||
|
||||
const openView = ref(false);
|
||||
const siteList = ref(getLocalStorage('siteSelect'));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
},{
|
||||
label: proxy.t('所属站点'),
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
},
|
||||
{
|
||||
label: proxy.t('编号'),
|
||||
value: 'id',
|
||||
inputType: 'number',
|
||||
},
|
||||
]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
|
||||
const changeTypeArr = ref([
|
||||
{ label: proxy.t('账单'), value: '1' },
|
||||
{ label: proxy.t('集团管理'), value: '2' },
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||
<select-input-form ref="selectInputFormRef" v-if="loadingShow" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
</select-input-form>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList2" keyName="searchType2" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<!-- <select-input-form ref="selectInputFormRef" v-if="loadingShow" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form> -->
|
||||
<el-form-item prop="siteName">
|
||||
<CustomSelect v-model="queryParams.siteName" filterable :options="siteList" :placeholder="t('请选择站点')" style="width: 260px;" />
|
||||
</el-form-item>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList2" keyName="searchType2" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item prop="orderStatus">
|
||||
<custom-select style="width: 230px;" v-model="queryParams.orderStatus" :options="orderStatusArr" :placeholder="t('全部状态')"></custom-select>
|
||||
|
|
@ -123,27 +124,12 @@ const agentList = ref([]);
|
|||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const openView = ref(false);
|
||||
const siteList = ref(getLocalStorage('siteSelect'));
|
||||
const queryParamsList = ref([{
|
||||
label: proxy.t('站点ID'),
|
||||
value: 'siteId',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value,
|
||||
}
|
||||
},{
|
||||
label: proxy.t('站点名称'),
|
||||
value: 'siteName',
|
||||
inputType: 'select',
|
||||
inputConfig:{
|
||||
options: siteList.value.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.label,
|
||||
}
|
||||
}),
|
||||
}
|
||||
}]);
|
||||
const siteList = ref(getLocalStorage('siteSelect').map(item => {
|
||||
return {
|
||||
label: `${item.label}(${item.value})`,
|
||||
value: item.label,
|
||||
}
|
||||
}));
|
||||
const queryParamsList2 = ref([{
|
||||
label: proxy.t('订单号'),
|
||||
value: 'orderId',
|
||||
|
|
|
|||
|
|
@ -238,11 +238,15 @@ function toggleExpandAll() {
|
|||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
listDeptExcludeChild(row.deptId).then(response => {
|
||||
listDept().then(response => {
|
||||
deptOptions.value = proxy.handleTree(response.data, "deptId");
|
||||
});
|
||||
// listDeptExcludeChild(row.deptId).then(response => {
|
||||
// deptOptions.value = proxy.handleTree(response.data, "deptId");
|
||||
// });
|
||||
getDept(row.deptId).then(response => {
|
||||
form.value = response.data;
|
||||
form.value.parentId = response.data.parentId == 0 ?response.data.deptId: response.data.parentId;
|
||||
open.value = true;
|
||||
title.value = "修改部门";
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||
<template #left>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
</template>
|
||||
<template #right>
|
||||
|
|
@ -428,7 +427,7 @@ function resetQuery() {
|
|||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const roleIds = row.roleId || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function () {
|
||||
proxy.$modal.confirm('是否确认删除角色名称为"' + row.roleName + '"的数据项?').then(function () {
|
||||
return delRole(roleIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
|
|
@ -649,6 +648,7 @@ const handleDetail = (row) => {
|
|||
const roleId = row.roleId || ids.value;
|
||||
const roleMenu = getRoleMenuTreeselect(roleId);
|
||||
getRole(roleId).then(response => {
|
||||
countTree.value = row.menuCount;
|
||||
form.value = response.data;
|
||||
form.value.roleSort = Number(form.value.roleSort);
|
||||
open.value = true;
|
||||
|
|
@ -673,8 +673,10 @@ const handleManage = (row) => {
|
|||
reset();
|
||||
const roleId = row.roleId || ids.value;
|
||||
const roleMenu = getRoleMenuTreeselect(roleId);
|
||||
accountLinking.value = [];
|
||||
getunallocatedUserList(roleId);
|
||||
getRole(roleId).then(response => {
|
||||
countTree.value = row.menuCount;
|
||||
form.value = response.data;
|
||||
sysUsersArr.value = response.data.sysUsers;
|
||||
form.value.roleSort = Number(form.value.roleSort);
|
||||
|
|
@ -717,6 +719,7 @@ function handleUpdate(row) {
|
|||
const roleId = row.roleId || ids.value;
|
||||
const roleMenu = getRoleMenuTreeselect(roleId);
|
||||
getRole(roleId).then(response => {
|
||||
countTree.value = row.menuCount;
|
||||
form.value = response.data;
|
||||
form.value.roleSort = Number(form.value.roleSort);
|
||||
open.value = true;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@
|
|||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams"
|
||||
@handleQuery="handleQuery">
|
||||
<select-input-form ref="selectInputFormRef" v-if="showLodings" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||
</select-input-form>
|
||||
<el-form-item label-width="0px" prop="status">
|
||||
<el-select
|
||||
|
|
@ -121,23 +120,24 @@
|
|||
{{ row.remark||'--' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后登录方式" align="center" key="nickName" prop="nickName" >
|
||||
<el-table-column label="最后登录方式" align="center" min-width="120" key="nickName" prop="nickName" >
|
||||
<template #default="{row}">
|
||||
{{ formatTime(row.loginDate)||'--' }}
|
||||
{{ row.loginType||'--' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后登录IP/时间" align="center" key="nickName" prop="nickName" >
|
||||
<el-table-column label="最后登录IP/时间" align="center" min-width="160" key="nickName" prop="nickName" >
|
||||
<template #default="{row}">
|
||||
{{ row.loginIp||'--' }}
|
||||
<div style="width: 100%;text-align: left;">{{ row.loginIp||'--' }}</div>
|
||||
<div style="width: 100%;text-align: left;"> {{ formatTime(row.loginDate)||'--' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="180" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleDetails(scope.row)" v-hasPermi="['system:user:edit']">详情</el-button>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']">修改</el-button>
|
||||
<el-button link type="primary" v-if="scope.row.status != 1" @click="handleFreeze(scope.row)" v-hasPermi="['system:user:edit']">冻结</el-button>
|
||||
<el-button link type="primary" :disabled="userName == scope.row.userName" v-if="scope.row.status != 1" @click="handleFreeze(scope.row)" v-hasPermi="['system:user:edit']">冻结</el-button>
|
||||
<el-button link type="primary" v-if="scope.row.status == 1" @click="handleUnfreeze(scope.row)" v-hasPermi="['system:user:edit']">解冻</el-button>
|
||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>
|
||||
<el-button link type="primary" :disabled="userName == scope.row.userName" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -289,8 +289,9 @@ import TableBatchOperate from '@/components/TableBatchOperate'; // 批量操
|
|||
import { h } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import MyCustomForm from "./components/MyCustomForm.vue";
|
||||
import { getLocalStorage } from "@/utils/auth";
|
||||
|
||||
|
||||
const userName = getLocalStorage('userInfo')?.userName;
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict("sys_normal_disable", "sys_user_sex");
|
||||
|
|
@ -650,13 +651,17 @@ function handleQuery() {
|
|||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
const showLodings = ref(true);
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
queryParams.value.deptId = undefined;
|
||||
proxy.$refs.deptTreeRef.setCurrentKey(null);
|
||||
// proxy.$refs.deptTreeRef.setCurrentKey(null);
|
||||
showLodings.value = false;
|
||||
nextTick(() => {
|
||||
showLodings.value = true;
|
||||
})
|
||||
handleQuery();
|
||||
};
|
||||
//判断修改类型
|
||||
|
|
@ -673,9 +678,9 @@ const handleGoogle = () => {
|
|||
};
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const userIds = row.userId || ids.value;
|
||||
const userName = row.userName || ids.value;
|
||||
modifyDate.value = row;
|
||||
proxy.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(() => {
|
||||
proxy.$modal.confirm('是否确认删除用户账户为"' + userName + '"的数据项?').then(() => {
|
||||
modifyType.value = 'handleDelete';
|
||||
dialogVisible.value = true;
|
||||
}).catch(() => {});
|
||||
|
|
@ -853,6 +858,8 @@ function handleUpdate(row) {
|
|||
roleOptions.value = response.roles;
|
||||
form.value.postIds = response.postIds;
|
||||
form.value.roleIds = response.roleIds;
|
||||
form.value.deptId = response.data.dept.deptName == null ? '无' :response.data.deptId;
|
||||
// form.value.deptId = ;
|
||||
open.value = true;
|
||||
modifyStatus.value = 'edit';
|
||||
title.value = "修改账户";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default defineConfig(({ mode, command }) => {
|
|||
// '/dev-api': {
|
||||
// // target: 'http://192.168.50.139:9080',
|
||||
// target: 'http://192.168.50.234:8081',
|
||||
// // target: 'http://192.168.50.178:8080',
|
||||
// // target: 'http://192.168.50.178:8081',
|
||||
// // target: 'http://192.168.50.11:8081',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (p) => p.replace(/^\/dev-api/, '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue