浏览代码

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

ezhizao_zx 8 月之前
父节点
当前提交
e28ba65448

+ 7 - 0
api/business/processInspection.js

@@ -249,6 +249,13 @@ export function getPatrolLotInfo(data) {
 		data: data
 	})
 }
+export function getFirstInspectionLotInfo(data) {
+	return req.request({
+		url: '/business/inspecion/getFirstInspectionLotInfo',
+		method: 'post',
+		data: data
+	})
+}
 export function getLotInfoByFirstInspection(data) {
 	return req.request({
 		url: '/business/inspecion/getLotInfoByFirstInspection',

+ 40 - 4
components/dialog-lotReporting/dialog-lotReporting.vue

@@ -49,7 +49,12 @@
 			<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;"></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(255,85,85,1)" />
+				<text class=" label right">是</text>
 			</view>
 		</view>
 
@@ -120,6 +125,8 @@
 	const lotData = ref(null)
 	const curDaywork = ref({})
 	const productId = ref("")
+	const isWx = ref(false)
+	const normalStatus = ref(false)
 	const processCode = ref("")
 	const technologicalProcessId = ref("")
 	const currentLotCode = ref("")
@@ -190,8 +197,11 @@
 		// console.log(arg)
 		deptList.value = workshopList.value.find(v => v.value === arg).deptList.map(v => ({
 			value: v.deptId,
-			text: v.deptName
+			text: v.deptName,
+			isSortPackaging:v.isSortPackaging
 		}))
+		normalStatus.value = false
+		isWx.value = false
 	}
 	//结束扫码
 	function handleFinishScan() {
@@ -226,6 +236,31 @@
 		  });
 	
 	}
+	function handleDeptChange() {
+		console.log(deptList.value)
+		let deptInfo = deptList.value.find(item =>item.value == curDaywork.value.deptId)
+		console.log(deptInfo)
+		if(deptInfo.text =='外协') {
+			isWx.value = true
+		}else{
+			isWx.value = false
+		}
+		if(deptInfo.isSortPackaging == 1){
+			normalStatus.value = true
+		}else{
+			normalStatus.value = false
+		}
+	}
+	function switchChange(event) {
+		console.log(event.detail.value)
+		//是
+		if (event.detail.value) {
+			normalStatus.value = true
+		} else {
+			//否
+			normalStatus.value = false
+		}
+	}
 
 	function addDayworkItem(callback) {
 		// 判断选择下工段和下车间
@@ -248,11 +283,12 @@
 			quickInfo: {
 				deptId: curDaywork.value.deptId,
 				workshopId: curDaywork.value.workshopId,
-				deptName: deptList.value.find(v => v.value === curDaywork.value.deptId).text
+				deptName: deptList.value.find(v => v.value === curDaywork.value.deptId).text,
+				isSortPackaging :normalStatus.value?"1":"0"
 			}
 
 		}))
-		// console.log(params)
+		 console.log(params)
 		reportDaywork(params).then(res => {
 			callback()
 		})

+ 15 - 1
components/dialog-turnoverApplication/dialog-turnoverApplication.vue

@@ -216,6 +216,7 @@
 	}
 
 	function selectTurnoverType(item) {
+		curDayworkItem.value.deptId = null
 		curDayworkItem.value.turnoverType = item.dictValue;
 		selection.value = []
 		normalStatus.value = false
@@ -399,6 +400,13 @@
 	}
 
 	function handleChangeInside() {
+		let deptInfo = deptList.value.find(item=>  item.deptId == curDayworkItem.value.deptId )
+		console.log(deptInfo)
+		if(deptInfo.isSortPackaging == 1){
+			normalStatus.value = true
+		}else{
+			normalStatus.value = false
+		}
 		turnAreaList.value = [];
 		selection.value = []
 		getTurnoverListByDeptId({
@@ -413,7 +421,13 @@
 	}
 
 	function handleChangeOutside() {
-		//console.log(curDayworkItem.value.deptId)
+		let deptInfo = deptList.value.find(item=>  item.deptId == curDayworkItem.value.deptId )
+		console.log(deptInfo)
+		if(deptInfo.isSortPackaging == 1){
+			normalStatus.value = true
+		}else{
+			normalStatus.value = false
+		}
 	}
 </script>
 

+ 6 - 0
pages.json

@@ -235,6 +235,12 @@
 				"navigationBarTitleText": "首件检"
 			}
 		},
+		{
+			"path": "pages/firstInspection/reviewScan",
+			"style": {
+				"navigationBarTitleText": "首件检"
+			}
+		},
 		{
 			"path": "pages/firstInspection/options",
 			"style": {

+ 9 - 3
pages/firstInspection/form.vue

@@ -486,6 +486,7 @@ function handleDeletedPhoto(e) {
 		processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
 		processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
 		processInspecion.value.processInspectionPictureList = selectedPhotos.value
+		processInspecion.value.isReviewer = store.isReviewer
 		console.log(processInspecion.value)
 		if(processInspecion.value.flag) {
 			//打开选择仪器室的弹窗
@@ -495,11 +496,15 @@ function handleDeletedPhoto(e) {
 		saveFirstInspection(processInspecion.value).then(res => {
 			if (res.code == 200) {
 				let index = 0;
-
+				console.log(store.isReviewer)
 				for (let i = 0; i < pages.length; i++) {
 
-					if (pages[i].$page.fullPath == "/pages/reportingForWork/index") {
+					if (!store.isReviewer && pages[i].$page.fullPath == "/pages/reportingForWork/index") {
 
+						index = pages.length - i - 1;
+					}
+					if (store.isReviewer && pages[i].$page.fullPath == "/pages/firstInspection/index") {
+		
 						index = pages.length - i - 1;
 					}
 				}
@@ -524,9 +529,10 @@ function handleDeletedPhoto(e) {
 			if (res.code == 200) {
 				let index = 0;
 				let pages = getCurrentPages();
+				console.log(store.isReviewer)
 				for (let i = 0; i < pages.length; i++) {
 		
-					if (pages[i].$page.fullPath == "/pages/reportingForWork/index") {
+					if ( pages[i].$page.fullPath == "/pages/reportingForWork/index") {
 		
 						index = pages.length - i - 1;
 					}

+ 9 - 1
pages/firstInspection/index.vue

@@ -11,6 +11,7 @@
 				<input v-model="startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</view>
+		<view class="scan-btn uni-row" style="min-height: 80rpx;" @click.stop="handleAddFirstInspection">新增首件检</view>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -114,7 +115,14 @@
 	})
 
 	/***************************** 定义了一些方法 *****************************/
-
+	// 新增出厂检
+	const handleAddFirstInspection = () => {
+		store.processInspection = null
+		store.isReviewer = true
+		uni.navigateTo({
+			url: '/pages/firstInspection/reviewScan'
+		})
+	}
 	function getList() {
 		uni.showLoading({
 			title: '加载中'

+ 434 - 0
pages/firstInspection/reviewScan.vue

@@ -0,0 +1,434 @@
+<template>
+	<view class="page-container uni-column">
+		<view class="consultation-container uni-column">
+			<view class="info-row uni-row">
+				<view class="label">批次号</view>
+				<view class="value">{{ lot.lotCode }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">图号</view>
+				<view class="value">{{ lot.drawingNumber }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">工艺版本</view>
+				<view class="value">{{ lot.technologyVersion }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">产品描述</view>
+				<view class="value">{{ lot.productDescription }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">当前工序</view>
+				<view class="value">{{ lot.processAlias }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">当前工段</view>
+				<view class="value">{{ lot.deptName }}</view>
+			</view>
+	<view class="info-row uni-row" style="margin-top: 40rpx;">
+			<view class="label">操作者</view>
+			<view class="value">	
+			<uni-data-select v-model="userId" :localdata="userList"
+			:clear="false" @change="handleGetEquipmentList"
+			style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
+	</view>
+		</view>
+			<view class="info-row uni-row" style="margin-top: 40rpx;">
+				<view class="label">加工设备</view>
+				<view class="value">
+					<uni-data-select v-model="equipment" :localdata="equipmentList" :clear="false"
+						style="outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
+				</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">所有箱号</view>
+				<view class="value">{{ lot.allCarrierName }}</view>
+			</view>
+			<view class="info-row uni-row">
+				<view class="label">巡检箱号</view>
+				<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">
+				<uni-icons type="scan" size="16" style="color: #ffffff; margin-right: 8rpx;" />
+				<text>扫描箱码及检测箱码</text>
+			</view>
+			<view class="btn uni-row" style="margin-top: 48rpx;" @click.stop="handleConfirm">确定</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+	import {
+		onLoad,
+		onReady,
+		onUnload,
+		onShow
+	} from '@dcloudio/uni-app'
+	import {
+		getLotInfoByFirstInspection,
+		getCarrierInfoProcess,
+		getCarrierInfo,
+		getFirstInspectionLotInfo,
+	} from '@/api/business/processInspection.js'
+	import {
+		debounce
+	} from '../../utils/common';
+	import {
+		store
+	} from '../../store';
+	import {
+		getDayWorkItemHistory
+	} from '../../api/business/dayWorkItem';
+	const carrierCode = ref('')
+	const equipmentList = ref([])
+	const inspectionChamber = ref(null)
+	const userList = ref([])
+	const userId = ref(null)
+	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,
+						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
+									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
+										})
+									})
+						
+								}
+							} 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: '000613',
+				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 {
+		
+							// 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 = '1803605009533812739'
+									lot.value.inspectionCarrierCode = "300022"
+									// 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
+				})
+			})
+		}
+		
+	}
+	function getUser(data) {
+		
+		const uniqueUserMap = new Map();
+		console.log(data)
+		data.forEach(item => {
+		  // 检查 Map 中是否已经有这个 equimentDetailId
+		  if (!uniqueUserMap.has(item.userId)) {
+		    // 如果没有,添加到 Map 中
+		    uniqueUserMap.set(item.userId, {
+		      value: item.userId,
+		      text: item.nickName
+		    });
+		  }
+		});
+		console.log(uniqueUserMap)
+		// 将 Map 的值转换为数组
+		userList.value = Array.from(uniqueUserMap.values());
+		console.log(userList.value)
+		userId.value = userList.value[0].value
+	}
+	function checkSave() {
+		if (lot.value.lotCode == '' || lot.value.lotCode == null) {
+			debounce(handleScanCode, 700)
+		}
+		if (lot.value.inspectionCarrierId == null || lot.value.inspectionCarrierId == '') {
+			debounce(handleScanCode, 700)
+		}
+	}
+	
+	function handleGetEquipmentList() {
+		getEquipment(lot.value.dayworkItemList)
+	}
+
+	function getEquipment(data) {
+		const uniqueEquipmentMap = new Map();
+		console.log(userId.value)
+		let filterList = data.filter(info => info.userId == userId.value)
+		console.log(filterList)
+		filterList.forEach(item => {
+		  // 检查 Map 中是否已经有这个 equimentDetailId
+		  if (!uniqueEquipmentMap.has(item.equipmentDetailId)) {
+		    // 如果没有,添加到 Map 中
+		    uniqueEquipmentMap.set(item.equipmentDetailId, {
+		      value: item.equipmentDetailId,
+		      text: item.equipmentDetailCode
+		    });
+		  }
+		});
+		// 将 Map 的值转换为数组
+		equipmentList.value = Array.from(uniqueEquipmentMap.values());
+		equipment.value = equipmentList.value[0].value
+	}
+
+	//确定后,将批次id,批次号,传递过去
+	const handleConfirm = () => {
+		console.log(lot.value)
+		if (lot.value.inspectionCarrierId != undefined) {
+			if (equipment.value == null) {
+				uni.showToast({
+					icon: 'none',
+					title: "请选择加工设备",
+					duration: 2000
+				})
+			}
+			 else {
+				lot.value.equipmentDetailId = equipment.value
+				lot.value.equipmentDetailCode = equipmentList.value[equipmentList.value.findIndex(item => item.value ==
+					equipment.value)].text
+					lot.value.userId = userId.value
+					lot.value.nickName = userList.value[userList.value.findIndex(item =>item.value == userId.value)].text
+				store.processInspection = null
+				//判断选择了那种检测类型
+					//选择首检
+					uni.navigateTo({
+						url: "/pages/firstInspection/form",
+						success: (res) => {
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit("firstInspectionFrom", {
+								data: lot.value
+							})
+						}
+					})
+			}
+		} else {
+			if (lot.value.inspectionCarrierId == undefined) {
+				uni.showToast({
+					icon: 'none',
+					title: "请扫描检测载具",
+					duration: 2000
+				})
+			}
+
+			return;
+		}
+
+
+	}
+</script>
+
+<style lang="scss">
+	.page-container {
+		height: 100%;
+		background-color: #ececec;
+		font-size: 28rpx;
+		padding: 24rpx;
+		box-sizing: border-box;
+	}
+
+	.consultation-container {
+		background-color: #ffffff;
+		padding: 24rpx;
+		border-radius: 12rpx;
+
+		.title {
+			justify-content: center;
+			font-size: 32rpx;
+			font-weight: 700;
+		}
+
+		.info-row {
+			margin-top: 24rpx;
+
+			.label {
+				width: 160rpx;
+			}
+
+			.value {
+				flex: 1;
+
+				textarea {
+					flex: 1;
+					border: 1px solid #888888;
+					box-sizing: border-box;
+					padding: 16rpx;
+				}
+			}
+		}
+
+		.btn {
+			background-color: #1684fc;
+			color: #ffffff;
+			border-radius: 8rpx;
+			margin: 4rpx 24rpx 24rpx 24rpx;
+			height: 64rpx;
+			justify-content: center;
+			align-items: center;
+		}
+
+		input {
+			margin: 48rpx 24rpx 0 24rpx;
+			height: 64rpx;
+			border: 1px solid #888888;
+			text-align: center;
+		}
+	}
+</style>

+ 50 - 50
pages/queryLotInfo/index.vue

@@ -191,7 +191,7 @@
 				<view class="item-info uni-row"> <text class="label">检查员:</text>
 					<text class="label right ">{{ item['nickName'] }}</text>
 				</view>
-				<view v-for="(info, index) in item.processInspectionDetails" :key="index">
+				<view v-if="item.processInspectionDetails && item.processInspectionDetails.length>0" v-for="(info, index) in item.processInspectionDetails" :key="index">
 					<view class="item-info uni-row">
 						<text class="label">检测项目:</text>
 						<text class="label right">{{ info['checkStandard']}}</text>
@@ -206,7 +206,7 @@
 					</view>
 				</view>
 				<!-- 拍照上传部分 -->
-						<view class="item-info uni-row">
+						<view v-if="item.processInspectionPictureList && item.processInspectionPictureList.length>0" class="item-info uni-row">
 							<text class="label">拍照上传:</text>
 							<text class=" label right" >
 							<uni-file-picker v-model="item.processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files" ></uni-file-picker>
@@ -400,54 +400,54 @@
 	//扫码
 	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);
-					let vehicleObj = {
-						carrierCode: ret.resp_result
-					};
-					if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
-						uni.showToast({
-							icon: "none",
-							title: "请扫载具码",
-							duration: 1000
-						})
-						return;
-					}
-					getDayworkCarrierByCarrierCode({
-						carrierCode: vehicleObj.carrierCode,
-					}).then(response => {
-						if (response.code == 200) {
-							if (response.data.length > 0) {
-								if (response.data.length > 1) {
-									selectLotDialog.value.open(response.data);
-								} else {
-									handleDoIt(response.data[0])
-								}
-							} else {
-								uni.showToast({
-									icon: 'none',
-									title: "该箱未绑定批次,请重新扫码",
-									duration: 2000
-								})
-							}
-						}
-					})
-				}
-			);
-		} else {
+		// 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;
+		// 			}
+		// 			getDayworkCarrierByCarrierCode({
+		// 				carrierCode: vehicleObj.carrierCode,
+		// 			}).then(response => {
+		// 				if (response.code == 200) {
+		// 					if (response.data.length > 0) {
+		// 						if (response.data.length > 1) {
+		// 							selectLotDialog.value.open(response.data);
+		// 						} else {
+		// 							handleDoIt(response.data[0])
+		// 						}
+		// 					} else {
+		// 						uni.showToast({
+		// 							icon: 'none',
+		// 							title: "该箱未绑定批次,请重新扫码",
+		// 							duration: 2000
+		// 						})
+		// 					}
+		// 				}
+		// 			})
+		// 		}
+		// 	);
+		// } else {
 			// 测试时用
 			getDayworkCarrierByCarrierCode({
-				carrierCode: '000581'
+				carrierCode: '000605'
 			}).then(res => {
 				if (res.code == 200) {
 					if (res.data.length > 0) {
@@ -465,7 +465,7 @@
 					}
 				}
 			})
-		}
+		// }
 	}
 
 	function handleDoIt(data) {
@@ -513,7 +513,7 @@
 		}).then(response => {
 			if (response.code == 200) {
 				response.data.forEach(item =>{
-					if(item.processInspectionPictureList.length>0){
+					if(item.processInspectionPictureList && item.processInspectionPictureList.length>0){
 						item.processInspectionPictureList.forEach(i=>{
 							i.url = webHost.value + i.url
 						})

+ 8 - 6
pages/sortBatchReporting/index.vue

@@ -706,15 +706,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
+					icon: "none",
+					title: res.msg,
+					duration: 2000
 				})
 			}
+			
 		})
 	}
 

+ 1 - 0
store/index.js

@@ -16,6 +16,7 @@ export const store = reactive({
 	processInspection: null,
 	outsourcedCode: null,
 	takeStockDetails:null,
+	isReviewer:false,
 
 	itemStatus: {
 		/**