123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- import { TitleStateComp } from '../common/component/TitleStateComp'
- import { CompleteSet } from '../view/CompleteSet'
- import { Statistics } from '../view/Statistics'
- import { AdjustStorageView } from '../view/storage/AdjustStorageView'
- import { ManualOutbound } from '../view/ManualOutbound'
- import { WarehouseMap } from './WarehouseMap'
- import { MaterialCirculationPage } from './process/MaterialCirculationPage'
- import { SureToDoDialog } from '../common/component/SureToDoDialog'
- /*
- * 出库工位
- * */
- @Entry
- @Component
- struct OutboundStation {
- //齐套按钮(0:齐套 1:手动出库 2:调仓:3:统计)
- @State inboundButton: number = 0
- @State Button: number = 0
- //仓储和其他仓储点击按钮变色
- @State warehouseButton: number = 0
- @State isHomePage: boolean = false
- fourWidth: number = 280
- twoWidth: number = 150
- // 切换tab添加提示
- goingToChangeTabIndex: number = 0
- goingToChangeTab = (tabIndex: number) => {
- if (this.inboundButton == 3) {
- this.inboundButton = tabIndex
- }
- else {
- this.goingToChangeTabIndex = tabIndex
- this.changeTabController.open()
- }
- }
- sureToChangeTab = () => {
- this.inboundButton = this.goingToChangeTabIndex
- }
- cancel = () => {
- this.changeTabController.close()
- }
- changeTabController: CustomDialogController = new CustomDialogController({
- builder: SureToDoDialog(
- {
- cancel: this.cancel,
- confirm: this.sureToChangeTab,
- title: "提示",
- info: '切换会中断当前的操作'
- }
- ),
- alignment: DialogAlignment.Center,
- customStyle: true,
- autoCancel: false,
- })
- build() {
- Column() {
- TitleStateComp({ isHomePage: this.isHomePage, })
- Column() {
- Row({ space: px2vp(24) }) {
- Row() {
- Text('智能仓储')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width(px2vp(this.fourWidth))
- .height(px2vp(80))
- .fontWeight(FontWeight.Medium)
- .fontSize(px2vp(24))
- .fontColor(this.warehouseButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
- .backgroundColor(this.warehouseButton === 0 ? $r('app.color.process_divider_white_color') : '')
- .onClick(() => {
- this.warehouseButton = 0
- })
- // Blank()
- // Text('xxxxxxx')
- // .textAlign(TextAlign.Center)
- // .borderRadius(px2vp(16))
- // .width(px2vp(292))
- // .height(px2vp(80))
- // .fontWeight(FontWeight.Medium)
- // .fontSize(px2vp(24))
- // .fontColor(this.warehouseButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
- // .backgroundColor(this.warehouseButton===1?$r('app.color.process_divider_white_color'):'')
- // .onClick(()=>{
- // this.warehouseButton=1
- // })
- }
- .width(px2vp(this.fourWidth))
- .borderRadius(px2vp(16))
- .height(px2vp(80))
- .backgroundColor($r('app.color.black_10'))
- Row({ space: px2vp(24) }) {
- Text('齐套')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width(px2vp(this.twoWidth))
- .height(px2vp(80))
- .fontWeight(FontWeight.Medium)
- .fontSize(px2vp(24))
- .fontColor(this.inboundButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
- .backgroundColor(this.inboundButton === 0 ? $r('app.color.process_divider_white_color') : '')
- .onClick(() => {
- this.goingToChangeTab(0)
- })
- Text('手动出库')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width(px2vp(this.fourWidth))
- .height(px2vp(80))
- .fontWeight(FontWeight.Medium)
- .fontSize(px2vp(24))
- .fontColor(this.inboundButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
- .backgroundColor(this.inboundButton === 1 ? $r('app.color.process_divider_white_color') : '')
- .onClick(() => {
- this.goingToChangeTab(1)
- })
- // Text('物料流转')
- // .textAlign(TextAlign.Center)
- // .borderRadius(px2vp(16))
- // .width(px2vp(292))
- // .height(px2vp(80))
- // .fontWeight(FontWeight.Medium)
- // .fontSize(px2vp(24))
- // .fontColor(this.inboundButton === 4 ? $r('app.color.black_90') : $r('app.color.black_60'))
- // .backgroundColor(this.inboundButton === 4 ? $r('app.color.process_divider_white_color') : '')
- // .onClick(() => {
- // this.Button = 1
- // this.inboundButton = 4
- // })
- Text('调仓')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width(px2vp(this.twoWidth))
- .height(px2vp(80))
- .fontWeight(FontWeight.Medium)
- .fontSize(px2vp(24))
- .fontColor(this.inboundButton === 2 ? $r('app.color.black_90') : $r('app.color.black_60'))
- .backgroundColor(this.inboundButton === 2 ? $r('app.color.process_divider_white_color') : '')
- .onClick(() => {
- this.goingToChangeTab(2)
- })
- Text('统计')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width(px2vp(this.twoWidth))
- .height(px2vp(80))
- .fontWeight(FontWeight.Medium)
- .fontSize(px2vp(24))
- .fontColor(this.inboundButton === 3 ? $r('app.color.black_90') : $r('app.color.black_60'))
- .backgroundColor(this.inboundButton === 3 ? $r('app.color.process_divider_white_color') : '')
- .onClick(() => {
- this.goingToChangeTab(3)
- })
- }.width(px2vp(this.fourWidth + this.twoWidth * 3 + 24 * 3))
- .borderRadius(px2vp(16))
- .height(px2vp(80))
- .backgroundColor($r('app.color.black_10'))
- }
- .width(px2vp(1920))
- .height(px2vp(80))
- .padding({ left: px2vp(24), right: px2vp(24) })
- if (this.warehouseButton === 0 && this.inboundButton === 0) {
- //齐套
- Column() {
- CompleteSet()
- }
- .margin({ top: px2vp(20), bottom: $r('app.float.topMargins_20') })
- .width(px2vp(1920))
- .height(px2vp(900))
- } else if (this.warehouseButton === 0 && this.inboundButton === 2) {
- Column() {
- //调仓
- //AdjustStorageView()
- WarehouseMap()
- }
- .width('100%')
- .height('92%')
- } else if (this.warehouseButton === 0 && this.inboundButton === 3) {
- Column() {
- //智能仓储统计
- Statistics()
- }
- .width('100%')
- .height('92%')
- }
- else if (this.warehouseButton === 0 && this.inboundButton === 1) {
- Column() {
- //手动出库
- ManualOutbound()
- }
- .margin({ top: $r('app.float.topMargins_20'), bottom: $r('app.float.topMargins_20') })
- .width('100%')
- .height('92%')
- }
- else if (this.warehouseButton === 0 && this.inboundButton === 4) {
- Column() {
- //物料流转
- MaterialCirculationPage()
- }
- .margin({ top: $r('app.float.topMargins_20'), bottom: $r('app.float.topMargins_20') })
- .width('100%')
- .height('92%')
- }
- }
- .width('100%')
- .height('92%')
- .padding({ left: px2vp(24), right: px2vp(24) })
- .backgroundColor($r('app.color.white_f1f3f5'))
- }.width('100%')
- .height('100%')
- }
- }
|