Răsfoiți Sursa

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_app

ezhizao_zx 9 luni în urmă
părinte
comite
e1087c8ad0
4 a modificat fișierele cu 925 adăugiri și 26 ștergeri
  1. 37 0
      pages.json
  2. 45 26
      pages/dashboard/index.vue
  3. 530 0
      pages/inspectionDetails/form.vue
  4. 313 0
      pages/inspectionDetails/index.vue

+ 37 - 0
pages.json

@@ -372,6 +372,43 @@
 			"style": {
 				"navigationBarTitleText": "检测信息"
 			}
+		},
+		{
+			"path": "pages/factoryInspection/consultation",
+			"style": {
+				"navigationBarTitleText": "咨询",
+				"cache": false
+			}
+		},
+		{
+			"path": "pages/factoryInspection/index",
+			"style": {
+				"navigationBarTitleText": "出厂检"
+			}
+		},
+		{
+			"path": "pages/factoryInspection/form",
+			"style": {
+				"navigationBarTitleText": "出厂检"
+			}
+		},
+		{
+			"path": "pages/factoryInspection/scan",
+			"style": {
+				"navigationBarTitleText": "出厂检"
+			}
+		},
+		{
+			"path": "pages/inspectionDetails/form",
+			"style": {
+				"navigationBarTitleText": "检查详情"
+			}
+		},
+		{
+			"path": "pages/inspectionDetails/index",
+			"style": {
+				"navigationBarTitleText": "检查列表"
+			}
 		}
 	],
 	"globalStyle": {

+ 45 - 26
pages/dashboard/index.vue

@@ -51,10 +51,13 @@
 		<!-- 		<view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
 			<text class="label">序检</text>
 		</view> -->
-		<view class="business-btn uni-row" @click="handleToInspectionDetails">
+		<view class="business-btn uni-row"  @click="handleToInspectionReceive">
+			<text class="label">检测领取</text>
+		</view>
+		<view class="business-btn uni-row"  @click="handleToInspectionDetails">
 			<text class="label">检查列表</text>
 		</view>
-		<view class="business-btn uni-row" v-if="showOutsourcedInspector" @click="handleToOutsourcedInspection">
+<!-- 		<view class="business-btn uni-row" v-if="showOutsourcedInspector" @click="handleToOutsourcedInspection">
 			<text class="label">外协检查</text>
 		</view>
 		<!-- 		<view class="business-btn uni-row" v-if="showDeliveryInspection" @click="handleToDeliveryInspection">
@@ -335,6 +338,19 @@
 			})
 		}
 	}
+	//检查列表
+	function handleToInspectionDetails() {
+		if (curSelectedDeptId.value) {
+			uni.navigateTo({
+				url: '/pages/inspectionDetails/index'
+			})
+		} else {
+			uni.showToast({
+				icon: "none",
+				title: "请选择工段"
+			})
+		}
+	}
 	//盘点
 	function handleToTakeStock() {
 		if (curSelectedDeptId.value) {
@@ -377,8 +393,8 @@
 	}
 
 	//检查列表
-	function handleToInspectionDetails() {
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+	function handleToInspectionReceive() {
+	  const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
 		if (mpaasScanModule) {
 			// 调用插件的 mpaasScan 方法
 			mpaasScanModule.mpaasScan({
@@ -425,28 +441,29 @@
 				}
 			);
 		} else {
+			
 			// 测试时用
-			checkCarrier({
-				carrierCode: "300088",
-			}).then(response => {
-				if (response.code == 200) {
-					uni.navigateTo({
-						url: "/pages/processInspectionReceive/form",
-						success: (res) => {
-							// 通过eventChannel向被打开页面传送数据
-							res.eventChannel.emit("inspecionCarrierCode", {
-								carrierCode: "300088"
-							})
-						}
-					})
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg,
-						duration: 2000
-					})
-				}
-			})
+		checkCarrier({
+			carrierCode: "300086",
+		}).then(response => {
+			if (response.code == 200) {
+				uni.navigateTo({
+							url: "/pages/processInspectionReceive/form",
+							success: (res) => {
+								// 通过eventChannel向被打开页面传送数据
+								res.eventChannel.emit("inspecionCarrierCode", {
+									carrierCode: "300086"
+								})
+							}
+						})
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		})
 		}
 	}
 
@@ -559,7 +576,9 @@
 	}
 	//出厂检
 	function handleToFactoryInspection() {
-
+		uni.navigateTo({
+			url: '/pages/onSiteInspection/index'
+		})
 	}
 
 	function logout() {

+ 530 - 0
pages/inspectionDetails/form.vue

@@ -0,0 +1,530 @@
+<template>
+	<view class="page-container uni-column">
+		<view class="carrier-info uni-column">
+			<view class="carrier-code uni-row">
+				<text>箱号</text>
+				<text style="margin-left: 24rpx;">{{processInspecion.lot.allCarrierName}}</text>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">图号</view>
+				<view class="value">{{ processInspecion.lot.drawingNumber }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">批次号</view>
+				<view class="value">{{ processInspecion.lot.lotCode }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">工艺版本</view>
+				<view class="value">{{ processInspecion.lot.technologyVersion }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">产品描述</view>
+				<view class="value">{{processInspecion.lot. productDescription }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">当前工序</view>
+				<view class="value">{{ processInspecion.lot.processAlias }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">操作者</view>
+				<view class="value">{{ processInspecion.lot.nickName }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">设备</view>
+				<view class="value">{{ processInspecion.lot.equipmentDetailCode }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">检查载具</view>
+				<view class="value">{{ processInspecion.lot.inspectionCarrierCode }}
+					{{ processInspecion.isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
+				</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="drawing-btn" @click="handleDrawingMenu">图纸信息</view>
+			</view>
+		</view>
+
+		<!-- 废品信息 -->
+		<view class="title unfit-title uni-row">
+			<text>检查信息</text>
+		</view>
+		<view class="unfit-container">
+			<view class="unfit-item-container uni-column" v-for="(item, index) in unfitInfos" :key="index">
+			<view class="resu uni-row">
+				<view class="label">检查标准</view>
+				<view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
+			</view>
+			<view class="resu uni-row">
+				<view class="label">检查结果</view>
+				<input v-if="editable()" :disabled="true" v-model="item.checkResult"  maxlength="50" />
+				<view v-else class="value">{{ item.checkResult }}</view>
+			</view>
+			<view class="resu uni-row">
+				<view class="label">超差范围</view>
+				<input v-if="editable()" :disabled="true" v-model="item.exceedLimits"  maxlength="50" />
+				<view v-else class="value">{{ item.exceedLimits }}</view>
+			</view>
+			<view class="resu uni-row">
+				<view :class="!editable() ? 'label' : ''">检查量</view>
+				<input v-if="editable()" :disabled="true" class="number" type="number" 
+					v-model="item.examiningNum"  />
+				<view v-else class="number value">{{ item.examiningNum }}</view>
+				<view :class="!editable() ? 'label' : ''">不良品量</view>
+				<input v-if="editable()" :disabled="true" class="number" type="number" 
+					v-model="item.disqualificationNum"  />
+				<view v-else class="value">{{ item.disqualificationNum }}</view>
+			</view>
+			</view>
+		</view>
+
+		<!-- 咨询部分 -->
+		<view class="title unfit-title uni-row">
+			<text>咨询</text>
+		</view>
+		<view class="consultation-container uni-column">
+			<view class="consultation-item-container" v-for="(item, index) in consultations" :key="index">
+				<view class="question uni-column">
+					<view class="label uni-row">
+						<text>问题描述</text>
+						<text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}} {{ selectText(item) }}</text>
+					</view>
+					<view class="content">{{ item.content }}</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 报工部分 -->
+		<view class="daywork-container">
+			<view class="result uni-row">
+				<view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">检查状态</view>
+				<uni-data-checkbox disabled="true" style="margin-top: 20rpx;" v-model="processInspecion.status"
+					:localdata="range"></uni-data-checkbox>
+			</view>
+			<view class="remark uni-row">
+				<view class="label">备注</view>
+				<textarea disabled="true"  v-model="processInspecion.remark" />
+			</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		ref,
+		onMounted,
+		getCurrentInstance
+
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		store
+	} from '@/store/index.js'
+	import {
+		updateAdoptStatus,
+		selectInspecion
+	} from '@/api/business/processInspection.js'
+	import {
+		getInspectionStandardsList
+	} from '@/api/business/inspectionStandards.js'
+	const lot = ref({})
+	const isEventTriggered = ref(false); // 创建一个标志位
+	const unfitInfos = ref([]) //废品信息
+	const consultations = ref([]) //咨询信息
+	const flag = ref(false)
+	// 创建一个引用来存储最后一次请求的时间戳
+	const lastRequestTimestamp = ref(0);
+	const processInspecion = ref({
+		remark: "",
+		rejectNum: 0,
+		examiningNum: 0,
+		status: 0,
+	})
+	const initStatus = ref(0)
+	const editable = () => {
+		return true
+	}
+
+	const consul = [{
+		value: 0,
+		text: "待确认",
+		type: "color: #fcab53"
+	}, {
+		value: 2,
+		text: "合格",
+		type: "color: #55ff7f"
+	}, {
+		value: 1,
+		text: "不合格",
+		type: "color: #ff0c2c"
+	}]
+
+	const range = [{
+		value: 0,
+		text: "待确认",
+		type: "color: #fcab53"
+	}, {
+		value: 1,
+		text: "合格",
+		type: "color: #55ff7f"
+	}, {
+		value: 2,
+		text: "不合格",
+		type: "color: #ff0c2c"
+	}]
+
+	/***************************** 页面生命周期函数 *****************************/
+
+
+	onShow(() => {
+		console.log(store.processInspection)
+		console.log(flag.value)
+			uni.showLoading({
+				title: '加载中'
+			});
+			processInspecion.value = store.processInspection
+			selectInspecion(processInspecion.value).then(res => { 
+				if (res.code == 200) {
+					processInspecion.value = res.data;
+					unfitInfos.value = res.data.processInspectionDetails;
+					initStatus.value = res.data.status
+					consultations.value = res.data.dayworkItemConsults;
+					console.log("res", res);
+					console.log(processInspecion.value)
+					uni.hideLoading();
+					// getInspecion();
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: res.msg,
+						duration: 2000
+					})
+				}
+			});
+	})
+	function getOringicalList() {
+		console.log(processInspecion.value)
+			//查询该产品,当前工序,当前检查绑定的检查
+				getInspectionStandardsList({
+					productId:processInspecion.value.lot.productId,
+					processId:processInspecion.value.lot.processId,
+					inspectionCode:"deliveryInspection"
+					}).then(res =>{
+						unfitInfos.value = res.rows.map(item => {
+						    // 映射新的数组,包含 inspectionStandardsId 和 checkStandard 属性
+						    return {
+						      inspectionStandardsId: item.id, // 从 item 中获取 id
+						      checkStandard: item.standard // 从 item 中获取 standard
+						    };
+						  });
+			})
+	}
+
+	/***************************** 定义了一些方法 *****************************/
+	//咨询文本
+	function selectText(item) {
+		for (var i = 0; i < consul.length; i++) {
+			if (item.status == consul[i].value) {
+				return consul[i].text
+			}
+		}
+	} 
+	function handleDrawingMenu(){
+		  // 对 technologicalProcessDetailId 进行URL编码
+		  var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
+		  var enTechnologicalProcessId = encodeURIComponent(processInspecion.value.lot.technologicalProcessId);
+		  var enprocessCode = encodeURIComponent(processInspecion.value.lot.processCode);
+		  var encodeCode = encodeURIComponent(processInspecion.value.lot.lotCode);
+		  var enProcessAlias = encodeURIComponent(processInspecion.value.lot.processAlias);
+		  // 构建查询参数字符串
+		  var queryParam = `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
+		
+		  // 使用模板字符串构建完整的URL
+		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
+		
+		  // 导航到指定页面
+		  uni.navigateTo({
+			url: navigateUrl
+		  });
+	}
+
+	//查询咨询列表
+	function getInspecion() {
+
+		processInspecion.value = store.processInspection
+		selectInspecion(processInspecion.value).then(res => {
+			console.log("咨询", res);
+			if (res.code == 200) {
+				console.log("res", res);
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: res.msg,
+					duration: 2000
+				})
+			}
+		});
+	}
+	//咨询样式
+	function selectType(item) {
+		for (var i = 0; i < consul.length; i++) {
+			if (item.status == consul[i].value) {
+				return consul[i].type
+			}
+		}
+	}
+
+
+
+
+</script>
+
+<style lang="scss">
+	.page-container {
+		// height: 100%;
+		background-color: #ececec;
+		font-size: 28rpx;
+
+		>.title {
+			font-weight: 700;
+			margin: 24rpx 16rpx;
+		}
+	}
+
+	.carrier-info {
+		margin: 32rpx 16rpx 0 16rpx;
+		padding: 24rpx;
+		background-color: #ffffff;
+		border-radius: 8rpx;
+
+		.carrier-code {
+			font-size: 32rpx;
+			font-weight: 700;
+		}
+
+		.info-row {
+			margin-top: 16rpx;
+			color: #767676;
+
+			.label {
+				width: 160rpx;
+			}
+			.drawing-btn {
+				padding: 12rpx 32rpx;
+				background-color: #0055ff;
+				color: #ffffff;
+				border-radius: 12rpx;
+				margin-left: auto;
+				font-size: 28rpx;
+			}
+
+			.value {
+				flex: 1;
+
+				textarea {
+					flex: 1;
+					border: 1px solid #888888;
+					box-sizing: border-box;
+					padding: 16rpx;
+				}
+			}
+		}
+	}
+
+	.unfit-title {
+		margin-bottom: 24rpx;
+		justify-content: space-between;
+		align-items: center;
+
+		text {
+			font-size: 28rpx;
+			font-weight: 700;
+		}
+
+		.add-btn {
+			padding: 12rpx 32rpx;
+			background-color: #a4adb3;
+			color: #ffffff;
+			border-radius: 12rpx;
+			font-size: 24rpx;
+		}
+	}
+
+	.unfit-container {
+		padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;
+
+		.unfit-item-container {
+			position: relative;
+
+			>* {
+				margin-bottom: 24rpx;
+			}
+
+			.title {
+				font-weight: 700;
+				justify-content: space-between;
+				align-items: center;
+
+				image {
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+
+			.standard {}
+
+			.resu {
+				width: 100%;
+				align-items: center;
+
+				input {
+					margin-left: 20rpx;
+					width: 200rpx;
+					height: 56rpx;
+					flex: 1;
+					border: 1px solid #9f9f9f;
+					font-size: 28rpx;
+				}
+			}
+
+			.result {
+				align-items: center;
+				border-bottom: 1px solid #9f9f9f;
+				padding-bottom: 32rpx;
+
+				.label {
+					flex: 1;
+				}
+
+				input {
+					width: 280rpx;
+					height: 56rpx;
+					border: 1px solid #9f9f9f;
+					font-size: 28rpx;
+
+					&.number {
+						width: 104rpx;
+						text-align: center;
+					}
+				}
+			}
+		}
+
+		.unfit-item-container:last-child {
+			.result {
+				border-bottom: none;
+				padding-bottom: 0;
+			}
+		}
+	}
+
+	.consultation-container {
+		margin: 0 16rpx;
+		padding: 24rpx;
+		background-color: #ffffff;
+		border-radius: 8rpx;
+
+		.consultation-item-container {
+			margin-bottom: 24rpx;
+			border-bottom: 2px solid #888888;
+			padding-bottom: 24rpx;
+		}
+
+		.consultation-item-container:last-child {
+			margin-bottom: 0;
+			border-bottom: 0;
+			padding-bottom: 0;
+		}
+
+		.question,
+		.answer {
+			.label {
+				justify-content: space-between;
+				margin-bottom: 16rpx;
+				font-weight: 700;
+			}
+
+			.content {
+				line-height: 40rpx;
+			}
+		}
+
+		.answer {
+			margin-top: 24rpx;
+		}
+	}
+
+	.daywork-container {
+		margin-top: 24rpx;
+		padding: 24rpx;
+		background-color: #ffffff;
+		border: 1px solid #bcbcbc;
+
+		.result {
+			align-items: center;
+
+			.label {
+				width: 112rpx;
+			}
+
+			input {
+				flex: 1;
+				height: 56rpx;
+				border: 1px solid #9f9f9f;
+				font-size: 28rpx;
+				text-align: center;
+			}
+		}
+
+		.remark {
+			margin-top: 24rpx;
+
+			.label {
+				width: 112rpx;
+			}
+
+			textarea {
+				flex: 1;
+				border: 1px solid #9f9f9f;
+				height: 168rpx;
+			}
+		}
+
+		.btns-container {
+			margin-top: 24rpx;
+
+			.finished-btn {
+				display: flex;
+				flex: 1;
+				height: 80rpx;
+				background-color: #fc6565;
+				color: #ffffff;
+				text-align: center;
+				justify-content: center;
+				align-items: center;
+				border-radius: 8rpx;
+			}
+
+			.question-btn {
+				width: 80rpx;
+				align-items: flex-end;
+
+				image {
+					width: 48rpx;
+					height: 48rpx;
+				}
+
+				text {
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+</style>

+ 313 - 0
pages/inspectionDetails/index.vue

@@ -0,0 +1,313 @@
+<template>
+	<view class="page-container uni-column">
+		<view class="search-container uni-row">
+			<input type="text" v-model="quer.keyword" placeholder="请输入关键字" />
+			<view class="btn uni-row" @click="getList">搜索</view>
+			<!-- <uni-icons type="scan" size="24" /> -->
+		</view>
+
+		<view class="time-controls" style="margin-top: 10rpx;">
+			<uni-section title="检查日期:" type="square" class="uni-row sta">
+				<input v-model="startTime" type="date" @input="timeSizer" />
+			</uni-section>
+		</view>
+		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
+			@click="handleSelection(item)">
+			<view class="lot-code uni-row">
+				<text>批次号:{{ item.lotCode }}</text>
+				<text style="margin-left: 16rpx;color: #55ff7f;">{{ item.inspectionType }}</text>
+				<text :style="selectType(item)">{{ selectText(item) }}</text>
+				<text  class="fa fa-trash" style="font-size: 16; color: white;"></text>
+			</view>
+			<view class="info">
+				<view class="info-row uni-row">
+					<view class="label">检查箱号:</view>
+					<view class="value">{{ item.carrierCode }}</view>
+					<view class="label">检察员:</view>
+					<view class="value">{{ item.technicianName }}</view>
+				</view>
+				<view class="info-row uni-row">
+					<view class="label">检查数量:</view>
+					<view class="value">{{ item.examiningNum }}</view>
+					<view class="label">不良品量:</view>
+					<view class="value">{{ item.disqualificationNum }}</view>
+				</view>
+				<view class="info-row uni-row">
+					<view class="label">产品描述:</view>
+					<view class="value">{{ item.productDescription }}</view>
+				</view>
+				<view class="info-row uni-row">
+					<view class="label">检测载具:</view>
+					<view class="value">{{ item.inspectionCarrierCode }}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+	import {
+		getProcessInspecionList,
+		updateAdoptStatus
+	} from '@/api/business/processInspection.js'
+	import {
+		timestampToTime,
+		toHHmmss
+	} from '@/utils/common.js'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		store
+	} from '@/store/index.js'
+	const keyword = ref('')
+	const inspecionList = ref([]); //时间后筛选数组
+	const original = ref([]); //原始数组
+	const startTime = ref(new Date().toISOString().split("T")[0])
+
+	const range = [{
+		value: 0,
+		text: "待确认",
+		type: "color: #fcab53"
+	}, {
+		value: 1,
+		text: "合格",
+		type: "color: #55ff7f"
+	}, {
+		value: 2,
+		text: "不合格",
+		type: "color: #ff0c2c"
+	}]
+
+	const quer = ref({}) //用于查询
+
+
+	/***************************** 页面生命周期函数 *****************************/
+	onShow(() => {
+		getList()
+		// uni.showLoading({
+		// 	title: '加载中'
+		// });
+		// quer.value.userId = store.userInfo.userId;
+		// quer.value.startTime = startTime.value;
+		// getProcessInspecionList(quer.value).then(res => {
+		// 	console.log("res", res);
+		// 	if (res.code == 200) {
+		// 		original.value = res.rows;
+		// 		// timeSizer();
+		// 		uni.hideLoading();
+		// 		// uni.hideLoading();
+		// 	}
+		// });
+	})
+
+	/***************************** 定义了一些方法 *****************************/
+
+	function getList() {
+		uni.showLoading({
+			title: '加载中'
+		});
+		quer.value.startTime = startTime.value;
+		quer.value.deptId = store.curDeptDetails.deptId
+		quer.value.userId = store.userInfo.userId
+		getProcessInspecionList(quer.value).then(res => {
+			console.log("res", res);
+			if (res.code == 200) {
+				res.rows.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 = res.rows;
+				uni.hideLoading();
+			}
+		});
+	}
+
+	//时间筛选,暂时注释,使用搜索向
+	function timeSizer() {}
+
+	// 筛选函数
+	const filterSameDayItems = (inspectionList, startTime) => {
+
+		// 使用filter方法筛选出与startTime同一天的元素
+		const filteredList = inspectionList.filter(item => {
+			// 将数组中每个元素的date属性转换为不包含时分秒的字符串
+			const itemDateString = item.createTime.split(' ')[0];
+			// 比较两个日期字符串是否相同
+			return itemDateString === startTime;
+		});
+		return filteredList;
+	};
+
+
+	function isSameDate(date1, date2) {
+		// 使用Date对象的toISOString()方法来格式化日期,并去除时分秒部分
+		const formatDate = (date) => date.toISOString().split('T')[0];
+
+		// 比较两个日期的年月日部分是否相同
+		return formatDate(date1) === formatDate(date2);
+	}
+
+	//查看序捡详情
+	function handleSelection(item) {
+		store.processInspection = item;
+		uni.navigateTo({
+			url: '/pages/inspectionDetails/form'
+		})
+	}
+
+	//状态文本
+	function selectText(item) {
+		for (var i = 0; i < range.length; i++) {
+			if (item.status == range[i].value) {
+				return range[i].text
+			}
+		}
+	}
+
+	//状态样式
+	function selectType(item) {
+		for (var i = 0; i < range.length; i++) {
+			if (item.status == range[i].value) {
+				return range[i].type
+			}
+		}
+	}
+
+	/***************************** 定义了一些事件 *****************************/
+</script>
+
+<style lang="scss">
+	.time-controls {
+		.title {
+			margin: 20% auto 40% auto;
+
+			.first {
+				font-size: 48rpx;
+				margin: 0 auto;
+			}
+
+			.second {
+				color: red;
+				font-size: 24rpx;
+				margin: 10rpx auto 0 auto;
+			}
+		}
+
+		.sta {
+			justify-content: center;
+			align-items: center;
+
+			input {
+				border: 1rpx solid gray;
+				border-radius: 8rpx;
+				width: 400rpx;
+				height: 64rpx;
+			}
+		}
+
+		button {
+			width: 78%;
+			background-color: #1684fc;
+			color: white;
+			margin: 0 auto;
+		}
+	}
+
+	.page-container {
+		height: 100%;
+		background-color: #ececec;
+		font-size: 28rpx;
+		padding: 24rpx;
+		box-sizing: border-box;
+	}
+
+	.search-container {
+		border-radius: 12rpx;
+		align-items: center;
+
+		input {
+			flex: 1;
+			background-color: #ffffff;
+			height: 64rpx;
+			box-sizing: border-box;
+			padding: 0 16rpx;
+		}
+
+		.btn {
+			width: 120rpx;
+			height: 64rpx;
+			background-color: #1684FC;
+			justify-content: center;
+			font-size: 24rpx;
+			color: #ffffff;
+			justify-content: center;
+			align-items: center;
+		}
+	}
+
+	.scan-btn {
+		height: 64rpx;
+		margin: 32rpx 32rpx 0 32rpx;
+		color: #ffffff;
+		background-color: #f47c3c;
+		align-items: center;
+		justify-content: center;
+		border-radius: 8rpx;
+	}
+
+	.daywork-item {
+		padding: 24rpx;
+		background-color: #ffffff;
+		margin-top: 24rpx;
+		border-radius: 8rpx;
+
+		.lot-code {
+			align-items: center;
+			justify-content: space-between;
+			font-weight: 700;
+		}
+
+		.info {
+			font-size: 24rpx;
+			color: #767676;
+
+			.info-row {
+				margin-top: 16rpx;
+
+				.label {
+					width: 120rpx;
+				}
+
+				.value {
+					flex: 1;
+				}
+				.start-batch-btn {
+					flex: 1;
+					height: 80rpx;
+					line-height: 80rpx;
+					border-radius: 8rpx;
+					color: #FFFFFF;
+					font-size: 28rpx;
+				}
+			}
+		}
+	}
+</style>