Forráskód Böngészése

切换项目更新

ZaiZai 11 hónapja
szülő
commit
652fead8ec
1 módosított fájl, 4 hozzáadás és 2 törlés
  1. 4 2
      src/views/tentative/material/sampling.vue

+ 4 - 2
src/views/tentative/material/sampling.vue

@@ -509,7 +509,7 @@ const requestDevice = async () => {
     }
     // 电脑接收到来自设备的消息回调
     device.oninputreport = (event) => {
-        const { isRfid } = addEditFormModel.value
+        const { isRfid, rfid } = addEditFormModel.value
         if (isRfid !== 1 ) return
         const array = new Uint8Array(event.data.buffer)
         const data = array.slice(10, array[0] - 1)
@@ -523,7 +523,9 @@ const requestDevice = async () => {
         if (index === -1) {
             deviceTable.value.push({ epc: epc })
         }
-        addEditFormModel.value.rfid = epc
+        if (isNullES(rfid)) {
+            addEditFormModel.value.rfid = epc
+        }
     }
 }