From 04f3f15c930c2b02187d0ce11d68978b65361d54 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期五, 31 三月 2023 09:26:29 +0800
Subject: [PATCH] 修复多数bug

---
 pages/customer-page/customer-index/customer-index.vue |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index b84232b..763db1e 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -9,8 +9,8 @@
 						寮�
 					</view>
 					<view class="card-left__utils">
-						<u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.cars2 != item.carNum" shape="circle"></u-button>
-						<u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle"></u-button>
+						<u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.carNumSurplus != 0" shape="circle"></u-button>
+						<u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplus1 != 0"></u-button>
 					</view>
 				</template>
 				<template v-slot:right-top>
@@ -69,7 +69,7 @@
 						<uni-td align="center" @row-click="faYundetail(item)">{{ item.tmCount }}</uni-td>
 					</uni-tr>
 				</uni-table>
-				<view class="more_text" v-if="showMoreData">娌℃湁鏁版嵁浜�...</view>
+				<view class="more_text" v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
 			</scroll-view>
 		</view>
 		<!-- 棰嗗彇寮瑰嚭妗� -->
@@ -138,7 +138,6 @@
 		init() {
 			this.GetOrderPlan();
 			this.getJhOrderPlanDataPage();
-			if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
 		},
 		// 鑾峰彇鍙戣繍璁″垝鍒楄〃
 		GetOrderPlan() {
@@ -157,9 +156,16 @@
 			this.loading = true;
 			this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
 				if (res.data.records) {
-					this.historyCoalData = [...this.historyCoalData, ...res.data.records];
-					this.total = res.data.total;
-					this.loading = false;
+					if (this.pageCurrent > 1) {
+						this.historyCoalData = this.historyCoalData.concat(res.data.records);
+						this.loading = false;
+					} else {
+						this.historyCoalData = res.data.records;
+						this.loading = false;
+					}
+					// this.historyCoalData = [...this.historyCoalData, ...res.data.records];
+					// this.total = res.data.total;
+					// this.loading = false;
 				}
 			});
 		},

--
Gitblit v1.9.1