Merge branch 'bonus-jyy-smart-canteen' of http://192.168.0.75:3000/bonus/bonus-ui into bonus-jyy-smart-canteen

This commit is contained in:
zzyuan 2025-06-27 16:48:59 +08:00
commit f0ba460485
2 changed files with 531 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import request from '@/utils/request'
import { parseStrEmpty } from '@/utils/bonus'
// 厨房员工列表
export function getIntoRecordsListApi(data) {
return request({
url: '/smart-canteen/kitchen_staff_enter_exit_record/list',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params:data
})
}

View File

@ -0,0 +1,517 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="记录时间">
<el-date-picker
v-model="dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd" style="width: 220px"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="所属组织" prop="deptIdList">
<el-cascader v-model="queryParams.deptIdList"
:options="deptOptions" :filterable="true" placeholder="请选择所属组织" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="关 键 字">
<el-input v-model="queryParams.articleTitle" placeholder="请输入" maxlength="20" clearable style="width: 220px"/>
</el-form-item>
<el-form-item label="所属区域" prop="placeIdList">
<el-cascader v-model="queryParams.placeIdList"
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="所属食堂" prop="placeIdList">
<el-cascader v-model="queryParams.placeIdList"
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item label="所属位置" prop="placeIdList">
<el-cascader v-model="queryParams.placeIdList"
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags >
</el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableListData" height="800" ref="multipleTable">
<el-table-column label="日期时间" align="center" prop="enterTime" :show-overflow-tooltip="true" ></el-table-column>
<el-table-column label="员工编号" align="center" prop="staffNo" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="员工姓名" align="center" prop="staffName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="体温" align="center" prop="temp" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="手机号" align="center" prop="mobile" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="职位" align="center" prop="postName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="区域" align="center" prop="areaName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="食堂" align="center" prop="canteenName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="位置" align="center" prop="placeFullName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="门名称" align="center" prop="doorName" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="进出方式" align="center" prop="inoutType" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="进出方向" align="center" prop="inoutDirection" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框 -->
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-row justify="center">
<table align="center" width="80%" cellspacing="0">
<tr >
<td colspan="4" class="table-title">个人信息</td>
</tr>
<tr >
<td class="table-label"><i class="text-red">*</i> <span >用户姓名</span></td>
<td class="table-content"><span >{{form.nickName}}</span></td>
<td class="table-label"><i class="text-red">*</i> <span >用户编号</span></td>
<td class="table-content"><span >{{form.userId}}</span></td>
</tr>
<tr >
<td class="table-label"><i class="text-red">*</i> <span >所属组织</span></td>
<td class="table-content"><span >{{form.orgFullName}}</span></td>
<td class="table-label"><span >用户类别2</span></td>
<td class="table-content"><span >{{form.userType==1?'其它':'系统'}}</span></td>
</tr>
<tr >
<td class="table-label"><span >用户手机号</span></td>
<td class="table-content"><span >{{form.mobile}}</span></td>
<td class="table-label"><span >性别</span></td>
<td class="table-content"><span >{{form.sex==1?'男':'女'}}</span></td>
</tr>
<tr >
<td class="table-label"><span >位置信息</span></td>
<td class="table-content"><span ></span></td>
<td class="table-label"><span >出生日期</span></td>
<td class="table-content"><span >{{form.birthday}}</span></td>
</tr>
<tr >
<td colspan="4" class="table-title">健康信息</td>
</tr>
<tr >
<td class="table-label"><span >就诊号</span></td>
<td class="table-content">
<el-input
v-model="form.doctorNum"
placeholder="请输入就诊号"
maxlength="40"
show-word-limit
/>
</td>
<td class="table-label"><span >住院号</span></td>
<td class="table-content">
<el-input
v-model="form.hospitalNum"
placeholder="请输入住院号"
maxlength="40"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >身高</span></td>
<td class="table-content">
<el-input
v-model="form.height"
placeholder="请输入住身高"
maxlength="3"
show-word-limit
/>
</td>
<td class="table-label"><span >体重</span></td>
<td class="table-content">
<el-input
v-model="form.weight"
placeholder="请输入住体重"
maxlength="5"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >血型</span></td>
<td class="table-content">
<el-select v-model="form.bloodType" placeholder="请选择血型" style="width: 100%">
<el-option v-for="item in this.bloodTypeOptions"
:key="item.bloodType"
:label="item.bloodTypeName"
:value="item.bloodType"
></el-option>
</el-select>
</td>
<td class="table-label"><span >慢性病</span></td>
<td class="table-content">
<el-select v-model="form.chronicList" placeholder="请选择慢性病" @change="$forceUpdate()" multiple style="width: 100%" clearable collapse-tags>
<el-option v-for="item in chronicOptions"
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
</td>
</tr>
<tr >
<td class="table-label"><span >怀孕状态</span></td>
<td class="table-content">
<el-select v-model="form.pregnantStatus" placeholder="请选择怀孕状态" style="width: 100%">
<el-option v-for="item in this.pregnantOptions"
:key="item.pregnantStatus"
:label="item.pregnantStatusName"
:value="item.pregnantStatus"
></el-option>
</el-select>
</td>
<td class="table-label"><span >怀孕日期</span></td>
<td class="table-content">
<el-date-picker
v-model="form.pregnancyDate"
type="date"
align="right"
unlink-panels
value-format="yyyy-MM-dd" style="width: 100%"
>
</el-date-picker>
</td>
</tr>
<tr >
<td class="table-label"><span >是否住院</span></td>
<td class="table-content">
<el-select v-model="form.ifHospitalized" placeholder="请选择是否住院" style="width: 100%">
<el-option v-for="item in this.ifHospitalizedOptions"
:key="item.ifHospitalized"
:label="item.ifHospitalizedName"
:value="item.ifHospitalized"
></el-option>
</el-select>
</td>
<td class="table-label"><span >住院日期</span></td>
<td class="table-content">
<el-date-picker
v-model="form.inpatientDate"
type="date"
align="right"
unlink-panels
value-format="yyyy-MM-dd" style="width: 100%"
>
</el-date-picker>
</td>
</tr>
<tr >
<td class="table-label"><span >劳动强度</span></td>
<td class="table-content">
<el-select v-model="form.labourIntensity" placeholder="请选择劳动强度" style="width: 100%">
<el-option v-for="item in this.labourIntensityOptions"
:key="item.labourIntensity"
:label="item.labourIntensityName"
:value="item.labourIntensity"
></el-option>
</el-select>
</td>
<td class="table-label"><span >过敏源</span></td>
<td class="table-content">
<el-input
v-model="form.allergen"
placeholder="请输入过敏源"
maxlength="40"
show-word-limit
/>
</td>
</tr>
<tr >
<td class="table-label"><span >饮食医嘱</span></td>
<td class="table-content">
<el-select v-model="form.doctorAdvice" placeholder="请选择饮食医嘱" style="width: 100%" >
<el-option v-for="item in doctorAdviceOptions"
:key="item.doctorAdvice"
:label="item.doctorAdviceName"
:value="item.doctorAdvice"
></el-option>
</el-select>
</td>
<td class="table-label"><span >体重控制目标</span></td>
<td class="table-content">
<el-select v-model="form.weightControl" placeholder="请选择" style="width: 100%" >
<el-option v-for="item in weightControlOptions"
:key="item.weightControl"
:label="item.weightControlName"
:value="item.weightControl"
></el-option>
</el-select>
</td>
</tr>
<tr >
<td class="table-label"><span >BMI(kg/)</span></td>
<td class="table-content">{{form.bmi}}</td>
<td colspan="2"></td>
</tr>
</table>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { deptTreeSelect } from '@/api/system/user'
import { getIntoRecordsListApi } from "@/api/kitchen/intoRecords";
import { imgUpLoadTwo } from '@/api/system/upload'
export default {
name: "",
dicts: [],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [],
title:"",
//
open: false,
dateRange:[new Date(),new Date()],
chronicOptions:[],
//
queryParams: {
pageNum: 1,
pageSize: 10,
articleTitle: undefined,//
deptIdList:[],//
chronicList:[], //
placeIdList:[], //
doctorAdvice:[],//
articleType:null //
},
form: {
nickName:null,
userId:null,
orgFullName:null,
userType:null,
mobile:null,
sex:1,
birthday:null,
doctorNum:null,
hospitalNum:null,
height:null,
weight:null,
bloodType:null,
chronicList:[],
pregnantStatus:null,
pregnancyDate:null,
ifHospitalized:null,
inpatientDate:null,
labourIntensity:null,
allergen:null,
doctorAdvice:null,
weightControl:null,
},//
};
},
created() {
this.getDeptTree()
this.getList()
this.getChronicList()
},
computed: {
//1
uploadDisabled() {
return this.checkUrlList.length > 0
},
},
methods: {
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then((response) => {
this.deptOptions = this.filterTree(response.data)
})
},
filterTree(nodes) {
return nodes
.map((node) => {
if (node.children) {
node.children = this.filterTree(node.children)
}
return node
})
.filter((node) => node.status !== '1')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [new Date(),new Date()]
this.queryParams = {
pageNum: 1,
pageSize: 10,
articleTitle: "",//
deptIdList:[],
chronicList:[], //
placeIdList:[], //
doctorAdvice:[],
articleType:null //
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
"pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize,
"articleTitle":this.queryParams.articleTitle,
"deptIds":this.queryParams.deptIdList.join(",")||"",
"startDate":this.formatDate(this.dateRange[0]),
"endDate":this.formatDate(this.dateRange[1])
}
console.log("param",param);
getIntoRecordsListApi(param).then(response => {
this.tableListData = response.rows;
console.log("this.tableListData",this.tableListData);
this.total = Number(response.total);
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.fileList=[]
this.checkUrlList=[]
this.checkUrlNameList=[]
this.form = {
articleTitle:null,
summary:null,
chronicIdList:[],
coverPhoto:null,
articleType:1,
articleContent: null,
};
this.resetForm("form");
},
//
formatDate(date) {
// YYYY-MM-DD
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
}
};
</script>
<style lang="scss" scoped>
.remind-question{
width: 100%;
height: 50px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
}
.remind-title{
width: 100%;
height: 40px;
font-size: 16px;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
table td, table th{
border-left: 1px solid #dfe6ec;
border-right: 1px solid #dfe6ec;
border-top: 1px solid #dfe6ec;
}
.table-title {
height: 45px;
background-color: #f8f8f9;
}
.table-label{
height: 45px;
width: 110px;
min-width: 100px;
background-color: #f8f8f9;
}
.table-content{
min-width: 250px;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>