From e193d75257a21568a15f99b27a2a48bd7fd815f9 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期三, 22 三月 2023 17:59:06 +0800
Subject: [PATCH] 1.磅房详情(完成) 2.入场申请报错(完成) 3.签到(完成) 4.日志(完成) 5.发运计划详情(完成)

---
 pages/customer-page/customer-index/customer-index.vue |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index fb836d1..7afe7a7 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 == 0" shape="circle"></u-button>
-						<u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplus1 == 0"></u-button>
+						<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" v-if="item.carNum != item.carNumSurplus1"></u-button>
 					</view>
 				</template>
 				<template v-slot:right-top>
@@ -61,8 +61,6 @@
 <script>
 import card from '@/components/card/card.vue';
 import { customerId } from '@/utils/status';
-import colorGradient from '@/uni_modules/uview-ui/libs/function/colorGradient';
-import { todayDate } from '@/utils/util.js';
 export default {
 	components: {
 		card
@@ -80,7 +78,6 @@
 	},
 	onShow() {
 		this.init();
-		console.log(todayDate, '鑾峰彇浠婂ぉ鐨勬棩鏈�');
 	},
 	methods: {
 		init() {
@@ -96,10 +93,6 @@
 				uni.hideLoading();
 			});
 		},
-		// 棰嗗彇鐐瑰嚮
-		// numInput(id) {
-
-		// },
 		popupDetermineClick() {
 			if (this.receiveNum) {
 				this.getOrderNum.num = this.receiveNum;
@@ -116,6 +109,8 @@
 							icon: 'none',
 							duration: 1000
 						});
+					} else {
+						this.$u.toast(res.data ? res.data : '棰嗗彇澶辫触');
 					}
 				});
 			} else {
@@ -128,17 +123,14 @@
 		},
 		/**
 		 * @瀹㈡埛棰嗗彇
+		 * 棰嗗彇寮规
 		 */
 		receiveClick(item) {
 			this.show = true;
-
 			this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鎻愮叅鍗曠殑id
 		},
-		open() {
-			console.log('鎵撳紑浜�');
-		},
+		open() {},
 		close() {
-			console.log('鍏抽棴鏂规硶');
 			this.show = false;
 			this.receiveNum = null;
 		},
@@ -148,14 +140,20 @@
 		// 鎻愮叅鍗曡鎯�
 		cardBodyClick(name) {
 			console.log('鎻愮叅鍗曡鎯�', name);
+			let code = null;
+			this.orderPlanData.forEach(item => {
+				if (item.id == name) {
+					code = item.code;
+				}
+			});
 			uni.navigateTo({
-				url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}`
+				url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${name}&code=${code}`
 			});
 		},
 		// 杞彂
 		forwardClick(obj) {
 			uni.navigateTo({
-				url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}`
+				url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}`
 			});
 		}
 	}

--
Gitblit v1.9.1