zhengkaixin 2 years ago
parent
commit
5ccb29b11b

+ 0 - 5
apis/index--.js

@@ -1,5 +0,0 @@
-import request from '@/apis/utils/request.js';
-import requestWhite from '@/apis/utils/requestWhite.js';
-import Qs from 'qs';
- import  carhelp from '@/apis/utils/mixin.js'
- 

+ 0 - 59
apis/login--.js

@@ -1,59 +0,0 @@
- import requestWhite from '@/apis/utils/requestWhite.js';
-import Qs from 'qs';
-
-export function findByOpenId(data) {
-	var url='/mobile/user/findByOpenId';
-	return requestWhite({
-		method: 'get',
-		data: data,
-		url: url
-	})
-}
-
- export function findNoLTextConfigure(data) {
- 	var url='/mobile/dataDictionary/findNoLTextConfigure';
- 	return requestWhite({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
-
-
-export function validateCode(data) {
-	 
-	return requestWhite({
-		method: 'post',
-		data:data ,
-		url: '/mobile/regUser/validateCode'
-	})
-} 
-
-export function getVerifyCode(tel) {
-	 
-	return requestWhite({
-		method: 'post',
-		data:{
-			telephone:tel
-		} ,
-		url: '/mobile/regUser/getVerifyCode'
-	})
-} 
-
-export function passwordLogin(data) {
-	 
-	 var url=""
-	 if(data.form=="job"){
-	 	url='/mobile/jobUserApi/passwordLogin';
-	 }else if(data.form=="hr"){
-	 	url='/mobile/sysUserApi/passwordLogin';
-	 }else{
-	 	return 
-	 }
-	 
-	return requestWhite({
-		method: 'post',
-		data:data ,
-		url: url
-	})
-} 

+ 28 - 0
apis/pagejs/index.js

@@ -30,3 +30,31 @@ export function userDepartmentList() {
 		url: url
 	})
 }
+
+ 
+export function deviceList(data) {
+	var url='/mobile/device/deviceList';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function deviceDetails(data) {
+	var url='/mobile/device/deviceDetails';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function deviceDetailsByName(data) {
+	var url='/mobile/device/deviceDetailsByName';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 0 - 27
apis/pagejs/projectDepartment.js

@@ -1,31 +1,4 @@
 import request from '@/apis/utils/request'
- 
-export function deviceList(data) {
-	var url='/mobile/device/deviceList';
-	return request({
-		method: 'post',
-		data: data,
-		url: url
-	})
-}
-
-export function deviceDetails(data) {
-	var url='/mobile/device/deviceDetails';
-	return request({
-		method: 'post',
-		data: data,
-		url: url
-	})
-}
-
-export function deviceDetailsByName(data) {
-	var url='/mobile/device/deviceDetailsByName';
-	return request({
-		method: 'post',
-		data: data,
-		url: url
-	})
-}
 
 //----出库
 export function outApplyList(data) {

+ 2 - 18
pages.json

@@ -11,15 +11,7 @@
 			"style": {
 			}
 		}
-        ,{
-            "path" : "pages/storeManagement/homePage/homePage",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
+     
         ,{
             "path" : "pages/storeManagement/equipmentDelivery/equipmentDelivery",
             "style" :                                                                                    
@@ -173,15 +165,7 @@
         //     }
             
         // }
-        ,{
-            "path" : "pages/projectDepartment/homePage/homePage",
-            "style" :                                                                                    
-            {
-                //navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
+       
         ,{
             "path" : "pages/projectDepartment/exportApplication/exportApplication",
             "style" :                                                                                    

+ 78 - 7
pages/index/equipmentRetrieval/equipmentRetrieval.vue

@@ -6,8 +6,8 @@
 		<u-navbar title="出库申请" v-show="false" ref="navbar" ></u-navbar>
 		
 		<!-- 搜索 -->
-		<view class="search">
-			<u-icon name="arrow-left" @click="back()" v-if="iscomponents!=1" size="36"></u-icon>
+		<view class="search" v-if="iscomponents!=1" >
+			<u-icon name="arrow-left" @click="back()"  size="36"></u-icon>
 			<view class="search-box">
 				<u-search placeholder="搜索设备名称或型号" :show-action="false">
 
@@ -30,12 +30,12 @@
 			</view>
 			<!-- 类型 -->
 			<view class="type" >
-			<view class="type-item" v-for="item in 4">
-				<view class="title">
+			<view class="type-item">
+			<!-- 	<view class="title"  v-for="item in 4">
 					设备类型一
-				</view>
+				</view> -->
 				<view class="content">
-					<view class="item" v-for="item in 4">
+					<view class="item" v-for="(item,i) in menuList[checkindex].list" :key="i">
 						<view class="picture">
 							<img src="@/assets/img/typePic.png" alt="">
 						</view>
@@ -135,15 +135,86 @@
 
 			}
 		},
+		computed:{
+			listcurrentlist(){
+				var 	list=this.menuList[this.checkindex].list
+			
+				if(list){
+					return list
+				}else{
+					return  []
+				}
+				
+			}
+		},
+		mounted() {
+			this.getList()
+		},
+		onReady() {
+			//this.getList()
+		},
+		onReachBottom() {
+			var obj=this.list[this.current]
+			if (obj.list.length < obj.recordsTotal) {			
+				this.myLoadmore();
+			}
+		},
 		methods: {
+			myLoadmore(){
+				this.menuList[this.checkindex].pageIndex += 1;
+				this.getList();
+			},
+			getList(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				 this.datainit()
+				 var data = this.menuList[this.checkindex];
+				 delete data.list;
+				 var list=this.menuList[this.checkindex].list
+				 
+				API.deviceList(data).then((res) => {
+					if(data.pageIndex==1){
+						list = res.data.data;
+					}else{
+						list = [
+							...list,
+							...res.data.data
+						];
+					}
+					debugger
+					this.menuList[this.checkindex].list=list
+							
+					this.menuList[this.checkindex].recordsTotal = res.data.recordsTotal;
+						console.log(this.menuList[this.checkindex])	
+					uni.hideLoading();
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			datainit(){
+				var data = this.menuList[this.checkindex];
+				 if(!data.pageIndex){
+					  this.menuList[this.checkindex].pageIndex=1;
+					 this.menuList[this.checkindex].pageSize=20
+					 this.menuList[this.checkindex].recordsTotal=0;
+					  this.menuList[this.checkindex].list=[]
+				 }
+			},
 			toggle(index) {
 				this.checkindex = index
+				
+				this.datainit()
 			},
 			back(){
 				this.$refs.navbar.goBack()
 			}
 			
-		}
+		},
+		
 	}
 </script>
 

+ 72 - 1
pages/projectDepartment/branch/exportApplication/deliveryFrom.vue

@@ -106,9 +106,28 @@
 	 </view>
 	 <u-popup v-model="showpopup" mode="bottom" 
 	 border-radius="14"
-	 :closeable="true" height="70%">
+	 :closeable="true"  >
 	 			<view class="showpopup">添加设备</view>
+				
+				<!-- 搜索 -->
+				<view class="search"  >
+					
+					<view class="search-box">
+						<u-search placeholder="搜索设备名称或型号" :show-action="false">
+				
+						</u-search>
+						<view class="search-btn">
+							<view class="text">
+								搜索
+							</view>
+						</view>
+					</view>
+				</view>
+				<scroll-view scroll-y="true" style="height: 800rpx;">
+					
+				
 				<equipmentRetrieval :iscomponents="1"></equipmentRetrieval>
+				</scroll-view>
 	 		</u-popup>
 	<!-- 确认出库 -->
 	<view class="bottom" @click="submit()" >
@@ -119,6 +138,7 @@
 
 <script>
 	import equipmentRetrieval from "@/pages/index/equipmentRetrieval/equipmentRetrieval"
+	import * as API from '@/apis/pagejs/projectDepartment.js'
 	
 	export default {
 		data() {
@@ -150,6 +170,57 @@
 </script>
 
 <style scoped lang="scss">
+	
+	
+	// 搜索
+	.search {
+		padding: 12rpx 24rpx;
+		display: flex;
+		border-radius: 8px;
+		overflow: hidden;
+	
+		.search-box {
+			display: flex;
+			border-radius: 8px;
+			overflow: hidden;
+		}
+		
+		/deep/.u-search {
+			width: 630rpx;
+			margin: auto !important;
+			position: relative;
+			flex: 0;
+			margin: 0 !important;
+			height: 64rpx !important;
+		}
+	
+		/deep/.u-content {
+			width: 430px;
+			border-radius: 0px !important;
+			height: 64rpx !important;
+		}
+	
+		/deep/.u-icon--right {
+			margin-right: 16rpx;
+		}
+	
+		.search-btn {
+			width: 100rpx;
+			height: 64rpx;
+			background-color: #f2f2f2;
+	
+			.text {
+				height: 40rpx;
+				margin: 12rpx 0;
+				border-left: 1px solid #999999;
+				font-family: Microsoft Yahei;
+				text-align: center;
+				color: rgba(16, 98, 213, 1);
+				font-size: 28rpx;
+			}
+		}
+	}
+	
 	.showpopup{
 		font-size: 36rpx;
 		text-align: center;

+ 2 - 1
pages/projectDepartment/branch/exportApplication/exportApplication.vue

@@ -71,8 +71,9 @@
 				show:false
 			}
 		},
+		
 		onReachBottom() {
-			var obj=this.list[this.current]
+			var obj=this.menuList[this.checkindex]
 			if (obj.list.length < obj.recordsTotal) {			
 				this.myLoadmore();
 			}