import { TitleStateComp } from '../common/component/TitleStateComp'; import {IntelligentWarehousingOutbound, SelectMaterialslist}from '../view/IntelligentWarehousingOutbound' import {Statistics}from '../view/Statistics' import {IntelligentStorageWarehousing }from '../view/IntelligentStorageWarehousing' import {OtherStorageOutbound}from '../view/OtherStorageOutbound' import {OtherWarehousing}from '../view/OtherWarehousing' import { OtherStatistics } from '../view/OtherStatistics'; import taskSheetInformation from '../model/TaskSheetInformation'; export interface class1{ choicePages?:number } export interface ScanStorageclass { //改变的数量 exchangeNumber?:number label?:string //订单编号 taskId:string //批次号 //已经占用箱数 useNum?:number //空箱数 emptyBoxNum?:string //可用箱数 canUsedNum?:string //总容量箱数 allNum?:number //仓储类型 type?:string //批次号 coordinate?: string //创建时间 created?: string // creator?: string //仓库编码 houseNo?:string deptId?: string houseType?:string //主键 id?:string locationNo?: string // 物料名称 materialName?:string //物料编码 materialNo?: string //出入库数量 num?: number orgId?: string planNo?: string position?: string // 序列号 seqNo?: string // 状态;1-待处理;2-处理中;3-处理异常;4-已完成 state?:string // 库存数量 stockNum?:string //出入库任务单号 taskNo?: string unit?:string updated?: string //任务名称 taskName?:string updator?: string vehicleNo?: string batchCode?:string } export interface ScanStoragecodeclass { //批次号 //已经占用箱数 useNum?:number //空箱数 emptyBoxNum?:string //可用箱数 canUsedNum?:string //总容量箱数 allNum?:number //仓储类型 type?:string //批次号 coordinate?: string //创建时间 created?: string // creator?: string //仓库编码 houseNo?:string deptId?: string houseType?:string //主键 id?:string locationNo?: string // 物料名称 materialName?:string //物料编码 materialNo?: string //出入库数量 num?: number orgId?: string planNo?: string position?: string // 序列号 seqNo?: string // 状态;1-待处理;2-处理中;3-处理异常;4-已完成 state?:string // 库存数量 stockNum?:string //出入库任务单号 taskNo?: string unit?:string updated?: string //任务名称 taskName?:string updator?: string vehicleNo?: string batchCode?:string } @Entry @Component struct Storage { @State choicePages:class1={} @State userName:string='' @State avatar:string='' @State primaryKeyId:string='' @State textValue: string = '' @State inputValue: string = '' scroller: Scroller = new Scroller() @State CangKu:number=0 @State CunQuHuo:number=0 @State ChuRukun:number=0 @State ZhuangTai:number=0 @State private ScanStoragecodelist:Array=[] @State private scanStorageList:Array=[] @State private SelectMaterial:Array=[] private isHomePage:boolean = false build() { Row() { Column() { TitleStateComp({isHomePage : this.isHomePage}) Column(){ //选中 Row(){ Row({space:10}){ Stack(){ Row(){ }.width('100%') .height('100%') if(this.CangKu===0){ Row(){ Text('智能仓储') .textAlign(TextAlign.Center) .width('50%') .fontSize('32px') .height('100%') .fontWeight(FontWeight.Medium) .fontColor('#e6000000') .borderRadius(15) .backgroundColor('#FFFFFF') .onClick(()=>{ this.CangKu=0 }) Text('其他仓储') .width('50%') .textAlign(TextAlign.Center) .border({width:0}) .fontSize('32px') .height('100%') .fontWeight(FontWeight.Medium) .borderRadius(15) .fontColor('#e6000000') .onClick(()=>{ this.CangKu=1 }) }.width('100%') .height('100%') .borderRadius(15) }else if(this.CangKu===1){ Row(){ Text('智能仓储') .textAlign(TextAlign.Center) .width('50%') .fontSize('32px') .fontWeight(FontWeight.Medium) .height('100%') .fontColor('#e6000000') .borderRadius(15) .onClick(()=>{ this.CangKu=0 }) Text('其他仓储') .width('50%') .textAlign(TextAlign.Center) .border({width:0}) .height('100%') .fontWeight(FontWeight.Medium) .fontSize('32px') .borderRadius(15) .backgroundColor('#FFFFFF') .fontColor('#e6000000') .onClick(()=>{ this.CangKu=1 }) }.width('100%') .height('100%') .borderRadius(15) } }.width('30%') .height('80%') .borderRadius(15) .backgroundColor('#1a000000') .margin({left:10}) } Blank() Stack(){ Row(){ }.width('100%') .height('100%') .backgroundColor('#1a000000') .borderRadius(15) if(this.ChuRukun===0){ Row(){ Text('入库') .textAlign(TextAlign.Center) .width('33%') .height('100%') .fontSize('32px') .fontWeight(FontWeight.Medium) .fontColor('#e6000000') .borderRadius(15) .onClick(()=>{ this.ChuRukun=1 }) Text('出库') .textAlign(TextAlign.Center) .width('33%') .fontSize('32px') .border({width:0}) .fontWeight(FontWeight.Medium) .height('100%') .borderRadius(15) .backgroundColor('#FFFFFF') .fontColor('#e6000000') .onClick(()=>{ this.ChuRukun=0 }) Text('统计') .textAlign(TextAlign.Center) .width('33%') .fontWeight(FontWeight.Medium) .fontSize('32px') .border({width:0}) .height('100%') .borderRadius(15) .fontColor('#e6000000') .onClick(()=>{ this.ChuRukun=2 }) }.width('100%') .height('100%') .borderRadius(15) }else if(this.ChuRukun===1){ Row(){ Text('入库') .textAlign(TextAlign.Center) .width('33%') .height('100%') .fontSize('32px') .fontWeight(FontWeight.Medium) .fontColor('#e6000000') .borderRadius(15) .backgroundColor('#FFFFFF') .onClick(()=>{ this.ChuRukun=1 }) Text('出库') .textAlign(TextAlign.Center) .width('33%') .border({width:0}) .height('100%') .fontSize('32px') .borderRadius(15) .fontWeight(FontWeight.Medium) .fontColor('#e6000000') .onClick(()=>{ this.ChuRukun=0 }) Text('统计') .textAlign(TextAlign.Center) .width('33%') .fontSize('32px') .fontWeight(FontWeight.Medium) .border({width:0}) .height('100%') .borderRadius(15) .fontColor('#e6000000') .onClick(()=>{ this.ChuRukun=2 }) }.width('100%') .height('100%') .borderRadius(15) }else if (this.ChuRukun===2){ Row(){ Text('入库') .textAlign(TextAlign.Center) .width('33%') .fontWeight(FontWeight.Medium) .height('100%') .fontSize('32px') .fontColor('#e6000000') .borderRadius(15) .onClick(()=>{ this.ChuRukun=1 }) Text('出库') .textAlign(TextAlign.Center) .width('33%') .fontSize('32px') .border({width:0}) .height('100%') .fontWeight(FontWeight.Medium) .borderRadius(15) .fontColor('#e6000000') .onClick(()=>{ this.ChuRukun=0 }) Text('统计') .textAlign(TextAlign.Center) .width('34%') .border({width:0}) .height('100%') .fontWeight(FontWeight.Medium) .fontSize('32px') .borderRadius(15) .backgroundColor('#FFFFFF') .fontColor('#e6000000') .onClick(()=>{ this.ChuRukun=2 }) }.width('100%') .height('100%') .borderRadius(15) } }.width('45%') .height('80%') .borderRadius(15) Blank() }.width('100%') .height('10%') Row({space:15}){ //仓储3D位置 if (this.ChuRukun===0&&this.CangKu===0){ //出库 IntelligentWarehousingOutbound({scanStorageList:this.scanStorageList,SelectMaterial:this.SelectMaterial,primaryKeyId:this.primaryKeyId }) }else if (this.ChuRukun===1&&this.CangKu===0){ //入库 IntelligentStorageWarehousing({ScanStoragelist:this.ScanStoragecodelist}) }else if (this.ChuRukun===2&&this.CangKu===0){ //智能仓储统计 Statistics() // Statistics({ useNum:this.useNum,canUsedNum:this.canUsedNum, // allNum:this.allNum, emptyBoxNum:this.emptyBoxNum}) }else if (this.ChuRukun===0&&this.CangKu===1){ OtherStorageOutbound() }else if (this.ChuRukun===1&&this.CangKu===1){ OtherWarehousing() }else if (this.ChuRukun===2&&this.CangKu===1){ OtherStatistics() } }.width('100%') .height('90%') } .width('100%') .height('92%') } .width('100%') .backgroundColor('#F1F3F5') .width('100%') } .height('100%') .width('100%') } }