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 |   75 +++++++++++++++++++++++++++----------
 1 files changed, 55 insertions(+), 20 deletions(-)

diff --git a/pages/business/saleManage/saleManageDetails.vue b/pages/business/saleManage/saleManageDetails.vue
index 789e15d..64fb518 100644
--- a/pages/business/saleManage/saleManageDetails.vue
+++ b/pages/business/saleManage/saleManageDetails.vue
@@ -13,16 +13,20 @@
 				</view>
 			</view>
 			<view class="container">
+				
 				<view><y-title title="鍩烘湰淇℃伅"></y-title></view><view></view>
-				<view class="list-item1">瀹㈡埛浠e彿</view><view class="list-item2">{{saleManage.uuid}}</view>
-				<view class="list-item1">鎵�灞為儴闂�</view><view class="list-item2">{{saleManage.deptId$}}</view>
-				<view class="list-item1">瀹㈡埛绫诲埆</view><view class="list-item2">{{saleManage.cstmrType$}}</view>
+				<view class="list-item1">椤圭洰浠e彿</view><view class="list-item2">{{saleManage.uuid}}</view>
+				<view class="list-item1">鐢叉柟鍗曚綅</view><view class="list-item2">{{saleManage.cstmrId$}}</view>
+				<view class="list-item1">椤圭洰鎬婚噾棰�</view><view class="list-item2">{{saleManage.money}}</view>
+				<view class="list-item1">鎵�灞炲叕鍙�</view><view class="list-item2">{{saleManage.company$}}</view>
 				<view class="list-item1">鐪佸競鍖�</view><view class="list-item2">{{saleManage.pcd$ ? saleManage.pcd$ : '--'}}</view>
-				<view class="list-item1">瀹㈡埛鑱旂郴浜�</view><view class="list-item2">{{saleManage.contacts ? saleManage.contacts : '--'}}</view>
-				<view class="list-item1">鍖哄垎</view><view class="list-item2">{{saleManage.type$  ? saleManage.type$ : '--'}}</view>
-				<view class="list-item1">瀹㈡埛琛屼笟</view><view class="list-item2 color-main">{{saleManage.industry ? saleManage.industry : '--'}}</view>
-				<view class="list-item1">浜у搧绫诲埆</view><view class="list-item2">{{saleManage.productCategory ? saleManage.productCategory : '--'}}</view>
+				<view class="list-item1">椤圭洰鍦板潃</view><view class="list-item2">{{saleManage.addr}}</view>
+				<view class="list-item1">璐熻矗浜�</view><view class="list-item2">{{saleManage.director$}}</view>
 				<view class="list-item1">澶囨敞</view><view class="list-item2">{{saleManage.remarks  ? saleManage.remarks : '--'}}</view>
+				<view class="list-item1">椤圭洰棰勭畻閲戦(涓�)</view><view class="list-item2">{{saleManage.money ? saleManage.money : '--'}}</view>
+				<view class="list-item1">椤圭洰棰勪及鎴愪氦鐜�</view><view class="list-item2">{{saleManage.transactionRate ? saleManage.transactionRate : '--'}}</view>
+				
+				
 			</view>
 			<view class="container">
 				<view><y-title title="鍏朵粬淇℃伅"></y-title></view><view></view>
@@ -37,9 +41,9 @@
 			
 		</scroll-view>
 		<view class="foot">
-			<button  size="mini" type="default" @click="del(id)">淇敼</button>
-			<button  size="mini" type="warn" @click="del(id)">鍒犻櫎</button>
-			<button  size="mini" type="primary" @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>
 		
 		<view>
@@ -79,24 +83,35 @@
 			}
 		},
 		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() {
 				let that = this
 				uni.request({
-					url: that.baseUrl + '/cstmr/' + that.id +'/auth',
+					url: that.baseUrl + '/order/' + that.id +'/auth',
 					header: {'token' : uni.getStorageSync('token')},
 					method: 'GET',
 					success(res) {
 						res = res.data
-						console.log(res);
 						that.saleManage = res.data
 						that.cstmr = res.data
 						that.cstmrId = that.cstmr.id
@@ -111,7 +126,6 @@
 					header: {'token' : uni.getStorageSync('token'),
 					},
 					method: 'GET',
-					
 					success(res) {
 						res = res.data
 						if (res.code === 200) {
@@ -212,6 +226,27 @@
 						that.getFollowers()
 					}
 				})
+			},
+			modi(id) {
+				let _this = this
+				uni.navigateTo({
+					url: '/pages/business/saleManage/modiSaleManage',
+					success: function(res) {
+					    // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+					    res.eventChannel.emit('saleManage', { data: _this.saleManage })
+					}
+				})
+			},
+			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