Parcourir la source

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

qukaidi il y a 4 ans
Parent
commit
66c8a8b778

+ 3 - 0
App.vue

@@ -78,4 +78,7 @@
 	.u-skeleton {
 		height: 100%;
 	}
+	.u-action[data-v-4c556b40]{
+		color: #FFFFFF !important;
+	}
 </style>

+ 1 - 7
common/p-scan/scan.vue

@@ -17,7 +17,6 @@
 			};
 		},
 		created() {
-			
 			var statusBarHeight = uni.getSystemInfoSync().statusBarHeight; //状态栏
 			var height = statusBarHeight + 44 + 144 + 'px';
 			var pages = getCurrentPages();
@@ -34,6 +33,7 @@
 				frameColor: '#00A0EA',
 				scanbarColor: '#00A0EA'
 			});
+			
 			this.barcode.onmarked = this.onmarked;
 			
 			// this.barcode.start({vibrate: false}); //振动
@@ -44,7 +44,6 @@
 			if (res.platform == 'android') { //安卓机
 				this.barcode.start();
 			}
-
 			this.barcode.setStyle({
 				background: '#ffffff',
 				frameColor: '#00A0EA',
@@ -52,17 +51,12 @@
 			});
 			// #endif
 		},
-		onUnload() {
-			clearTimeout(this.t);
-		},
 		methods: {
 			onmarked(type, result) {
-				// console.log(type +':'+ result);
 				this.$emit('getCode', result);
 				this.t = setTimeout(() => {
 					this.barcode.start();
 				}, 2000)
-				
 			}
 		}
 	}

+ 52 - 29
pages/home/Scan-code-in/index.vue

@@ -80,7 +80,9 @@
 		request
 	} from '../../../common/request/request'
 	require("promise.prototype.finally").shim()
-	import {mapMutations} from 'vuex'
+	import {
+		mapMutations
+	} from 'vuex'
 	export default {
 		data() {
 			return {
@@ -92,57 +94,76 @@
 				nonRegularTyreNumbers: [], //非正规胎号
 				alreadyExistsTyreNumbers: [], //库存中已存在轮胎号
 				rewardMoney: '', //奖励金额
-				rewardIntegral: '' ,//奖励积分
-				longitude:'',  //经度
-				latitude:'',   //纬度
-				address: ''	   //中文地址
+				rewardIntegral: '', //奖励积分
+				longitude: '', //经度
+				latitude: '', //纬度
+				address: '' //中文地址
 			}
 		},
 		created() {
 			uni.getNetworkType({
-			    success: function (res) {
+				success: function(res) {
 					let none = res.networkType
-			        console.log(res.networkType);
-					if(none == 'none'){
+					console.log(res.networkType);
+					if (none == 'none') {
 						uni.showToast({
 							icon: 'none',
 							title: '无网络,请连接网络后再试~',
 							position: "bottom"
 						})
 					}
-			    }
+				}
 			});
 			this.getDatalist()
 		},
+		onBackPress(options) {
+			if (options.from == 'backbutton') {
+				this.$u.route({
+					url: 'pages/home/scancode/index'
+				})
+				uni.$emit('data', {
+					lisi: this.datalist
+				})
+				console.log(this.datalist)
+				console.log("到此一游")
+			}
+			return true;
+		},
 		methods: {
 			...mapMutations(["inStore"]),
 			confirm() {
 				this.$u.route({
-					type:'redirectTo',
+					type: 'redirectTo',
 					url: 'pages/me/Warehousing-details/index'
 				})
 			},
 			getDatalist() {
+				uni.showLoading({
+					title: '加载中...'
+				});
+				setTimeout(function() {
+					uni.hideLoading();
+				}, 1000);
 				uni.$on('update', data => {
 					this.datalist = data.materialList
 					request({
 						url: '/storeScan/getTyreReword',
 						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,
 							materialList: this.datalist
 						}
 					}).then(res => {
 						console.log(res.data.code)
-						if(res.data.code == 0){
+						if (res.data.code == 0) {
 							this.dalist = res.data.data
 							for (let i = 0; i < this.dalist.length; i++) {
 								this.total += parseInt(this.dalist[i].rewardMoney)
 							}
 							this.inStore()
 							return this.total
-						}else{
+						} else {
 							uni.showToast({
 								icon: 'none',
 								title: '出错啦~'
@@ -160,20 +181,20 @@
 					})
 				})
 			},
-			location(){
-				
+			location() {
+
 				uni.getNetworkType({
-				    success: function (res) {
+					success: function(res) {
 						let none = res.networkType
-				        console.log(res.networkType);
-						if(none == 'none'){
+						console.log(res.networkType);
+						if (none == 'none') {
 							uni.showToast({
 								icon: 'none',
 								title: '无网络,请连接网络后再试~',
 								position: "bottom"
 							})
 						}
-				    }
+					}
 				});
 				let this_s = this
 				uni.getLocation({
@@ -183,8 +204,9 @@
 						console.log(res);
 						this_s.longitude = res.longitude
 						this_s.latitude = res.latitude
-						this_s.address = res.address.country + res.address.province + res.address.city + res.address.district + res.address.street
-						if(res.address.length == 0){
+						this_s.address = res.address.country + res.address.province + res.address.city + res.address.district + res.address
+							.street
+						if (res.address.length == 0) {
 							uni.showToast({
 								icon: 'none',
 								title: '获取地址失败, 请检查是否开启定位权限~~',
@@ -209,12 +231,12 @@
 					url: '/storeScan/storeScanTyres',
 					method: 'Post',
 					data: {
-						storeId:this.$store.state.storeInfo.storeId,
-						userId:this.$store.state.storeInfo.userId,
-						scanAddress: this.address,		//地址
-						longitude: this.longitude,		//纬度
-						latitude: this.latitude,		//经度
-						materialList: this.datalist		//轮胎参数
+						storeId: this.$store.state.storeInfo.storeId,
+						userId: this.$store.state.storeInfo.userId,
+						scanAddress: this.address, //地址
+						longitude: this.longitude, //纬度
+						latitude: this.latitude, //经度
+						materialList: this.datalist //轮胎参数
 					}
 				}).then(res => {
 					console.log(res)
@@ -233,12 +255,13 @@
 					this.rewardMoney = res.data.data.rewardMoney //奖励金额
 					this.rewardIntegral = res.data.data.rewardIntegral //奖励积分
 					console.log(res)
+					this.datalist = ''
 				}).catch(err => {
 					console.log(err.data.msg)
 				}).finally(() => {
 					// Loading.close()
 				})
-				
+
 			}
 		},
 	}

+ 12 - 0
pages/home/Scan-code-out/index.vue

@@ -80,6 +80,17 @@
 				return this.datalist
 			})
 		},
+		onBackPress(options) {
+			if (options.from == 'backbutton') {
+				this.$u.route({
+					url: 'pages/home/scancode/scancodeout'
+				})
+				uni.$emit('data', {
+					lisi: this.datalist
+				})
+			}
+			return true;
+		},
 		methods: {
 			confirm() {
 				this.$u.route({
@@ -145,6 +156,7 @@
 					this.nonRegularTyreNumbers = res.data.data.nonRegularTyreNumbers //非正规胎号
 					this.notScanInTyres = res.data.data.notScanInTyres //未入库轮胎号
 					console.log(res)
+					this.datalist = ''
 				}).catch(err => {
 					console.log(err.data.msg)
 				}).finally(() => {

+ 10 - 9
pages/home/my-stock/my-stock.vue

@@ -2,8 +2,8 @@
 	<view class="page">
 		<!-- 我的库存 -->
 		<view class="content-top">
-			<u-navbar :background="background" back-icon-color="#ffffff" is-fixed>
-				<u-search placeholder="请输入轮胎规格" v-model="keyword" style="margin-right: 26rpx;" @custom="handleSearch"></u-search>
+			<u-navbar :background="background" back-icon-color="#ffffff" is-fixed :border-bottom="false">
+				<u-search placeholder="请输入轮胎规格" v-model="keyword" style="margin-right: 26rpx;color: #FFFFFF !important;" @custom="handleSearch"></u-search>
 			</u-navbar>
 			<u-tabs ref="tabs" name="brandName" :list="brandlLst" bg-color="#0094FE" active-color="#ffffff" inactive-color="#ffffff"
 			 font-size="30" :current="current" @change="handleFilterBrand"></u-tabs>
@@ -105,8 +105,8 @@
 					url: '/baseReq/getBrandListByStoreId',
 					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 => {
 					if (res.data.code == 0) {
@@ -150,11 +150,11 @@
 					url: '/homepage/storeGetStock',
 					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,
 						current: _this.currentPage,
 						pageSize: _this.pageSize,
-						brandCode: _this.currentBrand=="all"?"":_this.currentBrand,
+						brandCode: _this.currentBrand == "all" ? "" : _this.currentBrand,
 						specKey: _this.keyword
 					}
 				}).then(res => {
@@ -208,10 +208,11 @@
 </script>
 
 <style lang="scss" scoped>
-	.page{
+	.page {
 		width: 100%;
 		height: 100%;
 	}
+
 	.content-top {
 		background-color: #0094FE;
 		padding-bottom: 119rpx;
@@ -227,7 +228,7 @@
 		margin: 0 auto 0 auto;
 		border-radius: 20rpx;
 		background-color: #FFFFFF;
-	
+
 		padding: 26rpx;
 
 		.list-row {

+ 28 - 8
pages/home/scancode/index.vue

@@ -94,9 +94,25 @@
 				show: true,
 				show_s: false,
 				show_d: false,
-				res: ''
+				res: '',
 			}
 		},
+		onBackPress(options) {
+			console.log(options)
+			if (options.from == 'backbutton') {
+				this.$u.route({
+					type: 'switchTab',
+					url: 'pages/home/index'
+				})
+			}
+			return true;
+		},
+		onLaunch(){
+			uni.$on('update', data => {
+				this.lisi = data.lisi
+				console.log(this.lisi)
+			})
+		},
 		created() {
 			uni.getNetworkType({
 				success: function(res) {
@@ -111,6 +127,10 @@
 					}
 				}
 			});
+			uni.$on('data', res => {
+				this.lisi = res.lisi
+				console.log(res.lisi)
+			})
 			const innerAudioContext = uni.createInnerAudioContext();
 			innerAudioContext.autoplay = true;
 			innerAudioContext.src = '../../../static/mp3/startscan.mp3';
@@ -266,11 +286,11 @@
 						}
 						if (res.data.data[0].isRegular == 1) {
 							console.log(res.data.data[0].isRegular)
-							this.$refs.repeat.show({
-								title: '轮胎非正规',
-								type: 'default',
-								position: 'bottom'
-							})
+							// this.$refs.repeat.show({
+							// 	title: '轮胎非正规',
+							// 	type: 'default',
+							// 	position: 'bottom'
+							// })
 							this.show_d = true
 							return
 						}
@@ -304,7 +324,7 @@
 				this.number_s = ''
 				console.log("我成功啦")
 				console.log(this.res_s)
-				
+
 				this.lisi.push({
 					specs: this.res_s.data.data[0].specs,
 					flagRegular: this.res_s.data.data[0].isRegular,
@@ -319,6 +339,7 @@
 					plyRating: this.res_s.data.data[0].plyRating,
 					scanWay: '1'
 				})
+				console.log(this.lisi)
 				const innerAudioContext = uni.createInnerAudioContext();
 				innerAudioContext.autoplay = true;
 				innerAudioContext.src = '../../../static/mp3/scansuccess.mp3';
@@ -354,7 +375,6 @@
 					uni.$emit('update', {
 						materialList: this.lisi
 					})
-					this.lisi = []
 				}
 			},
 			repeated() {

+ 176 - 98
pages/home/scancode/scancodeout.vue

@@ -1,8 +1,8 @@
-<!-- 库扫码 -->
+<!-- 库扫码 -->
 <template>
 	<view class="content">
 		<view class="text-area">
-			<scan @getCode="getScanCode"/>
+			<scan @getCode="getScanCode" />
 		</view>
 		<view class="stripe"></view>
 		<view class="roll">
@@ -32,7 +32,7 @@
 						<u-th class="u-th">规格</u-th>
 						<u-th class="u-th" width="15%">操作</u-th>
 					</u-tr>
-					<u-tr class="u-tr" :key="index" v-for="(item, index) in lisi">
+					<u-tr class="u-tr" v-for="(item, index) in lisi" :key="index">
 						<u-td class="u-td" width="30%">{{item.tireNumber}}</u-td>
 						<u-td class="u-td">{{item.maktx}}</u-td>
 						<u-td class="u-td" width="15%"><text @click="confirm(index)" style="color: #FA3534;">删除</text></u-td>
@@ -47,6 +47,17 @@
 		<view>
 		</view>
 		<u-toast ref="repeat" position="bottom" />
+		<u-popup mode="bottom" v-model="show_s" :mask-close-able="false" :safe-area-inset-bottom="true">
+			<view class="confrim-btn">
+				<u-button @click="show_s = false;" style="float: left;border: none;" :hair-line="false" :plain="false">取消</u-button>
+				<u-button @click="container" style="float: right;border: none;" :hair-line="false" :plain="false">确定</u-button>
+			</view>
+			<view class="content_s">
+				<scroll-view scroll-y="true" style="height: 200rpx;">
+					{{regular}}
+				</scroll-view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -64,36 +75,60 @@
 				content: '请输入轮胎胎号',
 				number_s: '',
 				number_a: '',
+				regular: '轮胎非正规是否出库',
 				lisi: [],
 				background: {
 					backgroundColor: '#0094fe',
 				},
 				show: true,
+				show_s: false,
+				show_d: false,
+				res: '',
+			}
+		},
+		onBackPress(options) {
+			console.log(options)
+			if (options.from == 'backbutton') {
+				this.$u.route({
+					type: 'switchTab',
+					url: 'pages/home/index'
+				})
 			}
+			return true;
+		},
+		onLaunch(){
+			uni.$on('update', data => {
+				this.lisi = data.lisi
+				console.log(this.lisi)
+			})
 		},
 		created() {
 			uni.getNetworkType({
-			    success: function (res) {
+				success: function(res) {
 					let none = res.networkType
-			        console.log(res.networkType);
-					if(none == 'none'){
+					console.log(res.networkType);
+					if (none == 'none') {
 						uni.showToast({
 							icon: 'none',
 							title: '无网络,请连接网络后再试~',
 							position: "bottom"
 						})
 					}
-			    }
+				}
 			});
+			uni.$on('data', res => {
+				this.lisi = res.lisi
+				console.log(res.lisi)
+			})
 			const innerAudioContext = uni.createInnerAudioContext();
 			innerAudioContext.autoplay = true;
 			innerAudioContext.src = '../../../static/mp3/startscan.mp3';
 			innerAudioContext.onPlay(() => {
-			  console.log('开始播放');
+				console.log('开始播放');
 			});
 			innerAudioContext.onError((res) => {
-			  console.log(res.errMsg);
-			  console.log(res.errCode);
+				console.log(res.errMsg);
+				console.log(res.errCode);
 			});
 		},
 		methods: {
@@ -103,11 +138,22 @@
 						url: '/storeScan/storeScanGetTyre',
 						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,
 							tyreNum: this.number_a
 						}
 					}).then(res => {
+						console.log(res.data.code)
+						if (res.data.code == 500) {
+							this.$refs.repeat.show({
+								title: '请扫描或输入正确的胎号',
+								type: 'default',
+								position: 'bottom'
+							})
+							return
+						}
+						this.res = res
+						console.log(res.data.data[0].isRegular)
 						for (let i = 0; i < this.lisi.length; i++) {
 							if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
 								this.$refs.repeat.show({
@@ -118,40 +164,20 @@
 								return
 							}
 						}
-
-						this.$refs.repeat.show({
-							title: '录入成功',
-							type: 'success',
-							position: 'bottom'
-						})
-						if (res.data.code == 500){
+						if (res.data.data[0].isRegular == 1) {
+							console.log(res.data.data[0].isRegular)
 							this.$refs.repeat.show({
-								title: res.data.msg,
+								title: '轮胎非正规',
 								type: 'default',
 								position: 'bottom'
 							})
 							return
 						}
-						this.number_a = ""
-						console.log("我成功啦")
-						this.lisi.push({
-							specs: res.data.data[0].specs,
-							flagRegular: res.data.data[0].isRegular,
-							diameter: res.data.data[0].diameter,
-							maktx: res.data.data[0].maktx,
-							pattern: res.data.data[0].pattern,
-							soldToPartyKunnr: res.data.data[0].soldToPartyKunnr,
-							matnr: res.data.data[0].matnr,
-							tireNumber: res.data.data[0].tirenumber,
-							brand: res.data.data[0].brand,
-							shippedDate: res.data.data[0].shippedDate,
-							plyRating: res.data.data[0].plyRating,
-							scanWay: '0'
-						})
+						this.container()
 						console.log(this.lisi)
 					}).catch(err => {
 						this.$refs.repeat.show({
-							title: "请重新录入",
+							title: "无网络,请连接网络后再试~",
 							type: 'default',
 							position: 'bottom'
 						})
@@ -161,34 +187,61 @@
 						// Loading.close()
 					})
 			},
+			container() {
+				this.$refs.repeat.show({
+					title: '录入成功',
+					type: 'success',
+					position: 'bottom'
+				})
+				console.log(this.res.data.data[0].specs)
+				this.show_s = false
+				console.log(this.show_s)
+				this.number_a = ''
+				console.log("我成功啦.")
+				this.lisi.push({
+					specs: this.res.data.data[0].specs,
+					flagRegular: this.res.data.data[0].isRegular,
+					diameter: this.res.data.data[0].diameter,
+					maktx: this.res.data.data[0].maktx,
+					pattern: this.res.data.data[0].pattern,
+					soldToPartyKunnr: this.res.data.data[0].soldToPartyKunnr,
+					matnr: this.res.data.data[0].matnr,
+					tireNumber: this.res.data.data[0].tirenumber,
+					brand: this.res.data.data[0].brand,
+					shippedDate: this.res.data.data[0].shippedDate,
+					plyRating: this.res.data.data[0].plyRating,
+					scanWay: '0'
+				})
+				console.log(this.lisi)
+			},
 			//获取扫码控件
 			getScanCode(val) {
-				console.log(val)
-				this.number = val
-				this.number_s = val
 				uni.getNetworkType({
-				    success: function (res) {
+					success: function(res) {
 						let none = res.networkType
-				        console.log(res.networkType);
-						if(none == 'none'){
+						console.log(res.networkType);
+						if (none == 'none') {
 							uni.showToast({
 								icon: 'none',
 								title: '无网络,请连接网络后再试~',
 								position: "bottom"
 							})
 						}
-				    }
+					}
 				});
+				console.log(val)
+				this.number = val
+				this.number_s = val
 				request({
 						url: '/storeScan/storeScanGetTyre',
 						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,
 							tyreNum: this.number_s
 						}
 					}).then(res => {
-						console.log(res)
+						this.res_s = res
 						this.tips = "胎号"
 						for (let i = 0; i < this.lisi.length; i++) {
 							if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
@@ -197,22 +250,13 @@
 									type: 'default',
 									position: 'bottom'
 								})
-								const innerAudioContext = uni.createInnerAudioContext();
-								innerAudioContext.autoplay = true;
-								innerAudioContext.src = '../../../static/mp3/rescan.mp3';
-								innerAudioContext.onPlay(() => {
-								  console.log('开始播放');
-								});
-								innerAudioContext.onError((res) => {
-								  console.log(res.errMsg);
-								  console.log(res.errCode);
-								});
+								this.repeated()
 								return
 							}
 						}
-						if (res.data.code == 500){
+						if (res.data.code == 500) {
 							this.$refs.repeat.show({
-								title: res.data.msg,
+								title: '请扫描或输入正确的胎号',
 								type: 'default',
 								position: 'bottom'
 							})
@@ -220,46 +264,24 @@
 							innerAudioContext.autoplay = true;
 							innerAudioContext.src = '../../../static/mp3/scanfailed.mp3';
 							innerAudioContext.onPlay(() => {
-							  console.log('开始播放');
+								console.log('开始播放');
 							});
 							innerAudioContext.onError((res) => {
-							  console.log(res.errMsg);
-							  console.log(res.errCode);
+								console.log(res.errMsg);
+								console.log(res.errCode);
 							});
 							return
 						}
-						this.number_s = ""
-						console.log("我成功啦")
-						console.log(res)
-						this.lisi.push({
-							specs: res.data.data[0].specs,
-							flagRegular: res.data.data[0].isRegular,
-							diameter: res.data.data[0].diameter,
-							maktx: res.data.data[0].maktx,
-							pattern: res.data.data[0].pattern,
-							soldToPartyKunnr: res.data.data[0].soldToPartyKunnr,
-							matnr: res.data.data[0].matnr,
-							tireNumber: res.data.data[0].tirenumber,
-							brand: res.data.data[0].brand,
-							shippedDate: res.data.data[0].shippedDate,
-							plyRating: res.data.data[0].plyRating,
-							scanWay: '1'
-						})
-						const innerAudioContext = uni.createInnerAudioContext();
-						innerAudioContext.autoplay = true;
-						innerAudioContext.src = '../../../static/mp3/scansuccess.mp3';
-						innerAudioContext.onPlay(() => {
-						  console.log('开始播放');
-						});
-						innerAudioContext.onError((res) => {
-						  console.log(res.errMsg);
-						  console.log(res.errCode);
-						});
-						this.$refs.repeat.show({
-							title: '扫码成功',
-							type: 'success',
-							position: 'bottom'
-						})
+						if (res.data.data[0].isRegular == 1) {
+							console.log(res.data.data[0].isRegular)
+							this.$refs.repeat.show({
+								title: '轮胎非正规',
+								type: 'default',
+								position: 'bottom'
+							})
+							return
+						}
+						this.container_s()
 						console.log(this.lisi)
 					}).catch(err => {
 						if (code == 400) {
@@ -274,6 +296,7 @@
 								type: 'default',
 								position: 'bottom'
 							})
+							this.repeated()
 						}
 						console.log(err)
 					})
@@ -281,6 +304,45 @@
 						// Loading.close()
 					})
 			},
+			container_s() {
+				this.show_d = false
+				console.log(this.show_s)
+				console.log("什么????")
+				this.number_s = ''
+				console.log("我成功啦")
+				console.log(this.res_s)
+
+				this.lisi.push({
+					specs: this.res_s.data.data[0].specs,
+					flagRegular: this.res_s.data.data[0].isRegular,
+					diameter: this.res_s.data.data[0].diameter,
+					maktx: this.res_s.data.data[0].maktx,
+					pattern: this.res_s.data.data[0].pattern,
+					soldToPartyKunnr: this.res_s.data.data[0].soldToPartyKunnr,
+					matnr: this.res_s.data.data[0].matnr,
+					tireNumber: this.res_s.data.data[0].tirenumber,
+					brand: this.res_s.data.data[0].brand,
+					shippedDate: this.res_s.data.data[0].shippedDate,
+					plyRating: this.res_s.data.data[0].plyRating,
+					scanWay: '1'
+				})
+				console.log(this.lisi)
+				const innerAudioContext = uni.createInnerAudioContext();
+				innerAudioContext.autoplay = true;
+				innerAudioContext.src = '../../../static/mp3/scansuccess.mp3';
+				innerAudioContext.onPlay(() => {
+					console.log('开始播放');
+				});
+				innerAudioContext.onError((res) => {
+					console.log(res.errMsg);
+					console.log(res.errCode);
+				});
+				this.$refs.repeat.show({
+					title: '扫码成功',
+					type: 'success',
+					position: 'bottom'
+				})
+			},
 			confirm(index) {
 				console.log(index + "什么情况")
 				this.lisi.splice(index, 1)
@@ -288,20 +350,31 @@
 			scancodein() {
 				if (this.lisi == '') {
 					this.$refs.repeat.show({
-						title: '请扫码或录入后再点击',
+						title: '请扫码或录入后再点击!',
 						type: 'default',
 						position: 'bottom'
 					})
 				} else {
 					this.$u.route({
-						type:'redirectTo',
-						url: 'pages/home/Scan-code-out/index',
+						type: 'redirectTo',
+						url: 'pages/home/Scan-code-out/index'
 					})
 					uni.$emit('update', {
 						materialList: this.lisi
 					})
-					this.lisi = []
 				}
+			},
+			repeated() {
+				const innerAudioContext = uni.createInnerAudioContext();
+				innerAudioContext.autoplay = true;
+				innerAudioContext.src = '../../../static/mp3/rescan.mp3';
+				innerAudioContext.onPlay(() => {
+					console.log('开始播放');
+				});
+				innerAudioContext.onError((res) => {
+					console.log(res.errMsg);
+					console.log(res.errCode);
+				});
 			}
 		}
 	}
@@ -339,6 +412,11 @@
 		padding-top: 400px;
 	}
 
+	.content_s {
+		padding: 24rpx;
+		text-align: center;
+	}
+
 	.logo {
 		height: 200rpx;
 		width: 200rpx;

+ 10 - 0
pages/me/Delivery-details/index.vue

@@ -125,6 +125,16 @@
 				length: ''
 			}
 		},
+		onBackPress(options) {
+			console.log(options)
+			if (options.from == 'backbutton') {
+				this.$u.route({
+					type: 'switchTab',
+					url: 'pages/me/index'
+				})
+			}
+			return true;
+		},
 		onReachBottom() {
 			this.status = 'loading';
 			this.page++

+ 14 - 16
pages/me/Reward-details/index.vue

@@ -149,7 +149,7 @@
 						console.log(res)
 						// this.datalist = res.data.data
 						this.count = res.data.count
-						this.datalength = res.data.data.length
+						// this.datalength = res.data.data.length
 						this.datalist = this.datalist.concat(res.data.data)
 
 						// 判断扫码类型
@@ -218,7 +218,7 @@
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,
 							userId: this.$store.state.storeInfo.userId,
-							'current': '1',
+							'current': this.current1,
 							'size': '10',
 							'startTime': this.startTime + ' 00:00:00',
 							'endTime': this.endTime + ' 23:59:59'
@@ -290,7 +290,7 @@
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,
 							userId: this.$store.state.storeInfo.userId,
-							'current': '1',
+							'current': this.current1,
 							'size': '10',
 							'brandCode': this.label
 						}
@@ -344,20 +344,18 @@
 			console.log("@@@")
 			console.log(this.count)
 			console.log(this.datalength)
+			console.log(this.current1)
+			this.status = 'loading';
 			setTimeout(() => {
-				if (this.count > this.datalength) {
-					this.current1 = ++this.current1;
-					this.data()
-					this.status = 'nomore'
-
-				} else {
-
-					this.status = 'loading';
-					console.log("@@@")
-					// this.status = 'nomore'
-
-				}
-			}, 1000)
+							if (this.datalist.length >= this.count) {
+								this.status = 'nomore';
+							} else {
+								this.current1 = ++this.current1;
+								this.data()	
+								
+							}
+						}, 1000)
+				
 
 		}
 	}

+ 10 - 0
pages/me/Warehousing-details/index.vue

@@ -138,6 +138,16 @@
 			this.page = 1
 			this.whole()
 		},
+		onBackPress(options) {
+			console.log(options)
+			if (options.from == 'backbutton') {
+				this.$u.route({
+					type: 'switchTab',
+					url: 'pages/me/index'
+				})
+			}
+			return true;
+		},
 		methods: {
 			content_s() {
 				console.log(this.keyword)

+ 4 - 2
pages/me/scancodequery/result.vue

@@ -9,7 +9,7 @@
 			</view>
 			<view class="stripe"></view>
 			<view class="roll">
-				<view>查询失败</view>
+				<view>{{text}}</view>
 				<view>
 					<view></view>
 					<view></view>
@@ -62,7 +62,8 @@
 				mouldType: '未查询',
 				brand: '未查询',
 				specification: '未查询',
-				createTime: '未查询'
+				createTime: '未查询',
+				text:'查询失败'
 			}
 		},
 		onReady() {
@@ -117,6 +118,7 @@
 							position: "bottom"
 						})
 					}
+					this.text = res.data.msg
 				}).catch(err => {
 					console.log(err)
 					uni.showToast({

BIN
unpackage/debug/android_debug.apk