Просмотр исходного кода

Merge branch 'test' of git.echepei.com:sailun/sailun-tbr-web into test

caojunjie 4 лет назад
Родитель
Сommit
3be29b353d

+ 2 - 2
components/mi-map/mi-map.vue

@@ -89,7 +89,7 @@
 			getLocation() {
 				let this_ = this
 				uni.getLocation({
-					// type: 'gcj02', // 返回国测局坐标
+					type: 'gcj02', // 返回国测局坐标
 					geocode: true,
 					success: function(res) {
 						this_.initMap(res)
@@ -98,7 +98,7 @@
 					fail: function(e) {
 						uni.showToast({
 							icon: 'none',
-							title: '获取地址失败, 请检查是否开启定位权限~~'
+							title: '获取地址失败, 请检查是否开启定位权限'
 						})
 					}
 				})

+ 9 - 1
manifest.json

@@ -55,7 +55,15 @@
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
             },
-            "ios" : {},
+            "ios" : {
+                "privacyDescription" : {
+                    "NSPhotoLibraryUsageDescription" : "注册时从相册中选择图片作为执照或者门头照",
+                    "NSPhotoLibraryAddUsageDescription" : "注册时从相册中选择图片作为执照或者门头照",
+                    "NSCameraUsageDescription" : "扫码出入库需要启动摄像头扫描二维码",
+                    "NSLocationWhenInUseUsageDescription" : "注册时需要地区定位,扫码是需要开启电子围栏",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "注册时需要地区定位,扫码是需要开启电子围栏"
+                }
+            },
             "sdkConfigs" : {
                 "ad" : {},
                 "maps" : {

+ 52 - 24
pages/login/index.vue

@@ -46,7 +46,11 @@
 </template>
 
 <script>
-	import {mapState,mapMutations} from 'vuex'
+	import permision from "@/js_sdk/wa-permission/permission.js"
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
 	import {
 		request
 	} from '../../common/request/request'
@@ -59,9 +63,9 @@
 				codeText: '',
 				pact: false,
 				loading: false,
-				codeLoading:false,
-				SystemInfo:'',
-				networkType:''
+				codeLoading: false,
+				SystemInfo: '',
+				networkType: ''
 			}
 		},
 		computed: {
@@ -69,26 +73,50 @@
 		},
 		created() {
 			uni.getSystemInfo({
-			    success:(res)=>{
-					this.SystemInfo=res
-			    }
+				success: (res) => {
+					this.SystemInfo = res
+				}
 			});
 			uni.getNetworkType({
-			    success:(res)=>{
-			        this.networkType=res.networkType
-			    }
+				success: (res) => {
+					this.networkType = res.networkType
+				}
 			});
+			if(this.SystemInfo.platform=="ios"){
+				this.judgeIosPermission()
+			}else{
+				this.requestAndroidPermission()
+			}			
 		},
 		methods: {
 			...mapMutations(['login']),
-			toUser(provider){
+			judgeIosPermission() {
+				let result = permision.judgeIosPermission('location')
+				if (!result) {
+					uni.showModal({
+						title: "温馨提示",
+						content: "为了更好地服务,请开启定位权限,是否同意?",
+						cancelText: "不同意",
+						confirmText: "同意",
+						success: res => {
+							if (res.confirm) {
+								plus.runtime.openURL("app-settings://");
+							}
+						}
+					})
+				}
+			},
+			async requestAndroidPermission() {
+				let result = await permision.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
+			},
+			toUser(provider) {
 				this.login(provider);
-				if(this.hasLogin){
+				if (this.hasLogin) {
 					this.$u.route({
 						url: 'pages/home/index',
 						type: 'switchTab',
 					})
-				}else{
+				} else {
 					uni.navigateBack();
 				}
 			},
@@ -104,12 +132,12 @@
 							"mobileCode": this.code,
 							"password": "",
 							"phoneNumber": this.tel,
-							"osType":this.SystemInfo.platform,
-							"osVersion":this.SystemInfo.system,
-							"phoneBrand":this.SystemInfo.brand,
-							"phoneModel":this.SystemInfo.model,
-							"appVersion":"1.00",
-							"networkType":this.networkType,
+							"osType": this.SystemInfo.platform,
+							"osVersion": this.SystemInfo.system,
+							"phoneBrand": this.SystemInfo.brand,
+							"phoneModel": this.SystemInfo.model,
+							"appVersion": "1.00",
+							"networkType": this.networkType,
 						}
 					}).then(res => {
 						if (res.data.code == 0) {
@@ -118,7 +146,7 @@
 								msg: '登录成功'
 							})
 
-						}else {
+						} else {
 							this.$u.toast(res.data.msg);
 						}
 					}).catch(err => {
@@ -139,13 +167,13 @@
 			},
 			getCode() {
 				if (this.tel) {
-					this.codeLoading=true
+					this.codeLoading = true
 					request({
 						url: '/sailun/appStoreBasicInfo/sendCode',
 						method: 'post',
 						data: {
 							"phoneNumber": this.tel,
-							"opreaType":"1"
+							"opreaType": "1"
 						},
 					}).then(res => {
 						console.log(res)
@@ -162,12 +190,12 @@
 					}).catch(err => {
 						console.log(err)
 					}).finally(() => {
-						this.codeLoading=false
+						this.codeLoading = false
 					})
 				} else {
 					this.$u.toast('请输入手机号');
 				}
-			
+
 			},
 		}
 	};

+ 70 - 128
pages/login/register_2.vue

@@ -42,7 +42,7 @@
 							<u-button size="mini" type="primary" @click="getCode" shape="circle" :loading="codeLoading">{{codeText}}</u-button>
 						</view>
 					</u-form-item>
-<!-- 					<u-form-item prop="region">
+					<!-- 					<u-form-item prop="region">
 						<view style="margin-right: 10rpx;">
 							<u-icon name="map" size="36"></u-icon>
 						</view>
@@ -83,7 +83,6 @@
 </template>
 
 <script>
-	import permision from "@/js_sdk/wa-permission/permission.js"
 	import {
 		request
 	} from '../../common/request/request'
@@ -110,20 +109,20 @@
 				},
 				rules: {
 					store: [{
-						required: true,
-						message: '请输入门店名称',
-						trigger: 'blur,change'
-					},
-					{
-						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
-						validator: (rule, value, callback) => {
-							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
-							return this.$u.test.chinese(value);
+							required: true,
+							message: '请输入门店名称',
+							trigger: 'blur,change'
+						},
+						{
+							pattern: /^[\u4e00-\u9fa5_a-zA-Z()()]+$/g,
+							// 正则检验前先将值转为字符串
+							transform(value) {
+								return String(value);
+							},
+							message: '门店名称必须为中文或英语',
+							// 触发器可以同时用blur和change,二者之间用英文逗号隔开
+							trigger: ['change', 'blur'],
 						},
-						message: '门店名称必须为中文',
-						// 触发器可以同时用blur和change,二者之间用英文逗号隔开
-						trigger: ['change','blur'],
-					},
 					],
 					company: [{
 						required: true,
@@ -131,55 +130,58 @@
 						trigger: 'blur,change'
 					}],
 					name: [{
-						required: true,
-						message: '请输入联系人',
-						trigger: 'blur,change'
-					},{
-						min: 2,
-						max: 10,
-						message: '姓名长度在2到10个字符',
-						trigger: ['change','blur'],
-					},
-					{
-						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
-						validator: (rule, value, callback) => {
-							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
-							return this.$u.test.chinese(value);
+							required: true,
+							message: '请输入联系人',
+							trigger: 'blur,change'
+						}, {
+							min: 2,
+							max: 10,
+							message: '姓名长度在2到10个字符',
+							trigger: ['change', 'blur'],
 						},
-						message: '姓名必须为中文',
-						// 触发器可以同时用blur和change,二者之间用英文逗号隔开
-						trigger: ['change','blur'],
-					}],
+						{
+							// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+							validator: (rule, value, callback) => {
+								// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+								return this.$u.test.chinese(value);
+							},
+							message: '姓名必须为中文',
+							// 触发器可以同时用blur和change,二者之间用英文逗号隔开
+							trigger: ['change', 'blur'],
+						}
+					],
 					phone: [{
-						required: true,
-						message: '请输入联系电话',
-						trigger: 'blur,change'
-					},
-					{
-						validator: (rule, value, callback) => {
-							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
-							return this.$u.test.mobile(value);
+							required: true,
+							message: '请输入联系电话',
+							trigger: 'blur,change'
 						},
-						message: '手机号码不正确',
-						// 触发器可以同时用blur和change,二者之间用英文逗号隔开
-						trigger: ['change','blur'],
-					}],
+						{
+							validator: (rule, value, callback) => {
+								// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+								return this.$u.test.mobile(value);
+							},
+							message: '手机号码不正确',
+							// 触发器可以同时用blur和change,二者之间用英文逗号隔开
+							trigger: ['change', 'blur'],
+						}
+					],
 					code: [{
-						required: true,
-						message: '请输入验证码',
-						trigger: 'blur,change'
-					},
-					{
-						min: 6,
-						max: 6,
-						message: '验证码为6位数',
-						trigger: 'change',
-					},
-					{
-						type: 'number',
-						message: '验证码只能为数字',
-						trigger: ['change','blur'],
-					}],
+							required: true,
+							message: '请输入验证码',
+							trigger: 'blur,change'
+						},
+						{
+							min: 6,
+							max: 6,
+							message: '验证码为6位数',
+							trigger: 'change',
+						},
+						{
+							type: 'number',
+							message: '验证码只能为数字',
+							trigger: ['change', 'blur'],
+						}
+					],
 					region: [{
 						required: true,
 						message: '请选择地区',
@@ -199,24 +201,24 @@
 		},
 		created() {
 			uni.$on('licenseData', (data) => {
-				if(data.company.words!="无"){
+				if (data.company.words != "无") {
 					this.form.store = data.company.words
 				}
 				this.form.company = data.company.words
-				if(data.person.words!="无"){
+				if (data.person.words != "无") {
 					this.form.name = data.person.words
 				}
-				
+
 			})
 			uni.$on('addressData', (data) => {
 				this.form.latitude = data.latitude
 				this.form.longitude = data.longitude
-				this.address=data.address
-				this.form.region=this.address.province+"-"+this.address.city+"-"+this.address.district
-				this.form.addressInfo =this.address.addressInfo
+				this.address = data.address
+				this.form.region = this.address.province + "-" + this.address.city + "-" + this.address.district
+				this.form.addressInfo = this.address.addressInfo
 				this.form.province = this.address.province;
-				this.form.city =this.address.city;
-				this.form.district =this.address.district;
+				this.form.city = this.address.city;
+				this.form.district = this.address.district;
 			})
 			uni.$on('dataUrl', (data) => {
 				this.dataUrl = data
@@ -239,68 +241,8 @@
 				this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
 				this.modelshow = true
 			}
-		this.judgeIosPermission()
-		this.requestAndroidPermission()
 		},
 		methods: {
-			judgeIosPermission(permisionID) {
-				let result = permision.judgeIosPermission(permisionID)
-				if (!result) {
-					uni.getLocation({
-					    type: 'wgs84',
-					    success: res=>{
-					        console.log("获取到定位");
-					    },
-						fail:err=>{
-							console.log("没获取到定位")
-						}
-					});
-				} else {
-					uni.getLocation({
-					    type: 'wgs84',
-					    success: res=>{
-					        console.log("获取到定位");
-					    },
-						fail:err=>{
-							console.log("没获取到定位")
-						}
-					});
-				}
-			},
-			async requestAndroidPermission(permisionID) {
-				let result = await permision.requestAndroidPermission(permisionID)
-				if (result == 1) {
-					uni.getLocation({
-					    type: 'wgs84',
-					    success: res=>{
-					        console.log("获取到定位");
-					    },
-						fail:err=>{
-							console.log("没获取到定位")
-						}
-					});
-				} else if (result == 0) {
-					uni.getLocation({
-					    type: 'wgs84',
-					    success: res=>{
-					        console.log("获取到定位");
-					    },
-						fail:err=>{
-							console.log("没获取到定位")
-						}
-					});
-				} else {
-					uni.getLocation({
-					    type: 'wgs84',
-					    success: res=>{
-					        console.log("获取到定位");
-					    },
-						fail:err=>{
-							console.log("没获取到定位")
-						}
-					});
-				}
-			},
 			nextStep() {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {

+ 98 - 47
pages/login/register_3.vue

@@ -33,10 +33,11 @@
 				<view class="content">
 					<scroll-view scroll-y="true" style="height: 300rpx;">
 						<view class="u-flex u-row-center">
-							<u-checkbox-group :wrap="true" @change="checkboxGroupChange" style="display: flex;justify-content: center">
-								<u-checkbox v-model="item.checked" v-for="(item, index) in brandList" :key="index" :name="item.brand" shape="circle">
+							
+							<u-checkbox-group :wrap="true" @change="checkboxGroupChange" style="display: flex;justify-content: left">
+								<u-checkbox v-model="item.checked" v-for="(item, index) in allbrandList" :key="index" :name="item.brandCode" shape="circle">
 									<view class="u-flex u-row-left" style="width: 150rpx;">
-										{{item.brand}}
+										{{item.brandCode}}
 									</view>
 								</u-checkbox>
 							</u-checkbox-group>
@@ -44,7 +45,8 @@
 					</scroll-view>
 				</view>
 			</u-popup>
-			<u-card v-if="querybrandList.length" :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
+			<u-card v-if="this.form.cooperation.length" :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
+			 border-radius="20" :show-foot="false">
 				<view slot="head">
 					<view class="u-flex">
 						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
@@ -60,10 +62,15 @@
 			<u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false"
 			 v-for="(item, index) in checkedAgentlist" :key="index">
 				<view slot="head">
+					<view class="u-flex u-row-between">
 					<view class="u-flex">
 						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
 						{{item.brand}}合作品牌签约任务
 					</view>
+						<view @click="delAgent(index)">
+							<u-icon name="close" color="#666666" size="36"></u-icon>
+				</view>
+					</view>
 				</view>
 				<view slot="body">
 					<u-form-item>
@@ -79,7 +86,7 @@
 							<u-icon name="order" size="36"></u-icon>
 						</view>
 						<u-radio-group v-model="item.taskNum" :disabled="item.disabledGroup" @change="changeRadiogroup(item)">
-							<u-radio v-for="(i, index) in tasknameList" :key="index" :name="i.signLv">
+							<u-radio @click.native.prevent="clickitem(item,i.signLv)" :label-disabled="i.labelDisabled" v-for="(i, index2) in tasknameList" :key="index2" :name="i.signLv">
 								{{i.signLv}}
 							</u-radio>
 						</u-radio-group>
@@ -87,6 +94,18 @@
 				</view>
 
 			</u-card>
+			<u-card v-if="checkedAgentlist.length==0&&this.form.cooperation.length" :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
+			 border-radius="20" :show-foot="false">
+				<view slot="head">
+					<view class="u-flex">
+						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
+						温馨提示
+					</view>
+				</view>
+				<view slot="body" style="display:flex;width:100%;flex-flow: wrap;justify-content: space-around;align-items: center;">
+					此地区暂无此品牌的经销商
+				</view>
+			</u-card>
 			<u-form-item :border-bottom="false">
 				<view style="margin:0 30rpx;">
 					<u-checkbox-group>
@@ -130,8 +149,9 @@
 					}]
 				},
 				protocol: false,
-				querybrandList:[],
-				brandList:[]
+				querybrandList: [],
+				brandList: [],
+				allbrandList:[]
 			}
 		},
 		created() {
@@ -141,19 +161,19 @@
 			})
 		},
 		mounted() {
-			uni.showLoading({
-				title: '加载中...'
-			});
 			this.getAgentArea()
 			this.getTasknum()
+			this.getAllbrandlist()
 		},
 		methods: {
 			getAgentArea() {
-				console.log(this.formData)
+				uni.showLoading({
+					title: '加载中...'
+				});
 				request({
 					url: '/sailun/appStoreBasicInfo/getAgentArea',
 					method: 'post',
-					data:{
+					data: {
 						"area": this.formData.district,
 						"city": this.formData.city,
 						"province": this.formData.province,
@@ -176,16 +196,19 @@
 									kunnr: item.kunnr,
 									agent_id: item.kunnr,
 									taskNum: "",
-									disabledGroup:false,
+									disabledGroup: false,
+									checked:false,
 								})
 							}
 							return res;
 						}, []);
-						this.brandList=[...new Set(this.agentList.reduce((res, item, index, array) => {
+						this.brandList = [...new Set(this.agentList.reduce((res, item, index, array) => {
 							res.push(item.brand)
 							return res;
 						}, []))].reduce((res, item, index, array) => {
-							res.push({brand:item})
+							res.push({
+								brand: item
+							})
 							return res;
 						}, []);
 					}
@@ -199,14 +222,32 @@
 					uni.hideLoading()
 				})
 			},
-			getQuerybrand(){
+			getAllbrandlist() {
 				request({
 					url: '/sailun/appStoreBasicInfo/queryBrand',
 					method: 'get',
 					data: {},
 				}).then(res => {
 					if (res.data.code == 0) {
-					this.querybrandList=res.data.data
+						this.allbrandList = res.data.data
+					}
+					if (res.data.code == 500) {
+						this.$u.toast(res.data.msg);
+					}
+				}).catch(err => {
+					console.log(err)
+				}).finally(() => {
+			
+				})
+			},
+			getQuerybrand() {
+				request({
+					url: '/sailun/appStoreBasicInfo/queryBrand',
+					method: 'get',
+					data: {},
+				}).then(res => {
+					if (res.data.code == 0) {
+						this.querybrandList = res.data.data
 					this.querybrandList = this.querybrandList.filter(item => this.cooperations.indexOf(item.brandCode) > -1)
 					}
 					if (res.data.code == 500) {
@@ -225,14 +266,10 @@
 					data: {},
 				}).then(res => {
 					if (res.data.code == 0) {
-						this.tasknameList = res.data.data
-						this.tasknameList.push({
-							brand: null,
-							brandCode: null,
-							mainId:null,
-							numTask:null,
-							signLv: "无"
+						res.data.data.map(function(item, index) {
+							item.checked = false;
 						})
+						this.tasknameList = res.data.data
 					}
 					if (res.data.code == 500) {
 						this.$u.toast(res.data.msg);
@@ -246,11 +283,21 @@
 			checkboxGroupChange(e) {
 				this.cooperations = e
 			},
-			changeRadiogroup(item){
-				if(item.taskNum=="无"){
-					this.checkedAgentlist.filter(e=>(e.brand===item.brand&&e.agent_id!=item.agent_id)).forEach(e=>e.disabledGroup=false)
+			changeRadiogroup(item) {
+				if (item.checked==true) {
+					this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
+						false)
+				} else {
+					this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
+						true)
+				}
+			},
+			clickitem (item,e) {
+				if(item.checked==false){
+					item.checked=true
 				}else{
-					this.checkedAgentlist.filter(e=>(e.brand===item.brand&&e.agent_id!=item.agent_id)).forEach(e=>e.disabledGroup=true)
+					item.checked=false
+					item.taskNum=""
 				}
 			},
 			getCooperation() {
@@ -267,21 +314,27 @@
 			getTaskconfirm(e) {
 				this.form.tasklist = e[0].label;
 			},
+			delAgent(index){
+				this.checkedAgentlist.splice(index,1)
+			},
 			submit() {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
-						if(!this.protocol)return this.$u.toast('请勾选协议');
+						this.brandAgentLvQueryList=this.checkedAgentlist.filter(item => (item.disabledGroup!=true))
+						let checkenLength=this.checkedAgentlist.filter(item => (item.checked==true))
+						if(checkenLength.length<this.brandAgentLvQueryList.length) return this.$u.toast('请完善任务条数');
+						if (!this.protocol) return this.$u.toast('请勾选协议');
 						this.setData()
 					} else {
 						console.log('验证失败');
 					}
 				});
 			},
-			setData(){
-				this.brandAgentLvQueryList = this.checkedAgentlist.reduce((res, item) => {
+			setData() {
+				this.brandAgentLvQueryList = this.brandAgentLvQueryList.reduce((res, item) => {
 					res.push({
 						agent_id: item.agent_id,
-						agent_name:item.name,
+						agent_name: item.name,
 						brand: item.brand,
 						brandCode: item.brandCode,
 						kunnr: item.kunnr,
@@ -294,27 +347,25 @@
 					return res;
 				}, []);
 				let data = {
-					"brandAgentLvQueryList":this.brandAgentLvQueryList,
-					"city":this.formData.city,
-					"contactName":this.formData.name,
-					"district":this.formData.district,
-					"jd":this.formData.longitude,
-					"licenseUrl":this.dataUrl.licenseUrl,
-					"mobileCode":this.formData.code,
-					"province":this.formData.province,
-					"storeImageUrl":this.dataUrl.storeUrl,
-					"storeName":this.formData.store,
-					"storePhone":this.formData.phone,
-					"version":1.00,
-					"wd":this.formData.latitude,
+					"brandAgentLvQueryList": this.brandAgentLvQueryList,
+					"city": this.formData.city,
+					"contactName": this.formData.name,
+					"district": this.formData.district,
+					"jd": this.formData.longitude,
+					"licenseUrl": this.dataUrl.licenseUrl,
+					"mobileCode": this.formData.code,
+					"province": this.formData.province,
+					"storeImageUrl": this.dataUrl.storeUrl,
+					"storeName": this.formData.store,
+					"storePhone": this.formData.phone,
+					"version": 1.00,
+					"wd": this.formData.latitude,
 				}
-				console.log(data)
 				request({
 					url: '/sailun/appStoreBasicInfo/storeReg',
 					method: 'post',
 					data: data
 				}).then(res => {
-					console.log(res)
 					if (res.data.code == 0) {
 						this.loading = true
 						this.$u.toast(res.data.msg);

+ 154 - 96
pages/me/Reward-details/index.vue

@@ -1,60 +1,83 @@
 <template>
 	<!-- 奖励明细页面 -->
 	<view class="header">
-		
-			<view class="header-one">
+
+		<view class="header-one">
+		</view>
+
+		<view class="content">
+			<view style="width: 100%;">
+				<!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
+							 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
+				<view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
+					<view style="float: left;">
+						<text @click="whole">全部</text>
+						<view v-if="bottoma == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+						<view v-else></view>
 					</view>
-			
-					<view class="content">
-						<u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
-						 :is-scroll="false" :current="current" @change="change"></u-tabs>
-						<u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand" value-name="brandId" label-name="brandName" :list="brandList"></u-select>
-						<u-calendar style=" color: #fff;" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
-						<view @click="search">
-							<u-search placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch" :show-action="false" :animation="true"></u-search>
-						</view>
+					<view style="float: left;margin-left: 70rpx;">
+						<text @click="brand">品牌</text>
+						<view v-if="bottomb == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+						<view v-else></view>
 					</view>
-					<view v-if="count!=0">
-					<view class="content-one" v-for="(item,index) in datalist" :key="index">
-						<view class="content-one-view">
-						</view>
-						<view class="content-one-text">获得奖励:{{item.money}}元</view>
-						<view class="content-two">
-							<view class="">
-								轮胎型号
-							</view>
-							<view class="">
-								{{item.tireModel}}
-							</view>
-						</view>
-						<view class="content-two">
-							<view class="">
-								扫码胎号
-							</view>
-							<view class="">
-								{{item.tyreNum}}
-							</view>
-						</view>
-						<view class="content-two">
-							<view class="">
-								奖励类型
-							</view>
-							<view class="">
-								{{getWay}}
-							</view>
-						</view>
-						<view class="content-two">
-							<view class="">
-								获得时间
-							</view>
-							<view class="">
-								{{item.createTime}}
-							</view>
-						</view>
-						
+					<view style="float: left;margin-left: 70rpx;">
+						<text @click="time_s">时间</text>
+						<view v-if="bottomc == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
+						<view v-else></view>
 					</view>
-			
-			
+				</view>
+			</view>
+			<!-- <u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
+						 :is-scroll="false" :current="current" @change="change"></u-tabs> -->
+			<u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand"
+			 value-name="brandId" label-name="brandName" :list="brandList"></u-select>
+			<u-calendar style=" color: #fff;" @click="calendar" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
+			<view>
+				<u-search style="width: 320rpx;" placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch"
+				 :show-action="false" :animation="true"></u-search>
+			</view>
+		</view>
+		<view v-if="count!=0">
+			<view class="content-one" v-for="(item,index) in datalist" :key="index">
+				<view class="content-one-view">
+				</view>
+				<view class="content-one-text">获得奖励:{{item.money}}元</view>
+				<view class="content-two">
+					<view class="">
+						轮胎型号
+					</view>
+					<view class="">
+						{{item.tireModel}}
+					</view>
+				</view>
+				<view class="content-two">
+					<view class="">
+						扫码胎号
+					</view>
+					<view class="">
+						{{item.tyreNum}}
+					</view>
+				</view>
+				<view class="content-two">
+					<view class="">
+						奖励类型
+					</view>
+					<view class="">
+						{{getWay}}
+					</view>
+				</view>
+				<view class="content-two">
+					<view class="">
+						获得时间
+					</view>
+					<view class="">
+						{{item.createTime}}
+					</view>
+				</view>
+
+			</view>
+
+
 		</view>
 		<view v-else style="margin-top: 400rpx;">
 			<u-empty text="暂无数据" mode="list"></u-empty>
@@ -75,6 +98,9 @@
 				status: 'loadmore',
 				getWay: '',
 				input: '',
+				bottoma: true,
+				bottomb: false,
+				bottomc: false,
 				list: [{
 					name: '全部'
 				}, {
@@ -82,7 +108,7 @@
 				}, {
 					name: '时间',
 				}],
-				brandList:JSON.parse(JSON.stringify([])),
+				brandList: JSON.parse(JSON.stringify([])),
 				current: 0,
 				// 默认页数
 				current1: 1,
@@ -94,15 +120,13 @@
 				// 结束时间
 				endTime: '',
 				pages: '',
-				count:'',
+				count: '',
 				datalength: '',
 				label: '',
-				
-				
 			};
 		},
 		created() {
-			this.data()
+			this.whole()
 			this.getBrandList()
 		},
 		methods: {
@@ -115,8 +139,8 @@
 						url: '/myPage/getPageScanRewordList',
 						method: 'post',
 						data: {
-							storeId:this.$store.state.storeInfo.storeId,
-							userId:this.$store.state.storeInfo.userId,
+							storeId: this.$store.state.storeInfo.storeId,
+							userId: this.$store.state.storeInfo.userId,
 							'searchKey': this.input,
 							'current': this.current1,
 							'size': '10'
@@ -127,7 +151,7 @@
 						this.count = res.data.count
 						this.datalength = res.data.data.length
 						this.datalist = this.datalist.concat(res.data.data)
-						
+
 						// 判断扫码类型
 						for (var i = 0; i < res.data.data.length; i++) {
 							if (res.data.data[i].getWay == 0) {
@@ -147,22 +171,57 @@
 
 					})
 			},
+			calendar() {
+				console.log("@@@")
+			},
+			// 全部事件
+			whole() {
+				console.log("@@")
+				this.bottoma = true
+				this.bottomb = false
+				this.bottomc = false
+				this.current1 = 1
+				this.data()
+				this.datalist = []
+
+			},
+			// 品牌事件
+			brand() {
+				this.showBrand = true
+				this.bottomb = true
+				this.bottoma = false
+				this.bottomc = false
+				this.current1 = 1
+				this.datalist = []
+			},
+			// 时间事件
+			time_s() {
+				this.showDate = true
+				this.bottoma = false
+				this.bottomc = true
+				this.bottomb = false
+				this.current1 = 1
+				this.datalist = []
+			},
 			// 时间选择器获取时间
 			changetime(e) {
 				console.log(e)
 				this.startTime = e.startDate
 				this.endTime = e.endDate
-				this.datalist= []
+				this.datalist = []
+				uni.showLoading({
+					title: '加载中...'
+				});
 				request({
 						url: '/myPage/getPageScanRewordList',
 						method: 'post',
 						data: {
-							storeId:this.$store.state.storeInfo.storeId,
-							userId:this.$store.state.storeInfo.userId,
-							'current': '1',	
+							storeId: this.$store.state.storeInfo.storeId,
+							userId: this.$store.state.storeInfo.userId,
+							'current': '1',
 							'size': '10',
-							'startTime': this.startTime +' 00:00:00',
-							'endTime': this.endTime +' 23:59:59'
+							'startTime': this.startTime + ' 00:00:00',
+							'endTime': this.endTime + ' 23:59:59'
 						}
 					}).then(res => {
 						console.log(res)
@@ -185,7 +244,7 @@
 							uni.hideLoading();
 							this.loading = false;
 						}, 1000)
-				
+
 					})
 			},
 			// 获取品牌列表
@@ -194,11 +253,11 @@
 						url: '/baseReq/getBrandList',
 						method: 'post',
 						data: {
-							storeId:this.$store.state.storeInfo.storeId,
-							userId:this.$store.state.storeInfo.userId	
+							storeId: this.$store.state.storeInfo.storeId,
+							userId: this.$store.state.storeInfo.userId
 						}
 					}).then(res => {
-						this.brandList = JSON.parse(JSON.stringify(res.data.data))	
+						this.brandList = JSON.parse(JSON.stringify(res.data.data))
 					}).catch(err => {
 						console.log(err)
 					})
@@ -207,29 +266,33 @@
 							uni.hideLoading();
 							this.loading = false;
 						}, 1000)
-				
+
 					})
 			},
 			// 搜索框
 			handleSearch(e) {
 				console.log(e)
-				this.datalist = []
+				
 				this.data()
+				this.datalist = []
 			},
 			// 点击获取品牌
 			confirm(e) {
 				console.log(e)
 				console.log(e[0].label)
 				this.label = e[0].label
+				uni.showLoading({
+					title: '加载中...'
+				});
 				request({
 						url: '/myPage/getPageScanRewordList',
 						method: 'post',
 						data: {
-							storeId:this.$store.state.storeInfo.storeId,
-							userId:this.$store.state.storeInfo.userId,
-							'current': '1',	
+							storeId: this.$store.state.storeInfo.storeId,
+							userId: this.$store.state.storeInfo.userId,
+							'current': '1',
 							'size': '10',
-							'searchKey': this.label
+							'brandCode': this.label
 						}
 					}).then(res => {
 						console.log(res)
@@ -253,32 +316,27 @@
 							uni.hideLoading();
 							this.loading = false;
 						}, 1000)
-				
+
 					})
-				},
-				// 点击取消按钮
-					
-					
-				clear() {
-					this.current = 0
-					console.log("@@")
-				},
-			search() {
-				this.$u.route({
-					url: 'pages/me/search/index',
-				})
+			},
+			// 点击取消按钮
+
+
+			clear() {
+				this.current = 0
+				console.log("@@")
 			},
 			change(index) {
 				this.current = index;
 				if (this.current == 1) {
 					this.showBrand = true
-					this.datalist= []
+					this.datalist = []
 				} else if (this.current == 2) {
 					this.showDate = true
-					this.datalist= []
+					this.datalist = []
 				}
 				this.current1 = 1
-				this.datalist= []
+				this.datalist = []
 				this.data()
 			}
 		},
@@ -291,16 +349,16 @@
 					this.current1 = ++this.current1;
 					this.data()
 					this.status = 'nomore'
-					
+
 				} else {
-					
+
 					this.status = 'loading';
 					console.log("@@@")
 					// this.status = 'nomore'
-					
+
 				}
 			}, 1000)
-		
+
 		}
 	}
 </script>
@@ -332,7 +390,7 @@
 
 	.content-one {
 		width: 690rpx;
-		height: 305rpx;
+		height: 315rpx;
 		background: #FFFFFF;
 		box-shadow: 0px 0px 24px 0px rgba(101, 176, 249, 0.41);
 		border-radius: 20rpx;

+ 11 - 10
pages/me/Write-off-management/index.vue

@@ -47,14 +47,14 @@
 						</view>
 					</view>
 				</view>
-<u-loadmore :status="status" />
+				<u-loadmore :status="status" />
 			</view>
 			<view v-else style="margin-top: 100rpx;">
 				<u-empty text="暂无数据" mode="list"></u-empty>
 			</view>
 
 		</view>
-		
+
 	</view>
 </template>
 
@@ -102,11 +102,11 @@
 						url: '/myapp/storeSelectCoupon',
 						method: 'post',
 						data: {
-							storeId:this.$store.state.storeInfo.storeId,
+							storeId: this.$store.state.storeInfo.storeId,
 							"size": 10, //门店0
 							"current": this.current2,
 							"status": this.current3,
-							'userId':this.$store.state.storeInfo.userId
+							'userId': this.$store.state.storeInfo.userId
 						}
 					}).then(res => {
 						console.log(res)
@@ -156,11 +156,11 @@
 						url: '/myapp/storeSelectCoupon',
 						method: 'post',
 						data: {
-							storeId:this.$store.state.storeInfo.storeId,
+							storeId: this.$store.state.storeInfo.storeId,
 							"size": 10, //门店0
 							"current": this.current2,
 							"status": this.current1,
-							'userId':this.$store.state.storeInfo.userId
+							'userId': this.$store.state.storeInfo.userId
 						}
 					}).then(res => {
 						console.log(res)
@@ -223,15 +223,16 @@
 		width: 100%;
 		// padding-left:30rpx;
 	}
-	.order-one-view{
+
+	.order-one-view {
 		width: 120rpx;
 		line-height: 40rpx;
 		background-color: #0094FE;
 		position: relative;
 		left: 575rpx;
 		top: -35rpx;
-		border-top-left-radius:50rpx;
-		border-bottom-left-radius:50rpx;
+		border-top-left-radius: 50rpx;
+		border-bottom-left-radius: 50rpx;
 		font-size: 12rpx;
 		color: #fff;
 		text-align: center;
@@ -418,7 +419,7 @@
 		height: 1rpx;
 		border-bottom: 1rpx solid #E7E8EA;
 		margin: 0 auto;
-		margin-top: 20rpx;
+		margin-top: -20rpx;
 		margin-bottom: 30rpx;
 	}
 

+ 12 - 3
pages/msg/System-message/index.vue

@@ -33,6 +33,7 @@
 		data() {
 			return {
 				msgContent: '',
+				sendUserId: '',
 				orderList: []
 			}
 		},
@@ -66,6 +67,7 @@
 						// this.msgContent = res.data.list[0].msgContent
 						for(var i = 0; i<res.data.list.length; i++) {
 							this.msgContent = res.data.list[i].msgContent
+							this.sendUserId = res.data.list[i].sendUserId
 						}
 
 
@@ -108,9 +110,16 @@
 					})
 			},
 			inDetails() {
-				this.$u.route({
-					url: 'pages/msg/Order-details/index',
-				})
+				if(this.sendUserId == 17) {
+					this.$u.route({
+						url: 'pages/me/Write-off-management/index',
+					})
+				}else {
+					this.$u.route({
+						url: 'pages/msg/Order-details/index',
+					})
+				}
+				
 			}
 		},
 	}