ysy 1 anno fa
parent
commit
62a345cf77

+ 55 - 36
pages/pda/feeding/single.vue

@@ -2,27 +2,27 @@
 	<view class="content-box">
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="出库单" background-color="#F7F9FA"
 			color="#404446" @clickLeft="back"></uni-nav-bar>
-			
-			
-			<view class="top-wrapper">
-				<view class="searchBox rx-bc">
-					<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
-			
-					<view class="rx-sc">
-					
-						<u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
-						</u-button>
-					</view>
-			
+
+
+		<view class="top-wrapper">
+			<view class="searchBox rx-bc">
+				<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
+
+				<view class="rx-sc">
+
+					<u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
+					</u-button>
 				</view>
+
 			</view>
-			
-			
+		</view>
+
+
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
 
-				<checkbox-group v-for="(item, index) in list" :key="index" @change="e => selectVal(e, item, index)">
+				<checkbox-group v-for="(item, index) in newList" :key="index" @change="e => selectVal(e, item, index)">
 					<label class="listBox rx-bs">
 
 						<view class="listBox-sel">
@@ -41,19 +41,15 @@
 									class="items" v-if="!itm.formatter">
 									<text>{{ itm.label }}</text>{{ item[itm.prop] }}
 								</view>
-							
-								<view 
-								v-if="[1,2, 9].includes(item.rootCategoryLevelId)"
-									class="items">
+
+								<view v-if="[1,2, 9].includes(item.rootCategoryLevelId)" class="items">
 									<text>物料代号</text> {{item.extInfo.materielCode }}
 								</view>
-								
-								<view
-									v-if="[1,2, 9].includes(item.rootCategoryLevelId)"
-									class="items">
+
+								<view v-if="[1,2, 9].includes(item.rootCategoryLevelId)" class="items">
 									<text>刻码</text> {{item.extInfo.engrave }}
 								</view>
-								
+
 
 							</view>
 
@@ -95,10 +91,11 @@
 				taskId: null,
 				id: null,
 				list: [],
+				newList: [],
 				memoList: [],
 
 				storageKey: null,
-				
+
 				keyWord: ''
 			}
 		},
@@ -147,7 +144,7 @@
 					taskId: this.taskId
 				}
 				feedOutInOrder(param).then(res => {
-					this.list.push(
+					this.newList.push(
 						...res.map(i => {
 							const checked =
 								this.memoList.findIndex(itm => itm.id === i.id) > -1
@@ -160,26 +157,48 @@
 						})
 					)
 				})
+				
+					this.list = this.newList
+				
 			},
-			
+
 			doSearch() {
-				 console.log(this.list)
+				let _arr = []
+			
+
+				_arr = this.list.filter(obj => {
+					if (obj.name.includes(this.keyWord) || obj.code.includes(this.keyWord) || obj.extInfo && obj
+						.extInfo.engrave.includes(this.keyWord) || obj.extInfo && obj.extInfo.materielCode
+						.includes(this.keyWord)) {
+						return true
+					} else {
+						return false
+					}
+				});
+				
+				this.newList = _arr 
+
+			
 			},
 
+
+
+
+
 			tableH(type) {
 				return tableHeader(type)
 			},
 
 			selectVal(e, val, index) {
-				this.list[index].checked = !this.list[index].checked
+				this.newList[index].checked = !this.newList[index].checked
 
 				const idx = this.memoList.findIndex(
-					item => item.id === this.list[index].id
+					item => item.id === this.newList[index].id
 				)
 
-				if (this.list[index].checked) {
+				if (this.newList[index].checked) {
 					if (idx === -1) {
-						this.memoList.push(this.list[index])
+						this.memoList.push(this.newList[index])
 					}
 				} else {
 					if (idx > -1) {
@@ -205,18 +224,18 @@
 		flex-direction: column;
 		background-color: $page-bg;
 	}
-	
+
 	.searchBox {
 		background-color: #dedede;
 		height: 90rpx;
 		padding: 0 20rpx;
-	
+
 		.menu_icon {
 			width: 60rpx;
 			height: 60rpx;
 			margin-right: 20rpx;
 		}
-	
+
 		input {
 			height: 70rpx;
 			width: 480rpx;
@@ -224,7 +243,7 @@
 			padding-left: 10rpx;
 			border-radius: 5rpx;
 		}
-	
+
 	}
 
 

+ 3 - 3
pages/pda/jobBooking/components/packingTgBom.vue

@@ -43,7 +43,7 @@
 
 
 
-				<view class="item rx-sc" v-if=" item.singleReport == 1">
+				<view class="item rx-sc" v-if="item.singleReport == 1">
 					<view class="rx ww50 ">
 						<view class="lable lable150 rx-cc ">物料代号</view>
 						<view class="content content_num">
@@ -95,7 +95,7 @@
 				</view>
 				
 				
-
+              
 				<view class="item rx-sc" v-if="item.singleReport == 0">
 
 					<view class="rx ww50">
@@ -127,7 +127,7 @@
 
 
 
-			<view class="content_table2" v-if="it.singleReport == 1">
+			<view class="content_table2" v-if="item.singleReport == 1">
 				<view class="head row rx-sc">
 					<view class="item ww25">工序重量{{it.extInfo.weightUnit}}</view>
 					<view class="item ww25">处置</view>