完善入库跳转以及出库创建页面

This commit is contained in:
zx
2026-04-07 10:55:39 +08:00
parent ce6d5e5d6e
commit b16dd22d70
16 changed files with 514 additions and 166 deletions

View File

@@ -1,7 +1,7 @@
<!-- 唯一码详情 -->
<template>
<!-- 自定义导航栏 -->
<navigation :title="pathParams.code ? pathParams.code : '唯一码发放'">
<navigation :title="title" :back-url="backUrl">
<template #right>
<view class="right-btn flex align-center justify-center ">
<uv-image @click="toEdit" src="../../../../static/edit.png" class="ml-24" width="20px" height="20px"
@@ -71,7 +71,8 @@ import { getStatusName, getDetail } from '../until';
import QrCodeModal from './QrCodeModal.vue';
import MaterialList from '../../../components/MaterialList.vue'
import Navigation from '../../../components/Navigation.vue'
const backUrl = ref('')
const title = ref('')
const modalRef = ref()
// 路径参数
const pathParams = ref('')
@@ -146,12 +147,19 @@ onLoad((options) => {
uni.showToast({ title: '参数错误,无唯一码ID', icon: 'none' })
return
}
pathParams.value = options
getDetailInfo()
})
onShow(() => {
uni.setNavigationBarTitle({ title: pathParams.value.code })
if (pathParams.value.code || pathParams.value.title) {
backUrl.value = '/pages/warehousing/uniqueCode/myUniqueCode/index'
title.value = pathParams.value.title || pathParams.value.code
} else {
backUrl.value = '/pages/warehousing/index'
title.value = '唯一码发放'
}
})
</script>
@@ -180,5 +188,4 @@ onShow(() => {
}
}
</style>

View File

@@ -1,9 +1,11 @@
<!-- 唯一码 -->
<template>
<view class="content">
<navigation title="唯一码" back-url="pages/warehousing/index"></navigation>
<view class="topSearch">
<uni-easyinput type="text" v-model="queryParams.code" prefixIcon="search" :inputBorder="false"
@iconClick="getMaterialList" placeholder="请输入关键词搜索" />
</view>
<!-- 唯一码列表 -->
@@ -63,6 +65,7 @@ import { getStatusName, getDetail } from '../until';
import { onShow } from "@dcloudio/uni-app";
import { getUniqueCodeList, delUniqueCode, detailUniqueCode } from '@/api/uniqueCode'
import QrCodeModal from './QrCodeModal.vue';
import Navigation from '../../../components/Navigation.vue';
const queryParams = ref({
code: ''
@@ -141,11 +144,11 @@ const getDetailInfo = (row) => {
<style scoped lang="scss">
.topSearch {
position: fixed;
top: 0;
top: var(--nav-height); /* 关键:自动在导航栏下方 */
left: 0;
right: 0;
z-index: 999;
padding: 10px;
z-index: 99; /* 比导航栏小 */
padding: 8rpx 16rpx;
background-color: #fff;
border-bottom: 1px solid #eee;
box-sizing: border-box;
@@ -153,7 +156,7 @@ const getDetailInfo = (row) => {
.containerBox {
// padding: 0 12rpx;
padding-top: 60px;
padding-top: 90px !important; /* 撑开:导航栏+搜索框高度 */
width: 100%;
height: 100%;
box-sizing: border-box;