zhuzeyu 10 달 전
부모
커밋
1419dc9b3c
5개의 변경된 파일65개의 추가작업 그리고 30개의 파일을 삭제
  1. 11 0
      api/business/drawing.js
  2. 20 10
      components/dialog-lotReporting/dialog-lotReporting.vue
  3. 5 2
      pages/batchReporting/index.vue
  4. 23 15
      pages/drawingMenu/index.vue
  5. 6 3
      pages/sortBatchReporting/index.vue

+ 11 - 0
api/business/drawing.js

@@ -24,6 +24,17 @@ export function getProcessDetail(id) {
 	})
 }
 
+/**
+ * 获取工艺
+ * @param id
+ */
+export function getTechnologicalProcess(id) {
+	return req.request({
+		url: '/business/technologicalProcess/' + id,
+		// header: reqHeader,
+		method: 'GET'
+	})
+}
 /**
  * 获取工艺工序
  * @param id

+ 20 - 10
components/dialog-lotReporting/dialog-lotReporting.vue

@@ -119,9 +119,12 @@
 	const baseDialog = ref(null)
 	const lotData = ref(null)
 	const curDaywork = ref({})
-	const currentTechnologicalProcessDetailId = ref(null)
+	const productId = ref("")
+	const processCode = ref("")
+	const technologicalProcessId = ref("")
 	const currentLotCode = ref("")
 	const workshopList = ref([])
+	const processAlias = ref("")
 	const curProcessAfte = ref([])
 	const deptList = ref([])
 	const item = ref({})
@@ -172,8 +175,12 @@
 			editStatus.value = false
 		}
 		var filteredProcess = item.processSequence.filter(i => i.processStepNumber == item.process.processStepNumber);
-		currentTechnologicalProcessDetailId.value = filteredProcess[0].technologicalProcessDetailId
-		console.log(currentTechnologicalProcessDetailId.value)
+		
+		processCode.value = filteredProcess[0].processCode
+		processAlias.value = filteredProcess[0].processAlias
+		productId.value = item.daywork.productId
+		technologicalProcessId.value = item.technologicalProcessId
+
 		currentLotCode.value = item.lotCode
 		curProcessAfte.value = lotData.value[0].nextProcesses;
 		showRight.value.open();
@@ -199,13 +206,16 @@
 	//打开电子图纸
 	function handleOpenDrawing(){
 		
-		  
-		
-		  // 对 technologicalProcessDetailId 进行URL编码
-		  var encodedId = encodeURIComponent(currentTechnologicalProcessDetailId.value);
-		  var encodeCode = encodeURIComponent(currentLotCode.value);
-		  // 构建查询参数字符串
-		  var queryParam = `param1=${encodedId}&param2=${encodeCode}`;
+		    // 对 technologicalProcessDetailId 进行URL编码
+		    var encodedId = encodeURIComponent(productId.value);
+		    var enTechnologicalProcessId = encodeURIComponent(technologicalProcessId.value);
+		    var enprocessCode = encodeURIComponent(processCode.value);
+		    
+		    var encodeCode = encodeURIComponent(currentLotCode.value);
+		    var enProcessAlias = encodeURIComponent(processAlias.value);
+		    // 构建查询参数字符串
+		    var queryParam = `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
+
 		
 		  // 使用模板字符串构建完整的URL
 		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;

+ 5 - 2
pages/batchReporting/index.vue

@@ -556,10 +556,13 @@
 		  var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
 		
 		  // 对 technologicalProcessDetailId 进行URL编码
-		  var encodedId = encodeURIComponent(firstMatch.technologicalProcessDetailId);
+		  var encodedId = encodeURIComponent(currentDaywork.value.productId);
+		  var enTechnologicalProcessId = encodeURIComponent(currentDaywork.value.technologicalProcessId);
+		  var enprocessCode = encodeURIComponent(firstMatch.processCode);
 		  var encodeCode = encodeURIComponent(currentDaywork.value.lotCode);
+		  var enProcessAlias = encodeURIComponent(firstMatch.processAlias);
 		  // 构建查询参数字符串
-		  var queryParam = `param1=${encodedId}&param2=${encodeCode}`;
+		  var queryParam = `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
 		
 		  // 使用模板字符串构建完整的URL
 		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;

+ 23 - 15
pages/drawingMenu/index.vue

@@ -27,7 +27,7 @@
 </template>
 
 <script setup>
-	import{getDrawingList,getProcessDetail} from '@/api/business/drawing.js'
+	import{getDrawingList,getTechnologicalProcess} from '@/api/business/drawing.js'
 	import {
 		ref
 	} from 'vue'
@@ -35,37 +35,45 @@
 		onLoad,
 	} from '@dcloudio/uni-app'
 import { store } from '../../store';
-const technologicalProcessDetailId = ref("")
+const technologicalProcessId = ref("")
 const drawingList = ref([])
+const processCode = ref("")
+const productId = ref("")
 const product = ref({})
 const lotCode = ref("")
+const processAlias = ref("")
 	onLoad((options) => {
 		console.log(options,1111)
-		technologicalProcessDetailId.value = options.param1
+		technologicalProcessId.value = options.param4
 		lotCode.value = options.param2
+		productId.value = options.param1
+		processCode.value = options.param3
+		processAlias.value = options.param5
 		init();
 		
 	})
 
 	function init() {
 		console.log(product.value)
-		getProcessDetail(technologicalProcessDetailId.value).then(response=>{
+		getTechnologicalProcess(technologicalProcessId.value).then(response=>{
 			console.log(response,1123)
 			if(response.code ==200){
 				product.value  = response.data
 				product.value.lotCode = lotCode.value
+				product.value.processAlias = processAlias.value
+				getDrawingList({productVersion:product.value.technologyVersion,processCode:processCode.value,productId:productId.value}).then(res=>{
+					if(res.code == 200){
+						drawingList.value = res.data
+						// product.value = drawingList.value[0].product
+						// product.value.technologyVersion = drawingList.value[0].technologyVersion
+						// product.value.processAlias = drawingList.value[0].processAlias
+						// product.value.lotCode = lotCode.value
+				
+					}
+				})
 			}
 		})
-		getDrawingList({technologicalProcessDetailId:technologicalProcessDetailId.value}).then(res=>{
-			if(res.code == 200){
-				drawingList.value = res.data
-				// product.value = drawingList.value[0].product
-				// product.value.technologyVersion = drawingList.value[0].technologyVersion
-				// product.value.processAlias = drawingList.value[0].processAlias
-				// product.value.lotCode = lotCode.value
-
-			}
-		})
+		
 	}
 
 	
@@ -76,7 +84,7 @@ const lotCode = ref("")
 		// 检查 filteredProcess 是否有元素,并选择第一个元素
 
 		
-		  // 对 technologicalProcessDetailId 进行URL编码
+		  
 		  var encodeUrl = row.url;
 		  console.log(row)
 		  // 构建查询参数字符串

+ 6 - 3
pages/sortBatchReporting/index.vue

@@ -281,17 +281,20 @@
 		  var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
 		
 		  // 对 technologicalProcessDetailId 进行URL编码
-		  var encodedId = encodeURIComponent(firstMatch.technologicalProcessDetailId);
+		  var encodedId = encodeURIComponent(currentDaywork.value.productId);
+		  var enTechnologicalProcessId = encodeURIComponent(currentDaywork.value.technologicalProcessId);
+		  var enprocessCode = encodeURIComponent(firstMatch.processCode);
 		  var encodeCode = encodeURIComponent(currentDaywork.value.lotCode);
+		  var enProcessAlias = encodeURIComponent(firstMatch.processAlias);
 		  // 构建查询参数字符串
-		  var queryParam = `param1=${encodedId}&param2=${encodeCode}`;
+		  var queryParam = `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
 		
 		  // 使用模板字符串构建完整的URL
 		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
 		
 		  // 导航到指定页面
 		  uni.navigateTo({
-		    url: navigateUrl
+			url: navigateUrl
 		  });
 		} else {
 		  console.log('No process matched the current process step number.');