|
|
@@ -1,72 +1,66 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick">
|
|
|
-
|
|
|
- <!-- ==================== Tab 1:代理列表 ==================== -->
|
|
|
- <el-tab-pane label="代理管理" name="proxyList">
|
|
|
- <el-form :model="proxyQuery" ref="proxyQueryForm" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
- <el-form-item label="代理名称" prop="proxyName">
|
|
|
- <el-input v-model="proxyQuery.proxyName" placeholder="请输入代理名称" clearable size="small" @keyup.enter.native="loadProxyList" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="状态" prop="status">
|
|
|
- <el-select v-model="proxyQuery.status" placeholder="请选择状态" clearable size="small">
|
|
|
- <el-option label="启用" :value="1" />
|
|
|
- <el-option label="禁用" :value="0" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <inline-tenant-selector @change="handleQuery" />
|
|
|
+ <!-- ==================== 代理列表 ==================== -->
|
|
|
+ <el-form :model="proxyQuery" ref="proxyQueryForm" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
+ <el-form-item label="代理名称" prop="proxyName">
|
|
|
+ <el-input v-model="proxyQuery.proxyName" placeholder="请输入代理名称" clearable size="small" @keyup.enter.native="loadProxyList" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-select v-model="proxyQuery.status" placeholder="请选择状态" clearable size="small">
|
|
|
+ <el-option label="启用" :value="1" />
|
|
|
+ <el-option label="禁用" :value="0" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <inline-tenant-selector @change="handleQuery" />
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="loadProxyList">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetProxyQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button type="primary" icon="el-icon-plus" size="mini" @click="openProxyDialog(null)" v-hasPermi="['admin:proxy:add']">新增</el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="loadProxyList" />
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-table border v-loading="proxyLoading" :data="proxyList" @selection-change="handleProxySelection">
|
|
|
- <el-table-column type="selection" width="50" align="center" />
|
|
|
- <el-table-column label="ID" prop="proxyId" width="60" align="center" />
|
|
|
- <el-table-column label="代理名称" prop="proxyName" />
|
|
|
- <el-table-column label="代理姓名" prop="contactName" />
|
|
|
- <el-table-column label="代理联系方式" prop="contactMobile" />
|
|
|
- <el-table-column label="余额" align="center">
|
|
|
- <template slot-scope="s">¥{{ s.row.balance || 0 }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="默认分佣比例" align="center" prop="profitShareRatio">
|
|
|
- <template slot-scope="s">{{ s.row.profitShareRatio || 0 }}%</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="到期时间" align="center" prop="expireTime" />
|
|
|
- <el-table-column label="发展客户数" align="center" prop="tenantCount" />
|
|
|
- <el-table-column label="累计分成总额" align="center" prop="totalCommission">
|
|
|
- <template slot-scope="s">¥{{ s.row.totalCommission || 0 }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="剩余未提现" align="center" prop="unwithdrawnAmount">
|
|
|
- <template slot-scope="s">¥{{ s.row.unwithdrawnAmount || 0 }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="状态" align="center" prop="status">
|
|
|
- <template slot-scope="s">
|
|
|
- <el-switch v-model="s.row.status" :active-value="1" :inactive-value="0"
|
|
|
- active-text="启用" inactive-text="禁用"
|
|
|
- @change="handleStatusChange(s.row)" v-hasPermi="['admin:proxy:edit']" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="140" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="s">
|
|
|
- <el-button size="mini" type="text" icon="el-icon-edit" @click="openProxyDialog(s.row)" v-hasPermi="['admin:proxy:edit']">编辑</el-button>
|
|
|
- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteProxy(s.row)" v-hasPermi="['admin:proxy:remove']">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <pagination v-show="proxyTotal>0" :total="proxyTotal" :page.sync="proxyQuery.pageNum" :limit.sync="proxyQuery.pageSize" @pagination="loadProxyList" />
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
- </el-tabs>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetProxyQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="openProxyDialog(null)" v-hasPermi="['admin:proxy:add']">新增</el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="loadProxyList" />
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table border v-loading="proxyLoading" :data="proxyList" @selection-change="handleProxySelection">
|
|
|
+ <el-table-column type="selection" width="50" align="center" />
|
|
|
+ <el-table-column label="ID" prop="proxyId" width="60" align="center" />
|
|
|
+ <el-table-column label="代理名称" prop="proxyName" />
|
|
|
+ <el-table-column label="代理姓名" prop="contactName" />
|
|
|
+ <el-table-column label="代理联系方式" prop="contactMobile" />
|
|
|
+ <el-table-column label="余额" align="center">
|
|
|
+ <template slot-scope="s">¥{{ s.row.balance || 0 }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="默认分佣比例" align="center" prop="profitShareRatio">
|
|
|
+ <template slot-scope="s">{{ s.row.profitShareRatio || 0 }}%</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="到期时间" align="center" prop="expireTime" />
|
|
|
+ <el-table-column label="发展客户数" align="center" prop="tenantCount" />
|
|
|
+ <el-table-column label="累计分成总额" align="center" prop="totalCommission">
|
|
|
+ <template slot-scope="s">¥{{ s.row.totalCommission || 0 }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="剩余未提现" align="center" prop="unwithdrawnAmount">
|
|
|
+ <template slot-scope="s">¥{{ s.row.unwithdrawnAmount || 0 }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" align="center" prop="status">
|
|
|
+ <template slot-scope="s">
|
|
|
+ <el-switch v-model="s.row.status" :active-value="1" :inactive-value="0"
|
|
|
+ active-text="启用" inactive-text="禁用"
|
|
|
+ @change="handleStatusChange(s.row)" v-hasPermi="['admin:proxy:edit']" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="140" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="s">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="openProxyDialog(s.row)" v-hasPermi="['admin:proxy:edit']">编辑</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteProxy(s.row)" v-hasPermi="['admin:proxy:remove']">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination v-show="proxyTotal>0" :total="proxyTotal" :page.sync="proxyQuery.pageNum" :limit.sync="proxyQuery.pageSize" @pagination="loadProxyList" />
|
|
|
|
|
|
<!-- ==================== 代理编辑弹窗 ==================== -->
|
|
|
<el-dialog :title="proxyFormTitle" :visible.sync="proxyDialogVisible" width="520px" append-to-body>
|
|
|
@@ -107,7 +101,6 @@
|
|
|
<el-button type="primary" :loading="proxySubmitting" @click="submitProxyForm">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -123,7 +116,6 @@ export default {
|
|
|
components: { InlineTenantSelector },
|
|
|
data() {
|
|
|
return {
|
|
|
- activeTab: 'proxyList',
|
|
|
showSearch: true,
|
|
|
|
|
|
// ======== 代理列表 ========
|
|
|
@@ -141,11 +133,7 @@ export default {
|
|
|
proxyRules: {
|
|
|
proxyName: [{ required: true, message: '请输入代理名称', trigger: 'blur' }],
|
|
|
contactMobile: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确手机号', trigger: 'blur' }]
|
|
|
- },
|
|
|
-
|
|
|
- // ======== 价格配置(已移除) ========
|
|
|
-
|
|
|
- // ======== 租户关联(已移除) ========
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|