ysy 2 жил өмнө
parent
commit
dc093f12c0

+ 8 - 8
pages.json

@@ -1338,14 +1338,6 @@
 			}
 		},
 
-		{
-			"path": "pages/pda/picking/add",
-			"style": {
-				"navigationBarTitleText": "领料",
-				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
-			}
-		},
 
 		{
 			"path": "pages/pda/material_return/index/index",
@@ -1413,6 +1405,14 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
+		},
+		{
+			"path" : "pages/pda/picking/components/instanceBom",
+			"style" : 
+			{
+				"navigationBarTitleText" : "",
+				"enablePullDownRefresh" : false
+			}
 		}
 
 

+ 0 - 130
pages/pda/picking/add.vue

@@ -1,130 +0,0 @@
-<template>
-	<view class="content-box">
-		
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="领料" background-color="#F7F9FA"
-			color="#404446" @clickLeft="back">
-			<block slot="right">
-				
-				<u-button
-				  type="success"
-				  size="small"
-				  class="u-reset-button"
-				  @click="openSearch"
-				  text="搜索"
-				></u-button>
-			
-			</block>
-			</uni-nav-bar>
-			
-
-
-		<view class="list_box">
-			<u-list @scrolltolower="scrolltolower">
-				<view v-for="(item,index) in 100" :key='index'>
-					{{item}}
-				</view>
-			</u-list>
-		</view>
-
-		<view class="bottom-wrapper">
-			<view class="btn_box rx-bc">
-				<view class="zdy_check rx-cc" @click='allChecked = !allChecked' :class="{ check_active : allChecked }">
-					<u-icon size="28" v-if='allChecked' name='checkbox-mark'></u-icon>
-				</view>
-				
-				
-		         <view>
-					 <u-button
-					   type="success"
-					   class="u-reset-button"
-					   @click="openSearch"
-					   text="确定添加"
-					 ></u-button>
-				 </view>
-				
-				
-			</view>
-		</view>
-
-
-
-	</view>
-
-
-
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-
-				allChecked: false,
-				searchFrom: {
-					keyWord: ''
-				}
-			}
-		},
-		methods: {
-
-			scrolltolower() {},
-
-			openSearch() {
-				uni.navigateTo({
-					url: '/pages/pda/workOrder/search/index'
-				})
-			},
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.content-box {
-		height: 100vh;
-		overflow: hidden;
-		display: flex;
-		flex-direction: column;
-		background-color: $page-bg;
-	}
-
-
-
-
-
-	.list_box {
-		flex: 1;
-		overflow: hidden;
-		padding: 4rpx 0;
-
-		.u-list {
-			height: 100% !important;
-		}
-	}
-
-	.btn_box {
-		height: 112rpx;
-		background: #fff;
-		padding: 0 32rpx;
-		
-		.zdy_check {
-			width: 30rpx;
-			height: 30rpx;
-			border: 2rpx solid #c8c9cc;
-			border-radius: 4rpx;
-		
-		
-		}
-		
-		.check_active {
-			background: $theme-color;
-			border: 2rpx solid $theme-color;
-		
-			/deep/ .u-icon__icon {
-				color: #fff !important;
-			}
-		}
-		
-	
-	}
-</style>

+ 96 - 0
pages/pda/picking/components/instanceBom.vue

@@ -0,0 +1,96 @@
+<template>
+	<view>
+
+
+		<view v-for="(item, index) in list" :key="index" @change="e => selectVal(e, item, index)">
+			<view class="listBox rx-bs">
+
+				<view class="delete" @click="getDelete(index)">
+					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="24" color="#fa3534"></uni-icons>
+				</view>
+
+				<view class="listBox-con">
+					<view class="listBox-top rx-bc">
+						<view> {{ item.assetName }}</view>
+						<view class="code">{{ item.assetCode}}</view>
+					</view>
+
+					<view class="listBox-bottom rx">
+						<view v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index" class="items">
+							{{ itm.label }}:{{ item[itm.prop] }}
+						</view>
+
+						<view class="items">
+							可用库存:{{ item.number }} {{item.unit}}
+						</view>
+
+					</view>
+
+				</view>
+
+
+
+
+
+			</view>
+
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		tableHeader
+	} from '../../common.js'
+	export default {
+		props: ['list'],
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+			tableH(type) {
+				return tableHeader(type)
+			},
+
+			getDelete(index) {},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.listBox {
+		padding: 14rpx 0;
+		border-bottom: 2rpx solid $border-color;
+
+
+
+
+
+		.listBox-con {
+			width: 630rpx;
+			font-weight: 400;
+		}
+
+		.listBox-top {
+			margin-top: 6rpx;
+			color: #090A0A;
+			font-size: 28rpx;
+			font-style: normal;
+		}
+
+		.listBox-bottom {
+			color: #090A0A;
+			font-size: 24rpx;
+			font-style: normal;
+			flex-wrap: wrap;
+
+			.items {
+				width: 50%;
+				margin-top: 6rpx;
+			}
+		}
+	}
+</style>

+ 50 - 32
pages/pda/picking/details.vue

@@ -14,15 +14,10 @@
 						</view>
 
 						<view class="right_box rx-ec">
-							
-							<u-button
-							  type="success"
-							  size="small"
-							  class="u-reset-button"
-							  @click="addPicking"
-							  text="添加物料"
-							></u-button>
-							
+
+							<u-button type="success" size="small" class="u-reset-button" @click="addPicking(item.id)"
+								text="添加物料"></u-button>
+
 						</view>
 
 					</view>
@@ -37,7 +32,8 @@
 							<view class="item">
 								<view class="lable rx-cc">物料编码</view>
 								<view class="content">
-									{{mate.categoryCode}}</view>
+									{{mate.categoryCode}}
+								</view>
 							</view>
 
 							<view class="item">
@@ -63,16 +59,21 @@
 
 
 							<view class="item">
-							
+
 								<view class="lable rx-cc">领料仓库</view>
-								<view class="content pd4" >
-									<zxz-uni-data-select :localdata="mate.warehouseList" v-model="mate.warehouseId" dataValue='id'
-										format='{name}' :clear='false'></zxz-uni-data-select>
+								<view class="content pd4">
+									<zxz-uni-data-select :localdata="mate.warehouseList" v-model="mate.warehouseId"
+										dataValue='id' format='{name}' :clear='false'></zxz-uni-data-select>
 								</view>
 							</view>
 
 						</view>
 					</view>
+
+					<view >
+					   <instanceBom :list='item.instanceList'></instanceBom>
+					</view>
+
 				</view>
 			</u-list>
 
@@ -82,23 +83,28 @@
 			<view class="btn_box" @click="save">确认</view>
 
 		</view>
-		
+
 
 
 	</view>
 </template>
 
 <script>
-	import { workorderList } from  '@/api/pda/workOrder.js'
+	import instanceBom from './components/instanceBom.vue'
+	import {
+		workorderList
+	} from '@/api/pda/workOrder.js'
 
 	export default {
-
+        components: {
+			instanceBom
+		},
 		data() {
 			return {
 				idsList: [],
 				List: [],
-				
-				 classificationList: [], //分类数据
+
+				classificationList: [], //分类数据
 
 
 			}
@@ -107,9 +113,25 @@
 			let queryArray = decodeURIComponent(options.arr);
 			this.idsList = JSON.parse(queryArray);
 
-	
+
 			this.getList()
 
+		},
+		onShow() {
+			uni.$off("setSelectList");
+
+			uni.$on("setSelectList", (selectList, id) => {
+				this.List.forEach(m => {
+					if (m.id == id) {
+						this.$set(m, 'instanceList', selectList)
+					}
+				})
+
+
+
+
+			});
+
 		},
 
 		methods: {
@@ -129,10 +151,10 @@
 				console.log(e)
 			},
 
-			addPicking() {
-              uni.navigateTo({
-              	url: '/pages/pda/picking/add'
-              })
+			addPicking(id) {
+				uni.navigateTo({
+					url: '/pages/pda/workOrder/search/index?id=' + id
+				})
 			},
 
 		},
@@ -162,7 +184,6 @@
 		.card_box {
 			padding: 16rpx 24rpx;
 
-
 		}
 
 
@@ -188,10 +209,7 @@
 			}
 		}
 
-		.right_box {
-	
-
-		}
+		.right_box {}
 
 
 		.material {
@@ -272,9 +290,9 @@
 							color: #404446;
 						}
 					}
-					
-					.pd4{
-							padding: 4rpx 8rpx;
+
+					.pd4 {
+						padding: 4rpx 8rpx;
 					}
 
 

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

@@ -45,6 +45,12 @@
 									class="items">
 									{{ itm.label }}:{{ item[itm.prop] }}
 								</view>
+								
+								<view 
+									class="items">
+									可用库存:{{ item.number }} {{item.unit}}
+								</view>
+								
 							</view>
 
 						</view>
@@ -70,8 +76,8 @@
 				</checkbox>
 			</view>
 			<view>
-				<u-button type="success" size="small" class="u-reset-button" :disabled="!checkListLen">
-					<view class="selBtn"> 选择( {{ checkListLen }} ) </view>
+				<u-button type="success" size="small" class="u-reset-button" :disabled="!checkListLen"  @click="jumpAdd">
+					<view > 选择( {{ checkListLen }} ) </view>
 				</u-button>
 			</view>
 		</view>
@@ -105,7 +111,9 @@
 				list: [],
 
 				seletedAll: false, //全选状态
-				memoList: []
+				memoList: [],
+				
+				pid: null, // 上个页面id
 			}
 		},
 
@@ -118,6 +126,7 @@
 		},
 
 		onLoad(option) {
+			this.pid =  option.id
 			this.getTreeList()
 		},
 
@@ -221,7 +230,13 @@
 				}
 				
 				
-			}
+			},
+			
+			//跳转回添加页面
+			jumpAdd () {
+			  uni.$emit('setSelectList', this.memoList, this.pid)
+			  uni.navigateBack()
+			},
 		}
 	}
 </script>
@@ -273,7 +288,8 @@
 	}
 
 	.listBox {
-		padding: 4rpx 24rpx;
+		margin-top: 8rpx;
+		padding: 8rpx 24rpx;
 		background: #fff;
 
 
@@ -284,7 +300,6 @@
 
 		.listBox-con {
 			width: 650rpx;
-
 			font-weight: 400;
 		}
 
@@ -303,7 +318,7 @@
 
 			.items {
 				width: 50%;
-				margin-top: 6rpx;
+				margin-top: 8rpx;
 			}
 		}
 	}