guoyujia 4 月之前
父节点
当前提交
35a07ee45b

+ 8 - 0
api/business/dayWork.js

@@ -12,6 +12,14 @@ export function getDayWorkList(data) {
 		data: data
 		data: data
 	})
 	})
 }
 }
+export function getAssistDayWorkList(data) {
+	return req.request({
+		url: '/business/daywork/assistList',
+		// header: reqHeader,
+		method: 'GET',
+		data: data
+	})
+}
 export function getDayWorkInnerList(data) {
 export function getDayWorkInnerList(data) {
 	return req.request({
 	return req.request({
 		url: '/business/daywork/innerList',
 		url: '/business/daywork/innerList',

+ 21 - 0
api/business/dayWorkItem.js

@@ -11,6 +11,13 @@ export function getDayWorkItemList(data) {
 		data: data
 		data: data
 	})
 	})
 }
 }
+export function getAssistDayWorkItemList(data) {
+	return req.request({
+		url: '/business/dayworkItem/assistList',
+		method: 'GET',
+		data: data
+	})
+}
 
 
 
 
 export function updateDayWorkItem(data) {
 export function updateDayWorkItem(data) {
@@ -172,6 +179,13 @@ export function turnover(data) {
 		data: data
 		data: data
 	})
 	})
 }
 }
+export function turnoverAssist(data) {
+	return req.request({
+		url: '/business/dayworkItem/turnoverAssist',
+		method: 'POST',
+		data: data
+	})
+}
 export function turnoverInner(data) {
 export function turnoverInner(data) {
 	return req.request({
 	return req.request({
 		url: '/business/dayworkItem/turnoverInner',
 		url: '/business/dayworkItem/turnoverInner',
@@ -194,6 +208,13 @@ export function turnoverOutsource(data) {
 		data: data
 		data: data
 	})
 	})
 }
 }
+export function turnoverOutsourceAssist(data) {
+	return req.request({
+		url: '/business/dayworkItem/turnoverOutsourceAssist',
+		method: 'POST',
+		data: data
+	})
+}
 
 
 export function getHandlingByCarrierCode(data) {
 export function getHandlingByCarrierCode(data) {
 	return req.request({
 	return req.request({

+ 1 - 1
components/dialog-base/dialog-base.vue

@@ -79,7 +79,7 @@
 			padding: 0 48rpx 48rpx 48rpx;
 			padding: 0 48rpx 48rpx 48rpx;
 			background-color: #FFFFFF;
 			background-color: #FFFFFF;
 			z-index: 12;
 			z-index: 12;
-			max-height: 64%;
+			max-height: 70%;
 			// overflow: auto;
 			// overflow: auto;
 
 
 			.close-btn {
 			.close-btn {

+ 109 - 0
components/dialog-baseLong/dialog-baseLong.vue

@@ -0,0 +1,109 @@
+<template>
+	<view v-if="visible" class="dialog-container uni-column">
+		<view class="bg"></view>
+		<view class="dialog-body">
+			<view class="close-btn uni-column" @click="close">
+				<image class="close-btn-icon" src="../../static/images/login-dialog-close-icon.png" mode="widthFix" />
+			</view>
+			<view class="dialog-title">
+				<text class="label">{{props.title}}</text>
+			</view>
+			<slot></slot>
+			<slot name='footer'></slot>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+
+	const visible = ref(false)
+	const emit = defineEmits(['close'])
+
+	const props = defineProps({
+		title: {
+			type: String,
+			default: '对话框'
+		}
+	})
+
+	const open = () => {
+		visible.value = true
+	}
+
+	function close() {
+		emit('close')
+		visible.value = false
+	}
+
+	/** 暴露给父组件的方法 */
+	defineExpose({
+		open,
+		close
+	})
+</script>
+
+<style lang="scss">
+	.dialog-container {
+		position: fixed;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		left: 0;
+		z-index: 10;
+
+		.bg {
+			position: absolute;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			background-color: #333333;
+			opacity: 0.3;
+			z-index: 11;
+		}
+
+		.dialog-body {
+			border-radius: 18rpx;
+			// position: absolute;
+			// top: 400rpx;
+			// right: 64rpx;
+			// left: 64rpx;
+			width: 70%;
+			// margin: auto auto;
+			margin-top: 200rpx;
+			margin-left: auto;
+			margin-right: auto;
+			padding: 0 48rpx 48rpx 48rpx;
+			background-color: #FFFFFF;
+			z-index: 12;
+			max-height: 80%;
+			// overflow: auto;
+
+			.close-btn {
+				position: absolute;
+				right: 24rpx;
+				top: 24rpx;
+				width: 40rpx;
+				height: 40rpx;
+				z-index: 13;
+
+				.close-btn-icon {
+					width: 40rpx;
+				}
+			}
+
+			.dialog-title {
+				align-items: center;
+				margin-top: 40rpx;
+
+				.label {
+					font-weight: bold;
+					font-size: 40rpx;
+				}
+			}
+		}
+	}
+</style>

+ 36 - 17
components/dialog-lotReporting/dialog-lotReporting.vue

@@ -1,10 +1,12 @@
 <template>
 <template>
-	<dialog-base class="dialog-body" ref="baseDialog" title="添加批次报工">
+	<view class="mask" v-if="isLoading"></view>
+	<dialog-baseLong class="dialog-body" ref="baseDialog" title="添加批次报工">
 		<view>
 		<view>
 			<!-- <view v-for="(item, index) in lotData" :key="index" class="list-item"> -->
 			<!-- <view v-for="(item, index) in lotData" :key="index" class="list-item"> -->
 			<view class="item-info uni-row">
 			<view class="item-info uni-row">
 				<text class="label">批次号</text>
 				<text class="label">批次号</text>
-				<text class="label right">{{ lotData.map(v => v.lotCode).join(",") }}</text>
+				<text class="label right"
+					style="word-wrap: break-word;">{{ lotData.map(v => v.lotCode).join(",") }}</text>
 			</view>
 			</view>
 			<!-- 	<view class="item-info uni-row">
 			<!-- 	<view class="item-info uni-row">
 					<text class="label">生产计划单号</text>
 					<text class="label">生产计划单号</text>
@@ -12,12 +14,17 @@
 				</view> -->
 				</view> -->
 			<view class="item-info uni-row">
 			<view class="item-info uni-row">
 				<text class="label">产品描述</text>
 				<text class="label">产品描述</text>
-				<text class="label right">{{ item['productDescription'] }}</text>
+				<text class="label right" style="word-wrap: break-word;">{{ item['productDescription'] }}</text>
 			</view>
 			</view>
 			<view class="item-info uni-row">
 			<view class="item-info uni-row">
 				<text class="label">箱号</text>
 				<text class="label">箱号</text>
 				<text class="label right">{{ item['carrierName'] }}</text>
 				<text class="label right">{{ item['carrierName'] }}</text>
 			</view>
 			</view>
+			<view class="item-info uni-row">
+				<text class="label">上序</text>
+				<view class="label right uni-row">{{ item['lastProcess'] ? item['lastProcess'].processAlias : '-' }}
+				</view>
+			</view>
 			<view class="item-info uni-row">
 			<view class="item-info uni-row">
 				<text class="label">当前序</text>
 				<text class="label">当前序</text>
 				<view class="label right uni-row" style="display: flex; flex-direction: row; flex-wrap: wrap;">
 				<view class="label right uni-row" style="display: flex; flex-direction: row; flex-wrap: wrap;">
@@ -109,7 +116,7 @@
 			</uni-drawer>
 			</uni-drawer>
 		</view>
 		</view>
 
 
-	</dialog-base>
+	</dialog-baseLong>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
@@ -155,6 +162,7 @@
 	const curProcessAfte = ref([])
 	const curProcessAfte = ref([])
 	const deptList = ref([])
 	const deptList = ref([])
 	const item = ref({})
 	const item = ref({})
+	const isLoading = ref(false);
 	const lastRequestTimestamp = ref(0);
 	const lastRequestTimestamp = ref(0);
 	const editStatus = ref(false)
 	const editStatus = ref(false)
 	const showRight = ref(null) // 抽屉
 	const showRight = ref(null) // 抽屉
@@ -233,19 +241,6 @@
 	}
 	}
 	//结束扫码
 	//结束扫码
 	function handleFinishScan() {
 	function handleFinishScan() {
-		const currentTime = Date.now();
-
-		// 检查是否已经过去了 2 秒
-		if (currentTime - lastRequestTimestamp.value < 2000) {
-			// 如果在 2 秒 内已经点击,那么不执行
-			uni.showToast({
-				icon: 'none',
-				title: `请勿重复点击`,
-				duration: 2000
-			})
-			return;
-		}
-		lastRequestTimestamp.value = currentTime;
 		// 保存新报工信息
 		// 保存新报工信息
 		// 然后关闭dialog
 		// 然后关闭dialog
 		// console.log(props)
 		// console.log(props)
@@ -346,7 +341,13 @@
 
 
 		}))
 		}))
 		console.log(params)
 		console.log(params)
+		isLoading.value = true; // 显示遮罩层
+		uni.showLoading({
+			title: '加载中'
+		});
 		reportDaywork(params).then(res => {
 		reportDaywork(params).then(res => {
+			isLoading.value = false;
+			uni.hideLoading();
 			callback()
 			callback()
 		})
 		})
 		// callback()
 		// callback()
@@ -449,4 +450,22 @@
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
 		transition: transform 0.3s ease;
 		transition: transform 0.3s ease;
 	}
 	}
+
+	.mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		z-index: 2000;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.mask .loading-text {
+		color: #fff;
+		font-size: 36rpx;
+	}
 </style>
 </style>

+ 552 - 0
components/dialog-turnoverApplicationAssist/dialog-turnoverApplicationAssist.vue

@@ -0,0 +1,552 @@
+<template>
+	<dialog-base ref="baseDialog" title="周转申请">
+		<view class="list-container">
+			<view><text style="margin: 0 0 0 5rpx;">请选择周转类型</text></view>
+			<view class="btn uni-row">
+				<view v-for="(item,index) in turnoverType"
+					:class="{ 'middle-btn': true, 'active': item.dictValue == curDayworkItem.turnoverType }"
+					@click="selectTurnoverType(item)"><text class="label"
+						style="font-size: 30rpx;">{{item.dictLabel}}</text></view>
+			</view>
+			<view class="" style="margin: 0 20rpx 20rpx 0;width: 88%;">
+				<uni-section title="请选择下序工段" title-font-size="32rpx" style="margin: 0 0 0 -16rpx;"
+					v-if="curDayworkItem.turnoverType == '1'">
+					<uni-data-select v-model="curDayworkItem.deptId" :localdata="insideDepts"
+						@change="handleChangeInside" :clear="false"
+						style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
+				</uni-section>
+				<uni-section title="请选择下序工段" title-font-size="32rpx" style="margin: 0 0 0 -16rpx;"
+					v-if="curDayworkItem.turnoverType == '2'">
+					<uni-data-select v-model="curDayworkItem.deptId" :localdata="outsideDepts"
+						@change="handleChangeOutside" :clear="false"
+						style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
+				</uni-section>
+			</view>
+			<view v-if="curDayworkItem.turnoverType != '3'" class="list-title uni-row">
+				<text class="label">是否包装签票</text><text style="margin-left: 56rpx;" class="label">否</text>
+				<switch class="switch" @change="switchChange" :checked="normalStatus"
+					style="transform: scale(0.8);align-items: center;font-size:32rpx ;"
+					color="rgba(103, 195, 55, 1.0)" />
+				<text class="label">是</text>
+			</view>
+			<view class="list-title">
+				<text class="label">请选择您摆放位置</text>
+			</view>
+			<view class="turnArea uni-row" v-if="curDayworkItem.turnoverType == '1'">
+				<view v-for="(item,index) in turnAreaList" class="btn">
+					<view :class="{ 'middle-btn': true, 'active': handleTurnoverDoor(item) }"
+						@click="selectTurnoverDoor(item)"><text class="label"
+							style="font-size: 30rpx;">{{item.code}}</text></view>
+				</view>
+			</view>
+			<view class="turnArea uni-row" v-if="curDayworkItem.turnoverType == '2'">
+				<view v-for="(item,index) in turnoverArea" class="btn">
+					<view :class="{ 'middle-btn': true, 'active': handleTurnoverDoor(item) }"
+						@click="selectTurnoverDoorOutside(item)"><text class="label"
+							style="font-size: 30rpx;">{{item.code}}</text></view>
+				</view>
+			</view>
+			<view class="turnArea uni-row" v-if="curDayworkItem.turnoverType == '3'">
+				<view v-for="(item,index) in turnoverArea" class="btn">
+					<view :class="{ 'middle-btn': true, 'active': handleTurnoverDoor(item) }"
+						@click="selectTurnoverOutsource(item)"><text class="label"
+							style="font-size: 30rpx;">{{item.code}}</text></view>
+				</view>
+			</view>
+			<view class="add-btn-container uni-row">
+				<button type="default" class="btn" @click="handleConfirm">确认</button>
+			</view>
+		</view>
+	</dialog-base>
+</template>
+
+<script setup>
+	import {
+		ref,
+		getCurrentInstance
+	} from 'vue'
+	import {
+		onLoad
+	} from '@dcloudio/uni-app'
+	import {
+		getDictInfoByType
+	} from '@/api/dict/dict.js'
+	import {
+		getTurnoverByWorkshop,
+		getOutsourceTurnoverByWorkshop
+	} from '@/api/business/workshop.js'
+	import {
+		getAssistDayWorkItemList,
+		saveDayWorkItem,
+		turnoverAssist,
+		turnoverOutsourceAssist
+	} from '@/api/business/dayWorkItem.js'
+	import {
+		getDeptListInfo
+	} from '@/api/dept/dept.js'
+	import {
+		getTurnoverListByDeptId,
+	} from '@/api/business/turnover.js'
+	import {
+		store
+	} from '@/store/index.js'
+	import {
+		timestampToTime
+	} from '@/utils/common.js'
+
+	const baseDialog = ref(null)
+	const turnoverDoorChecked = ref([])
+	// 创建一个引用来存储最后一次请求的时间戳
+	const lastRequestTimestamp = ref(0);
+	const turnoverType = ref([])
+	const outTurnArea = ref([])
+	const turnoverArea = ref([])
+	const normalStatus = ref(false)
+	const selection = ref([])
+	const curDayworkItem = ref({
+		turnoverType: 1
+	})
+	const dayworkInfo = ref(null)
+	const deptList = ref([]) // 工段列表
+	const insideDepts = ref([]) // 车间内工段
+	const outsideDepts = ref([]) // 车间外工段
+	const turnAreaList = ref([]) // 周转区列表
+	const emit = defineEmits(['reflushDaywork']) // 自定义调用父组件方法
+
+	onLoad(() => {
+
+	})
+
+	function open(data) {
+		resetPage();
+		dayworkInfo.value = data;
+		normalStatus.value = false
+		init();
+		baseDialog.value.open();
+	}
+
+	defineExpose({
+		open
+	})
+
+	function close() {
+		baseDialog.value.close()
+		turnAreaList.value = [];
+	}
+
+	function resetPage() {
+		turnoverDoorChecked.value = []
+		turnoverType.value = []
+		turnoverArea.value = []
+		selection.value = []
+		curDayworkItem.value = {
+			turnoverType: 1
+		}
+		deptList.value = []
+		insideDepts.value = []
+		outsideDepts.value = []
+		turnAreaList.value = []
+	}
+
+	function switchChange(event) {
+		console.log(event.detail.value)
+		//是
+		if (event.detail.value) {
+			normalStatus.value = true
+			curDayworkItem.value.isNextPacking = true
+		} else {
+			//否
+			normalStatus.value = false
+			curDayworkItem.value.isNextPacking = false
+		}
+		console.log(event.detail.value, !store.isPreProcess)
+		console.log(curDayworkItem.value)
+	}
+
+	function init() {
+		console.log(dayworkInfo.value)
+		getDictInfoByType('daywork_turnover_type').then(res => {
+			turnoverType.value = res.data;
+			getTurnoverByWorkshop({
+				deptId: store.curDeptDetails.deptId
+			}).then(res => {
+				turnoverArea.value = res.data;
+			})
+		})
+		getOutsourceTurnoverByWorkshop({
+			deptCode: '170000'
+		}).then(response => {
+			outTurnArea.value = response.data
+		})
+		getAssistDayWorkItemList({
+			dayworkId: dayworkInfo.value.id,
+			userId: store.userInfo.userId,
+			lotId: dayworkInfo.value.lotId,
+			isWasteRecycling: dayworkInfo.value.isWasteRecycling,
+			isAmend: dayworkInfo.value.isAmend,
+			processStepNumber: dayworkInfo.value.currentProcess.processStepNumber
+		}).then(res => {
+			curDayworkItem.value = {
+				...res.rows[0],
+				turnoverType: 1,
+				deptId: null
+			};
+		})
+		getDeptListInfo({
+			tenantId: store.tenantId,
+			productionPlanDetailId: store.planDetails.id,
+			lotId: dayworkInfo.value.lotId,
+			isWasteRecycling: dayworkInfo.value.isWasteRecycling,
+			isAmend: dayworkInfo.value.isAmend
+		}).then(res => {
+			for (let i = 0; i < res.data.length; i++) {
+				deptList.value = res.data;
+				console.log(deptList.value)
+				if (store.curDeptDetails.workshopId == res.data[i].workshopId) {
+					insideDepts.value.push({
+						text: res.data[i].deptName,
+						value: res.data[i].deptId,
+						data: res.data[i]
+					})
+				} else {
+					outsideDepts.value.push({
+						text: res.data[i].deptName,
+						value: res.data[i].deptId,
+						data: res.data[i]
+					})
+				}
+			}
+			console.log(insideDepts.value)
+			console.log(outsideDepts.value)
+		})
+	}
+
+	function selectTurnoverType(item) {
+		curDayworkItem.value.deptId = null
+		curDayworkItem.value.turnoverType = item.dictValue;
+		selection.value = []
+		normalStatus.value = false
+		curDayworkItem.value.isNextPacking = false
+	}
+
+	function selectTurnoverDoor(item) {
+		console.log(item, "chejiannei")
+		// turnoverDoorChecked.value = item;
+		// curDayworkItem.value.turnoverArea = item.dictValue;
+		let index = selection.value.findIndex(selectedItem => selectedItem === item);
+		if (index > -1) {
+			selection.value.splice(index, 1);
+		} else {
+			selection.value.push(item);
+		}
+	}
+
+	function selectTurnoverDoorOutside(item) {
+		console.log(item, "wai")
+		selection.value[0] = item;
+	}
+
+	function selectTurnoverOutsource(item) {
+		console.log(item, "waixie")
+		selection.value[0] = item
+	}
+
+	function handleTurnoverDoor(item) {
+		return selection.value.includes(item);
+	}
+	//校验车间内车间外
+	function handleValidate(data) {
+		console.log(data)
+		if (data.turnoverArea == "" || data.deptId == null || selection.value.length == 0) {
+			return false;
+		} else {
+			return true;
+		}
+	}
+	//校验外协
+	function handleValidateOutsource(data) {
+		console.log(data)
+		if (selection.value.length == 0) {
+			return false;
+		} else {
+			return true;
+		}
+	}
+
+	function handleConfirmOutsource() {
+		if (!handleValidateOutsource(curDayworkItem.value)) {
+			uni.showToast({
+				icon: "none",
+				title: '请选择完整信息'
+			});
+		} else {
+			const currentTime = Date.now();
+
+			// 检查是否已经过去了 2 秒
+			if (currentTime - lastRequestTimestamp.value < 2000) {
+				// 如果在 2 秒 内已经有请求发出,那么不执行
+				uni.showToast({
+					icon: 'none',
+					title: `请勿重复点击`,
+					duration: 2000
+				})
+				return;
+			}
+			lastRequestTimestamp.value = currentTime;
+			curDayworkItem.value.id = null;
+			curDayworkItem.value.processStepNumber = dayworkInfo.value.currentProcess.processStepNumber
+			curDayworkItem.value.startTime = timestampToTime(new Date());
+			curDayworkItem.value.endTime = timestampToTime(new Date());
+			curDayworkItem.value.technologicalProcessId = dayworkInfo.value.technologicalProcessId;
+			curDayworkItem.value.dayworkId = dayworkInfo.value.id;
+			curDayworkItem.value.productionPlanDetailId = dayworkInfo.value.productionPlanDetailId;
+			curDayworkItem.value.status = '4';
+			if (!store.tenantId) {
+				curDayworkItem.value.tenantId = store.userInfo.tenantId;
+			} else {
+				curDayworkItem.value.tenantId = store.tenantId;
+			}
+			//curDayworkItem.value.turnoverArea = "外协周转";
+			curDayworkItem.value.turnoverArea = selection.value.map((item) => {
+				return item.code;
+			}).join('、')
+			// 0627 将turnoverId存入dayworkItem,多选将Id进行拼接
+			curDayworkItem.value.turnoverId = selection.value.map((item) => {
+				return item.id;
+			}).join('、')
+			/**** 此处暂时为硬编码,170000为外协部门编码,根据编码查询信息 ***/
+			curDayworkItem.value.deptCode = 170000;
+			console.log(curDayworkItem.value)
+			close();
+			turnoverOutsourceAssist(curDayworkItem.value).then(res => {
+				if (res.code === 200) {
+					uni.showToast({
+						icon: 'success',
+						title: '操作成功'
+					});
+					emit('reflushDaywork');
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: res.msg,
+						duration: 2000
+					});
+					setTimeout(() => {
+						emit('reflushDaywork')
+					}, 1000);
+				}
+			})
+		}
+	}
+
+	function handleConfirm() {
+		if (curDayworkItem.value.turnoverType == '3') {
+			handleConfirmOutsource();
+		} else {
+			const currentTime = Date.now();
+
+			// 检查是否已经过去了 2 秒
+			if (currentTime - lastRequestTimestamp.value < 2000) {
+				// 如果在 2 秒 内已经有请求发出,那么不执行
+				uni.showToast({
+					icon: 'none',
+					title: `请勿重复点击`,
+					duration: 2000
+				})
+				return;
+			}
+			lastRequestTimestamp.value = currentTime;
+			console.log(dayworkInfo.value)
+			curDayworkItem.value.id = null;
+			curDayworkItem.value.status = '4';
+			curDayworkItem.value.processStepNumber = dayworkInfo.value.currentProcess.processStepNumber
+			curDayworkItem.value.startTime = timestampToTime(new Date());
+			curDayworkItem.value.endTime = timestampToTime(new Date());
+			curDayworkItem.value.technologicalProcessId = dayworkInfo.value.technologicalProcessId;
+			curDayworkItem.value.dayworkId = dayworkInfo.value.id;
+			curDayworkItem.value.productionPlanDetailId = dayworkInfo.value.productionPlanDetailId;
+			if (!store.tenantId) {
+				curDayworkItem.value.tenantId = store.userInfo.tenantId;
+			} else {
+				curDayworkItem.value.tenantId = store.tenantId;
+			}
+
+
+
+			// 过滤出周转位置的数组,并转换成字符串
+			const newArray = selection.value.map((item) => {
+				if (item.code) {
+					return item.code;
+				} else if (item.dictLabel) {
+					return item.dictLabel;
+				} else {
+					return null;
+				}
+			})
+			const newIdArray = selection.value.map((item) => {
+				if (item.id) {
+					return item.id;
+				} else {
+					return null;
+				}
+			})
+			if (curDayworkItem.value.turnoverType == '1') {
+				curDayworkItem.value.place = newArray.join('、');
+				//0628将位置id也拼接的方式存下来
+				curDayworkItem.value.placeId = newIdArray.join('、');
+				curDayworkItem.value.turnoverArea = "车间内周转看place字段";
+			} else {
+				curDayworkItem.value.turnoverArea = newArray.join('、');
+				//0628将位置id也拼接的方式存下来
+				curDayworkItem.value.turnoverId = newIdArray.join('、');
+			}
+
+			// curDayworkItem.value.dayworkId = store.dayworkInfo.id;
+			// 设置周转下一个车间名
+			for (let i = 0; i < deptList.value.length; i++) {
+				if (deptList.value[i].deptId == curDayworkItem.value.deptId) {
+					curDayworkItem.value.deptName = deptList.value[i].deptName;
+				}
+			}
+			console.log(curDayworkItem.value);
+			// console.log(dayworkInfo.value)
+			if (!handleValidate(curDayworkItem.value)) {
+				uni.showToast({
+					icon: "none",
+					title: '请选择完整信息'
+				});
+			} else {
+				curDayworkItem.value.isNextPacking = false
+				if (normalStatus.value) {
+					curDayworkItem.value.isNextPacking = true
+				}
+
+				close();
+				turnoverAssist(curDayworkItem.value).then(res => {
+					if (res.code === 200) {
+						uni.showToast({
+							icon: 'success',
+							title: '操作成功'
+						});
+						emit('reflushDaywork');
+					} else {
+						console.log("999")
+						console.log(res.msg)
+						uni.showToast({
+							icon: 'none',
+							title: res.msg,
+							duration: 2000
+						});
+						setTimeout(() => {
+							emit('reflushDaywork')
+						}, 1000);
+
+					}
+				})
+			}
+			// emit('confirm');
+		}
+
+
+	}
+
+	function handleChangeInside() {
+		let deptInfo = deptList.value.find(item => item.deptId == curDayworkItem.value.deptId)
+		console.log(deptInfo)
+		if (deptInfo.isSortPackaging == 1) {
+			normalStatus.value = true
+		} else {
+			normalStatus.value = false
+		}
+		turnAreaList.value = [];
+		selection.value = []
+		getTurnoverListByDeptId({
+			deptId: curDayworkItem.value.deptId,
+		}).then(res => {
+			for (var i = 0; i < res.data.length; i++) {
+				if (res.data[i].status != 1) {
+					turnAreaList.value[i] = res.data[i];
+				}
+			}
+		})
+	}
+
+	function handleChangeOutside() {
+		let deptInfo = deptList.value.find(item => item.deptId == curDayworkItem.value.deptId)
+		console.log(deptInfo)
+		if (deptInfo.isSortPackaging == 1) {
+			normalStatus.value = true
+		} else {
+			normalStatus.value = false
+		}
+	}
+</script>
+
+<style lang="scss">
+	.dialog-body {
+		overflow: auto;
+
+		.list-container {
+			width: 100%;
+			overflow: auto;
+
+			.list-title {
+				margin-top: 24rpx;
+
+				.label {
+					font-size: 32rpx;
+				}
+			}
+
+			.turnArea {
+				flex-wrap: wrap;
+				height: 200px;
+				// max-height: 200rpx;
+				overflow: auto;
+			}
+
+			.btn {
+				margin-top: 24rpx;
+
+				.middle-btn {
+					margin-right: 32rpx;
+					align-items: center;
+					justify-content: center;
+					padding-left: 0;
+					height: 80rpx;
+					width: 220rpx;
+					border-radius: 8rpx;
+					background-color: #FFFFFF;
+					border: 1px solid #999999;
+					background-color: #FFFFFF;
+
+				}
+
+				.label {
+					font-size: 24rpx;
+					color: #000000;
+				}
+
+				.active {
+					border-color: #1684fc;
+					background-color: rgb(236, 245, 255);
+
+					.label {
+						color: #1684fc;
+					}
+				}
+			}
+		}
+
+		.add-btn-container {
+			margin-top: 32rpx;
+
+			.btn {
+				flex: 1;
+				background-color: rgb(255, 121, 1);
+				color: #FFFFFF;
+
+			}
+		}
+	}
+</style>

+ 14 - 0
pages.json

@@ -35,6 +35,13 @@
 				"onReachBottomDistance": 100
 				"onReachBottomDistance": 100
 			}
 			}
 		},
 		},
+		{
+			"path": "pages/assistDaywork/index",
+			"style": {
+				"navigationBarTitleText": "集中报工",
+				"onReachBottomDistance": 100
+			}
+		},
 		{
 		{
 			"path": "pages/outsourceProductionPlan/index",
 			"path": "pages/outsourceProductionPlan/index",
 			"style": {
 			"style": {
@@ -76,6 +83,13 @@
 
 
 			}
 			}
 		},
 		},
+		{
+			"path": "pages/assistReportingForWork/index",
+			"style": {
+				"navigationBarTitleText": "报工记录"
+
+			}
+		},
 		{
 		{
 			"path": "pages/reportingForInnerWork/index",
 			"path": "pages/reportingForInnerWork/index",
 			"style": {
 			"style": {

+ 819 - 0
pages/assistDaywork/index.vue

@@ -0,0 +1,819 @@
+<template>
+	<view v-if="isMaskShow" class="mask">
+	</view>
+	<view class="uni-column" style=" background-color: #f5f5f5;padding: 24rpx;">
+		<view
+			style="height: 20%;position: fixed;top:38px;left: 12px;right: 12px;z-index: 10;background-color: #f5f5f5;">
+			<view class="box-bg uni-row">
+				<view class="input-view uni-row">
+					<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
+					<input class="nav-bar-input" type="text" v-model="keywords" placeholder="请输入批次号/箱号" />
+				</view>
+				<view class="search" @click="handleSearch">
+					搜索
+				</view>
+			</view>
+			<view class="scan uni-row" style="padding: 24rpx 24rpx 0 24rpx;">
+				<view class="scan-btn " @click.stop="handleScan">扫码
+				</view>
+			</view>
+			<view class="list-title uni-row">
+				<text class="label">是否正常批次</text>
+				<text>{{ normalStatus ? '是' : '否' }}</text>
+				<switch class="switch" :checked="normalStatus" @change="switchChange" color="rgba(103, 195, 55, 1.0)" />
+			</view>
+		</view>
+		<view v-if="listData.length == 0" style="color: #999;margin: 100% auto;
+    height: 100%;
+    position: relative;
+    bottom: 0;
+    left: 0;
+    right: 0;">
+			<text>暂无批次</text>
+		</view>
+		<view v-else class="uni-column" style="margin-top: 138px;overflow: auto;height: 100%;">
+
+			<!-- 批次列表 -->
+			<view v-for="(item, index) in listData" :key="index" class="list-item"
+				@click="handleToreportingForWork(item)">
+				<view class="title-container uni-row" style="justify-content: flex-start;">
+					<view class="title uni-row">
+						<text class="label">批次号:</text>
+						<text class="label code">{{ item['lotCode'] }}</text>
+					</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>
+						<view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">待周转</text>
+						</view>
+						<view v-else-if="item['status'] == 0" class="tag finished "><text class="label">未开始</text>
+						</view>
+						<view v-else-if="item['status'] == 4" type="default finished" class="tag finished"><text
+								class="label">已完成</text></view>
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">产品描述</text>
+					<text class="label right">{{ item['productDescription'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">材质</text>
+					<text
+						class="label right">{{ item['furnaceNoInfo'] && item['furnaceNoInfo'].firstTechnicalRequirement != '' ? item['furnaceNoInfo'].firstTechnicalRequirement + ";" + item['furnaceNoInfo'].secondTechnicalRequirement : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">箱号</text>
+					<text class="label right">{{ item['carrierName'] ? item['carrierName'] : '-' }}</text>
+				</view>
+				<!-- <view class="item-info uni-row">
+					<text class="label">总工时</text>
+					<text class="label right">{{ item['totalWorkingHours']}}</text>
+				</view> -->
+				<view class="item-info uni-row">
+					<text class="label">投入数</text>
+					<text
+						class="label right">{{ item.prevProcess == null ? item['productionQuantity']  : item['processQualifiedNum']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">上道工序</text>
+					<text class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前工序</text>
+					<!-- <text
+						class="label right">{{ item.currentProcess ? item.prevProcess && item['currentProcess'].processAlias == item['prevProcess'].processAlias ? '-' : item['currentProcess'].processAlias : '-'}}</text> -->
+					<text
+						class="label right">{{ item.currentProcess ? item['currentProcess'].processAlias : '-'}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">下道工序</text>
+					<view class="label right uni-row">
+						{{ item.nextProcess ? item['nextProcess'].processAlias : '-' }}
+						(<view style="color:  #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
+						</view>)
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">操作者</text>
+					<text class="label right">{{ item['allNickName'] }}</text>
+				</view>
+				<view v-if="notPreProcess" class="item-info uni-row">
+					<text class="label">所在区域</text>
+					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+				</view>
+				<view
+					v-if="item['dayworkItemList'] && item['dayworkItemList'].length >0 && item['dayworkItemList'][0].status >3"
+					class="item-info uni-row">
+					<text class="label">目标工段</text>
+					<text
+						class="label right">{{ item['dayworkItemList'] && item['dayworkItemList'].length >0 && item['dayworkItemList'][0].status >3 ? item['dayworkItemList'][0].deptName : '-' }}</text>
+				</view>
+				<view
+					v-if="item['dayworkItemList'] && item['dayworkItemList'].length >0 && item['dayworkItemList'][0].status >3"
+					class="item-info uni-row">
+					<text class="label">目标车间</text>
+					<text class="label right">{{ item['workshopName']}}</text>
+				</view>
+
+				<!-- 			<view v-if="item.protemResourceGroupDetailList && item.protemResourceGroupDetailList.length>0"
+					class="item-info uni-row">
+					<text class="label">邀请者</text>
+					<text
+						class="label right">{{ item['protemResourceGroupDetailList'] && item['protemResourceGroupDetailList'].length>0 ? item['protemResourceGroupDetailList'][0].protemCreatorName : '-' }}</text>
+				</view>
+				<view v-if="item.protemResourceGroupDetailList&& item.protemResourceGroupDetailList.length>0"
+					class="item-info uni-row">
+					<text class="label">已完成数量</text>
+					<text class="label right">{{ item['totalQuantity'] ? item['totalQuantity'] : 0 }}</text>
+				</view> -->
+				<view class="status-btn uni-row">
+					<view v-if="item['status'] == 2" class=" uni-row">
+						<button class="turnover-tag" size="mini"
+							@click.stop="handleShowTurnoverApplication(item)">周转申请</button>
+						<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
+					</view>
+					<view v-else-if="item['status'] == 3" class=" uni-row">
+						<button class="turnover-tag" size="mini" @click.stop="handleCancelTurnover(item)"
+							style="background-color: rgba(255, 85, 85, 1);">取消周转</button>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 抽屉 -->
+		<uni-drawer ref="showRight" mode="right" :mask-click="true">
+			<view style="text-align: center; font-size: 48rpx; padding: 48rpx 0 24rpx 0;">工艺列表</view>
+			<view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
+				仅显示当前工序后面工艺
+			</view>
+			<scroll-view scroll-y="true" style="height: 82%;" @touchmove.stop>
+				<view v-for="(item,index) in curProcessAfte" :key="index"
+					style="padding: 8rpx 5% 8rpx 14%; border-top: 1px solid #cccccc">
+					<text>{{ index + 1 }}.{{item.processAlias}}</text>
+				</view>
+			</scroll-view>
+			<view><button v-if="!editStatus" class="view-end-btn" type="primary"
+					@click="handleOpenDrawing">查看本工序图纸</button></view>
+
+		</uni-drawer>
+		<dialog-turnoverApplicationAssist ref="turnoverApplicationDialog" @reflushDaywork="handleDoTurnoverAfter" />
+		<dialog-selectProduction ref="selectProduction"></dialog-selectProduction>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
+	</view>
+
+</template>
+
+<script setup>
+	import {
+		normalizeProps,
+		reactive,
+		onMounted,
+		ref
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow,
+		onReachBottom
+	} from '@dcloudio/uni-app'
+	import {
+		getAssistDayWorkList,
+		showDaywork,
+		showDayworkSave,
+		turnoverDelete
+	} from '@/api/business/dayWork.js'
+	import {
+		isTakeStock
+	} from '@/api/business/taksStackLot.js'
+	import {
+		getAbnormalityLot
+	} from '@/api/business/lot.js'
+	import {
+		carrierFinishedCheck
+	} from '@/api/business/carrier.js'
+	import {
+		store
+	} from '@/store/index.js'
+	import {
+		toHHmmss
+	} from '@/utils/common.js'
+	import {
+		onPullDownRefresh
+	} from "@dcloudio/uni-app"
+	import QrScanner from '../vueQrCode/index.vue'
+
+	const turnoverApplicationDialog = ref(null)
+	const selectProduction = ref(null)
+	const showQrCodeReader = ref(false);
+	const listData = ref([])
+	const curPlan = ref(null)
+	const bottomStatus = ref(false) // 底部按钮显示
+	const paging = ref();
+	const reqParam = ref(null);
+	const normalStatus = ref(true)
+	const isLoding = ref(false);
+	const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态	
+	const keywords = ref(null)
+	const tempList = ref([])
+	const wasteRecyclingList = ref([]) //废品回用批次
+	// 在数据中定义一个变量来控制遮罩层的显示
+	const isMaskShow = ref(false);
+	//打开图纸
+	//选中的daywork
+	const currentDaywork = ref({})
+	const editStatus = ref(false)
+	const notPreProcess = ref(true)
+	const curProcessAfte = ref([])
+	const showRight = ref(null) // 抽屉
+	const pageSize = ref(10)
+	const pageNum = ref(1)
+	const status = ref(true)
+
+
+
+	onLoad(() => {
+		curPlan.value = store.planDetails;
+		normalStatus.value = true;
+		//废品回用的领料部门如果是当前工段,也要可以开始新批次
+		//查找当前计划单下的批次废品回用是当前工段
+		// getAbnormalityLot({
+		// 	productionPlanDetailId: store.planDetails.id,
+		// 	requisitionDepartmentId: store.curDeptDetails.deptId
+		// }).then(res => {
+		// 	wasteRecyclingList.value = res.rows
+		// 	if (store.planDetails.requisitionDepartmentId == store.curDeptDetails.deptId ||
+		// 		wasteRecyclingList.value.length > 0) {
+		// 		bottomStatus.value = true;
+		// 		store.isPreProcess = true;
+		// 	} else {
+		// 		bottomStatus.value = false;
+		// 		store.isPreProcess = false;
+		// 	}
+		// })
+
+	})
+
+	// 页面下拉刷新操作
+	onPullDownRefresh(() => {
+		uni.stopPullDownRefresh();
+		reflush();
+	})
+
+
+	onShow(() => {
+		reflush();
+
+
+	})
+
+	;
+
+	function reflush() {
+		init();
+	}
+
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function onDecodeHandler(ret) {
+		showQrCodeReader.value = false;
+		console.log(ret);
+		let vehicleObj = {
+			carrierCode: ret
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		keywords.value = vehicleObj.carrierCode
+		init();
+	}
+	//扫码
+	function handleScan() {
+		showQrCodeReader.value = true;
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			console.log(ret);
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			keywords.value = vehicleObj.carrierCode
+		// 			init();
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	keywords.value = "000642"
+		// 	init();
+		// }
+	}
+
+	function handleShowTurnoverApplication(data) {
+		let productionPlan = {
+			id: data.productionPlanDetailId,
+			productionPlanId: data.productionPlanId,
+			productDescription: data.productDescription
+		}
+		store.planDetails = productionPlan
+		console.log(data)
+		//如果这批废了,则不能周转申请
+		if (data.isWaste == 1) {
+			uni.showToast({
+				icon: 'none',
+				title: '此批已废,不能申请周转',
+				duration: 2000
+			})
+		} else {
+			isTakeStock().then(response => {
+				if (response.data) {
+					uni.showToast({
+						icon: 'none',
+						title: '正在盘点,不能申请周转',
+						duration: 2000
+					})
+				} else {
+					let _data = data ?? {}
+					carrierFinishedCheck(data).then(res => {
+						if (res.code === 200) {
+							// 调用子组件中的方法
+							turnoverApplicationDialog.value.open(_data)
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg
+							})
+						}
+					})
+				}
+			})
+
+		}
+
+	}
+	onReachBottom(() => {
+		console.log(status.value)
+		if (status.value) {
+			pageNum.value += 1
+			uni.showLoading({
+				title: '加载中'
+			});
+			getAssistDayWorkList({
+				deptId: store.curDeptDetails.deptId,
+				keywords: keywords.value,
+				pageNum: pageNum.value,
+				pageSize: pageSize.value,
+				normalStatus: normalStatus.value
+			}).then(res => {
+				const existingIds = new Set(listData.value.map(item => item.lotCode));
+				console.log(listData.value)
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.data.filter(row => !existingIds.has(row.lotCode));
+				console.log(newRows)
+				tempList.value.concat(newRows)
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					listData.value = listData.value.concat(newRows);
+
+					uni.hideLoading();
+				} else {
+					uni.hideLoading();
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
+			})
+		}
+		console.log(status.value)
+	})
+
+	function init() {
+		listData.value = []
+		status.value = true
+		uni.showLoading({
+			title: '加载中'
+		});
+		pageNum.value = 1
+		let reqData = {
+			deptId: store.curDeptDetails.deptId,
+			keywords: keywords.value,
+			pageNum: pageNum.value,
+			pageSize: pageSize.value,
+			normalStatus: normalStatus.value
+		};
+		// console.log(normalStatus.value)
+
+		getAssistDayWorkList(reqData).then(res => {
+			console.log(res.data)
+			if (res.code == 200) {
+				res.data.forEach(item => {
+					let quantitySum = 0;
+					item.dayworkItemList.forEach(info => {
+						if (info.status < 4 && item.currentProcess.processStepNumber == info
+							.processStepNumber) {
+							quantitySum += info.qualifiedNum;
+						}
+					});
+					item.totalQuantity = quantitySum;
+				});
+				tempList.value = res.data
+				// console.log(res)
+				listData.value = res.data
+			}
+
+			uni.hideLoading();
+		})
+	}
+
+	function handleSearch() {
+		init();
+
+	}
+
+	function handleToreportingForWork(item) {
+		if (item.requisitionDepartmentId == store.curDeptDetails.deptId) {
+			store.isPreProcess = true;
+		} else {
+			store.isPreProcess = false;
+		}
+		let productionPlan = {
+			id: item.productionPlanDetailId,
+			productionPlanId: item.productionPlanId,
+			productDescription: item.productDescription
+		}
+		store.dayworkInfo = item
+		store.planDetails = productionPlan
+		uni.navigateTo({
+			url: "/pages/assistReportingForWork/index"
+		})
+	}
+
+	function handleClickProcessList(item) {
+		let curProcessAfterList = [];
+		console.log("工序列表", item)
+		currentDaywork.value = item
+		editStatus.value = false
+		// if (item.isWasteRecycling == 1 || item.isAmend == 1) {
+		// 	editStatus.value = true
+		// } 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
+			}
+		}
+		for (let i = 0; i < item.processSequence.length; i++) {
+			if (i >= nextIndex) {
+				curProcessAfterList.push(item.processSequence[i]);
+			}
+		}
+		if (item.status == 3) {
+			curProcessAfterList.splice(0, 1)
+		}
+		console.log(curProcessAfterList)
+		curProcessAfte.value = curProcessAfterList;
+		showRight.value.open();
+	}
+
+	function handleSearchCode() {
+		// console.log(normalStatus.value)
+		selectProduction.value.open(normalStatus.value);
+	}
+
+	function switchChange(event) {
+		uni.pageScrollTo({
+
+			scrollTop: 0,
+
+			duration: 100
+
+		});
+		pageNum.value = 1
+		console.log(event)
+		//异常批
+		if (normalStatus.value) {
+			normalStatus.value = false
+			init()
+		} else {
+			//正常批
+			normalStatus.value = true
+			init()
+		}
+	}
+
+	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]; // 获取第一个匹配的对象
+			console.log("currentDaywork", currentDaywork.value)
+			// 对 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 enIsWasteRecycling = encodeURIComponent(currentDaywork.value.isWasteRecycling);
+			var enIsAmend = encodeURIComponent(currentDaywork.value.isAmend);
+			// 构建查询参数字符串
+			var queryParam =
+				`param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}&param6=${enIsWasteRecycling}&param7=${enIsAmend}`;
+
+			// 使用模板字符串构建完整的URL
+			var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
+
+			// 导航到指定页面
+			uni.navigateTo({
+				url: navigateUrl
+			});
+		} else {
+			console.log('No process matched the current process step number.');
+		}
+	}
+
+	function handleDoTurnoverAfter() {
+		reflush();
+	}
+
+
+
+
+	function handleCancelTurnover(data) {
+		isTakeStock().then(response => {
+			if (response.data) {
+				uni.showToast({
+					icon: 'none',
+					title: '正在盘点,不能取消周转',
+					duration: 2000
+				})
+			} else {
+				isMaskShow.value = true; // 显示遮罩层
+				uni.showLoading({
+					title: '加载中'
+				});
+				turnoverDelete(data).then(res => {
+					isMaskShow.value = false
+					if (res.code == 200) {
+						uni.showToast({
+							icon: "success",
+							title: "取消成功",
+							duration: 2000
+						})
+						isLoding.value = false;
+						setTimeout(() => {
+							init(store.planDetails.id);
+						}, 1000);
+					} else {
+						uni.showToast({
+							icon: "none",
+							title: "取消失败",
+							duration: 2000
+						})
+						isLoding.value = false;
+						setTimeout(() => {
+							init(store.planDetails.id);
+						}, 1000);
+					}
+				})
+			}
+		})
+	}
+</script>
+
+<style lang="scss">
+	$nav-height: 60rpx;
+
+	/* 遮罩层样式 */
+	.mask {
+		position: fixed;
+		/* 固定定位,覆盖整个屏幕 */
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.3);
+		/* 黑色背景,透明度30% */
+		display: flex;
+		justify-content: center;
+		/* 水平居中 */
+		align-items: center;
+		/* 垂直居中 */
+		z-index: 1000;
+		/* 确保遮罩层在其他元素之上 */
+	}
+
+	.box-bg {
+		width: 94%;
+		background-color: #F5F5F5;
+		padding: 5rpx 16rpx;
+		justify-content: space-around;
+		align-items: center;
+		margin: 24rpx auto 0;
+
+		.input-view {
+			width: 100%;
+			flex: 4;
+			background-color: #f8f8f8;
+			height: $nav-height;
+			border: 1rpx solid #999;
+			border-radius: 15rpx;
+			padding: 0 15rpx;
+			flex-wrap: nowrap;
+			margin: 0 10rpx 0;
+			line-height: $nav-height;
+
+			.input-uni-icon {
+				line-height: $nav-height;
+			}
+
+			.nav-bar-input {
+				width: 80%;
+				height: $nav-height;
+				line-height: $nav-height;
+				padding: 0 5rpx;
+				background-color: #f8f8f8;
+			}
+		}
+
+		.search {
+			width: 20%;
+			text-align: center;
+			color: #808080;
+		}
+	}
+
+	.list-title {
+		width: 100%;
+		margin-top: 16rpx;
+		height: 64rpx;
+		line-height: 64rpx;
+		align-items: center;
+		margin-left: 32rpx;
+
+		.label {
+
+			font-size: 32rpx;
+			margin-right: 24rpx;
+		}
+
+		.icon-gear {
+			font-size: 56rpx;
+		}
+	}
+
+	.switch {
+		margin-top: -8rpx;
+		transform: scale(0.7);
+	}
+
+	.scroll-container {
+		width: 92%;
+		margin: 24rpx auto 0 auto;
+		height: calc(90% - 100rpx);
+		overflow: scroll
+	}
+
+	.list-item {
+		background-color: #fff;
+		position: relative;
+		padding: 16rpx;
+		padding-bottom: 24rpx;
+		margin-bottom: 24rpx;
+		border-radius: 24rpx;
+
+		.title-container {
+
+			margin-top: 8rpx;
+			margin-bottom: 16rpx;
+
+			.title {
+				height: 48rpx;
+				align-items: center;
+
+				.label {
+					font-size: 32rpx;
+					font-weight: bold;
+
+					&.code {
+						margin-left: 8rpx;
+					}
+				}
+			}
+
+			.tag {
+				border: 1px solid #1CE5B0;
+				background-color: #F6FFFD;
+				padding: 8rpx;
+				border-radius: 8rpx;
+
+				.label {
+					color: #1CE5B0;
+					font-size: 24rpx;
+				}
+
+				&.finished {
+					border: 1px solid #BBBBBB;
+					background-color: #F5F5F5;
+
+					.label {
+						color: #BBBBBB;
+					}
+				}
+
+				&.turnover {
+					border: 1px solid #FF7901;
+					background-color: #F6FFFD;
+
+					.label {
+						color: #FF7901;
+					}
+				}
+			}
+		}
+
+		.item-info {
+			margin-bottom: 8rpx;
+
+			.label {
+				font-size: 28rpx;
+				width: 220rpx;
+				color: #808080;
+
+				&.right {
+					flex: 1;
+					color: #000000;
+				}
+			}
+		}
+
+		.status-btn {
+			justify-content: flex-end;
+			align-items: center;
+
+			.turnover-tag {
+				padding-right: 12rpx;
+				padding-left: 12rpx;
+				border-radius: 8rpx;
+				border: 1rpx solid #FF7901;
+				background-color: #FF7901;
+				font-size: 28rpx;
+				color: #FFFFFF;
+
+			}
+
+			.reporting-tag {
+				padding-right: 12rpx;
+				padding-left: 12rpx;
+				border-radius: 8rpx;
+				margin-left: 16rpx;
+				border: 1rpx solid #1684fc;
+				background-color: #1684fc;
+				font-size: 28rpx;
+				color: #FFFFFF;
+
+			}
+		}
+	}
+
+	.scan-btn {
+		height: 64rpx;
+		color: #ffffff;
+		background-color: #f47c3c;
+		align-items: center;
+		justify-content: center;
+		border-radius: 8rpx;
+		flex: 1;
+	}
+</style>

+ 505 - 0
pages/assistReportingForWork/index.vue

@@ -0,0 +1,505 @@
+<template>
+	<view class="uni-column container">
+		<view class="scroll-container">
+			<view v-for="(item, index) in listData" :key="index" class="list-item">
+				<view class="title-container">
+					<view class="title uni-row">
+						<view class="uni-row">
+							<text class="label">批次号:</text>
+							<text class="label code"> {{ item['lotCode'] }}</text>
+						</view>
+						<view style="color: #1684fc; margin-right: 0;" @click="handleOpenLonInfo">
+							<text>批次详情</text>
+						</view>
+					</view>
+					<view class="uni-row">
+						<view class="right-info uni-row"> <text class="label">工时</text>
+							<text class="label time">{{ item['taskTime'] }}</text>
+							<!-- <text class="label time">{{ item['taskTime'] }}h</text> -->
+						</view>
+						<view class="right-info uni-row" style="margin-left: 50rpx;"> <text class="label">合格数</text>
+							<text class="label number ">{{ item['qualifiedNum'] }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">产品描述</text>
+					<text class="label right">{{ item['productDescription'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">操作者</text>
+					<text class="label right">{{ item['nickName'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">开始时间</text>
+					<text class="label right">{{ item['startTime'] ? item['startTime'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">结束时间</text>
+					<text class="label right">{{ item['endTime'] ? item['endTime'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">废品数</text>
+					<text class="label right">{{ item['rejectSum'] ? item['rejectSum'] : 0 }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">投入数</text>
+					<text
+						class="label right">{{store.dayworkInfo.prevProcess == null ?  store.dayworkInfo['productionQuantity'] : store.dayworkInfo['processQualifiedNum']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">设备</text>
+					<text class="label right">{{ item['equipmentDetailCode']}}</text>
+				</view>
+				<view v-if="item['status'] == 1" class="status-btn uni-row ">
+					<button class="finished-turnover-tag" size="mini"
+						@click.stop="handleShowEndWorkDialog(item)">结束报工</button>
+				</view>
+			</view>
+		</view>
+		<view class="bottom uni-row">
+			<button class="bottom-btn left-btn" @click="handleChangevehicle"><text class="label">更换载具</text></button>
+		</view>
+		<dialog-end-work ref="endWorkDialog" @resflushItem='resflushItem' />
+	</view>
+	<dialog-lotInfo ref="lotInfo"></dialog-lotInfo>
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		getAssistDayWorkItemList,
+		saveDayWorkItemBatch,
+		updateDayWorkItem
+	} from "@/api/business/dayWorkItem.js"
+	import {
+		store
+	} from '@/store/index.js'
+	import {
+		timestampToTime,
+		toHHmmss
+	} from '@/utils/common.js'
+	import {
+		checkBizDayworkCarriers
+	} from '@/api/business/dayWork.js'
+	import {
+		isCurProcessFinish
+	} from '@/api/business/dayWorkItem.js'
+	import {
+		getEquipmentByUidAndDid
+	} from '@/api/resourceGroup/resourceGroupDetail.js'
+
+	const listData = ref([]) // 回显 
+	const curPlan = ref({}) // 接收生产计划单信息 
+	const dayWorkInfo = ref({}) // 接收daywork信息
+	const equipmentList = ref([]) // 设备列表
+	const endWorkDialog = ref(null) // 组件
+	const selectEquipment = ref(null) // 组件   
+	const inviteUser = ref(null) // 组件  
+	const dayWorkItem = ref({}) // 添加传输对象
+	const reqParam = ref([]) // 请求参数
+	const userInfo = ref(null) // 登录员工信息
+	const flag = ref(true) // 控制底部开始加工按钮功能
+	const lotInfo = ref(null) // 详情弹窗
+	const hasEquipment = ref(true) // 判断资源组是否有设备
+
+
+	onLoad(() => {
+		curPlan.value = store.planDetails;
+		dayWorkInfo.value = store.dayworkInfo;
+		init();
+	})
+	// onUnload(() => {
+	// 	uni.$off('dayworkItemUpdate', reflush)
+	// })
+
+	onShow(() => {
+		uni.$on('dayworkItemUpdate', reflush)
+	})
+
+	function init() {
+		console.log(store.dayworkInfo)
+		userInfo.value = store.userInfo;
+		uni.showLoading({
+			title: '加载中'
+		});
+		getAssistDayWorkItemList({
+			dayworkId: dayWorkInfo.value.id,
+			lotId: dayWorkInfo.value.lotId,
+			isWasteRecycling: dayWorkInfo.value.isWasteRecycling,
+			isAmend: dayWorkInfo.value.isAmend,
+			processStepNumber: dayWorkInfo.value.currentProcess.processStepNumber,
+			// processId: store.dayworkInfo.currentProcess.id,
+			type: '非周转中item'
+		}).then(res => {
+			if (res.code == 200) {
+				listData.value = res.rows || [];
+				console.log(listData.value)
+				// 时间戳转工时
+				for (var i = 0; i < listData.value.length; i++) {
+					let timeStamp = listData.value[i].workingHours;
+					listData.value[i].taskTime = toHHmmss(timeStamp);
+					listData.value[i].assistUserId = store.userInfo.userId
+					listData.value[i].assistUserName = store.userInfo.userName
+					listData.value[i].assistNickName = store.userInfo.nickName
+				}
+				flag.value = !listData.value.some(item => item.status == 0);
+				uni.hideLoading();
+			} else {
+				uni.showToast({
+					icon: "error",
+					title: res.message,
+					duration: 1000
+				})
+				uni.hideLoading();
+			}
+		})
+
+		getEquipmentByUidAndDid(store.planDetails.id, store.curDeptDetails.deptId, store.dayworkInfo.lotId).then(
+			equipmentRes => {
+				if (equipmentRes.code == 200) {
+					hasEquipment.value = equipmentRes.rows.length > 0 ? true : false;
+				}
+			})
+	}
+
+	function reflush() {
+		init();
+	}
+
+	function resflushItem() {
+		reflush();
+	}
+
+	function handleOpenLonInfo() {
+		lotInfo.value.open();
+	}
+
+	function handleShowEndWorkDialog(data) {
+		console.log(data)
+		checkBizDayworkCarriers({
+			id: store.dayworkInfo.id
+		}).then(res => {
+			if (res.code == 200) {
+				// 调用子组件中的方法
+				endWorkDialog.value.open(data, listData)
+			} else {
+				uni.showToast({
+					icon: "none",
+					title: res.msg + ",请绑定",
+					duration: 2000
+				})
+				uni.navigateTo({
+					url: "/pages/changeBox/index"
+				})
+			}
+		})
+	}
+
+	function handleChangevehicle() {
+		if (store.dayworkInfo.status == 4) {
+			uni.showToast({
+				icon: 'none',
+				title: '该工序已完成'
+			})
+		} else {
+			uni.navigateTo({
+				url: "/pages/changeBox/index"
+			})
+		}
+	}
+	//送检跳转
+	function HandleSendInspection() {
+		uni.navigateTo({
+			url: "/pages/firstInspection/scan"
+		})
+	}
+
+	function getEquipment(data) {
+		console.log(data);
+		equipmentList.value = data;
+	}
+
+	function handleStartProcessing(item) {
+		// 查询当前工序是否完成再判断是否进行报工
+		isCurProcessFinish({
+			dayworkId: store.dayworkInfo.id,
+			processId: listData.value[0].processId
+		}).then(res => {
+			if (store.dayworkInfo.status == 4) {
+				uni.showToast({
+					icon: 'none',
+					title: '当前批次已完成'
+				})
+			} else if (res.data) {
+				uni.showToast({
+					icon: 'none',
+					title: '该工序已完成,不能继续报工'
+				})
+			} else if (!hasEquipment.value) {
+				uni.showToast({
+					icon: 'none',
+					title: '当前无可用设备',
+				})
+			} else {
+				selectEquipment.value.open(item);
+			}
+		})
+		// }
+	}
+
+	/**
+	 * 新批次默认item去报工(执行方法)
+	 * @param {Object} item
+	 */
+	function handleStartFirstItem(item) {
+		let reqParam = item;
+		reqParam.status = 1;
+		reqParam.startTime = timestampToTime(new Date());
+		updateDayWorkItem(reqParam).then(res => {
+			if (res.code === 200) {
+				uni.showToast({
+					icon: "success",
+					title: "报工成功",
+					duration: 2000
+				})
+				init();
+			} else {
+				uni.showToast({
+					icon: "none",
+					title: "报工失败,请联系管理员",
+					duration: 2000
+				})
+			}
+		})
+	}
+
+	function handleAddDayWorkItem(data) {
+		console.log(data)
+		if (data.dayworkId) { // data里面任意一对象除了设备相关的字段存在,直接给reqParam赋值
+			reqParam.value = {
+				...data,
+				productionPlanId: curPlan.value.productionPlanId,
+				productionPlanDetailId: curPlan.value.id,
+				technologicalProcessId: dayWorkInfo.value.technologicalProcessId,
+				prodNum: store.dayworkInfo.prevProcess == null ?
+					store.dayworkInfo['isLast'] == 1 ? store.dayworkInfo['lastLotQuantity'] : store.dayworkInfo[
+						'oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
+				deptId: store.curDeptDetails.deptId,
+				tenantId: !store.tenantId ? store.userInfo.tenantId : store.tenantId,
+				deptName: store.curDeptDetails.deptName
+			}
+		} else {
+			// equipmentList.value = data;
+			dayWorkItem.value = {
+				dayworkId: dayWorkInfo.value.id,
+				lotId: dayWorkInfo.value.lotId,
+				productionPlanId: curPlan.value.productionPlanId,
+				productionPlanDetailId: curPlan.value.id,
+				technologicalProcessId: dayWorkInfo.value.technologicalProcessId,
+				prodNum: store.dayworkInfo.prevProcess == null ?
+					store.dayworkInfo['isLast'] == 1 ? store.dayworkInfo['lastLotQuantity'] : store.dayworkInfo[
+						'oneLotQuantity'] : store.dayworkInfo['processQualifiedNum'],
+				status: 1,
+				startTime: timestampToTime(new Date()),
+				deptId: store.curDeptDetails.deptId,
+				deptName: store.curDeptDetails.deptName,
+				tenantId: !store.tenantId ? store.userInfo.tenantId : store.tenantId,
+				...data
+			}
+			reqParam.value = dayWorkItem.value;
+		}
+		console.log(reqParam.value)
+		saveDayWorkItemBatch(reqParam.value).then(res => {
+			if (res.code === 200) {
+				uni.showToast({
+					icon: 'success',
+					title: '操作成功',
+					duration: 2000
+				});
+				reqParam.value = [];
+				reflush();
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: '操作失败',
+					duration: 2000
+				});
+			}
+		})
+	}
+</script>
+
+<style lang="scss">
+	.container {
+		// height: calc(100% - 232rpx);
+		background-color: #f5f5f5;
+		position: absolute;
+		left: 0;
+		right: 0;
+		height: 100%;
+	}
+
+
+	.scroll-container {
+		height: 88%;
+		position: relative;
+		top: 16rpx;
+		overflow: auto;
+		// right: 0;
+		// bottom: 144rpx;
+		// left: 0;
+	}
+
+	.selected {
+		border: 1px solid #1684fc;
+	}
+
+	.list-item {
+		background-color: #fff;
+		position: relative;
+		padding: 16rpx;
+		padding-bottom: 24rpx;
+		margin: 0 24rpx;
+		margin-bottom: 24rpx;
+		border-radius: 8rpx;
+
+		.title-container {
+			margin: 8rpx 0;
+			width: 100%;
+
+			.title {
+				height: 48rpx;
+				justify-content: space-between;
+				align-items: center;
+				flex: 7;
+
+				.label {
+					// font-size: 32rpx;
+					font-weight: bold;
+				}
+
+				.code {
+					margin-left: 8rpx;
+				}
+			}
+		}
+
+		.item-info {
+			margin-bottom: 8rpx;
+
+			.label {
+				font-size: 28rpx;
+				width: 152rpx;
+				color: #808080;
+
+				&.right {
+					flex: 1;
+					color: #000000;
+				}
+			}
+		}
+
+		.right-info {
+
+			// justify-content: flex-end;
+			// width:45%;
+			// margin-top: 5rpx;
+			.label {
+				font-size: 28rpx;
+			}
+
+			.time {
+				margin-left: 8rpx;
+				color: #1684fc;
+			}
+
+			.number {
+				margin-left: 8rpx;
+				color: #1684fc;
+			}
+
+		}
+	}
+
+	.top {
+		position: fixed;
+		right: 0;
+		bottom: 100rpx;
+		left: 0;
+		height: 100rpx;
+		padding: 16rpx 24rpx;
+		align-items: center;
+		background-color: #FFFFFF;
+		justify-content: space-between;
+
+		.bottom-btn {
+			flex: 1;
+			font-size: 28rpx;
+			color: #FFFFFF;
+
+			&.left-btn {
+				background-color: rgba(0, 226, 166, 1);
+			}
+
+			&.right-btn {
+				margin-left: 24rpx;
+			}
+		}
+	}
+
+	.bottom {
+		height: 10%;
+		position: fixed;
+		right: 0;
+		bottom: 0;
+		left: 0;
+		height: 100rpx;
+		padding: 16rpx 24rpx;
+		align-items: center;
+		background-color: #FFFFFF;
+		justify-content: space-between;
+
+		.bottom-btn {
+			flex: 1;
+			font-size: 28rpx;
+			color: #FFFFFF;
+
+			&.left-btn {
+				background-color: rgba(0, 226, 166, 1);
+			}
+
+			&.right-btn {
+				margin-left: 24rpx;
+			}
+		}
+	}
+
+	.status-btn {
+		width: 100%;
+		justify-content: flex-end;
+
+		.finished-turnover-tag {
+			margin: unset;
+			border-radius: 8rpx;
+			background-color: rgb(255, 85, 85);
+			font-size: 28rpx;
+			color: #FFFFFF;
+		}
+
+		.start-turnover-tag {
+			margin: unset;
+			border-radius: 8rpx;
+			font-size: 28rpx;
+			color: #FFFFFF;
+		}
+	}
+</style>

+ 24 - 0
pages/batchReporting/index.vue

@@ -636,6 +636,10 @@
 	}
 	}
 
 
 	function handleAddDaywork(data) {
 	function handleAddDaywork(data) {
+		isMaskShow.value = true; // 显示遮罩层
+		uni.showLoading({
+			title: '加载中'
+		});
 		console.log(data)
 		console.log(data)
 		let reqParam = [];
 		let reqParam = [];
 		for (var i = 0; i < data.length; i++) {
 		for (var i = 0; i < data.length; i++) {
@@ -647,6 +651,8 @@
 				item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
 				item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
 		})
 		})
 		showDayworkSave(data).then(res => {
 		showDayworkSave(data).then(res => {
+			isMaskShow.value = false;
+			uni.hideLoading();
 			console.log(res)
 			console.log(res)
 			init(store.planDetails.id);
 			init(store.planDetails.id);
 		})
 		})
@@ -964,4 +970,22 @@
 
 
 		}
 		}
 	}
 	}
+
+	.mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		z-index: 2000;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.mask .loading-text {
+		color: #fff;
+		font-size: 36rpx;
+	}
 </style>
 </style>

+ 13 - 8
pages/batchReportingOutsource/index.vue

@@ -620,6 +620,10 @@
 	}
 	}
 
 
 	function handleAddDaywork(data) {
 	function handleAddDaywork(data) {
+		isMaskShow.value = true; // 显示遮罩层
+		uni.showLoading({
+			title: '加载中'
+		});
 		console.log(data)
 		console.log(data)
 		let reqParam = [];
 		let reqParam = [];
 		for (var i = 0; i < data.length; i++) {
 		for (var i = 0; i < data.length; i++) {
@@ -631,6 +635,8 @@
 				item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
 				item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
 		})
 		})
 		showDayworkInnerSave(data).then(res => {
 		showDayworkInnerSave(data).then(res => {
+			isMaskShow.value = false;
+			uni.hideLoading();
 			console.log(res)
 			console.log(res)
 			init(store.planDetails.id);
 			init(store.planDetails.id);
 		})
 		})
@@ -726,23 +732,22 @@
 <style lang="scss">
 <style lang="scss">
 	$nav-height: 60rpx;
 	$nav-height: 60rpx;
 
 
-	/* 遮罩层样式 */
 	.mask {
 	.mask {
 		position: fixed;
 		position: fixed;
-		/* 固定定位,覆盖整个屏幕 */
 		top: 0;
 		top: 0;
 		left: 0;
 		left: 0;
 		right: 0;
 		right: 0;
 		bottom: 0;
 		bottom: 0;
-		background-color: rgba(0, 0, 0, 0.3);
-		/* 黑色背景,透明度30% */
+		background-color: rgba(0, 0, 0, 0.5);
+		z-index: 2000;
 		display: flex;
 		display: flex;
 		justify-content: center;
 		justify-content: center;
-		/* 水平居中 */
 		align-items: center;
 		align-items: center;
-		/* 垂直居中 */
-		z-index: 1000;
-		/* 确保遮罩层在其他元素之上 */
+	}
+
+	.mask .loading-text {
+		color: #fff;
+		font-size: 36rpx;
 	}
 	}
 
 
 	.box-bg {
 	.box-bg {

+ 61 - 36
pages/dashboard/index.vue

@@ -2,6 +2,7 @@
 	<view class="page-container uni-column">
 	<view class="page-container uni-column">
 		<view class="logo-container uni-row">
 		<view class="logo-container uni-row">
 			<image class="logo" src="../../static/images/logo.png" />
 			<image class="logo" src="../../static/images/logo.png" />
+			<view style="position: absolute; right: 4px;top: 0px;"><text>版本号:{{versionName}}</text></view>
 		</view>
 		</view>
 		<view class="title"><text class="label">德迈仕数字生产线管理平台</text></view>
 		<view class="title"><text class="label">德迈仕数字生产线管理平台</text></view>
 		<view class="user-info-container uni-row">
 		<view class="user-info-container uni-row">
@@ -31,13 +32,17 @@
 			<view v-if="showQuick && !showOutsource " class="business-btn uni-row" @click="handleFastToProductionPlan">
 			<view v-if="showQuick && !showOutsource " class="business-btn uni-row" @click="handleFastToProductionPlan">
 				<text class="label">快速报工</text>
 				<text class="label">快速报工</text>
 			</view>
 			</view>
-			<view class="business-btn uni-row" v-if="showTakeStock && !showOutsource " @click="handleToTakeStock">
+			<view class="business-btn uni-row" v-if="showTakeStock" @click="handleToTakeStock">
 				<text class="label">盘点</text>
 				<text class="label">盘点</text>
 			</view>
 			</view>
 			<view class="business-btn uni-row" v-if="showOther && !showSizing && !showOutsource"
 			<view class="business-btn uni-row" v-if="showOther && !showSizing && !showOutsource"
 				@click="handleToProductionPlan">
 				@click="handleToProductionPlan">
 				<text class="label">报工</text>
 				<text class="label">报工</text>
 			</view>
 			</view>
+			<view class="business-btn uni-row" v-if="showOther && !showSizing && !showOutsource && showAssistDaywork"
+				@click="handleToAssistDaywork">
+				<text class="label">集中报工</text>
+			</view>
 			<view class="business-btn uni-row" v-if="showInnerTurnover && !showOutsource" @click="handleInnerTurnover">
 			<view class="business-btn uni-row" v-if="showInnerTurnover && !showOutsource" @click="handleInnerTurnover">
 				<text class="label">内部周转</text>
 				<text class="label">内部周转</text>
 			</view>
 			</view>
@@ -175,8 +180,16 @@
 	const showOutSourceList = ref(false)
 	const showOutSourceList = ref(false)
 	const showChangeTurnover = ref(false)
 	const showChangeTurnover = ref(false)
 	const showQrCodeReader = ref(false);
 	const showQrCodeReader = ref(false);
+	const showAssistDaywork = ref(false)
+	const versionName = ref(null)
 
 
 	onLoad(() => {
 	onLoad(() => {
+		uni.getSystemInfo({
+			success: function(res) {
+				versionName.value = res.appVersion;
+			}
+		});
+		console.log(versionName.value)
 		console.log(store.userInfo)
 		console.log(store.userInfo)
 		userInfo.value = store.userInfo || {
 		userInfo.value = store.userInfo || {
 			nickName: ""
 			nickName: ""
@@ -237,6 +250,13 @@
 		} else {
 		} else {
 			showAdjust.value = false
 			showAdjust.value = false
 		}
 		}
+		//协助报工
+		if (store.userInfo.permissions.some(item => item === 'business:assistDaywork:list') || store.userInfo
+			.permissions.some(item => item === "*:*:*")) {
+			showAssistDaywork.value = true
+		} else {
+			showAssistDaywork.value = false
+		}
 		if (store.userInfo.permissions.some(item => item === 'business:outsource:checkBox') || store.userInfo
 		if (store.userInfo.permissions.some(item => item === 'business:outsource:checkBox') || store.userInfo
 			.permissions.some(item => item === "*:*:*")) {
 			.permissions.some(item => item === "*:*:*")) {
 			showOutSourceList.value = true;
 			showOutSourceList.value = true;
@@ -254,7 +274,6 @@
 			showOutsourcedInspector.value = true
 			showOutsourcedInspector.value = true
 			// showOther.value = true;
 			// showOther.value = true;
 		}
 		}
-		showAuxiliary.value = true
 		init();
 		init();
 	})
 	})
 
 
@@ -318,7 +337,11 @@
 					console.log(store)
 					console.log(store)
 					handleSelectInnerTurnover()
 					handleSelectInnerTurnover()
 				}
 				}
-				if (res.data.some(v => v.hasQuick === 1)) {
+				if (res.data.some(v => v.hasQuick === 1) &&
+					(store.userInfo.permissions.some(item => item ===
+							'business:quickDaywork:list') || store.userInfo
+						.permissions.some(item => item === "*:*:*"))
+				) {
 					showQuick.value = true
 					showQuick.value = true
 				} else {
 				} else {
 					showQuick.value = false
 					showQuick.value = false
@@ -340,7 +363,8 @@
 			curSelectedDeptId.value = userDeptsByTenantId.value[0].value
 			curSelectedDeptId.value = userDeptsByTenantId.value[0].value
 			let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 			let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 			store.curDeptDetails = curDept
 			store.curDeptDetails = curDept
-			if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey == 'sortingInspector')) {
+			if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
+					'sortingInspector')) {
 				showSizing.value = true
 				showSizing.value = true
 			} else {
 			} else {
 				showSizing.value = false
 				showSizing.value = false
@@ -408,6 +432,19 @@
 			})
 			})
 		}
 		}
 	}
 	}
+
+	function handleToNormalOutsource() {
+		if (curSelectedDeptId.value) {
+			uni.navigateTo({
+				url: '/pages/outsourceProductionPlan/index'
+			})
+		} else {
+			uni.showToast({
+				icon: "none",
+				title: "请选择工段"
+			})
+		}
+	}
 	//检查列表
 	//检查列表
 	function handleToInspectionDetails() {
 	function handleToInspectionDetails() {
 		if (curSelectedDeptId.value) {
 		if (curSelectedDeptId.value) {
@@ -610,6 +647,19 @@
 			url: '/pages/outsourcedReturnCheck/index'
 			url: '/pages/outsourcedReturnCheck/index'
 		})
 		})
 	}
 	}
+	//协助报工
+	function handleToAssistDaywork() {
+		if (curSelectedDeptId.value) {
+			uni.navigateTo({
+				url: '/pages/assistDaywork/index'
+			})
+		} else {
+			uni.showToast({
+				icon: "none",
+				title: "请选择工段"
+			})
+		}
+	}
 	// 
 	// 
 	function handleChangeTurnover() {
 	function handleChangeTurnover() {
 		if (curSelectedDeptId.value) {
 		if (curSelectedDeptId.value) {
@@ -697,32 +747,6 @@
 		let msg = "确认退出登录吗?"
 		let msg = "确认退出登录吗?"
 		confirm.value.open(msg);
 		confirm.value.open(msg);
 	}
 	}
-
-	function handleToNormalOutsource() {
-		if (curSelectedDeptId.value) {
-			uni.navigateTo({
-				url: '/pages/outsourceProductionPlan/index'
-			})
-		} else {
-			uni.showToast({
-				icon: "none",
-				title: "请选择工段"
-			})
-		}
-	}
-	// 分选
-	function handleToUnNormalOutsource() {
-		if (curSelectedDeptId.value) {
-			uni.navigateTo({
-				url: '/pages/sortInnerProductionPlan/index'
-			})
-		} else {
-			uni.showToast({
-				icon: "none",
-				title: "请选择工段"
-			})
-		}
-	}
 	/*
 	/*
 	// 绑定设备
 	// 绑定设备
 	function handleToEquiPmentList() {
 	function handleToEquiPmentList() {
@@ -743,21 +767,22 @@
 	function handleDeptChange() {
 	function handleDeptChange() {
 		let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 		let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 		store.curDeptDetails = curDept
 		store.curDeptDetails = curDept
-		if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey == 'sortingInspector')) {
+		if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
+				'sortingInspector')) {
 			showSizing.value = true
 			showSizing.value = true
 		} else {
 		} else {
 			showSizing.value = false
 			showSizing.value = false
 		}
 		}
-		if (curDept.isSortPackaging == 1) {
-			showSortOutsource.value = true
-		} else {
-			showSortOutsource.value = false
-		}
 		if (curDept.isOutsourcing == 1) {
 		if (curDept.isOutsourcing == 1) {
 			showOutsource.value = true
 			showOutsource.value = true
 		} else {
 		} else {
 			showOutsource.value = false
 			showOutsource.value = false
 		}
 		}
+		if (curDept.isSortPackaging == 1) {
+			showSortOutsource.value = true
+		} else {
+			showSortOutsource.value = false
+		}
 		console.log(store)
 		console.log(store)
 		handleSelectInnerTurnover()
 		handleSelectInnerTurnover()
 	}
 	}

+ 14 - 2
pages/index/index.vue

@@ -4,6 +4,7 @@
 			<image class="logo" src="../../static/images/logo.png" @click="handleShowGear" />
 			<image class="logo" src="../../static/images/logo.png" @click="handleShowGear" />
 			<uni-icons v-if="showGear > 4" class="icon-gear" type="gear-filled" size="60"
 			<uni-icons v-if="showGear > 4" class="icon-gear" type="gear-filled" size="60"
 				@click="toggle('top')"></uni-icons>
 				@click="toggle('top')"></uni-icons>
+			<view style="position: absolute; right: 12px;top: -4px;"><text>版本号:{{versionName}}</text></view>
 		</view>
 		</view>
 		<view class="title uni-row" v-if="loggedUsers.length > 0">
 		<view class="title uni-row" v-if="loggedUsers.length > 0">
 			<text>点击头像切换用户</text>
 			<text>点击头像切换用户</text>
@@ -111,12 +112,14 @@
 	const showWrite = ref(0)
 	const showWrite = ref(0)
 	const inputDialog = ref(null)
 	const inputDialog = ref(null)
 	const showInputDialog = ref(0)
 	const showInputDialog = ref(0)
+	const versionName = ref(null)
 
 
 	onLoad(() => {
 	onLoad(() => {
 		//uni.clearStorageSync();
 		//uni.clearStorageSync();
 		initBaseUrl();
 		initBaseUrl();
-		//getUser();
-		!useInnerUrl.value && setTimeout(doCheckUpdata, 500)
+		getCurrentVersion()
+			//getUser();
+			!useInnerUrl.value && setTimeout(doCheckUpdata, 500)
 		initPdfUrl();
 		initPdfUrl();
 	})
 	})
 
 
@@ -124,6 +127,15 @@
 
 
 	})
 	})
 
 
+	function getCurrentVersion() {
+		uni.getSystemInfo({
+			success: function(res) {
+				versionName.value = res.appVersion;
+			}
+		});
+		console.log(versionName.value)
+	}
+
 	function doCheckUpdata() {
 	function doCheckUpdata() {
 		checkUpdate().then(res => {
 		checkUpdate().then(res => {
 			updateFlag.value = res;
 			updateFlag.value = res;

+ 15 - 0
pages/inspectionDetails/index.vue

@@ -145,6 +145,21 @@
 
 
 				// 如果有新数据,将其添加到 listData
 				// 如果有新数据,将其添加到 listData
 				if (newRows.length > 0) {
 				if (newRows.length > 0) {
+					newRows.forEach(v => {
+						if (v.type === "deliveryInspection") {
+							v.inspectionType = "交检"
+						} else if (v.type === "firstArticleInspection") {
+							v.inspectionType = "首件检"
+						} else if (v.type === "patrolInspection") {
+							v.inspectionType = "巡检"
+						} else if (v.type === "outsourcedInspector") {
+							v.inspectionType = "外协检"
+						} else if (v.type === "factoryInspection") {
+							v.inspectionType = "出厂检"
+						} else {
+							v.inspectionType = "仪器室"
+						}
+					});
 					inspecionList.value = inspecionList.value.concat(newRows);
 					inspecionList.value = inspecionList.value.concat(newRows);
 					original.value = original.value.concat(newRows);
 					original.value = original.value.concat(newRows);
 				} else {
 				} else {

+ 201 - 198
pages/onSiteInspection/scan.vue

@@ -2,45 +2,44 @@
 	<view class="page-container uni-column">
 	<view class="page-container uni-column">
 		<view class="consultation-container uni-column">
 		<view class="consultation-container uni-column">
 			<view class="info-row uni-row">
 			<view class="info-row uni-row">
-					<view class="label">批次号</view>
-					<view class="value">{{ lot.lotCode }}</view>
-				</view>
-				<view class="info-row uni-row">
-					<view class="label">图号</view>
-					<view class="value">{{ lot.drawingNumber }}</view>
-				</view>
-				<view class="info-row uni-row">
-					<view class="label">工艺版本</view>
-					<view class="value">{{ lot.technologyVersion }}</view>
-				</view>
-				<view class="info-row uni-row">
-					<view class="label">产品描述</view>
-					<view class="value">{{ lot.productDescription }}</view>
-				</view>
-				<view class="info-row uni-row">
-					<view class="label">当前工序</view>
-					<view class="value">{{ lot.processAlias }}</view>
-				</view>
-				<view class="info-row uni-row">
-					<view class="label">当前工段</view>
-					<view class="value">{{ lot.deptName }}</view>
-				</view>
-				<view class="info-row uni-row" style="margin-top: 40rpx;">
-						<view class="label">操作者</view>
-						<view class="value">	
-						<uni-data-select v-model="userId" :localdata="userList"
-						:clear="false" @change="handleGetEquipmentList"
+				<view class="label">批次号</view>
+				<view class="value">{{ lot.lotCode }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">图号</view>
+				<view class="value">{{ lot.drawingNumber }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">工艺版本</view>
+				<view class="value">{{ lot.technologyVersion }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">产品描述</view>
+				<view class="value">{{ lot.productDescription }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">当前工序</view>
+				<view class="value">{{ lot.processAlias }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">当前工段</view>
+				<view class="value">{{ lot.deptName }}</view>
+			</view>
+			<view class="info-row uni-row" style="margin-top: 40rpx;">
+				<view class="label">操作者</view>
+				<view class="value">
+					<uni-data-select v-model="userId" :localdata="userList" :clear="false"
+						@change="handleGetEquipmentList"
 						style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
 						style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
 				</view>
 				</view>
-					</view>
-				<view class="info-row uni-row" style="margin-top: 40rpx;">
-					<view class="label">加工设备</view>
-					<view class="value">	
-					<uni-data-select v-model="equipment" :localdata="equipmentList"
-					:clear="false"
-					style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
 			</view>
 			</view>
+			<view class="info-row uni-row" style="margin-top: 40rpx;">
+				<view class="label">加工设备</view>
+				<view class="value">
+					<uni-data-select v-model="equipment" :localdata="equipmentList" :clear="false"
+						style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
 				</view>
 				</view>
+			</view>
 			<view class="info-row uni-row">
 			<view class="info-row uni-row">
 				<view class="label">所有箱号</view>
 				<view class="label">所有箱号</view>
 				<view class="value">{{ lot.allCarrierName }}</view>
 				<view class="value">{{ lot.allCarrierName }}</view>
@@ -58,7 +57,7 @@
 		</view>
 		</view>
 		<dialog-processInspection ref='selectProcessInspection'
 		<dialog-processInspection ref='selectProcessInspection'
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
-			<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -99,111 +98,111 @@
 	//H5扫码器回调
 	//H5扫码器回调
 	function onDecodeHandler(data) {
 	function onDecodeHandler(data) {
 		showQrCodeReader.value = false;
 		showQrCodeReader.value = false;
-	const result = {
-						carrierCode: data,
-						processCode: '',
-		               deptId : store.curDeptDetails.deptId
-					}
-					if (!result.carrierCode || result.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return
-					}
-					//判断该箱是否绑定批次
-
-					result.processCode = store.outsourcedCode;
-					// console.log(result.processCode)
-					/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
-					getCarrierInfo(result).then(response => {
-						if (response.code == 200) {
-							// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-							// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-						if (response.data.dayworkCarriers != null) {
-								if (response.data.dayworkCarriers.length > 1) {
-									query.value = result;
-									selectProcessInspection.value.open(response.data.dayworkCarriers)
-								} else {
-									// console.log(response)
-									uni.showLoading({
-										title: '加载中'
-									});
-									// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
-									// 需要定义一个请求方法, 从后端获取
-									result.deptId = store.curDeptDetails.deptId
-									getPatrolLotInfo(result).then(res => {
-										if (res.code == 200) {
-											console.log(res)
-											
-											if(res.data.dayworkItemList.length == 0) {
-												uni.showToast({
-													icon: 'none',
-													title: "该批次本日没有可进行巡检的报工",
-													duration: 2000
-												})
-											}else{
-												getUser(res.data.dayworkItemList)
-												getEquipment(res.data.dayworkItemList)	
-																lot.value = {
-																	...lot.value,
-																	...res.data
-																};	
-											lot.value.carrierCode = result.carrierCode
-											carrierCode.value = result.carrierCode;
-											// console.log("res", res);
-											uni.hideLoading();
-											// 判断是否批次号和检查箱码都扫完
-											checkSave()
-											}
-										} else {
-											uni.showToast({
-												icon: 'none',
-												title: res.msg,
-												duration: 2000
-											})
-										}
-									}).catch(err => {
-										uni.showToast({
-											icon: 'none',
-											title: err.message,
-											duration: 2000
-										})
+		const result = {
+			carrierCode: data,
+			processCode: '',
+			deptId: store.curDeptDetails.deptId
+		}
+		if (!result.carrierCode || result.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return
+		}
+		//判断该箱是否绑定批次
+
+		result.processCode = store.outsourcedCode;
+		// console.log(result.processCode)
+		/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
+		getCarrierInfo(result).then(response => {
+			if (response.code == 200) {
+				// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+				// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+				if (response.data.dayworkCarriers != null) {
+					if (response.data.dayworkCarriers.length > 1) {
+						query.value = result;
+						selectProcessInspection.value.open(response.data.dayworkCarriers)
+					} else {
+						// console.log(response)
+						uni.showLoading({
+							title: '加载中'
+						});
+						// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
+						// 需要定义一个请求方法, 从后端获取
+						result.deptId = store.curDeptDetails.deptId
+						getPatrolLotInfo(result).then(res => {
+							if (res.code == 200) {
+								console.log(res)
+
+								if (res.data.dayworkItemList.length == 0) {
+									uni.showToast({
+										icon: 'none',
+										title: "该批次本日没有可进行巡检的报工",
+										duration: 2000
 									})
 									})
-						
+								} else {
+									getUser(res.data.dayworkItemList)
+									getEquipment(res.data.dayworkItemList)
+									lot.value = {
+										...lot.value,
+										...res.data
+									};
+									lot.value.carrierCode = result.carrierCode
+									carrierCode.value = result.carrierCode;
+									// console.log("res", res);
+									uni.hideLoading();
+									// 判断是否批次号和检查箱码都扫完
+									checkSave()
 								}
 								}
-							} else if (response.data.inspectionCarrier != null) {
-								console.log(response)
-								lot.value.inspectionCarrierCode = response.data.inspectionCarrier.code
-								lot.value.inspectionCarrierId = response.data.inspectionCarrier.id
-								// 判断是否批次号和检查箱码都扫完
-								checkSave()
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+									duration: 2000
+								})
 							}
 							}
-						} else {
+						}).catch(err => {
 							uni.showToast({
 							uni.showToast({
 								icon: 'none',
 								icon: 'none',
-								title: response.msg,
+								title: err.message,
 								duration: 2000
 								duration: 2000
 							})
 							})
-						}
-					}).catch(err => {
-						uni.showToast({
-							icon: 'none',
-							title: err.message,
-							duration: 2000
 						})
 						})
-					})
+
+					}
+				} else if (response.data.inspectionCarrier != null) {
+					console.log(response)
+					lot.value.inspectionCarrierCode = response.data.inspectionCarrier.code
+					lot.value.inspectionCarrierId = response.data.inspectionCarrier.id
+					// 判断是否批次号和检查箱码都扫完
+					checkSave()
+				}
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		}).catch(err => {
+			uni.showToast({
+				icon: 'none',
+				title: err.message,
+				duration: 2000
+			})
+		})
 	}
 	}
-	
-	
+
+
 	//H5扫码器关闭
 	//H5扫码器关闭
 	function qrReaderClose() {
 	function qrReaderClose() {
 		showQrCodeReader.value = false;
 		showQrCodeReader.value = false;
 	}
 	}
 	const handleScanCode = () => {
 	const handleScanCode = () => {
 		showQrCodeReader.value = true;
 		showQrCodeReader.value = true;
-	// 引入原生插件
+		// 引入原生插件
 		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
 		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
 		// if (mpaasScanModule) {
 		// if (mpaasScanModule) {
 		// 	// 调用插件的 mpaasScan 方法
 		// 	// 调用插件的 mpaasScan 方法
@@ -253,7 +252,7 @@
 		// 							getPatrolLotInfo(result).then(res => {
 		// 							getPatrolLotInfo(result).then(res => {
 		// 								if (res.code == 200) {
 		// 								if (res.code == 200) {
 		// 									console.log(res)
 		// 									console.log(res)
-											
+
 		// 									if(res.data.dayworkItemList.length == 0) {
 		// 									if(res.data.dayworkItemList.length == 0) {
 		// 										uni.showToast({
 		// 										uni.showToast({
 		// 											icon: 'none',
 		// 											icon: 'none',
@@ -288,7 +287,7 @@
 		// 									duration: 2000
 		// 									duration: 2000
 		// 								})
 		// 								})
 		// 							})
 		// 							})
-						
+
 		// 						}
 		// 						}
 		// 					} else if (response.data.inspectionCarrier != null) {
 		// 					} else if (response.data.inspectionCarrier != null) {
 		// 						console.log(response)
 		// 						console.log(response)
@@ -327,20 +326,20 @@
 		// 					query.value = result;
 		// 					query.value = result;
 		// 					query.value.deptId = store.curDeptDetails.deptId
 		// 					query.value.deptId = store.curDeptDetails.deptId
 		// 					selectProcessInspection.value.open(response.data.dayworkCarriers)	
 		// 					selectProcessInspection.value.open(response.data.dayworkCarriers)	
-										
+
 		// 				} else {
 		// 				} else {
-		
+
 		// 					// console.log(response)
 		// 					// console.log(response)
 		// 					uni.showLoading({
 		// 					uni.showLoading({
 		// 						title: '加载中'
 		// 						title: '加载中'
 		// 					});
 		// 					});
 		// 					// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
 		// 					// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
 		// 					// 需要定义一个请求方法, 从后端获取
 		// 					// 需要定义一个请求方法, 从后端获取
-							
+
 		// 					getPatrolLotInfo(result).then(res => {
 		// 					getPatrolLotInfo(result).then(res => {
 		// 						if (res.code == 200) {
 		// 						if (res.code == 200) {
 		// 							console.log(res)
 		// 							console.log(res)
-									
+
 		// 							if(res.data.dayworkItemList.length == 0) {
 		// 							if(res.data.dayworkItemList.length == 0) {
 		// 								uni.showToast({
 		// 								uni.showToast({
 		// 									icon: 'none',
 		// 									icon: 'none',
@@ -402,8 +401,9 @@
 		// 		})
 		// 		})
 		// 	})
 		// 	})
 		// }
 		// }
-		
+
 	}
 	}
+
 	function checkSave() {
 	function checkSave() {
 		if (lot.value.lotCode == '' || lot.value.lotCode == null) {
 		if (lot.value.lotCode == '' || lot.value.lotCode == null) {
 			debounce(handleScanCode, 700)
 			debounce(handleScanCode, 700)
@@ -412,6 +412,7 @@
 			debounce(handleScanCode, 700)
 			debounce(handleScanCode, 700)
 		}
 		}
 	}
 	}
+
 	function handleGetEquipmentList() {
 	function handleGetEquipmentList() {
 		getEquipment(lot.value.dayworkItemList)
 		getEquipment(lot.value.dayworkItemList)
 	}
 	}
@@ -422,32 +423,33 @@
 		let filterList = data.filter(info => info.userId == userId.value)
 		let filterList = data.filter(info => info.userId == userId.value)
 		console.log(filterList)
 		console.log(filterList)
 		filterList.forEach(item => {
 		filterList.forEach(item => {
-		  // 检查 Map 中是否已经有这个 equimentDetailId
-		  if (!uniqueEquipmentMap.has(item.equipmentDetailId)) {
-		    // 如果没有,添加到 Map 中
-		    uniqueEquipmentMap.set(item.equipmentDetailId, {
-		      value: item.equipmentDetailId,
-		      text: item.equipmentDetailCode
-		    });
-		  }
+			// 检查 Map 中是否已经有这个 equimentDetailId
+			if (!uniqueEquipmentMap.has(item.equipmentDetailId)) {
+				// 如果没有,添加到 Map 中
+				uniqueEquipmentMap.set(item.equipmentDetailId, {
+					value: item.equipmentDetailId,
+					text: item.equipmentDetailCode
+				});
+			}
 		});
 		});
 		// 将 Map 的值转换为数组
 		// 将 Map 的值转换为数组
 		equipmentList.value = Array.from(uniqueEquipmentMap.values());
 		equipmentList.value = Array.from(uniqueEquipmentMap.values());
 		equipment.value = equipmentList.value[0].value
 		equipment.value = equipmentList.value[0].value
 	}
 	}
+
 	function getUser(data) {
 	function getUser(data) {
-		
+
 		const uniqueUserMap = new Map();
 		const uniqueUserMap = new Map();
 		console.log(data)
 		console.log(data)
 		data.forEach(item => {
 		data.forEach(item => {
-		  // 检查 Map 中是否已经有这个 equimentDetailId
-		  if (!uniqueUserMap.has(item.userId)) {
-		    // 如果没有,添加到 Map 中
-		    uniqueUserMap.set(item.userId, {
-		      value: item.userId,
-		      text: item.nickName
-		    });
-		  }
+			// 检查 Map 中是否已经有这个 equimentDetailId
+			if (!uniqueUserMap.has(item.userId)) {
+				// 如果没有,添加到 Map 中
+				uniqueUserMap.set(item.userId, {
+					value: item.userId,
+					text: item.nickName
+				});
+			}
 		});
 		});
 		console.log(uniqueUserMap)
 		console.log(uniqueUserMap)
 		// 将 Map 的值转换为数组
 		// 将 Map 的值转换为数组
@@ -462,81 +464,82 @@
 		uni.showLoading({
 		uni.showLoading({
 			title: '加载中'
 			title: '加载中'
 		});
 		});
-		
-	getLotInfo(query.value).then(res => {
-		if (res.code == 200) {
-			console.log(res)
-			
-			if(res.data.dayworkItemList.length == 0) {
+
+		getLotInfo(query.value).then(res => {
+			if (res.code == 200) {
+				console.log(res)
+
+				if (res.data.dayworkItemList.length == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "该批次当天没有报工",
+						duration: 2000
+					})
+				} else {
+					console.log("888")
+					getUser(res.data.dayworkItemList)
+					getEquipment(res.data.dayworkItemList)
+					lot.value = {
+						...lot.value,
+						...res.data
+					};
+					lot.value.carrierCode = query.value.carrierCode
+					carrierCode.value = query.value.carrierCode;
+					// console.log("res", res);
+					uni.hideLoading();
+					// 判断是否批次号和检查箱码都扫完
+					checkSave()
+				}
+			} else {
 				uni.showToast({
 				uni.showToast({
 					icon: 'none',
 					icon: 'none',
-					title: "该批次当天没有报工",
+					title: res.msg,
 					duration: 2000
 					duration: 2000
 				})
 				})
-			}else{
-				console.log("888")
-				getUser(res.data.dayworkItemList)
-				getEquipment(res.data.dayworkItemList)	
-								lot.value = {
-									...lot.value,
-									...res.data
-								};	
-			lot.value.carrierCode = query.value.carrierCode
-			carrierCode.value = query.value.carrierCode;
-			// console.log("res", res);
-			uni.hideLoading();
-			// 判断是否批次号和检查箱码都扫完
-			checkSave()
 			}
 			}
-		} else {
+		}).catch(err => {
 			uni.showToast({
 			uni.showToast({
 				icon: 'none',
 				icon: 'none',
-				title: res.msg,
+				title: err.message,
 				duration: 2000
 				duration: 2000
 			})
 			})
-		}
-	}).catch(err => {
-		uni.showToast({
-			icon: 'none',
-			title: err.message,
-			duration: 2000
 		})
 		})
-	})
 	}
 	}
 
 
 	//确定后,将批次id,批次号,传递过去
 	//确定后,将批次id,批次号,传递过去
 	const handleConfirm = () => {
 	const handleConfirm = () => {
 		console.log(lot.value)
 		console.log(lot.value)
-		if(lot.value.allCarrierName !=undefined && lot.value.inspectionCarrierId !=undefined){
+		if (lot.value.allCarrierName != undefined && lot.value.inspectionCarrierId != undefined) {
 			lot.value.equipmentDetailId = equipment.value
 			lot.value.equipmentDetailId = equipment.value
-			lot.value.equipmentDetailCode = equipmentList.value[equipmentList.value.findIndex(item =>item.value == equipment.value)].text
+			lot.value.equipmentDetailCode = equipmentList.value[equipmentList.value.findIndex(item => item.value ==
+				equipment.value)].text
 			lot.value.userId = userId.value
 			lot.value.userId = userId.value
-			lot.value.nickName = userList.value[userList.value.findIndex(item =>item.value == userId.value)].text
+			lot.value.nickName = userList.value[userList.value.findIndex(item => item.value == userId.value)].text
 			store.processInspection = null
 			store.processInspection = null
 			uni.navigateTo({
 			uni.navigateTo({
-						url: "/pages/onSiteInspection/form",
-						success: (res) => {
-							// 通过eventChannel向被打开页面传送数据
-							res.eventChannel.emit("onSiteInspectionFrom", {
-								data: lot.value
-							})
-						}
+				url: "/pages/onSiteInspection/form",
+				success: (res) => {
+					// 通过eventChannel向被打开页面传送数据
+					res.eventChannel.emit("onSiteInspectionFrom", {
+						data: lot.value
 					})
 					})
-		} else {
-			if(lot.value.allCarrierName == undefined){
-			uni.showToast({
-				icon: 'none',
-				title: "请扫描箱码",
-				duration: 2000
+				}
 			})
 			})
-			}else if(lot.value.allCarrierName != undefined && lot.value.inspectionCarrierId == undefined) {
+		} else {
+			if (lot.value.allCarrierName == undefined) {
+				uni.showToast({
+					icon: 'none',
+					title: "请扫描箱码",
+					duration: 2000
+				})
+			} else if (lot.value.allCarrierName != undefined && lot.value.inspectionCarrierId == undefined) {
 				uni.showToast({
 				uni.showToast({
 					icon: 'none',
 					icon: 'none',
 					title: "请扫描检测载具",
 					title: "请扫描检测载具",
 					duration: 2000
 					duration: 2000
 				})
 				})
 			}
 			}
-		
+
 			return;
 			return;
 		}
 		}
 
 

+ 27 - 13
pages/outsourcedInspection/form.vue

@@ -1,4 +1,5 @@
 <template>
 <template>
+	<view class="mask" v-if="isLoading"></view>
 	<view class="page-container uni-column">
 	<view class="page-container uni-column">
 		<view class="carrier-info uni-column">
 		<view class="carrier-info uni-column">
 			<view class="carrier-code uni-row">
 			<view class="carrier-code uni-row">
@@ -254,6 +255,7 @@
 	const flag = ref(false)
 	const flag = ref(false)
 	const showTransfer = ref(true)
 	const showTransfer = ref(true)
 	const navigateOnce = ref(0)
 	const navigateOnce = ref(0)
+	const isLoading = ref(false);
 	const processInspecion = ref({
 	const processInspecion = ref({
 		remark: "",
 		remark: "",
 		rejectNum: 0,
 		rejectNum: 0,
@@ -698,19 +700,6 @@
 
 
 
 
 	function save() {
 	function save() {
-		const currentTime = Date.now();
-
-		// 检查是否已经过去了 2 秒
-		if (currentTime - lastRequestTimestamp.value < 2000) {
-			// 如果在 2 秒 内已经点击,那么不执行
-			uni.showToast({
-				icon: 'none',
-				title: `请勿重复点击`,
-				duration: 2000
-			})
-			return;
-		}
-		lastRequestTimestamp.value = currentTime;
 		let pages = getCurrentPages();
 		let pages = getCurrentPages();
 		processInspecion.value.dayworkItemConsults = consultations.value;
 		processInspecion.value.dayworkItemConsults = consultations.value;
 		processInspecion.value.dayworkItemRejects = unfitInfos.value;
 		processInspecion.value.dayworkItemRejects = unfitInfos.value;
@@ -722,7 +711,14 @@
 			selectInspectionChamber.value.open()
 			selectInspectionChamber.value.open()
 			console.log(processInspecion.value)
 			console.log(processInspecion.value)
 		} else {
 		} else {
+			isLoading.value = true; // 显示遮罩层
+
+			uni.showLoading({
+				title: '加载中'
+			});
 			saveOutsourceInspectionWithRelate(processInspecion.value).then(res => {
 			saveOutsourceInspectionWithRelate(processInspecion.value).then(res => {
+				isLoading.value = false;
+				uni.hideLoading();
 				if (res.code == 200) {
 				if (res.code == 200) {
 					// let index = 0;
 					// let index = 0;
 
 
@@ -1270,4 +1266,22 @@
 	.zb-table .item-tr .item-td {
 	.zb-table .item-tr .item-td {
 		overflow-x: auto;
 		overflow-x: auto;
 	}
 	}
+
+	.mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		z-index: 2000;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.mask .loading-text {
+		color: #fff;
+		font-size: 36rpx;
+	}
 </style>
 </style>

+ 10 - 2
pages/sortBatchInnerReporting/index.vue

@@ -1,4 +1,6 @@
 <template>
 <template>
+	<view v-if="isMaskShow" class="mask">
+	</view>
 	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: fixed;left: 0;right: 0;">
 	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: fixed;left: 0;right: 0;">
 		<view class="box-bg uni-row">
 		<view class="box-bg uni-row">
 			<view class="input-view uni-row">
 			<view class="input-view uni-row">
@@ -630,6 +632,10 @@
 	}
 	}
 
 
 	function handleAddDaywork(data) {
 	function handleAddDaywork(data) {
+		isMaskShow.value = true; // 显示遮罩层
+		uni.showLoading({
+			title: '加载中'
+		});
 		console.log(data)
 		console.log(data)
 		let reqParam = [];
 		let reqParam = [];
 		for (var i = 0; i < data.length; i++) {
 		for (var i = 0; i < data.length; i++) {
@@ -637,10 +643,12 @@
 		}
 		}
 		console.log(data)
 		console.log(data)
 		data.forEach(item => {
 		data.forEach(item => {
-			item.isSort = 1,
-				item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
+			item.isSort = 1
+			item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
 		})
 		})
 		showDayworkSaveInner(data).then(res => {
 		showDayworkSaveInner(data).then(res => {
+			isMaskShow.value = false;
+			uni.hideLoading();
 			if (res.code == 200) {
 			if (res.code == 200) {
 				console.log(res)
 				console.log(res)
 				init(store.planDetails.id);
 				init(store.planDetails.id);

+ 10 - 2
pages/sortBatchReporting/index.vue

@@ -1,4 +1,5 @@
 <template>
 <template>
+	<view class="mask" v-if="isLoading"></view>
 	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: fixed;left: 0;right: 0;">
 	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: fixed;left: 0;right: 0;">
 		<view class="box-bg uni-row">
 		<view class="box-bg uni-row">
 			<view class="input-view uni-row">
 			<view class="input-view uni-row">
@@ -808,6 +809,11 @@
 	// }
 	// }
 
 
 	function handleAddDaywork(data) {
 	function handleAddDaywork(data) {
+		isLoading.value = true; // 显示遮罩层
+
+		uni.showLoading({
+			title: '加载中'
+		})
 		console.log(data)
 		console.log(data)
 		let reqParam = [];
 		let reqParam = [];
 		for (var i = 0; i < data.length; i++) {
 		for (var i = 0; i < data.length; i++) {
@@ -815,10 +821,12 @@
 		}
 		}
 		console.log(data)
 		console.log(data)
 		data.forEach(item => {
 		data.forEach(item => {
-			item.isSort = 1,
-				item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
+			item.isSort = 1
+			item.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId
 		})
 		})
 		showDayworkSave(data).then(res => {
 		showDayworkSave(data).then(res => {
+			isLoading.value = false;
+			uni.hideLoading();
 			if (res.code == 200) {
 			if (res.code == 200) {
 				console.log(res)
 				console.log(res)
 				init(store.planDetails.id);
 				init(store.planDetails.id);

+ 8 - 3
pages/sortProductionPlan/index.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-	<view class="uni-column" style="padding: 24rpx;position: fixed;left: 0;right: 0;height: 100%;">
+	<view class="uni-column" style="position: absolute;left: 12px;right: 12px;height: 100%;">
 		<view class="box-bg uni-row" style="height: 6%;">
 		<view class="box-bg uni-row" style="height: 6%;">
 			<view class="input-view uni-row">
 			<view class="input-view uni-row">
 				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
 				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
@@ -7,8 +7,13 @@
 			</view>
 			</view>
 			<view class="search" @click="handleSearch">搜索</view>
 			<view class="search" @click="handleSearch">搜索</view>
 		</view>
 		</view>
-		<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
-			<text>暂无生产计划</text>
+		<view v-if="listData.length == 0" style="color: #999;margin: 100% auto;
+		height: 100%;
+		position: relative;
+		bottom: 0;
+		left: 0;
+		right: 0;">
+			<text>暂无批次</text>
 		</view>
 		</view>
 		<view v-else style="height: 76%; overflow: auto;">
 		<view v-else style="height: 76%; overflow: auto;">
 			<view v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)"
 			<view v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)"