feat:样品库管理
This commit is contained in:
@@ -33,17 +33,17 @@ const popupShow = ref(false)
|
||||
const menuItemList = ref([
|
||||
{
|
||||
url: '/pages/analysis/sample/sample-work-list',
|
||||
otherConf: { icon: '/static/images/menus/sampleAnalysis.png' },
|
||||
otherConf: { icon: '/static/images/menus/样品分析.png' },
|
||||
name: '样品分析'
|
||||
},
|
||||
{
|
||||
url: '/pages/analysis/sample/sample-report-search',
|
||||
otherConf: { icon: '/static/images/menus/records.png' },
|
||||
otherConf: { icon: '/static/images/menus/记录.png' },
|
||||
name: '分析记录'
|
||||
},
|
||||
{
|
||||
url: '/pages/analysis/auncel/auncel-status',
|
||||
otherConf: { icon: '/static/images/menus/balance.png' },
|
||||
otherConf: { icon: '/static/images/menus/天平查看.png' },
|
||||
name: '天平查看'
|
||||
}
|
||||
])
|
||||
|
||||
@@ -366,6 +366,7 @@ const parameterClassifyChange = v => {
|
||||
|
||||
const fieldClick = (field, key) => {
|
||||
if (!field.isEdit) return
|
||||
currentFillingIndex.value = 0
|
||||
if (currentFillingWay.value === 'input') {
|
||||
inputValue.value = field.value
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ 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: 'device' },
|
||||
{ url: '/pages/analysis/index/index', name: '分析管理', icon: 'analyse' },
|
||||
{ url: '/pages/sampleWarehouse/index/index', name: '样品库管理', icon: 'sampleWarehouse' }
|
||||
{ url: '/pages/lims/index/index', name: '设备管理', icon: '设备管理' },
|
||||
{ url: '/pages/analysis/index/index', name: '分析管理', icon: '分析管理' },
|
||||
{ url: '/pages/sampleWarehouse/index/index', name: '样品库管理', icon: '样品库管理' }
|
||||
])
|
||||
|
||||
// const sysMenus = computed(() => nx.$store('user').sysMenus)
|
||||
|
||||
7
pages/sampleWarehouse/dispatchGiveBack/index.vue
Normal file
7
pages/sampleWarehouse/dispatchGiveBack/index.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<view> </view>
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,18 +34,38 @@ const popupShow = ref(false)
|
||||
const menuItemList = ref([
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleSearch/index',
|
||||
otherConf: { icon: '/static/images/menus/records.png' },
|
||||
otherConf: { icon: '/static/images/menus/记录.png' },
|
||||
name: '样品查询'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/returnToStock/index',
|
||||
otherConf: { icon: '/static/images/menus/returnToStock.png' },
|
||||
otherConf: { icon: '/static/images/menus/样品归库.png' },
|
||||
name: '样品归库'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/execChangeLocation/index',
|
||||
otherConf: { icon: '/static/images/menus/execChangeLocation.png' },
|
||||
otherConf: { icon: '/static/images/menus/库位变更.png' },
|
||||
name: '库位变更'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleDispatchInternal/index',
|
||||
otherConf: { icon: '/static/images/menus/内部调拨.png' },
|
||||
name: '内部调拨'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleDispatchExternal/index',
|
||||
otherConf: { icon: '/static/images/menus/外部调拨.png' },
|
||||
name: '外部调拨'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/dispatchGiveBack/index',
|
||||
otherConf: { icon: '/static/images/menus/调拨归还.png' },
|
||||
name: '调拨归还'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleTakeOff/index',
|
||||
otherConf: { icon: '/static/images/menus/样品下架.png' },
|
||||
name: '样品下架'
|
||||
}
|
||||
])
|
||||
|
||||
@@ -56,26 +76,26 @@ const userInfo = computed(() => nx.$store('user').userInfo)
|
||||
const goTo = url => {
|
||||
nx.$router.go(url)
|
||||
}
|
||||
onShow(() => {
|
||||
//连接打印服务
|
||||
let printList = uni.getStorageSync('KEY_PRINT_LIST')
|
||||
if (printList && printList.length > 0) {
|
||||
for (let print of printList) {
|
||||
nx.$print.open(print.printIp, print.printPort)
|
||||
}
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '打印服务未配置,请在系统设置中配置打印服务',
|
||||
success: function (res) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/setting/print'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// onShow(() => {
|
||||
// //连接打印服务
|
||||
// let printList = uni.getStorageSync('KEY_PRINT_LIST')
|
||||
// if (printList && printList.length > 0) {
|
||||
// for (let print of printList) {
|
||||
// nx.$print.open(print.printIp, print.printPort)
|
||||
// }
|
||||
// } else {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// showCancel: false,
|
||||
// content: '打印服务未配置,请在系统设置中配置打印服务',
|
||||
// success: function (res) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/setting/print'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// 生命周期
|
||||
onMounted(() => {})
|
||||
// 动态设置 grid 列数
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="p8">
|
||||
<navbar-back title="样品归库"></navbar-back>
|
||||
<uni-section type="line" title="库位编码"> </uni-section>
|
||||
<uni-section type="line" title="库位编码" titleFontSize="15px"> </uni-section>
|
||||
<up-input
|
||||
v-model="locationCode"
|
||||
placeholder="请扫描库位编码"
|
||||
@@ -10,7 +10,7 @@
|
||||
prefixIconStyle="font-size: 30px;"
|
||||
>
|
||||
</up-input>
|
||||
<uni-section type="line" title="样品编号"> </uni-section>
|
||||
<uni-section type="line" title="样品编号" titleFontSize="15px"> </uni-section>
|
||||
<up-input
|
||||
v-model="sampleCode"
|
||||
placeholder="请扫描样品编号"
|
||||
@@ -31,46 +31,30 @@ import { ref, reactive, computed, onMounted, toRefs, watch } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import nx from '@/nx'
|
||||
|
||||
function isJsonString(str) {
|
||||
if (typeof str !== 'string') return false
|
||||
|
||||
try {
|
||||
const parsed = JSON.parse(str)
|
||||
return typeof parsed === 'object' && parsed !== null
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/sampleWarehouse/returnToStock/index') {
|
||||
try {
|
||||
if (!isJsonString(newVal)) {
|
||||
if (!locationCode.value) {
|
||||
uni.showToast({
|
||||
title: '请先扫描库位码',
|
||||
icon: 'none'
|
||||
})
|
||||
scanQRInfo.value = ''
|
||||
return
|
||||
} else {
|
||||
sampleCode.value = newVal
|
||||
// 执行归库
|
||||
handleReturnToStock()
|
||||
}
|
||||
if (!newVal) return
|
||||
scanQRInfo.value = ''
|
||||
if (nx.$router.getCurrentPage().route !== 'pages/sampleWarehouse/returnToStock/index') return
|
||||
try {
|
||||
if (nx.$helper.isJsonString(newVal)) {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
locationCode.value = codeObj.code
|
||||
} else {
|
||||
if (!locationCode.value) {
|
||||
uni.showToast({
|
||||
title: '请先扫描库位码',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
locationCode.value = codeObj.code
|
||||
sampleCode.value = newVal
|
||||
// 执行归库
|
||||
handleReturnToStock()
|
||||
}
|
||||
scanQRInfo.value = ''
|
||||
} catch (error) {
|
||||
scanQRInfo.value = ''
|
||||
uni.showToast({
|
||||
title: '请扫描样品编码',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({ title: '扫码内容解析失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
onShow(() => {
|
||||
@@ -100,7 +84,7 @@ function handleReturnToStock() {
|
||||
})
|
||||
}
|
||||
|
||||
const successCount = ref(2)
|
||||
const successCount = ref(0)
|
||||
function handleReset() {
|
||||
locationCode.value = ''
|
||||
sampleCode.value = ''
|
||||
|
||||
131
pages/sampleWarehouse/sampleDispatchExternal/detail.vue
Normal file
131
pages/sampleWarehouse/sampleDispatchExternal/detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
80
pages/sampleWarehouse/sampleDispatchExternal/index.vue
Normal file
80
pages/sampleWarehouse/sampleDispatchExternal/index.vue
Normal file
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<navbar-back title="样品调拨"></navbar-back>
|
||||
<view class="p8">
|
||||
<up-subsection
|
||||
activeColor="#0055A2"
|
||||
mode="subsection"
|
||||
:list="list"
|
||||
:current="current"
|
||||
@change="changeTab"
|
||||
></up-subsection>
|
||||
<scroll-view style="height: 82vh" scroll-y scroll-with-animation @scrolltolower="handleScrolltolower">
|
||||
<view class="data-item" v-for="(item, index) in listData" @click="handleDetail(item)">
|
||||
<view
|
||||
>申请人:<text>{{ item.applyUser }}</text></view
|
||||
>
|
||||
<view
|
||||
>申请时间:<text>{{ nx.$dayjs(item.applyTime).format('YYYY-MM-DD HH:mm:ss') }}</text></view
|
||||
>
|
||||
<view
|
||||
>申请事由:<text>{{ item.applyContent }}</text></view
|
||||
>
|
||||
</view>
|
||||
<up-loadmore v-if="listData.length > 0" :status="loadStatus" />
|
||||
<up-empty v-else mode="data" text="暂无数据" marginTop="50"> </up-empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { useListData } from '@/nx/hooks/usePageListData'
|
||||
import nx from '@/nx'
|
||||
|
||||
const list = ref(['待处理', '已处理'])
|
||||
|
||||
let dataList = ref([])
|
||||
const current = ref(0)
|
||||
|
||||
function changeTab(index) {
|
||||
current.value = index
|
||||
getInitData()
|
||||
}
|
||||
const searchParams = computed(() => {
|
||||
if (current.value === 0) {
|
||||
return {
|
||||
finishStatus: 'pending'
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
finishStatus: 'completed'
|
||||
}
|
||||
}
|
||||
})
|
||||
const { listData, scrollToLower, loadStatus, getInitData } = useListData({
|
||||
searchParams,
|
||||
api: nx.$api.sampleWarehouse.querySampleDispatchApply,
|
||||
needInitListData: true
|
||||
})
|
||||
|
||||
function handleScrolltolower() {
|
||||
scrollToLower()
|
||||
}
|
||||
function handleDetail(item) {
|
||||
nx.$store('biz').flagInfo = item
|
||||
uni.navigateTo({
|
||||
url: '/pages/sampleWarehouse/sampleDispatchExternal/detail'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.data-item {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #909399;
|
||||
text {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
90
pages/sampleWarehouse/sampleDispatchInternal/index.vue
Normal file
90
pages/sampleWarehouse/sampleDispatchInternal/index.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<navbar-back title="样品调拨"></navbar-back>
|
||||
<view class="pl8 pr8">
|
||||
<view class="border-b p6 x-f"
|
||||
><view class="pr16">库管员:</view><text>{{ userInfo.nickname }}</text></view
|
||||
>
|
||||
<up-input
|
||||
style="padding-top: 20px"
|
||||
border="bottom"
|
||||
v-model="sampleCode"
|
||||
placeholder="请扫描需要调拨的样品编号"
|
||||
prefixIcon="scan"
|
||||
fontSize="16"
|
||||
prefixIconStyle="font-size: 30px;"
|
||||
>
|
||||
</up-input>
|
||||
|
||||
<uni-section v-if="sampleList.length > 0" type="line" title="调拨样品明细" titleFontSize="15px">
|
||||
<template #right> <up-text type="error" size="18" bold :text="sampleList.length"></up-text></template>
|
||||
<scroll-view style="height: 49vh" scroll-y scroll-with-animation>
|
||||
<uni-card margin="5px" v-for="item in sampleList" class="sample-item">
|
||||
<view
|
||||
>样品名称:<text class="black">{{ item.sampleName }}</text></view
|
||||
>
|
||||
<view class="mt4"
|
||||
>归库编码:<text class="black">{{ item.sampleReturnCode }}</text></view
|
||||
>
|
||||
<view class="mt4"
|
||||
>样品库名称:<text class="black">{{ item.warehouseName }}</text></view
|
||||
>
|
||||
<view class="mt4"
|
||||
>库位码:<text class="black">{{ item.warehouseLocationCode }}</text></view
|
||||
>
|
||||
</uni-card>
|
||||
</scroll-view>
|
||||
<up-button :disabled="!receiver" type="primary" style="width: 50%" text="提交" @click="handleSubmit"></up-button>
|
||||
</uni-section>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, toRefs, watch } from 'vue'
|
||||
import nx from '@/nx'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
|
||||
let sampleCode = ref('')
|
||||
let sampleList = ref([])
|
||||
let receiver = ref('')
|
||||
|
||||
const userInfo = computed(() => nx.$store('user').userInfo)
|
||||
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (!newVal) return
|
||||
scanQRInfo.value = ''
|
||||
if (nx.$router.getCurrentPage().route !== 'pages/sampleWarehouse/sampleDispatchExternal/detail') return
|
||||
try {
|
||||
sampleCode.value = newVal
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: '请扫描正确的样品编码',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
onShow(() => {
|
||||
scanQRInfo.value = ''
|
||||
})
|
||||
|
||||
async function handleSubmit() {
|
||||
await nx.$api.sampleWarehouse.execSampleDispatch({})
|
||||
uni.showToast({
|
||||
title: '调拨成功',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sample-item {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
.item-checkbox {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user