guoyujia 8 달 전
부모
커밋
24b79da86f

+ 7 - 0
api/business/processInspection.js

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

+ 6 - 1
components/dialog-inspectionChamber/dialog-inspectionChamber.vue

@@ -31,6 +31,7 @@
 	const baseDialog = ref(null)
 	const inspectionChamberList = ref([])
 	const inspectionChamber = ref(null)
+	const inspectionChamberId = ref(0)
 	const emit = defineEmits(['handleSelectInspectionChamber'])
 
 	onLoad(() => {
@@ -58,6 +59,10 @@
 	}
 
 	function init() {
+		if(store.processInspection != null && store.processInspection.inspectionChamberId != 0) {
+			inspectionChamberId.value = store.processInspection.inspectionChamberId
+		}
+		
 		handleGetInspectionChamberList();
 	}
 
@@ -74,7 +79,7 @@
 	// }
 
 	function handleGetInspectionChamberList() {
-		getInspectionChamber().then(res => {
+		getInspectionChamber({id:inspectionChamberId.value}).then(res => {
 			if(res.rows.length >0) {
 				  inspectionChamberList.value = res.rows.map(info => {
 		    return { value: info.id, text: info.chamberName };

+ 3 - 1
pages/deliveryExamine/index.vue

@@ -140,7 +140,9 @@
 	}
 
 	//时间筛选,暂时注释,使用搜索向
-	function timeSizer() {}
+	function timeSizer() {
+		getList()
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {

+ 91 - 31
pages/deliveryInspection/index.vue

@@ -6,13 +6,20 @@
 			<!-- <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="handleAddDeliveryInspection">新增交检</view>
+			<view class="scan-btn " style="background-color: #aaaaff;min-height: 80rpx;margin-left: 24rpx;" @click.stop="handleScan">扫码</view>
 		</view>
-
-		<view class="scan-btn uni-row" style="min-height: 80rpx;" @click.stop="handleAddDeliveryInspection">新增交检</view>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -78,7 +85,8 @@
 	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 showPicker = ref(false)
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -122,9 +130,18 @@
 			title: '加载中'
 		});
 		quer.value.startTime = startTime.value;
+		quer.value.endTime = endTime.value;
 		quer.value.deptId = store.curDeptDetails.deptId
 		quer.value.type = "deliveryInspection"
-		getProcessInspecionList(quer.value).then(res => {
+		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;
@@ -132,7 +149,53 @@
 				uni.hideLoading();
 			}
 		});
+		}	
 	}
+	//扫码
+	function handleScan() {
+		// 引入原生插件
+		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){
+		let date1 = new Date(startTime.value);
+		let date2 = new Date(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) {
@@ -188,7 +251,19 @@
 	}
 
 	//时间筛选,暂时注释,使用搜索向
-	function timeSizer() {}
+	function timeSizer() {
+		if(!checkTime(startTime.value,endTime.value)) {
+			console.log("777")
+			uni.showToast({
+				icon: 'none',
+				title: "开始日期不能大于结束日期",
+				duration:2000
+			})
+		}else{
+			getList()	
+		}
+		
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {
@@ -259,40 +334,25 @@
 </script>
 
 <style lang="scss">
+
 	.time-controls {
 		.title {
 			margin: 20% auto 40% auto;
-
-			.first {
-				font-size: 48rpx;
-				margin: 0 auto;
-			}
-
-			.second {
-				color: red;
-				font-size: 24rpx;
-				margin: 10rpx auto 0 auto;
-			}
 		}
 
 		.sta {
-			justify-content: center;
-			align-items: center;
+			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 {
@@ -329,12 +389,12 @@
 
 	.scan-btn {
 		height: 64rpx;
-		margin: 32rpx 32rpx 0 32rpx;
 		color: #ffffff;
 		background-color: #f47c3c;
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
+		flex:1;
 	}
 
 	.daywork-item {

+ 45 - 4
pages/factoryInspection/index.vue

@@ -11,8 +11,11 @@
 				<input v-model="startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</view>
-
-		<view class="scan-btn uni-row" style="min-height: 80rpx;" @click.stop="handleAddOnSiteInspection">新增出厂检</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>
+		
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -184,9 +187,47 @@
 			}
 		})
 	}
+	//扫码
+	function handleScan() {
+		// 引入原生插件
+		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() {}
+	function timeSizer() {
+		getList()
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {
@@ -327,12 +368,12 @@
 
 	.scan-btn {
 		height: 64rpx;
-		margin: 32rpx 32rpx 0 32rpx;
 		color: #ffffff;
 		background-color: #f47c3c;
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
+		flex:1;
 	}
 
 	.daywork-item {

+ 45 - 3
pages/firstInspection/index.vue

@@ -11,7 +11,11 @@
 				<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="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>
+		
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -189,9 +193,47 @@
 			}
 		})
 	}
+	//扫码
+	function handleScan() {
+		// 引入原生插件
+		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() {}
+	function timeSizer() {
+		getList()
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {
@@ -324,12 +366,12 @@
 
 	.scan-btn {
 		height: 64rpx;
-		margin: 32rpx 32rpx 0 32rpx;
 		color: #ffffff;
 		background-color: #f47c3c;
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
+		flex:1;
 	}
 
 	.daywork-item {

+ 29 - 2
pages/inspectionDetails/index.vue

@@ -11,6 +11,12 @@
 				<input v-model="startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</view>
+		<view style="display: flex; flex-direction: row; align-items: center; margin-top: 10rpx;">
+		  <uni-section title="检查状态:" type="square" class="uni-row sta" style="flex: 1;">
+		    <uni-data-select v-model="quer.status" :localdata="statusData" :clear="true" placeholder="请选择检查状态"
+		      @change="handleChangeStatus" style="background-color: #ffffff; flex: 1;width: 100%;"></uni-data-select>
+		  </uni-section>
+		</view>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -70,7 +76,6 @@
 	const inspecionList = ref([]); //时间后筛选数组
 	const original = ref([]); //原始数组
 	const startTime = ref(new Date().toISOString().split("T")[0])
-
 	const range = [{
 		value: 0,
 		text: "待确认",
@@ -84,6 +89,20 @@
 		text: "不合格",
 		type: "color: #ff0c2c"
 	}]
+	const statusData = ref([
+		{
+			value:0,
+			text:"待确认"
+		},
+		{
+			value:1,
+			text:"合格"
+		},
+		{
+			value:2,
+			text:"不合格"
+		},
+	])
 
 	const quer = ref({}) //用于查询
 
@@ -139,9 +158,14 @@
 			}
 		});
 	}
+	function handleChangeStatus() {
+		getList()
+	}
 
 	//时间筛选,暂时注释,使用搜索向
-	function timeSizer() {}
+	function timeSizer() {
+		getList()
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {
@@ -195,6 +219,9 @@
 </script>
 
 <style lang="scss">
+	.uni-section-content {
+		width: 70%;
+	}
 	.time-controls {
 		.title {
 			margin: 20% auto 40% auto;

+ 43 - 2
pages/instrumentRoomInspection/form.vue

@@ -120,13 +120,15 @@
 
 			<view v-if="editable()" class="btns-container uni-row">
 				<view  class="finished-btn" @click="endWork">提交</view>
+				<view  class="finished-btn" style="margin-left: 12rpx;background-color: #0055ff;"  @click="handleToOtherChamber">移交其他仪器室</view>
 				<view  class="question-btn uni-column" @click.stop="handleAddConsultation">
 					<uni-icons type="headphones" size="24" />
 					<text>咨询</text>
 				</view>
 			</view>
-
 		</view>
+		<dialog-inspectionChamber ref='selectInspectionChamber'
+			@handleSelectInspectionChamber='handleSelectInspectionChamber'></dialog-inspectionChamber>
 	</view>
 </template>
 
@@ -148,7 +150,8 @@
 	} from '@/store/index.js'
 	import {
 		saveInstrumentRoomInspection,
-		selectInspecion
+		selectInspecion,
+		updateChamberId
 	} from '@/api/business/processInspection.js'
 	import {
 		getInspectionStandardsList
@@ -159,6 +162,7 @@
 	const unfitInfos = ref([]) //废品信息
 	const consultations = ref([]) //咨询信息
 	const flag = ref(false)
+	const selectInspectionChamber = ref(null)
 	// 创建一个引用来存储最后一次请求的时间戳
 	const lastRequestTimestamp = ref(0);
 	const processInspecion = ref({
@@ -511,6 +515,43 @@ function handleDeletedPhoto(e) {
 			url: navigateUrl
 		});
 
+	}
+	//移交其他仪器室
+	function handleToOtherChamber() {
+		//打开选择仪器室的弹窗
+		selectInspectionChamber.value.open()
+	}
+	//选择带回
+	function handleSelectInspectionChamber(data) {
+		processInspecion.value.inspectionChamberId = data
+		//修改仪器室
+		updateChamberId(processInspecion.value).then(res =>{
+			if(res.code == 200) {
+				store.processInspection = null
+				uni.showToast({
+					icon: 'none',
+					title: "修改成功",
+					duration: 2000
+				})
+				let index = 0;
+				let pages = getCurrentPages();
+				for (let i = 0; i < pages.length; i++) {
+				
+					if (pages[i].$page.fullPath == "/pages/instrumentRoomInspection/index") {
+				
+						index = pages.length - i - 1;
+					}
+				}
+				console.log(index)
+				uni.navigateBack({
+					delta: index
+				});
+			}
+		})
+		console.log(processInspecion.value)
+		
+	
+		
 	}
 	// 删除不合格信息
 	const handleDelWaste = (index) => {

+ 43 - 3
pages/instrumentRoomInspection/index.vue

@@ -11,6 +11,9 @@
 				<input v-model="startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</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>
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -198,9 +201,47 @@
 			}
 		})
 	}
+	//扫码
+	function handleScan() {
+		// 引入原生插件
+		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() {}
+	function timeSizer() {
+		getList()
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {
@@ -331,15 +372,14 @@
 			align-items: center;
 		}
 	}
-
 	.scan-btn {
 		height: 64rpx;
-		margin: 32rpx 32rpx 0 32rpx;
 		color: #ffffff;
 		background-color: #f47c3c;
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
+		flex:1;
 	}
 
 	.daywork-item {

+ 47 - 5
pages/onSiteInspection/index.vue

@@ -11,9 +11,12 @@
 				<input v-model="startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</view>
-
-		<view class="scan-btn uni-row" style="min-height: 80rpx;" @click.stop="handleAddOnSiteInspection">新增巡检</view>
-		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
+		<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>
+		
+		<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>
@@ -54,6 +57,7 @@
 
 <script setup>
 	import {
+		nextTick,
 		ref
 	} from 'vue'
 	import {
@@ -188,9 +192,47 @@
 			}
 		})
 	}
+	//扫码
+	function handleScan() {
+		// 引入原生插件
+		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() {}
+	function timeSizer() {
+		getList()
+	}
 
 	// 筛选函数
 	const filterSameDayItems = (inspectionList, startTime) => {
@@ -331,12 +373,12 @@
 
 	.scan-btn {
 		height: 64rpx;
-		margin: 32rpx 32rpx 0 32rpx;
 		color: #ffffff;
 		background-color: #f47c3c;
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
+		flex:1;
 	}
 
 	.daywork-item {

+ 42 - 3
pages/outsourcedInspection/index.vue

@@ -11,9 +11,12 @@
 				<input v-model="startTime" type="date" @input="timeSizer" />
 			</uni-section>
 		</view>
-
-		<view class="scan-btn uni-row" style="min-height: 80rpx;" @click.stop="handleAddOutsourcedInspection">新增外协检查
+	<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>
+		
 		<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
 			@click="handleSelection(item)">
 			<view class="lot-code uni-row">
@@ -158,6 +161,42 @@
 			}
 		})
 	}
+	//扫码
+	function handleScan() {
+		// 引入原生插件
+		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() {
@@ -371,12 +410,12 @@
 
 	.scan-btn {
 		height: 64rpx;
-		margin: 32rpx 32rpx 0 32rpx;
 		color: #ffffff;
 		background-color: #f47c3c;
 		align-items: center;
 		justify-content: center;
 		border-radius: 8rpx;
+		flex:1;
 	}
 
 	.daywork-item {

+ 7 - 6
pages/sorting/form.vue

@@ -289,7 +289,7 @@
 			deptId:dayworkItem.value.deptId,
 			productId:dayworkItem.value.daywork.productId,
 			drawingNumber:dayworkItem.value.drawingNumber,
-			technologyVersion:dayworkItem.value.technologicalProcessDetail.technologyVersion,
+			technologyVersion:dayworkItem.value.technologyVersion,
 			retrievalLotId:dayworkItem.value.lotId,
 			hasAddedList : retrievalInfo.value
 		}
@@ -381,8 +381,8 @@ uni.navigateTo({
 					query: {
 						productId: dayworkItem.value.daywork.productId,
 						processId: dayworkItem.value.process.id,
-						technologyVersion: dayworkItem.value.technologicalProcessDetail
-							.technologyVersion
+						// technologyVersion: dayworkItem.value.technologicalProcessDetail.technologyVersion
+						technologyVersion: dayworkItem.value.technologyVersion
 					},
 					index: unfitInfos.value.length
 				})
@@ -492,7 +492,8 @@ uni.navigateTo({
 	}
 
 	const validHandle = () => {
-		if(storageNum.value != null && storageNum.value<=0) {
+		console.log(storageNum.value == "")
+		if(storageNum.value != null &&storageNum.value != "" && storageNum.value<=0) {
 			uni.showToast({
 				icon: 'none',
 				title: "存入数量应大于0",
@@ -576,7 +577,7 @@ async function handleCheckStock() {
 				lotCode:dayworkItem.value.lotCode,
 				deptId:dayworkItem.value.deptId,
 				productId:dayworkItem.value.daywork.productId,
-				technologyVersion:dayworkItem.value.technologicalProcessDetail.technologyVersion,
+				technologyVersion:dayworkItem.value.technologyVersion,
 				storageNum:storageNum.value,
 				storagerId:store.userInfo.userId,	
 			}
@@ -646,7 +647,7 @@ async function handleCheckStock() {
 				lotCode:dayworkItem.value.lotCode,
 				deptId:dayworkItem.value.deptId,
 				productId:dayworkItem.value.daywork.productId,
-				technologyVersion:dayworkItem.value.technologicalProcessDetail.technologyVersion,
+				technologyVersion:dayworkItem.value.technologyVersion,
 				storageNum:storageNum.value,
 				storagerId:store.userInfo.userId,	
 			}