<template>
|
<view>
|
<view class="list" v-for="(item,index) in matList" :key="index" @click="chose(item.orderNo)">
|
<view class="item">
|
<view class="title">单据类型:</view>
|
<view class="context">{{item.docType$}}</view>
|
</view>
|
<view class="item">
|
<view class="title">单号:</view>
|
<view class="context">{{item.orderNo}}</view>
|
</view>
|
<view class="item">
|
<view class="title">订单状态:</view>
|
<view class="context">{{item.settle$}}</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
commonUrl: null,
|
matList: [],
|
|
}
|
},
|
onLoad() {
|
let that = this
|
// const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
|
const eventChannel = this.getOpenerEventChannel();
|
|
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
eventChannel.on('commonUrl', function(data) {
|
that.commonUrl = data.commonUrl
|
that.getList()
|
})
|
},
|
methods: {
|
getList() {
|
let that = this
|
uni.request({
|
url: that.commonUrl + '/manPakOut/notIssued',
|
header: {'token':uni.getStorageSync('token')},
|
method: 'GET',
|
success(result) {
|
var res = result.data
|
if (res.code === 200) {
|
that.matList = res.data
|
}
|
}
|
})
|
},
|
chose(orderNo) {
|
this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: orderNo});
|
uni.navigateBack({
|
|
})
|
}
|
}
|
}
|
</script>
|
|
<style>
|
.list {
|
width: 96%;
|
min-height: 100rpx;
|
background-color: #FFF;
|
margin: 15rpx 2% 0 2%;
|
border-radius: 15rpx;
|
}
|
.item {
|
display: flex;
|
flex-direction: row;
|
padding: 4rpx;
|
font-size: 16px;
|
}
|
</style>
|