feat:设备管理修改

This commit is contained in:
houjunxiang
2026-03-20 17:56:17 +08:00
parent f0dffc29fa
commit 904d1c4ea4
15 changed files with 564 additions and 468 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view>
<navbar-back title="实验室管理系统【试剂耗材管理】" titleWidth="800" :autoBack="false" leftIcon="" leftText="">
<navbar-back title="实验室管理系统【物料管理】" titleWidth="800" :autoBack="false" leftIcon="" leftText="">
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
</navbar-back>

View File

@@ -1,5 +1,5 @@
<template>
<navbar-back title="试剂开封"></navbar-back>
<navbar-back title="物料开封"></navbar-back>
<view class="pl8 pr8 pt8">
<up-input
style="padding-top: 20px"
@@ -82,7 +82,8 @@ async function getMaterialList() {
code: materialCode.value,
usageStatus: 1,
openStatus:0,
openDueFalg:1
openDueFalg:1,
businessType:'open_seal'
}
const data = await nx.$api.material.queryMaterialInfo(params)

View File

@@ -1,5 +1,5 @@
<template>
<navbar-back title="物领用"></navbar-back>
<navbar-back title="物领用"></navbar-back>
<view class="pl8 pr8 pt8">
<view class="x-f">
<text class="pl6">领用人</text>
@@ -23,7 +23,14 @@
<uni-section v-if="materialList.length > 0" type="line" title="领用明细" titleFontSize="15px">
<template #right> <up-text type="error" size="18" bold :text="materialList.length"></up-text></template>
<scroll-view style="height: 55 vh" scroll-y scroll-with-animation>
<uni-card margin="5px" v-for="item in materialList" class="sample-item">
<uni-card margin="5px" v-for="(item, index) in materialList" class="sample-item">
<uni-icons
class="delete"
type="trash-filled"
color="#f56c6c"
size="40"
@click="handleDelete(index)"
></uni-icons>
<template v-if="item.standardSolutionFlag !== 1">
<view class="mt4">
<view
@@ -43,11 +50,11 @@
>
</template>
<template v-else>
<view class="mt4">
<view
>溶液编号<text class="black">{{ item.code }}</text></view
>
</view>
<view class="mt4">
<view
>溶液编号<text class="black">{{ item.code }}</text></view
>
</view>
<view class="mt4">
<view
>溶液名称<text class="black">{{ item.name }}</text></view
@@ -118,7 +125,8 @@ onShow(() => {
async function getMaterialList() {
if (materialCode.value === '') return
let params = {
code: materialCode.value
code: materialCode.value,
businessType: 'outbound'
}
const data = await nx.$api.material.queryMaterialInfo(params)
if (!data) return uni.showToast({ title: '未查询到该物料信息', icon: 'none' })
@@ -129,6 +137,11 @@ async function getMaterialList() {
materialList.value.push(data)
}
function handleDelete(index) {
console.log(index)
materialList.value.splice(index, 1)
}
async function handleSubmit() {
if (selectUserId.value === '') {
return uni.showToast({
@@ -138,7 +151,6 @@ async function handleSubmit() {
}
btnLoading.value = true
const selectUser = range.value.find(item => item.value === selectUserId.value)
console.log(selectUser)
let params = {
businessType: '领用出库',
@@ -169,7 +181,12 @@ onMounted(async () => {
<style lang="scss" scoped>
.sample-item {
position: relative;
pointer-events: none;
.delete {
position: absolute;
right: 10px;
top: 10px;
}
}
:deep(.uni-select__input-placeholder) {
font-size: 16px;

View File

@@ -101,7 +101,8 @@ async function getMaterialInfo() {
code: materialCode.value,
hazardous: 1,
usageStatus: 1,
useEndFlag: 0
useEndFlag: 0,
businessType:'use_record'
}
const data = await nx.$api.material.queryMaterialInfo(params)
if (!data) return uni.showToast({ title: '未查询到可以使用的危化品信息', icon: 'none' })

View File

@@ -77,7 +77,8 @@ async function getMaterialList() {
let params = {
code: materialCode.value,
usageStatus: 1,
useEndFlag: 0
useEndFlag: 0,
businessType:'used_mark'
}
const data = await nx.$api.material.queryMaterialInfo(params)
if (!data) return uni.showToast({ title: '未查询到该物料信息', icon: 'none' })