From 86eb96901916b29f7cec87de88b9aefc77fcbcbf Mon Sep 17 00:00:00 2001
From: li-guang <153605324@qq.com>
Date: Thu, 07 Jan 2021 19:10:57 +0800
Subject: [PATCH] 忘记密码,跟进记录

---
 hive-app/pages/mine/setting.vue                      |    4 
 hive-app/App.vue                                     |    2 
 hive-app/pages.json                                  |   11 +
 hive-app/pages/workbench/followRecords/index.vue     |  102 ++------------
 hive-app/pages/mine/changePassword.vue               |   68 +++++++++
 hive-app/pages/workbench/followRecords/addRecord.vue |   76 ++++++++++
 hive-app/pages/workbench/followRecords/filter.vue    |  130 ++++++++++++++++++
 7 files changed, 305 insertions(+), 88 deletions(-)

diff --git a/hive-app/App.vue b/hive-app/App.vue
index e3d970c..fa35cba 100644
--- a/hive-app/App.vue
+++ b/hive-app/App.vue
@@ -23,5 +23,5 @@
 	/*每个页面公共css */
 @import url("./common/styles/index");
 @import url("./static/iconfont/iconfont.css");
-@import url("//at.alicdn.com/t/font_2263696_23nguodii0y.css");
+@import url("//at.alicdn.com/t/font_2263696_ghdgvj09btt.css");
 </style>
diff --git a/hive-app/pages.json b/hive-app/pages.json
index 84b86aa..3a05a9f 100644
--- a/hive-app/pages.json
+++ b/hive-app/pages.json
@@ -663,6 +663,17 @@
 					"scrollIndicator": "none"
 				}
 			}
+		},
+		{
+			"path": "pages/mine/changePassword",
+			"style": {
+				"navigationBarTitleText": "修改密码",
+				"navigationBarBackgroundColor":"#FFFFFF",
+				"navigationBarTextStyle":"black",
+				"app-plus":{ 
+					"scrollIndicator": "none"
+				}
+			}
 		}
 	],
 	"globalStyle": {
diff --git a/hive-app/pages/mine/changePassword.vue b/hive-app/pages/mine/changePassword.vue
new file mode 100644
index 0000000..a2d56cd
--- /dev/null
+++ b/hive-app/pages/mine/changePassword.vue
@@ -0,0 +1,68 @@
+<template>
+	<!-- 修改密码 -->
+	<view class="container">
+		<view class="mt-30">
+			<input placeholder="旧密码" type="password" v-model="oldPassword" placeholder-class="placeholder" class="input-group-row"/>
+			<input placeholder="新密码" type="password" v-model="newPassword" placeholder-class="placeholder" class="input-group-row"/>
+			<input placeholder="确认密码" type="password" v-model="password" placeholder-class="placeholder" class="input-group-row"/>
+		</view>
+		<button :disabled="isDisabled" class="blue-btn btn" @click="change">确认修改</button>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				oldPassword:'',
+				newPassword:'',
+				password:'',
+				isDisabled:false
+			}
+		},
+		methods:{
+			valid(){
+				if(!this.oldPassword.trim()){
+					this.$toast.info('请输入旧密码');
+					return false;
+				}
+				if(!this.newPassword.trim()){
+					this.$toast.info('请输入新密码');
+					return false;
+				}
+				if(this.newPassword.trim()!==this.password.trim()){
+					this.$toast.info('两次密码不一致');
+					return false;
+				}
+			},
+			change(){
+				if(this.valid() === false){
+					return;
+				}
+				this.isDisabled = true;
+				this.$httpUtils.request('/api/user/modifyPwd',{
+					oldPwd: this.oldPassword.trim(),
+					newPwd: this.newPassword.trim()
+				},'post').then((res)=>{
+					if(res.status == 200){
+						this.$toast.info(res.info);
+						uni.navigateBack();
+						this.isDisabled = false;
+					}
+				}).catch((err) => {
+					this.$toast.info(res.info);
+					this.isDisabled = false;
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	.container{
+		padding: 0 30px;
+	}
+	.btn{
+		margin-top: 40px;
+	}
+</style>
diff --git a/hive-app/pages/mine/setting.vue b/hive-app/pages/mine/setting.vue
index 24e8814..510045c 100644
--- a/hive-app/pages/mine/setting.vue
+++ b/hive-app/pages/mine/setting.vue
@@ -1,10 +1,10 @@
 <template>
 	<!-- 设置 -->
 	<view class="container">
-		<view class="flex justify-between content-row mb-20">
+		<navigator url="./changePassword" hover-class="none" class="flex justify-between content-row mb-20">
 			<text class="font-16">修改登录密码</text>
 			<text class="iconfont iconarrow-backimg gray"></text>
-		</view>
+		</navigator>
 		<button class="blue-btn" @click="loginOut" v-if="isLogin==1">退出登录</button>
 	</view>
 </template>
diff --git a/hive-app/pages/workbench/followRecords/addRecord.vue b/hive-app/pages/workbench/followRecords/addRecord.vue
index 48d48ea..a8a5d54 100644
--- a/hive-app/pages/workbench/followRecords/addRecord.vue
+++ b/hive-app/pages/workbench/followRecords/addRecord.vue
@@ -1,8 +1,84 @@
 <template>
+	<view class="font-14 container">
+		<view class="content-row">
+			<view>
+				<input placeholder="请填写跟进记录" placeholder-class="placeholder font-14"/>
+			</view>
+			<view class="mt-15">
+				<view class="add-img">
+					<text class="iconfont iconxiangji gray icon"></text>
+				</view>
+			</view>
+		</view>
+		<view class="content-row flex align-center justify-between">
+			<text>客户</text>
+			<navigator url="../../member/selectCustomer" hover-class="none" class="gray flex align-center">
+				<text>刘亦菲</text>
+				<text class="iconfont iconarrow-backimg"></text>
+			</navigator>
+		</view>
+		<view class="content-row flex align-center justify-between">
+			<text>相关订单</text>
+			<navigator url="../../member/selectCustomer" hover-class="none" class="gray flex align-center">
+				<text>水光面膜等三件产品</text>
+				<text class="iconfont iconarrow-backimg"></text>
+			</navigator>
+		</view>
+		<view class="content-row flex align-center justify-between">
+			<text>下次跟进提醒</text>
+			<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+				<view class="gray flex align-center">
+					<text>请选择</text>
+					<text class="iconfont iconarrow-backimg"></text>
+				</view>
+			</picker>
+		</view>
+		<view class="content-row flex align-center justify-between">
+			<text>设置可见范围</text>
+			<view>
+				<radio-group name="privacy" @change="privacyChange">
+					<label class="mr-20"><radio value="公共" color="#518EFF"  class="radio" :checked="sex==='公共'"/>公开</label>
+					<label><radio value="私人" color="#518EFF" class="radio" :checked="sex==='私人'"/>仅自己可见</label>
+				</radio-group>
+			</view>
+		</view>
+		<button class="blue-btn sticky-footer">提交跟进</button>
+	</view>
 </template>
 
 <script>
+	export default{
+		data(){
+			return{
+				privacy: '私人',
+			}
+		},
+		methods:{
+			privacyChange(e){
+				this.privacy = e.detail.value;
+			}
+		}
+	}
 </script>
 
 <style>
+	.container{
+		padding: 0 10px;
+	}
+	.content-row{
+		border-bottom: 1px solid #EDEAF4;
+		padding: 15px 0;
+	}
+	.add-img{
+		width: 40px;
+		height: 40px;
+		border: 1px solid #EDEAF4;
+		padding: 10px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	.icon{
+		font-size: 30px;
+	}
 </style>
diff --git a/hive-app/pages/workbench/followRecords/filter.vue b/hive-app/pages/workbench/followRecords/filter.vue
new file mode 100644
index 0000000..39e1745
--- /dev/null
+++ b/hive-app/pages/workbench/followRecords/filter.vue
@@ -0,0 +1,130 @@
+<template>
+	<!-- 弹窗 -->
+	<uni-popup ref="popup" type="top">
+		<view class="popup-container" :style="{'height':windowHeight}">
+			<view class="popup-content">
+				<view class="filter-content-time">
+					<text>开始时间</text>
+					<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+						<view class="gray flex align-center">
+							<text>请选择</text>
+							<text class="iconfont iconarrow-backimg"></text>
+						</view>
+					</picker>
+				</view>
+				<view class="filter-content-time">
+					<text>结束时间</text>
+					<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+						<view class="gray flex align-center">
+							<text>请选择</text>
+							<text class="iconfont iconarrow-backimg"></text>
+						</view>
+					</picker>
+				</view>
+				<view class="filter-content-row">
+					<view>
+						<text>客户</text>
+					</view>
+					<view class="img-box">
+						<image class="header-img mr-20" src="../../../static/images/default-avatar.png"></image>
+						<navigator url="../../member/selectCustomer" hover-class="none">
+							<text class="iconfont iconjia gray-outline-btn-circle ml-5"></text>
+						</navigator>
+					</view>
+				</view>
+				<view class="filter-content-row">
+					<view>
+						<text>员工</text>
+					</view>
+					<view class="img-box">
+						<image class="header-img mr-20" src="../../../static/images/default-avatar.png"></image>
+						<navigator url="../../manager/selectEmployee" hover-class="none">
+							<text class="iconfont iconjia gray-outline-btn-circle ml-5"></text>
+						</navigator>
+					</view>
+				</view>
+			</view>
+			<view class="btn-group">
+				<button class="white-btn flex-1">重置</button>
+				<button class="blue-btn flex-1 ml-10">确定</button>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import uniPopup from '../../../components/uni-popup/uni-popup'
+	import DateTimePicker from '../../../components/bory-dateTimePicker/bory-dateTimePicker.vue'
+	export default {
+		components: {
+			uniPopup,
+			DateTimePicker
+		},
+		data() {
+			return{
+				windowHeight: "200px",
+			}
+		},
+		props:{
+			isShow: {
+				default: false
+			}
+		},
+		watch:{
+			isShow(newVal){
+				if(newVal){
+					this.$refs.popup.open()
+				}else{
+					this.$refs.popup.close()
+				}
+			}
+		},
+		mounted() {
+			uni.getSystemInfo({
+			    success: (res) => {
+			        this.windowHeight = res.windowHeight+"px";
+			} })
+		},
+		methods:{
+			showTime () {
+				this.$refs['date-time'].show();
+			}
+		}
+	}
+</script>
+
+<style>
+	.popup-container{
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		background: #FFFFFF;
+		padding: 0 10px;
+	}
+	.filter-content-time{
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		border-bottom: 1px solid #EDEAF4;
+		padding: 10px 0;
+	}
+	.filter-content-row{
+		padding: 10px 0;
+		border-bottom: 1px solid #EDEAF4;
+	}
+	.img-box{
+		display: flex;
+		align-items: center;
+		padding: 0 10px;
+		margin-top: 10px;
+	}
+	.header-img{
+		width: 45px;
+		height: 45px;
+		border-radius: 50%;
+	}
+	.btn-group{
+		display: flex;
+		margin: 20px 0;
+	}
+</style>
diff --git a/hive-app/pages/workbench/followRecords/index.vue b/hive-app/pages/workbench/followRecords/index.vue
index 298fed6..5aec9b2 100644
--- a/hive-app/pages/workbench/followRecords/index.vue
+++ b/hive-app/pages/workbench/followRecords/index.vue
@@ -16,51 +16,7 @@
 				@tabClick="tabClick($event)"
 			/>
 		</view>
-		<view v-if="isShow" class="filter-content font-14">
-			<view class="filter-content-time">
-				<text>开始时间</text>
-				<view class="gray flex align-center" @click="showTime()">
-					<text>请选择</text>
-					<text class="iconfont iconarrow-backimg"></text>
-				</view>
-				<date-time-picker ref='date-time' type='datetime' @change='dateTimeChange'></date-time-picker>
-			</view>
-			<view class="filter-content-time">
-				<text>结束时间</text>
-				<view class="gray flex align-center" @click="showTime()">
-					<text>请选择</text>
-					<text class="iconfont iconarrow-backimg"></text>
-				</view>
-				<date-time-picker ref='date-time' type='datetime' @change='dateTimeChange'></date-time-picker>
-			</view>
-			<view class="filter-content-row">
-				<view>
-					<text>客户</text>
-				</view>
-				<view class="img-box">
-					<image class="header-img mr-20" src="../../../static/images/default-avatar.png"></image>
-					<navigator url="../../member/selectCustomer" hover-class="none">
-						<text class="iconfont iconjia gray-outline-btn-circle ml-5"></text>
-					</navigator>
-				</view>
-			</view>
-			<view class="filter-content-row">
-				<view>
-					<text>员工</text>
-				</view>
-				<view class="img-box">
-					<image class="header-img mr-20" src="../../../static/images/default-avatar.png"></image>
-					<navigator url="../../manager/selectEmployee" hover-class="none">
-						<text class="iconfont iconjia gray-outline-btn-circle ml-5"></text>
-					</navigator>
-				</view>
-			</view>
-			<view class="flex sticky-footer">
-				<button class="white-btn flex-1">重置</button>
-				<button class="blue-btn flex-1 ml-10">确定</button>
-			</view>
-		</view>
-		<view v-else class="content-row font-14" v-for="item in 2">
+		<view class="content-row font-14" v-for="item in 2">
 			<view class="flex align-center">
 				<image class="header-img" src="../../../static/images/default-avatar.png"></image>
 				<view class="flex flex-v ml-10">
@@ -71,8 +27,8 @@
 			<view class="mt-10">
 				<text>截图服务了杨姐,她的面部比较干燥暗沉色斑较多,约下次来做一个面部护理</text>
 			</view>
-			<view class="mt-10 flex">
-				<image v-for="(item,index) in imgList" @click="previewImg(item.imgurl)" class="content-img mr-10" :src="item.imgurl"></image>
+			<view class="mt-10 flex" :start="num">
+				<image v-for="(item,index) in imgList" @click="previewImg(index)" class="content-img mr-10" :src="item"></image>
 			</view>
 			<view class="flex align-center justify-between mt-5">
 				<text>客户:杨依依</text>
@@ -96,6 +52,7 @@
 				<text>李贝: 好的,继续跟进</text>
 			</view>
 		</view>
+		<fillter :isShow="isShowFilter" @change="changeFilter"></fillter>
 		<view v-show="messageShow" class="message-row">
 			<input type="text" cursor-spacing="10" :focus="messageShow" class="message-input" placeholder="评论" placeholder-class="placeholder"/>
 			<button class="green-btn message-btn">发送</button>
@@ -105,11 +62,11 @@
 
 <script>
 	import HTabs from "@/components/liuyuno-tabs/liuyuno-tabs.vue";
-	import DateTimePicker from '../../../components/bory-dateTimePicker/bory-dateTimePicker.vue'
+	import fillter from './filter'
 	export default {
 		components: {
 		    HTabs,
-			DateTimePicker
+			fillter
 		},
 		data() {
 		  return {
@@ -128,21 +85,24 @@
 				}
 			],
 			imgList:[
-				{'imgurl':'../../../static/images/banner.jpg'},
-				{'imgurl':'../../../static/images/product.jpg'}
+				'../../../static/images/banner.jpg',
+				'../../../static/images/product.jpg'
 			],
-			isShow:false,
 			messageShow:false,
+			isShowFilter: false,
+			num:0
 		  }  
 		},
 		methods:{
 			// 预览图片
-			previewImg(image) {
-				let imgArr=[]
-				imgArr[0]=image
+			previewImg(index) {
+				// let imgArr=[]
+				// imgArr.push(image)
 				//预览图片
 				uni.previewImage({
-					urls: imgArr
+					urls: this.imgList,
+					indicator:'default',
+					loop:true
 				})
 			},
 			onNavigationBarButtonTap(e){
@@ -152,11 +112,8 @@
 					})
 				}
 				if(e.width && e.index==1){
-					this.isShow=!this.isShow
+					this.isShowFilter = !this.isShowFilter;
 				}
-			},
-			showTime () {
-				this.$refs['date-time'].show();
 			},
 			showMessage(){
 				this.messageShow=!this.messageShow
@@ -190,31 +147,6 @@
 		line-height: 20px;
 		background: #F6F6F8;
 		padding: 5px;
-		margin-top: 10px;
-	}
-	.filter-content{
-		position: fixed;
-		left: 0;
-		right: 0;
-		height: 100%;
-		background: #FFFFFF;
-		padding: 0px 10px;
-	}
-	.filter-content-time{
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		border-bottom: 1px solid #EDEAF4;
-		padding: 10px 0;
-	}
-	.filter-content-row{
-		padding: 10px 0;
-		border-bottom: 1px solid #EDEAF4;
-	}
-	.img-box{
-		display: flex;
-		align-items: center;
-		padding: 0 10px;
 		margin-top: 10px;
 	}
 	.message-row{

--
Gitblit v1.9.1