| | |
| | | <template> |
| | | <scroll-view scroll-y> |
| | | <view> |
| | | <view class="text-box" style="min-height: 100rpx;"> |
| | | <view class="text-title"><text>订单:</text></view> |
| | | <uni-data-checkbox v-model="checkOrder" :localdata="orderList" @change="orderChange"></uni-data-checkbox> |
| | | </view> |
| | | <view class="container"> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>订单</text></view> |
| | | <view class="text-title">{{checkOrder}}</view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>品名</text></view> |
| | | <view class="text-title">{{matData.maktx}}</view> |
| | |
| | | baseIP:'', |
| | | basePORT:'', |
| | | checkOrder: null, |
| | | orderList: [], |
| | | orderDataList: [] |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('matData', function(data) { |
| | | let list = data.data; |
| | | let dataList = [] |
| | | list.forEach((item) => { |
| | | dataList.push({ |
| | | text: item.orderNo + "-" + item.khmc, |
| | | value: item.orderNo |
| | | }) |
| | | }) |
| | | that.orderList = dataList; |
| | | that.orderDataList = list; |
| | | let item = data.data; |
| | | that.matData = item.matData |
| | | that.matData.checkOrder = item.orderNo |
| | | that.checkOrder = item.orderNo |
| | | }) |
| | | |
| | | |
| | |
| | | uni.vibrateShort(); |
| | | uni.navigateBack({ |
| | | |
| | | }) |
| | | }, |
| | | orderChange() { |
| | | let that = this |
| | | this.orderDataList.forEach((item) => { |
| | | if(item.orderNo == that.checkOrder) { |
| | | that.matData = item.matData |
| | | that.matData.checkOrder = item.orderNo |
| | | } |
| | | }) |
| | | } |
| | | } |