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.
339 lines
7.0 KiB
339 lines
7.0 KiB
<template> |
|
<u-navbar title="空置托盘" bgColor='#D3832A' leftIconColor='#ffffff' titleStyle='color:#ffffff' placeholder |
|
:autoBack="true" leftIconSize='35'></u-navbar> |
|
<view class="topbos"> |
|
<view class="srview"> |
|
<view>托盘码</view> |
|
<view> |
|
<input placeholder="请扫描或输入" v-model="scancode"/> |
|
<view class="sbm" @click="scandata">确定</view> |
|
</view> |
|
</view> |
|
</view> |
|
<scroll-view class="scvmabx" scroll-y="true"> |
|
<view class="maxboxs"> |
|
<view class="items" v-for="item in datalist"> |
|
<view class="tophd1"> |
|
<view > |
|
<image src="/pagesHome/static/topicons.png"></image> |
|
<!-- <view></view> --> |
|
<!-- <view>{{item.dataCode}}</view> --> |
|
<view :style="item.isFleeing?'color: #ff0000;':''">{{item.dataCode}}{{item.isFleeing?'(窜)':''}}</view> |
|
</view> |
|
</view> |
|
<view class="tophd" v-if="item.dataName"> |
|
<image src="/pagesHome/static/uname.png"></image> |
|
<view>物料名称:</view> |
|
<view>{{item.dataName}}</view> |
|
</view> |
|
<view class="tophd" v-if="item.sku"> |
|
<image src="/pagesHome/static/uname.png"></image> |
|
<view>SKU:</view> |
|
<view>{{item.sku}}</view> |
|
</view> |
|
<view class="tophd" v-if="item.cargoUnit"> |
|
<image src="/pagesHome/static/uname.png"></image> |
|
<view>物料单位:</view> |
|
<view>{{item.cargoUnit}}</view> |
|
</view> |
|
<view class="numbxvie"> |
|
<view> |
|
<view class="zhon">{{item.orderTotalNum}}</view> |
|
<view>在库数</view> |
|
</view> |
|
<view> |
|
<view class="yish">{{item.scanNum}}</view> |
|
<view>在托数</view> |
|
</view> |
|
</view> |
|
</view> |
|
</view> |
|
</scroll-view> |
|
<view @click="removetray" class="flbuts">空置</view> |
|
<saomiao2></saomiao2> |
|
<tips ref="tip"></tips> |
|
</template> |
|
|
|
<script lang="ts" setup> |
|
import { |
|
onLoad, |
|
onShow, |
|
onHide, |
|
onUnload |
|
} from '@dcloudio/uni-app' |
|
import { |
|
warehouseTrayTypetrayToNullScanTrayCode, |
|
warehouseTrayTypetrayToNull |
|
} from '@/api/user.js' |
|
import { reactive, ref, toRefs } from "vue"; |
|
import utils from '../../../utils/utils'; |
|
const tip=ref(null) |
|
let details=reactive({ |
|
datalist:[], |
|
scancode:'', |
|
statetype:'', |
|
trayCodes:'' |
|
}) |
|
onLoad(()=>{ |
|
uni.$on('scancodedate', function (code) { |
|
if (code) { |
|
// console.log(code); |
|
details.scancode = code |
|
scandata() |
|
} |
|
}) |
|
|
|
}) |
|
async function scandata(){ |
|
let data={ |
|
trayCode:details.scancode |
|
} |
|
let res=await warehouseTrayTypetrayToNullScanTrayCode(data) |
|
if(res.code==200){ |
|
console.log(res); |
|
details.datalist=res.data?.list |
|
details.statetype=res.data?.type |
|
if(res.data?.list?.length>0){ |
|
details.trayCodes=details.scancode |
|
} |
|
} |
|
} |
|
function removetray(){ |
|
tip.value.setdetails({ |
|
title:'提示', |
|
content:'确认空置托盘?', |
|
confirmTxt:'确认', |
|
isshow:true, |
|
isshowcancel:true, |
|
success:async ()=>{ |
|
let data={ |
|
trayCode:details.trayCodes, |
|
} |
|
let res=await warehouseTrayTypetrayToNull(data) |
|
if(res.code==200){ |
|
tip.value.setdetails({ |
|
title:'提示', |
|
content:'空置托盘成功', |
|
confirmTxt:'确认', |
|
isshow:true, |
|
isshowcancel:false, |
|
success:()=>{ |
|
tip.value.setisshow(false) |
|
}, |
|
cancel:()=>{ |
|
tip.value.setisshow(false) |
|
}, |
|
close:()=>{ |
|
tip.value.setisshow(false) |
|
} |
|
}) |
|
utils.ttsspke('空置托盘成功') |
|
details.datalist=[] |
|
details.trayCodes='' |
|
tip.value.setisshow(false) |
|
} |
|
}, |
|
cancel:()=>{ |
|
tip.value.setisshow(false) |
|
}, |
|
close:()=>{ |
|
tip.value.setisshow(false) |
|
} |
|
}) |
|
} |
|
const { |
|
scancode, |
|
statetype, |
|
datalist |
|
}=toRefs(details) |
|
</script> |
|
|
|
<style lang="scss"> |
|
.topbos{ |
|
display: flex; |
|
flex-direction: column; |
|
>.srview{ |
|
display: flex; |
|
align-items: center; |
|
padding: 26upx 32upx; |
|
box-sizing: border-box; |
|
background-color: #ffffff; |
|
margin-bottom: 4upx; |
|
.sbm{ |
|
width: 150upx; |
|
height: 64upx; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
background-color: #D3832A; |
|
color: #ffffff; |
|
border-radius: 10upx; |
|
} |
|
&:nth-last-child(1){ |
|
margin-bottom: 0; |
|
} |
|
>view:nth-of-type(1){ |
|
width: 190upx; |
|
font-size: 28upx |
|
} |
|
>view:nth-of-type(2){ |
|
font-size: 28upx; |
|
flex: 1; |
|
display: flex; |
|
align-items: center; |
|
>input{ |
|
flex: 1; |
|
font-size: 28upx; |
|
} |
|
} |
|
} |
|
} |
|
.flbuts{ |
|
width: 320upx; |
|
height: 88upx; |
|
background: #D3832A; |
|
border-radius: 8upx 8upx 8upx 8upx; |
|
opacity: 1; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
color: #ffffff; |
|
margin: auto; |
|
position: fixed; |
|
left: 50%; |
|
transform: translate(-50%); |
|
bottom: 60upx; |
|
} |
|
.bgimg{ |
|
position: absolute; |
|
left: 0; |
|
top: 0; |
|
width: 100%; |
|
|
|
} |
|
.scvmabx{ |
|
width: 100%; |
|
height:68vh; |
|
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: flex-start; |
|
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; |
|
word-wrap: break-word; |
|
word-break: break-all; |
|
&:nth-of-type(2){ |
|
flex: 1; |
|
} |
|
} |
|
} |
|
.tophd1{ |
|
width: 100%; |
|
display: flex; |
|
align-items: center; |
|
justify-content: space-between; |
|
padding: 15upx 25upx; |
|
box-sizing: border-box; |
|
border-bottom: 4upx solid #EEEEEE; |
|
>image{ |
|
width: 48upx; |
|
height: 48upx; |
|
margin-right: -20upx; |
|
// margin-right: 10upx; |
|
} |
|
>view{ |
|
display: flex; |
|
align-items: center; |
|
>image{ |
|
width: 48upx; |
|
height: 48upx; |
|
margin-right: 10upx; |
|
} |
|
} |
|
} |
|
.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; |
|
} |
|
} |
|
|
|
} |
|
} |
|
} |
|
} |
|
</style> |
|
<style lang="scss"> |
|
|
|
</style> |