zhengkaixin 2 سال پیش
والد
کامیت
6f7739e587

+ 9 - 3
components/ApproveList.vue

@@ -21,16 +21,21 @@
 						<view class="u-order">
 							<view class="u-order-desc">
 								<view class="level">
-									{{item.userName}}
+									<template v-for="(item2,index) in item.approveUserList">
+									 {{index!=0?',':''}}{{item2.name}}
+										
+									</template>
 								</view>
 								<view class="date">
 									{{item.approveTime?item.approveTime:''}}
 								</view>
 							</view>
+						
 							<view class="u-order-time">
 								<view class="photo">
-									<u-avatar size="56" class="img" :src="item.userImg"></u-avatar>
-									
+									<template v-for="(item2,index) in item.approveUserList">	
+										<u-avatar size="56" class="img" :src="item2.headImg" :key="index"></u-avatar>				
+									</template>
 								</view>
 								<view class="confirm">
 									<u-icon v-if="item.status==-1" name="more-circle-fill" :color="recordStatusColor(-1)"></u-icon>
@@ -208,6 +213,7 @@
 			align-items: center;
 
 			.photo {
+				display: flex;
 				width: 56rpx;
 				height: 56rpx;
 				border-radius: 100px;

+ 1 - 0
components/equipmentRetrieval.vue

@@ -401,6 +401,7 @@
 		}
 	// 类型
 	.type{
+		width: 580rpx;
 		padding: 24rpx 24rpx;
 		height: calc(100vh - 88rpx);
 		

+ 1 - 1
config/.env.dev.js

@@ -14,7 +14,7 @@ const UNI_APP = {
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	openId:"oBA__5UuQTRx5Q8h94bDPY-GO2SM",//zkx
 	//openId:"123456",//库管理
-	//openId:"123",// 项目部 - 审批1
+	openId:"123",// 项目部 - 审批1
 	//openId:"223",// 项目部 - 审批2
 	//openId:"323",// 项目部 - 审批3
 	//openId:"oBEnI6PiaBMNUMTnjT0ffT1R2JOk",//杨所

+ 49 - 16
pages/otherFunctions/homePage.vue

@@ -32,7 +32,7 @@
 		<!-- 宫格 -->
 		<view class="gird" >
 			<!-- 公告 -->
-			<view class="notice" >
+			<view class="notice" v-if="false" >
 				<u-notice-bar mode="horizontal"
 				 bg-color="#6290f7" color="#fff"
 				 :list="['库存PDA设备将于2023年4月1日升级维护']"></u-notice-bar>
@@ -40,7 +40,7 @@
 				<!-- <u-icon name="volume-up-fill" size="40" color="#fff"></u-icon>
 				<text></text> -->
 			</view>
-			<template v-if="userInfo.type=='1'">
+			<template  v-if="role('1')">
 				
 		
 			<view class="item" @click="gotoUrl('pages/storeManagement/equipmentDelivery/equipmentDelivery')">
@@ -78,8 +78,23 @@
 			</view>
 		
 				</template>
+				
+				
+				<template v-if="role('3')">
+					<view class="item"  @click="gotoUrl('pages/projectDepartment/exportProcess/exportProcess')">
+						<view class="title">
+							出库审核
+						</view>
+						<view class="hint">
+							审批出库申请单据
+						</view>
+						<view class="img">
+							<img src="@/assets/img/projectGird2.png" alt="">
+						</view>
+					</view>
+				</template>
 		
-		<template v-if="userInfo.type=='2'">
+		<template v-if="role('2')">
 		
 			<view class="item"  @click="gotoUrl('pages/projectDepartment/exportApplication/exportApplication')">
 				<view class="title">
@@ -92,17 +107,7 @@
 					<img src="@/assets/img/projectGird1.png" alt="">
 				</view>
 			</view>
-			<view class="item"  @click="gotoUrl('pages/projectDepartment/exportProcess/exportProcess')">
-				<view class="title">
-					出库审核
-				</view>
-				<view class="hint">
-					审批出库申请单据
-				</view>
-				<view class="img">
-					<img src="@/assets/img/projectGird2.png" alt="">
-				</view>
-			</view>
+			
 			<view class="item"  @click="gotoUrl('pages/projectDepartment/exportReturn/exportReturn')">
 				<view class="title">
 					设备归还
@@ -130,7 +135,7 @@
 		</view>
 		
 		<!-- 其他功能 -->
-		  <view class="other-functions" v-if="userInfo.type=='1'">
+		  <view class="other-functions" v-if="role('other')">
 			  <view class="title">
 			  	其他功能
 			  </view>
@@ -170,8 +175,36 @@
 		onLoad() {
 			this.userInfo=this.carhelp.getPersonInfo()
 			//this.getUserDepartmentList()
+			this.getInfo()
 		},
+		
 		methods: {
+			role(val){
+				if(this.userInfo.type!=null&&this.userInfo.type!=undefined){
+					var index=this.userInfo.type.split(',').indexOf(val)
+					return index>-1
+				}else{
+					return false
+				}
+				
+			},
+			getInfo(){
+				
+				API.findByOpenId({
+					openId: this.carhelp.getOpenId(),
+					noerror:true,
+				}).then((res) => {
+					
+					this.carhelp.setPersonInfo(res.data.regUser );
+					this.userInfo=this.carhelp.getPersonInfo()
+					
+				}).catch(error => {
+					uni.hideLoading();
+					
+					//this.getPhone()
+					
+				})
+			},
 			logout(){
 				this.changeShow()
 						uni.showModal({
@@ -313,7 +346,7 @@
 	 display: flex;
 	 justify-content: space-between;
 	 flex-wrap: wrap;
-	 margin-top: -216rpx;
+	 margin-top: -124rpx;
 	 .item{
 		 width: 720rpx;
 		 height: 100px;

+ 13 - 4
pages/projectDepartment/exportApplication/deliveriedList.vue

@@ -8,7 +8,6 @@
 			</view>
 			
 		</u-navbar>
-		<scroll-view scroll-y="true" style="height: 800rpx;" @scrolltolower="onReachBottom()">
 		
 		<view class="list" v-for="(item,index) in list" :key="index">
 			<!-- 清单信息 -->
@@ -112,7 +111,8 @@
 			</view>
 
 		</view>
-		</scroll-view>
+			<u-divider  v-if="list.length==recordsTotal" border-color="#CFD2D5">已经到底了</u-divider>
+		
    
 	</view>
 </template>
@@ -131,7 +131,7 @@
 				recordsTotal: 0,
 				listFrom:{
 					pageIndex: 1,
-					pageSize: 20,
+					pageSize: 5,
 				
 				}
 			}
@@ -162,7 +162,16 @@
 					pageIndex:this.listFrom.pageIndex,
 				}).then((res) => {
 					uni.hideLoading();
-					this.list=res.data.data;
+					
+					if (this.listFrom.pageIndex == 1) {
+						this.list = res.data.data;
+					} else {
+						this.list = [
+							...this.list,
+							...res.data.data
+						];
+					}
+					
 					this.recordsTotal=res.data.recordsTotal;
 				}).catch(error => {
 					uni.showToast({

+ 3 - 2
pages/projectDepartment/exportApplication/deliveryDetails.vue

@@ -120,7 +120,8 @@
 				
 
 			</view>
-
+			<u-divider  border-color="#CFD2D5">仅显示部分数据</u-divider>
+			
 		</view>
 		<approveList ref="approveList"
 		:outRecordDetailObj="outRecordDetailObj"
@@ -176,7 +177,7 @@
 				
 				API.outRecordDeviceById({
 					recordId:this.id,
-					pageSize:5,
+					pageSize:3,
 					pageIndex:1,
 				}).then((res) => {
 					uni.hideLoading();

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

@@ -15,7 +15,7 @@
 			</view>
 		</u-navbar>
 
-		<scroll-view scroll-y="true" @scrolltolower="onReachBottom()">
+		
 			<view class="list1">
 				<view class="item" v-for="(item,i) in list[current].list" @click="ckInfo(item.id)" :key="i">
 					<view class="title">
@@ -48,7 +48,7 @@
 			</view>
 		
 			
-		</scroll-view>
+		
 
 
 

+ 15 - 8
pages/projectDepartment/exportProcess/deliveryDetails.vue

@@ -117,8 +117,10 @@
 				</view>
 
 			</view>
-
+			<u-divider border-color="#CFD2D5">仅显示部分数据</u-divider>
 		</view>
+		
+		
 		<approveList ref="approveList"
 		:outRecordDetailObj="outRecordDetailObj"
 		 :approveList="approveList"></approveList>
@@ -179,7 +181,7 @@
 				
 				API.outRecordDeviceById({
 					recordId:this.id,
-					pageSize:5,
+					pageSize:3,
 					pageIndex:1,
 				}).then((res) => {
 					uni.hideLoading();
@@ -213,12 +215,17 @@
 							break;
 						}
 						if(item.status==0){
-							if(item.userId==info.id){
-								this.isSpPerson=true;
-							}else{
-								break;
+							
+							for(var j in item.approveUserList){
+								var itemj =item.approveUserList[j]
+								if(itemj.id==info.id){
+									this.isSpPerson=true;
+								}
 							}
+							
+							break;
 						}
+						
 					}
 					
 					
@@ -286,9 +293,9 @@
 					title:"提示",
 					content:"是否"+message+"出库审批",
 					success(res) {
-						_this.saveRecordApprove(status);
+						
 						if(res.confirm){
-							
+							_this.saveRecordApprove(status);
 						}else{
 							
 						}

+ 3 - 2
pages/projectDepartment/exportProcess/deliveryInfo.vue

@@ -117,7 +117,8 @@
 				</view>
 
 			</view>
-
+			<u-divider  border-color="#CFD2D5">仅显示部分数据</u-divider>
+			
 		</view>
 		<approve-list ref="approveList"
 		:outRecordDetailObj="outRecordDetailObj"
@@ -167,7 +168,7 @@
 				
 				API.outRecordDeviceById({
 					recordId:this.id,
-					pageSize:5,
+					pageSize:3,
 					pageIndex:1,
 				}).then((res) => {
 					uni.hideLoading();

+ 2 - 2
pages/projectDepartment/exportProcess/exportProcess.vue

@@ -15,7 +15,7 @@
 			</view>
 		</u-navbar>
 		
-		<scroll-view scroll-y="true" @scrolltolower="onReachBottom()">
+		
 			<view class="list1">
 			<view class="item"  v-for="(item,i) in list[current].list" @click="ckInfo(item.id,current)" :key="i">
 				<view class="title">
@@ -47,7 +47,7 @@
 			border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 	
-		</scroll-view>
+	
 	
 	</view>
 </template>

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

@@ -14,7 +14,7 @@
 			</view>
 		</u-navbar>
 		
-		<scroll-view scroll-y="true" @scrolltolower="onReachBottom()">
+		
 		<view class="list1" >
 			<view class="item"  v-for="(item,i) in list[current].list" @click="ckInfo(item.id,current)" :key="i">
 				<view class="title">
@@ -43,7 +43,7 @@
 			border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 		
-		</scroll-view>
+		
 		<view class="bottom"  >
 		
 			<u-button type="primary"  @click="addInfo">填写归还单</u-button>

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

@@ -303,9 +303,11 @@
 						</view>
 				
 				</view>
-			</view>
+			</view>
+			<u-divider  v-if="list.length==recordsTotal" border-color="#CFD2D5">已经到底了</u-divider>
+			
 		</view>
-
+		
 		<!-- 确认出库 -->
 		<view class="bottom" v-if="status==1">
 			<u-button type="primary" @click="gotoOut()">确认出库</u-button>
@@ -623,7 +625,15 @@
 					pageIndex: this.listFrom.pageIndex,
 				}).then((res) => {
 					uni.hideLoading();
-					this.list = res.data.data;
+				
+					if (this.listFrom.pageIndex == 1) {
+						this.list = res.data.data;
+					} else {
+						this.list = [
+							...this.list,
+							...res.data.data
+						];
+					}
 					this.recordsTotal = res.data.recordsTotal;
 				}).catch(error => {
 					uni.showToast({

+ 2 - 1
pages/storeManagement/equipmentDelivery/deliveryDetails.vue

@@ -130,7 +130,8 @@
 				</view>
 				
 			</view>
-
+			<u-divider  v-if="list.length==recordsTotal" border-color="#CFD2D5">已经到底了</u-divider>
+			
 		</view>
 		<approve-list ref="approveList"
 		:outRecordDetailObj="outRecordDetailObj"

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

@@ -9,7 +9,6 @@
 			</view>
 		</u-navbar>
 		
-		<scroll-view scroll-y="true" @scrolltolower="onReachBottom()">
 		
 		<view class="list1" >
 			<view class="item" v-for="(item,i) in list[current].list" @click="ckInfo(item.id)" :key="i" >
@@ -50,7 +49,7 @@
 		</view>
 		
 		
-		</scroll-view>
+		
 	</view>
 </template>
 

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

@@ -30,8 +30,7 @@
 				 </view>
 			</view>
 		</view>
-		<scroll-view scroll-y="true" @scrolltolower="onReachBottom()">
-		
+	
 		<view class="list1" >
 			<view class="item" v-for="(item,i) in list[current].list" @click="ckInfo(item.id)" :key="i" >
 				<view class="title">
@@ -77,7 +76,7 @@
 		</view>
 		
 		
-		</scroll-view>
+		
 	</view>
 </template>