ysy 2 ani în urmă
părinte
comite
a2cd55970b

+ 11 - 0
api/pda/workOrder.js

@@ -92,6 +92,17 @@ export async function getLastTreeByPid(parentId) {
 }
 
 
+export async function qualityReview(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/pda/mes/feed/qualityReview`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+
 
 
 // 查询库存台账首页列表

+ 11 - 0
pages.json

@@ -1442,6 +1442,17 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
+		
+		{
+			"path": "pages/pda/feeding/outbound/index",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+		
+		
+
 
 		{
 			"path": "pages/pda/jobBooking/index/index",

+ 1 - 1
pages/pda/feeding/bill/index.vue

@@ -18,7 +18,7 @@
 
 						<deviceBom v-if='it.equipmentList.length != 0' :list='it.equipmentList'></deviceBom>
 
-						<modelBom v-if='it.equipmentList.length != 0' :list='it.modelList'>
+						<modelBom v-if='it.modelList.length != 0' :list='it.modelList'>
 						</modelBom>
 
 						<instanceBom v-if='it.instanceList.length != 0' :list='it.instanceList'></instanceBom>

+ 7 - 7
pages/pda/feeding/components/modelBom.vue

@@ -19,7 +19,7 @@
 			<view class="content_table" >
 				<view class="item " v-for="(tab, tIdx) in tableH(5)" :key="tIdx">
 					<view class="item " v-if="Array.isArray(tab.prop)">
-						<view class="lable lable300 rx-sc"> {{ item[tab.prop[0]]  }}</view>
+						<view class="lable lable240 rx-sc"> {{ item[tab.prop[0]]  }}</view>
 						<view class="content">
 							{{ item[tab.prop[1]]  }}
 						</view>
@@ -30,7 +30,7 @@
 
 
 					<view class="item" v-if="!Array.isArray(tab.prop)">
-						<view class="lable lable300 rx-sc"> {{ tab.label  }}</view>
+						<view class="lable lable240 rx-sc"> {{ tab.label  }}</view>
 						<view class="content content_num" v-if='tab.write'>
 							<input class="uni-input" v-model="tab.extInfo ?  item.extInfo[tab.prop]: item[tab.prop]"
 								type="digit"></input>
@@ -44,7 +44,7 @@
 				</view>
 
 				<view class="item">
-					<view class="lable lable300 rx-sc">本次冲压数 </view>
+					<view class="lable lable240 rx-sc">本次冲压数 </view>
 					<view class="content content_num">
 						<input class="uni-input" v-model="item.extInfo.cyTimes" type='digit'></input>
 					</view>
@@ -164,7 +164,7 @@
 
 
 		.content_table {
-						width: 722rpx;
+						width: 660rpx;
 			border: 2rpx solid $border-color;
 
 			.item {
@@ -183,12 +183,12 @@
 
 				.lable150 {
 					width: 156rpx !important;
-					font-size: 24rpx;
+					font-size: 20rpx;
 				}
 
 
-				.lable300 {
-					width: 300rpx !important;
+				.lable240 {
+					width: 240rpx !important;
 					padding-left: 14rpx;
 					font-size: 24rpx;
 				}

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

@@ -33,6 +33,9 @@
 
 
 					<view class="operate_box rx-sc">
+						<u-button size="small" class="u-reset-button" type="success"
+							@click="handOutbound(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"
@@ -427,6 +430,14 @@
 				})
 			},
 
+			handOutbound(id) {
+				const storageKey = Date.now() + "";
+				uni.setStorageSync(storageKey, this.List || []);
+				uni.navigateTo({
+					url: `/pages/pda/feeding/outbound/index?id=${id}&storageKey=${storageKey}taskId=${this.taskId}`
+				})
+			},
+
 		},
 
 	}
@@ -475,7 +486,7 @@
 	}
 
 	.operate_box {
-		padding: 10rpx 160rpx;
+		padding: 10rpx 80rpx;
 
 		/deep/ .u-button {
 			width: 160rpx;

+ 22 - 0
pages/pda/feeding/outbound/index.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 61 - 33
pages/pda/jobBooking/index/index.vue

@@ -490,7 +490,7 @@
 
 
 
-			save() {
+			async save() {
 				uni.showLoading({
 					title: '加载中'
 				});
@@ -555,19 +555,60 @@
 					}
 				}
 
-				
 
+				if (this.taskType == 4) {
+					const isPack = await this.checkPack()
+
+					if (!isPack) {
+						return false
+					}
+				}
 
 
-				// 包装
-				if (this.taskType == 4) {
+
+
+
+
+
+
+
+				if (this.objData.currentTaskDiagram.isFirstTask == 0) { // isFirstTask 判断是否首工序
+
+					const isFirstTask = await this.checkFirstTask()
+					if (!isFirstTask) {
+						return false
+					}
+				}
+
+
+
+	
+
+				jobSave(this.objData).then(res => {
+					uni.hideLoading();
+					uni.navigateBack()
+
+				}).finally(() => {
+
+					setTimeout(function() {
+						uni.hideLoading();
+					}, 3000);
+				})
+
+
+
+			},
+
+
+			checkPack() {
+				uni.hideLoading();
+				return new Promise((resolve) => {
 					let packInfo = this.$refs.packRef.getData()
 					this.objData.packInfo = packInfo
 					this.objData.taskType = this.taskType
 
-
-
-					if (packInfo.formedNumLast != Number(this.objData.workReportInfo['formedNum']) + Number(this.objData
+					if (packInfo.formedNumLast != Number(this.objData.workReportInfo['formedNum']) + Number(this
+							.objData
 							.notFormedList[0].notFormedNum)) {
 						uni.hideLoading();
 						uni.showModal({
@@ -576,9 +617,9 @@
 							confirmText: '确认', //这块是确定按钮的文字
 							success: function(res) {
 								if (res.confirm) {
-									// 执行确认后的操作
+									resolve(true)
 								} else {
-									return false
+									resolve(false)
 								}
 							}
 						})
@@ -586,16 +627,16 @@
 
 					}
 
-
-				}
-
+				})
 
 
-				if (this.objData.currentTaskDiagram.isFirstTask == 0) { // isFirstTask 判断是否首工序
-					uni.hideLoading();
-					if (this.objData.formedNumLast != Number(this.objData.workReportInfo['formedNum']) + Number(this
-							.objData.notFormedList[0].notFormedNum)) {
 
+			},
+			checkFirstTask() {
+				uni.hideLoading();
+				return new Promise((resolve) => {
+					if (this.objData.formedNumLast != Number(this.objData.workReportInfo['formedNum']) + Number(
+							this.objData.notFormedList[0].notFormedNum)) {
 
 						uni.showModal({
 							title: '提示',
@@ -603,34 +644,21 @@
 							confirmText: '确认', //这块是确定按钮的文字
 							success: function(res) {
 								if (res.confirm) {
-									// 执行确认后的操作
+									resolve(true)
 								} else {
-									return false
+									resolve(false)
+
 								}
 							}
 						})
 
-					
 					}
-				}
-
-
-
-
-				jobSave(this.objData).then(res => {
-					uni.hideLoading();
-					uni.navigateBack()
 
-				}).finally(() => {
-
-					setTimeout(function() {
-						uni.hideLoading();
-					}, 3000);
 				})
 
 
 
-			}
+			},
 		}
 	}
 </script>

+ 59 - 2
pages/pda/picking/components/packingBom.vue

@@ -1,5 +1,10 @@
 <template>
 	<view>
+		<view class="title_box rx-bc" v-if='list.length'>
+			<view class="name">包装</view>
+
+
+		</view>
 
 
 		<view class="material rx-ss" v-for="(mate, idx) in list">
@@ -20,12 +25,13 @@
 				</view>
 
 
-				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop' :key="index">
+				<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>
@@ -82,6 +88,57 @@
 </script>
 
 <style lang="scss" scoped>
+	.title_box {
+		margin-top: 20rpx;
+		margin-bottom: 10rpx;
+
+		.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;
 

+ 20 - 4
pages/pda/sample/inspection/index.vue

@@ -52,7 +52,7 @@
 		workorderList,
 		getLastTreeByPid,
 		scanLedger,
-
+		qualityReview
 	} from '@/api/pda/workOrder.js'
 	import {
 		batchSave
@@ -97,6 +97,7 @@
 
 
 			this.getLastTree()
+
 		},
 
 		onShow() {
@@ -130,7 +131,7 @@
 					taskId: this.taskId,
 
 				}).then(res => {
-				
+
 
 					this.List = res.map(m => {
 						m.workOrderId = m.id
@@ -172,19 +173,34 @@
 			getLastTree() {
 
 
-
 				getLastTreeByPid(this.inspectionId).then(res => {
 
 					this.inspectionList = res
 
-
 					this.inspectionList.push({
 						id: -1,
 						name: '废品总数量'
 					})
+					
+					this.getGualityReview()
 				})
 			},
 
+			getGualityReview() {
+				let param = {
+					inspectionId: this.inspectionId,
+					workOrderId: this.id,
+					taskId: this.taskId,
+				}
+				qualityReview(param).then(res => {
+
+					if (res && res.extInfo && res.extInfo.inspectionList) {
+						this.inspectionList = res.extInfo.inspectionList
+					}
+				})
+
+			},
+
 
 
 			scrolltolower() {},

+ 11 - 10
pages/pda/workOrder/extrusionMolding/index.vue

@@ -207,8 +207,9 @@
 		},
 
 		onShow() {
-			this.getSteps()
 			this.getInfo()
+			this.getSteps()
+			
 
 			this.produce() // 生产明细
 		},
@@ -243,16 +244,15 @@
 			},
 
 			getInfo() {
-			
-				
+
+
 				workorderInfo(this.id).then(res => {
 					console.log(res)
 					this.info = res
 					this.taskId = res.taskId
 					this.setTypeFn()
-
-
 					this.feedStatus()
+
 					uni.hideLoading();
 				}).catch(() => {
 					uni.hideLoading();
@@ -283,8 +283,8 @@
 			},
 
 			operate(type, item) {
-				
-			
+
+
 				let url
 				let taskId = this.currentTaskId || this.taskId
 				let taskName = this.currentTaskName || this.info.taskName
@@ -346,17 +346,18 @@
 					})
 				} else if (type == 'inspection') {
 					url = '/pages/pda/sample/inspection/index'
-					url += `?workOrderId=${this.info.id}&taskId=${taskId }&taskName=${taskName}&inspectionId=${item.id}&inspectionName=${item.name}`
+					url +=
+						`?workOrderId=${this.info.id}&taskId=${taskId }&taskName=${taskName}&inspectionId=${item.id}&inspectionName=${item.name}`
 					uni.navigateTo({
 						url
 					})
-				}  else if (type == 'inspectionJob') {
+				} else if (type == 'inspectionJob') {
 					url = '/pages/pda/sample/inspection/job'
 					url += `?workOrderId=${this.info.id}&taskId=${taskId }&taskName=${taskName}`
 					uni.navigateTo({
 						url
 					})
-				} 
+				}