货无忧
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.

870 lines
0 B

1 year ago
<template>
<!-- <u-navbar title="人工分拣" placeholder border=true :autoBack="true" leftIconSize='35'></u-navbar> -->
1 year ago
<!-- <u-navbar title="人工分拣"
bgColor='#D3832A' leftIconColor='#ffffff'
titleStyle='color:#ffffff' placeholder
1 year ago
:autoBack="true" leftIconSize='35'></u-navbar> -->
<u-navbar
title="人工分拣"
placeholder
:autoBack="true"
leftIconSize='35'
bgColor='#ffffff00'
1 year ago
leftIconColor='#ffffff'
titleStyle='color:#ffffff'
></u-navbar>
<image mode="widthFix" class="bgimg" src="/pagesHome/static/bgby.png"></image>
<view class="mabxtop">
<view>
<view>
1 year ago
<view>{{warehouseTray.trayCode||details.trayCode}}</view>
1 year ago
<view>托盘码</view>
</view>
<view>
1 year ago
<view>{{warehouseTray.trayNum||0}}</view>
1 year ago
<view>托盘件数</view>
</view>
</view>
<view>
<view>
1 year ago
<view>{{warehouseTray.name||'暂无数据'}}</view>
1 year ago
<view>名称</view>
</view>
<view>
1 year ago
<view>{{warehouseTray.orderTotalNum||0}}</view>
1 year ago
<view>总件数</view>
</view>
</view>
<view>
<view>
1 year ago
<view>{{warehouseTray.trayTypeName||details.trayCodevalue}}</view>
1 year ago
<view>打托方式</view>
</view>
</view>
<view class="beizhut">
<view>
1 year ago
<view>{{warehouseTray.reamrk||'暂无备注'}}</view>
1 year ago
<view>
<view>备注</view>
<image @click="setshowstate(1)" src="/pagesHome/static/editicon.png"></image>
</view>
</view>
</view>
</view>
<!-- <view class="hedtopt">
1 year ago
<view class="typto">
<view>托盘码汇通龙泉001</view>
<view>托盘件数19</view>
</view>
<view class="typto">
<view>名称名称啊231</view>
<view>总件数20</view>
</view>
<view class="typto">
<view>打托方式运单</view>
</view>
<view class="btrank">
<view>备注</view>
<view class="ranbt" @click="setshowstate(1)">
备注
</view>
</view>
1 year ago
</view> -->
1 year ago
<scroll-view class="scvmabx" scroll-y="true">
<view class="maxboxs">
1 year ago
<view class="items" v-for="item in datalist">
1 year ago
<view class="tophd">
1 year ago
<view>
<image src="/pagesHome/static/dan.png"></image>
<view></view>
<view>{{item.dataCode}}</view>
</view>
<image @click="showremoveorder(item)" src="/pagesHome/static/removeitem.png"></image>
1 year ago
</view>
<view class="numbxvie">
1 year ago
<view>
1 year ago
<view class="zhon">{{item.orderTotalNum}}</view>
1 year ago
<view>总数</view>
</view>
<view>
1 year ago
<view class="yish">{{item.scanNum}}</view>
1 year ago
<view>已扫</view>
1 year ago
</view>
<view>
1 year ago
<view class="weish">{{item.orderTotalNum - item.scanNum}}</view>
1 year ago
<view>未扫</view>
1 year ago
</view>
</view>
1 year ago
<!-- <view class="type1">
<view>
<view>订单号</view>
<view>{{item.dataCode}}</view>
</view>
</view> -->
<!-- <view class="type1">
1 year ago
<view>
<view>已扫</view>
1 year ago
<view>{{item.scanNum}}</view>
1 year ago
</view>
<view>
<view>未扫</view>
1 year ago
<view>{{item.orderTotalNum-item.scanNum}}</view>
1 year ago
</view>
</view>
1 year ago
-->
1 year ago
</view>
</view>
</scroll-view>
<view class="buts" @click="setshowstate(2)">继续录入</view>
<view class="tanchuangbg" @click="setshowstate(0)" v-if="showstate==1||showstate==2">
<view class="tanbx" @click.stop.prevent v-if="showstate==1">
1 year ago
<view class="titlran">备注</view>
<view class="textareabx">
1 year ago
<textarea maxlength="-1" placeholder="请输入备注" v-model="Remarktext"></textarea>
1 year ago
</view>
<view class="btx">
<view class="cancel" @click="setshowstate(0)">取消</view>
1 year ago
<view class="confirm" @click="checkremaker">确认</view>
1 year ago
</view>
</view>
<view class="inputbox" @click.stop.prevent v-if="showstate==2">
1 year ago
<view class="inputscan">
<input placeholder="输入运单号" v-model="waybillCode" />
1 year ago
<view class="scanbt" @click="scanlist">搜索</view>
1 year ago
</view>
<scroll-view scroll-y="true" class="scvbw">
<view class="scboxitem">
1 year ago
<view class="items" @click="setchecl(index)" v-for="(item,index) in codelist">
1 year ago
<view class="type1s">
<view>
<view>订单号</view>
1 year ago
<view>{{item.dataCode}}</view>
1 year ago
</view>
<view>
<view>总件数</view>
1 year ago
<view>{{item.orderTotalNum}}</view>
1 year ago
</view>
</view>
<view class="rksu">
<view>
<view>入库数</view>
1 year ago
<input placeholder="请输入入库数" v-model="item.number"/>
1 year ago
</view>
</view>
1 year ago
<view class="lisbite" v-if="checkinarr.indexOf(index)!=-1">
<view class="itembox" v-for="ite in item.positionList">
<view v-if="ite.allocationName">库位码{{ite.allocationName}}</view>
<view v-if="ite.trayCode">托盘码{{ite.trayCode}}</view>
</view>
</view>
1 year ago
</view>
</view>
</scroll-view>
<view class="btx">
<view class="cancel" @click="setshowstate(0)">取消</view>
1 year ago
<view class="confirm" @click="confirmlist">确认</view>
1 year ago
</view>
</view>
</view>
1 year ago
<tips ref="tip"></tips>
<saomiao2></saomiao2>
1 year ago
</template>
<script lang="ts" setup>
1 year ago
import {
onLoad,
onShow,
onHide,
onUnload
} from '@dcloudio/uni-app'
1 year ago
import {
warehouseTrayTypedeleteZeroOrderByTrayCode,
warehouseTrayTypezeroOrderUpdateRemark,
warehouseTrayTypezeroScanTrayCode,
1 year ago
warehouseTrayenterZeroOrderByTrayCode,
warehouseTrayTypegetZeroOrderByWaybillCode,
} from '@/api/user.js'
import { reactive, toRefs, watchEffect,ref } from "vue";
1 year ago
let details=reactive({
1 year ago
showstate:0,
scancode:'',
waybillCode:'',
codelist:[],
1 year ago
datalist:[],
1 year ago
trayCode:'',
1 year ago
trayCodevalue:'',
1 year ago
trayType:'',
1 year ago
warehouseTray:({} as any),
1 year ago
Remarktext:'',
checkinarr:[],
1 year ago
})
const tip=ref(null)
onLoad((op)=>{
details.trayCode=op.trayCode
details.trayType=op.trayType
1 year ago
let trayCodeTypearr=uni.getStorageSync('trayCodeType')
trayCodeTypearr.map(item=>{
if(item.dictKey==details.trayType){
details.trayCodevalue=item.dictValue
}
})
initpage()
1 year ago
uni.$on('scancodedate', function(code) {
if (code) {
console.log(code);
details.scancode=code
scandata()
}
})
1 year ago
})
1 year ago
async function initpage(){
let data={
trayCode:details.trayCode
}
let response=await warehouseTrayTypezeroScanTrayCode(data)
details.warehouseTray=response.data.data
if(response?.data?.data?.list){
details.datalist=response?.data?.data?.list
}else{
details.datalist=[]
}
}
1 year ago
async function scanlist(){
let data={
waybillCode:details.waybillCode,
}
let response=await warehouseTrayTypegetZeroOrderByWaybillCode(data)
console.log(response);
details.codelist=response.data
details.codelist.map(item=>{
item['number']=0
return item
})
}
async function confirmlist(){
let zeroList=[]
1 year ago
let isfl=false
1 year ago
details.codelist.map(item=>{
1 year ago
console.log(item.number,item.orderTotalNum,'////////////');
if(item.number==0){
isfl=true
tip.value.setdetails({
title:'警告',
content:'不能大于订单总数',
confirmTxt:'确认',
isshow:true,
isshowcancel:false,
success:()=>{
// let obj=details.codelist[index]
// obj.value=details.codelist[index]['orderTotalNum']
// details.codelist.splice(index,1,obj)
// event.detail.value=details.codelist[index]['orderTotalNum']
tip.value.setisshow(false)
},
cancel:()=>{
tip.value.setisshow(false)
},
close:()=>{
tip.value.setisshow(false)
}
})
return
}
if(item.number>item.orderTotalNum){
isfl=true
1 year ago
tip.value.setdetails({
title:'警告',
content:'不能大于订单总数',
confirmTxt:'确认',
isshow:true,
isshowcancel:false,
success:()=>{
// let obj=details.codelist[index]
// obj.value=details.codelist[index]['orderTotalNum']
// details.codelist.splice(index,1,obj)
// event.detail.value=details.codelist[index]['orderTotalNum']
tip.value.setisshow(false)
},
cancel:()=>{
tip.value.setisshow(false)
},
close:()=>{
tip.value.setisshow(false)
}
})
}else{
console.log(item);
let obj={
orderId:item.dataId,
orderCode:item.dataCode,
num:item.number,
}
zeroList.push(obj)
}
})
1 year ago
// return
if(isfl){
return
}
1 year ago
let data={
trayType:details.trayType,
trayCode:details.trayCode,
zeroList,
}
let res=await warehouseTrayenterZeroOrderByTrayCode(data)
1 year ago
if(res.code==200){
uni.showToast({
title:'录入成功',
icon:'none'
})
setshowstate(0)
initpage()
details.codelist=[]
details.waybillCode=''
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
}
function stop(){
1 year ago
}
function inputtxt(event,index){
if(details.codelist[index]['orderTotalNum']<Number(event.detail.value)){
tip.value.setdetails({
title:'警告',
content:'不能大于订单总数',
confirmTxt:'确认',
isshow:true,
isshowcancel:false,
success:()=>{
// let obj=details.codelist[index]
// obj.value=details.codelist[index]['orderTotalNum']
// details.codelist.splice(index,1,obj)
// event.detail.value=details.codelist[index]['orderTotalNum']
tip.value.setisshow(false)
},
cancel:()=>{
tip.value.setisshow(false)
},
close:()=>{
tip.value.setisshow(false)
}
})
}
}
1 year ago
async function checkremaker(){
let data={
trayCode:details.trayCode,
remark:details.Remarktext
}
let response=await warehouseTrayTypezeroOrderUpdateRemark(data)
if(response.code==200){
uni.showToast({
title:'修改成功',
icon:'none'
})
initpage()
setshowstate(0)
1 year ago
}else{
uni.showToast({
title:response.msg,
icon:'none'
})
}
}
function showremoveorder(item){
tip.value.setdetails({
title:'提示',
content:'确认删除该订单和托盘的绑定?',
confirmTxt:'确认',
isshow:true,
isshowcancel:true,
success:async ()=>{
let data={
trayCode:details.trayCode,
orderCode:item.dataCode
}
let response=await warehouseTrayTypedeleteZeroOrderByTrayCode(data)
if(response.code==200){
uni.showToast({
title:'删除绑定成功',
icon:'none'
})
initpage()
}else{
uni.showToast({
title:response.msg,
icon:'none'
})
}
tip.value.setisshow(false)
},
cancel:()=>{
tip.value.setisshow(false)
},
close:()=>{
tip.value.setisshow(false)
}
})
// let data={
// }
// let response=await warehouseTrayTypedeleteZeroOrderByTrayCode(data)
}
1 year ago
function scandata(){
1 year ago
}
function setchecl(index:number){
if(details.checkinarr.indexOf(index)==-1){
details.checkinarr.push(index)
}else{
details.checkinarr.splice(details.checkinarr.indexOf(index),1)
}
1 year ago
}
1 year ago
function setshowstate(state:number){
details.showstate=state
}
1 year ago
const { checkinarr,Remarktext,datalist,warehouseTray,showstate,waybillCode,codelist } =toRefs(details)
1 year ago
</script>
1 year ago
<style lang="scss" scoped>
.mabxtop{
position: relative;
width: 684upx;
// height: 348upx;
background: #FFFFFF;
border-radius: 20upx;
margin: auto;
margin-top: 20upx;
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: 40upx;
&: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;
}
}
}
.beizhut{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 40upx;
>view{
width: 100%;
>view:nth-of-type(2){
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
>image{
width: 32upx;
height: 32upx;
}
}
}
}
}
.bgimg{
position: fixed;
left: 0;
top: 0;
width: 100%;
}
1 year ago
.tanchuangbg{
width: 100%;
height: 100%;
position: fixed;
z-index: 99;
left: 0;
top: 0;
background-color: #00000050;
display: flex;
align-items: center;
justify-content: center;
transition: all 1s;
.tanbx{
width: 670upx;
// height: 600upx;
background-color: #ffffff;
box-sizing: border-box;
border-radius: 10upx;
display: flex;
flex-direction: column;
align-items: center;
padding: 30upx;
.titlran{
font-size: 32upx;
color: #092C4D;
1 year ago
margin-bottom: 40upx;
1 year ago
}
.textareabx{
width: 560upx;
height: 240upx;
background: #F5F5F6;
border-radius: 8upx;
padding: 20upx 40upx;
1 year ago
box-sizing: border-box;
>textarea{
width: 100%;
height: 100%;
box-sizing: border-box;
font-size: 28upx;
font-weight: 400;
1 year ago
}
}
.btx{
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 50upx;
>view{
display: flex;
align-items: center;
justify-content: center;
width: 260upx;
height: 88upx;
border-radius: 8upx;
font-size: 32upx;
1 year ago
}
>.cancel{
background-color: #F5F5F6;
color: #5A6875;
margin-right: 20upx;
}
>.confirm{
background-color: #D3832A;
color: #FFFFFF;
}
}
}
.inputbox{
width: 670upx;
// height: 600upx;
background-color: #ffffff;
box-sizing: border-box;
border-radius: 10upx;
display: flex;
flex-direction: column;
align-items: center;
padding: 30upx;
.inputscan{
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
>input{
width: 440upx;
height: 64upx;
border: 1upx solid #092C4D30;
border-radius: 8upx;
box-sizing: border-box;
font-size: 28upx;
padding: 0upx 20upx;
box-sizing: border-box;
}
.scanbt{
width: 128upx;
height: 64upx;
background: #D3832A;
border-radius: 8upx;
opacity: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30upx;
font-weight: 400;
color: #FFFFFF;
}
}
.scvbw{
width: 100%;
height: 360upx;
margin-top: 30upx;
.scboxitem{
display: flex;
flex-direction: column;
align-items: center;
.items{
width: 590upx;
display: flex;
flex-direction: column;
box-shadow: 0upx 2upx 10upx 0upx #e2e2e3;
margin-top: 10upx;
padding: 20upx;
box-sizing: border-box;
1 year ago
position: relative;
>.lisbite{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
// position: absolute;
>.itembox{
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
font-size: 28upx;
color: #020B18;
border: 1upx solid #D3832A;
padding:10upx 20upx;
box-sizing: border-box;
border-radius: 20upx;
color: #D3832A;
>view{
word-wrap: break-word;
word-break: break-all;
}
}
}
1 year ago
>.type1s{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20upx;
>view{
width: 50%;
display: flex;
align-items: center;
justify-content: flex-start;
font-size: 28upx;
>view:nth-of-type(1){
color: #90A0AF;
}
>view:nth-of-type(2){
color: #092C4D;
}
}
}
.rksu{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20upx;
>view{
// width: 50%;
display: flex;
align-items: center;
justify-content: flex-start;
font-size: 28upx;
>view:nth-of-type(1){
color: #90A0AF;
}
>input{
width: 200upx;
padding: 0 15upx;
border: 1upx solid #00000020;
}
}
}
}
}
}
.btx{
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 50upx;
>view{
display: flex;
align-items: center;
justify-content: center;
width: 260upx;
height: 76upx;
border-radius: 7upx;
font-size: 28upx;
}
>.cancel{
background-color: #F5F5F6;
color: #5A6875;
margin-right: 20upx;
}
>.confirm{
background-color: #D3832A;
color: #FFFFFF;
}
}
}
}
.buts{
width: 320upx;
height: 88upx;
background: #D3832A;
border-radius: 8upx 8upx 8upx 8upx;
opacity: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 32upx;
font-weight: 400;
color: #FFFFFF;
margin: auto;
margin-top: 20upx;
}
.scvmabx{
1 year ago
width: 684rpx;
height: 37vh;
margin: auto;
1 year ago
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;
}
1 year ago
.tophd{
1 year ago
width: 100%;
1 year ago
padding: 15upx 25upx;
box-sizing: border-box;
border-bottom: 4upx solid #EEEEEE;
1 year ago
display: flex;
align-items: center;
justify-content: space-between;
>view{
display: flex;
align-items: center;
justify-content: flex-start;
>image{
width: 48upx;
height: 48upx;
margin-right: 10upx;
}
>view{
font-size: 32upx;
color: #020B18;
font-weight: 400;
}
}
1 year ago
>image{
width: 48upx;
height: 48upx;
1 year ago
margin-right: -20upx;
1 year ago
}
}
.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;
}
1 year ago
>view{
display: flex;
1 year ago
flex-direction: column;
1 year ago
align-items: center;
>view:nth-of-type(1){
1 year ago
font-size: 36upx;
margin-bottom: 12upx;
1 year ago
}
>view:nth-of-type(2){
1 year ago
font-size: 28upx;
1 year ago
}
}
}
}
}
}
.hedtopt{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #ffffff;
padding: 36upx 32upx;
box-sizing: border-box;
.btrank{
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
font-size: 28upx;
font-weight: 400;
color: #092C4D;
.ranbt{
width: 128upx;
height: 64upx;
background: #D3832A;
border-radius: 8upx;
opacity: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30upx;
font-weight: 400;
color: #FFFFFF;
}
}
.typto{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 28upx;
font-weight: 400;
color: #092C4D;
margin-bottom: 25upx;
&:nth-last-child(1){
margin-bottom: 0;
}
>view{
flex: 1;
}
}
}
</style>