| | |
| | | </view> |
| | | </scroll-view> |
| | | <view> |
| | | <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item)"> |
| | | <view class="tag-list" v-for="(item,i) in matList" :key="i"> |
| | | <view class="tag"> |
| | | <view style="display: flex;"> |
| | | <view style="display: flex; justify-content: space-between;"> |
| | | <view class="wms-tag" :style="baColor" >商品</view> |
| | | <checkbox class="wms-tag" :value="item.matnr" :checked="item.checked" @click="set(i)"/> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tag-item">库位号: {{item.locNo}}</view> |
| | | <view class="tag-item">商品编码: {{item.matnr ? item.matnr : '--'}}</view> |
| | | <view class="tag-item">批号: {{item.batch ? item.batch : '--'}}</view> |
| | |
| | | </view> |
| | | </view> |
| | | <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" /> |
| | | |
| | | <view class="buttom"><button size="mini" type="primary" @click="findBySelect()">提取</button></view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | onReachBottom() { |
| | | this.status = 'more'; |
| | | if (this.tagList == null) { |
| | | this.showMat(this.tagIdNow); |
| | | this.selectloc2(); |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | // this.showTag(10009) |
| | | }, |
| | | methods: { |
| | | set(e) { |
| | | var ck = this.matList[e].checked |
| | | this.matList[e].checked = ck ? false:true |
| | | }, |
| | | selectloc(){ |
| | | let that = this |
| | | that.matList = [] |
| | | |
| | | that.curr = 1 |
| | | uni.request({ |
| | | url: that.baseUrl + '/locDetl/pda/select', |
| | | data: { |
| | |
| | | } |
| | | if (res.data.records.length == 0) { |
| | | that.status = 'noMore' |
| | | } |
| | | for (var i = 0; i < that.matList.length; i++) { |
| | | that.$set(that.matList[i],'checked',false) |
| | | } |
| | | that.baColor = "background-color: #1cbbb4;" |
| | | } else if (res.code === 403 ) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | selectloc2(){ |
| | | let that = this |
| | | // that.matList = [] |
| | | uni.request({ |
| | | url: that.baseUrl + '/locDetl/pda/select', |
| | | data: { |
| | | curr:that.curr, |
| | | limit: 20, |
| | | matnr: that.condition |
| | | }, |
| | | method:"GET", |
| | | header: { |
| | | 'token':uni.getStorageSync('token'), |
| | | }, |
| | | success(result) { |
| | | console.log(result); |
| | | that.tagList = null |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | if (res.data.records != null && res.data.records.length > 0) { |
| | | let list = res.data.records |
| | | that.matList = that.reload ? list : that.matList.concat(list); |
| | | that.curr = that.curr + 1 |
| | | } |
| | | if (res.data.records.length == 0) { |
| | | that.status = 'noMore' |
| | | } |
| | | for (var i = 0; i < that.matList.length; i++) { |
| | | that.$set(that.matList[i],'checked',false) |
| | | } |
| | | that.baColor = "background-color: #1cbbb4;" |
| | | } else if (res.code === 403 ) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | findBySelect(matnr) { |
| | | this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: matnr}); |
| | | findBySelect() { |
| | | var checkedList = [] |
| | | for(var i = 0; i < this.matList.length; i++) { |
| | | var t = !this.matList[i].checked |
| | | if (this.matList[i].checked) { |
| | | checkedList.push(this.matList[i]) |
| | | } |
| | | } |
| | | this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: checkedList}); |
| | | uni.navigateBack({ |
| | | |
| | | }) |
| | |
| | | color: #606266; |
| | | font-size: 14px; |
| | | } |
| | | .aside { |
| | | width: 100rpx; |
| | | /* background-color: #303133; */ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | </style> |