Procházet zdrojové kódy

收货-组合商品唯一码校验

zhaohuanhuan před 2 dny
rodič
revize
c475928965
1 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. 12 0
      src/views/inbound/takeDelivery/task/index.vue

+ 12 - 0
src/views/inbound/takeDelivery/task/index.vue

@@ -487,6 +487,18 @@ async function resolvePanpassScan(code) {
       uniqueCode: code,
       uniqueCode: code,
       customer: customerId,
       customer: customerId,
     })
     })
+    const newPsId = String(res?.data?.data?.newPsId ?? '').trim()
+    if (newPsId) {
+      const expected = barcodeToUpperCase(newPsId)
+      const match = [asnInfo.value.barcode, asnInfo.value.barcode2, asnInfo.value.sku, uniqueCodeRef.value?.uniqueBarcode]
+        .filter(Boolean)
+        .some((c) => barcodeToUpperCase(String(c)) === expected)
+      if (!match) {
+        showNotify({ type: 'danger', duration: 3000, message: `商品条码不一致:${newPsId},请检查` })
+        scanError()
+        return null
+      }
+    }
     const childCodes = parsePanpassChildCodes(res)
     const childCodes = parsePanpassChildCodes(res)
     if (!childCodes?.length) {
     if (!childCodes?.length) {
       const uniqueRegExp = uniqueRuleMap.value['sku']
       const uniqueRegExp = uniqueRuleMap.value['sku']