|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view class=""> | 
|---|
|  |  |  | <scroll-view class="scroll-Y"> | 
|---|
|  |  |  | <button size="mini" @click="up">btn</button> | 
|---|
|  |  |  | <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> | 
|---|
|  |  |  | <view>商品码:{{matnr}}</view> | 
|---|
|  |  |  | <view>库位码:{{locno}}</view> | 
|---|
|  |  |  | <view>托盘码:{{barcode}}</view> | 
|---|
|  |  |  | <view>订单码:{{orderNo}}</view> | 
|---|
|  |  |  | </scroll-view> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <view class="user" @click="userDetail"> | 
|---|
|  |  |  | <!-- 头像 --> | 
|---|
|  |  |  | <view class="user-avatar"> | 
|---|
|  |  |  | <image src="../../static/image/user__easyico.png" mode="aspectFit"></image> | 
|---|
|  |  |  | </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 class="taskbox"> | 
|---|
|  |  |  | <view class="taskbox-title"> | 
|---|
|  |  |  | <y-title title="待处理任务"></y-title> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="taskbox-main"> | 
|---|
|  |  |  | <view class="taskbox-body" v-for="(item,index) in Data" @click="goDetl(item)"> | 
|---|
|  |  |  | <view class="taskbox-body-title">{{item.title}}</view> | 
|---|
|  |  |  | <view class="taskbox-body-cell"> | 
|---|
|  |  |  | <text class="taskbox-body-number">{{item.value}}</text> | 
|---|
|  |  |  | <text class="taskbox-body-unit">个</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </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' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | username: '', | 
|---|
|  |  |  | Data: [ | 
|---|
|  |  |  | { field: 'planPendingTaskCount', title: '规划申请单', hide: false,value: ''}, | 
|---|
|  |  |  | { field: 'planPriOnlinePendingTaskCount', title: '核价审批', hide: false,value: '' }, | 
|---|
|  |  |  | { field: 'priQuotePendingTaskCount', title: '报价审批', hide: false,value: '' }, | 
|---|
|  |  |  | { field: 'businessTripPendingTaskCount', title: '出差审批', hide: false,value: '' }, | 
|---|
|  |  |  | { field: 'reimburseOnlinePendingTaskCount', title: '报销审批', hide: false,value: '' }, | 
|---|
|  |  |  | { field: 'priOnlinePendingTaskCount', title: '可接收核价任务', hide: false,value: '' }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | data2: [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | this.getDetail() | 
|---|
|  |  |  | this.getPersonData() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 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.data); | 
|---|
|  |  |  | } 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); | 
|---|
|  |  |  | backLogin(res) { | 
|---|
|  |  |  | uni.showToast({title: res.msg, icon: "none", position: 'top'}) | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | uni.reLaunch({ | 
|---|
|  |  |  | url: '../login/login' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, 1000); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changge() { | 
|---|
|  |  |  | this.matnr = '' | 
|---|
|  |  |  | console.log(this.barcode,this.orderNo); | 
|---|
|  |  |  | // 获取任务信息 | 
|---|
|  |  |  | getPersonData() { | 
|---|
|  |  |  | let _this = this | 
|---|
|  |  |  | uni.request({ | 
|---|
|  |  |  | url: `${_this.baseUrl}/dashboard/personData/auth`, | 
|---|
|  |  |  | header: {'token' : uni.getStorageSync('token')}, | 
|---|
|  |  |  | success(res) { | 
|---|
|  |  |  | res = res.data | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | for (let k of _this.Data) { | 
|---|
|  |  |  | k.value = res.data[k.field] | 
|---|
|  |  |  | res.data[k.field] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | goDetl(item) { | 
|---|
|  |  |  | if (item.value > 0) { | 
|---|
|  |  |  | let url = '/pages/business' | 
|---|
|  |  |  | switch(item.field) { | 
|---|
|  |  |  | case 'planPendingTaskCount': | 
|---|
|  |  |  | url = `${url}/plan/plan` | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'planPriOnlinePendingTaskCount': | 
|---|
|  |  |  | url = `${url}/pricing/priOnline` | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'priQuotePendingTaskCount': | 
|---|
|  |  |  | url = `${url}/pricing/priQuote` | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'businessTripPendingTaskCount': | 
|---|
|  |  |  | url = `${url}/goBusiness/goBusiness` | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'reimburseOnlinePendingTaskCount': | 
|---|
|  |  |  | url = `${url}/goBusiness/reimburseOnline` | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'priOnlinePendingTaskCount': | 
|---|
|  |  |  | url = `${url}/pricing/priOnline` | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url:url | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </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: 100rpx; | 
|---|
|  |  |  | width: 100rpx; | 
|---|
|  |  |  | padding: 50rpx; | 
|---|
|  |  |  | /* 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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .taskbox { | 
|---|
|  |  |  | margin: 32rpx; | 
|---|
|  |  |  | padding: 16rpx; | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | border-radius: 20rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .taskbox-main { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-wrap: wrap; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .taskbox-body-cell { | 
|---|
|  |  |  | /* display: flex; */ | 
|---|
|  |  |  | margin-left: 16rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .taskbox-body-number { | 
|---|
|  |  |  | font-size: 40rpx; | 
|---|
|  |  |  | font-weight: bold; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .taskbox-body-unit { | 
|---|
|  |  |  | margin-left: 8rpx; | 
|---|
|  |  |  | /* vertical-align: text-bottom; */ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .taskbox-body { | 
|---|
|  |  |  | margin: 16rpx; | 
|---|
|  |  |  | width: 45%; | 
|---|
|  |  |  | /* background-color: aquamarine; */ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|