Jelajahi Sumber

工序样式修改

hh 2 bulan lalu
induk
melakukan
a3638cb194

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

@@ -136,11 +136,13 @@ struct Index {
   }
   // 工位通知数量
   @State noticeNum: number = 100
+  // 扫描或手动输入的物料编码
+  @State scanCode: string = ''
 
   pageNo: number = 1
   pageSize: number = 9
 
-  SelectOrderController: CustomDialogController = new CustomDialogController({
+  selectOrderController: CustomDialogController = new CustomDialogController({
     builder: SelectOrderDialog({}),
     autoCancel: true, // 点击遮罩关闭
     customStyle: true,
@@ -148,8 +150,8 @@ struct Index {
   })
 
   async aboutToAppear() {
-    this.SelectOrderController.open()
     if (!this.selectWorkOder || !this.selectWorkOder.workOrderCode) {
+      this.selectOrderController.open()
       // this.workOrders = await ProcessRequest.post('/api/v1/plan/workOrder/taskPage', {
       //   //查询未完成的工单
       //   queryComplete: 0,
@@ -197,7 +199,7 @@ struct Index {
             .backgroundColor($r('app.color.20FFFFFF'))
             .borderRadius($r('app.float.fontSize_16'))
             .onClick(()=>{
-              this.SelectOrderController.open()
+              this.selectOrderController.open()
             })
           // 工位、人员信息
           Row() {
@@ -252,40 +254,32 @@ struct Index {
               ForEach(this.selectWorkOder.ops!, (item: OperationInfo, index: number) => {
                 ListItem() {
                   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%'})
+                    Row({space: 5}) {
+                      Row() {
+                        Text((index + 1).toString())
+                          .fontSize($r('app.float.fontSize_16'))
+                          .fontColor($r('app.color.FFFFFF'))
+                          .fontWeight(FontWeight.Bold)
                       }
-                      .width('20%')
-                      .height('100%')
-
-                      Text(item.operationName)
-                        .fontSize($r('app.float.fontSize_16'))
-                        .fontColor( $r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Regular)
+                      .width('16.7%')
+                      .height('80%')
+                      .justifyContent(FlexAlign.Center)
+                      Row() {
+                        Text(item.operationName)
+                          .fontSize($r('app.float.fontSize_16'))
+                          .fontColor( $r('app.color.FFFFFF'))
+                          .fontWeight(FontWeight.Regular)
+                      }
+                      .width('100%')
+                      .height('70%')
+                      .alignItems(VerticalAlign.Center)
+                      .justifyContent(FlexAlign.Start)
                     }
                     .width('100%')
                     .height('70%')
-                    .backgroundColor($r('app.color.20FFFFFF'))
                     .borderRadius($r('app.float.virtualSize_40'))
-                    .justifyContent(FlexAlign.Start)
-                    .padding({ right: '5%' })
+                    .backgroundImage($r('app.media.process_no_select_operation'))
+                    .backgroundImageSize(ImageSize.Cover)
                     .onClick(() => {
 
                     })
@@ -295,7 +289,6 @@ struct Index {
                         Divider()
                           .vertical(true)
                           .color($r('app.color.60FFFFFF'))
-                          .strokeWidth('1px')
                           .padding({ right: '15%' })
                       }
                       .justifyContent(FlexAlign.Center)
@@ -322,11 +315,47 @@ struct Index {
         .width('19.8%')
         .justifyContent(FlexAlign.SpaceBetween)
         // 右侧生产操作栏
-        Column() {
+        Column({space: 5}) {
+          Row() {
+            Text('扫描流水/序列/铭牌号')
+              .fontSize($r('app.float.fontSize_16'))
+              .fontWeight(FontWeight.Regular)
+              .fontColor($r('app.color.FFFFFF'))
+          }
+          .width('25%')
+          Row() {
+            Row().width('3.4%')
+            // 左侧二维码图标
+            Image($r('app.media.material_qr_code')) // 请替换为您的二维码图片资源
+              .width($r('app.float.virtualSize_24'))
+              .height($r('app.float.virtualSize_24'))
+              .fillColor($r('app.color.FFFFFF'))
+            // 扫码输入框
+            TextInput({ placeholder: '请扫描物料编码', text: this.scanCode })
+              .type(InputType.Normal)
+              .placeholderFont({ size: $r('app.float.fontSize_16')})
+              .placeholderColor($r('app.color.30FFFFFF'))
+              .fontSize($r('app.float.fontSize_16'))
+              .fontColor($r('app.color.FFFFFF'))
+              .enableKeyboardOnFocus(false)
+              .onChange((value: string) => {
+                this.scanCode = value
+              })
+              .onSubmit(async () => {
 
+              })
+          }
+          .width('26.4%')
+          .height('6.5%')
+          .borderRadius($r('app.float.virtualSize_16'))
+          .backgroundColor($r('app.color.000000'))
+          .justifyContent(FlexAlign.Start)
         }
         .width('79.1%')
         .height('100%')
+        .justifyContent(FlexAlign.Center)
+        .backgroundColor($r('app.color.20FFFFFF'))
+        .borderRadius($r('app.float.fontSize_16'))
       }
       .height('80%')
       .width('94.8%')

File diff ditekan karena terlalu besar
+ 3 - 0
entry/src/main/resources/base/media/material_qr_code.svg


TEMPAT SAMPAH
entry/src/main/resources/base/media/process_no_select_operation.png


TEMPAT SAMPAH
entry/src/main/resources/base/media/process_select_operation.png