ysy 2 jaren geleden
bovenliggende
commit
dd18c8f018

+ 2 - 1
api/pda/workOrder.js

@@ -32,8 +32,9 @@ export async function getTaskInstanceList(id) {
 
 // 工单信息
 export async function workorderInfo(id) {
+	let timeStamp =  new Date().getTime() 
 	const data = await get(
-		Vue.prototype.apiUrl + `/pda/mes/workorder/getById/${id}`,
+		Vue.prototype.apiUrl + `/pda/mes/workorder/getById/${id}?timeStamp=${timeStamp}`,
 	);
 	if (data.code == 0) {
 		return data.data;

+ 16 - 0
pages/pda/common.js

@@ -136,6 +136,22 @@ export const tableHeader = selectEquiType => {
 
 
 			]
+			
+			case 13:
+				return [
+
+				{
+					label: '规格',
+					prop: 'specification'
+				},
+			
+				{
+					label: '型号',
+					prop: 'modelType'
+				},
+			
+				]
+			
 
 		case 14:
 			return []

+ 20 - 4
pages/pda/feeding/components/feedBom.js

@@ -35,7 +35,7 @@ export const tableHeader = selectEquiType => {
 					write: false,
 					extInfo: false
 				},
-				
+
 				{
 					label: '模具编号',
 					prop: 'codeNumber',
@@ -43,15 +43,15 @@ export const tableHeader = selectEquiType => {
 					extInfo: false
 				},
 
-	
+
 				{
 					label: '已冲压次数',
 					prop: 'startCyTimes',
 					write: false,
 					extInfo: true
 				},
-				
-				
+
+
 
 				{
 					label: '最大冲压次数',
@@ -122,6 +122,22 @@ export const tableHeader = selectEquiType => {
 			]
 		case 10:
 			return []
+
+		case 13:
+			return [
+
+				{
+					label: '规格',
+					prop: 'specification'
+				},
+
+				{
+					label: '型号',
+					prop: 'modelType'
+				},
+
+			]
+
 		case 14:
 			return []
 

+ 220 - 0
pages/pda/feeding/components/packingBom.vue

@@ -0,0 +1,220 @@
+<template>
+	<view>
+		<view class="title_box rx-bc">
+			<view class="name">包装</view>
+		</view>
+
+		<view class="material rx-ss" v-for="(mate, idx) in list">
+			<view class="left rx-ss" @click="getDelete(idx)">
+				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
+			</view>
+			<view class="content_table">
+				<view class="item">
+					<view class="lable rx-cc">编码</view>
+					<view class="content">
+						{{mate.code}}
+					</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">名称</view>
+					<view class="content">{{mate.name}}</view>
+				</view>
+
+
+				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop' :key="index">
+					<view class="lable rx-cc">{{ itm.label }}</view>
+					<view class="content">{{ mate[itm.prop] }}</view>
+
+				</view>
+	<!-- 			
+				<view class="item">
+					<view class="lable rx-cc">包装库存</view>
+					<view class="content">{{mate.packingCountBase}}/ {{mate.minUnit}}</view>
+				</view> -->
+
+
+				<view class="item">
+					<view class="lable rx-cc">领料数量</view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="mate.feedQuantity"
+							type="digit"></input>
+						<view class="unit">/{{mate.unit}}</view>
+					</view>
+				</view>
+
+
+
+				<view class="item">
+					<view class="lable rx-cc">领料仓库</view>
+					<view class="content ">
+						{{ mate.pathName }}
+					</view>
+				</view>
+
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		tableHeader
+	} from './feedBom.js'
+	export default {
+		props: ['list'],
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+			tableH(type) {
+				return tableHeader(type)
+			},
+
+			getDelete(idx) {
+				this.list.splice(idx, 1)
+			},
+		}
+	}
+</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;
+
+		.left {
+			width: 40rpx;
+		}
+
+		.zdy_check {
+			width: 30rpx;
+			height: 30rpx;
+			border: 2rpx solid #c8c9cc;
+			border-radius: 4rpx;
+
+
+		}
+
+		.check_active {
+			background: $theme-color;
+			border: 2rpx solid $theme-color;
+
+			/deep/ .u-icon__icon {
+				color: #fff !important;
+			}
+		}
+
+		.content_table {
+			width: 652rpx;
+			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;
+				}
+
+				.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;
+
+					/deep/ .uni-input-input {
+						width: 200rpx;
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
+					}
+
+					.unit {
+						padding: 0 4rpx;
+						font-size: 24rpx;
+						color: #404446;
+					}
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
+			}
+
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
+		}
+	}
+</style>

+ 10 - 9
pages/pda/feeding/details.vue

@@ -28,6 +28,8 @@
 					<aridRegion v-if='item.aridRegionList.length != 0' :list='item.aridRegionList'
 						@handleScan='handleScan'></aridRegion>
 
+					<packingBom v-if='item.packingList.length != 0' :list='item.packingList'></packingBom>
+
 
 
 					<view class="operate_box rx-sc">
@@ -58,6 +60,7 @@
 	import aridRegion from './components/aridRegion'
 	import paramBom from './components/paramBom.vue'
 	import turnoverBom from '../jobBooking/components/turnoverBom.vue'
+	import packingBom from './components/packingBom.vue'
 
 	import {
 		workorderList,
@@ -80,7 +83,8 @@
 			instanceBom,
 			aridRegion,
 			paramBom,
-			turnoverBom
+			turnoverBom,
+			packingBom
 		},
 		data() {
 			return {
@@ -115,16 +119,11 @@
 						let instanceList = [] // 投料
 						let aridRegionList = [] // 干燥区
 						let equipmentList = [] // 生产设备
-						let isEquipment = m.equipmentList.length > 0 ? true : false // 判断是否有设置
+
 
 						selectList.forEach(f => {
 							if (f.rootCategoryLevelId == 4) {
-								if (isEquipment) {
-									equipmentList = m.equipmentList
-								} else {
-									equipmentList = equipmentList.concat(f)
-								}
-
+								equipmentList = equipmentList.concat(f)
 
 							}
 							if (f.rootCategoryLevelId == 5) {
@@ -165,7 +164,6 @@
 			save() {
 
 
-
 				batchSave(this.List).then(res => {
 
 					uni.navigateTo({
@@ -187,6 +185,7 @@
 						m.equipmentList = [] // 设备
 						m.modelList = [] // 模具
 						m.aridRegionList = [] // 干燥区
+						m.packingList = [] // 包装
 
 						if (m.pickOutInList.length > 0) {
 							m.pickOutInList.forEach(f => {
@@ -198,6 +197,8 @@
 									m.modelList.push(f)
 								} else if (f.rootCategoryLevelId == 11) {
 									m.aridRegionList.push(f)
+								} else if (f.rootCategoryLevelId == 13) {
+									m.packingList.push(f)
 								}
 							})
 						}

+ 186 - 0
pages/pda/picking/components/packingBom.vue

@@ -0,0 +1,186 @@
+<template>
+	<view>
+
+
+		<view class="material rx-ss" v-for="(mate, idx) in list">
+			<view class="left rx-ss" @click="getDelete(idx)">
+				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
+			</view>
+			<view class="content_table">
+				<view class="item">
+					<view class="lable rx-cc">编码</view>
+					<view class="content">
+						{{mate.code}}
+					</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">名称</view>
+					<view class="content">{{mate.name}}</view>
+				</view>
+
+
+				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop' :key="index">
+					<view class="lable rx-cc">{{ itm.label }}</view>
+					<view class="content">{{ mate[itm.prop] }}</view>
+
+				</view>
+				
+				<view class="item">
+					<view class="lable rx-cc">包装库存</view>
+					<view class="content">{{mate.packingCountBase}}/ {{mate.minUnit}}</view>
+				</view>
+
+
+				<view class="item">
+					<view class="lable rx-cc">领料数量</view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="mate.demandQuantity"
+							@blur='mate.demandQuantity > mate.availableCountBase ?  mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
+							type="digit"></input>
+						<view class="unit">/{{mate.measuringUnit}}</view>
+						<view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }} {{mate.measuringUnit}})</view>
+					</view>
+				</view>
+
+
+
+				<view class="item">
+					<view class="lable rx-cc">领料仓库</view>
+					<view class="content ">
+						{{ mate.pathName }}
+					</view>
+				</view>
+
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		tableHeader
+	} from '../../common.js'
+	export default {
+		props: ['list'],
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+			tableH(type) {
+				return tableHeader(type)
+			},
+
+			getDelete(idx) {
+				this.list.splice(idx, 1)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.material {
+		margin-top: 10rpx;
+
+		.left {
+			width: 40rpx;
+		}
+
+		.zdy_check {
+			width: 30rpx;
+			height: 30rpx;
+			border: 2rpx solid #c8c9cc;
+			border-radius: 4rpx;
+
+
+		}
+
+		.check_active {
+			background: $theme-color;
+			border: 2rpx solid $theme-color;
+
+			/deep/ .u-icon__icon {
+				color: #fff !important;
+			}
+		}
+
+		.content_table {
+			width: 652rpx;
+			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;
+				}
+
+				.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;
+
+					/deep/ .uni-input-input {
+						width: 200rpx;
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
+					}
+
+					.unit {
+						padding: 0 4rpx;
+						font-size: 24rpx;
+						color: #404446;
+					}
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
+			}
+
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
+		}
+	}
+</style>

+ 28 - 16
pages/pda/picking/details.vue

@@ -84,6 +84,8 @@
 							@hendDel='hendDel'>
 						</boatBom>
 
+						<packingBom :list='item.packingList2'></packingBom>
+
 
 						<view class='flex_btn' v-if='isPick' @click="openDetails">已有领料单</view>
 
@@ -109,6 +111,7 @@
 	import instanceBom from './components/instanceBom.vue'
 	import modelBom from './components/modelBom.vue'
 	import boatBom from './components/boatBom.vue'
+	import packingBom from './components/packingBom'
 	import {
 		workorderList
 	} from '@/api/pda/workOrder.js'
@@ -122,7 +125,8 @@
 		components: {
 			instanceBom,
 			modelBom,
-			boatBom
+			boatBom,
+			packingBom
 		},
 		data() {
 			return {
@@ -147,11 +151,11 @@
 
 
 			this.getList()
-			
-			if(this.idsList.length == 1) {
+
+			if (this.idsList.length == 1) {
 				this.getPick()
 			}
-			
+
 
 		},
 		onShow() {
@@ -163,10 +167,12 @@
 						let instanceList2 = [] // 投料
 						let modelList2 = [] // 模具
 						let palletList2 = []
+						let packingList2 = [] // 包装
 
 
 						selectList.forEach(f => {
-							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8) { // 投料
+							if (f.rootCategoryLevelId != 5 && f.rootCategoryLevelId != 8 && f
+								.rootCategoryLevelId != 13) {
 								f.automatic = 1
 								instanceList2 = instanceList2.concat(f)
 							} else if (f.rootCategoryLevelId == 5) { // 模具
@@ -175,12 +181,16 @@
 							} else if (f.rootCategoryLevelId == 8) { // 舟皿
 								f.automatic = 1
 								palletList2 = palletList2.concat(f)
+							} else if (f.rootCategoryLevelId == 13) {
+								f.automatic = 1
+								packingList2 = packingList2.concat(f)
 							}
 						})
 
 						this.$set(m, 'instanceList2', instanceList2)
 						this.$set(m, 'modelList2', modelList2)
 						this.$set(m, 'palletList2', palletList2)
+						this.$set(m, 'packingList2', packingList2)
 					}
 				})
 
@@ -204,7 +214,7 @@
 						let bomList = m.bomList.filter(f => f.checked)
 						m['bomDetailDTOSList'] = [...bomList, ...m.modelList, ...m.palletList]
 					}
-					m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2]
+					m.instanceList = [...m.instanceList2, ...m.modelList2, ...m.palletList2, ...m.packingList2]
 
 					return {
 						...m
@@ -257,9 +267,11 @@
 						m['palletList'] = palletList
 						m['bomList'] = bomList
 
+
+						m['modelList2'] = []
 						m['instanceList2'] = []
 						m['palletList2'] = []
-						m['modelList2'] = []
+						m['packingList2'] = []
 
 						delete m.id
 						return {
@@ -309,32 +321,32 @@
 				this.$forceUpdate()
 
 			},
-			
+
 
 
 
 			addPicking(id, item) {
 				const storageKey = Date.now() + "";
 				console.log(item)
-				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2]
+				let arr = [...item.instanceList2, ...item.modelList2, ...item.palletList2, ...item.packingList2]
 				uni.setStorageSync(storageKey, arr);
 				uni.navigateTo({
 					url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=pick&taskId=${this.taskId}`
 				})
 			},
-			
+
 			getPick() {
 				pickDetails(this.idsList).then(res => {
-					
-					if(res && res.length > 0) {
+
+					if (res && res.length > 0) {
 						this.isPick = true
 					}
-					
-				}) 
+
+				})
 			},
-			
+
 			openDetails() {
-				let url =  `/pages/pda/picking/bill/index?id=${this.idsList[0]}`
+				let url = `/pages/pda/picking/bill/index?id=${this.idsList[0]}`
 				uni.navigateTo({
 					url
 				})

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

@@ -96,8 +96,18 @@
 
 
 
-
-
+			
+
+					if (this.objData.quality && this.objData.quality.sampleList.length > 0) {
+						let _count = 0
+						
+						this.objData.quality.sampleList.forEach(e => {
+							_count  = _count + Number(e.num)
+						})
+						
+						this.objData.workReportInfo.formedNum =   res.formedNumLast - _count
+						
+					}
 
 
 

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

@@ -243,7 +243,7 @@
 			},
 
 			getInfo() {
-				console.log(111)
+			
 				
 				workorderInfo(this.id).then(res => {
 					console.log(res)

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

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