lilei 2 лет назад
Родитель
Сommit
2e7e11d55f

+ 2 - 1
pages.json

@@ -618,7 +618,8 @@
 			// 将回弹属性关掉
 			"bounce": "none",
 			"scrollIndicator": "none",
-			"titleAlign": "left"
+			"titleAlign": "left",
+			"disableSwipeBack": true
 		}
 	},
 	"tabBar": {

+ 12 - 11
pages/batchShelves/cartList.vue

@@ -126,25 +126,17 @@
 		},
 		onShow() {
 			this.curLayer = ''
+			this.pageInit()
 		},
 		onLoad(opts) {
 			this.layerList = 'A、B、C、D、E、F、G、H、I、J、K、L、M、N、O、P、Q、R、S、T、U、V、W、X、Y、Z'.split('、');
 			this.shelfSn = opts.shelfSn
 			this.shelfName = opts.shelfName
 			this.customerSn = opts.customerSn
-			this.pageInit()
-			
-			uni.$on("updateTempHw",()=>{
-				this.pageInit(true)
-			})
-			
 			uni.$on("setCostOk",()=>{
 				this.chooseModal = true
 			})
 		},
-		onUnload() {
-			uni.$off("updateTempHw")
-		},
 		onNavigationBarButtonTap(e) {
 			console.log(e)
 			if(this.placeTab.length){
@@ -164,6 +156,12 @@
 				})
 			}
 		},
+		onBackPress() {
+			uni.redirectTo({
+				url: "/pages/shelfSetting/shelfSet?shelfSn="+this.shelfSn
+			})
+			return true
+		},
 		methods: {
 			pageInit(flag){
 				this.placeTab = []
@@ -216,7 +214,10 @@
 				}).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
-						uni.navigateBack()
+						// uni.navigateBack()
+						uni.redirectTo({
+							url: "/pages/shelfSetting/shelfSet?shelfSn="+this.shelfSn
+						})
 					}
 				})
 			},
@@ -273,7 +274,7 @@
 					for(let a in res.data){
 						this.placeTab.push(a)
 					}
-					if(!flag || this.placeTab.length==1){
+					if(!this.curTab){
 					  this.curTab = this.placeTab[0]
 					}else{
 						if(!this.shelfPlaceList[this.curTab]){

+ 0 - 2
pages/batchShelves/editShelfHw.vue

@@ -154,7 +154,6 @@
 							  console.log(res)
 							  if (res.status == 200) {
 								  _this.toashMsg(res.message)
-								  uni.$emit("updateTempHw")
 								  uni.navigateBack()
 							  }
 							  uni.hideLoading()
@@ -190,7 +189,6 @@
 						 shelfCartSave(params).then(res => {
 						 	if(res.status == 200){
 						 		this.toashMsg(res.message)
-								uni.$emit("updateTempHw")
 								uni.navigateBack()
 						 	}
 						 	uni.hideLoading()

+ 6 - 0
pages/batchShelves/index.vue

@@ -32,6 +32,12 @@
 			this.shelfSn = opts.shelfSn
 			this.customerSn = opts.customerSn
 		},
+		onBackPress() {
+			uni.redirectTo({
+				url: "/pages/shelfSetting/shelfSet?shelfSn="+this.shelfSn
+			})
+			return true
+		},
 		methods: {
 			scanProduct(){
 				uni.redirectTo({

+ 0 - 1
pages/batchShelves/scanProduct.vue

@@ -106,7 +106,6 @@
 			this.init()
 		},
 		onBackPress(e) {
-			uni.$emit("updateTempHw")
 			if(!this.fromPage){
 				uni.redirectTo({
 					url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn

+ 1 - 1
pages/batchShelves/searchProduct.vue

@@ -97,7 +97,7 @@
 			})
 		},
 		onBackPress(e) {
-			uni.$emit("updateTempHw")
+			console.log(e)
 			if(!this.fromPage){
 				uni.redirectTo({
 					url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn

+ 1 - 1
pages/replenishmentManage/replenishmentList.vue

@@ -41,7 +41,7 @@
 			</swiper-item>
 		</swiper>
 		<!-- 打印贴签 -->
-		<print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
+		<print-sticker-modal v-if="printModal" :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
 	</view>
 </template>
 

+ 9 - 10
pages/shelfSetting/shelfSet.vue

@@ -73,7 +73,8 @@
 				placeTab: [],
 				curTab: '',
 				cartNotEmpty: false,
-				isLoad: false
+				isLoad: false,
+				webView: null
 			}
 		},
 		onLoad(option) {
@@ -83,7 +84,7 @@
 			// 获取货物
 			this.getShelfPlace()
 			this.isLoad = true
-			
+			this.webView = this.$mp.page.$getAppWebview(); 
 			uni.$on("editCustome",(data)=>{
 				this.saveShelf(data,0)
 			})
@@ -118,7 +119,7 @@
 			// 批量上架
 			toPlRacking(){
 				const url = this.cartNotEmpty ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
-				uni.navigateTo({
+				uni.redirectTo({
 					url: url+"?shelfSn="+this.shelfSn+'&shelfName='+this.detailData.shelfName+'&customerSn='+this.detailData.customerSn
 				})
 			},
@@ -275,7 +276,6 @@
 			},
 			getShelfDetal(){
 				shelfDetail({ sn: this.shelfSn }).then(res => {
-					console.log(res)
 				  if (res.status == 200) {
 				    this.detailData = res.data
 					this.switchVal = res.data.finishFlag == 1
@@ -291,7 +291,6 @@
 				})
 				getProductPlace({ shelfSn: this.shelfSn }).then(res => {
 				  uni.hideLoading()
-				  console.log(res.data)
 				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = res.data
 					for(let a in res.data){
@@ -316,16 +315,16 @@
 				this.curTab = item
 			},
 			getHasCartNotEmpty(){
-				var webView = this.$mp.page.$getAppWebview(); 
-				console.log(this.placeTab.length)
-				webView.setTitleNViewButtonStyle(0, {
+				this.webView.setTitleNViewButtonStyle(0, {
 					"text":this.placeTab.length?"\ue67a 批量上架 ":'',
 					"color": "#00aaff"
 				});
 				shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {
 					this.cartNotEmpty = res.data == 1
-					webView.setTitleNViewButtonStyle(1, {  
-						"redDot": this.placeTab.length && this.cartNotEmpty
+					console.log(this.placeTab.length && this.cartNotEmpty)
+					const showDot = this.placeTab.length && this.cartNotEmpty
+					this.webView.setTitleNViewButtonStyle(1, {
+						"redDot": showDot
 					}); 
 				})
 			}