<template>
|
<view >
|
<scroll-view scroll-y catch:touchmove="touchmove">
|
<view class="square-2">
|
<view class="square-title">
|
<view class="title-sign"><view class="sign"></view></view>
|
<view class="title-text"><text>用户码</text></view>
|
</view>
|
<view>
|
<view style="width: 96%;margin-left: 2%;">
|
<uni-combox emptyTips="暂无数据" :candidates="staNoList" v-model="staNo" placeholder="用户编号"></uni-combox>
|
</view>
|
</view>
|
</view>
|
<view class="square-2">
|
<view class="square-title">
|
<view class="title-sign"><view class="sign"></view></view>
|
<view class="title-text"><text>库位号</text></view>
|
</view>
|
<view class="square-content">
|
<view class="content-input">
|
<input readonly="value" v-model="locNo" type="text" placeholder="扫码 / 输入"
|
:focus="locNoFocus" @input="nextInput('userIdFocus')">
|
<uni-icons type="closeempty" size="20" color="#dadada" @click="remove('locNo')"></uni-icons>
|
</view>
|
</view>
|
</view>
|
<!-- <view class="square-2">
|
<view class="square-title">
|
<view class="title-sign"><view class="sign"></view></view>
|
<view class="title-text"><text>用户码</text></view>
|
</view>
|
<view class="square-content">
|
<view class="content-input">
|
<input v-model="userId" type="text" placeholder="扫码 / 输入"
|
:focus="userIdFocus" @input="nextInput('barcodeFocus')">
|
<uni-icons type="closeempty" size="20" color="#dadada" @click="remove('userId')"></uni-icons>
|
</view>
|
</view>
|
</view> -->
|
<view class="square-2">
|
<view class="square-title">
|
<view class="title-sign"><view class="sign"></view></view>
|
<view class="title-text"><text>PACK条码</text></view>
|
</view>
|
<view class="square-content">
|
<view class="content-input">
|
<input v-model="barcode" type="text" placeholder="扫码 / 输入"
|
:focus="barcodeFocus">
|
<uni-icons type="closeempty" size="20" color="#dadada" @click="remove('barcode')"></uni-icons>
|
</view>
|
</view>
|
</view>
|
</scroll-view>
|
<view class="footer flex justify-around">
|
<view>
|
<button class="cu-btn lg" @click="resst()">重置</button>
|
</view>
|
<view>
|
<button class="cu-btn lg pakin-btn bg-blue" @click="confirm()">确认</button>
|
</view>
|
</view>
|
<view>
|
<!-- 提示信息弹窗 -->
|
<uni-popup ref="message" type="message">
|
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
</uni-popup>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import permision from "@/common/permission.js"
|
export default {
|
data() {
|
return {
|
commonUrl:null,
|
locNo: '',
|
userId: '',
|
barcode: '',
|
barcodeFocus:true,
|
focus:false,
|
type: 'center',
|
msgType: 'success',
|
messageText: '这是一条成功提示',
|
staNoList:[1,2,3,4,5,6,7,8,9,10],
|
staNo:'',
|
locNoFocus:true,
|
userIdFocus:false,
|
barcodeFocus:false
|
}
|
},
|
mounted(){
|
const UIP = uni.getStorageSync('UIP');
|
this.baseIP = UIP;
|
const UPORT = uni.getStorageSync('UPORT');
|
this.basePORT = UPORT
|
const PROJ = uni.getStorageSync('UPROJ');
|
this.baseUrl = PROJ
|
this.getUrl()
|
},
|
onLoad() {
|
// #ifdef APP
|
setInterval(()=>{
|
uni.hideKeyboard()
|
},20)
|
// #endif
|
},
|
methods: {
|
// 获取url
|
getUrl() {
|
this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
|
},
|
focuss(e) {
|
this[e] = false;
|
setTimeout(()=>{
|
this[e] = true;
|
}, 100);
|
},
|
locNoFocuss() {
|
let that = this;
|
that.locNoFocus = false;
|
setTimeout(()=>{
|
that.locNoFocus = true;
|
}, 100);
|
},
|
// userIdFocuss() {
|
// let that = this;
|
// that.userIdFocus = false;
|
// setTimeout(()=>{
|
// that.userIdFocus = true;
|
// }, 100);
|
// },
|
barcodeFocuss() {
|
let that = this;
|
that.barcodeFocus = false;
|
setTimeout(()=>{
|
that.barcodeFocus = true;
|
}, 100);
|
},
|
nextInput(type) {
|
this.focuss(type)
|
// switch (obj) {
|
// case 'locNo':
|
// this.userIdFocuss();
|
// break;
|
// case 'userId':
|
// this.barcodeFocuss();
|
// break;
|
// }
|
},
|
// 清空input
|
remove(e) {
|
this[e] = ''
|
},
|
// 重置
|
resst() {
|
this.staNo = ''
|
this.locNo = ''
|
// this.userId = ''
|
this.barcode = ''
|
this.locNoFocuss()
|
},
|
// 确认
|
confirm() {
|
let that = this
|
uni.request({
|
url: that.commonUrl + '/mobile/test/startUp/auth',
|
data: {
|
channel:that.staNo,
|
locNo:that.locNo,
|
barcode:that.barcode
|
},
|
header: {
|
'token':uni.getStorageSync('token')
|
},
|
method: 'POST',
|
success(result) {
|
var res = result.data
|
uni.showToast({title: res.msg,icon: "none",position: 'top'})
|
}
|
})
|
},
|
|
change(e) {
|
console.log('当前模式:' + e.type + ',状态:' + e.show);
|
},
|
|
}
|
}
|
</script>
|
|
|
|
<style>
|
/* @import "../../colorui/main.css";
|
@import "../../colorui/icon.css"; */
|
/*
|
|
*/
|
.pop-btn {
|
position: absolute;
|
width: 100%;
|
bottom: 20rpx;
|
}
|
.pak-seach-box {
|
background-color: #FFFFFF;
|
margin: 15rpx 15rpx 0rpx 15rpx;
|
width: 96%;
|
height: 150rpx;
|
border-radius: 20rpx;
|
}
|
.box-top{
|
display: block;
|
height: 60rpx;
|
width: 720rpx;
|
}
|
.color-block-blue {
|
background-color: #1E9FFF;
|
display: inline-block;
|
float: left;
|
margin: 15rpx 15rpx 0 15rpx;
|
width: 12rpx;
|
height: 40rpx;
|
border: 5rpx solid #1E9FFF;
|
border-radius: 20rpx;
|
}
|
.title {
|
display: inline-block;
|
float: left;
|
font-size: 34rpx;
|
font-weight: 700;
|
height: 50rpx;
|
line-height: 50rpx;
|
margin-top: 10rpx;
|
}
|
.box-buttom {
|
display: inline-block;
|
background-color: #ededed;
|
width: 65%;
|
height: 60rpx;
|
border-radius: 20rpx;
|
margin: 15rpx 15rpx 0rpx 15rpx;
|
}
|
.box-buttom input {
|
width: 75%;
|
float: left;
|
margin: 8rpx 10rpx 0rpx 25rpx;
|
}
|
.box-buttom .search-icon{
|
width: 60rpx;
|
height: 60rpx;
|
float: right;
|
margin-top: 5rpx;
|
margin-right: 10rpx;
|
}
|
/* .pak-seach-box input {
|
background-color: #ededed;
|
border: 1rpx solid #d8d8d8;
|
display: inline-block;
|
border-radius: 20rpx;
|
float: left;
|
width: 70%;
|
height: 60rpx;
|
line-height: 60rpx;
|
margin: 15rpx 15rpx 0rpx 15rpx;
|
padding-left: 20rpx;
|
} */
|
.pak-seach-box button {
|
background-color: #1E9FFF;
|
color: #ffffff;
|
display: inline-block;
|
float: right;
|
width: 180rpx;
|
height: 60rpx;
|
margin: 15rpx 15rpx 0rpx 15rpx;
|
line-height: 60rpx;
|
}
|
.pakin-btn {
|
background-color: #1E9FFF;
|
}
|
.pak-data-box {
|
background-color: #F1F1F1;
|
margin: 15rpx 15rpx 0rpx 15rpx;
|
width: 96%;
|
height: 70rpx;
|
border-radius: 20rpx;
|
}
|
.pak-data-box .box-top {
|
background-color: #FFFFFF;
|
height: 70rpx;
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
}
|
.bg-false {
|
background-color: #FFFFFF;
|
}
|
.bg-true {
|
background-color: #ebebeb;
|
}
|
.data-list {
|
border-bottom: 1px solid #d8d8d8;
|
height: 130rpx;
|
margin: 15rpx;
|
border-radius: 20rpx;
|
}
|
.data-list:first-child {
|
margin-top: 20rpx;
|
}
|
.data-list:last-child {
|
margin-bottom: 200rpx;
|
}
|
/* .data-list-left {
|
display: inline-block;
|
float: left;
|
text-align: center;
|
width: 100rpx;
|
height: 180rpx;
|
line-height: 180rpx;
|
} */
|
.data-list-left {
|
display: inline-block;
|
float: left;
|
margin-left: 6%;
|
height: 130rpx;
|
/* line-height: 100rpx; */
|
color: #676767;
|
}
|
.matnr {
|
font-size: 14px;
|
font-weight: 700;
|
/* padding-top: 15rpx; */
|
padding-top: 15rpx;
|
}
|
.data-list-right {
|
display: inline-block;
|
float: right;
|
height: 130rpx;
|
line-height: 130rpx;
|
margin-right: 10%;
|
}
|
</style>
|