ysy před 1 rokem
rodič
revize
e3390824ff

+ 360 - 0
pages/pda/feeding/components/turnoverBom.vue

@@ -0,0 +1,360 @@
+<template>
+	<view>
+		<view class="title_box rx-bc">
+			<view class="name">周转车</view>
+		</view>
+
+		<view v-for="(item, index) in newList" :key='index'>
+			<view class="title_box rx-bc" v-if='!isDetails'>
+				<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  " :class="{'content_num' : pattern == 'job' }" v-if='!isDetails'>
+								<text>{{it.quantity}} </text>
+							</view>
+
+							<view class="item ww20">
+								<input :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>
+							</view>
+
+
+						</view>
+					</u-list>
+
+				</view>
+
+
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			},
+			wordItem: {
+				type: Object,
+				default: () => {}
+			},
+
+			pattern: {
+				type: String,
+				default: ''
+			},
+
+			isDetails: {
+				type: Boolean,
+				default: false
+			}
+		},
+
+
+		watch: {
+			list: {
+				immediate: true,
+				handler(newVal) {
+					newVal.forEach(f => {
+						if (f.extInfo && f.extInfo.positionList && f.extInfo.positionList.length) {
+							f.extInfo.positionList.forEach(oo => {
+								if (this.wordItem.code == oo.workOrderCode && this.wordItem.productCode ==
+									oo.categoryCode && Number(oo.quantity) > 1) {
+									this.$set(oo, 'feedNum', oo.quantity)
+								}
+							})
+						}
+					})
+
+					this.newList = newVal
+
+
+				}
+			}
+		},
+
+
+		data() {
+			return {
+
+				newList: [],
+
+				totalCount: 0,
+
+
+			}
+		},
+
+		methods: {
+
+
+
+			getDelete(index) {
+				this.list.splice(index, 1)
+
+
+			},
+			scrolltolower() {}
+		}
+	}
+</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;
+			}
+
+
+		}
+
+		.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;
+				padding-right: 6rpx;
+
+			}
+
+			.color157 {
+				color: $theme-color;
+			}
+
+			.ww20 {
+				width: 20%;
+			}
+
+			.ww25 {
+				width: 25%;
+			}
+
+
+
+			.ww35 {
+				width: 35%;
+
+			}
+
+			.ww10 {
+				width: 10%;
+			}
+		}
+
+		.head {
+			height: 64rpx;
+			background: #F7F9FA;
+			border-top: 2rpx solid #E3E5E5;
+			border-left: 2rpx solid #E3E5E5;
+			box-sizing: border-box;
+
+			.item {
+				height: 64rpx;
+				line-height: 64rpx;
+				border-right: 2rpx solid #E3E5E5;
+				box-sizing: border-box;
+				font-size: 24rpx;
+			}
+		}
+
+
+
+		.tr {
+			border-top: 2rpx solid #E3E5E5;
+			border-left: 2rpx solid #E3E5E5;
+			box-sizing: border-box;
+
+			.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>

+ 1 - 1
pages/pda/feeding/components/workOrderBom.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="title_box rx-bc">
-			<view class="name">工单信息</view>
+			<view class="name">工单信息 </view>
 
 			<view class="btn_box rx-bc" @click="handleScan(item.workOrderId)" v-if='!isDetails'>
 				<image class="scan" src="@/static/pda/ScanIt.svg"></image>

+ 41 - 30
pages/pda/feeding/details.vue

@@ -47,22 +47,22 @@
 						:revolvingDiskList="item.revolvingDiskList"></revolvingDiskBom>
 
 					<packingBom v-if='item.packingList.length != 0' :list='item.packingList'></packingBom>
-					
-				
+
+
 
 
 
 					<view class='flex_btn' @click="openDetails(item.workOrderId)">出库单</view>
 
 					<view class="operate_box ">
-					
-							<u-button size="small" class="u-reset-button" type="success"
-								@click="handAdd(item.workOrderId)">手动添加</u-button>
-						
-					
-						   <u-button size="small" class="u-reset-button" type="success"
-						   	@click="scanIt(item.workOrderId)">扫一扫</u-button>
-					 
+
+						<u-button size="small" class="u-reset-button" type="success"
+							@click="handAdd(item.workOrderId)">手动添加</u-button>
+
+
+						<u-button size="small" class="u-reset-button" type="success"
+							@click="scanIt(item.workOrderId)">扫一扫</u-button>
+
 					</view>
 				</view>
 			</u-list>
@@ -86,7 +86,7 @@
 	import semiProductBom from './components/semiProductBom'
 	import aridRegion from './components/aridRegion'
 	import paramBom from './components/paramBom.vue'
-	import turnoverBom from '../jobBooking/components/turnoverBom.vue'
+	import turnoverBom from './components/turnoverBom.vue'
 	import packingBom from './components/packingBom.vue'
 	import productsBom from './components/productsBom.vue'
 	import palletBom from './components/palletBom'
@@ -165,7 +165,8 @@
 						let palletList = [] // 舟皿
 						let revolvingDiskList = [] // 周转盘
 						let semiProductList = [] // 半成品
-           
+						let turnover = [] //周转车
+
 
 						selectList.forEach(f => {
 							if (f.rootCategoryLevelId == 4) {
@@ -178,10 +179,10 @@
 							} else if (f.rootCategoryLevelId == 1) {
 								instanceList = instanceList.concat(f)
 
-							}  
-							
-							else if (f.rootCategoryLevelId == 11) {
+							} else if (f.rootCategoryLevelId == 11) {
 								aridRegionList = aridRegionList.concat(f)
+							} else if (f.rootCategoryLevelId == 7) {
+								turnover = turnover.concat(f)
 							} else if (f.rootCategoryLevelId == 8) {
 								palletList = palletList.concat(f)
 							} else if (f.rootCategoryLevelId == 26) {
@@ -200,6 +201,7 @@
 						this.$set(m, 'instanceList', instanceList)
 						this.$set(m, 'aridRegionList', aridRegionList)
 						this.$set(m, 'equipmentList', equipmentList)
+						this.$set(m, 'turnover', turnover)
 						this.$set(m, 'palletList', palletList)
 						this.$set(m, 'revolvingDiskList', revolvingDiskList)
 						this.$set(m, 'semiProductList', semiProductList)
@@ -225,9 +227,7 @@
 
 			save() {
 
-
-	
-
+			
 				this.List.forEach(f => {
 					f.instanceList.forEach(e => {
 						if (Object.prototype.hasOwnProperty.call(e, 'type')) {
@@ -265,7 +265,7 @@
 						m.palletList = [] // 舟皿
 						m.revolvingDiskList = [] // 周转盘
 						m.semiProductList = [] //半成品
-					
+
 
 						if (m.pickOutInList.length > 0) {
 							m.pickOutInList.forEach(f => {
@@ -283,7 +283,8 @@
 									m.palletList.push(f)
 								} else if (f.rootCategoryLevelId == 26) {
 									m.revolvingDiskList.push(f)
-								} else if (f.rootCategoryLevelId == 23 || f.rootCategoryLevelId == 2) {
+								} else if (f.rootCategoryLevelId == 23 || f.rootCategoryLevelId ==
+									2) {
 									m.semiProductList.push(f)
 								}
 
@@ -330,9 +331,9 @@
 				// this.scanData('SCJHGD20240117002', type, id)
 				// return false
 
-			
+
 				uni.scanCode({
-				   success: (res) => {
+					success: (res) => {
 						this.scanData(res.result, type, id)
 					}
 				})
@@ -371,9 +372,9 @@
 			scanIt(id) {
 				console.log(id)
 
-				
+
 				uni.scanCode({
-					 success: (res) => {
+					success: (res) => {
 						this.scanItData(res.result, id)
 						console.log(res.result, id)
 					}
@@ -382,7 +383,7 @@
 
 			scanItData(result, id) {
 				scanLedger(result).then(res => {
-					console.log(res)
+
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
@@ -456,6 +457,16 @@
 								icon: 'none'
 							})
 							return false
+						} else {
+							_arr = this.List
+							_arr.forEach((e, index) => {
+								if (e.workOrderId == id) {
+									_arr[index].turnover = _arr[index].turnover.concat(res)
+								}
+							})
+							this.List = _arr
+							
+							this.$forceUpdate()
 						}
 					}
 
@@ -466,10 +477,10 @@
 
 			// 全部扫一扫
 			handlScanCode() {
-			
+
 				uni.scanCode({
-					 success: (res) => {
-						 this.scanItAllData(res.result)
+					success: (res) => {
+						this.scanItAllData(res.result)
 
 					}
 				})
@@ -581,13 +592,13 @@
 	}
 
 	.operate_box {
-	  
+
 		position: fixed;
 		right: 0;
 		top: 400rpx;
 
 		/deep/ .u-button {
-		    margin-top: 20rpx;
+			margin-top: 20rpx;
 			width: 150rpx;
 			border-radius: 22rpx 0 0 22rpx;
 			opacity: 0.6;

+ 2 - 0
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -22,6 +22,8 @@
 								v-if="Object.prototype.hasOwnProperty.call(it, 'extInfo')  && Object.prototype.hasOwnProperty.call(it.extInfo, 'productionTimes') &&  Object.prototype.hasOwnProperty.call(it.extInfo.productionTimes,item.currentTaskDiagram.taskId) ">
 								{{ it.extInfo.productionTimes[item.currentTaskDiagram.taskId]}}
 							</view>
+							
+							
 						</view>
 					</view>
 				</view>

+ 1 - 1
pages/pda/sample/components/inspectionBom.vue

@@ -128,7 +128,7 @@
 			onKeyInput() {
 				this.count = 0
 				this.inspectionList.map(L => {
-					if ( Number(L.quantity) != NaN && L.id != -1) {
+					if ( Number(L.quantity) >= 0 && Number(L.quantity) != NaN && L.id != -1) {
 						this.count = Number(this.count) + Number(L.quantity)
 						this.inspectionList[this.inspectionList.length - 1]['quantity'] = this.count
 

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

@@ -412,7 +412,7 @@
 			getTreeList() {
 				let params = {}
 				if (this.isType == 'feed') {
-					params.ids = [1, 2, 4, 5, 8, 10, 11, 13, 14, 26]
+					params.ids = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26]
 				} else if (this.isType == 'pick') {
 					params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
 				} else if (this.isType == 'job') {