问题修改
This commit is contained in:
parent
9ce111f221
commit
625852aadd
|
|
@ -73,7 +73,8 @@ const bmFileInfos = ref([])//请求图片参数
|
||||||
const getCodeList = () => {
|
const getCodeList = () => {
|
||||||
console.log(boxInfo.value)
|
console.log(boxInfo.value)
|
||||||
let param = {
|
let param = {
|
||||||
"boxId":boxInfo.value.boxId
|
"boxId":boxInfo.value.boxId,
|
||||||
|
"keyWord":searchValue.value
|
||||||
}
|
}
|
||||||
getAppBoxDetailListApi(param).then(res => {
|
getAppBoxDetailListApi(param).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<view style="padding-top: 4vh;background-color: rgb(220, 244, 255);">
|
<view>
|
||||||
<uni-nav-bar left-icon="left" @clickLeft="leftClick" right-icon="scan" @clickRight="rightClick" title="标准箱管理" title-style="font-weight: bolder;" backgroundColor="rgb(220, 244, 255)" :border="false" />
|
<!-- 自定义导航栏 -->
|
||||||
|
<view class="custom-navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
|
||||||
|
<view class="nav-content">
|
||||||
|
<view class="left-icon" @click="leftClick">
|
||||||
|
<uni-icons type="left" size="24"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<!-- 新购入库 -->
|
<view class="title">标准箱管理</view>
|
||||||
|
<view class="right-icon" @click="rightClick">
|
||||||
|
<uni-icons type="scan" size="24"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 页面内容 -->
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="complete-btn">
|
<view class="complete-btn">
|
||||||
<view class="btn" @click="changeTab(1)">
|
<view class="btn" @click="changeTab(1)">
|
||||||
|
|
@ -85,20 +96,20 @@
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref,computed } from 'vue'
|
import { ref,computed } from 'vue'
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { getPurchaseList } from '@/services/purchase.js'
|
|
||||||
import { getQrCodeBoxListApi } from '@/services/standard.js'
|
import { getQrCodeBoxListApi } from '@/services/standard.js'
|
||||||
|
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
const dateArray = ref([]) // 日期范围
|
const dateArray = ref([]) // 日期范围
|
||||||
|
const statusBarHeight = ref(0)
|
||||||
// 查询参数
|
// 查询参数
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
startTime: '', // 开始时间
|
startTime: '', // 开始时间
|
||||||
|
|
@ -109,6 +120,27 @@ const queryParams = ref({
|
||||||
pageSize: 5,
|
pageSize: 5,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 初始化状态栏高度
|
||||||
|
const initStatusBarHeight = () => {
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res) => {
|
||||||
|
statusBarHeight.value = res.statusBarHeight
|
||||||
|
// 设置CSS变量
|
||||||
|
document.documentElement.style.setProperty('--status-bar-height', `${res.statusBarHeight}px`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
initStatusBarHeight()
|
||||||
|
getTableList(true)
|
||||||
|
})
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
tableList.value = []
|
||||||
|
getTableList(true)
|
||||||
|
})
|
||||||
|
|
||||||
// 日期 change 事件
|
// 日期 change 事件
|
||||||
const onChangeDate = (val) => {
|
const onChangeDate = (val) => {
|
||||||
const [val_1, val_2] = val
|
const [val_1, val_2] = val
|
||||||
|
|
@ -231,16 +263,6 @@ const rightClick = () => {
|
||||||
uni.navigateTo({ url: `/pages/standardBox/addBox` })
|
uni.navigateTo({ url: `/pages/standardBox/addBox` })
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 页面加载完毕
|
|
||||||
// onLoad(() => {
|
|
||||||
// getTableList()
|
|
||||||
// })
|
|
||||||
|
|
||||||
onShow(() => {
|
|
||||||
tableList.value = []
|
|
||||||
getTableList(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 判断数据是否加载完毕
|
// 判断数据是否加载完毕
|
||||||
const finish = computed(() => {
|
const finish = computed(() => {
|
||||||
console.log('total.value',total.value)
|
console.log('total.value',total.value)
|
||||||
|
|
@ -250,16 +272,72 @@ const finish = computed(() => {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
|
/* 自定义导航栏样式 */
|
||||||
|
.custom-navbar {
|
||||||
|
width: 100%;
|
||||||
|
background-color: rgb(220, 244, 255);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 999;
|
||||||
|
height: calc(44px + var(--status-bar-height, 0px));
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-content {
|
||||||
|
height: 44px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-icon, .right-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-icon {
|
||||||
|
left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-icon {
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #000000;
|
||||||
|
text-align: center;
|
||||||
|
width: 60%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 页面内容容器 */
|
||||||
|
.page-container {
|
||||||
|
margin-top: calc(44px + var(--status-bar-height, 0px));
|
||||||
|
height: calc(100vh - 44px - var(--status-bar-height, 0px));
|
||||||
|
overflow: auto;
|
||||||
|
background-color: #f7f8fa;
|
||||||
|
padding: 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.uni-navbar__header-container-inner){
|
:deep(.uni-navbar__header-container-inner){
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.page-container {
|
|
||||||
display: flex;
|
|
||||||
height: 90vh;
|
|
||||||
flex-direction: column;
|
|
||||||
background-color: #f7f8fa;
|
|
||||||
padding: 24rpx;
|
|
||||||
.complete-btn {
|
.complete-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 28rpx 24rpx;
|
padding: 28rpx 24rpx;
|
||||||
|
|
@ -281,15 +359,6 @@ const finish = computed(() => {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #8c8c8c;
|
color: #8c8c8c;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
||||||
&.active {
|
|
||||||
color: #3784fb;
|
|
||||||
font-weight: 600;
|
|
||||||
|
|
||||||
.second-active & {
|
|
||||||
color: #fa8c16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bt-line {
|
.bt-line {
|
||||||
|
|
@ -299,10 +368,6 @@ const finish = computed(() => {
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
.second-active & {
|
|
||||||
background: #fa8c16;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -541,7 +606,6 @@ const finish = computed(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 加载提示文字
|
// 加载提示文字
|
||||||
.loading-text {
|
.loading-text {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue