This commit is contained in:
tx 2024-10-18 18:03:20 +08:00
parent 3bd5c70108
commit 8c03d543b8
3 changed files with 117 additions and 103 deletions

View File

@ -119,9 +119,9 @@
<el-form-item label="配件名称" prop="name">
<el-input v-model="form.name" placeholder="请输入配件名称" />
</el-form-item>
<el-form-item label="车型id" prop="modelId">
<!-- `<el-form-item label="车型id" prop="modelId">
<el-input v-model="form.modelId" placeholder="请输入车型id" />
</el-form-item>
</el-form-item>` -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

View File

@ -2,33 +2,28 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="渠道名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入渠道名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.name" placeholder="请输入渠道名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<!-- <el-form-item label="账户类型" prop="accountType">-->
<!-- <el-select v-model="queryParams.accountType" placeholder="请选择对应账户类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.account_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="服务费收取类型" prop="serviceType" label-width="8em">-->
<!-- <el-select v-model="queryParams.serviceType" placeholder="请选择服务费收取类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.withdraw_service_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="账户类型" prop="accountType">-->
<!-- <el-select v-model="queryParams.accountType" placeholder="请选择对应账户类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.account_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="服务费收取类型" prop="serviceType" label-width="8em">-->
<!-- <el-select v-model="queryParams.serviceType" placeholder="请选择服务费收取类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.withdraw_service_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="是否启用" prop="enabled">
<el-radio-group v-model="queryParams.enabled">
<el-radio-button :label="true"></el-radio-button>
@ -43,127 +38,116 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['ss:channelWithdraw:export']"
>导出</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['ss:channelWithdraw:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="channelWithdrawList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table v-loading="loading" :data="channelWithdrawList" @selection-change="handleSelectionChange"
:default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<template v-for="column of showColumns">
<el-table-column
:key="column.key"
:label="column.label"
:prop="column.key"
:align="column.align"
:min-width="column.minWidth"
:sort-orders="orderSorts"
:sortable="column.sortable"
:show-overflow-tooltip="column.overflow"
:width="column.width"
>
<el-table-column :key="column.key" :label="column.label" :prop="column.key" :align="column.align"
:min-width="column.minWidth" :sort-orders="orderSorts" :sortable="column.sortable"
:show-overflow-tooltip="column.overflow" :width="column.width">
<template slot-scope="d">
<template v-if="column.key === 'channelId'">
{{d.row[column.key]}}
{{ d.row[column.key] }}
</template>
<template v-else-if="column.key === 'accountType'">
<dict-tag :options="dict.type.account_type" :value="d.row[column.key]"/>
<dict-tag :options="dict.type.account_type" :value="d.row[column.key]" />
</template>
<template v-else-if="column.key === 'enabled'">
<el-switch v-model="d.row.enabled" @change="(nv ) =>{onChangeEnabled(d.row, nv)}"/>
<el-switch v-model="d.row.enabled" @change="(nv) => { onChangeEnabled(d.row, nv) }" />
</template>
<template v-else-if="column.key === 'serviceType'">
<dict-tag :options="dict.type.withdraw_service_type" :value="d.row.serviceType"/>
<dict-tag :options="dict.type.withdraw_service_type" :value="d.row.serviceType" />
</template>
<template v-else-if="column.key === 'serviceRate'">
{{d.row.serviceRate | money}} {{withdrawServiceUnit(d.row.serviceType)}}
{{ d.row.serviceRate | money }} {{ withdrawServiceUnit(d.row.serviceType) }}
</template>
<template v-else-if="column.key === 'costRate'">
{{d.row.costRate | money}} %
{{ d.row.costRate | money }} %
</template>
<template v-else-if="column.key === 'picture'">
<image-preview :src="d.row.picture" :width="32" :height="32"/>
<image-preview :src="d.row.picture" :width="32" :height="32" />
</template>
<template v-else-if="column.key === 'minAmount' || column.key === 'maxAmount'">
{{d.row[column.key] | money}}
{{ d.row[column.key] | money }}
</template>
<template v-else>
{{d.row[column.key]}}
{{ d.row[column.key] }}
</template>
</template>
</el-table-column>
</template>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['ss:channelWithdraw:edit']"
>修改</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ss:channelWithdraw:edit']">修改</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改提现渠道对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<form-col :span="span * 2" label="图片" prop="picture">
<image-upload v-model="form.picture" :limit="1"/>
<image-upload v-model="form.picture" :limit="1" />
</form-col>
<form-col :span="span" label="渠道名称" prop="name">
<el-input v-model="form.name" placeholder="请输入渠道名称" />
</form-col>
<form-col :span="span" label="账户类型" prop="accountType">
<el-select v-model="form.accountType" style="width: 100%">
<el-option
v-for="dict in dict.type.account_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<el-option v-for="dict in dict.type.account_type" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</form-col>
<!-- <form-col :span="span * 2" label="服务费收取方式" label-width="9em" prop="serviceType">-->
<!-- <el-radio-group v-model="form.serviceType">-->
<!-- <el-radio v-for="dict in dict.type.withdraw_service_type" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </form-col>-->
<el-form-item label="提现手续费类型" label-width="120" prop="handlingChargeType">
<el-radio-group v-model="form.handlingChargeType">
<el-radio v-for="dict in dict.type.rl_handling_charge_type" :key="dict.value"
:label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-col :span="12" v-if="form.handlingChargeType == '1'">
<el-form-item label="比例(‰)" >
<el-input v-model="form.withdrawHandlingCharge" placeholder="请输入手续费" />
</el-form-item>
</el-col>
<el-col :span="12" v-else>
<el-form-item label="每笔(元)" >
<el-input v-model="form.withdrawHandlingCharge" placeholder="请输入手续费" />
</el-form-item>
</el-col>
<!-- <form-col :span="span * 2" label="服务费收取方式" label-width="9em" prop="serviceType">-->
<!-- <el-radio-group v-model="form.serviceType">-->
<!-- <el-radio v-for="dict in dict.type.withdraw_service_type" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </form-col>-->
<form-col :span="span" label="手续费" prop="serviceRate">
<el-input v-model.number="form.serviceRate" :min="0" type="number">
<template #suffix>
{{withdrawServiceUnit(form.withdrawType)}}
{{ withdrawServiceUnit(form.withdrawType) }}
</template>
</el-input>
</form-col>
<form-col :span="span" label="渠道成本" prop="costRate">
<el-input v-model.number="form.costRate" placeholder="请输入充值成本率" :min="0" type="number">
<el-input v-model.number="form.costRate" placeholder="请输入充值成本率" :min="0" type="number">
<template #suffix>%</template>
</el-input>
</form-col>
<form-col :span="span" label="单笔最低" prop="minAmount">
<el-input v-model.number="form.minAmount" placeholder="请输入单笔最低提现金额" :min="0" type="number">
<el-input v-model.number="form.minAmount" placeholder="请输入单笔最低提现金额" :min="0" type="number">
<template #suffix></template>
</el-input>
</form-col>
<form-col :span="span" label="单笔最高" prop="maxAmount">
<el-input v-model.number="form.maxAmount" placeholder="请输入单笔最高提现金额" :min="0" type="number">
<el-input v-model.number="form.maxAmount" placeholder="请输入单笔最高提现金额" :min="0" type="number">
<template #suffix></template>
</el-input>
</form-col>
@ -189,22 +173,22 @@ const defaultSort = {
export default {
name: "ChannelWithdraw",
mixins: [$showColumns, $withdrawServiceType],
dicts: ['account_type', 'withdraw_service_type'],
dicts: ['account_type', 'withdraw_service_type','rl_handling_charge_type'],
data() {
return {
span: 12,
//
columns: [
{key: 'channelId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'name', visible: true, label: '渠道名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'picture', visible: true, label: '图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'enabled', visible: true, label: '是否启用', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{ key: 'channelId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80" },
{ key: 'name', visible: true, label: '渠道名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null },
{ key: 'picture', visible: true, label: '图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100" },
{ key: 'enabled', visible: true, label: '是否启用', minWidth: null, sortable: true, overflow: false, align: 'center', width: null },
// {key: 'accountType', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'serviceType', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'serviceRate', visible: true, label: '手续费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'costRate', visible: true, label: '渠道成本', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'minAmount', visible: true, label: '单笔最低', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'maxAmount', visible: true, label: '单笔最高', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{ key: 'serviceRate', visible: true, label: '手续费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null },
{ key: 'costRate', visible: true, label: '渠道成本', minWidth: null, sortable: true, overflow: false, align: 'center', width: null },
{ key: 'minAmount', visible: true, label: '单笔最低', minWidth: null, sortable: true, overflow: false, align: 'center', width: null },
{ key: 'maxAmount', visible: true, label: '单笔最高', minWidth: null, sortable: true, overflow: false, align: 'center', width: null },
],
//
orderSorts: ['ascending', 'descending', null],
@ -266,10 +250,11 @@ export default {
},
created() {
this.getList();
console.log(this.dict.type,'dict.typedict.type');
},
methods: {
onChangeEnabled(row, enabled) {
updateChannelWithdraw({channelId: row.channelId, enabled: enabled}).catch(() => {
updateChannelWithdraw({ channelId: row.channelId, enabled: enabled }).catch(() => {
row.enabled = !enabled;
})
},
@ -324,7 +309,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.channelId)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
@ -366,12 +351,12 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const channelIds = row.channelId || this.ids;
this.$modal.confirm('是否确认删除提现渠道编号为"' + channelIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除提现渠道编号为"' + channelIds + '"的数据项?').then(function () {
return delChannelWithdraw(channelIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {

View File

@ -181,16 +181,21 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="代理城市" prop="cityId">
<el-select v-model="form.cityId" placeholder="请选择代理城市">
<el-form-item label="代理商" prop="agentId">
<el-select v-model="form.agentId" filterable placeholder="请选择">
<el-option v-for="item in agentList" :key="item.agentId" :label="item.name+' ' +item.contact" :value="item.agentId">
</el-option>
</el-select>
<!-- <el-select v-model="form.cityId" placeholder="请选择代理城市">
<el-option
v-for="item in cityOptions"
:key="item.cityId"
:label="item.name"
:value="item.cityId"
></el-option>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="角色">
@ -273,6 +278,7 @@ import { updateExt } from "@/api/rl/ext";
import { getToken } from "@/utils/auth";
import { listCity } from "@/api/rl/common";
import Treeselect from "@riophae/vue-treeselect";
import { listAgent, getAgent, delAgent, addAgent, updateAgent } from "@/api/rl/agent";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
@ -360,6 +366,7 @@ export default {
value: '04',
label: '调度员'
}],
agentList:[],
//
rules: {
dividendProportion: [
@ -399,13 +406,35 @@ export default {
},
created() {
this.getList();
setTimeout(() => {
console.log(this.dicts,'dictsdicts');
}, 200);
// this.getDeptTree();
this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.msg;
});
this.getListCity();
this.getAgentList()
},
methods: {
getAgentList() {
let data = {
pageNum: 1,
pageSize: 30,
}
listAgent(this.addDateRange(data)).then(response => {
console.log(response,'responseresponseresponse');
this.agentList=response.rows
// this.options = response.rows.map(item => ({
// value: item.userId,
// label: item.realName+' ' +item.phonenumber
// }));
console.log( this.options,' this.options this.options');
});
},
formatDividendProportion(row) {
let dividendProportion = row.dividendProportion;
if (dividendProportion !== null && dividendProportion !== undefined) {