New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="list list-font-color" :class="orderDetl.color" v-for="(orderDetl,index) in dataList" :key="index"> |
| | | <view class="list-left" style="display: flex;flex-direction: column;"> |
| | | <!-- 上 --> |
| | | <view> |
| | | <view class="detl-threeCode">{{orderDetl.threeCode}}</view> |
| | | <view class="detl-locNo">{{orderDetl.locNo}}</view> |
| | | </view> |
| | | <!-- 中 --> |
| | | <view style="display: flex;"> |
| | | <view style="flex: 1;"> |
| | | <view>主单号:{{orderDetl.orderNo}}</view> |
| | | <view>编号:{{orderDetl.matnr}}</view> |
| | | <view>名称:{{orderDetl.maktx}}</view> |
| | | <view>库存数量:{{orderDetl.anfme}}</view> |
| | | </view> |
| | | <view class="out-btn"> |
| | | <view>出库</view> |
| | | </view> |
| | | </view> |
| | | <!-- 下 --> |
| | | </view> |
| | | <!-- <view class="list-right" @click="goToLocDetl(orderDetl)"> |
| | | <uni-icons type="right" size="25" color="#fff"></uni-icons> |
| | | </view> --> |
| | | </view> |
| | | <!-- 垫高 --> |
| | | <view style="height: 340rpx;text-align: center;color: #b9b9b9;"> |
| | | - 已经到底了 - |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl: '', |
| | | token: '', |
| | | dataList: [], |
| | | count: 0, |
| | | index: 0, |
| | | barcode: '', |
| | | agvDevp: '', |
| | | } |
| | | }, |
| | | onShow() { |
| | | let _this = this |
| | | this.baseUrl = uni.getStorageSync('baseUrl'); |
| | | this.token = uni.getStorageSync('token'); |
| | | // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('item', function(data) { |
| | | console.log(data.item); |
| | | _this.getLocDetl(data.item.orderNo,data.item.threeCode,data.item.matnr) |
| | | }) |
| | | }, |
| | | methods: { |
| | | getLocDetl(orderNo,threeCode,matnr) { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agvMobile/query/locDetl/v1`, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: { |
| | | orderNo: orderNo, |
| | | threeCode: threeCode , |
| | | matnr: matnr |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | for (let k of res.data) { |
| | | if (k.anfme > k.qty && k.qty == 0) { |
| | | k['color'] = 'order-sts-start' |
| | | } else if (k.anfme > k.qty && k.qty != 0) { |
| | | k['color'] = 'order-sts-working' |
| | | } else { |
| | | k['color'] = 'order-sts-end' |
| | | } |
| | | } |
| | | _this.dataList = res.data |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../../static/css/common/order.css'); |
| | | .list-font-color { |
| | | color: #fff; |
| | | /* background-color: #33bb44; */ |
| | | } |
| | | .order-sts-start { |
| | | background-color: #3eb689; |
| | | } |
| | | .order-sts-working { |
| | | background-color: #ff9d46; |
| | | } |
| | | .order-sts-end { |
| | | background-color: #ff7356; |
| | | } |
| | | .detl-threeCode { |
| | | font-size: 28px; |
| | | font-weight: bold; |
| | | } |
| | | .detl-locNo { |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | } |
| | | .out-btn { |
| | | background-color: #3e82ff; |
| | | height: 120rpx; |
| | | width: 120rpx; |
| | | line-height: 120rpx; |
| | | text-align: center; |
| | | border-radius: 50%; |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | } |
| | | </style> |