yixiaojun пре 1 година
родитељ
комит
f0bec43774

+ 332 - 361
entry/src/main/ets/pages/Index.ets

@@ -3,235 +3,159 @@ import { BottomOperateComp } from '../common/component/BottomOperateComp';
 import router from '@ohos.router'
 import { TaskComp } from '../common/component/TaskComp'
 import {  Warehousing}from  '../common/component/Warehousing'
-
 import { SmartFactoryCard}from  '../common/component/SmartFactoryCard'
+@CustomDialog
+struct login {
+  @Link textValue: string
+  @Link inputValue: string
+  controller: CustomDialogController
+  cancel: () => void
+  confirm: () => void
+  build() {
+    Column() {
+      Text('退出登录')
+        .textAlign(TextAlign.Center)
+        .fontColor('#e6000000')
+        .fontSize(px2vp(53))
+        .fontWeight(FontWeight.Medium)
+        .width('100%')
+        .height('30%')
+      Text('是否返回登录页?')
+        .textAlign(TextAlign.Center)
+        .width('100%')
+        .height('30%')
+      Row({space:10}){
+        Text('取消')
+          .width('40%')
+          .borderRadius(21)
+          .height('70%')
+          .textAlign(TextAlign.Center)
+          .backgroundColor('#0f000000')
+          .fontColor('#0A59F7')
+          .onClick(()=>{
+            this.controller.close()
+          })
+        Text('确认')
+          .width('40%')
+          .height('70%')
+          .borderRadius(21)
+          .backgroundColor('#0A59F7')
+          .textAlign(TextAlign.Center)
+          .fontColor('#ffff')
+          .onClick(()=>{
+            this.controller.close()
+          })
+      }
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+      .height('30%')
+
+
+    }.width('25%')
+    .height('20%')
+    .borderRadius(15)
+    .backgroundColor('#ffff')
+  }
+}
+@CustomDialog
+struct shutdown {
+  @Link shutdownTransparency:number
+  @Link textValue: string
+  @Link inputValue: string
+  controller: CustomDialogController
+  cancel: () => void
+  confirm: () => void
+  build() {
+    Column() {
+      Row(){
+        Image($r('app.media.restart'))
+          .width(px2vp(107))
+          .height(px2vp(107))
+          .onClick(()=>{
+            this.shutdownTransparency=0
+            this.controller.close()
+          })
+        Blank()
+        Image($r('app.media.shutdown'))
+          .width(px2vp(107))
+          .height(px2vp(107))
+          .onClick(()=>{
+            this.shutdownTransparency=0
+            this.controller.close()
+          })
+
+      }.width('100%')
+      .height('50%')
+      Row(){
+       Text('重启')
+         .fontWeight(FontWeight.Medium)
+         .fontSize(px2vp(27))
+         .width(px2vp(107))
+         .height(px2vp(107))
+         .textAlign(TextAlign.Center)
+         .fontColor('#FFFFFF')
+
+        Blank()
+        Text('关机')
+          .fontWeight(FontWeight.Medium)
+          .fontSize(px2vp(27))
+          .width(px2vp(107))
+          .textAlign(TextAlign.Center)
+          .height(px2vp(107))
+          .fontColor('#FFFFFF')
+
+      }.width('100%')
+      .height('30%')
+
+
+    }.width('20%')
+    .height('20%')
+    .borderRadius(15)
+
+  }
+}
 @Entry
 @Component
 struct Index {
+  @State avatarFrame:boolean=false
   scroller: Scroller = new Scroller()
+  @State shutdownTransparency:number=0
   @State YanSe: number = 0
   @State carswitch:number=0
   private isHomePage: boolean = true
-  aboutToDisappear(){
-    console.log('testTag', '===='+px2vp(19));
- }
+  @State textValue: string = ''
+  @State inputValue: string = ''
+  loginDialogController: CustomDialogController = new CustomDialogController({
+  builder:login({
+    textValue: $textValue,
+    inputValue: $inputValue,
+  }),
+  alignment: DialogAlignment.Center,
+  autoCancel:false,
+  customStyle:true
+})
+  shutdownDialogController: CustomDialogController = new CustomDialogController({
+    builder:shutdown({
+      textValue: $textValue,
+      inputValue: $inputValue,
+      shutdownTransparency:this.shutdownTransparency
+    }),
+    alignment: DialogAlignment.Center,
+    autoCancel:false,
+    customStyle:true
+  })
+
   build() {
-    Row() {
-      Column() {
-        TitleStateComp({ isHomePage: this.isHomePage })
-        Row() {
-          // Column() {
-          //   Swiper() {
-          //
-          //     Column() {
-          //       Text('任务')
-          //         .width('90%')
-          //         .height('20%')
-          //         .fontSize($r('app.float.title_font_size'))
-          //       Row() {
-          //       }
-          //       .width('60%')
-          //       .height('60%')
-          //     }
-          //     .backgroundImage($r('app.media.KAPIAN'))
-          //     .backgroundImageSize({ width: '100%', height: '100%' })
-          //     .width('100%')
-          //     .height('100%')
-          //
-          //
-          //     Column() {
-          //       Text('库存统计')
-          //         .fontColor('#ffff')
-          //         .width('90%')
-          //         .height('16%')
-          //         .fontWeight(FontWeight.Medium)
-          //         .fontSize($r('app.float.title_font_size'))
-          //       Row({ space: 15 }) {
-          //         Blank()
-          //
-          //         Column() {
-          //
-          //           Row() {
-          //             Stack() {
-          //               DataPanel({ values: [60], max: 100, type: DataPanelType.Circle })
-          //                 .width('100%').height('100%')
-          //
-          //               Column() {
-          //                 Text('75').fontSize(50).fontColor('#182431')
-          //                   .fontWeight(FontWeight.Medium)
-          //               }
-          //
-          //               Text('%')
-          //                 .fontSize(40)
-          //                 .opacity(0.6)
-          //                 .position({ x: 180, y: 100 })
-          //             }.margin({ right: 44 })
-          //           }
-          //           .width('100%')
-          //           .height('70%')
-          //
-          //           Row() {
-          //             Column() {
-          //               Text('75')
-          //                 .fontWeight(FontWeight.Medium)
-          //                 .fontSize(50)
-          //               Text('已载料箱')
-          //
-          //             }.width('50%')
-          //             .height('100%')
-          //
-          //             Divider().vertical(true)
-          //             Column() {
-          //               Text('100')
-          //                 .fontSize(50)
-          //                 .fontWeight(FontWeight.Medium)
-          //               Text('空箱数')
-          //
-          //             }.width('50%')
-          //             .height('100%')
-          //
-          //           }
-          //           .width('100%')
-          //           .height('30%')
-          //         }.width('46%')
-          //         .borderRadius(15)
-          //         .backgroundColor('#e6ffffff')
-          //         .height('100%')
-          //
-          //         Column({ space: 10 }) {
-          //           Column() {
-          //             Row() {
-          //               Text('电子元件')
-          //                 .fontSize(18)
-          //               Blank()
-          //               Text('52/100')
-          //                 .fontSize(20)
-          //                 .fontWeight(FontWeight.Medium)
-          //             }
-          //             .height('40%')
-          //             .width('90%')
-          //
-          //             DataPanel({ values: [52], max: 100, type: DataPanelType.Line })
-          //               .width('90%').height('20%')
-          //           }
-          //           .width('100%')
-          //           .justifyContent(FlexAlign.Center)
-          //           .borderRadius(15)
-          //           .backgroundColor('#e6ffffff')
-          //           .height('23%')
-          //
-          //           Column() {
-          //             Row() {
-          //               Text('电路板')
-          //                 .fontSize(20)
-          //               Blank()
-          //               Text('19/50')
-          //                 .fontSize(20)
-          //                 .fontWeight(FontWeight.Medium)
-          //             }
-          //             .width('90%')
-          //             .height('40%')
-          //
-          //             DataPanel({ values: [19], max: 50, type: DataPanelType.Line })
-          //               .width('90%').height('20%')
-          //           }
-          //           .width('100%')
-          //           .justifyContent(FlexAlign.Center)
-          //           .borderRadius(15)
-          //           .backgroundColor('#e6ffffff')
-          //           .height('23%')
-          //
-          //           Column() {
-          //             Row() {
-          //               Text('结构件')
-          //                 .fontSize(20)
-          //
-          //               Blank()
-          //               Text('73/100')
-          //                 .fontSize(20)
-          //                 .fontWeight(FontWeight.Medium)
-          //             }
-          //             .width('90%')
-          //             .height('40%')
-          //
-          //             DataPanel({ values: [73], max: 100, type: DataPanelType.Line })
-          //               .width('90%').height('20%')
-          //
-          //
-          //           }
-          //           .width('100%')
-          //           .justifyContent(FlexAlign.Center)
-          //           .borderRadius(15)
-          //           .height('23%')
-          //           .backgroundColor('#e6ffffff')
-          //           .borderRadius(15)
-          //
-          //           Column() {
-          //             Row() {
-          //               Text('辅助材料')
-          //                 .fontSize(20)
-          //
-          //               Blank()
-          //               Text('64/70')
-          //                 .fontSize(20)
-          //                 .fontWeight(FontWeight.Medium)
-          //             }
-          //             .width('90%')
-          //             .height('40%')
-          //
-          //             DataPanel({ values: [64], max: 70, type: DataPanelType.Line })
-          //               .width('90%').height('20%')
-          //
-          //
-          //           }
-          //           .width('100%')
-          //           .justifyContent(FlexAlign.Center)
-          //           .borderRadius(15)
-          //           .backgroundColor('#e6ffffff')
-          //           .height('23%')
-          //
-          //         }.width('46%')
-          //         .borderRadius(10)
-          //         .height('100%')
-          //
-          //         Blank()
-          //
-          //       }
-          //       .width('100%')
-          //       .height('80%')
-          //     }
-          //     .backgroundImage($r('app.media.KaPian2'))
-          //     .backgroundImageSize({ width: '100%', height: '100%' })
-          //     .width('100%')
-          //     .height('100%')
-          //
-          //     Column() {
-          //       Row() {
-          //         TaskComp({isHomePage: this.isHomePage})
-          //       }
-          //       .width('60%')
-          //       .height('60%')
-          //     }
-          //     .backgroundImage($r('app.media.KAPIAN'))
-          //     .backgroundImageSize({ width: '100%', height: '100%' })
-          //     .width('100%')
-          //     .height('100%')
-          //   }
-          //   .width('103%')
-          //   .height('95%')
-          //   .autoPlay(false)
-          //   .vertical(true)
-          //   .indicator(false)
-          //   .borderRadius(15)
-          //   .border({ width: 1, color: '#ffff' })
-          //
-          // }
-          // .width('50%')
-          // .height('70%')
-          // .backgroundColor('#fff')
-          // .justifyContent(FlexAlign.End)
-          // .borderRadius(15)
-          Flex({ wrap: FlexWrap.Wrap }) {
+    Stack(){
+      Row() {
+        Column() {
+          TitleStateComp({ isHomePage: this.isHomePage })
+            .onClick(()=>{
+               this.avatarFrame=!this.avatarFrame
+            })
+          Row() {
+
+            Flex({ wrap: FlexWrap.Wrap }) {
               Column(){
                 TaskComp({isHomePage: this.isHomePage})
                 Text('生产操作')
@@ -239,170 +163,217 @@ struct Index {
                   .margin({top:5})
                   .fontWeight(FontWeight.Medium)
                   .fontColor($r('app.color.robot_set_card_white'))
-            }
-            .height('40%')
-            .width('32%')
+              }
+              .height('40%')
+              .width('32%')
 
-           Column(){
-              Warehousing()
-             Text('智能仓储')
-               .margin({top:5})
-               .fontSize(px2vp(27))
-               .fontWeight(FontWeight.Medium)
-               .fontColor($r('app.color.robot_set_card_white'))
+              Column(){
+                Warehousing()
+                Text('智能仓储')
+                  .margin({top:5})
+                  .fontSize(px2vp(27))
+                  .fontWeight(FontWeight.Medium)
+                  .fontColor($r('app.color.robot_set_card_white'))
+              }
+              .height('40%')
+              .width('32%')
+              .margin({left:10})
+              .onClick(()=>{
+                router.pushUrl({
+                  url:'pages/Storage'
+                })
+              })
+              Column(){
+                SmartFactoryCard()
+                Text('智汇工厂')
+                  .margin({top:5})
+                  .fontSize(px2vp(27))
+                  .fontWeight(FontWeight.Medium)
+                  .fontColor($r('app.color.robot_set_card_white'))
+              }
+              .height('40%')
+              .width('32%')
+              .margin({left:10})
+              .onClick(()=>{
+                router.pushUrl({
+                  url:'pages/SmartFactory'
+                })
+              })
             }
-            .height('40%')
-            .width('32%')
-            .margin({left:10})
-            .onClick(()=>{
+            .width('100%')
+            .height('100%')
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('100%')
+          .height('68%')
+          Row({ space: 10 }) {
+            Text().width('1%')
+            Column({ space: 10 }) {
+              Image($r("app.media.shezhi"))
+                .width('60%')
+                .height('60%')
+                .borderRadius(15)
+              Text('设置')
+                .width('100%')
+                .textAlign(TextAlign.Center)
+                .fontSize(16)
+                .fontColor('#ffff')
+            }
+            .width('10%')
+            .justifyContent(FlexAlign.Center)
+            .backdropBlur(13)
+            .height('90%')
+            .borderRadius(15)
+            .backgroundColor('#4d000000')
+            .onClick(() => {
               router.pushUrl({
-                url:'pages/Storage'
+                url: 'pages/SetPage'
               })
             })
-            Column(){
-              SmartFactoryCard()
-              Text('智汇工厂')
-                .margin({top:5})
-                .fontSize(px2vp(27))
-                .fontWeight(FontWeight.Medium)
-                .fontColor($r('app.color.robot_set_card_white'))
+            Column({ space: 10 }) {
+              Image($r('app.media.cangchu'))
+                .width('60%')
+                .height('60%')
+                .borderRadius(15)
+              Text('智能仓储')
+                .width('100%')
+                .textAlign(TextAlign.Center)
+                .fontSize(16)
+                .fontColor('#ffff')
             }
-            .height('40%')
-            .width('32%')
-            .margin({left:10})
-            .onClick(()=>{
+            .width('10%')
+            .justifyContent(FlexAlign.Center)
+            .height('90%')
+            .borderRadius(15)
+            .backgroundColor('#4d000000')
+            .onClick(() => {
               router.pushUrl({
-                url:'pages/SmartFactory'
+                url: 'pages/Storage'
               })
             })
-          }
-          .width('100%')
-          .height('100%')
-        }
-        .justifyContent(FlexAlign.Center)
-        .width('100%')
-        .height('68%')
-        Row({ space: 10 }) {
-          Text().width('1%')
-          Column({ space: 10 }) {
-            Image($r("app.media.shezhi"))
-              .width('60%')
-              .height('60%')
-              .borderRadius(15)
-            Text('设置')
-              .width('100%')
-              .textAlign(TextAlign.Center)
-              .fontSize(16)
-              .fontColor('#ffff')
-          }
-          .width('10%')
-          .justifyContent(FlexAlign.Center)
-          .backdropBlur(13)
-          .height('90%')
-          .borderRadius(15)
-          .backgroundColor('#4d000000')
-          .onClick(() => {
-            router.pushUrl({
-              url: 'pages/SetPage'
-            })
-          })
-          Column({ space: 10 }) {
-            Image($r('app.media.cangchu'))
-              .width('60%')
-              .height('60%')
-              .borderRadius(15)
-            Text('智能仓储')
-              .width('100%')
-              .textAlign(TextAlign.Center)
-              .fontSize(16)
-              .fontColor('#ffff')
-          }
-          .width('10%')
-          .justifyContent(FlexAlign.Center)
-          .height('90%')
-          .borderRadius(15)
-          .backgroundColor('#4d000000')
-          .onClick(() => {
-            router.pushUrl({
-              url: 'pages/Storage'
-            })
-          })
-          Column({ space: 10 }) {
-            Image($r('app.media.jiqiren'))
-              .width('60%')
-              .height('60%')
-              .borderRadius(15)
-            Text('机器人调试')
-              .width('100%')
-              .textAlign(TextAlign.Center)
-              .fontSize(16)
-              .fontColor('#ffff')
-          }
-          .width('10%')
-          .justifyContent(FlexAlign.Center)
-          .height('90%')
-          .borderRadius(15)
-          .backgroundColor('#4d000000')
-          .onClick(() => {
-            router.pushUrl({
-              url: 'pages/RobotDebug'
+            Column({ space: 10 }) {
+              Image($r('app.media.jiqiren'))
+                .width('60%')
+                .height('60%')
+                .borderRadius(15)
+              Text('机器人调试')
+                .width('100%')
+                .textAlign(TextAlign.Center)
+                .fontSize(16)
+                .fontColor('#ffff')
+            }
+            .width('10%')
+            .justifyContent(FlexAlign.Center)
+            .height('90%')
+            .borderRadius(15)
+            .backgroundColor('#4d000000')
+            .onClick(() => {
+              router.pushUrl({
+                url: 'pages/RobotDebug'
+              })
             })
-          })
 
-          Column({ space: 10 }) {
-            Image($r('app.media.gongxu'))
-              .width('60%')
-              .height('60%')
-              .borderRadius(15)
-            Text('工序操作')
-              .width('100%')
-              .textAlign(TextAlign.Center)
-              .fontSize(16)
-              .fontColor('#ffff')
+            Column({ space: 10 }) {
+              Image($r('app.media.gongxu'))
+                .width('60%')
+                .height('60%')
+                .borderRadius(15)
+              Text('工序操作')
+                .width('100%')
+                .textAlign(TextAlign.Center)
+                .fontSize(16)
+                .fontColor('#ffff')
 
-          }
-          .width('10%')
-          .justifyContent(FlexAlign.Center)
-          .height('90%')
-          .borderRadius(15)
-          .backgroundColor('#4d000000')
-          .onClick(() => {
-            router.pushUrl({
-              url: 'pages/process/ProcessHome'
+            }
+            .width('10%')
+            .justifyContent(FlexAlign.Center)
+            .height('90%')
+            .borderRadius(15)
+            .backgroundColor('#4d000000')
+            .onClick(() => {
+              router.pushUrl({
+                url: 'pages/process/ProcessHome'
+              })
             })
-          })
 
-          Column({ space: 10 }) {
-            Image($r('app.media.baobiao'))
-              .width('60%')
-              .height('60%')
-              .borderRadius(15)
-            Text('统计报表')
-              .width('100%')
-              .textAlign(TextAlign.Center)
-              .fontSize(16)
-              .fontColor('#ffff')
+            Column({ space: 10 }) {
+              Image($r('app.media.baobiao'))
+                .width('60%')
+                .height('60%')
+                .borderRadius(15)
+              Text('统计报表')
+                .width('100%')
+                .textAlign(TextAlign.Center)
+                .fontSize(16)
+                .fontColor('#ffff')
 
+            }
+            .width('10%')
+            .justifyContent(FlexAlign.Center)
+            .height('90%')
+            .borderRadius(15)
+            .backgroundColor('#4d000000')
           }
-          .width('10%')
-          .justifyContent(FlexAlign.Center)
-          .height('90%')
-          .borderRadius(15)
-          .backgroundColor('#4d000000')
+          .width('100%')
+          .height('16%')
+          BottomOperateComp({ isHomePage: this.isHomePage })
         }
+        .backgroundImage($r('app.media.BG'))
+        .backgroundImageSize({ width: '100%', height: '100%' })
         .width('100%')
-        .height('16%')
-
-        BottomOperateComp({ isHomePage: this.isHomePage })
+        .height('100%')
       }
-      .backgroundImage($r('app.media.BG'))
-      .backgroundImageSize({ width: '100%', height: '100%' })
-      .width('100%')
       .height('100%')
+      .width('100%')
+      if (this.avatarFrame){
+        Column(){
+          Text('个人设置')
+            .height('33%')
+            .fontSize(px2vp(32))
+            .fontWeight(FontWeight.Medium)
+            .fontColor('#e6000000')
+          Divider()
+          Text('退出登录')
+            .height('33%')
+            .fontSize(px2vp(32))
+            .fontWeight(FontWeight.Medium)
+            .fontColor('#e6000000')
+            .onClick(()=>{
+             this.loginDialogController.open()
+            })
+          Divider()
+          Text('开关/重启')
+            .height('33%')
+            .fontSize(px2vp(32))
+            .fontWeight(FontWeight.Medium)
+            .fontColor('#e6000000')
+            .onClick(()=>{
+              this.shutdownTransparency=1
+              this.shutdownDialogController.open()
+              this.avatarFrame=!this.avatarFrame
+            })
+
+        }.width('15%')
+        .height('25%')
+        .backgroundColor('#ffff')
+        .margin({top:'4%',right:'1%'})
+        .borderRadius(21)
+      }
+      if (this.shutdownTransparency===1){
+        Column(){
+
+        }.width('100%')
+        .backgroundColor('#cc000000')
+        .height('100%')
+        //.opacity(0.8)
+        .blur(30)
+      }
     }
+    .alignContent(Alignment.TopEnd)
     .height('100%')
-  }
+    .width('100%')
 
+  }
   // 动画效果
   pageTransition() {
     // 设置1ms是为了使延时生效

+ 2 - 1
entry/src/main/ets/pages/Storage.ets

@@ -39,6 +39,7 @@ export interface ScanStorageclass {
   //出入库数量
   num?: number
   orgId?: string
+
   planNo?: string
   position?: string
   //	序列号
@@ -357,7 +358,7 @@ struct Storage {
             //仓储3D位置
             if (this.ChuRukun===0&&this.CangKu===0){
               /////出库
-              IntelligentWarehousingOutbound({ScanStoragelist:this.ScanStoragelist})
+              IntelligentWarehousingOutbound({ScanStoragelist:this.ScanStoragelist,})
             }else if (this.ChuRukun===1&&this.CangKu===0){
               ///入库
               IntelligentStorageWarehousing({ScanStoragelist:this.ScanStoragecodelist})

+ 4 - 267
entry/src/main/ets/view/ScanTheOutboundQRCode.ets

@@ -1,17 +1,6 @@
 import StorageRequest from '../common/util/request/StorageRequest';
 import {ScanStorageclass}from './IntelligentWarehousingOutbound'
-class Item{
-  name:string
-  id:string
-  text:string
-  type:string
-  constructor(  name:string,id:string,text:string,type:string) {
-    this.name=name
-    this.type=type
-    this.id=id
-    this.text=text
-  }
-}
+
 @CustomDialog
   ///无批次号物料详情弹窗
 struct Outbound {
@@ -135,224 +124,6 @@ struct Outbound {
   }
 }
 @CustomDialog
-  ///物料详情弹窗
-struct Outboundtwo {
-  private items:Array<Item>=[
-    new Item('大号螺丝','100*200','50','1'),
-    new Item('PCPA板','PCPA-ADSA-2344','5',''),
-    new Item('大号螺丝','100*200','50','1'),
-    new Item('大号螺丝','100*200','50','1'),
-    new Item('PCPA板','PCPA-ADSA-2344','5',''),
-    new Item('PCPA板','PCPA-ADSA-2344','5',''),
-    new Item('PCPA板','PCPA-ADSA-2344','5',''),
-    new Item('大号螺丝','100*200','50','1'),
-    new Item('大号螺丝','100*200','50','1'),
-  ]
-  @Link CunQuHuo:number
-  scroller: Scroller = new Scroller()
-  @State navigation:number=0
-  @Link textValue: string
-  @Link inputValue: string
-  controller: CustomDialogController
-  // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
-  cancel: () => void
-  confirm: () => void
-  build() {
-    Column() {
-      Column(){
-
-      }.width('100%')
-      .height('15%')
-      .onClick(()=>{
-        this.controller.close()
-      })
-      Row(){
-        Row(){
-
-        }.width('25%')
-        .height('100%')
-        .onClick(()=>{
-          this.controller.close()
-        })
-        Column(){
-          Text('物料详情')
-            .textAlign(TextAlign.Center)
-            .width('100%')
-            .height('10%')
-            .fontSize('51px')
-          Row(){
-            Column({space:5}){
-              Text('PCBA-ASSSD电路板')
-                .fontSize('32px')
-                .width('100%')
-              Text('100*200')
-                .fontSize($r('app.float.robot_state_font_size'))
-                .textAlign(TextAlign.Start)
-                .fontColor('#99000000')
-                .width('100%')
-              Text('批次号:'+'1223341232123124121')
-                .fontSize($r('app.float.robot_state_font_size'))
-                .textAlign(TextAlign.Start)
-                .fontColor('#99000000')
-                .width('100%')
-              Text('计划编号:'+'1231231231233')
-                .fontSize($r('app.float.robot_state_font_size'))
-                .textAlign(TextAlign.Start)
-                .fontColor('#99000000')
-                .width('100%')
-              Text('订单编号:'+'1231231231233')
-                .fontSize($r('app.float.robot_state_font_size'))
-                .textAlign(TextAlign.Start)
-                .fontColor('#99000000')
-                .width('100%')
-              Text('出库单号:'+'1231231231233')
-                .fontSize($r('app.float.robot_state_font_size'))
-                .textAlign(TextAlign.Start)
-                .fontColor('#99000000')
-                .width('100%')
-
-            }.width('60%')
-            .height('100%')
-            Column(){
-              Text('录入数量')
-                .fontSize($r('app.float.robot_state_font_size'))
-                .textAlign(TextAlign.Start)
-                .fontColor('#99000000')
-                .width('100%')
-              Text('20')
-                .fontSize('51px')
-                .width('100%')
-                .textAlign(TextAlign.Start)
-                .fontWeight(FontWeight.Bold)
-
-            }.width('40%')
-            .height('100%')
-            .justifyContent(FlexAlign.Center)
-
-          }.width('60%')
-          .height('20%')
-          Column(){
-            Grid(this.scroller) {
-              ForEach(this.items, (item:Item) => {
-                //    ForEach(this.Number, (day: string) => {
-                GridItem() {
-                  Row(){
-                    Column(){
-                      Text('126342394609')
-                    }.width('100%')
-                    .padding(10)
-                    .borderRadius(10)
-                    .alignItems(HorizontalAlign.Start)
-                    .justifyContent(FlexAlign.Center)
-                    .height('100%')
-                    .backgroundColor('#fff')
-                  }.width('100%')
-                  .height('20%')
-                  .padding({ left:10 })
-                  .borderRadius(10)
-                  .backgroundColor('#fff')
-
-                }
-              })
-            }
-
-            .columnsTemplate('1fr')
-            .columnsGap(10)
-            .rowsGap(10)
-            .onScrollIndex((first: number) => {
-              console.info(first.toString())
-            })
-            .width('100%')
-            .height('100%')
-
-
-
-          }.width('60%')
-          .height('60%')
-          .borderRadius(15)
-          Blank()
-        }.width('50%')
-        .height('100%')
-        .backgroundColor('#F1F3F5')
-        .borderRadius(20)
-        Row(){
-
-        }.width('25%')
-        .height('100%')
-        .onClick(()=>{
-          this.controller.close()
-        })
-      }.width('100%')
-      .height('70%')
-
-      Column(){
-
-      }.width('100%')
-      .height('15%')
-      .onClick(()=>{
-        this.controller.close()
-      })
-
-    }.width('100%')
-    .backgroundColor('#4d000000')
-    .height('100%')
-    .justifyContent(FlexAlign.Center)
-
-    // dialog默认的borderRadius为24vp,如果需要使用border属性,请和borderRadius属性一起使用。
-  }
-}
-////入库扫码
-// export interface ScanStorageclass {
-//   //批次号
-//   //已经占用箱数
-//   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
-// }
-@CustomDialog
   ///扫码弹窗
 struct buffer {
   @State num:number=0
@@ -394,7 +165,7 @@ struct buffer {
   build() {
     Column() {
       Column({space:5}){
-        Text('物料采集[1]')
+        Text('物料采集'+'['+this.ScanStoragelist.length+']')
           .textAlign(TextAlign.Center)
           .width('100%')
           .height('8%')
@@ -590,7 +361,6 @@ struct buffer {
     // dialog默认的borderRadius为24vp,如果需要使用border属性,请和borderRadius属性一起使用。
   }
 }
-
 @Component
 export struct ScanTheOutboundQRCode{
   @State textValue: string = ''
@@ -600,34 +370,6 @@ export struct ScanTheOutboundQRCode{
   @State CunQuHuo:number=0
   @Link private ScanStoragelist:Array<ScanStorageclass>
 
-  OutboundControllertwo: CustomDialogController = new CustomDialogController({
-    builder:Outboundtwo({
-      CunQuHuo:this.CunQuHuo,
-
-      textValue: $textValue,
-      inputValue: $inputValue,
-    }),
-
-    alignment: DialogAlignment.Center,
-    gridCount: 4,
-    customStyle: true,
-  })
-  //////物料详情弹窗控制器
-  OutboundController: CustomDialogController = new CustomDialogController({
-    builder:Outbound({
-      value:this.value,
-      CunQuHuo:this.CunQuHuo,
-      textValue: $textValue,
-      inputValue: $inputValue,
-    }),
-    // gridCount: 3,
-    //autoCancel: true,
-    alignment: DialogAlignment.Center,
-    //offset: { dx: 0, dy: -20 },
-    gridCount: 4,
-    customStyle: true,
-  })
-
   scroller: Scroller = new Scroller()
   MaterialRetrievalController: CustomDialogController = new CustomDialogController({
     builder: buffer({
@@ -653,7 +395,6 @@ export struct ScanTheOutboundQRCode{
             .height('100%')
             .fontWeight(FontWeight.Medium)
             .fontSize('32px')
-
         }.width('45%')
         .backgroundColor('#ffff')
         .borderRadius(15)
@@ -663,13 +404,10 @@ export struct ScanTheOutboundQRCode{
         })
         Blank()
         Row(){
-
           Text('已选LX2347598')
         }
         .width('48%')
         .height('100%')
-
-
       }.width('96%')
       .height('8%')
       .borderRadius(15)
@@ -686,6 +424,8 @@ export struct ScanTheOutboundQRCode{
                     .fontSize('32px')
                   Text(item.materialNo)
                     .fontSize('27px')
+                  Text(item.type)
+                    .fontSize('27px')
                   Row(){
                     Text(item.num.toString())
                       . fontSize('51px')
@@ -713,7 +453,6 @@ export struct ScanTheOutboundQRCode{
               .borderRadius(10)
               .backgroundColor('#fff')
               .onClick(()=>{
-                item.type===''?this.OutboundControllertwo.open():this.OutboundController.open()
               })
             }
           })
@@ -730,8 +469,6 @@ export struct ScanTheOutboundQRCode{
       }
       .width('95%').margin({ top: 5 })
       .height('100%')
-
-
     }
     .width('100%')
     .height('100%')

+ 1 - 1
entry/src/main/ets/view/ScanTheStorageCode.ets

@@ -651,7 +651,7 @@ export struct ScanTheStorageCode{
               .borderRadius(10)
               .backgroundColor('#fff')
               .onClick(()=>{
-                item.type===''?this.OutboundControllertwo.open():this.OutboundController.open()
+                item.batchCode===''?this.OutboundControllertwo.open():this.OutboundController.open()
               })
             }
           })

+ 12 - 15
entry/src/main/resources/base/media/restart.svg

@@ -1,18 +1,15 @@
 <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
 <circle opacity="0.2" cx="40" cy="40" r="40" fill="white"/>
-<g clip-path="url(#clip0_298_1206)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M39.9999 20C40.8836 20 41.5999 20.7163 41.5999 21.6V28.6468C41.5999 29.5305 40.8836 30.2468 39.9999 30.2468C39.1163 30.2468 38.3999 29.5305 38.3999 28.6468V21.6C38.3999 20.7163 39.1163 20 39.9999 20Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M39.9999 49.753C40.8836 49.753 41.5999 50.4694 41.5999 51.353V58.3998C41.5999 59.2835 40.8836 59.9998 39.9999 59.9998C39.1163 59.9998 38.3999 59.2835 38.3999 58.3998V51.353C38.3999 50.4694 39.1163 49.753 39.9999 49.753Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M54.1422 25.8576C54.767 26.4825 54.7671 27.4955 54.1422 28.1204L49.159 33.1036C48.5342 33.7284 47.5211 33.7284 46.8963 33.1036C46.2714 32.4787 46.2714 31.4657 46.8963 30.8408L51.8795 25.8576C52.5043 25.2328 53.5174 25.2328 54.1422 25.8576Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M33.1036 46.8963C33.7284 47.5211 33.7284 48.5342 33.1036 49.159L28.1204 54.1422C27.4955 54.7671 26.4825 54.767 25.8576 54.1422C25.2328 53.5174 25.2328 52.5043 25.8576 51.8795L30.8408 46.8963C31.4657 46.2714 32.4787 46.2714 33.1036 46.8963Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M20 39.9999C20 39.1163 20.7163 38.3999 21.6 38.3999H28.6468C29.5305 38.3999 30.2468 39.1163 30.2468 39.9999C30.2468 40.8836 29.5305 41.5999 28.6468 41.5999H21.6C20.7163 41.5999 20 40.8836 20 39.9999Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M49.753 39.9999C49.753 39.1163 50.4694 38.3999 51.353 38.3999H58.3998C59.2835 38.3999 59.9998 39.1163 59.9998 39.9999C59.9998 40.8836 59.2835 41.5999 58.3998 41.5999H51.353C50.4694 41.5999 49.753 40.8836 49.753 39.9999Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M25.8576 25.8576C26.4825 25.2328 27.4955 25.2328 28.1204 25.8576L33.1036 30.8408C33.7284 31.4657 33.7284 32.4787 33.1036 33.1036C32.4787 33.7284 31.4657 33.7284 30.8408 33.1036L25.8576 28.1204C25.2328 27.4955 25.2328 26.4825 25.8576 25.8576Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M46.8963 46.8963C47.5211 46.2714 48.5342 46.2714 49.159 46.8963L54.1422 51.8795C54.7671 52.5043 54.7671 53.5174 54.1422 54.1422C53.5174 54.7671 52.5043 54.7671 51.8795 54.1422L46.8963 49.159C46.2714 48.5342 46.2714 47.5211 46.8963 46.8963Z" fill="white"/>
-</g>
-<defs>
-<clipPath id="clip0_298_1206">
-<rect width="48" height="48" fill="white" transform="translate(16 16)"/>
-</clipPath>
-</defs>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M40 21C40.7782 21 41.409 21.6308 41.409 22.409V25.9272C41.409 26.7054 40.7782 27.3363 40 27.3363C39.2218 27.3363 38.591 26.7054 38.591 25.9272V22.409C38.591 21.6308 39.2218 21 40 21Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M49.5 23.5455C50.1739 23.9346 50.4048 24.7964 50.0157 25.4703L48.2566 28.5171C47.8676 29.1911 47.0058 29.422 46.3319 29.0329C45.6579 28.6438 45.427 27.782 45.8161 27.1081L47.5752 24.0613C47.9643 23.3873 48.8261 23.1564 49.5 23.5455Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M56.4543 30.5C56.8434 31.1739 56.6125 32.0357 55.9386 32.4248L52.8917 34.1839C52.2178 34.573 51.356 34.3421 50.9669 33.6681C50.5778 32.9942 50.8087 32.1324 51.4827 31.7434L54.5295 29.9843C55.2035 29.5952 56.0652 29.8261 56.4543 30.5Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M52.6637 40C52.6637 39.2218 53.2946 38.591 54.0728 38.591H57.591C58.3692 38.591 59 39.2218 59 40C59 40.7782 58.3692 41.409 57.591 41.409H54.0728C53.2946 41.409 52.6637 40.7782 52.6637 40Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M50.9669 46.3319C51.356 45.6579 52.2178 45.427 52.8917 45.8161L55.9386 47.5752C56.6125 47.9643 56.8434 48.8261 56.4543 49.5C56.0652 50.1739 55.2035 50.4048 54.5295 50.0157L51.4827 48.2566C50.8087 47.8676 50.5778 47.0058 50.9669 46.3319Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M46.3319 50.9671C47.0058 50.578 47.8676 50.8089 48.2566 51.4829L50.0157 54.5297C50.4048 55.2036 50.1739 56.0654 49.5 56.4545C48.8261 56.8436 47.9643 56.6127 47.5752 55.9387L45.8161 52.8919C45.427 52.218 45.6579 51.3562 46.3319 50.9671Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M40 52.6637C40.7782 52.6637 41.409 53.2946 41.409 54.0728V57.591C41.409 58.3692 40.7782 59 40 59C39.2218 59 38.591 58.3692 38.591 57.591V54.0728C38.591 53.2946 39.2218 52.6637 40 52.6637Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M33.6681 50.9671C34.3421 51.3562 34.573 52.218 34.1839 52.8919L32.4248 55.9387C32.0357 56.6127 31.1739 56.8436 30.5 56.4545C29.8261 56.0654 29.5952 55.2036 29.9843 54.5297L31.7434 51.4829C32.1324 50.8089 32.9942 50.578 33.6681 50.9671Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M29.0331 46.3319C29.4222 47.0058 29.1913 47.8676 28.5173 48.2566L25.4705 50.0157C24.7965 50.4048 23.9348 50.1739 23.5457 49.5C23.1566 48.8261 23.3875 47.9643 24.0614 47.5752L27.1083 45.8161C27.7822 45.427 28.644 45.6579 29.0331 46.3319Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M21 40C21 39.2218 21.6308 38.591 22.409 38.591H25.9272C26.7054 38.591 27.3363 39.2218 27.3363 40C27.3363 40.7782 26.7054 41.409 25.9272 41.409H22.409C21.6308 41.409 21 40.7782 21 40Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5457 30.5C23.9348 29.8261 24.7965 29.5952 25.4705 29.9843L28.5173 31.7434C29.1913 32.1324 29.4222 32.9942 29.0331 33.6681C28.644 34.3421 27.7822 34.573 27.1083 34.1839L24.0614 32.4248C23.3875 32.0357 23.1566 31.1739 23.5457 30.5Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M30.5 23.5455C31.1739 23.1564 32.0357 23.3873 32.4248 24.0613L34.1839 27.1081C34.573 27.782 34.3421 28.6438 33.6681 29.0329C32.9942 29.422 32.1324 29.1911 31.7434 28.5171L29.9843 25.4703C29.5952 24.7964 29.8261 23.9346 30.5 23.5455Z" fill="white"/>
 </svg>