<template>
|
<view>
|
<view class="code">
|
<view class="item">
|
<view class="code-decs">拣货单号:</view>
|
<input type="text" placeholder=" 扫码 / 输入" v-model="pickNo"
|
@input="barcodeInput()">
|
</view>
|
<uni-section title="商品列表" type="line" class="mat-list-title"></uni-section>
|
</view>
|
<view class="list-view">
|
<scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;">
|
<view class="list" v-for="(item,i) in dataList" :key="i">
|
<view class="list-left">
|
<view class="list-left-item">
|
<view class="desc">No:</view>
|
<view class="left-item">{{i + 1}}</view>
|
</view>
|
<view class="list-left-item">
|
<view class="desc">库位:</view>
|
<view class="left-item">
|
{{item.locNo}}
|
</view>
|
</view>
|
<view class="list-left-item">
|
<view class="desc">拖盘码:</view>
|
<view class="left-item">
|
{{item.barcode}}
|
</view>
|
</view>
|
<view class="list-left-item">
|
<view class="desc">料号:</view>
|
<view class="left-item">
|
<uni-tag :text="item.matnr" type="primary"></uni-tag>
|
</view>
|
</view>
|
<view class="list-left-item">
|
<view class="desc">批号:</view>
|
<view class="left-item">
|
<uni-tag :text="item.batch" type="warning"></uni-tag>
|
</view>
|
</view>
|
<view class="list-left-item">
|
<view class="desc">数量:</view>
|
<view class="left-item">{{item.anfme}}</view>
|
</view>
|
</view>
|
</view>
|
</scroll-view>
|
</view>
|
<!-- 底部操作按钮 -->
|
<view class="buttom">
|
<button size="middle" type="primary" @click="combConfirm('warn')">确认出库</button>
|
</view>
|
<!-- 确认出库 -->
|
<view>
|
<uni-popup ref="combConfirm" type="dialog">
|
<uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
|
@confirm="confirm" @close="combClose"></uni-popup-dialog>
|
</uni-popup>
|
</view>
|
<view>
|
<!-- 提示信息弹窗 -->
|
<uni-popup ref="message" type="message">
|
<uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
|
</uni-popup>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
pickNo: '',
|
dataList: [],
|
msgType: '',
|
title: '',
|
content: '',
|
msgType1: '',
|
messageText: ''
|
|
}
|
},
|
onShow() {
|
this.baseUrl = uni.getStorageSync('baseUrl');
|
this.token = uni.getStorageSync('token');
|
},
|
|
methods: {
|
barcodeInput() {
|
if (this.pickNo == undefined || this.pickNo == '') {
|
this.messageToggle('error', '库位不能为空!!')
|
return
|
}
|
let that = this
|
setTimeout(() =>{
|
that.pickDetls()
|
}, 800)
|
},
|
|
combConfirm() {
|
if (this.pickNo == undefined || this.pickNo == '') {
|
this.messageToggle('error', '库位不能为空!!')
|
return
|
}
|
this.dialogToggle('dialog', '确认', '是否确认已拣出全部清单明细!!')
|
|
this.$refs.combConfirm.open()
|
},
|
|
combClose() {
|
this.$refs.combConfirm.close()
|
},
|
|
//dialog弹框信息
|
dialogToggle(type,title, msg) {
|
this.msgType = type
|
this.title = title
|
this.content = msg
|
this.$refs.combConfirm.open()
|
},
|
|
//消息弹框
|
messageToggle(type, msg) {
|
this.msgType1 = type
|
if (msg != undefined || msg != null) {
|
this.messageText = msg
|
}
|
this.$refs.message.open()
|
},
|
|
confirm() {
|
let that = this
|
uni.request({
|
url: that.baseUrl + '/pda/pick/confirm/' + that.pickNo,
|
method: 'GET',
|
header: {
|
'token': uni.getStorageSync('token')
|
},
|
success(result) {
|
let res = result.data
|
if (res.code === 200) {
|
that.messageToggle('success', '出库成功!!')
|
} else {
|
that.messageText = res.msg
|
that.messageToggle('error')
|
}
|
}
|
})
|
this.pickNo = ''
|
this.dataList = []
|
},
|
|
pickDetls() {
|
uni.vibrateShort();
|
let that = this;
|
uni.request({
|
url: that.baseUrl + '/pda/pick/detl/' + that.pickNo,
|
data: JSON.stringify({
|
loc: that.pickNo.trim(),
|
}),
|
method: 'GET',
|
header: {
|
'token': uni.getStorageSync('token')
|
},
|
success(result) {
|
var res = result.data
|
if (res.code === 200) {
|
that.dataList = res.data.pickSheetDetlList
|
|
} else if (res.code == 403) {
|
that.messageText = res.msg
|
that.messageToggle('error')
|
setTimeout(() => {
|
uni.reLaunch({
|
url: '../login/login'
|
});
|
}, 1000);
|
} else {
|
that.messageText = res.msg
|
that.messageToggle('error')
|
}
|
}
|
});
|
},
|
}
|
}
|
</script>
|
|
<style>
|
@import url('../../static/css/wms.css/wms.css');
|
|
.uni-section {
|
margin-top: 0rpx;
|
|
.uni-section__content-title {
|
font-size: 18px;
|
color: #303133;
|
}
|
}
|
|
.buttom uni-button {
|
width: 60%;
|
}
|
.list {
|
display: flex;
|
min-height: 80rpx;
|
background-color: #FFF;
|
margin: 20rpx;
|
border-radius: 20rpx;
|
box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
|
}
|
.list:first-child {
|
margin-top: 200rpx;
|
}
|
.list:last-child {
|
margin-bottom: 120rpx;
|
}
|
.code {
|
width: 100%;
|
position: fixed;
|
/* min-height: 200rpx; */
|
background-color: #FFF;
|
z-index: 10;
|
}
|
.item {
|
display: flex;
|
align-items: center;
|
height: 100rpx;
|
margin-left: 20rpx;
|
border-bottom: 1px solid #DCDFE6;
|
}
|
|
.item input {
|
height: 50rpx;
|
line-height: 50rpx;
|
/* font-family: PingFang SC; uniapp 默认字体不居中 */
|
font-size: 36upx;
|
font-family: PingFang SC;
|
width: 55vw;
|
|
}
|
|
.code-decs {
|
width: 20vw;
|
font-size: 18px;
|
color: #303133;
|
}
|
|
.item-right {
|
margin-left: auto;
|
margin-right: 20rpx;
|
}
|
|
.mat-list-title {
|
height: 80rpx;
|
line-height: 80rpx;
|
width: 100%;
|
background-color: white;
|
position: fixed;
|
z-index: 9;
|
/* border-top: 1px solid #DCDFE6; */
|
|
}
|
</style>
|