guoyujia 6 months ago
parent
commit
be4f792aae
55 changed files with 6798 additions and 4835 deletions
  1. 20 17
      api/base/path.js
  2. 4 4
      components/dialog-base/dialog-base.vue
  3. 129 66
      components/dialog-end-work/dialog-end-work.vue
  4. 61 41
      components/dialog-lotReporting/dialog-lotReporting.vue
  5. 1 1
      components/dialog-selectEquipment/dialog-selectEquipment.vue
  6. 2 2
      components/dialog-turnoverApplication/dialog-turnoverApplication.vue
  7. 1 0
      package.json
  8. 38 26
      pages/addNewBatch/index.vue
  9. 6 6
      pages/auxiliaryDaywork/form.vue
  10. 2 1
      pages/auxiliaryDaywork/index.vue
  11. 172 105
      pages/auxiliaryDaywork/scan.vue
  12. 221 150
      pages/batchReporting/index.vue
  13. 141 79
      pages/changeBox/index.vue
  14. 130 75
      pages/changeInspectionBox/index.vue
  15. 129 74
      pages/dashboard/index.vue
  16. 115 83
      pages/deliveryInspection/index.vue
  17. 279 173
      pages/deliveryInspection/scan.vue
  18. 1 1
      pages/drawingMenu/index.vue
  19. 79 39
      pages/equipmentList/index.vue
  20. 139 89
      pages/factoryInspection/index.vue
  21. 201 106
      pages/factoryInspection/scan.vue
  22. 131 85
      pages/fastProductionPlan/index.vue
  23. 139 90
      pages/firstInspection/index.vue
  24. 195 95
      pages/firstInspection/reviewScan.vue
  25. 143 83
      pages/firstInspection/scan.vue
  26. 126 78
      pages/handlingList/index.vue
  27. 152 136
      pages/innerTurnover/index.vue
  28. 166 116
      pages/instrumentRoomInspection/index.vue
  29. 148 86
      pages/onSiteInspection/index.vue
  30. 211 103
      pages/onSiteInspection/scan.vue
  31. 1 1
      pages/outsourcedDrawingMenu/index.vue
  32. 12 13
      pages/outsourcedInspection/form.vue
  33. 139 91
      pages/outsourcedInspection/index.vue
  34. 137 89
      pages/outsourcedInspection/relate.vue
  35. 202 110
      pages/outsourcedInspection/scan.vue
  36. 147 94
      pages/outsourcedReturnCheck/carriers.vue
  37. 7 7
      pages/processInspectionReceive/form.vue
  38. 2 2
      pages/productionPlan/index.vue
  39. 37 12
      pages/queryLotInfo/index.vue
  40. 73 16
      pages/recerptSfprod/index.vue
  41. 108 94
      pages/reportHistory/index.vue
  42. 37 26
      pages/reportingForWork/index.vue
  43. 171 109
      pages/sortBatchReporting/index.vue
  44. 1 1
      pages/sortProductionPlan/details.vue
  45. 133 83
      pages/sortProductionPlan/index.vue
  46. 222 199
      pages/sorting/form.vue
  47. 80 67
      pages/sorting/options.vue
  48. 82 63
      pages/sorting/specialOptions.vue
  49. 1 1
      pages/sorting/storageRetrieval.vue
  50. 129 76
      pages/startTurnover/index.vue
  51. 232 177
      pages/switchDept/index.vue
  52. 38 38
      pages/takeStock/details.vue
  53. 168 111
      pages/takeStock/index.vue
  54. 61 65
      uni_modules/zb-table/components/zb-table/components/table-h5-summary.vue
  55. 1296 1280
      uni_modules/zb-table/components/zb-table/zb-table.vue

+ 20 - 17
api/base/path.js

@@ -3,27 +3,30 @@ import {
 } from 'vue'
 
 export const path = reactive({
-	// baseURL: 'http://192.168.31.151:8099',
-	// checkAppURL: 'http://192.168.31.151:8099',
-	baseURL: 'http://120.46.159.163:7004',
-	checkAppURL: 'http://120.46.159.163:7004',
-	updateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
-	// furnaceNoURL: 'http://192.168.31.152:8099',
-	furnaceNoURL: 'http://120.46.159.163:7002',
-	pdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-sys',
+	// // baseURL: 'http://192.168.31.151:8099',
+	// // checkAppURL: 'http://192.168.31.151:8099',
+	// baseURL: 'http://120.46.159.163:7004',
+	// checkAppURL: 'http://120.46.159.163:7004',
+	// updateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
+	// // furnaceNoURL: 'http://192.168.31.152:8099',
+	// furnaceNoURL: 'http://120.46.159.163:7002',
+	// pdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-sys',
 
 	// 内网
-	// innerURL: 'http://192.168.31.151:8099',
-	innerURL: 'http://192.168.10.40:7004',
-	innerUpdateAppURL: 'http://192.168.10.40/ezhizao-dms-production',
-	innerPdfAppURL: 'http://192.168.10.40/ezhizao-dms-sys',
-	innerFurnaceNoURL: 'http://192.168.10.40/ezhizao-dms-p2',
+	innerURL: 'https://120.46.159.163/prod-api',
+	// // innerUpdateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
+	innerPdfAppURL: 'https://120.46.159.163/ezhizao-dms-sys',
+	innerFurnaceNoURL: 'https://120.46.159.163/ezhizao-dms-p2',
+	// innerURL: 'https://192.168.31.126/prod-api',
+	// innerUpdateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
+	// innerPdfAppURL: 'https://192.168.31.126/ezhizao-dms-sys',
+	// innerFurnaceNoURL: 'https://192.168.31.126/ezhizao-dms-p2'
 
 	// 外网
-	publicURL: 'http://120.46.159.163:7004',
-	outUpdateAppURL: 'http://120.46.159.163:401/ezhizao-dms-production',
-	outPdfAppURL: 'http://120.46.159.163:401/ezhizao-dms-sys',
-	outFurnaceNoURL: 'http://120.46.159.163:401/ezhizao-dms-p2'
+	// publicURL: 'https://120.46.159.163/prod-api',
+	// outUpdateAppURL: 'https://120.46.159.163:401/ezhizao-dms-production',
+	// outPdfAppURL: 'https://120.46.159.163:401/ezhizao-dms-sys',
+	// outFurnaceNoURL: 'https://120.46.159.163:401/ezhizao-dms-p2'
 })
 
 export default path

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

@@ -52,7 +52,7 @@
 		right: 0;
 		bottom: 0;
 		left: 0;
-		z-index: 1000;
+		z-index: 10;
 
 		.bg {
 			position: absolute;
@@ -62,7 +62,7 @@
 			left: 0;
 			background-color: #333333;
 			opacity: 0.3;
-			z-index: 1001;
+			z-index: 11;
 		}
 
 		.dialog-body {
@@ -78,7 +78,7 @@
 			margin-right: auto;
 			padding: 0 48rpx 48rpx 48rpx;
 			background-color: #FFFFFF;
-			z-index: 1002;
+			z-index: 12;
 			max-height: 64%;
 			// overflow: auto;
 
@@ -88,7 +88,7 @@
 				top: 24rpx;
 				width: 40rpx;
 				height: 40rpx;
-				z-index: 1003;
+				z-index: 13;
 
 				.close-btn-icon {
 					width: 40rpx;

+ 129 - 66
components/dialog-end-work/dialog-end-work.vue

@@ -1,4 +1,5 @@
 <template>
+	<view class="mask" v-if="isLoading"></view>
 	<dialog-base ref="baseDialog" title="结束报工">
 		<view class="list-container">
 			<view class="list-title uni-row">
@@ -44,6 +45,7 @@
 			<button type="default" class="btn" @click="handleFinishReporting">结束报工</button>
 		</view>
 	</dialog-base>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 
 
@@ -52,6 +54,7 @@
 		ref,
 		getCurrentInstance
 	} from 'vue'
+	import QrScanner from '@/pages/vueQrCode/index.vue'
 	import {
 		onLoad
 	} from '@dcloudio/uni-app'
@@ -86,6 +89,7 @@
 
 	const baseDialog = ref(null)
 	const workInfo = ref({})
+	const showQrCodeReader = ref(false);
 	const wasteInfo = ref([])
 	const reasonList = ref([])
 	const emit = defineEmits(['resflushItem'])
@@ -94,6 +98,7 @@
 	const confirmCarrierList = ref([])
 	const isFirstOrder = ref(true); //是否为首序
 	const endFlag = ref(0)
+	const isLoading = ref(false);
 	const specialDeptProcessList = ref([])
 	const temp = ref(0) // 保存workInfo.value.qualifiedNum的值(还原用)
 	const lotPreSumReject = ref(0)
@@ -281,71 +286,105 @@
 
 	function handleScanCode() {
 		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			//调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					let hasInFlag = false
-					for (let i = 0; i < bindList.value.length; i++) {
-						if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
-							hasInFlag = true
-							if (!bindList.value[i].flag) {
-								endFlag.value += 1;
-							}
-							bindList.value[i].flag = true;
-						}
-					}
-					if (!hasInFlag) {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次没有绑定此箱',
-							duration: 2000
-						})
-					}
-					if (endFlag.value < bindList.value.length && hasInFlag) {
-						setTimeout(() => {
-							handleScanCode();
-						}, 700);
-					}
-				}
-			);
-		} else {
-			let vehicleObj = {
-				carrierCode: bindList.value[0].carrierCode
-			};
-			let hasInFlag = false
-			for (let i = 0; i < bindList.value.length; i++) {
-				if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
-					hasInFlag = true
-					if (!bindList.value[i].flag) {
-						endFlag.value += 1;
-					}
-					bindList.value[i].flag = true;
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	//调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			let hasInFlag = false
+		// 			for (let i = 0; i < bindList.value.length; i++) {
+		// 				if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
+		// 					hasInFlag = true
+		// 					if (!bindList.value[i].flag) {
+		// 						endFlag.value += 1;
+		// 					}
+		// 					bindList.value[i].flag = true;
+		// 				}
+		// 			}
+		// 			if (!hasInFlag) {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '该批次没有绑定此箱',
+		// 					duration: 2000
+		// 				})
+		// 			}
+		// 			if (endFlag.value < bindList.value.length && hasInFlag) {
+		// 				setTimeout(() => {
+		// 					handleScanCode();
+		// 				}, 700);
+		// 			}
+		// 		}
+		// 	);
+		// } else {
+		// 	let vehicleObj = {
+		// 		carrierCode: bindList.value[0].carrierCode
+		// 	};
+		// 	let hasInFlag = false
+		// 	for (let i = 0; i < bindList.value.length; i++) {
+		// 		if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
+		// 			hasInFlag = true
+		// 			if (!bindList.value[i].flag) {
+		// 				endFlag.value += 1;
+		// 			}
+		// 			bindList.value[i].flag = true;
+		// 		}
+		// 	}
+		// 	if (!hasInFlag) {
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: '该批次没有绑定此箱',
+		// 			duration: 2000
+		// 		})
+		// 	}
+		// 	if (endFlag.value < bindList.value.length && hasInFlag) {
+		// 		setTimeout(() => {
+		// 			handleScanCode();
+		// 		}, 700);
+		// 	}
+		// }
+		showQrCodeReader.value = true;
+	}
+
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function onDecodeHandler(ret) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: ret
+		};
+		let hasInFlag = false
+		for (let i = 0; i < bindList.value.length; i++) {
+			if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
+				hasInFlag = true
+				if (!bindList.value[i].flag) {
+					endFlag.value += 1;
 				}
-			}
-			if (!hasInFlag) {
-				uni.showToast({
-					icon: 'none',
-					title: '该批次没有绑定此箱',
-					duration: 2000
-				})
-			}
-			if (endFlag.value < bindList.value.length && hasInFlag) {
-				setTimeout(() => {
-					handleScanCode();
-				}, 700);
+				bindList.value[i].flag = true;
 			}
 		}
+		if (!hasInFlag) {
+			uni.showToast({
+				icon: 'none',
+				title: '该批次没有绑定此箱',
+				duration: 2000
+			})
+		}
+		if (endFlag.value < bindList.value.length && hasInFlag) {
+			setTimeout(() => {
+				handleScanCode();
+			}, 700);
+		}
 	}
 
 	function handlePreFinishReporting() {
@@ -393,17 +432,17 @@
 		} else {
 			console.log("999")
 			//判断当前序合格总数为0 ,不允许保存
-				console.log(parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0)
+			console.log(parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0)
 			if (workInfo.value.status == "3" && parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0) {
 				uni.showToast({
 					icon: 'none',
 					title: '当前序合格总数不能为0',
 					duration: 2000
 				})
-			}else{
+			} else {
 				handleSave();
 			}
-	}
+		}
 	}
 
 	function handleFinishReporting() {
@@ -463,7 +502,7 @@
 					title: '当前序合格总数不能为0'
 				})
 				return;
-				}
+			}
 			if (showCarrierList.value) {
 				if (endFlag.value >= bindList.value.length) {
 					handleSave();
@@ -517,11 +556,17 @@
 		if (workInfo.value.status != '3') {
 			workInfo.value.status = '2';
 		}
+		isLoading.value = true; // 显示遮罩层
 		workInfo.value.endTime = timestampToTime(new Date());
+		uni.showLoading({
+			title: '加载中'
+		});
 		workInfo.value.rejectList = wasteInfo.value;
 		workInfo.value.isPreProcess = store.isPreProcess;
 		workInfo.value.processStepNumber = store.dayworkInfo.currentProcess.processStepNumber
 		saveDayWorkItem(workInfo.value).then(res => {
+			isLoading.value = false; // 隐藏遮罩层
+			uni.hideLoading();
 			if (res.code === 200) {
 				uni.showToast({
 					icon: 'success',
@@ -688,4 +733,22 @@
 			}
 		}
 	}
+
+	.mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		z-index: 20;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.mask .loading-text {
+		color: #fff;
+		font-size: 36rpx;
+	}
 </style>

+ 61 - 41
components/dialog-lotReporting/dialog-lotReporting.vue

@@ -49,11 +49,15 @@
 			<view class="item-info uni-row">
 				<text class="label">下序工段</text>
 				<uni-data-select v-model="curDaywork.deptId" :localdata="deptList" :clear="false"
-					style="outline: 2rpx solid #999999;border-radius: 10rpx;" @change="handleDeptChange"></uni-data-select>
+					style="outline: 2rpx solid #999999;border-radius: 10rpx;"
+					@change="handleDeptChange"></uni-data-select>
 			</view>
 			<view v-if="!isWx" class="item-info uni-row" style="margin-top: 12rpx;">
-				<text class="label" style="width: 250rpx;"  >下序是否包装</text><text style="margin-left: 24rpx;" class="label right">否</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" style="width: 250rpx;">下序是否包装</text><text style="margin-left: 24rpx;"
+					class="label right">否</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 right">是</text>
 			</view>
 		</view>
@@ -77,17 +81,20 @@
 				</view>
 			</uni-drawer> -->
 			<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="text-align: center; font-size: 48rpx; padding: 48rpx 0 24rpx 0;margin-top: 20px;">工艺列表
+				</view>
 				<view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
 					仅显示当前工序后面工艺
 				</view>
-				<scroll-view scroll-y="true" style="height: 80%;" @touchmove.stop>
+				<view><button v-if="!editStatus" class="start-batch-btn" style="margin-bottom: 16rpx;" type="primary"
+						@click="handleOpenDrawing">查看本工序图纸</button></view>
+				<scroll-view scroll-y="true" style="height: 70%;" @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="start-batch-btn" style="margin-bottom: 10rpx;" type="primary" @click="handleOpenDrawing">查看本工序图纸</button></view>
+
 			</uni-drawer>
 		</view>
 		<view class="add-btn-container uni-row">
@@ -177,14 +184,14 @@
 	}
 
 	function handleClickProcessList(item) {
-		console.log(item,7979)
-		if(item.isWasteRecycling ==1 || item.isAmend ==1){
+		console.log(item, 7979)
+		if (item.isWasteRecycling == 1 || item.isAmend == 1) {
 			editStatus.value = true
-		}else{
+		} else {
 			editStatus.value = false
 		}
 		var filteredProcess = item.processSequence.filter(i => i.processStepNumber == item.process.processStepNumber);
-		
+
 		processCode.value = filteredProcess[0].processCode
 		processAlias.value = filteredProcess[0].processAlias
 		productId.value = item.daywork.productId
@@ -200,8 +207,8 @@
 		deptList.value = workshopList.value.find(v => v.value === arg).deptList.map(v => ({
 			value: v.deptId,
 			text: v.deptName,
-			isSortPackaging:v.isSortPackaging,
-			code:v.deptCode
+			isSortPackaging: v.isSortPackaging,
+			code: v.deptCode
 		}))
 		normalStatus.value = false
 		isWx.value = false
@@ -209,7 +216,7 @@
 	//结束扫码
 	function handleFinishScan() {
 		const currentTime = Date.now();
-		
+
 		// 检查是否已经过去了 2 秒
 		if (currentTime - lastRequestTimestamp.value < 2000) {
 			// 如果在 2 秒 内已经点击,那么不执行
@@ -230,43 +237,46 @@
 		})
 	}
 	//打开电子图纸
-	function handleOpenDrawing(){
-		
-		    // 对 technologicalProcessDetailId 进行URL编码
-		    var encodedId = encodeURIComponent(productId.value);
-		    var enTechnologicalProcessId = encodeURIComponent(technologicalProcessId.value);
-		    var enprocessCode = encodeURIComponent(processCode.value);
-		    
-		    var encodeCode = encodeURIComponent(currentLotCode.value);
-		    var enProcessAlias = encodeURIComponent(processAlias.value);
-		    // 构建查询参数字符串
-		    var queryParam = `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
-
-		
-		  // 使用模板字符串构建完整的URL
-		  var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
-		
-		  // 导航到指定页面
-		  uni.navigateTo({
-		    url: navigateUrl
-		  });
-	
+	function handleOpenDrawing() {
+
+		// 对 technologicalProcessDetailId 进行URL编码
+		var encodedId = encodeURIComponent(productId.value);
+		var enTechnologicalProcessId = encodeURIComponent(technologicalProcessId.value);
+		var enprocessCode = encodeURIComponent(processCode.value);
+
+		var encodeCode = encodeURIComponent(currentLotCode.value);
+		var enProcessAlias = encodeURIComponent(processAlias.value);
+		// 构建查询参数字符串
+		var queryParam =
+			`param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
+
+
+		// 使用模板字符串构建完整的URL
+		var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
+
+		// 导航到指定页面
+		uni.navigateTo({
+			url: navigateUrl
+		});
+
 	}
+
 	function handleDeptChange() {
 		console.log(deptList.value)
-		let deptInfo = deptList.value.find(item =>item.value == curDaywork.value.deptId)
+		let deptInfo = deptList.value.find(item => item.value == curDaywork.value.deptId)
 		console.log(deptInfo)
-		if(deptInfo.code =='170000') {
+		if (deptInfo.code == '170000') {
 			isWx.value = true
-		}else{
+		} else {
 			isWx.value = false
 		}
-		if(deptInfo.isSortPackaging == 1){
+		if (deptInfo.isSortPackaging == 1) {
 			normalStatus.value = true
-		}else{
+		} else {
 			normalStatus.value = false
 		}
 	}
+
 	function switchChange(event) {
 		console.log(event.detail.value)
 		//是
@@ -300,11 +310,11 @@
 				deptId: curDaywork.value.deptId,
 				workshopId: curDaywork.value.workshopId,
 				deptName: deptList.value.find(v => v.value === curDaywork.value.deptId).text,
-				isSortPackaging :normalStatus.value?"1":"0"
+				isSortPackaging: normalStatus.value ? "1" : "0"
 			}
 
 		}))
-		 console.log(params)
+		console.log(params)
 		reportDaywork(params).then(res => {
 			callback()
 		})
@@ -398,4 +408,14 @@
 
 		}
 	}
+
+	.drawer {
+		display: block;
+		position: absolute;
+		top: 43px;
+		width: 220px;
+		bottom: 0;
+		background-color: #FFFFFF;
+		transition: transform 0.3s ease;
+	}
 </style>

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

@@ -1,5 +1,5 @@
 <template>
-	<dialog-base ref="baseDialog" title="请选择" style="margin: -250rpx auto 0 auto;">
+	<dialog-base ref="baseDialog" title="请选择" style="margin: -150rpx auto 0 auto;">
 		<view>
 			<uni-section title="设备" type="line">
 				<!-- <uni-data-select v-model="selectedEquipment" :localdata="equipmentList" :clear="false"

+ 2 - 2
components/dialog-turnoverApplication/dialog-turnoverApplication.vue

@@ -23,12 +23,12 @@
 				</uni-section>
 			</view>
 	<view v-if="curDayworkItem.turnoverType != '3'" class="list-title uni-row">
-		<text class="label" style="margin: 0 0 0 -24rpx;" >下序是否包装</text><text style="margin-left: 56rpx;" class="label">否</text>
+		<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" style="margin: 0 0 0 -308rpx;" >请选择您摆放位置</text>
+				<text class="label" >请选择您摆放位置</text>
 			</view>
 			<view class="turnArea uni-row" v-if="curDayworkItem.turnoverType == '1'">
 				<view v-for="(item,index) in turnAreaList" class="btn">

+ 1 - 0
package.json

@@ -1,5 +1,6 @@
 {
   "dependencies": {
+    "vue3-qr-reader": "^1.0.0",
     "vuex": "^4.1.0"
   }
 }

+ 38 - 26
pages/addNewBatch/index.vue

@@ -134,6 +134,7 @@
 		style="background-color: #99999999; z-index: 5; position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"
 		v-if="loading">
 	</view>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 <script setup>
 	import {
@@ -170,10 +171,12 @@
 	import {
 		getProcessList
 	} from '@/api/business/deptProcess.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import path from '@/api/base/path.js'
 
 	const batchNoCheck = ref(null) // 批次号是否选中
 	const batchNoList = ref([]) // 批次号列表
+	const showQrCodeReader = ref(false);
 	const vehicleList = ref([])
 	const basicInfo = ref({}) // 基础信息对象
 	const dayWork = ref({})
@@ -515,35 +518,44 @@
 			}
 		});
 	}
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	
+	function onDecodeHandler(ret) {
+		showQrCodeReader.value = false;
+		checkLotCode(ret);
+	}
 
 	function handleConfirmLotCode() {
 		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		// 调用插件的 mpaasScan 方法
-		mpaasScanModule.mpaasScan({
-				// 扫码识别类型,参数可多选,qrCode、barCode,
-				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-				scanType: ["qrCode", "barCode"],
-				// 是否隐藏相册,默认false不隐藏
-				hideAlbum: false,
-			},
-			(ret) => {
-				console.log(ret);
-				// uni.showModal({
-				// 	title: "扫码结果",
-				// 	// 返回值中,有三个参数 resp_code、resp_message、resp_result
-				// 	// resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
-				// 	// resp_message 表示返回结果信息
-				// 	// resp_result 表示扫码结果,只有成功才会有返回
-				// 	content: JSON.stringify(ret),
-				// 	showCancel: false,
-				// 	confirmText: "确定",
-				// });
-				if (ret.resp_result) {
-					checkLotCode(ret.resp_result);
-				}
-			}
-		);
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// // 调用插件的 mpaasScan 方法
+		// mpaasScanModule.mpaasScan({
+		// 		// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 		// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 		scanType: ["qrCode", "barCode"],
+		// 		// 是否隐藏相册,默认false不隐藏
+		// 		hideAlbum: false,
+		// 	},
+		// 	(ret) => {
+		// 		console.log(ret);
+		// 		// uni.showModal({
+		// 		// 	title: "扫码结果",
+		// 		// 	// 返回值中,有三个参数 resp_code、resp_message、resp_result
+		// 		// 	// resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
+		// 		// 	// resp_message 表示返回结果信息
+		// 		// 	// resp_result 表示扫码结果,只有成功才会有返回
+		// 		// 	content: JSON.stringify(ret),
+		// 		// 	showCancel: false,
+		// 		// 	confirmText: "确定",
+		// 		// });
+		// 		if (ret.resp_result) {
+		// 			checkLotCode(ret.resp_result);
+		// 		}
+		// 	}
+		// );
+		showQrCodeReader.value = true;
 	}
 
 	function handleFurnaceNumberChange() {

+ 6 - 6
pages/auxiliaryDaywork/form.vue

@@ -60,7 +60,7 @@
 						style="height: 80rpx;background-color: #393cfc;color: #ffffff;text-align: center;justify-content: center;align-items: center;border-radius: 8rpx;"
 						@click="() => addReject(item, index)">废品信息</view> -->
 					<button v-if="editable()" @click="() => addReject(item, index)" size="mini" type="primary"
-						style="z-index: 50;">废品信息</button>
+						style="z-index: 5;">废品信息</button>
 				</view>
 				<view class="resu uni-row">
 					<view class="label">报工人</view>
@@ -298,12 +298,12 @@
 		// 		return
 		// 	}
 		// }
-		if(auxiliaryDayworkItem.value.rejectNum > auxiliaryDayworkItem.value.prodNum) {
+		if (auxiliaryDayworkItem.value.rejectNum > auxiliaryDayworkItem.value.prodNum) {
 			uni.showToast({
-						icon: 'none',
-						title: '废品总数不能大于投产量'
-					})
-					return
+				icon: 'none',
+				title: '废品总数不能大于投产量'
+			})
+			return
 		}
 
 		let sumReject = 0

+ 2 - 1
pages/auxiliaryDaywork/index.vue

@@ -124,7 +124,8 @@
 			title: '加载中'
 		});
 		// quer.value.userId = store.userInfo.userId;
-		quer.value.startTime = startTime.value;
+		// quer.value.startTime = startTime.value;
+		quer.value.startTime = `${startTime.value} 00:00:00`
 		quer.value.userId = userId.value
 		quer.value.isAuto = 0
 		getDayWorkList(quer.value).then(res => {

+ 172 - 105
pages/auxiliaryDaywork/scan.vue

@@ -14,14 +14,14 @@
 			<view class="info-row uni-row">
 				<view class="label">生产工序</view>
 				<view class="value">
-					<uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="lot.technologicalProcessDetailId"
+					<uni-data-select style="width: 70%;" v-model="lot.technologicalProcessDetailId"
 						:localdata="processes" @change="handleProcessChange"></uni-data-select>
 				</view>
 			</view>
 			<view class="info-row uni-row">
 				<view class="label">辅助工序</view>
 				<view class="value">
-					<uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="lot.auxiliaryProcessId"
+					<uni-data-select style="width: 70%;" v-model="lot.auxiliaryProcessId"
 						:localdata="auxiliaryProcesses" @change="handleAuxiliaryProcessChange"></uni-data-select>
 				</view>
 			</view>
@@ -47,6 +47,7 @@
 		<!-- <dialog-processInspection ref='selectProcessInspection'
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection> -->
 		<dialog-daywork-choice ref="selectDaywork" @handleSelectDaywork="handleSelectDaywork"></dialog-daywork-choice>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -60,6 +61,7 @@
 		onUnload,
 		onShow
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		saveOutsourcedInspecion,
 		getCarrierInfo,
@@ -79,6 +81,7 @@
 	const carrierCode = ref('')
 	const lot = ref({})
 	const query = ref({})
+	const showQrCodeReader = ref(false);
 	const selectDaywork = ref(null)
 	const lastRequestTimestamp = ref(0);
 	const auxiliaryProcesses = ref([])
@@ -86,118 +89,182 @@
 
 	// 页面生命周期函数
 	onLoad(() => {})
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		const result = {
+			carrierCode: data,
+			processCode: ''
+		}
+		if (!result.carrierCode || result.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return
+		}
+		//判断该箱是否绑定批次
 
-	const handleScanCode = () => {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret)
-					const result = {
-						carrierCode: ret.resp_result,
-						processCode: ''
-					}
-					if (!result.carrierCode || result.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
+		result.processCode = store.outsourcedCode;
+		// console.log(result.processCode)
+		/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
+		getInfoByCarrierCode(result).then(response => {
+			if (response.code == 200) {
+				// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+				// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+				if (response.data != null) {
+					if (response.data.length > 1) {
+						query.value = result;
+						selectDaywork.value.open(response.data)
+					} else {
+						// console.log(response)
+						uni.showLoading({
+							title: '加载中'
 						})
-						return
+						uni.hideLoading()
+						lot.value = response.data[0]
+						processes.value = lot.value.processSequence.map(v => ({
+							text: v.processAlias,
+							value: v.technologicalProcessDetailId,
+							...v
+						}))
 					}
-					//判断该箱是否绑定批次
-
-					result.processCode = store.outsourcedCode;
-					// console.log(result.processCode)
-					/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
-					getInfoByCarrierCode(result).then(response => {
-						if (response.code == 200) {
-							// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-							// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-							if (response.data != null) {
-								if (response.data.length > 1) {
-									query.value = result;
-									selectDaywork.value.open(response.data)
-								} else {
-									// console.log(response)
-									uni.showLoading({
-										title: '加载中'
-									})
-									uni.hideLoading()
-									lot.value = response.data[0]
-									processes.value = lot.value.processSequence.map(v => ({
-										text: v.processAlias,
-										value: v.technologicalProcessDetailId,
-										...v
-									}))
-								}
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
-					}).catch(err => {
-						uni.showToast({
-							icon: 'none',
-							title: err.message,
-							duration: 2000
-						})
-					})
 				}
-			)
-		} else {
-			const result = {
-				carrierCode: '001135',
-				processCode: store.outsourcedCode
-			}
-			getInfoByCarrierCode(result).then(response => {
-				if (response.code == 200) {
-					// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-					// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-					if (response.data != null) {
-						if (response.data.length > 1) {
-							query.value = result;
-							selectDaywork.value.open(response.data)
-						} else {
-							// console.log(response)
-							uni.showLoading({
-								title: '加载中'
-							})
-							uni.hideLoading()
-							lot.value = response.data[0]
-							processes.value = lot.value.processSequence.map(v => ({
-								text: v.processAlias,
-								value: v.technologicalProcessDetailId,
-								...v
-							}))
-						}
-					}
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg,
-						duration: 2000
-					})
-				}
-			}).catch(err => {
+			} else {
 				uni.showToast({
 					icon: 'none',
-					title: err.message,
+					title: response.msg,
 					duration: 2000
 				})
+			}
+		}).catch(err => {
+			uni.showToast({
+				icon: 'none',
+				title: err.message,
+				duration: 2000
 			})
-		}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	const handleScanCode = () => {
+		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)
+		// 			const result = {
+		// 				carrierCode: ret.resp_result,
+		// 				processCode: ''
+		// 			}
+		// 			if (!result.carrierCode || result.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return
+		// 			}
+		// 			//判断该箱是否绑定批次
+
+		// 			result.processCode = store.outsourcedCode;
+		// 			// console.log(result.processCode)
+		// 			/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
+		// 			getInfoByCarrierCode(result).then(response => {
+		// 				if (response.code == 200) {
+		// 					// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+		// 					// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+		// 					if (response.data != null) {
+		// 						if (response.data.length > 1) {
+		// 							query.value = result;
+		// 							selectDaywork.value.open(response.data)
+		// 						} else {
+		// 							// console.log(response)
+		// 							uni.showLoading({
+		// 								title: '加载中'
+		// 							})
+		// 							uni.hideLoading()
+		// 							lot.value = response.data[0]
+		// 							processes.value = lot.value.processSequence.map(v => ({
+		// 								text: v.processAlias,
+		// 								value: v.technologicalProcessDetailId,
+		// 								...v
+		// 							}))
+		// 						}
+		// 					}
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			}).catch(err => {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: err.message,
+		// 					duration: 2000
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		carrierCode: '001135',
+		// 		processCode: store.outsourcedCode
+		// 	}
+		// 	getInfoByCarrierCode(result).then(response => {
+		// 		if (response.code == 200) {
+		// 			// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+		// 			// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+		// 			if (response.data != null) {
+		// 				if (response.data.length > 1) {
+		// 					query.value = result;
+		// 					selectDaywork.value.open(response.data)
+		// 				} else {
+		// 					// console.log(response)
+		// 					uni.showLoading({
+		// 						title: '加载中'
+		// 					})
+		// 					uni.hideLoading()
+		// 					lot.value = response.data[0]
+		// 					processes.value = lot.value.processSequence.map(v => ({
+		// 						text: v.processAlias,
+		// 						value: v.technologicalProcessDetailId,
+		// 						...v
+		// 					}))
+		// 				}
+		// 			}
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	}).catch(err => {
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: err.message,
+		// 			duration: 2000
+		// 		})
+		// 	})
+		// }
 	}
 
 	//选择批号弹窗带回

+ 221 - 150
pages/batchReporting/index.vue

@@ -77,8 +77,8 @@
 					<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>
+					<text
+						class="label right">{{ item.currentProcess ? item['currentProcess'].processAlias : '-'}}</text>
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">下道工序</text>
@@ -96,15 +96,20 @@
 					<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">
+				<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>
+					<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">
+				<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>
@@ -130,19 +135,21 @@
 			</view>
 		</view>
 		<!-- 抽屉 -->
-		<uni-drawer ref="showRight" mode="right" :mask-click="true">
+		<uni-drawer ref="showRight" mode="right" :mask-click="true" style="height: 100%;">
 			<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><button v-if="!editStatus" class="view-end-btn" style="margin-bottom: 16rpx;" type="primary"
+					@click="handleOpenDrawing">查看本工序图纸</button></view>
+			<scroll-view scroll-y="true" style="height: 70%;" @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>
+			<!-- 		<view><button v-if="!editStatus" class="view-end-btn" style="margin-top: 20rpx;" type="primary"
+					@click="handleOpenDrawing">查看本工序图纸</button></view> -->
 
 		</uni-drawer>
 		<!-- <view v-if="bottomStatus" class="bottom uni-row">
@@ -161,6 +168,7 @@
 		<dialog-lot ref="lotDialog" @submit="handleDoIt" />
 		<dialog-turnoverApplication ref="turnoverApplicationDialog" @reflushDaywork="handleDoTurnoverAfter" />
 		<dialog-selectProduction ref="selectProduction"></dialog-selectProduction>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 
 </template>
@@ -172,6 +180,7 @@
 		onMounted,
 		ref
 	} from 'vue'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		onLoad,
 		onReady,
@@ -184,7 +193,9 @@
 		showDayworkSave,
 		turnoverDelete
 	} from '@/api/business/dayWork.js'
-	import{isTakeStock} from '@/api/business/taksStackLot.js'
+	import {
+		isTakeStock
+	} from '@/api/business/taksStackLot.js'
 	import {
 		getAbnormalityLot
 	} from '@/api/business/lot.js'
@@ -203,6 +214,7 @@
 
 	const turnoverApplicationDialog = ref(null)
 	const selectProduction = ref(null)
+	const showQrCodeReader = ref(false);
 	const lotDialog = ref(null)
 	const listData = ref([])
 	const curPlan = ref(null)
@@ -281,14 +293,14 @@
 				duration: 2000
 			})
 		} else {
-			isTakeStock().then(response =>{
-				if(response.data) {
+			isTakeStock().then(response => {
+				if (response.data) {
 					uni.showToast({
 						icon: 'none',
 						title: '正在盘点,不能申请周转',
 						duration: 2000
 					})
-				}else{
+				} else {
 					let _data = data ?? {}
 					carrierFinishedCheck(data).then(res => {
 						if (res.code === 200) {
@@ -303,7 +315,7 @@
 					})
 				}
 			})
-	
+
 		}
 
 	}
@@ -438,120 +450,179 @@
 			normalStatus.value = true
 		}
 	}
-
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret);
-					/* 原有代码,之前二维码中存的信息比较多,用一个JSON格式存储。
-					let vehicleObj = JSON.parse(ret.resp_result);
-					if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					*/
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					showDaywork({
-						carrierId: '0', // 不传递箱子id
-						carrierCode: vehicleObj.carrierCode,
-						status: 7
-					}).then(response => {
-						if (response.code == 200) {
-							console.log(response)
-							console.log(response.data[0].productionPlanDetailId)
-							console.log(store.planDetails.id)
-							console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
-							if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-								uni.showToast({
-									icon: 'none',
-									title: '该批次不在当前工段',
-									duration: 2000
-								})
-								return
-							}
-							if (response.data[0].productionPlanDetailId == store.planDetails.id) {
-								console.log(response.data)
-								lotDialog.value.open(response.data);
-							} else {
-								uni.showToast({
-									icon: 'none',
-									title: '该批次不在此计划单内',
-									duration: 2000
-								})
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		console.log(data);
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		showDaywork({
+			carrierId: '0', // 不传递箱子id
+			carrierCode: vehicleObj.carrierCode,
+			status: 7
+		}).then(response => {
+			if (response.code == 200) {
+				console.log(response)
+				console.log(response.data[0].productionPlanDetailId)
+				console.log(store.planDetails.id)
+				console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
+				if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+					uni.showToast({
+						icon: 'none',
+						title: '该批次不在当前工段',
+						duration: 2000
 					})
+					return
 				}
-			);
-		} else {
-			// 测试时用
-			showDaywork({
-				carrierId: '1780467398971187210',
-				carrierCode: '',
-				status: 7
-			}).then(response => {
-				if (response.code == 200) {
-					console.log(response)
-					console.log(response.data[0].productionPlanDetailId)
-					console.log(store.planDetails.id)
-					console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
-					if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次已转至其他工段',
-							duration: 2000
-						})
-						return
-					}
-					if (response.data[0].productionPlanDetailId == store.planDetails.id) {
-						console.log(response.data)
-						lotDialog.value.open(response.data);
-					} else {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次不在此计划单内',
-							duration: 2000
-						})
-					}
+				if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+					console.log(response.data)
+					lotDialog.value.open(response.data);
 				} else {
 					uni.showToast({
 						icon: 'none',
-						title: response.msg,
+						title: '该批次不在此计划单内',
 						duration: 2000
 					})
 				}
-			})
-		}
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function handleScanCode() {
+		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);
+		// 				/* 原有代码,之前二维码中存的信息比较多,用一个JSON格式存储。
+		// 				let vehicleObj = JSON.parse(ret.resp_result);
+		// 				if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
+		// 					uni.showToast({
+		// 						icon: "none",
+		// 						title: "请扫载具码",
+		// 						duration: 1000
+		// 					})
+		// 					return;
+		// 				}
+		// 				*/
+		// 				let vehicleObj = {
+		// 					carrierCode: ret.resp_result
+		// 				};
+		// 				if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 					uni.showToast({
+		// 						icon: "none",
+		// 						title: "请扫载具码",
+		// 						duration: 1000
+		// 					})
+		// 					return;
+		// 				}
+		// 				showDaywork({
+		// 					carrierId: '0', // 不传递箱子id
+		// 					carrierCode: vehicleObj.carrierCode,
+		// 					status: 7
+		// 				}).then(response => {
+		// 					if (response.code == 200) {
+		// 						console.log(response)
+		// 						console.log(response.data[0].productionPlanDetailId)
+		// 						console.log(store.planDetails.id)
+		// 						console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
+		// 						if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+		// 							uni.showToast({
+		// 								icon: 'none',
+		// 								title: '该批次不在当前工段',
+		// 								duration: 2000
+		// 							})
+		// 							return
+		// 						}
+		// 						if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+		// 							console.log(response.data)
+		// 							lotDialog.value.open(response.data);
+		// 						} else {
+		// 							uni.showToast({
+		// 								icon: 'none',
+		// 								title: '该批次不在此计划单内',
+		// 								duration: 2000
+		// 							})
+		// 						}
+		// 					} else {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: response.msg,
+		// 							duration: 2000
+		// 						})
+		// 					}
+		// 				})
+		// 			}
+		// 		);
+		// 	} else {
+		// 		// 测试时用
+		// 		showDaywork({
+		// 			carrierId: '1780467398971187210',
+		// 			carrierCode: '',
+		// 			status: 7
+		// 		}).then(response => {
+		// 			if (response.code == 200) {
+		// 				console.log(response)
+		// 				console.log(response.data[0].productionPlanDetailId)
+		// 				console.log(store.planDetails.id)
+		// 				console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
+		// 				if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: '该批次已转至其他工段',
+		// 						duration: 2000
+		// 					})
+		// 					return
+		// 				}
+		// 				if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+		// 					console.log(response.data)
+		// 					lotDialog.value.open(response.data);
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: '该批次不在此计划单内',
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			} else {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: response.msg,
+		// 					duration: 2000
+		// 				})
+		// 			}
+		// 		})
+		// 	}
 	}
 
 	function handleAddDaywork(data) {
@@ -614,44 +685,44 @@
 
 
 	function handleCancelTurnover(data) {
-		isTakeStock().then(response =>{
-			if(response.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
+				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);
+					}
 				})
-				isLoding.value = false;
-				setTimeout(() => {
-				 init(store.planDetails.id);
-				}, 1000);
 			}
 		})
-		}
-		})
 	}
 </script>
 

+ 141 - 79
pages/changeBox/index.vue

@@ -45,6 +45,7 @@
 			<button class='bottom-btn right-btn' type=primary @click="debounce(handleSubmit,300)">提交</button>
 		</view>
 	</view>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 <script setup>
 	import {
@@ -54,6 +55,7 @@
 		onMounted,
 		getCurrentInstance
 	} from 'vue';
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		onLoad,
 		onReady
@@ -84,6 +86,7 @@
 	const newBindList = ref([])
 	const discardVehicleList = ref([])
 	const abanonmentList = ref([])
+	const showQrCodeReader = ref(false);
 
 	let dayWorkInfo = store.dayworkInfo;
 	onMounted(() => {
@@ -201,6 +204,7 @@
 		item.inpShow = false;
 	}
 	/*
+	
 		function handleScanCode() {
 			// 引入原生插件
 			const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
@@ -275,88 +279,141 @@
 		}
 	*/
 	function handleScanCode() {
+		showQrCodeReader.value = true;
 		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					console.log("扫码验证数据", vehicleObj);
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码"
-						})
-						return;
-					}
-					for (let i = 0; i < newBindList.value.length; i++) {
-						if (newBindList.value[i].carrierCode === vehicleObj.carrierCode) {
-							uni.showToast({
-								icon: "none",
-								title: "载具已存在"
-							})
-							return;
-						}
-					}
-					const checkData = {
-						...dayWorkInfo,
-						dayworkCarriers: newBindList.value,
-						newCarrierCode: vehicleObj.carrierCode
-					}
-					console.log("dayWorkInfo", dayWorkInfo);
-					checkCarrierNew(checkData).then(response => {
-						if (response.code == 200) {
-							newBindList.value.push(response.data);
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg
-							})
-							return;
-						}
-					}).catch(err => {
-						uni.showToast({
-							icon: 'none',
-							title: '箱码检测检测错误' + err.message
-						})
-					})
-				}
-			);
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			console.log("扫码验证数据", vehicleObj);
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码"
+		// 				})
+		// 				return;
+		// 			}
+		// 			for (let i = 0; i < newBindList.value.length; i++) {
+		// 				if (newBindList.value[i].carrierCode === vehicleObj.carrierCode) {
+		// 					uni.showToast({
+		// 						icon: "none",
+		// 						title: "载具已存在"
+		// 					})
+		// 					return;
+		// 				}
+		// 			}
+		// 			const checkData = {
+		// 				...dayWorkInfo,
+		// 				dayworkCarriers: newBindList.value,
+		// 				newCarrierCode: vehicleObj.carrierCode
+		// 			}
+		// 			console.log("dayWorkInfo", dayWorkInfo);
+		// 			checkCarrierNew(checkData).then(response => {
+		// 				if (response.code == 200) {
+		// 					newBindList.value.push(response.data);
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg
+		// 					})
+		// 					return;
+		// 				}
+		// 			}).catch(err => {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '箱码检测检测错误' + err.message
+		// 				})
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	const checkData = {
+		// 		...dayWorkInfo,
+		// 		dayworkCarriers: newBindList.value,
+		// 		newCarrierCode: '500002'
+		// 	}
+		// 	checkCarrierNew(checkData).then(response => {
+		// 		if (response.code == 200) {
+		// 			console.log("带回", response);
+		// 			newBindList.value.push(response.data);
+		// 			console.log("newBindList添加", newBindList.value);
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg
+		// 			})
+		// 			return;
+		// 		}
+		// 	}).catch(err => {
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: '箱码检测检测错误' + err.message
+		// 		})
+		// 	})
+		// }
+
+	}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+	let vehicleObj = {
+		carrierCode: data
+	};
+	console.log("扫码验证数据", vehicleObj);
+	if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		uni.showToast({
+			icon: "none",
+			title: "请扫载具码"
+		})
+		return;
+	}
+	for (let i = 0; i < newBindList.value.length; i++) {
+		if (newBindList.value[i].carrierCode === vehicleObj.carrierCode) {
+			uni.showToast({
+				icon: "none",
+				title: "载具已存在"
+			})
+			return;
+		}
+	}
+	const checkData = {
+		...dayWorkInfo,
+		dayworkCarriers: newBindList.value,
+		newCarrierCode: vehicleObj.carrierCode
+	}
+	console.log("dayWorkInfo", dayWorkInfo);
+	checkCarrierNew(checkData).then(response => {
+		if (response.code == 200) {
+			newBindList.value.push(response.data);
 		} else {
-			const checkData = {
-				...dayWorkInfo,
-				dayworkCarriers: newBindList.value,
-				newCarrierCode: '500002'
-			}
-			checkCarrierNew(checkData).then(response => {
-				if (response.code == 200) {
-					console.log("带回", response);
-					newBindList.value.push(response.data);
-					console.log("newBindList添加", newBindList.value);
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg
-					})
-					return;
-				}
-			}).catch(err => {
-				uni.showToast({
-					icon: 'none',
-					title: '箱码检测检测错误' + err.message
-				})
+			uni.showToast({
+				icon: 'none',
+				title: response.msg
 			})
+			return;
 		}
-
+	}).catch(err => {
+		uni.showToast({
+			icon: 'none',
+			title: '箱码检测检测错误' + err.message
+		})
+	})
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
 	}
 
 	function handleSubmit() {
@@ -427,6 +484,10 @@
 	.container {
 		height: 100%;
 		background-color: #f5f5f5;
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
 	}
 
 	.bottom {
@@ -456,7 +517,8 @@
 	}
 
 	.content {
-		width: 90%;
+		position: fixed;
+		width: 100%;
 		height: calc(100% - 100rpx - 100rpx - 80rpx);
 		background-color: rgba(255, 255, 255, 1);
 		margin: 50rpx auto;

+ 130 - 75
pages/changeInspectionBox/index.vue

@@ -45,6 +45,7 @@
 			<button class='bottom-btn right-btn' type=primary @click="handleSubmit">提交</button>
 		</view>
 	</view>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 <script setup>
 	import {
@@ -54,6 +55,7 @@
 		onMounted,
 		getCurrentInstance
 	} from 'vue';
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		onLoad,
 		onReady
@@ -84,6 +86,7 @@
 	const newBindList = ref([])
 	const discardVehicleList = ref([])
 	const abanonmentList = ref([])
+	const showQrCodeReader = ref(false);
 
 	let dayWorkInfo = {};
 	onMounted(() => {
@@ -159,84 +162,131 @@
 		newBindList.value.push(item)
 		item.inpShow = false;
 	}
-
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码"
-						})
-						return;
-					}
-					const checkData = {
-						...dayWorkInfo,
-						id: dayWorkInfo.dayworkId,
-						dayworkCarriers: newBindList.value,
-						newCarrierCode: vehicleObj.carrierCode
-					}
-					checkCarrierForInspection(checkData).then(response => {
-						if (response.code == 200) {
-							// newBindList.value.push(response.data);
-							// 替换当前箱码
-							newBindList.value = [
-								response.data
-							]
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg
-							})
-							return;
-						}
-					}).catch(err => {
-						uni.showToast({
-							icon: 'none',
-							title: '箱码检测检测错误' + err.message
-						})
-					})
-				}
-			);
-		} else {
-			const checkData = {
-				...dayWorkInfo,
-				id: dayWorkInfo.dayworkId,
-				dayworkCarriers: newBindList.value,
-				newCarrierCode: '500002'
-			}
-			checkCarrierForInspection(checkData).then(response => {
-				if (response.code == 200) {
-					newBindList.value = [
-						response.data
-					]
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg
-					})
-					return;
-				}
-			}).catch(err => {
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码"
+			})
+			return;
+		}
+		const checkData = {
+			...dayWorkInfo,
+			id: dayWorkInfo.dayworkId,
+			dayworkCarriers: newBindList.value,
+			newCarrierCode: vehicleObj.carrierCode
+		}
+		checkCarrierForInspection(checkData).then(response => {
+			if (response.code == 200) {
+				// newBindList.value.push(response.data);
+				// 替换当前箱码
+				newBindList.value = [
+					response.data
+				]
+			} else {
 				uni.showToast({
 					icon: 'none',
-					title: '箱码检测检测错误' + err.message
+					title: response.msg
 				})
+				return;
+			}
+		}).catch(err => {
+			uni.showToast({
+				icon: 'none',
+				title: '箱码检测检测错误' + err.message
 			})
-		}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function handleScanCode() {
+		showQrCodeReader.value = true;
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码"
+		// 				})
+		// 				return;
+		// 			}
+		// 			const checkData = {
+		// 				...dayWorkInfo,
+		// 				id: dayWorkInfo.dayworkId,
+		// 				dayworkCarriers: newBindList.value,
+		// 				newCarrierCode: vehicleObj.carrierCode
+		// 			}
+		// 			checkCarrierForInspection(checkData).then(response => {
+		// 				if (response.code == 200) {
+		// 					// newBindList.value.push(response.data);
+		// 					// 替换当前箱码
+		// 					newBindList.value = [
+		// 						response.data
+		// 					]
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg
+		// 					})
+		// 					return;
+		// 				}
+		// 			}).catch(err => {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '箱码检测检测错误' + err.message
+		// 				})
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	const checkData = {
+		// 		...dayWorkInfo,
+		// 		id: dayWorkInfo.dayworkId,
+		// 		dayworkCarriers: newBindList.value,
+		// 		newCarrierCode: '500002'
+		// 	}
+		// 	checkCarrierForInspection(checkData).then(response => {
+		// 		if (response.code == 200) {
+		// 			newBindList.value = [
+		// 				response.data
+		// 			]
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg
+		// 			})
+		// 			return;
+		// 		}
+		// 	}).catch(err => {
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: '箱码检测检测错误' + err.message
+		// 		})
+		// 	})
+		// }
 
 	}
 
@@ -298,6 +348,10 @@
 	.container {
 		height: 100%;
 		background-color: #f5f5f5;
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
 	}
 
 	.bottom {
@@ -327,7 +381,8 @@
 	}
 
 	.content {
-		width: 90%;
+		position: fixed;
+		width: 100%;
 		height: calc(100% - 100rpx - 100rpx - 80rpx);
 		background-color: rgba(255, 255, 255, 1);
 		margin: 50rpx auto;

+ 129 - 74
pages/dashboard/index.vue

@@ -23,6 +23,7 @@
 					@change="handleDeptChange"></uni-data-select>
 			</uni-section>
 		</view>
+		<view class="scroll-container" style="padding-bottom:120rpx;">
 		<!-- <view class="business-btn uni-row" v-if="showOther" @click="handleRecerptSfprod"><text class="label">半成品接收</text></view> -->
 		<view class="business-btn uni-row" v-if="showOther" @click="handeleToReportHistory">
 			<text class="label">我的报工</text>
@@ -88,6 +89,7 @@
 		<view class="business-btn uni-row" v-if="showChangeTurnover" @click="handleChangeTurnover">
 			<text class="label">更换工段加工</text>
 		</view>
+		</view>
 		<view class="bottom-btn-container">
 			<!-- <view class="start-batch-btn uni-row" @click="handleToEquiPmentList"><text class="label">绑定设备</text></view> -->
 			<view class="start-batch-btn uni-row" @click="handleSwitchOrQuit">
@@ -97,6 +99,7 @@
 	</view>
 	<dialog-confirm ref="confirm" @submit="logout"></dialog-confirm>
 	<dialog-inspectionChamber ref="inspectionChanberRef" @handleSelectInspectionChamber='handleSelectInspectionChamber'></dialog-inspectionChamber>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 
 <script setup>
@@ -107,6 +110,7 @@
 		onLoad,
 		onReady
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getSubPlanDetailsList
 	} from '../../api/business/subPlanDetails'
@@ -152,6 +156,7 @@
 	const showFirstArticleInspection = ref(false)
 	const showOutSourceList = ref(false)
 	const showChangeTurnover = ref(false)
+	const showQrCodeReader = ref(false);
 
 	onLoad(() => {
 		console.log(store.userInfo)
@@ -425,80 +430,123 @@
 			})
 		}
 	}
-
-	//检查列表
-	function handleToInspectionReceive() {
-	  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;
-					}
-					checkCarrier({
-						carrierCode: vehicleObj.carrierCode,
-					}).then(response => {
-						if (response.code == 200) {
-							uni.navigateTo({
-										url: "/pages/processInspectionReceive/form",
-										success: (res) => {
-											// 通过eventChannel向被打开页面传送数据
-											res.eventChannel.emit("inspecionCarrierCode", {
-												carrierCode: vehicleObj.carrierCode
-											})
-										}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+				carrierCode: data
+			};
+			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+				uni.showToast({
+					icon: "none",
+					title: "请扫载具码",
+					duration: 1000
+				})
+				return;
+			}
+			checkCarrier({
+				carrierCode: vehicleObj.carrierCode,
+			}).then(response => {
+				if (response.code == 200) {
+					uni.navigateTo({
+								url: "/pages/processInspectionReceive/form",
+								success: (res) => {
+									// 通过eventChannel向被打开页面传送数据
+									res.eventChannel.emit("inspecionCarrierCode", {
+										carrierCode: vehicleObj.carrierCode
 									})
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
+								}
 							})
-						}
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: response.msg,
+						duration: 2000
 					})
 				}
-			);
-		} else {
+			})
+}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	//检查列表
+	function handleToInspectionReceive() {
+		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;
+		// 			}
+		// 			checkCarrier({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					uni.navigateTo({
+		// 								url: "/pages/processInspectionReceive/form",
+		// 								success: (res) => {
+		// 									// 通过eventChannel向被打开页面传送数据
+		// 									res.eventChannel.emit("inspecionCarrierCode", {
+		// 										carrierCode: vehicleObj.carrierCode
+		// 									})
+		// 								}
+		// 							})
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
 			
-			// 测试时用
-		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
-				})
-			}
-		})
-		}
+		// 	// 测试时用
+		// 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
+		// 		})
+		// 	}
+		// })
+		// }
 	}
 
 	// 外协检查
@@ -765,19 +813,26 @@
 
 	.bottom-btn-container {
 		position: fixed;
-		right: 20rpx;
+		right: 0;
 		bottom: 0;
-		left: 20rpx;
+		left: 0;
+		height: 50px;
+		border-top: 1px solid #999999;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		background-color: #fff;
+		justify-content: space-evenly;
 
 		.start-batch-btn {
 			// background-color: grey;
 			background-color: #1684fc;
-			margin-bottom: 24rpx;
+			// margin-bottom: 24rpx;
 			border-radius: 8rpx;
 			justify-content: center;
 			align-items: center;
-			height: 80rpx;
-
+			height: 50rpx;
+			flex: 1;
+			width: 100%;
 
 			.label {
 				font-size: 32rpx;

+ 115 - 83
pages/deliveryInspection/index.vue

@@ -6,19 +6,21 @@
 			<!-- <uni-icons type="scan" size="24" /> -->
 		</view>
 
-		<view class="time-controls" style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
+		<view class="time-controls"
+			style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
 			<view class="uni-row sta">
-			<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
+				<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
 				<view class="uni-row" style="flex: 1;width: 100%;">
-				<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
-				<span style="align-items: center;display: flex;">—</span>
-				<input v-model="endTime" type="date" @input="timeSizer" />
+					<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
+					<span style="align-items: center;display: flex;">—</span>
+					<input v-model="endTime" type="date" @input="timeSizer" />
 				</view>
 			</view>
 		</view>
 		<view class="uni-row" style="margin-top: 10rpx;">
 			<view class="scan-btn " style="min-height: 80rpx;" @click.stop="handleAddDeliveryInspection">新增交检</view>
-			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;" @click.stop="handleScan">扫码</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;"
+				@click.stop="handleScan">扫码</view>
 		</view>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
@@ -56,6 +58,7 @@
 				</view>
 			</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -68,6 +71,7 @@
 		getLotInfo,
 		delProcessInspection
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		timestampToTime,
 		toHHmmss
@@ -91,6 +95,7 @@
 	const pageNum = ref(1)
 	const status = ref(true)
 	const showPicker = ref(false)
+	const showQrCodeReader = ref(false);
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -126,30 +131,30 @@
 		// 	}
 		// });
 	})
-	onReachBottom(()=>{
-			console.log(status.value)
-			if(status.value) {
+	onReachBottom(() => {
+		console.log(status.value)
+		if (status.value) {
 			pageNum.value += 1
 			quer.value.pageNum = pageNum.value
 			quer.value.pageSize = pageSize.value
-			getProcessInspecionList(quer.value).then(res =>{
-			 const existingIds = new Set(inspecionList.value.map(item => item.id));
-			
-			  // 过滤出那些不在 existingIds 中的项,即新数据
-			  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-			
-			  // 如果有新数据,将其添加到 listData
-			  if (newRows.length > 0) {
-				inspecionList.value = inspecionList.value.concat(newRows);
-				original.value = original.value.concat(newRows);
-			  } else {
-				// 如果没有新数据,更新状态表示没有更多数据
-				status.value = false;
-			  }
+			getProcessInspecionList(quer.value).then(res => {
+				const existingIds = new Set(inspecionList.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
 			})
-			}
-		})
-	
+		}
+	})
+
 
 	/***************************** 定义了一些方法 *****************************/
 
@@ -164,74 +169,102 @@
 		quer.value.type = "deliveryInspection"
 		quer.value.pageNum = pageNum.value
 		quer.value.pageSize = pageSize.value
-		if(!checkTime(quer.value.startTime,quer.value.endTime)) {
+		if (!checkTime(quer.value.startTime, quer.value.endTime)) {
 			console.log("777")
 			uni.showToast({
 				icon: 'none',
 				title: "开始日期不能大于结束日期",
-				duration:2000
+				duration: 2000
 			})
-		}else{
-				getProcessInspecionList(quer.value).then(res => {
-			console.log("res", res);
-			if (res.code == 200) {
-				original.value = res.rows;
-				inspecionList.value = res.rows;
-				uni.hideLoading();
-			}
-		});
-		}	
+		} else {
+			getProcessInspecionList(quer.value).then(res => {
+				console.log("res", res);
+				if (res.code == 200) {
+					original.value = res.rows;
+					inspecionList.value = res.rows;
+					uni.hideLoading();
+				}
+			});
+		}
 	}
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
 		getList()
 	}
+
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		quer.value.keyword = vehicleObj.carrierCode
+		getList()
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	//扫码
 	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;
-					}
-					quer.value.keyword = vehicleObj.carrierCode
-					getList()
-				}
-			);
-		} else {
-			// 测试时用
-				quer.value.keyword = ""
-				getList()
-		}
+		// 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;
+		// 			}
+		// 			quer.value.keyword = vehicleObj.carrierCode
+		// 			getList()
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 		quer.value.keyword = ""
+		// 		getList()
+		// }
 	}
 	//判断开始时间是否大于结束时间
-	function checkTime(time1,time2){
+	function checkTime(time1, time2) {
 		let date1 = new Date(startTime.value);
 		let date2 = new Date(endTime.value);
-		if(date1 > date2) {
+		console.log(endTime.value == "")
+		if (date1 > date2) {
 			return false
 		}
 		return true
-		}
+	}
+
 	function delable(item) {
 		return true
 		// if (store.userInfo.permissions.some(item => item === 'business:outsourcedInspection:remove') && item.status == 0) {
@@ -275,7 +308,7 @@
 							})
 						}
 					})
-	
+
 				} else if (res.cancel) {
 					uni.showToast({
 						title: '已取消',
@@ -288,17 +321,17 @@
 
 	//时间筛选,暂时注释,使用搜索向
 	function timeSizer() {
-		if(!checkTime(startTime.value,endTime.value)) {
+		if (!checkTime(startTime.value, endTime.value)) {
 			console.log("777")
 			uni.showToast({
 				icon: 'none',
 				title: "开始日期不能大于结束日期",
-				duration:2000
+				duration: 2000
 			})
-		}else{
-			getList()	
+		} else {
+			getList()
 		}
-		
+
 	}
 
 	// 筛选函数
@@ -370,7 +403,6 @@
 </script>
 
 <style lang="scss">
-
 	.time-controls {
 		.title {
 			margin: 20% auto 40% auto;
@@ -378,14 +410,14 @@
 
 		.sta {
 			justify-content: flex-start;
-		    align-items: center;
+			align-items: center;
 
 			input {
 				border: 1rpx solid gray;
 				border-radius: 8rpx;
 				width: 100%;
 				// width: 400rpx;
-				flex:1;
+				flex: 1;
 				height: 64rpx;
 			}
 		}
@@ -430,7 +462,7 @@
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
-		flex:1;
+		flex: 1;
 	}
 
 	.daywork-item {

+ 279 - 173
pages/deliveryInspection/scan.vue

@@ -49,7 +49,7 @@
 				<view class="value">{{ lot.inspectionCarrierCode }}</view>
 			</view>
 			<!-- <input type="text" v-model="carrierCode" placeholder="请输入箱号" /> -->
-			<view class="btn uni-row" style="background-color: #ff5555;" @click.stop="handleScanCode">
+			<view class="btn uni-row" style="background-color: #ff5555;" @click="handleScanCode">
 				<uni-icons type="scan" size="16" style="color: #ffffff; margin-right: 8rpx;" />
 				<text>扫描箱码及检测箱码</text>
 			</view>
@@ -57,6 +57,7 @@
 		</view>
 		<dialog-processInspection ref='selectProcessInspection'
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -70,6 +71,7 @@
 		onUnload,
 		onShow
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getDeliveryLotInfo,
 		getCarrierInfoProcess,
@@ -83,6 +85,7 @@
 	} from '../../store';
 	const carrierCode = ref('')
 	const equipmentList = ref([])
+	const showQrCodeReader = ref(false);
 	const userList = ref([])
 	const userId = ref(null)
 	const equipment = ref(null)
@@ -93,199 +96,302 @@
 
 	// 页面生命周期函数
 	onLoad(() => {})
-	const handleScanCode = () => {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret)
-					const result = {
-						carrierCode: ret.resp_result,
-						processCode: ''
-					}
-					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】, 以及该批次关联的其它箱号
-									// 需要定义一个请求方法, 从后端获取
-									getDeliveryLotInfo(result).then(res => {
-										if (res.code == 200) {
-											console.log(res)
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		const result = {
+			carrierCode: data,
+			processCode: ''
+		}
+		if (!result.carrierCode || result.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return
+		}
+		//判断该箱是否绑定批次
 
-											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
-										})
-									})
+		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】, 以及该批次关联的其它箱号
+						// 需要定义一个请求方法, 从后端获取
+						getDeliveryLotInfo(result).then(res => {
+							if (res.code == 200) {
+								console.log(res)
 
-								}
-							} 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
-						})
-					})
-				}
-			)
-		} else {
-			const result = {
-				carrierCode: '000052'
-			}
-			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】, 以及该批次关联的其它箱号
-							// 需要定义一个请求方法, 从后端获取
-							getDeliveryLotInfo(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;
-										lot.value.inspectionCarrierId = '1803605009558978562'
-										lot.value.inspectionCarrierCode = "300057"
-										// console.log("res", res);
-										uni.hideLoading();
-										// 判断是否批次号和检查箱码都扫完
-										checkSave()
-									}
-								} else {
+								if (res.data.dayworkItemList.length == 0) {
 									uni.showToast({
 										icon: 'none',
-										title: res.msg,
+										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()
 								}
-							}).catch(err => {
+							} else {
 								uni.showToast({
 									icon: 'none',
-									title: err.message,
+									title: res.msg,
 									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
-					})
+				} else if (response.data.inspectionCarrier != null) {
+					console.log(response)
+					lot.value.inspectionCarrierCode = response.data.inspectionCarrier.code
+					lot.value.inspectionCarrierId = response.data.inspectionCarrier.id
+					// 判断是否批次号和检查箱码都扫完
+					checkSave()
 				}
-			}).catch(err => {
+			} else {
 				uni.showToast({
 					icon: 'none',
-					title: err.message,
+					title: response.msg,
 					duration: 2000
 				})
+			}
+		}).catch(err => {
+			uni.showToast({
+				icon: 'none',
+				title: err.message,
+				duration: 2000
 			})
-		}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	const handleScanCode = () => {
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			console.log(ret)
+		// 			const result = {
+		// 				carrierCode: ret.resp_result,
+		// 				processCode: ''
+		// 			}
+		// 			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】, 以及该批次关联的其它箱号
+		// 							// 需要定义一个请求方法, 从后端获取
+		// 							getDeliveryLotInfo(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
+		// 								})
+		// 							})
+
+		// 						}
+		// 					} 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
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		carrierCode: '000052'
+		// 	}
+		// 	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】, 以及该批次关联的其它箱号
+		// 					// 需要定义一个请求方法, 从后端获取
+		// 					getDeliveryLotInfo(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;
+		// 								lot.value.inspectionCarrierId = '1803605009558978562'
+		// 								lot.value.inspectionCarrierCode = "300057"
+		// 								// 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
+		// 						})
+		// 					})
 
+		// 				}
+		// 			} 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
+		// 		})
+		// 	})
+		// }
+		showQrCodeReader.value = true;
 	}
 
 	function checkSave() {

+ 1 - 1
pages/drawingMenu/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="uni-column container">
+	<view class="uni-column container" style="position: absolute;top: 0;left: 0;right: 0;">
 		<view style="margin: 12rpx;">
 			<view class="margenTop" style="font-size: 30rpx;font-weight: bold; flex-direction: row;">
 				批次号:{{product.lotCode}}

+ 79 - 39
pages/equipmentList/index.vue

@@ -23,6 +23,7 @@
 		</view>
 	</view>
 	<dialog-confirm ref="confirm" @submit="handleConfirmUnbind" @reflush="reflush"></dialog-confirm>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 
 <script setup>
@@ -35,6 +36,7 @@
 	import {
 		getUserInfo
 	} from '@/api/login/index.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		saveUserequipment,
 		getUserequipmentList,
@@ -52,6 +54,7 @@
 	const userEquipmentData = ref({}) // 保存用
 	const curScanEquipment = ref([])
 	const confirm = ref(null)
+	const showQrCodeReader = ref(false);
 	onLoad(() => {
 		init(); 
 	})
@@ -106,48 +109,85 @@
 	function handleDelEquipmentNo(item, index) {
 		curScanEquipment.value.splice(index, 1);
 	}
-
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+	let equipment = JSON.parse(data);
+	// 判断二维码对不对
+	if (!equipment.equipmentDetailId || equipment.equipmentDetailId == "") {
+		uni.showToast({
+			icon: "none",
+			title: "请扫设备码"
+		})
+		return;
+	}
+	for (let i = 0; i < curScanEquipment.value.length; i++) {
+		if (curScanEquipment.value[i].equipmentDetailId === equipment.equipmentDetailId) {
+			uni.showToast({
+				icon: "none",
+				title: "请勿重复扫码"
+			})
+			return;
+		}
+	}
+	curScanEquipment.value.push(equipment)
+	
+	// 设置绑定员工的信息
+	userEquipmentData.value = {
+		userId: store.userInfo.userId,
+		nickName: store.userInfo.nickName,
+		deptId: store.curDeptDetails.deptId,
+		userEquipmentList: curScanEquipment.value
+	} 
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	function handleScanCode() {
+		showQrCodeReader.value = true;
 		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		// 调用插件的 mpaasScan 方法
-		mpaasScanModule.mpaasScan({
-				// 扫码识别类型,参数可多选,qrCode、barCode,
-				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-				scanType: ["qrCode", "barCode"],
-				// 是否隐藏相册,默认false不隐藏
-				hideAlbum: false,
-			},
-			(ret) => {
-				let equipment = JSON.parse(ret.resp_result);
-				// 判断二维码对不对
-				if (!equipment.equipmentDetailId || equipment.equipmentDetailId == "") {
-					uni.showToast({
-						icon: "none",
-						title: "请扫设备码"
-					})
-					return;
-				}
-				for (let i = 0; i < curScanEquipment.value.length; i++) {
-					if (curScanEquipment.value[i].equipmentDetailId === equipment.equipmentDetailId) {
-						uni.showToast({
-							icon: "none",
-							title: "请勿重复扫码"
-						})
-						return;
-					}
-				}
-				curScanEquipment.value.push(equipment)
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// // 调用插件的 mpaasScan 方法
+		// mpaasScanModule.mpaasScan({
+		// 		// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 		// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 		scanType: ["qrCode", "barCode"],
+		// 		// 是否隐藏相册,默认false不隐藏
+		// 		hideAlbum: false,
+		// 	},
+		// 	(ret) => {
+		// 		let equipment = JSON.parse(ret.resp_result);
+		// 		// 判断二维码对不对
+		// 		if (!equipment.equipmentDetailId || equipment.equipmentDetailId == "") {
+		// 			uni.showToast({
+		// 				icon: "none",
+		// 				title: "请扫设备码"
+		// 			})
+		// 			return;
+		// 		}
+		// 		for (let i = 0; i < curScanEquipment.value.length; i++) {
+		// 			if (curScanEquipment.value[i].equipmentDetailId === equipment.equipmentDetailId) {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请勿重复扫码"
+		// 				})
+		// 				return;
+		// 			}
+		// 		}
+		// 		curScanEquipment.value.push(equipment)
 
-				// 设置绑定员工的信息
-				userEquipmentData.value = {
-					userId: store.userInfo.userId,
-					nickName: store.userInfo.nickName,
-					deptId: store.curDeptDetails.deptId,
-					userEquipmentList: curScanEquipment.value
-				} 
-			}
-		);
+		// 		// 设置绑定员工的信息
+		// 		userEquipmentData.value = {
+		// 			userId: store.userInfo.userId,
+		// 			nickName: store.userInfo.nickName,
+		// 			deptId: store.curDeptDetails.deptId,
+		// 			userEquipmentList: curScanEquipment.value
+		// 		} 
+		// 	}
+		// );
 	}
 	console.log(store)
 	function handleSubmit() {

+ 139 - 89
pages/factoryInspection/index.vue

@@ -6,16 +6,23 @@
 			<!-- <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 class="time-controls"
+			style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
+			<view class="uni-row sta">
+				<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
+				<view class="uni-row" style="flex: 1;width: 100%;">
+					<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
+					<span style="align-items: center;display: flex;">—</span>
+					<input v-model="endTime" type="date" @input="timeSizer" />
+				</view>
+			</view>
 		</view>
 		<view class="uni-row" style="margin-top: 10rpx;">
 			<view class="scan-btn " style="min-height: 80rpx;" @click.stop="handleAddOnSiteInspection">新增出厂检</view>
-			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;" @click.stop="handleScan">扫码</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;"
+				@click.stop="handleScan">扫码</view>
 		</view>
-		
+
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -52,6 +59,7 @@
 				</view>
 			</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -64,6 +72,7 @@
 		getLotInfo,
 		delProcessInspection
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		timestampToTime,
 		toHHmmss
@@ -82,9 +91,11 @@
 	const inspecionList = ref([]); //时间后筛选数组
 	const original = ref([]); //原始数组
 	const startTime = ref(new Date().toISOString().split("T")[0])
+	const endTime = ref(new Date().toISOString().split("T")[0])
 	const pageSize = ref(10)
 	const pageNum = ref(1)
 	const status = ref(true)
+	const showQrCodeReader = ref(false);
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -120,29 +131,29 @@
 		// 	}
 		// });
 	})
-	onReachBottom(()=>{
-			console.log(status.value)
-			if(status.value) {
+	onReachBottom(() => {
+		console.log(status.value)
+		if (status.value) {
 			pageNum.value += 1
 			quer.value.pageNum = pageNum.value
 			quer.value.pageSize = pageSize.value
-			getProcessInspecionList(quer.value).then(res =>{
-			 const existingIds = new Set(inspecionList.value.map(item => item.id));
-			
-			  // 过滤出那些不在 existingIds 中的项,即新数据
-			  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-			
-			  // 如果有新数据,将其添加到 listData
-			  if (newRows.length > 0) {
-				inspecionList.value = inspecionList.value.concat(newRows);
-				original.value = original.value.concat(newRows);
-			  } else {
-				// 如果没有新数据,更新状态表示没有更多数据
-				status.value = false;
-			  }
+			getProcessInspecionList(quer.value).then(res => {
+				const existingIds = new Set(inspecionList.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
 			})
-			}
-		})
+		}
+	})
 
 	/***************************** 定义了一些方法 *****************************/
 
@@ -155,25 +166,37 @@
 		// }
 		pageNum.value = 1
 		quer.value.startTime = startTime.value;
+		quer.value.endTime = endTime.value;
 		quer.value.type = "factoryInspection"
 		quer.value.pageNum = pageNum.value
 		quer.value.pageSize = pageSize.value
-		getProcessInspecionList(quer.value).then(res => {
-			console.log("res", res);
-			if (res.code == 200) {
-				original.value = res.rows;
-				inspecionList.value = res.rows;
-				uni.hideLoading();
-			}
-		});
+		if (!checkTime(quer.value.startTime, quer.value.endTime)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getProcessInspecionList(quer.value).then(res => {
+				console.log("res", res);
+				if (res.code == 200) {
+					original.value = res.rows;
+					inspecionList.value = res.rows;
+					uni.hideLoading();
+				}
+			});
+		}
 	}
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
 		getList()
 	}
+
 	function delable(item) {
-		if(store.userInfo.roles.some(item =>item.roleKey == 'factoryInspection')) {
+		if (store.userInfo.roles.some(item => item.roleKey == 'factoryInspection')) {
 			return true
 		}
 		return false
@@ -211,7 +234,7 @@
 							})
 						}
 					})
-	
+
 				} else if (res.cancel) {
 					uni.showToast({
 						title: '已取消',
@@ -221,46 +244,80 @@
 			}
 		})
 	}
+
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		quer.value.keyword = vehicleObj.carrierCode
+		getList()
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	//扫码
 	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;
-					}
-					quer.value.keyword = vehicleObj.carrierCode
-					getList()
-				}
-			);
-		} else {
-			// 测试时用
-				quer.value.keyword = ""
-				getList()
-		}
+		// 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;
+		// 			}
+		// 			quer.value.keyword = vehicleObj.carrierCode
+		// 			getList()
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 		quer.value.keyword = ""
+		// 		getList()
+		// }
 	}
 
 	//时间筛选,暂时注释,使用搜索向
 	function timeSizer() {
-		getList()
+		if (!checkTime(startTime.value, endTime.value)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getList()
+		}
 	}
 
 	// 筛选函数
@@ -292,6 +349,15 @@
 			url: '/pages/factoryInspection/form'
 		})
 	}
+	//判断开始时间是否大于结束时间
+	function checkTime(time1, time2) {
+		let date1 = new Date(startTime.value);
+		let date2 = new Date(endTime.value);
+		if (date1 > date2) {
+			return false
+		}
+		return true
+	}
 
 	//状态文本
 	function selectText(item) {
@@ -335,37 +401,21 @@
 	.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;
+			justify-content: flex-start;
 			align-items: center;
 
 			input {
 				border: 1rpx solid gray;
 				border-radius: 8rpx;
-				width: 400rpx;
+				width: 100%;
+				// width: 400rpx;
+				flex: 1;
 				height: 64rpx;
 			}
 		}
-
-		button {
-			width: 78%;
-			background-color: #1684fc;
-			color: white;
-			margin: 0 auto;
-		}
 	}
 
 	.page-container {
@@ -407,7 +457,7 @@
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
-		flex:1;
+		flex: 1;
 	}
 
 	.daywork-item {

+ 201 - 106
pages/factoryInspection/scan.vue

@@ -42,6 +42,7 @@
 		</view>
 		<dialog-processInspection ref='selectProcessInspection'
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -55,6 +56,7 @@
 		onUnload,
 		onShow
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getLotInfoByFactoryInspection,
 		getCarrierInfoProcess,
@@ -75,112 +77,30 @@
 	const lot = ref({})
 	const query = ref({})
 	const selectProcessInspection = ref(null)
-
+	const showQrCodeReader = ref(false);
 
 	// 页面生命周期函数
 	onLoad(() => {})
-	const handleScanCode = () => {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret)
-					const result = {
-						carrierCode: ret.resp_result,
-						processCode: ''
-					}
-					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】, 以及该批次关联的其它箱号
-									// 需要定义一个请求方法, 从后端获取
-									getLotInfoByFactoryInspection(result).then(res => {
-										if (res.code == 200) {
-											console.log(res)
-											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
-										})
-									})
-
-								}
-							} 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
-						})
-					})
-				}
-			)
-		} else {
-			const result = {
-				carrierCode: '000682'
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		const result = {
+				carrierCode: data,
+				processCode: ''
+			}
+			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附检查箱信息
@@ -199,15 +119,12 @@
 							getLotInfoByFactoryInspection(result).then(res => {
 								if (res.code == 200) {
 									console.log(res)
-									console.log("888")
 									lot.value = {
 										...lot.value,
 										...res.data
 									};
 									lot.value.carrierCode = result.carrierCode
 									carrierCode.value = result.carrierCode;
-									lot.value.inspectionCarrierId = '1844294555287994371'
-									lot.value.inspectionCarrierCode = "300071"
 									// console.log("res", res);
 									uni.hideLoading();
 									// 判断是否批次号和检查箱码都扫完
@@ -249,7 +166,185 @@
 					duration: 2000
 				})
 			})
-		}
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	const handleScanCode = () => {
+		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)
+		// 			const result = {
+		// 				carrierCode: ret.resp_result,
+		// 				processCode: ''
+		// 			}
+		// 			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】, 以及该批次关联的其它箱号
+		// 							// 需要定义一个请求方法, 从后端获取
+		// 							getLotInfoByFactoryInspection(result).then(res => {
+		// 								if (res.code == 200) {
+		// 									console.log(res)
+		// 									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
+		// 								})
+		// 							})
+
+		// 						}
+		// 					} 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
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		carrierCode: '000682'
+		// 	}
+		// 	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】, 以及该批次关联的其它箱号
+		// 					// 需要定义一个请求方法, 从后端获取
+		// 					getLotInfoByFactoryInspection(result).then(res => {
+		// 						if (res.code == 200) {
+		// 							console.log(res)
+		// 							console.log("888")
+		// 							lot.value = {
+		// 								...lot.value,
+		// 								...res.data
+		// 							};
+		// 							lot.value.carrierCode = result.carrierCode
+		// 							carrierCode.value = result.carrierCode;
+		// 							lot.value.inspectionCarrierId = '1844294555287994371'
+		// 							lot.value.inspectionCarrierCode = "300071"
+		// 							// 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
+		// 						})
+		// 					})
+
+		// 				}
+		// 			} 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
+		// 		})
+		// 	})
+		// }
 
 	}
 

+ 131 - 85
pages/fastProductionPlan/index.vue

@@ -65,7 +65,7 @@
 		</view>
 		<dialog-lotReporting ref="lotReporting" :getList="init" @scan="handleAdd"></dialog-lotReporting>
 		<dialog-Search ref="searchRef" @search="refreshSearch"></dialog-Search>
-
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 	<view
 		style="background-color: #99999999; z-index: 5; position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"
@@ -89,6 +89,7 @@
 		showDayworkSave,
 		turnoverDelete
 	} from '@/api/business/dayWork.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getQuickDayworkList,
 		finishQuick,
@@ -110,7 +111,7 @@
 	const searchRef = ref(null);
 	const keyword = ref('')
 	const loading = ref(false)
-
+	const showQrCodeReader = ref(false);
 	const form = ref([]); //表单数据true
 	const checkAll = ref(false); //是否全选
 
@@ -270,92 +271,137 @@
 			// lotReporting.value.open(data);
 		}
 	*/
-
-	function handleAdd() {
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					getDayworkByCarrierCode({
-						carrierCode: vehicleObj.carrierCode,
-						deptId: store.curDeptDetails.deptId,
-						status: 7
-					}).then(response => {
-						if (response.code == 200) {
-							if (response.data.items.length > 0) {
-								lotReporting.value.open(response.data);
-							} else {
-								uni.showToast({
-									icon: 'none',
-									title: '该批次不在此计划单内, 或不在当前工段',
-									duration: 2000
-								})
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
-					})
-				}
-			);
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+	let vehicleObj = {
+		carrierCode: data
+	};
+	if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		uni.showToast({
+			icon: "none",
+			title: "请扫载具码",
+			duration: 1000
+		})
+		return;
+	}
+	getDayworkByCarrierCode({
+		carrierCode: vehicleObj.carrierCode,
+		deptId: store.curDeptDetails.deptId,
+		status: 7
+	}).then(response => {
+		if (response.code == 200) {
+			if (response.data.items.length > 0) {
+				lotReporting.value.open(response.data);
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: '该批次不在此计划单内, 或不在当前工段',
+					duration: 2000
+				})
+			}
 		} else {
-			// 测试时用
-			getDayworkByCarrierCode({
-				carrierCode: '900005',
-				status: 7,
-				deptId: store.curDeptDetails.deptId,
-			}).then(response => {
-				console.log(response)
-				if (response.code == 200) {
-					// 
-					// if (response.data.items[0].deptId !== store.curDeptDetails.deptId) {
-					// 	uni.showToast({
-					// 		icon: 'none',
-					// 		title: '该批次不在当前工段',
-					// 		duration: 2000
-					// 	})
-					// 	return
-					// }
-					if (response.data.items.length > 0) {
-						// console.log(response.data)
-						lotReporting.value.open(response.data);
-					} else {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次不在此计划单内, 或不在当前工段',
-							duration: 2000
-						})
-					}
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg,
-						duration: 2000
-					})
-				}
+			uni.showToast({
+				icon: 'none',
+				title: response.msg,
+				duration: 2000
 			})
 		}
+	})
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	
+	function handleAdd() {
+		showQrCodeReader.value = true;
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			getDayworkByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 				deptId: store.curDeptDetails.deptId,
+		// 				status: 7
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					if (response.data.items.length > 0) {
+		// 						lotReporting.value.open(response.data);
+		// 					} else {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: '该批次不在此计划单内, 或不在当前工段',
+		// 							duration: 2000
+		// 						})
+		// 					}
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	getDayworkByCarrierCode({
+		// 		carrierCode: '900005',
+		// 		status: 7,
+		// 		deptId: store.curDeptDetails.deptId,
+		// 	}).then(response => {
+		// 		console.log(response)
+		// 		if (response.code == 200) {
+		// 			// 
+		// 			// if (response.data.items[0].deptId !== store.curDeptDetails.deptId) {
+		// 			// 	uni.showToast({
+		// 			// 		icon: 'none',
+		// 			// 		title: '该批次不在当前工段',
+		// 			// 		duration: 2000
+		// 			// 	})
+		// 			// 	return
+		// 			// }
+		// 			if (response.data.items.length > 0) {
+		// 				// console.log(response.data)
+		// 				lotReporting.value.open(response.data);
+		// 			} else {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '该批次不在此计划单内, 或不在当前工段',
+		// 					duration: 2000
+		// 				})
+		// 			}
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	})
+		// }
 		// lotReporting.value.open(data);
 	}
 

+ 139 - 90
pages/firstInspection/index.vue

@@ -6,16 +6,23 @@
 			<!-- <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 class="time-controls"
+			style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
+			<view class="uni-row sta">
+				<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
+				<view class="uni-row" style="flex: 1;width: 100%;">
+					<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
+					<span style="align-items: center;display: flex;">—</span>
+					<input v-model="endTime" type="date" @input="timeSizer" />
+				</view>
+			</view>
 		</view>
 		<view class="uni-row" style="margin-top: 10rpx;">
-			<view class="scan-btn " style="min-height: 80rpx;" @click.stop="handleAddFirstInspection">新增首件检</view>
-			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;" @click.stop="handleScan">扫码</view>
+			<view class="scan-btn " style="min-height: 80rpx;" @click="handleAddFirstInspection">新增首件检</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;"
+				@click="handleScan">扫码</view>
 		</view>
-		
+
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -52,6 +59,7 @@
 				</view>
 			</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -64,6 +72,7 @@
 		getLotInfo,
 		delProcessInspection
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		timestampToTime,
 		toHHmmss
@@ -82,9 +91,11 @@
 	const inspecionList = ref([]); //时间后筛选数组
 	const original = ref([]); //原始数组
 	const startTime = ref(new Date().toISOString().split("T")[0])
+	const endTime = ref(new Date().toISOString().split("T")[0])
 	const pageSize = ref(10)
 	const pageNum = ref(1)
 	const status = ref(true)
+	const showQrCodeReader = ref(false);
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -120,29 +131,29 @@
 		// 	}
 		// });
 	})
-	onReachBottom(()=>{
-			console.log(status.value)
-			if(status.value) {
+	onReachBottom(() => {
+		console.log(status.value)
+		if (status.value) {
 			pageNum.value += 1
 			quer.value.pageNum = pageNum.value
 			quer.value.pageSize = pageSize.value
-			getProcessInspecionList(quer.value).then(res =>{
-			 const existingIds = new Set(inspecionList.value.map(item => item.id));
-			
-			  // 过滤出那些不在 existingIds 中的项,即新数据
-			  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-			
-			  // 如果有新数据,将其添加到 listData
-			  if (newRows.length > 0) {
-				inspecionList.value = inspecionList.value.concat(newRows);
-				original.value = original.value.concat(newRows);
-			  } else {
-				// 如果没有新数据,更新状态表示没有更多数据
-				status.value = false;
-			  }
+			getProcessInspecionList(quer.value).then(res => {
+				const existingIds = new Set(inspecionList.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
 			})
-			}
-		})
+		}
+	})
 
 	/***************************** 定义了一些方法 *****************************/
 	// 新增出厂检
@@ -153,11 +164,13 @@
 			url: '/pages/firstInspection/reviewScan'
 		})
 	}
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
 		getList()
 	}
+
 	function getList() {
 		uni.showLoading({
 			title: '加载中'
@@ -166,18 +179,38 @@
 		pageNum.value = 1
 		quer.value.deptId = store.curDeptDetails.deptId
 		quer.value.startTime = startTime.value;
+		quer.value.endTime = endTime.value;
 		quer.value.type = "firstArticleInspection"
 		quer.value.pageNum = pageNum.value
 		quer.value.pageSize = pageSize.value
-		getProcessInspecionList(quer.value).then(res => {
-			console.log("res", res);
-			if (res.code == 200) {
-				original.value = res.rows;
-				inspecionList.value = res.rows;
-				uni.hideLoading();
-			}
-		});
+		if (!checkTime(quer.value.startTime, quer.value.endTime)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getProcessInspecionList(quer.value).then(res => {
+				console.log("res", res);
+				if (res.code == 200) {
+					original.value = res.rows;
+					inspecionList.value = res.rows;
+					uni.hideLoading();
+				}
+			});
+		}
 	}
+	//判断开始时间是否大于结束时间
+	function checkTime(time1, time2) {
+		let date1 = new Date(startTime.value);
+		let date2 = new Date(endTime.value);
+		if (date1 > date2) {
+			return false
+		}
+		return true
+	}
+
 	function delable(item) {
 		if (item.creatorId === store.userInfo.userId) {
 			return true
@@ -217,7 +250,7 @@
 							})
 						}
 					})
-	
+
 				} else if (res.cancel) {
 					uni.showToast({
 						title: '已取消',
@@ -227,46 +260,79 @@
 			}
 		})
 	}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		quer.value.keyword = vehicleObj.carrierCode
+		getList()
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	//扫码
 	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;
-					}
-					quer.value.keyword = vehicleObj.carrierCode
-					getList()
-				}
-			);
-		} else {
-			// 测试时用
-				quer.value.keyword = ""
-				getList()
-		}
+		// 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;
+		// 			}
+		// 			quer.value.keyword = vehicleObj.carrierCode
+		// 			getList()
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 		quer.value.keyword = ""
+		// 		getList()
+		// }
 	}
 
 	//时间筛选,暂时注释,使用搜索向
 	function timeSizer() {
-		getList()
+		if (!checkTime(startTime.value, endTime.value)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getList()
+		}
 	}
 
 	// 筛选函数
@@ -326,44 +392,27 @@
 		}
 		unfitInfos.value.push(info)
 	}
-
 </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;
+			justify-content: flex-start;
 			align-items: center;
 
 			input {
 				border: 1rpx solid gray;
 				border-radius: 8rpx;
-				width: 400rpx;
+				width: 100%;
+				// width: 400rpx;
+				flex: 1;
 				height: 64rpx;
 			}
 		}
-
-		button {
-			width: 78%;
-			background-color: #1684fc;
-			color: white;
-			margin: 0 auto;
-		}
 	}
 
 	.page-container {
@@ -405,7 +454,7 @@
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
-		flex:1;
+		flex: 1;
 	}
 
 	.daywork-item {

+ 195 - 95
pages/firstInspection/reviewScan.vue

@@ -55,6 +55,7 @@
 			</view>
 			<view class="btn uni-row" style="margin-top: 48rpx;" @click.stop="handleConfirm">确定</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -68,6 +69,7 @@
 		onUnload,
 		onShow
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getLotInfoByFirstInspection,
 		getCarrierInfoProcess,
@@ -91,23 +93,12 @@
 	const equipment = ref(null)
 	const lot = ref({})
 	const query = ref({})
-	// 页面生命周期函数
-	const handleScanCode = () => {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret)
-					const result = {
-						carrierCode: ret.resp_result,
+	const showQrCodeReader = ref(false);
+	
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+			const result = {
+						carrierCode: data,
 						processCode: '',
 						deptId: store.curDeptDetails.deptId
 					}
@@ -192,88 +183,197 @@
 							duration: 2000
 						})
 					})
-				}
-			)
-		} else {
-			const result = {
-				carrierCode: '300027',
-				deptId: store.curDeptDetails.deptId
-			}
-			getCarrierInfo(result).then(response => {
-				if (response.code == 200) {
-					// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-					// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-					if (response.data.dayworkCarriers != null) {
-						if (response.data.dayworkCarriers.length > 1) {
-							query.value = result;
-							query.value.deptId = store.curDeptDetails.deptId
-							selectProcessInspection.value.open(response.data.dayworkCarriers)
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	// 页面生命周期函数
+	const handleScanCode = () => {
+		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)
+		// 			const result = {
+		// 				carrierCode: ret.resp_result,
+		// 				processCode: '',
+		// 				deptId: store.curDeptDetails.deptId
+		// 			}
+		// 			if (!result.carrierCode || result.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return
+		// 			}
+		// 			//判断该箱是否绑定批次
 
-						} else {
+		// 			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
+		// 							getFirstInspectionLotInfo(result).then(res => {
+		// 								if (res.code == 200) {
+		// 									console.log(res)
+		// 									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
+		// 								})
+		// 							})
 
-							// console.log(response)
-							uni.showLoading({
-								title: '加载中'
-							});
-							// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
-							// 需要定义一个请求方法, 从后端获取
+		// 						}
+		// 					} 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
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		carrierCode: '300027',
+		// 		deptId: store.curDeptDetails.deptId
+		// 	}
+		// 	getCarrierInfo(result).then(response => {
+		// 		if (response.code == 200) {
+		// 			// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+		// 			// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+		// 			if (response.data.dayworkCarriers != null) {
+		// 				if (response.data.dayworkCarriers.length > 1) {
+		// 					query.value = result;
+		// 					query.value.deptId = store.curDeptDetails.deptId
+		// 					selectProcessInspection.value.open(response.data.dayworkCarriers)
 
-							getFirstInspectionLotInfo(result).then(res => {
-								if (res.code == 200) {
-									console.log(res)
-									console.log("888")
-									getUser(res.data.dayworkItemList)
-									getEquipment(res.data.dayworkItemList)
-									lot.value = {
-										...lot.value,
-										...res.data
-									};
-									lot.value.carrierCode = result.carrierCode
-									carrierCode.value = result.carrierCode;
-									lot.value.inspectionCarrierId = '1803605009533812742'
-									lot.value.inspectionCarrierCode = "300025"
-									// 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
-								})
-							})
+		// 				} else {
 
-						}
-					} 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
-				})
-			})
-		}
+		// 					// console.log(response)
+		// 					uni.showLoading({
+		// 						title: '加载中'
+		// 					});
+		// 					// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
+		// 					// 需要定义一个请求方法, 从后端获取
+
+		// 					getFirstInspectionLotInfo(result).then(res => {
+		// 						if (res.code == 200) {
+		// 							console.log(res)
+		// 							console.log("888")
+		// 							getUser(res.data.dayworkItemList)
+		// 							getEquipment(res.data.dayworkItemList)
+		// 							lot.value = {
+		// 								...lot.value,
+		// 								...res.data
+		// 							};
+		// 							lot.value.carrierCode = result.carrierCode
+		// 							carrierCode.value = result.carrierCode;
+		// 							lot.value.inspectionCarrierId = '1803605009533812742'
+		// 							lot.value.inspectionCarrierCode = "300025"
+		// 							// 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
+		// 						})
+		// 					})
+
+		// 				}
+		// 			} 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
+		// 		})
+		// 	})
+		// }
 
 	}
 

+ 143 - 83
pages/firstInspection/scan.vue

@@ -65,6 +65,7 @@
 			</view>
 			<view class="btn uni-row" style="margin-top: 48rpx;" @click.stop="handleConfirm">确定</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -83,6 +84,7 @@
 		getCarrierInfoProcess,
 		getFirstCarrierInfo,
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		debounce
 	} from '../../utils/common';
@@ -108,6 +110,7 @@
 	const equipment = ref(null)
 	const lot = ref({})
 	const query = ref({})
+	const showQrCodeReader = ref(false);
 
 
 	// 页面生命周期函数
@@ -161,107 +164,164 @@
 		})
 	})
 	const handleScanCode = () => {
+		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)
-					const result = {
-						dayworkId: store.dayworkInfo.id,
-						deptId: store.curDeptDetails.deptId,
-						carrierCode: ret.resp_result
-					}
-					if (!result.carrierCode || result.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫检测载具码",
-							duration: 1000
-						})
-						return
-					}
-					//判断该箱是否绑定批次
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			console.log(ret)
+		// 			const result = {
+		// 				dayworkId: store.dayworkInfo.id,
+		// 				deptId: store.curDeptDetails.deptId,
+		// 				carrierCode: ret.resp_result
+		// 			}
+		// 			if (!result.carrierCode || result.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫检测载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return
+		// 			}
+		// 			//判断该箱是否绑定批次
 
-					result.processCode = store.outsourcedCode;
-					// console.log(result.processCode)
-					/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
-					getFirstCarrierInfo(result).then(response => {
-						if (response.code == 200) {
-							// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-							// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-							if (response.data.dayworkCarriers != null) {
-								uni.showToast({
-									icon: 'none',
-									title: "请扫检测载具码",
-									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
-							}
-						} else {
+		// 			result.processCode = store.outsourcedCode;
+		// 			// console.log(result.processCode)
+		// 			/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
+		// 			getFirstCarrierInfo(result).then(response => {
+		// 				if (response.code == 200) {
+		// 					// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+		// 					// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+		// 					if (response.data.dayworkCarriers != null) {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: "请扫检测载具码",
+		// 							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
+		// 					}
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			}).catch(err => {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: err.message,
+		// 					duration: 2000
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		dayworkId: store.dayworkInfo.id,
+		// 		deptId: store.curDeptDetails.deptId,
+		// 		carrierCode: '300037'
+		// 	}
+		// 	getFirstCarrierInfo(result).then(response => {
+		// 		if (response.code == 200) {
+		// 			// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+		// 			// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+		// 			if (response.data.dayworkCarriers != null) {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: "请扫检测载具码",
+		// 					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
+		// 			}
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	}).catch(err => {
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: err.message,
+		// 			duration: 2000
+		// 		})
+		// 	})
+		// }
+
+	}
+//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		const result = {
+					dayworkId: store.dayworkInfo.id,
+					deptId: store.curDeptDetails.deptId,
+					carrierCode: data
+				}
+				if (!result.carrierCode || result.carrierCode == "") {
+					uni.showToast({
+						icon: "none",
+						title: "请扫检测载具码",
+						duration: 1000
+					})
+					return
+				}
+				//判断该箱是否绑定批次
+
+				result.processCode = store.outsourcedCode;
+				// console.log(result.processCode)
+				/************************ 根据扫码查询到的数据和需要检查的工序查询信息 ************************/
+				getFirstCarrierInfo(result).then(response => {
+					if (response.code == 200) {
+						// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+						// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+						if (response.data.dayworkCarriers != null) {
 							uni.showToast({
 								icon: 'none',
-								title: response.msg,
+								title: "请扫检测载具码",
 								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
 						}
-					}).catch(err => {
-						uni.showToast({
-							icon: 'none',
-							title: err.message,
-							duration: 2000
-						})
-					})
-				}
-			)
-		} else {
-			const result = {
-				dayworkId: store.dayworkInfo.id,
-				deptId: store.curDeptDetails.deptId,
-				carrierCode: '300037'
-			}
-			getFirstCarrierInfo(result).then(response => {
-				if (response.code == 200) {
-					// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-					// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-					if (response.data.dayworkCarriers != null) {
+					} else {
 						uni.showToast({
 							icon: 'none',
-							title: "请扫检测载具码",
+							title: response.msg,
 							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
 					}
-				} else {
+				}).catch(err => {
 					uni.showToast({
 						icon: 'none',
-						title: response.msg,
+						title: err.message,
 						duration: 2000
 					})
-				}
-			}).catch(err => {
-				uni.showToast({
-					icon: 'none',
-					title: err.message,
-					duration: 2000
 				})
-			})
-		}
-
 	}
-
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	function getEquipment(data) {
 		const uniqueEquipmentMap = new Map();
 		let filterList = data.filter(info => info.userId == store.userInfo.userId)

+ 126 - 78
pages/handlingList/index.vue

@@ -194,6 +194,7 @@
 	</view>
 	<dialog-turnoverTask ref="turnoverTask"></dialog-turnoverTask>
 	<dialog-changeTurnover ref="changeTurnoverDialog" @reflushTurnoverList="reflush()" />
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 
 <script setup>
@@ -205,7 +206,7 @@
 		onShow
 	} from '@dcloudio/uni-app'
 	// import pending from './pending';
-	// import turnover from './turnover';
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getDayWorkItemList,
 		getItemList,
@@ -244,6 +245,7 @@
 		selecter: false
 	})
 	const changeTurnoverDialog = ref(null)
+	const showQrCodeReader = ref(false);
 	const selection = ref([])
 	const selectedInfo = ref({})
 	const curProcessAfte = ref([])
@@ -506,6 +508,52 @@
 		//多选
 		// return selection.value.includes(item);
 	}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		getHandlingByCarrierCode({
+			carrierCode: vehicleObj.carrierCode
+		}).then(response => {
+			if (response.code == 200) {
+				uni.showToast({
+					icon: 'success',
+					title: '已送达',
+					duration: 1000
+				})
+				reflush()
+				debounce(handleScan, 700)
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		}).catch(err => {
+			console.log(err)
+			uni.showToast({
+				icon: 'none',
+				title: err.message
+			})
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 
 	async function handleScan() {
 		// 先判断是否在盘点中假设不在盘点中则可以继续
@@ -518,83 +566,83 @@
 			})
 			return
 		}
-
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					getHandlingByCarrierCode({
-						carrierCode: vehicleObj.carrierCode
-					}).then(response => {
-						if (response.code == 200) {
-							uni.showToast({
-								icon: 'success',
-								title: '已送达',
-								duration: 1000
-							})
-							reflush()
-							debounce(handleScan, 700)
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
-					}).catch(err => {
-						console.log(err)
-						uni.showToast({
-							icon: 'none',
-							title: err.message
-						})
-					})
-				}
-			);
-		} else {
-			// 测试时用
-			getHandlingByCarrierCode({
-				carrierCode: '000828'
-			}).then(response => {
-				if (response.code == 200) {
-					uni.showToast({
-						icon: 'success',
-						title: '已送达'
-					})
-					reflush()
-					debounce(handleScan, 700)
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg,
-						duration: 2000
-					})
-				}
-			}).catch(err => {
-				console.log(err)
-				uni.showToast({
-					icon: 'none',
-					title: err.message
-				})
-			})
-		}
+		showQrCodeReader.value = true;
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			getHandlingByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					uni.showToast({
+		// 						icon: 'success',
+		// 						title: '已送达',
+		// 						duration: 1000
+		// 					})
+		// 					reflush()
+		// 					debounce(handleScan, 700)
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			}).catch(err => {
+		// 				console.log(err)
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: err.message
+		// 				})
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	getHandlingByCarrierCode({
+		// 		carrierCode: '000828'
+		// 	}).then(response => {
+		// 		if (response.code == 200) {
+		// 			uni.showToast({
+		// 				icon: 'success',
+		// 				title: '已送达'
+		// 			})
+		// 			reflush()
+		// 			debounce(handleScan, 700)
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	}).catch(err => {
+		// 		console.log(err)
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: err.message
+		// 		})
+		// 	})
+		// }
 	}
 
 	function handleSelection(item) {

+ 152 - 136
pages/innerTurnover/index.vue

@@ -1,130 +1,133 @@
 <template>
 	<view style="height: 100%;display: flex;flex-direction: column;justify-content: space-between;">
-	<view class="tab-container">
-		<view :class="['tab-item', isActiveId === 1 ? 'active': '']" @click="handleClickInner(1)">车间内</view>
-		<view :class="['tab-item', isActiveId === 2 ? 'active': '']" @click="handleClickOut(2)">车间外</view>
-	</view>
-	<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="top-btn-container uni-row">
-		<button v-if="!checkAll" :disabled="(isActiveId === 1 && innerTurnoverList.length === 0) || (isActiveId === 2 && outTurnoverList.length === 0)" class="bottom-btn" @click="handleAll">全选</button>
-		<button v-else class="bottom-btn" @click="handleAll">取消全选</button>
-	</view>
-	<scroll-view class="scroll-container" scroll-y v-if="isActiveId == 1">
-		<view v-if="innerTurnoverList.length == 0" class="no-date">
-			<text>暂无车间内周转批次</text>
+		<view class="tab-container">
+			<view :class="['tab-item', isActiveId === 1 ? 'active': '']" @click="handleClickInner(1)">车间内</view>
+			<view :class="['tab-item', isActiveId === 2 ? 'active': '']" @click="handleClickOut(2)">车间外</view>
 		</view>
-		<!-- 车间内列表 -->
-		<view v-for="(item, index) in innerTurnoverList" :key="index"
-			:class="{'scroll-item':true,'selected':isSelected(item)}" @click="handleSelection(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>
-			<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['carrierName'] ? item['carrierName'] : '-' }}</text>
+		<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="item-info uni-row">
-				<text class="label">合格数量</text>
-				<text class="label right">{{ item['temporaryProcessQualifiedNum']}}</text>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">当前工序</text>
-				<view class="label right uni-row">
-					{{ item.currentProcess ? item['currentProcess'].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['deptName'] }}</text>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">摆放位置</text>
-				<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">操作者</text>
-				<text class="label right">{{ item['creatorName']  }}</text>
+			<view class="search" @click="handleSearch">
+				搜索
 			</view>
 		</view>
-	</scroll-view>
-	<scroll-view class="scroll-container" scroll-y v-if="isActiveId == 2">
-		<view v-if="outTurnoverList.length == 0" class="no-date">
-			<text>暂无车间外周转批次</text>
+		<view class="top-btn-container uni-row">
+			<button v-if="!checkAll"
+				:disabled="(isActiveId === 1 && innerTurnoverList.length === 0) || (isActiveId === 2 && outTurnoverList.length === 0)"
+				class="bottom-btn" @click="handleAll">全选</button>
+			<button v-else class="bottom-btn" @click="handleAll">取消全选</button>
 		</view>
-		<view  v-for="(item, index) in outTurnoverList" :key="index" :class="{'scroll-item':true,'selected':isSelected(item)}" @click="handleSelection(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>
-			<view class="item-info uni-row">
-				<text class="label">产品描述</text>
-				<text class="label right">{{ item['productDescription'] }}</text>
+		<scroll-view class="scroll-container" scroll-y v-if="isActiveId == 1">
+			<view v-if="innerTurnoverList.length == 0" class="no-date">
+				<text>暂无车间内周转批次</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['temporaryProcessQualifiedNum']}}</text>
-			</view>
-			<view class="item-info uni-row">
-				<text class="label">当前工序</text>
-				<view class="label right uni-row">
-					{{ item.currentProcess ? item['currentProcess'].processAlias : '-' }}
-					(<view style="color:  #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
-					</view>)
+			<!-- 车间内列表 -->
+			<view v-for="(item, index) in innerTurnoverList" :key="index"
+				:class="{'scroll-item':true,'selected':isSelected(item)}" @click="handleSelection(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>
+				<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['carrierName'] ? item['carrierName'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">合格数量</text>
+					<text class="label right">{{ item['temporaryProcessQualifiedNum']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前工序</text>
+					<view class="label right uni-row">
+						{{ item.currentProcess ? item['currentProcess'].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['deptName'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">摆放位置</text>
+					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">操作者</text>
+					<text class="label right">{{ item['creatorName']  }}</text>
 				</view>
 			</view>
-			<view class="item-info uni-row">
-				<text class="label">下序工段</text>
-				<text class="label right">{{ item['deptName'] }}</text>
+		</scroll-view>
+		<scroll-view class="scroll-container" scroll-y v-if="isActiveId == 2">
+			<view v-if="outTurnoverList.length == 0" class="no-date">
+				<text>暂无车间外周转批次</text>
 			</view>
-			<view class="item-info uni-row">
-				<text class="label">摆放位置</text>
-				<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+			<view v-for="(item, index) in outTurnoverList" :key="index"
+				:class="{'scroll-item':true,'selected':isSelected(item)}" @click="handleSelection(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>
+				<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['carrierName'] ? item['carrierName'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">合格数量</text>
+					<text class="label right">{{ item['temporaryProcessQualifiedNum']}}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">当前工序</text>
+					<view class="label right uni-row">
+						{{ item.currentProcess ? item['currentProcess'].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['deptName'] }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">摆放位置</text>
+					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+				</view>
+				<view class="item-info uni-row">
+					<text class="label">操作者</text>
+					<text class="label right">{{ item['creatorName']  }}</text>
+				</view>
 			</view>
-			<view class="item-info uni-row">
-				<text class="label">操作者</text>
-				<text class="label right">{{ item['creatorName']  }}</text>
+		</scroll-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>
+		</uni-drawer>
+		<view class="bottom-btn-container uni-row">
+			<button class="bottom-btn" @click="handleStartTurnover">确认周转</button>
 		</view>
-	</scroll-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>
-	</uni-drawer>
-	<view class="bottom-btn-container uni-row">
-		<button class="bottom-btn" @click="handleStartTurnover">确认周转</button>
-	</view>
 	</view>
 </template>
 
@@ -208,12 +211,13 @@
 		}
 
 	}
+
 	function handleSearch() {
 		checkAll.value = false
 		selection.value = []
-		if(isActiveId.value == 1) {
+		if (isActiveId.value == 1) {
 			getInnerList()
-		}else {
+		} else {
 			getOutList()
 		}
 	}
@@ -246,28 +250,29 @@
 
 		}
 	}
+
 	function handleStartTurnover() {
-		if(selection.value.length == 0) {
+		if (selection.value.length == 0) {
 			uni.showToast({
 				icon: "none",
 				title: "至少选中一批周转",
 				duration: 2000
 			})
-		}else{
+		} else {
 			uni.showModal({
 				title: '提示',
 				content: `是否已经送达?`,
 				success: function(res) {
 					if (res.confirm) {
 						let dayworkItemList = []
-						selection.value.forEach(item =>{
+						selection.value.forEach(item => {
 							dayworkItemList.push(item.dayworkItemList[0])
 						})
-						updateDayworkItemInnerTurnover(dayworkItemList).then(res =>{
-							if(res.code == 200) {
-								if(isActiveId.value == 1) {
+						updateDayworkItemInnerTurnover(dayworkItemList).then(res => {
+							if (res.code == 200) {
+								if (isActiveId.value == 1) {
 									getInnerList()
-								}else {
+								} else {
 									getOutList()
 								}
 							}
@@ -275,7 +280,7 @@
 					} else {}
 				}
 			})
-		
+
 		}
 	}
 
@@ -337,6 +342,7 @@
 	.scroll-container {
 		height: calc(100% - 206px);
 		background-color: #f5f5f5;
+		margin-bottom: 78px;
 
 		.no-date {
 			text-align: center;
@@ -344,54 +350,55 @@
 			color: #666;
 			padding-top: 16px;
 		}
+
 		.scroll-item {
 			background-color: #fff;
 			padding: 24rpx;
 			margin: 24rpx;
 			border-radius: 8rpx;
-		
+
 			.title-container {
 				justify-content: space-between;
 				margin-top: 8rpx;
 				margin-bottom: 16rpx;
-		
+
 				.title {
 					height: 48rpx;
 					align-items: center;
-		
+
 					.label {
 						color: #1684fc;
 						font-size: 32rpx;
 						font-weight: bold;
-		
+
 						&.code {
 							color: #000000;
 							margin-left: 32rpx;
 						}
 					}
 				}
-		
+
 			}
-		
+
 			.item-info {
 				margin-bottom: 16rpx;
-		
+
 				.label {
 					font-size: 28rpx;
 					width: 160rpx;
 					color: #808080;
-		
+
 					&.right {
 						flex: 1;
 						color: #000000;
 					}
 				}
 			}
-		
+
 			.right-info {
 				justify-content: flex-end;
 				margin-top: 2rpx;
-		
+
 				.label {
 					font-size: 28rpx;
 					color: #808080;
@@ -472,16 +479,25 @@
 	}
 
 	.bottom-btn-container {
-		height: 50px;
+		height: 10%;
+		position: fixed;
+		right: 0;
+		bottom: 0;
+		left: 0;
+		height: 100rpx;
 		border-top: 1px solid #999999;
-		padding: 0 32px;
+		padding: 16rpx 32rpx;
 		align-items: center;
 		background-color: #fff;
+		justify-content: space-evenly;
 
 		.bottom-btn {
 			flex: 1;
-			font-size: 28rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 8rpx;
 			color: #FFFFFF;
+			font-size: 28rpx;
 			background-color: #1684fc;
 		}
 	}

+ 166 - 116
pages/instrumentRoomInspection/index.vue

@@ -6,13 +6,19 @@
 			<!-- <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 class="time-controls"
+			style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
+			<view class="uni-row sta">
+				<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
+				<view class="uni-row" style="flex: 1;width: 100%;">
+					<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
+					<span style="align-items: center;display: flex;">—</span>
+					<input v-model="endTime" type="date" @input="timeSizer" />
+				</view>
+			</view>
 		</view>
 		<view class="uni-row" style="margin-top: 10rpx;">
-			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;" @click.stop="handleScan">扫码</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;" @click="handleScan">扫码</view>
 		</view>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
@@ -50,6 +56,7 @@
 				</view>
 			</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -63,6 +70,7 @@
 		getLotInfo,
 		delProcessInspection
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		timestampToTime,
 		toHHmmss
@@ -79,12 +87,14 @@
 	} from '@/store/index.js'
 	const keyword = ref('')
 	const inspecionList = ref([]); //时间后筛选数组
-	
+
 	const startTime = ref(new Date().toISOString().split("T")[0])
+	const endTime = ref(new Date().toISOString().split("T")[0])
 	const shouldCallList = ref(false)
 	const pageSize = ref(10)
 	const pageNum = ref(1)
 	const status = ref(true)
+	const showQrCodeReader = ref(false);
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -104,60 +114,60 @@
 
 	/***************************** 页面生命周期函数 *****************************/
 	onShow(() => {
-		console.log(inspecionList.value,15151)
+		console.log(inspecionList.value, 15151)
 		inspecionList.value = []
 		shouldCallList.value = false
-		    const instance = getCurrentInstance().proxy;
-		    const eventChannel = instance.getOpenerEventChannel();
-	// 声明一个变量来保存 setTimeout 的 ID
-	let timeoutId;
-	
-	// 监听 'inspectionChamberInfo' 事件
-	eventChannel.on('inspectionChamberInfo', function(data) {
-	  console.log("Event received with data:", data);
-	  
-	  // 事件触发时取消 setTimeout
-	  clearTimeout(timeoutId);
-	
-	  // 更新状态
-	  quer.value.inspectionChamberId = data.data;
-	  shouldCallList.value = true;
-	
-	  // 事件触发时执行的逻辑
-	  getList();
-	});
-	
-	// 设置 setTimeout,在没有接收到事件的情况下调用 getList
-	timeoutId = setTimeout(() => {
-	  if (!shouldCallList.value) {
-	    console.log("777 - No event received, calling getList");
-	    getList();
-	  }
-	}, 1000); // 例如,1 秒后执行
+		const instance = getCurrentInstance().proxy;
+		const eventChannel = instance.getOpenerEventChannel();
+		// 声明一个变量来保存 setTimeout 的 ID
+		let timeoutId;
+
+		// 监听 'inspectionChamberInfo' 事件
+		eventChannel.on('inspectionChamberInfo', function(data) {
+			console.log("Event received with data:", data);
+
+			// 事件触发时取消 setTimeout
+			clearTimeout(timeoutId);
+
+			// 更新状态
+			quer.value.inspectionChamberId = data.data;
+			shouldCallList.value = true;
+
+			// 事件触发时执行的逻辑
+			getList();
+		});
+
+		// 设置 setTimeout,在没有接收到事件的情况下调用 getList
+		timeoutId = setTimeout(() => {
+			if (!shouldCallList.value) {
+				console.log("777 - No event received, calling getList");
+				getList();
+			}
+		}, 1000); // 例如,1 秒后执行
 	})
-	onReachBottom(()=>{
-			console.log(status.value)
-			if(status.value) {
+	onReachBottom(() => {
+		console.log(status.value)
+		if (status.value) {
 			pageNum.value += 1
 			quer.value.pageNum = pageNum.value
 			quer.value.pageSize = pageSize.value
-			getProcessInspecionList(quer.value).then(res =>{
-			 const existingIds = new Set(inspecionList.value.map(item => item.id));
-			
-			  // 过滤出那些不在 existingIds 中的项,即新数据
-			  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-			
-			  // 如果有新数据,将其添加到 listData
-			  if (newRows.length > 0) {
-				inspecionList.value = inspecionList.value.concat(newRows);
-				original.value = original.value.concat(newRows);
-			  } else {
-				// 如果没有新数据,更新状态表示没有更多数据
-				status.value = false;
-			  }
+			getProcessInspecionList(quer.value).then(res => {
+				const existingIds = new Set(inspecionList.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
 			})
-			}
-		})
+		}
+	})
 
 	/***************************** 定义了一些方法 *****************************/
 
@@ -167,25 +177,46 @@
 		});
 		pageNum.value = 1
 		quer.value.startTime = startTime.value;
+		quer.value.endTime = endTime.value
 		// quer.value.deptId = store.curDeptDetails.deptId
 		quer.value.type = "instrumentRoomInspection"
 		quer.value.pageNum = pageNum.value
 		quer.value.pageSize = pageSize.value
-		getProcessInspecionList(quer.value).then(res => {
-			console.log("res", res);
-			if (res.code == 200) {
-				inspecionList.value = res.rows;
-				console.log(1111111)
-				uni.hideLoading();
-			}
-		});
+		if (!checkTime(quer.value.startTime, quer.value.endTime)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getProcessInspecionList(quer.value).then(res => {
+				console.log("res", res);
+				if (res.code == 200) {
+					inspecionList.value = res.rows;
+					console.log(1111111)
+					uni.hideLoading();
+				}
+			});
+		}
 		uni.hideLoading();
 	}
+	//判断开始时间是否大于结束时间
+	function checkTime(time1, time2) {
+		let date1 = new Date(startTime.value);
+		let date2 = new Date(endTime.value);
+		if (date1 > date2) {
+			return false
+		}
+		return true
+	}
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
 		getList()
 	}
+
 	function delable(item) {
 		if (item.creatorId === store.userInfo.userId) {
 			return true
@@ -209,7 +240,7 @@
 							})
 						}
 					})
-	
+
 				} else if (res.cancel) {
 					uni.showToast({
 						title: '已取消',
@@ -235,46 +266,80 @@
 			}
 		})
 	}
+
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		quer.value.keyword = vehicleObj.carrierCode
+		getList()
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	//扫码
 	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;
-					}
-					quer.value.keyword = vehicleObj.carrierCode
-					getList()
-				}
-			);
-		} else {
-			// 测试时用
-				quer.value.keyword = ""
-				getList()
-		}
+		// 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;
+		// 			}
+		// 			quer.value.keyword = vehicleObj.carrierCode
+		// 			getList()
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 		quer.value.keyword = ""
+		// 		getList()
+		// }
 	}
 
 	//时间筛选,暂时注释,使用搜索向
 	function timeSizer() {
-		getList()
+		if (!checkTime(startTime.value, endTime.value)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getList()
+		}
 	}
 
 	// 筛选函数
@@ -342,37 +407,21 @@
 	.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;
+			justify-content: flex-start;
 			align-items: center;
 
 			input {
 				border: 1rpx solid gray;
 				border-radius: 8rpx;
-				width: 400rpx;
+				width: 100%;
+				// width: 400rpx;
+				flex: 1;
 				height: 64rpx;
 			}
 		}
-
-		button {
-			width: 78%;
-			background-color: #1684fc;
-			color: white;
-			margin: 0 auto;
-		}
 	}
 
 	.page-container {
@@ -406,6 +455,7 @@
 			align-items: center;
 		}
 	}
+
 	.scan-btn {
 		height: 64rpx;
 		color: #ffffff;
@@ -413,7 +463,7 @@
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
-		flex:1;
+		flex: 1;
 	}
 
 	.daywork-item {

+ 148 - 86
pages/onSiteInspection/index.vue

@@ -1,21 +1,28 @@
 <template>
-	<view class="page-container uni-column" >
+	<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="handleSearch">搜索</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 class="time-controls"
+			style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
+			<view class="uni-row sta">
+				<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
+				<view class="uni-row" style="flex: 1;width: 100%;">
+					<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
+					<span style="align-items: center;display: flex;">—</span>
+					<input v-model="endTime" type="date" @input="timeSizer" />
+				</view>
+			</view>
 		</view>
 		<view class="uni-row" style="margin-top: 10rpx;">
 			<view class="scan-btn " style="min-height: 80rpx;" @click.stop="handleAddOnSiteInspection">新增巡检</view>
-			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;" @click.stop="handleScan">扫码</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;"
+				@click.stop="handleScan">扫码</view>
 		</view>
-		<view class="daywork-item uni-column " id ="data" v-for="(item, index) in inspecionList" :key="index"
+		<view class="daywork-item uni-column " id="data" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
 				<text>批次号:{{ item.lotCode }}</text>
@@ -42,15 +49,16 @@
 					<view class="value">{{ item.productDescription }}</view>
 				</view>
 				<view class="info-row uni-row">
-				<view class="label">检测载具:</view>
-				<view class="value">{{ item.inspectionCarrierCode }}
-					{{ item.isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
-				</view>
-				<button class="reporting-tag" size="mini" type="primary"
-					@click.stop="changeCheckCarrier(item)">检测载具</button>
+					<view class="label">检测载具:</view>
+					<view class="value">{{ item.inspectionCarrierCode }}
+						{{ item.isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
+					</view>
+					<button class="reporting-tag" size="mini" type="primary"
+						@click.stop="changeCheckCarrier(item)">检测载具</button>
 				</view>
 			</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -78,13 +86,16 @@
 	import {
 		store
 	} from '@/store/index.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	const keyword = ref('')
 	const inspecionList = ref([]); //时间后筛选数组
 	const original = ref([]); //原始数组
 	const startTime = ref(new Date().toISOString().split("T")[0])
+	const endTime = ref(new Date().toISOString().split("T")[0])
 	const pageSize = ref(10)
 	const pageNum = ref(1)
 	const status = ref(true)
+	const showQrCodeReader = ref(false);
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -123,53 +134,75 @@
 
 	/***************************** 定义了一些方法 *****************************/
 
-	onReachBottom(()=>{
+	onReachBottom(() => {
 		console.log(status.value)
-		if(status.value) {
-		pageNum.value += 1
-		quer.value.pageNum = pageNum.value
-		quer.value.pageSize = pageSize.value
-		getProcessInspecionList(quer.value).then(res =>{
-		 const existingIds = new Set(inspecionList.value.map(item => item.id));
-		
-		  // 过滤出那些不在 existingIds 中的项,即新数据
-		  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-		
-		  // 如果有新数据,将其添加到 listData
-		  if (newRows.length > 0) {
-		    inspecionList.value = inspecionList.value.concat(newRows);
-			original.value = original.value.concat(newRows);
-		  } else {
-		    // 如果没有新数据,更新状态表示没有更多数据
-		    status.value = false;
-		  }
-		})
+		if (status.value) {
+			pageNum.value += 1
+			quer.value.pageNum = pageNum.value
+			quer.value.pageSize = pageSize.value
+			getProcessInspecionList(quer.value).then(res => {
+				const existingIds = new Set(inspecionList.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
+			})
 		}
 	})
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
 		getList()
 	}
+
 	function getList() {
 		uni.showLoading({
 			title: '加载中'
 		});
 		pageNum.value = 1
 		quer.value.startTime = startTime.value;
+		quer.value.endTime = endTime.value;
 		quer.value.deptId = store.curDeptDetails.deptId
 		quer.value.type = "patrolInspection"
 		quer.value.pageNum = pageNum.value
 		quer.value.pageSize = pageSize.value
-		getProcessInspecionList(quer.value).then(res => {
-			console.log("res", res);
-			if (res.code == 200) {
-				original.value = res.rows;
-				inspecionList.value = res.rows;
-				uni.hideLoading();
-			}
-		});
+		if (!checkTime(quer.value.startTime, quer.value.endTime)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getProcessInspecionList(quer.value).then(res => {
+				console.log("res", res);
+				if (res.code == 200) {
+					original.value = res.rows;
+					inspecionList.value = res.rows;
+					uni.hideLoading();
+				}
+			});
+		}
 	}
+	//判断开始时间是否大于结束时间
+	function checkTime(time1, time2) {
+		let date1 = new Date(startTime.value);
+		let date2 = new Date(endTime.value);
+		if (date1 > date2) {
+			return false
+		}
+		return true
+	}
+
 	function delable(item) {
 		if (item.creatorId === store.userInfo.userId) {
 			return true
@@ -193,7 +226,7 @@
 							})
 						}
 					})
-	
+
 				} else if (res.cancel) {
 					uni.showToast({
 						title: '已取消',
@@ -207,7 +240,7 @@
 		// uni.showToast({
 		// 	title: "检测载具方法未完成"
 		// })
-	
+
 		// uni.$once('refreshProcessInspection', () => {
 		// })
 		const openItem = {
@@ -225,46 +258,80 @@
 			}
 		})
 	}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		quer.value.keyword = vehicleObj.carrierCode
+		getList()
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
 	//扫码
 	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;
-					}
-					quer.value.keyword = vehicleObj.carrierCode
-					getList()
-				}
-			);
-		} else {
-			// 测试时用
-				quer.value.keyword = ""
-				getList()
-		}
+		// 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;
+		// 			}
+		// 			quer.value.keyword = vehicleObj.carrierCode
+		// 			getList()
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 		quer.value.keyword = ""
+		// 		getList()
+		// }
 	}
 
 	//时间筛选,暂时注释,使用搜索向
 	function timeSizer() {
-		getList()
+		if (!checkTime(startTime.value, endTime.value)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getList()
+		}
 	}
 
 	// 筛选函数
@@ -342,23 +409,18 @@
 		}
 
 		.sta {
-			justify-content: center;
+			justify-content: flex-start;
 			align-items: center;
 
 			input {
 				border: 1rpx solid gray;
 				border-radius: 8rpx;
-				width: 400rpx;
+				width: 100%;
+				// width: 400rpx;
+				flex: 1;
 				height: 64rpx;
 			}
 		}
-
-		button {
-			width: 78%;
-			background-color: #1684fc;
-			color: white;
-			margin: 0 auto;
-		}
 	}
 
 	.page-container {
@@ -400,7 +462,7 @@
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
-		flex:1;
+		flex: 1;
 	}
 
 	.daywork-item {

+ 211 - 103
pages/onSiteInspection/scan.vue

@@ -58,6 +58,7 @@
 		</view>
 		<dialog-processInspection ref='selectProcessInspection'
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
+			<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -76,6 +77,7 @@
 		getCarrierInfoProcess,
 		getCarrierInfo,
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		debounce
 	} from '../../utils/common';
@@ -90,26 +92,15 @@
 	const lot = ref({})
 	const query = ref({})
 	const selectProcessInspection = ref(null)
-
+	const showQrCodeReader = ref(false);
 
 	// 页面生命周期函数
 	onLoad(() => {})
-	const handleScanCode = () => {
-	// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret)
-					const result = {
-						carrierCode: ret.resp_result,
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+	const result = {
+						carrierCode: data,
 						processCode: '',
 		               deptId : store.curDeptDetails.deptId
 					}
@@ -203,97 +194,214 @@
 							duration: 2000
 						})
 					})
-				}
-			)
-		} else {
-			const result = {
-				carrierCode: '000493',
-				deptId : store.curDeptDetails.deptId
-			}
-			getCarrierInfo(result).then(response => {
-				if (response.code == 200) {
-					// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
-					// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
-					if (response.data.dayworkCarriers != null) {
-						if (response.data.dayworkCarriers.length > 1) {
-							query.value = result;
-							query.value.deptId = store.curDeptDetails.deptId
-							selectProcessInspection.value.open(response.data.dayworkCarriers)	
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	const handleScanCode = () => {
+		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)
+		// 			const result = {
+		// 				carrierCode: ret.resp_result,
+		// 				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
+		// 								})
+		// 							})
+						
+		// 						}
+		// 					} 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
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		carrierCode: '000493',
+		// 		deptId : store.curDeptDetails.deptId
+		// 	}
+		// 	getCarrierInfo(result).then(response => {
+		// 		if (response.code == 200) {
+		// 			// 判断是哪种返回值 假设是想信息则给lot附检查箱信息
+		// 			// 假设是dayworkCarriers 则 判断是几个批次,假设为多批,则弹出选择框。
+		// 			if (response.data.dayworkCarriers != null) {
+		// 				if (response.data.dayworkCarriers.length > 1) {
+		// 					query.value = result;
+		// 					query.value.deptId = store.curDeptDetails.deptId
+		// 					selectProcessInspection.value.open(response.data.dayworkCarriers)	
 										
-						} else {
+		// 				} else {
 		
-							// console.log(response)
-							uni.showLoading({
-								title: '加载中'
-							});
-							// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
-							// 需要定义一个请求方法, 从后端获取
+		// 					// console.log(response)
+		// 					uni.showLoading({
+		// 						title: '加载中'
+		// 					});
+		// 					// 此处根据拿到的箱子id, 获取到相对应的【 lot_id】,【 lot_code】, 以及该批次关联的其它箱号
+		// 					// 需要定义一个请求方法, 从后端获取
 							
-							getPatrolLotInfo(result).then(res => {
-								if (res.code == 200) {
-									console.log(res)
+		// 					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{
-										console.log("888")
-										getUser(res.data.dayworkItemList)
-										getEquipment(res.data.dayworkItemList)	
-														lot.value = {
-															...lot.value,
-															...res.data
-														};	
-									lot.value.carrierCode = result.carrierCode
-									carrierCode.value = result.carrierCode;
-									lot.value.inspectionCarrierId = '1803605009554784261'
-									lot.value.inspectionCarrierCode = "300053"
-									// 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
-								})
-							})
+		// 							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 = result.carrierCode
+		// 							carrierCode.value = result.carrierCode;
+		// 							lot.value.inspectionCarrierId = '1803605009554784261'
+		// 							lot.value.inspectionCarrierCode = "300053"
+		// 							// 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
+		// 						})
+		// 					})
 
-						}
-					} 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
-				})
-			})
-		}
+		// 				}
+		// 			} 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
+		// 		})
+		// 	})
+		// }
 		
 	}
 	function checkSave() {

+ 1 - 1
pages/outsourcedDrawingMenu/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="uni-column container">
+	<view class="uni-column container" style="position: absolute;top: 0;left: 0;right: 0;">
 		<view style="margin: 12rpx;">
 			<view class="margenTop" style="font-size: 30rpx;font-weight: bold;">批次号:{{product.lotCode}}</view>
 			<view class="margenTop" style="font-size: 30rpx;font-weight: bold;">产品描述:{{product.productDescription}}

+ 12 - 13
pages/outsourcedInspection/form.vue

@@ -151,7 +151,7 @@
 		</view>
 		<view class="title">快速关联</view>
 		<view class="consultation-container ">
-			<view class="title unfit-title uni-row">
+			<view class="title unfit-title uni-row" style="justify-content: flex-start;">
 				<view v-if="editRelate" class="add-btn" style="background-color: #409eff;" @click="handleAddLot">关联批次
 				</view>
 			</view>
@@ -171,8 +171,9 @@
 			</view> -->
 			<view class="result resu uni-row" style="margin-top: 20rpx;">
 				<view class="label" style="width: 170rpx;">外协检状态</view>
-				<uni-data-checkbox :disabled="!editable()" style="margin-top: 20rpx;" v-model="processInspecion.inspectionStatus"
-					:localdata="range" @change="handleChangeInspecionStatus"></uni-data-checkbox>
+				<uni-data-checkbox :disabled="!editable()" style="margin-top: 20rpx;"
+					v-model="processInspecion.inspectionStatus" :localdata="range"
+					@change="handleChangeInspecionStatus"></uni-data-checkbox>
 				<!-- <uni-data-checkbox v-if="editable()" v-model="processInspecion.inspectionStatus"
 					:localdata="range" @change="handleChangeInspecionStatus"></uni-data-checkbox>
 				<view v-else class="value">{{ processInspecion.inspectionStatus == 1 ? '合格' : '不合格' }}
@@ -258,7 +259,7 @@
 		rejectNum: 0,
 		examiningNum: 0,
 		status: 0,
-		inspectionStatus:0,
+		inspectionStatus: 0,
 		lot: {}
 	})
 	const editRelate = ref(false)
@@ -453,9 +454,9 @@
 		// 		return consul[i].text
 		// 	}
 		// }
-		if(item.consultResultId == 0) {
+		if (item.consultResultId == 0) {
 			return '待确认'
-		}else{
+		} else {
 			return item.result
 		}
 	}
@@ -785,7 +786,7 @@
 		})
 		consultations.value = consultations.value.concat(info)
 		isEventTriggered.value = true; // 更新标志位状态
-		 processInspecion.value.status = 0
+		processInspecion.value.status = 0
 		uni.$off('wasteConsultationEvent')
 	}
 
@@ -856,10 +857,11 @@
 		processInspecion.value.relateList = relates
 		// uni.$off('relateEvent')
 	}
-	function handleChangeInspecionStatus(e){
+
+	function handleChangeInspecionStatus(e) {
 		console.log(e.detail.value)
 		//没有咨询
-		if(consultations.value && consultations.value.length == 0){
+		if (consultations.value && consultations.value.length == 0) {
 			processInspecion.value.status = e.detail.value
 		}
 	}
@@ -912,6 +914,7 @@
 	.buttonOp {
 		margin-top: 5px;
 	}
+
 	.page-container {
 		// height: 100%;
 		background-color: #ececec;
@@ -1234,10 +1237,6 @@
 		}
 	}
 
-	.zb-table .item-tr {
-		flex-direction: row;
-	}
-
 	.zb-table .item-tr .item-td {
 		overflow-x: auto;
 	}

+ 139 - 91
pages/outsourcedInspection/index.vue

@@ -6,17 +6,24 @@
 			<!-- <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 class="time-controls"
+			style="margin-top: 10rpx;display: flex;margin-right: 0px;background-color: #ffffff;">
+			<view class="uni-row sta">
+				<span style="align-items: center;display: flex;font-size: 16px;margin-left: 12rpx;">检查日期:</span>
+				<view class="uni-row" style="flex: 1;width: 100%;">
+					<input v-model="startTime" type="date" @input="timeSizer" style="flex: 1;width: 100%;" />
+					<span style="align-items: center;display: flex;">—</span>
+					<input v-model="endTime" type="date" @input="timeSizer" />
+				</view>
+			</view>
 		</view>
-	<view class="uni-row" style="margin-top: 10rpx;">
+		<view class="uni-row" style="margin-top: 10rpx;">
 			<view class="scan-btn " style="min-height: 80rpx;" @click.stop="handleAddOutsourcedInspection">新增外协检查
 			</view>
-			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;" @click.stop="handleScan">扫码</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;"
+				@click="handleScan">扫码</view>
 		</view>
-		
+
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -58,6 +65,7 @@
 				</view>
 			</view>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -74,6 +82,7 @@
 		timestampToTime,
 		toHHmmss
 	} from '@/utils/common.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		onLoad,
 		onReady,
@@ -92,10 +101,12 @@
 	const inspecionList = ref([]); //时间后筛选数组
 	const original = ref([]); //原始数组
 	const startTime = ref(new Date().toISOString().split('T')[0])
+	const endTime = ref(new Date().toISOString().split('T')[0])
 	const userId = ref(store.userInfo.userId)
 	const pageSize = ref(10)
 	const pageNum = ref(1)
 	const status = ref(true)
+	const showQrCodeReader = ref(false);
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -118,27 +129,27 @@
 		getList();
 		getP2();
 	})
-	onReachBottom(()=>{
+	onReachBottom(() => {
 		console.log(status.value)
-		if(status.value) {
-		pageNum.value += 1
-		quer.value.pageNum = pageNum.value
-		quer.value.pageSize = pageSize.value
-		getOutsourcedInspection(quer.value).then(res =>{
-		 const existingIds = new Set(inspecionList.value.map(item => item.id));
-		
-		  // 过滤出那些不在 existingIds 中的项,即新数据
-		  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-		
-		  // 如果有新数据,将其添加到 listData
-		  if (newRows.length > 0) {
-		    inspecionList.value = inspecionList.value.concat(newRows);
-			original.value = original.value.concat(newRows);
-		  } else {
-		    // 如果没有新数据,更新状态表示没有更多数据
-		    status.value = false;
-		  }
-		})
+		if (status.value) {
+			pageNum.value += 1
+			quer.value.pageNum = pageNum.value
+			quer.value.pageSize = pageSize.value
+			getOutsourcedInspection(quer.value).then(res => {
+				const existingIds = new Set(inspecionList.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
+			})
 		}
 	})
 
@@ -150,21 +161,41 @@
 		// quer.value.userId = store.userInfo.userId;
 		pageNum.value = 1
 		quer.value.startTime = startTime.value;
+		quer.value.endTime = endTime.value
 		quer.value.isAuto = 0
 		quer.value.type = "outsourcedInspector"
 		quer.value.pageNum = pageNum.value
 		quer.value.pageSize = pageSize.value
-		getOutsourcedInspection(quer.value).then(res => {
-			console.log("res", res);
-			if (res.code == 200) {
-				original.value = res.rows;
-				inspecionList.value = res.rows;
-				// timeSizer();
-				uni.hideLoading();
-				// uni.hideLoading();
-			}
-		});
+		if (!checkTime(quer.value.startTime, quer.value.endTime)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getOutsourcedInspection(quer.value).then(res => {
+				console.log("res", res);
+				if (res.code == 200) {
+					original.value = res.rows;
+					inspecionList.value = res.rows;
+					// timeSizer();
+					uni.hideLoading();
+					// uni.hideLoading();
+				}
+			});
+		}
+	}
+	//判断开始时间是否大于结束时间
+	function checkTime(time1, time2) {
+		let date1 = new Date(startTime.value);
+		let date2 = new Date(endTime.value);
+		if (date1 > date2) {
+			return false
+		}
+		return true
 	}
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
@@ -195,47 +226,80 @@
 			}
 		})
 	}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		quer.value.keyword = vehicleObj.carrierCode
+		getList()
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 	//扫码
 	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;
-					}
-					quer.value.keyword = vehicleObj.carrierCode
-					getList()
-				}
-			);
-		} else {
-			// 测试时用
-				quer.value.keyword = ""
-				getList()
-		}
+		// 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;
+		// 			}
+		// 			quer.value.keyword = vehicleObj.carrierCode
+		// 			getList()
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 		quer.value.keyword = ""
+		// 		getList()
+		// }
 	}
 
 	//时间筛选
 	function timeSizer() {
 		// inspecionList.value = filterSameDayItems(original.value, startTime.value);
-		getList()
+		if (!checkTime(startTime.value, endTime.value)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration: 2000
+			})
+		} else {
+			getList()
+		}
 	}
 
 	// 筛选函数
@@ -377,37 +441,21 @@
 	.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;
+			justify-content: flex-start;
 			align-items: center;
 
 			input {
 				border: 1rpx solid gray;
 				border-radius: 8rpx;
-				width: 400rpx;
+				width: 100%;
+				// width: 400rpx;
+				flex: 1;
 				height: 64rpx;
 			}
 		}
-
-		button {
-			width: 78%;
-			background-color: #1684fc;
-			color: white;
-			margin: 0 auto;
-		}
 	}
 
 	.page-container {
@@ -449,7 +497,7 @@
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
-		flex:1;
+		flex: 1;
 	}
 
 	.daywork-item {

+ 137 - 89
pages/outsourcedInspection/relate.vue

@@ -10,7 +10,7 @@
 			<button class='bottom-btn right-btn' type="primary" @click="handleContinue">继续扫码</button>
 			<button class='bottom-btn right-btn' type="primary" @click="handleConfirm">确认关联</button>
 		</view>
-
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 	<view
 		style="background-color: #99999999; z-index: 5; position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"
@@ -27,6 +27,7 @@
 	import {
 		store
 	} from '@/store/index.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		onShow
 	} from '@dcloudio/uni-app'
@@ -44,6 +45,7 @@
 	const loading = ref(false)
 	const relateList = ref([])
 	const processInspection = ref(null)
+	const showQrCodeReader = ref(false);
 
 	const form = ref([]); //表单数据true
 	const checkAll = ref(false); //是否全选
@@ -58,13 +60,13 @@
 			name: 'lotCode',
 			label: '批号',
 			align: 'center',
-			width: 100
+			width: 120
 		},
 		{
 			name: 'allCarriers',
 			label: '箱号',
 			align: 'center',
-			width: 60
+			width: 80
 		},
 		{
 			name: 'isMaster',
@@ -128,92 +130,142 @@
 		keyword.value = input
 		handleChangeWorkshop(workshopId.value)
 	}
-
-	function handleAdd() {
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					getRelateInspectionByCarrier({
-						...processInspection.value,
-						carrierCode: vehicleObj.carrierCode,
-					}).then(res => {
-						console.log(res)
-						if (res.code == 200) {
-							if (res.data.length > 0 && res.data.filter(e => !relateList.value
-									.some(t => t.lotId === e.lotId)).length > 0) {
-								relateList.value.push(...res.data.filter(e => !relateList.value.some(t => t
-									.lotId === e
-									.lotId)))
-							} else {
-								uni.showToast({
-									title: '载具绑定批次已质检或已绑定',
-									icon: 'none'
-								})
-							}
-							debounce(handleAdd, 700)
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: res.msg,
-								duration: 2000
-							})
-						}
-					}).catch(err => {
-						console.log(err)
-					})
-				}
-			);
-		} else {
-			// 测试时用
-			getRelateInspectionByCarrier({
-				carrierCode: '006522',
-				...processInspection.value
-			}).then(res => {
-				console.log(res)
-				if (res.code == 200) {
-					console.log(relateList.value)
-					console.log(res.data.filter(e => !relateList.value
-						.some(t => t.lotId === e.lotId)).length)
-					if (res.data.length > 0 && res.data.filter(e => !relateList.value
-							.some(t => t.lotId === e.lotId)).length > 0) {
-						relateList.value.push(...res.data.filter(e => !relateList.value.some(t => t.lotId === e
-							.lotId)))
-					} else {
-						uni.showToast({
-							title: '载具绑定批次已质检或已绑定',
-							icon: 'none'
-						})
-					}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		getRelateInspectionByCarrier({
+			...processInspection.value,
+			carrierCode: vehicleObj.carrierCode,
+		}).then(res => {
+			console.log(res)
+			if (res.code == 200) {
+				if (res.data.length > 0 && res.data.filter(e => !relateList.value
+						.some(t => t.lotId === e.lotId)).length > 0) {
+					relateList.value.push(...res.data.filter(e => !relateList.value.some(t => t
+						.lotId === e
+						.lotId)))
 				} else {
 					uni.showToast({
-						icon: 'none',
-						title: res.msg,
-						duration: 2000
+						title: '载具绑定批次已质检或已绑定',
+						icon: 'none'
 					})
 				}
-			}).catch(err => {
-				console.log(err)
-			})
-		}
+				debounce(handleAdd, 700)
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: res.msg,
+					duration: 2000
+				})
+			}
+		}).catch(err => {
+			console.log(err)
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function handleAdd() {
+		showQrCodeReader.value = true;
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			getRelateInspectionByCarrier({
+		// 				...processInspection.value,
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 			}).then(res => {
+		// 				console.log(res)
+		// 				if (res.code == 200) {
+		// 					if (res.data.length > 0 && res.data.filter(e => !relateList.value
+		// 							.some(t => t.lotId === e.lotId)).length > 0) {
+		// 						relateList.value.push(...res.data.filter(e => !relateList.value.some(t => t
+		// 							.lotId === e
+		// 							.lotId)))
+		// 					} else {
+		// 						uni.showToast({
+		// 							title: '载具绑定批次已质检或已绑定',
+		// 							icon: 'none'
+		// 						})
+		// 					}
+		// 					debounce(handleAdd, 700)
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: res.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			}).catch(err => {
+		// 				console.log(err)
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	getRelateInspectionByCarrier({
+		// 		carrierCode: '006522',
+		// 		...processInspection.value
+		// 	}).then(res => {
+		// 		console.log(res)
+		// 		if (res.code == 200) {
+		// 			console.log(relateList.value)
+		// 			console.log(res.data.filter(e => !relateList.value
+		// 				.some(t => t.lotId === e.lotId)).length)
+		// 			if (res.data.length > 0 && res.data.filter(e => !relateList.value
+		// 					.some(t => t.lotId === e.lotId)).length > 0) {
+		// 				relateList.value.push(...res.data.filter(e => !relateList.value.some(t => t.lotId === e
+		// 					.lotId)))
+		// 			} else {
+		// 				uni.showToast({
+		// 					title: '载具绑定批次已质检或已绑定',
+		// 					icon: 'none'
+		// 				})
+		// 			}
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: res.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	}).catch(err => {
+		// 		console.log(err)
+		// 	})
+		// }
 		// lotReporting.value.open(data);
 	}
 
@@ -455,8 +507,4 @@
 		background-color: #c0c4fc;
 		/* 选中之后样式 */
 	}
-
-	.zb-table .item-tr {
-		flex-direction: row;
-	}
 </style>

+ 202 - 110
pages/outsourcedInspection/scan.vue

@@ -27,7 +27,7 @@
 				<view class="value">{{ lot.inspectionCarrierCode }}</view>
 			</view>
 			<!-- <input type="text" v-model="carrierCode" placeholder="请输入箱号或检查载具号" /> -->
-			<view class="btn uni-row" style="background-color: #ff5555;" @click.stop="handleScanCode">
+			<view class="btn uni-row" style="background-color: #ff5555;" @click="handleScanCode">
 				<uni-icons type="scan" size="16" style="color: #ffffff; margin-right: 8rpx;" />
 				<text>扫描箱码或载具二维码</text>
 			</view>
@@ -38,6 +38,7 @@
 		</view>
 		<dialog-processInspection ref='selectProcessInspection'
 			@handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
+			<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -57,6 +58,7 @@
 		getCarrierInfo,
 		getLotOutsourcedInfo
 	} from '@/api/business/processInspection.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		store
 	} from '../../store';
@@ -69,111 +71,29 @@
 	const selectProcessInspection = ref(null)
 	const lastRequestTimestamp = ref(0);
 	const saveLoading = ref(false)
-
+	const showQrCodeReader = ref(false);
 	// 页面生命周期函数
 	onLoad(() => {})
-
-	const handleScanCode = () => {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					console.log(ret)
-					const result = {
-						carrierCode: ret.resp_result,
-						processCode: ''
-					}
-					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】, 以及该批次关联的其它箱号
-									// 需要定义一个请求方法, 从后端获取
-									getLotOutsourcedInfo(result).then(res => {
-										if (res.code == 200) {
-											lot.value = {
-												...lot.value,
-												...res.data,
-												processNames: res.data.processList
-											};
-											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
-										})
-									})
-
-								}
-							} 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
-						})
-					})
-				}
-			)
-		} else {
-			const result = {
-				carrierCode: '000381',
-				processCode: store.outsourcedCode
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+	const result = {
+				carrierCode: data,
+				processCode: ''
+			}
+			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附检查箱信息
@@ -191,20 +111,15 @@
 							// 需要定义一个请求方法, 从后端获取
 							getLotOutsourcedInfo(result).then(res => {
 								if (res.code == 200) {
-									console.log(res)
 									lot.value = {
 										...lot.value,
 										...res.data,
 										processNames: res.data.processList
 									};
-									console.log(lot.value.hasInspection)
 									lot.value.carrierCode = result.carrierCode
 									carrierCode.value = result.carrierCode;
-									lot.value.inspectionCarrierId = '1846793994481221640'
-									lot.value.inspectionCarrierCode = "300250"
 									// console.log("res", res);
 									uni.hideLoading();
-									// 判断是否批次号和检查箱码都扫完
 									checkSave()
 								} else {
 									uni.showToast({
@@ -226,7 +141,6 @@
 						console.log(response)
 						lot.value.inspectionCarrierCode = response.data.inspectionCarrier.code
 						lot.value.inspectionCarrierId = response.data.inspectionCarrier.id
-						// 判断是否批次号和检查箱码都扫完
 						checkSave()
 					}
 				} else {
@@ -243,7 +157,185 @@
 					duration: 2000
 				})
 			})
-		}
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	const handleScanCode = () => {
+		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)
+		// 			const result = {
+		// 				carrierCode: ret.resp_result,
+		// 				processCode: ''
+		// 			}
+		// 			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】, 以及该批次关联的其它箱号
+		// 							// 需要定义一个请求方法, 从后端获取
+		// 							getLotOutsourcedInfo(result).then(res => {
+		// 								if (res.code == 200) {
+		// 									lot.value = {
+		// 										...lot.value,
+		// 										...res.data,
+		// 										processNames: res.data.processList
+		// 									};
+		// 									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
+		// 								})
+		// 							})
+
+		// 						}
+		// 					} 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
+		// 				})
+		// 			})
+		// 		}
+		// 	)
+		// } else {
+		// 	const result = {
+		// 		carrierCode: '000381',
+		// 		processCode: store.outsourcedCode
+		// 	}
+		// 	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】, 以及该批次关联的其它箱号
+		// 					// 需要定义一个请求方法, 从后端获取
+		// 					getLotOutsourcedInfo(result).then(res => {
+		// 						if (res.code == 200) {
+		// 							console.log(res)
+		// 							lot.value = {
+		// 								...lot.value,
+		// 								...res.data,
+		// 								processNames: res.data.processList
+		// 							};
+		// 							console.log(lot.value.hasInspection)
+		// 							lot.value.carrierCode = result.carrierCode
+		// 							carrierCode.value = result.carrierCode;
+		// 							lot.value.inspectionCarrierId = '1846793994481221640'
+		// 							lot.value.inspectionCarrierCode = "300250"
+		// 							// 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
+		// 						})
+		// 					})
+
+		// 				}
+		// 			} 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
+		// 		})
+		// 	})
+		// }
 	}
 
 	//选择批号弹窗带回

+ 147 - 94
pages/outsourcedReturnCheck/carriers.vue

@@ -45,6 +45,7 @@
 				</view>
 			</view>
 		</uni-popup>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 <script setup>
@@ -59,6 +60,7 @@
 		onLoad,
 		onReady
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		store
 	} from '@/store/index.js'
@@ -77,7 +79,8 @@
 	const message = ref('')
 	const showConfirm = ref(false)
 	const inputDialog = ref(null)
-
+	const showQrCodeReader = ref(false);
+	
 	onMounted(() => {
 		const instance = getCurrentInstance().proxy
 		const eventChannel = instance.getOpenerEventChannel();
@@ -235,103 +238,153 @@
 			}
 		}
 	*/
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		// const mpaasScanModule = false
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						message.value = '请扫载具码'
-						inputDialog.value.open()
-						return;
-					}
-					let checked = false
-					let allChecked = true
-					details.value.forEach(l => {
-						checked = checked || (l.carriers.findIndex(e => e.code === vehicleObj.carrierCode) >=
-							0)
-						if (checked) {
-							checkedCarriers.value.push(vehicleObj.carrierCode)
-						}
-						allChecked = allChecked && l.carriers.every(t => checkedCarriers.value.includes(t
-							.code))
-					})
-					if (checked) {
-						uni.showToast({
-							icon: 'none',
-							title: '已扫箱' + vehicleObj.carrierCode
-						})
-						if (allChecked) {
-							debonce(() => {
-								uni.showToast({
-									icon: 'none',
-									title: '已验证所有箱码'
-								})
-							}, 700)
-						} else {
-							debounce(handleScanCode, 700)
-						}
-					} else {
-						message.value = '该箱号' + vehicleObj.carrierCode + '不在此发出单'
-						inputDialog.value.open()
-						return
-					}
-				}
-			);
-		} else {
-			let vehicleObj = {
-				carrierId: "0",
-				carrierCode: "500001"
-			};
-
-			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-				message.value = '请扫载具码'
-				inputDialog.value.open()
-				return;
+   //H5扫码器回调
+   function onDecodeHandler(data) {
+   	showQrCodeReader.value = false;
+		  let vehicleObj = {
+			carrierCode: data
+		  };
+		  if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			message.value = '请扫载具码'
+			inputDialog.value.open()
+			return;
+		  }
+		  let checked = false
+		  let allChecked = true
+		  details.value.forEach(l => {
+			checked = checked || (l.carriers.findIndex(e => e.code === vehicleObj.carrierCode) >=
+				0)
+			if (checked) {
+				checkedCarriers.value.push(vehicleObj.carrierCode)
 			}
-			let checked = false
-			let allChecked = true
-			details.value.forEach(l => {
-				checked = checked || (l.carriers.findIndex(e => e.code === vehicleObj.carrierCode) >= 0)
-				// allChecked = allChecked && (l.carriers.findIndex(e => e.id === vehicleObj.carrierId) >= 0)
-				if (checked) {
-					checkedCarriers.value.push(vehicleObj.carrierCode)
-				}
-				allChecked = allChecked && l.carriers.every(t => checkedCarriers.value.includes(t.code))
+			allChecked = allChecked && l.carriers.every(t => checkedCarriers.value.includes(t
+				.code))
+		  })
+		  if (checked) {
+			uni.showToast({
+				icon: 'none',
+				title: '已扫箱' + vehicleObj.carrierCode
 			})
-			if (checked) {
-				uni.showToast({
-					icon: 'none',
-					title: '已扫箱' + vehicleObj.carrierCode
-				})
-				if (allChecked) {
-					debonce(() => {
-						uni.showToast({
-							icon: 'none',
-							title: '已验证所有箱码'
-						})
-					}, 700)
-				} else {
-					debounce(handleScanCode, 700)
-				}
+			if (allChecked) {
+				debonce(() => {
+					uni.showToast({
+						icon: 'none',
+						title: '已验证所有箱码'
+					})
+				}, 700)
 			} else {
-				message.value = '该箱号' + vehicleObj.carrierCode + '不在此发出单'
-				inputDialog.value.open()
-				return
+				debounce(handleScanCode, 700)
 			}
-		}
+		  } else {
+			message.value = '该箱号' + vehicleObj.carrierCode + '不在此发出单'
+			inputDialog.value.open()
+			return
+		  }
+   }
+   
+   
+   //H5扫码器关闭
+   function qrReaderClose() {
+   	showQrCodeReader.value = false;
+   }
+	function handleScanCode() {
+		showQrCodeReader.value = true;
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// // const mpaasScanModule = false
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				message.value = '请扫载具码'
+		// 				inputDialog.value.open()
+		// 				return;
+		// 			}
+		// 			let checked = false
+		// 			let allChecked = true
+		// 			details.value.forEach(l => {
+		// 				checked = checked || (l.carriers.findIndex(e => e.code === vehicleObj.carrierCode) >=
+		// 					0)
+		// 				if (checked) {
+		// 					checkedCarriers.value.push(vehicleObj.carrierCode)
+		// 				}
+		// 				allChecked = allChecked && l.carriers.every(t => checkedCarriers.value.includes(t
+		// 					.code))
+		// 			})
+		// 			if (checked) {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '已扫箱' + vehicleObj.carrierCode
+		// 				})
+		// 				if (allChecked) {
+		// 					debonce(() => {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: '已验证所有箱码'
+		// 						})
+		// 					}, 700)
+		// 				} else {
+		// 					debounce(handleScanCode, 700)
+		// 				}
+		// 			} else {
+		// 				message.value = '该箱号' + vehicleObj.carrierCode + '不在此发出单'
+		// 				inputDialog.value.open()
+		// 				return
+		// 			}
+		// 		}
+		// 	);
+		// } else {
+		// 	let vehicleObj = {
+		// 		carrierId: "0",
+		// 		carrierCode: "500001"
+		// 	};
+
+		// 	if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 		message.value = '请扫载具码'
+		// 		inputDialog.value.open()
+		// 		return;
+		// 	}
+		// 	let checked = false
+		// 	let allChecked = true
+		// 	details.value.forEach(l => {
+		// 		checked = checked || (l.carriers.findIndex(e => e.code === vehicleObj.carrierCode) >= 0)
+		// 		// allChecked = allChecked && (l.carriers.findIndex(e => e.id === vehicleObj.carrierId) >= 0)
+		// 		if (checked) {
+		// 			checkedCarriers.value.push(vehicleObj.carrierCode)
+		// 		}
+		// 		allChecked = allChecked && l.carriers.every(t => checkedCarriers.value.includes(t.code))
+		// 	})
+		// 	if (checked) {
+		// 		uni.showToast({
+		// 			icon: 'none',
+		// 			title: '已扫箱' + vehicleObj.carrierCode
+		// 		})
+		// 		if (allChecked) {
+		// 			debonce(() => {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '已验证所有箱码'
+		// 				})
+		// 			}, 700)
+		// 		} else {
+		// 			debounce(handleScanCode, 700)
+		// 		}
+		// 	} else {
+		// 		message.value = '该箱号' + vehicleObj.carrierCode + '不在此发出单'
+		// 		inputDialog.value.open()
+		// 		return
+		// 	}
+		// }
 	}
 </script>
 

+ 7 - 7
pages/processInspectionReceive/form.vue

@@ -7,7 +7,7 @@
 			</view>
 		</view>
 		<!-- 交检 -->
-		<view v-if="isActived.label == '交检' " style="margin-bottom: 130rpx;margin-top: 16rpx;">
+		<view v-if="isActived.label == '交检' " style="margin-bottom: 130rpx;margin-top: 16px;">
 			<view class="carrier-info uni-column">
 				<view class="carrier-code uni-row">
 					<text>箱号</text>
@@ -157,7 +157,7 @@
 			</view>
 		</view>
 		<!-- 巡检 -->
-		<view v-if="isActived.label == '巡检' " style="margin-bottom: 130rpx;margin-top: 16rpx;">
+		<view v-if="isActived.label == '巡检' " style="margin-bottom: 130rpx;margin-top: 16px;">
 			<view class="carrier-info uni-column">
 				<view class="carrier-code uni-row">
 					<text>箱号</text>
@@ -307,7 +307,7 @@
 
 		</view>
 		<!-- 仪器室 -->
-		<view v-if="isActived.label == '仪器室' " style="margin-bottom: 130rpx;margin-top: 16rpx;">
+		<view v-if="isActived.label == '仪器室' " style="margin-bottom: 130rpx;margin-top: 16px;">
 			<view class="carrier-info uni-column">
 				<view class="carrier-code uni-row">
 					<text>箱号</text>
@@ -457,7 +457,7 @@
 
 		</view>
 		<!-- 外协检 -->
-		<view v-if="isActived.label == '外协检查' " style="margin-bottom: 130rpx;margin-top: 16rpx;">
+		<view v-if="isActived.label == '外协检查' " style="margin-bottom: 130rpx;margin-top: 16px;">
 			<view class="carrier-info uni-column">
 				<view class="carrier-code uni-row">
 					<text>箱号</text>
@@ -599,7 +599,7 @@
 
 		</view>
 		<!-- 出厂检 -->
-		<view v-if="isActived.label == '出厂检' " style="margin-bottom: 130rpx;margin-top: 16rpx;">
+		<view v-if="isActived.label == '出厂检' " style="margin-bottom: 130rpx;margin-top: 16px;">
 			<view class="carrier-info uni-column">
 				<view class="carrier-code uni-row">
 					<text>箱号</text>
@@ -737,7 +737,7 @@
 
 		</view>
 		<!-- 首件检 -->
-		<view v-if="isActived.label == '首件检' " style="margin-bottom: 130rpx;margin-top: 16rpx;">
+		<view v-if="isActived.label == '首件检' " style="margin-bottom: 130rpx;margin-top: 16px;">
 			<view class="carrier-info uni-column">
 				<view class="carrier-code uni-row">
 					<text>箱号</text>
@@ -1147,7 +1147,7 @@
 	// }
 	.tab-container {
 	  position: fixed;  /* 固定定位 */
-	  top: 0;           /* 距离顶部0,即页面顶部 */
+	  top: 44px;           /* 距离顶部0,即页面顶部 */
 	  left: 0;          /* 距离左侧0,即页面左侧 */
 	  right: 0;         /* 宽度充满整个页面宽度 */
 	  display: flex;

+ 2 - 2
pages/productionPlan/index.vue

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

+ 37 - 12
pages/queryLotInfo/index.vue

@@ -1,4 +1,5 @@
 <template>
+	<view style="height: 100%;">
 	<view class="tab-container">
 		<view :class="['tab-item', isActiveId === 1 ? 'active': '']" @click="handleClickTab(1)">批次信息</view>
 		<view :class="['tab-item', isActiveId === 2 ? 'active': '']" @click="handleClickTab(2)">领料信息</view>
@@ -318,6 +319,7 @@
 	<view class="bottom-btn-container uni-row">
 		<button class="bottom-btn" @click="init()">扫码查询</button>
 	</view>
+	</view>
 	<dialog-selectLot ref="selectLotDialog" @submit="handleDoIt" />
 	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
@@ -639,10 +641,18 @@
 		}
 
 	}
-	const handleClickTab = (val) => {
-		//scrollTop.value = top
-		scrollToId.value = 'item' + val
-		isActiveId.value = val
+	// const handleClickTab = (val) => {
+	// 	//scrollTop.value = top
+	// 	scrollToId.value = 'item' + val
+	// 	isActiveId.value = val
+	// }
+	function handleClickTab(id) {
+	  isActiveId.value = id;
+	  const element = document.getElementById(`item${id}`);
+	  console.log(element)
+	  if (element) {
+	    element.scrollIntoView({ behavior: 'smooth' });
+	  }
 	}
 	const handleScrollToUpper = () => {
 		isActiveId.value = 1
@@ -664,10 +674,16 @@
 
 <style lang="scss">
 	.tab-container {
-		display: flex;
-		flex-direction: row;
-		height: 32px;
-
+	// display: flex;
+	// flex-direction: row;
+	// height: 32px;
+	position: fixed;
+	top: 0;
+	height: 32px;
+	display: flex;
+	flex-direction: row;
+	margin-top: 40px;
+	width: 100%;
 		.tab-item {
 			display: flex;
 			flex-direction: row;
@@ -680,8 +696,12 @@
 	}
 
 	.scroll-container {
-		height: calc(100% - 82px);
-		background-color: #f5f5f5;
+	display: block;
+	padding-bottom: 60px;
+	height:80%;
+	background-color: #f5f5f5;
+	position: fixed;
+	top:72px;
 	}
 
 	.tab-item.active {
@@ -768,12 +788,17 @@
 	}
 
 	.bottom-btn-container {
+		position: fixed;
+		right: 0;
+		bottom: 0;
+		left: 0;
 		height: 50px;
 		border-top: 1px solid #999999;
-		padding: 0 32px;
+		padding: 16rpx 32rpx;
 		align-items: center;
 		background-color: #fff;
-
+		justify-content: space-evenly;
+	
 		.bottom-btn {
 			flex: 1;
 			font-size: 28rpx;

+ 73 - 16
pages/recerptSfprod/index.vue

@@ -33,6 +33,7 @@
 		</view>
 	</view>
 	<dialog-receipt ref="receipt" @submit="handleDoIt"></dialog-receipt>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 </template>
 <script setup>
 	import {
@@ -46,6 +47,7 @@
 		getDayworkItemByCarrierCode,
 		updateDayWorkItemBatch
 	} from '@/api/business/dayWorkItem.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		store
 	} from '@/store/index.js'
@@ -56,6 +58,7 @@
 	const receipt = ref(null)
 	const flag = ref(false)
 	const selection = ref([])
+	const showQrCodeReader = ref(false);
 
 	onLoad(() => {})
 
@@ -119,20 +122,10 @@
 		);
 	}
 */
-	
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		// 调用插件的 mpaasScan 方法
-		mpaasScanModule.mpaasScan({
-				// 扫码识别类型,参数可多选,qrCode、barCode,
-				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-				scanType: ["qrCode", "barCode"],
-				// 是否隐藏相册,默认false不隐藏
-				hideAlbum: false,
-			},
-			(ret) => {
-				let vehicleObj = {carrierCode: ret.resp_result};
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {carrierCode: data};
 				if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
 					uni.showToast({
 						icon: "none",
@@ -174,8 +167,72 @@
 					console.log(products.value)
 					init();
 				})
-			}
-		);
+	}
+	
+	
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+	
+	function handleScanCode() {
+		showQrCodeReader.value = false;
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// // 调用插件的 mpaasScan 方法
+		// mpaasScanModule.mpaasScan({
+		// 		// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 		// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 		scanType: ["qrCode", "barCode"],
+		// 		// 是否隐藏相册,默认false不隐藏
+		// 		hideAlbum: false,
+		// 	},
+		// 	(ret) => {
+		// 		let vehicleObj = {carrierCode: ret.resp_result};
+		// 		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 			uni.showToast({
+		// 				icon: "none",
+		// 				title: "请扫载具码",
+		// 			})
+		// 			return;
+		// 		}
+		// 		getDayworkItemByCarrierCode({
+		// 			carrierCode: vehicleObj.carrierCode,
+		// 			status: 6
+		// 		}).then(response => {
+		// 			console.log(response)
+		// 			if (response.data.length == 0) {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '该批次已被领取'
+		// 				})
+		// 				return;
+		// 			}
+				 
+		// 			for (let i = 0; i < response.data.length; i++) {
+		// 				if(products.value.some(item => item.id == response.data[i].id)){
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: '该设批次已存在,请勿重复扫码添加'
+		// 					})
+		// 					return; 
+		// 				}
+		// 				products.value.push(response.data[i]);
+		// 				console.log(products.value)
+		// 			}
+		// 			console.log(products.value)
+		// 			let sum = 0; //总箱数
+		// 			for (let i = 0; i < products.value.length; i++) {
+		// 				products.value[i].carriers = products.value[i].carrierName.split('、').length;
+		// 				sum += products.value[i].carriers;
+		// 			}
+		// 			title.value = products.value[0].deptName + ' (' + sum + '箱)';
+		// 			console.log(products.value)
+		// 			init();
+		// 		})
+		// 	}
+		// );
+		
 	}
 	function handleConfirmReceipt() {
 		if (selection.value.length > 0) {

+ 108 - 94
pages/reportHistory/index.vue

@@ -5,18 +5,18 @@
 			<view class="second">注意日期区间最长不超过31天</view>
 		</view>
 		<uni-section title="开始日期:" type="square" class="uni-row sta">
-			<input v-model="startTime" type="date"/>
+			<input v-model="startTime" type="date" />
 		</uni-section>
 		<uni-section title="结束日期:" type="square" class="uni-row end">
-			<input v-model="endTime" type="date"/>
+			<input v-model="endTime" type="date" />
 		</uni-section>
 		<button @click="handleSearch">查询</button>
 	</view>
 
 	<view v-if="show" class="uni-column container">
-		
+
 		<view class="uni-row" style="position: fixed;
-		top: 0;width: 100%;
+		top: 43px;width: 100%;
 		height: 120rpx;
 		z-index: 2;
 		margin:0 auto;
@@ -26,30 +26,32 @@
 		align-items: center;
 		border-top: 1rpx solid lightgray;
 		border-bottom: 1rpx solid lightgray;">
-		
+
 			<!-- <uni-section title="选择日期:" type="square" class="uni-row" style="margin-left: 16rpx;">
 				<uni-data-select v-model="selectDate" :localdata="dateList" @change="change" :clear="false"
 				placeholder="无报工记录"
 					style="width: 200rpx;"></uni-data-select>
 			</uni-section> -->
-			
+
 			<view class="tab-container">
-				<view :class="['tab-item', editStatus === false ? 'active': '']" @click="handleCheckTabHis()">历史报工</view>
+				<view :class="['tab-item', editStatus === false ? 'active': '']" @click="handleCheckTabHis()">历史报工
+				</view>
 				<view :class="['tab-item', editStatus === true ? 'active': '']" @click="handleCheckTab()">已完成报工</view>
 			</view>
-			
+
 			<view style="width: 100%;">
-			<uni-section title="时间范围:" type="square" class="uni-row" style="justify-content: start;align-items: center;margin-left: 20rpx;">
-				{{ startTime }}&nbsp; ~ &nbsp;{{endTime}}
-			</uni-section>
-			
-			<!-- <view style="width: 100%;font-size: 28rpx; text-align: left; margin-left: 16rpx;">时间范围:{{ startTime }}&nbsp; ~ &nbsp;{{endTime}}</view> -->
-			<!-- <uni-section title="条数:" type="square" class="uni-row" style="justify-content: center;align-items: center;">
+				<uni-section title="时间范围:" type="square" class="uni-row"
+					style="justify-content: start;align-items: center;margin-left: 20rpx;">
+					{{ startTime }}&nbsp; ~ &nbsp;{{endTime}}
+				</uni-section>
+
+				<!-- <view style="width: 100%;font-size: 28rpx; text-align: left; margin-left: 16rpx;">时间范围:{{ startTime }}&nbsp; ~ &nbsp;{{endTime}}</view> -->
+				<!-- <uni-section title="条数:" type="square" class="uni-row" style="justify-content: center;align-items: center;">
 				{{ listDataItem.length }}
 			</uni-section> -->
 			</view>
 		</view>
-		
+
 		<view class="scroll-container" v-if="!editStatus">
 
 			<view v-for="(item, index) in listDataItem" :key="index" class="list-item">
@@ -103,9 +105,9 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="scroll-container" v-if="editStatus">
-		
+
 			<view v-for="(item, index) in listDaywork" :key="index" class="list-item">
 				<view class="title-container">
 					<view class="title uni-row">
@@ -137,7 +139,7 @@
 					<text class="label">操作者</text>
 					<text class="label right">{{ item['nickName'] }}</text>
 				</view> -->
-			<!-- 	<view class="item-info uni-row">
+				<!-- 	<view class="item-info uni-row">
 					<text class="label">开始时间</text>
 					<text class="label right">{{ item['startTime'] ? item['startTime'] : '-' }}</text>
 				</view> -->
@@ -149,21 +151,22 @@
 					<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">{{ item['equipmentDetailCode'] }}</text>
-					<view class="uni-row" style="justify-content: flex-end;margin-left: 20px;" v-if="item['adoptStatus'] && item['adoptStatus'] != null">
-						<text >交检状态:</text>
-						<text  v-if="item['adoptStatus'] == 1" style="color: #67c337;"	>正常</text>
-						<text  v-if="item['adoptStatus'] == 2" style="color: red;"	>反选</text>
+					<view class="uni-row" style="justify-content: flex-end;margin-left: 20px;"
+						v-if="item['adoptStatus'] && item['adoptStatus'] != null">
+						<text>交检状态:</text>
+						<text v-if="item['adoptStatus'] == 1" style="color: #67c337;">正常</text>
+						<text v-if="item['adoptStatus'] == 2" style="color: red;">反选</text>
 					</view>
 				</view>
 			</view>
 		</view>
 	</view>
-	
-	
+
+
 	<!-- <dialog-lotInfo ref="lotInfo"></dialog-lotInfo> -->
 </template>
 
@@ -197,8 +200,8 @@
 	const total = ref(0)
 	const editStatus = ref(false)
 	onLoad(() => {
-		
-		
+
+
 	})
 
 	onShow(() => {
@@ -219,7 +222,7 @@
 		let today = Date.parse(new Date());
 		let startTimestamp = Date.parse(new Date(startTime.value));
 		let endTimestamp = Date.parse(new Date(endTime.value));
-		if(endTimestamp - startTimestamp < 0){
+		if (endTimestamp - startTimestamp < 0) {
 			uni.showToast({
 				icon: 'none',
 				title: '开始日期不能超过结束日期',
@@ -227,7 +230,7 @@
 			})
 			return;
 		}
-		if(today - endTimestamp < 0 || today - startTimestamp < 0){
+		if (today - endTimestamp < 0 || today - startTimestamp < 0) {
 			uni.showToast({
 				icon: 'none',
 				title: '开始或结束日期不能超过今日',
@@ -235,7 +238,7 @@
 			})
 			return;
 		}
-		if(!startTime.value || !endTime.value){
+		if (!startTime.value || !endTime.value) {
 			uni.showToast({
 				icon: 'none',
 				title: '请选择开始或结束日期',
@@ -243,7 +246,7 @@
 			})
 			return;
 		}
-		if(endTimestamp - startTimestamp > 1000 * 60 * 60 * 24 * 30){
+		if (endTimestamp - startTimestamp > 1000 * 60 * 60 * 24 * 30) {
 			uni.showToast({
 				icon: 'none',
 				title: '日期区间最长不超过31天',
@@ -252,7 +255,7 @@
 			return;
 		}
 		show.value = !show.value
-		if(show.value) {
+		if (show.value) {
 			init();
 		}
 	}
@@ -263,7 +266,7 @@
 		});
 		console.log(startTime.value);
 		console.log(endTime.value)
-		getDayWorkItemHistory(startTime.value,endTime.value).then(res => {
+		getDayWorkItemHistory(startTime.value, endTime.value).then(res => {
 			if (res.code == 200) {
 				listData.value = res.rows || [];
 				listDataItem.value = res.rows || [];
@@ -287,52 +290,56 @@
 					}
 					return accumulator;
 				}, {});
-				
-				
-		// 0718
-		for (var i = 0; i < listData.value.length; i++) {
-		  var current = listData.value[i];
-		  var found = false;
-		  var endTimeStatus = "";
-		  for (var j = 0; j < listDaywork.value.length; j++) {
-		    if (listDaywork.value[j].dayworkId === current.dayworkId && listDaywork.value[j].processId === current.processId) {
-		      listDaywork.value[j].qualifiedNum += current.qualifiedNum;
-		      listDaywork.value[j].rejectSum += current.rejectSum;
-			  if(listDaywork.value[j].equipmentDetailCode != null && listDaywork.value[j].equipmentDetailCode != undefined && listDaywork.value[j].equipmentDetailCode != listDaywork.value[j].equipmentDetailCode){
-				  listDaywork.value[j].equipmentDetailCode = listDaywork.value[j].equipmentDetailCode+","+current.equipmentDetailCode
-			  }
-		      found = true;
-		      break;
-		    }
-		  }
-		
-		if (current.status == 3 ) {
-		        endTimeStatus = current.endTime;
-		        
-		      } else  {
-		        endTimeStatus= null;
-		      }
-		  if (!found) {
-		    listDaywork.value.push({
-			  processAlias:current.process.processAlias,
-			  equipmentDetailCode:current.equipmentDetailCode,
-			  lotCode:current.lotCode,
-			  productDescription:current.productDescription,
-			  daywork:current.daywork,
-		      dayworkId: current.dayworkId,
-		      processId: current.processId,
-		      qualifiedNum: current.qualifiedNum,
-		      rejectSum: current.rejectSum,
-		      endTime: endTimeStatus,
-			  adoptStatus:current.adoptStatus == null? null:current.adoptStatus
-			 
-		    });
-		  }
-		}
-		
-		console.log(listData.value);
-		console.log(listDaywork.value);
-				
+
+
+				// 0718
+				for (var i = 0; i < listData.value.length; i++) {
+					var current = listData.value[i];
+					var found = false;
+					var endTimeStatus = "";
+					for (var j = 0; j < listDaywork.value.length; j++) {
+						if (listDaywork.value[j].dayworkId === current.dayworkId && listDaywork.value[j]
+							.processId === current.processId) {
+							listDaywork.value[j].qualifiedNum += current.qualifiedNum;
+							listDaywork.value[j].rejectSum += current.rejectSum;
+							if (listDaywork.value[j].equipmentDetailCode != null && listDaywork.value[j]
+								.equipmentDetailCode != undefined && listDaywork.value[j].equipmentDetailCode !=
+								listDaywork.value[j].equipmentDetailCode) {
+								listDaywork.value[j].equipmentDetailCode = listDaywork.value[j]
+									.equipmentDetailCode + "," + current.equipmentDetailCode
+							}
+							found = true;
+							break;
+						}
+					}
+
+					if (current.status == 3) {
+						endTimeStatus = current.endTime;
+
+					} else {
+						endTimeStatus = null;
+					}
+					if (!found) {
+						listDaywork.value.push({
+							processAlias: current.process.processAlias,
+							equipmentDetailCode: current.equipmentDetailCode,
+							lotCode: current.lotCode,
+							productDescription: current.productDescription,
+							daywork: current.daywork,
+							dayworkId: current.dayworkId,
+							processId: current.processId,
+							qualifiedNum: current.qualifiedNum,
+							rejectSum: current.rejectSum,
+							endTime: endTimeStatus,
+							adoptStatus: current.adoptStatus == null ? null : current.adoptStatus
+
+						});
+					}
+				}
+
+				console.log(listData.value);
+				console.log(listDaywork.value);
+
 				// 时间下拉
 				// for (let i = 0; i < Object.keys(groupedData).length; i++) {
 				// 	dateList.value[i] = {
@@ -358,12 +365,14 @@
 		})
 	}
 
-	function handleCheckTab(){
+	function handleCheckTab() {
 		editStatus.value = true
 	}
-	function handleCheckTabHis(){
+
+	function handleCheckTabHis() {
 		editStatus.value = false
 	}
+
 	function change() {
 		listDataItem.value = listData.value[selectDate.value]
 	}
@@ -374,49 +383,48 @@
 </script>
 
 <style lang="scss">
-	
 	.time-controls {
 		.title {
-			margin: 20% auto 40% auto; 
-			
+			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;
 			margin-bottom: 48rpx;
-			
+
 			input {
-				border:1rpx solid gray;
+				border: 1rpx solid gray;
 				border-radius: 8rpx;
 				width: 400rpx;
 				height: 64rpx;
 			}
 		}
-		
+
 		.end {
 			justify-content: center;
 			align-items: center;
 			margin-bottom: 64rpx;
-			
+
 			input {
-				border:1rpx solid gray;
+				border: 1rpx solid gray;
 				border-radius: 8rpx;
 				width: 400rpx;
 				height: 64rpx;
 			}
 		}
-		
+
 		button {
 			width: 78%;
 			background-color: #1684fc;
@@ -429,6 +437,10 @@
 		height: 100%;
 		background-color: #f5f5f5;
 		overflow: auto;
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
 	}
 
 
@@ -503,13 +515,14 @@
 
 		}
 	}
+
 	.tab-container {
 		display: flex;
 		flex-direction: row;
 		width: 100%;
 		height: 32px;
 		justify-content: space-around;
-	
+
 		.table-item {
 			display: flex;
 			flex-direction: row;
@@ -520,9 +533,10 @@
 			justify-content: center;
 		}
 	}
+
 	.tab-item.active {
 		color: rgba(25, 137, 250, 1);
-		
+
 		font-weight: 700;
 	}
 </style>

+ 37 - 26
pages/reportingForWork/index.vue

@@ -63,9 +63,11 @@
 				</view>
 			</view>
 		</view>
-		<view class="top uni-row" v-if="flag" >
-			<button class="bottom-btn left-btn" style="background-color: #1684fc;" @click="HandleSeleteInviteUser(listData)"><text class="label">邀请报工</text></button>
-			<button class="bottom-btn right-btn" style="background-color: #e99d42;" @click="HandleSendInspection(listData)"><text class="label">送检</text></button>
+		<view class="top uni-row" v-if="flag">
+			<button class="bottom-btn left-btn" style="background-color: #1684fc;"
+				@click="HandleSeleteInviteUser(listData)"><text class="label">邀请报工</text></button>
+			<button class="bottom-btn right-btn" style="background-color: #e99d42;"
+				@click="HandleSendInspection(listData)"><text class="label">送检</text></button>
 		</view>
 		<view class="bottom uni-row">
 			<button class="bottom-btn left-btn" @click="handleChangevehicle"><text class="label">更换载具</text></button>
@@ -77,8 +79,8 @@
 			@handleAddDayWorkItem='handleAddDayWorkItem'></dialog-selectEquipment>
 		<dialog-selectInviteUser ref="inviteUser"
 			@handleAddDayWorkItem='handleAddDayWorkItem'></dialog-selectInviteUser>
+		<dialog-lotInfo ref="lotInfo"></dialog-lotInfo>
 	</view>
-	<dialog-lotInfo ref="lotInfo"></dialog-lotInfo>
 </template>
 
 <script setup>
@@ -387,12 +389,17 @@
 		height: calc(100% - 232rpx);
 		background-color: #f5f5f5;
 		overflow: auto;
+		position: absolute;
+		height: 100%;
+		left: 0;
+		right: 0;
 	}
 
 
 	.scroll-container {
 		position: relative;
 		top: 16rpx;
+		margin-bottom: 250rpx;
 		// right: 0;
 		// bottom: 144rpx;
 		// left: 0;
@@ -470,30 +477,30 @@
 	}
 
 	.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;
+		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 {
 		position: fixed;
@@ -540,4 +547,8 @@
 			color: #FFFFFF;
 		}
 	}
+
+	.uni-modal {
+		z-index: 999999 !important;
+	}
 </style>

+ 171 - 109
pages/sortBatchReporting/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
+	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: fixed;left: 0;right: 0;">
 		<view class="box-bg uni-row">
 			<view class="input-view uni-row">
 				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
@@ -14,7 +14,7 @@
 			<text>{{ normalStatus ? '是' : '否' }}</text>
 			<switch class="switch" :checked="normalStatus" @change="switchChange" color="rgba(103, 195, 55, 1.0)" />
 		</view>
-		<view class="scroll-container" style="padding-bottom: 150rpx;">
+		<view class="scroll-container" style="margin-bottom: 100px;">
 			<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 				<text>暂无批次</text>
 			</view>
@@ -108,19 +108,22 @@
 			</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>
+		<uni-drawer ref="showRight" mode="right" :mask-click="true" style="height: 100%;">
+			<view style="text-align: center; font-size: 48rpx; padding: 48rpx 0 24rpx 0;margin-top: 20px;">工艺列表</view>
 			<view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
 				仅显示当前工序后面工艺
 			</view>
-			<scroll-view scroll-y="true" style="height: 80%;" @touchmove.stop>
+			<view><button v-if="!editStatus" class="start-batch-btn" style="margin-bottom: 16rpx;" type="primary"
+					@click="handleOpenDrawing">查看本工序图纸</button></view>
+			<scroll-view scroll-y="true" style="height: 70%;" @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="start-batch-btn" style="margin-bottom: 10rpx;" type="primary"
-					@click="handleOpenDrawing">查看本工序图纸</button></view>
+			<!-- 		<view><button v-if="!editStatus" class="view-end-btn" style="margin-top: 20rpx;" type="primary"
+				@click="handleOpenDrawing">查看本工序图纸</button></view> -->
+
 		</uni-drawer>
 		<!-- <view v-if="bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
@@ -136,6 +139,7 @@
 		<dialog-lot ref="lotDialog" @submit="handleDoIt" />
 		<dialog-turnoverApplication ref="turnoverApplicationDialog" @reflushDaywork="handleDoTurnoverAfter" />
 		<dialog-selectProduction ref="selectProduction"></dialog-selectProduction>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 
 </template>
@@ -155,6 +159,7 @@
 		onShow,
 		onPullDownRefresh
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getDayWorkList,
 		showDaywork,
@@ -203,20 +208,21 @@
 	const curProcessAfte = ref([])
 	const showRight = ref(null) // 抽屉
 	const editStatus = ref(false)
-	
+	const showQrCodeReader = ref(false);
+
 	onLoad((options) => {
 		curPlan.value = store.planDetails;
 		normalStatus.value = true;
 		console.log(store.planDetails)
-		if(options != null) {
+		if (options != null) {
 			console.log(options)
 			console.log("999")
 			keywords.value = options.param1
-			if(store.planDetails.isAmend == 1 || store.planDetails.isWasteRecycling ==1){
+			if (store.planDetails.isAmend == 1 || store.planDetails.isWasteRecycling == 1) {
 				normalStatus.value = false;
 			}
 		}
-	
+
 		console.log(curPlan.value)
 		//废品回用的领料部门如果是当前工段,也要可以开始新批次
 		//查找当前计划单下的批次废品回用是当前工段
@@ -590,104 +596,160 @@
 			}
 		}
 	*/
-
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		// const mpaasScanModule = null
-		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;
-					}
-					showDaywork({
-						carrierCode: vehicleObj.carrierCode,
-						status: 7
-					}).then(response => {
-						if (response.code == 200) {
-							// console.log(response)
-							// console.log(response.data[0].productionPlanDetailId)
-							// console.log(store.planDetails.id)
-							if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-								uni.showToast({
-									icon: 'none',
-									title: '该批次不在当前工段',
-									duration: 2000
-								})
-								return
-							}
-							if (response.data[0].productionPlanDetailId == store.planDetails.id) {
-								// console.log(response.data)
-								lotDialog.value.open(response.data);
-							} else {
-								uni.showToast({
-									icon: 'none',
-									title: '该批次不在此计划单内',
-									duration: 2000
-								})
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		showDaywork({
+			carrierCode: vehicleObj.carrierCode,
+			status: 7
+		}).then(response => {
+			if (response.code == 200) {
+				// console.log(response)
+				// console.log(response.data[0].productionPlanDetailId)
+				// console.log(store.planDetails.id)
+				if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+					uni.showToast({
+						icon: 'none',
+						title: '该批次不在当前工段',
+						duration: 2000
 					})
+					return
 				}
-			);
-		} else {
-			// 测试时用
-			showDaywork({
-				carrierCode: '000075',
-				status: 7
-			}).then(response => {
-				if (response.code == 200) {
-					if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次不在当前工段',
-							duration: 2000
-						})
-						return
-					}
-					if (response.data[0].productionPlanDetailId == store.planDetails.id) {
-						console.log(response.data)
-						lotDialog.value.open(response.data);
-					} else {
-						uni.showToast({
-							icon: 'none',
-							title: '该批次不在此计划单内',
-							duration: 2000
-						})
-					}
+				if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+					// console.log(response.data)
+					lotDialog.value.open(response.data);
 				} else {
-					console.log(response)
 					uni.showToast({
 						icon: 'none',
-						title: response.msg,
+						title: '该批次不在此计划单内',
 						duration: 2000
 					})
 				}
-			})
-		}
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function handleScanCode() {
+		showQrCodeReader.value = true;
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// // const mpaasScanModule = null
+		// 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;
+		// 			}
+		// 			showDaywork({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 				status: 7
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					// console.log(response)
+		// 					// console.log(response.data[0].productionPlanDetailId)
+		// 					// console.log(store.planDetails.id)
+		// 					if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: '该批次不在当前工段',
+		// 							duration: 2000
+		// 						})
+		// 						return
+		// 					}
+		// 					if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+		// 						// console.log(response.data)
+		// 						lotDialog.value.open(response.data);
+		// 					} else {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: '该批次不在此计划单内',
+		// 							duration: 2000
+		// 						})
+		// 					}
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	showDaywork({
+		// 		carrierCode: '000075',
+		// 		status: 7
+		// 	}).then(response => {
+		// 		if (response.code == 200) {
+		// 			if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '该批次不在当前工段',
+		// 					duration: 2000
+		// 				})
+		// 				return
+		// 			}
+		// 			if (response.data[0].productionPlanDetailId == store.planDetails.id) {
+		// 				console.log(response.data)
+		// 				lotDialog.value.open(response.data);
+		// 			} else {
+		// 				uni.showToast({
+		// 					icon: 'none',
+		// 					title: '该批次不在此计划单内',
+		// 					duration: 2000
+		// 				})
+		// 			}
+		// 		} else {
+		// 			console.log(response)
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	})
+		// }
 	}
 
 	// function handleScanCode() {
@@ -718,17 +780,17 @@
 			item.isSort = 1
 		})
 		showDayworkSave(data).then(res => {
-			if(res.code == 200){
-			console.log(res)
-			init(store.planDetails.id);
-			}else{
+			if (res.code == 200) {
+				console.log(res)
+				init(store.planDetails.id);
+			} else {
 				uni.showToast({
 					icon: "none",
 					title: res.msg,
 					duration: 2000
 				})
 			}
-			
+
 		})
 	}
 
@@ -785,9 +847,9 @@
 							title: "取消成功",
 							duration: 2000
 						})
-						
+
 						setTimeout(() => {
-						 init(store.planDetails.id);
+							init(store.planDetails.id);
 						}, 1500);
 					} else {
 						uni.showToast({
@@ -796,7 +858,7 @@
 							duration: 2000
 						})
 						setTimeout(() => {
-						 init(store.planDetails.id);
+							init(store.planDetails.id);
 						}, 1000);
 					}
 				})

+ 1 - 1
pages/sortProductionPlan/details.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="page-container uni-column" style="padding: 24rpx;box-sizing: border-box;">
-		<view class="box-bg uni-row" style="height: 10%;position: fixed;top:0px;left: 12px;right: 12px;z-index: 10;">
+		<view class="box-bg uni-row" style="height: 9%;position: fixed;top:44px;left: 12px;right: 12px;z-index: 10;">
 			<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="输入搜索关键词" />

+ 133 - 83
pages/sortProductionPlan/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="uni-column" style="padding: 24rpx">
+	<view class="uni-column" style="padding: 24rpx;position: fixed;left: 0;right: 0;">
 		<view class="box-bg uni-row">
 			<view class="input-view uni-row">
 				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
@@ -10,7 +10,7 @@
 		<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 			<text>暂无生产计划</text>
 		</view>
-		<view v-else style="height: calc(100% - 100rpx); overflow: auto;padding-bottom: 100rpx;">
+		<view v-else style="height: calc(100% - 100rpx); overflow: auto;margin-bottom: 100px;">
 			<view v-for="(item, index) in listData" :key="index" @click="handleToBatchReporting(item)"
 				class="list-item">
 				<view class="title-container uni-row">
@@ -50,14 +50,16 @@
 				@click="handleScanCode">扫码报工</button>
 			<button class="start-batch-btn" type="primary" @click="handleSearchCode">查箱号</button>
 		</view>
-		<dialog-selectDaywork ref='selectDaywork'
-			@handleSelectDaywork='handleSelectDaywork'></dialog-selectDaywork>
+		<dialog-selectDaywork ref='selectDaywork' @handleSelectDaywork='handleSelectDaywork'></dialog-selectDaywork>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
 <script setup>
 	import {
-		getPlanDetailsList,selectByCarrierCode,selectInfoByLotCode
+		getPlanDetailsList,
+		selectByCarrierCode,
+		selectInfoByLotCode
 	} from '@/api/business/planDetails.js'
 	import {
 		ref
@@ -69,6 +71,7 @@
 		onPullDownRefresh,
 		onShow
 	} from '@dcloudio/uni-app'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		getToken
 	} from '@/utils/auth'
@@ -84,6 +87,7 @@
 	const keywords = ref('')
 	const selectDaywork = ref(null)
 	const carrierCode = ref(null)
+	const showQrCodeReader = ref(false);
 
 	onLoad(() => {
 		// dayworkItem数据更改后刷新数据
@@ -155,19 +159,21 @@
 	function handleSelectDaywork(data) {
 		console.log(data)
 		//查询计划单信息跳转
-		selectInfoByLotCode({lotCode:data}).then(res=>{
+		selectInfoByLotCode({
+			lotCode: data
+		}).then(res => {
 			store.planDetails = res.data
 			var code = encodeURIComponent(carrierCode.value);
 			// 构建查询参数字符串
 			var queryParam =
 				`param1=${code}`;
-			
+
 			// 使用模板字符串构建完整的URL
-		var navigateUrl = `/pages/sortBatchReporting/index?${queryParam}`;
-		uni.navigateTo({
-			url: navigateUrl
-		});
-	})
+			var navigateUrl = `/pages/sortBatchReporting/index?${queryParam}`;
+			uni.navigateTo({
+				url: navigateUrl
+			});
+		})
 	}
 
 	function handleSearch() {
@@ -177,76 +183,119 @@
 		reqParam.tenantId = !store.tenantId ? store.userInfo.tenantId : store.tenantId;
 		init(reqParam)
 	}
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		// const mpaasScanModule = null
-		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;
-					}
-					selectByCarrierCode({
-						carrierCode: vehicleObj.carrierCode,
-						deptId:Number(store.curDeptDetails.deptId)
-					}).then(response => {
-							carrierCode.value = vehicleObj.carrierCode
-						if (response.code == 200) {
-							if (response.data.length > 1) {
-								selectDaywork.value.open(response.data)	
-																		
-							} else {
-								handleSelectDaywork(response.data[0].lotCode)
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
-					})
-				}
-			);
-		} else {
-			// 测试时用
-			selectByCarrierCode({
-				carrierCode: '000745',
-				deptId:Number(store.curDeptDetails.deptId)
-			}).then(response => {
-				if (response.code == 200) {
-					carrierCode.value = '000745'
-					if (response.data.length > 1) {
-						selectDaywork.value.open(response.data)								
-					} else {
-						handleSelectDaywork(response.data[0].lotCode)
-					}
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg,
-						duration: 2000
-					})
-				}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
 			})
+			return;
 		}
+		selectByCarrierCode({
+			carrierCode: vehicleObj.carrierCode,
+			deptId: Number(store.curDeptDetails.deptId)
+		}).then(response => {
+			carrierCode.value = vehicleObj.carrierCode
+			if (response.code == 200) {
+				if (response.data.length > 1) {
+					selectDaywork.value.open(response.data)
+
+				} else {
+					handleSelectDaywork(response.data[0].lotCode)
+				}
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
+
+	function handleScanCode() {
+		showQrCodeReader.value = true;
+		// 引入原生插件
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// // const mpaasScanModule = null
+		// 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;
+		// 			}
+		// 			selectByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 				deptId:Number(store.curDeptDetails.deptId)
+		// 			}).then(response => {
+		// 					carrierCode.value = vehicleObj.carrierCode
+		// 				if (response.code == 200) {
+		// 					if (response.data.length > 1) {
+		// 						selectDaywork.value.open(response.data)	
+
+		// 					} else {
+		// 						handleSelectDaywork(response.data[0].lotCode)
+		// 					}
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	selectByCarrierCode({
+		// 		carrierCode: '000745',
+		// 		deptId:Number(store.curDeptDetails.deptId)
+		// 	}).then(response => {
+		// 		if (response.code == 200) {
+		// 			carrierCode.value = '000745'
+		// 			if (response.data.length > 1) {
+		// 				selectDaywork.value.open(response.data)								
+		// 			} else {
+		// 				handleSelectDaywork(response.data[0].lotCode)
+		// 			}
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	})
+		// }
 	}
 </script>
 
@@ -362,6 +411,7 @@
 			}
 		}
 	}
+
 	.bottom {
 		height: 10%;
 		position: fixed;
@@ -374,7 +424,7 @@
 		align-items: center;
 		background-color: #fff;
 		justify-content: space-evenly;
-	
+
 		.start-batch-btn {
 			flex: 1;
 			height: 80rpx;
@@ -383,7 +433,7 @@
 			color: #FFFFFF;
 			font-size: 28rpx;
 		}
-	
+
 		.view-end-btn {
 			flex: 1;
 			height: 80rpx;
@@ -391,7 +441,7 @@
 			border-radius: 8rpx;
 			color: #FFFFFF;
 			font-size: 28rpx;
-	
+
 		}
 	}
 </style>

+ 222 - 199
pages/sorting/form.vue

@@ -51,7 +51,8 @@
 				<view class="question uni-column">
 					<view class="label uni-row">
 						<text>问题描述</text>
-						<text :style="{ color: showStatusColor(item.status) }">{{item.consultDepartment == 0?'技术':'品管'}}  {{ selectText(item) }}</text>
+						<text :style="{ color: showStatusColor(item.status) }">{{item.consultDepartment == 0?'技术':'品管'}}
+							{{ selectText(item) }}</text>
 					</view>
 					<view class="content">{{ item.content }}</view>
 				</view>
@@ -67,21 +68,14 @@
 		<view class="consultation-container ">
 			<view class="title unfit-title uni-row">
 				<view class="title">零取</view>
-				<view class="add-btn" v-if="Number(dayworkItem.status) < 3" style="background-color: #409eff;"  @click="handleAddLot">添加</view>
+				<view class="add-btn" v-if="Number(dayworkItem.status) < 3" style="background-color: #409eff;"
+					@click="handleAddLot">添加</view>
 			</view>
-				<view >
-					<zb-table v-if="Number(dayworkItem.status) < 3"
-					    :columns="column1"
-					    :stripe="true"
-						:fit="true"
-						@dele="dele"
-					    :data="retrievalInfo"></zb-table>
-						<zb-table v-else
-						    :columns="column2"
-						    :stripe="true"
-							:fit="true"
-							@dele="dele"
-						    :data="retrievalInfo"></zb-table>
+			<view style="flex-direction: row;">
+				<zb-table v-if="Number(dayworkItem.status) < 3" :columns="column1" :stripe="true" :fit="true"
+					@dele="dele" :data="retrievalInfo"></zb-table>
+				<zb-table v-else :columns="column2" :stripe="true" :fit="true" @dele="dele"
+					:data="retrievalInfo"></zb-table>
 				<!-- <uni-table   ref="table" :loading="loading" border stripe  emptyText="暂无更多数据" >
 							<uni-tr >
 								<uni-th style="font-size: 25rpx;" width="atuo"   align="center">批次号</uni-th>
@@ -99,19 +93,21 @@
 								</uni-th>
 							</uni-tr>
 						</uni-table> -->
-						</view>
-						<view v-if="saveFlag"  class='middle'>
-							<view class='segment'></view>
-							<view class='segment'></view>
-						</view>
-						<view v-if="saveFlag" class="title unfit-title uni-row">
-							<view class="title">零存</view>
-						</view>
-						<view v-if="saveFlag" class="save uni-row">
-							<text class="label">存入数量</text>
-							<input  class="number" type="number" v-if="!(storageInfo.status == 1 || Number(dayworkItem.status) >= 3 || storageInfo.id)" placeholder="请输入" v-model="storageNum" />
-							<span style="margin-left: 56rpx;flex: 1;" v-else>{{ storageNum }}</span>
-						</view>
+			</view>
+			<view v-if="saveFlag" class='middle'>
+				<view class='segment'></view>
+				<view class='segment'></view>
+			</view>
+			<view v-if="saveFlag" class="title unfit-title uni-row">
+				<view class="title">零存</view>
+			</view>
+			<view v-if="saveFlag" class="save uni-row">
+				<text class="label">存入数量</text>
+				<input class="number" type="number"
+					v-if="!(Object.keys(storageInfo).length > 0 || storageInfo.status == 1 || Number(dayworkItem.status) >= 3)"
+					placeholder="请输入" v-model="storageNum" />
+				<span style="margin-left: 56rpx;flex: 1;" v-else>{{ storageNum }}</span>
+			</view>
 		</view>
 
 		<!-- 报工部分 -->
@@ -139,8 +135,8 @@
 					更换载具</view>
 				<view v-if="checkFinishable()&&Number(dayworkItem.status) < 3" class="finished-btn"
 					@click.stop="handleFinishDaywork">结束报工</view>
-				<view v-if="Number(dayworkItem.status) < 3" class="pause-btn"
-					@click.stop="handleUpdateDaywork">暂停</view>
+				<view v-if="Number(dayworkItem.status) < 3" class="pause-btn" @click.stop="handleUpdateDaywork">暂停
+				</view>
 				<view v-if="Number(dayworkItem.status) < 3" class="question-btn uni-column"
 					@click.stop="handleAddConsultation">
 					<uni-icons type="headphones" size="24" />
@@ -195,30 +191,47 @@
 	const lastRequestTimestamp = ref(0);
 	const dayworkItem = ref({})
 	const saveFlag = ref(false)
-	const storageNum = ref(null)
+	const storageNum = ref('')
 	const storageInfo = ref(null)
 	const qualifiedNumRatio = ref(0)
 	const isFinish = ref(false)
-	const column1 = [
-	    { name: 'lotCode', label: '批次号',align:'center'},
-	    { name: 'storageNum', label: '数量',align:'center' },
-		{ name: 'operation', type:'operation',label: '操作',align:'center',renders:[
-              {
-                name:'删除',
-                type:'warn',
-                func:"dele",
-				class:"buttonOp"
-              },
-            ]},
+	const column1 = [{
+			name: 'lotCode',
+			label: '批次号',
+			align: 'center'
+		},
+		{
+			name: 'storageNum',
+			label: '数量',
+			align: 'center'
+		},
+		{
+			name: 'operation',
+			type: 'operation',
+			label: '操作',
+			align: 'center',
+			renders: [{
+				name: '删除',
+				type: 'warn',
+				func: "dele",
+				class: "buttonOp"
+			}, ]
+		},
 	]
-	const column2 = [
-	    { name: 'lotCode', label: '批次号',align:'center'},
-	    { name: 'storageNum', label: '数量',align:'center' },
+	const column2 = [{
+			name: 'lotCode',
+			label: '批次号',
+			align: 'center'
+		},
+		{
+			name: 'storageNum',
+			label: '数量',
+			align: 'center'
+		},
 	]
 
 	/***************************** 页面生命周期函数 *****************************/
-	onLoad(()=>{
-	})
+	onLoad(() => {})
 	onShow(() => {
 		uni.$off('addInfoEvent');
 		uni.$off('addUnfitInfoEvent')
@@ -261,21 +274,24 @@
 			if (res.code === 200) {
 				dayworkItem.value = res.data
 				//判断是否显示零存
-				if(dayworkItem.value.processStepNumber == dayworkInfo.value.processSequence[dayworkInfo.value.processSequence.length - 1].processStepNumber) {
+				if (dayworkItem.value.processStepNumber == dayworkInfo.value.processSequence[dayworkInfo.value
+						.processSequence.length - 1].processStepNumber) {
 					saveFlag.value = true
-				}else{
+				} else {
 					saveFlag.value = false
 				}
 				console.log(dayworkItem.value)
-				if (dayworkItem.value.status == 0 &&dayworkItem.value.qualifiedNum === 0 && dayworkItem.value.rejectNum === 0) {
+				if (dayworkItem.value.status == 0 && dayworkItem.value.qualifiedNum === 0 && dayworkItem.value
+					.rejectNum === 0) {
 					dayworkItem.value.qualifiedNum = res.data.prodNum
 				}
 				retrievalInfo.value = res.data.retrievalInfo
 				storageInfo.value = res.data.storageInfo
 				console.log(Object.keys(storageInfo.value).length === 0)
-				if(Object.keys(storageInfo.value).length !== 0) {
+				if (Object.keys(storageInfo.value).length !== 0) {
 					storageNum.value = storageInfo.value.storageNum
 				}
+				console.log(storageNum.value)
 				consultations.value = res.data.consults
 				unfitInfos.value = res.data.rejectList
 			} else {
@@ -288,7 +304,7 @@
 	}
 
 	const addInfo = (data) => {
-		data.forEach(item=>{
+		data.forEach(item => {
 			console.log(retrievalInfo.value)
 			retrievalInfo.value.push(item)
 		})
@@ -303,50 +319,51 @@
 		})
 		console.log(dayworkItem.value)
 		const info = {
-			deptId:dayworkItem.value.deptId,
-			productId:dayworkItem.value.daywork.productId,
-			drawingNumber:dayworkItem.value.drawingNumber,
-			technologyVersion:dayworkItem.value.technologyVersion,
-			retrievalLotId:dayworkItem.value.lotId,
-			hasAddedList : retrievalInfo.value
+			deptId: dayworkItem.value.deptId,
+			productId: dayworkItem.value.daywork.productId,
+			drawingNumber: dayworkItem.value.drawingNumber,
+			technologyVersion: dayworkItem.value.technologyVersion,
+			retrievalLotId: dayworkItem.value.lotId,
+			hasAddedList: retrievalInfo.value
 		}
 		// 将 info 对象转换为 JSON 字符串
-const serializedData = JSON.stringify(info);
+		const serializedData = JSON.stringify(info);
 
-// 对 JSON 字符串进行 URL 编码
-const encodedData = encodeURIComponent(serializedData);
+		// 对 JSON 字符串进行 URL 编码
+		const encodedData = encodeURIComponent(serializedData);
 
-// 构建 URL,确保使用正确编码的数据
-uni.navigateTo({
-  url: `/pages/sorting/storageRetrieval?data=${encodedData}`
-});
+		// 构建 URL,确保使用正确编码的数据
+		uni.navigateTo({
+			url: `/pages/sorting/storageRetrieval?data=${encodedData}`
+		});
 	}
 	const addUnfitInfo = (data) => {
 		console.log(data)
-		if (data&& data.length >0) {
+		if (data && data.length > 0) {
 			for (var i = 0; i < data.length; i++) {
 				const info = {
-				inspectionInstructionId: data[i].id,
-				title: data[i].title,
-				standard: data[i].standard,
-				checkStandard: data[i].standard,
-				type: data[i].type,
-				reason: ''
-			}
-			unfitInfos.value.push(info)
+					inspectionInstructionId: data[i].id,
+					title: data[i].title,
+					standard: data[i].standard,
+					checkStandard: data[i].standard,
+					type: data[i].type,
+					reason: ''
+				}
+				unfitInfos.value.push(info)
 			}
-			
+
 		}
 	}
-	function dele(ite,index) {
-		if(ite.status == 1){
+
+	function dele(ite, index) {
+		if (ite.status == 1) {
 			uni.showToast({
 				icon: 'none',
 				title: '已被领取,不能删除'
 			})
-		}else{
-	  retrievalInfo.value.splice(index, 1);
-	  }
+		} else {
+			retrievalInfo.value.splice(index, 1);
+		}
 	}
 	const addConsultation = (data) => {
 		const info = {
@@ -367,8 +384,8 @@ uni.navigateTo({
 			processAlias: dayworkItem.value.process.processAlias,
 			// technicianId: dayworkItem.value.technicianId,
 			technicianId: data.technicianId,
-			departments : data.departments,
-			pictures : data.pictures
+			departments: data.departments,
+			pictures: data.pictures
 		}
 		saveConsult(info).then(res => {
 			if (res.code === 200) {
@@ -392,9 +409,9 @@ uni.navigateTo({
 		uni.$once('addUnfitInfoEvent', (data) => {
 			addUnfitInfo(data)
 		})
-  const hasInstruction = await getHasInstruction();
-    console.log(hasInstruction); // 这将打印 true 或 false
-    if (!hasInstruction) {
+		const hasInstruction = await getHasInstruction();
+		console.log(hasInstruction); // 这将打印 true 或 false
+		if (!hasInstruction) {
 			uni.navigateTo({
 				url: "/pages/sorting/specialOptions",
 				success: (res) => {
@@ -411,38 +428,38 @@ uni.navigateTo({
 					})
 				}
 			})
-		}else{
+		} else {
 			console.log(dayworkItem.value)
-		uni.navigateTo({
-			url: "/pages/sorting/options",
-			success: (res) => {
-				// 通过eventChannel向被打开页面传送数据
-				res.eventChannel.emit('acceptDataFromOpenerPage', {
-					data: dayworkItem.value,
-					query: {
-						productId: dayworkItem.value.daywork.productId,
-						processCode: dayworkItem.value.process.processCode,
-						// technologyVersion: dayworkItem.value.technologicalProcessDetail.technologyVersion
-						technologyVersion: dayworkItem.value.technologyVersion
-					},
-					index: unfitInfos.value.length
-				})
-			}
-		})
+			uni.navigateTo({
+				url: "/pages/sorting/options",
+				success: (res) => {
+					// 通过eventChannel向被打开页面传送数据
+					res.eventChannel.emit('acceptDataFromOpenerPage', {
+						data: dayworkItem.value,
+						query: {
+							productId: dayworkItem.value.daywork.productId,
+							processCode: dayworkItem.value.process.processCode,
+							// technologyVersion: dayworkItem.value.technologicalProcessDetail.technologyVersion
+							technologyVersion: dayworkItem.value.technologyVersion
+						},
+						index: unfitInfos.value.length
+					})
+				}
+			})
 		}
 	}
-	async function getHasInstruction(){
+	async function getHasInstruction() {
 		console.log(dayworkItem.value)
-				const res = await selectInstructionList({
-					technologicalProcessId: dayworkItem.value.technologicalProcessId,
-					processCode: dayworkItem.value.process.processCode,
-					lotId: dayworkItem.value.lotId
-				})
-				return res.data
-			// 	.then(res=> {
-			// 		console.log(res.data)
-			// 	return res.data
-			// })
+		const res = await selectInstructionList({
+			technologicalProcessId: dayworkItem.value.technologicalProcessId,
+			processCode: dayworkItem.value.process.processCode,
+			lotId: dayworkItem.value.lotId
+		})
+		return res.data
+		// 	.then(res=> {
+		// 		console.log(res.data)
+		// 	return res.data
+		// })
 	}
 	// 删除不合格信息
 	const handleDelUnfit = (index) => {
@@ -522,15 +539,16 @@ uni.navigateTo({
 				return ''
 		}
 	}
+
 	function selectText(item) {
 		// for (var i = 0; i < consul.length; i++) {
 		// 	if (item.status == consul[i].value) {
 		// 		return consul[i].text
 		// 	}
 		// }
-		if(item.consultResultId == 0) {
+		if (item.consultResultId == 0) {
 			return '待确认'
-		}else{
+		} else {
 			return item.result
 		}
 	}
@@ -560,7 +578,7 @@ uni.navigateTo({
 
 	const validHandle = () => {
 		console.log(storageNum.value == "")
-		if(storageNum.value != null &&storageNum.value != "" && storageNum.value<=0) {
+		if (storageNum.value != null && storageNum.value != "" && storageNum.value <= 0) {
 			uni.showToast({
 				icon: 'none',
 				title: "存入数量应大于0",
@@ -586,7 +604,7 @@ uni.navigateTo({
 			})
 			return false;
 		}
-		if (isFinish.value &&dayworkItem.value.qualifiedNum == 0) {
+		if (isFinish.value && dayworkItem.value.qualifiedNum == 0) {
 			uni.showToast({
 				icon: 'none',
 				title: "合格数不能为0",
@@ -612,73 +630,74 @@ uni.navigateTo({
 		// 	})
 		// 	return false;
 		// }
-		 return true
+		return true
 		// unfitInfos.value.forEach((e, i) => {
 		// 	if (e.name)
 		// })
 	}
-async function handleCheckStock() {
-    let currentProcessStepNumber = dayworkInfo.value.currentProcess.processStepNumber;
-    let lastProcess = dayworkInfo.value.processSequence[dayworkInfo.value.processSequence.length - 1];
-    // 判断当前工序是否是最后一道序
-    if (currentProcessStepNumber === lastProcess.processStepNumber) {
-        // 等待 getTakeStockPeriod() 的 Promise 完成
-        const res = await getTakeStockPeriod({dayworkId: dayworkInfo.value.id});
-        console.log(res.data.length);
-        if (res.data.length > 0) {
-            uni.showToast({
-                icon: 'none',
-                title: "此次盘点未结束,不能结束报工",
-                duration: 2000
-            });
-            return false; // 如果盘点未结束,返回 false
-        }
-    }
-    // 如果不是最后一道工序或盘点已结束,返回 true
-    return true;
-}
-	
-
-	 async function handleFinishDaywork() {
-		 isFinish.value = true
+	async function handleCheckStock() {
+		let currentProcessStepNumber = dayworkInfo.value.currentProcess.processStepNumber;
+		let lastProcess = dayworkInfo.value.processSequence[dayworkInfo.value.processSequence.length - 1];
+		// 判断当前工序是否是最后一道序
+		if (currentProcessStepNumber === lastProcess.processStepNumber) {
+			// 等待 getTakeStockPeriod() 的 Promise 完成
+			const res = await getTakeStockPeriod({
+				dayworkId: dayworkInfo.value.id
+			});
+			console.log(res.data.length);
+			if (res.data.length > 0) {
+				uni.showToast({
+					icon: 'none',
+					title: "此次盘点未结束,不能结束报工",
+					duration: 2000
+				});
+				return false; // 如果盘点未结束,返回 false
+			}
+		}
+		// 如果不是最后一道工序或盘点已结束,返回 true
+		return true;
+	}
+
+
+	async function handleFinishDaywork() {
+		isFinish.value = true
 		if (!validHandle()) {
 			return
-		}	
+		}
 		//判断当前批次是否在盘点,如果盘点未结束,则不能结束报工
-		let checkStockResult = await  handleCheckStock();
+		let checkStockResult = await handleCheckStock();
 		console.log(checkStockResult)
-		if(!checkStockResult ) { 
+		if (!checkStockResult) {
 			return;
 		}
 		//零存数据
-	if(storageNum.value != null&& storageNum.value != "" ) {
-			if(Object.keys(storageInfo.value).length === 0){
-			storageInfo.value = {
-				productionPlanDetailId:dayworkItem.value.productionPlanDetailId,
-				productDescription:dayworkItem.value.productDescription,
-				drawingNumber:dayworkItem.value.drawingNumber,
-				lotId:dayworkItem.value.lotId,
-				lotCode:dayworkItem.value.lotCode,
-				deptId:dayworkItem.value.deptId,
-				productId:dayworkItem.value.daywork.productId,
-				technologyVersion:dayworkItem.value.technologyVersion,
-				storageNum:storageNum.value,
-				storagerId:store.userInfo.userId,	
-			}
-			}
-			else{
+		if (storageNum.value != null && storageNum.value != "") {
+			if (Object.keys(storageInfo.value).length === 0) {
+				storageInfo.value = {
+					productionPlanDetailId: dayworkItem.value.productionPlanDetailId,
+					productDescription: dayworkItem.value.productDescription,
+					drawingNumber: dayworkItem.value.drawingNumber,
+					lotId: dayworkItem.value.lotId,
+					lotCode: dayworkItem.value.lotCode,
+					deptId: dayworkItem.value.deptId,
+					productId: dayworkItem.value.daywork.productId,
+					technologyVersion: dayworkItem.value.technologyVersion,
+					storageNum: storageNum.value,
+					storagerId: store.userInfo.userId,
+				}
+			} else {
 				storageInfo.value.storageNum = storageNum.value
 			}
-		}else{
+		} else {
 			storageInfo.value = null
 		}
 		//零取数据
-		if(retrievalInfo.value.length >0) {
-			retrievalInfo.value.forEach(item =>{
+		if (retrievalInfo.value.length > 0) {
+			retrievalInfo.value.forEach(item => {
 				item.retrievalLotId = dayworkItem.value.lotId,
-				item.retrievalLotCode = dayworkItem.value.lotCode,
-				item.retrievalerId = store.userInfo.userId,
-				item.retrievalTime = timestampToTime(new Date())
+					item.retrievalLotCode = dayworkItem.value.lotCode,
+					item.retrievalerId = store.userInfo.userId,
+					item.retrievalTime = timestampToTime(new Date())
 			})
 		}
 		const saveData = {
@@ -689,8 +708,8 @@ async function handleCheckStock() {
 			rejectNum: dayworkItem.value.rejectNum,
 			qualifiedNum: dayworkItem.value.qualifiedNum,
 			remark: dayworkItem.value.remark,
-			storageInfo:storageInfo.value,
-			retrievalInfo:retrievalInfo.value
+			storageInfo: storageInfo.value,
+			retrievalInfo: retrievalInfo.value
 		}
 		const currentTime = Date.now();
 
@@ -723,34 +742,33 @@ async function handleCheckStock() {
 			return
 		}
 		//零存数据
-	if(storageNum.value != null&& storageNum.value != "" ) {
-			if(Object.keys(storageInfo.value).length === 0){
-			storageInfo.value = {
-				productionPlanDetailId:dayworkItem.value.productionPlanDetailId,
-				productDescription:dayworkItem.value.productDescription,
-				drawingNumber:dayworkItem.value.drawingNumber,
-				lotId:dayworkItem.value.lotId,
-				lotCode:dayworkItem.value.lotCode,
-				deptId:dayworkItem.value.deptId,
-				productId:dayworkItem.value.daywork.productId,
-				technologyVersion:dayworkItem.value.technologyVersion,
-				storageNum:storageNum.value,
-				storagerId:store.userInfo.userId,	
-			}
-			}
-			else{
+		if (storageNum.value != null && storageNum.value != "") {
+			if (Object.keys(storageInfo.value).length === 0) {
+				storageInfo.value = {
+					productionPlanDetailId: dayworkItem.value.productionPlanDetailId,
+					productDescription: dayworkItem.value.productDescription,
+					drawingNumber: dayworkItem.value.drawingNumber,
+					lotId: dayworkItem.value.lotId,
+					lotCode: dayworkItem.value.lotCode,
+					deptId: dayworkItem.value.deptId,
+					productId: dayworkItem.value.daywork.productId,
+					technologyVersion: dayworkItem.value.technologyVersion,
+					storageNum: storageNum.value,
+					storagerId: store.userInfo.userId,
+				}
+			} else {
 				storageInfo.value.storageNum = storageNum.value
 			}
-		}else{
+		} else {
 			storageInfo.value = null
 		}
 		//零取数据
-		if(retrievalInfo.value.length >0) {
-			retrievalInfo.value.forEach(item =>{
+		if (retrievalInfo.value.length > 0) {
+			retrievalInfo.value.forEach(item => {
 				item.retrievalLotId = dayworkItem.value.lotId,
-				item.retrievalLotCode = dayworkItem.value.lotCode,
-				item.retrievalerId = store.userInfo.userId,
-				item.retrievalTime = timestampToTime(new Date())
+					item.retrievalLotCode = dayworkItem.value.lotCode,
+					item.retrievalerId = store.userInfo.userId,
+					item.retrievalTime = timestampToTime(new Date())
 			})
 		}
 		const saveData = {
@@ -761,8 +779,8 @@ async function handleCheckStock() {
 			rejectNum: dayworkItem.value.rejectNum,
 			qualifiedNum: dayworkItem.value.qualifiedNum,
 			remark: dayworkItem.value.remark,
-			storageInfo:storageInfo.value,
-			retrievalInfo:retrievalInfo.value
+			storageInfo: storageInfo.value,
+			retrievalInfo: retrievalInfo.value
 		}
 		console.log(saveData)
 		update(saveData).then(res => {
@@ -784,6 +802,7 @@ async function handleCheckStock() {
 	.buttonOp {
 		margin-top: 5px;
 	}
+
 	.page-container {
 		// height: 100%;
 		background-color: #ececec;
@@ -795,6 +814,7 @@ async function handleCheckStock() {
 			margin: 24rpx 16rpx;
 		}
 	}
+
 	.add-btn {
 		padding: 12rpx 32rpx;
 		background-color: #a4adb3;
@@ -820,13 +840,14 @@ async function handleCheckStock() {
 			color: #9f9f9f;
 		}
 	}
+
 	.middle {
 		display: flex;
 		flex-direction: row;
 		align-items: center;
 		justify-content: center
 	}
-	
+
 	.segment {
 		width: 80%;
 		background-color: rgba(213, 213, 213, 1);
@@ -852,24 +873,25 @@ async function handleCheckStock() {
 			font-size: 24rpx;
 		}
 	}
-	
+
 	.save {
 		align-items: center;
 		padding-bottom: 32rpx;
 		justify-content: space-between;
+
 		input {
-			
+
 			height: 56rpx;
 			border: 1px solid #9f9f9f;
 			font-size: 28rpx;
-	
+
 			&.number {
 				width: 60%;
 				text-align: center;
 			}
 		}
 	}
-	
+
 
 	.unfit-container {
 		padding: 24rpx;
@@ -1065,7 +1087,8 @@ async function handleCheckStock() {
 			}
 		}
 	}
-	.zb-table .item-tr {
+
+	.zb-table .item-tr[data-v-336e291f] {
 		flex-direction: row;
 	}
 </style>

+ 80 - 67
pages/sorting/options.vue

@@ -1,38 +1,42 @@
 <template>
 	<view class="page-container" style="position: absolute;left: 0;right: 0;top: 0;bottom: 0">
-				<view class="option-container uni-column" style="display: flex;">
-					<!-- tab-bar -->
-					<view class="tab-bars uni-row">
-						<!-- 				<view :class="currentTabName === 1 ? 'active' : ''" @click.stop="handleTabBarClick(1)">
+		<view class="option-container uni-column" style="display: flex;">
+			<!-- tab-bar -->
+			<view class="tab-bars uni-row">
+				<!-- 				<view :class="currentTabName === 1 ? 'active' : ''" @click.stop="handleTabBarClick(1)">
 							<text>检查指导书</text>
 							<view class="line"></view>
 						</view> -->
-						<view :class="currentTabName === 2 ? 'active' : ''">
-							<text>分选标准</text>
-							<view class="line"></view>
-						</view>
-					</view>
-					<!-- 搜索框 -->
-					<view class="search-container uni-row">
-						<input type="text" v-model="keywords" placeholder="请输入关键字" />
-						<view class="btn" @click="handleSearch()">搜索</view>
-					</view>
+				<view :class="currentTabName === 2 ? 'active' : ''">
+					<text>分选标准</text>
+					<view class="line"></view>
 				</view>
-				<view  class="uni-row" style="background-color:#ffffff;height: 75%;padding-bottom: 12px;">
-					<view style="width: 100%;height: 100%;overflow: auto;">
-						<view v-if="dataList&& dataList.length == 0" style="align-items: center;margin-top: 30px">暂无分选标准数据</view>
-						<view v-else v-for="(item, index) in dataList" :key="index" :class="{'option-item':true,'selectedOptions':isSelectedOptions(item)}" @click="itemClick(item)">
-							<view class="uni-row">
-								<view class="value">{{ item.standard }}</view>
-								<uni-icons v-if="selection.includes(item)" class="arrow-right" type="checkmarkempty" size="24" />
-							</view>
-						</view>
-					</view>
+			</view>
+			<!-- 搜索框 -->
+			<view class="search-container uni-row">
+				<input type="text" v-model="keywords" placeholder="请输入关键字" />
+				<view class="btn" @click="handleSearch()">搜索</view>
+			</view>
+		</view>
+		<view class="uni-row" style="background-color:#ffffff;height: 75%;padding-bottom: 12px;margin-top: 8px;">
+			<view style="width: 100%;height: 100%;overflow: auto;">
+				<view v-if="dataList&& dataList.length == 0" style="align-items: center;margin-top: 30px">暂无分选标准数据
 				</view>
-				<view class="bottom uni-row">
-					<button class="start-batch-btn" type="primary" :disabled="selection.length ==0" @click="handleAdd">添加</button>
+				<view v-else v-for="(item, index) in dataList" :key="index"
+					:class="{'option-item':true,'selectedOptions':isSelectedOptions(item)}" @click="itemClick(item)">
+					<view class="uni-row">
+						<view class="value">{{ item.standard }}</view>
+						<uni-icons v-if="selection.includes(item)" class="arrow-right" type="checkmarkempty"
+							size="24" />
+					</view>
 				</view>
-</view>
+			</view>
+		</view>
+		<view class="bottom uni-row">
+			<button class="start-batch-btn" type="primary" :disabled="selection.length ==0"
+				@click="handleAdd">添加</button>
+		</view>
+	</view>
 </template>
 
 <script setup>
@@ -50,7 +54,7 @@
 		onShow
 	} from '@dcloudio/uni-app'
 	import {
-		 getInstructionInfo
+		getInstructionInfo
 	} from '@/api/business/sortDaywork.js'
 	import {
 		store
@@ -82,28 +86,29 @@
 			}
 		})
 	})
-		const loadInspection = (data) => {
-			uni.showLoading({
-				title: '加载中'
-			});
-			// console.log(data)
-			getInstructionInfo(data).then(res => {
-				console.log(res)
-				if (res.code === 200) {
-					dataList.value = res.data
-					originalList.value = res.data
-					uni.hideLoading();
-					// console.log(optionList1.value, res.data.instructions)
-					// console.log(optionList2.value, res.data.standards)
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: '分选标准获取失败'
-					})
-					uni.hideLoading();
-				}
-			})
-		}
+	const loadInspection = (data) => {
+		uni.showLoading({
+			title: '加载中'
+		});
+		// console.log(data)
+		getInstructionInfo(data).then(res => {
+			console.log(res)
+			if (res.code === 200) {
+				dataList.value = res.data
+				originalList.value = res.data
+				uni.hideLoading();
+				// console.log(optionList1.value, res.data.instructions)
+				// console.log(optionList2.value, res.data.standards)
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: '分选标准获取失败'
+				})
+				uni.hideLoading();
+			}
+		})
+	}
+
 	function isSelectedOptions(item) {
 		return selection.value.includes(item);
 	}
@@ -112,16 +117,16 @@
 		selectionCategory.value = item
 		console.log(item)
 		console.log(categoryList.value)
-		let index = categoryList.value.findIndex(v=>v.id == item.id)
+		let index = categoryList.value.findIndex(v => v.id == item.id)
 		console.log(index)
 		currentData.value = index
-		if(categoryList.value[index].instructionList && categoryList.value[index].instructionList.length>0){
-		dataList.value = categoryList.value[index].instructionList
-		originalList.value = categoryList.value[index].instructionList
-		}else{
+		if (categoryList.value[index].instructionList && categoryList.value[index].instructionList.length > 0) {
+			dataList.value = categoryList.value[index].instructionList
+			originalList.value = categoryList.value[index].instructionList
+		} else {
 			dataList.value = []
 		}
-		
+
 	}
 
 	function itemClick(item) {
@@ -134,12 +139,12 @@
 	}
 
 	function handleSearch() {
-		if(keywords.value == ""){
+		if (keywords.value == "") {
 			dataList.value = originalList.value
-		}else{
-			dataList.value = originalList.value.filter(item=>item.standard.includes(keywords.value))
+		} else {
+			dataList.value = originalList.value.filter(item => item.standard.includes(keywords.value))
 		}
-		
+
 
 	}
 	// 页面生命周期函数
@@ -151,11 +156,11 @@
 	// tabbar切换
 
 
-	function handleAdd(){
+	function handleAdd() {
 		console.log(selection.value)
-		uni.$emit('addUnfitInfoEvent', 
+		uni.$emit('addUnfitInfoEvent',
 			selection.value
-			
+
 		)
 		uni.navigateBack()
 	}
@@ -167,6 +172,7 @@
 		font-weight: 700;
 		/* 选中之后样式 */
 	}
+
 	.page-container {
 		background-color: #ececec;
 		font-size: 28rpx;
@@ -226,38 +232,45 @@
 			color: #ffffff;
 		}
 	}
+
 	.option-item {
 		position: relative;
 		margin-top: 24rpx;
 		padding-bottom: 8rpx;
 		border-bottom: 1px solid #BBBBBB;
 		margin-left: 24rpx;
-		
+
 		.uni-row {
 			padding-bottom: 16rpx;
-			
+
 			.label {
 				width: 144rpx;
 			}
+
 			.value {
 				flex: 1;
 			}
 		}
+
 		.uni-row:first-child {
 			font-size: 32rpx;
 
 		}
+
 		.arrow-right {
 			position: absolute;
 			right: 24rpx;
 		}
 	}
+
 	.uniui-checkmarkempty[data-v-d31e1c47]:before {
-	    color: #1684FC;
+		color: #1684FC;
 	}
+
 	.selectedOptions {
 		color: #1684FC;
 	}
+
 	.bottom {
 		height: 10%;
 		position: fixed;
@@ -270,7 +283,7 @@
 		align-items: center;
 		background-color: #fff;
 		justify-content: space-evenly;
-	
+
 		.start-batch-btn {
 			flex: 1;
 			height: 80rpx;

+ 82 - 63
pages/sorting/specialOptions.vue

@@ -1,47 +1,53 @@
 <template>
 	<view class="page-container" style="position: absolute;left: 0;right: 0;top: 0;bottom: 0">
-				<view class="option-container uni-column" style="display: flex;">
-					<!-- tab-bar -->
-					<view class="tab-bars uni-row">
-						<!-- 				<view :class="currentTabName === 1 ? 'active' : ''" @click.stop="handleTabBarClick(1)">
+		<view class="option-container uni-column" style="display: flex;">
+			<!-- tab-bar -->
+			<view class="tab-bars uni-row">
+				<!-- 				<view :class="currentTabName === 1 ? 'active' : ''" @click.stop="handleTabBarClick(1)">
 							<text>检查指导书</text>
 							<view class="line"></view>
 						</view> -->
-						<view :class="currentTabName === 2 ? 'active' : ''">
-							<text>分选标准</text>
-							<view class="line"></view>
-						</view>
-					</view>
-					<!-- 搜索框 -->
-					<view class="search-container uni-row">
-						<input type="text" v-model="keywords" placeholder="请输入关键字" />
-						<view class="btn" @click="handleSearch()">搜索</view>
-					</view>
+				<view :class="currentTabName === 2 ? 'active' : ''">
+					<text>分选标准</text>
+					<view class="line"></view>
 				</view>
-				<view v-if="categoryList && categoryList.length == 0" style="align-items: center;margin-top: 30px;">暂无分选标准</view>
-				<view v-else class="uni-row" style="background-color:#ffffff;height: 75%;padding-bottom: 12px;">
-					
-					<view style="width: 30%;height: 100%;overflow: auto;">
-						<view  v-for="(item, index) in categoryList" :key="index" :class="{'category-item':true,'selected':isSelected(item)}" @click="cateClick(item)">
-							<view class="uni-row">
-								<view class="value">{{ item.name }}</view>
-							</view>
-						</view>
-					</view>
-					<view style="width: 69%;height: 100%;overflow: auto;">
-						<view v-if="dataList&& dataList.length == 0" style="align-items: center;margin-top: 30px">暂无分选标准数据</view>
-						<view v-else v-for="(item, index) in dataList" :key="index" :class="{'option-item':true,'selectedOptions':isSelectedOptions(item)}" @click="itemClick(item)">
-							<view class="uni-row">
-								<view class="value">{{ item.standard }}</view>
-								<uni-icons v-if="selection.includes(item)" class="arrow-right" type="checkmarkempty" size="24" />
-							</view>
-						</view>
+			</view>
+			<!-- 搜索框 -->
+			<view class="search-container uni-row">
+				<input type="text" v-model="keywords" placeholder="请输入关键字" />
+				<view class="btn" @click="handleSearch()">搜索</view>
+			</view>
+		</view>
+		<view v-if="categoryList && categoryList.length == 0" style="align-items: center;margin-top: 30px;">暂无分选标准
+		</view>
+		<view v-else class="uni-row" style="background-color:#ffffff;height: 75%;padding-bottom: 12px;margin-top: 8px;">
+
+			<view style="width: 30%;height: 100%;overflow: auto;">
+				<view v-for="(item, index) in categoryList" :key="index"
+					:class="{'category-item':true,'selected':isSelected(item)}" @click="cateClick(item)">
+					<view class="uni-row">
+						<view class="value">{{ item.name }}</view>
 					</view>
 				</view>
-				<view class="bottom uni-row">
-					<button class="start-batch-btn" type="primary" :disabled="selection.length ==0" @click="handleAdd">添加</button>
+			</view>
+			<view style="width: 69%;height: 100%;overflow: auto;">
+				<view v-if="dataList&& dataList.length == 0" style="align-items: center;margin-top: 30px">暂无分选标准数据
 				</view>
-</view>
+				<view v-else v-for="(item, index) in dataList" :key="index"
+					:class="{'option-item':true,'selectedOptions':isSelectedOptions(item)}" @click="itemClick(item)">
+					<view class="uni-row">
+						<view class="value">{{ item.standard }}</view>
+						<uni-icons v-if="selection.includes(item)" class="arrow-right" type="checkmarkempty"
+							size="24" />
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="bottom uni-row">
+			<button class="start-batch-btn" type="primary" :disabled="selection.length ==0"
+				@click="handleAdd">添加</button>
+		</view>
+	</view>
 </template>
 
 <script setup>
@@ -92,19 +98,21 @@
 		getStandardList({
 			tenantId: store.userInfo.tenantId
 		}).then(res => {
-				categoryList.value = res.data
-				if (categoryList.value && categoryList.value.length > 0) {
-					selectionCategory.value = categoryList.value[0]
-					if(categoryList.value[0].instructionList && categoryList.value[0].instructionList.length>0){
+			categoryList.value = res.data
+			if (categoryList.value && categoryList.value.length > 0) {
+				selectionCategory.value = categoryList.value[0]
+				if (categoryList.value[0].instructionList && categoryList.value[0].instructionList.length > 0) {
 					dataList.value = categoryList.value[0].instructionList
 					originalList.value = categoryList.value[0].instructionList
-					}
-					}
-			})
+				}
+			}
+		})
 	}
+
 	function isSelected(item) {
-		return selectionCategory.value==item;
+		return selectionCategory.value == item;
 	}
+
 	function isSelectedOptions(item) {
 		return selection.value.includes(item);
 	}
@@ -113,16 +121,16 @@
 		selectionCategory.value = item
 		console.log(item)
 		console.log(categoryList.value)
-		let index = categoryList.value.findIndex(v=>v.id == item.id)
+		let index = categoryList.value.findIndex(v => v.id == item.id)
 		console.log(index)
 		currentData.value = index
-		if(categoryList.value[index].instructionList && categoryList.value[index].instructionList.length>0){
-		dataList.value = categoryList.value[index].instructionList
-		originalList.value = categoryList.value[index].instructionList
-		}else{
+		if (categoryList.value[index].instructionList && categoryList.value[index].instructionList.length > 0) {
+			dataList.value = categoryList.value[index].instructionList
+			originalList.value = categoryList.value[index].instructionList
+		} else {
 			dataList.value = []
 		}
-		
+
 	}
 
 	function itemClick(item) {
@@ -135,12 +143,12 @@
 	}
 
 	function handleSearch() {
-		if(keywords.value == ""){
+		if (keywords.value == "") {
 			dataList.value = originalList.value
-		}else{
-			dataList.value = originalList.value.filter(item=>item.standard.includes(keywords.value))
+		} else {
+			dataList.value = originalList.value.filter(item => item.standard.includes(keywords.value))
 		}
-		
+
 
 	}
 	// 页面生命周期函数
@@ -152,11 +160,11 @@
 	// tabbar切换
 
 
-	function handleAdd(){
+	function handleAdd() {
 		console.log(selection.value)
-		uni.$emit('addUnfitInfoEvent', 
+		uni.$emit('addUnfitInfoEvent',
 			selection.value
-			
+
 		)
 		uni.navigateBack()
 	}
@@ -168,6 +176,7 @@
 		font-weight: 700;
 		/* 选中之后样式 */
 	}
+
 	.page-container {
 		background-color: #ececec;
 		font-size: 28rpx;
@@ -227,59 +236,69 @@
 			color: #ffffff;
 		}
 	}
+
 	.category-item {
 		position: relative;
 		margin-top: 24rpx;
 		padding-bottom: 8rpx;
 		align-items: center;
-		
+
 		.uni-row {
 			padding-bottom: 16rpx;
-			
+
 			.label {
 				width: 144rpx;
 			}
+
 			.value {
 				flex: 1;
 			}
 		}
+
 		.uni-row:first-child {
 			font-size: 32rpx;
 		}
-		
+
 	}
+
 	.option-item {
 		position: relative;
 		margin-top: 24rpx;
 		padding-bottom: 8rpx;
 		border-bottom: 1px solid #BBBBBB;
 		margin-left: 84rpx;
-		
+
 		.uni-row {
 			padding-bottom: 16rpx;
-			
+
 			.label {
 				width: 144rpx;
 			}
+
 			.value {
 				flex: 1;
 			}
 		}
+
 		.uni-row:first-child {
 			font-size: 32rpx;
 
 		}
+
 		.arrow-right {
 			position: absolute;
 			right: 24rpx;
 		}
 	}
+
 	.uniui-checkmarkempty[data-v-d31e1c47]:before {
-	    color: #1684FC;
+		color: #1684FC;
 	}
+
 	.selectedOptions {
 		color: #1684FC;
 	}
+
 	.bottom {
 		height: 10%;
 		position: fixed;
@@ -292,7 +311,7 @@
 		align-items: center;
 		background-color: #fff;
 		justify-content: space-evenly;
-	
+
 		.start-batch-btn {
 			flex: 1;
 			height: 80rpx;

+ 1 - 1
pages/sorting/storageRetrieval.vue

@@ -6,7 +6,7 @@
 		</view>
 		<view class="consultation-container uni-column" style="margin-bottom: 200rpx;padding-bottom: 140rpx">
 			
-			<view style="width: 100%;">
+			<view >
 				<zb-table 
 				    :columns="column1"
 				    :stripe="true"

+ 129 - 76
pages/startTurnover/index.vue

@@ -40,6 +40,7 @@
 		<dialog-turnoverTask ref="turnoverTaskDialog" />
 	</view>
 	<dialog-turnoverTask ref="turnoverTask"></dialog-turnoverTask>
+	<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 
 </template>
 
@@ -54,6 +55,7 @@
 		getDayworkItemByCarrierId,
 		getDayworkItemByCarrierCode
 	} from '@/api/business/dayWorkItem.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		isTakeStock
 	} from '@/api/business/taksStackLot.js'
@@ -64,6 +66,7 @@
 	const listData = ref([])
 	const turnoverTask = ref(null)
 	const flag = ref(false);
+	const showQrCodeReader = ref(false);
 
 	onLoad(() => {
 		init();
@@ -152,83 +155,129 @@
 			}
 		}
 	*/
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		getDayworkItemByCarrierCode({
+			carrierCode: vehicleObj.carrierCode,
+			status: 4
+		}).then(response => {
+			console.log(response)
+			for (let i = 0; i < listData.value.length; i++) {
+				if (listData.value[i].lotCode === response.data[0].lotCode) {
+					uni.showToast({
+						icon: "none",
+						title: "该批次已存在"
+					})
+					console.log("该批次已存在")
+					return;
+				}
+			}
+			for (let i = 0; i < response.data.length; i++) {
+				listData.value.push(response.data[i]);
+			}
+			for (let i = 0; i < listData.value.length; i++) {
+				listData.value[i].carriers = listData.value[i].carrierName.split('、').length;
+			}
+			console.log(listData.value);
+			init();
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 
 	function HandleScanCode() {
+		showQrCodeReader.value = true;
 		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					getDayworkItemByCarrierCode({
-						carrierCode: vehicleObj.carrierCode,
-						status: 4
-					}).then(response => {
-						console.log(response)
-						for (let i = 0; i < listData.value.length; i++) {
-							if (listData.value[i].lotCode === response.data[0].lotCode) {
-								uni.showToast({
-									icon: "none",
-									title: "该批次已存在"
-								})
-								console.log("该批次已存在")
-								return;
-							}
-						}
-						for (let i = 0; i < response.data.length; i++) {
-							listData.value.push(response.data[i]);
-						}
-						for (let i = 0; i < listData.value.length; i++) {
-							listData.value[i].carriers = listData.value[i].carrierName.split('、').length;
-						}
-						console.log(listData.value);
-						init();
-					})
-				}
-			);
-		} else {
-			getDayworkItemByCarrierCode({
-				carrierCode: '000828',
-				status: 4
-			}).then(response => {
-				console.log(response)
-				for (let i = 0; i < listData.value.length; i++) {
-					if (listData.value[i].lotCode === response.data[0].lotCode) {
-						uni.showToast({
-							icon: "none",
-							title: "该批次已存在"
-						})
-						console.log("该批次已存在")
-						return;
-					}
-				}
-				for (let i = 0; i < response.data.length; i++) {
-					listData.value.push(response.data[i]);
-				}
-				for (let i = 0; i < listData.value.length; i++) {
-					listData.value[i].carriers = listData.value[i].carrierName.split('、').length;
-				}
-				console.log(listData.value);
-				init();
-			})
-		}
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			getDayworkItemByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 				status: 4
+		// 			}).then(response => {
+		// 				console.log(response)
+		// 				for (let i = 0; i < listData.value.length; i++) {
+		// 					if (listData.value[i].lotCode === response.data[0].lotCode) {
+		// 						uni.showToast({
+		// 							icon: "none",
+		// 							title: "该批次已存在"
+		// 						})
+		// 						console.log("该批次已存在")
+		// 						return;
+		// 					}
+		// 				}
+		// 				for (let i = 0; i < response.data.length; i++) {
+		// 					listData.value.push(response.data[i]);
+		// 				}
+		// 				for (let i = 0; i < listData.value.length; i++) {
+		// 					listData.value[i].carriers = listData.value[i].carrierName.split('、').length;
+		// 				}
+		// 				console.log(listData.value);
+		// 				init();
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	getDayworkItemByCarrierCode({
+		// 		carrierCode: '000828',
+		// 		status: 4
+		// 	}).then(response => {
+		// 		console.log(response)
+		// 		for (let i = 0; i < listData.value.length; i++) {
+		// 			if (listData.value[i].lotCode === response.data[0].lotCode) {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "该批次已存在"
+		// 				})
+		// 				console.log("该批次已存在")
+		// 				return;
+		// 			}
+		// 		}
+		// 		for (let i = 0; i < response.data.length; i++) {
+		// 			listData.value.push(response.data[i]);
+		// 		}
+		// 		for (let i = 0; i < listData.value.length; i++) {
+		// 			listData.value[i].carriers = listData.value[i].carrierName.split('、').length;
+		// 		}
+		// 		console.log(listData.value);
+		// 		init();
+		// 	})
+		// }
 	}
 
 	function handleStartTurnover() {
@@ -286,11 +335,15 @@
 	.container {
 		height: 100%;
 		background-color: #f5f5f5;
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
 	}
 
 	.scroll-container {
-		position: absolute;
-		top: 24rpx;
+		position: fixed;
+		top: 53rpx;
 		right: 0;
 		bottom: 160rpx;
 		left: 0;

+ 232 - 177
pages/switchDept/index.vue

@@ -1,7 +1,8 @@
 <template>
 	<view v-if="isMaskShow" class="mask">
 	</view>
-	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
+	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: absolute;
+    left: 0;right: 0;">
 		<view class="box-bg uni-row">
 			<view class="input-view uni-row">
 				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
@@ -37,11 +38,11 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">上道工序</text>
-					<text class="label right" style="display: flex; flex-wrap: wrap; flex-direction: row;">
+					<view class="label right uni-row">
 						{{ item.technologicalProcessDetail ? item['technologicalProcessDetail'].processAlias : '-'}}
 						(<view style="color:  #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
 						</view>)
-					</text>
+					</view>
 				</view>
 				<view @tap="delItem(item)" class="del-btn"
 					style="position: absolute; top: 1rem; right: 1rem; color: red;">
@@ -71,6 +72,7 @@
 
 		<dialog-turnoverApplicationAll ref="turnoverApplicationDialog" @reflushDaywork="handleDoTurnoverAfter"
 			@close="turnoverApplicationClose" />
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 </template>
 
@@ -93,6 +95,7 @@
 	import {
 		store
 	} from '@/store/index.js'
+	import QrScanner from '../vueQrCode/index.vue'
 	import {
 		debounce
 	} from '@/utils/common.js'
@@ -119,201 +122,253 @@
 	const curProcessAfte = ref([])
 	const allData = ref([])
 	const showRight = ref(null) // 抽屉
-
+	const showQrCodeReader = ref(false);
 
 
 	onLoad(() => {})
 
 
 	onShow(() => {})
-/*
-	function handleScanCode() {
-		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = JSON.parse(ret.resp_result);
-					if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					// 测试时用
-					getDayworkByCarrierCode({
-						carrierId: vehicleObj.carrierId,
-						status: 7,
-						deptId: store.curDeptDetails.deptId
-					}).then(res => {
-						if (res.code == 200) {
-							if (res.data.length === 0) {
+	/*
+		function handleScanCode() {
+			// 引入原生插件
+			const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+			if (mpaasScanModule) {
+				// 调用插件的 mpaasScan 方法
+				mpaasScanModule.mpaasScan({
+						// 扫码识别类型,参数可多选,qrCode、barCode,
+						// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+						scanType: ["qrCode", "barCode"],
+						// 是否隐藏相册,默认false不隐藏
+						hideAlbum: false,
+					},
+					(ret) => {
+						let vehicleObj = JSON.parse(ret.resp_result);
+						if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
+							uni.showToast({
+								icon: "none",
+								title: "请扫载具码",
+								duration: 1000
+							})
+							return;
+						}
+						// 测试时用
+						getDayworkByCarrierCode({
+							carrierId: vehicleObj.carrierId,
+							status: 7,
+							deptId: store.curDeptDetails.deptId
+						}).then(res => {
+							if (res.code == 200) {
+								if (res.data.length === 0) {
+									uni.showToast({
+										title: '该批次未周转到当前工段',
+										icon: 'none'
+									})
+								} else {
+									allData.value.push(...res.data.filter(v =>
+										allData.value.findIndex(e => e.id === v.id) <
+										0))
+									handleSearch()
+									debounce(handleScanCode, 700)
+								}
+							} else {
 								uni.showToast({
-									title: '该批次未周转到当前工段',
-									icon: 'none'
+									icon: 'none',
+									title: res.msg,
+									duration: 2000
 								})
-							} else {
-								allData.value.push(...res.data.filter(v =>
-									allData.value.findIndex(e => e.id === v.id) <
-									0))
-								handleSearch()
-								debounce(handleScanCode, 700)
 							}
-						} else {
+						}).catch(err => {
+							console.log(err)
+						})
+					}
+				);
+			} else {
+				// 测试时用
+				getDayworkByCarrierCode({
+					carrierId: '1780467398971187210',
+					status: 7,
+					deptId: store.curDeptDetails.deptId
+				}).then(res => {
+					if (res.code == 200) {
+						if (res.data.length === 0) {
 							uni.showToast({
-								icon: 'none',
-								title: res.msg,
-								duration: 2000
+								title: '该批次未周转到当前工段',
+								icon: 'none'
 							})
+						} else {
+							// console.log(res.data)
+							// console.log(res.data.filter(v => allData.value.findIndex(e => e.id === v.id) < 0))
+							allData.value.push(...res.data.filter(v => allData.value.findIndex(e => e.id === v.id) <
+								0))
+							// const filtered = res.data.filter(v => listData.value.findIndex(e => e.id === v.id) < 0 && (
+							// 	v.lotCode.includes(keywords.value == null ? '' : keywords.value) ||
+							// 	v.productDescription.includes(keywords.value == null ? '' : keywords.value)))
+							// console.log(filtered)
+							// listData.value.push(...filtered)
+							// console.log(listData.value)
+							// console.log(allData.value)
+							handleSearch()
 						}
-					}).catch(err => {
-						console.log(err)
-					})
-				}
-			);
-		} else {
-			// 测试时用
-			getDayworkByCarrierCode({
-				carrierId: '1780467398971187210',
-				status: 7,
-				deptId: store.curDeptDetails.deptId
-			}).then(res => {
-				if (res.code == 200) {
-					if (res.data.length === 0) {
+					} else {
+						// console.log(res)
 						uni.showToast({
-							title: '该批次未周转到当前工段',
-							icon: 'none'
+							icon: 'none',
+							title: res.msg,
+							duration: 2000
 						})
-					} else {
-						// console.log(res.data)
-						// console.log(res.data.filter(v => allData.value.findIndex(e => e.id === v.id) < 0))
-						allData.value.push(...res.data.filter(v => allData.value.findIndex(e => e.id === v.id) <
-							0))
-						// const filtered = res.data.filter(v => listData.value.findIndex(e => e.id === v.id) < 0 && (
-						// 	v.lotCode.includes(keywords.value == null ? '' : keywords.value) ||
-						// 	v.productDescription.includes(keywords.value == null ? '' : keywords.value)))
-						// console.log(filtered)
-						// listData.value.push(...filtered)
-						// console.log(listData.value)
-						// console.log(allData.value)
-						handleSearch()
 					}
-				} else {
-					// console.log(res)
+				}).catch(err => {
+					console.log(err)
+				})
+			}
+		}
+	*/
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		// 测试时用
+		getDayworkByCarrierCode({
+			carrierCode: vehicleObj.carrierCode,
+			status: 7,
+			deptId: store.curDeptDetails.deptId
+		}).then(res => {
+			if (res.code == 200) {
+				if (res.data.length === 0) {
 					uni.showToast({
-						icon: 'none',
-						title: res.msg,
-						duration: 2000
+						title: '该批次未周转到当前工段',
+						icon: 'none'
 					})
+				} else {
+					allData.value.push(...res.data.filter(v =>
+						allData.value.findIndex(e => e.id === v.id) <
+						0))
+					handleSearch()
+					debounce(handleScanCode, 700)
 				}
-			}).catch(err => {
-				console.log(err)
-			})
-		}
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: res.msg,
+					duration: 2000
+				})
+			}
+		}).catch(err => {
+			console.log(err)
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
 	}
-*/
+
 
 	function handleScanCode() {
+		showQrCodeReader.value = true;
 		// 引入原生插件
-		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
-		if (mpaasScanModule) {
-			// 调用插件的 mpaasScan 方法
-			mpaasScanModule.mpaasScan({
-					// 扫码识别类型,参数可多选,qrCode、barCode,
-					// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
-					scanType: ["qrCode", "barCode"],
-					// 是否隐藏相册,默认false不隐藏
-					hideAlbum: false,
-				},
-				(ret) => {
-					let vehicleObj = {carrierCode: ret.resp_result};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					// 测试时用
-					getDayworkByCarrierCode({
-						carrierCode: vehicleObj.carrierCode,
-						status: 7,
-						deptId: store.curDeptDetails.deptId
-					}).then(res => {
-						if (res.code == 200) {
-							if (res.data.length === 0) {
-								uni.showToast({
-									title: '该批次未周转到当前工段',
-									icon: 'none'
-								})
-							} else {
-								allData.value.push(...res.data.filter(v =>
-									allData.value.findIndex(e => e.id === v.id) <
-									0))
-								handleSearch()
-								debounce(handleScanCode, 700)
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: res.msg,
-								duration: 2000
-							})
-						}
-					}).catch(err => {
-						console.log(err)
-					})
-				}
-			);
-		} else {
-			// 测试时用
-			getDayworkByCarrierCode({
-				carrierId: '1780467398971187210',
-				status: 7,
-				deptId: store.curDeptDetails.deptId
-			}).then(res => {
-				if (res.code == 200) {
-					if (res.data.length === 0) {
-						uni.showToast({
-							title: '该批次未周转到当前工段',
-							icon: 'none'
-						})
-					} else {
-						// console.log(res.data)
-						// console.log(res.data.filter(v => allData.value.findIndex(e => e.id === v.id) < 0))
-						allData.value.push(...res.data.filter(v => allData.value.findIndex(e => e.id === v.id) <
-							0))
-						// const filtered = res.data.filter(v => listData.value.findIndex(e => e.id === v.id) < 0 && (
-						// 	v.lotCode.includes(keywords.value == null ? '' : keywords.value) ||
-						// 	v.productDescription.includes(keywords.value == null ? '' : keywords.value)))
-						// console.log(filtered)
-						// listData.value.push(...filtered)
-						// console.log(listData.value)
-						// console.log(allData.value)
-						handleSearch()
-					}
-				} else {
-					// console.log(res)
-					uni.showToast({
-						icon: 'none',
-						title: res.msg,
-						duration: 2000
-					})
-				}
-			}).catch(err => {
-				console.log(err)
-			})
-		}
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			let vehicleObj = {carrierCode: ret.resp_result};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			// 测试时用
+		// 			getDayworkByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 				status: 7,
+		// 				deptId: store.curDeptDetails.deptId
+		// 			}).then(res => {
+		// 				if (res.code == 200) {
+		// 					if (res.data.length === 0) {
+		// 						uni.showToast({
+		// 							title: '该批次未周转到当前工段',
+		// 							icon: 'none'
+		// 						})
+		// 					} else {
+		// 						allData.value.push(...res.data.filter(v =>
+		// 							allData.value.findIndex(e => e.id === v.id) <
+		// 							0))
+		// 						handleSearch()
+		// 						debounce(handleScanCode, 700)
+		// 					}
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: res.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			}).catch(err => {
+		// 				console.log(err)
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	getDayworkByCarrierCode({
+		// 		carrierId: '1780467398971187210',
+		// 		status: 7,
+		// 		deptId: store.curDeptDetails.deptId
+		// 	}).then(res => {
+		// 		if (res.code == 200) {
+		// 			if (res.data.length === 0) {
+		// 				uni.showToast({
+		// 					title: '该批次未周转到当前工段',
+		// 					icon: 'none'
+		// 				})
+		// 			} else {
+		// 				// console.log(res.data)
+		// 				// console.log(res.data.filter(v => allData.value.findIndex(e => e.id === v.id) < 0))
+		// 				allData.value.push(...res.data.filter(v => allData.value.findIndex(e => e.id === v.id) <
+		// 					0))
+		// 				// const filtered = res.data.filter(v => listData.value.findIndex(e => e.id === v.id) < 0 && (
+		// 				// 	v.lotCode.includes(keywords.value == null ? '' : keywords.value) ||
+		// 				// 	v.productDescription.includes(keywords.value == null ? '' : keywords.value)))
+		// 				// console.log(filtered)
+		// 				// listData.value.push(...filtered)
+		// 				// console.log(listData.value)
+		// 				// console.log(allData.value)
+		// 				handleSearch()
+		// 			}
+		// 		} else {
+		// 			// console.log(res)
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: res.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	}).catch(err => {
+		// 		console.log(err)
+		// 	})
+		// }
 	}
 
 
@@ -385,7 +440,7 @@
 		/* 水平居中 */
 		align-items: center;
 		/* 垂直居中 */
-		z-index: 1000;
+		z-index: 8;
 		/* 确保遮罩层在其他元素之上 */
 	}
 

+ 38 - 38
pages/takeStock/details.vue

@@ -1,5 +1,7 @@
 <template>
-	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
+	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: absolute;
+    left: 0;
+    right: 0;">
 		<view class="scroll-container" style="padding-bottom:  150rpx">
 			<view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
 				<text>暂无批次</text>
@@ -13,8 +15,7 @@
 					</view>
 					<view class=" uni-row" style="margin-left: 16rpx;">
 						<view v-if="item['isTaksStock'] == 0" class="tag finished"><text class="label">未盘点</text></view>
-						<view v-else type="default finished" class="tag turnover"><text
-								class="label">已盘点</text></view>
+						<view v-else type="default finished" class="tag turnover"><text class="label">已盘点</text></view>
 					</view>
 				</view>
 				<view class="item-info uni-row">
@@ -23,22 +24,18 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">投产数</text>
-					<text
-						class="label right">{{ item['prodNum']}}</text>
+					<text class="label right">{{ item['prodNum']}}</text>
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">盘点数量</text>
-					<input v-if="item.flag" class="number" type="number" 
-						v-model="item.taksStockNum" placeholder="" />
+					<input v-if="item.flag" class="number" type="number" v-model="item.taksStockNum" placeholder="" />
 					<view v-else class="value">{{ item.taksStockNum }}</view>
 				</view>
 			</view>
 		</view>
 		<view class="bottom uni-row">
-			<button class="start-batch-btn" style="margin-right: 10rpx; " type="primary"
-				@click="handleSave">确定</button>
-			<button class="start-batch-btn"  style="background-color:#fe5555;"
-				@click="handleCancel">取消</button>
+			<button class="start-batch-btn" style="margin-right: 10rpx; " type="primary" @click="handleSave">确定</button>
+			<button class="start-batch-btn" style="background-color:#fe5555;" @click="handleCancel">取消</button>
 		</view>
 	</view>
 
@@ -87,42 +84,44 @@
 		let temperList = store.takeStockDetails
 		console.log(store.takeStockDetails)
 		console.log(store.userInfo.userId)
-		temperList.forEach(item =>{
+		temperList.forEach(item => {
 			item.flag = true
-			if (item.isTaksStock == 0){
+			if (item.isTaksStock == 0) {
 				item.taksStockNum = item.prodNum
 			}
-			if(item.firstUpdateId !=0 &&store.userInfo.userId != item.firstUpdateId) {
+			if (item.firstUpdateId != 0 && store.userInfo.userId != item.firstUpdateId) {
 				item.flag = false
 				uni.showToast({
 					icon: "none",
 					title: '该批次已被其他人盘点'
 				});
 			}
-			
+
 		})
 		listData.value = temperList
 	}
+
 	function handleSave() {
-		console.log(Number(listData.value[0].taksStockNum) <0)
-		for(let i = 0;i<listData.value.length;i++) {
-			if(Number(listData.value[i].taksStockNum) < 0) {
+		console.log(Number(listData.value[0].taksStockNum) < 0)
+		for (let i = 0; i < listData.value.length; i++) {
+			if (Number(listData.value[i].taksStockNum) < 0) {
 				uni.showToast({
 					icon: 'none',
-					title: listData.value[i].lotCode+'批次盘点数量不能小于0'
+					title: listData.value[i].lotCode + '批次盘点数量不能小于0'
 				})
 				return
 			}
 		}
 		update()
 	}
+
 	function handleCancel() {
 		let pages = getCurrentPages();
 		let index = 0;
 		for (let i = 0; i < pages.length; i++) {
-		
+
 			if (pages[i].$page.fullPath == "/pages/takeStock/index") {
-		
+
 				index = pages.length - i - 1;
 			}
 		}
@@ -130,31 +129,31 @@
 			delta: index
 		});
 	}
+
 	function update() {
-		updateTakesStock(listData.value).then(res =>{
+		updateTakesStock(listData.value).then(res => {
 			uni.showToast({
 				icon: 'none',
 				title: '盘点成功'
 			})
-		// 	uni.navigateTo({
-		// 	url: '/pages/takeStock/index'
-		// })
-		let pages = getCurrentPages();
-		let index = 0;
-		for (let i = 0; i < pages.length; i++) {
-		
-			if (pages[i].$page.fullPath == "/pages/takeStock/index") {
-		
-				index = pages.length - i - 1;
+			// 	uni.navigateTo({
+			// 	url: '/pages/takeStock/index'
+			// })
+			let pages = getCurrentPages();
+			let index = 0;
+			for (let i = 0; i < pages.length; i++) {
+
+				if (pages[i].$page.fullPath == "/pages/takeStock/index") {
+
+					index = pages.length - i - 1;
+				}
 			}
-		}
-		uni.navigateBack({
-			delta: index
-		});
+			uni.navigateBack({
+				delta: index
+			});
 		})
 		console.log(listData.value)
 	}
-
 </script>
 
 <style lang="scss">
@@ -321,12 +320,13 @@
 					color: #000000;
 				}
 			}
+
 			input {
 				width: 280rpx;
 				height: 56rpx;
 				border: 1px solid #9f9f9f;
 				font-size: 28rpx;
-			
+
 				&.number {
 					width: 220rpx;
 					text-align: left;

+ 168 - 111
pages/takeStock/index.vue

@@ -1,5 +1,7 @@
 <template>
-	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
+	<view class="uni-column" style="height: 100%; background-color: #f5f5f5;position: absolute;
+    left: 0;
+    right: 0;">
 		<view class="box-bg uni-row">
 			<view class="input-view uni-row">
 				<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
@@ -10,7 +12,8 @@
 			</view>
 		</view>
 
-		<scroll-view class="scroll-container" scroll-y @scrolltolower="handleScrollToLower" style="padding-bottom:  150rpx">
+		<scroll-view class="scroll-container" scroll-y @scrolltolower="handleScrollToLower"
+			style="padding-bottom:  150rpx">
 			<view v-if="listData.length == 0" style="text-align: center;
 			font-size: 12px;
 			color: #666;
@@ -26,8 +29,7 @@
 					</view>
 					<view class=" uni-row" style="margin-left: 16rpx;">
 						<view v-if="item['isTaksStock'] == 0" class="tag finished"><text class="label">未盘点</text></view>
-						<view v-else type="default finished" class="tag turnover"><text
-								class="label">已盘点</text></view>
+						<view v-else type="default finished" class="tag turnover"><text class="label">已盘点</text></view>
 					</view>
 				</view>
 				<view class="item-info uni-row">
@@ -40,8 +42,7 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">投产数</text>
-					<text
-						class="label right">{{ item['prodNum']}}</text>
+					<text class="label right">{{ item['prodNum']}}</text>
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">盘点数量</text>
@@ -50,9 +51,9 @@
 			</view>
 		</scroll-view>
 		<view class="bottom uni-row">
-			<button class="add" type="primary" v-if="listData.length != 0"
-				@click="handleScanCode">扫码盘点批次</button>
+			<button class="add" type="primary" v-if="listData.length != 0" @click="handleScanCode">扫码盘点批次</button>
 		</view>
+		<QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
 	</view>
 
 </template>
@@ -84,12 +85,14 @@
 	import {
 		onPullDownRefresh
 	} from "@dcloudio/uni-app"
+	import QrScanner from '../vueQrCode/index.vue'
 
 	const listData = ref([])
 	const keywords = ref(null)
 	const pageSize = ref(10)
 	const pageNum = ref(1)
 	const status = ref(true)
+	const showQrCodeReader = ref(false);
 
 	// 页面下拉刷新操作
 	onPullDownRefresh(() => {
@@ -102,25 +105,30 @@
 		reflush();
 	})
 
-	function handleScrollToLower(){
+	function handleScrollToLower() {
 		console.log(status.value)
-		if(status.value) {
-		pageNum.value += 1
-		
-		getTakesStockList({deptId:store.curDeptDetails.deptId,keywords:keywords.value,pageSize:pageSize.value,pageNum:pageNum.value}).then(res =>{
-		 const existingIds = new Set(listData.value.map(item => item.id));
-		
-		  // 过滤出那些不在 existingIds 中的项,即新数据
-		  const newRows = res.rows.filter(row => !existingIds.has(row.id));
-		
-		  // 如果有新数据,将其添加到 listData
-		  if (newRows.length > 0) {
-		    listData.value = listData.value.concat(newRows);
-		  } else {
-		    // 如果没有新数据,更新状态表示没有更多数据
-		    status.value = false;
-		  }
-		})
+		if (status.value) {
+			pageNum.value += 1
+
+			getTakesStockList({
+				deptId: store.curDeptDetails.deptId,
+				keywords: keywords.value,
+				pageSize: pageSize.value,
+				pageNum: pageNum.value
+			}).then(res => {
+				const existingIds = new Set(listData.value.map(item => item.id));
+
+				// 过滤出那些不在 existingIds 中的项,即新数据
+				const newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					listData.value = listData.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
+			})
 		}
 	}
 
@@ -132,100 +140,148 @@
 		uni.showLoading({
 			title: '加载中'
 		});
-		getTakesStockList({deptId:id,keywords:keywords.value,pageSize:pageSize.value,pageNum:pageNum.value}).then(res =>{
+		getTakesStockList({
+			deptId: id,
+			keywords: keywords.value,
+			pageSize: pageSize.value,
+			pageNum: pageNum.value
+		}).then(res => {
 			listData.value = res.rows
 			uni.hideLoading();
 		})
-	
+
 	}
 
 	function handleSearch() {
 		init(store.curDeptDetails.deptId);
 	}
+	//H5扫码器回调
+	function onDecodeHandler(data) {
+		showQrCodeReader.value = false;
+		let vehicleObj = {
+			carrierCode: data
+		};
+		if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+			uni.showToast({
+				icon: "none",
+				title: "请扫载具码",
+				duration: 1000
+			})
+			return;
+		}
+		getTakesStockByCarrierCode({
+			carrierCode: vehicleObj.carrierCode
+		}).then(response => {
+			if (response.code == 200) {
+				// if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+				// 	uni.showToast({
+				// 		icon: 'none',
+				// 		title: '该批次不在当前工段',
+				// 		duration: 2000
+				// 	})
+				// 	return
+				// }
+				handleTurnToDetailsPages(response.data)
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: response.msg,
+					duration: 2000
+				})
+			}
+		})
+	}
+
+
+	//H5扫码器关闭
+	function qrReaderClose() {
+		showQrCodeReader.value = false;
+	}
 
 	function handleScanCode() {
+		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);
-					/* 原有代码,之前二维码中存的信息比较多,用一个JSON格式存储。
-					let vehicleObj = JSON.parse(ret.resp_result);
-					if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					*/
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					getTakesStockByCarrierCode({
-						carrierCode: vehicleObj.carrierCode
-					}).then(response => {
-						if (response.code == 200) {
-							// if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-							// 	uni.showToast({
-							// 		icon: 'none',
-							// 		title: '该批次不在当前工段',
-							// 		duration: 2000
-							// 	})
-							// 	return
-							// }
-							handleTurnToDetailsPages(response.data)
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: response.msg,
-								duration: 2000
-							})
-						}
-					})
-				}
-			);
-		} else {
-			// 测试时用
-			getTakesStockByCarrierCode({
-				carrierCode: '000033',
-			}).then(response => {
-				if (response.code == 200) {
-								// if (response.data[0].deptId !== store.curDeptDetails.deptId) {
-								// 	uni.showToast({
-								// 		icon: 'none',
-								// 		title: '该批次不在当前工段',
-								// 		duration: 2000
-								// 	})
-								// 	return
-								// }
-								handleTurnToDetailsPages(response.data)
-				} else {
-					uni.showToast({
-						icon: 'none',
-						title: response.msg,
-						duration: 2000
-					})
-				}
-			})
-		}
+		// const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// if (mpaasScanModule) {
+		// 	// 调用插件的 mpaasScan 方法
+		// 	mpaasScanModule.mpaasScan({
+		// 			// 扫码识别类型,参数可多选,qrCode、barCode,
+		// 			// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+		// 			scanType: ["qrCode", "barCode"],
+		// 			// 是否隐藏相册,默认false不隐藏
+		// 			hideAlbum: false,
+		// 		},
+		// 		(ret) => {
+		// 			console.log(ret);
+		// 			/* 原有代码,之前二维码中存的信息比较多,用一个JSON格式存储。
+		// 			let vehicleObj = JSON.parse(ret.resp_result);
+		// 			if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			*/
+		// 			let vehicleObj = {
+		// 				carrierCode: ret.resp_result
+		// 			};
+		// 			if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
+		// 				uni.showToast({
+		// 					icon: "none",
+		// 					title: "请扫载具码",
+		// 					duration: 1000
+		// 				})
+		// 				return;
+		// 			}
+		// 			getTakesStockByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					// if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+		// 					// 	uni.showToast({
+		// 					// 		icon: 'none',
+		// 					// 		title: '该批次不在当前工段',
+		// 					// 		duration: 2000
+		// 					// 	})
+		// 					// 	return
+		// 					// }
+		// 					handleTurnToDetailsPages(response.data)
+		// 				} else {
+		// 					uni.showToast({
+		// 						icon: 'none',
+		// 						title: response.msg,
+		// 						duration: 2000
+		// 					})
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
+		// 	// 测试时用
+		// 	getTakesStockByCarrierCode({
+		// 		carrierCode: '000033',
+		// 	}).then(response => {
+		// 		if (response.code == 200) {
+		// 						// if (response.data[0].deptId !== store.curDeptDetails.deptId) {
+		// 						// 	uni.showToast({
+		// 						// 		icon: 'none',
+		// 						// 		title: '该批次不在当前工段',
+		// 						// 		duration: 2000
+		// 						// 	})
+		// 						// 	return
+		// 						// }
+		// 						handleTurnToDetailsPages(response.data)
+		// 		} else {
+		// 			uni.showToast({
+		// 				icon: 'none',
+		// 				title: response.msg,
+		// 				duration: 2000
+		// 			})
+		// 		}
+		// 	})
+		// }
 	}
 	//跳转
 	function handleTurnToDetailsPages(data) {
@@ -411,6 +467,7 @@
 			}
 		}
 	}
+
 	.page {
 		background-color: white;
 		width: 100%;
@@ -419,7 +476,7 @@
 		align-items: center;
 		background-color: #ffffff;
 		padding: 16rpx 0;
-		
+
 	}
 
 	.bottom {
@@ -430,7 +487,7 @@
 		align-items: center;
 		background-color: #ffffff;
 		padding: 16rpx 0;
-		
+
 		.add {
 			margin: 0 auto;
 			width: 80%;

+ 61 - 65
uni_modules/zb-table/components/zb-table/components/table-h5-summary.vue

@@ -1,78 +1,74 @@
 <template>
-  <view class="table-h5-footer top-header-uni" :style="{paddingRight:`${scrollbarSize}px`}">
-    <scroll-view class="zb-table-headers"
-                 @scroll="handleFooterTableScrollLeft"
-                 scroll-x="true"
-                 scroll-y="false"
-                 id="tableFooterHeaders"
-                 scroll-anchoring="true"
-                 :scroll-left="headerFooterTableLeft"
-                 style="padding-bottom: 0px;
+	<view class="table-h5-footer top-header-uni" :style="{paddingRight:`${scrollbarSize}px`}">
+		<scroll-view class="zb-table-headers" @scroll="handleFooterTableScrollLeft" scroll-x="true" scroll-y="false"
+			id="tableFooterHeaders" scroll-anchoring="true" :scroll-left="headerFooterTableLeft" style="padding-bottom: 0px;
 						background: #fafafa;height: 100%">
-      <view class="zb-table-fixed" >
-        <view class="zb-table-thead" style="position: relative;" >
-          <view class="item-tr">
-            <view
-                class="item-th"
-                :style="{
+			<view class="zb-table-fixed">
+				<view class="zb-table-thead" style="position: relative;">
+					<view class="item-tr">
+						<view class="item-th" :style="{
 	                              width:`${item.width?item.width:'100'}px`,
 															  flex:index===transColumns.length-1?1:'none',
 															  minWidth:`${item.width?item.width:'100'}px`,
 															  borderRight:`${border?'1px solid #e8e8e8':''}`,
 															  borderTop:`${border?'1px solid #e8e8e8':''}`,
 															  textAlign:item.align||'left'
-														  }"
-                v-for="(item,index) in transColumns" :key="index">
-              {{ sums[index] }}
-            </view>
-          </view>
-        </view>
-      </view>
-    </scroll-view>
-  </view>
+														  }" v-for="(item,index) in transColumns" :key="index">
+							{{ sums[index] }}
+						</view>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
 </template>
 <script>
-import summary from '../js/summary.js'
-export default {
-  name:'table-footer',
-  mixins:[summary],
-}
+	import summary from '../js/summary.js'
+	export default {
+		name: 'table-footer',
+		mixins: [summary],
+	}
 </script>
 <style lang="scss" scoped>
-.table-h5-footer {
-  background: #fafafa;
-  /*每个页面公共css */
-  scroll-view ::-webkit-scrollbar {
-    display: none !important;
-    width: 0 !important;
-    height: 0 !important;
-    -webkit-appearance: none;
-    background: transparent;
-  }
-  //第二种
-  ::-webkit-scrollbar{
-    display: none;
-  }
-  .item-tr{
-    display: flex;
-  }
-  .item-th{
-    padding-left: 8px;
-    line-height: 39px;
-    height: 40px;
-    //display: flex;
-    //align-items: center;
-    box-sizing: border-box;
-    flex-shrink: 0;
-    width: 100px;
-    padding-right: 20px;
-    word-break: keep-all;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    overflow-wrap: break-word;
-    border-bottom: 1px solid #e8e8e8;
-  }
+	.table-h5-footer {
+		background: #fafafa;
 
-}
-</style>
+		/*每个页面公共css */
+		scroll-view ::-webkit-scrollbar {
+			display: none !important;
+			width: 0 !important;
+			height: 0 !important;
+			-webkit-appearance: none;
+			background: transparent;
+		}
+
+		//第二种
+		::-webkit-scrollbar {
+			display: none;
+		}
+
+		.item-tr {
+			display: flex;
+			flex-direction: row;
+		}
+
+		.item-th {
+			padding-left: 8px;
+			line-height: 39px;
+			height: 40px;
+			//display: flex;
+			//align-items: center;
+			box-sizing: border-box;
+			flex-shrink: 0;
+			width: 100px;
+			padding-right: 20px;
+			word-break: keep-all;
+			white-space: nowrap;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			overflow-wrap: break-word;
+			border-bottom: 1px solid #e8e8e8;
+		}
+
+	}
+</style>

+ 1296 - 1280
uni_modules/zb-table/components/zb-table/zb-table.vue

@@ -1,28 +1,20 @@
 <template>
 	<!-- #ifdef H5 || APP-PLUS -->
-	<view :class="['zb-table','zb-table-fixed-header',!border&&(bodyTableLeft>50||headerTableLeft>50)&&'scroll-left-fixed']">
-	  <view class="zb-table-content" style="flex: 1">
-	    <view class="zb-table-scroll" style="height: 100%;">
-	      <template v-if="showHeader">
-	        <view class="zb-table-header top-header-uni"
-          >
-	          <scroll-view class="zb-table-headers"
-	                       @scroll="handleTableScrollLeft"
-	                       scroll-x="true"
-	                       scroll-y="false"
-	                       id="tableHeaders"
-	                       scroll-anchoring="true"
-	                       :scroll-left="headerTableLeft"
-	                       style="
+	<view
+		:class="['zb-table','zb-table-fixed-header',!border&&(bodyTableLeft>50||headerTableLeft>50)&&'scroll-left-fixed']">
+		<view class="zb-table-content" style="flex: 1">
+			<view class="zb-table-scroll" style="height: 100%;">
+				<template v-if="showHeader">
+					<view class="zb-table-header top-header-uni">
+						<scroll-view class="zb-table-headers" @scroll="handleTableScrollLeft" scroll-x="true"
+							scroll-y="false" id="tableHeaders" scroll-anchoring="true" :scroll-left="headerTableLeft"
+							style="
 						height: 100%">
 
-	            <view class="zb-table-fixed" >
-	              <view class="zb-table-thead" style="position: relative;" >
-	                <view class="item-tr">
-	                  <view
-	                      @click.stop="sortAction(item,index)"
-	                      class="item-th"
-	                      :style="[{
+							<view class="zb-table-fixed">
+								<view class="zb-table-thead" style="position: relative;">
+									<view class="item-tr">
+										<view @click.stop="sortAction(item,index)" class="item-th" :style="[{
 	                              width:`${item.width?item.width:'100'}px`,
 								  flex:index===transColumns.length-1?1:'none',
 								  minWidth:`${item.width?item.width:'100'}px`,
@@ -30,257 +22,213 @@
 
 								  borderTop:`${border?'1px solid #e8e8e8':''}`,
 								  textAlign:item.align||'left'
-							  },getHeaderCellStyle(item,index)]"
-	                      v-for="(item,index) in transColumns" :key="index">
-                      <template v-if="item.type==='selection'">
-                        <view class="checkbox-item">
-                          <tableCheckbox
-                              :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
-                        </view>
-                      </template>
-                      <template v-else>
-                        {{ item.label }}
-                        <view class="sorter-table" v-if="item.sorter">
-                          <view :class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]"></view>
-                          <view :class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]"></view>
-                        </view>
-                      </template>
-
-                    </view>
-                    <view
-                        v-if="scrollbarSize"
-                        class="item-th "
-                        :style="{
+							  },getHeaderCellStyle(item,index)]" v-for="(item,index) in transColumns" :key="index">
+											<template v-if="item.type==='selection'">
+												<view class="checkbox-item">
+													<tableCheckbox :indeterminate="indeterminate" :checked="checkedAll"
+														@checkboxSelected="checkboxSelectedAll"></tableCheckbox>
+												</view>
+											</template>
+											<template v-else>
+												{{ item.label }}
+												<view class="sorter-table" v-if="item.sorter">
+													<view
+														:class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]">
+													</view>
+													<view
+														:class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]">
+													</view>
+												</view>
+											</template>
+
+										</view>
+										<view v-if="scrollbarSize" class="item-th " :style="{
 
                            borderTop:`${border?'1px solid #e8e8e8':''}`,
                                 padding:0,
                                 width:`${scrollbarSize}px`,
                               }">
-                    </view>
-	                </view>
-	              </view>
-	            </view>
-	          </scroll-view>
-	        </view>
-	      </template>
-	      <template v-if="!data.length">
-	        <view class="no-data">暂无数据~~</view>
-	      </template>
-	      <scroll-view
-            class="zb-table-body" ref="tableBody"	scroll-x="true"	scroll-y="true"	id="tableBody"
-	                   :lower-threshold="40"
-	                   :upper-threshold="10"
-                     @scrolltolower="scrolltolower"
-	                   @scrolltoupper="(e)=>debounce(scrollToLeft)(e)"
-                     @scroll="handleBodyScroll"	:scroll-left="bodyTableLeft"	:scroll-top="bodyScrollTop"
-                     :style=" `height: calc(100% - ${showSummary?80:40}px)`" >
-	          <view class="zb-table-fixed">
-	            <view class="zb-table-tbody">
-	              <view  :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
-                       @click.stop="rowClick(item,index)"
-	                     v-for="(item,index) in transData" :key="item.key" >
-	                <view
-	                    :style="[{
+										</view>
+									</view>
+								</view>
+							</view>
+						</scroll-view>
+					</view>
+				</template>
+				<template v-if="!data.length">
+					<view class="no-data">暂无数据~~</view>
+				</template>
+				<scroll-view class="zb-table-body" ref="tableBody" scroll-x="true" scroll-y="true" id="tableBody"
+					:lower-threshold="40" :upper-threshold="10" @scrolltolower="scrolltolower"
+					@scrolltoupper="(e)=>debounce(scrollToLeft)(e)" @scroll="handleBodyScroll"
+					:scroll-left="bodyTableLeft" :scroll-top="bodyScrollTop"
+					:style=" `height: calc(100% - ${showSummary?80:40}px)`">
+					<view class="zb-table-fixed">
+						<view class="zb-table-tbody">
+							<view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
+								@click.stop="rowClick(item,index)" v-for="(item,index) in transData" :key="item.key">
+								<view :style="[{
 							        width:`${ite.width?ite.width:'100'}px`,
 										  flex:i===transColumns.length-1?1:'none',
 										  minWidth:`${ite.width?ite.width:'100'}px`,
 										  borderRight:`${border?'1px solid #e8e8e8':''}`,
 											textAlign:ite.align||'left',
-									  },cellStyle&&getCellStyle(item,ite,index,i)]"
-                      @click="cellClick(item,index,ite)"
-	                    :class="['item-td',stripe?(index % 2) != 0?'odd':'even':'']"
-	                    v-for="(ite,i) in transColumns" :key="i">
-	                  <template  v-if="ite.type==='operation'">
-	                    <view style="display: flex;align-items: center;height: 100%">
-	                      <view
-                            v-for="ren,ind in permission(item,ite.renders,index)"
-	                          :key="ind"
-	                          @click.stop="$emit(ren.func,item,index)"
-	                          :style="{
+									  },cellStyle&&getCellStyle(item,ite,index,i)]" @click="cellClick(item,index,ite)"
+									:class="['item-td',stripe?(index % 2) != 0?'odd':'even':'']"
+									v-for="(ite,i) in transColumns" :key="i">
+									<template v-if="ite.type==='operation'">
+										<view style="display: flex;align-items: center;height: 100%">
+											<view v-for="ren,ind in permission(item,ite.renders,index)" :key="ind"
+												@click.stop="$emit(ren.func,item,index)" :style="{
 	                          display:'flex',
 	                          alignItems: 'center',
 	                          marginRight:ite.renders.length>1?'8px':'0'
 	                        }">
-                          <template v-if="ren.type==='custom'">
-                            <view :class="ren.class||''" style="cursor: pointer">
-                              {{ren.name}}
-                            </view>
-                          </template>
-                          <template v-else>
-                            <button
-                                :class="ren.class||''"
-                                :type="ren.type||'primary'" :size="ren.size||'mini'">{{ren.name}}</button>
-                          </template>
-	                      </view>
-	                    </view>
-	                  </template>
-                    <template v-else-if="ite.type==='selection'">
-                      <view class="checkbox-item">
-                        <tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,item)" :cellData="item" :checked="item.checked"/>
-                      </view>
-                    </template>
-                    <template v-else-if="ite.type==='index'">
-                      {{index+1}}
-                    </template>
-                  <template v-else-if="ite.type==='img'">
-                    <view class="checkbox-item">
-                      <template  v-if="item[ite.name]">
-                        <image
-                            @click.stop="previewImage(item,item[ite.name],iImage)"
-                            v-for="iImageTem,iImage in imgs(item[ite.name])"
-                            :show-menu-by-longpress="false"
-                            :key="iImage"
-                            :src="iImageTem" style="width: 40px;height:30px; " mode="aspectFit"></image>
-                      </template>
-                    <text v-else>{{ite.emptyString}}</text>
-                    </view>
-                  </template>
-	                  <template  v-else>
-<!--                      {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
-                      {{ ite.filters?itemFilter(item,ite):formatterAction(item,ite,index,i) }}
-	                  </template>
-	                </view>
-	              </view>
-	            </view>
-	          </view>
-	        </scroll-view>
-       <table-h5-summary
-           :scrollbarSize="scrollbarSize"
-           :data="data"
-           :handleFooterTableScrollLeft="handleFooterTableScrollLeft"
-           :headerFooterTableLeft="headerFooterTableLeft"
-           v-if="showSummary"
-           :showSummary="showSummary"
-           :transColumns="transColumns"
-           :border="border"
-           :summary-method="summaryMethod"
-           :sumText="sumText"
-           :fixedLeftColumns="fixedLeftColumns"/>
-	    </view>
-	    <view class="zb-table-fixed-left"
-            v-if="isFixedLeft"
-            :style=" {height:  `calc(100% - ${scrollbarSize}px)`}"
-      >
-	      <template v-if="showHeader">
-	        <view class="zb-table-header" style="display: flex">
-	          <view class="item-tr"
-                  style=""
-                  @click.stop="rowClick(item,index)"
-                  v-for="(item,index) in fixedLeftColumns" :key="index">
-	            <view
-
-	                :style="{
+												<template v-if="ren.type==='custom'">
+													<view :class="ren.class||''" style="cursor: pointer">
+														{{ren.name}}
+													</view>
+												</template>
+												<template v-else>
+													<button :class="ren.class||''" :type="ren.type||'primary'"
+														style="margin-top: 5px;"
+														:size="ren.size||'mini'">{{ren.name}}</button>
+												</template>
+											</view>
+										</view>
+									</template>
+									<template v-else-if="ite.type==='selection'">
+										<view class="checkbox-item">
+											<tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,item)"
+												:cellData="item" :checked="item.checked" />
+										</view>
+									</template>
+									<template v-else-if="ite.type==='index'">
+										{{index+1}}
+									</template>
+									<template v-else-if="ite.type==='img'">
+										<view class="checkbox-item">
+											<template v-if="item[ite.name]">
+												<image @click.stop="previewImage(item,item[ite.name],iImage)"
+													v-for="iImageTem,iImage in imgs(item[ite.name])"
+													:show-menu-by-longpress="false" :key="iImage" :src="iImageTem"
+													style="width: 40px;height:30px; " mode="aspectFit"></image>
+											</template>
+											<text v-else>{{ite.emptyString}}</text>
+										</view>
+									</template>
+									<template v-else>
+										<!--                      {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
+										{{ ite.filters?itemFilter(item,ite):formatterAction(item,ite,index,i) }}
+									</template>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<table-h5-summary :scrollbarSize="scrollbarSize" :data="data"
+					:handleFooterTableScrollLeft="handleFooterTableScrollLeft"
+					:headerFooterTableLeft="headerFooterTableLeft" v-if="showSummary" :showSummary="showSummary"
+					:transColumns="transColumns" :border="border" :summary-method="summaryMethod" :sumText="sumText"
+					:fixedLeftColumns="fixedLeftColumns" />
+			</view>
+			<view class="zb-table-fixed-left" v-if="isFixedLeft" :style=" {height:  `calc(100% - ${scrollbarSize}px)`}">
+				<template v-if="showHeader">
+					<view class="zb-table-header" style="display: flex">
+						<view class="item-tr" style="" @click.stop="rowClick(item,index)"
+							v-for="(item,index) in fixedLeftColumns" :key="index">
+							<view :style="{
 	               width:`${item.width?item.width:'100'}px`,
 	               borderRight:`${border?'1px solid #e8e8e8':''}`,
 	               borderTop:`${border?'1px solid #e8e8e8':''}`,
                 textAlign:item.align||'left'
-	            }"
-	                @click.stop="sortAction(item,index)"
-	                class="item-th"
-	            >
-                <template v-if="item.type==='selection'">
-                  <view class="checkbox-item">
-                    <tableCheckbox
-                        :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
-                  </view>
-                </template>
-                <template v-else>
-                  {{ item.label }}
-                  <view class="sorter-table" v-if="item.sorter">
-                    <view :class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]"></view>
-                    <view :class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]"></view>
-                  </view>
-                </template>
-              </view>
-	          </view>
-
-	        </view>
-	      </template>
-        <scroll-view
-            scroll-y="true"
-            id="leftTableFixed"
-            :upper-threshold="15"
-            @scrolltoupper="(e)=>scrollToFixedLeft(e)"
-            @scroll="leftFixedScrollAction"
-            :scroll-top="leftFiexScrollTop"
-            class="zb-table-body-inner"
-            :style=" `height: calc(100% - ${showSummary?80:40}px)`">
-          <view class="zb-table-fixed">
-            <view class="zb-table-tbody">
-              <view
-                  :class="['item-tr',stripe?(i % 2) != 0?'odd':'even':'',highlight&&isHighlight(ite,i)?'current-row':'']"
-                    v-for="(ite,i) in transData"
-                    @click.stop="rowClick(ite,i)"
-                    :key="ite.key"
-                    style="">
-                <view class='item-td'
-                      @click="cellClick(ite,index,item)"
-                      :style="[{
+	            }" @click.stop="sortAction(item,index)" class="item-th">
+								<template v-if="item.type==='selection'">
+									<view class="checkbox-item">
+										<tableCheckbox :indeterminate="indeterminate" :checked="checkedAll"
+											@checkboxSelected="checkboxSelectedAll"></tableCheckbox>
+									</view>
+								</template>
+								<template v-else>
+									{{ item.label }}
+									<view class="sorter-table" v-if="item.sorter">
+										<view
+											:class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]">
+										</view>
+										<view
+											:class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]">
+										</view>
+									</view>
+								</template>
+							</view>
+						</view>
+
+					</view>
+				</template>
+				<scroll-view scroll-y="true" id="leftTableFixed" :upper-threshold="15"
+					@scrolltoupper="(e)=>scrollToFixedLeft(e)" @scroll="leftFixedScrollAction"
+					:scroll-top="leftFiexScrollTop" class="zb-table-body-inner"
+					:style=" `height: calc(100% - ${showSummary?80:40}px)`">
+					<view class="zb-table-fixed">
+						<view class="zb-table-tbody">
+							<view
+								:class="['item-tr',stripe?(i % 2) != 0?'odd':'even':'',highlight&&isHighlight(ite,i)?'current-row':'']"
+								v-for="(ite,i) in transData" @click.stop="rowClick(ite,i)" :key="ite.key" style="">
+								<view class='item-td' @click="cellClick(ite,index,item)" :style="[{
 	                       width:`${item.width?item.width:'100'}px`,
 	                       borderRight:`${border?'1px solid #e8e8e8':''}`,
 	                       textAlign:item.align||'left'
-	                      },cellStyle&&getCellStyle(ite,item,i,index)]"
-                      :key="index"
-                      v-for="(item,index) in fixedLeftColumns">
-                  <template v-if="item.type==='selection'">
-                    <view class="checkbox-item">
-                      <tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,ite)" :cellData="ite" :checked="ite.checked"/>
-                    </view>
-                  </template>
-                  <template v-else-if="item.type==='index'">
-                    {{i+1}}
-                  </template>
-                  <template v-else>
-                    {{ite[item.name]||item.emptyString}}
-                  </template>
-                </view>
-              </view>
-            </view>
-          </view>
-        </scroll-view>
-        <table-side-summary
-            :scrollbarSize="scrollbarSize"
-            v-if="showSummary&&!(scrollbarSize>0)"
-            :data="data"
-            :showSummary="showSummary"
-            :transColumns="transColumns"
-            :border="border"
-            :summary-method="summaryMethod"
-            :sumText="sumText"
-            :fixedLeftColumns="fixedLeftColumns"/>
-	    </view>
-	  </view>
-    <zb-load-more v-if="isLoadMore&&!completeLoading"/>
+	                      },cellStyle&&getCellStyle(ite,item,i,index)]" :key="index"
+									v-for="(item,index) in fixedLeftColumns">
+									<template v-if="item.type==='selection'">
+										<view class="checkbox-item">
+											<tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,ite)"
+												:cellData="ite" :checked="ite.checked" />
+										</view>
+									</template>
+									<template v-else-if="item.type==='index'">
+										{{i+1}}
+									</template>
+									<template v-else>
+										{{ite[item.name]||item.emptyString}}
+									</template>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<table-side-summary :scrollbarSize="scrollbarSize" v-if="showSummary&&!(scrollbarSize>0)" :data="data"
+					:showSummary="showSummary" :transColumns="transColumns" :border="border"
+					:summary-method="summaryMethod" :sumText="sumText" :fixedLeftColumns="fixedLeftColumns" />
+			</view>
+		</view>
+		<zb-load-more v-if="isLoadMore&&!completeLoading" />
 	</view>
 	<!-- #endif -->
 	<!-- #ifndef H5 || APP-PLUS -->
 	<view class="zb-table-applet">
-	  <view class="zb-table-content" style="white-space: nowrap">
-      <scroll-view
-
-		<!-- #ifdef MP-ALIPAY -->
-		@scroll="scrollAlipay"
-		<!-- #endif  -->
-
-          @scrolltolower="scrolltolower"
-					<!-- #ifdef MP-ALIPAY -->
-                   style=" height: 100%;overflow-x:scroll"
-				   <!-- #endif  -->
-				   <!-- #ifndef MP-ALIPAY -->
-				   style=" height: 100%"
-				   <!-- #endif  -->
-                   scroll-y="true"
-				   scroll-x="true">
-	    <view class="zb-table-scroll" >
-	      <template v-if="showHeader">
-	        <view class="zb-table-header top-header-uni" style="">
-	            <view class="zb-table-fixed" >
-	              <view class="zb-table-thead" style="position: relative;" >
-	                <view class="item-tr">
-	                  <view
-	                      @click.stop="sortAction(item,index)"
-	                      :class="['item-th',index <fixedLeftColumns.length&&'zb-stick-side']"
-	                      :style="{
+		<view class="zb-table-content" style="white-space: nowrap">
+			<scroll-view <!-- #ifdef MP-ALIPAY -->
+				@scroll="scrollAlipay"
+				<!-- #endif  -->
+
+				@scrolltolower="scrolltolower"
+				<!-- #ifdef MP-ALIPAY -->
+				style=" height: 100%;overflow-x:scroll"
+				<!-- #endif  -->
+				<!-- #ifndef MP-ALIPAY -->
+				style=" height: 100%"
+				<!-- #endif  -->
+				scroll-y="true"
+				scroll-x="true">
+				<view class="zb-table-scroll">
+					<template v-if="showHeader">
+						<view class="zb-table-header top-header-uni" style="">
+							<view class="zb-table-fixed">
+								<view class="zb-table-thead" style="position: relative;">
+									<view class="item-tr">
+										<view @click.stop="sortAction(item,index)"
+											:class="['item-th',index <fixedLeftColumns.length&&'zb-stick-side']" :style="{
 	                              left:`${item.left}px`,
 	                              width:`${item.width?item.width:'100'}px`,
 															  flex:index===transColumns.length-1?1:'none',
@@ -288,1055 +236,1123 @@
 															   borderRight:`${border?'1px solid #e8e8e8':''}`,
 															  borderTop:`${border?'1px solid #e8e8e8':''}`,
 															   textAlign:item.align||'left'
-														  }"
-	                      v-for="(item,index) in transColumns" :key="index">
-                      <template v-if="item.type==='selection'">
-                        <view class="checkbox-item">
-                          <tableCheckbox
-                              :indeterminate="indeterminate" :checked="checkedAll" @checkboxSelected="checkboxSelectedAll"></tableCheckbox>
-                        </view>
-                      </template>
-                      <template v-else>
-                        {{ item.label||'' }}
-                        <view class="sorter-table" v-if="item.sorter">
-                          <view :class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]"></view>
-                          <view :class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]"></view>
-                        </view>
-                      </template>
-                    </view>
-	                </view>
-	              </view>
-	            </view>
-	        </view>
-	      </template>
-	      <template v-if="!data.length">
-	        <view class="no-data">暂无数据~~</view>
-	      </template>
-          <view class="zb-table-fixed">
-            <view class="zb-table-tbody">
-              <view  :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
-                     @click.stop="rowClick(item,index)"
-                     v-for="(item,index) in transData" :key="item.key" >
-                <view
-                    :style="[{
+														  }" v-for="(item,index) in transColumns" :key="index">
+											<template v-if="item.type==='selection'">
+												<view class="checkbox-item">
+													<tableCheckbox :indeterminate="indeterminate" :checked="checkedAll"
+														@checkboxSelected="checkboxSelectedAll"></tableCheckbox>
+												</view>
+											</template>
+											<template v-else>
+												{{ item.label||'' }}
+												<view class="sorter-table" v-if="item.sorter">
+													<view
+														:class="['sorter-table-icon',item.sorterMode==='_asc'&&`sorting${item.sorterMode||''}`]">
+													</view>
+													<view
+														:class="['sorter-table-icon',item.sorterMode==='_desc'&&`sorting${item.sorterMode||''}`]">
+													</view>
+												</view>
+											</template>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</template>
+					<template v-if="!data.length">
+						<view class="no-data">暂无数据~~</view>
+					</template>
+					<view class="zb-table-fixed">
+						<view class="zb-table-tbody">
+							<view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
+								@click.stop="rowClick(item,index)" v-for="(item,index) in transData" :key="item.key">
+								<view :style="[{
                       left:`${ite.left}px`,
                       width:`${ite.width?ite.width:'100'}px`,
                       flex:i===transColumns.length-1?1:'none',
                       minWidth:`${ite.width?ite.width:'100'}px`,
                       borderRight:`${border?'1px solid #e8e8e8':''}`,
                       textAlign:ite.align||'left',
-                    },getCellStyle(item,ite,index,i)]"
-                    @click="cellClick(item,index,ite)"
-                    :class="['item-td', i <fixedLeftColumns.length&&'zb-stick-side',stripe?(index % 2) != 0?'odd':'even':'']"
-                    v-for="(ite,i) in transColumns" :key="i">
-                  <template  v-if="ite.type==='operation'">
-                    <view style="display: flex;align-items: center;height: 100%">
-                      <view
-                          v-for="ren,ind in permission(item,ite.renders,index)"
-                          :key="ind"
-                          @click.stop="$emit(ren.func,item,index)"
-                          :style="{
+                    },getCellStyle(item,ite,index,i)]" @click="cellClick(item,index,ite)"
+									:class="['item-td', i <fixedLeftColumns.length&&'zb-stick-side',stripe?(index % 2) != 0?'odd':'even':'']"
+									v-for="(ite,i) in transColumns" :key="i">
+									<template v-if="ite.type==='operation'">
+										<view style="display: flex;align-items: center;height: 100%">
+											<view v-for="ren,ind in permission(item,ite.renders,index)" :key="ind"
+												@click.stop="$emit(ren.func,item,index)" :style="{
 	                          display:'flex',
 	                          alignItems: 'center',
 	                          marginRight:ite.renders.length>1?'8px':'0'
 	                        }">
-                        <template v-if="ren.type==='custom'">
-                          <view :class="ren.class||''" style="cursor: pointer">
-                            {{ren.name}}
-                          </view>
-                        </template>
-                        <template v-else>
-                          <button
-                              :class="ren.class||''"
-                              :type="ren.type||'primary'" :size="ren.size||'mini'">{{ren.name}}</button>
-                        </template>
-                      </view>
-                    </view>
-                  </template>
-                  <template v-else-if="ite.type==='selection'">
-                    <view class="checkbox-item">
-                      <tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,item)" :cellData="item" :checked="item.checked"/>
-                    </view>
-                  </template>
-                  <template v-else-if="ite.type==='img'">
-                    <template  v-if="item[ite.name]">
-                      <view class="checkbox-item" @click.stop>
-                        <image
-                            @click.stop="previewImage(iImageTem,item[ite.name],iImage)"
-                            v-for="iImageTem,iImage in imgs(item[ite.name])"
-                            :show-menu-by-longpress="false"
-                            :key="iImage"
-                            :src="iImageTem" style="width: 40px;height:30px; " mode="aspectFit"></image>
-                      </view>
-                    </template>
-
-                    <text v-else>{{ite.emptyString}}</text>
-                  </template>
-                  <template v-else-if="ite.type==='index'">
-                    {{index+1}}
-                  </template>
-                  <template  v-else>
-<!--                    {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
-                    {{ ite.filters?itemFilter(item,ite):formatterAction(item,ite,index,i) }}
-                  </template>
-                </view>
-              </view>
-            </view>
-          </view>
-        <table-summary
-            v-if="showSummary"
-            :data="data"
-            :showSummary="showSummary"
-            :fixedLeftColumns="fixedLeftColumns"
-            :transColumns="transColumns"
-            :border="border"
-            :summary-method="summaryMethod"
-            :sumText="sumText"
-        />
-	    </view>
-      </scroll-view>
-	  </view>
-    <zb-load-more v-if="isLoadMore&&!completeLoading"/>
+												<template v-if="ren.type==='custom'">
+													<view :class="ren.class||''" style="cursor: pointer">
+														{{ren.name}}
+													</view>
+												</template>
+												<template v-else>
+													<button :class="ren.class||''" :type="ren.type||'primary'"
+														:size="ren.size||'mini'">{{ren.name}}</button>
+												</template>
+											</view>
+										</view>
+									</template>
+									<template v-else-if="ite.type==='selection'">
+										<view class="checkbox-item">
+											<tableCheckbox @checkboxSelected="(e)=>checkboxSelected(e,item)"
+												:cellData="item" :checked="item.checked" />
+										</view>
+									</template>
+									<template v-else-if="ite.type==='img'">
+										<template v-if="item[ite.name]">
+											<view class="checkbox-item" @click.stop>
+												<image @click.stop="previewImage(iImageTem,item[ite.name],iImage)"
+													v-for="iImageTem,iImage in imgs(item[ite.name])"
+													:show-menu-by-longpress="false" :key="iImage" :src="iImageTem"
+													style="width: 40px;height:30px; " mode="aspectFit"></image>
+											</view>
+										</template>
+
+										<text v-else>{{ite.emptyString}}</text>
+									</template>
+									<template v-else-if="ite.type==='index'">
+										{{index+1}}
+									</template>
+									<template v-else>
+										<!--                    {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
+										{{ ite.filters?itemFilter(item,ite):formatterAction(item,ite,index,i) }}
+									</template>
+								</view>
+							</view>
+						</view>
+					</view>
+					<table-summary v-if="showSummary" :data="data" :showSummary="showSummary"
+						:fixedLeftColumns="fixedLeftColumns" :transColumns="transColumns" :border="border"
+						:summary-method="summaryMethod" :sumText="sumText" />
+				</view>
+			</scroll-view>
+		</view>
+		<zb-load-more v-if="isLoadMore&&!completeLoading" />
 	</view>
 	<!-- #endif -->
 </template>
 <script>
-import TableCheckbox from './components/table-checkbox.vue'
-import TableSummary from "./components/table-summary.vue";
-import TableSideSummary from "./components/table-side-summary.vue";
-import TableH5Summary from './components/table-h5-summary'
-import ZbLoadMore from './components/zb-load-more'
-
-// #ifdef H5
-import {getScrollbarSize} from "./js/util";
-// #endif
-
-export default {
-  components:{
-    TableCheckbox,
-    TableSummary,
-    TableSideSummary,
-    TableH5Summary,
-    ZbLoadMore
-  },
-  props:{
-    highlight:{
-      type:Boolean,
-      default:false
-    },
-    itemDate:{
-      type:Object,
-      default:()=>{}
-    },
-    columns:{
-      type:Array,
-      default:()=>[]
-    },
-    showSummary:{
-      type:Boolean,
-      default:false
-    },
-    isShowLoadMore:{
-      type:Boolean,
-      default:false
-    },
-    data:{
-      type:Array,
-      default:()=>[]
-    },
-    sumText:{
-      type:String,
-      default:'合计'
-    },
-    showHeader:{
-      type:Boolean,
-      default:true
-    },
-    border:{
-      type:Boolean,
-      default:false
-    },
-    stripe:{
-      type:Boolean,
-      default:true
-    },
-    fit:{
-      type:Boolean,
-      default:false
-    },
-    rowKey:[String, Function],
-    summaryMethod:Function,
-    pullUpLoading:Function,
-    formatter:Function,
-    cellStyle:Function,
-    cellHeaderStyle:Function,
-    permissionBtn:Function,
-  },
-  computed:{
-    loadMoreHeight(){
-      return this.isLoadMore?40:0
-    },
-    fixedLeftColumns(){
-      let arr = []
-      for(let i=0;i<this.columns.length;i++){
-        let item = this.columns[i]
-        if(item.fixed){
-          arr.push(item)
-        }else {
-          break
-        }
-      }
-      return arr
-    },
-    imgs(){
-      return (item)=>{
-        return typeof item==='string'?[item]:item
-      }
-    },
-    itemfilters(){
-      return(item,ite)=>{
-        if(item[ite.name]==null){
-          return ite.emptyString
-        }
-        return item[ite.name]
-      }
-    },
-    scrollbarSize(){
-		// #ifdef H5
-      return getScrollbarSize()
-	  // #endif
-
-	  // #ifndef H5
-	  return 0
-	  // #endif
-    },
-    isFixedLeft(){
-      if(!this.columns.length){
-        return false
-      }
-      if(!this.data.length){
-        return false
-      }
-      let [firstArr] = this.columns
-      return !!firstArr.fixed;
-    },
-    transColumns(){
-      if(this.fit){
-        this.columns.forEach(column=>{
-          if(column.type==="operation"&&column.renders){
-			      let str = ''
-            column.renders.map((item)=>{
-              str+=item.name
-            })
-            column.width = this.getTextWidth(str)+column.renders.length*40
-          }else if(column.type==="img"){
-
-			   }else if(column.type==="selection"){
-			}else{
-			let arr = [this.getTextWidth(column.label)]
-            this.data.forEach(data=>{
-              let str = (data[column.name]+'')
-			  if(str==='undefined'){
-				   arr.push(30)
-			  }else{
-				   let width = this.getTextWidth(str)
-				   arr.push(width)
-			  }
-            })
-			      column.width = Math.max(...arr)+20
-          }
-        })
-      }
-      let number = 0
-      this.columns.forEach((item,index)=>{
-        if(item.type==="operation"&&item.renders&&!item.width){
-          let str = ''
-          item.renders.map((item)=>{
-            str+=item.name
-          })
-          item.width = this.getTextWidth(str)+item.renders.length*40
-        }
-        if(item.type==="img"){
-          if(!item.width){
-            let arr = []
-            let widImg = this.getTextWidth(item.label)
-            this.data.forEach(data=>{
-              if(data[item.name]){
-                let urls = typeof data[item.name]==='string'?[data[item.name]]:data[item.name]
-                arr.push(urls.length)
-              }
-              item.width = Math.max(...arr)*40+widImg
-            })
-          }
-
-        }
-        if(item.fixed){
-          if(index===0){
-            item.left = 0
-            number+=item.width
-          }else {
-            item.left = number
-            number+=item.width
-          }
-        }
-        item.emptyString = item.emptyString||'--'
-      })
-      return this.columns
-    },
-    transData(){
-      let flag = this.columns.some(item=>item.type==='selection')
-      this.data.forEach((item,index)=>{
-        if(flag){
-          if(item.checked){
-            if(!this.selectArr.length){
-              this.selectArr.push(item)
-            }
-          }
-        }
-        if(this.rowKey){
-          if(typeof this.rowKey==='function'){
-            item.key = Object.freeze(this.rowKey(item))||Date.now()
-          }else {
-            item.key = Object.freeze(item[this.rowKey])||Date.now()
-          }
-        }else {
-          item.key = index
-        }
-      })
-      if(flag){
-              if(this.data.length){
-                let le = this.data.filter(item=>item.checked).length
-                if(le){
-                  if(le===this.data.length){
-                    this.checkedAll = true
-                  }else {
-                    this.indeterminate = true
-                  }
-                }else {
-                  this.checkedAll = false
-                  this.indeterminate = false
-                  this.selectArr = []
-                }
-              }else {
-                this.checkedAll = false
-                this.indeterminate = false
-                this.selectArr = []
-              }
-            }
-      return this.data
-    },
-    isHighlight(){
-      return (item,index)=>{
-        if(this.rowKey){
-          return item.key === this.currentRow['key']
-        }else{
-          return index === this.currentRowIndex
-        }
-      }
-    },
-    getHeaderCellStyle() {
-      return (column,  columnIndex,childIndex)=>{
-        const cellStyle = this.cellHeaderStyle;
-        if(typeof cellStyle==='function'){
-          return cellStyle({ column, columnIndex})
-        }
-        return {}
-      }
-    },
-    getCellStyle() {
-     return (row, column, rowIndex, columnIndex)=>{
-       const cellStyle = this.cellStyle;
-       if(typeof cellStyle==='function'){
-         return cellStyle({row, column, rowIndex, columnIndex})
-       }
-       return {}
-     }
-    },
-  },
-  data() {
-    return {
-      button:[],
-	    alipayScrollTop:0,
-      alipayScrollOldTop:0,
-      alipayFlag:false,
-      bodyTableLeft:0,
-      headerTableLeft:0,
-      lastScrollLeft:0,
-      isLoadMore:false,
-      headerFooterTableLeft:0,
-      leftFiexScrollTop:0,
-      bodyScrollTop:0,
-      currentDriver:null,
-      currentDriver1:null,
-      bodyTime:null,
-      currentRowIndex:null,
-      currentRow: {},
-      bodyTime1:null,
-      headerTime:null,
-      debounceTime:null,
-      operation:{},
-      completedFlag:false,
-      selectArr:[],
-      indeterminate:false,
-      checkedAll:false,
-      completeLoading:false,
-      aliTime:null,
-    }
-  },
-  created(){
-  },
-  mounted(){
-
-    // setTimeout(()=>{
-    //   uni.createSelectorQuery().in(this).select(".top-header-uni").boundingClientRect( data => {
-    //     console.log('data=======',data)
-    //     //data  可以打印data输出看详细数据,有很多数据信息
-    //     var left = data.width;//表示元素宽度
-    //   }).exec();
-    // },1000)
-  },
-  beforeDestroy(){
-      this.aliTime&&clearTimeout(this.aliTime)
-      this.debounceTime&&clearTimeout(this.debounceTime)
-      this.bodyTime1&&clearTimeout(this.bodyTime1)
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.selectArr = []
-      this.indeterminate = false
-      this.checkedAll = false
-  
-    },
-  methods: {
-	clearSelection(){
-		this.transData.forEach(item=>{
-			item.checked = false
-		})
-		this.selectArr = []
-		this.indeterminate = false
-		this.checkedAll = false
-	},
-    formatterAction(row,column,rowIndex,columnIndex){
-      if(column.formatter&&typeof this.formatter==='function'){
-        return this.formatter(row,column,rowIndex,columnIndex)
-      }
-      return (row[column.name]==null||row[column.name]==='')?column.emptyString:row[column.name]
-    },
-    permission(item,renders,index){
-      if(this.permissionBtn&&typeof this.permissionBtn==='function'){
-        return this.permissionBtn(item,renders,index)
-      }
-      return renders
-    },
-    pullUpCompleteLoading(type){
-      this.isLoadMore = false
-      if(type==='ok'){
-        this.completeLoading = true
-      }
-    },
-    scrollAlipay(e){
-
-      if(!this.alipayScrollOldTop){
-        this.alipayScrollOldTop = e.detail.scrollTop
-      }
-      this.aliTime&&clearTimeout(this.aliTime)
-      this.aliTime = setTimeout(()=>{
-
-        if(this.alipayFlag&&e.detail.scrollTop>this.alipayScrollOldTop){
-          this.pullLoad()
-        }
-        this.alipayFlag = false
-        this.alipayScrollOldTop = null
-      },500)
-    },
-    pullLoad(){
-      if(this.isShowLoadMore){
-        this.isLoadMore = true
-        this.$emit('pullUpLoading')
-        let that = this
-        this.pullUpLoading&&this.pullUpLoading.call(this.$parent.$parent, (type)=>{
-          that.isLoadMore = false
-          if(type==='ok'){
-            that.completeLoading=true
-          }
-        })
-      }
-
-    },
-    scrolltolower(e){
-      this.alipayFlag = true
-      if(e.detail.direction==='bottom'){
-        this.pullLoad()
-      }
-
-      // this.pullUpLoading.call(this.$parent)
-    },
-	  previewImage(item,url,current){
-      let urls = typeof url==='string'?[url]:url
-		  uni.previewImage({
-			  current,
-			  urls:urls
-		  })
-	  },
-    resetHighlight(){
-      this.currentRowIndex = null
-      this.currentRow = {}
-    },
-    cellClick(row,index,column){
-        this.$emit('cellClick',row,index,column)
-    },
-    rowClick(row,index){
-      if(this.highlight){
-        this.currentRowIndex = index
-        this.currentRow = row
-        this.$emit('currentChange',row,index)
-      }
-      this.$emit('rowClick',row,index)
-    },
-    checkboxSelectedAll(e){
-      this.indeterminate = false
-      if(e.checked){
-        this.selectArr = []
-        this.checkedAll = true
-        this.data.forEach(item=>{
-          // this.$set(item,'checked',true)
-          item.checked = true
-          this.selectArr.push(item)
-        })
-      }else{
-        this.checkedAll = false
-        this.data.forEach(item=>{
-          this.$set(item,'checked',false)
-        })
-        this.selectArr = []
-      }
-      // #ifndef H5 || APP-PLUS
-      this.$forceUpdate()
-      // #endif
-      this.$emit('toggleAllSelection',e.checked,this.selectArr)
-    },
-    checkboxSelected(e,item){
-      // #ifdef H5 || APP-PLUS
-      this.$set(item,'checked',e.checked)
-      // #endif
-      // #ifndef H5 || APP-PLUS
-      this.data.forEach(item=>{
-        if(item.key===e.data.key){
-          item.checked = e.checked
-        }
-      })
-      // #endif
-      item.checked = e.checked
-      e.data.checked = e.checked
-      if(e.checked){
-        this.selectArr.push(e.data)
-      }else{
-        this.selectArr = this.selectArr.filter(item=>item.key!==e.data.key)
-      }
-      if(this.selectArr.length===this.transData.length){
-        this.indeterminate = false
-        this.checkedAll = true
-      }else{
-        this.indeterminate = true
-        this.checkedAll = false
-      }
-      if(!this.selectArr.length){
-        this.checkedAll = false
-        this.indeterminate = false
-      }
-      // #ifndef H5 || APP-PLUS
-      this.$forceUpdate()
-      // #endif
-      this.$emit('toggleRowSelection',e.checked,this.selectArr)
-    },
-    itemFilter(item,ite){
-      if(ite.filters&&ite.name){
-        let key = item[ite.name]
-        return ite.filters[key]||''
-      }
-      return item[ite.name]||ite.emptyString
-    },
-    // 默认字体为微软雅黑 Microsoft YaHei,字体大小为 14px
-    getTextWidth(str) {
-      if(str.length<3){
-        return 40
-      }
-      let regx = /^[0-9]+.?[0-9]*$/
-      let flexWidth = 0
-      for (const char of str) {
-        if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
-          // 如果是英文字符,为字符分配8个单位宽度
-          flexWidth += 10
-        } else if (char >= '\u4e00' && char <= '\u9fa5') {
-          // 如果是中文字符,为字符分配15个单位宽度
-          flexWidth += 15
-        } else if(regx.test(char)){
-          flexWidth += 9
-        }else {
-          // 其他种类字符,为字符分配8个单位宽度
-          flexWidth += 7
-        }
-      }
-      return flexWidth
-    },
-    width(item){
-      return `${item.width?item.width:'100'}px`
-    },
-    showStripe(index){
-      if(this.currentDriver)return
-      if(this.stripe){
-        return (index % 2) != 0?'odd':'even'
-      }else{
-        return ''
-      }
-    },
-    //验证字符串是否是数字
-    checkNumber(theObj) {
-      var reg = /^[0-9]+.?[0-9]*$/;
-      if (reg.test(theObj)) {
-        return true;
-      }
-      return false;
-    },
-    isDate(data){
-      if(isNaN(data)&&!isNaN(Date.parse(data))){
-        return true
-      }
-      return false
-    },
-    sortAction(item,index){
-      if(!item.sorter){return false}
-      this.$set(item,'sorterMode',item.sorterMode==='_asc'?'_desc':'_asc')
-      if(item.sorter==='custom'){
-        this.$emit('sort-change',item,item.sorterMode.replace('_',''),index)
-      }else {
-        this.sortData(item)
-      }
-      // #ifndef H5 || APP-PLUS
-      this.$forceUpdate()
-      // #endif
-    },
-    sortData(item){
-      let key = item.name
-
-      if(item.sorterMode==='_asc'){
-        this.data.sort((a,b)=>{
-          if(this.checkNumber(a[key])){
-            return a[key]-b[key]
-          }
-          if(this.isDate(a[key])){
-            let a1 = new Date(a[key]).getTime()
-            let b1 = new Date(b[key]).getTime()
-            return a1-b1
-          }
-        })
-      }else {
-        this.data.sort((a,b)=>{
-          if(this.checkNumber(a[key])){
-            return b[key]-a[key]
-          }
-          if(this.isDate(a[key])){
-            let a1 = new Date(a[key]).getTime()
-            let b1 = new Date(b[key]).getTime()
-            return b1-a1
-          }
-        })
-      }
-    },
-    throttle(method,delay=60){
-      let time = null
-      return (...args)=>{
-        if(!time){
-          time = setTimeout(()=>{
-            method(...args)
-            time = null;
-          },delay)
-        }
-      }
-    },
-    debounce(method,delay=1000){
-      return (...args)=>{
-        this.debounceTime&&clearTimeout(this.debounceTime)
-        this.debounceTime = setTimeout(()=>{
-          method(...args)
-        },delay)
-      }
-    },
-    handleBodyScroll(e){
-      if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
-      this.currentDriver = e.currentTarget.id
-      this.headerTableLeft = e.detail.scrollLeft
-      this.headerFooterTableLeft = e.detail.scrollLeft
-      this.leftFiexScrollTop = e.detail.scrollTop
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.bodyTime = setTimeout(()=>{
-        this.currentDriver=null
-      },200)
-
-    },
-    leftFixedScrollAction(e){
-      if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
-      this.currentDriver = e.currentTarget.id
-      this.bodyScrollTop = e.detail.scrollTop
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.bodyTime = setTimeout(()=>{
-        this.currentDriver=null
-      },200)
-    },
-    scrollToLeft(e){
-      if(this.currentDriver1&&this.currentDriver1!==e.currentTarget.id)return
-      this.currentDriver1 = e.currentTarget.id
-      if(e.detail.direction==='left'&&this.headerTableLeft<10){
-        this.headerTableLeft = 0
-      }else if(e.detail.direction==='top'&&this.leftFiexScrollTop<10){
-        this.leftFiexScrollTop = 0
-      }
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.bodyTime = setTimeout(()=>{
-        this.currentDriver1=null
-      },200)
-    },
-    scrollToFixedLeft(e){
-      if(this.currentDriver1&&this.currentDriver1!==e.currentTarget.id)return
-      this.currentDriver1 = e.currentTarget.id
-      if(e.detail.direction==='top'&&this.bodyScrollTop<10){
-        this.bodyScrollTop = 0
-      }
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.bodyTime = setTimeout(()=>{
-        this.currentDriver1=null
-      },200)
-    },
-    handleTableScrollLeft(e,type){
-      if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
-      this.currentDriver = e.currentTarget.id
-      this.bodyTableLeft = e.detail.scrollLeft
-      this.headerFooterTableLeft = e.detail.scrollLeft
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.bodyTime = setTimeout(()=>{
-        this.currentDriver=null
-      },200)
-    },
-    handleFooterTableScrollLeft(e){
-      if(this.currentDriver&&this.currentDriver!==e.currentTarget.id)return
-      this.currentDriver = e.currentTarget.id
-      this.bodyTableLeft = e.detail.scrollLeft
-      this.headerTableLeft = e.detail.scrollLeft
-      this.bodyTime&&clearTimeout(this.bodyTime)
-      this.bodyTime = setTimeout(()=>{
-        this.currentDriver=null
-      },200)
-    }
-  }
-}
+	import TableCheckbox from './components/table-checkbox.vue'
+	import TableSummary from "./components/table-summary.vue";
+	import TableSideSummary from "./components/table-side-summary.vue";
+	import TableH5Summary from './components/table-h5-summary'
+	import ZbLoadMore from './components/zb-load-more'
+
+	// #ifdef H5
+	import {
+		getScrollbarSize
+	} from "./js/util";
+	// #endif
+
+	export default {
+		components: {
+			TableCheckbox,
+			TableSummary,
+			TableSideSummary,
+			TableH5Summary,
+			ZbLoadMore
+		},
+		props: {
+			highlight: {
+				type: Boolean,
+				default: false
+			},
+			itemDate: {
+				type: Object,
+				default: () => {}
+			},
+			columns: {
+				type: Array,
+				default: () => []
+			},
+			showSummary: {
+				type: Boolean,
+				default: false
+			},
+			isShowLoadMore: {
+				type: Boolean,
+				default: false
+			},
+			data: {
+				type: Array,
+				default: () => []
+			},
+			sumText: {
+				type: String,
+				default: '合计'
+			},
+			showHeader: {
+				type: Boolean,
+				default: true
+			},
+			border: {
+				type: Boolean,
+				default: false
+			},
+			stripe: {
+				type: Boolean,
+				default: true
+			},
+			fit: {
+				type: Boolean,
+				default: false
+			},
+			rowKey: [String, Function],
+			summaryMethod: Function,
+			pullUpLoading: Function,
+			formatter: Function,
+			cellStyle: Function,
+			cellHeaderStyle: Function,
+			permissionBtn: Function,
+		},
+		computed: {
+			loadMoreHeight() {
+				return this.isLoadMore ? 40 : 0
+			},
+			fixedLeftColumns() {
+				let arr = []
+				for (let i = 0; i < this.columns.length; i++) {
+					let item = this.columns[i]
+					if (item.fixed) {
+						arr.push(item)
+					} else {
+						break
+					}
+				}
+				return arr
+			},
+			imgs() {
+				return (item) => {
+					return typeof item === 'string' ? [item] : item
+				}
+			},
+			itemfilters() {
+				return (item, ite) => {
+					if (item[ite.name] == null) {
+						return ite.emptyString
+					}
+					return item[ite.name]
+				}
+			},
+			scrollbarSize() {
+				// #ifdef H5
+				return getScrollbarSize()
+				// #endif
+
+				// #ifndef H5
+				return 0
+				// #endif
+			},
+			isFixedLeft() {
+				if (!this.columns.length) {
+					return false
+				}
+				if (!this.data.length) {
+					return false
+				}
+				let [firstArr] = this.columns
+				return !!firstArr.fixed;
+			},
+			transColumns() {
+				if (this.fit) {
+					this.columns.forEach(column => {
+						if (column.type === "operation" && column.renders) {
+							let str = ''
+							column.renders.map((item) => {
+								str += item.name
+							})
+							column.width = this.getTextWidth(str) + column.renders.length * 40
+						} else if (column.type === "img") {
+
+						} else if (column.type === "selection") {} else {
+							let arr = [this.getTextWidth(column.label)]
+							this.data.forEach(data => {
+								let str = (data[column.name] + '')
+								if (str === 'undefined') {
+									arr.push(30)
+								} else {
+									let width = this.getTextWidth(str)
+									arr.push(width)
+								}
+							})
+							column.width = Math.max(...arr) + 20
+						}
+					})
+				}
+				let number = 0
+				this.columns.forEach((item, index) => {
+					if (item.type === "operation" && item.renders && !item.width) {
+						let str = ''
+						item.renders.map((item) => {
+							str += item.name
+						})
+						item.width = this.getTextWidth(str) + item.renders.length * 40
+					}
+					if (item.type === "img") {
+						if (!item.width) {
+							let arr = []
+							let widImg = this.getTextWidth(item.label)
+							this.data.forEach(data => {
+								if (data[item.name]) {
+									let urls = typeof data[item.name] === 'string' ? [data[item.name]] :
+										data[item.name]
+									arr.push(urls.length)
+								}
+								item.width = Math.max(...arr) * 40 + widImg
+							})
+						}
+
+					}
+					if (item.fixed) {
+						if (index === 0) {
+							item.left = 0
+							number += item.width
+						} else {
+							item.left = number
+							number += item.width
+						}
+					}
+					item.emptyString = item.emptyString || '--'
+				})
+				return this.columns
+			},
+			transData() {
+				let flag = this.columns.some(item => item.type === 'selection')
+				this.data.forEach((item, index) => {
+					if (flag) {
+						if (item.checked) {
+							if (!this.selectArr.length) {
+								this.selectArr.push(item)
+							}
+						}
+					}
+					if (this.rowKey) {
+						if (typeof this.rowKey === 'function') {
+							item.key = Object.freeze(this.rowKey(item)) || Date.now()
+						} else {
+							item.key = Object.freeze(item[this.rowKey]) || Date.now()
+						}
+					} else {
+						item.key = index
+					}
+				})
+				if (flag) {
+					if (this.data.length) {
+						let le = this.data.filter(item => item.checked).length
+						if (le) {
+							if (le === this.data.length) {
+								this.checkedAll = true
+							} else {
+								this.indeterminate = true
+							}
+						} else {
+							this.checkedAll = false
+							this.indeterminate = false
+							this.selectArr = []
+						}
+					} else {
+						this.checkedAll = false
+						this.indeterminate = false
+						this.selectArr = []
+					}
+				}
+				return this.data
+			},
+			isHighlight() {
+				return (item, index) => {
+					if (this.rowKey) {
+						return item.key === this.currentRow['key']
+					} else {
+						return index === this.currentRowIndex
+					}
+				}
+			},
+			getHeaderCellStyle() {
+				return (column, columnIndex, childIndex) => {
+					const cellStyle = this.cellHeaderStyle;
+					if (typeof cellStyle === 'function') {
+						return cellStyle({
+							column,
+							columnIndex
+						})
+					}
+					return {}
+				}
+			},
+			getCellStyle() {
+				return (row, column, rowIndex, columnIndex) => {
+					const cellStyle = this.cellStyle;
+					if (typeof cellStyle === 'function') {
+						return cellStyle({
+							row,
+							column,
+							rowIndex,
+							columnIndex
+						})
+					}
+					return {}
+				}
+			},
+		},
+		data() {
+			return {
+				button: [],
+				alipayScrollTop: 0,
+				alipayScrollOldTop: 0,
+				alipayFlag: false,
+				bodyTableLeft: 0,
+				headerTableLeft: 0,
+				lastScrollLeft: 0,
+				isLoadMore: false,
+				headerFooterTableLeft: 0,
+				leftFiexScrollTop: 0,
+				bodyScrollTop: 0,
+				currentDriver: null,
+				currentDriver1: null,
+				bodyTime: null,
+				currentRowIndex: null,
+				currentRow: {},
+				bodyTime1: null,
+				headerTime: null,
+				debounceTime: null,
+				operation: {},
+				completedFlag: false,
+				selectArr: [],
+				indeterminate: false,
+				checkedAll: false,
+				completeLoading: false,
+				aliTime: null,
+			}
+		},
+		created() {},
+		mounted() {
+
+			// setTimeout(()=>{
+			//   uni.createSelectorQuery().in(this).select(".top-header-uni").boundingClientRect( data => {
+			//     console.log('data=======',data)
+			//     //data  可以打印data输出看详细数据,有很多数据信息
+			//     var left = data.width;//表示元素宽度
+			//   }).exec();
+			// },1000)
+		},
+		beforeDestroy() {
+			this.aliTime && clearTimeout(this.aliTime)
+			this.debounceTime && clearTimeout(this.debounceTime)
+			this.bodyTime1 && clearTimeout(this.bodyTime1)
+			this.bodyTime && clearTimeout(this.bodyTime)
+			this.selectArr = []
+			this.indeterminate = false
+			this.checkedAll = false
+
+		},
+		methods: {
+			clearSelection() {
+				this.transData.forEach(item => {
+					item.checked = false
+				})
+				this.selectArr = []
+				this.indeterminate = false
+				this.checkedAll = false
+			},
+			formatterAction(row, column, rowIndex, columnIndex) {
+				if (column.formatter && typeof this.formatter === 'function') {
+					return this.formatter(row, column, rowIndex, columnIndex)
+				}
+				return (row[column.name] == null || row[column.name] === '') ? column.emptyString : row[column.name]
+			},
+			permission(item, renders, index) {
+				if (this.permissionBtn && typeof this.permissionBtn === 'function') {
+					return this.permissionBtn(item, renders, index)
+				}
+				return renders
+			},
+			pullUpCompleteLoading(type) {
+				this.isLoadMore = false
+				if (type === 'ok') {
+					this.completeLoading = true
+				}
+			},
+			scrollAlipay(e) {
+
+				if (!this.alipayScrollOldTop) {
+					this.alipayScrollOldTop = e.detail.scrollTop
+				}
+				this.aliTime && clearTimeout(this.aliTime)
+				this.aliTime = setTimeout(() => {
+
+					if (this.alipayFlag && e.detail.scrollTop > this.alipayScrollOldTop) {
+						this.pullLoad()
+					}
+					this.alipayFlag = false
+					this.alipayScrollOldTop = null
+				}, 500)
+			},
+			pullLoad() {
+				if (this.isShowLoadMore) {
+					this.isLoadMore = true
+					this.$emit('pullUpLoading')
+					let that = this
+					this.pullUpLoading && this.pullUpLoading.call(this.$parent.$parent, (type) => {
+						that.isLoadMore = false
+						if (type === 'ok') {
+							that.completeLoading = true
+						}
+					})
+				}
+
+			},
+			scrolltolower(e) {
+				this.alipayFlag = true
+				if (e.detail.direction === 'bottom') {
+					this.pullLoad()
+				}
+
+				// this.pullUpLoading.call(this.$parent)
+			},
+			previewImage(item, url, current) {
+				let urls = typeof url === 'string' ? [url] : url
+				uni.previewImage({
+					current,
+					urls: urls
+				})
+			},
+			resetHighlight() {
+				this.currentRowIndex = null
+				this.currentRow = {}
+			},
+			cellClick(row, index, column) {
+				this.$emit('cellClick', row, index, column)
+			},
+			rowClick(row, index) {
+				if (this.highlight) {
+					this.currentRowIndex = index
+					this.currentRow = row
+					this.$emit('currentChange', row, index)
+				}
+				this.$emit('rowClick', row, index)
+			},
+			checkboxSelectedAll(e) {
+				this.indeterminate = false
+				if (e.checked) {
+					this.selectArr = []
+					this.checkedAll = true
+					this.data.forEach(item => {
+						// this.$set(item,'checked',true)
+						item.checked = true
+						this.selectArr.push(item)
+					})
+				} else {
+					this.checkedAll = false
+					this.data.forEach(item => {
+						this.$set(item, 'checked', false)
+					})
+					this.selectArr = []
+				}
+				// #ifndef H5 || APP-PLUS
+				this.$forceUpdate()
+				// #endif
+				this.$emit('toggleAllSelection', e.checked, this.selectArr)
+			},
+			checkboxSelected(e, item) {
+				// #ifdef H5 || APP-PLUS
+				this.$set(item, 'checked', e.checked)
+				// #endif
+				// #ifndef H5 || APP-PLUS
+				this.data.forEach(item => {
+					if (item.key === e.data.key) {
+						item.checked = e.checked
+					}
+				})
+				// #endif
+				item.checked = e.checked
+				e.data.checked = e.checked
+				if (e.checked) {
+					this.selectArr.push(e.data)
+				} else {
+					this.selectArr = this.selectArr.filter(item => item.key !== e.data.key)
+				}
+				if (this.selectArr.length === this.transData.length) {
+					this.indeterminate = false
+					this.checkedAll = true
+				} else {
+					this.indeterminate = true
+					this.checkedAll = false
+				}
+				if (!this.selectArr.length) {
+					this.checkedAll = false
+					this.indeterminate = false
+				}
+				// #ifndef H5 || APP-PLUS
+				this.$forceUpdate()
+				// #endif
+				this.$emit('toggleRowSelection', e.checked, this.selectArr)
+			},
+			itemFilter(item, ite) {
+				if (ite.filters && ite.name) {
+					let key = item[ite.name]
+					return ite.filters[key] || ''
+				}
+				return item[ite.name] || ite.emptyString
+			},
+			// 默认字体为微软雅黑 Microsoft YaHei,字体大小为 14px
+			getTextWidth(str) {
+				if (str.length < 3) {
+					return 40
+				}
+				let regx = /^[0-9]+.?[0-9]*$/
+				let flexWidth = 0
+				for (const char of str) {
+					if ((char >= 'A' && char <= 'Z') || (char >= 'a' && char <= 'z')) {
+						// 如果是英文字符,为字符分配8个单位宽度
+						flexWidth += 10
+					} else if (char >= '\u4e00' && char <= '\u9fa5') {
+						// 如果是中文字符,为字符分配15个单位宽度
+						flexWidth += 15
+					} else if (regx.test(char)) {
+						flexWidth += 9
+					} else {
+						// 其他种类字符,为字符分配8个单位宽度
+						flexWidth += 7
+					}
+				}
+				return flexWidth
+			},
+			width(item) {
+				return `${item.width?item.width:'100'}px`
+			},
+			showStripe(index) {
+				if (this.currentDriver) return
+				if (this.stripe) {
+					return (index % 2) != 0 ? 'odd' : 'even'
+				} else {
+					return ''
+				}
+			},
+			//验证字符串是否是数字
+			checkNumber(theObj) {
+				var reg = /^[0-9]+.?[0-9]*$/;
+				if (reg.test(theObj)) {
+					return true;
+				}
+				return false;
+			},
+			isDate(data) {
+				if (isNaN(data) && !isNaN(Date.parse(data))) {
+					return true
+				}
+				return false
+			},
+			sortAction(item, index) {
+				if (!item.sorter) {
+					return false
+				}
+				this.$set(item, 'sorterMode', item.sorterMode === '_asc' ? '_desc' : '_asc')
+				if (item.sorter === 'custom') {
+					this.$emit('sort-change', item, item.sorterMode.replace('_', ''), index)
+				} else {
+					this.sortData(item)
+				}
+				// #ifndef H5 || APP-PLUS
+				this.$forceUpdate()
+				// #endif
+			},
+			sortData(item) {
+				let key = item.name
+
+				if (item.sorterMode === '_asc') {
+					this.data.sort((a, b) => {
+						if (this.checkNumber(a[key])) {
+							return a[key] - b[key]
+						}
+						if (this.isDate(a[key])) {
+							let a1 = new Date(a[key]).getTime()
+							let b1 = new Date(b[key]).getTime()
+							return a1 - b1
+						}
+					})
+				} else {
+					this.data.sort((a, b) => {
+						if (this.checkNumber(a[key])) {
+							return b[key] - a[key]
+						}
+						if (this.isDate(a[key])) {
+							let a1 = new Date(a[key]).getTime()
+							let b1 = new Date(b[key]).getTime()
+							return b1 - a1
+						}
+					})
+				}
+			},
+			throttle(method, delay = 60) {
+				let time = null
+				return (...args) => {
+					if (!time) {
+						time = setTimeout(() => {
+							method(...args)
+							time = null;
+						}, delay)
+					}
+				}
+			},
+			debounce(method, delay = 1000) {
+				return (...args) => {
+					this.debounceTime && clearTimeout(this.debounceTime)
+					this.debounceTime = setTimeout(() => {
+						method(...args)
+					}, delay)
+				}
+			},
+			handleBodyScroll(e) {
+				if (this.currentDriver && this.currentDriver !== e.currentTarget.id) return
+				this.currentDriver = e.currentTarget.id
+				this.headerTableLeft = e.detail.scrollLeft
+				this.headerFooterTableLeft = e.detail.scrollLeft
+				this.leftFiexScrollTop = e.detail.scrollTop
+				this.bodyTime && clearTimeout(this.bodyTime)
+				this.bodyTime = setTimeout(() => {
+					this.currentDriver = null
+				}, 200)
+
+			},
+			leftFixedScrollAction(e) {
+				if (this.currentDriver && this.currentDriver !== e.currentTarget.id) return
+				this.currentDriver = e.currentTarget.id
+				this.bodyScrollTop = e.detail.scrollTop
+				this.bodyTime && clearTimeout(this.bodyTime)
+				this.bodyTime = setTimeout(() => {
+					this.currentDriver = null
+				}, 200)
+			},
+			scrollToLeft(e) {
+				if (this.currentDriver1 && this.currentDriver1 !== e.currentTarget.id) return
+				this.currentDriver1 = e.currentTarget.id
+				if (e.detail.direction === 'left' && this.headerTableLeft < 10) {
+					this.headerTableLeft = 0
+				} else if (e.detail.direction === 'top' && this.leftFiexScrollTop < 10) {
+					this.leftFiexScrollTop = 0
+				}
+				this.bodyTime && clearTimeout(this.bodyTime)
+				this.bodyTime = setTimeout(() => {
+					this.currentDriver1 = null
+				}, 200)
+			},
+			scrollToFixedLeft(e) {
+				if (this.currentDriver1 && this.currentDriver1 !== e.currentTarget.id) return
+				this.currentDriver1 = e.currentTarget.id
+				if (e.detail.direction === 'top' && this.bodyScrollTop < 10) {
+					this.bodyScrollTop = 0
+				}
+				this.bodyTime && clearTimeout(this.bodyTime)
+				this.bodyTime = setTimeout(() => {
+					this.currentDriver1 = null
+				}, 200)
+			},
+			handleTableScrollLeft(e, type) {
+				if (this.currentDriver && this.currentDriver !== e.currentTarget.id) return
+				this.currentDriver = e.currentTarget.id
+				this.bodyTableLeft = e.detail.scrollLeft
+				this.headerFooterTableLeft = e.detail.scrollLeft
+				this.bodyTime && clearTimeout(this.bodyTime)
+				this.bodyTime = setTimeout(() => {
+					this.currentDriver = null
+				}, 200)
+			},
+			handleFooterTableScrollLeft(e) {
+				if (this.currentDriver && this.currentDriver !== e.currentTarget.id) return
+				this.currentDriver = e.currentTarget.id
+				this.bodyTableLeft = e.detail.scrollLeft
+				this.headerTableLeft = e.detail.scrollLeft
+				this.bodyTime && clearTimeout(this.bodyTime)
+				this.bodyTime = setTimeout(() => {
+					this.currentDriver = null
+				}, 200)
+			}
+		}
+	}
 </script>
 <style lang="scss">
-.zb-table-fixed-left{
-  /*去除左边滚动条 */
-  scroll-view ::-webkit-scrollbar {
-    display: none !important;
-    width: 0 !important;
-    height: 0 !important;
-    -webkit-appearance: none;
-    background: transparent;
-  }
-}
-.zb-table-header{
-  ///*去除头部滚动条 */
-  scroll-view ::-webkit-scrollbar {
-    display: none !important;
-    width: 0 !important;
-    height: 0 !important;
-    -webkit-appearance: none;
-    background: transparent;
-  }
-}
+	.zb-table-fixed-left {
 
+		/*去除左边滚动条 */
+		scroll-view ::-webkit-scrollbar {
+			display: none !important;
+			width: 0 !important;
+			height: 0 !important;
+			-webkit-appearance: none;
+			background: transparent;
+		}
+	}
+
+	.zb-table-header {
+
+		///*去除头部滚动条 */
+		scroll-view ::-webkit-scrollbar {
+			display: none !important;
+			width: 0 !important;
+			height: 0 !important;
+			-webkit-appearance: none;
+			background: transparent;
+		}
+	}
 </style>
 <style lang="scss" scoped>
-.sorter-table{
-  position: absolute;
-  right: 6px;
-  top:50%;
-  transform:translateY(-50%);
-  .sorter-table-icon{
-    width: 0;
-    height: 0;
-    color: #dcdcdc;
-    border-right: 4px solid transparent;
-    border-left: 4px solid transparent;
-  }
-  .sorter-table-icon:first-child{
-    border-bottom: 5px solid currentColor;
-  }
-  .sorter-table-icon:last-child{
-    margin-top: 1.5px;
-    border-top: 5px solid currentColor;
-  }
-  .sorting_desc{
-    color: #2979ff;
-  }
-  .sorting_asc{
-    color: #2979ff;
-  }
-}
-.checkbox-item{
-  display: flex;align-items: center;justify-content: center;width: 100%;height: 100%
-}
-.no-data{
-  width: 100%;
-  height: 80rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  border-bottom: 1px solid #e8e8e8;
-}
-.item-th{
-  position: relative;
-  flex-shrink: 0;
-  width: 100px;
-  overflow-wrap: break-word;
-  border-bottom: 1px solid #e8e8e8;
-  transition: background 0.3s;
-  padding-right: 20px;
-  word-break:keep-all;           /* 不换行 */
-  white-space:nowrap;          /* 不换行 */
-  overflow:hidden;               /* 内容超出宽度时隐藏超出部分的内容 */
-  text-overflow:ellipsis;         /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
-  overflow-wrap: break-word;
-}
-.zb-table{
-  height: 100%;
-  overflow: hidden;
-  width: 100%;
-  display: flex;
-  flex-direction: column;
-  font-size: 12px;
-  position: relative;
-  .zb-table-content{
-    //height: 100%;
-    //flex: 1;
-    position: relative;
-    overflow: hidden;
-  }
-  .zb-table-fixed{
-    min-width: 100%;
-  }
-  .zb-table-body{
-    position: relative;
-    background: #fff;
-    transition: opacity 0.3s;
-  }
-  .item-tr{
-    display: flex;
-    //height: 41px;
-  }
-  .item-td{
-    flex-shrink: 0;
-    width: 100px;
-    padding-left: 8px;
-    height: 40px;
-    line-height: 40px;
-	padding-right: 20px;
-    box-sizing: border-box;
-    word-break:keep-all;           /* 不换行 */
-    white-space:nowrap;          /* 不换行 */
-    overflow:hidden;               /* 内容超出宽度时隐藏超出部分的内容 */
-    text-overflow:ellipsis;         /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
-    overflow-wrap: break-word;
-    border-bottom: 1px solid #e8e8e8;
-    //transition: background 0.3s;
-  }
-
-  .zb-table-fixed-left .zb-table-header{
-    overflow-y: hidden;
-  }
-  .zb-table-header {
-    overflow: hidden;
-    background: #fafafa;
-    .item-th{
-      padding-left: 8px;
-      line-height: 39px;
-      height: 40px;
-      //display: flex;
-      //align-items: center;
-      box-sizing: border-box;
-    }
-  }
-  .zb-table-fixed-left .zb-table-fixed{
-    background: #fff;
-  }
-  .zb-table-fixed-right .zb-table-fixed{
-    background: #fff;
-  }
-  .zb-table-body-inner{
-    height: 100%;
-    // overflow: scroll;
-  }
-  .zb-table-fixed-left{
-    position: absolute;
-    top: 0;
-    z-index: 1;
-    overflow: hidden;
-    border-radius: 0;
-    height: 100%;
-    //transition: box-shadow 0.3s ease;
-  }
-  .odd{
-    background-color:rgba(249,249,249,0.6);
-    //height: 100%;
-    width: 100%;
-  }
-  .even{
-    background-color:white ;
-    //height: 100%;
-    width: 100%;
-  }
-}
-.scroll-left-fixed{
-  .zb-table-fixed-left {
-    left: 0;
-    box-shadow: 6px 0 6px -4px #ccc;
-  }
-}
-.zb-table-applet{
-  height: 100%;
-  //overflow: hidden;
-  width: 100%;
-  position: relative;
-  display: flex;
-  flex-direction: column;
-  font-size: 12px;
-  .zb-table-content{
-    //height: 100%;
-    flex: 1;
-    overflow: hidden;
-    position: relative;
-
-  }
-  .zb-table-fixed{
-    min-width: 100%;
-    width: fit-content;
-  }
-
-  .zb-table-body{
-    position: relative;
-    background: #fff;
-    transition: opacity 0.3s;
-  }
-  .item-tr{
-    display: flex;
-    //height: 41px;
-  }
-  .item-td{
-    flex-shrink: 0;
-    width: 100px;
-    padding-left: 8px;
-    height: 40px;
-    line-height: 40px;
-	padding-right:20px;
-    box-sizing: border-box;
-    word-break:keep-all;           /* 不换行 */
-    white-space:nowrap;          /* 不换行 */
-    overflow:hidden;               /* 内容超出宽度时隐藏超出部分的内容 */
-    text-overflow:ellipsis;         /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
-    overflow-wrap: break-word;
-    border-bottom: 1px solid #e8e8e8;
-    //transition: background 0.3s;
-  }
-  .zb-table-header {
-    //overflow: hidden;
-    position: sticky;
-    top: 0;
-    z-index: 2;
-    //width: fit-content;
-    .item-th{
-      padding-left: 8px;
-      line-height: 39px;
-      height: 40px;
-      box-sizing: border-box;
-      background: #fafafa;
-    }
-    .zb-stick-side{
-      position: sticky;
-      top: 0;
-      left: 0;
-      z-index: 2;
-      //border-right: solid 1rpx #dbdbdb;
-      box-sizing: border-box;
-      background: #fafafa;
-      //box-shadow: 6px 0 6px -4px #ccc;
-    }
-  }
-  .zb-table-fixed-left .zb-table-fixed{
-    background: #fff;
-  }
-  .zb-table-fixed-right .zb-table-fixed{
-    background: #fff;
-  }
-  .zb-table-fixed-header .zb-table-body-inner{
-    height: 100%;
-    // overflow: scroll;
-  }
-  .zb-table-fixed-left{
-    position: absolute;
-    top: 0;
-    z-index: 1;
-    overflow: hidden;
-    border-radius: 0;
-    height: 100%;
-    //transition: box-shadow 0.3s ease;
-  }
-  .scroll-left-fixed{
-    .zb-table-fixed-left {
-      left: 0;
-      box-shadow: 6px 0 6px -4px #ccc;
-    }
-  }
-  .odd{
-    background-color:rgba(249,249,249,0.6);
-    //height: 100%;
-    width: 100%;
-  }
-  .even{
-    background-color:white ;
-    //height: 100%;
-    width: 100%;
-  }
-  .zb-table-tbody {
-    .zb-stick-side{
-      position: sticky;
-      left: 0;
-      z-index: 1;
-      box-sizing: border-box;
-      background:white;
-      //box-shadow: 6px 0 6px -2px #ccc;
-    }
-    .odd{
-      background:#f9f9f9;
-      //height: 100%;
-      width: 100%;
-    }
-    .even{
-      background:white ;
-      //height: 100%;
-      width: 100%;
-    }
-  }
-  .current-row{
-    .item-td{
-      background-color: #ecf5ff;
-    }
-  }
-}
-.current-row{
-  .item-td{
-    background-color: #ecf5ff;
-  }
-}
-.zb-table-header{
-  height: 40px;
-}
-.scrollPosition{
-  position: absolute;right: 0;top: 0;height: 100%;background: red;
-  z-index: 999;
-}
-</style>
+	.sorter-table {
+		position: absolute;
+		right: 6px;
+		top: 50%;
+		transform: translateY(-50%);
+
+		.sorter-table-icon {
+			width: 0;
+			height: 0;
+			color: #dcdcdc;
+			border-right: 4px solid transparent;
+			border-left: 4px solid transparent;
+		}
+
+		.sorter-table-icon:first-child {
+			border-bottom: 5px solid currentColor;
+		}
+
+		.sorter-table-icon:last-child {
+			margin-top: 1.5px;
+			border-top: 5px solid currentColor;
+		}
+
+		.sorting_desc {
+			color: #2979ff;
+		}
+
+		.sorting_asc {
+			color: #2979ff;
+		}
+	}
+
+	.checkbox-item {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 100%;
+		height: 100%
+	}
+
+	.no-data {
+		width: 100%;
+		height: 80rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		border-bottom: 1px solid #e8e8e8;
+	}
+
+	.item-th {
+		position: relative;
+		flex-shrink: 0;
+		width: 100px;
+		overflow-wrap: break-word;
+		border-bottom: 1px solid #e8e8e8;
+		transition: background 0.3s;
+		padding-right: 20px;
+		word-break: keep-all;
+		/* 不换行 */
+		white-space: nowrap;
+		/* 不换行 */
+		overflow: hidden;
+		/* 内容超出宽度时隐藏超出部分的内容 */
+		text-overflow: ellipsis;
+		/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
+		overflow-wrap: break-word;
+	}
+
+	.zb-table {
+		height: 100%;
+		overflow: hidden;
+		width: 100%;
+		display: flex;
+		flex-direction: column;
+		font-size: 12px;
+		position: relative;
+
+		.zb-table-content {
+			//height: 100%;
+			//flex: 1;
+			position: relative;
+			overflow: hidden;
+		}
+
+		.zb-table-fixed {
+			min-width: 100%;
+		}
+
+		.zb-table-body {
+			position: relative;
+			background: #fff;
+			transition: opacity 0.3s;
+		}
+
+		.item-tr {
+			display: flex;
+			flex-direction: row;
+			//height: 41px;
+		}
+
+		.item-td {
+			flex-shrink: 0;
+			width: 100px;
+			padding-left: 8px;
+			height: 40px;
+			line-height: 40px;
+			padding-right: 20px;
+			box-sizing: border-box;
+			word-break: keep-all;
+			/* 不换行 */
+			white-space: nowrap;
+			/* 不换行 */
+			overflow: hidden;
+			/* 内容超出宽度时隐藏超出部分的内容 */
+			text-overflow: ellipsis;
+			/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
+			overflow-wrap: break-word;
+			border-bottom: 1px solid #e8e8e8;
+			//transition: background 0.3s;
+		}
+
+		.zb-table-fixed-left .zb-table-header {
+			overflow-y: hidden;
+		}
+
+		.zb-table-header {
+			overflow: hidden;
+			background: #fafafa;
+
+			.item-th {
+				padding-left: 8px;
+				line-height: 39px;
+				height: 40px;
+				//display: flex;
+				//align-items: center;
+				box-sizing: border-box;
+			}
+		}
+
+		.zb-table-fixed-left .zb-table-fixed {
+			background: #fff;
+		}
+
+		.zb-table-fixed-right .zb-table-fixed {
+			background: #fff;
+		}
+
+		.zb-table-body-inner {
+			height: 100%;
+			// overflow: scroll;
+		}
+
+		.zb-table-fixed-left {
+			position: absolute;
+			top: 0;
+			z-index: 1;
+			overflow: hidden;
+			border-radius: 0;
+			height: 100%;
+			//transition: box-shadow 0.3s ease;
+		}
+
+		.odd {
+			background-color: rgba(249, 249, 249, 0.6);
+			//height: 100%;
+			width: 100%;
+		}
+
+		.even {
+			background-color: white;
+			//height: 100%;
+			width: 100%;
+		}
+	}
+
+	.scroll-left-fixed {
+		.zb-table-fixed-left {
+			left: 0;
+			box-shadow: 6px 0 6px -4px #ccc;
+		}
+	}
+
+	.zb-table-applet {
+		height: 100%;
+		//overflow: hidden;
+		width: 100%;
+		position: relative;
+		display: flex;
+		flex-direction: column;
+		font-size: 12px;
+
+		.zb-table-content {
+			//height: 100%;
+			flex: 1;
+			overflow: hidden;
+			position: relative;
+
+		}
+
+		.zb-table-fixed {
+			min-width: 100%;
+			width: fit-content;
+		}
+
+		.zb-table-body {
+			position: relative;
+			background: #fff;
+			transition: opacity 0.3s;
+		}
+
+		.item-tr {
+			display: flex;
+			flex-direction: row;
+			//height: 41px;
+		}
+
+		.item-td {
+			flex-shrink: 0;
+			width: 100px;
+			padding-left: 8px;
+			height: 40px;
+			line-height: 40px;
+			padding-right: 20px;
+			box-sizing: border-box;
+			word-break: keep-all;
+			/* 不换行 */
+			white-space: nowrap;
+			/* 不换行 */
+			overflow: hidden;
+			/* 内容超出宽度时隐藏超出部分的内容 */
+			text-overflow: ellipsis;
+			/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
+			overflow-wrap: break-word;
+			border-bottom: 1px solid #e8e8e8;
+			//transition: background 0.3s;
+		}
+
+		.zb-table-header {
+			//overflow: hidden;
+			position: sticky;
+			top: 0;
+			z-index: 2;
+
+			//width: fit-content;
+			.item-th {
+				padding-left: 8px;
+				line-height: 39px;
+				height: 40px;
+				box-sizing: border-box;
+				background: #fafafa;
+			}
+
+			.zb-stick-side {
+				position: sticky;
+				top: 0;
+				left: 0;
+				z-index: 2;
+				//border-right: solid 1rpx #dbdbdb;
+				box-sizing: border-box;
+				background: #fafafa;
+				//box-shadow: 6px 0 6px -4px #ccc;
+			}
+		}
+
+		.zb-table-fixed-left .zb-table-fixed {
+			background: #fff;
+		}
+
+		.zb-table-fixed-right .zb-table-fixed {
+			background: #fff;
+		}
+
+		.zb-table-fixed-header .zb-table-body-inner {
+			height: 100%;
+			// overflow: scroll;
+		}
+
+		.zb-table-fixed-left {
+			position: absolute;
+			top: 0;
+			z-index: 1;
+			overflow: hidden;
+			border-radius: 0;
+			height: 100%;
+			//transition: box-shadow 0.3s ease;
+		}
+
+		.scroll-left-fixed {
+			.zb-table-fixed-left {
+				left: 0;
+				box-shadow: 6px 0 6px -4px #ccc;
+			}
+		}
+
+		.odd {
+			background-color: rgba(249, 249, 249, 0.6);
+			//height: 100%;
+			width: 100%;
+		}
+
+		.even {
+			background-color: white;
+			//height: 100%;
+			width: 100%;
+		}
+
+		.zb-table-tbody {
+			.zb-stick-side {
+				position: sticky;
+				left: 0;
+				z-index: 1;
+				box-sizing: border-box;
+				background: white;
+				//box-shadow: 6px 0 6px -2px #ccc;
+			}
+
+			.odd {
+				background: #f9f9f9;
+				//height: 100%;
+				width: 100%;
+			}
+
+			.even {
+				background: white;
+				//height: 100%;
+				width: 100%;
+			}
+		}
+
+		.current-row {
+			.item-td {
+				background-color: #ecf5ff;
+			}
+		}
+	}
+
+	.current-row {
+		.item-td {
+			background-color: #ecf5ff;
+		}
+	}
+
+	.zb-table-header {
+		height: 40px;
+	}
+
+	.scrollPosition {
+		position: absolute;
+		right: 0;
+		top: 0;
+		height: 100%;
+		background: red;
+		z-index: 999;
+	}
+</style>