会员管理 固定等级

This commit is contained in:
cun-nan 2023-10-24 14:00:29 +08:00
parent f95867e000
commit 7e2c047e4d
13 changed files with 470 additions and 74 deletions

View File

@ -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) { export function addCertifiedMember(data) {
return request({ return request({

View File

@ -25,6 +25,14 @@ export function getUser(id) {
method: 'get' method: 'get'
}) })
} }
// 查询会员详细
export function getUserMobile(data) {
return request({
url: '/business/userManager/user/mobile' ,
method: 'post',
data: data
})
}
// 新增会员 // 新增会员
export function addUser(data) { export function addUser(data) {

View File

@ -3,33 +3,40 @@
<el-card> <el-card>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="认证会员" name="member"> <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-form-item label="手机号" prop="mobile">
<el-input <el-input
v-model="queryParams.mobile" v-model="queryParam.mobile"
placeholder="请输入会员手机号" placeholder="请输入会员手机号"
clearable clearable
style="width: 240px;" style="width: 240px;"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="认证类型" prop="type"> <el-form-item label="认证类型" prop="fixingLevelId">
<el-input <el-select
v-model="queryParams.type" v-model="queryParam.fixingLevelId"
placeholder="请选择认证类型" placeholder="请选择"
clearable clearable
style="width: 240px;" style="width: 300px"
@keyup.enter.native="handleQuery" >
/> <el-option v-for="item in fixingLevelList" :key="item.id+''" :label="item.name" :value="item.id+''"/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="认证状态" prop="status"> <el-form-item label="认证状态" prop="status">
<el-input <el-select
v-model="queryParams.status" v-model="queryParam.status"
placeholder="全部" placeholder="全部"
clearable clearable
style="width: 240px;" style="width: 240px"
@keyup.enter.native="handleQuery" >
/> <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-form-item> <el-form-item>
<el-date-picker <el-date-picker
@ -45,13 +52,13 @@
</el-form-item> </el-form-item>
<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-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="固定等级认证" name="fixingLevel"> <el-tab-pane label="固定等级认证" name="fixingLevel">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <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 <el-select
v-model="queryParams.status" v-model="queryParams.status"
placeholder="全部" placeholder="全部"
@ -92,7 +99,7 @@
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAddMember"
v-hasPermi="['member:add']" v-hasPermi="['member:add']"
>新增用户认证</el-button> >新增用户认证</el-button>
<el-table ref="tables" v-loading="loading" :data="listMember" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> <el-table ref="tables" v-loading="loading" :data="listMember" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
@ -102,7 +109,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="手机号" align="center"prop="mobile"/> <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="name" />
<el-table-column label="车牌号" align="center" prop="carNumber"/> <el-table-column label="车牌号" align="center" prop="carNumber"/>
<el-table-column label="认证资料" align="center" prop="attestationData"/> <el-table-column label="认证资料" align="center" prop="attestationData"/>
@ -119,14 +130,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-hasPermi="['member:add']" v-hasPermi="['member:add']"
@click="handleUpdate(scope.row)" @click="handleUpdateMember(scope.row)"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
v-hasPermi="['member:add']" v-hasPermi="['member:add']"
@click="handleDelete(scope.row)" @click="handleDeleteMember(scope.row)"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -305,6 +316,137 @@
</div> </div>
</el-card> </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" <el-dialog :title="title" :visible.sync="open" class="roll-dialog"
@ -582,29 +724,45 @@ import {
listFixingLevel, listFixingLevel,
updateFixingLevel updateFixingLevel
} from "@/api/staff/user/fixinglevel"; } 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 { export default {
dicts: ['yhlx','yes_or_no','zhzt','yhhdz','rzzt'], dicts: ['yhlx','yes_or_no','zhzt','yhhdz','rzzt'],
data() { data() {
return { return {
isEdit:false,
//
dialogImageUrl: '',
dialogVisible: false,
mobile:'',
activeName: 'member', activeName: 'member',
// //
showSearch: true, showSearch: true,
// //
fixingLevelList:[], fixingLevelList:[],
//
userList:[],
mobile1:'',
// //
queryParams: { queryParams: {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
mobile: '',
id: '', id: '',
mobile:'',
type: '', type: '',
status: '', status: '',
},// },//
queryParam: { queryParam: {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
userId: '',
mobile: '', mobile: '',
id: '', id: '',
type: '', type: '',
@ -628,13 +786,18 @@ export default {
ids: [], ids: [],
// //
open: false, open: false,
openMember: false,
// //
form: { form: {
id: '', name: '',preferential:'自定义优惠',gasolineDiscount:'无优惠', id: '', name: '',discountType:'自定义优惠',gasolineDiscount:'无优惠',
dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'', dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'',
pointRule:'yes',refuelMoneyRule:'yes',growthValueRule:'yes',couponRule:'yes', pointRule:'yes',refuelMoneyRule:'yes',growthValueRule:'yes',couponRule:'yes',
storeValue:'yes',process:'bsh',status: 'qy' storeValue:'yes',process:'bsh',status: 'qy'
}, },
form1:{
id: '', name: '',mobile:'',carNumber:'',userId:'',
attestationData:'',remark:'',status: 'enable'
},
// //
gasolinePreferential:[ gasolinePreferential:[
{ {
@ -660,14 +823,53 @@ export default {
// //
rules: { rules: {
name: [ name: [
{ required: true, message: "等级名称不能为空", trigger: "blur" }, { required: true, message: "请填写认证名称", trigger: "blur" },
{ min: 2, max: 100, message: '等级名称长度必须介于2 和 100 之间', trigger: 'blur' }
], ],
preferential: [ discountType: [
{ required: true, message: "请选择优惠类型", trigger: "blur" }, { 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: [ 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() { created() {
this.getList(); this.getList();
this.getListMember(); this.getListMember();
this.getUserList();
}, },
methods: { methods: {
checkMobile(){
getUserMobile({mobile:this.form1.mobile}).then( response => {
if (response.data==null){
}
})
},
handleClick(tab, event) { handleClick(tab, event) {
// console.log(tab, event); // console.log(tab, event);
}, },
@ -685,6 +895,12 @@ export default {
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList(); this.getList();
}, },
//
handleQueryMember() {
this.queryParams.page = 1;
this.getListMember();
},
//
getList(){ getList(){
this.loading = true; this.loading = true;
listFixingLevel(this.addDateRange(this.queryParams, this.dateRange)).then( response => { listFixingLevel(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
@ -694,18 +910,30 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//
getListMember(){ getListMember(){
this.loading = true; this.loading = true;
listCertifiedMember(this.addDateRange(this.queryParam, this.dateRange)).then( response => { listCertifiedMember(this.addDateRange(this.queryParam, this.dateRange)).then( response => {
console.log(response)
this.listMember = response.data.records; this.listMember = response.data.records;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
},
//
getUserList(){
listUser(this.addDateRange({mobile:this.mobile1})).then( response => {
this.userList = response.data.records;
});
}, },
// //
reset() { 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=[ this.gasolinePreferential=[
{ {
gasolineRule1:1, gasolineRule1:1,
@ -729,11 +957,24 @@ export default {
], ],
this.resetForm("form"); this.resetForm("form");
}, },
//
reset1() {
this.form1 = {
id: '', name: '',mobile:'',carNumber:'',userId:'',
attestationData:'',remark:'',status: 'enable'
};
this.resetForm("form1");
},
// //
handleAdd() { handleAdd() {
this.open = true; this.open = true;
this.title = "新增认证类型"; this.title = "新增认证类型";
}, },
//
handleAddMember() {
this.openMember = true;
this.title = "新增用户认证";
},
// //
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
@ -744,11 +985,28 @@ export default {
this.title = "编辑认证类型"; 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() { cancel() {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
//
cancelMember() {
this.openMember = false;
this.reset1();
this.isEdit = false;
},
// //
submitForm: function() { submitForm: function() {
this.$refs["form"].validate(valid => { 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) { handleDelete(row) {
const name = row.name const name = row.name
@ -783,6 +1076,24 @@ export default {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).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) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)

View File

@ -216,7 +216,7 @@
</el-col> </el-col>
</el-row> </el-row>
<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> <template>
<span style="margin-right: 10px">核销权限</span> <span style="margin-right: 10px">核销权限</span>
<el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox"> <el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox">
@ -229,7 +229,20 @@
</el-checkbox-group> </el-checkbox-group>
</template> </template>
</el-col> </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> <span style="margin-right: 10px">特殊权限</span>
<el-checkbox-group v-model="specialPrem" @change="getCheckbox"> <el-checkbox-group v-model="specialPrem" @change="getCheckbox">
<el-checkbox <el-checkbox
@ -258,7 +271,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content">加油时选择加油员场景使用,选择不显示加油员将无法被指定<br/>(需系统开启加油选择加油员功能)终端支持:(PCPOS小程序)</div> <div slot="content">加油时选择加油员场景使用,选择不显示加油员将无法被指定<br/>(需系统开启加油选择加油员功能)终端支持:(PCPOS小程序)</div>
<span>加油时选择加油员场景使用,选择...</span> <span>加油时选择加油员场...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -278,7 +291,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 启用后,当前账户登录POS端后油品收银必选加油员才可进行<br/>下步操作(需系统开启加油选择加油员功能) </div> <div slot="content"> 启用后,当前账户登录POS端后油品收银必选加油员才可进行<br/>下步操作(需系统开启加油选择加油员功能) </div>
<span>启用后,当前账户登录POS端后油...</span> <span>启用后,当前账户登录...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -298,7 +311,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 交易订单显示信息终端支持:(PC<br/>POS小程序) </div> <div slot="content"> 交易订单显示信息终端支持:(PC<br/>POS小程序) </div>
<span>交易订单显示信息终端支持:(PC...</span> <span>交易订单显示信息...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -320,7 +333,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 收款成功接收的公众号模板消息通知,<br/>关注公众号,且本站小程序中会员手机号<br/>信息与当前员工手机号一致 </div> <div slot="content"> 收款成功接收的公众号模板消息通知,<br/>关注公众号,且本站小程序中会员手机号<br/>信息与当前员工手机号一致 </div>
<span>收款成功接收的公众号模板消息...</span> <span>收款成功接收的...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -335,7 +348,13 @@
/> />
</el-select> </el-select>
<br/> <br/>
<span> 多选,已选油枪号的交易将发送模板消息 </span> <el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content">多选,已选油枪号的交易将发送<br/>模板消息)</div>
<span>多选,已选油枪号...</span>
</el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -354,7 +373,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content">当前账户下可查看交易的时间范围(PC<br/>POS端)</div> <div slot="content">当前账户下可查看交易的时间范围(PC<br/>POS端)</div>
<span>当前账户下可查看交易的时间范...</span> <span>当前账户下可查看...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -390,7 +409,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 若无权限,则无法查看交班统计信息和<br/>进行交班操作 </div> <div slot="content"> 若无权限,则无法查看交班统计信息和<br/>进行交班操作 </div>
<span>若无权限,则无法查看交班统计...</span> <span>若无权限,则无法查看...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -405,7 +424,13 @@
/> />
</el-select> </el-select>
<br/> <br/>
<span> 进行交班处理后是否退出当前账户 </span> <el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 进行交班处理后是否退出当前账户 </div>
<span>进行交班处理后是否...</span>
</el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -426,7 +451,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 全部记录:查看所有员工交班记录,名下<br/>记录:员工自己名下记录(需有交班权限才可查看),<br/>禁用权限:无权限查看交班记录,记录为空 </div> <div slot="content"> 全部记录:查看所有员工交班记录,名下<br/>记录:员工自己名下记录(需有交班权限才可查看),<br/>禁用权限:无权限查看交班记录,记录为空 </div>
<span>全部记录:查看所有员工交班记录...</span> <span>全部记录:查看所有...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -446,7 +471,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 交班信息是否显示商户号统计信息,<br/>用后当前员工则无商户号统计信息 </div> <div slot="content"> 交班信息是否显示商户号统计信息,<br/>用后当前员工则无商户号统计信息 </div>
<span>交班信息是否显示商户号统计信...</span> <span>交班信息是否显示商...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -466,7 +491,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 交易信息是否可以筛选员工进行查<br/>,启用后可筛选则反之 </div> <div slot="content"> 交易信息是否可以筛选员工进行查<br/>,启用后可筛选则反之 </div>
<span>交易信息是否可以筛选员工进行...</span> <span>交易信息是否可以...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -482,7 +507,13 @@
@change="handleNodeClick1" @change="handleNodeClick1"
clearable></el-cascader> clearable></el-cascader>
<br/> <br/>
<span> POS手持机中功能对应操作权限 </span> <el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> POS手持机中功能对应操作权限 </div>
<span>POS手持机中...</span>
</el-tooltip>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -496,7 +527,13 @@
@change="handleNodeClick2" @change="handleNodeClick2"
clearable></el-cascader> clearable></el-cascader>
<br/> <br/>
<span> 小程序管理端功能对应操作权限 </span> <el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 小程序管理端功能对应操作权限 </div>
<span>小程序管理端功能...</span>
</el-tooltip>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -516,7 +553,7 @@
effect="dark" effect="dark"
placement="bottom"> placement="bottom">
<div slot="content"> 状态禁用后,当前账户则无法进行<br/>登录和操作</div> <div slot="content"> 状态禁用后,当前账户则无法进行<br/>登录和操作</div>
<span>状态禁用后,当前账户则无法进行登...</span> <span>状态禁用后,当前账户...</span>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -545,7 +582,7 @@ import {getDuty, listDuty} from "@/api/staff/duty";
export default { export default {
name: "StaffList", name: "StaffList",
dicts: ['ywqx','write_off','display','zhzt','transaction','time_frame','handover','handover_quit', 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() { data() {
return { return {
drawer: false, drawer: false,
@ -582,6 +619,7 @@ export default {
writeOff:[], writeOff:[],
write:[], write:[],
specialPrem:[], specialPrem:[],
auditPrem:[],
special:[], special:[],
// //
total: 0, total: 0,
@ -598,7 +636,7 @@ export default {
id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'', id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'',
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl', 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', 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: { queryParams: {
@ -678,6 +716,7 @@ export default {
getCheckbox(){ getCheckbox(){
this.form.writeOff = this.writeOff.toString(); this.form.writeOff = this.writeOff.toString();
this.form.specialPrem = this.specialPrem.toString(); this.form.specialPrem = this.specialPrem.toString();
this.form.auditPrem = this.auditPrem.toString();
}, },
// //
toTarget(url) { toTarget(url) {
@ -690,20 +729,9 @@ export default {
listStaff(this.addDateRange(this.queryParams, this.dateRange)).then(response => { listStaff(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.data.records; this.list = response.data.records;
this.total = response.data.total; this.total = response.data.total;
console.log(response)
// response.data.records.forEach(item=>{
// this.categoryOptions.push(item.category)
// })
this.loading = false; 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(){ getDuty(){
@ -717,10 +745,6 @@ export default {
this.storeOptions = response.data.records; this.storeOptions = response.data.records;
} }
); );
// searchStore().then(response => {
// this.storeOptions = response.data.storeList;
// }
// );
}, },
// //
handleQuery() { handleQuery() {
@ -767,12 +791,13 @@ export default {
reset() { reset() {
this.posPrem = ''; this.posPrem = '';
this.appletPrem = ''; this.appletPrem = '';
this.writeOff = [] this.writeOff = [];
this.auditPrem = [];
this.form = { this.form = {
id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'A', id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'A',
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl', 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', 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"); this.resetForm("form");
}, },
@ -815,6 +840,7 @@ export default {
this.title = "编辑员工信息"; this.title = "编辑员工信息";
this.writeOff = this.form.writeOff.split(","); this.writeOff = this.form.writeOff.split(",");
this.specialPrem = this.form.specialPrem.split(","); this.specialPrem = this.form.specialPrem.split(",");
this.auditPrem = this.form.auditPrem.split(",");
this.posPrem = JSON.parse(this.form.posPrem); this.posPrem = JSON.parse(this.form.posPrem);
this.appletPrem = JSON.parse(this.form.appletPrem); this.appletPrem = JSON.parse(this.form.appletPrem);
}); });

View File

@ -107,6 +107,9 @@ public class LJStaff extends BaseEntity implements Serializable {
@ApiModelProperty("核销权限1洗车卡券2兑换券") @ApiModelProperty("核销权限1洗车卡券2兑换券")
private String writeOff; private String writeOff;
@ApiModelProperty("审核权限")
private String auditPrem;
@ApiModelProperty("特殊权限1PC后台管理2POS收银系统3PC收银权限4小程序端报表") @ApiModelProperty("特殊权限1PC后台管理2POS收银系统3PC收银权限4小程序端报表")
private String specialPrem; private String specialPrem;

View File

@ -37,13 +37,11 @@
<result property="status" column="status" /> <result property="status" column="status" />
<result property="pos" column="pos" /> <result property="pos" column="pos" />
<result property="role" column="role" /> <result property="role" column="role" />
<result property="auditPrem" column="audit_prem" />
</resultMap> </resultMap>
<sql id="selectMtStaff"> <sql id="selectMtStaff">
select id, merchant_id, store_id, user_id, category, mobile, real_name, wechat, create_time, update_time, select * from mt_staff
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
</sql> </sql>
<!--根据条件分页查询用户信息--> <!--根据条件分页查询用户信息-->
<select id="selectLJStaffList" resultMap="LJStaffResult"> <select id="selectLJStaffList" resultMap="LJStaffResult">

View File

@ -41,11 +41,22 @@ public class CertifiedMemberController extends BaseController {
* @return * @return
*/ */
@GetMapping("/{id}") @GetMapping("/{id}")
public ResponseObject staffInfo(@PathVariable Integer id){ public ResponseObject certifiedMemberInfo(@PathVariable Integer id){
CertifiedMember certifiedMember = certifiedMemberService.selectCertifiedMemberById(id); CertifiedMember certifiedMember = certifiedMemberService.selectCertifiedMemberById(id);
return getSuccessResult(certifiedMember); 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 * @return

View File

@ -58,6 +58,18 @@ public class LJUserController extends BaseController {
return getSuccessResult(user); 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 * @return

View File

@ -9,7 +9,7 @@
<include refid="selectCertifiedMember"></include> <include refid="selectCertifiedMember"></include>
<where> <where>
<if test="certifiedMember.mobile != null and certifiedMember.mobile != ''"> <if test="certifiedMember.mobile != null and certifiedMember.mobile != ''">
and mobile = #{certifiedMember.mobile} and mobile like concat('%', #{certifiedMember.mobile}, '%')
</if> </if>
<if test="certifiedMember.fixingLevelId != null and certifiedMember.fixingLevelId != ''"> <if test="certifiedMember.fixingLevelId != null and certifiedMember.fixingLevelId != ''">
and fixing_level_id = #{certifiedMember.fixingLevelId} and fixing_level_id = #{certifiedMember.fixingLevelId}

View File

@ -23,6 +23,13 @@ public interface CertifiedMemberService extends IService<CertifiedMember> {
*/ */
public CertifiedMember selectCertifiedMemberById(int id); public CertifiedMember selectCertifiedMemberById(int id);
/**
* 根据会员id查询认证会员信息
* @param userId
* @return
*/
public CertifiedMember selectCertifiedMemberByUserId(int userId);
/** /**
* 根据id删除认证会员信息 * 根据id删除认证会员信息
* @param id * @param id

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.userManager.entity.LJUser; import com.fuint.business.userManager.entity.LJUser;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**

View File

@ -2,6 +2,7 @@ package com.fuint.business.userManager.service.impl;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -40,6 +41,19 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
return baseMapper.selectById(id); 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删除固定等级信息 * 根据id删除固定等级信息
* @param id * @param id

View File

@ -15,10 +15,7 @@ import org.springframework.stereotype.Service;
import javax.xml.crypto.Data; import javax.xml.crypto.Data;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/** /**
* 会员信息 业务层 * 会员信息 业务层