ezhizao_zx před 9 měsíci
rodič
revize
714a8e8108

+ 9 - 0
api/business/drawing.js

@@ -45,4 +45,13 @@ export function getProcessOutsourcedDetail(id) {
 		// header: reqHeader,
 		method: 'GET'
 	})
+}
+
+export function getDeptProcess(data) {
+	return req.request({
+		url: '/business/drawing/listProcess',
+		// header: reqHeader,
+		method: 'GET',
+		data: data
+	})
 }

+ 50 - 44
pages/batchReporting/index.vue

@@ -37,7 +37,7 @@
 					</view>
 					<view class=" uni-row" style="margin-left: 16rpx;">
 						<view v-if="item['status'] == 1" class="tag"><text class="label">进行中</text></view>
-						<view v-else-if="item['status'] == 3" class="tag turnover "><text class="label">周转中</text>
+						<view v-else-if="item['status'] == 3" class="tag turnover "><text class="label">待领取</text>
 						</view>
 						<view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">待周转</text>
 						</view>
@@ -130,7 +130,8 @@
 					<text>{{ index + 1 }}.{{item.processAlias}}</text>
 				</view>
 			</scroll-view>
-			<view><button v-if="!editStatus" class="view-end-btn" type="primary"  @click="handleOpenDrawing">查看本工序图纸</button></view>
+			<view><button v-if="!editStatus" class="view-end-btn" type="primary"
+					@click="handleOpenDrawing">查看本工序图纸</button></view>
 
 		</uni-drawer>
 		<!-- <view v-if="bottomStatus" class="bottom uni-row">
@@ -366,19 +367,19 @@
 		let curProcessAfterList = [];
 		console.log("工序列表", item)
 		currentDaywork.value = item
-		if(item.isWasteRecycling ==1 || item.isAmend ==1){
+		if (item.isWasteRecycling == 1 || item.isAmend == 1) {
 			editStatus.value = true
-		}else{
+		} else {
 			editStatus.value = false
 		}
 		let nextIndex = 0;
 		for (let i = 0; i < item.processSequence.length; i++) {
-			if(item.nextProcess){
-							if (item.nextProcess.processStepNumber == item.processSequence[i].processStepNumber) {
-								nextIndex = i;
-							}
-						}else{
-							nextIndex = item.processSequence.length
+			if (item.nextProcess) {
+				if (item.nextProcess.processStepNumber == item.processSequence[i].processStepNumber) {
+					nextIndex = i;
+				}
+			} else {
+				nextIndex = item.processSequence.length
 			}
 		}
 		for (let i = 0; i < item.processSequence.length; i++) {
@@ -501,14 +502,14 @@
 					console.log(response.data[0].productionPlanDetailId)
 					console.log(store.planDetails.id)
 					console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
-								if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-									uni.showToast({
-										icon: 'none',
-										title: '该批次已转至其他工段',
-										duration: 2000
-									})
-									return
-								}
+					if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+						uni.showToast({
+							icon: 'none',
+							title: '该批次已转至其他工段',
+							duration: 2000
+						})
+						return
+					}
 					if (response.data[0].productionPlanDetailId == store.planDetails.id) {
 						console.log(response.data)
 						lotDialog.value.open(response.data);
@@ -537,7 +538,7 @@
 			reqParam.push(data[i].daywork)
 		}
 		console.log(data)
-		data.forEach(item =>{
+		data.forEach(item => {
 			item.isSort = 0
 		})
 		showDayworkSave(data).then(res => {
@@ -549,35 +550,39 @@
 	function handleDoIt(data) {
 		handleAddDaywork(data);
 	}
-	function handleOpenDrawing(){
-		console.log(currentDaywork.value,"444")
-		
-		var filteredProcess = currentDaywork.value.processSequence.filter(item => item.processStepNumber == currentDaywork.value.currentProcess.processStepNumber);
-		
+
+	function handleOpenDrawing() {
+		console.log(currentDaywork.value, "444")
+
+		var filteredProcess = currentDaywork.value.processSequence.filter(item => item.processStepNumber == currentDaywork
+			.value.currentProcess.processStepNumber);
+
 		// 检查 filteredProcess 是否有元素,并选择第一个元素
 		if (filteredProcess.length > 0) {
-		  var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
-		
-		  // 对 technologicalProcessDetailId 进行URL编码
-		  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}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
-		
-		  // 使用模板字符串构建完整的URL
-		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
-		
-		  // 导航到指定页面
-		  uni.navigateTo({
-			url: navigateUrl
-		  });
+			var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
+
+			// 对 technologicalProcessDetailId 进行URL编码
+			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}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
+
+			// 使用模板字符串构建完整的URL
+			var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
+
+			// 导航到指定页面
+			uni.navigateTo({
+				url: navigateUrl
+			});
 		} else {
-		  console.log('No process matched the current process step number.');
+			console.log('No process matched the current process step number.');
 		}
 	}
+
 	function handleDoTurnoverAfter() {
 		reflush();
 	}
@@ -828,7 +833,8 @@
 			border-radius: 8rpx;
 			color: #FFFFFF;
 			font-size: 28rpx;
-					}
+		}
+
 		.view-end-btn {
 			flex: 1;
 			height: 80rpx;

+ 110 - 63
pages/drawingMenu/index.vue

@@ -1,107 +1,149 @@
 <template>
 	<view class="uni-column container">
-			<view style="margin: 12rpx;">
-				<view class="margenTop" style="font-size: 30rpx;font-weight: bold;">批次号:{{product.lotCode}}</view>
-				<view class="margenTop" style="font-size: 30rpx;font-weight: bold;">产品描述:{{product.productDescription}}</view>
-				<view class="margenTop" style="font-size: 30rpx;font-weight: bold;    flex-direction: row;">
-					<view >工艺版本:{{product.technologyVersion}}</view>
-					<view style="margin-left: 200rpx;" >工序:{{product.processAlias}}</view>
-				</view>
+		<view style="margin: 12rpx;">
+			<view class="margenTop" style="font-size: 30rpx;font-weight: bold;">批次号:{{product.lotCode}}</view>
+			<view class="margenTop" style="font-size: 30rpx;font-weight: bold;">产品描述:{{product.productDescription}}
 			</view>
-			<view class='middle'>
-				<view class='segment'></view>
-				<uni-icons type="paperclip" size="30" ></uni-icons>
-				<view class='segment'></view>
+			<view class="margenTop" style="font-size: 30rpx;font-weight: bold;    flex-direction: row;">
+				<view>工艺版本:{{product.technologyVersion}}</view>
+				<view style="margin-left: 200rpx;">工序:</view>
+				<uni-data-select v-model="curSelectedProcessCode" :localdata="selectedProcessList" :clear="false"
+					@change="handleSelectedChange"></uni-data-select>
 			</view>
-			  <view style="overflow: auto;">
-			  	<view  :class="{'list-container':true}"
-			  		v-for="(item, index) in drawingList" :key="item.id">
-			  		<view ><text style="text-align: center; font-size: 28rpx; padding: 48rpx 0 24rpx 0;color:  #1684fc;" @click="handleOpenDrawing(item)">{{item.drawingName}}</text></view>
-			  		
-			  	</view>
-			  </view>
-			  
+		</view>
+		<view class='middle'>
+			<view class='segment'></view>
+			<uni-icons type="paperclip" size="30"></uni-icons>
+			<view class='segment'></view>
+		</view>
+		<view style="overflow: auto;">
+			<view :class="{'list-container':true}" v-for="(item, index) in drawingList" :key="item.id">
+				<view><text style="text-align: center; font-size: 28rpx; padding: 48rpx 0 24rpx 0;color:  #1684fc;"
+						@click="handleOpenDrawing(item)">{{item.drawingName}}</text></view>
+
+			</view>
+		</view>
+
 	</view>
-	
+
 
 </template>
 
 <script setup>
-	import{getDrawingList,getTechnologicalProcess} from '@/api/business/drawing.js'
+	import {
+		getDrawingList,
+		getTechnologicalProcess,
+		getDeptProcess
+	} from '@/api/business/drawing.js'
 	import {
 		ref
 	} from 'vue'
 	import {
 		onLoad,
 	} from '@dcloudio/uni-app'
-import { store } from '../../store';
-const technologicalProcessId = ref("")
-const drawingList = ref([])
-const processCode = ref("")
-const productId = ref("")
-const product = ref({})
-const lotCode = ref("")
-const processAlias = ref("")
+	import {
+		store
+	} from '../../store';
+	const technologicalProcessId = ref("")
+	const drawingList = ref([])
+	const processCode = ref("")
+	const productId = ref("")
+	const product = ref({})
+	const lotCode = ref("")
+	const selectedProcessList = ref([]);
+	const curSelectedProcessCode = ref("");
+	const processAlias = ref("")
 	onLoad((options) => {
-		console.log(options,1111)
+		console.log(options, 1111)
 		technologicalProcessId.value = options.param4
 		lotCode.value = options.param2
 		productId.value = options.param1
 		processCode.value = options.param3
-		processAlias.value = decodeURIComponent(options.param5) 
+		curSelectedProcessCode.value = processCode.value
+		processAlias.value = decodeURIComponent(options.param5)
 		init();
-		
+
 	})
+	// 获取所有的本工段可加工工序
+
+	function getProcesses(data) {
+		console.log(data)
+		getDeptProcess(data).then(res => {
+			selectedProcessList.value = res.data.map(v => ({
+				text: v.processAlias,
+				value: v.processCode
+			}))
+			curSelectedProcessCode.value = processCode.value
+		})
+	}
 
 	function init() {
 		console.log(product.value)
-		getTechnologicalProcess(technologicalProcessId.value).then(response=>{
-			console.log(response,1123)
-			if(response.code ==200){
-				product.value  = response.data
+		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){
+				getProcesses({
+					productVersion: product.value.technologyVersion,
+					deptId: store.curDeptDetails.deptId,
+					productId: productId.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
-				
+
 					}
 				})
 			}
 		})
-		
+
 	}
 
-	
-	function handleOpenDrawing(row){
-		
-		
-		
+
+	function handleOpenDrawing(row) {
+
+
+
 		// 检查 filteredProcess 是否有元素,并选择第一个元素
 
-		
-		  
-		  var encodeUrl = row.url;
-		  console.log(row)
-		  // 构建查询参数字符串
-		  var queryParam = `param1=${encodeUrl}`;
-		
-		  // 使用模板字符串构建完整的URL
-		  var navigateUrl = `/pages/pdfviewer/index?${queryParam}`;
-		
-		  // 导航到指定页面
-		  uni.navigateTo({
-		    url: navigateUrl
-		  });
 
-	}
 
+		var encodeUrl = row.url;
+		console.log(row)
+		// 构建查询参数字符串
+		var queryParam = `param1=${encodeUrl}`;
+
+		// 使用模板字符串构建完整的URL
+		var navigateUrl = `/pages/pdfviewer/index?${queryParam}`;
 
+		// 导航到指定页面
+		uni.navigateTo({
+			url: navigateUrl
+		});
 
+	}
+	//切换工序查询
+	function handleSelectedChange(item) {
+		getDrawingList({
+			productVersion: product.value.technologyVersion,
+			processCode: curSelectedProcessCode.value,
+			productId: productId.value
+		}).then(res => {
+			if (res.code == 200) {
+				drawingList.value = res.data
+			}
+		})
+	}
 </script>
 
 <style lang="scss">
@@ -109,6 +151,7 @@ const processAlias = ref("")
 		height: 100%;
 		background-color: #f5f5f5;
 	}
+
 	.middle {
 		display: flex;
 		flex-direction: row;
@@ -116,6 +159,7 @@ const processAlias = ref("")
 		justify-content: center;
 		margin-top: 20rpx;
 	}
+
 	.scroll-container {
 		position: absolute;
 		top: 24rpx;
@@ -123,15 +167,18 @@ const processAlias = ref("")
 		bottom: 160rpx;
 		left: 0;
 	}
-.segment {
+
+	.segment {
 		width: 280rpx;
 		background-color: rgba(213, 213, 213, 1);
 		border: 1rpx solid rgba(213, 213, 213, 1);
 	}
+
 	.selected {
 		border: 1px solid #1684fc;
 	}
-	.margenTop{
+
+	.margenTop {
 		margin: 20rpx;
 	}
 
@@ -165,7 +212,7 @@ const processAlias = ref("")
 				}
 			}
 		}
-		
+
 		.item-info {
 			margin-bottom: 16rpx;
 

+ 13 - 4
pages/outsourcedDrawingMenu/index.vue

@@ -49,10 +49,15 @@
 	const technologicalProcessDetailList = ref([]);
 	const curSelectedProcesstId = ref("");
 	const selectedProcessList = ref([]);
+	const productId = ref("")
+	const technologyVersion = ref("")
 	const lotCode = ref("")
 	onLoad((options) => {
+		console.log(options)
 		outsourceOrderDetailId.value = options.param1 //发出单明细id
 		lotCode.value = options.param2 //批次号
+		productId.value = options.param3 // 产品id
+		technologyVersion.value = options.param4 // 工艺版本
 		init();
 
 	})
@@ -70,15 +75,17 @@
 				for (let i = 0; i < technologicalProcessDetailList.value.length; i++) {
 					selectedProcessList.value.push({
 						text: technologicalProcessDetailList.value[i].processAlias, //工序名称
-						value: technologicalProcessDetailList.value[i].id, //工序id
+						value: technologicalProcessDetailList.value[i].processCode, //工序id
 						data: selectedProcessList.value[i]
 					})
 				}
 				//默认展示第一条
-				curSelectedProcesstId.value = technologicalProcessDetailList.value[0].id;
+				curSelectedProcesstId.value = technologicalProcessDetailList.value[0].processCode;
 				//根据工序id查询图纸信息
 				getDrawingList({
-					technologicalProcessDetailId: curSelectedProcesstId.value
+					processCode: curSelectedProcesstId.value,
+					productId: productId.value,
+					technologyVersion: technologyVersion.value
 				}).then(res => {
 					if (res.code == 200) {
 						drawingList.value = res.data
@@ -93,7 +100,9 @@
 	//切换工序查询
 	function handleSelectedChange(item) {
 		getDrawingList({
-			technologicalProcessDetailId: item
+			processCode: item,
+			productId: productId.value,
+			technologyVersion: technologyVersion.value
 		}).then(res => {
 			if (res.code == 200) {
 				drawingList.value = res.data

+ 75 - 71
pages/outsourcedInspection/form.vue

@@ -90,27 +90,27 @@
 					<input class="number" type="number" @blur="rejectNumberChange" v-model="item.rejectNum"
 						placeholder="" />
 				</view> -->
-		<view class="resu uni-row">
-				<view class="label">检查结果</view>
-				<input v-if="editable()" v-model="item.checkResult" placeholder="请输入检查结果" maxlength="50" />
-				<view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
-			</view>
-			<view class="resu uni-row">
-				<view class="label">超差范围</view>
-				<input v-if="editable()" v-model="item.exceedLimits" placeholder="请输入超差范围" maxlength="50" />
-				<view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
-			</view>
+				<view class="resu uni-row">
+					<view class="label">检查结果</view>
+					<input v-if="editable()" v-model="item.checkResult" placeholder="请输入检查结果" maxlength="50" />
+					<view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
+				</view>
+				<view class="resu uni-row">
+					<view class="label">超差范围</view>
+					<input v-if="editable()" v-model="item.exceedLimits" placeholder="请输入超差范围" maxlength="50" />
+					<view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
+				</view>
 				<view class="resu uni-row">
 					<view :class="!editable() ? 'label' : ''">检查量</view>
 					<input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
 						v-model="item.examiningNum" placeholder="" />
-						<view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
-						
+					<view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
+
 					<view :class="!editable() ? 'label' : ''">不良品量</view>
 					<input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
 						v-model="item.disqualificationNum" placeholder="" />
 					<view v-else class="number value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
-					
+
 					<view :class="!editable() ? 'label' : ''">废品量</view>
 					<input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
 						v-model="item.rejectNum" placeholder="" />
@@ -151,9 +151,9 @@
 			</view> -->
 			<view class="result resu uni-row" style="margin-top: 20rpx;">
 				<view class="label" style="width: 170rpx;">外协检状态</view>
-				<uni-data-checkbox v-if="editable()"  v-model="processInspecion.status"
-					:localdata="range" @change="change"></uni-data-checkbox>
-				<view v-else class="value" >{{ processInspecion.status == 1 ? '合格' : '不合格' }}
+				<uni-data-checkbox v-if="editable()" v-model="processInspecion.status" :localdata="range"
+					@change="change"></uni-data-checkbox>
+				<view v-else class="value">{{ processInspecion.status == 1 ? '合格' : '不合格' }}
 				</view>
 			</view>
 			<view v-if="editable()">
@@ -288,35 +288,35 @@
 	})
 
 	onShow(() => {
-		 uni.$off('addWasteInfoEvent');
-		 if(!flag.value){
-		if (store.processInspection != null) {
-			uni.showLoading({
-				title: '加载中'
-			});
-			processInspecion.value = store.processInspection
-			selectOutsourcedInspecion(processInspecion.value).then(res => {
-				console.log("res", res);
-				if (res.code == 200) {
-					processInspecion.value = res.data;
-					initStatus.value = res.data.status
-					unfitInfos.value = res.data.rejects;
-					oldUnfitInfos.value = res.data.oldRejects;
-					consultations.value = res.data.dayworkItemConsults;
+		uni.$off('addWasteInfoEvent');
+		if (!flag.value) {
+			if (store.processInspection != null) {
+				uni.showLoading({
+					title: '加载中'
+				});
+				processInspecion.value = store.processInspection
+				selectOutsourcedInspecion(processInspecion.value).then(res => {
 					console.log("res", res);
-					//判断是否移交到了仪器室
-					getInstrumentRoomInspectionList()
-					uni.hideLoading();
-					// getInspecion();
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: res.msg,
-						duration: 2000
-					})
-				}
-			});
-		}
+					if (res.code == 200) {
+						processInspecion.value = res.data;
+						initStatus.value = res.data.status
+						unfitInfos.value = res.data.rejects;
+						oldUnfitInfos.value = res.data.oldRejects;
+						consultations.value = res.data.dayworkItemConsults;
+						console.log("res", res);
+						//判断是否移交到了仪器室
+						getInstrumentRoomInspectionList()
+						uni.hideLoading();
+						// getInspecion();
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: res.msg,
+							duration: 2000
+						})
+					}
+				});
+			}
 		}
 	})
 
@@ -335,8 +335,10 @@
 	function handleDrawingMenu() {
 		var outsourceOrderDetailId = encodeURIComponent(processInspecion.value.outsourceOrderDetailId);
 		var lotCode = encodeURIComponent(processInspecion.value.lot.lotCode);
+		var technologyVersion = encodeURIComponent(processInspecion.value.lot.technologyVersion)
 		// 构建查询参数字符串
-		var queryParam = `param1=${outsourceOrderDetailId}&param2=${lotCode}`;
+		var queryParam =
+			`param1=${outsourceOrderDetailId}&param2=${lotCode}&param3=${processInspecion.value.lot.productId}&param4=${technologyVersion}`;
 
 		// 使用模板字符串构建完整的URL
 		var navigateUrl = `/pages/outsourcedDrawingMenu/index?${queryParam}`;
@@ -503,36 +505,37 @@
 		processInspecion.value.dayworkItemConsults = consultations.value;
 		processInspecion.value.dayworkItemRejects = unfitInfos.value;
 		processInspecion.value.user = store.userInfo;
-		if(processInspecion.value.flag) {
-				//打开选择仪器室的弹窗
-				selectInspectionChamber.value.open()
-				console.log(processInspecion.value)
-			}else{
-		saveOutsourcedInspecion(processInspecion.value).then(res => {
-			if (res.code == 200) {
-				let index = 0;
+		if (processInspecion.value.flag) {
+			//打开选择仪器室的弹窗
+			selectInspectionChamber.value.open()
+			console.log(processInspecion.value)
+		} else {
+			saveOutsourcedInspecion(processInspecion.value).then(res => {
+				if (res.code == 200) {
+					let index = 0;
 
-				for (let i = 0; i < pages.length; i++) {
+					for (let i = 0; i < pages.length; i++) {
 
-					if (pages[i].$page.fullPath == "/pages/outsourcedInspection/index") {
+						if (pages[i].$page.fullPath == "/pages/outsourcedInspection/index") {
 
-						index = pages.length - i - 1;
+							index = pages.length - i - 1;
+						}
 					}
+					console.log("index", index);
+					uni.navigateBack({
+						delta: index
+					});
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: res.msg,
+						duration: 2000
+					})
 				}
-				console.log("index", index);
-				uni.navigateBack({
-					delta: index
-				});
-			} else {
-				uni.showToast({
-					icon: 'none',
-					title: res.msg,
-					duration: 2000
-				})
-			}
-		});
+			});
 		}
 	}
+
 	function handleSelectInspectionChamber(data) {
 		processInspecion.value.inspectionChamberId = data
 		console.log(processInspecion.value)
@@ -541,9 +544,9 @@
 				let index = 0;
 				let pages = getCurrentPages();
 				for (let i = 0; i < pages.length; i++) {
-		
+
 					if (pages[i].$page.fullPath == "/pages/outsourcedInspection/index") {
-		
+
 						index = pages.length - i - 1;
 					}
 				}
@@ -945,7 +948,8 @@
 			}
 		}
 	}
+
 	.uni-input-input:disabled {
-	    background-color: #f5f7fa;
+		background-color: #f5f7fa;
 	}
 </style>

+ 37 - 33
pages/sortBatchReporting/index.vue

@@ -28,7 +28,7 @@
 					</view>
 					<view class=" uni-row" style="margin-left: 16rpx;">
 						<view v-if="item['status'] == 1" class="tag"><text class="label">进行中</text></view>
-						<view v-else-if="item['status'] == 3" class="tag turnover "><text class="label">周转中</text>
+						<view v-else-if="item['status'] == 3" class="tag turnover "><text class="label">待领取</text>
 						</view>
 						<view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">待周转</text>
 						</view>
@@ -119,7 +119,8 @@
 					<text>{{ index + 1 }}.{{item.processAlias}}</text>
 				</view>
 			</scroll-view>
-			<view><button v-if="!editStatus" class="start-batch-btn" style="margin-bottom: 10rpx;" type="primary" @click="handleOpenDrawing">查看本工序图纸</button></view>
+			<view><button v-if="!editStatus" class="start-batch-btn" style="margin-bottom: 10rpx;" type="primary"
+					@click="handleOpenDrawing">查看本工序图纸</button></view>
 		</uni-drawer>
 		<!-- <view v-if="bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
@@ -271,35 +272,38 @@
 		reflush();
 	})
 
-	function handleOpenDrawing(){
-		console.log(currentDaywork.value,"444")
-		
-		var filteredProcess = currentDaywork.value.processSequence.filter(item => item.processStepNumber == currentDaywork.value.currentProcess.processStepNumber);
-		
+	function handleOpenDrawing() {
+		console.log(currentDaywork.value, "444")
+
+		var filteredProcess = currentDaywork.value.processSequence.filter(item => item.processStepNumber == currentDaywork
+			.value.currentProcess.processStepNumber);
+
 		// 检查 filteredProcess 是否有元素,并选择第一个元素
 		if (filteredProcess.length > 0) {
-		  var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
-		
-		  // 对 technologicalProcessDetailId 进行URL编码
-		  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}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
-		
-		  // 使用模板字符串构建完整的URL
-		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
-		
-		  // 导航到指定页面
-		  uni.navigateTo({
-			url: navigateUrl
-		  });
+			var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
+
+			// 对 technologicalProcessDetailId 进行URL编码
+			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}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
+
+			// 使用模板字符串构建完整的URL
+			var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
+
+			// 导航到指定页面
+			uni.navigateTo({
+				url: navigateUrl
+			});
 		} else {
-		  console.log('No process matched the current process step number.');
+			console.log('No process matched the current process step number.');
 		}
 	}
+
 	function reflush() {
 		// normalStatus.value = true;
 		init(store.planDetails.id);
@@ -411,22 +415,22 @@
 		let curProcessAfterList = [];
 		console.log(item)
 		currentDaywork.value = item
-		if(item.isWasteRecycling ==1 || item.isAmend ==1){
+		if (item.isWasteRecycling == 1 || item.isAmend == 1) {
 			editStatus.value = true
-		}else{
+		} else {
 			editStatus.value = false
 		}
 		let nextIndex = 0;
 		for (let i = 0; i < item.processSequence.length; i++) {
-			console.log(item.nextProcess,"next")
-			if(item.nextProcess){
+			console.log(item.nextProcess, "next")
+			if (item.nextProcess) {
 				if (item.nextProcess.processStepNumber == item.processSequence[i].processStepNumber) {
 					nextIndex = i;
 				}
-			}else{
+			} else {
 				nextIndex = item.processSequence.length
 			}
-			
+
 		}
 		for (let i = 0; i < item.processSequence.length; i++) {
 			if (i >= nextIndex) {
@@ -684,7 +688,7 @@
 			reqParam.push(data[i].daywork)
 		}
 		console.log(data)
-		data.forEach(item =>{
+		data.forEach(item => {
 			item.isSort = 1
 		})
 		showDayworkSave(data).then(res => {