Merge branch 'master' of https://gitea.zianxin.com/zax/biz-pc-cloud
This commit is contained in:
commit
01fb67fa1b
9 files changed
+374
-30
No files matched your search
@@ -0,0 +1,51 @@
|
|||||||
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
|
export function fetchList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/integrated/cleanUser/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/integrated/cleanUser',
|
||||||
|
method: 'post',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getObj(id?: string) {
|
||||||
|
return request({
|
||||||
|
url: '/integrated/cleanUser/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delObjs(ids?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/integrated/cleanUser',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function putObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/integrated/cleanUser',
|
||||||
|
method: 'put',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取保洁用户下拉选项
|
||||||
|
*/
|
||||||
|
export function dropdown() {
|
||||||
|
return request({
|
||||||
|
url: '/integrated/cleanUser/dropdown',
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<el-row v-show="showSearch">
|
<el-row v-show="showSearch">
|
||||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||||
<el-form-item label="包厢" prop="boxesName">
|
<el-form-item label="餐桌" prop="boxesName">
|
||||||
<el-input placeholder="请输入包厢" v-model="state.queryForm.boxesName" />
|
<el-input placeholder="请输入餐桌" v-model="state.queryForm.boxesName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户" prop="userId">
|
<el-form-item label="用户" prop="userId">
|
||||||
<el-input placeholder="请输入用户" v-model="state.queryForm.userName" />
|
<el-input placeholder="请输入用户" v-model="state.queryForm.userName" />
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="50" />
|
<el-table-column type="index" label="#" width="50" />
|
||||||
<el-table-column prop="boxesName" label="包厢名称" show-overflow-tooltip />
|
<el-table-column prop="boxesName" label="餐桌名称" show-overflow-tooltip />
|
||||||
<el-table-column prop="startTime" label="开始时间" show-overflow-tooltip min-width="160" />
|
<el-table-column prop="startTime" label="开始时间" show-overflow-tooltip min-width="160" />
|
||||||
<el-table-column prop="endTime" label="结束时间" show-overflow-tooltip min-width="160" />
|
<el-table-column prop="endTime" label="结束时间" show-overflow-tooltip min-width="160" />
|
||||||
<el-table-column prop="checkStatus" label="审核状态" show-overflow-tooltip min-width="160">
|
<el-table-column prop="checkStatus" label="审核状态" show-overflow-tooltip min-width="160">
|
||||||
@@ -126,7 +126,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
downBlobFile("/canteen/boxesBooking/export", Object.assign(state.queryForm, { ids: selectObjs }), "包厢预约管理.xlsx")
|
downBlobFile("/canteen/boxesBooking/export", Object.assign(state.queryForm, { ids: selectObjs }), "餐桌预约管理.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选事件
|
// 多选事件
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<el-row v-show="showSearch">
|
<el-row v-show="showSearch">
|
||||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||||
<el-form-item label="包厢名称" prop="name">
|
<el-form-item label="餐桌名称" prop="name">
|
||||||
<el-input placeholder="请输入包厢名称" v-model="state.queryForm.name" />
|
<el-input placeholder="请输入餐桌名称" v-model="state.queryForm.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||||
@@ -49,21 +49,21 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="50" />
|
<el-table-column type="index" label="#" width="50" />
|
||||||
<el-table-column prop="name" label="包厢名称" show-overflow-tooltip />
|
<el-table-column prop="name" label="餐桌名称" show-overflow-tooltip />
|
||||||
<el-table-column prop="capacity" label="容纳人数" show-overflow-tooltip />
|
<el-table-column prop="capacity" label="容纳人数" show-overflow-tooltip />
|
||||||
<el-table-column prop="description" label="包厢描述" show-overflow-tooltip />
|
<el-table-column prop="description" label="餐桌描述" show-overflow-tooltip />
|
||||||
<el-table-column prop="address" label="包厢地址" show-overflow-tooltip />
|
<el-table-column prop="address" label="餐桌摆放样式" show-overflow-tooltip />
|
||||||
<el-table-column prop="images" label="包厢图片" show-overflow-tooltip>
|
<el-table-column prop="images" label="餐桌图片" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<preview-image :src="scope.row.images" />
|
<preview-image :src="scope.row.images" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="status" label="包厢状态" show-overflow-tooltip>
|
<el-table-column prop="status" label="餐桌状态" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="boxes_status" :value="scope.row.status" />
|
<dict-tag :options="boxes_status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="price" label="包厢价格单位分" show-overflow-tooltip />-->
|
<!-- <el-table-column prop="price" label="餐桌价格单位分" show-overflow-tooltip />-->
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -131,7 +131,7 @@ const resetQuery = () => {
|
|||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
downBlobFile("/canteen/boxesInfo/export", Object.assign(state.queryForm, { ids: selectObjs }), "包厢列表.xlsx")
|
downBlobFile("/canteen/boxesInfo/export", Object.assign(state.queryForm, { ids: selectObjs }), "餐桌列表.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选事件
|
// 多选事件
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
<el-input-number v-model="form.price" :min="0" :precision="2" placeholder="请输入商品价格" />
|
<el-input-number v-model="form.price" :min="0" :precision="2" placeholder="请输入商品价格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14" class="mb20">
|
<!-- <el-col :span="14" class="mb20">-->
|
||||||
<el-form-item label="市场价" prop="marketPrice">
|
<!-- <el-form-item label="市场价" prop="marketPrice">-->
|
||||||
<el-input-number v-model="form.marketPrice" :min="0" :precision="2" placeholder="请输入市场价" />
|
<!-- <el-input-number v-model="form.marketPrice" :min="0" :precision="2" placeholder="请输入市场价" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="14" class="mb20">
|
<el-col :span="14" class="mb20">
|
||||||
<el-form-item label="库存" prop="stock">
|
<el-form-item label="库存" prop="stock">
|
||||||
<el-input-number v-model="form.stock" :min="0" :precision="0" placeholder="请输入库存" />
|
<el-input-number v-model="form.stock" :min="0" :precision="0" placeholder="请输入库存" />
|
||||||
|
|||||||
@@ -88,11 +88,11 @@
|
|||||||
{{ displayPrice(scope.row.price) }}
|
{{ displayPrice(scope.row.price) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="marketPrice" label="市场价" show-overflow-tooltip min-width="100">
|
<!-- <el-table-column prop="marketPrice" label="市场价" show-overflow-tooltip min-width="100">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
{{ displayPrice(scope.row.marketPrice) }}
|
<!-- {{ displayPrice(scope.row.marketPrice) }}-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column prop="stock" label="库存" show-overflow-tooltip min-width="100" />
|
<el-table-column prop="stock" label="库存" show-overflow-tooltip min-width="100" />
|
||||||
<el-table-column prop="salesCount" label="商品销量" show-overflow-tooltip min-width="100" />
|
<el-table-column prop="salesCount" label="商品销量" show-overflow-tooltip min-width="100" />
|
||||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
||||||
|
:close-on-click-modal="false" draggable>
|
||||||
|
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="姓名" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="手机号" prop="phone">
|
||||||
|
<el-input v-model="form.phone" placeholder="请输入手机号"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="部门id" prop="deptId">
|
||||||
|
<el-input v-model="form.deptId" placeholder="请输入部门id"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="照片" prop="picUrl">
|
||||||
|
<upload-img v-model="form.picUrl"></upload-img>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="CleanUserDialog">
|
||||||
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
import { useMessage } from "/@/hooks/message";
|
||||||
|
import { getObj, addObj, putObj } from '/@/api/integrated/cleanUser'
|
||||||
|
import { rule } from '/@/utils/validate';
|
||||||
|
const emit = defineEmits(['refresh']);
|
||||||
|
|
||||||
|
// 定义变量内容
|
||||||
|
const dataFormRef = ref();
|
||||||
|
const visible = ref(false)
|
||||||
|
const loading = ref(false)
|
||||||
|
// 定义字典
|
||||||
|
|
||||||
|
// 提交表单数据
|
||||||
|
const form = reactive({
|
||||||
|
id:'',
|
||||||
|
name: '',
|
||||||
|
phone: '',
|
||||||
|
deptId: '',
|
||||||
|
picUrl: '',
|
||||||
|
});
|
||||||
|
|
||||||
|
// 定义校验规则
|
||||||
|
const dataRules = ref({
|
||||||
|
name: [{required: true, message: '姓名不能为空', trigger: 'blur'}],
|
||||||
|
phone: [{required: true, message: '手机号不能为空', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (id: string) => {
|
||||||
|
visible.value = true
|
||||||
|
form.id = ''
|
||||||
|
|
||||||
|
// 重置表单数据
|
||||||
|
nextTick(() => {
|
||||||
|
dataFormRef.value?.resetFields();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取cleanUser信息
|
||||||
|
if (id) {
|
||||||
|
form.id = id
|
||||||
|
getcleanUserData(id)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const onSubmit = async () => {
|
||||||
|
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||||
|
if (!valid) return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
loading.value = true;
|
||||||
|
form.id ? await putObj(form) : await addObj(form);
|
||||||
|
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||||
|
visible.value = false;
|
||||||
|
emit('refresh');
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 初始化表单数据
|
||||||
|
const getcleanUserData = (id: string) => {
|
||||||
|
// 获取数据
|
||||||
|
loading.value = true
|
||||||
|
getObj(id).then((res: any) => {
|
||||||
|
Object.assign(form, res.data)
|
||||||
|
}).finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露变量
|
||||||
|
defineExpose({
|
||||||
|
openDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
<el-row v-show="showSearch">
|
||||||
|
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||||
|
<el-form-item label="姓名" prop="name" >
|
||||||
|
<el-input placeholder="请输入姓名" v-model="state.queryForm.name" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="phone" >
|
||||||
|
<el-input placeholder="请输入手机号" v-model="state.queryForm.phone" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="search" type="primary" @click="getDataList">
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||||
|
v-auth="'integrated_cleanUser_add'">
|
||||||
|
新 增
|
||||||
|
</el-button>
|
||||||
|
<el-button plain :disabled="multiple" icon="Delete" type="primary"
|
||||||
|
v-auth="'integrated_cleanUser_del'" @click="handleDelete(selectObjs)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" :export="'integrated_cleanUser_export'"
|
||||||
|
@exportExcel="exportExcel" class="ml10 mr20" style="float: right;"
|
||||||
|
@queryTable="getDataList"></right-toolbar>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="state.dataList" v-loading="state.loading" border
|
||||||
|
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
@sort-change="sortChangeHandle">
|
||||||
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
|
<el-table-column type="index" label="#" width="40" />
|
||||||
|
<el-table-column prop="name" label="姓名" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="phone" label="手机号" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="deptId" label="部门id" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="picUrl" label="照片" show-overflow-tooltip/>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button icon="edit-pen" text type="primary" v-auth="'integrated_cleanUser_edit'"
|
||||||
|
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||||
|
<el-button icon="delete" text type="primary" v-auth="'integrated_cleanUser_del'" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 编辑、新增 -->
|
||||||
|
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="systemCleanUser">
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
|
import { fetchList, delObjs } from "/@/api/integrated/cleanUser";
|
||||||
|
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||||
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
|
||||||
|
// 引入组件
|
||||||
|
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||||
|
// 定义查询字典
|
||||||
|
|
||||||
|
// 定义变量内容
|
||||||
|
const formDialogRef = ref()
|
||||||
|
// 搜索变量
|
||||||
|
const queryRef = ref()
|
||||||
|
const showSearch = ref(true)
|
||||||
|
// 多选变量
|
||||||
|
const selectObjs = ref([]) as any
|
||||||
|
const multiple = ref(true)
|
||||||
|
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {},
|
||||||
|
pageList: fetchList
|
||||||
|
})
|
||||||
|
|
||||||
|
// table hook
|
||||||
|
const {
|
||||||
|
getDataList,
|
||||||
|
currentChangeHandle,
|
||||||
|
sizeChangeHandle,
|
||||||
|
sortChangeHandle,
|
||||||
|
downBlobFile,
|
||||||
|
tableStyle
|
||||||
|
} = useTable(state)
|
||||||
|
|
||||||
|
// 清空搜索条件
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields()
|
||||||
|
// 清空多选
|
||||||
|
selectObjs.value = []
|
||||||
|
getDataList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出excel
|
||||||
|
const exportExcel = () => {
|
||||||
|
downBlobFile('/integrated/cleanUser/export', Object.assign(state.queryForm, { ids: selectObjs }), 'cleanUser.xlsx')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 多选事件
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id);
|
||||||
|
multiple.value = !objs.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除操作
|
||||||
|
const handleDelete = async (ids: string[]) => {
|
||||||
|
try {
|
||||||
|
await useMessageBox().confirm('此操作将永久删除');
|
||||||
|
} catch {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await delObjs(ids);
|
||||||
|
getDataList();
|
||||||
|
useMessage().success('删除成功');
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -46,6 +46,19 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="保洁信息" prop="cleanUserId">
|
||||||
|
<el-select v-model="form.cleanUserId" placeholder="请选择保洁人员" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cleanUserOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name || item.label || item.cleanUserName"
|
||||||
|
:value="item.id || item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
<el-col :span="12" class="mb20">
|
||||||
<el-form-item label="可用时间段" prop="availableTime">
|
<el-form-item label="可用时间段" prop="availableTime">
|
||||||
<el-input v-model="form.availableTime" placeholder="请输入可用时间段"/>
|
<el-input v-model="form.availableTime" placeholder="请输入可用时间段"/>
|
||||||
@@ -145,6 +158,7 @@ import { useDict } from '/@/hooks/dict';
|
|||||||
import { useMessage } from "/@/hooks/message";
|
import { useMessage } from "/@/hooks/message";
|
||||||
import { getObj, addObj, putObj } from '/@/api/integrated/meetingRoom'
|
import { getObj, addObj, putObj } from '/@/api/integrated/meetingRoom'
|
||||||
import { fetchList } from '/@/api/integrated/meetingEquipment'
|
import { fetchList } from '/@/api/integrated/meetingEquipment'
|
||||||
|
import { dropdown } from '/@/api/integrated/cleanUser'
|
||||||
import { rule } from '/@/utils/validate';
|
import { rule } from '/@/utils/validate';
|
||||||
const emit = defineEmits(['refresh']);
|
const emit = defineEmits(['refresh']);
|
||||||
|
|
||||||
@@ -153,6 +167,7 @@ const dataFormRef = ref();
|
|||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const activeTab = ref('basic')
|
const activeTab = ref('basic')
|
||||||
|
const cleanUserOptions = ref<any[]>([])
|
||||||
|
|
||||||
interface Equipment {
|
interface Equipment {
|
||||||
equipId: string;
|
equipId: string;
|
||||||
@@ -197,6 +212,7 @@ const form = reactive({
|
|||||||
location: '',
|
location: '',
|
||||||
capacity: 0,
|
capacity: 0,
|
||||||
availableTime: '',
|
availableTime: '',
|
||||||
|
cleanUserId: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
// 定义校验规则
|
// 定义校验规则
|
||||||
@@ -281,12 +297,16 @@ const openDialog = (id: string) => {
|
|||||||
visible.value = true
|
visible.value = true
|
||||||
form.id = ''
|
form.id = ''
|
||||||
equipmentList.value = []
|
equipmentList.value = []
|
||||||
|
form.cleanUserId = ''
|
||||||
|
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dataFormRef.value?.resetFields();
|
dataFormRef.value?.resetFields();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 获取保洁用户下拉数据
|
||||||
|
getCleanUserOptions()
|
||||||
|
|
||||||
// 获取meetingRoom信息
|
// 获取meetingRoom信息
|
||||||
if (id) {
|
if (id) {
|
||||||
form.id = id
|
form.id = id
|
||||||
@@ -294,6 +314,16 @@ const openDialog = (id: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 获取保洁用户下拉选项
|
||||||
|
const getCleanUserOptions = async () => {
|
||||||
|
try {
|
||||||
|
const res = await dropdown()
|
||||||
|
cleanUserOptions.value = Array.isArray(res.data) ? res.data : []
|
||||||
|
} catch (err: any) {
|
||||||
|
console.error('获取保洁用户列表失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
const valid = await dataFormRef.value.validate().catch(() => {});
|
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||||
@@ -331,6 +361,10 @@ const getmeetingRoomData = (id: string) => {
|
|||||||
if (res.data.equipmentList) {
|
if (res.data.equipmentList) {
|
||||||
equipmentList.value = res.data.equipmentList
|
equipmentList.value = res.data.equipmentList
|
||||||
}
|
}
|
||||||
|
// 确保保洁信息正确回显
|
||||||
|
if (res.data.cleanUserId) {
|
||||||
|
form.cleanUserId = res.data.cleanUserId
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -80,7 +80,18 @@
|
|||||||
覆盖导入
|
覆盖导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button plain class="ml10" icon="upload-filled" type="primary" @click="excelUploadPdRef.show()">~盘点导入~</el-button>
|
<el-tooltip effect="dark" content="导入盘点数据" placement="top">
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
v-auth="'supermarket_supermarketSpu_import'"
|
||||||
|
class="ml10"
|
||||||
|
icon="upload-filled"
|
||||||
|
type="primary"
|
||||||
|
@click="excelUploadPd.show()"
|
||||||
|
>
|
||||||
|
盘点导入
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -186,12 +197,7 @@
|
|||||||
@refreshDataList="refreshDataList"
|
@refreshDataList="refreshDataList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<upload-excel
|
<upload-excel ref="excelUploadPd" title="导入库存盘点" url="/supermarket/supermarketSpu/importPD" @refreshDataList="refreshDataList" />
|
||||||
ref="excelUploadPdRef"
|
|
||||||
title="pd导入"
|
|
||||||
url="/supermarket/supermarketSpu/importNewUpdate"
|
|
||||||
@refreshDataList="refreshDataList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -209,6 +215,7 @@ import { getSupplierSimpleAll } from "/@/api/supermarketerp/smErpSupplier"
|
|||||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||||
const excelUploadRef = ref()
|
const excelUploadRef = ref()
|
||||||
const excelUploadUpdateRef = ref()
|
const excelUploadUpdateRef = ref()
|
||||||
|
const excelUploadPd = ref()
|
||||||
const { supermarket_nature, status } = useDict("supermarket_nature", "status")
|
const { supermarket_nature, status } = useDict("supermarket_nature", "status")
|
||||||
const formDialogRef = ref() // 对话框ref引用
|
const formDialogRef = ref() // 对话框ref引用
|
||||||
const queryRef = ref() // 搜索表单ref引用
|
const queryRef = ref() // 搜索表单ref引用
|
||||||
|
|||||||
Reference in new issue
Block a user