货无忧
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

357 lines
7.2 KiB

<template>
<!-- <u-navbar title="扫描" placeholder border=true :autoBack="true" leftIconSize='35'></u-navbar> -->
<u-navbar
title="扫描"
placeholder
:autoBack="true"
leftIconSize='35'
bgColor='#00000000'
leftIconColor='#ffffff'
titleStyle='color:#ffffff'
></u-navbar>
<image mode="widthFix" class="bgimg" src="/pagesHome/static/bgby.png"></image>
<view class="mabxtop">
<view>
<view>
<view>{{Inventorydetail.trayCode||trayCode}}</view>
<view>托盘码</view>
</view>
<view>
<view>{{Inventorydetail.trayNum||0}}</view>
<view>托盘件数</view>
</view>
</view>
<view>
<view>
<view>{{Inventorydetail.marketName||'暂无数据'}}</view>
<view>名称</view>
</view>
<view>
<view>{{Inventorydetail.trayTypeName||trayName}}</view>
<view>打托方式</view>
</view>
</view>
</view>
<!-- <view class="headtop">
<view>
<input placeholder="请输入订单号" />
</view>
<view>查询</view>
</view> -->
<scroll-view class="scvmabx" scroll-y="true">
<view class="maxboxs">
<view class="items" @click="godetailslist" v-for="item in datelist">
<view class="tophd">
<image src="/pagesHome/static/topicons.png"></image>
<view>物料编码:</view>
<view>{{item.dataCode}}</view>
</view>
<view class="tophd">
<image src="/pagesHome/static/uname.png"></image>
<view>物料名称:</view>
<view>{{item.dataName}}</view>
</view>
<view class="numbxvie">
<view>
<view class="zhon">{{item.orderTotalNum}}</view>
<view>在库数</view>
</view>
<view @click="godetailslist">
<view class="yish">{{item.scanNum}}</view>
<view>已扫</view>
</view>
</view>
</view>
</view>
</scroll-view>
</template>
<script lang="ts" setup>
import {
warehouseTrayTypescanStockOrderPackageCode,
warehouseTrayTypestockScanTrayCode,
} from '@/api/user.js'
import {
onLoad,
onShow,
onHide,
onUnload
} from '@dcloudio/uni-app'
import { reactive, toRefs } from "vue";
let details=reactive({
datelist:[],
trayCode:'',
trayType:'',
trayName:'',
Inventorydetail:{
trayCode:'',
trayNum:'',
trayTypeName:'',
marketName:'',
name:'',
},
scancode:'',
})
onLoad((op)=>{
details.trayCode=op.trayCode
details.trayType=op.trayType
let trayCodeTypearr=uni.getStorageSync('trayCodeType')
trayCodeTypearr.map(item=>{
if(item.dictKey==details.trayType){
details.trayName=item.dictValue
}
})
initpage()
details.scancode='23072405915-2'
scandata()
uni.$on('scancodedate', function(code) {
if (code) {
console.log(code);
details.scancode=code
scandata()
}
})
})
async function initpage(){
let data={
trayCode:details.trayCode
}
let res=await warehouseTrayTypestockScanTrayCode(data)
details.Inventorydetail=res.data.data
details.datelist=res.data.data.list
}
async function scandata(){
let data={
trayType:details.trayType,
trayCode:details.trayCode,
orderPackageCode:details.scancode,
}
let res=await warehouseTrayTypescanStockOrderPackageCode(data)
}
function godetailslist(item){
return
// uni.navigateTo({
// url:'/pagesHome/pages/inventoryDetailList/inventoryDetailList'
// })
}
const { trayName,Inventorydetail,datelist,trayCode,trayType }=toRefs(details)
</script>
<style lang="scss">
.mabxtop{
position: relative;
width: 684upx;
// height: 348upx;
background: #FFFFFF;
border-radius: 20upx;
margin: auto;
margin-top: 80upx;
padding: 60upx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
>view{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 70upx;
&:nth-last-child(1){
margin-bottom: 0;
}
>view{
width: 50%;
display: flex;
flex-direction: column;
align-items: flex-start;
>view:nth-of-type(1){
font-size: 32upx;
font-weight: 400;
color: #020B18;
}
>view:nth-of-type(2){
font-size: 28upx;
font-weight: 400;
color: #90A0AF;
}
}
}
}
.bgimg{
position: absolute;
left: 0;
top: 0;
width: 100%;
}
.scvmabx{
width: 100%;
height: 63vh;
margin-top: 20upx;
.maxboxs{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
>.items{
width: 690upx;
display: flex;
flex-direction: column;
align-items: center;
padding: 20upx 30upx;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 10upx;
margin-bottom: 30upx;
&:nth-last-child(1){
margin-bottom: 20upx;
}
.tophd{
width: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 15upx 25upx;
box-sizing: border-box;
border-bottom: 4upx solid #EEEEEE;
>image{
width: 48upx;
height: 48upx;
margin-right: 10upx;
}
>view{
font-size: 32upx;
color: #020B18;
font-weight: 400;
}
}
.numbxvie{
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
padding: 15upx 25upx;
box-sizing: border-box;
.zhon{
color: #D3832A;
}
.yish{
color: #1197EB;
}
.weish{
color: #020B18;
}
>view{
display: flex;
flex-direction: column;
align-items: center;
>view:nth-of-type(1){
font-size: 36upx;
margin-bottom: 12upx;
}
>view:nth-of-type(2){
font-size: 28upx;
}
}
}
.type1{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20upx;
>view{
display: flex;
align-items: center;
font-size: 28upx;
>view:nth-of-type(1){
color: #90A0AF;
}
>view:nth-of-type(2){
color: #092C4D;
}
}
}
}
}
}
.headtop {
display: flex;
align-items: center;
justify-content: space-between;
// margin-top: 20upx;
background-color: #FFFFFF;
padding: 20upx 30upx;
box-sizing: border-box;
>view:nth-of-type(1) {
width: 540upx;
border: 1upx solid #00000020;
padding: 10upx 20upx;
box-sizing: border-box;
// flex: 1;
// margin-right: 50upx;
// border-radius: 10upx;
>input{
flex: 1;
font-size: 28upx;
}
}
>view:nth-of-type(2) {
width: 128upx;
height: 64upx;
background: #D3832A;
border-radius: 8upx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32upx;
font-weight: 400;
color: #FFFFFF;
}
}
.hedtopt{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #ffffff;
padding: 36upx 32upx;
box-sizing: border-box;
.typto{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 28upx;
font-weight: 400;
color: #092C4D;
margin-bottom: 20upx;
>view{
display: flex;
align-items: center;
>view:nth-of-type(1){
color: #90A0AF;
}
>view:nth-of-type(2){
color: #092C4D;
}
}
&:nth-last-child(1){
margin-bottom: 0;
}
>view{
flex: 1;
}
}
}
</style>