ysy 2 tahun lalu
induk
melakukan
06b128f479

+ 2 - 2
pages/index/index.vue

@@ -318,8 +318,8 @@
 				let list = JSON.parse(_list) || []
 			
 
-				if (list && list.length > 0) {
-					list.forEach(f => {
+				if (list[0] && list[0].children.length > 0) {
+					 list[0].children.forEach(f => {
 					if (f.path == "productionManage") {
 						this.productionList = f.children
 						

+ 22 - 5
pages/pda/jobBooking/components/packingBom.vue

@@ -64,9 +64,9 @@
 								{{ it.code }}
 							</view>
 							<view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck( idx, it)">
-								<image class="check" v-if='it.check' src='@/static/check.png'>
+								<image class="check" v-if='it.check == 1' src='@/static/check.png'>
 								</image>
-								<image class="check" v-if=' !it.check' src='@/static/check_no.png'>
+								<image class="check" v-if='it.check == 0 || it.check == null ' src='@/static/check_no.png'>
 								</image>
 							</view>
 
@@ -109,7 +109,7 @@
 						</view>
 						<view class="item ww10 rx-cc">
 							<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20"
-								color="#fa3534"></uni-icons>
+								color="#fa3534" @click="handclose(it)"></uni-icons>
 						</view>
 
 
@@ -366,13 +366,14 @@
 
 					return false
 				}
-				this.$set(this.splitList[idx], 'check', !it.check)
+				
+				this.$set(this.splitList[idx], 'check', it.check ? 0 : 1)
 
 				this.temporaryList = []
 
 
 				this.temporaryList = this.splitList.filter(e => {
-					return e.check
+					return e.check == 1
 				})
 				this.temporaryNum = 0
 				this.temporaryCount = 0
@@ -385,6 +386,22 @@
 
 
 			},
+			
+			
+			handclose(it) {
+				this.splitList.forEach(f => {
+					if(f.computeSize == it.computeSize) {
+						f.check = 0
+					}
+				})
+				
+				this.temporaryList = []
+				
+				
+				this.temporaryList = this.splitList.filter(e => {
+					return e.check == 1
+				})
+			},
 
 			getPackingDetailsTwo() {
 				let param = {

+ 2 - 2
pages/pda/jobBooking/index/index.vue

@@ -587,12 +587,12 @@
 					if (this.taskType == 4) {
 						uni.showModal({
 							title: '提示',
-							content: '打包完成是否去打包!',
+							content: '打包完成是否去入库!',
 							confirmText: '确认', //这块是确定按钮的文字
 							success: rr=> {
 								if (rr.confirm) {
 									uni.navigateTo({
-									url: `/pages/pda/warehousing/index?workOrderId=${this.id}&taskId=${taskId}&workReportId=${res}`
+									url: `/pages/pda/warehousing/index?workOrderId=${this.id}&taskId=${this.taskId}&workReportId=${res}`
 									})
 								} else {
 									uni.navigateBack()

+ 397 - 0
pages/pda/sample/components/reuseTurnoverBom.vue

@@ -0,0 +1,397 @@
+<template>
+	<view>
+
+
+
+		<view class="title_box rx-bc">
+			<view class="name">周转车 </view>
+		</view>
+
+		<view v-for="(item, index) in newList">
+		<!-- 	<view class="title_box rx-bc">
+				<view class="left rx-ss" @click="getDelete(index)">
+					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
+				</view>
+			</view> -->
+
+			<view class="content_table">
+				<view class="item rx-sc">
+					<view class="rx ww50 ">
+						<view class="lable ww80 rx-cc ">编号</view>
+						<view class="content rx-sc">
+							<view>{{item.code}}</view>
+						</view>
+					</view>
+
+					<view class="rx ww50">
+						<view class="lable rx-cc ww80">名称</view>
+						<view class="content rx-sc">
+							<view>{{item.name}}</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+
+
+			<view class="content_table2">
+				<view class="head row rx-sc">
+					<view class="item ww10">货位</view>
+					<view class="item ww25">工单编号</view>
+					<view class="item ww25">产品编码</view>
+					<view class="item ww20">数量PCS</view>
+					<view class="item ww20">回用PCS</view>
+				</view>
+
+				<view class="table">
+					<u-list @scrolltolower="scrolltolower" class="z_list">
+						<view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
+							<view class="item ww10">{{it.code}}</view>
+							<view class="item ww25" :class="{'color157': it.workOrderCode === wordItem.code}">
+								{{ it.workOrderCode }}
+							</view>
+							<view class="item ww25" :class="{'color157': it.categoryCode === wordItem.productCode}">
+								{{it.categoryCode}}
+							</view>
+
+							<view class="item ww20  ">
+								<text>{{Number(it.quantity) - Number(it.sampleNum) + Number((it.reuseNum || 0)) }}</text>
+							</view>
+
+							<view class="item ww20">
+								<input class="uni-input content_num" v-model="it.reuseNum" type="digit" @input="handleCompute"
+									></input>
+							</view>
+						</view>
+					</u-list>
+
+				</view>
+
+
+			</view>
+
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			},
+
+			wordItem: {
+				type: Object,
+				default: () => {}
+			},
+			
+			reuseNum: {
+				type: [String, Number],
+				default: ''
+			}
+
+		},
+
+		watch: {
+
+			list: {
+				immediate: true,
+				deep: true,
+				handler(newVal) {
+					this.$set(this.wordItem, 'reuseTurnover', newVal)
+					this.newList = newVal
+
+				}
+			},
+			
+			reuseNum: {
+				immediate: true,
+				deep: true,
+				handler(val) {
+					
+					this.newReuseNum = val
+					this.$forceUpdate()
+				
+				}
+			}
+		},
+
+
+		data() {
+			return {
+
+
+			}
+		},
+		created() {
+
+		},
+		methods: {
+			scrolltolower() {},
+			
+			handleCompute() {
+				let _count = 0
+				this.newList.forEach(f => {
+					if(f.extInfo && f.extInfo.positionList && f.extInfo.positionList.length > 0) {
+						 f.extInfo.positionList.forEach(o => {
+							if (Object.prototype.hasOwnProperty.call(o, 'reuseNum')) { 
+									_count = _count + Number(o.reuseNum)
+								
+							}
+						 })
+						
+					}
+				})
+				
+				if(this.newReuseNum != _count) {
+					   uni.showToast({
+					   	 title: `还余 (${this.newReuseNum - _count})未回用`,
+						 icon: 'none'
+					   })
+					
+				}
+			},
+			
+			
+		
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popup_box {
+		width: 88vw;
+		padding: 32rpx;
+
+
+	}
+
+
+
+	.operate_box {
+		margin-top: 32rpx;
+		padding: 10rpx 100rpx;
+
+		/deep/ .u-button {
+			width: 160rpx;
+		}
+	}
+
+
+	.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;
+			}
+
+
+		}
+
+		.left {
+			width: 40rpx;
+		}
+
+		.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;
+
+			}
+
+		}
+
+	}
+
+
+	.content_table {
+		margin-top: 8rpx;
+		width: 100%;
+		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;
+			}
+
+
+
+			.ww80 {
+				width: 80rpx;
+			}
+
+			.ww50 {
+				width: 50%;
+			}
+
+			.content {
+				width: 518rpx;
+				min-height: 64rpx;
+				font-size: 28rpx;
+				line-height: 28rpx;
+				font-style: normal;
+				font-weight: 400;
+				padding: 2rpx 8rpx;
+				box-sizing: border-box;
+				word-wrap: break-word;
+				flex-grow: 1 !important;
+				font-size: 24rpx;
+
+			}
+
+
+			&:last-child {
+				border-bottom: none;
+			}
+		}
+
+
+	}
+
+
+
+	.content_table2 {
+		width: 100%;
+
+
+		.row {
+			width: 100%;
+
+
+			.item {
+
+				color: #404446;
+				font-size: 28rpx;
+				padding-left: 12rpx;
+
+			}
+
+			.color157 {
+				color: $theme-color;
+			}
+
+			.ww20 {
+				width: 20%;
+			}
+
+			.ww25 {
+				width: 25%;
+			}
+
+
+
+			.ww30 {
+				width: 35%;
+
+			}
+
+			.ww15 {
+				width: 15%;
+
+			}
+
+			.ww10 {
+				width: 10%;
+			}
+		}
+
+		.head {
+			height: 64rpx;
+			background: #F7F9FA;
+			border-top: 2rpx solid #E3E5E5;
+			border-left: 2rpx solid #E3E5E5;
+
+			.item {
+				height: 64rpx;
+				line-height: 64rpx;
+				border-right: 2rpx solid #E3E5E5;
+				box-sizing: border-box;
+				font-size: 24;
+			}
+		}
+
+
+
+		.tr {
+			border-top: 2rpx solid #E3E5E5;
+			border-left: 2rpx solid #E3E5E5;
+
+
+			.item {
+				font-size: 24rpx;
+				min-height: 64rpx;
+				display: flex;
+				align-items: center;
+				border-right: 2rpx solid #E3E5E5;
+				box-sizing: border-box;
+				white-space: normal;
+				word-break: break-all;
+
+			}
+
+			&:last-child {
+				border-bottom: 2rpx solid #E3E5E5;
+
+			}
+		}
+	}
+
+
+	.content_num {
+		display: flex;
+		align-items: center;
+		padding: 0 4rpx;
+
+		/deep/ .uni-input-input {
+			border: 2rpx solid #F0F8F2;
+			background: #F0F8F2;
+			color: $theme-color;
+		}
+
+	}
+
+	.z_list {
+		max-height: 500rpx;
+	}
+</style>

+ 21 - 18
pages/pda/sample/components/sampleBom.vue

@@ -74,24 +74,24 @@
 
 				<view class="table">
 
-					<view class="tr row rx-sc" v-for="(item, index) in item.sampleList" :key='index'>
+					<view class="tr row rx-sc" v-for="(it, index) in item.sampleList" :key='index'>
 
 
 						<view class="item ww15 content_num">
-							{{ item.selectType == 1 ? '回用' : item.selectType == 2 ? '入库' : ''  }}
+							{{ it.selectType == 1 ? '回用' : it.selectType == 2 ? '入库' : ''  }}
 						</view>
 
 						<view class="item ww20 content_num">
-							<input class="uni-input" v-if='!isDetails' v-model="item.num"></input>
-							<view v-else> {{ item.num }}</view>
+							<input class="uni-input" v-if='!isDetails' v-model="it.num" @input="hendleReuseNum(it)"></input>
+							<view v-else> {{ it.num }}</view>
 						</view>
 
 						<view class="item ww55  content_num">
 							<zxz-uni-data-select :localdata="warehouseList" :disabled="isDetails"
-								v-if='item.selectType != 1' v-model="item.warehouseId" dataValue='id' dataKey="name"
+								v-if='it.selectType != 1' v-model="it.warehouseId" dataValue='id' dataKey="name"
 								filterable format='{name}'></zxz-uni-data-select>
 
-							<view v-if="item.selectType == 1"  @click="scanTurnover(item,index)" class="turnover_btn"> 扫周转车</view>
+							<view v-if="it.selectType == 1"  class="turnover_btn"> </view>
 						</view>
 						<view class="item ww15">
 							<view class="left rx-ss" @click="getDelete(index)">
@@ -149,6 +149,9 @@
 
 
 		</u-popup>
+		
+		
+
 
 
 	</view>
@@ -156,12 +159,14 @@
 
 <script>
 	import {
-
 		getWarehouseList,
-
 	} from '@/api/pda/workOrder.js'
 
+
 	export default {
+		components: {
+		
+		},
 		props: {
 			item: {
 				type: Object,
@@ -275,6 +280,8 @@
 						 	})
 						 	return false
 						 } else {
+							
+							  this.$set(this.item, 'showReuseTurnover', true)
 							 this.item.sampleList.push({
 							 	selectType: this.selectType,
 							 	num: null,
@@ -311,18 +318,14 @@
 				this.item.sampleList.splice(idx, 1)
 			},
 			
-			
-			scanTurnover(item, index) {
-				console.log(item)
-				if(item.num) {
-					
-				} else {
-				uni.showToast({
-					icon: 'none',
-					title: ''
-				})	
+			hendleReuseNum(it) {
+				if(it.selectType == 1) {
+						this.$set(this.item, 'reuseNum', it.num)
 				}
+			
 			},
+			
+
 
 		}
 	}

+ 22 - 9
pages/pda/sample/index/index.vue

@@ -14,14 +14,20 @@
 						@handleScan='handleScan'>
 					</turnoverBom>
 
+					<view class="operate_box rx-sc">
+						<u-button size="small" class="u-reset-button" type="success" @click="handAdd">手动添加</u-button>
+					</view>
 
 
 
-					<sampleBom :item='item.quality' v-if='item.quality' :isDetails='false' :turnoverList='item.turnover'></sampleBom>
+					<sampleBom :item='item.quality' v-if='item.quality' :isDetails='false'
+						:turnoverList='item.turnover'></sampleBom>
+
+
+					<reuseTurnoverBom v-if='item.quality.showReuseTurnover' :list='item.turnover' :wordItem='item'
+						:reuseNum='item.quality.reuseNum'>
+					</reuseTurnoverBom>
 
-					<view class="operate_box rx-sc">
-						<u-button size="small" class="u-reset-button" type="success" @click="handAdd">手动添加</u-button>
-					</view>
 
 
 				</view>
@@ -48,6 +54,7 @@
 	import workOrderBom from '../../feeding/components/workOrderBom.vue'
 	import sampleBom from '../components/sampleBom.vue'
 	import turnoverBom from '../components/turnoverBom.vue'
+	import reuseTurnoverBom from '../components/reuseTurnoverBom.vue'
 	import {
 		batchSave
 	} from '@/api/pda/feeding.js'
@@ -55,7 +62,8 @@
 		components: {
 			workOrderBom,
 			sampleBom,
-			turnoverBom
+			turnoverBom,
+			reuseTurnoverBom
 		},
 		data() {
 			return {
@@ -74,7 +82,7 @@
 			this.id = options.workOrderId
 			this.taskId = options.taskId
 			this.getList()
-		
+
 		},
 		onShow() {
 			uni.$off("setSelectList");
@@ -109,6 +117,9 @@
 						m.workOrderId = m.id
 						if (m.quality) {
 							m.quality['sampleList'] = []
+							m['reuseTurnover'] = [],
+								m.quality['showReuseTurnover'] = false,
+								m.quality['reuseNum'] = 0
 						} else {
 							this.isLastJob = false
 						}
@@ -116,7 +127,7 @@
 
 						if (Object.prototype.hasOwnProperty.call(m, 'turnover')) {
 							m['turnover'] = []
-								this.getSampleTurnover()
+							this.getSampleTurnover()
 						}
 
 						m.feedType = 2
@@ -127,8 +138,8 @@
 					})
 				})
 			},
-			
-			getSampleTurnover(){
+
+			getSampleTurnover() {
 				let param = {
 					workOrderId: this.id,
 					taskId: this.taskId
@@ -213,6 +224,8 @@
 					return false
 				}
 
+
+
 				batchSave(this.List).then(res => {
 					uni.navigateBack()
 

+ 77 - 408
pages/pda/warehousing/components/packingBom.vue

@@ -1,205 +1,107 @@
 <template>
 
 	<view>
-		<view class="title_box rx-bc">
-			<view class="name">内包装</view>
-		</view>
-
-		<view class="material ">
-
-			<view class="content_table">
-				<view class="item">
-					<view class="lable rx-cc">包装总数</view>
-					<view class="content content_num">
-						<input class="uni-input" v-model="formedNumLast" type='digit'></input>
-						<view class="unit">{{objData.unit}}</view>
-					</view>
-				</view>
-
-				<view class="item rx-sc">
-					<view class="rx ww55 ">
-						<view class="lable lable150 rx-cc ">内包装单元</view>
-						<view class="content content_num">
-							<input class="uni-input" v-model="quantity"></input>
-
-						</view>
-					</view>
-
-					<view class="rx ww45">
-						<view class="rx-cc ww80">
-							<view style="max-width: 100rpx; font-size: 24rpx;">{{objData.unit}}</view>/
-						</view>
-						<view class="content rx-sc">
-							<zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key' format='{Value}'
-								dataKey="Key" filterable :clear='false'></zxz-uni-data-select>
-
-							<view class="penalize" @click="handleSplit">确认</view>
-						</view>
-					</view>
-
-				</view>
-
-			</view>
-
-
-
-
-			<view class="content_table2" v-if='splitList.length'>
-				<view class="head row rx-sc">
-					<view class="item ww10">序号</view>
-					<view class="item ww30">数量</view>
-					<view class="item ww50">条码</view>
-					<view class="item ww10"></view>
-				</view>
-
-				<view class="table">
-					<u-list @scrolltolower="scrolltolower" class="z_list">
-						<view class="tr row rx-sc" v-for="(it, idx) in splitList" :key='idx'>
-							<view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
-							<view class="item ww30 content_num rx-sc">
-								<input class="uni-input" v-model="it.quantity" type="digit"></input>
-								<view style="width: 260rpx; font-size: 22rpx;"> {{objData.unit}}/ {{it.unit}}</view>
-							</view>
-							<view class="item ww50">
-								{{ it.code }}
-							</view>
-							<view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck( idx, it)">
-								<image class="check" v-if='it.check' src='@/static/check.png'>
-								</image>
-								<image class="check" v-if=' !it.check' src='@/static/check_no.png'>
-								</image>
-							</view>
-
-						</view>
-
-					</u-list>
-				</view>
-			</view>
-
-
-
-		</view>
 
 
 		<view class="material ">
-
 			<view class="title_box rx-bc">
 				<view class="name">外包装</view>
 			</view>
 
 
-			<view class="content_table2" v-if='temporaryList.length'>
+			<!-- 外包装  列表-->
+			<view class="content_table2" v-if="objData.packingReportList.length> 0">
 				<view class="head row rx-sc">
 					<view class="item ww10">序号</view>
 					<view class="item ww30">数量</view>
 					<view class="item ww50">条码</view>
-					<view class="item ww10"></view>
+					<view class="item ww10 selectAll" @click="handOneCheck">{{ oneCheck ?   '取消' : '全选'}}</view>
 				</view>
 
 				<view class="table">
-
-					<view class="tr row rx-sc" v-for="(it, idx) in temporaryList" :key='idx'>
+					<view class="tr row rx-sc " v-for="(it, idx) in objData.packingReportList" :key='idx' @click="handleCheck(idx, it)">
 						<view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
 						<view class="item ww30 content_num rx-sc">
-							<input class="uni-input" v-model="it.quantity" disabled type="digit"></input>
-							<view style="width: 260rpx; font-size: 22rpx;"> {{objData.unit}}/ {{it.unit}}</view>
+							{{it.packingNum}} / {{ it.unit }}  {{it.quantity}}/ {{ it.childList[0].unit }} 
 						</view>
+
 						<view class="item ww50">
 							{{ it.code }}
 						</view>
-						<view class="item ww10 rx-cc">
-							<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20"
-								color="#fa3534"></uni-icons>
+						<view class="item ww10 rx-cc" >
+							<image class="check" v-if='it.check' src='@/static/check.png'>
+							</image>
+							<image class="check" v-if=' !it.check' src='@/static/check_no.png'>
+							</image>
 						</view>
 
-
 					</view>
 
-					<view class="tr row rx-sc">
-						<view class="item ww10 rx-cc ">合并</view>
-						<view class="item ww90  rx-sc">
-							总共{{temporaryCount}} {{objData.unit}} / {{this.temporaryNum}} {{unit}}
-							--打包成 1
-							<zxz-uni-data-select :localdata="unitList" v-model="packUnit" dataValue='Key'
-								format='{Value}' dataKey="Key" filterable :clear='false'></zxz-uni-data-select>
 
-							<view class="penalize" @click="handlePack">打包</view>
+				</view>
+
+			</view>
 
-						</view>
 
 
-					</view>
 
+		</view>
 
 
-				</view>
-			</view>
 
+		<view class="material ">
 
+			<view class="title_box rx-bc">
+				<view class="name">内包装</view>
+			</view>
 
 
-			<!-- 外包装  列表-->
-			<view class="content_table2" v-if='packTwoList.length > 0'>
+			<view class="content_table2" v-if='objData.packingReportMarginList.length'>
 				<view class="head row rx-sc">
 					<view class="item ww10">序号</view>
 					<view class="item ww30">数量</view>
-
 					<view class="item ww50">条码</view>
-					<view class="item ww10"></view>
+					<view class="item ww10 selectAll"  @click="handTwoCheck">{{ twoCheck ?   '取消' : '全选'}}</view>
 				</view>
 
 				<view class="table">
-					<view class="tr row rx-sc " v-for="(it, idx) in packTwoList" :key='idx'>
-						<view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
-						<view class="item ww30 content_num rx-sc">
-							{{ it.quantity}} {{ objData.unit }} / {{it.unit}}
-						</view>
-
-
-
-						<view class="item ww50">
-							{{ it.code }}
-						</view>
-						<view class="item ww10 rx-cc">
+					<u-list @scrolltolower="scrolltolower" class="z_list">
+						<view class="tr row rx-sc" v-for="(it, idx) in objData.packingReportMarginList" :key='idx' @click="handleCheckTwo(idx, it)">
+							<view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
+							<view class="item ww30 content_num rx-sc">
+								<view>{{ it.quantity }}/ {{it.unit}} </view>
+							</view>
+							<view class="item ww50">
+								{{ it.code }}
+							</view>
+							<view class="item ww10 rx-cc" >
+								<image class="check" v-if='it.check' src='@/static/check.png'>
+								</image>
+								<image class="check" v-if=' !it.check' src='@/static/check_no.png'>
+								</image>
+							</view>
 
 						</view>
 
-
-					</view>
-
-
+					</u-list>
 				</view>
-
 			</view>
 
 
 
+		</view>
 
 
 
 
 
 
-		</view>
-
-
-
 
 
 	</view>
 </template>
 
 <script>
-	import {
-		getByCode
-	} from '@/api/pda/common.js'
-	import {
-		packingReport,
-		getPackingReport,
-
-		packingReportRepeat,
-		getPackingReportRepeat
-	} from '@/api/pda/workOrder.js'
 	export default {
 		props: {
 			objData: {
@@ -207,237 +109,74 @@
 				default: () => {}
 			},
 
-			taskId: {
-				type: String,
-				default: ''
-			},
-
-			workOrderId: {
-				type: String,
-				default: ''
-			}
 		},
 		data() {
 			return {
-				formedNumLast: 0,
-
-				quantity: '',
-				unit: '',
-
-				unitList: [],
-
-				splitList: [],
-
-
-
-				packUnit: null,
-				temporaryNum: 0,
-				temporaryCount: 0,
-				temporaryList: [],
-				packTwoList: []
-
-
-
+				oneCheck: false,
+				twoCheck: false,
 
 
 			}
 		},
 
 		created() {
-			this.formedNumLast = this.objData.formedNumLast
-			this.byCode(),
+			
 
-				this.getPackingDetails()
-			this.getPackingDetailsTwo()
 		},
 
 		methods: {
-			byCode() {
-				getByCode('packing_unit').then(res => {
-
-					this.unitList = []
-
-					res.forEach((obj, index) => {
-						for (let key in obj) {
-							if (obj.hasOwnProperty(key)) { // 确保key是对象自身的属性
-
-								this.unitList.push({
-									Key: `${key}`,
-									Value: ` ${obj[key]}`
-								})
-
-
-							}
-						}
-					});
-
-				})
-			},
-
-
-			getPackingDetails() {
-				let param = {
-					workOrderId: this.workOrderId,
-					taskId: this.taskId,
-					tier: 1
-				}
-
-				getPackingReport(param).then(res => {
-
-					this.splitList = res.detailList
-					this.formedNumLast = res.totalQuantity
-					this.quantity = res.quantity
-					this.unit = res.unit
-
-
-				})
-			},
-
 
 
-			handleSplit() {
-
-				if (this.splitList.length) {
-					uni.showToast({
-						title: '产品已分包',
-						icon: 'none'
+			handOneCheck() {
+		
+				if (this.oneCheck) {
+					this.oneCheck = false
+					this.objData.packingReportList.forEach(e => {
+						e.check = false
 					})
-					return false
-				}
-
-
-
-				if (!this.formedNumLast) {
-					uni.showToast({
-						title: '包装总数数量不能为空',
-						icon: 'none'
+				} else {
+					this.oneCheck = true
+					this.objData.packingReportList.forEach(e => {
+						e.check = true
 					})
-					return false
-				}
-
-				if (!this.quantity) {
-					uni.showToast({
-						title: '内包装单元数量不能为空',
-						icon: 'none'
-					})
-					return false
-				}
-
-				if (!this.unit) {
-					uni.showToast({
-						title: '请选择包装单位',
-						icon: 'none'
-					})
-					return false
-				}
-
-				let param = {
-					totalQuantity: this.objData.formedNumLast,
-					quantity: this.quantity,
-					unit: this.unit,
-					workOrderId: this.workOrderId,
-					taskId: this.taskId,
-					tier: 1
 				}
-				packingReport(param).then(res => {
-					this.splitList = res.map(m => {
-
-						return {
-							check: false,
-							...m
-						}
-					})
-
-					this.getPackingDetails()
-				})
-
-
+				this.$forceUpdate()
 			},
 
 			handleCheck(idx, it) {
-
-
-
-				if (it.quantity <= 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '数量为空不能勾选'
+				this.$set(this.objData.packingReportList[idx], 'check', !it.check)
+				this.$forceUpdate()
+			},
+			
+			
+			handTwoCheck() {
+				if (this.twoCheck) {
+					this.twoCheck = false
+					this.objData.packingReportMarginList.forEach(e => {
+						e.check = false
 					})
-
-					return false
-				}
-				this.$set(this.splitList[idx], 'check', !it.check)
-
-				this.temporaryList = []
-
-
-				this.temporaryList = this.splitList.filter(e => {
-					return e.check
-				})
-				this.temporaryNum = 0
-				this.temporaryCount = 0
-				if (this.temporaryList.length > 0) {
-					this.temporaryList.forEach(e => {
-						this.temporaryNum = this.temporaryNum + 1
-						this.temporaryCount = this.temporaryCount + Number(e.quantity)
+				} else {
+					this.twoCheck = true
+					this.objData.packingReportMarginList.forEach(e => {
+						e.check = true
 					})
 				}
-
-
+				this.$forceUpdate()
 			},
-
-			getPackingDetailsTwo() {
-				let param = {
-					totalQuantity: this.objData.formedNumLast,
-					quantity: this.quantity,
-					unit: this.unit,
-					workOrderId: this.workOrderId,
-					taskId: this.taskId,
-					tier: 2,
-
-				}
-				getPackingReportRepeat(param).then(res => {
-					this.packTwoList = res.detailList
-				})
+			handleCheckTwo(idx, it) {
+				this.$set(this.objData.packingReportMarginList[idx], 'check', !it.check)
+				this.$forceUpdate()
 			},
 
-			handlePack() {
-				let param = {
-					detailList: this.temporaryList,
-					quantity: this.temporaryCount,
-					totalQuantity: this.formedNumLast,
-					unit: this.packUnit,
-					taskId: this.taskId,
-					workOrderId: this.workOrderId,
-					tier: 2
-				}
 
-				packingReportRepeat(param).then(res => {
-					this.temporaryList = []
-					this.getPackingDetails()
-					this.getPackingDetailsTwo()
-				})
-			},
+
 
 
 			scrolltolower() {
 
 			},
 
-			getData() {
-				let _packingReportMarginList = []
-
-				_packingReportMarginList = this.splitList.filter(e => {
-					return !e.parentId
-				})
 
-				let packInfo = {
-					packingReportList: this.packTwoList,
-					packingReportMarginList: _packingReportMarginList,
-					formedNumLast: this.formedNumLast
-				}
-				return packInfo
-			},
 		},
 	}
 </script>
@@ -474,81 +213,6 @@
 		margin-top: 10rpx;
 
 
-
-		.content_table {
-			width: 100%;
-			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;
-				}
-
-				.lable220 {
-					width: 220rpx !important;
-					font-size: 24rpx;
-				}
-
-				.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;
-					}
-
-
-
-				}
-
-
-
-				&:last-child {
-					border-bottom: none;
-				}
-			}
-
-
-
-			.ww55 {
-				width: 55%;
-			}
-
-			.ww45 {
-				width: 45%;
-			}
-
-
-		}
 	}
 
 
@@ -613,6 +277,11 @@
 				border-right: 2rpx solid #E3E5E5;
 				box-sizing: border-box;
 			}
+
+			.selectAll {
+				color: $theme-color;
+				font-size: 24rpx;
+			}
 		}
 
 
@@ -673,6 +342,6 @@
 	}
 
 	.z_list {
-		max-height: 500rpx;
+		max-height: 300rpx;
 	}
 </style>

+ 41 - 10
pages/pda/warehousing/index.vue

@@ -15,12 +15,12 @@
 							dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
 					</view>
 
-                     <view>
-						 
-						 <packingBom></packingBom>
-						 
-					 </view>
-					
+					<view class="list_box" v-for="(item, index) in List" :key="index">
+						<view class="time">打包时间: {{item.createTime}}</view>
+						<packingBom :objData="item.extInfo"></packingBom>
+
+					</view>
+
 				</view>
 			</u-list>
 		</view>
@@ -36,7 +36,8 @@
 
 <script>
 	import {
-		getByIdReport
+		getByIdReport,
+		jobSave
 
 	} from '@/api/pda/jobBooking.js'
 
@@ -60,7 +61,7 @@
 				objData: {},
 				warehouseList: [],
 				warehouseId: null,
-				
+
 				List: []
 			}
 		},
@@ -80,6 +81,15 @@
 			getList() {
 				getByIdReport(this.id, this.taskId).then(res => {
 					this.objData = res
+					
+					this.objData.workReportInfo = {
+						formingNum: null,
+						formingWeight: null,
+						formedNum: null,
+						formedWeight: null,
+						taskId: this.taskId
+					
+					}
 
 				})
 			},
@@ -94,13 +104,13 @@
 				let param = {
 					workOrderId: this.id,
 					taskId: this.taskId,
-					workReportId: this.workReportId || '1780209440937308162'
+					workReportId: this.workReportId
 
 				}
 				listPDAToWarehouse(param).then(res => {
 					console.log(res)
 					this.List = res
-					
+
 				})
 			},
 
@@ -115,7 +125,20 @@
 						icon: 'none',
 						title: '请先选择入库仓库'
 					})
+					return false
+				}
+				let storageInfo = {
+					warehouseId: this.warehouseId,
+					toWarehouseList: this.List,
+
 				}
+				this.objData['storageInfo'] = storageInfo
+
+
+				jobSave(this.objData).then(res => {
+					uni.navigateBack()
+				})
+
 			},
 		}
 	}
@@ -166,4 +189,12 @@
 	.select_box {
 		margin-top: 20rpx;
 	}
+
+	.list_box {
+		margin-top: 40rpx;
+
+		.time {
+			font-size: 28rpx;
+		}
+	}
 </style>