|
@@ -11,12 +11,10 @@
|
|
|
搜索
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="scroll-container" style="padding-bottom: 150rpx">
|
|
|
<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
|
|
|
<text>暂无批次</text>
|
|
|
</view>
|
|
|
- <!-- 批次列表 -->
|
|
|
<view v-else v-for="(item, index) in listData" :key="index" class="list-item"
|
|
|
@click="handleToreportingForWork(item)">
|
|
|
<view class="item-info uni-row">
|
|
@@ -37,13 +35,21 @@
|
|
|
</view>
|
|
|
<view class="status-btn uni-row">
|
|
|
<view class=" uni-row">
|
|
|
- <button class="reporting-tag" size="mini"
|
|
|
- @click.stop="handleCarriers(item)">箱号详情</button>
|
|
|
- <!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
|
|
|
+ <button class="reporting-tag" size="mini" @click.stop="handleCarriers(item)">箱号详情</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <uni-load-more iconType="auto" :content-text="contentText" :status="status"
|
|
|
+ @clickLoadMore="clickLoadMore" />
|
|
|
</view>
|
|
|
+ <!-- <uni-section title="外协单列表" type="line">
|
|
|
+ <uni-list border-full>
|
|
|
+ <uni-list-item v-for="(item, index) in listData" :key="index" class="list-item"
|
|
|
+ @click="handleToreportingForWork(item)">
|
|
|
+
|
|
|
+ </uni-list-item>
|
|
|
+ </uni-list>
|
|
|
+ </uni-section> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -82,18 +88,23 @@
|
|
|
const bottomStatus = ref(false) // 底部按钮显示
|
|
|
const paging = ref();
|
|
|
const reqParam = ref(null);
|
|
|
- const normalStatus = ref(true)
|
|
|
- const isLoding = ref(false);
|
|
|
+ const total = ref(0)
|
|
|
const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态
|
|
|
const keywords = ref(null)
|
|
|
- const tempList = ref([])
|
|
|
- const wasteRecyclingList = ref([]) //废品回用批次
|
|
|
+ const contentText = ref({
|
|
|
+ contentdown: '查看更多',
|
|
|
+ contentrefresh: '加载中',
|
|
|
+ contentnomore: '没有更多'
|
|
|
+ })
|
|
|
+ const status = ref("more")
|
|
|
// 在数据中定义一个变量来控制遮罩层的显示
|
|
|
const isMaskShow = ref(false);
|
|
|
- const showRight = ref(null) // 抽屉
|
|
|
-
|
|
|
+
|
|
|
const queryParams = ref({
|
|
|
-
|
|
|
+ orderByColumn: 'createTime',
|
|
|
+ isAsc: 'descending',
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
})
|
|
|
|
|
|
onLoad(() => {
|
|
@@ -113,7 +124,7 @@
|
|
|
function reflush() {
|
|
|
getList()
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function handleCarriers(item) {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/outsourcedReturnCheck/carriers",
|
|
@@ -125,18 +136,64 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ function clickLoadMore() {
|
|
|
+ console.log('clickLoadMore')
|
|
|
+ loadMore()
|
|
|
+ }
|
|
|
+
|
|
|
+ function loadMore() {
|
|
|
+ console.log('loadMore')
|
|
|
+ if (keywords.value != null && keywords.value != '') {
|
|
|
+ queryParams.value.keywords = keywords.value
|
|
|
+ } else {
|
|
|
+ queryParams.value.keywords = null;
|
|
|
+ }
|
|
|
+ if ((queryParams.value.pageNum * queryParams.value.pageSize) >= total.value) {
|
|
|
+ status.value = 'no-more'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ queryParams.value.pageNum = queryParams.value.pageNum + 1
|
|
|
+ getOutsourceOrderList(queryParams.value).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ // console.log(res)
|
|
|
+ listData.value.push(...res.rows)
|
|
|
+ total.value = res.total
|
|
|
+ console.log(res.rows.length)
|
|
|
+ if (res.rows.length === 0) {
|
|
|
+ status.value = 'no-more'
|
|
|
+ queryParams.value.pageNum = queryParams.value.pageNum - 1
|
|
|
+ }
|
|
|
+ console.log(queryParams.value.pageNum)
|
|
|
+ } else {
|
|
|
+ total.value = 0
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
function getList() {
|
|
|
if (keywords.value != null && keywords.value != '') {
|
|
|
queryParams.value.keywords = keywords.value
|
|
|
} else {
|
|
|
queryParams.value.keywords = null;
|
|
|
}
|
|
|
+ queryParams.value.pageNum = 1;
|
|
|
getOutsourceOrderList(queryParams.value).then(res => {
|
|
|
- // console.log(res)
|
|
|
+ console.log(res)
|
|
|
if (res.code === 200) {
|
|
|
listData.value = res.rows
|
|
|
+ total.value = res.total
|
|
|
+ if (total.value > listData.value.length) {
|
|
|
+ status.value = 'more'
|
|
|
+ }
|
|
|
} else {
|
|
|
+ total.value = 0
|
|
|
uni.showToast({
|
|
|
title: res.message,
|
|
|
icon: 'none'
|
|
@@ -146,12 +203,10 @@
|
|
|
console.log(err)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function handleSearch() {
|
|
|
getList()
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|