OrderMaterialsStorage.ets 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * 订单物料入库
  3. * */
  4. import {ProcessFlow} from "../component/OrderMaterialsStorageView"
  5. import {OrderParams,DemandMaterial,MaterialBox, EmptyBox} from "../params/OrderMaterialsStorageParams"
  6. import router from '@ohos.router';
  7. import {NavigationBar} from '../component/NavigationBar'
  8. import {TimeAndTitle} from "../component/TimeAndTitle"
  9. import {OrderMaterialStorageFirstStep} from '../view/wms/OrderMaterialStorageFirstStep'
  10. import {OrderMaterialStorageSecondStep} from '../view/wms/OrderMaterialStorageSecondStep'
  11. import {OrderMaterialStorageThirdStep} from '../view/wms/OrderMaterialStorageThirdStep'
  12. import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
  13. import WorkOrderMaterialInfo from "../viewmodel/wms/WorkOrderMaterialInfo"
  14. @Entry
  15. @Component
  16. struct orderMaterialsStorage {
  17. @State materialData: WorkOrderMaterialInfo[] = [];
  18. @State materialBoxID: string = 'LX-00010';
  19. @State selectWorkOrder:WorkOrderInfo = {}
  20. @State messages:string[] = []
  21. @State currentStep: number = 1;
  22. build() {
  23. Row() {
  24. Column() {
  25. Row(){
  26. TimeAndTitle()
  27. }.width('100%')
  28. .height('3.4%')
  29. .alignItems(VerticalAlign.Bottom)
  30. .justifyContent(FlexAlign.End)
  31. Row(){
  32. Image($r('app.media.general_return'))
  33. .height($r('app.float.virtualSize_56'))
  34. .width($r('app.float.virtualSize_56'))
  35. .fillColor($r('app.color.FFFFFF'))
  36. Text('订单物料入库')
  37. .fontColor($r('app.color.FFFFFF'))
  38. .fontSize($r('app.float.fontSize_38'))
  39. }
  40. .height('4%')
  41. .width('100%')
  42. .justifyContent(FlexAlign.Start)
  43. .margin({left:'5%'})
  44. .onClick(()=> {
  45. router.back()
  46. })
  47. Row(){
  48. Row(){
  49. ProcessFlow({
  50. currentStep:this.currentStep,
  51. firstStepTitle: "选择工单",
  52. secondStepTitle:"调取料箱",
  53. thirdStepTitle:"绑定入库",
  54. })
  55. }
  56. .width('20%')
  57. .margin({right:'20%'})
  58. NavigationBar().width('20%')
  59. }
  60. .width('100%')
  61. .height('4%')
  62. .margin({top:'1%'})
  63. .justifyContent(FlexAlign.End)
  64. .alignItems(VerticalAlign.Bottom)
  65. if(this.currentStep === 1)
  66. {
  67. OrderMaterialStorageFirstStep({
  68. currentStep:this.currentStep,
  69. selectWorkOrder:this.selectWorkOrder,
  70. materialData:this.materialData
  71. })
  72. }
  73. else if(this.currentStep === 2)
  74. {
  75. OrderMaterialStorageSecondStep({
  76. currentStep:this.currentStep,
  77. selectWorkOrder:this.selectWorkOrder
  78. })
  79. }
  80. if(this.currentStep === 3){
  81. OrderMaterialStorageThirdStep({
  82. currentStep:this.currentStep,
  83. materialData:this.materialData
  84. })
  85. }
  86. }
  87. .width('100%')
  88. .height('100%')
  89. .backgroundColor($r('app.color.000000'))
  90. }
  91. .height('100%')
  92. }
  93. }