OrderMaterialStorageThirdStep.ets 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import {MaterialListComponent} from "../../component/OrderMaterialsStorageView"
  2. import {OrderParams,DemandMaterial,MaterialBox, EmptyBox} from "../../params/OrderMaterialsStorageParams"
  3. import {InBoundView} from '../../component/InBoundView'
  4. @Component
  5. export struct OrderMaterialStorageThirdStep {
  6. @State messages:string[] = []
  7. @Link currentStep: number
  8. @State orders:OrderParams[]= [
  9. { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
  10. { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
  11. { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' },
  12. { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
  13. { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
  14. { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
  15. ]
  16. build() {
  17. Column(){
  18. Row(){
  19. Column(){
  20. Row(){
  21. Column(){
  22. Text("扫码录入")
  23. .fontColor($r('app.color.FFFFFF'))
  24. .fontSize($r('app.float.fontSize_15_2'))
  25. Text('电机生产订单DWS123331223332(电路板-SDASDASFSADASD)')
  26. .fontColor($r('app.color.FFFFFF'))
  27. .fontSize($r('app.float.fontSize_8'))
  28. }.height('100%').width('65%').alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.Center)
  29. Row() {
  30. // 左侧二维码图标
  31. Image($r('app.media.material_qr_code')) // 请替换为您的二维码图片资源
  32. .width($r('app.float.virtualSize_16_8'))
  33. .height($r('app.float.virtualSize_16_8'))
  34. .fillColor($r('app.color.FFFFFF'))
  35. .margin({left:'2%'})
  36. // 扫码输入框
  37. TextInput({ placeholder: '请扫描物料编码' })
  38. .type(InputType.Normal)
  39. .placeholderFont({ size: $r('app.float.fontSize_12')})
  40. .placeholderColor($r('app.color.30FFFFFF'))
  41. .fontSize($r('app.float.fontSize_12'))
  42. .fontColor($r('app.color.FFFFFF'))
  43. }.width('35%')
  44. .borderRadius($r('app.float.virtualSize_7_2'))
  45. .backgroundColor($r('app.color.000000'))
  46. }.justifyContent(FlexAlign.Start)
  47. .height('10%')
  48. .width('95%')
  49. .justifyContent(FlexAlign.Center)
  50. Row() {
  51. MaterialListComponent({orders:this.orders}).width('95%')
  52. }.width('100%').height('90%').justifyContent(FlexAlign.Center)
  53. }.width('62%').backgroundColor($r('app.color.10FFFFFF'))
  54. Image($r('app.media.arrow_right'))
  55. .width($r('app.float.virtualSize_23'))
  56. .height($r('app.float.virtualSize_23'))
  57. .fillColor($r('app.color.FFFFFF'))
  58. .margin({left:'-2%',right:'-2%'})
  59. Column(){
  60. InBoundView({messages:this.messages})
  61. }.width('29%').backgroundColor($r('app.color.10FFFFFF'))
  62. }
  63. .height('85%')
  64. .justifyContent(FlexAlign.SpaceEvenly)
  65. .width('100%')
  66. Row({space:15}){
  67. Button({type:ButtonType.Normal}) {
  68. Text("第一步")
  69. .fontSize($r('app.float.fontSize_12'))
  70. .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
  71. }
  72. .width('22%')
  73. .height('100%')
  74. .backgroundColor($r('app.color.20FFFFFF'))
  75. .borderRadius($r('app.float.virtualSize_6_4'))
  76. // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
  77. .onClick(() => {
  78. this.currentStep = 1;
  79. })
  80. Button({type:ButtonType.Normal}) {
  81. Text("上一步")
  82. .fontSize($r('app.float.fontSize_12'))
  83. .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
  84. }
  85. .width('22%')
  86. .height('100%')
  87. .backgroundColor($r('app.color.20FFFFFF'))
  88. .borderRadius($r('app.float.virtualSize_6_4'))
  89. // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
  90. .onClick(() => {
  91. this.currentStep = 2;
  92. })
  93. }.width('100%').height('6%').justifyContent(FlexAlign.Start).margin({bottom:'3%',left:'5%'})
  94. }.height('83.6%').margin({top:'3%'}).width('100%')
  95. .justifyContent(FlexAlign.SpaceAround)
  96. .width('100%')
  97. }
  98. }