瀏覽代碼

运单视图-表格容错处理

zhongxiaoyu 2 年之前
父節點
當前提交
51eedd4563
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/views/realTime/components/WaybillView/index.vue

+ 3 - 4
src/views/realTime/components/WaybillView/index.vue

@@ -170,11 +170,10 @@ const tableData = computed(() => {
     (data: CommonData[], current) => {
       const sameRow = data.find(row =>
         ['flightNO', 'flightDate', 'cargoSN'].every(
-          key => row[key] === current[key]
+          key => (row[key] ?? '') === (current[key] ?? '')
         )
       )
       const {
-        stockCode,
         flightNO,
         flightDate,
         departureAirport, // 装载机场
@@ -183,7 +182,7 @@ const tableData = computed(() => {
         cargoSN,
         pullMark,
         returnMark,
-        // transMark,
+        transMark,
         exceptionCustomsMark,
         execPosition, // 读取位置
         nodeCode, // 节点名称
@@ -230,7 +229,7 @@ const tableData = computed(() => {
   )
   return mergedTableData.reduce((data: CommonData[], current) => {
     const { cargoSN } = current
-    if (typeof cargoSN === 'string' && cargoSN.trim().length) {
+    if (typeof cargoSN === 'string' && cargoSN !== '') {
       const splitedRows = cargoSN.split(',').map(splitedCargoSN => ({
         ...current,
         cargoSN: splitedCargoSN,