diff --git a/src/pages/materialsStation/toolsLease/codeOut.vue b/src/pages/materialsStation/toolsLease/codeOut.vue index 4edfa68..01b20fc 100644 --- a/src/pages/materialsStation/toolsLease/codeOut.vue +++ b/src/pages/materialsStation/toolsLease/codeOut.vue @@ -241,17 +241,31 @@ onLoad((opt) => { }) onShow((opt) => { - uni.$on('paramsReceived', (data) => { + uni.$once('paramsReceived', (data) => { console.log('🚀 ~ uni.$on ~ data:', data) if (data) { - codeDeviceList.value.unshift({ + if (data.typeId != queryParamsTemp.value.typeId) { + uni.showToast({ + title: `规格型号${data.typeName}不匹配, 请重新添加`, + icon: 'none', + duration: 1500, + }) + return + } + + const newItem = { ...data, - checked: true, // 默认未选中 - }) + checked: true, + outType: 4, + } // 去重 - codeDeviceList.value = [ - ...new Map(codeDeviceList.value.map((item) => [item.maId, item])).values(), - ] + const exists = codeDeviceList.value.some((item) => item.maCode === newItem.maCode) + if (exists) { + uni.showToast({ title: '设备已添加', icon: 'none' }) + } else { + codeDeviceList.value.unshift(newItem) + } + allChecked.value = codeDeviceList.value.every((e) => e.checked) } }) diff --git a/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.nvue b/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan-old.nvue similarity index 100% rename from src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.nvue rename to src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan-old.nvue diff --git a/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue b/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue new file mode 100644 index 0000000..d342427 --- /dev/null +++ b/src/pages/materialsStation/toolsLease/ocrScan/ocrOutScan.vue @@ -0,0 +1,1015 @@ + + + + + diff --git a/src/services/index.js b/src/services/index.js index 85eefd6..850101c 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -5,6 +5,11 @@ import { http } from '@/utils/http' */ export const appLoginAPI = (data) => { return false + // return http({ + // method: 'POST', + // url: '/auth/login', + // data, + // }) } /** * 获取用户信息