From e6a02c8b09a796e436a501e9b87d19e25c34c9d1 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期日, 07 四月 2024 15:53:37 +0800
Subject: [PATCH] #

---
 pages/business/saleManage/saleManageDetails.vue |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/pages/business/saleManage/saleManageDetails.vue b/pages/business/saleManage/saleManageDetails.vue
index ecc0e94..64fb518 100644
--- a/pages/business/saleManage/saleManageDetails.vue
+++ b/pages/business/saleManage/saleManageDetails.vue
@@ -41,8 +41,8 @@
 			
 		</scroll-view>
 		<view class="foot">
-			<button  size="mini" type="default" @click="modi(id)">淇敼</button>
-			<button  size="mini" type="warn" @click="del(id)">鍒犻櫎</button>
+			<button  size="mini" type="default" @click="modi(id)" v-show="cstmr.status = 0">淇敼</button>
+			<!-- <button  size="mini" type="warn" @click="del(id)" v-show="cstmr.status = 0">鍒犻櫎</button> -->
 			<button  size="mini" type="primary" @click="goBusiness(id)">鍑哄樊</button>
 		</view>
 		
@@ -83,13 +83,25 @@
 			}
 		},
 		onLoad(option) { 
-			this.id = option.id
-			console.log(option);
-			this.init()
-			this.autoLoad('follower','')
-			setTimeout(()=>{
-				this.getFollowers()
-			},500)
+			if (option != '') {
+				this.id = option.id
+				this.init()
+				this.autoLoad('follower','')
+				setTimeout(()=>{
+					this.getFollowers()
+				},500)
+			} else {
+				let _this = this
+				const eventChannel = this.getOpenerEventChannel();
+				eventChannel.on('saleManage', function(data) {
+					_this.id = data.data
+					_this.init()
+				})
+				this.autoLoad('follower','')
+				setTimeout(()=>{
+					this.getFollowers()
+				},500)
+			}
 		},
 		methods: {
 			init() {
@@ -100,7 +112,6 @@
 					method: 'GET',
 					success(res) {
 						res = res.data
-						console.log(res);
 						that.saleManage = res.data
 						that.cstmr = res.data
 						that.cstmrId = that.cstmr.id
@@ -115,7 +126,6 @@
 					header: {'token' : uni.getStorageSync('token'),
 					},
 					method: 'GET',
-					
 					success(res) {
 						res = res.data
 						if (res.code === 200) {
@@ -228,8 +238,14 @@
 				})
 			},
 			goBusiness() {
+				let _this = this
+				// console.log(_this.saleManage);
 				uni.navigateTo({
 					url: '/pages/business/goBusiness/addgoBusiness',
+					success: function(res) {
+					    // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+					    res.eventChannel.emit('addType', { data: {orderId: _this.saleManage.cstmrId,comeFrom: 'saleManage'} })
+					}
 				})
 			}
 		}

--
Gitblit v1.9.1