This commit is contained in:
wangh 2024-01-13 15:04:49 +08:00
commit 99571f64ad
5 changed files with 27 additions and 19 deletions

View File

@ -23,10 +23,10 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
/**
* 根据店铺id查询所有会员信息
* @param storeId
* @param chainStoreId
* @return
*/
public List<LJUserVo> queryUserList(@Param("storeId") int storeId);
public List<LJUserVo> queryUserList(@Param("chainStoreId") int chainStoreId);
/**
* 根据手机号和连锁店id查询会员信息

View File

@ -156,9 +156,9 @@
</where>
</select>
<select id="queryUserList" resultType="com.fuint.business.userManager.vo.LJUserVo" parameterType="int">
<include refid="selectUser"></include>
<include refid="selectUserAndBalance"></include>
<where>
mi.storeId = #{storeId}
mub.chain_store_id = #{chainStoreId}
</where>
</select>
<select id="userNum" resultType="java.lang.Integer">

View File

@ -82,8 +82,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
@Override
public List<LJUserVo> selectUsersList() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
List<LJUserVo> list = baseMapper.queryUserList(storeId);
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
List<LJUserVo> list = baseMapper.queryUserList(store.getChainStoreId());
return list;
}

View File

@ -70,9 +70,9 @@ export function delUser(id) {
}
//下载示例文件
export function exportUsers() {
export function queryUsers() {
return request({
url: '/excel/export',
url: '/business/userManager/user/userList',
method: 'get'
})
}

View File

@ -146,7 +146,7 @@
<template slot-scope="props">
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
<el-form-item label="用户信息">
<span>{{ props.row.userId ? queryUser(props.row.userId):"--" }}</span>
<span>{{ props.row.userId ? queryUser(userList,props.row.userId):"--" }}</span>
</el-form-item>
<el-form-item label="收银员">
<span>{{ queryStaf(staffList,props.row.staffId) }}</span>
@ -262,7 +262,7 @@
import {getDicts} from "@/api/dict/data";
import {getOilNameList, getOilNumGun } from "@/api/cashier/oilnumgun";
import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/cashier/oilorder";
import {getUser} from "@/api/cashier/user/user";
import {getUser, queryUsers} from "@/api/cashier/user/user";
import {oilNumberList, oilNumbers} from "@/api/cashier/oilnumber";
import {getOilGuns, getOilNumberGun} from "@/api/cashier/oilGuns";
@ -270,6 +270,8 @@
name: "order_Cashier",
data(){
return{
//
userName:"",
oilOrder:{},
// 退
password:"",
@ -298,6 +300,8 @@
total:0,
//
oilGunList:[],
//
userList:[],
orderStatistics: {
numberOfOilPens:'0',
@ -317,12 +321,17 @@
this.getList();
this.getPayType();
this.getOilGunList();
this.getUserList();
},
methods:{
getUserList(){
queryUsers().then(res => {
this.userList = res.data
})
},
//
getOilGunList(){
getOilNumberGun().then(res => {
console.log(res)
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
@ -380,14 +389,13 @@
return name;
},
// id
async queryUser(id){
let result = "";
if (id!=null && id!=""){
let data = await getUser(id);
result = data.data.name + "|" + data.data.mobile
queryUser(list,id){
list.forEach(item => {
if (item.id == id){
this.userName = item.name + "|" + item.mobile
}
console.log(result)
return result.toString();
})
return this.userName;
},
getVal(list,val){
let name = "";