会员管理 固定等级
This commit is contained in:
parent
f95867e000
commit
7e2c047e4d
@ -17,6 +17,14 @@ export function getCertifiedMember(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 根据会员id查询固定等级详细
|
||||
export function getCertifiedMemberByUserId(userId) {
|
||||
return request({
|
||||
url: '/business/userManager/certifiedMember/userId/' + userId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增固定等级
|
||||
export function addCertifiedMember(data) {
|
||||
return request({
|
||||
|
@ -25,6 +25,14 @@ export function getUser(id) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询会员详细
|
||||
export function getUserMobile(data) {
|
||||
return request({
|
||||
url: '/business/userManager/user/mobile' ,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增会员
|
||||
export function addUser(data) {
|
||||
|
@ -3,33 +3,40 @@
|
||||
<el-card>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="认证会员" name="member">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
v-model="queryParam.mobile"
|
||||
placeholder="请输入会员手机号"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证类型" prop="type">
|
||||
<el-input
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择认证类型"
|
||||
<el-form-item label="认证类型" prop="fixingLevelId">
|
||||
<el-select
|
||||
v-model="queryParam.fixingLevelId"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option v-for="item in fixingLevelList" :key="item.id+''" :label="item.name" :value="item.id+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证状态" prop="status">
|
||||
<el-input
|
||||
v-model="queryParams.status"
|
||||
<el-select
|
||||
v-model="queryParam.status"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.rzzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
@ -45,13 +52,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQueryMember">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="固定等级认证" name="fixingLevel">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="认证状态" prop="status">
|
||||
<el-form-item label="等级状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="全部"
|
||||
@ -92,7 +99,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
@click="handleAddMember"
|
||||
v-hasPermi="['member:add']"
|
||||
>新增用户认证</el-button>
|
||||
<el-table ref="tables" v-loading="loading" :data="listMember" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
@ -102,7 +109,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号" align="center"prop="mobile"/>
|
||||
<el-table-column label="关联会员" align="center" prop="userId"/>
|
||||
<el-table-column label="关联会员" align="center" prop="userId">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userId ? getName(userList, scope.row.userId) : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="车牌号" align="center" prop="carNumber"/>
|
||||
<el-table-column label="认证资料" align="center" prop="attestationData"/>
|
||||
@ -119,14 +130,14 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['member:add']"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="handleUpdateMember(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['member:add']"
|
||||
@click="handleDelete(scope.row)"
|
||||
@click="handleDeleteMember(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -305,6 +316,137 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 添加用户认证或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="openMember"
|
||||
:close-on-click-modal="false" append-to-body>
|
||||
<el-form ref="form1" :model="form1" :rules="rules1">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="form1.mobile"
|
||||
style="width: 75%"
|
||||
:disabled="isEdit"
|
||||
placeholder="请输入用户手机号"/>
|
||||
<div>
|
||||
<div style="color: grey;font-size: 12px;height: 18px;margin-left: 8%">
|
||||
请确保用户手机号已注册为油站会员(在会员列表已显示),否则无法添加认证信息
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="认证类型" prop="fixingLevelId">
|
||||
<el-select
|
||||
v-model="form1.fixingLevelId"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option v-for="item in fixingLevelList" :key="item.id+''" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户姓名" prop="name">
|
||||
<el-input
|
||||
v-model="form1.name"
|
||||
placeholder="请输入用户姓名"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车牌号码" prop="carNumber">
|
||||
<el-input
|
||||
v-model="form1.carNumber"
|
||||
placeholder="请输入用户车牌号"
|
||||
clearable
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="认证图片1" prop="photo1">
|
||||
<div>
|
||||
<el-upload
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="认证图片2" prop="photo2">
|
||||
<div>
|
||||
<el-upload
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="认证图片3" prop="photo3">
|
||||
<div>
|
||||
<el-upload
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注信息">
|
||||
<el-input v-model="form1.remark"
|
||||
type="textarea"
|
||||
style="width: 75%"
|
||||
placeholder="用户其他的一些信息"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="认证状态" prop="status">
|
||||
<el-radio-group v-model="form1.status">
|
||||
<el-radio label="enable">启用</el-radio>
|
||||
<el-radio label="disable">禁用</el-radio>
|
||||
<el-radio label="dsh">待审核</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormMember">确 定</el-button>
|
||||
<el-button @click="cancelMember">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加固定等级或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" class="roll-dialog"
|
||||
@ -582,29 +724,45 @@ import {
|
||||
listFixingLevel,
|
||||
updateFixingLevel
|
||||
} from "@/api/staff/user/fixinglevel";
|
||||
import {listCertifiedMember} from "@/api/staff/user/certifiedmember";
|
||||
import {
|
||||
addCertifiedMember,
|
||||
delCertifiedMember,
|
||||
getCertifiedMember, getCertifiedMemberByUserId,
|
||||
listCertifiedMember,
|
||||
updateCertifiedMember
|
||||
} from "@/api/staff/user/certifiedmember";
|
||||
import {getUser, getUserMobile, listUser} from "@/api/staff/user/user";
|
||||
|
||||
export default {
|
||||
dicts: ['yhlx','yes_or_no','zhzt','yhhdz','rzzt'],
|
||||
data() {
|
||||
return {
|
||||
isEdit:false,
|
||||
// 上传图片信息
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
mobile:'',
|
||||
activeName: 'member',
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 固定等级列表
|
||||
fixingLevelList:[],
|
||||
// 会员信息列表
|
||||
userList:[],
|
||||
mobile1:'',
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
mobile: '',
|
||||
id: '',
|
||||
mobile:'',
|
||||
type: '',
|
||||
status: '',
|
||||
},// 查询参数
|
||||
queryParam: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
userId: '',
|
||||
mobile: '',
|
||||
id: '',
|
||||
type: '',
|
||||
@ -628,13 +786,18 @@ export default {
|
||||
ids: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openMember: false,
|
||||
// 表单参数
|
||||
form: {
|
||||
id: '', name: '',preferential:'自定义优惠',gasolineDiscount:'无优惠',
|
||||
id: '', name: '',discountType:'自定义优惠',gasolineDiscount:'无优惠',
|
||||
dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'',
|
||||
pointRule:'yes',refuelMoneyRule:'yes',growthValueRule:'yes',couponRule:'yes',
|
||||
storeValue:'yes',process:'bsh',status: 'qy'
|
||||
},
|
||||
form1:{
|
||||
id: '', name: '',mobile:'',carNumber:'',userId:'',
|
||||
attestationData:'',remark:'',status: 'enable'
|
||||
},
|
||||
// 优惠值
|
||||
gasolinePreferential:[
|
||||
{
|
||||
@ -660,14 +823,53 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "等级名称不能为空", trigger: "blur" },
|
||||
{ min: 2, max: 100, message: '等级名称长度必须介于2 和 100 之间', trigger: 'blur' }
|
||||
{ required: true, message: "请填写认证名称", trigger: "blur" },
|
||||
],
|
||||
preferential: [
|
||||
discountType: [
|
||||
{ required: true, message: "请选择优惠类型", trigger: "blur" },
|
||||
],
|
||||
gasolineDiscount: [
|
||||
{ required: true, message: "请选择优惠类型", trigger: "blur" },
|
||||
],
|
||||
dieselDiscount: [
|
||||
{ required: true, message: "请选择优惠类型", trigger: "blur" },
|
||||
],
|
||||
naturalGasDiscount: [
|
||||
{ required: true, message: "请选择优惠类型", trigger: "blur" },
|
||||
],
|
||||
pointRule: [
|
||||
{ required: true, message: "请选择是否参与积分规则", trigger: "blur" },
|
||||
],
|
||||
refuelMoneyRule: [
|
||||
{ required: true, message: "请选择是否参与加油金规则", trigger: "blur" },
|
||||
],
|
||||
growthValueRule: [
|
||||
{ required: true, message: "请选择是否参与成长值规则", trigger: "blur" },
|
||||
],
|
||||
couponRule: [
|
||||
{ required: true, message: "请选择是否参与优惠券规则", trigger: "blur" },
|
||||
],
|
||||
storeValue: [
|
||||
{ required: true, message: "请选择是否参与储值优惠规则", trigger: "blur" },
|
||||
],
|
||||
process: [
|
||||
{ required: true, message: "请选择是否进行认证审核", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "请选择会员等级状态", trigger: "blur" },
|
||||
{ required: true, message: "请选择类型状态", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
// 表单校验
|
||||
rules1: {
|
||||
mobile: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{ min: 7, max: 11, message: '请输入正确的手机号', trigger: 'blur' }
|
||||
],
|
||||
fixingLevelId: [
|
||||
{ required: true, message: "请选择认证类型", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "请选择认证状态", trigger: "blur" },
|
||||
],
|
||||
}
|
||||
};
|
||||
@ -675,8 +877,16 @@ export default {
|
||||
created() {
|
||||
this.getList();
|
||||
this.getListMember();
|
||||
this.getUserList();
|
||||
},
|
||||
methods: {
|
||||
checkMobile(){
|
||||
getUserMobile({mobile:this.form1.mobile}).then( response => {
|
||||
if (response.data==null){
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
// console.log(tab, event);
|
||||
},
|
||||
@ -685,6 +895,12 @@ export default {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQueryMember() {
|
||||
this.queryParams.page = 1;
|
||||
this.getListMember();
|
||||
},
|
||||
// 获取固定等级信息
|
||||
getList(){
|
||||
this.loading = true;
|
||||
listFixingLevel(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
@ -694,18 +910,30 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 获取认证会员信息
|
||||
getListMember(){
|
||||
this.loading = true;
|
||||
listCertifiedMember(this.addDateRange(this.queryParam, this.dateRange)).then( response => {
|
||||
console.log(response)
|
||||
this.listMember = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
// 获取会员信息
|
||||
getUserList(){
|
||||
listUser(this.addDateRange({mobile:this.mobile1})).then( response => {
|
||||
this.userList = response.data.records;
|
||||
});
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.form = {
|
||||
id: '', name: '',discountType:'自定义优惠',gasolineDiscount:'无优惠',
|
||||
dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'',
|
||||
pointRule:'yes',refuelMoneyRule:'yes',growthValueRule:'yes',couponRule:'yes',
|
||||
storeValue:'yes',process:'bsh',status: 'qy'
|
||||
};
|
||||
this.gasolinePreferential=[
|
||||
{
|
||||
gasolineRule1:1,
|
||||
@ -729,11 +957,24 @@ export default {
|
||||
],
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 表单重置
|
||||
reset1() {
|
||||
this.form1 = {
|
||||
id: '', name: '',mobile:'',carNumber:'',userId:'',
|
||||
attestationData:'',remark:'',status: 'enable'
|
||||
};
|
||||
this.resetForm("form1");
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.open = true;
|
||||
this.title = "新增认证类型";
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAddMember() {
|
||||
this.openMember = true;
|
||||
this.title = "新增用户认证";
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
@ -744,11 +985,28 @@ export default {
|
||||
this.title = "编辑认证类型";
|
||||
});
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdateMember(row) {
|
||||
this.isEdit = true;
|
||||
this.reset1();
|
||||
const id = row.id || this.ids;
|
||||
getCertifiedMember(id).then(response => {
|
||||
this.form1 = response.data;
|
||||
this.openMember = true;
|
||||
this.title = "编辑用户认证";
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮
|
||||
cancelMember() {
|
||||
this.openMember = false;
|
||||
this.reset1();
|
||||
this.isEdit = false;
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
@ -772,6 +1030,41 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 提交按钮
|
||||
submitFormMember: function() {
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form1.id) {
|
||||
updateCertifiedMember(this.form1).then(response => {
|
||||
this.$modal.msgSuccess("用户认证信息更新成功");
|
||||
this.openMember = false;
|
||||
this.isEdit = false;
|
||||
this.getListMember();
|
||||
});
|
||||
} else {
|
||||
getUserMobile({mobile:this.form1.mobile}).then( response => {
|
||||
if (response.data==null){
|
||||
this.$modal.msgError("用户信息不存在,请检查当前用户是否已注册")
|
||||
}else {
|
||||
this.form1.userId = response.data.id
|
||||
getCertifiedMemberByUserId(this.form1.userId).then( res => {
|
||||
if(res.data!=null){
|
||||
this.$modal.msgError("当前用户已存在认证记录,请检索后编辑对应用户资料处理")
|
||||
}
|
||||
if(res.data==null){
|
||||
addCertifiedMember(this.form1).then(response => {
|
||||
this.$modal.msgSuccess("新增用户认证信息成功");
|
||||
this.openMember = false;
|
||||
this.getListMember();
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.name
|
||||
@ -783,6 +1076,24 @@ export default {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDeleteMember(row) {
|
||||
const name = row.name
|
||||
this.$modal.confirm('确定删除"' + name + '"的会员信息?').then(function() {
|
||||
// return deleteMember(row.id);
|
||||
return delCertifiedMember(row.id);
|
||||
}).then(() => {
|
||||
this.getListMember();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
// console.log(file, fileList);
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
|
@ -216,7 +216,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10" style="display: flex;margin-bottom: 20px">
|
||||
<el-col :span="9" style="display: flex;margin-bottom: 20px">
|
||||
<template>
|
||||
<span style="margin-right: 10px">核销权限</span>
|
||||
<el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox">
|
||||
@ -229,7 +229,20 @@
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-col>
|
||||
<el-col :span="14" style="display: flex">
|
||||
<el-col :span="15" style="display: flex">
|
||||
<span style="margin-right: 10px">审核权限</span>
|
||||
<el-checkbox-group v-model="auditPrem" @change="getCheckbox">
|
||||
<el-checkbox
|
||||
v-for="dict in dict.type.shqx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" style="display: flex;margin-bottom: 10px">
|
||||
<span style="margin-right: 10px">特殊权限</span>
|
||||
<el-checkbox-group v-model="specialPrem" @change="getCheckbox">
|
||||
<el-checkbox
|
||||
@ -258,7 +271,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">加油时选择加油员场景使用,选择不显示加油员将无法被指定<br/>(需系统开启加油选择加油员功能)终端支持:(PC、POS、小程序)</div>
|
||||
<span>加油时选择加油员场景使用,选择...</span>
|
||||
<span>加油时选择加油员场...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -278,7 +291,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 启用后,当前账户登录POS端后油品收银必选加油员才可进行<br/>下步操作(需系统开启加油选择加油员功能) </div>
|
||||
<span>启用后,当前账户登录POS端后油...</span>
|
||||
<span>启用后,当前账户登录...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -298,7 +311,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 交易订单显示信息、终端支持:(PC、<br/>POS、小程序) </div>
|
||||
<span>交易订单显示信息、终端支持:(PC...</span>
|
||||
<span>交易订单显示信息...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -320,7 +333,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 收款成功接收的公众号模板消息通知,需<br/>关注公众号,且本站小程序中会员手机号<br/>信息与当前员工手机号一致 </div>
|
||||
<span>收款成功接收的公众号模板消息...</span>
|
||||
<span>收款成功接收的...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -335,7 +348,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
<br/>
|
||||
<span> 多选,已选油枪号的交易将发送模板消息 </span>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">多选,已选油枪号的交易将发送<br/>模板消息)</div>
|
||||
<span>多选,已选油枪号...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -354,7 +373,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">当前账户下可查看交易的时间范围(PC、<br/>POS端)</div>
|
||||
<span>当前账户下可查看交易的时间范...</span>
|
||||
<span>当前账户下可查看...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -390,7 +409,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 若无权限,则无法查看交班统计信息和<br/>进行交班操作 </div>
|
||||
<span>若无权限,则无法查看交班统计...</span>
|
||||
<span>若无权限,则无法查看...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -405,7 +424,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
<br/>
|
||||
<span> 进行交班处理后是否退出当前账户 </span>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 进行交班处理后是否退出当前账户 </div>
|
||||
<span>进行交班处理后是否...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -426,7 +451,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 全部记录:查看所有员工交班记录,名下<br/>记录:员工自己名下记录(需有交班权限才可查看),<br/>禁用权限:无权限查看交班记录,记录为空 </div>
|
||||
<span>全部记录:查看所有员工交班记录...</span>
|
||||
<span>全部记录:查看所有...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -446,7 +471,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 交班信息是否显示商户号统计信息,禁<br/>用后当前员工则无商户号统计信息 </div>
|
||||
<span>交班信息是否显示商户号统计信...</span>
|
||||
<span>交班信息是否显示商...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -466,7 +491,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 交易信息是否可以筛选员工进行查<br/>询,启用后可筛选、则反之 </div>
|
||||
<span>交易信息是否可以筛选员工进行...</span>
|
||||
<span>交易信息是否可以...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -482,7 +507,13 @@
|
||||
@change="handleNodeClick1"
|
||||
clearable></el-cascader>
|
||||
<br/>
|
||||
<span> POS手持机中功能对应操作权限 </span>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> POS手持机中功能对应操作权限 </div>
|
||||
<span>POS手持机中...</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -496,7 +527,13 @@
|
||||
@change="handleNodeClick2"
|
||||
clearable></el-cascader>
|
||||
<br/>
|
||||
<span> 小程序管理端功能对应操作权限 </span>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 小程序管理端功能对应操作权限 </div>
|
||||
<span>小程序管理端功能...</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -516,7 +553,7 @@
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content"> 状态禁用后,当前账户则无法进行<br/>登录和操作</div>
|
||||
<span>状态禁用后,当前账户则无法进行登...</span>
|
||||
<span>状态禁用后,当前账户...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -545,7 +582,7 @@ import {getDuty, listDuty} from "@/api/staff/duty";
|
||||
export default {
|
||||
name: "StaffList",
|
||||
dicts: ['ywqx','write_off','display','zhzt','transaction','time_frame','handover','handover_quit',
|
||||
'jbjl','official','notice','special_prem','role'],
|
||||
'jbjl','official','notice','special_prem','role','shqx'],
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
@ -582,6 +619,7 @@ export default {
|
||||
writeOff:[],
|
||||
write:[],
|
||||
specialPrem:[],
|
||||
auditPrem:[],
|
||||
special:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
@ -598,7 +636,7 @@ export default {
|
||||
id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'',
|
||||
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl',
|
||||
merchantStatus:'qy',screen:'qy', posPrem:'', appletPrem:'', notice:'advice_jy', oilGunId:'', timeFrame:'bx', refund:'yqx',
|
||||
transaction:'qbjy', writeOff:'',specialPrem:'', official:'', status:'qy',pos:'jy',role:''
|
||||
transaction:'qbjy', writeOff:'',auditPrem:'',specialPrem:'', official:'', status:'qy',pos:'jy',role:''
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
@ -678,6 +716,7 @@ export default {
|
||||
getCheckbox(){
|
||||
this.form.writeOff = this.writeOff.toString();
|
||||
this.form.specialPrem = this.specialPrem.toString();
|
||||
this.form.auditPrem = this.auditPrem.toString();
|
||||
},
|
||||
// 页面跳转
|
||||
toTarget(url) {
|
||||
@ -690,20 +729,9 @@ export default {
|
||||
listStaff(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
console.log(response)
|
||||
// response.data.records.forEach(item=>{
|
||||
// this.categoryOptions.push(item.category)
|
||||
// })
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
// getStaffList(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
// this.list = response.data.paginationResponse.content;
|
||||
// this.total = response.data.paginationResponse.totalElements;
|
||||
// this.categoryOptions = response.data.categoryList;
|
||||
// this.loading = false;
|
||||
// }
|
||||
// );
|
||||
},
|
||||
// 查询角色列表
|
||||
getDuty(){
|
||||
@ -717,10 +745,6 @@ export default {
|
||||
this.storeOptions = response.data.records;
|
||||
}
|
||||
);
|
||||
// searchStore().then(response => {
|
||||
// this.storeOptions = response.data.storeList;
|
||||
// }
|
||||
// );
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
@ -767,12 +791,13 @@ export default {
|
||||
reset() {
|
||||
this.posPrem = '';
|
||||
this.appletPrem = '';
|
||||
this.writeOff = []
|
||||
this.writeOff = [];
|
||||
this.auditPrem = [];
|
||||
this.form = {
|
||||
id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'A',
|
||||
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl',
|
||||
merchantStatus:'qy',screen:'qy', posPrem:'', appletPrem:'', notice:'advice_jy', oilGunId:'', timeFrame:'bx', refund:'yqx',
|
||||
transaction:'qbjy', writeOff:'',specialPrem:'', official:'', status:'qy',pos:'jy',role:''
|
||||
transaction:'qbjy', writeOff:'',auditPrem:'',specialPrem:'', official:'', status:'qy',pos:'jy',role:''
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -815,6 +840,7 @@ export default {
|
||||
this.title = "编辑员工信息";
|
||||
this.writeOff = this.form.writeOff.split(",");
|
||||
this.specialPrem = this.form.specialPrem.split(",");
|
||||
this.auditPrem = this.form.auditPrem.split(",");
|
||||
this.posPrem = JSON.parse(this.form.posPrem);
|
||||
this.appletPrem = JSON.parse(this.form.appletPrem);
|
||||
});
|
||||
|
@ -107,6 +107,9 @@ public class LJStaff extends BaseEntity implements Serializable {
|
||||
@ApiModelProperty("核销权限,1:洗车卡券;2:兑换券")
|
||||
private String writeOff;
|
||||
|
||||
@ApiModelProperty("审核权限")
|
||||
private String auditPrem;
|
||||
|
||||
@ApiModelProperty("特殊权限,1:PC后台管理;2:POS收银系统;3:PC收银权限;4:小程序端报表")
|
||||
private String specialPrem;
|
||||
|
||||
|
@ -37,13 +37,11 @@
|
||||
<result property="status" column="status" />
|
||||
<result property="pos" column="pos" />
|
||||
<result property="role" column="role" />
|
||||
<result property="auditPrem" column="audit_prem" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMtStaff">
|
||||
select id, merchant_id, store_id, user_id, category, mobile, real_name, wechat, create_time, update_time,
|
||||
audited_status, audited_time, description, create_by, update_by, is_refuel, handover_mode, handover_prem,
|
||||
handover_out, record, merchant_status, screen, pos_prem, applet_prem, notice, oil_gun_id, time_frame, refund,
|
||||
transaction, write_off, special_prem, official,status,pos,role from mt_staff
|
||||
select * from mt_staff
|
||||
</sql>
|
||||
<!--根据条件分页查询用户信息-->
|
||||
<select id="selectLJStaffList" resultMap="LJStaffResult">
|
||||
|
@ -41,11 +41,22 @@ public class CertifiedMemberController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject staffInfo(@PathVariable Integer id){
|
||||
public ResponseObject certifiedMemberInfo(@PathVariable Integer id){
|
||||
CertifiedMember certifiedMember = certifiedMemberService.selectCertifiedMemberById(id);
|
||||
return getSuccessResult(certifiedMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据会员id查询固定等级信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/userId/{userId}")
|
||||
public ResponseObject certifiedMemberByUserId(@PathVariable Integer userId){
|
||||
CertifiedMember certifiedMember = certifiedMemberService.selectCertifiedMemberByUserId(userId);
|
||||
return getSuccessResult(certifiedMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除固定等级信息
|
||||
* @return
|
||||
|
@ -58,6 +58,18 @@ public class LJUserController extends BaseController {
|
||||
return getSuccessResult(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询会员信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/mobile")
|
||||
public ResponseObject userInfoByMobile(@Validated @RequestBody Map<String ,String > map){
|
||||
String mobile = map.get("mobile");
|
||||
LJUser user = userService.selectUserByMobile(mobile);
|
||||
return getSuccessResult(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除会员信息
|
||||
* @return
|
||||
|
@ -9,7 +9,7 @@
|
||||
<include refid="selectCertifiedMember"></include>
|
||||
<where>
|
||||
<if test="certifiedMember.mobile != null and certifiedMember.mobile != ''">
|
||||
and mobile = #{certifiedMember.mobile}
|
||||
and mobile like concat('%', #{certifiedMember.mobile}, '%')
|
||||
</if>
|
||||
<if test="certifiedMember.fixingLevelId != null and certifiedMember.fixingLevelId != ''">
|
||||
and fixing_level_id = #{certifiedMember.fixingLevelId}
|
||||
|
@ -23,6 +23,13 @@ public interface CertifiedMemberService extends IService<CertifiedMember> {
|
||||
*/
|
||||
public CertifiedMember selectCertifiedMemberById(int id);
|
||||
|
||||
/**
|
||||
* 根据会员id查询认证会员信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public CertifiedMember selectCertifiedMemberByUserId(int userId);
|
||||
|
||||
/**
|
||||
* 根据id删除认证会员信息
|
||||
* @param id
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.business.userManager.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -40,6 +41,19 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据会员id查询认证会员信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CertifiedMember selectCertifiedMemberByUserId(int userId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("user_id",userId);
|
||||
CertifiedMember certifiedMember = baseMapper.selectOne(queryWrapper);
|
||||
return certifiedMember;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除固定等级信息
|
||||
* @param id
|
||||
|
@ -15,10 +15,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.xml.crypto.Data;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 会员信息 业务层
|
||||
|
Loading…
Reference in New Issue
Block a user