Przeglądaj źródła

优化领料功能

ysy 2 lat temu
rodzic
commit
78f4210662

+ 2 - 1
api/pda/workOrder.js

@@ -205,4 +205,5 @@ export async function getNewVehicle(params) {
 		return data.data;
 	}
 	return Promise.reject(data.message);
-}
+}
+

+ 1 - 1
pages/pda/common.js

@@ -52,7 +52,7 @@ export const tableHeader = selectEquiType => {
 
 				},
 				{
-					label: '冲压次数',
+					label: '冲压次数',
 					prop: '',
 					formatter(row) {
 						return row.extInfo.startCyTimes || 0

+ 8 - 2
pages/pda/components/searchPopup.vue

@@ -1,7 +1,8 @@
 <template>
 	<view>
 		<u-popup :show="show" :mode='mode' :closeOnClickOverlay='false' >
-			<view>
+			
+			<view  :style="{paddingTop: mode == 'top' ?  topHight + 'px' : ''}">
 
 				<slot name="list"></slot>
 				<slot name="operate"></slot>
@@ -22,9 +23,14 @@
 		},
 		data() {
 			return {
-				show: true
+				show: true,
+				topHight: 20 || 20
 			}
 		},
+		created() {
+			let app = uni.getSystemInfoSync()
+			 this.topHight = app.statusBarHeight || 20
+		},
 		methods: {
 		
 		}

+ 9 - 2
pages/pda/components/workCard.vue

@@ -33,15 +33,22 @@
 		<view class="item_box rx-bc">
 			<view class="item_one perce50 rx-sc">
 				<view class="lable">生产数量:</view>
-				<view>{{item.formingWeight}}</view>
+				<view>{{item.formingNum}} {{item.unit}}</view>
 			</view>
+			<view class="item_one perce50 rx-sc">
+				<view>生产重量:</view>
+				<view>{{item.formingWeight}} {{item.weightUnit}}</view>
+			</view>
+		</view>
+
+
+	<view class="item_box rx-bc">
 			<view class="item_one perce50 rx-sc">
 				<view>状态:</view>
 				<view>{{statusList[item.status]}}</view>
 			</view>
 		</view>
 
-
 		<view class="item_box rx-sc">
 			<view class="item_one rx-sc">
 				<view class="lable">工艺路线:</view>

+ 8 - 1
pages/pda/feeding/components/feedBom.js

@@ -35,6 +35,13 @@ export const tableHeader = selectEquiType => {
 					write: false,
 					extInfo: false
 				},
+				
+				{
+					label: '模具编码',
+					prop: 'codeNumber',
+					write: false,
+					extInfo: false
+				},
 
 				{
 					label: '本次冲压数',
@@ -43,7 +50,7 @@ export const tableHeader = selectEquiType => {
 					extInfo: true
 				},
 				{
-					label: '冲压次数',
+					label: '冲压次数',
 					prop: 'startCyTimes',
 					write: false,
 					extInfo: true

+ 1 - 9
pages/pda/feeding/components/modelBom.vue

@@ -12,15 +12,7 @@
 
 		<view class="material ">
 
-			<view class="content_table">
-				<view class="item">
-					<view class="lable rx-cc">模具编号</view>
-					<view class="content">
-						{{ list[0] && list[0].codeNumber }}
-					</view>
-				</view>
-
-			</view>
+	
 
 			<view class="content_table" v-for="(item,index) in list" :key='index'>
 				<view class="item " v-for="(tab, tIdx) in tableH(5)" :key="tIdx">

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

@@ -43,7 +43,6 @@
 
 		<view class="bottom-wrapper">
 			<view class="btn_box" @click="save">一键报工</view>
-
 		</view>
 
 

+ 254 - 0
pages/pda/picking/components/boatBom.vue

@@ -0,0 +1,254 @@
+<template>
+	<view>
+		<view class="title_box rx-bc">
+			<view class="name">舟皿信息</view>
+		</view>
+
+
+		<view class="material rx-ss" v-for="(item,index) in newList" :key='index'>
+
+			<view class="left rx-ss" @click="getDelete(index)">
+				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
+			</view>
+			<view class='content_table'>
+				<view class="item">
+					<view class="lable rx-cc">名称</view>
+					<view class="content content_num">
+						{{ item.automatic == 1 ? item.name : item.categoryName}}
+					</view>
+				</view>
+
+
+
+				<view class="item">
+					<view class="lable rx-cc">编码</view>
+					<view class="content ">
+						{{ item.automatic == 1 ? item.code : item.categoryCode}}
+
+					</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">型号</view>
+					<view class="content">
+						{{item.modelType}}
+					</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">牌号</view>
+					<view class="content">
+						{{item.brandNum }}
+					</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">数量</view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="item.demandQuantity" type='digit'></input> {{ item.unit}}
+
+					</view>
+				</view>
+
+			</view>
+
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
+	import {
+
+		pageeLedgerMain,
+		assetPage
+	} from '@/api/pda/workOrder.js'
+	export default {
+		props: {
+			code: {
+				type: String,
+				default: ''
+			},
+
+			palletList: {
+				type: Array,
+				default: () => []
+			},
+
+			palletList2: {
+				type: Array,
+				default: () => []
+			}
+
+		},
+
+		watch: {
+
+			palletList2: {
+				immediate: true,
+				deep: true,
+				handler(newVal) {
+					this.newList = [...this.palletList, ...newVal]
+
+				}
+			}
+
+
+		},
+
+
+		data() {
+			return {
+				newList: []
+
+			}
+		},
+		created() {
+
+
+
+		},
+		methods: {
+
+
+
+			getDelete(idx) {
+				this.newList.splice(idx, 1)
+				this.$emit('hendDel', 'boatBom', this.code, this.newList)
+			},
+
+
+
+
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.title_box {
+		margin-top: 20rpx;
+
+		.name {
+			font-size: 28rpx;
+			font-style: normal;
+			font-weight: 400;
+			color: $theme-color;
+			padding-left: 20rpx;
+
+			position: relative;
+
+			&:before {
+				position: absolute;
+				content: '';
+				left: 0rpx;
+				top: 0rpx;
+				bottom: 0rpx;
+				width: 4rpx;
+				height: 28rpx;
+				background: $theme-color;
+				margin: auto;
+			}
+
+
+		}
+
+
+
+	}
+
+
+	.material {
+		margin-top: 10rpx;
+
+		.left {
+			width: 40rpx;
+		}
+
+		.content_table {
+			width: 652rpx;
+			border: 2rpx solid $border-color;
+
+			.item {
+				display: flex;
+				border-bottom: 2rpx solid $border-color;
+
+
+				.lable {
+					width: 132rpx;
+					text-align: center;
+					background-color: #F7F9FA;
+					font-size: 26rpx;
+					border-right: 2rpx solid $border-color;
+					flex-shrink: 0;
+				}
+
+				.lable150 {
+					width: 156rpx !important;
+					font-size: 24rpx;
+				}
+
+				.ww80 {
+					width: 80rpx;
+				}
+
+				.content {
+					width: 518rpx;
+					min-height: 64rpx;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					font-style: normal;
+					font-weight: 400;
+					padding: 18rpx 8rpx;
+					box-sizing: border-box;
+					word-wrap: break-word;
+					flex-grow: 1 !important;
+
+
+					.unit {
+						padding: 0 4rpx;
+						font-size: 24rpx;
+						color: #404446;
+					}
+
+
+
+				}
+
+				.content_num {
+					display: flex;
+					align-items: center;
+					padding: 0 4rpx;
+
+					/deep/ .uni-input-input {
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
+					}
+
+
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
+			}
+
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
+		}
+	}
+</style>

+ 268 - 0
pages/pda/picking/components/modelBom.vue

@@ -0,0 +1,268 @@
+<template>
+	<view>
+		<view class="title_box rx-bc">
+			<view class="name">模具信息</view>
+
+
+		</view>
+
+
+		<view class="material  rx-ss" v-for="(item,index) in newList" :key='index'>
+
+			<view class="left rx-ss" @click="getDelete(index)">
+				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
+			</view>
+
+			<view class="content_table">
+
+				<view class="item " v-for="(tab, tIdx) in tableH(5)" :key="tIdx">
+					
+					<view class="item " v-if="Array.isArray(tab.prop) && item.automatic == 2">
+						<view class="lable lable300 rx-sc"> {{ item[tab.prop[0]]  }}</view>
+						<view class="content">
+							{{ item[tab.prop[1]]  }}
+						</view>
+					</view>
+					
+					<view class="item " v-if="Array.isArray(tab.prop) && item.automatic == 1">
+						<view class="lable lable300 rx-sc"> {{ item['name']  }}</view>
+						<view class="content">
+							{{ item['code']  }}
+						</view>
+					</view>
+
+
+					<view class="item" v-if="!Array.isArray(tab.prop)">
+						<view class="lable lable300 rx-sc"> {{ tab.label  }}</view>
+						<view class="content content_num" v-if='tab.write'>
+							<input class="uni-input" v-model="tab.extInfo ?  item.extInfo[tab.prop]: item[tab.prop]"
+								type="digit"></input>
+						</view>
+						<view class="content" v-if='!tab.write'>
+							{{tab.extInfo ?  item.extInfo[tab.prop] : item[tab.prop]}}
+						</view>
+					</view>
+
+
+
+				</view>
+
+			</view>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		tableHeader
+	} from './pickBom.js'
+	export default {
+		props: {
+			code: {
+				type: String,
+				default: ''
+			},
+			modelList: {
+				type: Array,
+				default: () => []
+			},
+			modelList2: {
+				type: Array,
+				default: () => []
+			},
+
+		},
+
+		watch: {
+
+			modelList2: {
+				immediate: true,
+				deep: true,
+				handler(newVal) {
+					this.newList = [...this.modelList, ...newVal]
+
+				}
+			}
+
+
+		},
+		data() {
+			return {
+				newList: []
+			}
+		},
+		methods: {
+			tableH(type) {
+				return tableHeader(type)
+			},
+
+
+			getDelete(idx) {
+				this.newList.splice(idx, 1)
+				this.$emit('hendDel', 'modelBom',  this.code, this.newList)
+			},
+
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.title_box {
+		margin-top: 20rpx;
+		margin-bottom: 10rpx;
+
+		.name {
+			font-size: 28rpx;
+			font-style: normal;
+			font-weight: 400;
+			color: $theme-color;
+			padding-left: 20rpx;
+
+			position: relative;
+
+			&:before {
+				position: absolute;
+				content: '';
+				left: 0rpx;
+				top: 0rpx;
+				bottom: 0rpx;
+				width: 4rpx;
+				height: 28rpx;
+				background: $theme-color;
+				margin: auto;
+			}
+
+
+		}
+
+		.btn_box {
+			padding: 0 18rpx;
+			height: 60rpx;
+			background: $theme-color;
+			font-size: 26rpx;
+			font-style: normal;
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #fff;
+			border-radius: 4rpx;
+
+			.scan {
+				width: 34rpx;
+				height: 34rpx;
+				margin-right: 12rpx;
+
+			}
+
+		}
+
+	}
+
+
+	.material {
+
+
+		.left {
+			width: 40rpx;
+		}
+
+		.content_table {
+			width: 652rpx;
+			border: 2rpx solid $border-color;
+
+			.item {
+				display: flex;
+				border-bottom: 1rpx dotted $border-color;
+
+
+				.lable {
+					width: 132rpx;
+					text-align: center;
+					background-color: #F7F9FA;
+					font-size: 26rpx;
+					border-right: 2rpx solid $border-color;
+					flex-shrink: 0;
+				}
+
+				.lable150 {
+					width: 156rpx !important;
+					font-size: 24rpx;
+				}
+
+
+				.lable300 {
+					width: 300rpx !important;
+					padding-left: 14rpx;
+					font-size: 24rpx;
+				}
+
+
+				.ww80 {
+					width: 80rpx;
+				}
+
+				.content {
+					width: 518rpx;
+					min-height: 64rpx;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					font-style: normal;
+					font-weight: 400;
+					padding: 18rpx 8rpx;
+					box-sizing: border-box;
+					word-wrap: break-word;
+					flex-grow: 1 !important;
+
+
+					.unit {
+						padding: 0 4rpx;
+						font-size: 24rpx;
+						color: #404446;
+					}
+
+				}
+
+				.content_num {
+					display: flex;
+					align-items: center;
+					padding: 0 4rpx;
+
+					/deep/ .uni-input-input {
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
+					}
+
+
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
+			}
+
+
+			.bot_border {
+				border-bottom: 2rpx solid $theme-color;
+			}
+
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
+		}
+
+
+	}
+</style>

+ 42 - 0
pages/pda/picking/components/pickBom.js

@@ -0,0 +1,42 @@
+export const tableHeader = selectEquiType => {
+
+	// 1:物料;4:生产设备; 5:模具;6:备品备件; 7:周转车;8:舟皿;9:产品;10:消耗材料,11:干燥区,12.质检,13.包装材料,14.工装夹具 ,15.刀具 ,99.其他
+	switch (+selectEquiType) {
+
+		case 5:
+			return [{
+					label: '',
+					prop: ['categoryName', 'categoryCode'],
+					write: false,
+					extInfo: false
+				},
+
+			
+				// {
+				// 	label: '已冲压次数',
+				// 	prop: 'startCyTimes',
+				// 	write: false,
+				// 	extInfo: true
+				// },
+				
+
+				{
+					label: '最大冲压次数',
+					prop: 'maxCyTimes',
+					write: false,
+					extInfo: true
+				},
+
+
+
+			]
+
+
+
+
+	
+
+	}
+
+	return []
+}

+ 113 - 27
pages/pda/picking/details.vue

@@ -23,7 +23,7 @@
 
 					</view>
 
-					<view class="material rx-ss" v-for="(mate, idx) in item.bomDetailDTOS">
+					<view class="material rx-ss" v-for="(mate, idx) in item.bomList">
 						<view class="left rx-ss" @click="mate.checked = ! mate.checked">
 							<view class="zdy_check rx-cc" :class="{ check_active : mate.checked   }">
 								<u-icon size="28" v-if='mate.checked' name='checkbox-mark'></u-icon>
@@ -73,14 +73,17 @@
 					</view>
 
 					<view>
-						<instanceBom :list='item.instanceList'></instanceBom>
+						<instanceBom :list='item.instanceList2'></instanceBom>
 
 
-
-						<modelBom v-if='item.modelList.length != 0' :workOrderId='item.workOrderId'
-							:list='item.modelList'>
+						<modelBom :workOrderId='item.workOrderId' :modelList='item.modelList'
+							:modelList2='item.modelList2' :code='item.code' @hendDel='hendDel'>
 						</modelBom>
 
+						<boatBom :palletList='item.palletList' :palletList2='item.palletList2' :code='item.code'
+							@hendDel='hendDel'>
+						</boatBom>
+
 
 
 					</view>
@@ -102,7 +105,8 @@
 
 <script>
 	import instanceBom from './components/instanceBom.vue'
-	import modelBom from '../feeding/components/modelBom.vue'
+	import modelBom from './components/modelBom.vue'
+	import boatBom from './components/boatBom.vue'
 	import {
 		workorderList
 	} from '@/api/pda/workOrder.js'
@@ -114,7 +118,8 @@
 	export default {
 		components: {
 			instanceBom,
-			modelBom
+			modelBom,
+			boatBom
 		},
 		data() {
 			return {
@@ -123,7 +128,8 @@
 
 				classificationList: [], //分类数据
 
-				taskId: null
+				taskId: null,
+
 
 
 			}
@@ -145,21 +151,27 @@
 			uni.$on("setSelectList", (selectList, id) => {
 				this.List.forEach(m => {
 					if (m.workOrderId == id) {
-						let instanceList = [] // 投料
-						let modelList = [] // 模具
-
-						selectList.forEach(f => {
-							if (f.rootCategoryLevelId == 1) {
-								instanceList = instanceList.concat(f)
-							} else if (f.rootCategoryLevelId == 5) {
-								modelList = modelList.concat(f)
+						let instanceList2 = [] // 投料
+						let modelList2 = [] // 模具
+						let palletList2 = []
 
 
+						selectList.forEach(f => {
+							if (f.rootCategoryLevelId == 1) { // 投料
+								f.automatic = 1
+								instanceList2 = instanceList2.concat(f)
+							} else if (f.rootCategoryLevelId == 5) { // 模具
+								f.automatic = 1
+								modelList2 = modelList2.concat(f)
+							} else if (f.rootCategoryLevelId == 8) { // 舟皿
+								f.automatic = 1
+								palletList2 = palletList2.concat(f)
 							}
 						})
 
-						this.$set(m, 'instanceList', instanceList)
-						this.$set(m, 'modelList', modelList)
+						this.$set(m, 'instanceList2', instanceList2)
+						this.$set(m, 'modelList2', modelList2)
+						this.$set(m, 'palletList2', palletList2)
 					}
 				})
 
@@ -174,17 +186,23 @@
 			scrolltolower() {},
 
 			save() {
+
+
 				let _arr = []
 				_arr = this.List.map(m => {
-					if (m.bomDetailDTOS.length > 0) {
-						m.bomDetailDTOS = m.bomDetailDTOS.filter(f => f.checked)
+
+					if (m.bomList.length > 0) {
+						let bomList = m.bomList.filter(f => f.checked)
+						m['bomDetailDTOSList'] = [...bomList, ...m.modelList, ...m.palletList]
 					}
+					m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2]
+
 					return {
 						...m
 					}
-
 				})
 
+
 				batchSave(_arr).then(res => {
 					uni.navigateTo({
 						url: `/pages/pda/picking/index/index?pickStatus=1`,
@@ -194,32 +212,100 @@
 			},
 
 			getList() {
+
 				workorderList({
 					ids: this.idsList,
 					taskId: this.taskId
 				}).then(res => {
 
-
 					this.List = res.map(m => {
 						m.workOrderId = m.id
-						if (!m.hasOwnProperty('modelList')) {
-							m.modelList = [] // 模具
-						}
+						let modelList = []
+						let palletList = []
+						let bomList = []
+
+						m.bomDetailDTOS.forEach((f, i) => {
+
+							if (f.rootCategoryLevelId == 5) {
+								f.automatic = 2
+								modelList = modelList.concat(f)
+							}
+
+							if (f.rootCategoryLevelId == 8) {
+								f.automatic = 2
+								palletList = palletList.concat(f)
+							}
+							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8) {
+								f.automatic = 2
+								bomList = bomList.concat(f)
+							}
+
+						})
+
+
+
+						m['modelList'] = modelList
+						m['palletList'] = palletList
+						m['bomList'] = bomList
+
+						m['instanceList2'] = []
+						m['palletList2'] = []
+						m['modelList2'] = []
+
 						delete m.id
 						return {
 							...m
 						}
 					})
 
+
+
+
 				})
 			},
 
+			hendDel(type, code, list) {
+
+				if (type == 'modelBom') {
+					console.log(list.length)
+					if (list.length == 0) {
+
+					}
+					this.List.forEach(f => {
+						if (f.code == code) {
+							if (list.length == 0) {
+								f.modelList2 = []
+								f.modelList = []
+								return false
+							}
+							f.modelList2 = list.filter(t => t.automatic == 1)
+							f.modelList = list.filter(t => t.automatic == 2)
+						}
+					})
+				}
+				if (type == 'boatBom') {
+					this.List.forEach(f => {
+						if (f.code == code) {
+							if (list.length == 0) {
+								f.palletList2 = []
+								f.palletList = []
+								return false
+							}
+							f.palletList2 = list.filter(t => t.automatic == 1)
+							f.palletList = list.filter(t => t.automatic == 2)
+						}
+					})
+				}
+
+				this.$forceUpdate()
+
+			},
 
 
 			addPicking(id, item) {
 				const storageKey = Date.now() + "";
-
-				let arr = [...item.instanceList, ...item.modelList]
+				console.log(item)
+				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2]
 				uni.setStorageSync(storageKey, arr);
 				uni.navigateTo({
 					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=pick&taskId=${this.taskId}`

+ 2 - 4
pages/pda/workOrder/extrusionMolding/index.vue

@@ -56,14 +56,14 @@
 
 				<view class="item_list rx-bc">
 					<text class="lable">要求成型数量</text>
-					<text>{{info.formingNum }} </text>
+					<text>{{info.formingNum }} {{info.weightUnit}} </text>
 				</view>
 
 
 
 				<view class="item_list rx-bc">
 					<text class="lable">要求成型重量</text>
-					<text>{{ info.formingWeight }} KG</text>
+					<text>{{ info.formingWeight }} {{info.weightUnit}}</text>
 				</view>
 
 				<view class="item_list rx-bc">
@@ -293,7 +293,6 @@
 					}
 			
 				} else if (type == 'turnover') {
-					
 					url = '/pages/pda/turnover/index/index'
 					url += `?workOrderId=${this.info.id}&taskId=${taskId }&taskName=${taskName}`
 					uni.navigateTo({
@@ -309,7 +308,6 @@
 			produce() {
 				produceDetail(this.id).then(res => {
 					this.produceList = res.produceDetail
-
 				})
 			},
 		}

+ 91 - 7
pages/pda/workOrder/search/index.vue

@@ -14,7 +14,8 @@
 			<view class="searchBox rx-bc">
 				<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
 
-				<view>
+				<view class="rx-sc">
+					<image class="menu_icon" src="~@/static/pda/menu.svg" @click="handleSearch"></image>
 					<u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
 					</u-button>
 				</view>
@@ -119,6 +120,40 @@
 
 
 
+		<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="warehouseId">
+
+							<zxz-uni-data-select :localdata="warehouseList" v-model="formData.warehouseId"
+								dataValue='id' format='{name}' dataKey="name" filterable></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="doSearch">
+						确定
+					</u-button>
+
+				</view>
+			</template>
+
+		</SearchPopup>
+
 	</view>
 </template>
 
@@ -130,15 +165,19 @@
 	import {
 		treeByPid,
 		pageeLedgerMain,
-		assetPage
+		assetPage,
+		getWarehouseList
 	} from '@/api/pda/workOrder.js'
 
 
+	import SearchPopup from '../../components/searchPopup.vue'
+
+
 	let [isEnd] = [false]
 	export default {
 		components: {
 			baTreePicker,
-
+			SearchPopup
 		},
 		data() {
 			return {
@@ -161,6 +200,14 @@
 				pid: null, // 上个页面id
 				storageKey: null,
 
+				formData: {
+					produceRoutingId: ''
+				},
+				warehouseList: [],
+
+				searchShow: false,
+
+
 
 			}
 		},
@@ -176,7 +223,12 @@
 		onLoad(option) {
 			this.pid = option.id
 			this.isType = option.isType
-			this.taskId = option.taskId
+			if (option.taskId == 'undefined') {
+				this.taskId = null
+			} else {
+				this.taskId = option.taskId || null
+			}
+
 			if (option.storageKey) {
 				this.storageKey = option.storageKey
 
@@ -203,6 +255,8 @@
 			}
 
 			this.getTreeList()
+
+			this.getWarehouseFn()
 		},
 
 		onUnload() {
@@ -269,7 +323,6 @@
 			},
 
 			confirm(id, name, rootCategoryLevelId) {
-
 				this.rootCategoryLevelId = rootCategoryLevelId
 				this.categoryLevelId = id
 
@@ -281,6 +334,7 @@
 			doSearch() {
 				this.list = []
 				this.getList()
+				this.searchShow = false
 			},
 
 			scrolltolower() {
@@ -306,7 +360,8 @@
 				let URL = null
 				if (this.isType == 'pick') { // 领料
 					param.dimension = 1
-					URL = this.rootCategoryLevelId == 1 ? pageeLedgerMain : assetPage
+					// URL = this.rootCategoryLevelId == 1 ? pageeLedgerMain : assetPage
+					URL = pageeLedgerMain
 				} else if (this.isType == 'feed') { // 投料
 					URL = assetPage
 				} else if (this.isType == 'job') { // 报工
@@ -388,7 +443,16 @@
 
 			},
 
+			handleSearch() {
+				this.searchShow = true
+			},
 
+			searchCancel() {
+				this.list = []
+				this.page = 1
+				this.getList()
+				this.searchShow = false
+			},
 
 
 			//跳转回添加页面
@@ -414,6 +478,12 @@
 				}
 
 			},
+
+			getWarehouseFn() {
+				getWarehouseList().then(res => {
+					this.warehouseList = res
+				})
+			},
 		}
 	}
 </script>
@@ -432,9 +502,15 @@
 		height: 90rpx;
 		padding: 0 20rpx;
 
+		.menu_icon {
+			width: 60rpx;
+			height: 60rpx;
+			margin-right: 20rpx;
+		}
+
 		input {
 			height: 70rpx;
-			width: 540rpx;
+			width: 480rpx;
 			background: #f9f9f9 !important;
 			padding-left: 10rpx;
 			border-radius: 5rpx;
@@ -500,4 +576,12 @@
 
 		}
 	}
+
+	.search_list {
+		min-height: 100rpx;
+
+		/deep/ .baseForm {
+			padding: 0 20rpx;
+		}
+	}
 </style>