Эх сурвалжийг харах

feat:分组页面调整

zhanghui 2 жил өмнө
parent
commit
94e120ec4c

+ 1 - 1
common/js/user.js

@@ -2,7 +2,7 @@ import request from '../js/request.js';
 
 
 export default {
-    //账号密码登录
+    //获取用户信息
     getUserInfo() {
         return request({
             url: '/member/wechat/getUser',

+ 17 - 0
pages.json

@@ -138,6 +138,23 @@
 				"navigationStyle": "custom",
 				"enablePullDownRefresh" : false
 			}
+		},
+		{
+			"path" : "pages/groupDetail/groupDetail",
+			"style" :
+			{
+				"navigationStyle": "custom",
+//				"navigationBarTitleText" : "",
+				"enablePullDownRefresh" : false
+			}
+		},
+		{
+			"path" : "pages/updateGroup/updateGroup",
+			"style" :
+			{
+				"navigationStyle": "custom",
+				"enablePullDownRefresh" : false
+			}
 		}
 	],
 	"tabBar": {

+ 2 - 54
pages/addGroup/addGroup.vue

@@ -24,63 +24,13 @@
 							</view>
 						</view>
 					</u-form-item>
-
-					<u-form-item prop="userInfo.sex" borderBottom>
-						<view class="item">
-							<text class="key">分组成员</text>
-							<view class="flex-row input" @click="openSelectMember">
-								<u--input disabled placeholder="请选择分组成员" border="none"></u--input>
-								<u-icon name="arrow-right"></u-icon>
-							</view>
-						</view>
-					</u-form-item>
-
 				</u--form>
 
-				<view class="members">
-					<view class="membersTitle ">
-						<text>已选择的分组成员</text>
-					</view>
-					<scroll-view scroll-y class="scroll-y" >
-					<view class="flex-row justify-between member" v-for="item in 10">
-						<view class="flex-row">
-							<u-icon name="account-fill" size="24"></u-icon>
-							<text class="name">张三</text>
-						</view>
-						<view>
-							<u-icon name="trash" size="24"></u-icon>
-						</view>
-					</view>
-					</scroll-view>
-
-				</view>
-
 		</view>
 		<view class="addGroup">
-			<text>提交</text>
+			<text>新增</text>
 		</view>
 
-		<uni-popup ref="selectMemberPopup" type="bottom">
-			<view class="selectMemberPopup">
-				<view class="flex-row justify-around popupTitle">
-					<text @click="closePopup('selectMemberPopup')">取消</text>
-					<text>选择分组负责人</text>
-					<text>确定</text>
-				</view>
-				<view class="scroll-y-view">
-					<scroll-view scroll-y class="scroll-y1" >
-						<view class="flex-row justify-between member" v-for="item in 10">
-							<view class="flex-row">
-								<text class="name">张三</text>
-								<text class="name">1736500000</text>
-							</view>
-							<u-icon name="checkbox-mark" color="#FFE05C" size="24"></u-icon>
-						</view>
-					</scroll-view>
-				</view>
-
-			</view>
-		</uni-popup>
 
 		<uni-popup ref="selectPersonPopup" type="bottom">
 			<view class="selectMemberPopup">
@@ -139,9 +89,7 @@
 					delta: 1
 				})
 			},
-			openSelectMember(){
-				this.$refs.selectMemberPopup.open()
-			},
+
 
 			openSelectPerson(){
 				this.$refs.selectPersonPopup.open()

+ 132 - 0
pages/groupDetail/groupDetail.vue

@@ -0,0 +1,132 @@
+<template>
+	<view class="page">
+		<uni-nav-bar :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true" left-icon="left"
+					 title="分组详情" @clickLeft="back" />
+		<view>
+
+			<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm">
+
+				<u-form-item prop="groupName" borderBottom>
+					<view class="item">
+						<view class="flex-row input">
+							<text class="key">分组名称:</text>
+							<u--input disabled v-model="form.groupName" placeholder="请输入分组名称" border="none"></u--input>
+						</view>
+					</view>
+				</u-form-item>
+
+				<u-form-item prop="userInfo.sex" borderBottom>
+					<view class="item">
+						<view class="flex-row input">
+							<text class="key">负责人:</text>
+							<u--input disabled placeholder="请选择负责人" border="none"></u--input>
+						</view>
+					</view>
+				</u-form-item>
+
+				<u-form-item prop="userInfo.sex" borderBottom>
+					<view class="item">
+						<view class="flex-row input" @click="openSelectMember">
+							<text class="key">分组成员:</text>
+							<u--input disabled placeholder="请选择分组成员" border="none"></u--input>
+							<u-icon name="arrow-right"></u-icon>
+						</view>
+					</view>
+				</u-form-item>
+
+			</u--form>
+
+			<view class="members">
+				<view class="membersTitle ">
+					<text>已选择的分组成员</text>
+				</view>
+				<scroll-view scroll-y class="scroll-y" >
+					<view class="flex-row justify-between member" v-for="item in 10">
+						<view class="flex-row">
+							<u-icon name="account-fill" size="24"></u-icon>
+							<text class="name">张三</text>
+						</view>
+						<view>
+							<u-icon name="trash" size="24"></u-icon>
+						</view>
+					</view>
+				</scroll-view>
+
+			</view>
+
+		</view>
+		<view class="addGroup">
+			<text>提交</text>
+		</view>
+
+		<uni-popup ref="selectPersonPopup" type="bottom">
+			<view class="selectMemberPopup">
+				<view class="flex-row justify-around popupTitle">
+					<text @click="closePopup">取消</text>
+					<text>选择分组成员</text>
+					<text>确定</text>
+				</view>
+				<view class="scroll-y-view">
+					<scroll-view scroll-y class="scroll-y1" >
+						<view class="flex-row justify-between member" v-for="item in 10">
+							<view class="flex-row">
+								<text class="name">张三</text>
+								<text class="name">1736500000</text>
+							</view>
+							<u-icon name="checkbox-mark" color="#FFE05C" size="24"></u-icon>
+						</view>
+					</scroll-view>
+				</view>
+
+			</view>
+		</uni-popup>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {
+
+		},
+		data() {
+			return {
+				height: '',
+				form:{
+					groupName:''
+				},
+				rules: {
+					'groupName': {
+						type: 'string',
+						required: true,
+						min:1,
+						message: '请输入分组名称',
+						trigger: ['blur', 'change']
+					}
+				},
+			}
+		},
+		onLoad(e) {
+			let sysInfo = uni.getSystemInfoSync()
+			this.height = sysInfo.windowHeight - 120 + 'px' //除标题栏栏外的屏幕可用高度
+		},
+		methods: {
+			back() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			openSelectMember(){
+				this.$refs.selectPersonPopup.open()
+			},
+			closePopup(){
+				this.$refs.selectPersonPopup.close()
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import './index.rpx.css';
+</style>

+ 70 - 0
pages/groupDetail/index.rpx.css

@@ -0,0 +1,70 @@
+.page {
+	background: #F7F7F7;
+	padding: 0 32rpx;
+	height: 100vh;
+}
+.addGroup{
+	width: 686rpx;
+	height: 84rpx;
+	background: #FFE05C;
+	border-radius: 54rpx;
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 84rpx;
+	text-align: center;
+	margin-top: 24rpx;
+}
+.item{
+	width: 686rpx;
+}
+.key{
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 60rpx;
+}
+.input{
+
+}
+.scroll-y{
+	height: 600rpx;
+}
+.members{
+	background: #FAFAFA;
+	border-radius: 16rpx;
+	margin-top: 32rpx;
+	padding: 24rpx;
+}
+.member{
+	padding: 32rpx;
+	border-top: 2rpx solid #EEEEEE;
+}
+.member:first-child{
+	border-top: 2rpx solid #FAFAFA;
+}
+.membersTitle{
+	font-size: 28rpx;
+	font-weight: bold;
+	color: #333333;
+}
+.name{
+	height: 40rpx;
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 40rpx;
+	margin-left: 20rpx;
+}
+.selectMemberPopup{
+	height: 800rpx;
+	background: #FFFFFF;
+	border-top-left-radius: 24rpx;
+	border-top-right-radius: 24rpx;
+}
+.popupTitle{
+	line-height: 100rpx;
+}
+.scroll-y1{
+	height: 650rpx;
+}

+ 4 - 3
pages/index/index.vue

@@ -2,9 +2,10 @@
 	<view class="page">
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"   title="首页"  />
 		<manager :height="height" v-if="userInfo.isManager === 1"></manager>
-		<attach :height="height" v-else></attach>
-<!--		<button @click="wechatPay">调起支付测试按钮</button>-->
-
+		<attach :height="height" v-if="userInfo.isManager === 0 && userInfo.roleTag == '0'"></attach>
+		<view  v-if="userInfo.isManager === 0 && userInfo.roleTag == '1'">
+			<text>合作伙伴</text>
+		</view>
 	</view>
 </template>
 

+ 16 - 16
pages/my/my.vue

@@ -7,7 +7,7 @@
 			<view class="flex-col justify-evenly useMsg">
 				<view class="flex-row">
 					<text class="name">{{userInfo.name}}</text>
-					<view class="tag">{{userInfo.isManager === 1? '拓客经理':'拓客专员'}}</view>
+					<view class="tag">{{userInfo.isManager === 1? '拓客经理': userInfo.roleTag == '0' ? '拓客专员':'合作伙伴'}}</view>
 				</view>
 				<view>
 					<text class="phone">电话:{{userInfo.phone}}</text>
@@ -26,15 +26,15 @@
 						<text class="statisticsValue">300</text>
 					</view>
 				</view>
-<!--				<view class="flex-row justify-center out leftBorder">-->
-<!--					<view class="flex-col statisticsItem " @click="navigateTo('/pages/cooperation/cooperation')">-->
-<!--						<view>-->
-<!--							<image src="/static/my/hezuohuoban.png" class="statisticsImg"></image>-->
-<!--						</view>-->
-<!--						<text class="statisticsKey">合作伙伴(人)</text>-->
-<!--						<text class="statisticsValue">300</text>-->
-<!--					</view>-->
-<!--				</view>-->
+				<view class="flex-row justify-center out leftBorder">
+					<view class="flex-col statisticsItem " @click="navigateTo('/pages/cooperation/cooperation')">
+						<view>
+							<image src="/static/my/hezuohuoban.png" class="statisticsImg"></image>
+						</view>
+						<text class="statisticsKey">合作伙伴(人)</text>
+						<text class="statisticsValue">300</text>
+					</view>
+				</view>
 			</view>
 
 			<view class="flex-row justify-around " v-else>
@@ -59,12 +59,12 @@
 			</view>
 		</view>
 
-<!--		<view class="flex-col justify-start list">-->
-<!--			<uni-list :border="false">-->
-<!--				<uni-list-item v-if="userInfo.isManager == 1"  :clickable="true" title="我的分组" to="/pages/myGroup/myGroup" showArrow thumb="/static/my/fenzu.png" thumb-size="sm" rightText=""/>-->
-<!--				<uni-list-item v-if="userInfo.isManager == 1"  :clickable="true" title="购买优惠券" to="/pages/purchaseCoupon/purchaseCoupon" showArrow thumb="/static/my/coupon.png" thumb-size="sm" rightText=""/>-->
-<!--			</uni-list>-->
-<!--		</view>-->
+		<view class="flex-col justify-start list">
+			<uni-list :border="false">
+				<uni-list-item v-if="userInfo.isManager == 1"  :clickable="true" title="我的分组" to="/pages/myGroup/myGroup" showArrow thumb="/static/my/fenzu.png" thumb-size="sm" rightText=""/>
+				<uni-list-item v-if="userInfo.roleTag == 1"  :clickable="true" title="购买优惠券" to="/pages/purchaseCoupon/purchaseCoupon" showArrow thumb="/static/my/coupon.png" thumb-size="sm" rightText=""/>
+			</uni-list>
+		</view>
 	</view>
 </template>
 

+ 5 - 0
pages/myGroup/index.rpx.css

@@ -67,3 +67,8 @@
 	line-height: 44rpx;
 	margin-left: 12rpx;
 }
+.xiugai{
+	position:absolute;
+	bottom: 26rpx;
+	right: 26rpx;
+}

+ 15 - 1
pages/myGroup/myGroup.vue

@@ -3,7 +3,7 @@
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"  left-icon="left" title="我的分组" @clickLeft="back" />
 		<view>
 			<scroll-view scroll-y :style="{height:height}">
-				<view class="flex-col  item" v-for="(item,index) in 100" :key="index">
+				<view class="flex-col  item" v-for="(item,index) in 100" :key="index" @click="groupDetail">
 					<view class="flex-row justify-between">
 						<text class="storeName">好又多母婴店</text>
 						<text class="time">消费额:1000.55</text>
@@ -18,6 +18,7 @@
 						<text class="key">成员:</text>
 						<text class="number">300人</text>
 					</view>
+					<u-icon size="30" name="/static/group/xiugai.png" class="xiugai" @click.native.stop="updateGroup"></u-icon>
 				</view>
 			</scroll-view>
 		</view>
@@ -46,6 +47,19 @@
 					delta: 1
 				})
 			},
+
+			updateGroup(){
+				uni.navigateTo({
+					url:'/pages/updateGroup/updateGroup'
+				})
+			},
+
+			groupDetail(){
+				uni.navigateTo({
+					url:'/pages/groupDetail/groupDetail'
+				})
+			},
+
 			goAddGroup(){
 				uni.navigateTo({
 					url:'/pages/addGroup/addGroup'

+ 71 - 0
pages/updateGroup/index.rpx.css

@@ -0,0 +1,71 @@
+.page {
+	background: #F7F7F7;
+	padding: 0 32rpx;
+	height: 100vh;
+}
+.addGroup{
+	width: 686rpx;
+	height: 84rpx;
+	background: #FFE05C;
+	border-radius: 54rpx;
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 84rpx;
+	text-align: center;
+	margin-top: 24rpx;
+}
+.item{
+	width: 686rpx;
+}
+.key{
+	height: 44rpx;
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 44rpx;
+}
+.input{
+	margin-top: 16rpx;
+}
+.scroll-y{
+	height: 488rpx;
+}
+.members{
+	background: #FAFAFA;
+	border-radius: 16rpx;
+	margin-top: 32rpx;
+	padding: 24rpx;
+}
+.member{
+	padding: 32rpx;
+	border-top: 2rpx solid #EEEEEE;
+}
+.member:first-child{
+	border-top: 2rpx solid #FAFAFA;
+}
+.membersTitle{
+	font-size: 28rpx;
+	font-weight: bold;
+	color: #333333;
+}
+.name{
+	height: 40rpx;
+	font-size: 28rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 40rpx;
+	margin-left: 20rpx;
+}
+.selectMemberPopup{
+	height: 800rpx;
+	background: #FFFFFF;
+	border-top-left-radius: 24rpx;
+	border-top-right-radius: 24rpx;
+}
+.popupTitle{
+	line-height: 100rpx;
+}
+.scroll-y1{
+	height: 650rpx;
+}

+ 107 - 0
pages/updateGroup/updateGroup.vue

@@ -0,0 +1,107 @@
+<template>
+	<view class="page">
+		<uni-nav-bar :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true" left-icon="left"
+					 title="修改分组" @clickLeft="back" />
+		<view>
+
+			<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm">
+
+				<u-form-item prop="groupName" borderBottom>
+					<view class="item">
+						<text class="key">分组名称</text>
+						<view class="flex-row input">
+							<u--input v-model="form.groupName" placeholder="请输入分组名称" border="none"></u--input>
+						</view>
+					</view>
+				</u-form-item>
+
+				<u-form-item prop="userInfo.sex" borderBottom>
+					<view class="item">
+						<text class="key">负责人</text>
+						<view class="flex-row input" @click="openSelectPerson">
+							<u--input disabled placeholder="请选择负责人" border="none"></u--input>
+							<u-icon name="arrow-right"></u-icon>
+						</view>
+					</view>
+				</u-form-item>
+			</u--form>
+
+		</view>
+		<view class="addGroup">
+			<text>修改</text>
+		</view>
+
+
+		<uni-popup ref="selectPersonPopup" type="bottom">
+			<view class="selectMemberPopup">
+				<view class="flex-row justify-around popupTitle">
+					<text @click="closePopup('selectPersonPopup')">取消</text>
+					<text>选择分组负责人</text>
+					<text>确定</text>
+				</view>
+				<view class="scroll-y-view">
+					<scroll-view scroll-y class="scroll-y1" >
+						<view class="flex-row justify-between member" v-for="item in 10">
+							<view class="flex-row">
+								<text class="name">张三</text>
+								<text class="name">1736500000</text>
+							</view>
+							<u-icon name="checkbox-mark" color="#FFE05C" size="24"></u-icon>
+						</view>
+					</scroll-view>
+				</view>
+
+			</view>
+		</uni-popup>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {
+
+		},
+		data() {
+			return {
+				height: '',
+				form:{
+					groupName:''
+				},
+				rules: {
+					'groupName': {
+						type: 'string',
+						required: true,
+						min:1,
+						message: '请输入分组名称',
+						trigger: ['blur', 'change']
+					}
+				},
+			}
+		},
+		onLoad(e) {
+			let sysInfo = uni.getSystemInfoSync()
+			this.height = sysInfo.windowHeight - 120 + 'px' //除标题栏栏外的屏幕可用高度
+		},
+		methods: {
+			back() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+
+
+			openSelectPerson(){
+				this.$refs.selectPersonPopup.open()
+			},
+			closePopup(name){
+				this.$refs[name].close()
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import './index.rpx.css';
+</style>