zhengkaixin 2 gadi atpakaļ
vecāks
revīzija
94b4d61896

+ 2 - 4
apis/utils/request.js

@@ -63,11 +63,9 @@ const request = (options) => {
 			
 				console.log("没有免登陆 ----------------"+options.url)
 				//var url="/pages/login/index?message=请登录&back="+ url+"&phone="+options.data.phone
-				var thisurl='/pages/login/index';
+				var thisurl='/';
 				
-				if(options&&options.data&&options.data.jpcode){
-					thisurl+="?jpcode="+options.data.jpcode
-				}
+			
 				carhelp.signOut()
 				uni.redirectTo({
 					url: thisurl

+ 13 - 5
pages/index/index.vue

@@ -103,13 +103,21 @@
 			}
 		},
 		onLoad(){
-			var openId= this.carhelp.getOpenId();
-			if(openId){
-				this.getInfo()
-			}
+				this.getOpenId()
 		},
 		methods: {
-			
+			getOpenId(){
+				var openId= this.carhelp.getOpenId();
+				
+				if(openId){
+					this.getInfo()
+				}else{
+					setTimeout(()=>{
+						this.getOpenId()
+					},1000)
+				}
+					
+			},
 			getPhoneNumber(e){
 				    console.log(e)
 

+ 26 - 16
pages/projectDepartment/exportApplication/deliveriedList.vue

@@ -65,46 +65,50 @@
 				</view>
 			
 				<!-- 备注 -->
-				<view class="remark"  v-if="false">
+				<view class="remark" v-if="item.remark"  >
 					<view class="name">
 						备注:
 					</view>
 					<view class="value">
-						22
+						{{item.remark}}
 					</view>
 				</view>
 
-				<view class="prepare-out" v-if="false"  >
+				<view class="prepare-out" v-if="item.realDeviceList&&item.realDeviceList.length"  >
 					<view class="head">
 						<view class="amount">
 							<view class="title">
 								实际领用:
 							</view>
 							<view class="value">
-								2
+								{{item.realDeviceList.length}}
 							</view>
 						</view>
 
-						<view class="unfold">
-							展开<u-icon name="arrow-down" @click="changeShow()"></u-icon>
-							<view class="option" v-if="this.show==true">
-
-							</view>
+						<view class="unfold" v-show="item.realDeviceList.length>2" @click="changeShow(item)">
+							{{item.show?'收起':'展开'}}<u-icon name="arrow-down"></u-icon>
+							<!-- 	<view class="option" v-if="show==true">
+								
+								
+							</view> -->
 						</view>
 
 					</view>
 					<!-- 编号 -->
-					<view class="serial-number" v-for="item in 2">
+				
+					<view class="serial-number" v-for="(item2,j) in item.realDeviceList"
+						v-show="j<2||item.show" :key="j">
 						<view class="item">
 							<view class="text">
 								设备编号:
 							</view>
-							<view class="number">
-								ND920182001511
+							<view class="number" >
+								
+								{{item2.deviceCode}}
 							</view>
 						</view>
-				
-				</view>
+						
+					</view>
 			</view>
 
 		</view>
@@ -171,9 +175,15 @@
 				this.listFrom.pageIndex += 1;
 				this.getList();
 			},
-			changeShow() {
-				this.show = !this.show
+			changeShow(item) {
 				
+				if (item.show) {
+					item.show = false;
+				} else {
+					item.show = true;
+				}
+				this.$forceUpdate()
+			
 			}
 		}
 	}

+ 9 - 9
pages/projectDepartment/exportProcess/deliveryInfo.vue

@@ -76,14 +76,14 @@
 						{{recordItemStatus(item.status)}}: <text>{{item.needCount}}</text>
 					</view>
 				</view>
-				<view class="infos" v-if="false">
+				<view class="infos">
 					<view class="infos-1">
 						<view class="infos-item">
 							<view class="item-name">
-								型号
+								厂家
 							</view>
 							<view class="item-value">
-								GZYV GYVZ-50
+								{{item.deviceInfo.manufactor}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -91,29 +91,29 @@
 								单位:
 							</view>
 							<view class="item-value">
-								
+								{{item.deviceInfo.unit}}
 							</view>
 						</view>
 					</view>
 					<view class="infos-2">
 						<view class="infos-item">
 							<view class="item-name">
-								单位
+								规格
 							</view>
 							<view class="item-value">
-								
+								{{item.deviceInfo.specifications}}
 							</view>
 						</view>
 						<view class="infos-item">
 							<view class="item-name">
-								库存
+								型号
 							</view>
 							<view class="item-value">
-								20
+								{{item.deviceInfo.model}}
 							</view>
 						</view>
 					</view>
-
+				
 				</view>
 
 			</view>

+ 5 - 4
pages/projectDepartment/exportReturn/deliveryDetails.vue

@@ -59,18 +59,19 @@
 					<view class="name">
 						{{item.title}}
 					</view>
-					<view class="state" v-if="false">
-						 <text>2</text>
+					<view class="state" >
+						 <text>编号:{{item.code}}</text>
 					</view>
 				</view>
 				<view class="infos">
 					<view class="infos-1">
+						
 						<view class="infos-item">
 							<view class="item-name">
-								编号
+								厂家
 							</view>
 							<view class="item-value">
-								{{item.code}}
+								{{item.manufactor}}
 							</view>
 						</view>
 						<view class="infos-item">

+ 139 - 6
pages/projectDepartment/exportReturn/deliveryFrom.vue

@@ -1,10 +1,10 @@
 <template>
 	<view >
 		<u-navbar title="申请归还">
-			<view slot="right" style="margin-right: 10px;">
+			<!-- <view slot="right" style="margin-right: 10px;">
 			
 				<u-icon name="scan" size="48" @click="gotoscan('')"></u-icon>
-			</view>
+			</view> -->
 		</u-navbar>
 		
 		
@@ -19,7 +19,7 @@
 					
 				</view>
 			</view>
-			<view class="item">
+			<view class="item" v-if="false">
 				<view class="name">
 					归还至
 				</view>
@@ -31,6 +31,68 @@
 			
 
 		</view>
+		<u-popup  v-model="showpopup" class=""  mode="bottom"
+		border-radius="14"
+		:closeable="true" >
+					<view class="scantitle">连续扫码</view>
+					<view class="list">
+					<view class=" list-infos">
+						<view class="infos-head">
+							<view class="name">
+								{{nowscan.title?nowscan.title:'扫码后出当前结果'}}
+							</view>
+						
+							<view class="name">
+								编号:{{nowscan.code}}
+							</view>
+						</view>
+						<view class="infos">
+							<view class="infos-1">
+								<view class="infos-item">
+									<view class="item-name">
+										厂家:
+									</view>
+									<view class="item-value">
+										{{nowscan.manufactor}}
+									</view>
+								</view>
+								<view class="infos-item">
+									<view class="item-name">
+										单位:
+									</view>
+									<view class="item-value">
+										{{nowscan.unit}}
+									</view>
+								</view>
+							</view>
+							<view class="infos-2">
+								<view class="infos-item">
+									<view class="item-name">
+										规格:
+									</view>
+									<view class="item-value">
+										{{nowscan.specifications}}
+									</view>
+								</view>
+								<view class="infos-item">
+									<view class="item-name">
+										型号:
+									</view>
+									<view class="item-value">
+										{{nowscan.model}}
+									</view>
+								</view>
+							</view>
+						
+						</view>
+						</view>
+					</view>
+					<camera mode="scanCode"   resolution='medium' 
+					 @scancode="takeCode"  v-if="showpopup"
+					 device-position="back" flash="off" @error="error"
+					 style="width: 100%; height: 300px;"></camera>
+					
+				</u-popup>
 		<!-- 出库设备清单 -->
 		<view class="list">
 			<view class="list-head">
@@ -96,8 +158,10 @@
 		</view>
 		
 	<!-- 确认出库 -->
-	<view class="bottom" @click="gotoOut()" >
-		<button>确认出库</button>
+	<view class="bottom"  >
+		
+		<u-button  type="primary"  @click="gotoOut()" >确认归还</u-button>
+		
 	</view>
 	</view>
 </template>
@@ -108,7 +172,21 @@
 	export default {
 		data() {
 			return {
+				scanFunctionIsUseable:true,
+				nowscan:{
+					"title": "",
+					"specifications": "",
+					
+					"manufactor": "",
+					"unit": "",
+					"model": "",
+					"code": "",
+				
+				},
 				address:"",
+				showpopup:false,
+				deviceposition:"back",
+				
 				form:{
 					projectName:"",
 					addressId:"",
@@ -200,6 +278,15 @@
 				})
 			},
 			getscan(val) {
+				this.showpopup=true;
+				var c = this.scanList.find(item => {
+					return item.code == val
+				})
+				if (c) {
+					
+					return
+				}
+				
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -211,7 +298,7 @@
 					uni.hideLoading();
 					if (res.data.deviceInfo) {
 						console.log(res.data.deviceInfo)
-			
+						this.nowscan=res.data.deviceInfo;
 						var c = this.scanList.find(item => {
 							return item.id == res.data.deviceInfo.id
 						})
@@ -244,8 +331,47 @@
 					})
 				})
 			},
+			error(e) {
+			           console.log(e.detail);
+			},
 			gotoscan(val) {
+				// #ifdef H5
+					this.gotoscanH5(val)
+				// #endif
+				
+				// #ifdef MP-WEIXIN
+					
+						this.gotoscanMP(val)
+				// #endif
+			},
+			takeCode(e){
+				 console.log(e);
+				  if(this.scanFunctionIsUseable) {
+				         this.scanFunctionIsUseable = false;
+				         // 对扫码结果进行处理
+				         console.log(e.detail.result);
+						this.getscan(e.detail.result)
+				         // 扫码间隔两秒
+				         setTimeout(() => {
+				         this.scanFunctionIsUseable = true;
+						
+				         }, 1000)
+				     }
+				
+			 },
+			 gotoscanMP(val){
+				 this.showpopup=true;
+				  // const ctx = uni.createCameraContext();
+				  //            ctx.takePhoto({
+				  //                quality: 'high',
+				  //                success: (res) => {
+				  //                    this.src = res.tempImagePath
+				  //                }
+				  //            });
+			 },
+			gotoscanH5(val) {
 				console.log('111')
+				
 				var _this = this;
 				uni.showModal({
 					title: '提示',
@@ -259,12 +385,19 @@
 						}
 					}
 				});
+			
+			
 			},
 		}
 	}
 </script>
 
 <style scoped lang="scss">
+	.scantitle{
+		text-align: center;
+		font-size: 44rpx;
+		 padding-top: 20px;
+	}
 	page {
 		padding-bottom: 200rpx;
 	}

+ 2 - 2
pages/storeManagement/equipmentDelivery/deliveriedList.vue

@@ -11,7 +11,7 @@
 		<u-popup  v-model="showpopup" class=""  mode="bottom" 
 	 border-radius="14"
 	 :closeable="true" >
-			<view class="scantitle">连续扫码{{deviceposition}}</view>
+			<view class="scantitle">连续扫码</view>
 			<view class="list">
 			<view class=" list-infos">
 				<view class="infos-head">
@@ -334,7 +334,7 @@
 			
 			},
 			status:"",
-			deviceposition:"front",
+			deviceposition:"back",
 			scanFunctionIsUseable:true,
 				showpopup:false,
 				show: false,

+ 8 - 1
pages/storeManagement/equipmentEnter/deliveryDetails.vue

@@ -108,7 +108,11 @@
 		</view>
 		
     </view>
-	
+	<view class="bottom"  >
+		
+		<u-button  type="primary"  @click="gotoOut()" >确认归还</u-button>
+		
+	</view>
 	</view>
 </template>
 
@@ -127,6 +131,7 @@
 					startTime:"",
 					endTime:"",
 					createTime:"",
+					createByName:""
 				},
 				outUser:{
 					name:"",
@@ -160,6 +165,8 @@
 						icon: "none"
 					})
 				})
+			},gotoOut(){
+				
 			}
 		}
 	}

+ 6 - 1
pages/storeManagement/equipmentEnter/equipmentEnter.vue

@@ -179,9 +179,14 @@
 		}
 	}
 	.tabs{
-		width: 250rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		
+		
 		/deep/.u-tabs{
 			background: 0 !important;
+			width: 250rpx;
 		}
 		/deep/.u-tab-bar{
 			background-color: #2A8EFB !important;