jsk 厨房进出记录

This commit is contained in:
skjia 2025-07-04 17:10:39 +08:00
parent 57d2bfad40
commit b6693b020a
1 changed files with 80 additions and 269 deletions

View File

@ -11,10 +11,10 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
format="yyyy-MM-dd" style="width: 220px" format="yyyy-MM-dd" style="width: 220px"
:picker-options="pickerOptions" > >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="所属组织" prop="deptIdList"> <!-- <el-form-item label="所属组织" prop="deptIdList">
<el-cascader v-model="queryParams.deptIdList" <el-cascader v-model="queryParams.deptIdList"
:options="deptOptions" :filterable="true" placeholder="请选择所属组织" style="width: 240px" :show-all-levels="false" :options="deptOptions" :filterable="true" placeholder="请选择所属组织" style="width: 240px" :show-all-levels="false"
:props="{ :props="{
@ -24,42 +24,39 @@
value:'id',label:'label' value:'id',label:'label'
}" clearable collapse-tags > }" clearable collapse-tags >
</el-cascader> </el-cascader>
</el-form-item> </el-form-item> -->
<el-form-item label="关 键 字"> <el-form-item label="关 键 字">
<el-input v-model="queryParams.articleTitle" placeholder="请输入" maxlength="20" clearable style="width: 220px"/> <el-input v-model="queryParams.articleTitle" placeholder="请输入" maxlength="20" clearable style="width: 220px"/>
</el-form-item> </el-form-item>
<el-form-item label="所属区域" prop="placeIdList"> <el-form-item label="所属区域:" prop="areaId">
<el-cascader v-model="queryParams.placeIdList" <el-cascader v-model="queryParams.areaId"
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false" :options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
:props="{ :props="{
multiple: true,
emitPath: false,// falseid emitPath: false,// falseid
checkStrictly: false,// checkStrictly: false,//
value:'id',label:'label' value:'id',label:'label'
}" clearable collapse-tags > }" clearable @change="handleTreeChange">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="所属食堂" prop="placeIdList"> <el-form-item label="所属食堂:" prop="canteenId">
<el-cascader v-model="queryParams.placeIdList" <el-select v-model="queryParams.canteenId" @change="handleCanteenChange" style="width: 100%;" placeholder="请选择所属食堂">
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false" <el-option
:props="{ v-for="item in canteenOptions"
multiple: true, :key="item.canteenId"
emitPath: false,// falseid :label="item.canteenName"
checkStrictly: false,// :value="item.canteenId"
value:'id',label:'label' ></el-option>
}" clearable collapse-tags > </el-select>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="所属位置" prop="placeIdList"> <el-form-item label="所属位置:" prop="subPlaceId">
<el-cascader v-model="queryParams.placeIdList" <el-select v-model="queryParams.subPlaceId" style="width: 100%;" placeholder="请选择设备位置">
:options="placeOptions" :filterable="true" style="width: 240px" :show-all-levels="false" <el-option
:props="{ v-for="item in subPlaceOptions"
multiple: true, :key="item.subPlaceId"
emitPath: false,// falseid :label="item.subPlaceName"
checkStrictly: false,// :value="item.subPlaceId"
value:'id',label:'label' ></el-option>
}" clearable collapse-tags > </el-select>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -72,8 +69,6 @@
<el-table-column label="日期时间" align="center" prop="enterTime" :show-overflow-tooltip="true" width="280"></el-table-column> <el-table-column label="日期时间" align="center" prop="enterTime" :show-overflow-tooltip="true" width="280"></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="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="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 label="手机号" align="center" prop="mobile" :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column label="职位" align="center" prop="postName" :show-overflow-tooltip="true"> <el-table-column label="职位" align="center" prop="postName" :show-overflow-tooltip="true">
@ -82,7 +77,7 @@
</el-table-column> </el-table-column>
<el-table-column label="食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"> <el-table-column label="食堂" align="center" prop="canteenName" :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column label="位置" align="center" prop="placeFullName" :show-overflow-tooltip="true"> <el-table-column label="位置" align="center" prop="subPlaceName" :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column label="门名称" align="center" prop="doorName" :show-overflow-tooltip="true"> <el-table-column label="门名称" align="center" prop="doorName" :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
@ -99,216 +94,14 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @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> </div>
</template> </template>
<script> <script>
import { deptTreeSelect } from '@/api/system/user' import { deptTreeSelect } from '@/api/system/user'
import { getIntoRecordsListApi } from "@/api/kitchen/intoRecords"; import { getIntoRecordsListApi } from "@/api/kitchen/intoRecords";
import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall";
import { getKitchenSubPlaceListAllApi } from "@/api/kitchen/devices";
import { imgUpLoadTwo } from '@/api/system/upload' import { imgUpLoadTwo } from '@/api/system/upload'
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm'; import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
export default { export default {
@ -335,46 +128,33 @@ export default {
open: false, open: false,
dateRange:[new Date(),new Date()], dateRange:[new Date(),new Date()],
chronicOptions:[], chronicOptions:[],
deptOptions:[],
treeOptions:[], //
canteenOptions: [],
subPlaceOptions: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
articleTitle: undefined,// articleTitle: undefined,//
deptIdList:[],// deptIdList:[],//
chronicList:[], // areaId:null, //
placeIdList:[], // canteenId:null, //
doctorAdvice:[],// subPlaceId:null,//
articleType:null //
}, },
form: { form: {
nickName:null, areaId:null,
userId:null, canteenId:null,
orgFullName:null, orgFullName:null,
userType: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() { created() {
this.getDeptTree() this.getDeptTree()
this.getList() this.getList()
this.getChronicList() this.getTreeData()
this.getKitchenSubPlaceList()
}, },
computed: { computed: {
//1 //1
@ -399,6 +179,39 @@ export default {
}) })
.filter((node) => node.status !== '1') .filter((node) => node.status !== '1')
}, },
//
getTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeOptions = response.data;
});
},
handleTreeChange(e){
let param= {
"areaId":e,
"canteenType":1
}
console.log("param",param)
getCanteenByAreaApi(param).then((response) => {
this.canteenOptions=response.rows||[]
this.$set(this.queryParams,'canteenId',null)
});
},
//
getCanteenList(){
getCanteenByAreaApi({}).then((response) => {
this.canteenOptions = response.rows
})
},
handleCanteenChange(e){
this.$set(this.queryParams,'canteenId',e)
this.$set(this.queryParams,'subPlaceId',null)
this.getKitchenSubPlaceList();
},
getKitchenSubPlaceList(){
getKitchenSubPlaceListAllApi({canteenId:this.queryParams.canteenId}).then((response) => {
this.subPlaceOptions = response.rows
})
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -428,19 +241,17 @@ export default {
"pageNum":this.queryParams.pageNum, "pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize, "pageSize":this.queryParams.pageSize,
"articleTitle":this.queryParams.articleTitle, "articleTitle":this.queryParams.articleTitle,
"deptIds":this.queryParams.deptIdList.join(",")||"" "deptIds":this.queryParams.deptIdList.join(",")||"",
} "startDate":this.formatDate(this.dateRange[0]),
if(this.dateRange&&this.dateRange.length>0){ "areaId":this.queryParams.areaId,
param.startDate=this.formatDate(this.dateRange[0]) "canteenId":this.queryParams.canteenId,
param.endDate=this.formatDate(this.dateRange[1]) "subPlaceId":this.queryParams.subPlaceId,
}else{ "endDate":this.formatDate(this.dateRange[1])
param.startDate=undefined;
param.endDate=undefined;
} }
console.log("param",param); console.log("param",param);
getIntoRecordsListApi(param).then(response => { getIntoRecordsListApi(param).then(response => {
this.tableListData = response.rows; this.tableListData = response.rows;
// console.log("this.tableListData",this.tableListData); console.log("this.tableListData",this.tableListData);
this.tableListData.forEach(item=>{ this.tableListData.forEach(item=>{
this.$set(item,"mobile",this.getDecryptWithSM4(item.mobile)) this.$set(item,"mobile",this.getDecryptWithSM4(item.mobile))
}); });