zhengkaixin 1 年間 前
コミット
38a0158ebc

+ 24 - 9
components/equipmentRetrieval.vue

@@ -24,7 +24,7 @@
 		</view>
 		<view class="main">
 			<!-- 分类 -->
-			<view class="classify calc10080 " v-if="!queryContentBl">
+			<view class="classify calc10080 " v-if="!queryContentBl&&!isreturn">
 				<scroll-view scroll-y="true" class="calc10080" >
 				
 				<view class="item " v-for="(item,index) in menuList" :key="index" @click="toggle(index)"
@@ -34,7 +34,7 @@
 				</scroll-view>
 			</view>
 			<!-- 类型 -->
-			<view class="type calc10080"  :class="queryContentBl?'typeAll':''" >
+			<view class="type calc10080"  :class="queryContentBl||isreturn?'typeAll':''"  >
 			<view class="type-item">
 			<!-- 	<view class="title"  v-for="item in 4">
 					设备类型一
@@ -47,7 +47,7 @@
 							<img :src="item.imgUrl" alt="">
 						</view>
 						<view class="infos" :class="{
-							infosQuery:queryContentBl
+							infosQuery:queryContentBl||isreturn
 						}" >
 							<view class="name">
 								{{item.title}}
@@ -60,6 +60,15 @@
 									{{item.model}}
 								</view>
 							</view>
+							<view class="model">
+								<view class="infos-title">
+									规格:
+								</view>
+								<view class="value">
+									{{item.specifications}}
+								</view>
+							</view>
+							
 							<view class="inventory" v-if="!item.code">
 								<view class="infos-title">
 									库存:
@@ -68,7 +77,7 @@
 									{{item.count}}
 								</view>
 							</view>
-							<view class="inventory" v-esle >
+							<view class="inventory" v-if="item.code" >
 								
 								<view class="value">
 									{{item.code}}
@@ -270,7 +279,7 @@
 					
 				}else{
 					uni.navigateTo({
-						url:"./equipmentDetail?name="+item.title+"&model="+item.model
+						url:"./equipmentDetail?name="+item.title+"&model="+item.model+"&specifications="+item.specifications
 					})
 				}
 			},
@@ -281,7 +290,7 @@
 					})
 				}else{
 					uni.navigateTo({
-						url:"/pages/otherFunctions/equipmentRetrieval/equipmentDetail?name="+item.title+"&model="+item.model
+						url:"/pages/otherFunctions/equipmentRetrieval/equipmentDetail?name="+item.title+"&model="+item.model+"&specifications="+item.specifications
 					})
 				}
 				
@@ -553,7 +562,7 @@
 		.content{
 			.item{
 				display: flex;
-				margin-bottom: 34rpx;
+				margin-bottom: 28rpx;
 				border-bottom: 1px dashed;
 				.option{
 					padding-left: 20rpx;
@@ -578,9 +587,15 @@
 					.name{
 						color: rgba(51, 51, 51, 1);
 						font-size: 32rpx;
-						margin-bottom: 16rpx;
+						margin-bottom: 8rpx;
+					}
+					.model{
+						color: rgba(153, 153, 153, 1);
+						font-size: 24rpx;
+						display: flex;
+						//margin-bottom: 8rpx;
 					}
-					.model,.inventory{
+					.inventory{
 						color: rgba(153, 153, 153, 1);
 						font-size: 24rpx;
 						display: flex;

+ 7 - 0
main.js

@@ -45,6 +45,13 @@ Vue.mixin({
 
 	},
 	methods: {
+		isNull(k){
+			if(k){
+				return k
+			}else{
+				return '无'
+			}
+		},
 		gotoInfo(id){
 				if(id){
 					uni.navigateTo({

+ 3 - 0
pages/otherFunctions/equipmentRetrieval/equipmentDetail.vue

@@ -285,6 +285,7 @@
 			return {
 				name:"",
 				count:"",
+				specifications:"",
 				info:{},
 				description: '下次检验时间:2023/03/30',
 				list: [{
@@ -307,6 +308,7 @@
 			onLoad(op){
 				this.name=op.name
 				this.model=op.model
+				this.specifications=op.specifications
 				this.getInfo()
 			},
 			getInfo(){
@@ -316,6 +318,7 @@
 				})
 				API.deviceDetailsByName({
 					model:this.model,
+					specifications:this.specifications,
 					name:this.name
 				}).then((res) => {
 					uni.hideLoading();

+ 36 - 9
pages/otherFunctions/equipmentRetrieval/equipmentInfo.vue

@@ -13,7 +13,7 @@
 		<view class="main">
 			<view class="title">
 				{{info.title}}
-				<span style="float: right;">{{info.code}}</span>
+				<span style="float: right;">{{info.code}}</span><!-- customCode -->
 			</view>
 			<!-- 标签 -->
 			<view class="tabs " v-if="false">
@@ -40,7 +40,7 @@
 								规格
 							</view>
 							<view class="item-value">
-								{{info.specifications}}
+								{{isNull(info.specifications)}}
 							</view>
 						</view>
 						
@@ -49,7 +49,7 @@
 								型号
 							</view>
 							<view class="item-value">
-								{{info.model}}
+								{{isNull(info.model)}}
 							</view>
 						</view>
 						
@@ -60,7 +60,7 @@
 								单位
 							</view>
 							<view class="item-value">
-								{{info.unit}}
+								{{isNull(info.unit)}}
 							</view>
 						</view>
 						<view class="item" style="width: 100%;">
@@ -68,7 +68,7 @@
 								制造厂家
 							</view>
 							<view class="item-value">
-								{{info.manufactor}}
+								{{isNull(info.manufactor)}}
 							</view>
 						</view>
 						
@@ -77,7 +77,7 @@
 								购置时间
 							</view>
 							<view class="item-value">
-								{{info.buyTime}}
+								{{isNull(info.buyTime)}}
 							</view>
 						</view>
 						
@@ -154,9 +154,7 @@
 					 
 					 :key="index" >
 						<view class="inspection-title">
-							<!-- <view class="text">
-								检验内容名称
-							</view> -->
+							
 							<view v-if="item.status=='1'" class="state">
 								合格
 							</view>
@@ -164,6 +162,18 @@
 								不合格
 							</view>
 						</view>
+						<view class="inspection-infos"  >
+							<view class="text"></view>
+							<view class="text-imgs" v-if="item.imgUrls">
+								
+								<image  v-for="(p,i) in item.imgUrls.split(',')" :src="p" @click="previewImage(i,item.imgUrls.split(','))" :key="i"></image>
+								
+							
+							</view>
+							<view v-else >
+								未上传图片
+							</view>
+						</view>
 						<view class="inspection-infos">
 							<view class="inspection-personnel">
 								<view class="inspection-name">
@@ -296,6 +306,14 @@
 			}
 		},
 		methods: {
+			 	previewImage(index,sz) {
+			   		uni.previewImage({
+			   			urls: sz,
+			   			current: index,
+			   			indicator: "number",
+			   			loop: true,
+			   		})
+			   	},
 			onLoad(op){
 			
 				console.log(op)
@@ -539,6 +557,15 @@
 			  font-size: 24rpx;
 			  margin-top: 8rpx;
 			  line-height: 36rpx;
+			  .text-imgs{
+				  .img,image {
+					 
+					  width: 96rpx;
+					  height: 96rpx;
+					  margin-right: 3px;
+				  }
+			  }
+			  
 			  .inspection-personnel{
 			  			  display: flex;flex-wrap: wrap;
 						  align-items: center;

+ 15 - 3
pages/otherFunctions/homePage.vue

@@ -102,7 +102,7 @@
 			</view>
 			
 		<template v-if="role('3')">
-			
+			<view class="itemTitle" v-if="roleList.length>1" >管理类</view>
 				<view class="item"  @click="gotoUrl('pages/projectDepartment/exportProcess/exportProcess')">
 					<view class="title">
 						出库审核
@@ -133,7 +133,7 @@
 			
 		</template>
 		<template v-if="role('2')">
-		
+		<view class="itemTitle" v-if="roleList.length>1" >项目类</view>
 			<view class="item"  @click="gotoUrl('pages/projectDepartment/exportApplication/exportApplication')">
 				<view class="title">
 					出库申请
@@ -164,7 +164,7 @@
 			
 		
 		<template  v-if="role('1')">
-			
+			<view class="itemTitle" v-if="roleList.length>1" >库管类</view>
 				
 		<view class="item" @click="gotoUrl('pages/storeManagement/equipmentDelivery/equipmentDelivery')">
 			<view class="title">
@@ -210,6 +210,8 @@
 		</view>
 				
 			</template>
+			<view class="itemTitle" v-if="roleList.length>1" >其他</view>
+			
 			<view class="item"  @click="gotoUrl('pages/otherFunctions/equipmentRetrieval/equipmentRetrieval')">
 				<view class="title">
 					设备检索
@@ -270,6 +272,7 @@
 					"code": "",
 				
 				},
+				roleList:[],
 				showpopup:false,
 				show:false,
 				badgeexportProcess:0,
@@ -424,6 +427,11 @@
 					
 					this.carhelp.setPersonInfo(res.data.regUser );
 					this.userInfo=this.carhelp.getPersonInfo()
+					if(this.userInfo.type){
+						this.roleList=this.userInfo.type.split(',')
+					}
+					
+					
 					this.badgeGetMethodApi()
 					
 					
@@ -712,6 +720,10 @@
 	 justify-content: space-between;
 	 flex-wrap: wrap;
 	 margin-top: -124rpx;
+	 .itemTitle{
+		     font-size: 46rpx;
+			 color:#ffffff;
+	 }
 	 .item{
 		 width: 720rpx;
 		 height: 100px;

+ 5 - 2
pages/projectDepartment/exportApplication/deliveryFrom.vue

@@ -579,7 +579,8 @@
 				})
 				API.deviceDetailsByName({
 					name:val,
-					model:item.model
+					model:item.model,
+					specifications:item.specifications,
 				}).then((res) => {
 					
 					  uni.hideLoading()
@@ -588,6 +589,7 @@
 					this.list.push({
 						deviceName:val,
 						model:deviceInfo.model,
+						specifications:deviceInfo.specifications,
 						obj:deviceInfo,
 						count:1
 					})
@@ -599,6 +601,7 @@
 					this.list.push({
 						deviceName:item.title,
 						model:item.model,
+						specifications:item.specifications,
 						obj:item,
 						count:1
 					})
@@ -609,7 +612,7 @@
 				
 				var c=this.list.findIndex(it=>{
 					
-					return (it.obj.title==item.title&&it.obj.model==item.model)
+					return (it.obj.title==item.title&&it.obj.model==item.model&&it.obj.specifications==item.specifications)
 				})
 				
 				if(c!=-1){

+ 4 - 4
pages/projectDepartment/exportProcess/deliveryDetails.vue

@@ -91,7 +91,7 @@
 								厂家:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.manufactor}}
+								{{item.deviceInfo?item.deviceInfo.manufactor:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -99,7 +99,7 @@
 								单位:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.unit}}
+								{{item.deviceInfo?item.deviceInfo.unit:''}}
 							</view>
 						</view>
 					</view>
@@ -109,7 +109,7 @@
 								规格:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.specifications}}
+								{{item.deviceInfo?item.deviceInfo.specifications:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -117,7 +117,7 @@
 								型号:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.model}}
+								{{item.deviceInfo?item.deviceInfo.model:''}}
 							</view>
 						</view>
 					</view>

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

@@ -83,7 +83,7 @@
 								厂家:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.manufactor}}
+								{{item.deviceInfo?item.deviceInfo.manufactor:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -91,7 +91,7 @@
 								单位:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.unit}}
+								{{item.deviceInfo?item.deviceInfo.unit:''}}
 							</view>
 						</view>
 					</view>
@@ -101,7 +101,7 @@
 								规格:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.specifications}}
+								{{item.deviceInfo?item.deviceInfo.specifications:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -109,7 +109,7 @@
 								型号:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.model}}
+								{{item.deviceInfo?item.deviceInfo.model:''}}
 							</view>
 						</view>
 					</view>

+ 6 - 6
pages/projectDepartment/exportReturn/deliveryDetails.vue

@@ -57,10 +57,10 @@
 			<view class="list-infos" v-for="(item,i) in deviceInfoList" :key="i" >
 				<view class="infos-head">
 					<view class="name">
-						{{item.deviceInfo.title}}
+						{{item.deviceInfo?item.deviceInfo.title:''}}
 					</view>
 					<view class="state" >
-						 <text style="color: rgb(82, 181, 107);" >编号:{{item.deviceInfo.code}}</text>
+						 <text style="color: rgb(82, 181, 107);" >编号:{{item.deviceInfo?item.deviceInfo.code:''}}</text>
 						  <text @click="ckInfo(item)" style="margin-left: 10px;color: #3385FF;">查看设备</text>
 					</view>
 				</view>
@@ -72,7 +72,7 @@
 								厂家:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.manufactor}}
+								{{item.deviceInfo?item.deviceInfo.manufactor:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -80,7 +80,7 @@
 								单位:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.unit}}
+								{{item.deviceInfo?item.deviceInfo.unit:''}}
 							</view>
 						</view>
 					</view>
@@ -90,7 +90,7 @@
 								规格:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.specifications}}
+								{{item.deviceInfo?item.deviceInfo.specifications:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -98,7 +98,7 @@
 								型号:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.model}}
+								{{item.deviceInfo?item.deviceInfo.model:''}}
 							</view>
 						</view>
 					</view>

+ 2 - 2
pages/projectDepartment/exportReturn/deliveryFrom.vue

@@ -28,7 +28,7 @@
 							</view>
 						</view>
 					</view>
-					<view class="list-head" v-if="false">
+					<view class="list-head" >
 						<view class="title">
 							无二维码设备
 						</view>
@@ -183,7 +183,7 @@
 					<view class="showpopup">添加设备</view>
 						
 						<!-- 搜索 -->
-						<view class="search"  >
+						<view class="search"  v-if="false" >
 							
 							<view class="search-box">
 								<u-search placeholder="搜索设备名称或型号" 

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

@@ -111,7 +111,7 @@
 								单位:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.unit}}
+								{{item.deviceInfo?item.deviceInfo.unit:''}}
 							</view>
 						</view>
 					</view>
@@ -121,7 +121,7 @@
 								规格:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.specifications}}
+								{{item.deviceInfo?item.deviceInfo.specifications:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -129,7 +129,7 @@
 								型号:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.model}}
+								{{item.deviceInfo?item.deviceInfo.model:''}}
 							</view>
 						</view>
 					</view>
@@ -155,7 +155,7 @@
 								库存:
 							</view>
 							<view class="item-value"  :style="'color:'+recordStatusColor(1)">
-								{{item.deviceInfo.count}}
+								{{item.deviceInfo?item.deviceInfo.count:''}}
 							</view>
 						</view>
 						
@@ -219,7 +219,7 @@
 						
 					</view>
 				</view>
-				<view class="prepare-out" v-if="!scanMap.get(item.deviceName+key+item.model)">
+				<view class="prepare-out" v-else-if="!scanMap.get(item.deviceName+key+item.model+key+item.specifications)">
 					<view class="head">
 						<view class="amount">
 							<view class="title">
@@ -234,18 +234,18 @@
 					
 					</view>
 				</view>
-				<view class="prepare-out" v-else>
+				<view class="prepare-out 2" v-else>
 					<view class="head">
 						<view class="amount">
 							<view class="title">
 								实际领用:
 							</view>
 							<view class="value">
-								{{scanMap.get(item.deviceName+key+item.model).length}}
+								{{scanMap.get(item.deviceName+key+item.model+key+item.specifications).length}}
 							</view>
 						</view>
 
-						<view class="unfold" v-show="scanMap.get(item.deviceName+key+item.model).length>2" @click="changeShow(item)">
+						<view class="unfold" v-show="scanMap.get(item.deviceName+key+item.model+key+item.specifications).length>2" @click="changeShow(item)">
 							{{item.show?'收起':'展开'}}<u-icon name="arrow-down"></u-icon>
 							<!-- 	<view class="option" v-if="show==true">
 								
@@ -255,7 +255,7 @@
 
 					</view>
 					<!-- 编号 -->
-					<view class="serial-number" v-for="(item2,j) in scanMap.get(item.deviceName+key+item.model)"
+					<view class="serial-number" v-for="(item2,j) in scanMap.get(item.deviceName+key+item.model+key+item.specifications)"
 						v-show="j<2||item.show" :key="j">
 						<view class="item">
 							<view class="text">
@@ -402,12 +402,12 @@
 		computed: {
 			noScanList() {
 				var list= this.list.map(item=>{
-					return item.deviceName+this.key+item.model
+					return item.deviceName+this.key+item.model+this.key+item.specifications
 				})
 				var map = new Map()
 			
 				var reList= this.scanList.filter(item=>{
-					return  list.indexOf(item.title+this.key+item.model)==-1
+					return  list.indexOf(item.title+this.key+item.model+this.key+item.specifications)==-1
 				})
 			
 				return reList
@@ -416,7 +416,7 @@
 				var map = new Map()
 
 				this.scanList.forEach(item => {
-					var title=item.title+this.key+item.model
+					var title=item.title+this.key+item.model+this.key+item.specifications
 					if (map.has(title)) {
 						var list = map.get(title)
 						list.unshift(item)
@@ -488,7 +488,7 @@
 				var bl=true;
 				this.list.forEach(item=>{
 					var maplistStr="";
-					var maplist=this.scanMap.get(item.deviceName+this.key+item.model);
+					var maplist=this.scanMap.get(item.deviceName+this.key+item.model+this.key+item.specifications);
 					if(!maplist||maplist.length==0){
 						bl=false;
 						// uni.showToast({

+ 4 - 4
pages/storeManagement/equipmentDelivery/deliveryDetails.vue

@@ -87,7 +87,7 @@
 								厂家:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.manufactor}}
+								{{item.deviceInfo?item.deviceInfo.manufactor:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -95,7 +95,7 @@
 								单位:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.unit}}
+								{{item.deviceInfo?item.deviceInfo.unit:''}}
 							</view>
 						</view>
 					</view>
@@ -105,7 +105,7 @@
 								规格:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.specifications}}
+								{{item.deviceInfo?item.deviceInfo.specifications:''}}
 							</view>
 						</view>
 						<view class="infos-item">
@@ -113,7 +113,7 @@
 								型号:
 							</view>
 							<view class="item-value">
-								{{item.deviceInfo.model}}
+								{{item.deviceInfo?item.deviceInfo.model:''}}
 							</view>
 						</view>
 					</view>

+ 3 - 3
pages/storeManagement/equipmentEnter/deliveryDetails.vue

@@ -133,7 +133,7 @@
 					<view class="list-infos">
 						<view class="infos-head">
 							<view class="name">
-								{{item.deviceInfo.title}}
+								{{item.deviceInfo?item.deviceInfo.title:''}}
 							</view>
 							<template v-if="info.status==0">
 							
@@ -159,7 +159,7 @@
 										型号:
 									</view>
 									<view class="item-value">
-										{{item.deviceInfo.model}}
+										{{item.deviceInfo?item.deviceInfo.model:''}}
 									</view>
 								</view>
 		
@@ -170,7 +170,7 @@
 										设备编号:
 									</view>
 									<view class="item-value">
-										{{item.deviceInfo.code}}
+										{{item.deviceInfo?item.deviceInfo.code:''}}
 									</view>
 								</view>
 		

+ 3 - 3
pages/storeManagement/equipmentInspection/inspectionRecord.vue

@@ -11,7 +11,7 @@
 					<view class="list-infos">
 						<view class="infos-head">
 							<view class="name">
-								{{item.deviceInfo.title}}
+								{{item.deviceInfo?item.deviceInfo.title:''}}
 							</view>
 							<view class="state" @click="ckInfo(item)">
 								查看设备
@@ -24,7 +24,7 @@
 										型号:
 									</view>
 									<view class="item-value">
-										{{item.deviceInfo.model}}
+										{{item.deviceInfo?item.deviceInfo.model:''}}
 									</view>
 								</view>
 
@@ -35,7 +35,7 @@
 										设备编号:
 									</view>
 									<view class="item-value">
-										{{item.deviceInfo.code}}
+										{{item.deviceInfo?item.deviceInfo.code:''}}
 									</view>
 								</view>