From ca73a173f008c8d7a9d700bad897ca24fe2d2203 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 16 十月 2023 09:29:57 +0800
Subject: [PATCH] 111

---
 minipro_standard/pages/index/index.vue |   79 +++++++++++++++++++++++++++++++--------
 1 files changed, 62 insertions(+), 17 deletions(-)

diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 86bea63..88883e6 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -1,5 +1,8 @@
-<template>
-	<view class="index">
+<template>
+	<page-meta :page-style="ban ?'overflow: hidden;': ''"/>
+	<view class="index" >
+		<!-- :class="ban?'scroll-ban': ''" -->
+		<!-- <view class="mask" @tap="tapMask" @touchmove="moveHandle"></view> -->
 		<!-- <web-view v-if="show" @onPostMessage="onMessage" :src="'https://dmtest.ahapp.net/doumeeplant_h5/#/appletLogin?code=' + code"></web-view> -->
 		<!-- {{$store.state.statusbarHeight}} -->
 		
@@ -9,8 +12,25 @@
 					:style="{background: '#fff', zIndex: '999', paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
 					寰呭姙</view>
 				<div class="content_search">
-					<v-Search @searchInput="searchInput" @submit="search" @reset="reset" :isShow="true"
-						placeholder="鎼滅储鍏抽敭瀛�">
+					<v-Search @searchInput="searchInput" @submit="confirm" @reset="resetType" :isShow="true"
+						placeholder="鎼滅储鍏抽敭瀛�" @scrollerBan="$event => ban=$event">
+						<template v-slot:content>
+							<view class="rp contanir">
+								<view class="c2 b">绫诲瀷</view>
+								<view class="content">
+									<u-grid col="2" :border="false">
+										<u-grid-item v-for="item in types" :key="item.id">
+											<view class="ptb20 f26 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
+												@click="type=item.id">{{ item.name }}</view>
+										</u-grid-item>
+									</u-grid>
+								</view>
+								<!-- <view class="flex ap tc bottom-view">
+									<view class="fx1 ptb20 sbtn_gray c9" @click="resetType">閲嶇疆</view>
+									<view class="fx1 ml20 ptb20 sbtn_green" @click="confirm">纭畾</view>
+								</view> -->
+							</view>
+						</template>
 					</v-Search>
 					<div class="content_search_x"></div>
 					<LabelSelection :TagList="tagList" :isShow="true" @change="clickTag"></LabelSelection>
@@ -18,7 +38,7 @@
 			</view>
 		</u-sticky>
 		
-		<scroll-view :style="{height: height}" v-if="projectList.length" scroll-y refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="loadMore"
+		<scroll-view   :style="{height: height}" v-if="projectList.length" scroll-y refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="loadMore"
 			@refresherrefresh="refresh"
 		>
 			<view v-for="(item, index) in projectList" :key="index">
@@ -41,7 +61,7 @@
 			</view>
 		</scroll-view>
 		<view v-else class="tc c6">鏆傛棤鏁版嵁...</view>
-		<u-popup :show="show" @close="close" :round="8" zIndex="20000">
+		<!-- <u-popup :show="show" @close="close" :round="8" zIndex="20000">
 			<view class="rp p40 contanir">
 				<view class="c2 b">绫诲瀷</view>
 				<view class="content">
@@ -56,7 +76,7 @@
 					<view class="fx1 ptb20 sbtn_gray c9" @click="resetType">閲嶇疆</view>
 					<view class="fx1 ml20 ptb20 sbtn_green" @click="confirm">纭畾</view>
 				</view>
-			</view>
+			</view> -->
 		</u-popup>
 		<myTabbar :index="0" />
 	</view>
@@ -81,6 +101,7 @@
 		},
 		data() {
 			return {
+				ban: false,
 				height: '',
 				top: '',
 				code: '',
@@ -160,13 +181,13 @@
 		},
 		onReady() {
 			var that = this
+			
 			this.$nextTick(() => {
 				uni.createSelectorQuery()
 					.in(this)
 					.select('.content_search')
 					.boundingClientRect((rect) => {
-						console.log('-----',rect);
-						that.height = `calc(100vh - ${rect.height + 80}px)`
+						that.height = `calc(100vh - ${rect.height + 150}px)`
 						that.top = `${rect.height}px`
 					})
 					.exec()
@@ -177,6 +198,9 @@
 				success: res => {
 					this.windowHeight = res.windowHeight
 				}
+			})
+			uni.$on('success', () => {
+				this.search();
 			})
 			this.loadData()
 		},
@@ -185,13 +209,16 @@
 			searchInput(val) {
 				this.searchForm.mixParam = val;
 				this.search();
-				this.getPageCount()
 			},
 			getPageCount() {
 				pageCount({mixParam: this.searchForm.mixParam})
 					.then(res => {
 						this.tagList[0].num = res.data.startNum
 						this.tagList[1].num = res.data.endNum
+						this.$store.commit('SETNUM', {
+							d: res.data.startNum,
+							y: res.data.endNum
+						})
 					})
 					.catch(err => {})
 			},
@@ -219,8 +246,10 @@
 			refresh() {
 				if (this.triggered) return
 				this.triggered = true;
-				this.page.page = 1
-				this.loadData()
+				this.search()
+				// this.page.page = 1
+				// this.loadData()
+				// this.getPageCount()
 			},
 			loadMore() {
 				this.page.page += 1
@@ -232,13 +261,15 @@
 				this.search()
 			},
 			jump(item) {
+				console.log(item.type);
 				switch(item.type) {
 					case 0: case 2: case 5: {
 						if (item.status === 0) {
 							uni.navigateTo({
-								url: `/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
+								url: `/pages_inspect/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
 							})
 						} else {
+							debugger
 							uni.navigateTo({
 								url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.objId}&status=${item.status}&type=${item.type}&dbid=${item.id}`
 							})
@@ -261,7 +292,7 @@
 					case 1: case 6: {
 						if (item.status === 0) {
 							uni.navigateTo({
-								url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
+								url: `/pages_inspect/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
 							})
 						} else {
 							uni.navigateTo({
@@ -273,7 +304,7 @@
 					case 9: {
 						if (item.status === 0) {
 							uni.navigateTo({
-								url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9`
+								url: `/pages_inspect/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9`
 							})
 						} else{
 							uni.navigateTo({
@@ -386,17 +417,21 @@
 			},
 			resetType() {
 				this.type = ''
-				this.searchForm.type = ''
-				this.confirm()
+				this.searchForm.type = ''
+				this.ban =false
+				this.confirm()
+				
 			},
 			confirm() {
 				this.searchForm.type = this.type
 				this.show = false
+				this.ban =false
 				this.search()
 			},
 			search() {
 				this.page.page = 1
 				this.loadData()
+				this.getPageCount()
 			}
 		}
 	}
@@ -532,5 +567,15 @@
 	}
 	.content_search_x {
 		height: 24rpx;
+	}
+	.mask {
+		z-index: 8000;
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		height: 100vh;
+		background-color: rgba(0, 0, 0, 0.5);
 	}
 </style>

--
Gitblit v1.9.3