Browse Source

修改bug

chenrui 3 months ago
parent
commit
d731f4bc9f
2 changed files with 9 additions and 13 deletions
  1. 5 10
      pages/batchShelves/searchProduct.vue
  2. 4 3
      pages/shelfSetting/shelfSet.vue

+ 5 - 10
pages/batchShelves/searchProduct.vue

@@ -19,7 +19,6 @@
 		</view>
 		<view class="productList-body">
 			<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
-				<view v-if="status == 'loading'"><u-loadmore :status="status" :load-text="loadText" /></view>
 				<view class="partList-list-box" v-for="item in productList" :key="item.shelfCartSn">
 					<view class="flex align_center flex_1">
 						<view class="pimgs">
@@ -57,7 +56,7 @@
 					<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="60"></u-empty>
 				</view>
 				<view style="padding: 20upx;" v-if="productList.length && status != 'nomore'">
-					<u-loadmore :status="status" :load-text="loadText" />
+					<u-loadmore :status="status" />
 				</view>
 			</scroll-view>
 		</view>
@@ -80,11 +79,7 @@
 				noDataText: '暂无产品',
 				status: 'nomore',
 				shelfPlaceCode: '',
-				fromPage: null,
-				loadText: {
-					loading: '努力加载中',
-					loadmore: '没有更多了'
-				}
+				fromPage: null
 			}
 		},
 		onLoad(options) {
@@ -121,7 +116,7 @@
 					this.pageNo++
 					this.getProductList()
 				}else{
-					this.status = "nomore"
+					this.status = 'nomore';
 				}
 			},
 			scanProduct(){
@@ -132,6 +127,7 @@
 			clearSearch(){
 				this.queryWord = ''
 				this.productList = []
+				this.status == 'nomore'
 				this.getProductList()
 			},
 			getProductList(){
@@ -147,7 +143,6 @@
 					shelfSn: this.shelfSn,
 					shelfTierCode: this.layer
 				}
-				console.log(params)
 				this.status = 'loading'
 				queryProductPage(params).then(res => {
 					if(res.status == 200&&res.data&&res.data.page&&res.data.page.list&&res.data.page.list.length){
@@ -260,7 +255,7 @@
 			background-color: #fff;
 			padding: 0 40upx;
 			.scroll-view{
-				height: calc(100vh - 180rpx);
+				height: calc(100vh - 150rpx);
 				box-sizing: border-box;
 			}
 			.partList-list-box{

+ 4 - 3
pages/shelfSetting/shelfSet.vue

@@ -24,7 +24,7 @@
 						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 					</view>
 				</view>
-				<view class="card-row align_center flex justify_between">
+				<view class="card-row align_center flex justify_between" v-if="$hasPermissions('B_shelfSet_mobile_priceSetting')">
 					<view class="label" @click="showTip(0)">价格权限设置 <u-icon color="#ffaa00"
 							name="question-circle"></u-icon>:</view>
 					<view class="text flex align_center justify_end" @click="openSetPriceShow">
@@ -37,12 +37,13 @@
 				</view>
 				<view class="card-row align_center flex justify_between" v-if="showMore">
 					<view class="label">货架状态:</view>
-					<view class="text flex align_center justify_end" @click="showEnableShelf=true">
+					<view v-if="$hasPermissions('B_shelfSet_mobile_enable')" class="text flex align_center justify_end" @click="showEnableShelf=true">
 						<text v-if="detailData">{{detailData.state == 'ENABLE'?'启用':'停用'}}</text>
 						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 					</view>
+					<view v-else>{{detailData?detailData.state == 'ENABLE'?'启用':'停用':'--'}}</view>
 				</view>
-				<view class="card-row align_center flex justify_between" v-if="showMore">
+				<view class="card-row align_center flex justify_between" v-if="showMore&&$hasPermissions('B_shelfSet_mobile_logout')">
 					<view class="label">货架注销:</view>
 					<view class="text">
 						<u-button type="primary" size="mini" @click="showCancelShelf=true">注销</u-button>