hh 2 nedēļas atpakaļ
vecāks
revīzija
cc2c430676

+ 176 - 63
entry/src/main/ets/pages/Index.ets

@@ -13,7 +13,126 @@ struct Index {
   // 工单列表
   @State workOrders: WorkOrderInfo[] = []
   // 选中工单
-  @State selectWorkOder: WorkOrderInfo = {}
+  @State selectWorkOder: WorkOrderInfo = {
+    beforeNum: '0.00',
+    completeNum:'0.00',
+    inventoryNum:'0.00',
+    materialCode:'GAS-RTA',
+    materialModel: 'N2纯度99.9999%,露点<-70°C',
+    materialName:'快速退火气体',
+    ops:[
+      {
+        exists:false,
+        firstCheck:0,
+        inspection:0,
+        mutualInspection:0,
+        opComplete:false,
+        operationCode:'GX-SFZB',
+        operationId:'679',
+        operationName:'三防准备',
+        operationSort:0,
+        selfCheck:0,
+        seqs:[],
+        specialInspection:0,
+        workOrderCode:'10.25.0022'
+      },
+      {
+        exists:false,
+        firstCheck:0,
+        inspection:0,
+        mutualInspection:0,
+        opComplete:false,
+        operationCode:'GX-CXSL',
+        operationId:'680',
+        operationName:'程序烧录',
+        operationSort:1,
+        selfCheck:0,
+        seqs:[],
+        specialInspection:0,
+        workOrderCode:'10.25.0022'
+      },
+      {
+        exists:true,
+        firstCheck:0,
+        inspection:0,
+        mutualInspection:0,
+        opComplete:false,
+        operationCode:'GX-WGJC',
+        operationId:'681',
+        operationName:'外观检测',
+        operationSort:2,
+        selfCheck:0,
+        seqs:[
+          {
+            currentTask:'当前进度:包装工位1(三防准备)',
+            seqNo:'10.25.0022-0001',
+            state:'0'
+          }
+        ],
+        specialInspection:0,
+        workOrderCode:'10.25.0022'
+      },
+      {
+        exists:false,
+        firstCheck:0,
+        inspection:0,
+        mutualInspection:0,
+        opComplete:false,
+        operationCode:'GX-JY',
+        operationId:'682',
+        operationName:'检验',
+        operationSort:3,
+        selfCheck:0,
+        seqs:[],
+        specialInspection:0,
+        workOrderCode:'10.25.0022'
+      },
+      {
+        exists:false,
+        firstCheck:0,
+        inspection:0,
+        mutualInspection:0,
+        opComplete:false,
+        operationCode:'GJ-WWSF',
+        operationId:'683',
+        operationName:'委外三防',
+        operationSort:4,
+        selfCheck:0,
+        seqs:[],
+        specialInspection:0,
+        workOrderCode:'10.25.0022'
+      },
+      {
+        exists:false,
+        firstCheck:0,
+        inspection:0,
+        mutualInspection:0,
+        opComplete:false,
+        operationCode:'GJ-GDWCC',
+        operationId:'677',
+        operationName:'高低温存储',
+        operationSort:5,
+        selfCheck:0,
+        seqs:[],
+        specialInspection:0,
+        workOrderCode:'10.25.0022'
+      }
+    ],
+    orderCode:'DD2505140001',
+    orderName:'GAS-RTA',
+    planNum:'1.00',
+    planStartEnd:'2025-05-16 08:26:00',
+    planStartWhen:'2025-05-16 08:00:00',
+    processRouteCode:'GAS-RTA',
+    processRouteId:147,
+    processRouteName:'GAS-RTA',
+    productLineId:'18',
+    productLineName:'配件产线01',
+    workOrderCode:'10.25.0022',
+    workOrderState:'3',
+    workshopId:'0',
+    workshopName:'青半002'
+  }
   // 工位通知数量
   @State noticeNum: number = 100
 
@@ -107,7 +226,7 @@ struct Index {
           .backgroundColor($r('app.color.20FFFFFF'))
           .borderRadius($r('app.float.fontSize_16'))
           // 工序
-          Column({space: 3}) {
+          Column({space: 4}) {
             Row() {
               Text('工序')
                 .fontWeight(FontWeight.Medium)
@@ -120,67 +239,61 @@ struct Index {
             List() {
               ForEach(this.selectWorkOder.ops!, (item: OperationInfo, index: number) => {
                 ListItem() {
-                  // Column() {
-                  //   Row({ space: 4 }) {
-                  //     Stack() {
-                  //       Circle()
-                  //         .width('100%')
-                  //         .height('100%')
-                  //         .fillOpacity(0)
-                  //         .strokeWidth('1px')
-                  //         .stroke(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_selected_background'))
-                  //       Row() {
-                  //         Text(JSON.stringify(item.step))
-                  //           .fontSize($r('app.float.process_step_font_size'))
-                  //           .fontColor(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_font_default_color'))
-                  //           .fontWeight(FontWeight.Bold)
-                  //           .padding({ right: 3 })
-                  //       }
-                  //       .width('100%')
-                  //       .height('100%')
-                  //       .alignItems(VerticalAlign.Center)
-                  //       .justifyContent(FlexAlign.Center)
-                  //     }
-                  //     .width('20%')
-                  //     .height('100%')
-                  //
-                  //     Text(item.processName)
-                  //       .fontSize($r('app.float.three_text_size'))
-                  //       .fontColor(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_font_default_color'))
-                  //       .fontWeight(FontWeight.Bold)
-                  //     Blank()
-                  //     Text(item.completedQuantity.toString())
-                  //       .fontSize($r('app.float.card_large_font_size'))
-                  //       .fontColor(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_font_default_color'))
-                  //       .fontWeight(FontWeight.Bold)
-                  //   }
-                  //   .width('100%')
-                  //   .height('70%')
-                  //   .justifyContent(FlexAlign.Start)
-                  //   .backgroundColor(this.selectProcess === item.step ? $r('app.color.card_selected_background') : $r('app.color.card_default_background'))
-                  //   .borderRadius('70px')
-                  //   .padding({ right: '5%' })
-                  //   .border({ color: $r('app.color.card_selected_background'), width: '1px' })
-                  //   .onClick(() => {
-                  //     this.selectProcess = item.step
-                  //   })
-                  //
-                  //   if (index < this.processes.length - 1) {
-                  //     Row() {
-                  //       Divider()
-                  //         .vertical(true)
-                  //         .color($r('app.color.divider_horizontal_color'))
-                  //         .strokeWidth('1px')
-                  //         .padding({ right: 3 })
-                  //     }
-                  //     .justifyContent(FlexAlign.Center)
-                  //     .width('20%')
-                  //     .layoutWeight(1)
-                  //   }
-                  // }
-                  // .width('100%')
-                  // .height('20%')
-                  // .alignItems(HorizontalAlign.Start)
+                  Column() {
+                    Row({ space: 4 }) {
+                      Stack() {
+                        Circle()
+                          .width('100%')
+                          .height('100%')
+                          .fillOpacity(0)
+                          .stroke($r('app.color.60FFFFFF'))
+                          .strokeWidth('1px')
+                        Row() {
+                          Text((index + 1).toString())
+                            .fontSize($r('app.float.fontSize_16'))
+                            .fontColor($r('app.color.FFFFFF'))
+                            .fontWeight(FontWeight.Bold)
+                        }
+                        .width('100%')
+                        .height('100%')
+                        .alignItems(VerticalAlign.Center)
+                        .justifyContent(FlexAlign.Center)
+                        .margin({right: '15%'})
+                      }
+                      .width('20%')
+                      .height('100%')
+
+                      Text(item.operationName)
+                        .fontSize($r('app.float.fontSize_16'))
+                        .fontColor( $r('app.color.FFFFFF'))
+                        .fontWeight(FontWeight.Regular)
+                    }
+                    .width('100%')
+                    .height('70%')
+                    .backgroundColor($r('app.color.20FFFFFF'))
+                    .borderRadius($r('app.float.virtualSize_40'))
+                    .justifyContent(FlexAlign.Start)
+                    .padding({ right: '5%' })
+                    .onClick(() => {
+
+                    })
+
+                    if (index < this.selectWorkOder.ops!.length - 1) {
+                      Row() {
+                        Divider()
+                          .vertical(true)
+                          .color($r('app.color.60FFFFFF'))
+                          .strokeWidth('1px')
+                          .padding({ right: '15%' })
+                      }
+                      .justifyContent(FlexAlign.Center)
+                      .width('20%')
+                      .layoutWeight(1)
+                    }
+                  }
+                  .width('100%')
+                  .height('10.6%')
+                  .alignItems(HorizontalAlign.Start)
                 }
               })
             }

+ 4 - 0
entry/src/main/resources/base/element/font.json

@@ -9,6 +9,10 @@
       "value": "28.8vp"
     },
     {
+      "name": "virtualSize_40",
+      "value": "24vp"
+    },
+    {
       "name": "virtualSize_32",
       "value": "25.2vp"
     },