mao 1 年之前
父节点
当前提交
f21cd64361

+ 13 - 0
api/p2/furnaceNoInfo.js

@@ -0,0 +1,13 @@
+import req from '../../utils/request.js'
+
+/**
+ * 获取炉号信息From p2
+ * @param {Object} data
+ */
+export function getFurnaceNoInfo(data) {
+	return req.request({
+		url:'/feign/getFurnaceNoInfo/getFurnaceNoInfo',
+		method: 'GET',
+		data: data
+	})
+}

+ 0 - 16
components/dialog-end-work/dialog-end-work.vue

@@ -212,22 +212,6 @@
 				}
 			}
 		);
-		// uni.scanCode({
-		// 	scanType: ['qrCode'], // 条形码扫描
-		// 	onlyFromCamera: true, // 只允许相机扫码
-		// 	autoZoom: false,
-		// 	success: function(res) {
-		// 		let vehicleObj = JSON.parse(res.result);
-		// 		for (let i = 0; i < bindList.value.length; i++) {
-		// 			if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
-		// 				if (!bindList.value[i].flag) {
-		// 					endFlag.value += 1;
-		// 				}
-		// 				bindList.value[i].flag = true;
-		// 			}
-		// 		}
-		// 	}
-		// });
 	}
 
 	function handlePreFinishReporting(){

+ 0 - 6
components/dialog-lot/dialog-lot.vue

@@ -56,12 +56,6 @@
 		open
 	})
 		
-	function handleScanCode() {
-		uni.scanCode({
-			onlyFromCamera: true,
-			success: function(res) {}
-		});
-	}
 
 	function handleConfirm() {
 		close();

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "德迈仕数字生产管理平台",
     "appid" : "__UNI__B065984",
     "description" : "",
-    "versionName" : "1.0.8",
-    "versionCode" : 107,
+    "versionName" : "1.0.9",
+    "versionCode" : 108,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 7 - 0
pages/addNewBatch/index.vue

@@ -100,6 +100,7 @@
 		getCarrierById,
 		checkCarrier
 	} from '@/api/business/carrier.js'
+	import { getFurnaceNoInfo } from '@/api/p2/furnaceNoInfo.js'
 
 	const batchNoCheck = ref(null) // 批次号是否选中
 	const batchNoList = ref([]) // 批次号列表
@@ -155,6 +156,12 @@
 				batchNoList.value = res.rows;
 			}
 		})
+		getFurnaceNoInfo({
+			productionPlanNo: store.planDetails.productionPlanNo,
+			lineNumber: store.planDetails.lineNumber
+		}).then(res => {
+			console.log(res)
+		})
 	}
 
 	// function handleCheckBatchNo(item) {

+ 3 - 3
pages/batchReporting/index.vue

@@ -57,7 +57,7 @@
 				</view>
 				<view class="item-info uni-row">
 					<text class="label">下道工序</text>
-					<text class="label right">{{ item.nextProcess ? item['nextProcess'].processAlias : '-' }}</text>
+					<text class="label right">{{ item.nextDeptProcess ? item['nextDeptProcess'] : '-' }}</text>
 				</view>
 				<!-- 		<view class="item-info uni-row">
 					<text class="label">设备</text>
@@ -83,10 +83,10 @@
 		<view v-if="bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
 		</view>
-		<!-- 		<view v-else-if="bottomStatus == 1" class="bottom uni-row">
+				<view v-if="!bottomStatus" class="bottom uni-row">
 			<button class="start-batch-btn" type="primary" @click="handleScanCode">扫一扫开始新批次</button>
 		</view>
-		<view v-else="bottomStatus == 2" class="bottom uni-row">
+<!-- 		<view v-else="bottomStatus == 2" class="bottom uni-row">
 			<button class="start-batch-btn" style="width: 40%;margin-right: 10rpx;" type="primary"
 				@click="handleStartNewBatch">开始新批次</button>
 			<button class="start-batch-btn" style="width: 40%;margin-left: 10rpx" type="primary"

+ 28 - 21
pages/changeBox/index.vue

@@ -25,8 +25,8 @@
 						<switch color="#ff0000" style="transform:scale(0.7)" @change="handleSwitchChange(item)" />
 					</view>
 					<view class="uni-row" v-if="item.checked">
-						<uni-data-select v-model="item.abandonmentReason" :localdata="abanonmentList" style="width: 240rpx;"
-							:clear="false"></uni-data-select>
+						<uni-data-select v-model="item.abandonmentReason" :localdata="abanonmentList"
+							style="width: 240rpx;" :clear="false"></uni-data-select>
 					</view>
 					<!-- 占空位用 -->
 					<view class="uni-row" v-if="!item.checked">
@@ -65,7 +65,8 @@
 		debounce
 	} from '@/utils/common.js'
 	import {
-		addCarrierReject,checkCarrier
+		addCarrierReject,
+		checkCarrier
 	} from '@/api/business/carrier.js'
 
 	const bindList = ref([])
@@ -119,7 +120,7 @@
 			newBindList.value.splice(index, 1);
 			let discardVehicleInfo = {
 				carrierCode: item.carrierCode,
-				checked: false, 
+				checked: false,
 				reason: '',
 				carrierId: item.carrierId,
 				isAbandoned: 1,
@@ -131,18 +132,24 @@
 		}
 	}
 
-	function handleDelDiscardVehicleList(item,index) {
+	function handleDelDiscardVehicleList(item, index) {
 		discardVehicleList.value.splice(index, 1)
 		newBindList.value.push(item)
 	}
 
 	function handleScanCode() {
-		uni.scanCode({
-			scanType: ['qrCode'], // 条形码扫描
-			onlyFromCamera: true, // 只允许相机扫码
-			autoZoom: false,
-			success: function(res) {
-				let vehicleObj = JSON.parse(res.result);
+		// 引入原生插件
+		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// 调用插件的 mpaasScan 方法
+		mpaasScanModule.mpaasScan({
+				// 扫码识别类型,参数可多选,qrCode、barCode,
+				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+				scanType: ["qrCode", "barCode"],
+				// 是否隐藏相册,默认false不隐藏
+				hideAlbum: false,
+			},
+			(ret) => {
+				let vehicleObj = JSON.parse(ret.resp_result);
 				if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
 					uni.showToast({
 						icon: "error",
@@ -161,18 +168,18 @@
 				}
 				checkCarrier(vehicleObj.carrierId).then(response => {
 					console.log(response)
-						if(response.code == 200){
-							newBindList.value.push(JSON.parse(res.result));
-						}else{
-							uni.showToast({
-								icon: 'none',
-								title: response.msg
-							})
-							return;
-						}
+					if (response.code == 200) {
+						newBindList.value.push(JSON.parse(ret.resp_result));
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: response.msg
+						})
+						return;
+					}
 				})
 			}
-		});
+		);
 	}
 
 	function handleSubmit() {

+ 28 - 33
pages/equipmentList/index.vue

@@ -5,7 +5,8 @@
 		<view class="equipmentList">
 			<view style="height: calc(100% - 400rpx);">
 				<view class="entry uni-row" v-for="(item,index) in equipmentList">
-					<view class="equipmentList-item" @longpress="handleShowUnbind(item)">{{item.equipmentDetailCode}}</view>
+					<view class="equipmentList-item" @longpress="handleShowUnbind(item)">{{item.equipmentDetailCode}}
+					</view>
 					<view :class="{'unbind': true,'visible': showUnbind === item}" @click="handleUnbind(item)">解绑</view>
 				</view>
 			</view>
@@ -49,7 +50,7 @@
 	const showUnbind = ref({}) // 解绑按钮显示于隐藏
 	const equipmentList = ref([]) // 回显用
 	const userEquipmentData = ref({}) // 保存用
-	const curScanEquipment = ref([]) 
+	const curScanEquipment = ref([])
 	const confirm = ref(null)
 	onLoad(() => {
 		init();
@@ -98,19 +99,24 @@
 			init();
 		})
 	}
-	
-	function handleDelEquipmentNo(item,index){
-		curScanEquipment.value.splice(index,1);
+
+	function handleDelEquipmentNo(item, index) {
+		curScanEquipment.value.splice(index, 1);
 	}
 
 	function handleScanCode() {
-		uni.scanCode({
-			scanType: ['qrCode'], // 条形码扫描
-			onlyFromCamera: true, // 只允许相机扫码
-			autoZoom: false,
-			success: function(res) {
-				console.log(res.result)
-				let equipment = JSON.parse(res.result);
+		// 引入原生插件
+		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// 调用插件的 mpaasScan 方法
+		mpaasScanModule.mpaasScan({
+				// 扫码识别类型,参数可多选,qrCode、barCode,
+				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+				scanType: ["qrCode", "barCode"],
+				// 是否隐藏相册,默认false不隐藏
+				hideAlbum: false,
+			},
+			(ret) => {
+				let equipment = JSON.parse(ret.resp_result);
 				// 判断二维码对不对
 				if (!equipment.equipmentDetailId || equipment.equipmentDetailId == "") {
 					uni.showToast({
@@ -129,34 +135,22 @@
 					}
 				}
 				curScanEquipment.value.push(equipment)
-				// checkCarrier(equipment.equipmentDetailId).then(response => {
-				// 	console.log(response)
-				// 		if(response.code == 200){
-				// 			equipmentList.value.push(JSON.parse(res.result));
-				// 		}else{
-				// 			uni.showToast({
-				// 				icon: 'none',
-				// 				title: response.msg
-				// 			})
-				// 			return;
-				// 		}
-				// })	
-				
+
 				// 设置绑定员工的信息
 				userEquipmentData.value = {
 					userId: store.userInfo.userId,
 					nickName: store.userInfo.nickName,
 					deptId: store.curDeptDetails.deptId,
 					userEquipmentList: curScanEquipment.value
-				}
+				} 
 			}
-		});
+		);
 	}
-	
-	function handleSubmit(){
+
+	function handleSubmit() {
 		handleSaveInfo(userEquipmentData.value);
 	}
-	
+
 	/**
 	 * 绑定设备
 	 */
@@ -217,7 +211,7 @@
 			padding: 20rpx 0 0 0;
 			border-radius: 18rpx;
 			overflow: auto;
-			
+
 			.scanEquiementList {
 				height: 380rpx;
 				width: 94%;
@@ -227,7 +221,7 @@
 				align-content: flex-start;
 				flex-wrap: wrap;
 				overflow: auto;
-				
+
 				.equipmentNo {
 					padding: 0 10rpx;
 					margin: 10rpx 24rpx;
@@ -239,6 +233,7 @@
 					border-radius: 6rpx;
 				}
 			}
+
 			.entry {
 				justify-content: center;
 				margin: 10rpx 0;
@@ -274,6 +269,6 @@
 				}
 			}
 		}
-		
+
 	}
 </style>

+ 19 - 29
pages/recerptSfprod/index.vue

@@ -53,20 +53,23 @@
 	const flag = ref(false)
 	const selection = ref([])
 
-	onLoad(() => {
-	})
+	onLoad(() => {})
 
-	function init() {
-	}
+	function init() {}
 
 	function handleScanCode() {
-		uni.scanCode({
-			scanType: ['qrCode'],
-			onlyFromCamera: true, // 只允许相机扫码
-			autoZoom: false,
-			success: function(res) {
-				console.log(res.result)
-				let vehicleObj = JSON.parse(res.result);
+		// 引入原生插件
+		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// 调用插件的 mpaasScan 方法
+		mpaasScanModule.mpaasScan({
+				// 扫码识别类型,参数可多选,qrCode、barCode,
+				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+				scanType: ["qrCode", "barCode"],
+				// 是否隐藏相册,默认false不隐藏
+				hideAlbum: false,
+			},
+			(ret) => {
+				let vehicleObj = JSON.parse(ret.resp_result);
 				if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
 					uni.showToast({
 						icon: "error",
@@ -80,25 +83,13 @@
 					status: 6
 				}).then(response => {
 					console.log(response)
-					if(response.data.length == 0){
+					if (response.data.length == 0) {
 						uni.showToast({
 							icon: 'none',
 							title: '该批次已被领取'
 						})
 						return;
 					}
-					// for (let i = 0; i < products.value.length; i++) {
-					// 	if (products.value[i].lotCode === res.data[0].lotCode) {
-					// 		console.log(products.value[i].lotCode);
-					// 		console.log(res.data[0].lotCode)
-					// 		uni.showToast({
-					// 			icon: "error",
-					// 			title: "该批次已存在"
-					// 		})
-					// 		console.log("该批次已存在")
-					// 		return;
-					// 	}
-					// }
 					for (let i = 0; i < response.data.length; i++) {
 						products.value.push(response.data[i]);
 						console.log(products.value)
@@ -114,7 +105,7 @@
 					init();
 				})
 			}
-		});
+		);
 	}
 
 	function handleConfirmReceipt() {
@@ -144,13 +135,13 @@
 			selection.value[i].status = '7';
 			selection.value[i].recipientId = store.userInfo.userId;
 			selection.value[i].placeId = data.id;
-			selection.value[i].place = data.code; 
+			selection.value[i].place = data.code;
 		}
-		console.log(selection.value) 
+		console.log(selection.value)
 		updateDayWorkItemBatch(selection.value).then(res => {
 			if (res.code === 200) {
 				uni.showToast({
-					icon: 'success', 
+					icon: 'success',
 					title: '操作成功',
 					duration: 2000
 				});
@@ -171,7 +162,6 @@
 	function handleDoIt(data) {
 		handleDoReceipt(data);
 	}
-
 </script>
 
 <style lang="scss">

+ 16 - 11
pages/startTurnover/index.vue

@@ -66,23 +66,28 @@
 		uni.$on('dayworkItemUpdate', () => {
 			init(curSubPlan.value.id);
 		})
-		uni.$once('clearListData',() => {
+		uni.$once('clearListData', () => {
 			listData.value = [];
 		})
 	})
 
 	function init() {
-		flag.value = listData.value.length > 0 ? false : true; 
+		flag.value = listData.value.length > 0 ? false : true;
 	}
 
 	function HandleScanCode() {
-		uni.scanCode({
-			scanType: ['qrCode'],
-			onlyFromCamera: true, // 只允许相机扫码
-			autoZoom: false,
-			success: function(res) {
-				console.log(res.result)
-				let vehicleObj = JSON.parse(res.result);
+		// 引入原生插件
+		const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
+		// 调用插件的 mpaasScan 方法
+		mpaasScanModule.mpaasScan({
+				// 扫码识别类型,参数可多选,qrCode、barCode,
+				// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
+				scanType: ["qrCode", "barCode"],
+				// 是否隐藏相册,默认false不隐藏
+				hideAlbum: false,
+			},
+			(ret) => {
+				let vehicleObj = JSON.parse(ret.resp_result);
 				if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
 					uni.showToast({
 						icon: "error",
@@ -101,7 +106,7 @@
 							uni.showToast({
 								icon: "error",
 								title: "该批次已存在"
-							})
+							}) 
 							console.log("该批次已存在")
 							return;
 						}
@@ -116,7 +121,7 @@
 					init();
 				})
 			}
-		});
+		);
 	}
 
 	function handleStartTurnover() {