123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <!-- 选择合同 -->
- <template>
- <view class="container-wrap">
- <uni-nav-bar title="选择合同" :status-bar="true" background-color="#3F92F9" color="#FFF">
- <view slot="left">
- <u-icon name="account-fill" color="#FFF" size="35"></u-icon>
- <span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
- </view>
- <view slot="right" @tap="$utils.back()">
- <span style="color: #FFFFFF;">返回</span>
- </view>
- </uni-nav-bar>
- <view class="container">
- <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="loadMore()">
- <view class="list">
- <view class="item" v-for="(item, index) in data" :key="index" @tap="chooseContract(item)">
- <view class="row">
- <view class="col">
- <view class="label">供应商:</view>
- <view class="value">{{ item.supplierName }}</view>
- </view>
- </view>
- <view class="row">
- <view class="col">
- <view class="label">合同编号:</view>
- <view class="value">{{ item.purchaseBillNo }}</view>
- </view>
- <view class="col" style="flex: 0;width: 200rpx;">
- <view class="label" style="width: 100rpx;">批次:</view>
- <view class="value">{{ item.batchNo.split('-')[item.batchNo.split('-').length - 1] }}</view>
- </view>
- </view>
- <view class="row">
- <view class="col">
- <view class="label">发货时间:</view>
- <view class="value">{{ item.shipTime }}</view>
- </view>
- </view>
- </view>
- </view>
- <u-loadmore :status="loadStatus" @loadmore="loadMore" />
- </scroll-view>
- </view>
- </view>
- </template>
- <script>
- // #ifdef APP-PLUS
- // #endif
- export default {
- data() {
- return {
- materialCode: '',
- isReading: false,
- data: []
- };
- },
- methods: {
- /* 选择合同 */
- chooseContract(item) {
- uni.$emit('chooseContract', {
- purchaseBillNo: item.purchaseBillNo,
- batchNo: item.batchNo
- })
- this.$utils.back()
- },
- getList() {
- console.log(this.materialCode)
- this.$http.GetContractBatchPageList({
- pageIndex: this.pageIndex,
- pageSize: this.pageSize,
- materialCode: this.materialCode
- }).then(res => {
- console.log(res)
- if (res.code === 0) {
- this.data.push(...res.result.list)
- if(res.result.isLastPage) {
- this.loadStatus = 'nomore'
- }else {
- this.loadStatus = 'loadmore'
- }
- }
- })
- }
- },
- onLoad(option) {
- this.materialCode = option.materialCode
- this.getList()
- },
- onUnload() {}
- }
- </script>
- <style lang="scss" scoped>
- .container-wrap {
- overflow: hidden;
- .container {
- padding: 10rpx;
- height: calc(100vh - var(--status-bar-height) - 44px);
- overflow: auto;
- .info {
- padding: 10rpx 20rpx;
- font-size: 32rpx;
- }
- .list {
- .item {
- padding: 20rpx;
- margin-bottom: 10rpx;
- background-color: #FFFFFF;
- border: 1rpx solid rgba(215, 215, 215, 1);
- border-radius: 10rpx;
- .row {
- &.border {
- border-bottom: 1px solid rgba(215, 215, 215, 1);
- }
- }
- }
- }
- }
- }
- </style>
|