<template>
|
<view class="wrap">
|
<view class="search">
|
<u-search v-model="query.transportsNo" @custom="search" @search="search" placeholder="货盘运输任务标识号"></u-search>
|
</view>
|
<scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore">
|
<u-cell-group class="list" :border="false">
|
<u-card :title="item.transportsNo" :sub-title="item.transportsNo" v-for="(item, index) in list" :key="item.id"
|
:index="item.id" @click="cardClick(item.id)" >
|
<view slot="head">
|
<view class="row-list">
|
<span class="span-lable">【任务标识号】{{item.transportsNo}}</span>
|
</view>
|
</view>
|
<view slot="body">
|
<view class="row-list">
|
<u-row justify="space-between">
|
<u-col span="4">
|
<span class="span-lable">物料需求: </span>
|
</u-col>
|
<u-col span="4">
|
<u-button type="primary" size="mini" style="height: 80rpx;line-height: 80rpx;width: 100rpx;" @click="requirePartClick(item.id)">查看</u-button>
|
</u-col>
|
</u-row>
|
</view>
|
<view class="row-list">
|
<u-row justify="space-between">
|
<u-col span="4">
|
<span class="span-lable">移库明细: </span>
|
</u-col>
|
<u-col span="4">
|
<u-button type="primary" size="mini" style="height: 80rpx;line-height: 80rpx;width: 100rpx;" @click="moveDetailClick(item.id)">查看</u-button>
|
</u-col>
|
</u-row>
|
</view>
|
|
<view class="row-list">
|
<u-row justify="space-between">
|
<u-col span="4">
|
<span class="span-lable">创建时间: </span>
|
</u-col>
|
<u-col span="7">
|
<view><span class="span-lable">{{item.createTime}}</span></view>
|
</u-col>
|
</u-row>
|
</view>
|
</view>
|
|
</u-card>
|
</u-cell-group>
|
<view class="loadmore" @click="loadMore">
|
<u-loadmore :status="loadStatus"></u-loadmore>
|
</view>
|
</scroll-view>
|
|
</view>
|
</template>
|
<script>
|
export default {
|
data() {
|
return {
|
keywords: '',
|
query: {
|
current: 1,
|
size: 20
|
},
|
list: [],
|
count: 0,
|
loadStatus: 'loadmore'
|
};
|
},
|
onLoad() {
|
this.loadList();
|
},
|
onShow() {
|
/*if (uni.getStorageSync('refreshList') === true) {
|
uni.removeStorageSync('refreshList');
|
this.search('');
|
}*/
|
},
|
methods: {
|
moveDetailClick(id){
|
uni.navigateTo({
|
url: '/pages/product/pick/moveDetailRecordList?id='+id
|
})
|
},
|
requirePartClick(id) {
|
uni.navigateTo({
|
url: '/pages/product/pick/requirePartRecordList?id='+id
|
})
|
},
|
cardClick(id) {
|
console.log('adasdad')
|
uni.navigateTo({
|
url: '/pages/product/pick/materialTransfer?id=' + id
|
})
|
},
|
loadMore() {
|
this.loadStatus = "loading";
|
setTimeout(() => {
|
this.query.current += 1;
|
this.loadList();
|
}, 100);
|
},
|
loadList() {
|
this.$u.api.palletTransports.page(this.query).then(res => {
|
if (!res.data.records || res.data.records.length == 0) {
|
this.loadStatus = "nomore";
|
return;
|
}
|
this.list = this.list.concat(res.data.records);
|
//this.total = res.data.total;
|
this.query.current = res.data.current;
|
this.query.size = res.data.size;
|
this.loadStatus = "loadmore";
|
});
|
},
|
search(value) {
|
this.list = [];
|
this.query.current = 1;
|
this.query.transportsNo = value;
|
this.loadList();
|
}
|
}
|
};
|
</script>
|