feat:设备使用记录

This commit is contained in:
houjunxiang
2026-03-05 16:54:47 +08:00
parent 749ac7f507
commit 9c88c45d66
357 changed files with 21486 additions and 5845 deletions

View File

@@ -0,0 +1,73 @@
<!-- components/checkbox-switch.vue -->
<template>
<view class="custom-checkbox" @click="toggle" :class="{ 'custom-checkbox--checked': modelValue }">
<!-- 这里可以用一个图标或者用CSS绘制一个方框 -->
<view class="custom-checkbox__icon">
<!-- 示例使用一个简单的对勾符号 -->
<up-icon v-if="modelValue" name="checkbox-mark" color="#FFF" size="15"></up-icon>
</view>
<text class="custom-checkbox__label" v-if="$slots.default">
<slot></slot>
</text>
</view>
</template>
<script setup>
// 1. 定义并接收 props将其解构赋值
const props = defineProps({
modelValue: {
type: Boolean,
required: true
}
})
// 定义 emits
const emit = defineEmits(['update:modelValue'])
// 2. 在函数中使用 props.modelValue
const toggle = () => {
emit('update:modelValue', !props.modelValue)
}
</script>
<style lang="scss" scoped>
.custom-checkbox {
display: inline-flex;
align-items: center;
user-select: none;
cursor: pointer;
padding: 8rpx;
&__icon {
width: 16px;
height: 16px;
border: 2rpx solid #c8c9cc;
border-radius: 6rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10rpx;
transition: all 0.2s;
}
&__icon-text {
font-size: 24rpx;
color: #ffffff;
}
&__label {
font-size: 28rpx;
color: #606266;
}
// 选中状态的样式
&--checked &__icon {
background-color: #2979ff;
border-color: #2979ff;
}
&--checked &__label {
color: #2979ff;
}
}
</style>

View File

@@ -49,7 +49,8 @@
class="da-tree-item__label"
:class="'da-tree-item__label--' + item.checkedStatus"
@click="handleLabelClick(item)"
><text>{{ item.label }} </text><text class="da-tree-item__label--append" v-if="item.append">{{ item.append }}</text></view
><text>{{ item.label }} </text
><text class="da-tree-item__label--append" v-if="item.append">{{ item.append }}</text></view
>
</view>
</scroll-view>

View File

@@ -86,8 +86,7 @@ const getPageData = () => {
pageNo: 1,
pageSize: 999,
collectDeviceType: 'balance',
deviceStatus: '0',
isEnable: '1',
deviceStatus: "{\"Enable\":\"1\"}",
deployLocation: deployLocation.value === '全部' ? '' : deployLocation.value
})
.then(res => {

View File

@@ -125,13 +125,13 @@ const changeNums = (item, index) => {
}
// 检查小数位数限制
let decimal = props.numKeyboardParam?.decimal ?? -1
const parts = nums.value.split('.')
if (parts.length === 2 && decimal !== -1) {
if (parts[1].length >= decimal) {
return false
}
}
// let decimal = props.numKeyboardParam?.decimal ?? -1
// const parts = nums.value.split('.')
// if (parts.length === 2 && decimal !== -1) {
// if (parts[1].length >= decimal) {
// return false
// }
// }
nums.value += inputChar
}

View File

@@ -1,14 +1,15 @@
// 在此不用配置接口前缀
const isDev = process.env.NODE_ENV === 'development'
// 正式环境
const BaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
const upgradeBaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
const websocketUrl = isDev ? 'ws://172.17.19.11:30330' : 'ws://172.17.19.11:30330'
// const BaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
// const upgradeBaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
// const websocketUrl = isDev ? 'ws://172.17.19.11:30330' : 'ws://172.17.19.11:30330'
// 公司测试环境
// const BaseUrl = isDev ? 'http://192.168.26.253:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
// const upgradeBaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
// const websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
const BaseUrl = isDev ? 'http://192.168.26.163:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
// const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
const upgradeBaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
const websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
const tenantId = '1'
export const clientId = 'zgty_lims'

File diff suppressed because it is too large Load Diff

View File

@@ -32,7 +32,7 @@ export default {
request({
url: '/qms/resource/device-maintain/getLastDailyCheckOfToday',
method: 'GET',
params,
params
}),
createDailyCheck: data =>
request({

View File

@@ -2,21 +2,21 @@ import request from '@/nx/request'
export function getDeviceBusInfoById(id) {
return request({
url: '/lims/bus/deviceBusInfo/queryById',
url: '/qms/resource/device-infomation/get',
method: 'GET',
params: { id }
})
}
export function deviceList(params) {
return request({
url: '/lims/bus/deviceBusInfo/list',
url: '/qms/resource/device-infomation/page',
method: 'GET',
params
})
}
export function treeData(params) {
return request({
url: '/lims/bus/deviceBusProduct/listTree',
url: '/qms/resource/device-product/getProductTreeData',
method: 'GET',
params
})
@@ -74,6 +74,3 @@ export function stopList(params) {
params
})
}
export default{
getDeviceBusInfoById
}

View File

@@ -7,11 +7,79 @@ export default {
method: 'GET',
params
}),
// 查询大类
queryMaterialCategory: params =>
request({
url: '/qms/resource/material-product/category-data',
method: 'GET',
params
}),
// 查询物料实例
queryMaterialInformation: params =>
request({
url: '/qms/resource/material-infomation/page',
method: 'GET',
params
}),
// 物料出库
execMaterialOut: data =>
request({
url: '/qms/resource/material-inventory-outbound/add',
method: 'POST',
data
}),
// 新增使用记录
addUseRecord: data =>
request({
url: '/qms/resource/material-use-record/add',
method: 'POST',
data
}),
// 删除使用记录
deleteUseRecord: params =>
request({
url: '/qms/resource/material-use-record/delete',
method: 'DELETE',
params
}),
getUseRecord: params =>
request({
url: '/qms/resource/material-use-record/page',
method: 'GET',
params
}),
// 使用确认
confirmUseRecord: data =>
request({
url: '/qms/resource/material-use-record/review',
method: 'PUT',
data
}),
// 新增危化品配置信息
addHazardousMake: data =>
request({
url: '/qms/resource/material-use-record/hzrd-make',
method: 'POST',
data
}),
// 新增用完标记和清洗回收
addUseOver: data =>
request({
url: '/qms/resource/material-use-end-reuse/add',
method: 'POST',
data
}),
getMaterialUseEndReuseDetailPage: params =>
request({
url: `/qms/resource/material-use-end-reuse-detail/page`,
method: 'GET',
params
}),
// 试剂瓶回收
reuse: data =>
request({
url: '/qms/resource/material-use-end-reuse/reuse',
method: 'PUT',
data
})
}

View File

@@ -79,9 +79,10 @@ export default {
data
}),
// 根据权限查询样品库
querySampleLocation: () =>
querySampleLocation: params =>
request({
url: '/qms/config-warehouse-location/selectListWithPermission',
method: 'GET'
method: 'GET',
params
})
}

Some files were not shown because too many files have changed in this diff Show More