mao преди 1 година
родител
ревизия
d403e8285f

+ 1 - 1
components/dialog-base/dialog-base.vue

@@ -74,7 +74,7 @@
 			padding: 0 48rpx 48rpx 48rpx;
 			background-color: #FFFFFF;
 			z-index: 1002;
-			// max-height: 64%;
+			max-height: 64%;
 			// overflow: auto;
 
 			.close-btn {

+ 69 - 38
components/dialog-end-work/dialog-end-work.vue

@@ -12,10 +12,10 @@
 						@click="handleAddWasteInfo">+添加</text></view>
 			</view>
 			<view class="list-title uni-row" v-for="(item, index) in wasteInfo">
-				<input class="input" @input="handleInputRejectNum" style="width: 20%;" v-model="item.rejectNum"
+				<input class="input" @input="handleInputRejectNum(item)" style="width: 20%;" v-model="item.rejectNum"
 					placeholder="废品量" />
 				<uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="item.reason" :localdata="reasonList"
-					@change="handleTenantChange"></uni-data-select>
+					@change="handleReasonChange(item)"></uni-data-select>
 
 				<uni-icons class="icon-gear" type="close" size="60" color="red"
 					@click="handleDeleteWasteInfo(index)"></uni-icons>
@@ -26,7 +26,7 @@
 				<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
 				<text>是</text>
 			</view>
-			<view v-if="showCarrierList && !store.isProPreProcess" class="confirmCarrier">
+			<view v-if="showCarrierList && !store.isPreProcess" class="confirmCarrier">
 				<text class="label">确认载具</text>
 				<view class="vehicleList uni-row">
 					<view v-for="(item,index) in bindList" :key="index"
@@ -36,10 +36,10 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="store.isProPreProcess" class="add-btn-container uni-row">
+		<view v-if="store.isPreProcess" class="add-btn-container uni-row">
 			<button type="default" class="btn" @click="handlePreFinishReporting">结束报工</button>
 		</view>
-		<view v-if="!store.isProPreProcess" class="add-btn-container uni-row">
+		<view v-if="!store.isPreProcess" class="add-btn-container uni-row">
 			<button v-if="showCarrierList" type="primary" class="btnScan" @click="handleScanCode">扫码确认载具</button>
 			<button type="default" class="btn" @click="handleFinishReporting">结束报工</button>
 		</view>
@@ -78,6 +78,9 @@
 	import {
 		debounce
 	} from '@/utils/common.js'
+	import {
+		getDayWorkItemList
+	} from '@/api/business/dayWorkItem.js'
 
 	const baseDialog = ref(null)
 	const workInfo = ref({})
@@ -90,36 +93,45 @@
 	const endFlag = ref(0)
 	const specialDeptProcessList = ref([])
 	const temp = ref(0) // 保存workInfo.value.qualifiedNum的值(还原用)
+	const lotPreSumReject = ref(0)
+	const lotPreSumQualifiedNum = ref(0)
 
-	onLoad(() => {
-	})
+	onLoad(() => {})
 
 	function open(data, itemListData) {
-		console.log(store.isProPreProcess)
+		console.log(store.isPreProcess)
 		resetPage();
 		workInfo.value = {
 			...data,
 		};
 		workInfo.value.qualifiedNum = 0;
-		getSpecialDeptProcessList().then(res => {
-			if (res.code == 200) {
-				for (let i = 0; i < res.data.length; i++) {
-					specialDeptProcessList.value[i] = res.data[i].processId;
+		Promise.all([getSpecialDeptProcessList(), getDayWorkItemList({
+				dayworkId: store.dayworkInfo.id,
+				status: 2
+			})],)
+			.then(([res, response]) => {
+				console.log(response.rows)
+				if (res.code == 200 && response.code == 200) {
+					for (let i = 0; i < res.data.length; i++) {
+						specialDeptProcessList.value[i] = res.data[i].processId;
+					}
+					// // 给dayworkInfo重新赋值,更新投产量,投入数
+					// store.dayworkInfo = response.rows[0].daywork; 
 				}
-			}
-			if (specialDeptProcessList.value.includes(workInfo.value.processId)) {
-				let sumReject = 0;
-				for (let i = 0; i < itemListData.length; i++) {
-					sumReject += itemListData[i].rejectNum;
+				if (specialDeptProcessList.value.includes(workInfo.value.processId)) {
+					for (let i = 0; i < response.rows.length; i++) {
+						lotPreSumReject.value += response.rows[i].rejectNum;
+						lotPreSumQualifiedNum.value += response.rows[i].qualifiedNum;
+					}
+					workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo
+						.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value : 
+						store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value;
+					// temp.value = workInfo.value.qualifiedNum;
+					console.log(store.dayworkInfo)
+				} else {
+					workInfo.value.qualifiedNum = 0;
 				}
-				workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo.processQualifiedNum - sumReject : store.dayworkInfo.oneLotQuantity - sumReject;
-				// temp.value = workInfo.value.qualifiedNum;
-				console.log(store.dayworkInfo)
-			} else {
-				workInfo.value.qualifiedNum = 0;
-			}
-		})
-		wasteInfo.value = []
+			});
 		init();
 		baseDialog.value.open()
 	}
@@ -136,6 +148,8 @@
 		bindList.value = [];
 		confirmCarrierList.value = [];
 		endFlag.value = 0;
+		lotPreSumReject.value = 0;
+		lotPreSumQualifiedNum.value = 0;
 	}
 
 	function init() {
@@ -174,8 +188,8 @@
 		workInfo.value.qualifiedNum = workInfo.value.qualifiedNum.replace(/^-+|[^\d]/g, '');
 	}
 
-	function handleInputRejectNum() {
-		wasteInfo.value[i].rejectNum = wasteInfo.value[i].rejectNum.replace(/^0+|^-|[^\d]/g, '');
+	function handleInputRejectNum(item) {
+		item.rejectNum = item.rejectNum.replace(/^0+|^-|[^\d]/g, '');
 		// 合格数随着投产数
 		//let sumRejectNum = 0;
 		// for (let i = 0; i < wasteInfo.value.length; i++) {
@@ -216,10 +230,10 @@
 		);
 	}
 
-	function handlePreFinishReporting(){
+	function handlePreFinishReporting() {
 		handleSave();
 	}
-	
+
 	function handleFinishReporting() {
 		if (showCarrierList.value) {
 			if (endFlag.value >= bindList.value.length) {
@@ -283,17 +297,27 @@
 	}
 
 	function handleAddWasteInfo() {
-		if(wasteInfo.value.some(item => item.rejectNum == '' || item.reason == '')){
-			uni.showToast({
-				icon: 'none',
-				title: '请填写废品量或废品原因再点击添加'
-			})
-		}else{
+		if (wasteInfo.value.length > 0) {
+			if (wasteInfo.value.some(item => item.rejectNum == '' || item.reason == '')) {
+				uni.showToast({
+					icon: 'none',
+					title: '请填写废品量或废品原因再点击添加'
+				})
+			} else {
+				wasteInfo.value.push({
+					rejectNum: '',
+					reason: ''
+				})
+			}
+		} else {
 			wasteInfo.value.push({
-				rejectNum: '',
+				rejectNum: store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo
+						.processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value.qualifiedNum: 
+						store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value.qualifiedNum,
 				reason: ''
 			})
 		}
+
 	}
 
 	function handleDeleteWasteInfo(index) {
@@ -301,8 +325,15 @@
 		handleInputRejectNum();
 	}
 
-	function handleTenantChange() {
-
+	function handleReasonChange(item) {
+		if (wasteInfo.value.filter(waste => waste.reason == item.reason).length > 1) {
+			wasteInfo.value.splice(wasteInfo.value.indexOf(item), 1);
+			uni.showToast({
+				icon: 'none',
+				title: '请勿重复选择废品原因',
+				duration: 2000
+			})
+		}
 	}
 
 	defineExpose({

+ 95 - 94
components/dialog-lotInfo/dialog-lotInfo.vue

@@ -1,97 +1,100 @@
 <template>
 	<dialog-base class="dialog-body" ref="baseDialog" title="批次详情">
-		<view class='middle'>
-			<view class='segment'></view>
-			<uni-icons type="paperclip" size="30" style="margin-left: 16rpx;"></uni-icons>
-			<view class="lotTitle">批次信息</view>
-			<view class='segment'></view>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">批次号</text>
-			<text class="label right">{{ lotData['lotCode'] }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">产品描述</text>
-			<text class="label right">{{ store.planDetails['productDescription'] ? store.planDetails['productDescription'] : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">箱号</text>
-			<text class="label right">{{ lotData['carrierName'] ? lotData['carrierName'] : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">投入数</text>
-			<text class="label right">{{lotData['processQualifiedNum'] == 0 ? lotData['oneLotQuantity'] : lotData['processQualifiedNum']}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">上道工序</text>
-			<text class="label right">{{ lotData.prevProcess ? lotData['prevProcess'].processAlias : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">当前工序</text>
-			<text class="label right">{{ lotData.currentProcess ? lotData['currentProcess'].processAlias : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">下道工序</text>
-			<text class="label right">{{ lotData.nextDeptProcess ? lotData['nextDeptProcess'] : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">所在区域</text>
-			<text class="label right">{{ lotData['place'] ? lotData['place'] : '-' }}</text>
-		</view>
-		<view class='middle'>
-			<view class='segment'></view>
-			<uni-icons type="paperclip" size="30" style="margin-left: 16rpx;"></uni-icons>
-			<view class="lotTitle">领料信息</view>
-			<view class='segment'></view>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">炉号</text>
-			<text id="manufacturer" class="label right">{{ furnaceNoInfo.furnaceNumber ? furnaceNoInfo.furnaceNumber : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">计划单号</text>
-			<text id="manufacturer" class="label right">{{ furnaceNoInfo.productionPlanNo ? furnaceNoInfo.productionPlanNo : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">序号</text>
-			<text class="label right">{{ furnaceNoInfo.lineNumber ? furnaceNoInfo.lineNumber : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">厂家</text>
-			<text class="label right">{{ furnaceNoInfo.factory ? furnaceNoInfo.factory : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">牌号</text>
-			<text class="label right">{{ furnaceNoInfo.brandNumber ? furnaceNoInfo.brandNumber : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">规格</text>
-			<text class="label right">{{ furnaceNoInfo.spec ? furnaceNoInfo.spec : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">形状</text>
-			<text class="label right">{{ furnaceNoInfo.shape ? furnaceNoInfo.shape : '-'}}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">材料直径</text>
-			<text class="label right">{{ furnaceNoInfo.diameter ? furnaceNoInfo.diameter : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">原料编码</text>
-			<text class="label right">{{ furnaceNoInfo.rawMaterialCode ? furnaceNoInfo.rawMaterialCode : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">来料日期</text>
-			<text class="label right">{{ furnaceNoInfo.incomingDate ? furnaceNoInfo.incomingDate : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">技术要求1</text>
-			<text class="label right">{{ furnaceNoInfo.firstTechnicalRequirement ? furnaceNoInfo.firstTechnicalRequirement : '-' }}</text>
-		</view>
-		<view class="item-info uni-row">
-			<text class="label">技术要求2</text>
-			<text class="label right">{{ furnaceNoInfo.SecondTechnicalRequirement ? furnaceNoInfo.SecondTechnicalRequirement : '-' }}</text>
+		<view style="overflow: auto;">
+			<view class='middle'>
+				<view class='segment'></view>
+				<uni-icons type="paperclip" size="30" style="margin-left: 16rpx;"></uni-icons>
+				<view class="lotTitle">批次信息</view>
+				<view class='segment'></view>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">批次号</text>
+				<text class="label right">{{ lotData['lotCode'] }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">产品描述</text>
+				<text class="label right">{{ store.planDetails['productDescription'] ? store.planDetails['productDescription'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">箱号</text>
+				<text class="label right">{{ lotData['carrierName'] ? lotData['carrierName'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">投入数</text>
+				<text class="label right">{{lotData['processQualifiedNum'] == 0 ? lotData['oneLotQuantity'] : lotData['processQualifiedNum']}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">上道工序</text>
+				<text class="label right">{{ lotData.prevProcess ? lotData['prevProcess'].processAlias : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">当前工序</text>
+				<text class="label right">{{ lotData.currentProcess ? lotData['currentProcess'].processAlias : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">下道工序</text>
+				<text class="label right">{{ lotData.nextDeptProcess ? lotData['nextDeptProcess'] : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">所在区域</text>
+				<text class="label right">{{ lotData['place'] ? lotData['place'] : '-' }}</text>
+			</view>
+			<view class='middle'>
+				<view class='segment'></view>
+				<uni-icons type="paperclip" size="30" style="margin-left: 16rpx;"></uni-icons>
+				<view class="lotTitle">领料信息</view>
+				<view class='segment'></view>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">炉号</text>
+				<text id="manufacturer" class="label right">{{ furnaceNoInfo.furnaceNumber ? furnaceNoInfo.furnaceNumber : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">计划单号</text>
+				<text id="manufacturer" class="label right">{{ furnaceNoInfo.productionPlanNo ? furnaceNoInfo.productionPlanNo : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">序号</text>
+				<text class="label right">{{ furnaceNoInfo.lineNumber ? furnaceNoInfo.lineNumber : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">厂家</text>
+				<text class="label right">{{ furnaceNoInfo.factory ? furnaceNoInfo.factory : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">牌号</text>
+				<text class="label right">{{ furnaceNoInfo.brandNumber ? furnaceNoInfo.brandNumber : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">规格</text>
+				<text class="label right">{{ furnaceNoInfo.spec ? furnaceNoInfo.spec : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">形状</text>
+				<text class="label right">{{ furnaceNoInfo.shape ? furnaceNoInfo.shape : '-'}}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">材料直径</text>
+				<text class="label right">{{ furnaceNoInfo.diameter ? furnaceNoInfo.diameter : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">原料编码</text>
+				<text class="label right">{{ furnaceNoInfo.rawMaterialCode ? furnaceNoInfo.rawMaterialCode : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">来料日期</text>
+				<text class="label right">{{ furnaceNoInfo.incomingDate ? furnaceNoInfo.incomingDate : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">技术要求1</text>
+				<text class="label right">{{ furnaceNoInfo.firstTechnicalRequirement ? furnaceNoInfo.firstTechnicalRequirement : '-' }}</text>
+			</view>
+			<view class="item-info uni-row">
+				<text class="label">技术要求2</text>
+				<text class="label right">{{ furnaceNoInfo.SecondTechnicalRequirement ? furnaceNoInfo.SecondTechnicalRequirement : '-' }}</text>
+			</view>
 		</view>
+
 	</dialog-base>
 </template>
 
@@ -113,13 +116,11 @@
 
 	function open() {
 		lotData.value = store.dayworkInfo;
-		console.log(lotData.value);
 		getFurnaceNoInfoByDayworkId({
 			dayworkId: store.dayworkInfo.id
 		}).then(res => {
 			if (res.code == 200) {
-				furnaceNoInfo.value = res.rows[0]
-				console.log(res.rows);
+				furnaceNoInfo.value = res.rows.length == 0 ? [{}] : res.rows[0];
 				baseDialog.value.open();
 			} else {
 				uni.showToast({

+ 33 - 21
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -137,28 +137,40 @@
 			} 
 		})
 		
-		Promise.all([getEquipmentByUidAndDid(store.planDetails.id), getDayWorkItemList({
-				userId: store.userInfo.userId,
-				dayworkId: store.dayworkInfo.id,
-				status: 1
-			})])
-			.then(([equipmentRes, response]) => {
-				console.log(equipmentRes)
-				console.log(response.rows)
-				if (equipmentRes.code == 200 && response.code == 200) {
-					let equipmentListData = equipmentRes.rows.filter((equipment) => {
-						return !response.rows.some((item) => item.equipmentDetailId == equipment.commonId);
-					});
-					equipmentList.value = equipmentListData.map((equipment) => {
-						return {
-							text: equipment.commonCode,
-							value: equipment
-						}
-					});
-					selectedEquipment.value = equipmentListData.length > 0 ? equipmentListData[0] : null;
+		// Promise.all([getEquipmentByUidAndDid(store.planDetails.id), getDayWorkItemList({
+		// 		// userId: store.userInfo.userId,
+		// 		// dayworkId: store.dayworkInfo.id,
+		// 		status: 1
+		// 	})])
+		// 	.then(([equipmentRes, response]) => {
+		// 		console.log(equipmentRes)
+		// 		console.log(response.rows)
+		// 		if (equipmentRes.code == 200 && response.code == 200) {
+		// 			let equipmentListData = equipmentRes.rows.filter((equipment) => {
+		// 				return !response.rows.some((item) => item.equipmentDetailId == equipment.commonId);
+		// 			});
+		// 			equipmentList.value = equipmentListData.map((equipment) => {
+		// 				return {
+		// 					text: equipment.commonCode,
+		// 					value: equipment
+		// 				}
+		// 			});
+		// 			selectedEquipment.value = equipmentListData.length > 0 ? equipmentListData[0] : null;
+		// 		}
+		// 		baseDialog.value.open()
+		// 	});
+		getEquipmentByUidAndDid(store.planDetails.id).then(equipmentRes => {
+			if(equipmentRes.code == 200){
+				for (var i = 0; i < equipmentRes.rows.length; i++) {
+					equipmentList.value[i] = {
+						text: equipmentRes.rows[i].commonCode,
+						value: equipmentRes.rows[i]
+					}
 				}
-				baseDialog.value.open()
-			});
+				selectedEquipment.value = equipmentRes.rows.length > 0 ? equipmentRes.rows[0] : null;
+			}
+			baseDialog.value.open()
+		})
 	}
 
 	function open(data) {

+ 1 - 1
components/dialog-selectInviteUser/dialog-selectInviteUser.vue

@@ -44,7 +44,7 @@
 	import {
 		timestampToTime,
 		debounce
-	} from '@/utils/common.js'
+	} from '@/utils/common.js' 
 	import {
 		getUserByLikeUsername
 	} from '@/api/sys/user.js'

+ 90 - 0
components/dialog-selectProduction/dialog-selectProduction.vue

@@ -0,0 +1,90 @@
+<template>
+	<dialog-base class="dialog-body" ref="baseDialog" title="搜索产品">
+		<view class="box-bg uni-row">
+			<view class="input-view uni-row">
+				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
+				<input class="nav-bar-input" type="text" v-model="keywords" placeholder="请输入产品描述" />
+			</view>
+			<view class="search" @click="handleSearch">
+				搜索
+			</view>
+		</view>
+		
+	</dialog-base>
+</template>
+
+<script setup>
+	import {
+		ref,
+		getCurrentInstance
+	} from 'vue'
+	import {
+		store
+	} from '../../store';
+
+	const baseDialog = ref(null)
+
+	function open() {
+		baseDialog.value.open();
+	}
+
+	function close() {
+		baseDialog.value.close()
+	}
+
+	defineExpose({
+		open
+	})
+</script>
+
+<style lang="scss">
+	$nav-height: 60rpx;
+	
+	.dialog-body {
+		// height: 60%;
+		// margin: auto auto;
+		overflow: auto;
+	}
+	
+	.box-bg {
+		width: 94%;
+		background-color: #F5F5F5;
+		padding: 5rpx 16rpx;
+		justify-content: space-around;
+		align-items: center;
+		margin: 24rpx auto 0;
+	
+		.input-view {
+			width: 100%;
+			flex: 4;
+			background-color: #f8f8f8;
+			height: $nav-height;
+			border: 1rpx solid #999;
+			border-radius: 15rpx;
+			padding: 0 15rpx;
+			flex-wrap: nowrap;
+			margin: 0 10rpx 0;
+			line-height: $nav-height;
+	
+			.input-uni-icon {
+				line-height: $nav-height;
+			}
+	
+			.nav-bar-input {
+				width: 80%;
+				height: $nav-height;
+				line-height: $nav-height;
+				padding: 0 5rpx;
+				background-color: #f8f8f8;
+			}
+		}
+	
+		.search {
+			width: 20%;
+			text-align: center;
+			color: #808080;
+		}
+	}
+	
+
+</style>

+ 42 - 30
pages/batchReporting/index.vue

@@ -102,6 +102,7 @@
 		</view>
 		<dialog-lot ref="lotDialog" @submit="handleDoIt" />
 		<dialog-turnoverApplication ref="turnoverApplicationDialog" @confirm="handleDoTurnoverAfter" />
+		<dialog-selectProduction ref="selectProduction"></dialog-selectProduction>
 	</view>
 
 </template>
@@ -131,6 +132,7 @@
 
 
 	const turnoverApplicationDialog = ref(null)
+	const selectProduction = ref(null)
 	const lotDialog = ref(null)
 	const listData = ref([])
 	const curPlan = ref(null)
@@ -146,10 +148,10 @@
 		console.log(curPlan.value)
 		if (store.planDetails.requisitionDepartmentId == store.curDeptDetails.deptId) {
 			bottomStatus.value = true;
-			store.isProPreProcess = true;
+			store.isPreProcess = true;
 		} else {
 			bottomStatus.value = false;
-			store.isProPreProcess = false;
+			store.isPreProcess = false;
 		}
 		console.log(bottomStatus.value)
 
@@ -227,32 +229,42 @@
 	}
 
 	function handleScanCode() {
-		uni.scanCode({
-			scanType: ['qrCode'],
-			onlyFromCamera: true, // 只允许相机扫码
-			autoZoom: false,
-			success: function(res) {
-				console.log(res.result)
-				let vehicleObj = JSON.parse(res.result);
-				if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
-					uni.showToast({
-						icon: "error",
-						title: "请扫载具码",
-						duration: 1000
-					})
-					return;
-				}
-				showDaywork({
-					carrierId: vehicleObj.carrierId,
-					status: 7
-				}).then(response => {
-					if (response.code == 200) {
-						console.log(response)
-						lotDialog.value.open(response.data);
+		uni.showModal({
+			title: '提示',
+			content: '点击确认搜索产品,点击取消继续扫码',
+			success: function (res) {
+					if (res.confirm) {
+						selectProduction.value.open();
+					} else if (res.cancel) {
+						uni.scanCode({
+							scanType: ['qrCode'],
+							onlyFromCamera: true, // 只允许相机扫码
+							autoZoom: false,
+							success: function(res) {
+								console.log(res.result)
+								let vehicleObj = JSON.parse(res.result);
+								if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
+									uni.showToast({
+										icon: "error",
+										title: "请扫载具码",
+										duration: 1000
+									})
+									return;
+								}
+								showDaywork({
+									carrierId: vehicleObj.carrierId,
+									status: 7
+								}).then(response => {
+									if (response.code == 200) {
+										console.log(response)
+										lotDialog.value.open(response.data);
+									}
+								})
+							}
+						});
 					}
-				})
-			}
-		});
+				}
+		})
 	}
 
 	function handleAddDaywork(data) {
@@ -300,12 +312,12 @@
 	$nav-height: 60rpx;
 
 	.box-bg {
-		width: 100%;
+		width: 94%;
 		background-color: #F5F5F5;
 		padding: 5rpx 16rpx;
 		justify-content: space-around;
 		align-items: center;
-		margin-top: 20rpx;
+		margin: 24rpx auto 0;
 
 		.input-view {
 			width: 100%;
@@ -352,7 +364,7 @@
 		padding: 16rpx;
 		padding-bottom: 24rpx;
 		margin-bottom: 24rpx;
-		border-radius: 10rpx;
+		border-radius: 24rpx;
 
 		.title-container {
 

+ 33 - 6
pages/index/index.vue

@@ -66,6 +66,7 @@
 	const showGear = ref(0)
 	const appInfo = ref({})
 	const newAppInfo = ref({})
+	const updateFlag = ref(true) // 是否更新标志,如果为false,不能登录
 
 	onLoad(() => {})
 
@@ -75,6 +76,7 @@
 		setTimeout(function() {
 			checkUpdate().then(res => {
 				if (!res) {
+					updateFlag.value = res;
 					uni.showModal({
 						title: '更新',
 						content: '发现新版本',
@@ -97,6 +99,7 @@
 			}
 		});
 		console.log(appInfo.value);
+		// false 版本号不一致,更新,true不需要更新
 		let flag = getAppInfoListByType({
 			type: appInfo.value.osName
 		}).then(res => {
@@ -194,13 +197,40 @@
 	}
 
 	const handleShowLoginDialog = (user) => {
-		let _user = user ?? {}
-		// 调用子组件中的方法
-		loginDialog.value.open(_user)
+		// 判断更新否,没更新不能登录
+		if(!updateFlag.value){
+			uni.showToast({
+				icon: 'none',
+				title: '请更新后再登录'
+			})
+			setTimeout(function(){
+				checkUpdate().then(res => {
+					if (!res) {
+						updateFlag.value = res;
+						uni.showModal({
+							title: '更新',
+							content: '发现新版本',
+							showCancel: false,
+							success: function(res) {
+								if (res.confirm) {
+									update();
+								}
+							}
+						})
+					}
+				})
+			},1500)
+		}else{
+			let _user = user ?? {}
+			// 调用子组件中的方法
+			loginDialog.value.open(_user)
+		}
 	}
+	
 	const handleSelectUser = (user) => {
 		handleShowLoginDialog(user)
 	}
+	
 	const handleLongPressUser = (user) => {
 		console.log(user)
 		uni.showModal({
@@ -221,12 +251,9 @@
 							});
 							loggedUsers.value = [];
 							init();
-
-
 						}, // 成功回调函数
 
 						fail: () => {
-
 						}, // 失败回调函数
 
 					})

+ 2 - 1
pages/productionPlan/index.vue

@@ -153,7 +153,7 @@
 			border-radius: 15rpx;
 			padding: 0 15rpx;
 			flex-wrap: nowrap;
-			margin: 20rpx 10rpx;
+			margin:0 10rpx 20rpx;
 			line-height: $nav-height;
 
 			.input-uni-icon {
@@ -173,6 +173,7 @@
 			width: 20%;
 			text-align: center;
 			color: #808080;
+			margin-top: -20rpx;
 		}
 	}
 

+ 1 - 1
store/index.js

@@ -8,6 +8,6 @@ export const store = reactive({
   userProcessInfo: null,
   tenantId: null,
   curDeptDetails: null,
-  isProPreProcess: false,
+  isPreProcess: false,
   furnaceNumberInfo: null
 })