This commit is contained in:
许gitee 2025-01-12 14:17:15 +08:00
parent d109e36539
commit 94725edb22
23 changed files with 1016 additions and 284 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -21,13 +21,12 @@ const routes = [
path: '/home',
name: '首页',
component: () => import('../views/home/index'),
children:[
{
path: '/welcome',
name: 'welcome',
component: () => import('../views/welcome/index')
},
]
},
{
path: '/welcome',
name: 'welcome',
component: () => import('../views/welcome/index')
},
{
@ -51,11 +50,26 @@ const routes = [
name: '商品分类',
component: () => import('../views/category/index')
},
{
path: '/businessProduct',
name: '商家商品',
component: () => import('../views/businessProduct/index')
},
{
path: '/message',
name: '消息通知',
component: () => import('../views/message/index')
},
{
path: '/user',
name: '用户',
component: () => import('../views/user/index')
},
{
path: '/permission',
name: '用户权限',
component: () => import('../views/permission/index')
},
{
path: '/employee',
name: '美甲师',

View File

@ -2,7 +2,7 @@
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-input placeholder="请输入用户昵称..." clearable v-model="formPage.businessName"></el-input>
<el-input placeholder="请输入商家昵称..." clearable v-model="formPage.businessName"></el-input>
</el-col>
<el-button type="button" :icon="Search" @click="initBusinessList">搜索</el-button>
<el-button type="primary" :icon="DocumentAdd" @click="handleAddDialogValue()" >添加商家</el-button>
@ -31,15 +31,22 @@
</el-table-column>
<el-table-column prop="businessPhone" label="电话号码" width="120" />
<el-table-column prop="state" label="状态" width="80">
<template v-slot="scope">
<div v-if="scope.row.state===0" style="color: red">
禁用
</div>
<div style="color: lawngreen" v-else>
启用
</div>
</template>
<template v-slot="scope" >
<div v-if="scope.row.state==3">
<el-switch
disabled
style=" color: #ff4949"
/></div>
<div v-else>
<el-switch
v-model="scope.row.state"
@change="updateSwtich(scope.row)"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
/>
</div>
</template>
</el-table-column>
<el-table-column prop="storeStatus" label="店铺状态" width="80">
<template v-slot="scope">
@ -117,6 +124,30 @@ const BdialogUpdateVisible=ref(false)
const tempUpdate=ref({
id: null,
businessPhone: "",
businessName: "",
state: null
})
const updateSwtich= async (item)=>{
tempUpdate.value.id=item.id
tempUpdate.value.businessName=item.businessName
tempUpdate.value.businessPhone=item.businessPhone
if (item.state==false){
tempUpdate.value.state=2
}
else {
tempUpdate.value.state=1
}
console.log(item)
let result = await axios.post("business/update", tempUpdate.value)
console.log(result.data)
}
const handleClick=(id)=>{
bussinessId.value=id;
// console.log(bussinessId.value)
@ -167,43 +198,52 @@ const total=ref(0)
const tableData =ref([])
const handleCollapse=async (temp)=>{
console.log(temp)
const res=await axios.post("business/list");
RCollapse.value.splice(0,RCollapse.value.length);
LCollapse.value.splice(0,LCollapse.value.length);
// console.log(res.data.data.records)
tableData.value=res.data.data;
tableData.value.forEach(item => {
if(item.state){
RCollapse.value.push(item)
}
else{
LCollapse.value.push(item)
}
//console.log(item.state);
});
console.log("RCollapse"+RCollapse.value);
console.log("LCollapse"+LCollapse.value);
if (temp){
tableData.value=RCollapse.value
total.value=Number(RCollapse.value.length);
}else {
tableData.value=LCollapse.value
total.value=Number(LCollapse.value.length);
}
}
// const handleCollapse=async (temp)=>{
// console.log(temp)
// const res=await axios.post("business/list");
// RCollapse.value.splice(0,RCollapse.value.length);
// LCollapse.value.splice(0,LCollapse.value.length);
// // console.log(res.data.data.records)
// tableData.value=res.data.data;
// tableData.value.forEach(item => {
// if(item.state){
// RCollapse.value.push(item)
// }
// else{
// LCollapse.value.push(item)
// }
//
// //console.log(item.state);
// });
// console.log("RCollapse"+RCollapse.value);
// console.log("LCollapse"+LCollapse.value);
// if (temp){
// tableData.value=RCollapse.value
// total.value=Number(RCollapse.value.length);
// }else {
// tableData.value=LCollapse.value
// total.value=Number(LCollapse.value.length);
// }
// }
const initBusinessList=async()=>{
// console.log(formPage.value)
const res=await axios.post("business/list/page",formPage.value);
// console.log(res.data.data.records)
isCollapse.value=undefined;
tableData.value=res.data.data.records;
total.value=Number(res.data.data.total);
// isCollapse.value=undefined;
tableData.value=res.data.data.records;
tableData.value.map(item=>{
if(item.state==1)
{
item.state=true
}
else if(item.state==2){
item.state=false
}else{
item.state=3
}
})
total.value=Number(res.data.data.total);
console.log(tableData.value)
}

View File

@ -85,7 +85,6 @@
import {Search,DocumentAdd,Edit} from '@element-plus/icons-vue'
import {ref, watch} from 'vue'
import axios from "@/util/axios";
import { ElNotification } from 'element-plus'
import Dialog from '@/views/business/dialog/index.vue'
import AddDialog from '@/views/business/addDialog/index.vue'
import UpdateDialog from '@/views/business/updateDialog/index.vue'
@ -93,7 +92,6 @@ import UpdateDialog from '@/views/business/updateDialog/index.vue'
import axiosUtil from "@/util/axios";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router"
import {request} from "axios";
const isCollapse=ref(false);
const RCollapse=ref([]);

View File

@ -0,0 +1,172 @@
<template>
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-input placeholder="请输入商家昵称..." clearable v-model="formPage.businessName"></el-input>
</el-col>
<el-button type="button" :icon="Search" @click="initBusinessList">搜索</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%;" showOverflowTooltip>
<el-table-column prop="id" label="#ID" width="80" fixed="fixed" />
<el-table-column prop="businessName" label="商家昵称" width="200" />
<el-table-column prop="businessAvatar" label="头像" width="150" >
<template v-slot="scope">
<el-popover
placement="right-start"
:width="200"
trigger="hover"
:content="scope.row.businessAvatar"
>
<template #reference>
<img :src="scope.row.businessAvatar" width="50" height="50"/>
</template>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="businessPhone" label="电话号码" width="120" />
<el-table-column prop="storeStatus" label="店铺状态" width="80">
<template v-slot="scope">
<div v-if="scope.row.storeStatus===0" style="color: red">
休业
</div>
<div style="color: lawngreen" v-else>
营业
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="注册日期" width="200"/>
<el-table-column prop="updateTime" label="最后登录日期" width="200"/>
<el-table-column prop="action" fixed="right" label="操作" min-width="200" >
<template v-slot="scope" >
<el-button type="success" size="small" @click="handleRouter(scope.row)" >
商品管理
</el-button>
<el-button type="success" size="small" @click="handleRouter2(scope.row)" >
商品分类
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
v-model:currentPage="formPage.current"
v-model:page-size="formPage.pageSize"
:page-sizes="[10, 20, 30, 40,50]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</el-card>
</template>
<script setup>
import {Search,DocumentAdd,Edit} from '@element-plus/icons-vue'
import {ref, watch} from 'vue'
import axios from "@/util/axios";
import {useRouter} from "vue-router"
// const isCollapse=ref(true);
// const RCollapse=ref([]);//
// const LCollapse=ref([]);//
const router=useRouter();
const handleRouter=(temp)=>{
//console.log(temp.id)
router.push({path:'/product',query:{product: JSON.stringify(temp)}})
}
const handleRouter2=(temp)=>{
console.log(temp.id)
router.push({path:'/productCategory',query:{product: JSON.stringify(temp)}})
}
const formPage=ref({
businessName:'',
current:1,
pageSize:10
})
const total=ref(0)
const tableData =ref([])
// const handleCollapse=async (temp)=>{
// console.log(temp)
// const res=await axios.post("business/list");
// RCollapse.value.splice(0,RCollapse.value.length);
// LCollapse.value.splice(0,LCollapse.value.length);
// // console.log(res.data.data.records)
// tableData.value=res.data.data;
// tableData.value.forEach(item => {
// if(item.state){
// RCollapse.value.push(item)
// }
// else{
// LCollapse.value.push(item)
// }
//
// });
// // console.log("RCollapse"+RCollapse.value);
// // console.log("LCollapse"+LCollapse.value);
// if (temp){
// tableData.value=RCollapse.value
// total.value=Number(RCollapse.value.length);
// }else {
// tableData.value=LCollapse.value
// total.value=Number(LCollapse.value.length);
// }
//
// }
const initBusinessList=async()=>{
// console.log(formPage.value)
const res=await axios.post("business/list/page",formPage.value);
// console.log(res.data.data.records)
tableData.value=res.data.data.records;
tableData.value.map(item=>{
if(item.state==0)
{
item.push()
}
})
total.value=Number(res.data.data.total);
}
initBusinessList();
const handleSizeChange = (pageSize) => {
formPage.value.current=1;
formPage.value.pageSize=pageSize;
initBusinessList();
}
const handleCurrentChange = (pageNum) => {
formPage.value.current=pageNum;
initBusinessList();
}
</script>
<style lang="scss" scoped>
.header{
padding-bottom: 16px;
box-sizing: border-box;
}
.el-pagination{
padding-top: 15px;
box-sizing: border-box;
}
</style>

View File

@ -1,43 +1,32 @@
<template>
<el-dialog
model-value="dialogaddVisible"
model-value="CdialogVisible"
:title="dialogTitle"
width="30%"
@close="handleClose"
>
<el-form
ref="formRef"
:model="form"
label-width="100px"
:rules="rules"
label-width="120px"
>
<el-form-item label="门店头像" prop="avatarUrl">
<el-upload list-type="picture-card" limit="1" :auto-upload="false" drag action="#">
<el-icon><Plus /></el-icon>
<template #tip>
<div class="el-upload__tip">
最多传一张
</div>
</template>
</el-upload>
<el-form-item label="商品分类名称:" >
<el-input v-model="form.groupName" />
</el-form-item>
<el-form-item label="用户昵称" prop="username">
<el-input v-model="form.username" />
<el-form-item label="关联商家ID" >
<el-input v-model="form.businessId" />
</el-form-item>
<el-form-item label="用户账号" prop="userAccount">
<el-input v-model="form.userAccount" />
<el-form-item label="是否置顶:" >
<el-input v-model="form.isTopping" />
</el-form-item>
<el-form-item label="用户密码" prop="userPassword">
<el-input v-model="form.userPassword" show-password />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</span>
<span class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</span>
</template>
</el-dialog>
</template>
@ -45,9 +34,6 @@
import {defineEmits, defineProps, ref, watch} from "vue";
import axios from "@/util/axios";
import { ElMessage } from "element-plus";
import { Delete, Download, Plus, ZoomIn } from '@element-plus/icons-vue'
const props=defineProps({
dialogTitle:{
type:String,
@ -56,48 +42,52 @@ const props=defineProps({
}
})
const form=ref({
avatarUrl:'',
userAccount:'',
userPassword:'',
username:null
businessId: null,
groupName: "",
isTopping: null
})
// const rules=ref({
// name: [
// {
// required: true,
// message: ''
// }
// ],
// remark: [
// {
// required: true,
// message: ''
// }
// ]
// })
const rules=ref({
businessId: [
{
required: true,
message: '请输入关联商家ID'
}
],
groupName: [
{
required: true,
message: '请输入商品大类名称!'
}
],
isTopping: [
{
required: true,
message: '是否置顶!'
}
]
})
const formRef=ref(null);
//
const emits=defineEmits(['update:modelValue','initUserList'])
const emits=defineEmits(['update:modelValue','initRatingList'])
const handleClose=()=>{
console.log("用户添加关闭xxx")
console.log("xxx")
//
emits('update:modelValue',false)
}
const handleConfirm=()=>{
formRef.value.validate(async(valid)=>{
if(valid){
let result=await axios.post("user/add",form.value)
console.log(result.data)
let result=await axios.post("group/add",form.value)
let data=result.data;
if(data.code==0){
ElMessage.success("执行添加成功!");
ElMessage.success("执行成功!");
formRef.value.resetFields();
emits("initUserList");
emits("initRatingList");
handleClose();
}else{
ElMessage.error(data.description);
ElMessage.error(data.msg);
}
}else{
console.log("fail")

View File

@ -2,29 +2,26 @@
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-input placeholder="请输入用户昵称..." clearable v-model="queryForm.username"></el-input>
<el-input placeholder="后端暂无查询接口..." clearable v-model="queryForm"></el-input>
</el-col>
<el-button type="button" :icon="Search" @click="initRatingList" >搜索</el-button>
<el-button type="primary" :icon="DocumentAdd" @click="handleAddDialogValue()" >添加评论</el-button>
<el-button type="primary" :icon="DocumentAdd" @click="handleDialogValue()" >添加 商品大类</el-button>
<el-button v-if="params.product!==undefined" >商家名称{{JSON.parse(params.product).businessName}}</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%;" showOverflowTooltip>
<el-table-column fixed prop="id" label="#ID" width="80" />
<el-table-column prop="businessId" label="商家id" width="80" />
<el-table-column prop="userId" label="用户id" width="80" />
<el-table-column prop="manicuristId" label="美甲师id" width="80" />
<el-table-column prop="orderId" label="订单id" width="80" />
<el-table-column prop="rating" label="评分" width="80" />
<el-table-column prop="review" label="评论" width="200" />
<el-table-column prop="businessReview" label="商家评论" width="200" />
<el-table-column prop="createTime" label="注册日期" width="200"/>
<el-table-column prop="businessId" label="商家id" />
<el-table-column prop="groupName" label="商品分类名称" />
<el-table-column prop="isTopping" label="商品级别" />
<el-table-column prop="action" fixed="right" label="操作" min-width="170">
<template v-slot="scope" >
<el-button type="success" size="small" @click="handleDialogValue(scope.row.id)">
详情
</el-button>
<el-button type="primary" size="small" :icon="Edit" @click="handleUpdateDialogValue(scope.row.id)"></el-button>
<el-button type="danger" size="small" :icon="Delete" @click="handleDelete(scope.row.id)"></el-button>
<!-- <el-button type="success" size="small" @click="handleDialogValue(scope.row.id)">-->
<!-- 详情-->
<!-- </el-button>-->
<!-- <el-button type="primary" size="small" :icon="Edit" @click="handleUpdateDialogValue(scope.row.id)"></el-button>-->
<el-button type="danger" size="small" :icon="Delete" @click="handleDelete(scope.row.groupName)"></el-button>
</template>
</el-table-column>
</el-table>
@ -40,60 +37,25 @@
<!-- {{total}}-->
</el-card>
<Dialog v-model="UdialogVisible" :id="id" :dialogTitle="dialogTitle"
@initUserList="initUserList"></Dialog>
<AddDialog v-model="UdialogaddVisible" :dialogTitle="dialogTitle"
@initUserList="initUserList"></AddDialog>
<UpdateDialog v-model="UdialogUpdateVisible" :id="id" :dialogTitle="dialogTitle"
@initUserList="initUserList"></UpdateDialog>
<Dialog v-model="CdialogVisible" :dialogTitle="dialogTitle"
@initRatingList="initRatingList"></Dialog>
</template>
<script setup>
import {Search,Delete,Edit,DocumentAdd,Close,Check} from '@element-plus/icons-vue'
import {ref, watch} from 'vue'
import axios from "@/util/axios";
import Dialog from '@/views/user/dialog/index.vue'
import AddDialog from '@/views/user/addDialog/index.vue'
import UpdateDialog from '@/views/user/updateDialog/index.vue'
import { ElMessage,ElMessageBox } from "element-plus";
import {parseTime} from "element-plus/es/components/time-select/src/utils";
import Dialog from '@/views/category/addDialog/index.vue'
import {useRoute} from "vue-router";
const queryForm=ref({
username: '',
current:1,
pageSize:10
})
// const id=ref('')
// const dialogTitle=ref('');
// const UdialogaddVisible=ref(false)
// const UdialogVisible=ref(false)
// const UdialogUpdateVisible=ref(false)
// const handleDialogValue=(ids)=>{
// id.value=ids;
// dialogTitle.value=""
// UdialogVisible.value=true
// }
//
// const handleUpdateDialogValue=(ids)=>{
// id.value=ids;
// dialogTitle.value=""
// UdialogUpdateVisible.value=true
// }
//
// const handleAddDialogValue=()=>{
// dialogTitle.value=""
// UdialogaddVisible.value=true
// }
let params=useRoute().query
//
@ -125,18 +87,24 @@ const handleDelete=(ids)=>{
})
.catch(() => {
})
// initUserList();
}
const dialogTitle=ref()
const CdialogVisible=ref(false)
const handleDialogValue=()=>{
dialogTitle.value="商品分类添加"
// console.log(dialogTitle.value)
CdialogVisible.value=true
}
const total=ref(0)
const tableData =ref([])
const initRatingList=async()=>{
const res = await axios.post("level/list");
console.log(res.data.data)
const res = await axios.get("group/queryGroupVO");
// console.log(res.data.data)
if (res.data.data) {
tableData.value = res.data.data;
//console.log(res.data.data)

View File

@ -8,7 +8,7 @@
<el-form
ref="formRef"
:model="form"
:rules="rules"
label-width="100px"
>
<el-form-item label="用户账号" prop="userAccount">

View File

@ -27,7 +27,7 @@
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-input placeholder="请输入用户昵称..." clearable v-model="query" ></el-input>
<el-input placeholder="请输入美甲师ID..." clearable v-model="query" ></el-input>
</el-col>
<el-button type="button" :icon="Search" @click="initEmployeeList">搜索</el-button>
<el-button type="primary" :icon="DocumentAdd" @click="handleAddDialogValue()" >添加用户</el-button>
@ -49,6 +49,16 @@
</template>
</el-table-column>
<el-table-column prop="salary" label="余额" />
<el-table-column prop="manStatus" label="状态" >
<template v-slot="scope">
<el-switch
v-model="scope.row.manStatus"
@change="updateSwtich(scope.row)"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
/>
</template>
</el-table-column>
<el-table-column prop="createTime" label="注册日期" width="200"/>
<el-table-column prop="updateTime" label="最后登录日期" width="200"/>
<el-table-column prop="action" fixed="right" label="操作" min-width="220">
@ -114,6 +124,33 @@ const edialogVisible=ref(false)
const edialogUpdateVisible=ref(false)
const tempUpdate=ref({
id: null,
phone: "",
manicuristName: "",
userStatus: null
})
const updateSwtich= async (item)=>{
tempUpdate.value.id=item.id
tempUpdate.value.phone=item.phone
tempUpdate.value.manicuristName=item.manicuristName
if (item.manStatus==false){
tempUpdate.value.manStatus=1
}
else {
tempUpdate.value.manStatus=0
}
//console.log("1341234"+JSON.stringify(tempUpdate.value))
let result = await axios.post("manicurist/update", tempUpdate.value)
//console.log(result.data)
}
const handleRouter=(id)=>{
bussinessId.value=id;
router.push({path:'/profile',query:{id: bussinessId.value}})
@ -158,7 +195,7 @@ const handleDelete=(ids)=>{
type: 'success',
message: '删除成功',
})
initSmallTypeList();
initEmployeeList();
}else{
ElMessage({
type: 'error',
@ -177,12 +214,35 @@ watch(query,()=>{
// console.log(query.value)
initEmployeeList();
},10000)
const tempstore=()=>{
const temp=[]
tableData.value.map(item=>{
if(item.manStatus==0)
{
item.manStatus=true
}
else{
item.manStatus=false
}
if (item.auditStatus==1)
{
temp.push(item)
}
})
tableData.value=temp
//console.log(res.data.data)
}
const initEmployeeList=async()=>{
if (!query.value){
const res=await axios.post("manicurist/queryAll");
// console.log(res.data)
tableData.value=res.data.data;
total.value=res.data.data.length;
let num=tableData.value.filter(item=>item.auditStatus==1)
total.value=num.length;
tempstore();
}else{
const res = await axios.get("manicurist/queryById", {manicuristId: query.value});
// console.log(res.data)
@ -190,6 +250,7 @@ const initEmployeeList=async()=>{
temp.push(res.data.data)
tableData.value = temp;
total.value = 1;
tempstore();
}
}
initEmployeeList();

View File

@ -3,6 +3,87 @@
甲情甲意流水展示
数据展示
</div>
<!--========================================================= -->
<el-row :gutter="16">
<el-col :span="6">
<div class="statistic-card">
<el-statistic :value="num0" >
<template #title>
<div style="display: inline-flex; justify-self: right;align-items: center;width: 100%">
用户人数
<el-tooltip
effect="dark"
content="Number of users who logged into the product in one day"
placement="top"
>
<el-icon style="margin-left: 4px" :size="12">
<Warning />
</el-icon>
</el-tooltip>
<el-icon style="float: right" size="24"><Odometer /></el-icon>
</div>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div class="statistic-card">
<el-statistic :value="num1">
<template #title>
<div style="display: inline-flex; align-items: center">
商家人数
<el-tooltip
effect="dark"
content="Number of users who logged into the product in one month"
placement="top"
>
<el-icon style="margin-left: 4px" :size="12">
<Warning />
</el-icon>
</el-tooltip>
</div>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div class="statistic-card">
<el-statistic :value="num2" title="New transactions today">
<template #title>
<div style="display: inline-flex; align-items: center">
订单数量
</div>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div class="statistic-card">
<el-statistic :value="num3" title="New transactions today">
<template #title>
<div style="display: inline-flex; align-items: center">
美甲师人数
<!-- 用户满意度-->
</div>
</template>
</el-statistic>
</div>
</el-col>
</el-row>
<!-- ================================================-->
<div style="display: flex" v-for="(item,index) in tableData" :key="index">
<div style="flex: 1">
@ -58,6 +139,13 @@ import axios from "@/util/axios";
import * as echarts from "echarts";
import {onMounted, ref} from 'vue'
let num0=ref()
let num1=ref()
let num2=ref()
let num3=ref()
const total=ref(0)
const tableData =ref([])
const formPage=ref({
@ -66,11 +154,22 @@ const formPage=ref({
})
const initBusinessList=async()=>{
console.log(formPage.value)
//console.log(formPage.value)
const res1=await axios.post("user/list/page");
num0=res1.data.data.total
const res3=await axios.post("orders/list/page");
num2=res3.data.data.total
const res4=await axios.post("manicurist/queryAll");
num3=res4.data.data.length
const res=await axios.post("business/list/page",formPage.value);
console.log(res.data.data.records)
num1=res.data.data.total
//console.log(res.data.data.records)
tableData.value=res.data.data.records;
total.value=res.data.data.records.length;
// console.log(num0)
setTimeout(() => {hei();shi();}, 500)
}
@ -203,6 +302,14 @@ const shi=()=>{
font-size: 30px;
font-weight: bold;
}
.statistic-card {
padding: 20px;
border-radius: 4px;
margin-bottom: 20px;
background-color: #f0f2f5;
}
</style>

View File

@ -4,6 +4,9 @@
<el-avatar shape="square" :size="40" :src="squareUrl" />
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="message">消息通知</el-dropdown-item>
</el-dropdown-menu >
<el-dropdown-menu>
<el-dropdown-item @click="topersonal">个人中心</el-dropdown-item>
</el-dropdown-menu >
@ -31,6 +34,9 @@ const logout=async ()=>{
const topersonal= ()=>{
router.push('/personal')
}
const message= ()=>{
router.push('/message')
}
</script>
<style lang="scss" scoped>

View File

@ -4,29 +4,23 @@
<!-- <span class="redirect" v-if="item.name=='详情'||item.name=='商品管理'" @click="handleRedirectBack(item.name)">返回上一级</span>-->
<span class="no-redirect" v-if="index==breadcrumbList.length-1" >{{ item.name }}</span>
<span class="redirect" v-else @click="handleRedirect(item.path)">{{ item.name }}</span>
<!-- <span class="redirect" v-else @click="handleRedirectBack">返回上一级</span>-->
</el-breadcrumb-item>
<el-breadcrumb-item @click="handleRedirectBack">返回上一级</el-breadcrumb-item>
</el-breadcrumb>
</template>
<script setup>
import {ref, watch} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import back from "@iconify-icons/ep/back";
const route = useRoute();
const router = useRouter();
const breadcrumbList = ref([]);
const handleRedirectBack=(name)=>{
if (name=='详情')
{
router.push('/employee')
}else{
router.push('/business')
}
const handleRedirectBack=()=>{
router.back()
}
const handleRedirect = (path) => {

View File

@ -42,7 +42,11 @@
<el-icon><management /></el-icon>
<span>商品管理</span>
</template>
<el-menu-item >
<el-menu-item index="businessProduct">
<el-icon><management /></el-icon>
<span>商家商品</span>
</el-menu-item>
<el-menu-item index="productCategory">
<el-icon><management /></el-icon>
<span>商品分类</span>
</el-menu-item>
@ -76,14 +80,14 @@
<el-icon><tickets /></el-icon>
<span>上门预约</span>
</el-menu-item>
<el-menu-item >
<el-menu-item index="order">
<el-icon><tickets /></el-icon>
<span>到店服务</span>
</el-menu-item>
<el-menu-item index="order">
<el-icon><tickets /></el-icon>
<span>订单列表</span>
</el-menu-item>
<!-- <el-menu-item index="order">-->
<!-- <el-icon><tickets /></el-icon>-->
<!-- <span>订单列表</span>-->
<!-- </el-menu-item>-->
</el-sub-menu>
@ -92,7 +96,7 @@
<el-icon><management /></el-icon>
<span>评价管理</span>
</template>
<el-menu-item >
<el-menu-item index="permission">
<el-icon><tickets /></el-icon>
<span>权限操作</span>
</el-menu-item>

View File

@ -0,0 +1,11 @@
<template>
暂无消息
</template>
<script>
</script>
<style scoped>
</style>

View File

@ -7,10 +7,15 @@
<el-button type="button" :icon="Search" @click="initOrderList">搜索</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%" showOverflowTooltip>
<el-table-column prop="id" label="#ID" width="40" fixed/>
<el-table-column prop="orderNumber" label="订单号" width="220" fixed/>
<el-table-column prop="userName" label="用户昵称" width="200"/>
<el-table-column prop="totalPrice" label="订单总价" width="100"/>
<el-table-column prop="paymentStatus" label="订单状态" width="100"/>
<el-table-column prop="paymentStatus" label="订单状态" width="100">
<template v-slot="scope">
{{payStatus[scope.row.paymentStatus]}}
</template>
</el-table-column>
<el-table-column prop="createTime" label="订单创建日期" width="200"/>
<el-table-column prop="updateTime" label="订单支付日期" width="200"/>
<el-table-column prop="userName" label="收货人" width="80"/>
@ -129,6 +134,8 @@ const queryForm=ref({
})
const total=ref(0)
const tableData =ref([])
const payStatus=['未支付','已支付','退款中','已退款']
const initOrderList=async()=>{
const res=await axios.post("orders/list/page",queryForm.value);
//console.log(res.data.data)

View File

@ -0,0 +1,110 @@
<template>
<el-dialog
model-value="dialogaddVisible"
:title="dialogTitle"
width="30%"
@close="handleClose"
>
<el-form
ref="formRef"
:model="form"
label-width="100px"
>
<el-form-item label="门店头像" prop="avatarUrl">
<el-upload list-type="picture-card" limit="1" :auto-upload="false" drag action="#">
<el-icon><Plus /></el-icon>
<template #tip>
<div class="el-upload__tip">
最多传一张
</div>
</template>
</el-upload>
</el-form-item>
<el-form-item label="用户昵称" prop="username">
<el-input v-model="form.username" />
</el-form-item>
<el-form-item label="用户账号" prop="userAccount">
<el-input v-model="form.userAccount" />
</el-form-item>
<el-form-item label="用户密码" prop="userPassword">
<el-input v-model="form.userPassword" show-password />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</span>
</template>
</el-dialog>
</template>
<script setup>
import {defineEmits, defineProps, ref, watch} from "vue";
import axios from "@/util/axios";
import { ElMessage } from "element-plus";
import { Delete, Download, Plus, ZoomIn } from '@element-plus/icons-vue'
const props=defineProps({
dialogTitle:{
type:String,
default:'',
required:true
}
})
const form=ref({
avatarUrl:'',
userAccount:'',
userPassword:'',
username:null
})
// const rules=ref({
// name: [
// {
// required: true,
// message: ''
// }
// ],
// remark: [
// {
// required: true,
// message: ''
// }
// ]
// })
const formRef=ref(null);
//
const emits=defineEmits(['update:modelValue','initUserList'])
const handleClose=()=>{
console.log("用户添加关闭xxx")
//
emits('update:modelValue',false)
}
const handleConfirm=()=>{
formRef.value.validate(async(valid)=>{
if(valid){
let result=await axios.post("user/add",form.value)
console.log(result.data)
let data=result.data;
if(data.code==0){
ElMessage.success("执行添加成功!");
formRef.value.resetFields();
emits("initUserList");
handleClose();
}else{
ElMessage.error(data.description);
}
}else{
console.log("fail")
return false
}
})
}
</script>
<style scoped>
</style>

View File

@ -67,16 +67,20 @@ const props=defineProps({
}
})
const form=ref({
id: "",
businessId: "",
userId: "",
manicuristId: "",
orderId: "",
rating: null,
manicuristRating: null,
review: "",
businessReview: null,
createTime: ""
avatarUrl: "",
createTime:"",
email:"",
gender:null,
isDelete:null,
openId:null,
phone:null,
unionId:null,
updateTime:"",
userAccount:"",
userPassword:"",
userRole:null,
userStatus:null,
username:""
})
// const rules=ref({
// name: [

View File

@ -0,0 +1,223 @@
<template>
<el-card>
<el-row :gutter="20" class="header">
<el-col :span="7">
<el-input placeholder="请输入用户昵称..." clearable v-model="queryForm.username"></el-input>
</el-col>
<el-button type="button" :icon="Search" @click="initUserList" >搜索</el-button>
</el-row>
<el-table :data="tableData" stripe style="width: 100%;" showOverflowTooltip>
<el-table-column fixed prop="id" label="#ID" width="80" />
<el-table-column prop="username" label="用户昵称" width="150" />
<el-table-column prop="avatarUrl" label="头像" width="200">
<template v-slot="scope">
<el-popover
placement="right-start"
:width="200"
trigger="hover"
:content="scope.row.avatarUrl"
>
<template #reference>
<img :src="scope.row.avatarUrl" width="50" height="50"/>
</template>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="userStatus" label="用户状态" width="100">
<template v-slot="scope">
<div v-if="scope.row.userStatus===0" style="color: red">
禁用
</div>
<div style="color: lawngreen" v-else>
启用
</div>
</template>
</el-table-column>
<el-table-column prop="userRole" label="用户角色" width="100">
<template v-slot="scope">
<div v-if="scope.row.userRole===0">普通用户</div>
<div v-else-if="scope.row.userRole===1">管理员</div>
<div v-else-if="scope.row.userRole===2">商家</div>
<div v-else>美甲师</div>
</template>
</el-table-column>
<el-table-column prop="updateTime" label="最后登录日期" />
<el-table-column prop="action" fixed="right" label="操作" min-width="170">
<template v-slot="scope" >
<el-button type="success" size="small" @click="handleDialogValue(scope.row.id)">
详情
</el-button>
<el-button type="primary" size="small" :icon="Edit" @click="handleUpdateDialogValue(scope.row.id)"></el-button>
<el-button type="danger" size="small" :icon="Delete" @click="handleDelete(scope.row.id)"></el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
v-model:currentPage="queryForm.current"
v-model:page-size="queryForm.pageSize"
:page-sizes="[10, 20, 30, 40,50]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- {{total}}-->
</el-card>
<Dialog v-model="UdialogVisible" :id="id" :dialogTitle="dialogTitle"
@initUserList="initUserList"></Dialog>
<AddDialog v-model="UdialogaddVisible" :dialogTitle="dialogTitle"
@initUserList="initUserList"></AddDialog>
<UpdateDialog v-model="UdialogUpdateVisible" :id="id" :dialogTitle="dialogTitle"
@initUserList="initUserList"></UpdateDialog>
</template>
<script setup>
import {Search,Delete,Edit,DocumentAdd,Close,Check} from '@element-plus/icons-vue'
import {ref, watch} from 'vue'
import axios from "@/util/axios";
import Dialog from '@/views/user/dialog/index.vue'
import AddDialog from '@/views/user/addDialog/index.vue'
import UpdateDialog from '@/views/user/updateDialog/index.vue'
import { ElMessage,ElMessageBox } from "element-plus";
import {parseTime} from "element-plus/es/components/time-select/src/utils";
const queryForm=ref({
username: '',
current:1,
pageSize:10
})
const id=ref('')
const dialogTitle=ref('');
const UdialogaddVisible=ref(false)
const UdialogVisible=ref(false)
const UdialogUpdateVisible=ref(false)
// watch(queryForm.value.username,()=>{
// // console.log(query.value)
// initUserList();
// },10000)
const handleDialogValue=(ids)=>{
//console.log("bigTypeId="+userAccount)
// if(userAccount){
id.value=ids;
dialogTitle.value="用户详情"
// console.log("asdfasdfasd"+useraccount.value)
// }else{
// useraccount.value=-1;
// dialogTitle.value=""
// // console.log(dialogTitle.value)
// }
UdialogVisible.value=true
}
const handleUpdateDialogValue=(ids)=>{
// console.log(userAccount)
id.value=ids;
// console.log(userAccount.value)
dialogTitle.value="用户修改"
UdialogUpdateVisible.value=true
}
//
const handleDelete=(id)=>{
// console.log(id)
ElMessageBox.confirm(
'您确定要删除这条记录吗?',
'系统提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async() => {
let res=await axios.post('user/delete',{id:id})
if(res.data.code==0){
ElMessage({
type: 'success',
message: '删除成功',
})
initSmallTypeList();
}else{
ElMessage({
type: 'error',
message: res.data.description,
})
}
})
.catch(() => {
})
// initUserList();
}
const total=ref(0)
const tableData =ref([])
const initUserList=async()=>{
// // console.log(query)
// if (!query.value) {
// const res = await axios.post("user/list/page", queryForm.value);
// // console.log(res)
// tableData.value = res.data.data.records;
// //console.log(res.data.data)
// total.value = Number(res.data.data.total);
// }
// else{
// const res=await axios.get("user/getById", {id:query.value});
// // console.log(res.data.data)
// const temp=[];
// temp.push(res.data.data)
// tableData.value=temp;
// total.value=1;
// }
const res = await axios.post("user/list/page", queryForm.value);
// console.log(res.data.data.records)
if (res.data.data) {
tableData.value = res.data.data.records;
//console.log(res.data.data)
total.value = Number(res.data.data.total);
}
else{
ElMessage.error(res.data.description);
}
}
initUserList();
const handleSizeChange = (pageSize) => {
queryForm.value.current=1;
queryForm.value.pageSize=pageSize;
initUserList();
}
const handleCurrentChange = (current1) => {
queryForm.value.current=current1;
initUserList();
}
</script>
<style lang="scss" scoped>
.header{
padding-bottom: 16px;
box-sizing: border-box;
}
.el-pagination{
padding-top: 15px;
box-sizing: border-box;
}
</style>

View File

@ -1,17 +1,18 @@
<template>
<el-card>
<el-row :gutter="20" class="header" style="display: flex;align-items: center;
justify-content: center;" v-if="params.product!==undefined">
商家名称{{JSON.parse(params.product).businessName}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
商家头像<img :src="JSON.parse(params.product).businessAvatar" width="50" height="50"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
商家电话{{JSON.parse(params.product).businessPhone}}
</el-row>
<el-row :gutter="20" class="header" >
<el-col :span="7" >
<el-col :span="4" >
<el-input placeholder="请输入商品ID..." clearable v-model="queryForm.id"></el-input>
</el-col>
<el-col :span="4" v-if="params.product==undefined">
<el-input placeholder="请输入商家ID..." clearable v-model="queryForm.businessId"></el-input>
</el-col>
<el-col :span="4" >
<el-input placeholder="请输入分类ID..." clearable v-model="queryForm.commoditiesGroupId"></el-input>
</el-col>
<el-button type="primary" :icon="Search" @click="initProductList" >搜索</el-button>
<el-button v-if="params.product!==undefined" >商家名称{{JSON.parse(params.product).businessName}}</el-button>
<!-- <el-button type="primary" :icon="DocumentAdd"-->
<!-- @click="handleDialogValue()">添加商品</el-button>-->
</el-row>
@ -26,9 +27,15 @@
</template>
</el-table-column>
<el-table-column prop="commoditiesPrice" label="商品名称" />
<el-table-column prop="businessId" label="商家ID" />
<el-table-column prop="commoditiesGroupId" label="商品关联类别Id" />
<el-table-column prop="inventoryStatus" label="商品库存" />
<el-table-column prop="status" label="商品状态" />
<el-table-column prop="action" fixed="right" label="操作" min-width="80">
<template v-slot="scope" >
<el-button type="danger" size="small" :icon="Delete" @click="handleDelete(scope.row.id)"></el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
v-model:currentPage="queryForm.current"
@ -63,6 +70,7 @@ const dialogVisible=ref(false)
const queryForm=ref({
businessId: '',
id:'',
commoditiesGroupId: null,
current:1,
pageSize:10
})
@ -103,53 +111,36 @@ const handleCurrentChange = (current) => {
queryForm.value.current=current;
initProductList();
}
// const typeNameFormatter=(row)=>{
// // console.log(row)
// // let name=await axios.get('admin/smallType/'+row.typeid).then((res) => {
// // return res.data.smallType.name
// // });
// // row.smalltype=name;
// let name= axios.get('admin/smallType/'+row.typeid).then((res) => {
// return res.data.smallType.name
// });
// let t=name
// console.log(t.then())
// return t.then()
// }
// const typeNameFormatter=(row)=>{
// // console.log(row)
// let name= typeNameFormatter2(row)
// console.log(name)
// return name
// }
// const handleDelete=(id)=>{
// ElMessageBox.confirm(
// '',
// '',
// {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// }
// )
// .then(async() => {
// let res=await axios.get('admin/product/delete/'+id)
// if(res.data.code==0){
// ElMessage({
// type: 'success',
// message: '',
// })
// initProductList();
// }else{
// ElMessage({
// type: 'error',
// message: res.data.msg,
// })
// }
// })
// .catch(() => {
// })
// }
const handleDelete=(id)=>{
// console.log(id)
ElMessageBox.confirm(
'您确定要删除这条记录吗?',
'系统提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async() => {
let res=await axios.post('commodities/delete',{id:id})
if(res.data.code==0){
ElMessage({
type: 'success',
message: '删除成功',
})
initSmallTypeList();
}else{
ElMessage({
type: 'error',
message: res.data.description,
})
}
})
.catch(() => {
})
// initUserList();
}
</script>
<style lang="scss" scoped>
.header{

View File

@ -19,13 +19,13 @@
<el-table-column prop="createTime" label="注册日期" width="200"/>
<el-table-column prop="action" fixed="right" label="操作" min-width="170">
<template v-slot="scope" >
<el-button type="success" size="small" @click="handleDialogValue(scope.row.id)">
详情
</el-button>
<el-button type="primary" size="small" :icon="Edit" @click="handleUpdateDialogValue(scope.row.id)"></el-button>
<el-button type="danger" size="small" :icon="Delete" @click="handleDelete(scope.row.id)"></el-button>
</template>
<!-- <template v-slot="scope" >-->
<!-- <el-button type="success" size="small" @click="handleDialogValue(scope.row.id)">-->
<!-- 详情-->
<!-- </el-button>-->
<!-- <el-button type="primary" size="small" :icon="Edit" @click="handleUpdateDialogValue(scope.row.id)"></el-button>-->
<!-- <el-button type="danger" size="small" :icon="Delete" @click="handleDelete(scope.row.id)"></el-button>-->
<!-- </template>-->
</el-table-column>
</el-table>
<el-pagination

View File

@ -31,7 +31,7 @@
{{form.email}}
</el-form-item>
<el-form-item label="用户状态" prop="userStatus">
<template v-if="form.userStatus==0">禁用</template>
<template v-if="form.userStatus==1">禁用</template>
<template v-else>启用</template>
</el-form-item>

View File

@ -29,12 +29,17 @@
<el-table-column prop="email" label="email" width="200"/>
<el-table-column prop="userStatus" label="用户状态" width="200">
<template v-slot="scope">
<div v-if="scope.row.userStatus===0" style="color: red">
禁用
</div>
<div style="color: lawngreen" v-else>
启用
</div>
<el-switch
v-model="scope.row.userStatus"
@change="updateSwtich(scope.row)"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
/>
<!-- <div v-if="scope.row.userStatus===0" style="color: red">-->
<!-- 禁用-->
<!-- </div>-->
<!-- <div style="color: lawngreen" v-else>-->
<!-- 启用-->
<!-- </div>-->
</template>
</el-table-column>
<el-table-column prop="userRole" label="用户角色" width="200">
@ -51,8 +56,9 @@
<!-- </template>-->
</el-table-column>
<el-table-column prop="updateTime" label="最后登录日期" width="200"/>
<el-table-column prop="action" fixed="right" label="操作" min-width="170">
<el-table-column prop="action" fixed="right" label="操作" min-width="220">
<template v-slot="scope" >
<el-button type="success" size="small" @click="handleDialogValue(scope.row.id)">
详情
</el-button>
@ -106,30 +112,47 @@ const UdialogVisible=ref(false)
const UdialogUpdateVisible=ref(false)
// watch(queryForm.value.username,()=>{
// // console.log(query.value)
// initUserList();
// watch(queryForm.value.userStatus,()=>{
//
// updateSwtich(queryForm.value.userStatus);
// },10000)
const tempUpdate=ref({
id: null,
phone: "",
username: "",
userStatus: null
})
const updateSwtich= async (item)=>{
tempUpdate.value.id=item.id
tempUpdate.value.phone=item.phone
tempUpdate.value.username=item.username
if (item.userStatus==false){
tempUpdate.value.userStatus=1
}
else {
tempUpdate.value.userStatus=0
}
//console.log("1341234"+JSON.stringify(tempUpdate.value))
let result = await axios.post("user/update", tempUpdate.value)
//console.log(result.data)
}
const handleDialogValue=(ids)=>{
//console.log("bigTypeId="+userAccount)
// if(userAccount){
id.value=ids;
dialogTitle.value="用户详情"
// console.log("asdfasdfasd"+useraccount.value)
// }else{
// useraccount.value=-1;
// dialogTitle.value=""
// // console.log(dialogTitle.value)
// }
UdialogVisible.value=true
}
const handleUpdateDialogValue=(ids)=>{
// console.log(userAccount)
id.value=ids;
// console.log(userAccount.value)
dialogTitle.value="用户修改"
UdialogUpdateVisible.value=true
}
@ -162,7 +185,7 @@ const handleDelete=(id)=>{
type: 'success',
message: '删除成功',
})
initSmallTypeList();
initUserList();
}else{
ElMessage({
type: 'error',
@ -198,9 +221,18 @@ const initUserList=async()=>{
// total.value=1;
// }
const res = await axios.post("user/list/page", queryForm.value);
// console.log(res.data.data.records)
if (res.data.data) {
tableData.value = res.data.data.records;
tableData.value.map(item=>{
if(item.userStatus==0)
{
item.userStatus=true
}
else{
item.userStatus=false
}
})
//console.log(res.data.data)
total.value = Number(res.data.data.total);
}