ysy 2 ani în urmă
părinte
comite
17e408804c

+ 108 - 0
pages/pda/feeding/components/feedBom.js

@@ -0,0 +1,108 @@
+export const tableHeader = selectEquiType => {
+
+	// 1:物料;4:生产设备; 5:模具;6:备品备件; 7:周转车;8:舟皿;9:产品;10:消耗材料,11:干燥区,12.质检,13.包装材料,14.工装夹具 ,15.刀具 ,99.其他
+	switch (+selectEquiType) {
+		case 1:
+			return [{
+					label: '型号',
+					prop: 'modelType'
+				},
+				{
+					label: '规格',
+					prop: 'specification'
+				}
+			]
+		case 5:
+			return [{
+					label: '牌号',
+					prop: 'brandNum'
+				},
+				{
+					label: '型号',
+					prop: 'modelType'
+				},
+				{
+					label: '模孔数量',
+					prop: ''
+				},
+
+				{
+					label: '芯棒直径',
+					prop: ''
+				},
+				{
+					label: '收缩系数',
+					prop: '',
+					formatter(row) {
+						if (!row?.extendField) return ''
+						const extendField = JSON.parse(row.extendField)
+						return extendField.shrinkageCoefficient
+					}
+				},
+			]
+
+
+		case 7:
+			return [{
+					label: '规格',
+					prop: 'specification'
+				},
+				{
+					label: '材质',
+					prop: 'texture',
+					formatter(row) {
+						if (!row?.extendField) return ''
+						const extendField = JSON.parse(row.extendField)
+						return extendField.texture
+					}
+				},
+				{
+					label: '长宽高',
+					prop: '',
+					formatter(row) {
+						if (!row?.extendField) return ''
+						const extendField = JSON.parse(row.extendField)
+						return `${extendField.length || '-'}*${extendField.width || '-'}*${
+											  extendField.high || '-'
+											}`
+					}
+				}
+			]
+
+
+		case 8: //'舟皿'
+			return [{
+					label: '规格',
+					prop: 'specification'
+				},
+				{
+					label: '型号',
+					prop: 'modelType'
+				},
+				{
+					label: '槽数',
+					prop: ''
+				},
+
+
+				{
+					label: '长宽高',
+					prop: '',
+					formatter(row) {
+						if (!row?.extendField) return ''
+						const extendField = JSON.parse(row.extendField)
+						return `${extendField.length || '-'}*${extendField.width || '-'}*${
+              extendField.high || '-'
+            }`
+					}
+				}
+			]
+		case 10:
+			return []
+		case 14:
+			return []
+
+	}
+
+	return []
+}

+ 207 - 0
pages/pda/feeding/components/modelBom.vue

@@ -0,0 +1,207 @@
+<template>
+	<view>
+		<view class="title_box rx-bc">
+			<view class="name">模具信息</view>
+
+			<view class="btn_box rx-bc" @click="handleScan(workOrderId)">
+				<image class="scan" src="@/static/pda/ScanIt.svg"></image>
+				更换模具
+			</view>
+		</view>
+
+
+		<view class="material ">
+
+			<view class="content_table" v-for="(item,index) in list" :key='index'>
+				<view class="item">
+					<view class="lable rx-cc">设备编码</view>
+					<view class="content">
+						{{item.code}}
+					</view>
+				</view>
+
+				<view class="item">
+					<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">{{ item.fixCode }}</view>
+				</view>
+
+	
+
+
+
+
+			</view>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			workOrderId: {
+				type: String,
+				default: ''
+			},
+			list: {
+				type: Array,
+				default: () => []
+			},
+		},
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+			handleScan(id) {
+				this.$emit('scanIt', id, )
+			},
+		}
+	}
+</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;
+			}
+
+
+		}
+
+		.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;
+
+			}
+
+		}
+
+	}
+
+
+	.material {
+		margin-top: 10rpx;
+
+
+
+		.content_table {
+			width: 100%;
+			border: 2rpx solid $border-color;
+            margin-bottom: 10rpx;
+			.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;
+				}
+
+				.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;
+					}
+
+				}
+
+				.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>

+ 37 - 24
pages/pda/feeding/details.vue

@@ -8,8 +8,12 @@
 				<view v-for="(item,index) in List" :key="index" class="card_box">
 					<workOrderBom :item='item' @handleScan='handleScan'></workOrderBom>
 
-					<deviceBom v-if='item.device.length != 0' :workOrderId='item.workOrderId' :list='item.device'
+					<deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId' :list='item.equipmentList'
 						@scanIt='scanIt'></deviceBom>
+						
+					<modelBom v-if='item.modelList.length != 0' :workOrderId='item.workOrderId' :list='item.modelList'></modelBom>	
+						
+						
 					<view class="operate_box rx-sc">
 						<u-button size="small" class="u-reset-button" type="success"
 							@click="handAdd(item.workOrderId)">手动添加</u-button>
@@ -34,6 +38,7 @@
 <script>
 	import workOrderBom from './components/workOrderBom.vue'
 	import deviceBom from './components/deviceBom.vue'
+	import modelBom from './components/modelBom.vue'
 	import {
 		workorderList,
 		getByCode,
@@ -47,7 +52,8 @@
 	export default {
 		components: {
 			workOrderBom,
-			deviceBom
+			deviceBom,
+			modelBom
 		},
 		data() {
 			return {
@@ -111,7 +117,9 @@
 				workorderList(this.idsList).then(res => {
 					this.List = res.map(m => {
 						m.workOrderId = m.id
-						m.device = []
+						m.equipmentList = [] // 设备
+						m.modelList = [] // 模具
+						m.instanceList = [] // 投料
 						delete m.id
 						return {
 							...m
@@ -128,15 +136,15 @@
 				console.log(id)
 				console.log(type)
 
-				this.scanData('SCJHGD20240117002', type, id)
-				return false
+				// this.scanData('SCJHGD20240117002', type, id)
+				// return false
 
-				// let _this = this
-				// uni.scanCode({
-				// 	success: function(res) {
-				// 		_this.scanData(res.result, type, id)
-				// 	}
-				// })
+				let _this = this
+				uni.scanCode({
+					success: function(res) {
+						_this.scanData(res.result, type, id)
+					}
+				})
 
 
 			},
@@ -171,32 +179,37 @@
 			scanIt(id) {
 				console.log(id)
 
-				this.scanItData('CX-EQ-YLSJL-016', id)
+				this.scanItData('M001', id)
 				return false
 
-				let _this = this
-				uni.scanCode({
-					success: function(res) {
-						_this.scanItData(res.result, id)
-					}
-				})
+				// let _this = this
+				// uni.scanCode({
+				// 	success: function(res) {
+				// 		_this.scanItData(res.result, id)
+				// 	}
+				// })
 			},
 
 			scanItData(result, id) {
 				scanLedger(result).then(res => {
-					console.log(res)
-					let _arr = []
-					if (res.rootCategoryLevelId == 4) { // 设备
+					 let _arr = []
+					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
-								_arr[index].device = [res]
+								_arr[index].equipmentList = res
 							}
 						})
 						this.List = _arr
 
-					} else if (res.rootCategoryLevelId == 5) {
-
+					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) {
+                         _arr = this.List
+                         _arr.forEach((e, index) => {
+                         	if (e.workOrderId == id) {
+                         		_arr[index].modelList = res
+                         	}
+                         })
+                         this.List = _arr
 					}
 				})
 			},

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

@@ -204,6 +204,7 @@
 			},
 
 			confirm(id, name) {
+			
 				this.categoryLevelId = id
 				this.getList()
 			},
@@ -214,11 +215,11 @@
 					keyWord: this.keyWord,
 					pageNum: 1,
 					size: -1,
-					dimension: 1 
+					
 				}
 				this.list = []
 				if(this.isType == 'pick') {
-					
+					param.dimension = 1 
 					pageeLedgerMain(param).then(res => {
 						this.list.push(
 							...res.list.map(i => {
@@ -240,7 +241,6 @@
 					})
 					
 				} else if(this.isType == 'feed') {
-					
 					assetPage(param).then(res => {
 						this.list.push(
 							...res.list.map(i => {