ysy 2 лет назад
Родитель
Сommit
4a1f5bc8c3

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

@@ -40,7 +40,7 @@
 
 
 				<view class="item" v-if="clientEnvironmentId == 3">
-					<view class="lable rx-cc">炉次</view>
+					<view class="lable rx-cc">炉次</view>
 					<view class="content content_num">
 						<input class="uni-input" v-model="item.extInfo.heatNumber" type="number"></input>
 					</view>

+ 5 - 13
pages/pda/feeding/components/feedBom.js

@@ -5,7 +5,7 @@ export const tableHeader = selectEquiType => {
 		case 1:
 			return [
 
-	
+
 
 				{
 					label: '名称',
@@ -101,21 +101,13 @@ export const tableHeader = selectEquiType => {
 				},
 				{
 					label: '槽数',
-					prop: ''
-				},
-
-
-				{
-					label: '长宽高',
 					prop: '',
 					formatter(row) {
-						if (!row?.extendField) return ''
-						const extendField = JSON.parse(row.extendField)
-						return `${extendField.length || '-'}*${extendField.width || '-'}*${
-              extendField.high || '-'
-            }`
+						return row.extInfo.slotNum
 					}
-				}
+				},
+
+
 			]
 		case 10:
 			return []

+ 13 - 7
pages/pda/feeding/components/instanceBom.vue

@@ -49,14 +49,15 @@
 						<view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
 					</view>
 
-
+                   
 					<view class="item rx-sc" v-if='mate.isConsumable == 0'>
 						<view class="rx ww50">
-							<view class="lable  rx-cc">重量</view>
-							<view class="content">{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}} </view>
+							<view class="lable  rx-cc">{{ currentTaskDiagram.isFirstTask == 1 ? '物料重量': '上道重量' }}</view>
+							<view class="content" v-if="currentTaskDiagram.isFirstTask == 1" >{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}} </view>
+							<view class="content" v-if="currentTaskDiagram.isFirstTask == 0" >{{mate.extInfo.newWeight || 0}} {{ mate.extInfo.weightUnit}} </view>
 						</view>
 
-
+ 
 						<view class="rx ww50">
 							<view class="lable ww80 rx-cc">刻码</view>
 							<view class="content">{{mate.extInfo.engrave}}</view>
@@ -84,7 +85,7 @@
 						<view class="lable rx-cc">设备</view>
 						<view class="content content_num">
 							<zxz-uni-data-select :localdata="deviceList" v-model="mate.deviceId" dataValue='id'
-								format='{name}-{fixCode}' @change=" e => mate.deviceName = e.name" dataKey="id"
+								format='{name}-{codeNumber}' @change=" e => mate.deviceName = e.name + e.codeNumber" dataKey="id"
 								filterable :clear='false'></zxz-uni-data-select>
 						</view>
 					</view>
@@ -140,7 +141,7 @@
 						<u-form-item label="绑定设备:" class="required-form" borderBottom prop="assetType">
 
 							<zxz-uni-data-select :localdata="deviceList" v-model="formData.deviceId" dataValue='id'
-								format='{name}-{fixCode}' @change="e => formData.deviceName = e.name" dataKey="id"
+								format='{name}-{codeNumber}' @change="e => formData.deviceName = e.name + e.codeNumber" dataKey="id"
 								filterable :clear='false'></zxz-uni-data-select>
 
 						</u-form-item>
@@ -191,7 +192,12 @@
 			equipmentList: {
 				type: Array,
 				default: () => []
-			}
+			},
+			
+			currentTaskDiagram: {
+				type: Object,
+				default: () => {}
+			},
 		},
 
 		watch: {

+ 23 - 21
pages/pda/feeding/details.vue

@@ -11,7 +11,7 @@
 
 					<paramBom v-if='item.paramDetailList.length != 0' :list='item.paramDetailList'></paramBom>
 
-                   
+
 					<deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId'
 						:list='item.equipmentList' @scanIt='scanIt'></deviceBom>
 
@@ -24,7 +24,7 @@
 					</modelBom>
 
 					<instanceBom v-if='item.instanceList.length != 0' :workOrderId='item.workOrderId'
-						:list='item.instanceList' :equipmentList="item.equipmentList"></instanceBom>
+						:list='item.instanceList' :equipmentList="item.equipmentList" :currentTaskDiagram="item.currentTaskDiagram"></instanceBom>
 
 
 					<turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item' pattern='feed'
@@ -104,8 +104,10 @@
 				idsList: [],
 				List: [],
 				taskId: null,
+
+				clientEnvironmentId: null,
 				
-				clientEnvironmentId: null
+			
 
 
 			}
@@ -120,9 +122,9 @@
 
 
 			this.getList()
-			
-			this.clientEnvironmentId =  uni.getStorageSync("userInfo") &&   uni.getStorageSync("userInfo").clientEnvironmentId
-		
+
+			this.clientEnvironmentId = uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId
+
 
 		},
 		onShow() {
@@ -179,20 +181,20 @@
 			scrolltolower() {},
 
 			save() {
-				
-				
-				if(this.clientEnvironmentId == 3) {
+
+
+				if (this.clientEnvironmentId == 3) {
 					this.List.forEach(e => {
-						 if(e.equipmentList.length == 1) {
-							 e.instanceList.forEach(o => {
-								 if(o.rootCategoryLevelId == 1 && o.isConsumable == 0) {
-									 o['deviceName'] =  e.equipmentList[0].name
-									 o['deviceId'] = e.equipmentList[0].id
-								 }
-							 })
-						 }
+						if (e.equipmentList.length == 1) {
+							e.instanceList.forEach(o => {
+								if (o.rootCategoryLevelId == 1 && o.isConsumable == 0) {
+									o['deviceName'] = e.equipmentList[0].name
+									o['deviceId'] = e.equipmentList[0].id
+								}
+							})
+						}
 					})
-					
+
 				}
 
 				this.List.forEach(f => {
@@ -205,8 +207,8 @@
 				})
 
 
-              
-	
+
+
 
 				batchSave(this.List).then(res => {
 
@@ -223,7 +225,7 @@
 					taskId: this.taskId
 				}).then(res => {
 					this.List = res.map(m => {
-						console.log('222', m)
+
 						m.workOrderId = m.id
 
 						m.instanceList = [] // 物料

+ 4 - 109
pages/pda/jobBooking/components/jobBom.vue

@@ -2,8 +2,6 @@
 	<view>
 		<view class="title_box rx-bc">
 			<view class="name">报工信息</view>
-
-
 		</view>
 
 
@@ -101,69 +99,15 @@
 
 			</view>
 
-			<view class='content_table' v-for="(item,index) in palletList" :key='index'>
-				<view class="item" @click="handleType" v-if="!isDetails">
-					<view class="lable rx-cc">舟皿类型</view>
-					<view class="content content_num">
-						<input class="uni-input" v-model="item.categoryLevelName"></input>
-					</view>
-				</view>
-
-				<view class="item" @click="handleType" v-if="isDetails">
-					<view class="lable rx-cc">舟皿类型</view>
-					<view class="content ">
-						{{item.name}}
-					</view>
-				</view>
-
-
-
-				<view class="item">
-					<view class="lable rx-cc">舟皿名称</view>
-					<view class="content ">
-						<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
-							format='{name}-{code}' dataKey="code" filterable :clear='false' v-if="!isDetails"
-							@change='inputChange'></zxz-uni-data-select>
-
-						<view v-if="isDetails">{{item.code }} </view>
-					</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 content_num">
-						<input class="uni-input" v-model="item.quantity" type='digit' :disabled="isDetails"></input>
-					</view>
-				</view>
-
-			</view>
 
 		</view>
 
-		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
-			:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
+
 
 	</view>
 </template>
 
 <script>
-	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
-	import {
-		treeByPid,
-		pageeLedgerMain,
-		assetPage,
-
-	} from '@/api/pda/workOrder.js'
-	import {
-		number
-	} from 'echarts'
 	export default {
 		props: {
 			item: {
@@ -179,10 +123,7 @@
 				default: false
 			},
 
-			palletList: {
-				type: Array,
-				default: () => []
-			}
+
 
 		},
 
@@ -202,8 +143,7 @@
 
 		data() {
 			return {
-				classificationList: [],
-				boatList: [],
+
 
 				notFormedList: []
 
@@ -212,11 +152,10 @@
 		created() {
 
 
-			this.getTreeList()
+
 
 			if (this.isDetails) {
 				this.notFormedList = this.notFormedList.map(m => {
-
 					return {
 						notFormedNum: Number(m.quantity),
 						notFormedWeight: m.weight,
@@ -229,53 +168,9 @@
 		},
 		methods: {
 
-			getTreeList() {
-				let params = {
-					ids: [8]
-				}
-				treeByPid(params).then(res => {
-					this.classificationList = res
-
-				})
-			},
-
-			confirm(id, name, rootCategoryLevelId) {
-				this.$set(this.palletList[0], 'categoryLevelId', id[0])
-				this.$set(this.palletList[0], 'categoryLevelName', name)
-				this.$set(this.palletList[0], 'rootCategoryLevelId', rootCategoryLevelId)
-
 
 
 
-				let param = {
-					categoryLevelId: id,
-					pageNum: 1,
-					size: -1,
-				}
-				assetPage(param).then(res => {
-					this.boatList = res.list
-				})
-			},
-
-			inputChange(e) {
-				this.$set(this.palletList[0], 'categoryId', e.id)
-				this.$set(this.palletList[0], 'code', e.code)
-				this.$set(this.palletList[0], 'name', e.name)
-				this.$set(this.palletList[0], 'specification', e.specification)
-				this.$set(this.palletList[0], 'categoryId', e.id)
-				this.$set(this.palletList[0], 'brandNum', e.brandNum)
-				this.$set(this.palletList[0], 'modelType', e.modelType)
-				this.$set(this.palletList[0], 'quantity', e.quantity)
-				this.$set(this.palletList[0], 'unit', e.unit)
-				this.$forceUpdate()
-
-
-
-			},
-
-			handleType() {
-				this.$refs.treePicker._show()
-			},
 
 			penalize() {
 				this.$emit('penalize', null)

+ 287 - 0
pages/pda/jobBooking/components/palletBom.vue

@@ -0,0 +1,287 @@
+<template>
+
+	<view>
+
+		<view class="title_box rx-bc">
+			<view class="name">舟皿</view>
+		</view>
+
+
+		<view class="material ">
+
+
+			<view class='content_table' v-for="(item,index) in palletList" :key='index'>
+				<view class="item" @click="handleType" v-if="!isDetails">
+					<view class="lable rx-cc">舟皿类型</view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="item.categoryLevelName"></input>
+					</view>
+				</view>
+
+				<view class="item" @click="handleType" v-if="isDetails">
+					<view class="lable rx-cc">舟皿类型</view>
+					<view class="content ">
+						{{item.name}}
+					</view>
+				</view>
+
+
+
+				<view class="item">
+					<view class="lable rx-cc">舟皿名称</view>
+					<view class="content ">
+						<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
+							format='{name}-{code}' dataKey="code" filterable :clear='false' v-if="!isDetails"
+							@change='inputChange'></zxz-uni-data-select>
+
+						<view v-if="isDetails">{{item.code }} </view>
+					</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 content_num">
+						<input class="uni-input" v-model="item.quantity" type='digit' :disabled="isDetails"></input>
+					</view>
+				</view>
+
+			</view>
+
+		</view>
+
+		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
+			:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
+
+	</view>
+</template>
+
+<script>
+	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
+	
+	
+	import {
+		treeByPid,
+	
+		assetPage,
+	
+	} from '@/api/pda/workOrder.js'
+
+	export default {
+		props: {
+			palletList: {
+				type: Array,
+				default: () => []
+			}
+		},
+
+		data() {
+			return {
+				classificationList: [],
+				boatList: [],
+			}
+		},
+		
+		created() {
+				this.getTreeList()
+		},
+		
+		methods: {
+			getTreeList() {
+				let params = {
+					ids: [8]
+				}
+				treeByPid(params).then(res => {
+					this.classificationList = res
+			
+				})
+			},
+			
+			
+			confirm(id, name, rootCategoryLevelId) {
+				this.$set(this.palletList[0], 'categoryLevelId', id[0])
+				this.$set(this.palletList[0], 'categoryLevelName', name)
+				this.$set(this.palletList[0], 'rootCategoryLevelId', rootCategoryLevelId)
+			
+			
+			
+			
+				let param = {
+					categoryLevelId: id,
+					pageNum: 1,
+					size: -1,
+				}
+				assetPage(param).then(res => {
+					this.boatList = res.list
+				})
+			},
+			
+			
+			inputChange(e) {
+				this.$set(this.palletList[0], 'categoryId', e.id)
+				this.$set(this.palletList[0], 'code', e.code)
+				this.$set(this.palletList[0], 'name', e.name)
+				this.$set(this.palletList[0], 'specification', e.specification)
+				this.$set(this.palletList[0], 'categoryId', e.id)
+				this.$set(this.palletList[0], 'brandNum', e.brandNum)
+				this.$set(this.palletList[0], 'modelType', e.modelType)
+				this.$set(this.palletList[0], 'quantity', e.quantity)
+				this.$set(this.palletList[0], 'unit', e.unit)
+				this.$forceUpdate()
+			
+			
+			
+			},
+			
+			handleType() {
+				this.$refs.treePicker._show()
+			},
+			
+			
+			
+			
+		},
+	}
+</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;
+
+
+
+		.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;
+					}
+
+					.penalize {
+						width: 160rpx;
+						line-height: 60rpx;
+						background: $theme-color;
+						font-size: 24rpx;
+						text-align: center;
+						color: #fff;
+					}
+
+				}
+
+				.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>

+ 5 - 1
pages/pda/jobBooking/index/index.vue

@@ -20,8 +20,10 @@
 
 
 
-					<jobBom v-if='isLoad' :item='objData' :palletList='objData.palletList'
+					<jobBom v-if='isLoad' :item='objData'
 						:notFormed='objData.notFormedList' @penalize='penalize' @modeNum='modeNum'></jobBom>
+						
+						<palletBom  :palletList='objData.palletList'></palletBom>
 
 					<oneJobBom v-if='objData.instanceList &&  objData.instanceList.length != 0 && taskType != 4' :item='objData'
 						:list='objData.instanceList'>
@@ -114,6 +116,7 @@
 	import deviceBom from '../../feeding/components/deviceBom.vue'
 	import modelBom from '../../feeding/components/modelBom.vue'
 	import jobBom from '../components/jobBom.vue'
+	import palletBom from '../components/palletBom.vue'
 	import oneJobBom from '../components/oneJobBom.vue'
 	import byProductBom from '../components/byProductBom'
 	import turnoverBom from '../components/turnoverBom.vue'
@@ -130,6 +133,7 @@
 			deviceBom,
 			modelBom,
 			jobBom,
+			palletBom,
 			oneJobBom,
 			byProductBom,
 			turnoverBom,