盛安新版本问题优化-渠道商

This commit is contained in:
曹磊 2024-12-03 10:20:11 +08:00
parent dc89a872f8
commit 9fc39c40bc
7 changed files with 2871 additions and 127 deletions

View File

@ -145,6 +145,12 @@ const mainRoutes = {
{ path: '/jjrData', component: _import('bl/commission/jjr/jjrData'), name: 'jjrData', 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 } },
{ path: '/qdsConfig', component: _import('bl/commission/qds/qdsConfig'), name: 'qdsConfig', meta: { title: '渠道商设置', isTab: true } },
{ path: '/qdsApply', component: _import('bl/commission/qds/qdsApply'), name: 'qdsApply', meta: { title: '渠道商审核', isTab: true } },
{ path: '/qdsCode', component: _import('bl/commission/qds/qdsCode'), name: 'qdsCode', meta: { title: '渠道码管理', isTab: true } },
{ path: '/qdsData', component: _import('bl/commission/qds/qdsData'), name: 'qdsData', meta: { title: '渠道码统计', isTab: true } },
{ path: '/qdsLm', component: _import('bl/commission/qds/qdsLm'), name: 'qdsLm', meta: { title: '渠道商类目', isTab: true } },
{ path: '/artificerAchievementIntegral', component: _import('bl/artificer/artificerAchievementIntegral'), name: 'artificerAchievementIntegral', meta: { title: '技师业绩积分关系列表', isTab: true } },
{ path: '/artificerPartitioningDetails', component: _import('bl/artificer/artificerPartitioningDetails'), name: 'artificerPartitioningDetails', meta: { title: '技师分成明细配置列表', isTab: true } },
{ path: '/artificerRechargeReward', component: _import('bl/artificer/artificerRechargeReward'), name: 'artificerRechargeReward', meta: { title: '技师充值奖励配置列表', isTab: true } },

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,762 @@
<template>
<div>
<!-- 列表 -->
<div style="margin-left:10px;display: inline-block">
<span>编码</span>
<el-input
style="width: 200px"
placeholder="请输入编码"
v-model="qdsCode">
</el-input>
</div>
<div style="margin-left:10px;display: inline-block">
<span>渠道商</span>
<el-input
style="width: 200px"
placeholder="请输入渠道商"
v-model="name">
</el-input>
</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"
>
</el-table-column>
<el-table-column
prop="name"
label="渠道码名称"
width="220"
>
</el-table-column>
<el-table-column
prop="code"
label="编码"
width="150"
>
</el-table-column>
<el-table-column prop="lm" label="所属类目">
<template slot-scope="scope">
{{ showDictValue(scope.row.lm, lmData) }}
</template>
</el-table-column>
<el-table-column
prop="qdsName"
label="渠道商"
width="200"
>
</el-table-column>
<el-table-column
prop="userName"
label="绑定人员"
width="150"
>
</el-table-column>
<el-table-column
prop="rate"
label="渠道分成"
width="150"
>
<template slot-scope="scope">
<span>{{scope.row.rate}}%</span>
</template>
</el-table-column>
<el-table-column prop="codeImage" label="渠道码">
<template slot-scope="scope">
<el-popover placement="top-start" title="" trigger="hover">
<img style="width: 50px; height: 50px;margin: 3px;" :src="scope.row.codeImage" alt=""
slot="reference">
<img style="width: 300px;height:auto" :src="scope.row.codeImage" alt="">
</el-popover>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
width="150"
>
</el-table-column>
<el-table-column label="操作" prop="id" width="360" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
style="margin: 5px"
@click="handleEdit(scope.row)"
>编辑
</el-button>
<el-button
size="mini"
type="primary"
style="margin: 5px"
@click="handleDelete(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="closeDialog">
<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-select clearable v-model="lm" style="width: 50%">
<el-option
v-for="item in lmData"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">渠道分成%</span>
<el-input-number v-model="rate" controls-position="right" :precision="2" :min="0" :step="1" placeholder="请输入渠道分成(%)"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">绑定人员</span>
<el-input
style="width: 50%"
v-model="userId"
type="text"
placeholder="请选择用户"
:disabled="true"
v-show="false"
>
</el-input>
<el-input
style="width: 50%"
v-model="userName"
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">
<span style="width: 200px; display: inline-block; text-align: right">广告投放成本</span>
<el-input-number v-model="cost" controls-position="right" :precision="2" :min="0" :step="1" placeholder="请输入广告投放成本(元)"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">推广时间段</span>
<el-date-picker
v-model="tgDate"
type="daterange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">投放地点</span>
<el-input
style="width: 50%"
v-model="address"
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>
<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="qdsName" 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>
</div>
</template>
<script>
export default {
data() {
return {
apiUrl: "",
titles: "",
tableDataLoading: false,
tableData: {},
lmData: [],
userId: "",
avatar: "",
userName: "",
qdsName: "",
name: "",
qdsCode: "",
phone: "",
remarks: "",
lm: "",
rate: "",
cost: 0,
tgDate: "",
startDate: "",
endDate: "",
address: "",
page: 1,
limit: 10,
dialogFormVisible: false,
dialogFormViewVisible: false,
dialogUserListFormVisible: false,
userTableDataLoading: false,
userPage: 1,
userLimit: 10,
userTableData:{},
};
},
methods: {
showDictValue(data, datas){
const dictItem = datas.find(item => data === item.id);
return dictItem ? dictItem.name : '';
},
//
handleLm() {
this.$http({
url: this.$http.adornUrl("commission/qdsCode/lmList"),
method: "get",
params: this.$http.adornParams({}),
}).then(({data}) => {
if (data.code == 0) {
this.lmData = data.data;
} else {
this.$notify({
title: "提示",
duration: 1800,
message: data.msg,
type: "warning",
});
}
});
},
//
handleSelect() {
this.tableDataLoading = true;
this.$http({
url: this.$http.adornUrl("commission/qdsCode/findPage"),
method: "get",
params: this.$http.adornParams({
page: this.page,
limit: this.limit,
name: this.name,
code: this.qdsCode,
}),
}).then(({data}) => {
if (data.code == 0) {
this.tableData = data.data;
} else {
this.$notify({
title: "提示",
duration: 1800,
message: data.msg,
type: "warning",
});
}
this.tableDataLoading = false;
});
},
//
handleClear() {
this.name = "";
this.qdsCode ="";
this.page = 1;
this.handleSelect();
},
//
handleSizeChange(val) {
this.limit = val;
this.handleSelect();
},
//
handleCurrentChange(val) {
this.page = val;
this.handleSelect();
},
//
handleEdit(row) {
if (row != 0) {
this.titles = "修改";
this.id = row.id;
this.userId = row.userId;
this.userName = row.userName;
this.name = row.name;
this.lm = row.lm;
this.rate = row.rate;
this.cost = row.cost;
this.startDate = row.startDate;
this.endDate = row.endDate;
this.tgDate = [row.startDate,row.endDate];
this.address = row.address;
this.remarks = row.remarks;
} else {
this.titles = "添加";
this.id = "";
this.userId = "";
this.userName = "";
this.name = "";
this.lm = "";
this.rate = "";
this.cost = 0;
this.startDate = "";
this.endDate = "";
this.tgDate = [this.getCurrentDate(),this.getCurrentDate()];
this.address = "";
this.remarks = "";
}
this.dialogFormVisible = true;
},
closeDialog(){
this.handleClear();
},
//
handleSubmit() {
console.log(this.tgDate);
if (this.name == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请输入渠道码名称",
type: "warning",
});
return;
}
if (this.lm == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请选择类目",
type: "warning",
});
return;
}
if (this.rate == "") {
this.rate = 0;
}
if (this.userId == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请选择用户",
type: "warning",
});
return;
}
if (this.cost == "") {
this.cost = 0;
}
if (this.tgDate == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请选择推广时间段",
type: "warning",
});
return;
}
if (this.address == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请输入投放地点",
type: "warning",
});
return;
}
if (this.titles == "添加") {
this.apiUrl = "commission/qdsCode/add";
} else {
this.apiUrl = "commission/qdsCode/update";
}
this.startDate = this.tgDate[0];
this.endDate = this.tgDate[1];
this.$http({
url: this.$http.adornUrl(this.apiUrl),
method: "post",
params: this.$http.adornParams({
id: this.id,
userId: this.userId,
name: this.name,
rate: this.rate,
cost: this.cost,
address: this.address,
startDate: this.startDate,
endDate: this.endDate,
lm: this.lm,
remarks: this.remarks,
}),
}).then(({data}) => {
if (data.code == 0) {
this.dialogFormVisible = false;
this.closeDialog();
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
}
});
},
handleDelete(row){
this.$confirm(`确定删除此条信息?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let id = row.id;
this.$http({
url: this.$http.adornUrl("commission/qdsCode/delete"),
method: "post",
params: this.$http.adornParams({
id: id
}),
}).then(({data}) => {
if (data.code == 0) {
this.closeDialog();
this.$message({
message: "删除成功",
type: "success",
duration: 1500,
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
}
});
}).catch(() => {});
},
showUsersView(){
this.handleSelectUsers();
this.dialogUserListFormVisible = true;
},
handleSelectUsers(){
this.userTableDataLoading = true;
this.$http({
url: this.$http.adornUrl("commission/qdsCode/findUserPage"),
method: "get",
params: this.$http.adornParams({
userPage: this.userPage,
userLimit: this.userLimit,
userName: this.userName,
phone: this.phone,
}),
}).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.userPage = 1;
this.userLimit = 10;
this.handleSelectUsers();
},
handleAddUser(row){
this.userId = row.userId;
this.userName = row.userName;
this.dialogUserListFormVisible = false;
},
getCurrentDate(){
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = currentDate.getMonth() + 1; // 01
const day = currentDate.getDate();
return year + "-" + month + "-" + day;
}
},
mounted() {
this.handleLm();
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>

View File

@ -0,0 +1,171 @@
<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="rate">
<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/qdsConfig/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/qdsConfig/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>

View File

@ -0,0 +1,498 @@
<template>
<div>
<!-- 列表 -->
<div style="margin-left:10px;display: inline-block">
<span>渠道码名称</span>
<el-input
style="width: 200px"
placeholder="请输入名称"
v-model="qdmName">
</el-input>
</div>
<div style="margin-left:10px;display: inline-block">
<span>编码</span>
<el-input
style="width: 200px"
placeholder="请输入编码"
v-model="qdsCode">
</el-input>
</div>
<div style="margin-left:10px;display: inline-block">
<span>渠道商</span>
<el-input
style="width: 200px"
placeholder="请输入渠道商"
v-model="qdsName">
</el-input>
</div>
<div style="margin-left:10px;display: inline-block">
<span>类目</span>
<el-select clearable v-model="lm" style="width: 50%">
<el-option
v-for="item in lmData"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</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-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column
prop="id"
label="序号"
width="80"
>
</el-table-column>
<el-table-column
prop="qdmName"
label="渠道码名称"
width="220"
>
</el-table-column>
<el-table-column
prop="qdsCode"
label="编码"
width="150"
>
</el-table-column>
<el-table-column prop="lm" label="所属类目">
<template slot-scope="scope">
{{ showDictValue(scope.row.lm, lmData) }}
</template>
</el-table-column>
<el-table-column
prop="qdsName"
label="渠道商"
width="200"
>
</el-table-column>
<el-table-column
prop="userName"
label="绑定人员"
width="150"
>
</el-table-column>
<el-table-column
prop="rate"
label="渠道分成"
width="150"
>
<template slot-scope="scope">
<span>{{scope.row.rate}}%</span>
</template>
</el-table-column>
<el-table-column
prop="smCount"
label="扫码数量"
width="150"
>
</el-table-column>
<el-table-column
prop="ordersCount"
label="订单数量"
width="150"
>
</el-table-column>
<el-table-column
prop="money"
label="累计获得佣金"
width="150"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
width="150"
>
</el-table-column>
<el-table-column
prop="startTime"
label="推广开始时间"
width="150"
>
</el-table-column>
<el-table-column
prop="endTime"
label="推广结束时间"
width="150"
>
</el-table-column>
<el-table-column label="操作" prop="id" width="260" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
style="margin: 5px"
@click="handleInvitationView(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="dialogInvitationListFormVisible" width="60%" center @close="closeInvitation">
<div style="margin-left: 10px; display: inline-block;">
<span>姓名</span>
<el-input
style="width: 200px"
placeholder="请输入姓名"
v-model="invitationName"
></el-input>
</div>
<div style="margin-left: 10px; display: inline-block">
<span>手机号</span>
<el-input
style="width: 200px"
placeholder="请输入手机号"
v-model="invitationPhone"
></el-input>
</div>
<el-button
style="margin-left: 10px;"
size="mini"
type="primary"
icon="document"
@click="handleSelectInvitation">查询
</el-button>
<el-button
style="margin-left: 10px"
size="mini"
type="primary"
icon="document"
@click="handleClearInvitation">重置
</el-button>
<el-table :data="invitationTableData.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="name" label="姓名"></el-table-column>
<el-table-column prop="phone" label="手机号"></el-table-column>
</el-table>
<div style="text-align: center; margin-top: 10px">
<el-pagination
@size-change="handleInvitationSizeChange"
@current-change="handleInvitationCurrentChange"
:page-size="invitationLimit"
:current-page="invitationPage"
layout="total, prev, pager, next,jumper"
:total="invitationTableData.totalCount"
></el-pagination>
</div>
</el-dialog>
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<邀请用户列表<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
</div>
</template>
<script>
export default {
data() {
return {
apiUrl: "",
titles: "",
tableDataLoading: false,
tableData: {},
lmData: [],
qdmName: "",
qdsCode: "",
qdsName: "",
lm: "",
startTime: "",
endTime: "",
page: 1,
limit: 10,
dialogInvitationListFormVisible: false,
invitationName: "",
invitationPhone: "",
invitationPage: 1,
invitationLimit: 10,
invitationTableData:{},
};
},
methods: {
showDictValue(data, datas){
const dictItem = datas.find(item => data === item.id);
return dictItem ? dictItem.name : '';
},
//
handleLm() {
this.$http({
url: this.$http.adornUrl("commission/qdsCode/lmList"),
method: "get",
params: this.$http.adornParams({}),
}).then(({data}) => {
if (data.code == 0) {
this.lmData = data.data;
} else {
this.$notify({
title: "提示",
duration: 1800,
message: data.msg,
type: "warning",
});
}
});
},
//
handleSelect() {
this.tableDataLoading = true;
this.$http({
url: this.$http.adornUrl("commission/qdsData/findPage"),
method: "get",
params: this.$http.adornParams({
page: this.page,
limit: this.limit,
qdmName: this.qdmName,
qdsCode: this.qdsCode,
qdsName: this.qdsName,
lm: this.lm,
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.qdmName = "";
this.qdsCode ="";
this.qdsName ="";
this.lm ="";
this.startTime = "";
this.endTime = "";
this.page = 1;
this.handleSelect();
},
//
handleSizeChange(val) {
this.limit = val;
this.handleSelect();
},
//
handleCurrentChange(val) {
this.page = val;
this.handleSelect();
},
handleInvitationView(row){
this.titles = '邀请的用户列表';
this.invitationCode = row.qdsCode;
this.handleSelectInvitation();
this.dialogInvitationListFormVisible = true;
},
handleSelectInvitation(){
this.invitationTableDataLoading = true;
this.$http({
url: this.$http.adornUrl("commission/qdsData/invitationPage"),
method: "get",
params: this.$http.adornParams({
page: this.invitationPage,
limit: this.invitationLimit,
qdsCode: this.invitationCode,
name: this.invitationName,
phone: this.invitationPhone
}),
}).then(({data}) => {
if (data.code == 0) {
this.invitationTableData = data.data;
} else {
this.$notify({
title: "提示",
duration: 1800,
message: data.msg,
type: "warning",
});
}
this.invitationTableDataLoading = false;
});
},
//
handleInvitationSizeChange(val) {
this.invitationLimit = val;
this.handleSelectInvitation();
},
//
handleInvitationCurrentChange(val) {
this.invitationPage = val;
this.handleSelectInvitation();
},
//
handleClearInvitation() {
this.invitationName = "";
this.invitationPhone = "";
this.invitationPage = 1;
this.invitationLimit = 10;
this.handleSelectInvitation();
},
},
mounted() {
this.handleLm();
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>

View File

@ -0,0 +1,244 @@
<template>
<div>
<div style="display: inline-block;">
<div style="display: inline-block;margin-top: 5px;">
<span>名称:</span>
<el-input style="width: 150px;" @keydown.enter.native="refresh" clearable placeholder="请输入名称"
v-model="name">
</el-input>
</div>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="refresh">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="chognzhi">重置
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="adds">添加
</el-button>
</div>
<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="name" label="名称">
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
</el-table-column>
<el-table-column label="操作" width="180" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary"
@click="updates(scope.row)" style="margin: 3px;">修改
</el-button>
<el-button size="mini" type="danger"
@click="deletes(scope.row)" style="margin: 3px;">删除
</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, 50, 100]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next" :total="tableData.totalCount">
</el-pagination>
</div>
<!-- 添加/修改-->
<el-dialog :title="titles" :visible.sync="dialogFormVisible" center width="50%">
<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 slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="handleSubmit()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { serverPaths } from '@/utils/enumData'
export default {
data() {
return {
apiUrl: '',
size: 10,
page: 1,
id: '',
name: '',
titles: '',
tableData: [],
tableDataLoading: false,
dialogFormVisible: false,
}
},
methods: {
//
refresh() {
this.page = 1
this.dataSelect()
},
//
chognzhi(){
this.page = 1
this.name = ''
this.dataSelect()
},
handleSizeChange(val) {
this.size = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
//
adds() {
this.titles = '添加';
this.name = '';
this.dialogFormVisible = true;
},
//
handleSubmit() {
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
});
return
}
if (this.titles == "添加") {
this.apiUrl = "commission/qdsLm/add";
} else {
this.apiUrl = "commission/qdsLm/modify";
}
this.$http({
url: this.$http.adornUrl(this.apiUrl),
method: 'post',
params: this.$http.adornParams({
id: this.id,
name: this.name,
})
}).then(({data}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.chognzhi()
}
})
this.dialogFormVisible = false
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
//
updates(row) {
this.titles = '修改';
this.dialogFormVisible = true;
this.id = row.id;
this.name = row.name;
},
//
deletes(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('commission/qdsLm/delete'),
method: 'post',
params: this.$http.adornParams({
id: row.id
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.chognzhi()
}
})
} else {
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
onClose: () => {
}
})
}
})
}).catch(() => {})
},
//
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('commission/qdsLm/findPage'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.size,
'name': this.name,
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
})
},
},
mounted() {
this.dataSelect()
}
};
</script>
<style>
.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;
}
</style>

View File

@ -1,17 +1,17 @@
<template>
<el-submenu v-if="menu.list && menu.list.length >= 1" :index="menu.menuId + ''"
:popper-class="'site-sidebar--' + sidebarLayoutSkin + '-popper'">
:popper-class="'site-sidebar--' + sidebarLayoutSkin + '-popper'">
<template slot="title">
<span>
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</span>
<!-- <el-badge class="item" v-if="menu.menuId==129&&chatNumLts!=0" is-dot>-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<!-- <el-badge class="item" v-if="menu.menuId==195&&chatNumLts!=0" is-dot>-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<el-badge class="item" v-if="menu.menuId==129&&chatNumLts!=0" is-dot>
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==195&&chatNumLts!=0" is-dot>
<span> </span>
</el-badge>
</template>
<sub-menu v-for="item in menu.list" :key="item.menuId" :menu="item" :dynamicMenuRoutes="dynamicMenuRoutes">
</sub-menu>
@ -21,141 +21,115 @@
<span>{{ menu.name }}</span>
</el-menu-item> -->
<el-menu-item v-else :index="menu.menuId + ''" @click="gotoRouteHandle(menu)">
<el-badge class="item" v-if="menu.menuId==77&&chatNumDrz!=0" :value="chatNumDrz">
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</el-badge>
<el-badge class="item" v-else-if="menu.menuId==167&&chatNumDts!=0" :value="chatNumDts">
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</el-badge>
<el-badge class="item" v-else-if="menu.menuId==182&&chatNumDsm!=0" :value="chatNumDsm">
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</el-badge>
<el-badge class="item" v-else-if="menu.menuId==174&&chatNumJjqz!=0" :value="chatNumJjqz">
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</el-badge>
<el-badge class="item" v-else-if="menu.menuId==224&&chatNumFwz!=0" :value="chatNumFwz">
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</el-badge>
<span v-else>
<span>
<icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>
<span>{{ menu.name }}</span>
</span>
<!-- <span>-->
<!-- <icon-svg :name="menu.icon || ''" class="site-sidebar__menu-icon"></icon-svg>-->
<!-- <span>{{ menu.name }}</span>-->
<!-- </span>-->
<!-- <el-badge class="item" v-if="menu.menuId==79&&chatNumLts!=0" :value="chatNumLts">-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<!-- <el-badge class="item" v-if="menu.menuId==174&&chatNumJjqz!=0" :value="chatNumJjqz">-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<!-- <el-badge class="item" v-if="menu.menuId==77&&chatNumDrz!=0" :value="chatNumDrz">-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<!-- <el-badge class="item" v-if="menu.menuId==167&&chatNumDts!=0" :value="chatNumDts">-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<!-- <el-badge class="item" v-if="menu.menuId==182&&chatNumDsm!=0" :value="chatNumDsm">-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<!-- <el-badge class="item" v-if="menu.menuId==224&&chatNumFwz!=0" :value="chatNumFwz">-->
<!-- <span> </span>-->
<!-- </el-badge>-->
<el-badge class="item" v-if="menu.menuId==79&&chatNumLts!=0" :value="chatNumLts">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==174&&chatNumJjqz!=0" :value="chatNumJjqz">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==77&&chatNumDrz!=0" :value="chatNumDrz">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==167&&chatNumDts!=0" :value="chatNumDts">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==182&&chatNumDsm!=0" :value="chatNumDsm">
<span> </span>
</el-badge>
<el-badge class="item" v-if="menu.menuId==224&&chatNumFwz!=0" :value="chatNumFwz">
<span> </span>
</el-badge>
</el-menu-item>
</template>
<script>
import SubMenu from './main-sidebar-sub-menu'
export default {
name: 'sub-menu',
data(){
return {
chatNumDrz:0,//
chatNumDts:0,
chatNumDsm:0,
chatNumJjqz:0,
chatNumFwz:0,
chatNumLts:0,
import SubMenu from './main-sidebar-sub-menu'
export default {
name: 'sub-menu',
data(){
return {
chatNumDrz:0,//
chatNumDts:0,
chatNumDsm:0,
chatNumJjqz:0,
chatNumFwz:0,
chatNumLts:0,
}
},
props: {
menu: {
type: Object,
required: true
},
dynamicMenuRoutes: {
type: Array,
required: true
}
},
components: {
SubMenu
},
computed: {
sidebarLayoutSkin: {
get() {
return this.$store.state.common.sidebarLayoutSkin
}
},
props: {
menu: {
type: Object,
required: true
},
dynamicMenuRoutes: {
type: Array,
required: true
}
},
methods: {
// menuId()
gotoRouteHandle(menu) {
var route = this.dynamicMenuRoutes.filter(item => item.meta.menuId === menu.menuId)
if (route.length >= 1) {
this.$router.push({
name: route[0].name
})
}
},
components: {
SubMenu
},
computed: {
sidebarLayoutSkin: {
get() {
return this.$store.state.common.sidebarLayoutSkin
}
}
},
mounted() {
setInterval(() => {
if(this.$cookie.get('numberDrz')){
this.chatNumDrz = this.$cookie.get('numberDrz')
}
},
methods: {
// menuId()
gotoRouteHandle(menu) {
var route = this.dynamicMenuRoutes.filter(item => item.meta.menuId === menu.menuId)
if (route.length >= 1) {
this.$router.push({
name: route[0].name
})
}
if(this.$cookie.get('numberDts')){
this.chatNumDts = this.$cookie.get('numberDts')
}
},
mounted() {
setInterval(() => {
if(this.$cookie.get('numberDrz')){
this.chatNumDrz = this.$cookie.get('numberDrz')
}
if(this.$cookie.get('numberDts')){
this.chatNumDts = this.$cookie.get('numberDts')
}
if(this.$cookie.get('numberJjqz')){
this.chatNumJjqz = this.$cookie.get('numberJjqz')
}
if(this.$cookie.get('numberDsh')){
this.chatNumDsm = this.$cookie.get('numberDsh')
}
if(this.$cookie.get('numberJg')>=0||this.$cookie.get('numberCs')>=0){
this.chatNumFwz = Number(this.$cookie.get('numberCs')) + Number(this.$cookie.get('numberJg'))
}
if(this.$cookie.get('numberLts')){
this.chatNumLts = this.$cookie.get('numberLts')
}
if(this.$cookie.get('numberJjqz')){
this.chatNumJjqz = this.$cookie.get('numberJjqz')
}
if(this.$cookie.get('numberDsh')){
this.chatNumDsm = this.$cookie.get('numberDsh')
}
if(this.$cookie.get('numberJg')>=0||this.$cookie.get('numberCs')>=0){
this.chatNumFwz = Number(this.$cookie.get('numberCs')) + Number(this.$cookie.get('numberJg'))
}
if(this.$cookie.get('numberLts')){
this.chatNumLts = this.$cookie.get('numberLts')
}
}, 1000)
// this.chatNum2 = setInterval(() => {
// this.messageSelect2()
// }, 6000)
// this.chatNum3 = setInterval(() => {
// this.messageSelect3()
// }, 6000)
// this.chatNum4 = setInterval(() => {
// this.messageSelect4()
// }, 6000)
},
}
}, 1000)
// this.chatNum2 = setInterval(() => {
// this.messageSelect2()
// }, 6000)
// this.chatNum3 = setInterval(() => {
// this.messageSelect3()
// }, 6000)
// this.chatNum4 = setInterval(() => {
// this.messageSelect4()
// }, 6000)
},
}
</script>
<style scoped lang="scss">
.item {
padding-left: 10px;
}
.item {
padding-left: 10px;
}
</style>