guoyujia 9 mesiacov pred
rodič
commit
f09972fd11

+ 2 - 1
pages/deliveryInspection/form.vue

@@ -243,6 +243,7 @@
 	}
 
 	onShow(() => {
+		uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)
 		if(!flag.value){
@@ -485,7 +486,7 @@
 	info.forEach(item =>{
 		item.status = 0
 	})
-	consultations.value = info
+      consultations.value = consultations.value.concat(info)
 		isEventTriggered.value = true; // 更新标志位状态
 	}
 

+ 4 - 1
pages/instrumentRoomInspection/form.vue

@@ -201,6 +201,7 @@
 	/***************************** 页面生命周期函数 *****************************/
 
 	onShow(() => {
+		uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)
 		if(!flag.value){
@@ -418,7 +419,7 @@
 	info.forEach(item =>{
 		item.status = 0
 	})
-	consultations.value = info
+	consultations.value = consultations.value.concat(info)
 		isEventTriggered.value = true; // 更新标志位状态
 	}
 
@@ -427,7 +428,9 @@
 	const handleAddWaste = () => {
 		// 监听事件,暂时不用,后续会使用
 		uni.$once('addWasteInfoEvent', (data) => {
+			if (!isEventTriggered.value) {
 			addWasteInfo(data)
+			}
 		})
 		var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
 		var enprocessId = encodeURIComponent(processInspecion.value.lot.processId);

+ 3 - 10
pages/onSiteInspection/form.vue

@@ -239,13 +239,14 @@
 			console.log('acceptDataFromOpenerPage', data)
 			if (data && data.data) {
 				processInspecion.value.lot = data.data;
-				getOringicalList()
+				// getOringicalList()
 			}
 		})
 
 	}
 
 	onShow(() => {
+		 uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)
 		if(!flag.value){
@@ -376,14 +377,6 @@
 	function endWork() {
 		let unf = unfitInfos.value;
 		for (var i = 0; i < unfitInfos.value.length; i++) {
-			if (!unf[i].checkResult) {
-				uni.showToast({
-					icon: 'none',
-					title: unf[i].checkStandard+ "检查结果不能为空",
-					duration: 2000
-				})
-				return;
-			}
 
 			if (unf[i].examiningNum < 0 || unf[i].disqualificationNum < 0) {
 				uni.showToast({
@@ -523,7 +516,7 @@
 	info.forEach(item =>{
 		item.status = 0
 	})
-	consultations.value = info
+	consultations.value = consultations.value.concat(info)
 		isEventTriggered.value = true; // 更新标志位状态
 	}
 

+ 10 - 4
pages/onSiteInspection/scan.vue

@@ -110,7 +110,8 @@
 					console.log(ret)
 					const result = {
 						carrierCode: ret.resp_result,
-						processCode: ''
+						processCode: '',
+		               deptId : store.curDeptDetails.deptId
 					}
 					if (!result.carrierCode || result.carrierCode == "") {
 						uni.showToast({
@@ -140,6 +141,7 @@
 									});
 									// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
 									// 需要定义一个请求方法, 从后端获取
+									result.deptId = store.curDeptDetails.deptId
 									getLotInfo(result).then(res => {
 										if (res.code == 200) {
 											console.log(res)
@@ -205,7 +207,8 @@
 			)
 		} else {
 			const result = {
-				carrierCode: '000312'
+				carrierCode: '000391',
+				deptId : store.curDeptDetails.deptId
 			}
 			getCarrierInfo(result).then(response => {
 				if (response.code == 200) {
@@ -214,6 +217,7 @@
 					if (response.data.dayworkCarriers != null) {
 						if (response.data.dayworkCarriers.length > 1) {
 							query.value = result;
+							query.value.deptId = store.curDeptDetails.deptId
 							selectProcessInspection.value.open(response.data.dayworkCarriers)	
 										
 						} else {
@@ -224,6 +228,7 @@
 							});
 							// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
 							// 需要定义一个请求方法, 从后端获取
+							
 							getLotInfo(result).then(res => {
 								if (res.code == 200) {
 									console.log(res)
@@ -244,8 +249,8 @@
 														};	
 									lot.value.carrierCode = result.carrierCode
 									carrierCode.value = result.carrierCode;
-									lot.value.inspectionCarrierId = '1803605009575755783'
-									lot.value.inspectionCarrierCode = "300085"
+									lot.value.inspectionCarrierId = '1803605009554784261'
+									lot.value.inspectionCarrierCode = "300053"
 									// console.log("res", res);
 									uni.hideLoading();
 									// 判断是否批次号和检查箱码都扫完
@@ -351,6 +356,7 @@
 		uni.showLoading({
 			title: '加载中'
 		});
+		
 	getLotInfo(query.value).then(res => {
 		if (res.code == 200) {
 			console.log(res)