ysy 2 лет назад
Родитель
Сommit
7ca73b6da3

+ 13 - 0
api/pda/workOrder.js

@@ -85,3 +85,16 @@ export async function produceDetail(id) {
   }
   return Promise.reject(data.message);
 }
+
+
+// 工艺路线
+export async function  producerouting(params) {
+  const data = await get(
+   Vue.prototype.apiUrl  + `/main/producerouting/page`, params,  true,
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}
+

+ 8 - 0
pages.json

@@ -1432,6 +1432,14 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
+		},
+		{
+			"path" : "pages/pda/components/searchPopup",
+			"style" : 
+			{
+				"navigationBarTitleText" : "",
+				"enablePullDownRefresh" : false
+			}
 		}
 
 

+ 36 - 0
pages/pda/components/searchPopup.vue

@@ -0,0 +1,36 @@
+<template>
+	<view>
+		<u-popup :show="show" :mode='mode' :closeOnClickOverlay='false' >
+			<view>
+
+				<slot name="list"></slot>
+				<slot name="operate"></slot>
+
+
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			mode: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				show: true
+			}
+		},
+		methods: {
+		
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 0 - 1
pages/pda/picking/components/pickCard.vue

@@ -59,7 +59,6 @@
 
 
 
-
 			</view>
 			</label>
 

+ 0 - 1
pages/pda/picking/details.vue

@@ -148,7 +148,6 @@
 			scrolltolower() {},
 
 			save() {
-				console.log()
 				let _arr = []
 				 _arr = this.List.map(m => {
 					 m.workOrderId = m.id

+ 156 - 31
pages/pda/picking/index/index.vue

@@ -5,35 +5,41 @@
 		</uni-nav-bar>
 
 		<view class="top-wrapper">
-		<!-- 	<view class="tab_box rx-sc">
+			<!-- 	<view class="tab_box rx-sc">
 				<view class="tab_item" :class="{active: tabType == 1}" @click="handTab(1)">生产工单列表</view>
 				<view class="tab_item" :class="{active: tabType == 2}" @click="handTab(2)">领料工单列表</view>
 			</view> -->
 
 			<view class="nav_box rx-sc">
-				<view class="nav_item " :class="{active: pickStatus == 0}" @click="handNav(0)">未领料({{navObj.unclaimedQuantity}})</view>
-				<view class="nav_item" :class="{active: pickStatus == 1}" @click="handNav(1)">已领料({{navObj.claimedQuantity}})</view>
+				<view class="nav_item " :class="{active: pickStatus == 0}" @click="handNav(0)">
+					未领料({{navObj.unclaimedQuantity}})</view>
+				<view class="nav_item" :class="{active: pickStatus == 1}" @click="handNav(1)">
+					已领料({{navObj.claimedQuantity}})</view>
 				<view class="nav_item" :class="{active: pickStatus == 2}" @click="handNav(2)">已出库(0)</view>
-				
-				
-				
+
+				<view class="menu_box" @click="handleSearch">
+					<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+				</view>
+
+
+
 			</view>
 		</view>
 
 		<view class="list_box">
-     
+
 			<u-list @scrolltolower="scrolltolower">
 				<pickCard v-if='dataList.length' :list="dataList"> </pickCard>
-				
-				
-			    <view  v-else style='margin-top: 20vh;'>
-					<u-empty  iconSize='150'  textSize='32' text='暂无工单'>
+
+
+				<view v-else style='margin-top: 20vh;'>
+					<u-empty iconSize='150' textSize='32' text='暂无工单'>
 					</u-empty>
 				</view>
-				
+
 			</u-list>
 
-	
+
 
 		</view>
 
@@ -49,38 +55,99 @@
 				</u-button>
 			</view>
 		</view>
+
+
+		<SearchPopup mode="top" v-if='searchShow'>
+			<template v-slot:list>
+			   <view class="search_list">
+				   
+				   
+				   <u-form
+				     labelPosition="left"
+				     :model="formData"
+				     labelWidth="180"
+				     labelAlign="left"
+				     class="baseForm"
+				   >
+				   
+				   <u-form-item
+				     label="工艺路线:"
+				     class="required-form"
+				     borderBottom
+				     prop="assetType"
+				   >
+				   
+				   <zxz-uni-data-select :localdata="produceList" v-model="formData.produceRoutingId"
+				   	dataValue='id' format='{name}' ></zxz-uni-data-select>
+				   
+				   </u-form-item>
+				   
+				   </u-form>
+				   
+			   </view>
+			</template>
+
+			<template v-slot:operate>
+				<view class="operate_box rx-bc">
+					<u-button size="small" class="u-reset-button" @click="searchCancel">
+						重置
+					</u-button>
+
+
+					<u-button type="success" size="small" class="u-reset-button" @click="search">
+						确定
+					</u-button>
+
+				</view>
+			</template>
+
+		</SearchPopup>
+
+
 	</view>
 </template>
 
 <script>
 	import pickCard from '../components/pickCard.vue'
 	import {
-		workorderPage
+		workorderPage,
+		producerouting
 	} from '@/api/pda/workOrder.js'
-	
-	import { pickStatistics } from '@/api/pda/picking.js'
+
+	import {
+		pickStatistics
+	} from '@/api/pda/picking.js'
+	import SearchPopup from '../../components/searchPopup.vue'
 	let [isEnd] = [false]
 
 	export default {
 		components: {
-			pickCard
+			pickCard,
+			SearchPopup
 		},
 		data() {
 			return {
 				tabType: 1,
 				pickStatus: 0,
+				
+				formData: {
+					produceRoutingId: ''
+				},
 
-                navObj: {
+				navObj: {
 					unclaimedQuantity: 0,
 					claimedQuantity: 0
 				},
 
 				page: 1,
-				size: 5,
+				size: 10,
 
 				dataList: [],
+				produceList: [],
 				seletedAll: false, //全选状态
-				
+
+				searchShow: false,
+
 
 			}
 		},
@@ -93,20 +160,28 @@
 			}
 
 		},
-		
+
 		onLoad(option) {
 			this.pickStatus = option.pickStatus || 0
+			
+			this.produceFn()
 		},
 
 		onShow() {
 			this.page = 1
-				// this.dataList = []
+			// this.dataList = []
 			this.getList()
 			this.getpickTics()
 		},
-		
+
 
 		methods: {
+			
+			search() {
+				this.page = 1
+				this.getList()
+				this.searchShow = false
+			},
 
 
 			async getList() {
@@ -114,6 +189,7 @@
 					pageNum: this.page,
 					size: this.size,
 					pickStatus: this.pickStatus,
+					produceRoutingId: this.formData.produceRoutingId
 
 				}
 
@@ -136,7 +212,7 @@
 				isEnd = this.dataList.length >= res.count
 
 			},
-			
+
 			getpickTics() {
 				pickStatistics().then(res => {
 					this.navObj = res
@@ -153,7 +229,7 @@
 			handNav(type) {
 				if (type != this.pickStatus) {
 					this.pickStatus = type
-					
+
 					this.page = 1
 					this.dataList = []
 					this.getList()
@@ -184,12 +260,12 @@
 			},
 
 			jumpAdd() {
-				let url 
-			  	url = '/pages/pda/picking/details'
-				
+				let url
+				url = '/pages/pda/picking/details'
+
 				let arr = []
 				this.dataList.forEach(e => {
-					if(e.checked) {
+					if (e.checked) {
 						arr.push(e.id)
 					}
 				})
@@ -211,6 +287,30 @@
 				})
 				//_this.Scancodedate('res')
 			},
+
+
+			handleSearch() {
+				this.searchShow = true
+			},
+			
+			searchCancel() {
+				this.formData.produceRoutingId = ''
+				this.page = 1
+				this.getList()
+				this.searchShow = false
+			},
+			
+			produceFn() {
+				let param = {
+					pageNum: 1,
+					size: -1
+				}
+				producerouting(param).then(res => {
+					this.produceList = res.list
+					
+				})
+			},
+			
 		}
 	}
 </script>
@@ -250,6 +350,7 @@
 
 	.nav_box {
 		padding: 6rpx 32rpx;
+		position: relative;
 
 		.nav_item {
 			font-size: 28rpx;
@@ -263,6 +364,18 @@
 
 		}
 
+		.menu_box {
+			position: absolute;
+			right: 20rpx;
+			top: 10rpx;
+
+			.menu_icon {
+				width: 44rpx;
+				height: 44rpx;
+			}
+
+		}
+
 
 
 		.active {
@@ -294,7 +407,19 @@
 		}
 	}
 	
-	.load-more{
-		height: 100%;
+	
+	.search_list{
+		min-height: 100rpx;
+		
+		/deep/ .baseForm{
+			padding: 0 20rpx;
+		}
+	}
+
+	.operate_box{
+		padding: 10rpx 32rpx;
+		/deep/ .u-button{
+			width: 40%;
+		}
 	}
 </style>