OutboundStation.ets 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. import { TitleStateComp } from '../common/component/TitleStateComp'
  2. import { CompleteSet } from '../view/CompleteSet'
  3. import { Statistics } from '../view/Statistics'
  4. import { AdjustStorageView } from '../view/storage/AdjustStorageView'
  5. import { ManualOutbound } from '../view/ManualOutbound'
  6. import { WarehouseMap } from './WarehouseMap'
  7. /*
  8. * 出库工位
  9. * */
  10. @Entry
  11. @Component
  12. struct OutboundStation {
  13. //齐套按钮(0:齐套 1:手动出库 2:调仓:3:统计)
  14. @State inboundButton: number = 0
  15. @State Button: number = 0
  16. //仓储和其他仓储点击按钮变色
  17. @State warehouseButton: number = 0
  18. @State isHomePage: boolean = false
  19. build() {
  20. Column() {
  21. TitleStateComp({ isHomePage: this.isHomePage, })
  22. Column() {
  23. Row({ space: px2vp(24) }) {
  24. Row() {
  25. Text('智能仓储')
  26. .textAlign(TextAlign.Center)
  27. .borderRadius(px2vp(16))
  28. .width(px2vp(292))
  29. .height(px2vp(80))
  30. .fontWeight(FontWeight.Medium)
  31. .fontSize(px2vp(24))
  32. .fontColor(this.warehouseButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
  33. .backgroundColor(this.warehouseButton === 0 ? $r('app.color.process_divider_white_color') : '')
  34. .onClick(() => {
  35. this.warehouseButton = 0
  36. })
  37. Blank()
  38. // Text('xxxxxxx')
  39. // .textAlign(TextAlign.Center)
  40. // .borderRadius(px2vp(16))
  41. // .width(px2vp(292))
  42. // .height(px2vp(80))
  43. // .fontWeight(FontWeight.Medium)
  44. // .fontSize(px2vp(24))
  45. // .fontColor(this.warehouseButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
  46. // .backgroundColor(this.warehouseButton===1?$r('app.color.process_divider_white_color'):'')
  47. // .onClick(()=>{
  48. // this.warehouseButton=1
  49. // })
  50. }
  51. .width(px2vp(608))
  52. .borderRadius(px2vp(16))
  53. .height(px2vp(80))
  54. .backgroundColor($r('app.color.black_10'))
  55. Row({ space: px2vp(24) }) {
  56. Text('齐套')
  57. .textAlign(TextAlign.Center)
  58. .borderRadius(px2vp(16))
  59. .width(px2vp(292))
  60. .height(px2vp(80))
  61. .fontWeight(FontWeight.Medium)
  62. .fontSize(px2vp(24))
  63. .fontColor(this.inboundButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
  64. .backgroundColor(this.inboundButton === 0 ? $r('app.color.process_divider_white_color') : '')
  65. .onClick(() => {
  66. this.inboundButton = 0
  67. })
  68. Text('手动出库')
  69. .textAlign(TextAlign.Center)
  70. .borderRadius(px2vp(16))
  71. .width(px2vp(292))
  72. .height(px2vp(80))
  73. .fontWeight(FontWeight.Medium)
  74. .fontSize(px2vp(24))
  75. .fontColor(this.inboundButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
  76. .backgroundColor(this.inboundButton === 1 ? $r('app.color.process_divider_white_color') : '')
  77. .onClick(() => {
  78. this.inboundButton = 1
  79. })
  80. Text('调仓')
  81. .textAlign(TextAlign.Center)
  82. .borderRadius(px2vp(16))
  83. .width(px2vp(292))
  84. .height(px2vp(80))
  85. .fontWeight(FontWeight.Medium)
  86. .fontSize(px2vp(24))
  87. .fontColor(this.inboundButton === 2 ? $r('app.color.black_90') : $r('app.color.black_60'))
  88. .backgroundColor(this.inboundButton === 2 ? $r('app.color.process_divider_white_color') : '')
  89. .onClick(() => {
  90. this.inboundButton = 2
  91. })
  92. Text('统计')
  93. .textAlign(TextAlign.Center)
  94. .borderRadius(px2vp(16))
  95. .width(px2vp(146))
  96. .height(px2vp(80))
  97. .fontWeight(FontWeight.Medium)
  98. .fontSize(px2vp(24))
  99. .fontColor(this.inboundButton === 3 ? $r('app.color.black_90') : $r('app.color.black_60'))
  100. .backgroundColor(this.inboundButton === 3 ? $r('app.color.process_divider_white_color') : '')
  101. .onClick(() => {
  102. this.inboundButton = 3
  103. })
  104. Text('叫车')
  105. .textAlign(TextAlign.Center)
  106. .borderRadius(px2vp(16))
  107. .width(px2vp(124))
  108. .height(px2vp(80))
  109. .fontWeight(FontWeight.Medium)
  110. .fontSize(px2vp(24))
  111. .fontColor(this.Button === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
  112. .backgroundColor(this.Button === 1 ? $r('app.color.process_divider_white_color') : '')
  113. .onClick(() => {
  114. this.Button = 1
  115. })
  116. }.width(px2vp(1240))
  117. .borderRadius(px2vp(16))
  118. .height(px2vp(80))
  119. .backgroundColor($r('app.color.black_10'))
  120. }
  121. .width(px2vp(1920))
  122. .height(px2vp(80))
  123. .padding({ left: px2vp(24), right: px2vp(24) })
  124. if (this.warehouseButton === 0 && this.inboundButton === 0) {
  125. //齐套
  126. Column() {
  127. CompleteSet()
  128. }
  129. .margin({ top: px2vp(20), bottom: $r('app.float.topMargins_20') })
  130. .width(px2vp(1920))
  131. .height(px2vp(900))
  132. } else if (this.warehouseButton === 0 && this.inboundButton === 2) {
  133. Column() {
  134. //调仓
  135. //AdjustStorageView()
  136. WarehouseMap()
  137. }
  138. .width('100%')
  139. .height('92%')
  140. } else if (this.warehouseButton === 0 && this.inboundButton === 3) {
  141. Column() {
  142. //智能仓储统计
  143. Statistics()
  144. }
  145. .width('100%')
  146. .height('92%')
  147. }
  148. else if (this.warehouseButton === 0 && this.inboundButton === 1) {
  149. Column() {
  150. //手动出库
  151. ManualOutbound()
  152. }
  153. .margin({ top: $r('app.float.topMargins_20'), bottom: $r('app.float.topMargins_20') })
  154. .width('100%')
  155. .height('92%')
  156. }
  157. }
  158. .width('100%')
  159. .height('92%')
  160. .padding({ left: px2vp(24), right: px2vp(24) })
  161. .backgroundColor($r('app.color.white_f1f3f5'))
  162. }.width('100%')
  163. .height('100%')
  164. }
  165. }