huang
昨天 04914a9997afbbead6f8adbb9d9c40e05b2edbd1
mes-web/src/views/plcTest/components/MultiDeviceTest/TaskOrchestration.vue
@@ -531,10 +531,10 @@
      headerStr === 'w' || headerStr === '宽度') {
      headerMap.width = index
    }
    // 高度
    else if (headerStr.includes('高') || headerStr.includes('height') ||
      headerStr === 'h' || headerStr === '高度') {
      headerMap.height = index
    // 长度
    else if (headerStr.includes('长') || headerStr.includes('length') ||
      headerStr === 'l' || headerStr === '长度') {
      headerMap.length = index
    }
    // 厚度
    else if (headerStr.includes('厚') || headerStr.includes('thickness') ||
@@ -570,10 +570,10 @@
  // 如果没有找到表头,尝试使用第一行作为表头(索引方式)
  if (Object.keys(headerMap).length === 0 && jsonData.length > 1) {
    // 默认格式:玻璃ID, 宽, 高, 厚, 数量(按列顺序)
    // 默认格式:玻璃ID, 宽, 长, 厚, 数量(按列顺序)
    headerMap.glassId = 0
    headerMap.width = 1
    headerMap.height = 2
    headerMap.length = 2
    headerMap.thickness = 3
    headerMap.quantity = 4
  }
@@ -586,7 +586,7 @@
    const glassId = row[headerMap.glassId] ? String(row[headerMap.glassId]).trim() : ''
    const width = row[headerMap.width] ? String(row[headerMap.width]).trim() : ''
    const height = row[headerMap.height] ? String(row[headerMap.height]).trim() : ''
    const length = row[headerMap.length] ? String(row[headerMap.length]).trim() : ''
    const thickness = row[headerMap.thickness] ? String(row[headerMap.thickness]).trim() : ''
    const quantity = row[headerMap.quantity] ? String(row[headerMap.quantity]).trim() : ''
    const filmsId = row[headerMap.filmsId] ? String(row[headerMap.filmsId]).trim() : ''
@@ -595,7 +595,7 @@
    const customerName = row[headerMap.customerName] ? String(row[headerMap.customerName]).trim() : ''
    // 跳过空行
    if (!glassId && !width && !height && !thickness && !quantity) {
    if (!glassId && !width && !length && !thickness && !quantity) {
      continue
    }
@@ -621,7 +621,7 @@
      result.push({
        glassId: finalGlassId,
        width: parseNumber(width),
        height: parseNumber(height),
        length: parseNumber(length),
        thickness: parseNumber(thickness),
        quantity: '1', // 每条记录数量为1
        filmsId: filmsId,