diff --git a/src/pages/devicesSearch/ocrSearch.vue b/src/pages/devicesSearch/ocrSearch.vue
index 247300a..9122d65 100644
--- a/src/pages/devicesSearch/ocrSearch.vue
+++ b/src/pages/devicesSearch/ocrSearch.vue
@@ -9,10 +9,10 @@
-
+
设备编码
-
+
@@ -169,7 +169,7 @@ export default {
cameraReady: false,
deviceReadyTimeout: null,
pluginCheckRetries: 0,
- maxRetries: 10,
+ maxRetries: 5,
// 聚焦相关状态
isFocusing: false,
focusSuccess: false,
@@ -181,6 +181,25 @@ export default {
systemInfo: null
}
},
+ onBackPress(options) {
+ console.log("进了-----")
+ // 相机打开时处理返回事件
+ if (this.showCamera){
+ console.log('关闭相机...');
+ try {
+ this.stopCamera();
+ } catch (error) {
+ console.error('关闭相机出错:', error);
+ } finally {
+ this.showCamera = false;
+ this.cameraStarted = false;
+ this.resetFocusState();
+ }
+ return true; // 阻止默认返回行为
+ }
+ // 其他情况下允许默认返回
+ return false;
+ },
onShow() {
this.initializeCordova();
// 获取设备信息用于相机配置
@@ -815,7 +834,7 @@ export default {
}
// 重置聚焦状态
this.resetFocusState();
- }
+ },
}
}
diff --git a/src/pages/devicesSearch/ocrSearch2.vue b/src/pages/devicesSearch/ocrSearch2.vue
index edafaf2..7e3b6e6 100644
--- a/src/pages/devicesSearch/ocrSearch2.vue
+++ b/src/pages/devicesSearch/ocrSearch2.vue
@@ -9,10 +9,10 @@
-
+
设备编码
-
+
@@ -54,7 +54,7 @@
{{ codeData.nextCheckTime }}
-
+
{{ codeData.inOutNum }}
@@ -70,12 +70,12 @@
{{ codeData.checkNum }}
- {{ codeData.inspectionPerson }}
+ {{ codeData.thisCheckTime ? '王鹏' : '' }}
{{ codeData.scrapTime }}
-
+
{{}}
@@ -169,7 +169,7 @@ export default {
cameraReady: false,
deviceReadyTimeout: null,
pluginCheckRetries: 0,
- maxRetries: 10,
+ maxRetries: 5,
// 聚焦相关状态
isFocusing: false,
focusSuccess: false,
@@ -181,6 +181,25 @@ export default {
systemInfo: null
}
},
+ onBackPress(options) {
+ console.log("进了-----")
+ // 相机打开时处理返回事件
+ if (this.showCamera){
+ console.log('关闭相机...');
+ try {
+ this.stopCamera();
+ } catch (error) {
+ console.error('关闭相机出错:', error);
+ } finally {
+ this.showCamera = false;
+ this.cameraStarted = false;
+ this.resetFocusState();
+ }
+ return true; // 阻止默认返回行为
+ }
+ // 其他情况下允许默认返回
+ return false;
+ },
onShow() {
this.initializeCordova();
// 获取设备信息用于相机配置
diff --git a/src/pages/new-purchase/accept/index.vue b/src/pages/new-purchase/accept/index.vue
index 73af582..e6fbe6e 100644
--- a/src/pages/new-purchase/accept/index.vue
+++ b/src/pages/new-purchase/accept/index.vue
@@ -228,7 +228,7 @@ const handleItem = (item) => {
const deptName = uni.getStorageSync('deptName')
if (!deptName.includes(singLevel[item.signLevel]) && !isFinished) {
uni.showToast({
- title: `请联系${singLevel[item.signLevel]}进行审核`,
+ title: `请联系${singLevel[item.signLevel || 2]}进行审核`,
icon: 'none',
})
return
diff --git a/src/pages/part/parts-accept/index.vue b/src/pages/part/parts-accept/index.vue
index 6aec2f2..299a505 100644
--- a/src/pages/part/parts-accept/index.vue
+++ b/src/pages/part/parts-accept/index.vue
@@ -184,7 +184,7 @@ const handleItem = (item) => {
const deptName = uni.getStorageSync('deptName')
if (!deptName.includes(singLevel[item.signLevel]) && !isFinished) {
uni.showToast({
- title: `请联系${singLevel[item.signLevel]}进行审核`,
+ title: `请联系${singLevel[item.signLevel || 2]}进行审核`,
icon: 'none',
})
return