From 000e2719d57fd6cfc94fb340730ab3722d6c47cb Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Sun, 14 Mar 2021 14:33:14 +0800
Subject: [PATCH] 分销员后台0314
---
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html | 212 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 191 insertions(+), 21 deletions(-)
diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
index 63603ff..8d2fe90 100644
--- a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
+++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
@@ -54,35 +54,86 @@
</el-option>
</el-select>
</el-form-item>
+ <el-form-item label="分销员等级" prop="salemanGrade">
+ <el-select v-model="form.salemanGrade" placeholder="请选择" filterable allow-create>
+ <el-option v-for="item in salemanGradeList " :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item prop="userName">
+ <el-input v-model="form.userName" placeholder="请输入会员姓名"></el-input>
+ </el-form-item>
<el-button type="primary" @click="search" >搜索</el-button>
<el-button @click="resetForm('form')">重置</el-button>
</el-form>
</el-col>
</el-row>
- <el-row>
- <template>
- <el-table id="proj" :data="fxyList.rows" :height="height" stripe @sort-change="sortChange">
+ <el-row class="table-style" >
+ <el-table id="proj" :data="fxyList.rows" :height="height" stripe:true @sort-change="sortChange">
<el-table-column
- type="selection"
- width="55">
+ type="selection">
</el-table-column>
<el-table-column
- prop="userId"
- label="id"
- width="180">
- </el-table-column>
- <el-table-column
- fixed="right"
- label="操作"
- width="auto">
+ label="分销员">
<template slot-scope="scope">
- <el-button type="text" size="small" @click="addSaleManApply(scope.row)">审核</el-button>
- <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
- <el-button type="text" size="small">编辑</el-button>
+ <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
+ {{scope.row.nickname}}
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="parentUser"
+ label="邀请人" width="100">
+ </el-table-column>
+ <el-table-column
+ prop="lowerLevelNum"
+ label="下级客户数" width="100">
+ </el-table-column>
+ <el-table-column
+ prop="totalRevenue"
+ label="累计收益">
+ </el-table-column>
+ <el-table-column
+ prop="balance"
+ label="待结算">
+ </el-table-column>
+ <el-table-column
+ prop="grade"
+ label="等级">
+ </el-table-column>
+ <el-table-column
+ prop="createTime"
+ label="加入时间"
+ :formatter="formatDate">
+ </el-table-column>
+ <el-table-column
+ label="状态">
+ <template slot-scope="scope">
+ <span v-if="scope.row.applyStatus == 1">待审核</span>
+ <span v-if="scope.row.applyStatus == 2">通过</span>
+ <span v-if="scope.row.applyStatus == 3">未通过</span>
+ <span v-if="scope.row.applyStatus == 4">系统删除</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="来源">
+ <template slot-scope="scope">
+ <span v-if="scope.row.applyWay == 1">自主申请</span>
+ <span v-if="scope.row.applyWay == 2">自动添加</span>
+ <span v-if="scope.row.applyWay == 3">上级邀请</span>
+ <span v-if="scope.row.applyWay == 4">手动添加</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="操作" width="240">
+ <template slot-scope="scope">
+ <el-row style="display:flex;">
+ <el-button type="primary" v-if="scope.row.applyStatus == 1" size="mini" @click="openExamineSaleManApply(scope.row)">审核</el-button>
+ <el-button type="primary" v-if="scope.row.applyStatus == 2" size="mini" @click="openUpdateSaleManGrade(scope.row)">修改等级</el-button>
+ <el-button type="primary" size="mini" @click="openUpdateSaleManGrade(scope.row)">详情</el-button>
+ <el-button type="primary" v-if="scope.row.applyStatus == 2" size="mini" @click="delSaleManGradeApply(scope.row)">删除</el-button>
+ </el-row>
</template>
</el-table-column>
</el-table>
- </template>
</el-row>
<el-row class="paginationStyle" >
<el-pagination background
@@ -96,6 +147,7 @@
</el-pagination>
</el-row>
</el-tab-pane>
+
<el-tab-pane label="分佣方案" name="second">
<template>
<el-table
@@ -134,6 +186,7 @@
</el-table>
</template>
</el-tab-pane>
+
<el-tab-pane label="推广文案" name="third">
<el-row>
<script style="width: 100%; height: 500px" id="description" name="description"
@@ -196,8 +249,12 @@
jfdxj:[],
mdjf:[],
scjf:[],
+ shenheAgreeType : 2,
+ shenheDisagreeType : 3,
form:{
shenheState:'',
+ salemanGrade:'',
+ userName:'',
order:'',
sort:''
},
@@ -208,6 +265,8 @@
{value:2,label:'通过'},
{value:3,label:'未通过'}
],
+ //条件查询分销员等级
+ salemanGradeList:[],
fxyList:{
rows:[],
total:0,
@@ -232,6 +291,7 @@
loadInfo() {
let _this = this;
_this.loadParamSetting();
+ _this.getSalemanGradeList();
},
submittp(paramValue) {
alert(paramValue);
@@ -266,17 +326,31 @@
}
});
},
+ // 下拉框数据源---分销员等级
+ getSalemanGradeList() {
+ let _this = this;
+ AjaxProxy.requst({
+ app: _this,
+ data:[],
+ url: basePath + '/fenXiao/fenXiaoUser/getShopSalesmanGrade',
+ callback: function (data) {
+ _this.salemanGradeList = data.mapInfo.salesGrade;
+ }
+ });
+ },
getRequestParam(){
let _this = this;
return {
shenheState:_this.form.shenheState,
+ salemanGrade:_this.form.salemanGrade,
+ userName:_this.form.userName,
order:_this.form.order,
sort:_this.form.sort,
}
},
search:function(){
this.fxyList.currentPage=1;
- this.loadInfo();
+ this.loadParamSetting();
},
keydown(evt){
if(evt.keyCode==13) {
@@ -294,16 +368,25 @@
this.form.order="asc";
}
this.form.sort=column.prop;
- this.loadInfo();
+ this.loadParamSetting();
}
},
changePageSize(val) {
this.table.pageSize = val;
- this.loadData();
+ this.loadParamSetting();
},
changeCurrentPage(val) {
this.table.currentPage = val;
- this.loadData();
+ this.loadParamSetting();
+ },
+ //时间格式化
+ formatDate(row,column){
+ let data = row[column.property]
+ if (data ===null) {
+ return ''
+ }
+ let dt = new Date(data)
+ return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() + ' ' + dt.getHours() + ':' + dt.getMinutes()
},
//新增分销员页面
addSaleMan(){
@@ -315,6 +398,93 @@
content : [ basePath + '/admin/redirect/fenxiao/fenxiao-apply']
}));
},
+ //删除
+ delSaleManGradeApply(row){
+ this.$confirm('是否删除?', '删除', {
+ distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'info'
+ }).then(() => {
+ //通过
+ this.examineDelSaleManGradeApply(row);
+ }).catch(action => {
+ //不通过
+ if(action === 'cancel'){
+ console.log("cancel");
+ }else{
+ //关闭按钮
+ console.log("close");
+ //this.$message({type: 'info',message: ''})
+ }
+ });
+ },
+ examineDelSaleManGradeApply(row){
+ let _this = this;
+ let userId = row.userId;
+ let id = row.id;
+ let obj = {
+ userId: userId,
+ applyId: id,
+ }
+ AjaxProxy.requst({
+ app: _this,
+ data:obj,
+ url: basePath + '/fenXiao/fenXiaoUser/delSaleManGradeApply',
+ callback: function (data) {
+ _this.$message.success(data.info);
+ this.loadParamSetting();
+ }
+ });
+ },
+ //修改等级跳转
+ openUpdateSaleManGrade(row){
+ layer.full(layer.open({
+ type: 2,
+ title: "修改等级",
+ maxmin: true,
+ area: [MUI.SIZE_L, '500px'],
+ content : [ basePath + '/admin/redirect/fenxiao/fenxiao-update?userId=' + row.userId ]
+ }));
+ },
+ //审核
+ openExamineSaleManApply(row) {
+ this.$confirm('是否通过?', '审核', {
+ distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
+ confirmButtonText: '通过',
+ cancelButtonText: '不通过',
+ type: 'info'
+ }).then(() => {
+ //通过
+ this.examineSaleManApply(row,this.shenheAgreeType);
+ }).catch(action => {
+ //不通过
+ if(action === 'cancel'){
+ this.examineSaleManApply(row,this.shenheDisagreeType);
+ }else{
+ //关闭按钮
+ console.log("close");
+ //this.$message({type: 'info',message: ''})
+ }
+ });
+ },
+ examineSaleManApply(row,type){
+ let _this = this;
+ let userId = row.userId;
+ let obj = {
+ userId: userId,
+ applyState: type,
+ }
+ AjaxProxy.requst({
+ app: _this,
+ data:obj,
+ url: basePath + '/fenXiao/fenXiaoUser/examineSaleManApply',
+ callback: function (data) {
+ _this.$message.success(data.info);
+ this.loadParamSetting();
+ }
+ });
+ },
submit() {
}
--
Gitblit v1.9.1