feat:样品库管理
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
<u-col span="2" class="text-center" style="position: relative">
|
||||
<slot name="tag" v-if="$slots.tag" :task="task"></slot>
|
||||
<template v-else>
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="40"></u-icon>
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="50"></u-icon>
|
||||
<text class="seq">{{ seq }}</text>
|
||||
</template>
|
||||
</u-col>
|
||||
<u-col span="10">
|
||||
<view class="fs18">{{ task.taskNo }}</view>
|
||||
<view class="mt3 mb3">{{ task.taskName }}{{ task.assayOper }}</view>
|
||||
<view class="fs20">{{ task.taskNo }}</view>
|
||||
<view class="mt8 mb8">{{ task.taskName }}{{ task.assayOper }}</view>
|
||||
<view class="x-f">
|
||||
<u-icon name="clock"></u-icon>
|
||||
<text class="ml5">{{ taskOperatorTime }}</text>
|
||||
@@ -75,8 +75,8 @@ const taskStyle = task => {
|
||||
}
|
||||
.seq {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 12px;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<scroll-view
|
||||
style="height: 75vh"
|
||||
style="height: 82vh"
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-left"
|
||||
@@ -37,7 +37,7 @@
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(82vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view class="sample-item">
|
||||
<u-row @click="showSampleDetail(sample.businessAssayTaskDataId, index)">
|
||||
@@ -50,7 +50,7 @@
|
||||
<view>
|
||||
<text class="pl5">{{ sample.sampleAssayCode }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<view class="mt10">
|
||||
<text class="pl5">
|
||||
{{ sample.sampleName }}
|
||||
</text>
|
||||
@@ -58,7 +58,7 @@
|
||||
</u-col>
|
||||
<u-col span="4">
|
||||
<view>
|
||||
<text style="padding-left: 10px" v-html="sample.assayProject"></text>
|
||||
<rich-text :nodes="sample.assayProject"> </rich-text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
@@ -171,10 +171,9 @@ onBackPress(() => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
height: 60px;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
||||
<up-badge v-if="taskList.length > 0" class="ml5" :value="taskList.length" type="warning"></up-badge>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<scroll-view style="height: 75vh" scroll-y scroll-with-animation class="content-main-left">
|
||||
<scroll-view style="height: 82vh" scroll-y scroll-with-animation class="content-main-left">
|
||||
<template v-if="taskList.length > 0">
|
||||
<TaskItem
|
||||
v-for="(task, index) in taskList"
|
||||
@@ -29,7 +29,7 @@
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(82vh - 60px)">
|
||||
<u-checkbox-group placement="column" v-model="checkedSampleCodes">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view v-if="currentTask.reviewCount === sample.reviewCount" class="sample-item">
|
||||
@@ -52,13 +52,13 @@
|
||||
<view>
|
||||
{{ sample.sampleAssayCode }}
|
||||
</view>
|
||||
<view>
|
||||
<view class="mt10">
|
||||
{{ sample.sampleName }}
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="6">
|
||||
<view>
|
||||
<text class="pl10" v-html="sample.assayProject"> </text>
|
||||
<rich-text :nodes="sample.assayProject"> </rich-text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
@@ -263,10 +263,9 @@ onBackPress(() => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
height: 60px;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
font-size: 22px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
|
||||
@@ -13,7 +13,7 @@ import { reactive, ref, computed, onMounted } from 'vue'
|
||||
import nx from '@/nx'
|
||||
import { useGridCol } from '@/nx/hooks/useGridCol'
|
||||
let list = reactive([
|
||||
{ url: '/pages/lims/index/index', name: '设备管理', icon: '设备管理' },
|
||||
// { url: '/pages/lims/index/index', name: '设备管理', icon: '设备管理' },
|
||||
{ url: '/pages/analysis/index/index', name: '分析管理', icon: '分析管理' },
|
||||
{ url: '/pages/sampleWarehouse/index/index', name: '样品库管理', icon: '样品库管理' }
|
||||
])
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="header">
|
||||
<image src="/static/images/login/logo.png"></image>
|
||||
</view>
|
||||
|
||||
<view class="text-center pt10 fs22 font-bold"> 实验室管理系统 </view>
|
||||
<view class="list">
|
||||
<view class="list-call">
|
||||
<u-icon name="account" color="#0055a2" size="30"></u-icon>
|
||||
@@ -20,11 +20,16 @@
|
||||
<input
|
||||
class="sl-input"
|
||||
v-model="loginInfo.password"
|
||||
type="text"
|
||||
:type="passwordFieldType"
|
||||
maxlength="32"
|
||||
placeholder="请输入密码"
|
||||
password="true"
|
||||
/>
|
||||
<u-icon
|
||||
:name="passwordVisible ? 'eye-fill' : 'eye-off'"
|
||||
color="#0055a2"
|
||||
size="30"
|
||||
@click="togglePasswordVisibility"
|
||||
></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="login-btn">
|
||||
@@ -56,6 +61,14 @@ let loginInfo = reactive({
|
||||
password: 'P@ssword25',
|
||||
captchaVerification: ''
|
||||
})
|
||||
|
||||
const passwordVisible = ref(false)
|
||||
const passwordFieldType = ref('password')
|
||||
|
||||
function togglePasswordVisibility() {
|
||||
passwordVisible.value = !passwordVisible.value
|
||||
passwordFieldType.value = passwordVisible.value ? 'text' : 'password'
|
||||
}
|
||||
onShow(() => {
|
||||
//检查APP更新
|
||||
// #ifdef APP-PLUS
|
||||
@@ -186,6 +199,6 @@ function onCaptchaError(error) {
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin-top: 20px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,7 @@
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted, toRefs, watch } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { debounce } from 'lodash'
|
||||
import nx from '@/nx'
|
||||
|
||||
const changeType = ref('sample')
|
||||
@@ -134,24 +135,23 @@ function handleChangeType(e) {
|
||||
let isFirstInput = ref(true)
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (!newVal) return
|
||||
debouncedHandleScan(newVal)
|
||||
})
|
||||
const debouncedHandleScan = debounce(val => {
|
||||
if (!val) return
|
||||
scanQRInfo.value = ''
|
||||
if (nx.$router.getCurrentPage().route !== 'pages/sampleWarehouse/execChangeLocation/index') return
|
||||
try {
|
||||
console.log(newVal)
|
||||
|
||||
const isJson = nx.$helper.isJsonString(newVal)
|
||||
console.log(isJson)
|
||||
|
||||
const isJson = nx.$helper.isJsonString(val)
|
||||
if (isFirstInput.value) {
|
||||
handleFirstScan(newVal, isJson)
|
||||
handleFirstScan(val, isJson)
|
||||
} else {
|
||||
handleSecondScan(newVal, isJson)
|
||||
handleSecondScan(val, isJson)
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({ title: '扫码内容解析失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
}, 300)
|
||||
function handleFirstScan(rawValue, isJson) {
|
||||
if (changeType.value === 'sample') {
|
||||
// 按样品变更:首扫应为纯字符串(样品编号)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<up-grid :col="gridCol" :border="false">
|
||||
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.url" @click="goTo(item.url)">
|
||||
<u-icon :name="item.otherConf.icon" color="#0055A2" size="80" />
|
||||
<u-icon :name="item.otherConf.icon" color="#0055A2" size="60" />
|
||||
<view class="grid-text">{{ item.name }}</view>
|
||||
</up-grid-item>
|
||||
</up-grid>
|
||||
@@ -104,6 +104,6 @@ const { gridCol } = useGridCol([400], [2, 3])
|
||||
|
||||
<style scoped lang="scss">
|
||||
.grid-text {
|
||||
font-size: 24px;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,16 +29,26 @@
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted, toRefs, watch } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { debounce } from 'lodash'
|
||||
import nx from '@/nx'
|
||||
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (!newVal) return
|
||||
debouncedHandleScan(newVal)
|
||||
})
|
||||
const debouncedHandleScan = debounce(val => {
|
||||
if (!val) return
|
||||
scanQRInfo.value = ''
|
||||
if (nx.$router.getCurrentPage().route !== 'pages/sampleWarehouse/returnToStock/index') return
|
||||
try {
|
||||
if (nx.$helper.isJsonString(newVal)) {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
if (nx.$helper.isJsonString(val)) {
|
||||
const codeObj = JSON.parse(val)
|
||||
if (codeObj.code === locationCode.value) {
|
||||
return uni.showToast({
|
||||
title: '请勿重复扫描',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
locationCode.value = codeObj.code
|
||||
} else {
|
||||
if (!locationCode.value) {
|
||||
@@ -48,7 +58,7 @@ watch(scanQRInfo, newVal => {
|
||||
})
|
||||
return
|
||||
} else {
|
||||
sampleCode.value = newVal
|
||||
sampleCode.value = val
|
||||
// 执行归库
|
||||
handleReturnToStock()
|
||||
}
|
||||
@@ -56,7 +66,7 @@ watch(scanQRInfo, newVal => {
|
||||
} catch (error) {
|
||||
uni.showToast({ title: '扫码内容解析失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
}, 300)
|
||||
onShow(() => {
|
||||
scanQRInfo.value = ''
|
||||
})
|
||||
@@ -69,11 +79,11 @@ function handleReturnToStock() {
|
||||
nx.$api.sampleWarehouse
|
||||
.execReturnToStock({
|
||||
warehouseLocationCode: locationCode.value,
|
||||
sampleCode: sampleCode.value
|
||||
sampleReturnCode: sampleCode.value
|
||||
})
|
||||
.then(res => {
|
||||
successCount.value++
|
||||
if (res.print) {
|
||||
if (res.isPrint) {
|
||||
uni.showToast({
|
||||
title: `归库成功,归库码为【${res.code}】`,
|
||||
duration: 3000,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user