export const customerOptions = {
  customerName: [
    { label: "广州铁路局", value: "广州铁路局" },
    { label: "深圳地铁", value: "深圳地铁" },
  ],
  customerAddress: [
    { label: "广州市天河区", value: "广州市天河区" },
    { label: "深圳市福田区", value: "深圳市福田区" },
    { label: "广州市越秀区", value: "广州市越秀区" },
  ],
  linkman: [
    { label: "张三", value: "张三" },
    { label: "李四", value: "李四" },
  ],
  linkway: [
    { label: "13921000000", value: "13921000000" },
    { label: "13921000001", value: "13921000001" },
  ],
};

export const carTypeOptions = [
  {
    label: "最常选择",
    options: [
      {
        value: "CR400AF",
        label: "CR400AF",
        description: "中国标准动车组，最高运营速度350km/h",
        specifications: {
          "最高运营速度": "350km/h",
          "编组方式": "8辆编组",
          "定员": "556人",
          "轴重": "≤17t"
        },
        image: "/images/cars/CR400AF.jpg"
      }
    ]
  },
  {
    label: "高速动车组",
    options: [
      {
        value: "CR400AF",
        label: "CR400AF",
        description: "中国标准动车组，最高运营速度350km/h",
        specifications: {
          "最高运营速度": "350km/h",
          "编组方式": "8辆编组",
          "定员": "556人",
          "轴重": "≤17t"
        },
        image: "/images/cars/CR400AF.jpg"
      },
      {
        value: "CR400BF",
        label: "CR400BF",
        description: "中国标准动车组，最高运营速度350km/h",
        specifications: {
          "最高运营速度": "350km/h",
          "编组方式": "8辆编组",
          "定员": "556人",
          "轴重": "≤17t"
        },
        image: "/images/cars/CR400BF.jpg"
      }
    ]
  },
  {
    label: "城际动车组",
    options: [
      {
        value: "CRH3A",
        label: "CRH3A",
        description: "城际动车组，最高运营速度250km/h",
        specifications: {
          "最高运营速度": "250km/h",
          "编组方式": "8辆编组",
          "定员": "613人",
          "轴重": "≤16t"
        },
        image: "/images/cars/CRH3A.jpg"
      }
    ]
  },
  {
    label: "其他",
    options: [
      {
        value: "其他",
        label: "其他"
      }
    ]
  }
];

export const defaultPaymentTerms = "货物出厂验收合格前，买方需将所提货物全额货款支付给卖方。";
export const defaultObjectionTerms = "买方提出对产品质量异议的时间为收到货物起5个工作日内，卖方应在收到异议书次日起3个工作日内与买方沟通，通过技术指导方式解决问题，如不能解决，买方可以要求卖方前往修理，如修理后仍不能使用，买方可以提出更换请求。如买方在收到货物后5日内未提出异议，则视为同意卖方处理意见。";
export const defaultForceTerms = "如因不可抗力的原因，致使卖方推迟或不能交货，卖方不需为此承担责任。但卖方需在上述事件发生次日起七天内，以传真等书面方式通知买方，同时，卖方应采取一切必要措施及早交货。";
export const defaultDisputeTerms = "合同双方因履行本合同发生争议时，应本着友好合作的精神共同协商解决。如协商后双方仍然无法达成一致则向买方所在地法院申请裁决。";

// 商品参数选择静态树形数据
export const productTreeData = [
  {
    code: "D310000000032",
    label: "D310000000032,动力轮对轴箱组成（带联轴节）",
    replaceable: false,
    image: '/images/cars/totle.jpg',
    children: [
      {
        code: "D311000000013",
        label: "D311000000013,动力轮对（带轴承+联轴节）",
        replaceable: false,
        image: '/images/cars/1.jpg',
        children: [
          {
            code: "D311001000011",
            label: "D311001000011,动力轮对",
            replaceable: false,
            image: '/images/cars/1_1_1.jpg',
            children: [
              {
                code: "D351200000018",
                label: "D351200000018,动车组联轴节（鼓形齿式）",
                replaceable: true,
                image: '/images/cars/1_2_1.jpg',
                children: []
              },
              {
                code: "D312000000013",
                label: "D312000000013,齿轮箱组成",
                replaceable: true,
                image: '/images/cars/1_2_1_1.jpg',
                children: []
              },
              {
                code: "D311101000008",
                label: "D311101000008,动力车轮组成（带喷漆）",
                replaceable: false,
                image: '/images/cars/1_2_1_1.jpg',
                children: []
              },
              {
                code: "D311299000016",
                label: "D311299000016,动力车轴（带喷漆）",
                replaceable: false,
                image: '/images/cars/1_2_1_1_1.jpg',
                children: []
              }
            ]
          },
          {
            code: "D311303000007",
            label: "D311303000007,后挡圈",
            replaceable: false,
            image: '/images/cars/1_1_2.jpg',
            children: []
          },
          {
            code: "3627401100024",
            label: "3627401100024,O形橡胶密封圈",
            replaceable: false,
            image: '/images/cars/1_2.jpg',
            children: []
          },
          {
            code: "3627401100023",
            label: "3627401100023,O形橡胶密封圈",
            replaceable: false,
            image: '/images/cars/1_2_1.jpg',
            children: []
          },
          {
            code: "D311300000020",
            label: "D311300000020,轴箱轴承",
            replaceable: false,
            image: '/images/cars/1_2_1_1.jpg',
            children: []
          }
        ]
      },
      {
        code: "D325000000013",
        label: "D325000000013,左轴箱组成",
        replaceable: false,
        image: '/images/cars/2.jpg',
        children: []
      },
      {
        code: "D325000000014",
        label: "D325000000014,右轴箱组成",
        replaceable: false,
        image: '/images/cars/3.jpg',
        children: []
      },
      {
        code: "D326000000037",
        label: "D326000000037,左轴端装置",
        replaceable: false,
        image: '/images/cars/4.jpg',
        children: []
      }
    ]
  }
];

// 替换部件列表
export const replacePartsMap = {
  "D351200000018": [
    {
      code: "D351200000002",
      label: "D351200000002,动车组联轴节（鼓形齿式）",
      replaceable: true,
      image: '/images/cars/1_1_1.jpg',
      children: []
    }
  ],
  "D312000000013": [
    {
      code: "D312000000014",
      label: "D312000000014,齿轮箱组成",
      replaceable: true,
      image: '/images/cars/1_2_1.jpg',
      children: []
    },
    {
      code: "312000000015",
      label: "D312000000015，齿轮箱组成",
      replaceable: true,
      image: '/images/cars/4.jpg',
      children: []
    }
  ]
};

// 结构化零部件数据，供Step2 copy查询用
export const allParts = [
  // CR400AF
  { code: "D310000000030", label: "轻量化车轴", type: "车轴", feature: "轻量化", image: "/images/cars/1_1_1.jpg", carType: "CR400AF" },
  { code: "D310000000031", label: "易探伤车轴", type: "车轴", feature: "易探伤", image: "/images/cars/1_1_2.jpg", carType: "CR400AF" },
  { code: "D310000000032", label: "高性能齿轮箱", type: "齿轮箱", feature: "高性能", image: "/images/cars/2.jpg", carType: "CR400AF" },
  { code: "D310000000033", label: "高效制动盘", type: "制动盘", feature: "高效", image: "/images/cars/3.jpg", carType: "CR400AF" },
  { code: "D310000000034", label: "耐磨车轮", type: "车轮", feature: "耐磨", image: "/images/cars/4.jpg", carType: "CR400AF" },

  // CR400BF
  { code: "D310000000130", label: "高强度车轴", type: "车轴", feature: "高强度", image: "/images/cars/CR400BF.jpg", carType: "CR400BF" },
  { code: "D310000000131", label: "耐腐蚀车轴", type: "车轴", feature: "耐腐蚀", image: "/images/cars/1_2_1_1_1.jpg", carType: "CR400BF" },
  { code: "D310000000132", label: "静音齿轮箱", type: "齿轮箱", feature: "静音", image: "/images/cars/CR400BF.jpg", carType: "CR400BF" },
  { code: "D310000000133", label: "耐磨制动盘", type: "制动盘", feature: "耐磨", image: "/images/cars/1_2_1.jpg", carType: "CR400BF" },
  { code: "D310000000134", label: "低噪音车轮", type: "车轮", feature: "低噪音", image: "/images/cars/1_2.jpg", carType: "CR400BF" },

  // CRH3A
  { code: "D310000000230", label: "经济型车轴", type: "车轴", feature: "经济型", image: "/images/cars/CRH3A.jpg", carType: "CRH3A" },
  { code: "D310000000231", label: "标准型车轴", type: "车轴", feature: "标准型", image: "/images/cars/1_2_1_1.jpg", carType: "CRH3A" },
  { code: "D310000000232", label: "轻便齿轮箱", type: "齿轮箱", feature: "轻便", image: "/images/cars/CRH3A.jpg", carType: "CRH3A" },
  { code: "D310000000233", label: "经济制动盘", type: "制动盘", feature: "经济", image: "/images/cars/1_2_1_1_1.jpg", carType: "CRH3A" },
  { code: "D310000000234", label: "标准车轮", type: "车轮", feature: "标准", image: "/images/cars/1_2_1.jpg", carType: "CRH3A" },

  // 其他
  { code: "D310000000330", label: "通用车轴", type: "车轴", feature: "通用", image: "/images/cars/1.jpg", carType: "其他" },
  { code: "D310000000331", label: "普通齿轮箱", type: "齿轮箱", feature: "普通", image: "/images/cars/2.jpg", carType: "其他" },
  { code: "D310000000332", label: "标准制动盘", type: "制动盘", feature: "标准", image: "/images/cars/3.jpg", carType: "其他" },
  { code: "D310000000333", label: "经济车轮", type: "车轮", feature: "经济", image: "/images/cars/4.jpg", carType: "其他" },
];

// 参数对比模拟数据
export const compareTableData = [
  {
    param: "动车组联轴节",
    D310000000030: "鼓形齿式",
    D310000000031: "鼓形齿式",
    D310000000032: "齿式",
    D310000000130: "鼓形齿式",
    D310000000131: "鼓形齿式",
    D310000000132: "齿式",
    D310000000230: "鼓形齿式",
    D310000000231: "鼓形齿式",
    D310000000232: "齿式",
    D310000000330: "鼓形齿式",
    D310000000331: "鼓形齿式",
    D310000000332: "齿式",
  },
  {
    param: "O形橡胶密封圈",
    D310000000030: "A.2耐用型",
    D310000000031: "A.1耐热型",
    D310000000032: "A.2耐用型",
    D310000000130: "A.2耐用型",
    D310000000131: "A.1耐热型",
    D310000000132: "A.2耐用型",
    D310000000230: "A.2耐用型",
    D310000000231: "A.1耐热型",
    D310000000232: "A.2耐用型",
    D310000000330: "A.2耐用型",
    D310000000331: "A.1耐热型",
    D310000000332: "A.2耐用型",
  },
  {
    param: "齿轮箱组成",
    D310000000030: "不带联轴节",
    D310000000031: "带联轴节",
    D310000000032: "带联轴节",
    D310000000130: "不带联轴节",
    D310000000131: "带联轴节",
    D310000000132: "带联轴节",
    D310000000230: "不带联轴节",
    D310000000231: "带联轴节",
    D310000000232: "带联轴节",
    D310000000330: "不带联轴节",
    D310000000331: "带联轴节",
    D310000000332: "带联轴节",
  },
  {
    param: "碳刷",
    D310000000030: "耐热",
    D310000000031: "耐用",
    D310000000032: "耐热",
    D310000000130: "耐热",
    D310000000131: "耐用",
    D310000000132: "耐热",
    D310000000230: "耐热",
    D310000000231: "耐用",
    D310000000232: "耐热",
    D310000000330: "耐热",
    D310000000331: "耐用",
    D310000000332: "耐热",
  },
  {
    param: "齿轮箱温度传感器",
    D310000000030: "耐热",
    D310000000031: "耐热",
    D310000000032: "耐寒",
    D310000000130: "耐热",
    D310000000131: "耐热",
    D310000000132: "耐寒",
    D310000000230: "耐热",
    D310000000231: "耐热",
    D310000000232: "耐寒",
    D310000000330: "耐热",
    D310000000331: "耐热",
    D310000000332: "耐寒",
  },
  // 可重复参数
  {
    param: "轮对材质",
    D310000000030: "合金钢",
    D310000000031: "合金钢",
    D310000000032: "高强钢",
    D310000000130: "合金钢",
    D310000000131: "合金钢",
    D310000000132: "高强钢",
    D310000000230: "合金钢",
    D310000000231: "合金钢",
    D310000000232: "高强钢",
    D310000000330: "合金钢",
    D310000000331: "合金钢",
    D310000000332: "高强钢",
  },
  {
    param: "制动盘类型",
    D310000000030: "高效盘",
    D310000000031: "高效盘",
    D310000000032: "经济盘",
    D310000000130: "高效盘",
    D310000000131: "高效盘",
    D310000000132: "经济盘",
    D310000000230: "高效盘",
    D310000000231: "高效盘",
    D310000000232: "经济盘",
    D310000000330: "高效盘",
    D310000000331: "高效盘",
    D310000000332: "经济盘",
  },
  {
    param: "轮对寿命",
    D310000000030: "100万公里",
    D310000000031: "120万公里",
    D310000000032: "80万公里",
    D310000000130: "100万公里",
    D310000000131: "120万公里",
    D310000000132: "80万公里",
    D310000000230: "100万公里",
    D310000000231: "120万公里",
    D310000000232: "80万公里",
    D310000000330: "100万公里",
    D310000000331: "120万公里",
    D310000000332: "80万公里",
  },
];

// 需要对比的参数列表
export const paramsToCompare = [
  "品名/物料名称",
  "品号",
  "图号",
  "品号-规格型号",
  "车型",
  "型号",
  "材质",
  "采购属性",
  "车轮踏面形式",
  "油漆制造商",
];

// 字段映射关系
export const fieldMap = {
  "品名/物料名称": "name",
  品号: "productNumber",
  图号: "drawingNumber",
  "品号-规格型号": "specificationModel",
  车型: "carModel",
  型号: "model",
  材质: "material",
  采购属性: "procurementAttributes",
  车轮踏面形式: "wheelTread",
  油漆制造商: "paintManufacturer",
};

// 定义可查询的字段
export const allFields = [
  { key: "productNumber", label: "品号" },
  { key: "name", label: "品名/物料名称" },
  { key: "drawingNumber", label: "图号" },
  { key: "specificationModel", label: "品号-规格型号" },
  { key: "carModel", label: "车型" },
  { key: "model", label: "型号" },
  { key: "material", label: "材质" },
  { key: "procurementAttributes", label: "采购属性" },
  { key: "wheelTread", label: "车轮踏面形式" },
  { key: "paintManufacturer", label: "油漆制造商" },
  { key: "image", label: "图片" },
];

// 模拟数据
export const mockData = [
  {
    productNumber: "D311299000045-00005",
    name: "非动力车轴（带喷漆）",
    drawingNumber: "ZQ1022009-001",
    specificationModel: "(GBTA2 ZQ/LRS EA4T)(Weckerle)-四方股份",
    carModel: "CR400AF",
    model: "GBTA2",
    material: null,
    procurementAttributes: "自采",
    wheelTread: null,
    paintManufacturer: "Weckerle",
    image: "/images/cars/1_1_1.jpg",
    selected: false,
  },
  {
    productNumber: "D311299000044-00005",
    name: "动力车轴（带喷漆）",
    drawingNumber: "ZQ1022009-004",
    specificationModel: "(GBDA2A ZQ/LRS EA4T)(Weckerle)-四方股份",
    carModel: "CR400AF",
    model: "GBDA2A",
    material: null,
    procurementAttributes: "自采",
    wheelTread: null,
    paintManufacturer: "Weckerle",
    image: "/images/cars/1_1_2.jpg",
    selected: false,
  },
  {
    productNumber: "D311102000025-00022",
    name: "非动力车轮（带降噪板+喷漆）",
    drawingNumber: "ZQ1014001-100(ZQ1014001-090)",
    specificationModel: "(GBTW21B 等级6 ZQ /LRS ER8)(天津纵横)Weckerle-CRC",
    carModel: "CR400BF",
    model: "GBTW21B",
    material: "ER8",
    procurementAttributes: "自采",
    wheelTread: "LMB10",
    paintManufacturer: "Weckerle",
    image: "/images/cars/1_2_1.jpg",
    selected: false,
  },
  {
    productNumber: "D311102000025-00021",
    name: "非动力车轮（带降噪板+喷漆）",
    drawingNumber: "ZQ1014001-100(ZQ1014001-090)",
    specificationModel: "(GBTW21B 等级3 ZQ /LRS ER8)(天津纵横)Weckerle-CRC",
    carModel: "CR400BF",
    model: "GBTW21B",
    material: "ER8",
    procurementAttributes: "自采",
    wheelTread: "LMB10",
    paintManufacturer: "Weckerle",
    image: "/images/cars/1_2.jpg",
    selected: false,
  },
  {
    productNumber: "D311199000035-00037",
    name: "动力车轮（带喷漆）",
    drawingNumber: "ZQ1014001-090",
    specificationModel: "(GBDW21B 等级5 ZQ/LRS ER8)Weckerle-CRC",
    carModel: "CR400BF",
    model: "GBDW21B",
    material: null,
    procurementAttributes: "自采",
    wheelTread: "LMB10",
    paintManufacturer: "Weckerle",
    image: "/images/cars/1_2_1_1.jpg",
    selected: false,
  },
  {
    productNumber: "D311199020097-00006",
    name: "精加工动力车轮",
    drawingNumber: "CCD2001-03-21-0001-DA",
    specificationModel: "GBDW21B 等级5 ZQ/LRS ER8-CRC",
    carModel: "CR400BF",
    model: "GBDW21B",
    material: null,
    procurementAttributes: "自采",
    wheelTread: "LMB10",
    paintManufacturer: "Weckerle",
    image: "/images/cars/2.jpg",
    selected: false,
  },
  {
    productNumber: "D311102010007-00037",
    name: "非动力车轮（带降噪板）",
    drawingNumber: "TKD0601-00-00-03",
    specificationModel: "(GBTW21B 等级5 ZQ/LRS ER8)(天津纵横)-CRC",
    carModel: "CR400BF",
    model: "GBDW21B",
    material: "ER8",
    procurementAttributes: "自采",
    wheelTread: "LMB10",
    paintManufacturer: null,
    image: "/images/cars/3.jpg",
    selected: false,
  },
  {
    productNumber: "D325000000014-10001",
    name: "右轴箱组成",
    drawingNumber: "ZQ1014001-117",
    specificationModel: "检修",
    carModel: "CR400BF",
    model: null,
    material: null,
    procurementAttributes: null,
    wheelTread: null,
    paintManufacturer: null,
    image: "/images/cars/4.jpg",
    selected: false,
  },
];

// 字段值关联映射 - 用于智能提示
export const fieldValueMap = {
  productNumber: [
    "D311299000045-00005",
    "D311299000044-00005",
    "D311102000025-00022",
    "D311102000025-00021",
    "D311199000035-00037",
    "D311199020097-00006",
    "D311102010007-00037",
    "D325000000014-10001",
  ],
  name: [
    "非动力车轴（带喷漆）",
    "动力车轴（带喷漆）",
    "非动力车轮（带降噪板+喷漆）",
    "动力车轮（带喷漆）",
    "精加工动力车轮",
    "非动力车轮（带降噪板）",
    "右轴箱组成",
  ],
  drawingNumber: [
    "ZQ1022009-001",
    "ZQ1022009-004",
    "ZQ1014001-100(ZQ1014001-090)",
    "ZQ1014001-090",
    "CCD2001-03-21-0001-DA",
    "TKD0601-00-00-03",
    "ZQ1014001-117",
  ],
  specificationModel: [
    "(GBTA2 ZQ/LRS EA4T)(Weckerle)-四方股份",
    "(GBDA2A ZQ/LRS EA4T)(Weckerle)-四方股份",
    "(GBTW21B 等级6 ZQ /LRS ER8)(天津纵横)Weckerle-CRC",
    "(GBTW21B 等级3 ZQ /LRS ER8)(天津纵横)Weckerle-CRC",
    "(GBDW21B 等级5 ZQ/LRS ER8)Weckerle-CRC",
    "(GBTW21B 等级5 ZQ/LRS ER8)(天津纵横)-CRC",
    "GBDW21B 等级5 ZQ/LRS ER8-CRC",
    "检修",
  ],
  carModel: ["CR400AF", "CR400BF"],
  model: ["GBTA2", "GBDA2A", "GBTW21B", "GBDW21B"],
  material: ["ER8"],
  procurementAttributes: ["自采"],
  wheelTread: ["LMB10"],
  paintManufacturer: ["Weckerle"],
  image: [
    "/images/cars/1_1_1.jpg",
    "/images/cars/1_1_2.jpg",
    "/images/cars/1_2_1.jpg",
    "/images/cars/1_2.jpg",
    "/images/cars/1_2_1_1.jpg",
    "/images/cars/2.jpg",
    "/images/cars/3.jpg",
    "/images/cars/4.jpg",
  ],
};
