1
0

Outbound.ets 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. import { TitleStateComp } from '../common/component/TitleStateComp'
  2. import { CompleteSet } from '../view/CompleteSet'
  3. @Entry
  4. @Component
  5. struct Outbound{
  6. //齐套按钮:0、手动出库:1、调仓:2.统计:3
  7. @State inboundButton:number=0
  8. //仓储和其他仓储点击按钮变色
  9. @State warehouseButton:number=0
  10. @State isHomePage:boolean=false
  11. build() {
  12. Column(){
  13. TitleStateComp({ isHomePage: this.isHomePage,})
  14. Column(){
  15. Row({space:10}){
  16. Row(){
  17. Text('智能仓储')
  18. .textAlign(TextAlign.Center)
  19. .borderRadius(px2vp(16))
  20. .width('48%')
  21. .height('100%')
  22. .fontWeight(FontWeight.Medium)
  23. .fontSize(px2vp(24))
  24. .fontColor(this.warehouseButton===0?$r('app.color.black_90'):$r('app.color.black_60'))
  25. .backgroundColor(this.warehouseButton===0?$r('app.color.process_divider_white_color'):'')
  26. .onClick(()=>{
  27. this.warehouseButton=0
  28. })
  29. Blank()
  30. Text('其他仓储')
  31. .textAlign(TextAlign.Center)
  32. .borderRadius(px2vp(16))
  33. .width('48%')
  34. .height('100%')
  35. .fontWeight(FontWeight.Medium)
  36. .fontSize(px2vp(24))
  37. .fontColor(this.warehouseButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
  38. .backgroundColor(this.warehouseButton===1?$r('app.color.process_divider_white_color'):'')
  39. .onClick(()=>{
  40. this.warehouseButton=1
  41. })
  42. }.width('33%')
  43. .borderRadius(px2vp(15))
  44. .height('100%')
  45. .backgroundColor($r('app.color.black_10'))
  46. Row(){
  47. Text('齐套')
  48. .textAlign(TextAlign.Center)
  49. .borderRadius(px2vp(16))
  50. .width('25%')
  51. .height('100%')
  52. .fontWeight(FontWeight.Medium)
  53. .fontSize(px2vp(24))
  54. .fontColor(this.inboundButton===0?$r('app.color.black_90'):$r('app.color.black_60'))
  55. .backgroundColor(this.inboundButton===0?$r('app.color.process_divider_white_color'):'')
  56. .onClick(()=>{
  57. this.inboundButton=0
  58. })
  59. Text('手动出库')
  60. .textAlign(TextAlign.Center)
  61. .borderRadius(px2vp(16))
  62. .width('25%')
  63. .height('100%')
  64. .fontWeight(FontWeight.Medium)
  65. .fontSize(px2vp(24))
  66. .fontColor(this.inboundButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
  67. .backgroundColor(this.inboundButton===1?$r('app.color.process_divider_white_color'):'')
  68. .onClick(()=>{
  69. this.inboundButton=1
  70. })
  71. Text('调仓')
  72. .textAlign(TextAlign.Center)
  73. .borderRadius(px2vp(16))
  74. .width('25%')
  75. .height('100%')
  76. .fontWeight(FontWeight.Medium)
  77. .fontSize(px2vp(24))
  78. .fontColor(this.inboundButton===2?$r('app.color.black_90'):$r('app.color.black_60'))
  79. .backgroundColor(this.inboundButton===2?$r('app.color.process_divider_white_color'):'')
  80. .onClick(()=>{
  81. this.inboundButton=2
  82. })
  83. Text('统计')
  84. .textAlign(TextAlign.Center)
  85. .borderRadius(px2vp(16))
  86. .width('25%')
  87. .height('100%')
  88. .fontWeight(FontWeight.Medium)
  89. .fontSize(px2vp(24))
  90. .fontColor(this.inboundButton===3?$r('app.color.black_90'):$r('app.color.black_60'))
  91. .backgroundColor(this.inboundButton===3?$r('app.color.process_divider_white_color'):'')
  92. .onClick(()=>{
  93. this.inboundButton=3
  94. })
  95. }.width('67%')
  96. .borderRadius(px2vp(15))
  97. .height('100%')
  98. .backgroundColor($r('app.color.black_10'))
  99. }.width('100%')
  100. .height('8%')
  101. if (this.warehouseButton===0&&this.inboundButton===0){
  102. Column(){
  103. CompleteSet()
  104. }.width('100%')
  105. .height('92%')
  106. }
  107. }.width('100%')
  108. .height('92%')
  109. .padding({left:px2vp(50),right:px2vp(50)})
  110. .backgroundColor($r('app.color.white_f1f3f5'))
  111. }.width('100%')
  112. .height('100%')
  113. }
  114. }