Browse Source

外协检查

wangxin 1 year ago
parent
commit
770fdffce8

+ 0 - 3
pages/outsourcedInspection/form.vue

@@ -386,9 +386,6 @@
 				})
 			}
 		})
-		// uni.navigateTo({
-		// 	url: "/pages/processInspection/consultation"
-		// })
 	}
 </script>
 

+ 2 - 2
pages/outsourcedInspection/index.vue

@@ -124,7 +124,7 @@
 			success: (res) => {
 				console.log("P2查询", res);
 				//将工序编码保存到store中
-				store.outsourcedCode = res.data.rows.map(item => item.prcode);
+				store.outsourcedCode = res.data.rows.map(item => item.prcode.trim());
 				console.log("store", store.outsourcedCode);
 			},
 			fail: (err) => {
@@ -164,7 +164,7 @@
 	function handleSelection(item) {
 		store.processInspection = item;
 		uni.navigateTo({
-			url: '/pages/processInspection/form'
+			url: '/pages/outsourcedInspection/form'
 		})
 	}
 

+ 21 - 4
pages/outsourcedInspection/scan.vue

@@ -78,17 +78,18 @@
 				}
 				const result = JSON.parse(res.result)
 
-				result.outsourcedCode = store.outsourcedCode;
+				result.processCode = store.outsourcedCode;
 				/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
 				getLotOutsourcedInfo(result).then(resqust => {
-					console.log("想不出来名字的输出", resqust);
 					if (resqust.code == 200) {
 						lot.value = resqust.data;
 						lot.value.carrierCode = result.carrierCode
 						carrierCode.value = result.carrierCode;
+						// store.processInspection = null;
 						console.log("resqust", resqust);
 						uni.hideLoading();
 					} else {
+						// uni.hideLoading();
 						uni.showToast({
 							icon: 'none',
 							title: resqust.msg,
@@ -97,6 +98,23 @@
 					}
 
 				})
+				// getLotOutsourcedInfo(result).then(resqust => {
+				// 	console.log("想不出来名字的输出", resqust);
+				// 	if (resqust.code == 200) {
+				// 		lot.value = resqust.data;
+				// 		lot.value.carrierCode = result.carrierCode
+				// 		carrierCode.value = result.carrierCode;
+				// 		console.log("resqust", resqust);
+				// 		uni.hideLoading();
+				// 	} else {
+				// 		uni.showToast({
+				// 			icon: 'none',
+				// 			title: resqust.msg,
+				// 			duration: 2000
+				// 		})
+				// 	}
+
+				// })
 
 			}
 		});
@@ -138,8 +156,7 @@
 			getLotOutsourcedInfo(lot.value).then(resqust => {
 				if (resqust.code == 200) {
 					lot.value = resqust.data;
-					lot.value.carrierCode = resqust.carrierCode
-					carrierCode.value = resqust.carrierCode;
+					lot.value.carrierCode = carrierCode.value
 					store.processInspection = null;
 					console.log("resqust", resqust);
 					uni.hideLoading();