瀏覽代碼

小程序优化

zhengkaixin 2 年之前
父節點
當前提交
2e5f0284c2

+ 22 - 12
components/equipmentRetrieval.vue

@@ -1,22 +1,29 @@
 <template>
-	<view :class="{
+	<view  style="background-color: #fff;" :class="{
 		iscomponents:iscomponents==1
 	}">
 		
-		<u-navbar title="出库申请" v-show="false" ref="navbar" ></u-navbar>
+		<u-navbar title="设备检索"  ref="navbar"  v-if="iscomponents!=1" ></u-navbar>
 		
 		<!-- 搜索 -->
-		<view class="search" v-if="iscomponents!=1" >
-			<u-icon name="arrow-left" @click="back()"  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="搜索设备名称或型号" v-model="queryContent" :show-action="false">
+				<u-search  style="width: 630rpx;" :show-action="true" class="u-search"
+				v-model="queryContent" @search="form.pageIndex=1,getList()"
+				 placeholder="搜索设备名称或型号"
+				 action-text="搜索" :animation="true"></u-search>
+
+
+				<!-- <u-search class="u-search" placeholder="搜索设备名称或型号" v-model="queryContent" :show-action="false">
 
 				</u-search>
-				<view class="search-btn" @click="form.pageIndex=1,getList()" >
-					<view class="text">
-						搜索
-					</view>
-				</view>
+				 -->
+				 <view class="search-btn" @click="form.pageIndex=1,getList()" >
+				 	<view class="text">
+				 		搜索
+				 	</view>
+				 </view>
 			</view>
 		</view>
 		<view class="main">
@@ -315,11 +322,14 @@
 	page {
 		background-color: #fff;
 	}
+	
 	.iscomponents /deep/.u-search{
 		width: 630rpx !important;
 	}
+	 
 	// 搜索
 	.search {
+		
 		padding: 12rpx 24rpx;
 		display: flex;
 		border-radius: 8px;
@@ -331,8 +341,8 @@
 			overflow: hidden;
 		}
 		
-		/deep/.u-search {
-			width: 530rpx;
+		.u-search {
+			width: 630rpx;
 			margin: auto !important;
 			position: relative;
 			flex: 0;

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

@@ -75,7 +75,7 @@
 						{{item.deviceName}}
 					</view>
 					<view class="state">
-						预出库 <text>{{item.needCount}}</text>
+						{{recordItemStatus(item.status)}}: <text>{{item.needCount}}</text>
 					</view>
 				</view>
 				<view class="infos">
@@ -138,7 +138,7 @@
 <script>
 	import * as API from '@/apis/pagejs/projectDepartment.js'
 	import {
-		recordStatus,recordStatusColor
+		recordStatus,recordStatusColor,recordItemStatus
 	} from '@/apis/status.js'
 	import approveList from "@/components/ApproveList.vue"
 	
@@ -171,7 +171,7 @@
 		},
 		methods: {
 			recordStatusColor,
-			recordStatus,
+			recordStatus,recordItemStatus,
 			getList(){
 				
 				API.outRecordDeviceById({

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

@@ -73,7 +73,7 @@
 						{{item.deviceName}}
 					</view>
 					<view class="state">
-						预出库 <text>{{item.needCount}}</text>
+						{{recordItemStatus(item.status)}}: <text>{{item.needCount}}</text>
 					</view>
 				</view>
 				<view class="infos">
@@ -141,7 +141,7 @@
 <script>
 	import * as API from '@/apis/pagejs/approve.js'
 	import {
-		recordStatus
+		recordStatus,recordItemStatus
 	} from '@/apis/status.js'
 	import approveList from "@/components/ApproveList.vue"
 	
@@ -174,7 +174,7 @@
 			this.getInfo()
 		},
 		methods: {
-			recordStatus,
+			recordStatus,recordItemStatus,
 			getList(){
 				
 				API.outRecordDeviceById({

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

@@ -73,7 +73,7 @@
 						{{item.deviceName}}
 					</view>
 					<view class="state">
-						预出库 <text>{{item.needCount}}</text>
+						{{recordItemStatus(item.status)}}: <text>{{item.needCount}}</text>
 					</view>
 				</view>
 				<view class="infos" v-if="false">
@@ -132,7 +132,7 @@
 	import approveList from "@/components/ApproveList.vue"
 	
 	import {
-		recordStatus
+		recordStatus,recordItemStatus
 	} from '@/apis/status.js'
 	export default {
 		components: {
@@ -162,7 +162,7 @@
 			this.getInfo()
 		},
 		methods: {
-			recordStatus,
+			recordStatus,recordItemStatus,
 			getList(){
 				
 				API.outRecordDeviceById({

+ 35 - 1
pages/storeManagement/equipmentDelivery/deliveriedList.vue

@@ -169,7 +169,41 @@
 						22
 					</view>
 				</view>
-
+				<view class="prepare-out" v-if="item.realDeviceList&&item.realDeviceList.length">
+					<view class="head">
+						<view class="amount">
+							<view class="title">
+								实际领用:
+							</view>
+							<view class="value">
+								{{item.realDeviceList.length}}
+							</view>
+						</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="(item2,j) in item.realDeviceList"
+						v-show="j<2||item.show" :key="j">
+						<view class="item">
+							<view class="text">
+								设备编号:
+							</view>
+							<view class="number" >
+								
+								{{item2.deviceCode}}
+							</view>
+						</view>
+						
+					</view>
+				</view>
 				<view class="prepare-out" v-if="scanMap.get(item.deviceName)&&scanMap.get(item.deviceName).length">
 					<view class="head">
 						<view class="amount">

+ 73 - 5
pages/storeManagement/equipmentDelivery/deliveryDetails.vue

@@ -72,7 +72,11 @@
 						{{item.deviceName}}
 					</view>
 					<view class="state">
-						预出库 <text>{{item.needCount}}</text>
+						{{recordItemStatus(item.status)}}:
+						<text v-if="item.realDeviceList&&item.realDeviceList.length">
+							{{item.realDeviceList.length}}
+						</text>
+						 <text v-else >{{item.needCount}}</text>
 					</view>
 				</view>
 				
@@ -115,7 +119,16 @@
 					</view>
 				
 				</view>
-
+				<!-- 备注 -->
+				<view class="remark" v-if="false">
+					<view class="name">
+						备注:
+					</view>
+					<view class="value">
+						22
+					</view>
+				</view>
+				
 			</view>
 
 		</view>
@@ -136,7 +149,7 @@
 	import approveList from "@/components/ApproveList.vue"
 	
 	import {
-		recordStatus
+		recordStatus,recordItemStatus
 	} from '@/apis/status.js'
 	export default {
 		components: {
@@ -166,7 +179,7 @@
 			this.getInfo()
 		},
 		methods: {
-			recordStatus,
+			recordStatus,recordItemStatus,
 			getList(){
 				
 				API.outRecordDeviceById({
@@ -227,6 +240,7 @@
 	page {
 		padding-bottom: 200rpx;
 	}
+	
 
 	// 出库单状态
 	.head {
@@ -305,7 +319,61 @@
 		background-color: #fff;
 		margin-top: 24rpx;
 		padding: 22rpx 32rpx;
-
+		
+		
+		.prepare-out {
+			padding: 24rpx;
+			margin-top: 40rpx;
+			border-radius: 8px;
+			background-color: rgba(245, 246, 249, 1);
+		
+			.head {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				margin-bottom: 24rpx;
+		
+				.amount {
+					display: flex;
+					color: rgba(0, 81, 255, 1);
+					font-size: 32rpx;
+				}
+		
+				.unfold {
+					color: rgba(146, 158, 165, 1);
+					font-size: 24rpx;
+					position: relative;
+		
+					.u-icon--right {
+						margin-left: 8rpx;
+					}
+				}
+		
+				.option {
+					width: 160rpx;
+					height: 32rpx;
+					background-color: #fff;
+					position: absolute;
+					top: 30rpx;
+					right: 0;
+				}
+			}
+		
+			// 编号
+			.serial-number {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				margin-top: 16rpx;
+				color: rgba(51, 51, 51, 1);
+				font-weight: bold;
+		
+				.item {
+					display: flex;
+				}
+			}
+		
+		}
 		.list-head {
 			display: flex;
 			justify-content: space-between;

+ 6 - 1
uni_modules/uview-ui/components/u-search/u-search.vue

@@ -8,7 +8,8 @@
 				backgroundColor: bgColor,
 				borderRadius: shape == 'round' ? '100rpx' : '10rpx',
 				border: borderStyle,
-				height: height + 'rpx'
+				height: height + 'rpx',
+				width:width+ 'rpx',
 			}"
 		>
 			<view class="u-icon-wrap">
@@ -150,6 +151,10 @@ export default {
 			type: String,
 			default: ''
 		},
+		width: {
+			type: [Number, String],
+			default: 750
+		},
 		// 搜索框高度,单位rpx
 		height: {
 			type: [Number, String],