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,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;