ezhizao_zx 1 tahun lalu
induk
melakukan
51f4080a82

+ 10 - 7
components/dialog-selectProduction/dialog-selectProduction.vue

@@ -51,6 +51,8 @@
 		isNormalLot.value = true
 		if (!data) {
 			isNormalLot.value = false
+		} else {
+			isNormalLot.value = true
 		}
 		console.log(isNormalLot.value)
 		Promise.all([getProcessList({
@@ -65,8 +67,8 @@
 			deptId: store.curDeptDetails.deptId
 		})
 		])
-		.then(([res, response,resp]) => {
-			if (resp.code == 200) {
+		.then(([res, response, resp]) => {
+			if (res.code == 200 && response.code === 200 && resp.code === 200) {
 				dayworkCarrierlist.value = response.data
 				//过滤出工序交集
 				let filteredData = resp.data.filter((item1) =>
@@ -83,13 +85,14 @@
 						value: filteredData[i].processId,
 						}
 					}
-			}
-			console.log(processList.value)
-			/* 处理结果格式 */
-			carrierList.value = changeResultStructure(response.data)
-			baseDialog.value.open();
+				}
+				console.log(processList.value)
+				/* 处理结果格式 */
+				carrierList.value = changeResultStructure(response.data)
+				baseDialog.value.open();
 			}
 			else {
+				// console.log(res, resp, response)
 				uni.showToast({
 					icon: "error",
 					title: "没有周转到该工段批次",

+ 5 - 2
pages/batchReporting/index.vue

@@ -138,6 +138,7 @@
 
 <script setup>
 	import {
+		normalizeProps,
 		reactive,
 		ref
 	} from 'vue'
@@ -248,6 +249,7 @@
 
 	function handleStartNewBatch() {
 		store.normalStatus = normalStatus.value;
+		// console.log(normalStatus.value)
 		uni.navigateTo({
 			url: "/pages/addNewBatch/index"
 		})
@@ -262,6 +264,7 @@
 			deptId: store.curDeptDetails.deptId,
 			keywords: keywords.value
 		};
+		// console.log(normalStatus.value)
 
 		getDayWorkList(reqData).then(res => {
 			if (res.code == 200) {
@@ -302,7 +305,7 @@
 
 	function handleClickProcessList(item) {
 		let curProcessAfterList = [];
-		console.log(item)
+		// console.log(item)
 		let nextIndex = 0;
 		for (let i = 0; i < item.processSequence.length; i++) {
 			if (item.nextProcess.id == item.processSequence[i].id) {
@@ -322,8 +325,8 @@
 		showRight.value.open();
 	}
 
-
 	function handleSearchCode() {
+		// console.log(normalStatus.value)
 		selectProduction.value.open(normalStatus.value);
 	}
 

+ 7 - 0
pages/fastProductionPlan/index.vue

@@ -280,6 +280,13 @@
 	}
 
 	function handleEnd() {
+		if (selection.value.length === 0) {
+			uni.showToast({
+				icon: 'none',
+				title: '请选择完成报工批次'
+			})
+			return
+		}
 		finishQuick(selection.value).then(res => {
 			console.log(res)
 			if (res.code === 200) {