| | |
| | | <view class="button"> |
| | | <button :type="item.btnType" |
| | | style="width: 150rpx;font-size: 24rpx;height: 60rpx;line-height:60rpx;margin-left: 170rpx;" |
| | | @click="open">{{item.btnText}}</button> |
| | | @click="open(index)">{{item.btnText}}</button> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 弹出层 --> |
| | | <view style="position: absolute;width: 100%;min-height: 100%;background-color: rgba(0, 0, 0, 0.5); |
| | | <view style="position: fixed;width: 100%;min-height: 100%;background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 999;left: 0;top: 0;margin: 0;padding: 0;display: flex;flex-direction: column;align-items:center; |
| | | justify-content:center" v-if="popShow"> |
| | | <view style="background-color: #fff;width: 90%;min-height: 200rpx;border-radius: 14rpx;"> |
| | |
| | | </view> |
| | | <view class="column" style="border-top: 1rpx solid #ccc;height: 100rpx;line-height: 100rpx;"> |
| | | <view style="width: 50%;border-right: 1rpx solid #ccc;text-align: center;letter-spacing: 8px; |
| | | font-weight: 700;">取消</view> |
| | | font-weight: 700;" @click="close">取消</view> |
| | | <view style="width: 50%;text-align: center;letter-spacing: 8px;color: #409EFF; |
| | | font-weight: 700;">确认</view> |
| | | font-weight: 700;" @click="confirm()">确认</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | ], |
| | | btnType:"primary", // default |
| | | btnText: '已出库', // 未确认 |
| | | popShow:false |
| | | popShow:false, |
| | | index:0, |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | records[i]['btnText'] = '未确认' |
| | | } |
| | | that.matList = res.data.records |
| | | |
| | | |
| | | } 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'}) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | open() { |
| | | open(index) { |
| | | this.popShow = true |
| | | this.index = index |
| | | }, |
| | | close() { |
| | | this.popShow = false |
| | | }, |
| | | confirm() { |
| | | this.popShow = false |
| | | this.matList[this.index].btnText= '已出库' |
| | | this.matList[this.index].btnType = 'primary' |
| | | }, |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |