Compare commits
No commits in common. "9d5757116526666ab6e09f5416394abc42d0e7c4" and "8ecd53d92a8e7c0d4da7d6273194b1a8530ee3d1" have entirely different histories.
9d57571165
...
8ecd53d92a
@ -1,51 +0,0 @@
|
|||||||
import request from '@/config/axios'
|
|
||||||
|
|
||||||
// 预约项目 VO
|
|
||||||
export interface ProjectVO {
|
|
||||||
id: number // ID
|
|
||||||
brandId: number // 所属门店
|
|
||||||
name: string // 项目名称
|
|
||||||
pictrue: string // 项目图片
|
|
||||||
content: string // 项目简介
|
|
||||||
status: number // 状态
|
|
||||||
timeInterval: string // 可预约日期
|
|
||||||
brandName: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// 预约项目 API
|
|
||||||
export const ProjectApi = {
|
|
||||||
// 查询预约项目分页
|
|
||||||
getProjectPage: async (params: any) => {
|
|
||||||
return await request.get({ url: `/subscribe/project/page`, params })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询预约项目详情
|
|
||||||
getProject: async (id: number) => {
|
|
||||||
return await request.get({ url: `/subscribe/project/get?id=` + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增预约项目
|
|
||||||
createProject: async (data: ProjectVO) => {
|
|
||||||
return await request.post({ url: `/subscribe/project/create`, data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 修改预约项目
|
|
||||||
updateProject: async (data: ProjectVO) => {
|
|
||||||
return await request.put({ url: `/subscribe/project/update`, data })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除预约项目
|
|
||||||
deleteProject: async (id: number) => {
|
|
||||||
return await request.delete({ url: `/subscribe/project/delete?id=` + id })
|
|
||||||
},
|
|
||||||
|
|
||||||
// 导出预约项目 Excel
|
|
||||||
exportProject: async (params) => {
|
|
||||||
return await request.download({ url: `/subscribe/project/export-excel`, params })
|
|
||||||
},
|
|
||||||
|
|
||||||
getProjectName: async () => {
|
|
||||||
return await request.get({ url: `/subscribe/project/getProjectName` })
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
@ -3,11 +3,16 @@ import request from '@/config/axios'
|
|||||||
// 人员管理 VO
|
// 人员管理 VO
|
||||||
export interface LitemallTechnicianVO {
|
export interface LitemallTechnicianVO {
|
||||||
id: number // id
|
id: number // id
|
||||||
projectId: number // 项目id
|
techSn: string // 人员编号
|
||||||
brandName: string //项目名称
|
type: number // 人员类型
|
||||||
|
technicianName: string // 人员名称
|
||||||
|
brandId: number // 门店id
|
||||||
|
brandName: string
|
||||||
|
sex: number // 性别
|
||||||
photo: string // 照片
|
photo: string // 照片
|
||||||
serviceTime: string // 服务时间段
|
serviceTime: string // 服务时间段
|
||||||
serviceScope: string // 服务范围
|
serviceScope: string // 服务范围
|
||||||
|
phone: string // 手机号
|
||||||
ym: number // 约满标记
|
ym: number // 约满标记
|
||||||
status: number // 状态
|
status: number // 状态
|
||||||
content: string // 介绍
|
content: string // 介绍
|
||||||
|
@ -124,8 +124,6 @@ export enum DICT_TYPE {
|
|||||||
TECHNICIAN_STATUS = 'technician_status',
|
TECHNICIAN_STATUS = 'technician_status',
|
||||||
SEX = 'sex',
|
SEX = 'sex',
|
||||||
|
|
||||||
//预约:项目
|
|
||||||
SUBSCRIBE_PROJECT_STATUS = 'subscribe_project_status',
|
|
||||||
|
|
||||||
//预约:人员管理
|
//预约:人员管理
|
||||||
STALL_SEX = 'stall_sex',
|
STALL_SEX = 'stall_sex',
|
||||||
|
@ -96,8 +96,6 @@ const open = async (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
|
@ -1,161 +0,0 @@
|
|||||||
<template>
|
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="50%">
|
|
||||||
<el-form
|
|
||||||
ref="formRef"
|
|
||||||
:model="formData"
|
|
||||||
:rules="formRules"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading"
|
|
||||||
>
|
|
||||||
<el-form-item label="门店" prop="brandId">
|
|
||||||
<!-- <el-input v-model="formData.brandId" placeholder="请输入门店id" />-->
|
|
||||||
<el-select v-model="formData.brandId" placeholder="请选择门店" clearable class="!w-240px">
|
|
||||||
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
|
||||||
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目名称" prop="name">
|
|
||||||
<el-input v-model="formData.name" placeholder="请输入项目名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目图片" prop="pictrue">
|
|
||||||
<UploadImg v-model="formData.pictrue" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目简介" prop="content">
|
|
||||||
<Editor v-model="formData.content" height="150px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select v-model="formData.status" placeholder="请选择状态">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_PROJECT_STATUS)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="可预约日期" prop="timeInterval">
|
|
||||||
<!-- <el-input v-model="formData.timeInterval" placeholder="请输入可预约日期" /> -->
|
|
||||||
<el-date-picker
|
|
||||||
v-model="formData.timeInterval"
|
|
||||||
type="daterange"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
||||||
import { ProjectApi, ProjectVO } from '@/api/subscribe/project'
|
|
||||||
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
|
|
||||||
|
|
||||||
/** 预约项目 表单 */
|
|
||||||
defineOptions({ name: 'ProjectForm' })
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
const message = useMessage() // 消息弹窗
|
|
||||||
|
|
||||||
const option = ref<LitemallBrandVO[]>([]);
|
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
|
||||||
const formData = ref({
|
|
||||||
id: undefined,
|
|
||||||
brandId: undefined,
|
|
||||||
name: undefined,
|
|
||||||
pictrue: undefined,
|
|
||||||
content: undefined,
|
|
||||||
status: undefined,
|
|
||||||
timeInterval: '',
|
|
||||||
})
|
|
||||||
const formRules = reactive({
|
|
||||||
brandId: [{ required: true, message: '所属门店不能为空', trigger: 'blur' }],
|
|
||||||
name: [{ required: true, message: '项目名称不能为空', trigger: 'blur' }],
|
|
||||||
pictrue: [{ required: true, message: '项目图片不能为空', trigger: 'blur' }],
|
|
||||||
status: [{ required: true, message: '状态不能为空', trigger: 'change' }],
|
|
||||||
timeInterval: [{ required: true, message: '可预约日期不能为空', trigger: 'blur' }]
|
|
||||||
})
|
|
||||||
const formRef = ref() // 表单 Ref
|
|
||||||
|
|
||||||
/** 打开弹窗 */
|
|
||||||
const open = async (type: string, id?: number) => {
|
|
||||||
dialogVisible.value = true
|
|
||||||
dialogTitle.value = t('action.' + type)
|
|
||||||
formType.value = type
|
|
||||||
resetForm()
|
|
||||||
// 修改时,设置数据
|
|
||||||
if (id) {
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
formData.value = await ProjectApi.getProject(id)
|
|
||||||
formData.value.timeInterval = JSON.parse(formData.value.timeInterval)
|
|
||||||
console.log('11111111111',formData.value)
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
||||||
|
|
||||||
/** 提交表单 */
|
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
||||||
const submitForm = async () => {
|
|
||||||
formData.value.timeInterval = JSON.stringify(formData.value.timeInterval);
|
|
||||||
// 校验表单
|
|
||||||
await formRef.value.validate()
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const data = formData.value as unknown as ProjectVO
|
|
||||||
if (formType.value === 'create') {
|
|
||||||
await ProjectApi.createProject(data)
|
|
||||||
message.success(t('common.createSuccess'))
|
|
||||||
} else {
|
|
||||||
|
|
||||||
await ProjectApi.updateProject(data)
|
|
||||||
message.success(t('common.updateSuccess'))
|
|
||||||
}
|
|
||||||
dialogVisible.value = false
|
|
||||||
// 发送操作成功的事件
|
|
||||||
emit('success')
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//初始化机构名称下拉框
|
|
||||||
const getOrganizations = async () => {
|
|
||||||
try {
|
|
||||||
option.value = await LitemallBrandApi.getOrganizations()
|
|
||||||
} finally {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置表单 */
|
|
||||||
const resetForm = () => {
|
|
||||||
formData.value = {
|
|
||||||
id: undefined,
|
|
||||||
brandId: undefined,
|
|
||||||
name: undefined,
|
|
||||||
pictrue: undefined,
|
|
||||||
content: undefined,
|
|
||||||
status: undefined,
|
|
||||||
timeInterval: '',
|
|
||||||
}
|
|
||||||
formRef.value?.resetFields()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 初始化 **/
|
|
||||||
onMounted(() => {
|
|
||||||
getOrganizations()
|
|
||||||
})
|
|
||||||
</script>
|
|
@ -1,209 +0,0 @@
|
|||||||
<template>
|
|
||||||
<ContentWrap>
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
|
||||||
<el-form-item label="所属门店" prop="brandId">
|
|
||||||
<el-select v-model="queryParams.brandId" placeholder="请选择门店" clearable class="!w-240px">
|
|
||||||
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
|
||||||
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目名称" prop="name">
|
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery"
|
|
||||||
class="!w-240px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.SUBSCRIBE_PROJECT_STATUS)" :key="dict.value"
|
|
||||||
:label="dict.label" :value="dict.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="可预约日期" prop="timeInterval">
|
|
||||||
<el-input v-model="queryParams.timeInterval" placeholder="请输入可预约日期" clearable @keyup.enter="handleQuery"
|
|
||||||
class="!w-240px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="创建时间" prop="createTime">
|
|
||||||
<el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
|
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期"
|
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-240px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button @click="handleQuery">
|
|
||||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
|
||||||
</el-button>
|
|
||||||
<el-button @click="resetQuery">
|
|
||||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['subscribe:project:create']">
|
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
||||||
</el-button>
|
|
||||||
<el-button type="success" plain @click="handleExport" :loading="exportLoading"
|
|
||||||
v-hasPermi="['subscribe:project:export']">
|
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</ContentWrap>
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<ContentWrap>
|
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="ID" align="center" prop="id" />
|
|
||||||
<el-table-column label="所属门店" align="center" prop="brandName" />
|
|
||||||
<el-table-column label="项目名称" align="center" prop="name" />
|
|
||||||
<!-- <el-table-column label="项目图片" align="center" prop="pictrue" /> -->
|
|
||||||
<el-table-column label="照片" align="center" prop="pictrue">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div class="flex" style="display: flex; align-items: center;">
|
|
||||||
<el-image fit="cover" :src="row.pictrue" class="flex-none w-50px h-50px"
|
|
||||||
@click="imagePreview(row.pictrue)" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column label="项目简介" align="center" prop="content" /> -->
|
|
||||||
<el-table-column label="介绍" align="center" prop="content">
|
|
||||||
<template #default="scope">
|
|
||||||
<div v-html="scope.row.content"></div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :type="DICT_TYPE.SUBSCRIBE_PROJECT_STATUS" :value="scope.row.status" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="可预约日期" align="center" prop="timeInterval" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter" width="180px" />
|
|
||||||
<el-table-column label="操作" align="center">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button link type="primary" @click="openForm('update', scope.row.id)"
|
|
||||||
v-hasPermi="['subscribe:project:update']">
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"
|
|
||||||
v-hasPermi="['subscribe:project:delete']">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
</ContentWrap>
|
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
|
||||||
<ProjectForm ref="formRef" @success="getList" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
|
||||||
import download from '@/utils/download'
|
|
||||||
import { ProjectApi, ProjectVO } from '@/api/subscribe/project'
|
|
||||||
import ProjectForm from './ProjectForm.vue'
|
|
||||||
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
|
|
||||||
|
|
||||||
/** 预约项目 列表 */
|
|
||||||
defineOptions({ name: 'Project' })
|
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
|
|
||||||
const option = ref<LitemallBrandVO[]>([]);
|
|
||||||
const loading = ref(true) // 列表的加载中
|
|
||||||
const list = ref<ProjectVO[]>([]) // 列表的数据
|
|
||||||
const total = ref(0) // 列表的总页数
|
|
||||||
const queryParams = reactive({
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
brandId: undefined,
|
|
||||||
name: undefined,
|
|
||||||
pictrue: undefined,
|
|
||||||
content: undefined,
|
|
||||||
status: undefined,
|
|
||||||
timeInterval: undefined,
|
|
||||||
createTime: [],
|
|
||||||
})
|
|
||||||
const queryFormRef = ref() // 搜索的表单
|
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
|
||||||
|
|
||||||
/** 查询列表 */
|
|
||||||
const getList = async () => {
|
|
||||||
loading.value = true
|
|
||||||
try {
|
|
||||||
const data = await ProjectApi.getProjectPage(queryParams)
|
|
||||||
list.value = data.list
|
|
||||||
total.value = data.total
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
const handleQuery = () => {
|
|
||||||
queryParams.pageNo = 1
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
const resetQuery = () => {
|
|
||||||
queryFormRef.value.resetFields()
|
|
||||||
handleQuery()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
|
||||||
const formRef = ref()
|
|
||||||
const openForm = (type : string, id ?: number) => {
|
|
||||||
formRef.value.open(type, id)
|
|
||||||
}
|
|
||||||
|
|
||||||
//初始化机构名称下拉框
|
|
||||||
const getOrganization = async () => {
|
|
||||||
loading.value = true
|
|
||||||
try {
|
|
||||||
option.value = await LitemallBrandApi.getOrganizations()
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const imagePreview = (imgUrl : string) => {
|
|
||||||
createImageViewer({
|
|
||||||
urlList: [imgUrl]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
const handleDelete = async (id : number) => {
|
|
||||||
try {
|
|
||||||
// 删除的二次确认
|
|
||||||
await message.delConfirm()
|
|
||||||
// 发起删除
|
|
||||||
await ProjectApi.deleteProject(id)
|
|
||||||
message.success(t('common.delSuccess'))
|
|
||||||
// 刷新列表
|
|
||||||
await getList()
|
|
||||||
} catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
const handleExport = async () => {
|
|
||||||
try {
|
|
||||||
// 导出的二次确认
|
|
||||||
await message.exportConfirm()
|
|
||||||
// 发起导出
|
|
||||||
exportLoading.value = true
|
|
||||||
const data = await ProjectApi.exportProject(queryParams)
|
|
||||||
download.excel(data, '预约项目.xls')
|
|
||||||
} catch {
|
|
||||||
} finally {
|
|
||||||
exportLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 初始化 **/
|
|
||||||
onMounted(() => {
|
|
||||||
getList()
|
|
||||||
getOrganization()
|
|
||||||
})
|
|
||||||
</script>
|
|
@ -1,14 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
|
||||||
|
<!-- <el-form-item label="人员编号" prop="techSn">-->
|
||||||
<el-form-item label="项目" prop="projectId">
|
<!-- <el-input v-model="formData.techSn" placeholder="请输入人员编号" />-->
|
||||||
<el-select v-model="formData.projectId" placeholder="请选择项目" clearable class="!w-240px">
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="人员类型" prop="type">
|
||||||
|
<el-select v-model="formData.type" placeholder="请选择人员类型">
|
||||||
|
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TYPES)" :key="dict.value" :label="dict.label"
|
||||||
|
:value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="人员名称" prop="technicianName">
|
||||||
|
<el-input v-model="formData.technicianName" placeholder="请输入人员名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="门店" prop="brandId">
|
||||||
|
<!-- <el-input v-model="formData.brandId" placeholder="请输入门店id" />-->
|
||||||
|
<el-select v-model="formData.brandId" placeholder="请选择门店" clearable class="!w-240px">
|
||||||
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
||||||
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="性别" prop="sex">
|
||||||
|
<el-select v-model="formData.sex" placeholder="请选择性别">
|
||||||
|
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.SEX)" :key="dict.value" :label="dict.label"
|
||||||
|
:value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="照片" prop="photo">
|
<el-form-item label="照片" prop="photo">
|
||||||
<UploadImg v-model="formData.photo" />
|
<UploadImg v-model="formData.photo" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -35,7 +52,12 @@
|
|||||||
<el-form-item label="服务范围" prop="serviceScope">
|
<el-form-item label="服务范围" prop="serviceScope">
|
||||||
<el-input v-model="formData.serviceScope" placeholder="请输入服务范围" />
|
<el-input v-model="formData.serviceScope" placeholder="请输入服务范围" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="phone">
|
||||||
|
<el-input v-model="formData.phone" placeholder="请输入手机号" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="约满标记" prop="ym">-->
|
||||||
|
<!-- <el-input v-model="formData.ym" placeholder="请输入约满标记" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="formData.status" placeholder="请选择状态">
|
<el-select v-model="formData.status" placeholder="请选择状态">
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TECHNICIAN_STATUS)" :key="dict.value"
|
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TECHNICIAN_STATUS)" :key="dict.value"
|
||||||
@ -58,24 +80,30 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
|
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
|
||||||
import { ProjectApi, ProjectVO } from '@/api/subscribe/project'
|
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
|
||||||
/** 人员管理 表单 */
|
/** 人员管理 表单 */
|
||||||
defineOptions({ name: 'LitemallTechnicianForm' })
|
defineOptions({ name: 'LitemallTechnicianForm' })
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const option = ref<ProjectVO[]>([]);
|
const option = ref<LitemallBrandVO[]>([]);
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: undefined,
|
// techSn: undefined,
|
||||||
|
type: undefined,
|
||||||
|
technicianName: undefined,
|
||||||
|
brandId: undefined,
|
||||||
|
sex: undefined,
|
||||||
photo: undefined,
|
photo: undefined,
|
||||||
serviceTime: '',
|
serviceTime: '',
|
||||||
serviceTimeArray: [{}],
|
serviceTimeArray: [{}],
|
||||||
serviceScope: undefined,
|
serviceScope: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
// ym: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
content: undefined,
|
content: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
@ -102,9 +130,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//初始化机构名称下拉框
|
//初始化机构名称下拉框
|
||||||
const getProjectName = async () => {
|
const getOrganizations = async () => {
|
||||||
try {
|
try {
|
||||||
option.value = await ProjectApi.getProjectName()
|
option.value = await LitemallBrandApi.getOrganizations()
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -167,10 +195,16 @@
|
|||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: undefined,
|
// techSn: undefined,
|
||||||
|
type: undefined,
|
||||||
|
technicianName: undefined,
|
||||||
|
brandId: undefined,
|
||||||
|
sex: undefined,
|
||||||
photo: undefined,
|
photo: undefined,
|
||||||
serviceTime: '',
|
serviceTime: '',
|
||||||
serviceScope: undefined,
|
serviceScope: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
// ym: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
content: undefined,
|
content: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
@ -181,7 +215,7 @@
|
|||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProjectName()
|
getOrganizations()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,57 +1,166 @@
|
|||||||
<template>
|
<template>
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
<el-form
|
||||||
<!-- <el-form-item label="人员编号" prop="techSn">
|
class="-mb-15px"
|
||||||
<el-input v-model="queryParams.techSn" placeholder="请输入人员编号" clearable @keyup.enter="handleQuery"
|
:model="queryParams"
|
||||||
class="!w-240px" />
|
ref="queryFormRef"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="人员编号" prop="techSn">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.techSn"
|
||||||
|
placeholder="请输入人员编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="人员类型" prop="type">
|
<el-form-item label="人员类型" prop="type">
|
||||||
<el-select v-model="queryParams.type" placeholder="请选择人员类型" clearable class="!w-240px">
|
<el-select
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TYPES)" :key="dict.value" :label="dict.label"
|
v-model="queryParams.type"
|
||||||
:value="dict.value" />
|
placeholder="请选择人员类型"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.TYPES)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="人员名称" prop="technicianName">
|
<el-form-item label="人员名称" prop="technicianName">
|
||||||
<el-input v-model="queryParams.technicianName" placeholder="请输入人员名称" clearable
|
<el-input
|
||||||
@keyup.enter="handleQuery" class="!w-240px" />
|
v-model="queryParams.technicianName"
|
||||||
</el-form-item> -->
|
placeholder="请输入人员名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="所属门店" prop="brandId">
|
<el-form-item label="所属门店" prop="brandId">
|
||||||
<el-select v-model="queryParams.brandId" placeholder="请选择门店" clearable class="!w-240px">
|
<!-- <el-input-->
|
||||||
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
|
<!-- v-model="queryParams.brandId"-->
|
||||||
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
|
<!-- placeholder="请输入门店id"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter="handleQuery"-->
|
||||||
|
<!-- class="!w-240px"-->
|
||||||
|
<!-- />-->
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.brandId"
|
||||||
|
placeholder="请选择门店"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="organizationNameOptions in option"
|
||||||
|
:key="organizationNameOptions.id"
|
||||||
|
:label="organizationNameOptions.name"
|
||||||
|
:value="organizationNameOptions.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="手机号" prop="phone">
|
<!-- <el-form-item label="性别" prop="sex">-->
|
||||||
<el-input v-model="queryParams.phone" placeholder="请输入手机号" clearable @keyup.enter="handleQuery"
|
<!-- <el-select-->
|
||||||
class="!w-240px" />
|
<!-- v-model="queryParams.sex"-->
|
||||||
</el-form-item> -->
|
<!-- placeholder="请选择性别"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- class="!w-240px"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="dict in getIntDictOptions(DICT_TYPE.SEX)"-->
|
||||||
|
<!-- :key="dict.value"-->
|
||||||
|
<!-- :label="dict.label"-->
|
||||||
|
<!-- :value="dict.value"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="服务时间段" prop="serviceTime">-->
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="queryParams.serviceTime"-->
|
||||||
|
<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
|
||||||
|
<!-- class="!w-240px"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="服务范围" prop="serviceScope">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.serviceScope"-->
|
||||||
|
<!-- placeholder="请输入服务范围"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter="handleQuery"-->
|
||||||
|
<!-- class="!w-240px"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="手机号" prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phone"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="约满标记" prop="ym">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.ym"-->
|
||||||
|
<!-- placeholder="请输入约满标记"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter="handleQuery"-->
|
||||||
|
<!-- class="!w-240px"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
<el-select
|
||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.TECHNICIAN_STATUS)" :key="dict.value"
|
v-model="queryParams.status"
|
||||||
:label="dict.label" :value="dict.value" />
|
placeholder="请选择状态"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.TECHNICIAN_STATUS)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间" prop="createTime">
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
<el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
|
<el-date-picker
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期"
|
v-model="queryParams.createTime"
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-240px" />
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery">
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
</el-button>
|
<el-button
|
||||||
<el-button @click="resetQuery">
|
type="primary"
|
||||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
plain
|
||||||
</el-button>
|
@click="openForm('create')"
|
||||||
<el-button type="primary" plain @click="openForm('create')"
|
v-hasPermi="['subscribe:litemall-technician:create']"
|
||||||
v-hasPermi="['subscribe:litemall-technician:create']">
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="success" plain @click="handleExport" :loading="exportLoading"
|
<el-button
|
||||||
v-hasPermi="['subscribe:litemall-technician:export']">
|
type="success"
|
||||||
|
plain
|
||||||
|
@click="handleExport"
|
||||||
|
:loading="exportLoading"
|
||||||
|
v-hasPermi="['subscribe:litemall-technician:export']"
|
||||||
|
>
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -62,58 +171,81 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="ID" align="center" prop="id" />
|
<el-table-column label="ID" align="center" prop="id" />
|
||||||
<!-- <el-table-column label="人员编号" align="center" prop="techSn" />
|
<el-table-column label="人员编号" align="center" prop="techSn" />
|
||||||
<el-table-column label="人员类型" align="center" prop="type">
|
<el-table-column label="人员类型" align="center" prop="type">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.TYPES" :value="scope.row.type" />
|
<dict-tag :type="DICT_TYPE.TYPES" :value="scope.row.type" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="人员名称" align="center" prop="technicianName" /> -->
|
<el-table-column label="人员名称" align="center" prop="technicianName" />
|
||||||
<el-table-column label="归属项目" align="center" prop="brandName" />
|
<el-table-column label="门店" align="center" prop="brandName" />
|
||||||
<!-- <el-table-column label="性别" align="center" prop="sex">
|
<el-table-column label="性别" align="center" prop="sex">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.SEX" :value="scope.row.sex" />
|
<dict-tag :type="DICT_TYPE.SEX" :value="scope.row.sex" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column>
|
||||||
<el-table-column label="图片" align="center" prop="photo">
|
<el-table-column label="照片" align="center" prop="photo" >
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-image fit="cover" :src="row.photo" class="flex-none w-50px h-50px"
|
<el-image
|
||||||
@click="imagePreview(row.photo)" />
|
fit="cover"
|
||||||
|
:src="row.photo"
|
||||||
|
class="flex-none w-50px h-50px"
|
||||||
|
@click="imagePreview(row.photo)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="服务时间段" align="center" prop="serviceTimeArray" width="200" />
|
<el-table-column label="服务时间段" align="center" prop="serviceTimeArray" width="200" />
|
||||||
<el-table-column label="服务范围" align="center" prop="serviceScope" />
|
<el-table-column label="服务范围" align="center" prop="serviceScope" />
|
||||||
|
<el-table-column label="手机号" align="center" prop="phone" />
|
||||||
<el-table-column label="约满标记" align="center" prop="ym" />
|
<el-table-column label="约满标记" align="center" prop="ym" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.TECHNICIAN_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.TECHNICIAN_STATUS" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="介绍" align="center" prop="content">
|
<el-table-column label="介绍" align="center" prop="content" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-html="scope.row.content"></div>
|
<div v-html="scope.row.content"></div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter" width="180px" />
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
width="180px"
|
||||||
|
/>
|
||||||
<el-table-column label="操作" align="center" fixed="right" width="110">
|
<el-table-column label="操作" align="center" fixed="right" width="110">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="openForm('update', scope.row.id)"
|
<el-button
|
||||||
v-hasPermi="['subscribe:litemall-technician:update']">
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="openForm('update', scope.row.id)"
|
||||||
|
v-hasPermi="['subscribe:litemall-technician:update']"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"
|
<el-button
|
||||||
v-hasPermi="['subscribe:litemall-technician:delete']">
|
link
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete(scope.row.id)"
|
||||||
|
v-hasPermi="['subscribe:litemall-technician:delete']"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
<Pagination
|
||||||
@pagination="getList" />
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
@ -121,23 +253,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
|
import { LitemallTechnicianApi, LitemallTechnicianVO } from '@/api/subscribe/technician'
|
||||||
import LitemallTechnicianForm from './LitemallTechnicianForm.vue'
|
import LitemallTechnicianForm from './LitemallTechnicianForm.vue'
|
||||||
import { createImageViewer } from "@/components/ImageViewer";
|
import {createImageViewer} from "@/components/ImageViewer";
|
||||||
import { ProjectApi, ProjectVO } from '@/api/subscribe/project'
|
import { LitemallBrandApi, LitemallBrandVO } from '@/api/subscribe/brand'
|
||||||
/** 人员管理 列表 */
|
/** 人员管理 列表 */
|
||||||
defineOptions({ name: 'LitemallTechnician' })
|
defineOptions({ name: 'LitemallTechnician' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const option = ref<ProjectVO[]>([]);
|
const option = ref<LitemallBrandVO[]>([]);
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref<LitemallTechnicianVO[]>([]) // 列表的数据
|
const list = ref<LitemallTechnicianVO[]>([]) // 列表的数据
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
techSn: undefined,
|
techSn: undefined,
|
||||||
@ -155,12 +287,12 @@
|
|||||||
remark: undefined,
|
remark: undefined,
|
||||||
createTime: [],
|
createTime: [],
|
||||||
|
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await LitemallTechnicianApi.getLitemallTechnicianPage(queryParams)
|
const data = await LitemallTechnicianApi.getLitemallTechnicianPage(queryParams)
|
||||||
@ -169,43 +301,43 @@
|
|||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//预约项目下拉框
|
//初始化机构名称下拉框
|
||||||
const getProjectName = async () => {
|
const getOrganization = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
option.value = await ProjectApi.getProjectName()
|
option.value = await LitemallBrandApi.getOrganizations()
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryFormRef.value.resetFields()
|
queryFormRef.value.resetFields()
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
const imagePreview = (imgUrl : string) => {
|
const imagePreview = (imgUrl: string) => {
|
||||||
createImageViewer({
|
createImageViewer({
|
||||||
urlList: [imgUrl]
|
urlList: [imgUrl]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const openForm = (type : string, id ?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
formRef.value.open(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (id : number) => {
|
const handleDelete = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
// 删除的二次确认
|
// 删除的二次确认
|
||||||
await message.delConfirm()
|
await message.delConfirm()
|
||||||
@ -214,11 +346,11 @@
|
|||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
} catch { }
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
try {
|
try {
|
||||||
// 导出的二次确认
|
// 导出的二次确认
|
||||||
await message.exportConfirm()
|
await message.exportConfirm()
|
||||||
@ -230,11 +362,11 @@
|
|||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
getProjectName()
|
getOrganization()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
@ -5,16 +5,13 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
|||||||
public interface ErrorCodeConstants {
|
public interface ErrorCodeConstants {
|
||||||
|
|
||||||
ErrorCode MANAGE_NOT_EXISTS = new ErrorCode(11111, "预约不存在");
|
ErrorCode MANAGE_NOT_EXISTS = new ErrorCode(11111, "预约不存在");
|
||||||
ErrorCode STAFF_NOT_EXISTS = new ErrorCode(11112, "预约人员不存在");
|
ErrorCode STAFF_NOT_EXISTS = new ErrorCode(22222, "预约人员不存在");
|
||||||
ErrorCode ORGANIZATION_NOT_EXISTS = new ErrorCode(11113, "机构不存在");
|
ErrorCode ORGANIZATION_NOT_EXISTS = new ErrorCode(33333, "机构不存在");
|
||||||
|
|
||||||
ErrorCode LITEMALL_TECHNICIAN_NOT_EXISTS = new ErrorCode(11114, "人员管理不存在");
|
ErrorCode LITEMALL_TECHNICIAN_NOT_EXISTS = new ErrorCode(111, "人员管理不存在");
|
||||||
|
|
||||||
ErrorCode LITEMALL_BRAND_NOT_EXISTS = new ErrorCode(11115, "门店管理不存在");
|
ErrorCode LITEMALL_BRAND_NOT_EXISTS = new ErrorCode(222, "门店管理不存在");
|
||||||
|
|
||||||
ErrorCode LITEMALL_RESERVATION_NOT_EXISTS = new ErrorCode(11116, "预约订单不存在");
|
ErrorCode LITEMALL_RESERVATION_NOT_EXISTS = new ErrorCode(333, "预约订单不存在");
|
||||||
|
|
||||||
// ========== 预约项目 TODO 补充编号 ==========
|
|
||||||
ErrorCode PROJECT_NOT_EXISTS = new ErrorCode(11117, "预约项目不存在");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,104 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.project;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectRespVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectSaveReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.project.ProjectDO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.service.project.ProjectService;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
||||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
|
||||||
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 预约项目")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/subscribe/project")
|
|
||||||
@Validated
|
|
||||||
public class ProjectController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ProjectService projectService;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "创建预约项目")
|
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:project:create')")
|
|
||||||
public CommonResult<Long> createProject(@Valid @RequestBody ProjectSaveReqVO createReqVO) {
|
|
||||||
return success(projectService.createProject(createReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新预约项目")
|
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:project:update')")
|
|
||||||
public CommonResult<Boolean> updateProject(@Valid @RequestBody ProjectSaveReqVO updateReqVO) {
|
|
||||||
projectService.updateProject(updateReqVO);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
|
||||||
@Operation(summary = "删除预约项目")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:project:delete')")
|
|
||||||
public CommonResult<Boolean> deleteProject(@RequestParam("id") Long id) {
|
|
||||||
projectService.deleteProject(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/get")
|
|
||||||
@Operation(summary = "获得预约项目")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:project:query')")
|
|
||||||
public CommonResult<ProjectRespVO> getProject(@RequestParam("id") Long id) {
|
|
||||||
ProjectDO project = projectService.getProject(id);
|
|
||||||
return success(BeanUtils.toBean(project, ProjectRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "获得预约项目分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:project:query')")
|
|
||||||
public CommonResult<PageResult<ProjectRespVO>> getProjectPage(@Valid ProjectPageReqVO pageReqVO) {
|
|
||||||
PageResult<ProjectDO> pageResult = projectService.getProjectPage(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, ProjectRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
|
||||||
@Operation(summary = "导出预约项目 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('subscribe:project:export')")
|
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
|
||||||
public void exportProjectExcel(@Valid ProjectPageReqVO pageReqVO,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
||||||
List<ProjectDO> list = projectService.getProjectPage(pageReqVO).getList();
|
|
||||||
// 导出 Excel
|
|
||||||
ExcelUtils.write(response, "预约项目.xls", "数据", ProjectRespVO.class,
|
|
||||||
BeanUtils.toBean(list, ProjectRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/getProjectName")
|
|
||||||
public CommonResult<List<ProjectDO>> getProjectPage() {
|
|
||||||
List<ProjectDO> projectName = projectService.getProjectName();
|
|
||||||
return success(projectName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import lombok.*;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 预约项目分页 Request VO")
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class ProjectPageReqVO extends PageParam {
|
|
||||||
|
|
||||||
@Schema(description = "所属门店", example = "18441")
|
|
||||||
private Long brandId;
|
|
||||||
|
|
||||||
@Schema(description = "项目名称", example = "芋艿")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "项目图片")
|
|
||||||
private String pictrue;
|
|
||||||
|
|
||||||
@Schema(description = "项目简介")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
@Schema(description = "状态", example = "1")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "可预约日期")
|
|
||||||
private String timeInterval;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] createTime;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.*;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 预约项目 Response VO")
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class ProjectRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21557")
|
|
||||||
@ExcelProperty("ID")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "所属门店", requiredMode = Schema.RequiredMode.REQUIRED, example = "18441")
|
|
||||||
@ExcelProperty("所属门店")
|
|
||||||
private Long brandId;
|
|
||||||
|
|
||||||
@Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
|
||||||
@ExcelProperty("项目名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "项目图片", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("项目图片")
|
|
||||||
private String pictrue;
|
|
||||||
|
|
||||||
@Schema(description = "项目简介")
|
|
||||||
@ExcelProperty("项目简介")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
|
||||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
|
||||||
@DictFormat("subscribe_project_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "可预约日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("可预约日期")
|
|
||||||
private String timeInterval;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@ExcelProperty("创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
|
|
||||||
private String brandName;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.*;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 预约项目新增/修改 Request VO")
|
|
||||||
@Data
|
|
||||||
public class ProjectSaveReqVO {
|
|
||||||
|
|
||||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21557")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "所属门店", requiredMode = Schema.RequiredMode.REQUIRED, example = "18441")
|
|
||||||
@NotNull(message = "所属门店不能为空")
|
|
||||||
private Long brandId;
|
|
||||||
|
|
||||||
@Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
|
||||||
@NotEmpty(message = "项目名称不能为空")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "项目图片", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotEmpty(message = "项目图片不能为空")
|
|
||||||
private String pictrue;
|
|
||||||
|
|
||||||
@Schema(description = "项目简介")
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
|
||||||
@NotNull(message = "状态不能为空")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@Schema(description = "可预约日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotEmpty(message = "可预约日期不能为空")
|
|
||||||
private String timeInterval;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -15,9 +15,20 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class LitemallTechnicianPageReqVO extends PageParam {
|
public class LitemallTechnicianPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "人员编号")
|
||||||
|
private String techSn;
|
||||||
|
|
||||||
@Schema(description = "项目id", example = "28184")
|
@Schema(description = "人员类型", example = "1")
|
||||||
private Long projectId;
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "人员名称", example = "赵六")
|
||||||
|
private String technicianName;
|
||||||
|
|
||||||
|
@Schema(description = "门店id", example = "28184")
|
||||||
|
private Long brandId;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
@Schema(description = "照片")
|
@Schema(description = "照片")
|
||||||
private String photo;
|
private String photo;
|
||||||
@ -29,6 +40,9 @@ public class LitemallTechnicianPageReqVO extends PageParam {
|
|||||||
@Schema(description = "服务范围")
|
@Schema(description = "服务范围")
|
||||||
private String serviceScope;
|
private String serviceScope;
|
||||||
|
|
||||||
|
@Schema(description = "手机号")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
@Schema(description = "约满标记")
|
@Schema(description = "约满标记")
|
||||||
private Integer ym;
|
private Integer ym;
|
||||||
|
|
||||||
|
@ -19,9 +19,27 @@ public class LitemallTechnicianRespVO {
|
|||||||
@ExcelProperty("id")
|
@ExcelProperty("id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28184")
|
@Schema(description = "人员编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("项目id")
|
@ExcelProperty("人员编号")
|
||||||
private Long projectId;
|
private String techSn;
|
||||||
|
|
||||||
|
@Schema(description = "人员类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty(value = "人员类型", converter = DictConvert.class)
|
||||||
|
@DictFormat("types") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "人员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||||
|
@ExcelProperty("人员名称")
|
||||||
|
private String technicianName;
|
||||||
|
|
||||||
|
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28184")
|
||||||
|
@ExcelProperty("门店id")
|
||||||
|
private Long brandId;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
@ExcelProperty(value = "性别", converter = DictConvert.class)
|
||||||
|
@DictFormat("sex") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
@Schema(description = "照片")
|
@Schema(description = "照片")
|
||||||
@ExcelProperty("照片")
|
@ExcelProperty("照片")
|
||||||
@ -35,6 +53,9 @@ public class LitemallTechnicianRespVO {
|
|||||||
@ExcelProperty("服务范围")
|
@ExcelProperty("服务范围")
|
||||||
private String serviceScope;
|
private String serviceScope;
|
||||||
|
|
||||||
|
@Schema(description = "手机号")
|
||||||
|
@ExcelProperty("手机号")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
@Schema(description = "约满标记")
|
@Schema(description = "约满标记")
|
||||||
@ExcelProperty("约满标记")
|
@ExcelProperty("约满标记")
|
||||||
|
@ -12,9 +12,23 @@ public class LitemallTechnicianSaveReqVO {
|
|||||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26372")
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26372")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28184")
|
@Schema(description = "人员编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "项目不能为空")
|
private String techSn;
|
||||||
private Long projectId;
|
|
||||||
|
@Schema(description = "人员类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotNull(message = "人员类型不能为空")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "人员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||||
|
@NotEmpty(message = "人员名称不能为空")
|
||||||
|
private String technicianName;
|
||||||
|
|
||||||
|
@Schema(description = "门店id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28184")
|
||||||
|
@NotNull(message = "门店不能为空")
|
||||||
|
private Long brandId;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
@Schema(description = "照片")
|
@Schema(description = "照片")
|
||||||
private String photo;
|
private String photo;
|
||||||
@ -25,6 +39,9 @@ public class LitemallTechnicianSaveReqVO {
|
|||||||
@Schema(description = "服务范围")
|
@Schema(description = "服务范围")
|
||||||
private String serviceScope;
|
private String serviceScope;
|
||||||
|
|
||||||
|
@Schema(description = "手机号")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
@Schema(description = "约满标记")
|
@Schema(description = "约满标记")
|
||||||
private Integer ym;
|
private Integer ym;
|
||||||
|
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.dal.dataobject.project;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预约项目 DO
|
|
||||||
*
|
|
||||||
* @author 管理员
|
|
||||||
*/
|
|
||||||
@TableName("subscribe_project")
|
|
||||||
@KeySequence("subscribe_project_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ProjectDO extends BaseDO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ID
|
|
||||||
*/
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
/**
|
|
||||||
* 所属门店
|
|
||||||
*/
|
|
||||||
private Long brandId;
|
|
||||||
/**
|
|
||||||
* 项目名称
|
|
||||||
*/
|
|
||||||
private String name;
|
|
||||||
/**
|
|
||||||
* 项目图片
|
|
||||||
*/
|
|
||||||
private String pictrue;
|
|
||||||
/**
|
|
||||||
* 项目简介
|
|
||||||
*/
|
|
||||||
private String content;
|
|
||||||
/**
|
|
||||||
* 状态
|
|
||||||
*
|
|
||||||
* 枚举 {@link TODO subscribe_project_status 对应的类}
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
/**
|
|
||||||
* 可预约日期
|
|
||||||
*/
|
|
||||||
private String timeInterval;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String brandName;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -29,9 +29,29 @@ public class LitemallTechnicianDO extends BaseDO {
|
|||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 项目id
|
* 人员编号
|
||||||
*/
|
*/
|
||||||
private Long projectId;
|
private String techSn;
|
||||||
|
/**
|
||||||
|
* 人员类型
|
||||||
|
*
|
||||||
|
* 枚举 {@link TODO types 对应的类}
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
/**
|
||||||
|
* 人员名称
|
||||||
|
*/
|
||||||
|
private String technicianName;
|
||||||
|
/**
|
||||||
|
* 门店id
|
||||||
|
*/
|
||||||
|
private Long brandId;
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*
|
||||||
|
* 枚举 {@link TODO sex 对应的类}
|
||||||
|
*/
|
||||||
|
private Integer sex;
|
||||||
/**
|
/**
|
||||||
* 照片
|
* 照片
|
||||||
*/
|
*/
|
||||||
@ -44,6 +64,10 @@ public class LitemallTechnicianDO extends BaseDO {
|
|||||||
* 服务范围
|
* 服务范围
|
||||||
*/
|
*/
|
||||||
private String serviceScope;
|
private String serviceScope;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
/**
|
/**
|
||||||
* 约满标记
|
* 约满标记
|
||||||
*/
|
*/
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.dal.mysql.project;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.project.ProjectDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预约项目 Mapper
|
|
||||||
*
|
|
||||||
* @author 管理员
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface ProjectMapper extends BaseMapperX<ProjectDO> {
|
|
||||||
|
|
||||||
default PageResult<ProjectDO> selectPage(ProjectPageReqVO reqVO) {
|
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProjectDO>()
|
|
||||||
.eqIfPresent(ProjectDO::getBrandId, reqVO.getBrandId())
|
|
||||||
.likeIfPresent(ProjectDO::getName, reqVO.getName())
|
|
||||||
.eqIfPresent(ProjectDO::getPictrue, reqVO.getPictrue())
|
|
||||||
.eqIfPresent(ProjectDO::getContent, reqVO.getContent())
|
|
||||||
.eqIfPresent(ProjectDO::getStatus, reqVO.getStatus())
|
|
||||||
.eqIfPresent(ProjectDO::getTimeInterval, reqVO.getTimeInterval())
|
|
||||||
.betweenIfPresent(ProjectDO::getCreateTime, reqVO.getCreateTime())
|
|
||||||
.orderByDesc(ProjectDO::getId));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -21,9 +21,15 @@ public interface LitemallTechnicianMapper extends BaseMapperX<LitemallTechnician
|
|||||||
|
|
||||||
default PageResult<LitemallTechnicianDO> selectPage(LitemallTechnicianPageReqVO reqVO) {
|
default PageResult<LitemallTechnicianDO> selectPage(LitemallTechnicianPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<LitemallTechnicianDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<LitemallTechnicianDO>()
|
||||||
|
.eqIfPresent(LitemallTechnicianDO::getTechSn, reqVO.getTechSn())
|
||||||
|
.eqIfPresent(LitemallTechnicianDO::getType, reqVO.getType())
|
||||||
|
.likeIfPresent(LitemallTechnicianDO::getTechnicianName, reqVO.getTechnicianName())
|
||||||
|
.eqIfPresent(LitemallTechnicianDO::getBrandId, reqVO.getBrandId())
|
||||||
|
.eqIfPresent(LitemallTechnicianDO::getSex, reqVO.getSex())
|
||||||
.eqIfPresent(LitemallTechnicianDO::getPhoto, reqVO.getPhoto())
|
.eqIfPresent(LitemallTechnicianDO::getPhoto, reqVO.getPhoto())
|
||||||
.betweenIfPresent(LitemallTechnicianDO::getServiceTime, reqVO.getServiceTime())
|
.betweenIfPresent(LitemallTechnicianDO::getServiceTime, reqVO.getServiceTime())
|
||||||
.eqIfPresent(LitemallTechnicianDO::getServiceScope, reqVO.getServiceScope())
|
.eqIfPresent(LitemallTechnicianDO::getServiceScope, reqVO.getServiceScope())
|
||||||
|
.eqIfPresent(LitemallTechnicianDO::getPhone, reqVO.getPhone())
|
||||||
.eqIfPresent(LitemallTechnicianDO::getYm, reqVO.getYm())
|
.eqIfPresent(LitemallTechnicianDO::getYm, reqVO.getYm())
|
||||||
.eqIfPresent(LitemallTechnicianDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(LitemallTechnicianDO::getStatus, reqVO.getStatus())
|
||||||
.eqIfPresent(LitemallTechnicianDO::getContent, reqVO.getContent())
|
.eqIfPresent(LitemallTechnicianDO::getContent, reqVO.getContent())
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.service.project;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectSaveReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.project.ProjectDO;
|
|
||||||
|
|
||||||
import javax.validation.*;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预约项目 Service 接口
|
|
||||||
*
|
|
||||||
* @author 管理员
|
|
||||||
*/
|
|
||||||
public interface ProjectService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建预约项目
|
|
||||||
*
|
|
||||||
* @param createReqVO 创建信息
|
|
||||||
* @return 编号
|
|
||||||
*/
|
|
||||||
Long createProject(@Valid ProjectSaveReqVO createReqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新预约项目
|
|
||||||
*
|
|
||||||
* @param updateReqVO 更新信息
|
|
||||||
*/
|
|
||||||
void updateProject(@Valid ProjectSaveReqVO updateReqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除预约项目
|
|
||||||
*
|
|
||||||
* @param id 编号
|
|
||||||
*/
|
|
||||||
void deleteProject(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获得预约项目
|
|
||||||
*
|
|
||||||
* @param id 编号
|
|
||||||
* @return 预约项目
|
|
||||||
*/
|
|
||||||
ProjectDO getProject(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获得预约项目分页
|
|
||||||
*
|
|
||||||
* @param pageReqVO 分页查询
|
|
||||||
* @return 预约项目分页
|
|
||||||
*/
|
|
||||||
PageResult<ProjectDO> getProjectPage(ProjectPageReqVO pageReqVO);
|
|
||||||
|
|
||||||
List<ProjectDO> getProjectName();
|
|
||||||
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.srbscribe.service.project;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.project.vo.ProjectSaveReqVO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.project.ProjectDO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.brand.LitemallBrandMapper;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.project.ProjectMapper;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
||||||
import static cn.iocoder.yudao.module.subscribe.enums.ErrorCodeConstants.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预约项目 Service 实现类
|
|
||||||
*
|
|
||||||
* @author 管理员
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Validated
|
|
||||||
public class ProjectServiceImpl implements ProjectService {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ProjectMapper projectMapper;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private LitemallBrandMapper litemallBrandMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long createProject(ProjectSaveReqVO createReqVO) {
|
|
||||||
// 插入
|
|
||||||
ProjectDO project = BeanUtils.toBean(createReqVO, ProjectDO.class);
|
|
||||||
projectMapper.insert(project);
|
|
||||||
// 返回
|
|
||||||
return project.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProject(ProjectSaveReqVO updateReqVO) {
|
|
||||||
// 校验存在
|
|
||||||
validateProjectExists(updateReqVO.getId());
|
|
||||||
// 更新
|
|
||||||
ProjectDO updateObj = BeanUtils.toBean(updateReqVO, ProjectDO.class);
|
|
||||||
projectMapper.updateById(updateObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteProject(Long id) {
|
|
||||||
// 校验存在
|
|
||||||
validateProjectExists(id);
|
|
||||||
// 删除
|
|
||||||
projectMapper.deleteById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateProjectExists(Long id) {
|
|
||||||
if (projectMapper.selectById(id) == null) {
|
|
||||||
throw exception(PROJECT_NOT_EXISTS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ProjectDO getProject(Long id) {
|
|
||||||
return projectMapper.selectById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResult<ProjectDO> getProjectPage(ProjectPageReqVO pageReqVO) {
|
|
||||||
PageResult<ProjectDO> projectDOPageResult = projectMapper.selectPage(pageReqVO);
|
|
||||||
for (int i = 0; i < projectDOPageResult.getList().size(); i++) {
|
|
||||||
ProjectDO projectDO = projectDOPageResult.getList().get(i);
|
|
||||||
LitemallBrandDO litemallBrandDO = litemallBrandMapper.selectOne("id", projectDO.getBrandId());
|
|
||||||
projectDO.setBrandName(litemallBrandDO.getName());
|
|
||||||
|
|
||||||
}
|
|
||||||
return projectDOPageResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ProjectDO> getProjectName() {
|
|
||||||
return projectMapper.selectList();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -113,8 +113,8 @@ public class LitemallReservationServiceImpl implements LitemallReservationServic
|
|||||||
litemallReservationDO.setBrandName(litemallBrandDO.getName());
|
litemallReservationDO.setBrandName(litemallBrandDO.getName());
|
||||||
litemallReservationDO.setBrandaddress(litemallBrandDO.getAddress());
|
litemallReservationDO.setBrandaddress(litemallBrandDO.getAddress());
|
||||||
|
|
||||||
// LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianMapper.selectOne("id", litemallReservationDO.getTechnicianId());
|
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianMapper.selectOne("id", litemallReservationDO.getTechnicianId());
|
||||||
// litemallReservationDO.setTechnicianName(litemallTechnicianDO.getTechnicianName());
|
litemallReservationDO.setTechnicianName(litemallTechnicianDO.getTechnicianName());
|
||||||
|
|
||||||
MemberUserDO memberUserDO = memberUserMapper.selectOne("id", litemallReservationDO.getUserId());
|
MemberUserDO memberUserDO = memberUserMapper.selectOne("id", litemallReservationDO.getUserId());
|
||||||
litemallReservationDO.setNickname(memberUserDO.getNickname());
|
litemallReservationDO.setNickname(memberUserDO.getNickname());
|
||||||
|
@ -6,10 +6,8 @@ import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.Litemall
|
|||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianSaveReqVO;
|
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.LitemallTechnicianSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.ServiceTimeVO;
|
import cn.iocoder.yudao.module.srbscribe.controller.admin.technician.vo.ServiceTimeVO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
|
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.brand.LitemallBrandDO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.project.ProjectDO;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
|
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.brand.LitemallBrandMapper;
|
import cn.iocoder.yudao.module.srbscribe.dal.mysql.brand.LitemallBrandMapper;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.project.ProjectMapper;
|
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.mysql.technician.LitemallTechnicianMapper;
|
import cn.iocoder.yudao.module.srbscribe.dal.mysql.technician.LitemallTechnicianMapper;
|
||||||
import cn.iocoder.yudao.module.srbscribe.service.brand.LitemallBrandService;
|
import cn.iocoder.yudao.module.srbscribe.service.brand.LitemallBrandService;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
@ -42,9 +40,6 @@ public class LitemallTechnicianServiceImpl implements LitemallTechnicianService
|
|||||||
@Resource
|
@Resource
|
||||||
private LitemallBrandMapper litemallBrandMapper;
|
private LitemallBrandMapper litemallBrandMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ProjectMapper projectMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询技师管理列表
|
* 查询技师管理列表
|
||||||
@ -115,8 +110,8 @@ public class LitemallTechnicianServiceImpl implements LitemallTechnicianService
|
|||||||
String serviceTime = "";
|
String serviceTime = "";
|
||||||
for (int i = 0; i < litemallTechnicianDOPageResult.getList().size(); i++) {
|
for (int i = 0; i < litemallTechnicianDOPageResult.getList().size(); i++) {
|
||||||
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianDOPageResult.getList().get(i);
|
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianDOPageResult.getList().get(i);
|
||||||
ProjectDO projectDO = projectMapper.selectOne("id", litemallTechnicianDO.getProjectId());
|
LitemallBrandDO litemallBrandDO = litemallBrandMapper.selectOne("id", litemallTechnicianDO.getBrandId());
|
||||||
litemallTechnicianDO.setBrandName(projectDO.getName());
|
litemallTechnicianDO.setBrandName(litemallBrandDO.getName());
|
||||||
|
|
||||||
if(litemallTechnicianDO.getServiceTime() != null && litemallTechnicianDO.getServiceTime() != ""){
|
if(litemallTechnicianDO.getServiceTime() != null && litemallTechnicianDO.getServiceTime() != ""){
|
||||||
//把StringJSON格式serviceTime转成对象
|
//把StringJSON格式serviceTime转成对象
|
||||||
|
Loading…
Reference in New Issue
Block a user