mao 1 year ago
parent
commit
55986bb17d

+ 3 - 3
components/dialog-lot/dialog-lot.vue

@@ -14,13 +14,13 @@
 				<text class="label">关联箱号</text>
 				<text class="label value">{{item['carrierName']}}</text>
 			</view>
-			<view class="list-container-item uni-row">
+<!-- 			<view class="list-container-item uni-row">
 				<text class="label">当前工序</text>
 				<text class="label value">{{item['daywork'].currentProcess.processAlias}}</text>
-			</view>
+			</view> -->
 			<view class="list-container-item uni-row" style="border-bottom: 1px solid #999999;">
 				<text class="label">投产数量</text>
-				<text class="label value">{{item['qualifiedQuantity']}}</text>
+				<text class="label value">{{item['prodNum']}}</text>
 			</view>
 		</view>
 		<view class="add-btn-container uni-row">

+ 5 - 1
pages/batchReporting/index.vue

@@ -33,9 +33,13 @@
 					<text class="label">产品描述</text>
 					<text class="label right">{{ curPlan['productDescription'] }}</text>
 				</view>
+				<view class="item-info uni-row">
+					<text class="label">材质</text>
+					<text class="label right">{{ item['furnaceNoInfo'] ? item['furnaceNoInfo'].firstTechnicalRequirement + ";" + item['furnaceNoInfo'].secondTechnicalRequirement : '-' }}</text>
+				</view>
 				<view class="item-info uni-row">
 					<text class="label">箱号</text>
-					<text class="label right">{{ item['carrierName'] }}</text>
+					<text class="label right">{{ item['carrierName'] ? item['carrierName'] : '-' }}</text>
 				</view>
 				<!-- 			<view class="item-info uni-row">
 					<text class="label">总工时</text>

+ 33 - 14
pages/reportingForWork/index.vue

@@ -69,7 +69,8 @@
 		<dialog-end-work ref="endWorkDialog" @sendEquipment='getEquipment' />
 		<dialog-selectEquipment ref='selectEquipment'
 			@handleAddDayWorkItem='handleAddDayWorkItem'></dialog-selectEquipment>
-		<dialog-selectInviteUser ref="inviteUser" @handleAddDayWorkItem='handleAddDayWorkItem' ></dialog-selectInviteUser>
+		<dialog-selectInviteUser ref="inviteUser"
+			@handleAddDayWorkItem='handleAddDayWorkItem'></dialog-selectInviteUser>
 	</view>
 </template>
 
@@ -94,7 +95,9 @@
 		timestampToTime,
 		toHHmmss
 	} from '@/utils/common.js'
-	import { checkBizDayworkCarriers } from '@/api/business/dayWork.js'
+	import {
+		checkBizDayworkCarriers
+	} from '@/api/business/dayWork.js'
 
 	const listData = ref([]) // 回显 
 	const curPlan = ref({}) // 接收生产计划单信息 
@@ -161,22 +164,22 @@
 		checkBizDayworkCarriers({
 			id: store.dayworkInfo.id
 		}).then(res => {
-			if(res.code == 200){
+			if (res.code == 200) {
 				// 调用子组件中的方法
-				endWorkDialog.value.open(data,listData)
-			}else{
+				endWorkDialog.value.open(data, listData)
+			} else {
 				uni.showToast({
 					icon: "none",
 					title: res.msg + ",请绑定",
 					duration: 2000
 				})
 				uni.navigateTo({
-					url:"/pages/changeBox/index"
+					url: "/pages/changeBox/index"
 				})
 			}
 		})
 	}
-	
+
 	function HandleSeleteInviteUser(data) {
 		inviteUser.value.open(data)
 	}
@@ -193,12 +196,24 @@
 	}
 
 	function handleStartProcessing(item) {
-		if(store.dayworkInfo.status == 4){
+		let flag = false;
+		for (let i = 0; i < listData.value.length; i++) {
+			if(listData.value[i].status == 3){
+				flag = true;
+				break;
+			}
+		}
+		if (store.dayworkInfo.status == 4) {
 			uni.showToast({
 				icon: 'none',
 				title: '当前批次已完成'
 			})
-		}else{
+		} else if (flag) {
+			uni.showToast({
+				icon: 'none',
+				title: '该工序已完成,请转到下一工序再报工'
+			})
+		} else {
 			selectEquipment.value.open(item);
 		}
 	}
@@ -237,7 +252,8 @@
 				productionPlanId: curPlan.value.productionPlanId,
 				productionPlanDetailId: curPlan.value.id,
 				technologicalProcessId: curPlan.value.technologicalProcessId,
-				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
+				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store
+					.dayworkInfo['processQualifiedNum'],
 				deptId: store.curDeptDetails.deptId,
 				deptName: store.curDeptDetails.deptName
 			}
@@ -249,11 +265,12 @@
 				productionPlanId: curPlan.value.productionPlanId,
 				productionPlanDetailId: curPlan.value.id,
 				technologicalProcessId: curPlan.value.technologicalProcessId,
-				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
+				prodNum: store.dayworkInfo['processQualifiedNum'] == 0 ? store.dayworkInfo['oneLotQuantity'] : store
+					.dayworkInfo['processQualifiedNum'],
 				status: 1,
 				startTime: timestampToTime(new Date()),
 				deptId: store.curDeptDetails.deptId,
-				deptName: store.curDeptDetails.deptName, 
+				deptName: store.curDeptDetails.deptName,
 				...data
 			}
 			reqParam.value = dayWorkItem.value;
@@ -364,7 +381,8 @@
 
 		}
 	}
-	.top{
+
+	.top {
 		position: fixed;
 		bottom: 132rpx;
 		right: 0;
@@ -374,12 +392,13 @@
 		align-items: center;
 		justify-content: center;
 		background-color: #FFFFFF;
+
 		.top-btn {
 			font-size: 28rpx;
 			color: #FFFFFF;
 			background-color: #1684fc;
 			width: 100%;
-		
+
 		}
 	}