提现免审核额度
This commit is contained in:
parent
9ad781a702
commit
991c3fa3fa
|
@ -58,3 +58,20 @@ export function refreshCache() {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据参数键名查询参数值
|
||||||
|
export function getConfigKeys(configKeys) {
|
||||||
|
return request({
|
||||||
|
url: '/system/config/configKeys/' + configKeys,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新参数值
|
||||||
|
export function batchUpdateConfigValue(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/config/batchUpdateValue',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
45
src/components/Business/Config/ConfigDialog.vue
Normal file
45
src/components/Business/Config/ConfigDialog.vue
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog :title="title" :visible="show" :width="width">
|
||||||
|
<config-form ref="form" :keys="keys" @success="cancel" @cancel="cancel"/>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import ConfigForm from '@/components/Business/Config/ConfigForm.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ConfigDialog",
|
||||||
|
components: { ConfigForm },
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "配置",
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: "500px"
|
||||||
|
},
|
||||||
|
keys: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cancel() {
|
||||||
|
this.$emit("update:show", false);
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.form.onSubmit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
61
src/components/Business/Config/ConfigForm.vue
Normal file
61
src/components/Business/Config/ConfigForm.vue
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
<template>
|
||||||
|
<el-form ref="form" label-width="120px">
|
||||||
|
<el-form-item v-for="item of list" :label="item.configName" :label-width="`${item.configName.length + 1}em`" :key="item.configId">
|
||||||
|
<el-input v-model="item.configValue" placeholder="请输入"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { batchUpdateConfigValue, getConfigKeys } from '@/api/system/config'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ConfigForm',
|
||||||
|
props: {
|
||||||
|
keys: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
loading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getConfigKeys(this.keys).then(res => {
|
||||||
|
let data = res.data;
|
||||||
|
let list = [];
|
||||||
|
for (let i = 0; i < this.keys.length; i ++) {
|
||||||
|
let config = data.find(item => item.configKey === this.keys[i]);
|
||||||
|
if (config != null) {
|
||||||
|
list.push(config);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.list = list;
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
batchUpdateConfigValue(this.list).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$message.success('修改成功')
|
||||||
|
this.$emit('success');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
this.$emit('cancel');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -74,6 +74,16 @@
|
||||||
<!-- v-hasPermi="['ss:channelWithdraw:remove']"-->
|
<!-- v-hasPermi="['ss:channelWithdraw:remove']"-->
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-setting"
|
||||||
|
size="mini"
|
||||||
|
@click="handleConfig"
|
||||||
|
v-hasPermi="['ss:channelWithdraw:config']"
|
||||||
|
>提现配置</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
|
@ -212,6 +222,14 @@
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--提现配置对话框-->
|
||||||
|
<config-dialog
|
||||||
|
:show.sync="showConfig"
|
||||||
|
title="提现配置"
|
||||||
|
:keys="['noverify.withdraw.single', 'daily.withdraw.amount', 'daily.withdraw.count']"
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -219,6 +237,7 @@
|
||||||
import { listChannelWithdraw, getChannelWithdraw, delChannelWithdraw, addChannelWithdraw, updateChannelWithdraw } from "@/api/ss/channelWithdraw";
|
import { listChannelWithdraw, getChannelWithdraw, delChannelWithdraw, addChannelWithdraw, updateChannelWithdraw } from "@/api/ss/channelWithdraw";
|
||||||
import { $showColumns, $withdrawServiceType } from '@/utils/mixins'
|
import { $showColumns, $withdrawServiceType } from '@/utils/mixins'
|
||||||
import { updateBill } from '@/api/system/withdraw'
|
import { updateBill } from '@/api/system/withdraw'
|
||||||
|
import ConfigDialog from '@/components/Business/Config/ConfigDialog.vue'
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
|
@ -228,10 +247,12 @@ const defaultSort = {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ChannelWithdraw",
|
name: "ChannelWithdraw",
|
||||||
|
components: { ConfigDialog },
|
||||||
mixins: [$showColumns, $withdrawServiceType],
|
mixins: [$showColumns, $withdrawServiceType],
|
||||||
dicts: ['account_type', 'withdraw_service_type'],
|
dicts: ['account_type', 'withdraw_service_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showConfig: false,
|
||||||
span: 12,
|
span: 12,
|
||||||
// 字段列表
|
// 字段列表
|
||||||
columns: [
|
columns: [
|
||||||
|
@ -308,6 +329,9 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleConfig() {
|
||||||
|
this.showConfig = true;
|
||||||
|
},
|
||||||
onChangeEnabled(row, enabled) {
|
onChangeEnabled(row, enabled) {
|
||||||
updateChannelWithdraw({channelId: row.channelId, enabled: enabled}).catch(() => {
|
updateChannelWithdraw({channelId: row.channelId, enabled: enabled}).catch(() => {
|
||||||
row.enabled = !enabled;
|
row.enabled = !enabled;
|
||||||
|
|
|
@ -114,6 +114,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="权限" align="center" prop="permission"/>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
@ -159,6 +160,9 @@
|
||||||
<el-form-item label="参数键值" prop="configValue">
|
<el-form-item label="参数键值" prop="configValue">
|
||||||
<el-input v-model="form.configValue" placeholder="请输入参数键值" />
|
<el-input v-model="form.configValue" placeholder="请输入参数键值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="修改权限" prop="permission">
|
||||||
|
<el-input v-model="form.permission" placeholder="请输入修改所需的权限" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="系统内置" prop="configType">
|
<el-form-item label="系统内置" prop="configType">
|
||||||
<el-radio-group v-model="form.configType">
|
<el-radio-group v-model="form.configType">
|
||||||
<el-radio
|
<el-radio
|
||||||
|
@ -259,7 +263,8 @@ export default {
|
||||||
configKey: undefined,
|
configKey: undefined,
|
||||||
configValue: undefined,
|
configValue: undefined,
|
||||||
configType: "Y",
|
configType: "Y",
|
||||||
remark: undefined
|
remark: undefined,
|
||||||
|
permission: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -320,11 +325,11 @@ export default {
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const configIds = row.configId || this.ids;
|
const configIds = row.configId || this.ids;
|
||||||
this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() {
|
||||||
return delConfig(configIds);
|
return delConfig(configIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user