OutboundStation.ets 6.8 KB

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