mao 1 ano atrás
pai
commit
3c6334619c

+ 8 - 0
api/business/dayWorkItem.js

@@ -67,4 +67,12 @@ export function isCurProcessFinish(data) {
 		method: 'GET',
 		data: data
 	})
+}
+
+export function getItemList(data) {
+	return req.request({
+		url: '/business/dayworkItem/tonoverList',
+		method: 'GET',
+		data: data
+	})
 }

+ 9 - 0
api/business/furnaceNoInfo.js

@@ -0,0 +1,9 @@
+import req from '@/utils/request.js'
+
+export function getFurnaceNoInfoByDayworkId(data) {
+	return req.request({
+		url:'/business/info/list',
+		method: 'GET',
+		data: data
+	})
+}

+ 2 - 2
api/resourceGroup/resourceGroupDetail.js

@@ -1,9 +1,9 @@
 import req from '@/utils/request.js'
 
 
-export function getEquipmentByUidAndDid(resourceGroupId) {
+export function getEquipmentByUidAndDid(planDetailId) {
 	return req.request({
-		url:'/business/detail/getEquipmentByUidAndDid?resourceGroupId=' + resourceGroupId ,
+		url:'/business/detail/getEquipmentByUidAndDid?planDetailId=' + planDetailId ,
 		method: 'GET',
 	})
 }

+ 2 - 0
components/dialog-base/dialog-base.vue

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

+ 17 - 14
components/dialog-end-work/dialog-end-work.vue

@@ -99,8 +99,8 @@
 		resetPage();
 		workInfo.value = {
 			...data,
-			qualifiedNum: 0
 		};
+		workInfo.value.qualifiedNum = 0;
 		getSpecialDeptProcessList().then(res => {
 			if (res.code == 200) {
 				for (let i = 0; i < res.data.length; i++) {
@@ -113,7 +113,7 @@
 					sumReject += itemListData[i].rejectNum;
 				}
 				workInfo.value.qualifiedNum = store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo.processQualifiedNum - sumReject : store.dayworkInfo.oneLotQuantity - sumReject;
-				temp.value = workInfo.value.qualifiedNum;sumReject
+				// temp.value = workInfo.value.qualifiedNum;
 				console.log(store.dayworkInfo)
 			} else {
 				workInfo.value.qualifiedNum = 0;
@@ -175,17 +175,19 @@
 	}
 
 	function handleInputRejectNum() {
-		let sumRejectNum = 0;
-		for (let i = 0; i < wasteInfo.value.length; i++) {
-			wasteInfo.value[i].rejectNum = wasteInfo.value[i].rejectNum.replace(/^0+|^-|[^\d]/g, '');
-			sumRejectNum += Number(wasteInfo.value[i].rejectNum);
-		}
-		if (temp.value > 0) {
-			debounce(function() {
-				workInfo.value.qualifiedNum = temp.value;
-				workInfo.value.qualifiedNum -= sumRejectNum;
-			}, 500)
-		}
+		wasteInfo.value[i].rejectNum = wasteInfo.value[i].rejectNum.replace(/^0+|^-|[^\d]/g, '');
+		// 合格数随着投产数
+		//let sumRejectNum = 0;
+		// for (let i = 0; i < wasteInfo.value.length; i++) {
+		// 	wasteInfo.value[i].rejectNum = wasteInfo.value[i].rejectNum.replace(/^0+|^-|[^\d]/g, '');
+		// 	// sumRejectNum += Number(wasteInfo.value[i].rejectNum);
+		// }
+		// if (temp.value > 0) {
+		// 	debounce(function() {
+		// 		workInfo.value.qualifiedNum = temp.value;
+		// 		workInfo.value.qualifiedNum -= sumRejectNum;
+		// 	}, 500)
+		// }
 	}
 
 
@@ -235,7 +237,8 @@
 	}
 
 	function handleSave() {
-		if (!workInfo.value.qualifiedNum) {
+		console.log(workInfo.value.qualifiedNum)
+		if (workInfo.value.qualifiedNum === null || workInfo.value.qualifiedNum === '') {
 			uni.showToast({
 				icon: "error",
 				title: "请输入合格数",

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

@@ -56,6 +56,7 @@
 		// console.log(dialog.value)
 		form.value = data;
 		baseDialog.value.open();
+		selection.value = [];
 		getProcesses();
 	}
 
@@ -73,13 +74,13 @@
 		}).then(res => {
 			if (res.code == 200) {
 				//过滤出工序交集
-				let filteredData = res.data.filter((item1) =>
-					store.planDetails.processSequence.some((item2) => item2.processCode === item1.processCode)
+				let filteredData = store.planDetails.processSequence.filter((item1) =>
+					res.data.some((item2) => item2.processCode === item1.processCode)
 				);
 				for (let i = 0; i < filteredData.length; i++) {
 					processList.value[i] = {
 						text: filteredData[i].processAlias,
-						value: filteredData[i].processId
+						value: filteredData[i].id
 					}
 				}
 				// selectedProcess.value = filteredData[0].processId;
@@ -96,6 +97,7 @@
 		for (let i = 0; i < selection.value.length; i++) {
 			selection.value[i].daywork.processId = selectedProcess.value;
 		}
+		console.log(selection.value)
 		// 执行确认
 		if(selectedProcess.value && selection.value.length > 0){
 			close();

+ 208 - 0
components/dialog-lotInfo/dialog-lotInfo.vue

@@ -0,0 +1,208 @@
+<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>
+	</dialog-base>
+</template>
+
+<script setup>
+	import {
+		ref,
+		getCurrentInstance
+	} from 'vue'
+	import {
+		store
+	} from '../../store';
+	import {
+		getFurnaceNoInfoByDayworkId
+	} from '@/api/business/furnaceNoInfo.js'
+
+	const baseDialog = ref(null)
+	const lotData = ref(null)
+	const furnaceNoInfo = ref(null)
+
+	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);
+				baseDialog.value.open();
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: '炉号信息获取异常,请稍后重试'
+				})
+			}
+		})
+	}
+
+	function close() {
+		baseDialog.value.close()
+	}
+
+	defineExpose({
+		open
+	})
+</script>
+
+<style lang="scss">
+	.dialog-body {
+		// height: 60%;
+		// margin: auto auto;
+		overflow: auto;
+	}
+
+	.item-info {
+		margin: 8rpx;
+
+		.label {
+			font-size: 28rpx;
+			width: 220rpx;
+			color: #808080;
+
+			&.right {
+				flex: 1;
+				color: #000000;
+			}
+		}
+	}
+
+	.status-btn {
+		justify-content: flex-end;
+		align-items: center;
+
+		.turnover-tag {
+			padding-right: 12rpx;
+			padding-left: 12rpx;
+			border-radius: 8rpx;
+			border: 1rpx solid #FF7901;
+			background-color: #FF7901;
+			font-size: 28rpx;
+			color: #FFFFFF;
+
+		}
+
+		.reporting-tag {
+			padding-right: 12rpx;
+			padding-left: 12rpx;
+			border-radius: 8rpx;
+			margin-left: 16rpx;
+			border: 1rpx solid #1684fc;
+			background-color: #1684fc;
+			font-size: 28rpx;
+			color: #FFFFFF;
+
+		}
+	}
+	
+	.middle {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center
+	}
+	
+	.segment {
+		width: 80rpx;
+		background-color: rgba(213, 213, 213, 1);
+		border: 1rpx solid rgba(213, 213, 213, 1);
+	}
+	
+	.lotTitle {
+		margin: 16rpx 16rpx 16rpx 0;
+	}
+</style>

+ 8 - 8
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -16,7 +16,7 @@
 					@change="handleEquipmentChange"></uni-data-select>
 			</uni-section>
 		</view>
-		<view class="switch uni-row">
+<!-- 		<view class="switch uni-row">
 			<text class="label">是否邀请协作者</text>
 			<view class="uni-row" style="align-items: center;">
 				<text>否</text>
@@ -39,7 +39,7 @@
 				<view>{{item.nickName}}</view>
 				<view v-if="selectedUserList.length > 0" @click="handleRemoveUserName(item)">×</view>
 			</view>
-		</view>
+		</view> -->
 
 
 		<view class="add-btn-container uni-row">
@@ -121,23 +121,23 @@
 		}).then(res => {
 			console.log(res)
 			if (res.code == 200) {
-				//过滤出工序交集
-				let filteredData = res.data.filter((item1) =>
-					store.dayworkInfo.processSequence.some((item2) => item2.processCode === item1.processCode)
+				//过滤出工序交集store.dayworkInfo.processSequence
+				let filteredData = store.dayworkInfo.processSequence.filter((item1) =>
+					res.data.some((item2) => item2.processCode === item1.processCode)
 				);
 				for (let i = 0; i < filteredData.length; i++) {
 					processList.value[i] = {
 						text: filteredData[i].processAlias,
-						value: filteredData[i].processId
+						value: filteredData[i].id
 					}
 				}
 				console.log(processList.value)
-				selectedProcess.value = filteredData[0].processId;
+				selectedProcess.value = filteredData[0].id;
 				isDefaultitem(firstItem.value);
 			} 
 		})
 		
-		Promise.all([getEquipmentByUidAndDid(store.planDetails.resourceGroupId), getDayWorkItemList({
+		Promise.all([getEquipmentByUidAndDid(store.planDetails.id), getDayWorkItemList({
 				userId: store.userInfo.userId,
 				dayworkId: store.dayworkInfo.id,
 				status: 1

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "德迈仕数字生产管理平台",
     "appid" : "__UNI__B065984",
     "description" : "",
-    "versionName" : "1.0.10",
-    "versionCode" : 109,
+    "versionName" : "1.0.14",
+    "versionCode" : 113,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 65 - 24
pages/addNewBatch/index.vue

@@ -50,8 +50,8 @@
 				<view class='segment'></view>
 			</view>
 			<view>
-				<text class='title' style="margin-bottom: 50rpx;">基础信息</text>
-				<view class="uni-row info">
+				<text class='title' style="margin-bottom: 40rpx;">基础信息</text>
+				<view class="uni-row info" style="align-items: center;">
 					<label for="HeatNo">炉号:</label>
 					<uni-data-select id="incomingInfo" class="uni-input data-select" v-model="basicInfo"
 						:localdata="furnaceNumberInfoList" :clear="false"
@@ -59,26 +59,63 @@
 					<!-- <input id="HeatNo" class="uni-input" v-model="basicInfo.heatNo" placeholder="请填写" /> -->
 					<!-- <text id="HeatNo" class="uni-input">{{basicInfo.heatNo}}</text> -->
 				</view>
-				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
+				<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
+				<view class="uni-row info">
+					<label for="productionPlanNo">计划单号:</label>
+					<text id="productionPlanNo" class="uni-input">{{ basicInfo.productionPlanNo ? basicInfo.productionPlanNo : '-'}}</text>
+				</view>
+				<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
+				<view class="uni-row info">
+					<label for="lineNumber">序号:</label>
+					<text id="lineNumber" class="uni-input">{{ basicInfo.lineNumber ? basicInfo.lineNumber : '-'}}</text>
+				</view>
+				<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
+				<view class="uni-row info">
+					<label for="factory">厂家:</label>
+					<text id="factory"
+						class="material uni-input">{{ basicInfo.factory ? basicInfo.factory : '-'}}</text>
+				</view>
+				<view class="uni-row info">
+					<label for="brandNumber">牌号:</label>
+					<text id="brandNumber"
+						class="material uni-input">{{ basicInfo.brandNumber ? basicInfo.brandNumber : '-' }}</text>
+				</view>
+				<view class="uni-row info">
+					<label for="spec">规格:</label>
+					<text id="spec"
+						class="material uni-input">{{ basicInfo.spec ? basicInfo.spec : '-' }}</text>
+				</view>
+				<view class="uni-row info">
+					<label for="shape">形状:</label>
+					<text id="shape"
+						class="material uni-input">{{ basicInfo.shape ? basicInfo.shape : '-'}}</text>
+				</view>
+				<view class="uni-row info">
+					<label for="diameter">材料直径:</label>
+					<text id="diameter"
+						class="material uni-input">{{ basicInfo.diameter ? basicInfo.diameter : '-' }}</text>
+				</view>
 				<view class="uni-row info">
-					<label for="manufacturer">厂家:</label>
-					<!-- <input id="manufacturer" class="uni-input" v-model="basicInfo.manufacturer" placeholder="请填写" /> -->
-					<text id="manufacturer" class="uni-input">{{basicInfo.factory}}</text>
+					<label for="rawMaterialCode">原料编码:</label>
+					<text id="rawMaterialCode"
+						class="material uni-input">{{ basicInfo.rawMaterialCode ? basicInfo.rawMaterialCode : '-' }}</text>
 				</view>
-				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
 				<view class="uni-row info">
-					<label for="incomingInfo">来料日期:</label>
-					<!-- <input id="incomingInfo" class="uni-input" v-model="basicInfo.incomingInfo" placeholder="请填写" /> -->
-					<text id="incomingInfo" class="uni-input">{{basicInfo.incomingDate}}</text>
+					<label for="incomingDate">来料日期:</label>
+					<text id="incomingDate"
+						class="material uni-input">{{ basicInfo.incomingDate ? basicInfo.incomingDate : '-' }}</text>
 				</view>
-				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
 				<view class="uni-row info">
-					<label for="incomingInfo">材质:</label>
-					<!-- <input id="incomingInfo" class="uni-input" v-model="basicInfo.incomingInfo" placeholder="请填写" /> -->
-					<text id="incomingInfo"
-						class="material uni-input">{{basicInfo.firstTechnicalRequirement}}{{basicInfo.secondTechnicalRequirement || basicInfo.secondTechnicalRequirement != '' ? basicInfo.secondTechnicalRequirement : ''}}</text>
+					<label for="firstTechnicalRequirement">材质1:</label>
+					<text id="firstTechnicalRequirement"
+						class="material uni-input">{{ basicInfo.firstTechnicalRequirement ? basicInfo.firstTechnicalRequirement : '-' }}</text>
 				</view>
-				<view class='segment' style="width: 90%;margin: 20rpx auto;"></view>
+				<view class="uni-row info">
+					<label for="SecondTechnicalRequirement">材质2:</label>
+					<text id="SecondTechnicalRequirement"
+						class="material uni-input">{{ basicInfo.SecondTechnicalRequirement ? basicInfo.SecondTechnicalRequirement : '-' }}</text>
+				</view>
+				<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
 			</view>
 		</view>
 		<view class='bottom uni-row'>
@@ -176,7 +213,7 @@
 				if (res.data.code == 200 && res.data.data.length > 0) {
 					for (let i = 0; i < res.data.data.length; i++) {
 						furnaceNumberInfoList.value[i] = {
-							text: res.data.data[i].factory,
+							text: res.data.data[i].furnaceNumber,
 							value: res.data.data[i]
 						}
 					}
@@ -194,16 +231,16 @@
 		}).then(res => {
 			if (res.code == 200) {
 				//过滤出工序交集
-				let filteredData = res.data.filter((item1) =>
-					store.planDetails.processSequence.some((item2) => item2.processCode === item1.processCode)
+				let filteredData = store.planDetails.processSequence.filter((item1) =>
+					res.data.some((item2) => item2.processCode === item1.processCode)
 				);
 				for (let i = 0; i < filteredData.length; i++) {
 					processList.value[i] = {
 						text: filteredData[i].processAlias,
-						value: filteredData[i].processId
+						value: filteredData[i].id
 					}
 				}
-				selectedProcess.value = filteredData[0].processId;
+				selectedProcess.value = filteredData[0].id;
 				dayWork.value.processId = selectedProcess.value;
 			} 
 		})
@@ -342,6 +379,7 @@
 	function handleAdd() {
 		console.log(dayWork.value)
 		console.log(basicInfo.value)
+		store.furnaceNumberInfo = basicInfo.value;
 		if (checkLotCode(dayWork.value.lotCode)) {
 			saveDayWork(dayWork.value).then(res => {
 				console.log(res)
@@ -405,6 +443,8 @@
 		padding-bottom: 50rpx;
 		padding-top: 20rpx;
 		border-radius: 12rpx;
+		height: 100%;
+		overflow: auto;
 
 		.title {
 			width: auto;
@@ -501,14 +541,15 @@
 	}
 
 	.info {
-		width: 96%;
+		width: 94%;
 		justify-content: space-around;
-		align-items: center;
+		padding: 10rpx;
+		margin: 0 auto;
 
 		label {
 			flex: 1;
 			text-combine-upright: all;
-			margin: 0 20rpx 0 30rpx;
+			margin: 0 30rpx 0 20rpx;
 		}
 
 		text {

+ 14 - 10
pages/batchReporting/index.vue

@@ -10,7 +10,10 @@
 			</view>
 		</view>
 		<view class="scroll-container">
-			<view v-for="(item, index) in listData" :key="index" class="list-item"
+			<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
+				<text>暂无批次</text>
+			</view>
+			<view v-else v-for="(item, index) in listData" :key="index" class="list-item"
 				@click="handleToreportingForWork(item)">
 				<view class="title-container uni-row" style="justify-content: flex-start;">
 					<view class="title uni-row">
@@ -35,7 +38,8 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">材质</text>
-					<text class="label right">{{ item['furnaceNoInfo'] ? item['furnaceNoInfo'].firstTechnicalRequirement + ";" + item['furnaceNoInfo'].secondTechnicalRequirement : '-' }}</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>
@@ -57,7 +61,7 @@
 				<view class="item-info uni-row">
 					<text class="label">当前工序</text>
 					<text
-						class="label right">{{ item.currentProcess ? item['currentProcess'].processAlias : '-'}}</text>
+						class="label right">{{ item.currentProcess ? item.prevProcess && item['currentProcess'].processAlias == item['prevProcess'].processAlias ? '-' : item['currentProcess'].processAlias : '-'}}</text>
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">下道工序</text>
@@ -84,18 +88,18 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="bottomStatus" class="bottom uni-row">
+<!-- 		<view v-if="bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
 		</view>
-				<view v-if="!bottomStatus" class="bottom uni-row">
+		<view v-if="!bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleScanCode">扫一扫开始新批次</button>
-		</view>
-<!-- 		<view v-else="bottomStatus == 2" class="bottom uni-row">
-			<button class="start-batch-btn" style="width: 40%;margin-right: 10rpx;" type="primary"
+		</view> -->
+		<view class="bottom uni-row">
+			<button v-if="bottomStatus" class="start-batch-btn" style="margin-right: 10rpx;flex: 1;" type="primary"
 				@click="handleStartNewBatch">开始新批次</button>
-			<button class="start-batch-btn" style="width: 40%;margin-left: 10rpx" type="primary"
+			<button class="start-batch-btn" style="margin-left: 10rpx;flex: 1;" type="primary"
 				@click="handleScanCode">扫一扫开始新批次</button>
-		</view> -->
+		</view>
 		<dialog-lot ref="lotDialog" @submit="handleDoIt" />
 		<dialog-turnoverApplication ref="turnoverApplicationDialog" @confirm="handleDoTurnoverAfter" />
 	</view>

+ 5 - 5
pages/dashboard/index.vue

@@ -80,7 +80,7 @@
 		getDeptsByTenantId(store.tenantId);
 	}
 
-	function handleRecerptSfprod() {
+	function handleRecerptSfprod() { 
 		uni.navigateTo({
 			url: '/pages/recerptSfprod/index'
 		})
@@ -137,10 +137,10 @@
 				console.log()
 
 				// 选择工段来个默认值
-				if(res.data.length > 0){
-					curSelectedDept.value = res.data[0];
-				}
-				store.curDeptDetails = curSelectedDept.value;
+				// if(res.data.length > 0){
+				// 	curSelectedDept.value = res.data[0];
+				// }
+				// store.curDeptDetails = curSelectedDept.value;
 			}
 		})
 	}

+ 89 - 46
pages/handlingList/index.vue

@@ -8,12 +8,15 @@
 		<!-- 待周转页面 -->
 		<view class="padding-container" v-if='pendingShow'>
 			<view class="scroll-container" scroll-y>
-				<view v-for="(item, index) in listData" :key="index"
-					:class="{'list-item':true,'selected':isSelected(item)}">
+				<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
+					<text>暂无待周转批次</text>
+				</view>
+				<view v-else v-for="(item, index) in listData" :key="index" 
+					:class="{'list-item':true,'selected':isSelected(item)}">  
 					<!-- @click="handleSelection(item)" -->
-					<view class="title-container uni-row">
+					<view class="title-container uni-row"> 
 						<view class="title uni-row">
-							<text class="label">{{ item['dictDataLabel'] }}</text>
+							<text class="label">{{ item['turnoverArea'] }}</text>
 							<text class="label code">{{ item['preDeptName'] }}</text>
 							<text class="label code" style="margin-left: 16rpx;">→</text>
 							<text class="label code" style="margin-left: 16rpx;">{{ item['deptName'] }}</text>
@@ -54,33 +57,43 @@
 		<!-- 周转中页面 -->
 		<view class='turnover-container' v-if='turnoverShow'>
 			<view class="scroll-container" scroll-y>
+				<view v-if="lotList.length == 0" style="color: #999;margin: 50% auto;">
+					<text>暂无周转中批次</text>
+				</view>
 				<!-- 循环周转中的数据 -->
-				<view class='item-container'>
-					<view v-if="products.length > 0" class="turnover-title uni-row">
+				<view v-else class='item-container'>
+					<!-- <view v-if="products.length > 0" class="turnover-title uni-row">
 						<view class="uni-row" style="align-items: center;">
 							<view><text class='title-color'>{{turnoverContentTitle}}箱</text></view>
 							<view><text class="second-info">{{turnoverSecondTitle}}</text></view>
 						</view>
 						<view><text class="label">周转中</text></view>
-					</view>
-					<view :class="{'list-container':true,'selected':isSelected(item)}" v-for="(item,index) in products"
+					</view> -->
+					<view :class="{'list-container':true,'selected':isSelected(item)}" v-for="(item,index) in lotList"
 						@click="handleSelection(item)" :key='index'>
-						<!-- @click="handleSelection(item)" -->
-						<view class="list-container-item product-description uni-row">
-							<text class="label left-value">产品描述</text>
-							<text class="label right-value">{{item['productDescription']}}</text>
-						</view>
-						<view class="list-container-item uni-row">
-							<text class="label left-value">批次</text>
-							<text class="label right-value">{{item['lotCode']}}</text>
-						</view>
-						<view class="list-container-item uni-row">
-							<text class="label left-value">箱数</text>
-							<text class="label right-value">{{item['carriers']}}</text>
+						<view class="turnover-title uni-row">
+							<view class="uni-row" style="align-items: center;"> 
+								<view><text class='title-color'>{{ item[0]['totalCarrier'] }}箱</text></view>
+								<view><text class="second-info">{{item[0].preDeptName + '→' + item[0].deptName }}</text></view>
+							</view> 
 						</view>
-						<view class="list-container-item uni-row">
-							<text class="label left-value">箱号</text>
-							<text class="label right-value">{{item['carrierName']}}</text>
+						<view v-for="(lot,index) in item" :key="index" style="margin-bottom: 10rpx;"> 
+							<view class="list-container-item product-description uni-row">
+								<text class="label left-value">产品描述</text>
+								<text class="label right-value">{{lot['productDescription']}}</text>
+							</view>
+							<view class="list-container-item uni-row">
+								<text class="label left-value">批次</text>
+								<text class="label right-value">{{lot['lotCode']}}</text>
+							</view>
+							<view class="list-container-item uni-row">
+								<text class="label left-value">箱数</text>
+								<text class="label right-value">{{lot['carrierName'].split('、').length}}</text>
+							</view>
+							<view class="list-container-item uni-row">
+								<text class="label left-value">箱号</text>
+								<text class="label right-value">{{lot['carrierName']}}</text>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -104,7 +117,7 @@
 	// import pending from './pending';
 	// import turnover from './turnover';
 	import {
-		getDayWorkItemList
+		getDayWorkItemList,getItemList
 	} from '@/api/business/dayWorkItem.js'
 	import {
 		updateDayWorkItem,
@@ -117,8 +130,6 @@
 
 	const pendingTitle = ref('待周转')
 	const turnoverTitle = ref('周转中')
-	const turnoverContentTitle = ref(0)
-	const turnoverSecondTitle = ref('')
 	const sum = ref(0)
 	const pendingClass = ref({
 		selecter: true
@@ -133,6 +144,7 @@
 	const products = ref([])
 	const confirm = ref(null) // 弹窗组件
 	const turnoverTask = ref(null) // 弹窗组件
+	const lotList = ref([])
 
 	onLoad(() => {
 		uni.$once('confirmDelivery', function() {
@@ -142,7 +154,7 @@
 	})
 
 	function init() {
-		getDayWorkItemList({
+		getItemList({
 			status: 4
 		}).then(res => {
 			if (res.code == 200) {
@@ -154,23 +166,38 @@
 				console.log(res)
 			}
 		})
-		getDayWorkItemList({
+		getItemList({
 			status: 5
 		}).then(res => {
 			if (res.code == 200) {
-				products.value = res.rows;
+				// 通过dayworkId再分组
+				const groupedRows = res.rows.reduce((acc, item) => {
+					const dept = item.deptId;
+					if (acc.hasOwnProperty(dept)) {
+						acc[dept].push(item);
+					} else {
+						acc[dept] = [item];
+					}
+					return acc;
+				}, {});
+				// groupedRows 是一个对象,其键是dayworkId,值是具有相同dayworkId的对象数组
+				// 如果需要将它转换为二维数组,您可以使用 Object.values 方法
+				lotList.value = Object.values(groupedRows);
 				// 设置箱数
-				for (let i = 0; i < products.value.length; i++) {
-					products.value[i].carriers = products.value[i].carrierName.split('、').length;
-					turnoverContentTitle.value += products.value[i].carriers;
-					turnoverSecondTitle.value = (products.value[i].preDeptName ? products.value[i].preDeptName : '') + " → " + products.value[i].deptName;
+				for (let i = 0; i < lotList.value.length; i++) {
+					lotList.value[i][0].totalCarrier = 0;
+					for (let j = 0; j < lotList.value[i].length; j++) {
+						lotList.value[i][0].totalCarrier += lotList.value[i][j].carrierName.split('、').length;
+					}
 				}
-				console.log(res)
+				console.log(lotList.value)
 			}
 		})
 	}
 
 	function reflush() {
+		turnoverContentTitle.value = 0;
+		lotList.value = [];
 		init();
 	}
 
@@ -190,7 +217,7 @@
 	}
 
 	function handleConfirmDelivery() {
-		if (products.value.length > 0) {
+		if (selection.value.length > 0) {
 			let msg = '是否确认送达?';
 			confirm.value.open(msg);
 		}
@@ -198,17 +225,17 @@
 
 	function handleDoTurn() {
 		// 设置周转状态
-		for (var i = 0; i < products.value.length; i++) {
-			products.value[i].status = '6';
+		for (let i = 0; i < selection.value.length; i++) {
+			selection.value[i].status = '6';
 		}
-		updateDayWorkItemBatch(products.value).then(res => {
+		updateDayWorkItemBatch(selection.value).then(res => {
 			if (res.code === 200) {
 				uni.showToast({
 					icon: 'success',
 					title: '操作成功',
 					duration: 2000
 				});
-				init();
+				reflush();
 			} else {
 				uni.showToast({
 					icon: 'error',
@@ -222,16 +249,28 @@
 	}
 
 	function isSelected(item) {
-		return selection.value.includes(item);
+		//单选
+		return selection.value == item;
+		
+		//多选
+		// return selection.value.includes(item);
 	}
 
 	function handleSelection(item) {
-		const buttonIndex = selection.value.findIndex(selectedItem => selectedItem === item);
-		if (buttonIndex > -1) {
-			selection.value.splice(buttonIndex, 1); // 取消选中
-		} else {
-			selection.value.push(item); // 选中
+		// 单选
+		if(selection.value == item){
+			selection.value = []
+		}else{
+			selection.value = item;
 		}
+		
+		// 多选
+		// const buttonIndex = selection.value.findIndex(selectedItem => selectedItem === item);
+		// if (buttonIndex > -1) {
+		// 	selection.value.splice(buttonIndex, 1); // 取消选中
+		// } else {
+		// 	selection.value.push(item); // 选中
+		// }
 		console.log(selection.value, "selection");
 	}
 
@@ -263,6 +302,8 @@
 
 	.selected {
 		border: 1px solid #1684fc;
+		border-radius: 8rpx;
+		padding: 8rpx;
 	}
 
 	.nav {
@@ -414,7 +455,9 @@
 				}
 
 				.list-container {
-					margin: 0 24rpx 16rpx 24rpx;
+					// margin: 16rpx 24rpx 16rpx 24rpx;
+					width: calc(100% - 48rpx);
+					margin: 16rpx auto;
 
 					.list-container-item {
 						border-bottom: 1px solid #999999;

+ 32 - 27
pages/productionPlan/index.vue

@@ -9,34 +9,39 @@
 				搜索
 			</view>
 		</view> 
-		<view v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)" class="list-item">
-			<view class="title-container uni-row">
-				<view class="title uni-row">
-					<text class="label">生产计划单号</text>
-					<text class="label code">{{ item['productionPlanNo'] }}</text>
+		<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
+			<text>暂无生产计划</text>
+		</view>
+		<view v-else style="overflow: auto;">
+			<view  v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)" class="list-item">
+				<view class="title-container uni-row">
+					<view class="title uni-row">
+						<text class="label">生产计划单号</text>
+						<text class="label code">{{ item['productionPlanNo'] }}</text>
+					</view>
+					<view v-if="item['dayWorkList'].length > 0" class="tag"><text class="label">进行中</text></view>
+					<view v-else type="default" class="tag not-start"><text class="label">未开始</text></view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">产品描述</text>
+					<text class="label right">{{ item['productDescription'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">总批数</text>
+					<text class="label right">{{ item['totalLotNumber'] }}</text>
+				</view>
+				<!-- <view class="item-info uni-row">
+					<text class="label">完成批数</text>
+					<text class="label right">{{ item['equiment'] }}</text>
+				</view> -->
+				<view class="item-info uni-row">
+					<text class="label">投产数</text>
+					<text class="label right">{{ item['productionQuantity'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">单批量</text>
+					<text class="label right">{{ item['oneLotQuantity'] }}</text>
 				</view>
-				<view v-if="item['dayWorkList'].length > 0" class="tag"><text class="label">进行中</text></view>
-				<view v-else type="default" class="tag not-start"><text class="label">未开始</text></view>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">产品描述</text>
-				<text class="label right">{{ item['productDescription'] }}</text>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">总批数</text>
-				<text class="label right">{{ item['totalLotNumber'] }}</text>
-			</view>
-			<!-- <view class="item-info uni-row">
-				<text class="label">完成批数</text>
-				<text class="label right">{{ item['equiment'] }}</text>
-			</view> -->
-			<view class="item-info uni-row">
-				<text class="label">投产数</text>
-				<text class="label right">{{ item['productionQuantity'] }}</text>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">单批量</text>
-				<text class="label right">{{ item['oneLotQuantity'] }}</text>
 			</view>
 		</view>
 	</view>

+ 4 - 2
pages/recerptSfprod/index.vue

@@ -1,7 +1,10 @@
 <template>
 
 	<view class='container '>
-		<view class='content'>
+		<view v-if="products.length == 0" style="color: #999;margin: 50% auto;">
+			<text>扫码添加批次</text>
+		</view>
+		<view v-else class='content'>
 			<text class='title'>{{title}}</text>
 			<view :class="{'item-table':true, 'selected':isSelected(item)}" scroll-y v-for="(item,index) in products"
 				@click="handleSelection(item,index)">
@@ -109,7 +112,6 @@
 	}
 
 	function handleConfirmReceipt() {
-		receipt.value.open();
 		if (selection.value.length > 0) {
 			receipt.value.open();
 		}

+ 19 - 7
pages/reportingForWork/index.vue

@@ -1,11 +1,16 @@
 <template>
 	<view class="uni-column container">
-		<scroll-view class="scroll-container" scroll-y>
+		<view class="scroll-container">
 			<view v-for="(item, index) in listData" :key="index" class="list-item">
 				<view class="title-container">
 					<view class="title uni-row">
-						<text class="label">批次号:</text>
-						<text class="label code"> {{ item['lotCode'] }}</text>
+						<view class="uni-row">
+							<text class="label">批次号:</text>
+							<text class="label code"> {{ item['lotCode'] }}</text>
+						</view>
+						<view style="color: #1684fc; margin-right: 0;" @click="handleOpenLonInfo">
+							<text>批次详情</text>
+						</view>
 					</view>
 					<view class="uni-row">
 						<view class="right-info uni-row"> <text class="label">工时</text>
@@ -27,7 +32,7 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">开始时间</text>
-					<text class="label right">{{ item['startTime']}}</text>
+					<text class="label right">{{ item['startTime'] ? item['startTime'] : '-' }}</text>
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">结束时间</text>
@@ -57,7 +62,7 @@
 						@click.stop="handleStartProcessing(item)">开始报工</button>
 				</view>
 			</view>
-		</scroll-view>
+		</view>
 		<view class="top">
 			<button class="top-btn" @click="HandleSeleteInviteUser(null)"><text class="label">邀请报工</text></button>
 		</view>
@@ -72,6 +77,7 @@
 		<dialog-selectInviteUser ref="inviteUser"
 			@handleAddDayWorkItem='handleAddDayWorkItem'></dialog-selectInviteUser>
 	</view>
+	<dialog-lotInfo ref="lotInfo"></dialog-lotInfo> 
 </template>
 
 <script setup>
@@ -113,6 +119,7 @@
 	const reqParam = ref([]) // 请求参数
 	const userInfo = ref(null) // 登录员工信息
 	const flag = ref(true) // 控制底部开始加工按钮功能
+	const lotInfo = ref(null) // 详情弹窗
 
 
 	onLoad(() => {
@@ -162,6 +169,10 @@
 	function reflush() {
 		init();
 	}
+	
+	function handleOpenLonInfo(){
+		lotInfo.value.open();
+	}
 
 	function handleShowEndWorkDialog(data) {
 		checkBizDayworkCarriers({
@@ -201,7 +212,7 @@
 	function handleStartProcessing(item) {
 		// 查询当前工序是否完成再判断是否进行报工
 		isCurProcessFinish({
-			deptId: store.dayworkInfo.id,
+			dayworkId: store.dayworkInfo.id,
 			processId: listData.value[0].processId
 		}).then(res => {
 			if (store.dayworkInfo.status == 4) {
@@ -209,7 +220,7 @@
 					icon: 'none',
 					title: '当前批次已完成'
 				})
-			} else if (!res.data) {
+			} else if (res.data) {
 				uni.showToast({
 					icon: 'none',
 					title: '该工序已完成,不能继续报工'
@@ -333,6 +344,7 @@
 
 			.title {
 				height: 48rpx;
+				justify-content: space-between;
 				align-items: center;
 				flex: 7;
 

+ 2 - 1
store/index.js

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