Przeglądaj źródła

修改索尔问题

chencc 1 rok temu
rodzic
commit
4bb3b6264c

+ 130 - 127
pages/pda/feeding/components/productsBom.vue

@@ -3,17 +3,17 @@
 
 
 		<view class="title_box rx-bc"
-			v-if="productsObj.name != 'undefined' && productsObj.feedQuantity != 'undefined' ">
+			v-if="productsObj.name != 'undefined' && productsObj.feedQuantity != 'undefined'">
 			<view class="name">在制品</view>
 		</view>
 
-		<view class="material rx-ss" v-if="productsObj.name != 'undefined' && productsObj.feedQuantity != 'undefined' ">
+		<view class="material rx-ss" v-if="productsObj.name != 'undefined' && productsObj.feedQuantity != 'undefined'">
 
 			<view class="content_table">
 
 				<view class="item">
 					<view class="lable rx-cc">名称</view>
-					<view class="content"> {{ productsObj.name  + '-在制品' }} </view>
+					<view class="content"> {{ productsObj.name + '-在制品' }} </view>
 				</view>
 
 				<view class="item">
@@ -29,14 +29,15 @@
 
 				<view class="item">
 					<view class="lable rx-cc">数量</view>
-					<view class="content"> {{ productsObj.extInfo.sourceQuantity  || 0  }} {{ productsObj.unit }}
+					<view class="content"> {{ productsObj.extInfo.sourceQuantity || 0 }} {{ productsObj.unit }}
 					</view>
 				</view>
 
 				<view class="item">
 					<view class="lable rx-cc">投料数量</view>
 					<view class="content content_num">
-						<input class="uni-input" v-model="productsObj.feedQuantity" type="digit" @input="maxFeedQuantity()"></input>
+						<input class="uni-input" v-model="productsObj.feedQuantity" type="digit"
+							@input="maxFeedQuantity()"></input>
 						{{ productsObj.unit }}
 					</view>
 				</view>
@@ -48,172 +49,174 @@
 		</view>
 	</view>
 
-	</view>
-</template>
 
+</template>
 
-import { method } from 'lodash';<script>
-	export default {
-		props: {
-			productsObj: {
-				type: Object,
-				default: () => {}
-			},
 
-			itemObj: {
-				type: Object,
-				default: () => {}
-			}
 
+<script>
+import { method } from 'lodash';
+export default {
+	props: {
+		productsObj: {
+			type: Object,
+			default: () => { }
 		},
-		methods: {
-			maxFeedQuantity() {
-				if(this.productsObj.feedQuantity > this.itemObj.formingNum) {
-					this.$set(this.productsObj, 'feedQuantity', this.itemObj.formingNum)
-				}
-			}
+
+		itemObj: {
+			type: Object,
+			default: () => { }
 		}
 
+	},
+	methods: {
+		maxFeedQuantity() {
+			if (this.productsObj.feedQuantity > this.itemObj.formingNum) {
+				this.$set(this.productsObj, 'feedQuantity', this.itemObj.formingNum)
+			}
+		}
 	}
+
+}
 </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;
-			}
+.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;
+.material {
+	margin-top: 10rpx;
 
-		.left {
-			width: 40rpx;
-		}
+	.left {
+		width: 40rpx;
+	}
 
-		.zdy_check {
-			width: 30rpx;
-			height: 30rpx;
-			border: 2rpx solid #c8c9cc;
-			border-radius: 4rpx;
+	.zdy_check {
+		width: 30rpx;
+		height: 30rpx;
+		border: 2rpx solid #c8c9cc;
+		border-radius: 4rpx;
 
-		}
+	}
 
-		.check_active {
-			background: $theme-color;
-			border: 2rpx solid $theme-color;
+	.check_active {
+		background: $theme-color;
+		border: 2rpx solid $theme-color;
 
-			/deep/ .u-icon__icon {
-				color: #fff !important;
-			}
+		/deep/ .u-icon__icon {
+			color: #fff !important;
 		}
+	}
 
-		.content_table {
-			width: 722rpx;
-			border: 2rpx solid $border-color;
-
-			.item {
-				display: flex;
-				border-bottom: 2rpx solid $border-color;
+	.content_table {
+		width: 722rpx;
+		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;
-				}
+			.lable {
+				width: 132rpx;
+				text-align: center;
+				background-color: #F7F9FA;
+				font-size: 26rpx;
+				border-right: 2rpx solid $border-color;
+				flex-shrink: 0;
+			}
 
-				.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;
+			.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;
 
-				.content_num {
+			}
 
-					display: flex;
-					align-items: center;
-					padding: 0 4rpx;
+			.content_num {
 
-					/deep/ .uni-input-input {
-						width: 200rpx;
-						border: 2rpx solid #F0F8F2;
-						background: #F0F8F2;
-						color: $theme-color;
-					}
-
-					.unit {
-						padding: 0 4rpx;
-						font-size: 24rpx;
-						color: #404446;
-					}
+				display: flex;
+				align-items: center;
+				padding: 0 4rpx;
+
+				/deep/ .uni-input-input {
+					width: 200rpx;
+					border: 2rpx solid #F0F8F2;
+					background: #F0F8F2;
+					color: $theme-color;
 				}
 
-				.ww400 {
-					/deep/ .uni-input-input {
-						width: 400rpx;
-					}
+				.unit {
+					padding: 0 4rpx;
+					font-size: 24rpx;
+					color: #404446;
 				}
+			}
 
-				.pd4 {
-					padding: 4rpx 8rpx;
+			.ww400 {
+				/deep/ .uni-input-input {
+					width: 400rpx;
 				}
+			}
 
+			.pd4 {
+				padding: 4rpx 8rpx;
+			}
 
 
-				&:last-child {
-					border-bottom: none;
-				}
-			}
 
-			.ww55 {
-				width: 55%;
+			&:last-child {
+				border-bottom: none;
 			}
+		}
 
-			.ww45 {
-				width: 45%;
-			}
+		.ww55 {
+			width: 55%;
+		}
+
+		.ww45 {
+			width: 45%;
 		}
 	}
+}
 </style>

+ 34 - 4
pages/pda/feeding/components/turnoverBom.vue

@@ -72,17 +72,17 @@
 							  </view>
 							  
 							  <view class="item ww20 ">
-							  	<text>{{it.quantity}} </text>
+							  	<text>{{it.quantity}}</text>
 							  </view>
 							  
 							  <view class="item ww20">
 								<!-- 抽样 -->
 								<view v-if=" isDetails && wordItem.taskType==3 ">{{ it.sampleNum }}</view>
-								<view v-else-if=" isDetails && wordItem.taskType!==3 ">{{ it.feedNum }}</view>
+								<view v-else-if=" isDetails && wordItem.taskType!==3 ">{{ it.feedNum }} </view>
 								<!-- 投料 -->
 							  	<input v-else :class="['uni-input', wordItem.code == it.workOrderCode && it.quantity > 0 ? 'content_num' : ''] " v-model="it.feedNum"
-							  		type="digit" :disabled="it.quantity <= 0"
-							  		@blur="Number(it.feedNum) > Number(it.quantity) ? it.feedNum = Number(it.quantity) : ''"></input>
+							  		type="digit" :disabled="it.quantity <= 0 || it.workOrderCode!==wordItem.code "
+							  		@blur="Number(it.feedNum) > Number(it.quantity) ? it.feedNum = Number(it.quantity) : ''" @input="jsNumber(it)"></input>
 							  </view>
 							  
 						  </view>
@@ -119,7 +119,19 @@
 			isDetails: {
 				type: Boolean,
 				default: false
+			},
+			productsObj: {
+				type: Object,
+				default: () => {}
+			},
+			productsObjClone:{
+				type: Number,
+				default: 0
 			}
+
+		},
+		mounted() {
+			this.newList = this.list;
 		},
 
 
@@ -161,7 +173,25 @@
 
 		methods: {
 
+			jsNumber(val) {
 
+				if(val.feedNum>val.quantity){
+					val.feedNum = val.quantity;
+				}
+				// extInfo.positionList
+				let num = 0;
+				this.newList.map(v => {
+					v.extInfo.positionList.map(d => {
+						if (this.wordItem.code == d.workOrderCode) {
+							console.log(d);
+							num+=Number(d.feedNum);
+						}
+					})
+				})
+
+				this.productsObj.feedQuantity = num;
+			
+			},
 
 			getDelete(index) {
 				this.list.splice(index, 1)

+ 29 - 12
pages/pda/feeding/details.vue

@@ -6,7 +6,7 @@
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
 				<view v-for="(item, index) in List" :key="index" class="card_box">
-
+					<!-- 工单信息 -->
 					<workOrderBom :item='item' pType="feed" :taskType="item.currentTaskDiagram.type"
 						@handleScan='handleScan'></workOrderBom>
 
@@ -43,7 +43,8 @@
 
 					<!-- 11					周转车 -->
 					<turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item' pattern='feed'
-						@handleScan='handleScan' @handleDel='handleDel'></turnoverBom>
+						@handleScan='handleScan' @handleDel='handleDel' :productsObj="item.product"
+						:productsObjClone="cloneListNum"></turnoverBom>
 
 					<aridRegion v-if='item.aridRegionList.length != 0' :list='item.aridRegionList'
 						@handleScan='handleScan'></aridRegion>
@@ -151,19 +152,13 @@ export default {
 			taskId: null,
 			type: '',
 			clientEnvironmentId: null,
-
-			operateBtn: true
-
-
-
-
+			operateBtn: true,
+			cloneListNum: '',
 
 		}
 	},
 	onLoad(options) {
 
-		console.log(options, 'optionsoptionsoptionsoptionsoptionsoptions');
-
 		this.title = options.taskName ? options.taskName + '-投料' : '投料'
 		let queryArray = decodeURIComponent(options.arr);
 		this.idsList = JSON.parse(queryArray);
@@ -184,7 +179,22 @@ export default {
 
 		uni.$on("setSelectList", (selectList, id) => {
 
+			console.log(this.List, selectList, '444444444444465555555555555');
+
+
 			this.List.forEach(m => {
+				let num=0;
+				selectList.map(v => {
+					v.extInfo.positionList.map(d => {
+						if (m.code == d.workOrderCode) {
+							console.log(d);
+							num+=d.quantity;
+						}
+					})
+				})
+				this.cloneListNum = num;
+				m.product.feedQuantity = num;
+
 				if (m.workOrderId == id) {
 					let modelList = [] // 模具
 					let instanceList = [] // 投料
@@ -202,9 +212,9 @@ export default {
 
 							equipmentList = equipmentList.concat(f)
 
-							
+
 							equipmentList.map(d => {
-		
+
 								if (d.equipmentLabelJson.length) {
 									d.equipmentLabelJson.map(v => {
 										if (v.SJSB) {
@@ -266,6 +276,10 @@ export default {
 	methods: {
 		scrolltolower() { },
 
+		clonenember(e) {
+			return JSON.parse(JSON.stringify(e))
+		},
+
 		async save(type) {
 			console.log(this.List);
 			this.List.forEach(f => {
@@ -435,6 +449,9 @@ export default {
 						...m
 					}
 				})
+
+				this.cloneList = JSON.parse(JSON.stringify(this.List));
+
 			}).finally(() => {
 				this.getCacheFn()
 			})

+ 230 - 282
pages/pda/jobBooking/components/packingBom.vue

@@ -1,272 +1,99 @@
 <template>
 
 	<view>
-		<view class="title_box rx-bc">
-			<view class="name">最小包装单元</view>
-
-			<view class="btn_box rx-bc" @click="handCancelPacking">
-				重置打包
-			</view>
+		<view class="col userInp " style="display: flex; align-items: center;">
+			<text class="label lable150 rx-cc">规格选择:</text>
+			<!-- multiple -->
+			<zxz-uni-data-select :localdata="localdataList" v-model="Usertype"
+				@change="changeUserType"></zxz-uni-data-select>
 		</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 v-for="(item, i) in DispositionList" :key="i">
+			<view class="title_box rx-bc">
+				<!-- 最小包装单元 -->
+				<view class="name">{{ item.titel }}</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 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
-					<view class="item ww10" v-if="clientEnvironmentId == 3"></view>
-				</view>
-				<view class="table">
-					<u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
-						<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 == 1' src='@/static/check.png'>
-								</image>
-								<image class="check" v-if='it.check == 0 || it.check == null'
-									src='@/static/check_no.png'>
-								</image>
-							</view>
-
-						</view>
-
-					</u-list>
+				<view class="btn_box rx-bc" @click="handCancelPacking">
+					重置打包
 				</view>
 			</view>
 
+			<view class="material ">
 
-
-		</view>
-
-		<view class="title_box rx-bc">
-			<view class="name">内包装</view>
-
-			<view class="btn_box rx-bc" @click="handCancelPacking">
-				重置打包
-			</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_table">
+					<view class="item">
+						<view class="lable rx-cc">包装总数 </view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="quantity"></input>
-
-						</view>
-					</view>
+							<input class="uni-input" v-model="item.formedNumLast" type="number"  :disabled="i != 0"
+								@input="changeinput"></input>
 
-					<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="unit">{{ item.packageUnit }}</view>
 
-							<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 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
-					<view class="item ww10" v-if="clientEnvironmentId == 3"></view>
-				</view>
-
-				<view class="table">
-					<u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
-						<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 == 1' src='@/static/check.png'>
-								</image>
-								<image class="check" v-if='it.check == 0 || it.check == null'
-									src='@/static/check_no.png'>
-								</image>
+					<view class="item rx-sc">
+						<view class="rx ww55 ">
+							<view class="lable lable150 rx-cc ">{{ item.titel }}单元</view>
+							<view class="content content_num">
+								<input class="uni-input" v-model="item.packageCell" disabled></input>
+								<view style="max-width: 100rpx; font-size: 24rpx;">{{ item.packageUnit }}</view>
 							</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="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">
-
-					<view class="tr row rx-sc" v-for="(it, idx) in temporaryList" :key='idx'>
-						<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>
-						</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"
-								@click="handclose(it)"></uni-icons>
-						</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" :clear='false'></zxz-uni-data-select>
+						<view class="rx ww45">
+							<view class="rx-cc ww80">
+								/<view style="max-width: 100rpx; font-size: 24rpx;">{{ item.conversionUnit }}</view>
+							</view>
+							<view class="content rx-sc">
 
-							<view class="penalize" @click="handlePack">打包</view>
+								<!-- <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>
-
-
-
-
-			<!-- 外包装  列表-->
-			<view class="content_table2" v-if='packTwoList.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>
 
-				<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">
-
-						</view>
-
-
+				<view class="content_table2" v-if='item.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 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
+						<view class="item ww10" v-if="clientEnvironmentId == 3"></view> -->
 					</view>
+					<view class="table">
+						<u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
+							<view class="tr row rx-sc" v-for="(it, idx) in item.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;"> {{ it.unit }}/{{
+										item.conversionUnit }}
+									</view>
+								</view>
+								<view class="item ww50">
+									{{ it.code }}
+								</view>
+							</view>
 
-
+						</u-list>
+					</view>
 				</view>
 
-			</view>
-
-
 
 
+			</view>
 		</view>
 
-
-
-
-
 		<SearchPopup mode="center" v-if='show'>
 			<template v-slot:list>
 				<view class="search_list">
@@ -349,11 +176,11 @@ export default {
 
 			quantity: '',
 			unit: '',
-
+			Usertype: "",// 规格
 			unitList: [],
 
 			splitList: [],
-
+			localdataList: [],
 
 
 			packUnit: null,
@@ -361,7 +188,8 @@ export default {
 			temporaryCount: 0,
 			temporaryList: [],
 			packTwoList: [],
-			newCategoryId:'',
+			DispositionList: [],
+			newCategoryId: '',
 
 			show: false,
 			formData: {
@@ -371,33 +199,137 @@ export default {
 
 		}
 	},
-	watch:{
-		categoryId:{
-			handler(newVal){
-				console.log(newVal,'newVal');
+	watch: {
+		categoryId: {
+			handler(newVal) {
+				console.log(newVal, 'newVal');
 				this.newCategoryId = newVal;
 			},
-			deep:true,
-			immediate:true
+			deep: true,
+			immediate: true
 		},
-		
+		objData: {
+			handler(newVal) {
+				this.formedNumLast = newVal.formedNumLast;
+				console.log(this.formedNumLast );
+			},
+			deep: true,
+			immediate: true
+		}
 	},
 	created() {
-		this.formedNumLast = this.objData.formedNumLast
+		// this.formedNumLast = this.objData.formedNumLast;
 
-		this.byCode(),
-			this.packageDispositionFn();
-		this.getPackingDetails()
-		this.getPackingDetailsTwo()
+		this.byCode();
+
+		this.packageDispositionFn();
+		// this.getPackingDetails()
+		// this.getPackingDetailsTwo()
 	},
 
 	methods: {
+		// 输入数量变化
+		changeinput(e){
+			console.log(e);
+
+		},
+
+		changeUserType(e) {
+
+			this.listFn(e.arr);
+		},
+		groupBy(arr, key) {
+			return arr.reduce((acc, obj) => {
+				const groupKey = obj[key];
+				if (!acc[groupKey]) {
+					acc[groupKey] = [];
+				}
+				console.log();
+				acc[groupKey].push(obj);
+				return acc;
+			}, {});
+		},
+
 		async packageDispositionFn() {
-			const res = await packageDisposition(this.newCategoryId)
-			console.log(res, '1111111');
+			let that = this;
+			const res = await packageDisposition(this.newCategoryId);
+			
+			if (res.length) {
+				res.shift();
+				let data = JSON.parse(JSON.stringify(res));
+				let list = this.groupBy(data, 'code');
+				Object.entries(list).forEach(([key, value]) => {
+					let obj = {
+						text: value[0].name,
+						arr: value,
+						value: key
+					}
+					this.localdataList.push(obj);
+				});
+
+				this.Usertype = this.localdataList[0].value;
+				this.listFn(this.localdataList[0].arr);
+
+			}
+
 		},
 
 
+		listFn(arr) {
+			let obj = {
+				withinQuantity: "",
+				withinUnit: '',
+				outsideQuantity: '',
+				outsideUnit: ''
+			}
+			let textList = ['最小包装', '内包装', '外包装'];
+			arr.map(async (v, i) => {
+				v.splitList = [];
+				v.titel = textList[i];
+				if (i === 0) {
+					v.formedNumLast = this.formedNumLast;
+					v.splitList = await this.handleSplit(v)||[];
+					// this.$nextTick(c () => {
+						
+					// })
+				}
+
+				if (i === 1) {
+					obj.withinQuantity = v.packageCell;
+					obj.withinUnit = v.conversionUnit
+				}
+				if (i === 2) {
+					obj.outsideQuantity = v.packageCell;
+					obj.outsideUnit = v.conversionUnit;
+				}
+
+
+				
+			})
+		
+			this.$set(this,'DispositionList',arr)
+		},
+
+
+		sunNum(v, i) {
+			let _this = this;
+			this.$nextTick(() => {
+				switch (i) {
+					case 0:
+						console.log(_this.formedNumLast);
+						return _this.formedNumLast;
+					case 1:
+						return v.splitList.length || 0
+					case 2:
+
+						return v.splitList.length || 0
+
+				}
+			})
+
+
+		},
+
 		byCode() {
 			getByCode('packing_unit').then(res => {
 
@@ -459,9 +391,8 @@ export default {
 
 		},
 
-
-		handleSplit() {
-
+		// 第一次调用
+		handleSplit(v) {
 			if (this.splitList.length) {
 				uni.showToast({
 					title: '产品已分包',
@@ -470,9 +401,7 @@ export default {
 				return false
 			}
 
-
-
-			if (!this.formedNumLast) {
+			if (!v.formedNumLast) {
 				uni.showToast({
 					title: '包装总数数量不能为空',
 					icon: 'none'
@@ -480,7 +409,7 @@ export default {
 				return false
 			}
 
-			if (!this.quantity) {
+			if (!v.packageCell) {
 				uni.showToast({
 					title: '内包装单元数量不能为空',
 					icon: 'none'
@@ -488,7 +417,7 @@ export default {
 				return false
 			}
 
-			if (!this.unit) {
+			if (!v.packageUnit) {
 				uni.showToast({
 					title: '请选择包装单位',
 					icon: 'none'
@@ -497,26 +426,31 @@ export default {
 			}
 
 			let param = {
-				totalQuantity: this.formedNumLast,
-				quantity: this.quantity,
-				unit: this.unit,
+				totalQuantity: v.formedNumLast,
+				quantity: v.packageCell,
+				unit: v.packageUnit,
+				packageUnit: v.conversionUnit,
 				workOrderId: this.workOrderId,
 				taskId: this.taskId,
 				tier: 1
 			}
-			packingReport(param).then(res => {
-				this.splitList = res.map(m => {
 
-					return {
-						check: false,
-						...m
-					}
-				})
+			return new Promise((resolve, reject) => {
+				packingReport(param).then(res => {
+					this.splitList = res.map(m => {
 
-				this.getPackingDetails()
+						return {
+							check: false,
+							...m
+						}
+					})
+					resolve(this.splitList)
+					// this.getPackingDetails()
+				})
 			})
 
 
+
 		},
 
 		handleCheck(idx, it) {
@@ -568,44 +502,50 @@ export default {
 			})
 		},
 
-		getPackingDetailsTwo() {
+		getPackingDetailsTwo(v) {
+			console.log(v);
 			let param = {
-				totalQuantity: this.formedNumLast,
-				quantity: this.quantity,
-				unit: this.unit,
+				totalQuantity: v.formedNumLast,
+				quantity: v.packageCell,
+				unit: v.conversionUnit,
 				workOrderId: this.workOrderId,
 				taskId: this.taskId,
 				tier: 2,
 
 			}
+
 			getPackingReportRepeat(param).then(res => {
-				this.packTwoList = res.detailList
+				resolve(res.detailList)
 			})
+
 		},
 
-		handlePack() {
+		handlePack(v, s) {
 			let _arr = []
-			_arr = this.temporaryList.map(m => {
+			_arr = s.map(m => {
 				return {
 					...m,
 					isChecked: 1
 				}
 			})
+			console.log(_arr, '123');
 
 			let param = {
 				detailList: _arr,
-				quantity: this.temporaryCount,
-				totalQuantity: this.formedNumLast,
-				unit: this.packUnit,
+				quantity: v.temporaryCount,
+				totalQuantity: v.formedNumLast,
+				unit: v.packageUnit,
 				taskId: this.taskId,
 				workOrderId: this.workOrderId,
 				tier: 2
 			}
-
-			packingReportRepeat(param).then(res => {
-				this.temporaryList = []
-				this.getPackingDetails()
-				this.getPackingDetailsTwo()
+			return new Promise((resolve, reject) => {
+				packingReportRepeat(param).then(res => {
+					console.log(res);
+					// this.temporaryList = []
+					this.getPackingDetails()
+					// this.getPackingDetailsTwo()
+				})
 			})
 		},
 
@@ -888,7 +828,15 @@ export default {
 	}
 }
 
-
+.label {
+	display: flex;
+	height: 70rpx;
+	width: 86px !important;
+	font-size: 13px;
+	align-items: center;
+	justify-content: center;
+	background-color: #F7F9FA;
+}
 
 
 .content_num {

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

@@ -298,8 +298,6 @@ export default {
 		}
 	},
 	onLoad(options) {
-		console.log('1111111110',options);
-
 		this.title = options.taskName ? options.taskName + '-报工' : '报工'
 		this.taskType = options.taskType
 		this.id = options.id

+ 4 - 1
pages/pda/picking/components/outsourceOrder.vue

@@ -42,7 +42,7 @@
 
 										<view class="items" style="width: calc(100% - 2px);">
 											<text>委外到货时间</text>
-											{{ item.deliveryMethod == 2 ? timeTure(item.requireDeliveryTime)  : item.requireDeliveryTime }}
+											{{ item.deliveryMethod == 2 ? item.requireDeliveryTime  : item.requireDeliveryTime }}
 										</view>
 										
 									
@@ -142,6 +142,9 @@
 			},
 
 			timeTure(timestamp) {
+
+				console.log(timestamp,'timestamp');
+
 				const date = new Date(Number(timestamp)); // 创建 Date 对象
 				const year = date.getFullYear();
 				const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1并补零

+ 3 - 0
pages/pda/sample/components/inspectionBom.vue

@@ -10,6 +10,7 @@
 		<view class="content_table2" v-if='semiProductList.length > 0'>
 			<view class="head row rx-sc">
 				<view class="item ww10">序号</view>
+				<view class="item ww15">名称</view>
 				<view class="item ww15">货位</view>
 				<view class="item ww30">产品编码</view>
 				<view class="item ww15">数量</view>
@@ -22,7 +23,9 @@
 
 				<view class="tr row rx-sc" v-for="(it, idx) in semiProductList" :key='idx'>
 					<view class="item ww10">{{ idx + 1}} </view>
+					<view class="item ww15">{{it.extInfo.vehicleName}}</view>
 					<view class="item ww15">{{it.extInfo.areaCode}}</view>
+
 					<view class="item ww30">
 						{{it.code}}
 					</view>

+ 9 - 3
pages/pda/sample/inspection/index.vue

@@ -247,6 +247,7 @@ export default {
 			});
 		},
 		handZZCQuality() {
+			console.log(this.List,'this.List');
 
 			if (this.List[0].turnover.length == 0) {
 				uni.showToast({
@@ -269,10 +270,15 @@ export default {
 						let arr = f.extInfo.positionList.filter((o) => o.sampleNum >= 1)
 
 						if (arr.length) {
-							arr.map(f => {
+							arr.map(d => {
 								let obj ={
-									quantity:f.sampleNum,
-									code:f.code
+									quantity:d.sampleNum,
+									code:d.code,
+									vehicleId:f.id,
+									vehicleName:f.name,
+									vehicleCode:f.code,
+
+
 								}
 								_count.push(obj)
 							})

+ 5 - 5
pages/pda/workOrder/search/index.vue

@@ -531,8 +531,6 @@
 					
 				}
 
-				console.log(this.pid,param,'11111111111');
-
 
 				URL(param).then(res => {
 				
@@ -627,15 +625,17 @@
 				if (type == 1) {
 					if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job' || this.isType == 'zdy'|| this.isType == 'weiwai') {
 						
+
+						this.memoList.map(item => {
+							item.extInfo.heatNumber = ''
+						})
 						
 						if((this.isType == 'zdy'|| this.isType == 'weiwai') && ( this.pid == 2 ||  this.pid == 3 )) {
 							let param = {
 								memoList: this.memoList,
 								pid:this.pid
 							}
-							// console.log(param,'param1234567890');
-							// return
-						
+
 							EventBus.$emit('outEvent', { message: param });
 						} else {
 							uni.$emit('setSelectList', this.memoList, this.pid)