123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- import { TitleStateComp } from '../common/component/TitleStateComp'
- import { CompleteSet } from '../view/CompleteSet'
- @Entry
- @Component
- struct Outbound{
- //齐套按钮:0、手动出库:1、调仓:2.统计:3
- @State inboundButton:number=0
- //仓储和其他仓储点击按钮变色
- @State warehouseButton:number=0
- @State isHomePage:boolean=false
- build() {
- Column(){
- TitleStateComp({ isHomePage: this.isHomePage,})
- Column(){
- Row({space:10}){
- Row(){
- Text('智能仓储')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width('48%')
- .height('100%')
- .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('其他仓储')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width('48%')
- .height('100%')
- .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('33%')
- .borderRadius(px2vp(15))
- .height('100%')
- .backgroundColor($r('app.color.black_10'))
- Row(){
- Text('齐套')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width('25%')
- .height('100%')
- .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.inboundButton=0
- })
- Text('手动出库')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width('25%')
- .height('100%')
- .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.inboundButton=1
- })
- Text('调仓')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width('25%')
- .height('100%')
- .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.inboundButton=2
- })
- Text('统计')
- .textAlign(TextAlign.Center)
- .borderRadius(px2vp(16))
- .width('25%')
- .height('100%')
- .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.inboundButton=3
- })
- }.width('67%')
- .borderRadius(px2vp(15))
- .height('100%')
- .backgroundColor($r('app.color.black_10'))
- }.width('100%')
- .height('8%')
- if (this.warehouseButton===0&&this.inboundButton===0){
- Column(){
- CompleteSet()
- }.width('100%')
- .height('92%')
- }
- }.width('100%')
- .height('92%')
- .padding({left:px2vp(50),right:px2vp(50)})
- .backgroundColor($r('app.color.white_f1f3f5'))
- }.width('100%')
- .height('100%')
- }
- }
|