From eec82b55813387e20087989536cd32810b59cd48 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期五, 13 十月 2023 09:42:49 +0800
Subject: [PATCH] 大部分按钮增加loading 放空操作逻辑修改

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

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index 499b969..3f52405 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -11,6 +11,7 @@
 						icon="http://cdn.uviewui.com/uview/empty/data.png"
 						textSize="30"
 						iconSize="1000"
+						text="鏆傛棤鏁版嵁"
 						v-if="orderPlanData.length == 0"></u-empty>
 				</view>
 				<view class="collection-form">
@@ -20,6 +21,8 @@
 						@click="cardBodyClick(item)">
 						<view class="first-line">
 							<view class="dispatch-receive">
+								<view class="dispatch-dept">{{ item.deptName }}</view>
+								<view class="black-bar"></view>
 								<view class="dispatch">{{ item.filedName }}</view>
 							</view>
 							<view class="point-number">
@@ -67,6 +70,7 @@
 							icon="http://cdn.uviewui.com/uview/empty/data.png"
 							textSize="30"
 							iconSize="1000"
+							text="鏆傛棤鏁版嵁"
 							v-if="historyCoalData.length == 0"></u-empty>
 						<view class="history-information"
 							v-for="(item, index) in historyCoalData"
@@ -138,7 +142,8 @@
 					<view class="receiverPopup__btn"><u-button text="纭畾"
 							type="primary"
 							@click="popupDetermineClick"
-							:disabled="canClick"></u-button></view>
+							:disabled="canClick"
+							:loading="popupDetermineClickLoading"></u-button></view>
 				</view>
 			</u-popup>
 		</view>
@@ -199,11 +204,11 @@
 				carNum: "",
 				// 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺
 				carNumSurplus: '',
-				canClick: false
+				canClick: false,
+				popupDetermineClickLoading: false
 			};
 		},
-		onLoad() {},
-		onShow() {
+		onLoad() {
 			this.init();
 		},
 		methods: {
@@ -257,11 +262,13 @@
 			},
 			popupDetermineClick() {
 				if (this.receiveNum > 0) {
+					this.popupDetermineClickLoading = true;
 					this.getOrderNum.num = this.receiveNum;
 					uni.showLoading({ title: '鍔犺浇涓�...' });
 					this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
 						uni.hideLoading();
 						if (res.code == 0) {
+							this.popupDetermineClickLoading = false;
 							this.getOrderNum.num = '';
 							this.GetOrderPlan();
 							this.show = false;
@@ -271,6 +278,7 @@
 								duration: 1000
 							});
 						} else {
+							this.popupDetermineClickLoading = false;
 							this.$u.toast(res.msg ? res.msg : '棰嗗彇澶辫触');
 						}
 					});
@@ -313,7 +321,7 @@
 			// 鎻愮叅鍗曡鎯�
 			cardBodyClick(v) {
 				uni
-		.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
+					.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
 			},
 			// 鐐瑰嚮鍘嗗彶鎻愮叅鍗曡幏鍙栬鎯�
 			faYundetail(v) {
@@ -478,7 +486,8 @@
 					box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
 					border-radius: 20rpx;
 					overflow: hidden;
-					@include flex flex-direction: column;
+					@include flex;
+					flex-direction: column;
 					position: relative;
 					align-items: flex-start;
 					margin-top: vww(10);
@@ -493,8 +502,27 @@
 						.dispatch-receive {
 							width: 70%;
 							display: flex;
-							justify-content: space-between;
+							justify-content: flex-start;
 							align-items: center;
+
+							.dispatch-dept {
+
+								display: flex;
+								align-items: center;
+							}
+
+							.black-bar {
+								width: 2rpx;
+								height: 30rpx;
+								background: #515151;
+								margin-left: vww(12);
+							}
+
+							.dispatch {
+								margin-left: vww(12);
+								min-width: vww(50);
+							}
+
 						}
 
 						.point-number {

--
Gitblit v1.9.1