From 155f2b80f2a9b6f900c73f6e4461e9cebb7cd028 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 10 十月 2023 17:12:20 +0800
Subject: [PATCH] #

---
 pages/business/plan/planDetails.vue |  375 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 375 insertions(+), 0 deletions(-)

diff --git a/pages/business/plan/planDetails.vue b/pages/business/plan/planDetails.vue
index 02409e3..2b8ee81 100644
--- a/pages/business/plan/planDetails.vue
+++ b/pages/business/plan/planDetails.vue
@@ -1,8 +1,383 @@
 <template>
+	<view>
+		<scroll-view scroll-y="true" >
+			<view class="header">
+				<view class="detl-name">
+					<image src="../../../static/image/dingdanguanli.png" mode="aspectFit"></image>
+					<view>{{detl.name}}</view>
+				</view>
+				<view class="detl-tel">{{detl.createBy$}} | {{detl.orderId$}} | {{detl.cstmrId$}}</view>
+			</view>
+			<!-- 姝ラ鏉� -->
+			<view style="background-color: #FFF;margin-top: 10px;padding-top: 20px;padding-bottom: 20px;">
+				<uni-steps :options="list1" :active="active" />
+			</view>
+			<!-- 鍩烘湰淇℃伅 -->
+			<view class="container">
+				<view><y-title title="鍩烘湰淇℃伅"></y-title></view><view></view>
+				<view class="list-item1">瑙勫垝鍗曞彿</view><view class="list-item2">{{detl.uuid}}</view>
+				<view class="list-item1">鐢宠鏃ユ湡</view><view class="list-item2">{{detl.appleTime$}}</view>
+				<view class="list-item1">璺熻釜椤圭洰</view><view class="list-item2">{{detl.orderId$}}</view>
+				<view class="list-item1">瀹㈡埛鍚嶇О</view><view class="list-item2">{{detl.cstmrId$}}</view>
+				<view class="list-item1">涓氬姟鍛�</view><view class="list-item2">{{detl.userId$}}</view>
+				<view class="list-item1">瀹℃壒鐘舵��</view><view class="list-item2">{{detl.settle$}}</view>
+				<view class="list-item1">涓氬姟绫诲瀷</view><view class="list-item2">{{detl.planType$}}</view>
+			</view>
+			<!-- 鍏朵粬淇℃伅 -->
+
+			<view class="container">
+				<view><y-title title="鍏朵粬淇℃伅"></y-title></view><view></view>
+			</view>
+			<view class="detail-box">
+				<plan-detail :info="info"></plan-detail>
+			</view>
+			
+			
+			<!-- 鍞墠瑙勫垝 -->
+			<view class="container">
+				<view><y-title title="鍞墠瑙勫垝"></y-title></view><view></view>
+				<view class="list-item1">瑙勫垝鍛�</view><view class="list-item2">{{detl.uuid}}</view>
+				<view class="list-item1">瀹屾垚鏃堕棿</view><view class="list-item2">{{detl.finishTime$}}</view>
+				<view class="list-item1">鏇存敼鏂规</view><view class="list-item2">{{detl.change}}</view>
+				<view class="list-item1">鏇存敼娆℃暟</view><view class="list-item2">{{detl.changeTime}}</view>
+				<view class="list-item1">鏇存敼鍘熷洜</view><view class="list-item2">{{detl.changeReason}}</view>
+				<view class="list-item1">瑙勬牸濂栭噾</view><view class="list-item2">{{detl.planBonus}}</view>
+				<view class="list-item1">缁勯暱濂栭噾</view><view class="list-item2">{{detl.planLeaderBonus}}</view>
+			</view>
+			<!-- 绯荤粺淇℃伅 -->
+			<view class="container">
+				<view><y-title title="绯荤粺淇℃伅"></y-title></view><view></view>
+				<view class="list-item1">娣诲姞浜哄憳</view><view class="list-item2">{{detl.createBy$}}</view>
+				<view class="list-item1">娣诲姞鏃堕棿</view><view class="list-item2">{{detl.createTime$}}</view>
+				<view class="list-item1">淇敼浜哄憳</view><view class="list-item2">{{detl.updateBy$}}</view>
+				<view class="list-item1">淇敼鏃堕棿</view><view class="list-item2">{{detl.updateTime$}}</view>
+			</view>
+		</scroll-view>
+		
+		<view>
+			<!-- 杈撳叆妗嗙ず渚� -->
+			<uni-popup ref="inputDialog" type="dialog">
+				<uni-popup-dialog ref="inputClose" mode="input" title="娣诲姞璺熻繘浜�" value="瀵硅瘽妗嗛缃彁绀哄唴瀹�!"
+					placeholder="璇疯緭鍏ュ唴瀹�" @confirm="confirm">
+						<uni-combox :candidates="addFollower.followers" placeholder="璇烽�夋嫨"
+						v-model="addFollower.follower" @input="autoLoad('follower',addFollower.follower)"></uni-combox>
+				</uni-popup-dialog>
+			</uni-popup>
+		</view>
+	</view>
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				id: 0,
+				detl: {
+					id: '',
+					name: '',
+					tel: '',
+					addr: '',
+					cstman: ''
+				},
+				addFollower: {
+					follower: '',
+					followers: '',
+					followerList: []
+				},
+				followers: [],
+				cstmrId: '',
+				active: 0,
+				list1: [{
+					title: '寮�濮�',
+					desc: ''
+				}, {
+					title: '缁勯暱瀹℃牳',
+					desc: ''
+				}, {
+					title: '鍞墠瀹℃牳',
+					desc: ''
+				}, {
+					title: '瑙勫垝鍛樺鏍�',
+					desc: ''
+				},{
+					title: '瀹℃牳閫氳繃',
+					desc: ''
+				}],
+				info: []
+			}
+		},
+		onLoad(option) { 
+			this.id = option.id
+			this.init()
+			this.autoLoad('follower','')
+			setTimeout(()=>{
+				// this.getFollowers()
+			},500)
+		},
+		methods: {
+			init() {
+				let that = this
+				that.info = []
+				uni.request({
+					url: that.baseUrl + '/plan/' + that.id +'/auth',
+					header: {'token' : uni.getStorageSync('token')},
+					method: 'GET',
+					success(res) {
+						console.log(res);
+						res = res.data
+						that.detl = res.data
+						that.active = res.data.settle
+						if (res.data.planType == 4) {
+							that.info.push(
+							{name:'璐х墿瑙勬牸',val:res.data.input_1},
+							{name:'璐х墿閲嶉噺',val:res.data.input_2},
+							{name:'浠撳簱娓╁害',val:res.data.input_6},
+							{name:'椤堕儴鏈�浣庣偣绂诲湴璺濈',val:res.data.input_8},
+							{name:'杩涘弶鏂瑰悜',val:res.data.input_4},
+							{name:'鍘傛埧鍙敤楂樺害',val:res.data.input_5},
+							{name:'閫氶亾澶у皬鏈夋棤瑕佹眰',val:res.data.input_7},
+							{name:'骞冲簱璐ф灦绫诲瀷',val:res.data.select_2},
+							{name:'鏄惁闇�瑕佽法姊�',val:res.data.radio_1 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鏄惁闇�瑕佺綉灞傛澘',val:res.data.radio_2 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鏄惁闇�瑕佸眰鏉�',val:res.data.radio_8 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍦伴潰鏈夋棤鐢电紗娌�',val:res.data.radio_3 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍦伴潰骞虫暣搴﹀拰鍦伴潰娌夐檷鏄惁婊¤冻鏍囧噯',val:res.data.radio_5 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'甯冨眬鍖哄煙鏄惁鎻愪緵CAD鍦哄湴鍥剧焊/鍦哄湴',val:res.data.radio_7 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍏朵粬瑕佹眰鍙婃敞鎰忕偣',val:res.data.textarea_2 ? res.data.textarea_2 : '--'},
+							)
+						} else if(res.data.planType == 5) {
+							that.info.push(
+							{name:'璐х墿瑙勬牸',val:res.data.input_2},
+							{name:'璐х墿閲嶉噺',val:res.data.input_5},
+							{name:'鍘傛埧鍙敤楂樺害',val:res.data.input_4},
+							{name:'椤堕儴鏈�浣庣偣绂诲湴璺濈',val:res.data.input_9},
+							{name:'杩涘弶鏂瑰悜',val:res.data.input_3},
+							{name:'浠撳簱娓╁害',val:res.data.input_7},
+							{name:'鎶楅渿璁鹃槻鐑堝害',val:res.data.input_6},
+							{name:'鍩烘湰鍦伴渿鍔犻�熷害',val:res.data.input_11},
+							{name:'瀹㈡埛鎶�鏈鎺ヨ仈绯绘柟寮忥紙閫夊~锛�',val:res.data.input_8},
+							{name:'绔嬩綋搴撹揣鏋剁被鍨�',val:res.data.select_3},
+							{name:'鏄惁鏈夋秷闃茶姹�',val:res.data.radio_5 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍚﹂渶瑕佽揣鏋惰儗缃�',val:res.data.radio_8 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍦伴潰鏈夋棤鐢电紗娌�',val:res.data.radio_7 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'甯冨眬鍖哄煙鏄惁鎻愪緵CAD鍦哄湴鍥剧焊/鍦哄湴',val:res.data.radio_6 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍦伴潰骞虫暣搴﹀拰鍦伴潰娌夐檷鏄惁婊¤冻鏍囧噯',val:res.data.radio_10 == 'value1' ? '鏄�' : '鍚�'},
+							{name:'鍏朵粬瑕佹眰鍙婃敞鎰忕偣',val:res.data.textarea_2 ? res.data.textarea_2 : '--'},
+							)
+						}
+						// that.cstmrId = that.cstmr.id
+					}
+				})
+			},
+			del(e) {
+				let that = this
+				e = Number(e)
+				uni.request({
+					url: that.baseUrl + '/detl/delete/one/' + e,
+					header: {'token' : uni.getStorageSync('token'),
+					},
+					method: 'GET',
+					
+					success(res) {
+						console.log(res);
+						res = res.data
+						if (res.code === 200) {
+							uni.navigateBack()
+						} else if (res.code === 403) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'})
+							setTimeout(() => {
+								uni.reLaunch({
+									url: '../../login/login'
+								});
+							}, 1000);
+						} else {
+							uni.showToast({title: res.msg, icon: "none",position: 'top'})
+						}
+					}
+				})
+			},
+			addPerson() {
+				this.$refs.inputDialog.open()
+			},
+			// 纭閫夋嫨宸ヤ綔浜�
+			confirm() {
+				let that = this
+				var followerId
+				var followerList = that.addFollower.followerList
+				for (var i = 0;i < followerList.length; i++) {
+					if (followerList[i].name == this.addFollower.follower) {
+						followerId =followerList[i].value
+					}
+				}
+				uni.request({
+					url: that.baseUrl + '/detl/followers/add/json',
+					header:{'token':uni.getStorageSync('token'),
+						// 'content-type':'application/x-www-form-urlencoded',
+						},
+					data: {
+						cstmrId: that.cstmrId,
+						followerIds:followerId},
+					method: 'POST',
+					success(result) {
+						var res = result.data
+						that.getFollowers()
+					}
+				})
+				this.addFollower.follower = ''
+			},
+			// 宸ヤ綔浜哄垪琛�
+			autoLoad(type,condition) {
+				let that = this
+				that.addFollower.followers = []
+				that.addFollower.followerList = []
+				uni.request({
+					url: that.baseUrl + '/user/all/get/kv',
+					header:{'token':uni.getStorageSync('token')},
+					data: {condition:condition},
+					method: 'POST',
+					success(result) {
+						var res = result.data
+						if (res.code === 200) {
+							var element;
+							if (type == 'follower') {
+								for(element of res.data) {
+									that.addFollower.followers.push(element.name)
+									that.addFollower.followerList.push(element)
+								}
+								return
+							}
+						}
+					}
+				})
+			},
+			getFollowers() {
+				let that = this
+				uni.request({
+					url: that.baseUrl + '/detl/followers/table/auth',
+					header:{'token':uni.getStorageSync('token')},
+					data: {cstmrId:that.cstmrId},
+					method:'GET',
+					success(res) {
+						res = res.data
+						that.followers = res.data
+					}
+				})
+			},
+			removeFollowers(userId) {
+				let that = this
+				uni.request({
+					url: that.baseUrl + '/cstmr/followers/remove/auth',
+					header:{
+						'token':uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					data: {
+						cstmrId:that.cstmrId,
+						userId: userId
+						},
+					method:'POST',
+					success(res) {
+						res = res.data
+						that.getFollowers()
+					}
+				})
+			}
+		}
+	}
 </script>
 
 <style>
+	.header {
+		width: auto;
+		min-height: 110rpx;
+		background-color: #fff;
+		padding: 30px 20px 10px 20px;
+	}
+	.detl-name {
+		display: flex;
+		height: 35rpx;
+		line-height: 35rpx;
+		text-indent: 10rpx;
+		font-size: 36rpx;
+		color: #606266;
+	}
+	.detl-name image {
+		width: 35rpx;
+		height: 35rpx;
+	}
+	.detl-tel {
+		min-height: 60rpx;
+		line-height: 60rpx;
+		font-size: 24rpx;
+		color: #303133;
+	}
+	.container {
+		margin-top: 10px;
+		padding: 10rpx 20rpx 0 20rpx;
+		background-color: #fff;
+		display: grid;
+		grid-template-columns: 1fr 3fr;
+	}
+	.container:last-child {
+		/* grid-template-columns: 5fr 5fr 2fr; */
+		margin-bottom: 120rpx;
+	}
+	.list-item1 {
+		min-height: 45rpx;
+		line-height: 45rpx;
+		color: #909399;
+		text-indent: 30rpx;
+	}
+	.list-item2 {
+		min-height: 45rpx;
+		line-height: 45rpx;
+		color: black;
+	}
+	.color-main {
+		color: #55aaff
+	}
+	.foot {
+		position: fixed;
+		width: 100%;
+		min-height: 100rpx;
+		bottom: 0;
+		margin-bottom: 0;
+		background-color: #fff;
+		border-top: 1px solid #efefef;
+		display: flex;
+		align-items: center;
+	}
+	.list {
+		min-height: 60rpx;
+		margin-top: 20rpx;
+		grid-column: 1 / 10;
+		display: grid;
+		grid-template-columns: 1fr 1fr;
+		position: relative;
+	}
+	.list-left {
+		min-height: 60rpx;
+		line-height: 60rpx;
+		padding-left: 20rpx;
+		color: #55aaff
+	}
+	.list-right {
+		min-height: 60rpx;
+		line-height: 60rpx;
+		/* background-color: #222; */
+		padding-right: 30rpx;
+	}
+	.list-none {
+		min-height: 60rpx;
+		margin-top: 20rpx;
+		text-align: center;
+		/* background-color: #303133; */
+		color: #b1b3b8;
+		grid-column: 1 / 10;
+		display: grid;
+		position: relative;
+	}
+	.detail-box {
+		background-color: #fff;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1