|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view class=""> | 
|---|
|  |  |  | <scroll-view class="scroll-Y"> | 
|---|
|  |  |  | <button size="mini" @click="up">btn</button> | 
|---|
|  |  |  | <view style="margin: 2%;border-radius: 5rpx;background-color: #fff;width: 96%;min-height: 50rpx; | 
|---|
|  |  |  | box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1);"> | 
|---|
|  |  |  | <y-title title="title" /> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <view class="user" @click="userDetail"> | 
|---|
|  |  |  | <!-- 头像 --> | 
|---|
|  |  |  | <view class="user-avatar"> | 
|---|
|  |  |  | <img src="" alt=""> | 
|---|
|  |  |  | <!-- <image src="" mode="aspectFit"></image> --> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <y-input title="商品码" @input="show" v-model="matnr" placeholder=" 扫码 / 输入"/> | 
|---|
|  |  |  | <y-input title="库位码" @input="show" v-model="locno"/> | 
|---|
|  |  |  | <y-input title="托盘码" v-model="barcode" /> | 
|---|
|  |  |  | <y-input title="订单码" v-model="orderNo"></y-input> | 
|---|
|  |  |  | <y-input-btn title="订单码" v-model="orderNo" btnTitle="提取+" @confrim="changge"></y-input-btn> | 
|---|
|  |  |  | </scroll-view> | 
|---|
|  |  |  | <!-- 信息 --> | 
|---|
|  |  |  | <view class="user-info"> | 
|---|
|  |  |  | <view class="user-name">{{username}}</view> | 
|---|
|  |  |  | <view class="user-company">中扬立库技术有限公司</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- 更多 --> | 
|---|
|  |  |  | <view class="user-icons"> | 
|---|
|  |  |  | <uni-icons type="right"></uni-icons> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | import user from '@/pages/api/user/user.js' | 
|---|
|  |  |  | export default{ | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | scrollY:true, | 
|---|
|  |  |  | matnr:'1100878-10000-21074558989', | 
|---|
|  |  |  | locno: '0100509', | 
|---|
|  |  |  | barcode: '80006098', | 
|---|
|  |  |  | orderNo: 'JK20220923', | 
|---|
|  |  |  | matList: [{id:1},{id:2},{id:1},{id:2},{id:2}, | 
|---|
|  |  |  | {id:1},{id:2},{id:2},{id:1},{id:2},{id:2},{id:1}, | 
|---|
|  |  |  | {id:2},{id:2},{id:1},{id:2},{id:2},{id:1},{id:2}] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | username: '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | this.getDetail() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | open() { | 
|---|
|  |  |  | this.$refs.yPopup.open('center') | 
|---|
|  |  |  | async getDetail() { | 
|---|
|  |  |  | let res = await user.getDetail() | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | this.username = res.data.username | 
|---|
|  |  |  | console.log(res); | 
|---|
|  |  |  | } else if (res.code === 403) { | 
|---|
|  |  |  | this.backLogin(res) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | up() { | 
|---|
|  |  |  | this.matnr = '' | 
|---|
|  |  |  | console.log(this.matnr); | 
|---|
|  |  |  | userDetail() { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url:'/pages/user/user_detail/userDetail' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | show() { | 
|---|
|  |  |  | console.log(this.matnr,this.locno); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changge() { | 
|---|
|  |  |  | this.matnr = '' | 
|---|
|  |  |  | console.log(this.barcode,this.orderNo); | 
|---|
|  |  |  | backLogin(res) { | 
|---|
|  |  |  | uni.showToast({title: res.msg, icon: "none", position: 'top'}) | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | uni.reLaunch({ | 
|---|
|  |  |  | url: '../login/login' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, 1000); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | .vv { | 
|---|
|  |  |  | width: 100%;height: 100rpx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .bb { | 
|---|
|  |  |  | position: fixed; | 
|---|
|  |  |  | top: 0; | 
|---|
|  |  |  | left: 0; | 
|---|
|  |  |  | .user { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | height: 200rpx; | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | display: grid; | 
|---|
|  |  |  | grid-template-columns: 1fr 4fr 1fr; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .user-avatar { | 
|---|
|  |  |  | height: 200rpx; | 
|---|
|  |  |  | width: 200rpx; | 
|---|
|  |  |  | /* background-color: aquamarine; */ | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .user-avatar img { | 
|---|
|  |  |  | height: 100rpx; | 
|---|
|  |  |  | border-radius: 20rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .user-info { | 
|---|
|  |  |  | height: 200rpx; | 
|---|
|  |  |  | display: grid; | 
|---|
|  |  |  | grid-template-rows: 2fr 2fr; | 
|---|
|  |  |  | /* background-color: aqua; */ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .user-name { | 
|---|
|  |  |  | height: 100rpx; | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: flex-end; | 
|---|
|  |  |  | font-size: 30rpx; | 
|---|
|  |  |  | font-weight: 700; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .user-company { | 
|---|
|  |  |  | height: 100rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .user-icons { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|