lilei 9 mesiacov pred
rodič
commit
e721d77798
2 zmenil súbory, kde vykonal 51 pridanie a 38 odobranie
  1. 8 1
      pages.json
  2. 43 37
      pagesA/queryByCode/queryByCode.vue

+ 8 - 1
pages.json

@@ -323,7 +323,14 @@
 			    "style" :                                                                                    
 			    {
 			        "navigationBarTitleText": "按产品编码查询",
-			        "enablePullDownRefresh": false
+			        "enablePullDownRefresh": false,
+					"navigationStyle": "custom",
+					"disableScroll": true,
+					"app-plus":{
+						"bounce":"none"
+					},
+					"renderer":"skyline",
+					"componentFramework": "glass-easel"
 			    }
 			    
 			}

+ 43 - 37
pagesA/queryByCode/queryByCode.vue

@@ -1,24 +1,24 @@
 <template>
 	<view class="content flex flex_column">
-		<view class="searchBar">
-			<view class="search flex align_center">
-				<view class="input">
-					<u-search 
-					focus
-					v-model="queryWord" 
-					@input="change"
-					@custom="search" 
-					@search="search" 
-					@clear="clearSearch"
-					:height="90"
-					bg-color="#fff" 
-					:action-style="{borderRadius:'50rpx',color:'#ffffff',width: '120rpx',padding:'12rpx 20rpx',background:'#00aaff'}" 
-					placeholder="请输入产品编码搜索"></u-search>
-				</view>
-			</view>
-		</view>
+		<uni-nav-bar left-icon="back" title="按编码查询" @clickLeft="back" statusBar fixed></uni-nav-bar>
 		<view class="check-list">
-			<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
+			<scroll-view scroll-y type="custom" class="scroll-view" @scrolltolower="onreachBottom">
+				<sticky-header>
+					<view class="searchBar">
+						<uni-search-bar
+						radius="100" 
+						focus 
+						cancelButton="none"
+						placeholder="请输入产品编码搜索" 
+						bg-color="#efefef"
+						@input="change"
+						@confirm="search" 
+						@blur="search"
+						@clear="clearSearch"
+						v-model="queryWord" 
+						clearButton="auto"/>
+					</view>
+				</sticky-header>
 				<view class="partList-list-box" v-for="item in partList" :key="item.id">
 					<view class="product flex align_center" @click="toEdit(item)">
 						<view class="flex align_center flex_1">
@@ -32,7 +32,7 @@
 								<view class="flex align_center" v-if="item.productTypeSn=='543766811373752320'&&item.origCode" style="padding-top: 5px;">
 									<text class="item-detail-text">原厂编码:</text>
 									<view style="width: 50%;flex-grow: 1;">
-										<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+										<uni-tag :text="item.origCode" inverted :circle="true" type="warning"></uni-tag>
 									</view>
 								</view>
 								<view class="ptxt">
@@ -52,8 +52,8 @@
 					</view>
 				</view>
 				<view style="padding: 20upx;">
-					 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="partList.length==0 && status!='loading'" mode="list"></u-empty>
-					 <u-loadmore v-if="(total>=partList.length&&partList.length)||status=='loading'" :status="status" />
+					<sklineTemp v-if="partList.length==0 && status!='loading'" :text="noDataText"/>
+					<uni-load-more v-if="(total>=partList.length&&partList.length)||status=='loading'" :status="status"/>
 				</view>
 			</scroll-view>
 		</view>
@@ -61,8 +61,12 @@
 </template>
 
 <script>
+	import sklineTemp from '@/components/skline/sklineTemp.vue'
 	import { getShelfProductList,findShelfUserParam } from '@/api/shelf'
 	export default {
+		components:{
+			sklineTemp
+		},
 		data() {
 			return {
 				queryWord: '',
@@ -99,6 +103,9 @@
 			uni.$off("updateQueryByCodeList")
 		},
 		methods: {
+			back(){
+				uni.navigateBack()
+			},
 			getShowPriceType(){
 				findShelfUserParam({shelfSn: this.shelfSn}).then(res => {
 					this.priceShowVal = res.data ? res.data.carOwnerPrice == '1' && res.data.purchasesPrice == '1' : false
@@ -209,26 +216,16 @@
 .content{
 	height: 100vh;
 	width: 100%;
-	padding: 0 0.5rem;
+	padding: 0;
 	background: #fff;
-	.searchBar{
-		padding: 0 0.3rem;
-		.search{
-			padding: 0.5rem 0.5rem 0.3rem 0.5rem;
-			.input{
-				flex-grow: 1;
-				border:0.1rpx solid #eee;
-				padding: 0.1rpx;
-				border-radius: 50rpx;
-				padding-right: 10rpx;
-			}
-		}
-	}
 	.check-list{
 		flex-grow: 1;
 		.scroll-view{
-			height: calc(100vh - 180rpx);
+			height: 100%;
 			box-sizing: border-box;
+			.searchBar{
+				background-color: #fff;
+			}
 		}
 		.partList-list-box{
 			padding: 20rpx 30rpx;
@@ -245,8 +242,13 @@
 				.pinfo{
 					flex-grow: 1;
 					padding-left: 20rpx;
-					/deep/ .u-tag{
+					width: 80%;
+					/deep/ .uni-tag{
 						word-break: break-all;
+						font-size: 28rpx;
+						color: #0fab04eee;
+						border: 0;
+						padding: 0.2rem 0.3rem;
 					}
 					.item-detail-text{
 						color: #999;
@@ -255,6 +257,8 @@
 						font-size: 28rpx;
 						color: #191919;
 						.code{
+							display: flex;
+							align-items: center;
 							text{
 								font-weight: normal;
 								margin-right: 6rpx;
@@ -266,6 +270,8 @@
 							}
 						}
 						.kc{
+							display: flex;
+							align-items: center;
 							color: #999;
 							text{
 								color: #333;