Explorar el Código

物料齐套扫码 允许物料的手动修改数量和删除已扫物料

jiaxiaoqiang hace 9 meses
padre
commit
d2386ff11d
Se han modificado 1 ficheros con 27 adiciones y 3 borrados
  1. 27 3
      entry/src/main/ets/view/CompleteSet.ets

+ 27 - 3
entry/src/main/ets/view/CompleteSet.ets

@@ -936,10 +936,20 @@ export struct CompleteSet {
 
                     Column() {
                       Row() {
-                        Text(item.num?.toString())
-                          .fontSize($r('app.float.fontSize_38'))
-                          .fontColor($r('app.color.general_font_color'))
+                        // 可以更改数量的输入框
+                        TextInput({ text: item.num?.toString() })
+                          .fontSize(14)
                           .fontWeight(FontWeight.Bold)
+                          .fontColor($r('app.color.general_font_color'))// .opacity($r('app.float.general_font_opacity'))
+                          .height(30)
+                          .width(150)
+                          .type(InputType.Number)
+                          .textAlign(TextAlign.Start)
+                          .borderRadius(0)
+                          .border({ width: 0.4 })
+                          .onChange((value) => {
+                            item.num = Number(value)
+                          })
                         Text(item.unitDictLabel ?? "个")
                           .fontSize($r('app.float.fontSize_20'))
                           .fontColor($r('app.color.process_nameplate_grey_color'))
@@ -959,6 +969,20 @@ export struct CompleteSet {
                     }
                     .height('50%')
                     .width('100%')
+
+
+                    // 删除按钮
+                    Row() {
+                      Image($r("app.media.reduce")).width(25).height(5)
+                    }
+                    .width(30)
+                    .height(30)
+                    .position({ x: '90%', y: 8 })
+                    .alignItems(VerticalAlign.Center)
+                    .justifyContent(FlexAlign.Center)
+                    .onClick(() => {
+                      this.MaterialInformation.splice(index, 1)
+                    })
                   }
                   .width('100%')
                   .borderRadius($r('app.float.general_border_radius'))