经纪人
This commit is contained in:
parent
000cb4a55f
commit
4b37164a63
|
@ -133,10 +133,14 @@ const mainRoutes = {
|
||||||
{ path: '/massageActivity', component: _import('bl/activity/massageActivity'), name: 'massageActivity', meta: { title: '活动列表', isTab: true } },
|
{ path: '/massageActivity', component: _import('bl/activity/massageActivity'), name: 'massageActivity', meta: { title: '活动列表', isTab: true } },
|
||||||
// 2024.06.08
|
// 2024.06.08
|
||||||
{ path: '/packageOrder', component: _import('bl/order/packageOrder'), name: 'packageOrder', meta: { title: '服务包订单', isTab: true } },
|
{ path: '/packageOrder', component: _import('bl/order/packageOrder'), name: 'packageOrder', meta: { title: '服务包订单', isTab: true } },
|
||||||
|
|
||||||
{ path: '/dlssqjl', component: _import('dlssqjl/dlssqjl'), name: 'dlssqjl', meta: { title: '代理商申请', isTab: true } },
|
{ path: '/dlssqjl', component: _import('dlssqjl/dlssqjl'), name: 'dlssqjl', meta: { title: '代理商申请', isTab: true } },
|
||||||
{ path: '/travelConf', component: _import('travelConf/index'), name: 'travelConf', meta: { title: '出行配置', isTab: true } },
|
{ path: '/travelConf', component: _import('travelConf/index'), name: 'travelConf', meta: { title: '出行配置', isTab: true } },
|
||||||
|
{ path: '/fxyConfig', component: _import('bl/commission/fxy/fxyConfig'), name: 'fxyConfig', meta: { title: '分销员设置', isTab: true } },
|
||||||
|
{ path: '/fxyApply', component: _import('bl/commission/fxy/fxyApply'), name: 'fxyApply', meta: { title: '分销员审核', isTab: true } },
|
||||||
|
{ path: '/jjrConfig', component: _import('bl/commission/jjr/jjrConfig'), name: 'jjrConfig', meta: { title: '经纪人设置', isTab: true } },
|
||||||
|
{ path: '/jjrApply', component: _import('bl/commission/jjr/jjrApply'), name: 'jjrApply', meta: { title: '经纪人审核', isTab: true } },
|
||||||
|
{ path: '/ywyConfig', component: _import('bl/commission/ywy/ywyConfig'), name: 'ywyConfig', meta: { title: '业务员设置', isTab: true } },
|
||||||
|
{ path: '/ywyApply', component: _import('bl/commission/ywy/ywyApply'), name: 'ywyApply', meta: { title: '业务员审核', isTab: true } },
|
||||||
],
|
],
|
||||||
beforeEnter(to, from, next) {
|
beforeEnter(to, from, next) {
|
||||||
let token = Vue.cookie.get('token')
|
let token = Vue.cookie.get('token')
|
||||||
|
|
|
@ -2453,6 +2453,7 @@ export default {
|
||||||
classifyId: this.classifyId,
|
classifyId: this.classifyId,
|
||||||
phone: this.phoneT,
|
phone: this.phoneT,
|
||||||
authentication: 2,
|
authentication: 2,
|
||||||
|
isBack: "1"
|
||||||
}),
|
}),
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
this.tableDataLoading = false;
|
this.tableDataLoading = false;
|
||||||
|
|
|
@ -0,0 +1,880 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- 列表 -->
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<span>状态:</span>
|
||||||
|
<el-select
|
||||||
|
clearable
|
||||||
|
v-model="status"
|
||||||
|
style="width: 150px;">
|
||||||
|
<el-option value="" label="全部"></el-option>
|
||||||
|
<el-option value="0" label="申请中"></el-option>
|
||||||
|
<el-option value="1" label="已授权"></el-option>
|
||||||
|
<el-option value="2" label="已驳回"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block">
|
||||||
|
<span>姓名:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
v-model="name">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block">
|
||||||
|
<span>电话:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入电话"
|
||||||
|
v-model="phone">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block;">
|
||||||
|
<span>申请开始时间:</span>
|
||||||
|
<el-date-picker style="width: 160px;" v-model="startTime" align="right"
|
||||||
|
type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block;">
|
||||||
|
<span>申请截止时间:</span>
|
||||||
|
<el-date-picker style="width: 160px;" v-model="endTime" align="right" type="datetime"
|
||||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleSelect"
|
||||||
|
>查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleClear"
|
||||||
|
>重置
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleEdit(0)"
|
||||||
|
>添加
|
||||||
|
</el-button>
|
||||||
|
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||||
|
<el-table-column
|
||||||
|
prop="id"
|
||||||
|
label="编号"
|
||||||
|
width="80"
|
||||||
|
fixed="left"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="userId"
|
||||||
|
label="用户ID"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="avatar" label="头像" fixed="left">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img
|
||||||
|
v-if="scope.row.avatar && scope.row.avatar != ''"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
/>
|
||||||
|
<span v-else>暂无图片</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="userName"
|
||||||
|
label="昵称"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="姓名"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="phone"
|
||||||
|
label="手机号"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="remarks"
|
||||||
|
label="备注"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="申请时间"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" fixed="left" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ showDictValue(scope.row.status, statusData) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" prop="id" width="360" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-if="scope.row.status == 0"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
style="margin: 5px"
|
||||||
|
@click="handleApply(scope.row)"
|
||||||
|
>授权
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="scope.row.status == 0"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
style="margin: 5px"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
>修改
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: center; margin-top: 10px">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="limit"
|
||||||
|
:current-page="page"
|
||||||
|
layout="total,sizes, prev, pager, next,jumper"
|
||||||
|
:total="tableData.totalCount"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加、修改 -->
|
||||||
|
<el-dialog :title="titles" :visible.sync="dialogFormVisible" center @close="closeFxy">
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">用户ID:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userId"
|
||||||
|
type="text"
|
||||||
|
placeholder="请选择用户"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
<el-button
|
||||||
|
style="margin: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="showUsersView()"
|
||||||
|
>用户列表
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px; display: flex">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">头像:</span>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
border: 1px dashed #c0ccda;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 148px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
:src="avatar"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">昵称:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userName"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">姓名:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="name"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">手机号:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right"
|
||||||
|
>备注:</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="remarks"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 用户列表弹框 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<-->
|
||||||
|
<el-dialog title="用户列表" :visible.sync="dialogUserListFormVisible" width="60%" center>
|
||||||
|
<div style="margin-left: 10px; display: inline-block;">
|
||||||
|
<span>昵称:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入昵称"
|
||||||
|
v-model="userName"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 10px; display: inline-block">
|
||||||
|
<span>手机号:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
v-model="phone"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 10px; display: inline-block">
|
||||||
|
<span>邀请码:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入邀请码"
|
||||||
|
v-model="invitationCode"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleSelectUsers">查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleClearUsers">重置
|
||||||
|
</el-button>
|
||||||
|
<el-table :data="userTableData.list" style="width: 100%">
|
||||||
|
<el-table-column prop="userId" label="用户ID"></el-table-column>
|
||||||
|
<el-table-column prop="avatar" label="头像">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img
|
||||||
|
v-if="scope.row.avatar && scope.row.avatar != ''"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
/>
|
||||||
|
<span v-else>暂无图片</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="userName" label="昵称"></el-table-column>
|
||||||
|
<el-table-column prop="phone" label="手机号"></el-table-column>
|
||||||
|
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
|
||||||
|
<el-table-column label="操作" prop="id">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
style="margin: 10px 0"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleAddUser(scope.row)"
|
||||||
|
>添加
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: center; margin-top: 10px">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleUserSizeChange"
|
||||||
|
@current-change="handleUserCurrentChange"
|
||||||
|
:page-size="userLimit"
|
||||||
|
:current-page="userPage"
|
||||||
|
layout="total, prev, pager, next,jumper"
|
||||||
|
:total="userTableData.totalCount"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<用户列表<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||||
|
<!-- 审批 -->
|
||||||
|
<el-dialog :title="titles" :visible.sync="dialogApproveFormVisible" center @close="closeFxy">
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">用户ID:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userId"
|
||||||
|
type="text"
|
||||||
|
placeholder="请选择用户"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px; display: flex">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">头像:</span>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
border: 1px dashed #c0ccda;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 148px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
:src="avatar"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">昵称:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userName"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">姓名:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="name"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">手机号:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right"
|
||||||
|
>备注:</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="remarks"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">状态:</span>
|
||||||
|
<el-radio-group v-model="status">
|
||||||
|
<el-radio :label="1">授权</el-radio>
|
||||||
|
<el-radio :label="2">驳回</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">审批意见:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="opinion"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入审批意见"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogApproveFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleApprove()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
statusData:[{id:0,value:'待授权'},{id:1,value:'已授权'},{id:2,value:'已驳回'}],
|
||||||
|
apiUrl: "",
|
||||||
|
titles: "",
|
||||||
|
tableDataLoading: false,
|
||||||
|
tableData: {},
|
||||||
|
userId: "",
|
||||||
|
avatar: "",
|
||||||
|
userName: "",
|
||||||
|
name: "",
|
||||||
|
phone: "",
|
||||||
|
remarks: "",
|
||||||
|
status: "",
|
||||||
|
opinion: "",
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
dialogFormVisible: false,
|
||||||
|
dialogApproveFormVisible: false,
|
||||||
|
dialogUserListFormVisible: false,
|
||||||
|
userTableDataLoading: false,
|
||||||
|
userPage: 1,
|
||||||
|
userLimit: 10,
|
||||||
|
userTableData:{},
|
||||||
|
invitationCode: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showDictValue(data, datas){
|
||||||
|
const dictItem = datas.find(item => data === item.id);
|
||||||
|
return dictItem ? dictItem.value : '';
|
||||||
|
},
|
||||||
|
// 获取服务包列表数据
|
||||||
|
handleSelect() {
|
||||||
|
this.tableDataLoading = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/fxyApply/findPage"),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
page: this.page,
|
||||||
|
limit: this.limit,
|
||||||
|
name: this.name,
|
||||||
|
phone: this.phone,
|
||||||
|
status: this.status,
|
||||||
|
startTime: this.startTime,
|
||||||
|
endTime: this.endTime,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.tableData = data.data;
|
||||||
|
console.log(this.tableData);
|
||||||
|
} else {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.tableDataLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleClear() {
|
||||||
|
this.name = "";
|
||||||
|
this.phone ="";
|
||||||
|
this.status = "";
|
||||||
|
this.startTime = "";
|
||||||
|
this.endTime = "";
|
||||||
|
this.page = 1;
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
//分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.limit = val;
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
//翻页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleApply(row) {
|
||||||
|
this.titles = "审批";
|
||||||
|
this.id = row.id;
|
||||||
|
this.userId = row.userId;
|
||||||
|
this.name = row.name;
|
||||||
|
this.phone = row.phone;
|
||||||
|
this.avatar = row.avatar;
|
||||||
|
this.userName = row.userName;
|
||||||
|
this.remarks = row.remarks;
|
||||||
|
this.status = 1;
|
||||||
|
this.dialogApproveFormVisible = true;
|
||||||
|
},
|
||||||
|
// 添加服务包
|
||||||
|
handleEdit(row) {
|
||||||
|
if (row != 0) {
|
||||||
|
this.titles = "修改";
|
||||||
|
this.id = row.id;
|
||||||
|
this.userId = row.userId;
|
||||||
|
this.name = row.name;
|
||||||
|
this.phone = row.phone;
|
||||||
|
this.avatar = row.avatar;
|
||||||
|
this.userName = row.userName;
|
||||||
|
this.remarks = row.remarks;
|
||||||
|
this.status = row.status;
|
||||||
|
this.opinion = row.opinion;
|
||||||
|
console.log(this.id);
|
||||||
|
} else {
|
||||||
|
this.titles = "添加";
|
||||||
|
this.id = "";
|
||||||
|
this.userId = "";
|
||||||
|
this.name = "";
|
||||||
|
this.phone = "";
|
||||||
|
this.avatar = "";
|
||||||
|
this.userName = "";
|
||||||
|
this.remarks = "";
|
||||||
|
this.status = 0;
|
||||||
|
this.opinion = "";
|
||||||
|
}
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
closeFxy(){
|
||||||
|
this.handleClear();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交添加、修改服务包
|
||||||
|
handleSubmit() {
|
||||||
|
if (this.name == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请输入姓名",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.phone == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请输入电话",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.userId == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请选择用户",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.status === "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请选择状态",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.titles == "添加") {
|
||||||
|
this.apiUrl = "commission/fxyApply/add";
|
||||||
|
} else {
|
||||||
|
this.apiUrl = "commission/fxyApply/update";
|
||||||
|
}
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(this.apiUrl),
|
||||||
|
method: "post",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.id,
|
||||||
|
userId: this.userId,
|
||||||
|
name: this.name,
|
||||||
|
phone: this.phone,
|
||||||
|
remarks: this.remarks,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.dialogFormVisible = false;
|
||||||
|
this.clearDatas();
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 提交添加、修改服务包
|
||||||
|
handleApprove() {
|
||||||
|
if (this.status == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请选择审批状态",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.status == '2') {
|
||||||
|
if (this.opinion == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请输入审批意见",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/fxyApply/approve"),
|
||||||
|
method: "post",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.id,
|
||||||
|
opinion: this.opinion,
|
||||||
|
status: this.status,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.dialogApproveFormVisible = false;
|
||||||
|
this.clearDatas();
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
clearDatas(){
|
||||||
|
this.apiUrl="";
|
||||||
|
this.tableDataLoading= false;
|
||||||
|
this.id= "";
|
||||||
|
this.name= "";
|
||||||
|
this.phone= "";
|
||||||
|
this.status= "";
|
||||||
|
this.startTime= "";
|
||||||
|
this.endTime= "";
|
||||||
|
this.page= 1;
|
||||||
|
this.limit= 10;
|
||||||
|
this.dialogFormVisible= false;
|
||||||
|
this.dialogApproveFormVisible= false;
|
||||||
|
},
|
||||||
|
|
||||||
|
closeDetail(){
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
showUsersView(){
|
||||||
|
this.handleSelectUsers();
|
||||||
|
this.dialogUserListFormVisible = true;
|
||||||
|
},
|
||||||
|
handleSelectUsers(){
|
||||||
|
this.userTableDataLoading = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/fxyApply/findUserPage"),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
userPage: this.userPage,
|
||||||
|
userLimit: this.userLimit,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.userTableData = data.data;
|
||||||
|
} else {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.userTableDataLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//分页
|
||||||
|
handleUserSizeChange(val) {
|
||||||
|
this.userLimit = val;
|
||||||
|
this.handleSelectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
//翻页
|
||||||
|
handleUserCurrentChange(val) {
|
||||||
|
this.userPage = val;
|
||||||
|
this.handleSelectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重置
|
||||||
|
handleClearUsers() {
|
||||||
|
this.userName = "";
|
||||||
|
this.phone = "";
|
||||||
|
this.invitationCode = "";
|
||||||
|
this.userPage = 1;
|
||||||
|
this.userLimit = 10;
|
||||||
|
this.handleSelectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAddUser(row){
|
||||||
|
this.userId = row.userId;
|
||||||
|
this.avatar = row.avatar;
|
||||||
|
this.userName = row.userName;
|
||||||
|
this.dialogUserListFormVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.customWidth {
|
||||||
|
width: 80% !important;
|
||||||
|
}
|
||||||
|
.el-dialog--center {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 1vh !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-tooltip__popper {
|
||||||
|
width: 200px;
|
||||||
|
padding: 10px;
|
||||||
|
color: #000 !important;
|
||||||
|
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adver_main.box a {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
height: 150px;
|
||||||
|
line-height: 150px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerManin span {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerManin img {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerbtn a {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
color: #3e8ef7 !important;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgs {
|
||||||
|
position: relative;
|
||||||
|
border-radius: 6px;
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
margin-right: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dels {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dels .el-icon-delete {
|
||||||
|
line-height: 148px;
|
||||||
|
padding-left: 58px;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgs:hover .dels {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #000;
|
||||||
|
display: block;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bqList {
|
||||||
|
padding: 4px 14px;
|
||||||
|
margin: 4px;
|
||||||
|
border: 1px solid #efefef;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delss {
|
||||||
|
display: none;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delss .el-icon-delete {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bqList:hover .delss {
|
||||||
|
display: initial;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tj {
|
||||||
|
padding: 6px !important;
|
||||||
|
margin: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,263 @@
|
||||||
|
<template>
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="220px">
|
||||||
|
<el-row>
|
||||||
|
<el-col style="background: #ff00001f;line-height: 40px;padding-left: 10px;margin-bottom: 10px;">
|
||||||
|
<span>分销员的佣金应该由该笔订单服务技师和该技师绑定的上级代理承担</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="启用分销员功能" prop="isOpen">
|
||||||
|
<el-radio-group v-model="dataForm.isOpen">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="0">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="分销员审核" prop="isApprove">
|
||||||
|
<el-radio-group v-model="dataForm.isApprove">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="0">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="分销提成方式" prop="type">
|
||||||
|
<el-radio-group v-model="dataForm.type">
|
||||||
|
<el-radio :label="1">按人员来提成</el-radio>
|
||||||
|
<el-radio :label="2">按服务项目来提成</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="一级分销返佣(%)" prop="oneRate">
|
||||||
|
<el-input-number v-model="dataForm.oneRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="二级分销返佣(%)" prop="twoRate">
|
||||||
|
<el-input-number v-model="dataForm.twoRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="技师承担(%)" prop="artificerRate">
|
||||||
|
<el-input-number v-model="dataForm.artificerRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="技师所属代理承担(%)" prop="agentRate">
|
||||||
|
<el-input-number v-model="dataForm.agentRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="邀请用户/下级返佣最高比例(%)" prop="mostRate">
|
||||||
|
<el-input-number v-model="dataForm.mostRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="邀请用户推广海报背景图" prop="userImage">
|
||||||
|
<div style="width: 148px;height: 148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
v-model="dataForm.userImage"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleUserImageSuccess"
|
||||||
|
:on-progress="onUserImageProgress"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dataForm.userImage != ''"
|
||||||
|
:src="dataForm.userImage"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="邀请分销商推广海报背景图" prop="fxyImage">
|
||||||
|
<div style="width: 148px;height: 148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
v-model="dataForm.fxyImage"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleFxyImageSuccess"
|
||||||
|
:on-progress="onFxyImageProgress"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dataForm.fxyImage != ''"
|
||||||
|
:src="dataForm.fxyImage"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="background: rgb(0,161,255,0.12);line-height: 40px;padding-left: 10px;margin-bottom: 10px;">
|
||||||
|
<span>分销员付费申请设置</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="一级分销员门槛费" prop="oneFee">
|
||||||
|
<el-input-number v-model="dataForm.oneFee" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="一级推荐提成(%)" prop="oneRecommendRate">
|
||||||
|
<el-input-number v-model="dataForm.oneRecommendRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="二级分销员门槛费" prop="twoFee">
|
||||||
|
<el-input-number v-model="dataForm.twoFee" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="二级推荐提成(%)" prop="twoRecommendRate">
|
||||||
|
<el-input-number v-model="dataForm.twoRecommendRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="background: rgb(0,161,255,0.12);line-height: 40px;padding-left: 10px;margin-bottom: 10px;">
|
||||||
|
<span>其他设置</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="分销码时效性" prop="fxmLimit">
|
||||||
|
<el-radio-group v-model="dataForm.fxmLimit">
|
||||||
|
<el-radio :label="1">永久性</el-radio>
|
||||||
|
<el-radio :label="2">限制时效天数</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="dataForm.fxmLimit == 2">
|
||||||
|
<el-form-item label="" prop="fxmLimitDays">
|
||||||
|
<el-input-number v-model="dataForm.fxmLimitDays" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">提交</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let defReqRule = (message = '不能为空') => { return { required: true, message, trigger: 'blur' } };
|
||||||
|
import {serverPaths} from '@/utils/enumData'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uploadUrl: serverPaths.uploadUrl,
|
||||||
|
tableDataLoading: false,
|
||||||
|
openValue: 1,
|
||||||
|
closeValue: 0,
|
||||||
|
dataForm: {
|
||||||
|
id: 1,
|
||||||
|
isOpen: 1,
|
||||||
|
isApprove: 1,
|
||||||
|
type: 1,
|
||||||
|
oneRate: "",
|
||||||
|
twoRate: "",
|
||||||
|
artificerRate: "",
|
||||||
|
agentRate: "",
|
||||||
|
mostRate: "",
|
||||||
|
userImage: "",
|
||||||
|
fxyImage: "",
|
||||||
|
oneFee: "",
|
||||||
|
oneRecommendRate: "",
|
||||||
|
twoFee: "",
|
||||||
|
twoRecommendRate: "",
|
||||||
|
fxmLimit: 1,
|
||||||
|
fxmLimitDays: "",
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
isOpen: [ defReqRule('请选择是否启用') ],
|
||||||
|
isApprove: [ defReqRule('请选择是否审核') ],
|
||||||
|
type: [ defReqRule('请选择提成方式') ],
|
||||||
|
oneRate: [ defReqRule('请输入一级分销返佣!') ],
|
||||||
|
twoRate: [ defReqRule('请输入二级分销返佣') ],
|
||||||
|
artificerRate: [ defReqRule('请输入技师承担') ],
|
||||||
|
agentRate: [ defReqRule('请代理商承担') ],
|
||||||
|
mostRate: [ defReqRule('请输入返佣最高比例') ],
|
||||||
|
userImage: [ defReqRule('请上传邀请用户推广海报背景图') ],
|
||||||
|
fxyImage: [ defReqRule('请上传邀请分销员推广海报背景图') ],
|
||||||
|
oneFee: [ defReqRule('请输入一级分销员门槛费') ],
|
||||||
|
oneRecommendRate: [ defReqRule('请输入一级推荐提成') ],
|
||||||
|
twoFee: [ defReqRule('请输入二级分销员门槛费') ],
|
||||||
|
twoRecommendRate: [ defReqRule('请输入二级推荐提成') ],
|
||||||
|
fxmLimit: [ defReqRule('请选择分销码时效性') ],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelect() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/fxyConfig/info"),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.dataForm.id,
|
||||||
|
}),
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
if(data.data!=null){
|
||||||
|
this.dataForm = data.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
//重置表单
|
||||||
|
Object.keys(this.dataForm).forEach(x => {
|
||||||
|
this.dataForm[x] = '';
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let saveData = Object.assign({}, this.dataForm);
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/fxyConfig/save"),
|
||||||
|
method: 'post',
|
||||||
|
params: this.$http.adornParams(saveData)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUserImageSuccess(file) {
|
||||||
|
this.dataForm.userImage = file.data;
|
||||||
|
},
|
||||||
|
onUserImageProgress(event, file, fileList) {
|
||||||
|
this.dataForm.userImage = parseInt(event.percent);
|
||||||
|
},
|
||||||
|
handleFxyImageSuccess(file) {
|
||||||
|
this.dataForm.fxyImage = file.data;
|
||||||
|
},
|
||||||
|
onFxyImageProgress(event, file, fileList) {
|
||||||
|
this.dataForm.fxyImage = parseInt(event.percent);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,179 @@
|
||||||
|
<template>
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="220px">
|
||||||
|
<el-row>
|
||||||
|
<el-col style="background: #ff00001f;line-height: 40px;padding-left: 10px;margin-bottom: 10px;">
|
||||||
|
<span>经纪人的佣金应该由该笔订单服务技师和该技师绑定的上级代理承担</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="启用经纪人功能" prop="isOpen">
|
||||||
|
<el-radio-group v-model="dataForm.isOpen">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="0">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="经纪人申请入口" prop="isApply">
|
||||||
|
<el-radio-group v-model="dataForm.isApply">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="0">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col>-->
|
||||||
|
<!-- <el-form-item label="经纪人返佣" prop="type">-->
|
||||||
|
<!-- <el-radio-group v-model="dataForm.type">-->
|
||||||
|
<!-- <el-radio :label="1">固定返佣</el-radio>-->
|
||||||
|
<!-- <el-radio :label="2">浮动比例提成</el-radio>-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="经纪人返佣比例(%)" prop="rate" v-if="dataForm.type == 1">
|
||||||
|
<el-input-number v-model="dataForm.rate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="技师承担(%)" prop="artificerRate">
|
||||||
|
<el-input-number v-model="dataForm.artificerRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="技师所属代理承担(%)" prop="agentRate">
|
||||||
|
<el-input-number v-model="dataForm.agentRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="邀请技师推广海报背景图" prop="artificerImage">
|
||||||
|
<div style="width: 148px;height: 148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
v-model="dataForm.artificerImage"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleArtificerImageSuccess"
|
||||||
|
:on-progress="onArtificerImageProgress"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dataForm.artificerImage != ''"
|
||||||
|
:src="dataForm.artificerImage"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">提交</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let defReqRule = (message = '不能为空') => { return { required: true, message, trigger: 'blur' } };
|
||||||
|
import {serverPaths} from '@/utils/enumData'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uploadUrl: serverPaths.uploadUrl,
|
||||||
|
tableDataLoading: false,
|
||||||
|
openValue: 1,
|
||||||
|
closeValue: 0,
|
||||||
|
dataForm: {
|
||||||
|
id: 1,
|
||||||
|
isOpen: 1,
|
||||||
|
isApply: 1,
|
||||||
|
type: 1,
|
||||||
|
rate: "",
|
||||||
|
artificerRate: "",
|
||||||
|
agentRate: "",
|
||||||
|
artificerImage: "",
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
isOpen: [ defReqRule('请选择是否启用') ],
|
||||||
|
isApply: [ defReqRule('请选择经纪人申请入口') ],
|
||||||
|
type: [ defReqRule('请选择经纪人返佣') ],
|
||||||
|
artificerRate: [ defReqRule('请输入技师承担') ],
|
||||||
|
agentRate: [ defReqRule('请代理商承担') ],
|
||||||
|
artificerImage: [ defReqRule('请上传邀请技师推广海报背景图') ],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelect() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/jjrConfig/info"),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.dataForm.id,
|
||||||
|
}),
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
if(data.data!=null){
|
||||||
|
this.dataForm = data.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
//重置表单
|
||||||
|
Object.keys(this.dataForm).forEach(x => {
|
||||||
|
this.dataForm[x] = '';
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if(this.dataForm.type == 1){
|
||||||
|
if(this.dataForm.rate == ''){
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请填写经纪人分佣比例",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let saveData = Object.assign({}, this.dataForm);
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/jjrConfig/save"),
|
||||||
|
method: 'post',
|
||||||
|
params: this.$http.adornParams(saveData)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleArtificerImageSuccess(file) {
|
||||||
|
this.dataForm.artificerImage = file.data;
|
||||||
|
},
|
||||||
|
onArtificerImageProgress(event, file, fileList) {
|
||||||
|
this.dataForm.artificerImage = parseInt(event.percent);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,880 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- 列表 -->
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<span>状态:</span>
|
||||||
|
<el-select
|
||||||
|
clearable
|
||||||
|
v-model="status"
|
||||||
|
style="width: 150px;">
|
||||||
|
<el-option value="" label="全部"></el-option>
|
||||||
|
<el-option value="0" label="申请中"></el-option>
|
||||||
|
<el-option value="1" label="已授权"></el-option>
|
||||||
|
<el-option value="2" label="已驳回"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block">
|
||||||
|
<span>姓名:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
v-model="name">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block">
|
||||||
|
<span>电话:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入电话"
|
||||||
|
v-model="phone">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block;">
|
||||||
|
<span>申请开始时间:</span>
|
||||||
|
<el-date-picker style="width: 160px;" v-model="startTime" align="right"
|
||||||
|
type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left:10px;display: inline-block;">
|
||||||
|
<span>申请截止时间:</span>
|
||||||
|
<el-date-picker style="width: 160px;" v-model="endTime" align="right" type="datetime"
|
||||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleSelect"
|
||||||
|
>查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleClear"
|
||||||
|
>重置
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleEdit(0)"
|
||||||
|
>添加
|
||||||
|
</el-button>
|
||||||
|
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||||
|
<el-table-column
|
||||||
|
prop="id"
|
||||||
|
label="编号"
|
||||||
|
width="80"
|
||||||
|
fixed="left"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="userId"
|
||||||
|
label="用户ID"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="avatar" label="头像" fixed="left">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img
|
||||||
|
v-if="scope.row.avatar && scope.row.avatar != ''"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
/>
|
||||||
|
<span v-else>暂无图片</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="userName"
|
||||||
|
label="昵称"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="姓名"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="phone"
|
||||||
|
label="手机号"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="remarks"
|
||||||
|
label="备注"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="申请时间"
|
||||||
|
fixed="left"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" fixed="left" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ showDictValue(scope.row.status, statusData) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" prop="id" width="360" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-if="scope.row.status == 0"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
style="margin: 5px"
|
||||||
|
@click="handleApply(scope.row)"
|
||||||
|
>授权
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="scope.row.status == 0"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
style="margin: 5px"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
>修改
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: center; margin-top: 10px">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="limit"
|
||||||
|
:current-page="page"
|
||||||
|
layout="total,sizes, prev, pager, next,jumper"
|
||||||
|
:total="tableData.totalCount"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加、修改 -->
|
||||||
|
<el-dialog :title="titles" :visible.sync="dialogFormVisible" center @close="closeFxy">
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">用户ID:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userId"
|
||||||
|
type="text"
|
||||||
|
placeholder="请选择用户"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
<el-button
|
||||||
|
style="margin: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="showUsersView()"
|
||||||
|
>用户列表
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px; display: flex">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">头像:</span>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
border: 1px dashed #c0ccda;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 148px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
:src="avatar"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">昵称:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userName"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">姓名:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="name"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">手机号:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right"
|
||||||
|
>备注:</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="remarks"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 用户列表弹框 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<-->
|
||||||
|
<el-dialog title="用户列表" :visible.sync="dialogUserListFormVisible" width="60%" center>
|
||||||
|
<div style="margin-left: 10px; display: inline-block;">
|
||||||
|
<span>昵称:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入昵称"
|
||||||
|
v-model="userName"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 10px; display: inline-block">
|
||||||
|
<span>手机号:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
v-model="phone"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-left: 10px; display: inline-block">
|
||||||
|
<span>邀请码:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入邀请码"
|
||||||
|
v-model="invitationCode"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleSelectUsers">查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleClearUsers">重置
|
||||||
|
</el-button>
|
||||||
|
<el-table :data="userTableData.list" style="width: 100%">
|
||||||
|
<el-table-column prop="userId" label="用户ID"></el-table-column>
|
||||||
|
<el-table-column prop="avatar" label="头像">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img
|
||||||
|
v-if="scope.row.avatar && scope.row.avatar != ''"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
/>
|
||||||
|
<span v-else>暂无图片</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="userName" label="昵称"></el-table-column>
|
||||||
|
<el-table-column prop="phone" label="手机号"></el-table-column>
|
||||||
|
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
|
||||||
|
<el-table-column label="操作" prop="id">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
style="margin: 10px 0"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="handleAddUser(scope.row)"
|
||||||
|
>添加
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: center; margin-top: 10px">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleUserSizeChange"
|
||||||
|
@current-change="handleUserCurrentChange"
|
||||||
|
:page-size="userLimit"
|
||||||
|
:current-page="userPage"
|
||||||
|
layout="total, prev, pager, next,jumper"
|
||||||
|
:total="userTableData.totalCount"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<用户列表<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||||
|
<!-- 审批 -->
|
||||||
|
<el-dialog :title="titles" :visible.sync="dialogApproveFormVisible" center @close="closeFxy">
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">用户ID:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userId"
|
||||||
|
type="text"
|
||||||
|
placeholder="请选择用户"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px; display: flex">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">头像:</span>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
border: 1px dashed #c0ccda;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 148px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
:src="avatar"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">昵称:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="userName"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">姓名:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="name"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">手机号:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right"
|
||||||
|
>备注:</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="remarks"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">状态:</span>
|
||||||
|
<el-radio-group v-model="status">
|
||||||
|
<el-radio :label="1">授权</el-radio>
|
||||||
|
<el-radio :label="2">驳回</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">审批意见:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="opinion"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入审批意见"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogApproveFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleApprove()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
statusData:[{id:0,value:'待授权'},{id:1,value:'已授权'},{id:2,value:'已驳回'}],
|
||||||
|
apiUrl: "",
|
||||||
|
titles: "",
|
||||||
|
tableDataLoading: false,
|
||||||
|
tableData: {},
|
||||||
|
userId: "",
|
||||||
|
avatar: "",
|
||||||
|
userName: "",
|
||||||
|
name: "",
|
||||||
|
phone: "",
|
||||||
|
remarks: "",
|
||||||
|
status: "",
|
||||||
|
opinion: "",
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
dialogFormVisible: false,
|
||||||
|
dialogApproveFormVisible: false,
|
||||||
|
dialogUserListFormVisible: false,
|
||||||
|
userTableDataLoading: false,
|
||||||
|
userPage: 1,
|
||||||
|
userLimit: 10,
|
||||||
|
userTableData:{},
|
||||||
|
invitationCode: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showDictValue(data, datas){
|
||||||
|
const dictItem = datas.find(item => data === item.id);
|
||||||
|
return dictItem ? dictItem.value : '';
|
||||||
|
},
|
||||||
|
// 获取服务包列表数据
|
||||||
|
handleSelect() {
|
||||||
|
this.tableDataLoading = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/ywyApply/findPage"),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
page: this.page,
|
||||||
|
limit: this.limit,
|
||||||
|
name: this.name,
|
||||||
|
phone: this.phone,
|
||||||
|
status: this.status,
|
||||||
|
startTime: this.startTime,
|
||||||
|
endTime: this.endTime,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.tableData = data.data;
|
||||||
|
console.log(this.tableData);
|
||||||
|
} else {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.tableDataLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleClear() {
|
||||||
|
this.name = "";
|
||||||
|
this.phone ="";
|
||||||
|
this.status = "";
|
||||||
|
this.startTime = "";
|
||||||
|
this.endTime = "";
|
||||||
|
this.page = 1;
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
//分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.limit = val;
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
//翻页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val;
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleApply(row) {
|
||||||
|
this.titles = "审批";
|
||||||
|
this.id = row.id;
|
||||||
|
this.userId = row.userId;
|
||||||
|
this.name = row.name;
|
||||||
|
this.phone = row.phone;
|
||||||
|
this.avatar = row.avatar;
|
||||||
|
this.userName = row.userName;
|
||||||
|
this.remarks = row.remarks;
|
||||||
|
this.status = 1;
|
||||||
|
this.dialogApproveFormVisible = true;
|
||||||
|
},
|
||||||
|
// 添加服务包
|
||||||
|
handleEdit(row) {
|
||||||
|
if (row != 0) {
|
||||||
|
this.titles = "修改";
|
||||||
|
this.id = row.id;
|
||||||
|
this.userId = row.userId;
|
||||||
|
this.name = row.name;
|
||||||
|
this.phone = row.phone;
|
||||||
|
this.avatar = row.avatar;
|
||||||
|
this.userName = row.userName;
|
||||||
|
this.remarks = row.remarks;
|
||||||
|
this.status = row.status;
|
||||||
|
this.opinion = row.opinion;
|
||||||
|
console.log(this.id);
|
||||||
|
} else {
|
||||||
|
this.titles = "添加";
|
||||||
|
this.id = "";
|
||||||
|
this.userId = "";
|
||||||
|
this.name = "";
|
||||||
|
this.phone = "";
|
||||||
|
this.avatar = "";
|
||||||
|
this.userName = "";
|
||||||
|
this.remarks = "";
|
||||||
|
this.status = 0;
|
||||||
|
this.opinion = "";
|
||||||
|
}
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
closeFxy(){
|
||||||
|
this.handleClear();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交添加、修改服务包
|
||||||
|
handleSubmit() {
|
||||||
|
if (this.name == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请输入姓名",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.phone == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请输入电话",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.userId == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请选择用户",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.status === "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请选择状态",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.titles == "添加") {
|
||||||
|
this.apiUrl = "commission/ywyApply/add";
|
||||||
|
} else {
|
||||||
|
this.apiUrl = "commission/ywyApply/update";
|
||||||
|
}
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(this.apiUrl),
|
||||||
|
method: "post",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.id,
|
||||||
|
userId: this.userId,
|
||||||
|
name: this.name,
|
||||||
|
phone: this.phone,
|
||||||
|
remarks: this.remarks,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.dialogFormVisible = false;
|
||||||
|
this.clearDatas();
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 提交添加、修改服务包
|
||||||
|
handleApprove() {
|
||||||
|
if (this.status == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请选择审批状态",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.status == '2') {
|
||||||
|
if (this.opinion == "") {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: "请输入审批意见",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/ywyApply/approve"),
|
||||||
|
method: "post",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.id,
|
||||||
|
opinion: this.opinion,
|
||||||
|
status: this.status,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.dialogApproveFormVisible = false;
|
||||||
|
this.clearDatas();
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
clearDatas(){
|
||||||
|
this.apiUrl="";
|
||||||
|
this.tableDataLoading= false;
|
||||||
|
this.id= "";
|
||||||
|
this.name= "";
|
||||||
|
this.phone= "";
|
||||||
|
this.status= "";
|
||||||
|
this.startTime= "";
|
||||||
|
this.endTime= "";
|
||||||
|
this.page= 1;
|
||||||
|
this.limit= 10;
|
||||||
|
this.dialogFormVisible= false;
|
||||||
|
this.dialogApproveFormVisible= false;
|
||||||
|
},
|
||||||
|
|
||||||
|
closeDetail(){
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
|
showUsersView(){
|
||||||
|
this.handleSelectUsers();
|
||||||
|
this.dialogUserListFormVisible = true;
|
||||||
|
},
|
||||||
|
handleSelectUsers(){
|
||||||
|
this.userTableDataLoading = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/ywyApply/findUserPage"),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
userPage: this.userPage,
|
||||||
|
userLimit: this.userLimit,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.userTableData = data.data;
|
||||||
|
} else {
|
||||||
|
this.$notify({
|
||||||
|
title: "提示",
|
||||||
|
duration: 1800,
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.userTableDataLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//分页
|
||||||
|
handleUserSizeChange(val) {
|
||||||
|
this.userLimit = val;
|
||||||
|
this.handleSelectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
//翻页
|
||||||
|
handleUserCurrentChange(val) {
|
||||||
|
this.userPage = val;
|
||||||
|
this.handleSelectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重置
|
||||||
|
handleClearUsers() {
|
||||||
|
this.userName = "";
|
||||||
|
this.phone = "";
|
||||||
|
this.invitationCode = "";
|
||||||
|
this.userPage = 1;
|
||||||
|
this.userLimit = 10;
|
||||||
|
this.handleSelectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAddUser(row){
|
||||||
|
this.userId = row.userId;
|
||||||
|
this.avatar = row.avatar;
|
||||||
|
this.userName = row.userName;
|
||||||
|
this.dialogUserListFormVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.customWidth {
|
||||||
|
width: 80% !important;
|
||||||
|
}
|
||||||
|
.el-dialog--center {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 1vh !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-tooltip__popper {
|
||||||
|
width: 200px;
|
||||||
|
padding: 10px;
|
||||||
|
color: #000 !important;
|
||||||
|
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adver_main.box a {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
height: 150px;
|
||||||
|
line-height: 150px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerManin span {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerManin img {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerbtn a {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
color: #3e8ef7 !important;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgs {
|
||||||
|
position: relative;
|
||||||
|
border-radius: 6px;
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
margin-right: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dels {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dels .el-icon-delete {
|
||||||
|
line-height: 148px;
|
||||||
|
padding-left: 58px;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgs:hover .dels {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #000;
|
||||||
|
display: block;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bqList {
|
||||||
|
padding: 4px 14px;
|
||||||
|
margin: 4px;
|
||||||
|
border: 1px solid #efefef;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delss {
|
||||||
|
display: none;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delss .el-icon-delete {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bqList:hover .delss {
|
||||||
|
display: initial;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tj {
|
||||||
|
padding: 6px !important;
|
||||||
|
margin: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,169 @@
|
||||||
|
<template>
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="220px">
|
||||||
|
<el-row>
|
||||||
|
<el-col style="background: #ff00001f;line-height: 40px;padding-left: 10px;margin-bottom: 10px;">
|
||||||
|
<span>业务员的佣金应该由该笔订单服务技师和该技师绑定的上级代理承担</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="启用业务员功能" prop="isOpen">
|
||||||
|
<el-radio-group v-model="dataForm.isOpen">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="0">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="业务员审核" prop="isApprove">
|
||||||
|
<el-radio-group v-model="dataForm.isApprove">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="0">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="业务员返佣(%)" prop="salesmanRate">
|
||||||
|
<el-input-number v-model="dataForm.salesmanRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="技师承担(%)" prop="artificerRate">
|
||||||
|
<el-input-number v-model="dataForm.artificerRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="技师所属代理承担(%)" prop="agentRate">
|
||||||
|
<el-input-number v-model="dataForm.agentRate" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="业务员与渠道商分佣关系" prop="type">
|
||||||
|
<el-radio-group v-model="dataForm.type">
|
||||||
|
<el-radio :label="1">无关系</el-radio>
|
||||||
|
<el-radio :label="2">抽成关系</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="邀请业务员推广海报背景图" prop="salesmanImage">
|
||||||
|
<div style="width: 148px;height: 148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
v-model="dataForm.salesmanImage"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleSalesmanImageSuccess"
|
||||||
|
:on-progress="onSalesmanImageProgress"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dataForm.salesmanImage != ''"
|
||||||
|
:src="dataForm.salesmanImage"
|
||||||
|
class="avatar"
|
||||||
|
style="border-radius: 6px; width: 148px; height: 148px"
|
||||||
|
/>
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">提交</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let defReqRule = (message = '不能为空') => { return { required: true, message, trigger: 'blur' } };
|
||||||
|
import {serverPaths} from '@/utils/enumData'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uploadUrl: serverPaths.uploadUrl,
|
||||||
|
tableDataLoading: false,
|
||||||
|
openValue: 1,
|
||||||
|
closeValue: 0,
|
||||||
|
dataForm: {
|
||||||
|
id: 1,
|
||||||
|
isOpen: 1,
|
||||||
|
isApprove: 1,
|
||||||
|
salesmanRate: "",
|
||||||
|
artificerRate: "",
|
||||||
|
agentRate: "",
|
||||||
|
type: 1,
|
||||||
|
salesmanImage: "",
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
isOpen: [ defReqRule('请选择是否启用') ],
|
||||||
|
isApprove: [ defReqRule('请选择是否审核') ],
|
||||||
|
salesmanRate: [ defReqRule('请输入业务员返佣') ],
|
||||||
|
artificerRate: [ defReqRule('请输入技师承担') ],
|
||||||
|
agentRate: [ defReqRule('请代理商承担') ],
|
||||||
|
type: [ defReqRule('业务员与渠道商分佣关系') ],
|
||||||
|
salesmanImage: [ defReqRule('请上传邀请业务员推广海报背景图') ],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelect() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/ywyConfig/info"),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
id: this.dataForm.id,
|
||||||
|
}),
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
if(data.data!=null){
|
||||||
|
this.dataForm = data.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
//重置表单
|
||||||
|
Object.keys(this.dataForm).forEach(x => {
|
||||||
|
this.dataForm[x] = '';
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let saveData = Object.assign({}, this.dataForm);
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("commission/ywyConfig/save"),
|
||||||
|
method: 'post',
|
||||||
|
params: this.$http.adornParams(saveData)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelect();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSalesmanImageSuccess(file) {
|
||||||
|
this.dataForm.salesmanImage = file.data;
|
||||||
|
},
|
||||||
|
onSalesmanImageProgress(event, file, fileList) {
|
||||||
|
this.dataForm.salesmanImage = parseInt(event.percent);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -46,11 +46,11 @@
|
||||||
src="https://pw.xianmxkj.com/file/uploadPath/2022/01/19/0753211f78d718d44ee6372e33eae9ee.mp3" ref='audio'
|
src="https://pw.xianmxkj.com/file/uploadPath/2022/01/19/0753211f78d718d44ee6372e33eae9ee.mp3" ref='audio'
|
||||||
controls hidden></audio> -->
|
controls hidden></audio> -->
|
||||||
<audio id="audio1" src="../../static/img/01beb0bc15549b9aa4d18027a7751bae.mp3" ref='audio' controls
|
<audio id="audio1" src="../../static/img/01beb0bc15549b9aa4d18027a7751bae.mp3" ref='audio' controls
|
||||||
hidden></audio>
|
hidden></audio>
|
||||||
<el-dropdown :show-timeout="0" placement="bottom">
|
<el-dropdown :show-timeout="0" placement="bottom">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<span style="margin-right: 10px;">{{ username ? username : '' }} <span
|
<span style="margin-right: 10px;">{{ username ? username : '' }} <span
|
||||||
v-if="username">,欢迎您登录</span></span>
|
v-if="username">,欢迎您登录</span></span>
|
||||||
<img src="~@/assets/img/avatar.png" :alt="userName">
|
<img src="~@/assets/img/avatar.png" :alt="userName">
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
@ -171,8 +171,8 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({})
|
params: this.$http.adornParams({})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
let returnData = data.user;
|
let returnData = data.user;
|
||||||
// if (returnData == null) {
|
// if (returnData == null) {
|
||||||
// this.$cookie.set('token', '')
|
// this.$cookie.set('token', '')
|
||||||
|
@ -201,8 +201,8 @@ export default {
|
||||||
'storeId': this.storeId
|
'storeId': this.storeId
|
||||||
})
|
})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
let returnData = data.data;
|
let returnData = data.data;
|
||||||
this.chatNum = returnData
|
this.chatNum = returnData
|
||||||
if (this.chatNum == 0) {
|
if (this.chatNum == 0) {
|
||||||
|
@ -251,7 +251,7 @@ export default {
|
||||||
notification() {
|
notification() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (!("Notification" in window)) {
|
if (!("Notification" in window)) {
|
||||||
console.log("浏览器不支持消息通知");
|
// console.log("浏览器不支持消息通知");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Notification.requestPermission(function (permission) { });
|
Notification.requestPermission(function (permission) { });
|
||||||
|
@ -265,8 +265,8 @@ export default {
|
||||||
'storeId': this.storeId
|
'storeId': this.storeId
|
||||||
})
|
})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
let returnData = data.data;
|
let returnData = data.data;
|
||||||
if (data.data > 0) {
|
if (data.data > 0) {
|
||||||
this.$notify.info({
|
this.$notify.info({
|
||||||
|
@ -288,8 +288,8 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({})
|
params: this.$http.adornParams({})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
this.$cookie.set('numberDrz', data.data)
|
this.$cookie.set('numberDrz', data.data)
|
||||||
}
|
}
|
||||||
|
@ -305,8 +305,8 @@ export default {
|
||||||
'state': 7,
|
'state': 7,
|
||||||
})
|
})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
this.$cookie.set('numberDts', data.data)
|
this.$cookie.set('numberDts', data.data)
|
||||||
}
|
}
|
||||||
|
@ -321,8 +321,8 @@ export default {
|
||||||
'state': 9,
|
'state': 9,
|
||||||
})
|
})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
this.$cookie.set('numberJjqz', data.data)
|
this.$cookie.set('numberJjqz', data.data)
|
||||||
}
|
}
|
||||||
|
@ -335,8 +335,8 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({})
|
params: this.$http.adornParams({})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
this.$cookie.set('numberDsh', data.data)
|
this.$cookie.set('numberDsh', data.data)
|
||||||
}
|
}
|
||||||
|
@ -350,8 +350,8 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({})
|
params: this.$http.adornParams({})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
this.$cookie.set('numberJg', data.data)
|
this.$cookie.set('numberJg', data.data)
|
||||||
if (data.data > 0) {
|
if (data.data > 0) {
|
||||||
|
@ -389,8 +389,8 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({})
|
params: this.$http.adornParams({})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
this.$cookie.set('numberCs', data.data)
|
this.$cookie.set('numberCs', data.data)
|
||||||
|
|
||||||
|
@ -437,8 +437,8 @@ export default {
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
})
|
})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data.data >= 0) {
|
if (data.data >= 0) {
|
||||||
if (data.data > 0) {
|
if (data.data > 0) {
|
||||||
if (this.errCount2 != data.data) {
|
if (this.errCount2 != data.data) {
|
||||||
|
@ -477,7 +477,7 @@ export default {
|
||||||
aplayAudio() {
|
aplayAudio() {
|
||||||
const audio = document.getElementById('audio1');
|
const audio = document.getElementById('audio1');
|
||||||
audio.play();
|
audio.play();
|
||||||
console.log('订单语音提示');
|
// console.log('订单语音提示');
|
||||||
},
|
},
|
||||||
// aplayAudio1() {
|
// aplayAudio1() {
|
||||||
// const audio = document.getElementById('audio')
|
// const audio = document.getElementById('audio')
|
||||||
|
@ -490,8 +490,8 @@ export default {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({})
|
params: this.$http.adornParams({})
|
||||||
}).then(({
|
}).then(({
|
||||||
data
|
data
|
||||||
}) => {
|
}) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
let returnData = data.data;
|
let returnData = data.data;
|
||||||
//将【开关配置】中id为394"是否开启打车费扣提成"隐藏
|
//将【开关配置】中id为394"是否开启打车费扣提成"隐藏
|
||||||
|
@ -500,7 +500,7 @@ export default {
|
||||||
let ringOrderArr = returnData.filter((item) => item.id == 433);
|
let ringOrderArr = returnData.filter((item) => item.id == 433);
|
||||||
if (ringOrderArr) window.localStorage.setItem("ringOrderId", ringOrderArr[0].value);
|
if (ringOrderArr) window.localStorage.setItem("ringOrderId", ringOrderArr[0].value);
|
||||||
}
|
}
|
||||||
console.log(returnData);
|
// console.log(returnData);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -522,12 +522,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.chatNum = setInterval(() => {
|
|
||||||
// this.chatSelect()
|
|
||||||
// }, 6000)
|
|
||||||
this.userId = window.localStorage.getItem('userId');
|
this.userId = window.localStorage.getItem('userId');
|
||||||
this.ringOrderId = window.localStorage.getItem('ringOrderId');
|
this.ringOrderId = window.localStorage.getItem('ringOrderId');
|
||||||
|
|
||||||
|
//生产需替换
|
||||||
// this.chatNumJl = setInterval(() => {
|
// this.chatNumJl = setInterval(() => {
|
||||||
// this.dataSelect()
|
// this.dataSelect()
|
||||||
// }, 6000)
|
// }, 6000)
|
||||||
|
@ -537,10 +535,11 @@ export default {
|
||||||
// this.chatNumJjqz = setInterval(() => {
|
// this.chatNumJjqz = setInterval(() => {
|
||||||
// this.dataSelectJjqz()
|
// this.dataSelectJjqz()
|
||||||
// }, 6000)
|
// }, 6000)
|
||||||
|
//
|
||||||
// this.chatNumYh = setInterval(() => {
|
// this.chatNumYh = setInterval(() => {
|
||||||
// this.dataSelectYh()
|
// this.dataSelectYh()
|
||||||
// }, 6000)
|
// }, 6000)
|
||||||
// 目前的逻辑是只有客服账号才有订单相关(新订单、警告订单、超时订单)的提示
|
// // 目前的逻辑是只有客服账号才有订单相关(新订单、警告订单、超时订单)的提示
|
||||||
// if ((this.userId && this.ringOrderId) && (this.userId == this.ringOrderId)) {
|
// if ((this.userId && this.ringOrderId) && (this.userId == this.ringOrderId)) {
|
||||||
// this.chatNumJg = setInterval(() => {
|
// this.chatNumJg = setInterval(() => {
|
||||||
// this.dataSelectJg()
|
// this.dataSelectJg()
|
||||||
|
@ -554,8 +553,8 @@ export default {
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
//生产需替换
|
||||||
// clearInterval(this.chatNum)
|
// clearInterval(this.chatNum)
|
||||||
|
|
||||||
// clearInterval(this.chatNumJl);
|
// clearInterval(this.chatNumJl);
|
||||||
// clearInterval(this.chatNumQy);
|
// clearInterval(this.chatNumQy);
|
||||||
// clearInterval(this.chatNumJjqz);
|
// clearInterval(this.chatNumJjqz);
|
||||||
|
|
|
@ -172,19 +172,31 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="border-bt">渠道来源</th>
|
<th>渠道来源</th>
|
||||||
<td class="border-bt">
|
<td>
|
||||||
{{ tableData.platform }}
|
{{ tableData.platform }}
|
||||||
</td>
|
</td>
|
||||||
<th class="border-bt">开户行地址</th>
|
<th>开户行地址</th>
|
||||||
<td class="border-bt">
|
<td>
|
||||||
{{ tableData.bankCardAddress }}
|
{{ tableData.bankCardAddress }}
|
||||||
</td>
|
</td>
|
||||||
<th class="border-bt">公众号openId</th>
|
<th>公众号openId</th>
|
||||||
<td class="border-bt border-rt">
|
<td>
|
||||||
{{ tableData.wxOpenId }}
|
{{ tableData.wxOpenId }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="border-bt">经纪人</th>
|
||||||
|
<td class="border-bt">{{ tableData.jjrName }}
|
||||||
|
<el-button size="mini" :disabled="!isAuth('userList:updateXx')"
|
||||||
|
style="color: #4f9dec;background: #fff;border: none;"
|
||||||
|
@click="updataJjr(tableData)">修改</el-button>
|
||||||
|
</td>
|
||||||
|
<th class="border-bt"></th>
|
||||||
|
<td class="border-bt"></td>
|
||||||
|
<th class="border-bt"></th>
|
||||||
|
<td class="border-bt border-rt"></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1481,6 +1493,14 @@
|
||||||
<el-button @click="dialogFormVisible2 = false">取 消</el-button>
|
<el-button @click="dialogFormVisible2 = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="StairNoticeToXx()">确 定</el-button>
|
<el-button type="primary" @click="StairNoticeToXx()">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 修改经纪人 -->
|
||||||
|
<el-dialog title="修改经纪人" :visible.sync="dialogFormVisible3" center>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 聊天内容 -->
|
<!-- 聊天内容 -->
|
||||||
<el-dialog title="聊天内容" :visible.sync="dialogFormVisible4" center>
|
<el-dialog title="聊天内容" :visible.sync="dialogFormVisible4" center>
|
||||||
|
@ -2111,6 +2131,7 @@ import { serverPaths } from '@/utils/enumData'
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
dialogFormVisible1: false,
|
dialogFormVisible1: false,
|
||||||
dialogFormVisible2: false,
|
dialogFormVisible2: false,
|
||||||
|
dialogFormVisible3: false,
|
||||||
dialogFormVisible4: false,
|
dialogFormVisible4: false,
|
||||||
dialogFormVisible5: false,
|
dialogFormVisible5: false,
|
||||||
tableDataLoading: true,
|
tableDataLoading: true,
|
||||||
|
@ -4160,6 +4181,10 @@ import { serverPaths } from '@/utils/enumData'
|
||||||
this.age = row.age;
|
this.age = row.age;
|
||||||
this.dialogFormVisible2 = true;
|
this.dialogFormVisible2 = true;
|
||||||
},
|
},
|
||||||
|
// 修改信息弹框
|
||||||
|
updataJjr(row) {
|
||||||
|
this.dialogFormVisible3 = true;
|
||||||
|
},
|
||||||
ageChange2(userId, creditScore) {
|
ageChange2(userId, creditScore) {
|
||||||
this.type = "";
|
this.type = "";
|
||||||
this.age = "";
|
this.age = "";
|
||||||
|
|
Loading…
Reference in New Issue