diff --git a/src/components/ElectronicSeal/index.vue b/src/components/ElectronicSeal/index.vue
index 6fea22f..03b4041 100644
--- a/src/components/ElectronicSeal/index.vue
+++ b/src/components/ElectronicSeal/index.vue
@@ -44,7 +44,7 @@
-
+
{{ tagInfo.inspectStatus }}
@@ -70,14 +70,14 @@
检修员:
- {{ tagInfo.inspectMan }}
+ {{ tagInfo.checkMan }}
检验员:
- {{ tagInfo.checkMan }}
+ {{ tagInfo.inspectMan || '高民'}}
@@ -89,7 +89,7 @@
-
+
检验结果:
-
+
{{ tagInfo.inspectStatus }}
-
+
-
+
该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!
+
@@ -178,7 +179,8 @@ export default {
autoFocusEnabled: true,
focusTimeout: null,
// 设备信息
- systemInfo: null
+ systemInfo: null,
+ isOverToday: false
}
},
onBackPress(options) {
@@ -212,6 +214,16 @@ export default {
this.cleanup();
},
methods: {
+ handleIsOverToday() {
+ if (!this.codeData.nextCheckTime) {
+ this.isOverToday = true
+ } else {
+ const now = Date.now()
+ const nextCheckTimestamp = new Date(this.codeData.nextCheckTime).getTime()
+ this.isOverToday = nextCheckTimestamp <= now
+ console.log('🚀 ~ isOverToday ~ :', this.isOverToday)
+ }
+ },
// 获取设备信息
getDeviceInfo() {
try {
@@ -768,6 +780,9 @@ export default {
}));
if (response.data.length === 1) {
this.codeData = response.data[0];
+ setTimeout(() => {
+ this.handleIsOverToday()
+ }, 500)
}
} else {
uni.showToast({
@@ -796,6 +811,9 @@ export default {
const response = await getDeviceListAPI({'maId': this.queryCodeParams.maId})
if (response.data && response.data.length !== 0) {
this.codeData = response.data[0]
+ setTimeout(() => {
+ this.handleIsOverToday()
+ }, 500)
}
} catch (error) {
console.error("获取编号信息失败", error);
diff --git a/src/pages/devicesSearch/ocrSearch2.vue b/src/pages/devicesSearch/ocrSearch2.vue
index 7e3b6e6..433c408 100644
--- a/src/pages/devicesSearch/ocrSearch2.vue
+++ b/src/pages/devicesSearch/ocrSearch2.vue
@@ -69,9 +69,9 @@
{{ codeData.checkNum }}
-
+
{{ codeData.scrapTime }}
@@ -140,7 +140,8 @@
style="position: fixed; top: -9999px; left: -9999px; width: 1px; height: 1px;"
>
-
+
该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!
+
@@ -178,7 +179,8 @@ export default {
autoFocusEnabled: true,
focusTimeout: null,
// 设备信息
- systemInfo: null
+ systemInfo: null,
+ isOverToday: false
}
},
onBackPress(options) {
@@ -212,6 +214,17 @@ export default {
this.cleanup();
},
methods: {
+ handleIsOverToday() {
+ console.log('🚀 ~ handleIsOverToday ~ this.codeData.nextCheckTime:', this.codeData.nextCheckTime)
+ if (!this.codeData.nextCheckTime) {
+ this.isOverToday = true
+ } else {
+ const now = Date.now()
+ const nextCheckTimestamp = new Date(this.codeData.nextCheckTime).getTime()
+ this.isOverToday = nextCheckTimestamp <= now
+ console.log('🚀 ~ isOverToday ~ :', this.isOverToday)
+ }
+ },
// 获取设备信息
getDeviceInfo() {
try {
@@ -764,10 +777,14 @@ export default {
if (response.code === 200 && response.data && response.data.length > 0) {
this.optionList = response.data.map(option => ({
value: option.maId,
- text: option.maCode
+ text: option.maCode,
+ devType: option.devType
}));
if (response.data.length === 1) {
this.codeData = response.data[0];
+ setTimeout(() => {
+ this.handleIsOverToday()
+ }, 500)
}
} else {
uni.showToast({
@@ -791,11 +808,16 @@ export default {
// 标签改变
async changeTag() {
+ const selectedOption = this.optionList.find(option => option.value === this.queryCodeParams.maId)
+ console.log('🚀 ~ changeTag ~ selectedOption:', selectedOption)
if (!this.queryCodeParams.maId) return;
try {
- const response = await getDeviceListAPINew({'maId': this.queryCodeParams.maId})
+ const response = await getDeviceListAPINew({'maId': this.queryCodeParams.maId, devType: selectedOption.devType})
if (response.data && response.data.length !== 0) {
this.codeData = response.data[0]
+ setTimeout(() => {
+ this.handleIsOverToday()
+ }, 500)
}
} catch (error) {
console.error("获取编号信息失败", error);
diff --git a/src/pages/devicesSearch/qrSearch.vue b/src/pages/devicesSearch/qrSearch.vue
index df19cc1..ddbd317 100644
--- a/src/pages/devicesSearch/qrSearch.vue
+++ b/src/pages/devicesSearch/qrSearch.vue
@@ -75,7 +75,8 @@
-
+ 该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!
+
@@ -97,6 +98,7 @@ const queryCodeParams = ref({
})
const qrCodeScan = ref('')
const codeData = ref({})
+const isOverToday = ref(false)
// 页面加载完毕
onLoad((options) => {
// scanStart()
@@ -104,6 +106,19 @@ onLoad((options) => {
onShow(() => {
})
+
+const handleIsOverToday = () => {
+ console.log('🚀 ~ .nextCheckTime:', codeData.value.nextCheckTime)
+ if (!codeData.value.nextCheckTime) {
+ isOverToday.value = true
+ } else {
+ const now = Date.now()
+ const nextCheckTimestamp = new Date(codeData.value.nextCheckTime).getTime()
+ isOverToday.value = nextCheckTimestamp <= now
+ console.log('🚀 ~ isOverToday ~ :', nextCheckDate < today)
+ }
+}
+
// // 扫码识别按钮
// const scanStart = () => {
// var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
@@ -179,6 +194,9 @@ const getMaInfoScan = async () => {
if (res.code == 200) {
if (res.data) {
codeData.value = res.data
+ setTimeout(() => {
+ handleIsOverToday()
+ }, 500)
}else{
uni.showToast({ title: res.data.msg, icon: 'none'})
}
diff --git a/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue b/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue
index c8d2899..ec24809 100644
--- a/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue
+++ b/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue
@@ -54,7 +54,7 @@
-
+
diff --git a/src/pages/picking/outbound/codeOutScan.vue b/src/pages/picking/outbound/codeOutScan.vue
index c8d2899..32c4a18 100644
--- a/src/pages/picking/outbound/codeOutScan.vue
+++ b/src/pages/picking/outbound/codeOutScan.vue
@@ -51,11 +51,16 @@
codeData.maCode
}}
+
+ {{
+ codeData.nextCheckTime
+ }}
+
-
-
-
+