guoyujia 8 mēneši atpakaļ
vecāks
revīzija
85320e27ef

+ 32 - 1
pages/deliveryExamine/form.vue

@@ -85,7 +85,16 @@
 			</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -166,7 +175,16 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
 	const initStatus = ref(0)
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const editable = () => {
 		return false
 	}
@@ -215,6 +233,10 @@
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
 					consultations.value = res.data.dayworkItemConsults;
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {
+					  return { ...item, url: webHost.value + item.url };
+					});
 					console.log("res", res);
 					console.log(processInspecion.value)
 					uni.hideLoading();
@@ -594,4 +616,13 @@
 			}
 		}
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 61 - 2
pages/deliveryInspection/form.vue

@@ -88,7 +88,16 @@
 			</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="!editable()"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -171,6 +180,7 @@
 	import {
 		getInspectionStandardsList
 	} from '@/api/business/inspectionStandards.js'
+	import {getURL} from '@/api/sys/user.js'
 	const lot = ref({})
 	const isEventTriggered = ref(false); // 创建一个标志位
 	const unfitInfos = ref([]) //废品信息
@@ -186,6 +196,15 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const initStatus = ref(0)
 	const editable = () => {
 		// if (store.userInfo.permissions.some(item => item === 'business:outsourcedInspection:edit')) {
@@ -245,7 +264,7 @@
 
 	}
 
-	onShow(() => {
+	onLoad(() => {
 		uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)
@@ -263,6 +282,10 @@
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
 					consultations.value = res.data.dayworkItemConsults;
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {  
+					  return { ...item, url: webHost.value + item.url };
+					});
 					console.log("res", res);
 					console.log(processInspecion.value)
 					//是否已经移交仪器室
@@ -310,6 +333,32 @@
 			}
 		}
 	} 
+	function upLoadImageHandler(arg) {
+		console.log(arg)
+		getURL(arg).then(res =>{
+			let data = JSON.parse(res)
+						   selectedPhotos.value.push({
+							   url:data.fileName,
+							   pictureName:data.originalFilename
+						   })
+						   console.log(selectedPhotos.value)
+						   })
+	}
+	function select (e) {
+		console.log(e)
+		const {
+			tempFilePaths,
+			tempFiles
+		} = e	
+		tempFiles.forEach((item,index)=>{
+			upLoadImageHandler({ filePath: tempFilePaths[index],name:item.name})
+		})
+	}
+	function handleDeletedPhoto(e) {
+		let fileName = selectedPhotos.value.map(info => info.name)
+			let index = fileName.findIndex(name => name === e.tempFile.name);
+			selectedPhotos.value.splice(index,1)
+	}
 	function handleDrawingMenu(){
 		  // 对 technologicalProcessDetailId 进行URL编码
 		  var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
@@ -432,6 +481,7 @@
 		processInspecion.value.user = store.userInfo;
 		processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
 		processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
+		processInspecion.value.processInspectionPictureList = selectedPhotos.value
 		console.log(processInspecion.value)
 		if(processInspecion.value.flag) {
 			//打开选择仪器室的弹窗
@@ -836,5 +886,14 @@ input:disabled {
     background-color: #aaaaff !important;
     color: #ccc !important; /* 假设您想要设置文本颜色 */
 }
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 
 </style>

+ 60 - 3
pages/factoryInspection/form.vue

@@ -80,7 +80,16 @@
 			</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="!editable()"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -144,7 +153,7 @@
 	import {
 		getInspectionStandardsList
 	} from '@/api/business/inspectionStandards.js'
-
+	import {getURL} from '@/api/sys/user.js'
 	const lot = ref({})
 	const isEventTriggered = ref(false); // 创建一个标志位
 	const unfitInfos = ref([]) //废品信息
@@ -158,6 +167,15 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const initStatus = ref(0)
 	const editable = () => {
 	if(store.userInfo.roles.some(item =>item.roleKey == 'factoryInspection')) {
@@ -210,7 +228,7 @@
 		})
 
 	}
-	onShow(() => {
+	onLoad(() => {
 		uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)
@@ -228,6 +246,10 @@
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
 					consultations.value = res.data.dayworkItemConsults;
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {  
+					  return { ...item, url: webHost.value + item.url };
+					});
 					console.log("res", res);
 					console.log(processInspecion.value)
 					uni.hideLoading();
@@ -255,6 +277,31 @@
 			}
 		}
 	} 
+	function upLoadImageHandler(arg) {
+		getURL(arg).then(res =>{
+			let data = JSON.parse(res)
+						   selectedPhotos.value.push({
+							   url:data.fileName,
+							   pictureName:data.originalFilename
+						   })
+						   console.log(selectedPhotos.value)
+						   })
+	}
+	function select (e) {
+		console.log(e)
+		const {
+			tempFilePaths,
+			tempFiles
+		} = e	
+		tempFiles.forEach((item,index)=>{
+			upLoadImageHandler({ filePath: tempFilePaths[index],name:item.name})
+		})
+	}
+	function handleDeletedPhoto(e) {
+		let fileName = selectedPhotos.value.map(info => info.name)
+			let index = fileName.findIndex(name => name === e.tempFile.name);
+			selectedPhotos.value.splice(index,1)
+	}
 	function handleDrawingMenu(){
 		  // 对 technologicalProcessDetailId 进行URL编码
 		  var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
@@ -378,6 +425,7 @@
 		processInspecion.value.reviewerId = store.userInfo.userId
 		processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
 		processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
+		processInspecion.value.processInspectionPictureList = selectedPhotos.value
 		console.log(processInspecion.value)
 		saveFactoryInspecion(processInspecion.value).then(res => {
 			if (res.code == 200) {
@@ -746,4 +794,13 @@
 			}
 		}
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 60 - 2
pages/firstInspection/form.vue

@@ -88,7 +88,16 @@
 	</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="!editable()"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view v-if="editable()" class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -166,6 +175,7 @@
 	import {
 		getInspectionStandardsList
 	} from '@/api/business/inspectionStandards.js'
+	import {getURL} from '@/api/sys/user.js'
 	const lot = ref({})
 	const isEventTriggered = ref(false); // 创建一个标志位
 	const unfitInfos = ref([]) //废品信息
@@ -181,6 +191,15 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const initStatus = ref(0)
 	const editable = () => {
 		if (initStatus.value == 0 && store.userInfo.roles.some(item => item.roleKey == 'firstArticleInspection')) {
@@ -236,7 +255,7 @@
 
 	}
 
-	onShow(() => {
+	onLoad(() => {
 		uni.$off('addWasteInfoEvent');
 		if(!flag.value){
 		if (store.processInspection != null) {
@@ -250,6 +269,10 @@
 					processInspecion.value.flag = false
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {  
+					  return { ...item, url: webHost.value + item.url };
+					});
 					consultations.value = res.data.dayworkItemConsults;
 					console.log("res", res);
 					console.log(processInspecion.value)
@@ -313,6 +336,31 @@
 			}
 		}
 	} 
+	function upLoadImageHandler(arg) {
+		getURL(arg).then(res =>{
+			let data = JSON.parse(res)
+						   selectedPhotos.value.push({
+							   url:data.fileName,
+							   pictureName:data.originalFilename
+						   })
+						   console.log(selectedPhotos.value)
+						   })
+	}
+	function select (e) {
+		console.log(e)
+		const {
+			tempFilePaths,
+			tempFiles
+		} = e	
+		tempFiles.forEach((item,index)=>{
+			upLoadImageHandler({ filePath: tempFilePaths[index],name:item.name})
+		})
+	}
+	function handleDeletedPhoto(e) {
+		let fileName = selectedPhotos.value.map(info => info.name)
+			let index = fileName.findIndex(name => name === e.tempFile.name);
+			selectedPhotos.value.splice(index,1)
+	}
 	function handleDrawingMenu(){
 		  // 对 technologicalProcessDetailId 进行URL编码
 		  var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
@@ -420,6 +468,7 @@
 		processInspecion.value.user = store.userInfo;
 		processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
 		processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
+		processInspecion.value.processInspectionPictureList = selectedPhotos.value
 		console.log(processInspecion.value)
 		if(processInspecion.value.flag) {
 			//打开选择仪器室的弹窗
@@ -829,4 +878,13 @@
 		}
 	}
 	input:disabled {background-color: #00ff00;}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 59 - 1
pages/firstInspection/instrumentRoomForm.vue

@@ -79,7 +79,16 @@
 			</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="!editable()"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -146,6 +155,7 @@
 	import {
 		getInspectionStandardsList
 	} from '@/api/business/inspectionStandards.js'
+	import {getURL} from '@/api/sys/user.js'
 	const lot = ref({})
 	const isEventTriggered = ref(false); // 创建一个标志位
 	const unfitInfos = ref([]) //废品信息
@@ -161,6 +171,15 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const initStatus = ref(0)
 	const editable = () => {
       if (store.userInfo.roles.some(item => item.roleKey == 'firstArticleInspection')) {
@@ -230,6 +249,10 @@
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
 					consultations.value = res.data.dayworkItemConsults;
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {  
+					  return { ...item, url: webHost.value + item.url };
+					});
 					console.log("res", res);
 					console.log(processInspecion.value)
 					//判断是否移交到了仪器室
@@ -285,6 +308,31 @@
 			}
 		}
 	} 
+	function upLoadImageHandler(arg) {
+		getURL(arg).then(res =>{
+			let data = JSON.parse(res)
+						   selectedPhotos.value.push({
+							   url:data.fileName,
+							   pictureName:data.originalFilename
+						   })
+						   console.log(selectedPhotos.value)
+						   })
+	}
+	function select (e) {
+		console.log(e)
+		const {
+			tempFilePaths,
+			tempFiles
+		} = e	
+		tempFiles.forEach((item,index)=>{
+			upLoadImageHandler({ filePath: tempFilePaths[index],name:item.name})
+		})
+	}
+	function handleDeletedPhoto(e) {
+		let fileName = selectedPhotos.value.map(info => info.name)
+			let index = fileName.findIndex(name => name === e.tempFile.name);
+			selectedPhotos.value.splice(index,1)
+	}
 	function handleDrawingMenu(){
 		  // 对 technologicalProcessDetailId 进行URL编码
 		  var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
@@ -391,6 +439,7 @@
 		processInspecion.value.inspectionChamberId = processInspecion.value.lot.inspectionChamberId
 		processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
 		processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
+		processInspecion.value.processInspectionPictureList = selectedPhotos.value
 		console.log(processInspecion.value)
 		saveFirstInstrumentRoomInspection(processInspecion.value).then(res => {
 			if (res.code == 200) {
@@ -792,4 +841,13 @@
 	.uni-input-input:disabled {
 	    background-color: #f5f7fa;
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 32 - 1
pages/inspectionDetails/form.vue

@@ -76,7 +76,16 @@
 			</view>
 			</view>
 		</view>
-
+		<!-- 拍照上传部分 -->
+				<view class="title unfit-title uni-row">
+					<text>拍照上传</text>
+				</view>
+				<view class=" uni-row" style="padding: 24rpx;
+				margin: 0 16rpx;
+				background-color: #ffffff;
+				border-radius: 12rpx;">
+				<uni-file-picker v-model="photoList" :readonly="true"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+				</view>
 		<!-- 咨询部分 -->
 		<view class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -145,7 +154,16 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
 	const initStatus = ref(0)
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const editable = () => {
 		return false
 	}
@@ -194,6 +212,10 @@
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
 					consultations.value = res.data.dayworkItemConsults;
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {  
+					  return { ...item, url: webHost.value + item.url };
+					});
 					console.log("res", res);
 					console.log(processInspecion.value)
 					uni.hideLoading();
@@ -528,4 +550,13 @@
 			}
 		}
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 60 - 2
pages/instrumentRoomInspection/form.vue

@@ -79,7 +79,16 @@
 			</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="!editable()"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view class="title unfit-title uni-row">
 			<text>咨询</text>
@@ -144,6 +153,7 @@
 	import {
 		getInspectionStandardsList
 	} from '@/api/business/inspectionStandards.js'
+	import {getURL} from '@/api/sys/user.js'
 	const lot = ref({})
 	const isEventTriggered = ref(false); // 创建一个标志位
 	const unfitInfos = ref([]) //废品信息
@@ -158,6 +168,15 @@
 		status: 0,
 	})
 	const initStatus = ref(0)
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const editable = () => {
 		// if (store.userInfo.permissions.some(item => item === 'business:outsourcedInspection:edit')) {
 		// 	return true
@@ -201,7 +220,7 @@
 
 	/***************************** 页面生命周期函数 *****************************/
 
-	onShow(() => {
+	onLoad(() => {
 		uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)
@@ -217,6 +236,10 @@
 					processInspecion.value.flag = false
 					unfitInfos.value = res.data.processInspectionDetails;
 					initStatus.value = res.data.status
+					selectedPhotos.value = res.data.processInspectionPictureList
+					photoList.value = res.data.processInspectionPictureList.map(item => {  
+					  return { ...item, url: webHost.value + item.url };
+					});
 					consultations.value = res.data.dayworkItemConsults;
 					console.log("res", res);
 					console.log(processInspecion.value)
@@ -260,6 +283,31 @@
 			}
 		}
 	} 
+	function upLoadImageHandler(arg) {
+		getURL(arg).then(res =>{
+			let data = JSON.parse(res)
+						   selectedPhotos.value.push({
+							   url:data.fileName,
+							   pictureName:data.originalFilename
+						   })
+						   console.log(selectedPhotos.value)
+						   })
+	}
+	function select (e) {
+		console.log(e)
+		const {
+			tempFilePaths,
+			tempFiles
+		} = e	
+		tempFiles.forEach((item,index)=>{
+			upLoadImageHandler({ filePath: tempFilePaths[index],name:item.name})
+		})
+	}
+	function handleDeletedPhoto(e) {
+		let fileName = selectedPhotos.value.map(info => info.name)
+			let index = fileName.findIndex(name => name === e.tempFile.name);
+			selectedPhotos.value.splice(index,1)
+	}
 	function handleDrawingMenu(){
 		  // 对 technologicalProcessDetailId 进行URL编码
 		  var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
@@ -366,6 +414,7 @@
 		processInspecion.value.user = store.userInfo;
 		processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
 		processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
+		processInspecion.value.processInspectionPictureList = selectedPhotos.value
 		console.log(processInspecion.value)
 		saveInstrumentRoomInspection(processInspecion.value).then(res => {
 			if (res.code == 200) {
@@ -731,4 +780,13 @@
 			}
 		}
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 1 - 1
pages/onSiteInspection/form.vue

@@ -281,7 +281,7 @@
 			selectedPhotos.value.splice(index,1)
 	}
 
-	onShow(() => {
+	onLoad(() => {
 		 uni.$off('addWasteInfoEvent');
 		console.log(store.processInspection)
 		console.log(flag.value)

+ 60 - 3
pages/outsourcedInspection/form.vue

@@ -118,7 +118,16 @@
 				</view>
 			</view>
 		</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="photoList" :readonly="!editable()"   return-type="array" :image-styles="imageStyles" @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto" ></uni-file-picker>
+		</view>
 		<!-- 咨询部分 -->
 		<view class="title">咨询</view>
 		<view class="consultation-container uni-column">
@@ -211,6 +220,7 @@
 		getInstrumentRoomInspection,
 		selectOutsourcedInspecion
 	} from '@/api/business/processInspection.js'
+	import {getURL} from '@/api/sys/user.js'
 	const lot = ref({})
 	const unfitInfos = ref([]) //废品信息
 	const oldUnfitInfos = ref([])
@@ -227,6 +237,15 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const photoList = ref([])
+	const selected = ref([]);
+	const selectedPhotos = ref([])
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 	const initStatus = ref(0)
 	const editable = () => {
 		if (processInspecion.value.auditStatus == 1) {
@@ -287,7 +306,7 @@
 
 	})
 
-	onShow(() => {
+	onLoad(() => {
 		uni.$off('addWasteInfoEvent');
 		if (!flag.value) {
 			if (store.processInspection != null) {
@@ -303,6 +322,10 @@
 						unfitInfos.value = res.data.rejects;
 						oldUnfitInfos.value = res.data.oldRejects;
 						consultations.value = res.data.dayworkItemConsults;
+						selectedPhotos.value = res.data.processInspectionPictureList
+						photoList.value = res.data.processInspectionPictureList.map(item => {  
+						  return { ...item, url: webHost.value + item.url };
+						});
 						console.log("res", res);
 						//判断是否移交到了仪器室
 						getInstrumentRoomInspectionList()
@@ -329,7 +352,31 @@
 			}
 		}
 	}
-
+function upLoadImageHandler(arg) {
+		getURL(arg).then(res =>{
+			let data = JSON.parse(res)
+						   selectedPhotos.value.push({
+							   url:data.fileName,
+							   pictureName:data.originalFilename
+						   })
+						   console.log(selectedPhotos.value)
+						   })
+	}
+	function select (e) {
+		console.log(e)
+		const {
+			tempFilePaths,
+			tempFiles
+		} = e	
+		tempFiles.forEach((item,index)=>{
+			upLoadImageHandler({ filePath: tempFilePaths[index],name:item.name})
+		})
+	}
+	function handleDeletedPhoto(e) {
+		let fileName = selectedPhotos.value.map(info => info.name)
+			let index = fileName.findIndex(name => name === e.tempFile.name);
+			selectedPhotos.value.splice(index,1)
+	}
 
 	//打开电子图纸
 	function handleDrawingMenu() {
@@ -505,6 +552,7 @@
 		processInspecion.value.dayworkItemConsults = consultations.value;
 		processInspecion.value.dayworkItemRejects = unfitInfos.value;
 		processInspecion.value.user = store.userInfo;
+		processInspecion.value.processInspectionPictureList = selectedPhotos.value
 		if (processInspecion.value.flag) {
 			//打开选择仪器室的弹窗
 			selectInspectionChamber.value.open()
@@ -952,4 +1000,13 @@
 	.uni-input-input:disabled {
 		background-color: #f5f7fa;
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>

+ 4 - 4
pages/outsourcedInspection/scan.vue

@@ -23,7 +23,7 @@
 				<view class="value">{{ lot.allCarrierName }}</view>
 			</view>
 			<view class="info-row uni-row">
-				<view class="label">检箱号</view>
+				<view class="label">检箱号</view>
 				<view class="value">{{ lot.inspectionCarrierCode }}</view>
 			</view>
 			<!-- <input type="text" v-model="carrierCode" placeholder="请输入箱号或检查载具号" /> -->
@@ -170,7 +170,7 @@
 			)
 		} else {
 			const result = {
-				carrierCode: '000657',
+				carrierCode: '000381',
 				processCode: store.outsourcedCode
 			}
 			getCarrierInfo(result).then(response => {
@@ -198,8 +198,8 @@
 									};
 									lot.value.carrierCode = result.carrierCode
 									carrierCode.value = result.carrierCode;
-									lot.value.inspectionCarrierId = '1803605009575755783'
-									lot.value.inspectionCarrierCode = "300085"
+									lot.value.inspectionCarrierId = '1803605009546395650'
+									lot.value.inspectionCarrierCode = "300039"
 									// console.log("res", res);
 									uni.hideLoading();
 									// 判断是否批次号和检查箱码都扫完

+ 81 - 6
pages/processInspectionReceive/form.vue

@@ -105,7 +105,16 @@
 					</view>
 				</view>
 			</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 			<!-- 咨询部分 -->
 			<view class="title unfit-title uni-row">
 				<text>咨询</text>
@@ -241,7 +250,16 @@
 					</view>
 				</view>
 			</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 			<!-- 咨询部分 -->
 			<view class="title unfit-title uni-row">
 				<text>咨询</text>
@@ -377,7 +395,16 @@
 					</view>
 				</view>
 			</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 			<!-- 咨询部分 -->
 			<view class="title unfit-title uni-row">
 				<text>咨询</text>
@@ -505,7 +532,16 @@
 					</view>
 				</view>
 			</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'outsourecdInspector')].processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles" file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 			<!-- 咨询部分 -->
 			<view class="title unfit-title uni-row">
 				<text>咨询</text>
@@ -629,7 +665,16 @@
 					</view>
 				</view>
 			</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 			<!-- 咨询部分 -->
 			<view class="title unfit-title uni-row">
 				<text>咨询</text>
@@ -765,7 +810,16 @@
 					</view>
 				</view>
 			</view>
-
+<!-- 拍照上传部分 -->
+		<view class="title unfit-title uni-row">
+			<text>拍照上传</text>
+		</view>
+		<view class=" uni-row" style="padding: 24rpx;
+		margin: 0 16rpx;
+		background-color: #ffffff;
+		border-radius: 12rpx;">
+		<uni-file-picker v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].processInspectionPictureList" :readonly="true"   return-type="array" :image-styles="imageStyles"  file-mediatype="image" class="my-files"  ></uni-file-picker>
+		</view>
 			<!-- 咨询部分 -->
 			<view class="title unfit-title uni-row">
 				<text>咨询</text>
@@ -841,6 +895,8 @@
 		examiningNum: 0,
 		status: 0,
 	})
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
 	const inspectionList = ref([])
 	const processInspectionTypeList = ref([])
 	const isActived = ref(null)
@@ -849,6 +905,10 @@
 	const editable = () => {
 		return false
 	}
+	const imageStyles = {
+				width:60,
+				height:60
+			}
 
 	const consul = [{
 		value: 0,
@@ -929,6 +989,12 @@
 							};
 						}
 					});
+					res.data.forEach(item =>{
+						item.processInspectionPictureList.forEach(i=>{
+							i.url = webHost.value + i.url
+						})
+					})
+					console.log( res.data)
 					inspectionList.value = res.data
 					isActived.value = processInspectionTypeList.value[0]
 					console.log(processInspectionTypeList.value)
@@ -1335,6 +1401,15 @@
 			color: #FFFFFF;
 			font-size: 28rpx;
 
+		}
+	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
 		}
 	}
 </style>

+ 31 - 1
pages/queryLotInfo/index.vue

@@ -205,6 +205,14 @@
 						<text class="label right">{{ info['rejectNum']}}</text>
 					</view>
 				</view>
+				<!-- 拍照上传部分 -->
+						<view 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>
+							</text>
+						</view>
+						
 				<view v-for="(data, index) in item.dayworkItemConsults" :key="index">
 					<view class="item-info uni-row">
 						<text class="label">咨询信息:</text>
@@ -345,6 +353,12 @@
 	const showRight = ref(null) // 抽屉
 	const dayworkId = ref(null)
 	const isActiveId = ref(1)
+	const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
+	const webHost = ref(urlList.baseUrl)
+	const imageStyles = {
+				width:50,
+				height:50
+			}
 	// 查询主对象
 	let query = null
 	// 定义tab2的【SelectorQuery】对象
@@ -433,7 +447,7 @@
 		} else {
 			// 测试时用
 			getDayworkCarrierByCarrierCode({
-				carrierCode: '000390'
+				carrierCode: '000581'
 			}).then(res => {
 				if (res.code == 200) {
 					if (res.data.length > 0) {
@@ -498,6 +512,13 @@
 			dayworkId: dayworkId.value
 		}).then(response => {
 			if (response.code == 200) {
+				response.data.forEach(item =>{
+					if(item.processInspectionPictureList.length>0){
+						item.processInspectionPictureList.forEach(i=>{
+							i.url = webHost.value + i.url
+						})
+					}
+				})
 				inspectionData.value = response.data
 			}
 		})
@@ -703,4 +724,13 @@
 			background-color: #1684fc;
 		}
 	}
+	.my-files {
+		display: flex;
+		justify-content: center;
+		
+		:deep(.uni-file-picker__container) {
+		flex-direction: row;
+			
+		}
+	}
 </style>