From 82af85eae92790fc125ca42d1a800046fe0bd916 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期三, 29 三月 2023 14:00:08 +0800
Subject: [PATCH] 登录页修改

---
 pages/driver-page/driver-index/driver-index.vue |   63 ++++++++++++++++++++++---------
 1 files changed, 44 insertions(+), 19 deletions(-)

diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index 34a11e5..6b386d3 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -22,10 +22,10 @@
 					<view class="right-top">
 						<view class="card-right-top-row">
 							<view>
-								<text>{{ item.deptName ||''}}</text>
+								<text>{{ item.deptName || '' }}</text>
 							</view>
 							<view>
-								<text>{{ item.coalName ||''}}</text>
+								<text>{{ item.coalName || '' }}</text>
 							</view>
 						</view>
 						<view class="card-right-top-row">
@@ -35,12 +35,12 @@
 						</view>
 						<view class="card-right-top-row">
 							<view>
-								<text>{{item.filedName||''}}</text>
+								<text>{{ item.filedName || '' }}</text>
 							</view>
 						</view>
 						<view class="card-right-top-row">
 							<view>
-								<text>{{item.orderCode||''}}</text>
+								<text>{{ item.orderCode || '' }}</text>
 							</view>
 						</view>
 					</view>
@@ -130,14 +130,31 @@
 import { customerId } from '@/utils/status';
 
 export default {
+	props: {
+		indexdriverBillOfLoadingData: {
+			type: Object,
+			default: {}
+		}
+	},
+	watch: {
+		indexdriverBillOfLoadingData: {
+			handler(v) {
+				console.log(v, '鍒锋柊涔嬪悗鐨勫徃鏈洪椤�');
+				this.driverBillOfLoadingData = v;
+			},
+			deep: true,
+			immediate: true
+		}
+	},
 	data() {
 		return {
-			driverBillOfLoadingData: [],
+			driverBillOfLoadingData: {},
 			// 鎶㈠崟妯℃�佹
 			qiangDanShow: false,
 			qiangDanTitle: '鎶㈠崟鎻愮ず',
 			qiangDanContent: '',
-			qiangDanOrderPlanId: null
+			qiangDanOrderPlanId: null,
+			fleetId: ''
 		};
 	},
 	onShow() {
@@ -153,6 +170,7 @@
 				title: '鍔犺浇涓�...'
 			});
 			this.$reqGet('qiangDanList').then(res => {
+				console.log(res, '鍙告満棣栭〉');
 				uni.hideLoading();
 				this.driverBillOfLoadingData = res.data;
 			});
@@ -160,9 +178,10 @@
 		// 鎶㈠崟鎸夐挳
 		qiangDanBtn(value) {
 			if (value.tmcCount == '0') {
-				this.qiangDan(value.orderPlanId);
+				this.qiangDan(value.orderPlanId, value.fleetId);
 			} else {
 				this.qiangDanOrderPlanId = value.orderPlanId;
+				this.fleetId = value.fleetId;
 				this.qiangDanShow = true;
 				this.qiangDanContent = `宸叉姠${value.tmcCount}鍗曪紝纭畾鎶㈠崟锛焋;
 			}
@@ -170,21 +189,27 @@
 		// 鎶㈠崟妯℃�佹
 		qiangDanConfirm() {
 			this.qiangDanContent = '';
-			this.qiangDan(this.qiangDanOrderPlanId);
+			this.qiangDanShow = false;
+			this.qiangDan(this.qiangDanOrderPlanId, this.fleetId);
 		},
 		qiangDanCancel() {
 			this.qiangDanShow = false;
 		},
 		// 鎶㈠崟璇锋眰
-		qiangDan(id) {
-			this.$reqPost('qiangDan', { orderPlanId: id }, 'params').then(res => {
-				if (res.code == 0) {
-					this.$u.toast('鎶㈠崟鎴愬姛');
-				} else {
-					this.$u.toast(res.data ? res.data : '鎶㈠崟澶辫触');
-				}
-				this.qiangDanList();
-			});
+		qiangDan(id, fleetId) {
+			this.$reqPost('qiangDan', { orderPlanId: id, fleetId: fleetId }, 'params')
+				.then(res => {
+					if (res.code == 0) {
+						this.$u.toast('鎶㈠崟鎴愬姛');
+					} else {
+						this.$u.toast(res.data ? res.data : '鎶㈠崟澶辫触');
+					}
+				})
+				.then(() => {
+					setTimeout(() => {
+						this.qiangDanList();
+					}, 1000);
+				});
 		},
 		list3CardIconClick(value) {
 			uni.navigateTo({
@@ -267,11 +292,11 @@
 			}
 			&Table {
 				.uni-table {
-					min-width: 94%!important;
+					min-width: 94% !important;
 					.uni-table-tr {
 						padding: 0;
 						.uni-table-th {
-							width:33.3%;
+							width: 33.3%;
 							line-height: 58rpx;
 							padding: vww(5) vww(10);
 							color: #111111;

--
Gitblit v1.9.1