lilei 2 سال پیش
والد
کامیت
842d2be208
4فایلهای تغییر یافته به همراه17 افزوده شده و 55 حذف شده
  1. 4 22
      pages.json
  2. 1 10
      pages/batchShelves/cartList.vue
  3. 0 6
      pages/batchShelves/index.vue
  4. 12 17
      pages/shelfSetting/shelfSet.vue

+ 4 - 22
pages.json

@@ -365,28 +365,9 @@
         ,{
             "path" : "pages/shelfSetting/shelfSet",
             "style": {
-            	"navigationBarTitleText": "货架设置",
-            	"navigationStyle":"custom",
-            	"app-plus":{
-            		"titleNView": {
-            			"titleAlign": "left",
-            			"buttons": [ //原生标题栏按钮配置,
-            				{
-            					"text": "" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
-            					"fontSrc": "/static/iconfont/iconfont.ttf",
-            					"fontSize": "14",
-								"color": "#ffffff",
-            					"width":"auto"
-            				},
-							{
-								"text": "",
-								"width":"8",
-								"redDot" : false
-							}
-            			]
+            			"navigationStyle": "custom" ,// 隐藏系统导航栏
+            			"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
             		}
-            	}
-            }
         }
         ,{
             "path" : "pages/shelfSetting/editShelf",
@@ -619,7 +600,8 @@
 			"bounce": "none",
 			"scrollIndicator": "none",
 			"titleAlign": "left",
-			"disableSwipeBack": true
+			"disableSwipeBack": true,
+			"softinputMode":"adjustResize"
 		}
 	},
 	"tabBar": {

+ 1 - 10
pages/batchShelves/cartList.vue

@@ -156,12 +156,6 @@
 				})
 			}
 		},
-		onBackPress() {
-			uni.redirectTo({
-				url: "/pages/shelfSetting/shelfSet?shelfSn="+this.shelfSn
-			})
-			return true
-		},
 		methods: {
 			pageInit(flag){
 				this.placeTab = []
@@ -214,10 +208,7 @@
 				}).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
-						// uni.navigateBack()
-						uni.redirectTo({
-							url: "/pages/shelfSetting/shelfSet?shelfSn="+this.shelfSn
-						})
+						uni.navigateBack()
 					}
 				})
 			},

+ 0 - 6
pages/batchShelves/index.vue

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

+ 12 - 17
pages/shelfSetting/shelfSet.vue

@@ -1,5 +1,12 @@
 <template>
 	<view class="content">
+		<u-navbar back-text="货架设置">
+			<view slot='right' style="padding: 0 30upx;color: #00aaff;" @click="toPlRacking">
+				<u-icon name="piliangshangjia" custom-prefix="iscm-icon"></u-icon>
+				<text style="margin-left: 6rpx;">批量上架</text>
+				<u-badge v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
+			</view>
+		</u-navbar>
 		<view class="card-box" v-if="detailData">
 			<view class="card-row flex align_center justify_between">
 				<view class="label">货架名称</view>
@@ -72,9 +79,9 @@
 				shelfPlaceList: null,
 				placeTab: [],
 				curTab: '',
-				cartNotEmpty: false,
 				isLoad: false,
-				webView: null
+				webView: null,
+				showDot: false
 			}
 		},
 		onLoad(option) {
@@ -102,9 +109,6 @@
 			uni.$off("editCustome")
 			uni.$off("editShelfName")
 		},
-		onNavigationBarButtonTap(e) {
-			 this.toPlRacking()
-		},
 		onShow() {
 			if(!this.isLoad){
 				this.updateHw()
@@ -118,8 +122,8 @@
 			},
 			// 批量上架
 			toPlRacking(){
-				const url = this.cartNotEmpty ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
-				uni.redirectTo({
+				const url = this.showDot ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
+				uni.navigateTo({
 					url: url+"?shelfSn="+this.shelfSn+'&shelfName='+this.detailData.shelfName+'&customerSn='+this.detailData.customerSn
 				})
 			},
@@ -319,17 +323,8 @@
 				this.curTab = item
 			},
 			getHasCartNotEmpty(){
-				this.webView.setTitleNViewButtonStyle(0, {
-					"text":this.placeTab.length?"\ue67a 批量上架 ":'',
-					"color": "#00aaff"
-				});
 				shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {
-					this.cartNotEmpty = res.data == 1
-					console.log(this.placeTab.length && this.cartNotEmpty)
-					const showDot = this.placeTab.length && this.cartNotEmpty
-					this.webView.setTitleNViewButtonStyle(1, {
-						"redDot": showDot
-					}); 
+					this.showDot = this.placeTab.length && res.data == 1
 				})
 			}
 		}