guoyujia 4 months ago
parent
commit
d75263529f

+ 3 - 2
components/dialog-lotReporting/dialog-lotReporting.vue

@@ -4,7 +4,8 @@
 			<!-- <view v-for="(item, index) in lotData" :key="index" class="list-item"> -->
 			<view class="item-info uni-row">
 				<text class="label">批次号</text>
-				<text class="label right">{{ lotData.map(v => v.lotCode).join(",") }}</text>
+				<text class="label right"
+					style="word-wrap: break-word;">{{ lotData.map(v => v.lotCode).join(",") }}</text>
 			</view>
 			<!-- 	<view class="item-info uni-row">
 					<text class="label">生产计划单号</text>
@@ -12,7 +13,7 @@
 				</view> -->
 			<view class="item-info uni-row">
 				<text class="label">产品描述</text>
-				<text class="label right">{{ item['productDescription'] }}</text>
+				<text class="label right" style="word-wrap: break-word;">{{ item['productDescription'] }}</text>
 			</view>
 			<view class="item-info uni-row">
 				<text class="label">箱号</text>

+ 2 - 1
pages/assistDaywork/index.vue

@@ -30,7 +30,7 @@
     right: 0;">
 			<text>暂无批次</text>
 		</view>
-		<view v-else class="uni-column" style="margin-top: 126px;overflow: auto;height: 100%;">
+		<view v-else class="uni-column" style="margin-top: 130px;overflow: auto;height: 100%;">
 
 			<!-- 批次列表 -->
 			<view v-for="(item, index) in listData" :key="index" class="list-item"
@@ -384,6 +384,7 @@
 
 	function init() {
 		listData.value = []
+		status.value = true
 		uni.showLoading({
 			title: '加载中'
 		});

+ 21 - 8
pages/dashboard/index.vue

@@ -2,6 +2,7 @@
 	<view class="page-container uni-column">
 		<view class="logo-container uni-row">
 			<image class="logo" src="../../static/images/logo.png" />
+			<view style="position: absolute; right: 4px;top: 0px;"><text>版本号:{{versionName}}</text></view>
 		</view>
 		<view class="title"><text class="label">德迈仕数字生产线管理平台</text></view>
 		<view class="user-info-container uni-row">
@@ -13,7 +14,7 @@
 				<!-- </view> -->
 			</view>
 		</view>
-		<view class="user-info uni-column" style="margin: 0 20rpx 20rpx 20rpx;width: 94%;">
+		<view class="user-info uni-column" style="margin: 0 20rpx 20rpx 20rpx;width: 94%;z-index: 4;">
 			<uni-section title="当前厂别" type="square">
 				<uni-data-select v-model="curSelectedTenantId" :localdata="tenantList" :clear="false"
 					@change="handleTenantChange"></uni-data-select>
@@ -173,8 +174,15 @@
 	const showOutSourceList = ref(false)
 	const showChangeTurnover = ref(false)
 	const showAssistDaywork = ref(false)
+	const versionName = ref(null)
 
 	onLoad(() => {
+		uni.getSystemInfo({
+			success: function(res) {
+				versionName.value = res.appVersion;
+			}
+		});
+		console.log(versionName.value)
 		console.log(store.userInfo)
 		userInfo.value = store.userInfo || {
 			nickName: ""
@@ -236,7 +244,8 @@
 			showAdjust.value = false
 		}
 		//协助报工
-		if (store.userInfo.roles.some(item => item.roleKey == 'assistDaywork')) {
+		if (store.userInfo.permissions.some(item => item === 'business:assistDaywork:list') || store.userInfo
+			.permissions.some(item => item === "*:*:*")) {
 			showAssistDaywork.value = true
 		} else {
 			showAssistDaywork.value = false
@@ -258,7 +267,6 @@
 			showOutsourcedInspector.value = true
 			// showOther.value = true;
 		}
-		showAuxiliary.value = true
 		init();
 	})
 
@@ -323,9 +331,11 @@
 					console.log(store)
 					handleSelectInnerTurnover()
 				}
-				if (res.data.some(v => v.hasQuick === 1) && (store.userInfo.permissions.some(item => item ===
+				if (res.data.some(v => v.hasQuick === 1) &&
+					(store.userInfo.permissions.some(item => item ===
 							'business:quickDaywork:list') || store.userInfo
-						.permissions.some(item => item === "*:*:*"))) {
+						.permissions.some(item => item === "*:*:*"))
+				) {
 					showQuick.value = true
 				} else {
 					showQuick.value = false
@@ -347,7 +357,8 @@
 			curSelectedDeptId.value = userDeptsByTenantId.value[0].value
 			let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 			store.curDeptDetails = curDept
-			if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey == 'sortingInspector')) {
+			if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
+					'sortingInspector')) {
 				showSizing.value = true
 			} else {
 				showSizing.value = false
@@ -720,7 +731,8 @@
 	function handleDeptChange() {
 		let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
 		store.curDeptDetails = curDept
-		if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey == 'sortingInspector')) {
+		if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
+				'sortingInspector')) {
 			showSizing.value = true
 		} else {
 			showSizing.value = false
@@ -850,7 +862,7 @@
 		justify-content: center;
 		border: 1rpx solid #e1e1e1;
 		border-radius: 8rpx;
-		z-index: 5;
+		z-index: 3;
 
 		.label {
 			font-size: 35rpx;
@@ -862,6 +874,7 @@
 		right: 20rpx;
 		bottom: 0;
 		left: 20rpx;
+		z-index: 3;
 
 		.start-batch-btn {
 			// background-color: grey;

+ 78 - 78
pages/fastProductionPlan/index.vue

@@ -271,90 +271,90 @@
 	*/
 
 	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
-		// 					})
-		// 				}
-		// 			})
-		// 		}
-		// 	);
-		// } else {
-		// 测试时用
-		getDayworkByCarrierCode({
-			carrierCode: '000650',
-			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);
+		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: '000653',
+				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: '该批次不在此计划单内, 或不在当前工段',
+						title: response.msg,
 						duration: 2000
 					})
 				}
-			} else {
-				uni.showToast({
-					icon: 'none',
-					title: response.msg,
-					duration: 2000
-				})
-			}
-		})
-		// }
+			})
+		}
 		// lotReporting.value.open(data);
 	}
 

+ 15 - 3
pages/index/index.vue

@@ -2,8 +2,9 @@
 	<view class="page-container uni-column">
 		<view class="uni-row" style="align-items: center;margin:8rpx 0 16rpx 0">
 			<image class="logo" src="../../static/images/logo.png" @click="handleShowGear" />
-			<uni-icons v-if="showGear > 4" class="icon-gear" type="gear-filled" size="60"
+			<uni-icons v-if="showGear > 4" class="icon-gear" type="gear-filled" size="60" style="z-index: 5;"
 				@click="toggle('top')"></uni-icons>
+			<view style="position: absolute; right: 12px;top: -4px;"><text>版本号:{{versionName}}</text></view>
 		</view>
 		<view class="title uni-row" v-if="loggedUsers.length > 0">
 			<text>点击头像切换用户</text>
@@ -111,12 +112,14 @@
 	const showWrite = ref(0)
 	const inputDialog = ref(null)
 	const showInputDialog = ref(0)
+	const versionName = ref(null)
 
 	onLoad(() => {
 		//uni.clearStorageSync();
 		initBaseUrl();
-		//getUser();
-		!useInnerUrl.value && setTimeout(doCheckUpdata, 500)
+		getCurrentVersion()
+			//getUser();
+			!useInnerUrl.value && setTimeout(doCheckUpdata, 500)
 		initPdfUrl();
 	})
 
@@ -124,6 +127,15 @@
 
 	})
 
+	function getCurrentVersion() {
+		uni.getSystemInfo({
+			success: function(res) {
+				versionName.value = res.appVersion;
+			}
+		});
+		console.log(versionName.value)
+	}
+
 	function doCheckUpdata() {
 		checkUpdate().then(res => {
 			updateFlag.value = res;

+ 57 - 34
pages/inspectionDetails/index.vue

@@ -12,10 +12,11 @@
 			</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>
+			<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)">
@@ -23,7 +24,7 @@
 				<text>批次号:{{ item.lotCode }}</text>
 				<text style="margin-left: 16rpx;color: #55ff7f;">{{ item.inspectionType }}</text>
 				<text :style="selectType(item)">{{ selectText(item) }}</text>
-				<text  class="fa fa-trash" style="font-size: 16; color: white;"></text>
+				<text class="fa fa-trash" style="font-size: 16; color: white;"></text>
 			</view>
 			<view class="info">
 				<view class="info-row uni-row">
@@ -93,18 +94,17 @@
 		text: "不合格",
 		type: "color: #ff0c2c"
 	}]
-	const statusData = ref([
-		{
-			value:0,
-			text:"待确认"
+	const statusData = ref([{
+			value: 0,
+			text: "待确认"
 		},
 		{
-			value:1,
-			text:"合格"
+			value: 1,
+			text: "合格"
 		},
 		{
-			value:2,
-			text:"不合格"
+			value: 2,
+			text: "不合格"
 		},
 	])
 
@@ -129,29 +129,44 @@
 		// 	}
 		// });
 	})
-	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 中的项,即新数据
+				var newRows = res.rows.filter(row => !existingIds.has(row.id));
+
+				// 如果有新数据,将其添加到 listData
+				if (newRows.length > 0) {
+					newRows.forEach(v => {
+						if (v.type === "deliveryInspection") {
+							v.inspectionType = "交检"
+						} else if (v.type === "firstArticleInspection") {
+							v.inspectionType = "首件检"
+						} else if (v.type === "patrolInspection") {
+							v.inspectionType = "巡检"
+						} else if (v.type === "outsourcedInspector") {
+							v.inspectionType = "外协检"
+						} else if (v.type === "factoryInspection") {
+							v.inspectionType = "出厂检"
+						} else {
+							v.inspectionType = "仪器室"
+						}
+					});
+					inspecionList.value = inspecionList.value.concat(newRows);
+					original.value = original.value.concat(newRows);
+				} else {
+					// 如果没有新数据,更新状态表示没有更多数据
+					status.value = false;
+				}
 			})
-			}
-		})
+		}
+	})
 
 	/***************************** 定义了一些方法 *****************************/
 
@@ -188,11 +203,13 @@
 			}
 		});
 	}
+
 	function handleSearch() {
 		pageNum.value = 1
 		status.value = true
 		getList()
 	}
+
 	function handleChangeStatus() {
 		pageNum.value = 1
 		status.value = true
@@ -259,6 +276,7 @@
 	.uni-section-content {
 		width: 70%;
 	}
+
 	.time-controls {
 		.title {
 			margin: 20% auto 40% auto;
@@ -362,6 +380,7 @@
 				.value {
 					flex: 1;
 				}
+
 				.start-batch-btn {
 					flex: 1;
 					height: 80rpx;
@@ -373,7 +392,11 @@
 			}
 		}
 	}
-	uni-app, uni-page, uni-page-wrapper, uni-page-body {
-	    height: 100%;
+
+	uni-app,
+	uni-page,
+	uni-page-wrapper,
+	uni-page-body {
+		height: 100%;
 	}
 </style>