import {TimeAndTitle} from "../component/TimeAndTitle"
import {NavigationBar} from '../component/NavigationBar'
import {StorageList} from '../component/MenuView'
import {InOrder} from '../params/OrderMaterialsStorageParams'
import router from '@ohos.router';
@Entry
@Component
struct menu {
  @State materialBoxID: string = 'LX-00010';
  @State inboundOrderList: InOrder [] = [
  // 第一行物料箱
    {
      id: "电路板（ASFSDFSADFASDFSADFDDASFASDFA...",
      orderNumber: "仓储机器人生产订单1231231231231231",
      date: "2025/11/11",
      progress: "400",
      status: "入库/计划数量"
    },{
    id: "电路板（ASFSDFSADFASDFSADFDDASFASDFA...",
    orderNumber: "仓储机器人生产订单1231231231231231",
    date: "2025/11/11",
    progress: "400",
    status: "入库/计划数量"
  },{
    id: "电路板（ASFSDFSADFASDFSADFDDASFASDFA...",
    orderNumber: "仓储机器人生产订单1231231231231231",
    date: "2025/11/11",
    progress: "400",
    status: "入库/计划数量"
  },{
    id: "电路板（ASFSDFSADFASDFSADFDDASFASDFA...",
    orderNumber: "仓储机器人生产订单1231231231231231",
    date: "2025/11/11",
    progress: "400",
    status: "入库/计划数量"
  },{
    id: "电路板（ASFSDFSADFASDFSADFDDASFASDFA...",
    orderNumber: "仓储机器人生产订单1231231231231231",
    date: "2025/11/11",
    progress: "400",
    status: "入库/计划数量"
  },{
    id: "电路板（ASFSDFSADFASDFSADFDDASFASDFA...",
    orderNumber: "仓储机器人生产订单1231231231231231",
    date: "2025/11/11",
    progress: "400",
    status: "入库/计划数量"
  }]
  build() {
    Row() {
      Column() {
        //时间和导航标
        Row(){
          TimeAndTitle()
        }.width('100%')
        .height('3.4%')
        .alignItems(VerticalAlign.Bottom)
        .justifyContent(FlexAlign.End)
        Row(){
          Text('< 智能仓储')
            .fontColor($r('app.color.FFFFFF'))
            .fontSize($r('app.float.fontSize_15_2'))
        }
        .height('4%')
        .width('100%')
        .justifyContent(FlexAlign.Start)
        .margin({left:'5%'})
        Row(){
          NavigationBar().width('20%')
        }
        .width('100%')
        .height('4%')
        .justifyContent(FlexAlign.End)

        Row(){
          Column(){
            Text("入库")
              .fontColor($r('app.color.FFFFFF'))
              .fontSize($r('app.float.fontSize_15_2'))
            Column() {
                Text('空箱入库')
                  .fontSize($r('app.float.fontSize_15_2'))
                  .fontColor($r('app.color.FFFFFF'))
                  .fontWeight(FontWeight.Medium)
                Text('料箱编码打印和写入磁卡')
                  .fontSize($r('app.float.fontSize_6_4'))
                  .fontColor($r('app.color.FFFFFF'))
                  .fontWeight(FontWeight.Lighter)
            }
            .justifyContent(FlexAlign.Center)
            .width('100%')
            .height('23%')
            .borderRadius($r('app.float.virtualSize_6_4'))
            .backgroundImage($r("app.media.home_bg_process_management"))
            .backgroundImageSize(ImageSize.Cover)
            .onClick(()=>{
              router.pushUrl({
                url: 'pages/EmptyBoxStorage'
              })
            })
            Column() {
              Text('订单物料入库')
                .fontSize($r('app.float.fontSize_15_2'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Medium)
              Text('物料绑定料箱和订单')
                .fontSize($r('app.float.fontSize_6_4'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Lighter)
            }
            .justifyContent(FlexAlign.Center)
            .width('100%')
            .height('46%')
            .borderRadius($r('app.float.virtualSize_6_4'))
            .backgroundImage($r("app.media.home_bg_process_management"))
            .backgroundImageSize(ImageSize.Cover)
            .onClick(()=>{
              router.pushUrl({
                url: 'pages/OrderMaterialsStorage'
              })
            })
            Column() {
              Text('零星物料入库')
                .fontSize($r('app.float.fontSize_15_2'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Medium)
              Text('物料绑定料箱')
                .fontSize($r('app.float.fontSize_6_4'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Lighter)
            }
            .justifyContent(FlexAlign.Center)
            .width('100%')
            .height('23%')
            .borderRadius($r('app.float.virtualSize_6_4'))
            .backgroundImage($r("app.media.home_bg_process_management"))
            .backgroundImageSize(ImageSize.Cover)
          }.justifyContent(FlexAlign.SpaceAround)
          .height('95%')
          .width('30%')
          .alignItems(HorizontalAlign.Start)
          Divider()
            .vertical(true)
            .strokeWidth(1)
            .color($r('app.color.10FFFFFF'))
            .height('95%')
          Column(){
            Text("齐套/出库")
              .fontColor($r('app.color.FFFFFF'))
              .fontSize($r('app.float.fontSize_15_2'))
            Column() {
              Text('工序齐套')
                .fontSize($r('app.float.fontSize_15_2'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Medium)
              Text('物料绑定料箱和工序')
                .fontSize($r('app.float.fontSize_6_4'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Lighter)
            }
            .justifyContent(FlexAlign.Center)
            .width('100%')
            .height('70%')
            .borderRadius($r('app.float.virtualSize_6_4'))
            .backgroundImage($r("app.media.home_bg_process_management"))
            .backgroundImageSize(ImageSize.Cover)
            Column() {
              Text('零星物料出库')
                .fontSize($r('app.float.fontSize_15_2'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Medium)
              Text('物料查询并调取')
                .fontSize($r('app.float.fontSize_6_4'))
                .fontColor($r('app.color.FFFFFF'))
                .fontWeight(FontWeight.Lighter)
            }
            .justifyContent(FlexAlign.Center)
            .width('100%')
            .height('23%')
            .borderRadius($r('app.float.virtualSize_6_4'))
            .backgroundImage($r("app.media.home_bg_process_management"))
            .backgroundImageSize(ImageSize.Cover)
          } .alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.SpaceAround).height('95%').width('30%')
          Divider()
            .vertical(true)
            .strokeWidth(1)
            .color($r('app.color.10FFFFFF'))
            .height('95%')
          Column(){
            Text("  ")
              .fontColor($r('app.color.FFFFFF'))
              .fontSize($r('app.float.fontSize_15_2'))
            StorageList({title:"入库单",storageData: this.inboundOrderList }).height('46%')
            StorageList({title:"出库单",storageData: this.inboundOrderList }).height('46%');
          }.alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.SpaceAround).height('95%').width('30%')
        }
        .height('88.6%')
        .width('100%')
        .alignItems(VerticalAlign.Top)
        .justifyContent(FlexAlign.SpaceAround)

      }
      .width('100%')
    }
    .height('100%')
    .backgroundColor($r('app.color.000000'))
  }
}