123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- import {task, taskclass} from '../util/request/StorageRequestInstance'
- @Component
- export struct TaskComp {
- @State bugNum:number=0
- @State completeNum:number=0
- @State kittingNum:number=0
- @State planNum:number=0
- private isHomePage?: boolean = false
- aboutToAppear() {
- ////获取仓储占有率
- task().then((res: taskclass) => {
- console.log("on page show11", res.bugNum, res.completeNum, res.kittingNum, res.planNum
- )
- this.bugNum = res.bugNum, this.completeNum = res.completeNum, this.kittingNum = res.kittingNum
- this.planNum = res.planNum
- })
- }
- build(){
- //中间框
- Row(){
- Column(){
- Text('未完成计划')
- .fontSize(px2vp(27))
- .opacity(0.6)
- .fontColor('#FFFFFF')
- .width('100%')
- .fontWeight(FontWeight.Bold)
- .padding({left:10,top:10})
- Text('20')
- .fontSize(px2vp(64))
- .fontColor('#FFFFFF')
- .width('100%')
- .fontWeight(FontWeight.Bold)
- .padding({left:10,top:10})
- Blank()
- Text('产品种类:'+"11")
- .fontSize(px2vp(27))
- .opacity(0.6)
- .fontColor('#FFFFFF')
- .width('100%')
- .fontWeight(FontWeight.Bold)
- .padding({left:10,top:10,bottom:10})
- }.width('40%')
- .backgroundImage($r('app.media.Unfinished_Plan'))
- .backgroundImageSize({width:'100%',height:'100%'})
- .height('100%')
- .borderRadius(15)
- //左右column
- Column(){
- //左边
- Column(){
- Row(){
- Blank()
- Image($r("app.media.Unfinished_orders"))
- .width('38px')
- .height('38px')
- Text().width('5%')
- Text('今日计划').width('40%')
- .height('100%')
- .fontColor('#99000000')
- .fontSize(px2vp(19))
- .fontWeight(FontWeight.Regular)
- Blank()
- }.width('100%')
- .height('30%')
- Text(this.planNum.toString()).width('80%')
- .height('70%')
- .fontColor('#e6000000')
- .textAlign(TextAlign.Center)
- .fontSize(px2vp(64))
- .fontWeight(FontWeight.Bold)
- }.width('100%')
- .height('50%')
- Divider().vertical(false)
- .width('80%')
- Blank()
- Column(){
- Blank()
- Row(){
- Blank()
- Image($r("app.media.completeMaterials"))
- .width('38px')
- .height('38px')
- Text().width('5%')
- Text('主料齐套').width('40%')
- .height('100%')
- .fontColor('#99000000')
- .fontSize(px2vp(19))
- .fontWeight(FontWeight.Regular)
- Blank()
- }.width('100%')
- .height('30%')
- Text(this.kittingNum.toString()).width('80%')
- .height('60%')
- .fontColor('#e6000000')
- .textAlign(TextAlign.Center)
- .fontSize(px2vp(64))
- .fontWeight(FontWeight.Bold)
- }.width('100%')
- .height('50%')
- }.width('30%')
- .height('70%')
- .borderRadius(15)
- .alignItems(HorizontalAlign.End)
- Divider().vertical(true)
- .height('60%')
- Column(){
- //右边
- Column(){
- Row(){
- Blank()
- Image($r("app.media.completedToday"))
- .width('38px')
- .height('38px')
- Text().width('5%')
- Text('今日完成').width('40%')
- .height('100%')
- .fontColor('#99000000')
- .fontSize(px2vp(19))
- .fontWeight(FontWeight.Regular)
- Blank()
- }.width('100%')
- .height('30%')
- Text(this.completeNum.toString()).width('80%')
- .height('70%')
- .fontColor('#e6000000')
- .textAlign(TextAlign.Center)
- .fontSize(px2vp(64))
- .fontWeight(FontWeight.Bold)
- }.width('100%')
- .height('50%')
- Divider().vertical(false)
- .width('80%')
- Column(){
- Blank()
- Row(){
- Blank()
- Image($r("app.media.todayReport"))
- .width('38px')
- .height('38px')
- Text().width('5%')
- Text('今日报故').width('40%')
- .height('100%')
- .fontColor('#99000000')
- .fontSize(px2vp(19))
- .fontWeight(FontWeight.Regular)
- Blank()
- }.width('100%')
- .height('30%')
- Text(this.bugNum.toString()).width('80%')
- .height('60%')
- .fontColor('#e6000000')
- .textAlign(TextAlign.Center)
- .fontSize(px2vp(64))
- .fontWeight(FontWeight.Bold)
- }.width('100%')
- .height('50%')
- }.width('30%')
- .height('70%')
- .borderRadius(15)
- .alignItems(HorizontalAlign.Start)
- }
- .padding(10)
- .width('100%')
- .height('100%')
- .backgroundColor('#F1F3F5')
- .borderRadius(15)
- .margin({left:10})
- }
- }
|