Browse Source

小车调控

cjb 2 months ago
parent
commit
434564c070
39 changed files with 3050 additions and 660 deletions
  1. 67 0
      entry/src/main/ets/common/constants/CommonConstants.ets
  2. 73 12
      entry/src/main/ets/common/util/mqtt.ets
  3. 68 0
      entry/src/main/ets/common/util/request/RobotErrorHandleRequest.ets
  4. 2 1
      entry/src/main/ets/common/util/request/WmsRequest.ets
  5. 67 32
      entry/src/main/ets/component/InBoundView.ets
  6. 6 1
      entry/src/main/ets/component/NavigationBar.ets
  7. 210 107
      entry/src/main/ets/component/OrderMaterialsStorageView.ets
  8. 231 0
      entry/src/main/ets/component/RgvControlView.ets
  9. 30 0
      entry/src/main/ets/pages/EmptyBoxStorage.ets
  10. 523 0
      entry/src/main/ets/pages/LittleMaterialOutBound.ets
  11. 44 170
      entry/src/main/ets/pages/LittleMaterialsStorage.ets
  12. 765 119
      entry/src/main/ets/pages/LoginPage.ets
  13. 8 9
      entry/src/main/ets/pages/Menu.ets
  14. 5 12
      entry/src/main/ets/pages/OrderMaterialsStorage.ets
  15. 642 0
      entry/src/main/ets/pages/RgvControl.ets
  16. 51 0
      entry/src/main/ets/params/MaterialInformationParam.ets
  17. 58 0
      entry/src/main/ets/params/RobotsParam.ets
  18. 22 11
      entry/src/main/ets/view/wms/OrderMaterialStorageFirstStep.ets
  19. 74 179
      entry/src/main/ets/view/wms/OrderMaterialStorageSecondStep.ets
  20. 6 6
      entry/src/main/ets/view/wms/OrderMaterialStorageThirdStep.ets
  21. 12 0
      entry/src/main/ets/viewmodel/wms/RequestParamModel.ets
  22. 12 0
      entry/src/main/resources/base/element/color.json
  23. 4 0
      entry/src/main/resources/base/element/font.json
  24. BIN
      entry/src/main/resources/base/media/login_backgroundImage.png
  25. BIN
      entry/src/main/resources/base/media/rgv_001.png
  26. 3 0
      entry/src/main/resources/base/media/rgv_add.svg
  27. 8 0
      entry/src/main/resources/base/media/rgv_clean_error.svg
  28. 8 0
      entry/src/main/resources/base/media/rgv_end_position.svg
  29. 4 0
      entry/src/main/resources/base/media/rgv_lifting.svg
  30. 8 0
      entry/src/main/resources/base/media/rgv_move.svg
  31. 6 0
      entry/src/main/resources/base/media/rgv_paw_close.svg
  32. 6 0
      entry/src/main/resources/base/media/rgv_paw_open.svg
  33. 5 0
      entry/src/main/resources/base/media/rgv_set_position.svg
  34. 4 0
      entry/src/main/resources/base/media/rgv_start_charge.svg
  35. 4 0
      entry/src/main/resources/base/media/rgv_stop_charge.svg
  36. 3 0
      entry/src/main/resources/base/media/rgv_subtraction.svg
  37. 4 0
      entry/src/main/resources/base/media/rgv_turn_off.svg
  38. 4 0
      entry/src/main/resources/base/media/rgv_turn_on.svg
  39. 3 1
      entry/src/main/resources/base/profile/main_pages.json

+ 67 - 0
entry/src/main/ets/common/constants/CommonConstants.ets

@@ -0,0 +1,67 @@
+import {RobotInfo} from '../../params/RobotsParam'
+export default class CommonConstants {
+  static readonly RDB_NAME: string = 'Presentation.db'
+  static readonly PRE_NAME: string = 'MyPreferences'
+  static AUTH_TOKEN: string = ''
+  // 附件地址前缀
+  static FILE_URL_PREFIX: string = 'http://192.168.101.4:9000'
+
+  // 当前登录用户相关信息
+  static USER_ID?: number = 1
+  static USER_NAME: string = ''
+  static USER_AVATAR: string = ''
+  static STATION_NANE: string = ''
+  static STATION_ID: number
+  static STATION_CODE: string = 'GW0002'
+  static STATION_IP: string = ''
+  static stationDictValue: string = ''
+  // 是否是退出登陆
+  static LOGIN_OUT: boolean = false
+  static readonly STORAGE_TYPE: string[] = ['电子元器件', '电路板', '结构件', '辅助材料']
+  //吊篮高度
+  static readonly HANGING_HEIGHT :Array<SelectOption> =[
+    {value:"原位"},
+    {value:"第一层"},
+    {value:"第二层"},
+    {value:"第三层"},
+    {value:"第四层"},
+    {value:"第五层"},
+    {value:"第六层"},
+    {value:"工位料口层"},
+    {value:"库位料口层"}
+  ]
+  static readonly PARK_TYPE: string[] = ['出入库位置', '充电位置', '工作台', '其他']
+  static readonly RGV_STATUS: Record<string, string> = {
+    '0': '空闲',
+    '1': '移动中',
+    '2': '等待路径',
+    '3': '取箱中',
+    '4': '放箱中',
+    '5': '充电中',
+    '6': '关机',
+  };
+  static readonly ROBOTS: RobotInfo[] = [
+    {
+      id: 1,
+      robotCode: 'rgv1',
+      storageId: 1,
+      robotType: 2,
+      robotToward: 2,
+      x: 1,
+      y: 1,
+      lastSelfCheck: '2024/02/16 11:11:34'
+    } as RobotInfo,
+    {
+      id: 2,
+      robotCode: 'rgv2',
+      storageId: 1,
+      robotType: 2,
+      robotToward: 2,
+      x: 1,
+      y: 1,
+      lastSelfCheck: '2024/02/16 11:11:34'
+    } as RobotInfo,
+  ]
+  //万能卡片
+  static readonly CARD_TYPE_DATA: number[] = [3, 1, 5];
+}

+ 73 - 12
entry/src/main/ets/common/util/mqtt.ets

@@ -5,6 +5,10 @@ import emitter from '@ohos.events.emitter';
 const TAG = 'MqttManager';
 export enum EventId {
   MQTT_MESSAGE = 1001,
+  STATION2_SET = 1002,
+  STATION2_WEIGHT = 1003,
+  RFID1 = 1004,
+  RFID2 = 1005
 }
 // 1. 定义事件ID常量(必须为number)
 type MessageCallback = (topic: string, payload: string) => void;
@@ -62,21 +66,33 @@ class MqttManager {
   private handleMessage(message: MqttMessage): void {
     const topic = message.topic;
     const payload = message.payload.toString();
-
     // 触发回调
     const topicCallbacks = this.callbacks.get(topic) || [];
     topicCallbacks.forEach(cb => cb(topic, payload));
-
-    // 正确传递参数:事件对象 + 数据对象(修正点1)
-    emitter.emit({
-      eventId: EventId.MQTT_MESSAGE
-    }, {
-      data: {  // 按照 EventData 接口要求包裹数据
-        topic: topic,
-        payload: payload
-      }
-    });
-
+    console.info("sssssss"+payload)
+    try {
+      const valueJson: MQTTReceiveData = JSON.parse(payload);
+      const station2Set = valueJson?.d?.find(item => item.tag === 'Station2Set')?.value;
+      const station2Weight = decodeWeight(valueJson?.d?.find(item => item.tag === 'Station2Weight')?.value);
+      const rfidString = decodeRfidString(
+        valueJson?.d?.find(item => item.tag === 'RFID3Data1')?.value as number,
+        valueJson?.d?.find(item => item.tag === 'RFID3Data2')?.value as number,
+        valueJson?.d?.find(item => item.tag === 'RFID3Data3')?.value as number,
+        valueJson?.d?.find(item => item.tag === 'RFID3Data4')?.value as number
+      );
+      console.info("sssssss"+rfidString)
+      emitter.emit({
+        eventId: EventId.MQTT_MESSAGE
+      }, {
+        data: {  // 按照 EventData 接口要求包裹数据
+          station2Set: station2Set,
+          station2Weight: station2Weight,
+          rfid: rfidString
+        }
+      });
+    } catch (e) {
+      console.error("MQTT消息处理异常:", e);
+    }
   }
 
   public async connect(options: MqttConnectOptions): Promise<boolean> {
@@ -182,3 +198,48 @@ export interface MQTTPublishData {
 export interface MQTTReceiveData {
   d: TagValuePair[];
 }
+
+
+function decodeRegister(regValue: number | undefined): string {
+  console.info("regvalue"+String(regValue))
+  if (regValue === undefined) return ''; // 处理undefined
+
+  // 确保是16位无符号整数
+  const value = regValue & 0xFFFF;
+
+  // 提取高8位和低8位
+  const highByte = (value >> 8) & 0xFF;
+  const lowByte = value & 0xFF;
+
+  // 转换为ASCII字符
+  return String.fromCharCode(highByte) + String.fromCharCode(lowByte);
+}
+
+// 完整RFID解码函数
+function decodeRfidString(
+  rfidData1?: number,
+  rfidData2?: number,
+  rfidData3?: number,
+  rfidData4?: number
+): string {
+  return [
+    decodeRegister(rfidData1),
+    decodeRegister(rfidData2),
+    decodeRegister(rfidData3),
+    decodeRegister(rfidData4)
+  ].join('');
+}
+
+function decodeWeight(regValue: number | undefined): number {
+  if (regValue === undefined) return 0; // 处理undefined
+
+  // 确保是16位无符号整数
+  const value = regValue & 0xFFFF;
+
+  // 提取高8位和低8位
+  const highByte = (value >> 8) & 0xFF;
+  const lowByte = value & 0xFF;
+
+  // 转换为ASCII字符
+  return highByte+lowByte/100
+}

+ 68 - 0
entry/src/main/ets/common/util/request/RobotErrorHandleRequest.ets

@@ -0,0 +1,68 @@
+import axios, {
+  AxiosError,
+  AxiosResponse,
+  AxiosRequestHeaders,
+  AxiosRequestConfig,
+  CreateAxiosDefaults,
+  InternalAxiosRequestConfig
+} from '@ohos/axios';
+
+import { printError, printRequest, printResponse, handleRes } from './Helps';
+
+
+//const baseUrl = "http://10.88.20.150:8000/"
+const baseUrl = "http://192.168.1.100:8000/"
+const DEBUG = true //
+
+// 创建实例
+const StorageRequest = axios.create(
+
+  {
+    baseURL: baseUrl,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8',
+    },
+    timeout: 60 * 1000,
+  }
+)
+
+// 添加请求拦截器
+StorageRequest.interceptors.request.use((config: InternalAxiosRequestConfig) => {
+
+  printRequest(config)
+  return config;
+}, (error: AxiosError) => {
+  // 对请求错误做些什么
+  printError(error)
+  return Promise.reject(error);
+});
+
+
+// 添加响应拦截器
+StorageRequest.interceptors.response.use((response: AxiosResponse) => {
+  // 对响应数据做点什么
+  printResponse(response)
+  let res = handleRes(response)
+  let success = res[0] as boolean
+  let msg = res[1] as string
+  console.debug("handleRes的返回结果 ", success, msg)
+
+  if (success) {
+    return response.data.data;
+  }
+  else {
+    return Promise.reject<string>(msg)
+  }
+
+}, (error: AxiosError) => {
+  // 对响应错误做点什么
+  printError(error)
+
+  return Promise.reject(error);
+});
+
+export default StorageRequest;
+
+
+
+

+ 2 - 1
entry/src/main/ets/common/util/request/WmsRequest.ets

@@ -10,7 +10,8 @@ import { printError, printRequest, printResponse, handleRes } from './Helps';
 
 
 // jiaxiaoqiang:这里要改
-const baseUrl = "http://192.168.1.3:11010/" //xianfeng
+//const baseUrl = "http://192.168.1.3:11010/" //chuangke
+const baseUrl = "http://192.168.1.3:8079"//huajing
 // const baseUrl = "http://192.168.1.4:8079/" //chuangke
 const DEBUG = true //
 

+ 67 - 32
entry/src/main/ets/component/InBoundView.ets

@@ -1,45 +1,49 @@
 import MqttManager from '../common/util/mqtt';
 import emitter from '@ohos.events.emitter';
-import {EventId,MQTTPublishData,MQTTReceiveData} from '../common/util/mqtt';
+import {EventId,MQTTPublishData} from '../common/util/mqtt';
+import promptAction from '@ohos.promptAction';
+import RequestParamModel from '../viewmodel/wms/RequestParamModel'
+import CommonConstants from '../common/constants/CommonConstants'
+import {MaterialListInformation,MaterialBoxInfo,outBoxClass} from '../params/MaterialInformationParam'
+import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
+import WmsRequest from '../common/util/request/WmsRequest'
 @Component
 export struct InBoundView {
   @Prop messages: string[] = []
   @State drawerPositionStatus: number = 1
   @State materialBoxID: string = ''
+  @State putOutButtonClick :number = 1
+  @State putInButtonClick :number = 1
+  @State InboundButtonClick :number = 1
   //料箱重量
   @State materialBoxWeight: number = 0
 
+  Warehousing = async () => {
+    let res: MaterialBoxInfo[] = await WmsRequest.post("/api/v1/wmsOrder/inBox", {
+      houseNo:'1',
+      stanCode:CommonConstants.STATION_CODE,
+      vehicleNo:this.materialBoxID
+    } as RequestParamModel)
+    console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
+
+    promptAction.showToast({
+      message: '请求成功,业务处理中。。。',
+      duration: 2000,
+      bottom: 150
+    });
+
+  }
+
   refreshTag=()=>{
     emitter.on({
       eventId: EventId.MQTT_MESSAGE
-    }, (eventData: emitter.EventData) => {
-
-      try {
-        const payload = eventData.data?.['payload'] as string;
-        const valueJson: MQTTReceiveData = JSON.parse(payload);
-        const stationItem = valueJson?.d?.find(item => item.tag === 'Station2Set');
-        const stationWeight = valueJson?.d?.find(item => item.tag === 'Station2Weight');
-        const rfidString = decodeRfidString(
-          valueJson?.d?.find(item => item.tag === 'RFID3Data1')?.value as number,
-          valueJson?.d?.find(item => item.tag === 'RFID3Data2')?.value as number,
-          valueJson?.d?.find(item => item.tag === 'RFID3Data3')?.value as number,
-          valueJson?.d?.find(item => item.tag === 'RFID3Data4')?.value as number
-        );
-        this.materialBoxID = rfidString;
-
-        //this.materialBoxID = "XF-00002";
-        if (stationItem?.value !== undefined) {
-          this.drawerPositionStatus = Number(stationItem.value);
-          console.log(`更新抽屉状态: ${this.drawerPositionStatus} (${typeof this.drawerPositionStatus})`);
-        }
-        if (stationWeight?.value !== undefined) {
-          this.materialBoxWeight =decodeWeight(stationWeight.value)
-          console.log(`更新重量状态: ${this.materialBoxWeight} (${typeof this.materialBoxWeight})`);
-        }
-      } catch (e) {
-        console.error("MQTT消息处理异常:", e);
-      }
-    });
+      }, (eventData: emitter.EventData) => {
+      this.materialBoxID = eventData?.data?.['rfid1']
+      console.info("ssssa+"+this.materialBoxID)
+      this.drawerPositionStatus = Number(eventData?.data?.['station2Set'])
+      this.materialBoxWeight = Number(eventData?.data?.['station2Weight'])
+      console.info(`ssssss${this.materialBoxID}`)
+    })
   }
   //抽屉推出
   pushOut =()=>{
@@ -158,7 +162,16 @@ export struct InBoundView {
         .height('100%')
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
+        .scale({ x: this.putOutButtonClick, y: this.putOutButtonClick })
+        .animation({
+          duration: 200,
+          curve: Curve.Linear  // 弹性曲线更生动
+        })
         .onClick(() => {
+          this.putOutButtonClick = 0.9; // 点击时缩小
+          setTimeout(() => {
+            this.putOutButtonClick = 1; // 0.2秒后恢复
+          }, 200);
           this.pushOut()
         })
 
@@ -171,7 +184,16 @@ export struct InBoundView {
         .height('100%')
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
+        .scale({ x: this.putInButtonClick, y: this.putInButtonClick })
+        .animation({
+          duration: 200,
+          curve: Curve.Linear  // 弹性曲线更生动
+        })
         .onClick(() => {
+          this.putInButtonClick = 0.9; // 点击时缩小
+          setTimeout(() => {
+            this.putInButtonClick = 1; // 0.2秒后恢复
+          }, 200);
           this.pushIn()
         })
       }
@@ -182,7 +204,7 @@ export struct InBoundView {
       .alignItems(VerticalAlign.Top)
 
       Button({ type: ButtonType.Normal }) {
-        Text("空箱入库")
+        Text("入库")
           .fontSize($r('app.float.fontSize_12'))
           .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
       }
@@ -191,8 +213,18 @@ export struct InBoundView {
       .height('6%')
       .backgroundColor($r('app.color.20FFFFFF'))
       .borderRadius($r('app.float.virtualSize_6_4'))
+      .scale({ x: this.InboundButtonClick, y: this.InboundButtonClick })
+      .animation({
+        duration: 200,
+        curve: Curve.Linear  // 弹性曲线更生动
+      })
       .onClick(() => {
-        // 按钮点击事件处理
+        this.InboundButtonClick = 0.9; // 点击时缩小
+        setTimeout(() => {
+          this.InboundButtonClick = 1; // 0.2秒后恢复
+        }, 200);
+        // 按钮点击事件处理\
+        this.Warehousing();
       })
     }
     .width('100%')
@@ -243,4 +275,7 @@ function decodeWeight(regValue: number | undefined): number {
 
   // 转换为ASCII字符
   return highByte+lowByte/100
-}
+}
+
+
+

+ 6 - 1
entry/src/main/ets/component/NavigationBar.ets

@@ -1,4 +1,4 @@
-
+import router from '@ohos.router';
 @Component
 export struct NavigationBar {
   @Prop notificationNumber: number = 0;
@@ -30,6 +30,11 @@ export struct NavigationBar {
         .width($r('app.float.virtualSize_23'))
         .height($r('app.float.virtualSize_23'))
         .fillColor($r('app.color.FFFFFF'))
+        .onClick(()=>{
+          router.pushUrl({
+            url: 'pages/RgvControl'
+          })
+        })
     }
     .height('100%')
     .width('100%')

+ 210 - 107
entry/src/main/ets/component/OrderMaterialsStorageView.ets

@@ -1,4 +1,6 @@
 import {DemandMaterial,OrderParams,MaterialItem,MaterialBox,EmptyBox} from "../params/OrderMaterialsStorageParams"
+import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
+import {MaterialListInformation,MaterialBoxInfo} from '../params/MaterialInformationParam'
 @Component
 export struct ProcessFlow {
   @Prop currentStep:number =0
@@ -88,30 +90,25 @@ struct FlowStep {
 @Component
 export struct OrderListComponent {
   private scrollerForList: Scroller = new Scroller()
-  @Prop orders: OrderParams[] = []
+  @Prop workOrders: WorkOrderInfo[] = []
+  @Link selectWorkOrder: WorkOrderInfo
   @State selectedIndex: number = -1  // 添加选中索引状态
-  @Link selectedOrderNo: string
-  @Link selectedOrderDate: string
-  @Link selectedOrderName: string
-  @Link selectedOrderInRatio:string
+
 
   // 选中回调函数
   private onSelect(index: number): void {
     this.selectedIndex = index
-    this.selectedOrderNo = this.orders[index].orderNo
-    this.selectedOrderDate = this.orders[index].date
-    this.selectedOrderName = this.orders[index].orderName
-    this.selectedOrderInRatio = this.orders[index].progress
+    this.selectWorkOrder = this.workOrders[index]
   }
 
   build() {
     Column() { // 订单列表
       List({ space: 8,scroller:this.scrollerForList }) {
-        ForEach(this.orders, (item: OrderParams, index) => {
+        ForEach(this.workOrders, (item: WorkOrderInfo, index) => {
           ListItem() {
             Column() {
               // 订单标题(带订单号)
-              Text(`${item.orderName}`)
+              Text(`${item.orderName}${item.orderCode}`)
                 .fontSize($r('app.float.fontSize_12'))
                 .fontColor($r('app.color.FFFFFF'))
                 .width('100%')
@@ -119,11 +116,11 @@ export struct OrderListComponent {
 
               // 订单详情
               Column({ space: 3 }) {
-                Text(`工单编号: ${item.orderNo}`)
+                Text(`工单编号: ${item.workOrderCode}`)
                   .fontColor($r('app.color.FFFFFF'))
                   .fontSize($r('app.float.fontSize_8'))
 
-                Text(`下发时间: ${item.date}`)
+                Text(`下发时间: ${item.planStartWhen}`)
                   .fontColor($r('app.color.FFFFFF'))
                   .fontSize($r('app.float.fontSize_8'))
 
@@ -132,7 +129,7 @@ export struct OrderListComponent {
                     .fontColor($r('app.color.FFFFFF'))
                     .fontSize($r('app.float.fontSize_8'))
 
-                  Text(item.progress)
+                  Text(`${(Number(item.inventoryNum) / Number(item.planNum) * 100).toFixed(0)}%`)
                     .fontColor($r('app.color.FFFFFF'))
                     .fontSize($r('app.float.fontSize_8'))
                     .margin({ left: 4 })
@@ -223,14 +220,12 @@ export struct MaterialGrid {
 
 @Component
 export struct SingleOrder {
-  @Prop selectedOrderNo: string
-  @Prop selectedOrderDate: string
-  @Prop selectedOrderName: string
-  @Prop selectedOrderInRatio: string
+
+  @Prop selectWorkOrder: WorkOrderInfo = {}
   build() {
     Column() {
       // 订单标题(带订单号)
-      Text(this.selectedOrderName)
+      Text(`${this.selectWorkOrder.orderName}${this.selectWorkOrder.orderCode}`)
         .fontSize($r('app.float.fontSize_12'))
         .fontColor($r('app.color.FFFFFF'))
         .width('100%')
@@ -238,11 +233,11 @@ export struct SingleOrder {
 
       // 订单详情
       Column({ space: 3 }) {
-        Text(`工单编号: ${this.selectedOrderNo}`)
+        Text(`工单编号: ${this.selectWorkOrder.workOrderCode}`)
           .fontColor($r('app.color.FFFFFF'))
           .fontSize($r('app.float.fontSize_8'))
 
-        Text(`下发时间: ${this.selectedOrderDate}`)
+        Text(`下发时间: ${this.selectWorkOrder.planStartWhen}`)
           .fontColor($r('app.color.FFFFFF'))
           .fontSize($r('app.float.fontSize_8'))
 
@@ -251,7 +246,7 @@ export struct SingleOrder {
             .fontColor($r('app.color.FFFFFF'))
             .fontSize($r('app.float.fontSize_8'))
 
-          Text(this.selectedOrderInRatio)
+          Text(`${(Number(this.selectWorkOrder.inventoryNum) / Number(this.selectWorkOrder.planNum) * 100).toFixed(0)}%`)
             .fontColor($r('app.color.FFFFFF'))
             .fontSize($r('app.float.fontSize_8'))
             .margin({ left: 4 })
@@ -281,6 +276,8 @@ export struct BoxGrid {
   // 拆分两个独立的状态变量
   @State selectedMaterialIndex: number = -1  // 物料箱选中索引
   @State selectedEmptyIndex: number = -1     // 空箱选中索引
+  @Link isQueryMaterial : boolean
+  @Link selectedMaterialBox : MaterialBoxInfo
 
   // 独立的选择回调
   private onSelectMaterial(index: number) {
@@ -295,6 +292,159 @@ export struct BoxGrid {
     this.selectedMaterialIndex = -1
   }
 
+  @Prop materialBoxes: MaterialBoxInfo[] = [];
+  @Prop emptyBoxes: MaterialBoxInfo[] = [];
+  build() {
+    Column() {
+      if(this.isQueryMaterial){
+        Grid(this.scrollerMaterial) {
+          ForEach(this.materialBoxes, (box: MaterialBox, index) => {
+            GridItem() {
+              Column() {
+                // 订单标题(带订单号)
+                Text(`${box.name}`)
+                  .fontSize($r('app.float.fontSize_12'))
+                  .fontColor($r('app.color.FFFFFF'))
+                  .width('100%')
+                  .textAlign(TextAlign.Start)
+                  .margin({ bottom: '2%',left:'2%' })
+                // 订单详情
+                Column({ space: 3 }) {
+                  Text(`料箱编号: ${box.id}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_8'))
+                    .textAlign(TextAlign.Start)
+                  Text(`料箱类型: ${box.boxType}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_8'))
+                    .textAlign(TextAlign.Start)
+                  Text(`所属订单: ${box.order}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_8'))
+                    .textAlign(TextAlign.Start)
+                  Text(`数量: ${box.boxNumber}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_8'))
+                    .textAlign(TextAlign.Start)
+                  Text(`位置: ${box.position}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_8'))
+                    .textAlign(TextAlign.Start)
+                }
+                .width('100%')
+                .margin({left:'2%'})
+                .justifyContent(FlexAlign.Start)
+                .alignItems(HorizontalAlign.Start)
+              }
+              //.margin({ top: 6 })
+              .alignItems(HorizontalAlign.Start)
+            }
+            .backgroundColor(index === this.selectedMaterialIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')) // 选中状态加深
+            .borderRadius($r('app.float.virtualSize_9_6'))
+            .padding(8)
+            .border({
+              width: 2,
+              color: index === this.selectedMaterialIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')
+            })
+            .onClick(() => {
+              this.onSelectMaterial(index)
+              //this.selectedMaterialBox = box.id
+            })
+
+          })
+        }
+        .columnsTemplate('1fr 1fr 1fr')
+        // .rowsTemplate('1fr 1fr')
+        .columnsGap(10) // 移除网格内部列间距
+        .rowsGap(10) // 移除网格内部行间距
+        .width('100%') // 确保填满父容器
+        .height('48%')
+        .padding(10)
+
+        Divider()
+          .strokeWidth(1)
+          .color($r('app.color.20FFFFFF'))
+          .margin({top:'1%'})
+        //.margin({top:'2%'})
+
+      }
+      Grid(this.scrollerEmpty) {
+        ForEach(this.emptyBoxes, (box: MaterialBoxInfo, index) => {
+          GridItem() {
+            Row() {
+              Column(){
+                // 订单标题(带订单号)
+                Text(`空箱`)
+                  .fontSize($r('app.float.fontSize_12'))
+                  .fontColor($r('app.color.FFFFFF'))
+                  .width('100%')
+                  .textAlign(TextAlign.Start)
+                  .margin({ top: '2%',left:'2%' })
+                Text(`料箱编号: ${box.vehicleCode}`)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .margin({ top: '40%',left:'2%' })
+                Text(`层数: ${box.position}`)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .margin({ left:'2%' })
+                Text(`坐标: ${box.coordinate}`)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .margin({ left:'2%' })
+              }.width('40%').alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.Start)
+              Row(){
+                Image($r('app.media.empty_box'))
+                  .width('100%')
+                  .height('100%')
+                  .objectFit(ImageFit.Contain)
+              }.width('60%')
+            }
+            //.margin({ top: 6 })
+
+          }
+          .backgroundColor(index === this.selectedEmptyIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')) // 选中状态加深
+          .borderRadius($r('app.float.virtualSize_9_6'))
+          .padding(8)
+          .height(this.isQueryMaterial?'50%':'25%')
+          .border({
+            width: 2,
+            color: index === this.selectedEmptyIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')
+          })
+          .onClick(() => {
+            this.onSelectEmpty(index)
+            this.selectedMaterialBox = box
+          })
+
+        })
+      }
+      .columnsTemplate('1fr 1fr 1fr')
+
+      .columnsGap(10) // 移除网格内部列间距
+      .rowsGap(10) // 移除网格内部行间距
+      .width('100%') // 确保填满父容器
+      .height(this.isQueryMaterial?'48%':'96%')
+      .padding(10)
+      .margin({top:'1%'})
+
+    }
+  }
+}
+
+
+@Component
+export struct MaterialBoxGrid {
+  private scrollerMaterial: Scroller = new Scroller()
+
+  @State selectedMaterialIndex: number = -1  // 物料箱选中索引
+
+  private onSelectMaterial(index: number) {
+    this.selectedMaterialIndex = index
+  }
+
   @Prop materialBoxes: MaterialBox[] = [];
   @Prop emptyBoxes: EmptyBox[] = [];
   build() {
@@ -355,100 +505,17 @@ export struct BoxGrid {
         })
       }
       .columnsTemplate('1fr 1fr 1fr')
-     // .rowsTemplate('1fr 1fr')
-      .columnsGap(10) // 移除网格内部列间距
-      .rowsGap(10) // 移除网格内部行间距
-      .width('100%') // 确保填满父容器
-      .height('48%')
-      .padding(10)
-
-      Divider()
-        .strokeWidth(1)
-        .color($r('app.color.20FFFFFF'))
-        .margin({top:'1%'})
-        //.margin({top:'2%'})
-
-      Grid(this.scrollerEmpty) {
-        ForEach(this.emptyBoxes, (box: EmptyBox, index) => {
-          GridItem() {
-            Row() {
-              Column(){
-                // 订单标题(带订单号)
-                Text(`空箱`)
-                  .fontSize($r('app.float.fontSize_12'))
-                  .fontColor($r('app.color.FFFFFF'))
-                  .width('100%')
-                  .textAlign(TextAlign.Start)
-                  .margin({ top: '2%',left:'2%' })
-                Text(`位置: ${box.position}`)
-                  .fontColor($r('app.color.FFFFFF'))
-                  .fontSize($r('app.float.fontSize_8'))
-                  .textAlign(TextAlign.Start)
-                  .margin({ top: '60%',left:'2%' })
-              }.width('40%').alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.Start)
-              Row(){
-                Image($r('app.media.empty_box'))
-                  .width('100%')
-                  .height('100%')
-                  .objectFit(ImageFit.Contain)
-              }.width('60%')
-            }
-            //.margin({ top: 6 })
-
-          }
-          .backgroundColor(index === this.selectedEmptyIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')) // 选中状态加深
-          .borderRadius($r('app.float.virtualSize_9_6'))
-          .padding(8)
-          .height('50%')
-          .border({
-            width: 2,
-            color: index === this.selectedEmptyIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')
-          })
-          .onClick(() => {
-            this.onSelectEmpty(index)
-          })
-
-        })
-      }
-      .columnsTemplate('1fr 1fr 1fr')
-
+      // .rowsTemplate('1fr 1fr')
       .columnsGap(10) // 移除网格内部列间距
       .rowsGap(10) // 移除网格内部行间距
       .width('100%') // 确保填满父容器
-      .height('48%')
+      .height('97%')
       .padding(10)
-      .margin({top:'1%'})
 
     }
-
-
-    // 背景色与图片一致
-
   }
-
 }
 
-// 辅助组件:料箱信息行
-@Component
-struct BoxInfoRow {
-  @Prop label: string = ''
-  @Prop value: string = ''
-
-  build() {
-    Row() {
-      Text(`${this.label}:`)
-        .fontSize(14)
-        .fontColor('#666666')
-
-      Text(this.value)
-        .fontSize(14)
-        .fontColor('#000000')
-    }
-    .width('100%')
-    .margin({ bottom: 6 })
-    .justifyContent(FlexAlign.Start)
-  }
-}
 
 @Component
 export struct MaterialList {
@@ -574,4 +641,40 @@ export struct MaterialListComponent {
     .width('100%')
     .height('100%')
   }
+}
+
+@Component
+export struct MaterialButton {
+  @State scaleValue : number = 1
+  @Prop icon: Resource = $r('app.media.rgv_turn_off')
+  onButtonClick: () => void = () => {}
+  build() {
+    Row() {
+      Button({ type: ButtonType.Normal }) {
+        Image(this.icon)
+          .width('50%')
+          .height('50%')
+          .objectFit(ImageFit.Contain)
+          .fillColor($r('app.color.FFFFFF'))
+      }
+      .width('100%')
+      .height('100%')
+      .backgroundColor($r('app.color.20FFFFFF'))
+      .borderRadius($r('app.float.virtualSize_6_4'))
+      .scale({ x: this.scaleValue, y: this.scaleValue })
+      .animation({
+        duration: 200,
+        curve: Curve.Linear  // 弹性曲线更生动
+      })
+      .onClick(() => {
+        this.scaleValue = 0.9; // 点击时缩小
+        setTimeout(() => {
+          this.scaleValue = 1; // 0.2秒后恢复
+        }, 200);
+        if (this.onButtonClick) {
+          this.onButtonClick()
+        }
+      })
+    }
+  }
 }

+ 231 - 0
entry/src/main/ets/component/RgvControlView.ets

@@ -0,0 +1,231 @@
+
+@Component
+export struct InfoRow {
+  label: string = ''
+  @Prop value: string = ''
+  valueColor?: Resource = $r('app.color.FFFFFF') // 默认白色,可覆盖
+
+  build() {
+    Row({ space: 5 }) {
+      Circle()
+        .width($r('app.float.virtualSize_3'))
+        .height($r('app.float.virtualSize_3'))
+        .fill($r('app.color.FFFFFF'))
+
+      Text(this.label)
+        .fontColor($r('app.color.FFFFFF'))
+        .fontSize($r('app.float.fontSize_8'))
+
+      Text(this.value)
+        .fontColor(this.valueColor)
+        .fontSize($r('app.float.fontSize_8'))
+    }
+    .width('100%')
+  }
+}
+
+@Component
+export struct RgvButton {
+  @Prop text: string = ''
+  // 按钮图标资源
+  @Prop icon: Resource = $r('app.media.rgv_turn_off')
+  @State scaleValue : number = 1
+  onButtonClick: () => void = () => {}
+  build() {
+    Button({type: ButtonType.Normal}) {
+      Row() {
+        Image(this.icon)
+          .width('10%')
+          .height('50%')
+          .margin({ right: '5%' ,left:'10%'})
+        Text(this.text)
+          .fontSize($r('app.float.fontSize_12'))
+          .fontColor($r('app.color.FFFFFF'))
+      }.justifyContent(FlexAlign.Start).width('100%')
+    }
+    .width('100%')
+    .height('100%')
+    .backgroundColor($r('app.color.20FFFFFF'))
+    .borderRadius($r('app.float.virtualSize_6_4'))
+    .scale({ x: this.scaleValue, y: this.scaleValue })
+    .animation({
+      duration: 200,
+      curve: Curve.Linear  // 弹性曲线更生动
+    })
+    .onClick(() => {
+      this.scaleValue = 0.9;  // 点击时缩小
+      setTimeout(() => {
+        this.scaleValue = 1; // 0.2秒后恢复
+      }, 200);
+      if (this.onButtonClick) {
+        this.onButtonClick()
+      }
+    })
+  }
+}
+
+@Entry
+@Component
+export struct RobotSelector {
+  private scrollerForList: Scroller = new Scroller()
+  @State isListVisible: boolean = false
+  @Prop robotsList: string[] = ["",""]
+  // @Link selectRobotIndex: number
+  @State selectedRobot: string =''
+
+  build() {
+    Column() {
+      // 主体按钮
+      Button({type:ButtonType.Normal}) {
+        Row() {
+          Text(this.selectedRobot)
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_12'))
+            .margin({left:'5%'})
+          Image($r('app.media.general_return'))
+            .height($r('app.float.virtualSize_22_4'))
+            .width($r('app.float.virtualSize_22_4'))
+            .fillColor($r('app.color.FFFFFF'))
+            .margin({left:'30%'})
+            .rotate({ // 添加旋转属性
+              angle: -90, // 逆时针旋转90度(负值表示逆时针)
+              centerX: '50%', // 旋转中心X轴位置(相对宽度)
+              centerY: '50%'  // 旋转中心Y轴位置(相对高度)
+            })
+        }
+        .width('100%')
+        .justifyContent(FlexAlign.Start)
+      }
+      .width('100%')
+      .height('25%')
+      .backgroundColor($r('app.color.20FFFFFF')) // 灰色背景
+      .borderRadius($r('app.float.virtualSize_6_4'))
+      .onClick(() => {
+        this.isListVisible = !this.isListVisible
+      })
+
+      if (this.isListVisible) {
+        Column() {
+          List({ space: 8, scroller: this.scrollerForList }) {
+            ForEach(this.robotsList, (item: string) => {
+              ListItem() {
+                Column() {
+                  Text(item)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_12'))
+                }
+                .padding(12)
+              }
+              .onClick(() => {
+                this.selectedRobot = item
+                this.isListVisible = false
+              })
+            })
+          }. divider({
+            strokeWidth: 1,
+            color: $r('app.color.20FFFFFF')
+          })
+        }
+        .width('100%')
+        .borderRadius(8)
+        .backgroundColor($r('app.color.20FFFFFF')) // 列表背景色
+        .height('80%')
+        .margin({top:'1%'})
+      }
+    }
+    .width('100%')
+    .height('100%')
+  }
+}
+
+
+@Component
+export struct MoveControllerButton {
+  @State scaleValue : number = 1
+  @Prop icon: Resource = $r('app.media.rgv_turn_off')
+  onButtonClick: () => void = () => {}
+  build() {
+    Row() {
+      Button({ type: ButtonType.Normal }) {
+        Image(this.icon)
+          .width('50%')
+          .height('50%')
+          .objectFit(ImageFit.Contain)
+          .fillColor($r('app.color.FFFFFF'))
+      }
+      .width('100%')
+      .height('100%')
+      .backgroundColor($r('app.color.20FFFFFF'))
+      .borderRadius($r('app.float.virtualSize_6_4'))
+      .scale({ x: this.scaleValue, y: this.scaleValue })
+      .animation({
+        duration: 200,
+        curve: Curve.Linear  // 弹性曲线更生动
+      })
+      .onClick(() => {
+        this.scaleValue = 0.9; // 点击时缩小
+        setTimeout(() => {
+          this.scaleValue = 1; // 0.2秒后恢复
+        }, 200);
+        if (this.onButtonClick) {
+          this.onButtonClick()
+        }
+      })
+    }
+  }
+}
+
+
+// 在文件顶部或单独组件文件中定义
+@CustomDialog
+export struct CommonConfirmDialog {
+  @State title: string = '提示'
+  @State message: string = '确定要执行此操作吗?'
+  @State confirmText: string = '确定'
+  @State cancelText: string = '取消'
+
+  controller: CustomDialogController
+  onConfirm: () => void = () => {}
+
+  build() {
+    Column() {
+      // 标题
+      Text(this.title)
+        .fontSize(20)
+        .fontColor($r('app.color.FFFFFF'))
+        .margin({ top: 24, bottom: 8 })
+
+      // 消息内容
+      Text(this.message)
+        .fontSize(16)
+        .fontColor($r('app.color.FFFFFF'))
+        .margin({ bottom: 24 })
+
+      // 按钮区域
+      Flex({ justifyContent: FlexAlign.SpaceAround }) {
+        Button(this.cancelText, { type: ButtonType.Normal })
+          .width('45%')
+          .backgroundColor('#0A84FF')
+          .fontColor($r('app.color.FFFFFF'))
+          .onClick(() => this.controller.close())
+
+        Button(this.confirmText, { type: ButtonType.Normal })
+          .width('45%')
+          .backgroundColor($r('app.color.0A84FF'))
+          .fontColor($r('app.color.FFFFFF'))
+          .onClick(() => {
+            this.onConfirm();
+            this.controller.close();
+          })
+      }
+      .width('100%')
+      .margin({ bottom: 20 })
+    }
+    .padding(20)
+    .height(200)
+    .width(400)
+    .backgroundColor($r('app.color.2A2A2A'))
+    .borderRadius(16)
+  }
+}
+

+ 30 - 0
entry/src/main/ets/pages/EmptyBoxStorage.ets

@@ -12,6 +12,9 @@ struct emptyBoxStorage {
   @State isMaterialBoxExist: Boolean = true;
   @State isPrinterOnline: Boolean = true;
   @State isRfidOnline: Boolean = true;
+  @State generateButtonClick :number = 1
+  @State printButtonClick :number = 1
+  @State writeButtonClick :number = 1
   @State messages: string[] = [
     "抽屉伸出成功                   12-12-12",
     "抽屉伸出成功                   12-12-12",
@@ -105,7 +108,16 @@ struct emptyBoxStorage {
               .height('6%')
               .backgroundColor($r('app.color.20FFFFFF'))
               .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.generateButtonClick, y: this.generateButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
               .onClick(() => {
+                this.generateButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.generateButtonClick = 1; // 0.2秒后恢复
+                }, 200);
                 // 按钮点击事件处理
               })
             }
@@ -146,7 +158,16 @@ struct emptyBoxStorage {
                 .height('8%')
                 .backgroundColor($r('app.color.20FFFFFF'))
                 .borderRadius($r('app.float.virtualSize_6_4'))
+                .scale({ x: this.printButtonClick, y: this.printButtonClick })
+                .animation({
+                  duration: 200,
+                  curve: Curve.Linear  // 弹性曲线更生动
+                })
                 .onClick(() => {
+                  this.printButtonClick = 0.9; // 点击时缩小
+                  setTimeout(() => {
+                    this.printButtonClick = 1; // 0.2秒后恢复
+                  }, 200);
                   // 按钮点击事件处理
                 })
                 Divider()
@@ -199,7 +220,16 @@ struct emptyBoxStorage {
               .height('6%')
               .backgroundColor($r('app.color.20FFFFFF'))
               .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.writeButtonClick, y: this.writeButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
               .onClick(() => {
+                this.writeButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.writeButtonClick = 1; // 0.2秒后恢复
+                }, 200);
                 // 按钮点击事件处理
               })
             }

+ 523 - 0
entry/src/main/ets/pages/LittleMaterialOutBound.ets

@@ -0,0 +1,523 @@
+/*
+ * 零星物料入库
+ * */
+import {
+  ProcessFlow,
+  BoxGrid,
+  MaterialListComponent,
+  OrderListComponent,
+  MaterialBoxGrid
+} from "../component/OrderMaterialsStorageView"
+import { OrderParams, MaterialBox, EmptyBox } from "../params/OrderMaterialsStorageParams"
+import router from '@ohos.router';
+import { NavigationBar } from '../component/NavigationBar'
+import { TimeAndTitle } from "../component/TimeAndTitle"
+import { InBoundView } from '../component/InBoundView'
+import WmsRequest from '../common/util/request/WmsRequest'
+import RequestParamModel from '../viewmodel/wms/RequestParamModel'
+import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
+
+@Entry
+@Component
+struct LittleMaterialsOutBound {
+  @State messages: string[] = []
+  @State currentStep: number = 1;
+  @State nextStepButtonClick :number = 1
+  @State preStepButtonClick :number = 1
+  @State outBoundButtonClick :number = 1
+  @State emptyBoxes: EmptyBox[] = [
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' },
+    { position: 'X-1Y-2' }// 图片显示6个空箱位置
+  ]
+  @State materialBoxes: MaterialBox[] = [
+  // 第一行物料箱
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+    {
+      id: '1',
+      type: 'material',
+      name: '物料名称XXXXX',
+      boxNumber: 'LX-12345',
+      boxType: '通用类型',
+      order: 'XXXXX订单',
+      quantity: 10,
+      position: 'X-1 Y-2'
+    },
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    }, {
+    id: '1',
+    type: 'material',
+    name: '物料名称XXXXX',
+    boxNumber: 'LX-12345',
+    boxType: '通用类型',
+    order: 'XXXXX订单',
+    quantity: 10,
+    position: 'X-1 Y-2'
+  },
+
+    // 其他2个物料箱...
+
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+    // 第二行空箱
+    {
+      id: '4',
+      type: 'empty',
+      name: '空箱',
+      boxNumber: 'LX-67890',
+      boxType: '通用类型',
+      position: 'X-3 Y-1'
+    },
+  // 其他2个空箱...
+  ];
+  @State orders: OrderParams[] = [
+    { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
+    { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
+    { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' },
+    { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
+    { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
+    { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
+  ]
+  @State selectWorkOrder: WorkOrderInfo = {}
+  @State workOrderArray: WorkOrderInfo[] = []
+  loadWorkOrders = async () => {
+    this.workOrderArray = await WmsRequest.post('/api/v1/plan/workOrder/list', {
+      queryComplete: 0,
+    } as RequestParamModel) as WorkOrderInfo[]
+  }
+
+  aboutToAppear(): void {
+    this.loadWorkOrders();
+  }
+
+  build() {
+    Row() {
+      Column() {
+        Row() {
+          TimeAndTitle()
+        }.width('100%')
+        .height('3.4%')
+        .alignItems(VerticalAlign.Bottom)
+        .justifyContent(FlexAlign.End)
+
+        Row() {
+          Image($r('app.media.general_return'))
+            .height($r('app.float.virtualSize_22_4'))
+            .width($r('app.float.virtualSize_22_4'))
+            .fillColor($r('app.color.FFFFFF'))
+          // .onClick(()=> {
+          //   router.back()
+          // })
+          Text('零星物料出库')
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_15_2'))
+        }
+        .height('4%')
+        .width('100%')
+        .justifyContent(FlexAlign.Start)
+        .margin({ left: '5%' })
+        .onClick(() => {
+          router.back()
+        })
+
+        Row() {
+          Row() {
+            ProcessFlow({
+              currentStep: this.currentStep,
+              firstStepTitle: "选择物料",
+              secondStepTitle: "零星出库",
+              thirdStepTitle: "",
+            })
+          }.width('20%')
+          .margin({ right: '20%' })
+
+          NavigationBar().width('20%')
+        }
+        .width('100%')
+        .height('4%')
+        .margin({ top: '1%' })
+        .justifyContent(FlexAlign.End)
+        .alignItems(VerticalAlign.Bottom)
+
+
+        if (this.currentStep === 1) {
+          Column() {
+            Row() {
+              Column() {
+                Column() {
+                  Row() {
+                    Text('查询物料')
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .margin({ top: '4%' })
+                  }.height('10%')
+
+                  Row() {
+                    // 左侧二维码图标
+                    Image($r('app.media.material_qr_code'))// 请替换为您的二维码图片资源
+                      .width($r('app.float.virtualSize_16_8'))
+                      .height($r('app.float.virtualSize_16_8'))
+                      .fillColor($r('app.color.FFFFFF'))
+                      .margin({ left: '2%' })
+                    // 扫码输入框
+                    TextInput({ placeholder: '请扫描物料编码' })
+                      .type(InputType.Normal)
+                      .placeholderFont({ size: $r('app.float.fontSize_12') })
+                      .placeholderColor($r('app.color.30FFFFFF'))
+                      .fontSize($r('app.float.fontSize_12'))
+                      .fontColor($r('app.color.FFFFFF'))
+                  }
+                  .margin({ top: '3%' })
+                  .height('8%')
+                  .width('80%')
+                  .borderRadius($r('app.float.virtualSize_7_2'))
+                  .backgroundColor($r('app.color.000000'))
+
+                  // 操作说明
+                  Text('通过物料扫码查询当前库存是否有同型号物')
+                    .fontSize($r('app.float.fontSize_8'))
+                    .fontColor($r('app.color.60FFFFFF'))
+                    .width('100%')
+                    .textAlign(TextAlign.Center)
+                    .margin({ top: '2%' })
+
+                  Column() {
+                    OrderListComponent({
+                      workOrders: this.workOrderArray,
+                      selectWorkOrder: this.selectWorkOrder }).height('100%')
+                  }.margin({ top: '4%' }).height('70%')
+                }.height('100%').width('95%').justifyContent(FlexAlign.Start)
+              }.width('30%').backgroundColor($r('app.color.10FFFFFF'))
+
+              Image($r('app.media.arrow_right'))
+                .width($r('app.float.virtualSize_23'))
+                .height($r('app.float.virtualSize_23'))
+                .fillColor($r('app.color.FFFFFF'))
+                .margin({ left: '-2%', right: '-2%' })
+              Column() {
+                Row() {
+                  Text("选择料箱")
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_15_2'))
+                }.height('10%')
+
+                Row() {
+                  MaterialBoxGrid({ materialBoxes: this.materialBoxes })
+                    .width('100%')
+                    .height('100%')
+                }.width('100%').height('90%')
+              }.width('62%').backgroundColor($r('app.color.10FFFFFF'))
+            }
+            .height('85%')
+            .justifyContent(FlexAlign.SpaceEvenly)
+            .width('100%')
+
+            Row({ space: 15 }) {
+              Button({ type: ButtonType.Normal }) {
+                Text("料箱出库")
+                  .fontSize($r('app.float.fontSize_12'))
+                  .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
+              }
+              .width('22%')
+              .height('100%')
+              .backgroundColor($r('app.color.20FFFFFF'))
+              .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.outBoundButtonClick, y: this.outBoundButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
+              //.enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+              .onClick(() => {
+                this.outBoundButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.outBoundButtonClick = 1; // 0.2秒后恢复
+                }, 200);
+                this.currentStep = 1;
+              })
+
+              Button({ type: ButtonType.Normal }) {
+                Text("下一步")
+                  .fontSize($r('app.float.fontSize_12'))
+                  .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
+              }
+              .width('22%')
+              .height('100%')
+              .backgroundColor($r('app.color.20FFFFFF'))
+              .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.nextStepButtonClick, y: this.nextStepButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
+              //.enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+              .onClick(() => {
+                this.nextStepButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.nextStepButtonClick = 1; // 0.2秒后恢复
+                }, 200);
+                this.currentStep = 2
+              })
+
+            }.width('100%').height('6%').justifyContent(FlexAlign.End).margin({ bottom: '3%', right: '5%' })
+          }
+          .height('83.6%')
+          .margin({ top: '3%' })
+          .width('100%')
+          .justifyContent(FlexAlign.SpaceAround)
+          .width('100%')
+        }
+        else if (this.currentStep === 2) {
+          Column() {
+            Row() {
+              Column() {
+                InBoundView({ messages: this.messages })
+              }.width('29%').backgroundColor($r('app.color.10FFFFFF'))
+              Image($r('app.media.arrow_right'))
+                .width($r('app.float.virtualSize_23'))
+                .height($r('app.float.virtualSize_23'))
+                .fillColor($r('app.color.FFFFFF'))
+                .margin({ left: '-2%', right: '-2%' })
+              Column() {
+                Row() {
+                  Column() {
+                    Text("扫码出库")
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontSize($r('app.float.fontSize_15_2'))
+                  }.height('100%').width('65%').alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.Center)
+
+                  Row() {
+                    // 左侧二维码图标
+                    Image($r('app.media.material_qr_code'))// 请替换为您的二维码图片资源
+                      .width($r('app.float.virtualSize_16_8'))
+                      .height($r('app.float.virtualSize_16_8'))
+                      .fillColor($r('app.color.FFFFFF'))
+                      .margin({ left: '2%' })
+                    // 扫码输入框
+                    TextInput({ placeholder: '请扫描物料编码' })
+                      .type(InputType.Normal)
+                      .placeholderFont({ size: $r('app.float.fontSize_12') })
+                      .placeholderColor($r('app.color.30FFFFFF'))
+                      .fontSize($r('app.float.fontSize_12'))
+                      .fontColor($r('app.color.FFFFFF'))
+                  }.width('35%')
+                  .borderRadius($r('app.float.virtualSize_7_2'))
+                  .backgroundColor($r('app.color.000000'))
+                }.justifyContent(FlexAlign.Start)
+                .height('10%')
+                .width('95%')
+                .justifyContent(FlexAlign.Center)
+
+                Row() {
+                  MaterialListComponent({ orders: this.orders }).width('95%')
+                }.width('100%').height('78%').justifyContent(FlexAlign.Center)
+                //Column(){
+                  Button({type:ButtonType.Normal}) {
+                    Text("确认出库")
+                      .fontSize($r('app.float.fontSize_12'))
+                      .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
+                  }
+                  .width('35%')
+                  .height('7%')
+                  .backgroundColor($r('app.color.20FFFFFF'))
+                  .borderRadius($r('app.float.virtualSize_6_4'))
+                  .margin({top:'2%',bottom:'1%'})
+                  .scale({ x: this.outBoundButtonClick, y: this.outBoundButtonClick })
+                  .animation({
+                    duration: 200,
+                    curve: Curve.Linear  // 弹性曲线更生动
+                  })
+                  // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+                  .onClick(() => {
+                    this.outBoundButtonClick = 0.9; // 点击时缩小
+                    setTimeout(() => {
+                      this.outBoundButtonClick = 1; // 0.2秒后恢复
+                    }, 200);
+                    this.currentStep = 1;
+                  })
+                //}.height('10%').justifyContent(FlexAlign.Center)
+              }.width('62%').backgroundColor($r('app.color.10FFFFFF'))
+
+            }
+            .height('85%')
+            .justifyContent(FlexAlign.SpaceEvenly)
+            .width('100%')
+
+            Row({ space: 15 }) {
+              Button({type:ButtonType.Normal}) {
+                Text("上一步")
+                  .fontSize($r('app.float.fontSize_12'))
+                  .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
+              }
+              .width('22%')
+              .height('100%')
+              .backgroundColor($r('app.color.20FFFFFF'))
+              .margin({left:'22%'})
+              .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.preStepButtonClick, y: this.preStepButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
+              // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+              .onClick(() => {
+                this.preStepButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.preStepButtonClick = 1; // 0.2秒后恢复
+                }, 200);
+                this.currentStep = 1;
+              })
+            }.width('100%').height('6%').justifyContent(FlexAlign.Start).margin({ bottom: '3%', left: '5%' })
+          }
+          .height('83.6%')
+          .margin({ top: '3%' })
+          .width('100%')
+          .justifyContent(FlexAlign.SpaceAround)
+          .width('100%')
+        }
+      }
+      .width('100%')
+      .height('100%')
+      .backgroundColor($r('app.color.000000'))
+    }
+    .height('100%')
+  }
+}

+ 44 - 170
entry/src/main/ets/pages/LittleMaterialsStorage.ets

@@ -7,178 +7,19 @@ import router from '@ohos.router';
 import {NavigationBar} from '../component/NavigationBar'
 import {TimeAndTitle} from "../component/TimeAndTitle"
 import {InBoundView} from '../component/InBoundView'
+import {MaterialListInformation,MaterialBoxInfo} from '../params/MaterialInformationParam'
 @Entry
 @Component
 struct LittleMaterialsStorage{
   @State messages:string[] = []
   @State currentStep: number = 1;
-  @State emptyBoxes: EmptyBox[] = [
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' } // 图片显示6个空箱位置
-  ]
-  @State materialBoxes: MaterialBox[] = [
-  // 第一行物料箱
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    }, {
-    id: '1', type: 'material',
-    name: '物料名称XXXXX',
-    boxNumber: 'LX-12345',
-    boxType: '通用类型',
-    order: 'XXXXX订单',
-    quantity: 10,
-    position: 'X-1 Y-2'
-  },
-
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-  // 其他2个空箱...
-  ];
+  @State emptyBoxes: MaterialBoxInfo[] = []
+  @State selectedMaterialBox: MaterialBoxInfo = {};
+  @State isQueryMaterial : boolean = false
+  @State nextStepButtonClick :number = 1
+  @State preStepButtonClick :number = 1
+  @State outBoundButtonClick :number = 1
+  @State materialBoxes: MaterialBoxInfo[] = [];
   @State orders:OrderParams[]= [
     { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
     { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
@@ -336,7 +177,12 @@ struct LittleMaterialsStorage{
                     .fontSize($r('app.float.fontSize_15_2'))
                 }.height('10%')
                 Row() {
-                  BoxGrid({ materialBoxes:this.materialBoxes,emptyBoxes:this.emptyBoxes })
+                  BoxGrid({
+                    materialBoxes:this.materialBoxes,
+                    emptyBoxes:this.emptyBoxes,
+                    isQueryMaterial:this.isQueryMaterial,
+                    selectedMaterialBox:this.selectedMaterialBox
+                  })
                     .width('100%')
                     .height('100%')
                 }.width('100%').height('90%')
@@ -355,8 +201,17 @@ struct LittleMaterialsStorage{
               .height('100%')
               .backgroundColor($r('app.color.20FFFFFF'))
               .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.outBoundButtonClick, y: this.outBoundButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
               //.enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
               .onClick(() => {
+                this.outBoundButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.outBoundButtonClick = 1; // 0.2秒后恢复
+                }, 200);
                 this.currentStep = 1;
               })
               Button({type:ButtonType.Normal}) {
@@ -368,8 +223,17 @@ struct LittleMaterialsStorage{
               .height('100%')
               .backgroundColor($r('app.color.20FFFFFF'))
               .borderRadius($r('app.float.virtualSize_6_4'))
+              .scale({ x: this.nextStepButtonClick, y: this.nextStepButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
               //.enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
               .onClick(() => {
+                this.nextStepButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.nextStepButtonClick = 1; // 0.2秒后恢复
+                }, 200);
                 this.currentStep = 2
               })
 
@@ -378,7 +242,7 @@ struct LittleMaterialsStorage{
           .justifyContent(FlexAlign.SpaceAround)
           .width('100%')
         }
-        if(this.currentStep === 2){
+        else if(this.currentStep === 2){
           Column(){
             Row(){
               Column(){
@@ -441,8 +305,18 @@ struct LittleMaterialsStorage{
               .height('100%')
               .backgroundColor($r('app.color.20FFFFFF'))
               .borderRadius($r('app.float.virtualSize_6_4'))
-              //.enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+              .margin({left:'22%'})
+              .scale({ x: this.preStepButtonClick, y: this.preStepButtonClick })
+              .animation({
+                duration: 200,
+                curve: Curve.Linear  // 弹性曲线更生动
+              })
+              // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
               .onClick(() => {
+                this.preStepButtonClick = 0.9; // 点击时缩小
+                setTimeout(() => {
+                  this.preStepButtonClick = 1; // 0.2秒后恢复
+                }, 200);
                 this.currentStep = 1;
               })
             }.width('100%').height('6%').justifyContent(FlexAlign.Start).margin({bottom:'3%',left:'5%'})

+ 765 - 119
entry/src/main/ets/pages/LoginPage.ets

@@ -1,119 +1,765 @@
-import {TimeAndTitle} from "../component/TimeAndTitle"
-@Entry
-@Component
-struct LoginPage {
-  @State materialBoxID: string = 'LX-00010';
-  build() {
-    Row() {
-      Column() {
-        Row(){
-          TimeAndTitle()
-        }.width('100%')
-        .height('3.4%')
-        .alignItems(VerticalAlign.Bottom)
-        .justifyContent(FlexAlign.End)
-        TimeAndTitle()
-        Row(){
-          Text('<空箱编辑入库')
-            .width('40%')
-            .fontSize($r('app.float.fontSize_38'))
-            //.margin({left:'%'})
-          Row(){
-            Button('统计')
-              .width('22%')
-            Button('叫料通知')
-              .width('22%')
-            Button('仓储日志')
-              .width('22%')
-            Button('仓储车调试')
-              .width('22%')
-          }
-          .width('55%')
-          .justifyContent(FlexAlign.SpaceBetween)
-        }
-        .height('15%')
-
-
-        Row(){
-          Row(){
-            Column(){
-              Row(){
-                Text("生成料箱编号")
-              }
-              .width("80%")
-              .height('40%')
-              .justifyContent(FlexAlign.Center)
-              .border({
-                width: 1,
-                style: BorderStyle.Dotted,
-              })
-              .margin({bottom:'10%'})
-
-              Text("料箱编号:"+this.materialBoxID)
-            }
-            .width('50%')
-
-            Column(){
-              Text("打印条码:")
-              Row(){}.height('20%')
-              Button("打印")
-                .width('80%')
-              Path()
-                .width('100%')
-                .strokeWidth(1)
-                .stroke(Color.Black)
-                .commands('M0 0 L600 0')
-                .margin({top:'5%',bottom:'5%'})
-              Text("写入磁卡:")
-              Row(){}.height('25%')
-              Text("当前编码:无编码").height('10%')
-              Button("写入")
-                .width('80%')
-            }
-            .justifyContent(FlexAlign.SpaceEvenly)
-            .width('50%')
-          }
-          .width('55%')
-          .border({width:1 } )
-          .height('90%')
-          Row(){
-            Column(){
-              Text("空箱入库")
-              Column(){
-                Text('物料:0').textAlign(TextAlign.End).width('100%')
-                Row(){}.border({width:1}).width('90%').height('50%')
-                Text("料箱重量").textAlign(TextAlign.Start).width('100%')
-                  Text("12.56kg").textAlign(TextAlign.Start).width('100%')
-                  Text("料箱编号").textAlign(TextAlign.Start).width('100%')
-                  Text("LX-0010").textAlign(TextAlign.Start).width('100%')
-              }
-              .height('65%')
-              .width('95%')
-              .border({width:1})
-              .justifyContent(FlexAlign.SpaceAround)
-              Row(){
-                Button("伸出").width('40%')
-                Button("缩回").width('40%')
-              }.width('100%')
-              .justifyContent(FlexAlign.SpaceAround)
-              Button("空箱入库").width('90%')
-            }
-            .width('90%')
-            .height('90%')
-            .justifyContent(FlexAlign.SpaceEvenly)
-          }
-          .width('40%')
-          .border({width:1 } )
-          .height('90%')
-          .justifyContent(FlexAlign.Center)
-        }
-        .height('88.6%')
-        .width('100%')
-        .justifyContent(FlexAlign.SpaceAround)
-
-      }
-      .width('100%')
-    }
-    .height('100%')
-  }
-}
+// import router from '@ohos.router'
+// import CommonConstants from '../common/constants/CommonConstants'
+// import JGRequest from '../common/util/request/Request'
+// import { getToken, getUserInfo } from '../common/util/request/RequestInstance'
+// import AssistantSetModel from '../model/database/AssistantSetModel'
+// import UserAuthModel from '../model/database/UserAuthModel';
+// import UserInfo from '../model/UserInfo'
+// import process from '@ohos.process'
+// import RequestParamModel from '../viewmodel/RequestParamModel'
+//
+// export const stationDictValue: string = ''
+//
+// @Entry
+// @Component
+// struct LoginPage {
+//   controller: TextInputController = new TextInputController()
+//   //1是拣选,2是装配,3是测试,4是维修站,5是入库,6是出库
+//   @State stationDictValue: string = ''
+//   @State loginName: string = 'admin'
+//   @State password: string = '123456'
+//   @State dept: DeptInfo = { deptName: '仿真中心' }
+//   @State workstation: WorkstationInfo = {}
+//   @State productionLine: ProductionLine = { name: '仿真中心电装产线' }
+//   @State deptArray: DeptInfo[] = []
+//   @State lineArray: ProductionLine[] = []
+//   @State workstationArray: WorkstationInfo[] = [{ name: '入库工位', stationDictValue: "5" },
+//     { name: '预齐套工位', stationDictValue: "6" },
+//     { name: '装配工位', stationDictValue: "3" }]
+//   // 部门选择弹框
+//   selectDeptController: CustomDialogController = new CustomDialogController({
+//     builder: SelectDeptDialog({
+//       dept: this.dept,
+//       deptArray: this.deptArray
+//     }),
+//     autoCancel: true,
+//     alignment: DialogAlignment.Center,
+//     // gridCount: 3,
+//     customStyle: true,
+//   })
+//   // 产线选择弹框
+//   selectProductionLineController: CustomDialogController = new CustomDialogController({
+//     builder: ProductionLineDialog({
+//       productionLine: this.productionLine,
+//       workstationArray: this.workstationArray,
+//       workstation: this.workstation,
+//       lineArray: this.lineArray,
+//     }),
+//     autoCancel: true,
+//     alignment: DialogAlignment.Center,
+//     // gridCount: 3,
+//     customStyle: true,
+//   })
+//   // 工位选择弹框
+//   selectWorkstationController: CustomDialogController = new CustomDialogController({
+//     builder: SelectWorkstationDialog({
+//       stationDictValue: this.stationDictValue,
+//       workstation: this.workstation,
+//       workstationArray: this.workstationArray,
+//       lineCode: this.productionLine.code,
+//     }),
+//     autoCancel: true,
+//     alignment: DialogAlignment.Center,
+//     // gridCount: 3,
+//     customStyle: true,
+//   })
+//
+//   async aboutToAppear() {
+//     this.controller.stopEditing()
+//     let userInfo = await UserAuthModel.getLast()
+//     //登录时,查询部门、
+//
+//     this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
+//     if (this.deptArray && this.deptArray.length > 0) {
+//       this.dept = this.deptArray[0]
+//     }
+//     //查询产线
+//     this.lineArray = await JGRequest.post("/api/v1/base/productionLine/list/list", {
+//     } as RequestParamModel) as ProductionLine[]
+//     if (this.lineArray && this.lineArray.length > 0) {
+//       this.productionLine = this.lineArray[0]
+//       // 根据产线查询工位
+//       this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code + "/1", {
+//       }) as WorkstationInfo[]
+//       if (this.workstationArray && this.workstationArray.length > 0) {
+//         this.workstation = this.workstationArray[0]
+//         CommonConstants.stationDictValue = this.workstationArray[0].stationDictValue!
+//       }
+//     }
+//
+//     if (userInfo) {
+//       this.loginName = userInfo.userName ? userInfo.userName : ''
+//       this.password = userInfo.password ? userInfo.password : ''
+//       if (!userInfo.isLogin) {
+//         return
+//       }
+//     }
+//
+//     if (userInfo && userInfo.maintainLoginStatus === 1) {
+//       CommonConstants.STATION_NANE = userInfo.stationName!
+//       CommonConstants.STATION_ID = userInfo.stationId!
+//       await getToken(userInfo.userName as string, userInfo.password as string, userInfo.orgId as number, userInfo?.stationId!.toString())
+//         .then(token => {
+//           if (token && token.length > 0) {
+//             CommonConstants.AUTH_TOKEN = token
+//           }
+//         })
+//       let user = await getUserInfo() as UserInfo
+//       if (null != user) {
+//         CommonConstants.USER_ID = user.id!
+//         CommonConstants.USER_NAME = user.userName!
+//         CommonConstants.USER_AVATAR = user.avatar!
+//         CommonConstants.USER_AVATAR = user.avatar!
+//         CommonConstants.LOGIN_OUT = false
+//         CommonConstants.STATION_CODE = user.stationCode!
+//         CommonConstants.STATION_IP = user.stationIp!
+//       }
+//       if (CommonConstants.AUTH_TOKEN && CommonConstants.AUTH_TOKEN.length > 0) {
+//         if (CommonConstants.stationDictValue === '5') {
+//           router.pushUrl({
+//             url: 'pages/Menu',
+//             params: {
+//               userName: CommonConstants.USER_NAME as UserInfo,
+//               avatar: CommonConstants.USER_AVATAR as UserInfo,
+//               stationId: CommonConstants.STATION_NANE as WorkstationInfo
+//             }
+//           })
+//         } else if (CommonConstants.stationDictValue === '6') {
+//           router.pushUrl({
+//             url: 'pages/Menu',
+//             params: {
+//               userName: CommonConstants.USER_NAME as UserInfo,
+//               avatar: CommonConstants.USER_AVATAR as UserInfo,
+//               stationId: CommonConstants.STATION_NANE as WorkstationInfo
+//             }
+//           })
+//         }
+//
+//       }
+//     }
+//   }
+//
+//   build() {
+//     Column() {
+//       Column() {
+//         Row() {
+//           // Image($r('app.media.hjzx'))
+//           //   .width(px2vp(610))
+//           //   .height(px2vp(40))
+//         }
+//         .height('18.3%')
+//         .width('88.5%')
+//         .alignItems(VerticalAlign.Center)
+//         .justifyContent(FlexAlign.Start)
+//
+//         TextInput({ placeholder: '账号', text: this.loginName, controller: this.controller })
+//           //.placeholderColor($r('app.color.0A84FF'))
+//           //.placeholderFont({ size: $r('app.float.set_card_font_size'), weight: FontWeight.Medium })
+//           .fontColor($r('app.color.000000'))
+//           .fontWeight(FontWeight.Medium)
+//           .fontSize($r('app.float.fontSize_28'))
+//           .width('90.4%')
+//           .enableKeyboardOnFocus(false)
+//           .height('10.6%')
+//             //.opacity($r('app.float.general_font_opacity'))
+//           .borderRadius($r('app.float.virtualSize_6_4'))
+//           .backgroundColor('#BCC2C9')
+//           .onChange((value: string) => {
+//             this.loginName = value
+//           })
+//         Row() {
+//         }.height('4%')
+//
+//         TextInput({ placeholder: '密码', text: this.password })
+//           // .placeholderColor($r('app.color.login_text_input_placeholder_color'))
+//           //.placeholderFont({ size: $r('app.float.set_card_font_size'), weight: FontWeight.Medium })
+//           .fontColor($r('app.color.000000'))
+//           .width('90.4%')
+//           .height('10.6%')
+//           .enableKeyboardOnFocus(false)
+//           .fontWeight(FontWeight.Medium)
+//           .fontSize($r('app.float.fontSize_28'))
+//           .type(InputType.Password)
+//           .borderRadius($r('app.float.virtualSize_6_4'))
+//           .backgroundColor('#BCC2C9')
+//           .onChange((value: string) => {
+//             this.password = value
+//           })
+//
+//         Row() {
+//         }.height('2.65%')
+//
+//         // 部门、产线选择
+//         Row() {
+//           Row() {
+//             Text('部门')
+//               .fontColor($r('app.color.FFFFFF'))
+//               .fontSize($r('app.float.fontSize_19_2'))
+//           }
+//           .width('47.8%')
+//           .height('100%')
+//           .alignItems(VerticalAlign.Top)
+//
+//           Blank()
+//           Row() {
+//             Text('产线')
+//               .fontColor($r('app.color.FFFFFF'))
+//               .fontSize($r('app.float.fontSize_19_2'))
+//           }
+//           .alignItems(VerticalAlign.Top)
+//           .width('47.8%')
+//           .height('100%')
+//         }
+//         .height('4.5%')
+//         .width('90.4%')
+//
+//         // 部门选择
+//         Row() {
+//           Row() {
+//             Text(this.dept ? this.dept.deptName : '')
+//               .fontWeight(FontWeight.Medium)
+//               .fontSize($r('app.float.fontSize_28'))
+//               .fontColor($r('app.color.000000'))
+//             //.opacity($r('app.float.general_font_opacity'))
+//             Blank()
+//             Row() {
+//               Image($r('app.media.subscript_space'))
+//                 .height($r('app.float.virtualSize_16_8'))
+//                 .width($r('app.float.virtualSize_16_8'))
+//             }
+//             .alignItems(VerticalAlign.Bottom)
+//             .justifyContent(FlexAlign.End)
+//             .width('20%')
+//             .height('100%')
+//           }
+//           .width('47.8%')
+//           .height('100%')
+//           .padding({ left: 10 })
+//           .backgroundColor($r('app.color.FFFFFF'))
+//           .borderRadius($r('app.float.virtualSize_6_4'))
+//           .onClick(async () => {
+//             this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
+//             if (this.deptArray && this.deptArray.length > 0) {
+//               this.dept = this.deptArray[0]
+//             }
+//             // 查询工位
+//             this.workstationArray = await JGRequest.get("/api/v1/base/station/queryStationList", {
+//             }) as WorkstationInfo[]
+//             if (this.workstationArray && this.workstationArray.length > 0) {
+//               this.workstation = this.workstationArray[0]
+//               CommonConstants.stationDictValue = this.workstationArray[0].stationDictValue!
+//
+//             }
+//             this.selectDeptController.open()
+//           })
+//
+//           Blank()
+//
+//           // 产线选择
+//           Row() {
+//             Text(this.productionLine ? this.productionLine.name : '')
+//               .fontWeight(FontWeight.Medium)
+//               .fontSize($r('app.float.fontSize_28'))
+//               .fontColor($r('app.color.000000'))
+//             //.opacity($r('app.float.general_font_opacity'))
+//             Blank()
+//             Row() {
+//               Image($r('app.media.subscript_space'))
+//                 .height($r('app.float.virtualSize_16_8'))
+//                 .width($r('app.float.virtualSize_16_8'))
+//             }
+//             .alignItems(VerticalAlign.Bottom)
+//             .justifyContent(FlexAlign.End)
+//             .width('20%')
+//             .height('100%')
+//           }
+//           .width('47.8%')
+//           .height('100%')
+//           .padding({ left: 10 })
+//           .backgroundColor($r('app.color.FFFFFF'))
+//           .borderRadius($r('app.float.virtualSize_6_4'))
+//           .onClick(async () => {
+//             this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
+//             if (this.deptArray && this.deptArray.length > 0) {
+//               this.dept = this.deptArray[0]
+//             }
+//             // 查询工位
+//             this.workstationArray = await JGRequest.get("/api/v1/base/station/queryStationList", {
+//             }) as WorkstationInfo[]
+//             if (this.workstationArray && this.workstationArray.length > 0) {
+//               this.workstation = this.workstationArray[0]
+//               CommonConstants.stationDictValue = this.workstationArray[0].stationDictValue!
+//
+//             }
+//             this.selectProductionLineController.open()
+//           })
+//         }
+//         .width('90.4%')
+//         .height('10.6%')
+//
+//         Row() {
+//         }.height('2.65%')
+//
+//         if (JSON.stringify(this.productionLine) === '{}') {
+//           Row() {
+//           }.height('15.1%')
+//         } else {
+//           // 工位选择
+//           Row() {
+//             Text('工位选择')
+//               .fontColor($r('app.color.FFFFFF'))
+//               .fontSize($r('app.float.fontSize_19_2'))
+//           }
+//           .height('4.5%')
+//           .width('90.4%')
+//           .justifyContent(FlexAlign.Start)
+//           .alignItems(VerticalAlign.Top)
+//
+//           Row() {
+//             Text(!this.workstationArray || this.workstationArray.length <= 0 ? '无数据' : (this.workstation ? this.workstation.name : ''))
+//               .fontWeight(FontWeight.Medium)
+//               .fontSize($r('app.float.fontSize_28'))
+//               .fontColor($r('app.color.000000'))
+//             //.opacity(!this.workstationArray || this.workstationArray.length <= 0 ? $r('app.float.zero_point_two_font_opacity') : $r('app.float.general_font_opacity'))
+//             Blank()
+//             Row() {
+//               Image($r('app.media.subscript_space'))
+//                 .height($r('app.float.virtualSize_16_8'))
+//                 .width($r('app.float.virtualSize_16_8'))
+//             }
+//             .alignItems(VerticalAlign.Bottom)
+//             .justifyContent(FlexAlign.End)
+//             .width('20%')
+//             .height('100%')
+//           }
+//           .width('90.4%')
+//           .height('10.6%')
+//           .backgroundColor($r('app.color.FFFFFF'))
+//           .borderRadius($r('app.float.virtualSize_6_4'))
+//           .padding({ left: 10 })
+//           .onClick(() => {
+//             if (!this.workstationArray || this.workstationArray.length <= 0) {
+//               return
+//             }
+//             this.selectWorkstationController.open()
+//           })
+//         }
+//
+//         Column() {
+//           Row().height('35%')
+//           Text('登录')
+//             .fontWeight(FontWeight.Medium)
+//             .fontSize($r('app.float.fontSize_28'))
+//             .fontColor($r('app.color.FFFFFF'))
+//             .textAlign(TextAlign.Center)
+//             .width(px2vp(608))
+//             .height(px2vp(80))
+//             .backgroundColor($r('app.color.0A59F7'))
+//             .borderRadius($r('app.float.virtualSize_23'))
+//           //.opacity(this.loginName && this.loginName.length > 0 && this.password && this.password.length > 0 && JSON.stringify(this.dept) != '{}' && JSON.stringify(this.workstation) != '{}' ? 1 : $r('app.float.card_font_default_opacity'))
+//         }
+//         .width('90.4%')
+//         .layoutWeight(1)
+//         .alignItems(HorizontalAlign.Center)
+//         .justifyContent(FlexAlign.Start)
+//         .onClick(async () => {
+//
+//           console.log("tesTag1" + '+++++++++++++++' + this.workstation.stationDictValue)
+//           if (this.loginName && this.loginName.length > 0 && this.password && this.password.length > 0) {
+//             await getToken(this.loginName, this.password, this.dept?.id ? this.dept.id : 0, this.workstation?.id ? this.workstation.id : '0')
+//               .then(token => {
+//                 if (token && token.length > 0) {
+//                   CommonConstants.AUTH_TOKEN = token
+//                 }
+//               })
+//             if (CommonConstants.AUTH_TOKEN.length <= 0) {
+//               return
+//             }
+//             let userInfo = await getUserInfo() as UserInfo
+//             CommonConstants.USER_ID = userInfo.id!
+//             CommonConstants.USER_NAME = userInfo.userName!
+//             CommonConstants.USER_AVATAR = userInfo.avatar!
+//             CommonConstants.STATION_CODE = userInfo.stationCode!
+//             CommonConstants.STATION_IP = userInfo.stationIp!
+//             CommonConstants.STATION_NANE = this.workstation && this.workstation.name ? this.workstation.name : ''
+//             CommonConstants.STATION_ID = this.workstation && this.workstation.id ? Number.parseInt(this.workstation.id) : 0
+//             let user = await UserAuthModel.getByUserId(userInfo.id ? userInfo.id : 0)
+//             if (!user || !user.id) {
+//               // 将后端数据库id作为userId, 默认是保持登录
+//               user = {
+//                 userId: userInfo.id,
+//                 userName: this.loginName,
+//                 password: this.password,
+//                 orgId: this.dept ? this.dept.id : 0,
+//                 stationId: this.workstation ? Number.parseInt(this.workstation.id!) : 0,
+//                 stationName: this.workstation && this.workstation.name ? this.workstation.name : '',
+//                 stationDictValue: this.workstation?.stationDictValue ? this.workstation.stationDictValue! : '',
+//                 avatar: userInfo.avatar,
+//                 maintainLoginStatus: 1,
+//                 updateTime: new Date().getTime(),
+//                 isLogin: true,
+//               }
+//               let res = await UserAuthModel.addUser(user)
+//               res = await AssistantSetModel.addAssistantSet({
+//                 userId: userInfo.id,
+//                 voiceWakeUp: 1,
+//                 timbre: 2,
+//                 wakeFree: 2,
+//                 promptBroadcast: 1,
+//                 voiceVolume: 0,
+//
+//               })
+//             }
+//             CommonConstants.LOGIN_OUT = false
+//
+//             if (this.workstation.stationDictValue === '5') {
+//               router.pushUrl({
+//                 url: 'pages/Menu',
+//                 params: {
+//                   userName: CommonConstants.USER_NAME as UserInfo,
+//                   avatar: CommonConstants.USER_AVATAR as UserInfo,
+//                   stationId: CommonConstants.STATION_NANE as WorkstationInfo
+//                 }
+//               })
+//             } else if (this.workstation.stationDictValue === '6') {
+//               router.pushUrl({
+//                 url: 'pages/Menu',
+//                 params: {
+//                   userName: CommonConstants.USER_NAME as UserInfo,
+//                   avatar: CommonConstants.USER_AVATAR as UserInfo,
+//                   stationId: CommonConstants.STATION_NANE as WorkstationInfo
+//                 }
+//               })
+//             }
+//
+//           }
+//         })
+//       }
+//       .width('35%')
+//       .height('70%')
+//       .backgroundColor($r('app.color.A0A8B2'))
+//       .borderRadius($r('app.float.virtualSize_6_4'))
+//       .margin({ right: '8.25%' })
+//
+//       Row() {
+//         Image($r('app.media.shutdown'))
+//           .width($r('app.float.virtualSize_36'))
+//           .height($r('app.float.virtualSize_36'))
+//       }
+//       .height('19%')
+//       .width('100%')
+//       .alignItems(VerticalAlign.Bottom)
+//       .justifyContent(FlexAlign.End)
+//       .margin({ bottom: '1%', right: '1%' })
+//       .onClick(() => {
+//         let pro = new process.ProcessManager();
+//         pro.exit(0);
+//       })
+//     }
+//     .width('100%')
+//     .height('100%')
+//     .backgroundImage($r('app.media.login_backgroundImage'))
+//     .backgroundImageSize({ width: '100%', height: '100%' })
+//     .alignItems(HorizontalAlign.End)
+//     .justifyContent(FlexAlign.End)
+//
+//   }
+// }
+//
+// // 部门选择弹框
+// @CustomDialog
+// struct SelectDeptDialog {
+//   @Link dept: DeptInfo
+//   @State deptArray: DeptInfo[] = [{ deptName: '仿真中心', id: 111, orgId: 112 }]
+//   controller?: CustomDialogController
+//   cancel: () => void = () => {
+//   }
+//   confirm: () => void = () => {
+//   }
+//
+//   async aboutToAppear() {
+//     if (!this.deptArray || this.deptArray.length <= 0) {
+//       this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
+//       if (this.deptArray && this.deptArray.length > 0) {
+//         this.dept = this.deptArray[0]
+//       }
+//     }
+//   }
+//
+//   build() {
+//     Column() {
+//       Row() {
+//         Text('选择部门')
+//           .fontSize($r('app.float.fontSize_38'))
+//           .fontWeight(FontWeight.Medium)
+//           .fontColor($r('app.color.000000'))
+//         //.opacity($r('app.float.general_font_opacity'))
+//       }
+//       .height('20%')
+//       .justifyContent(FlexAlign.Center)
+//
+//       Column() {
+//         List({ space: 10 }) {
+//           ForEach(this.deptArray, (item: DeptInfo) => {
+//             ListItem() {
+//               Row() {
+//                 Text(item.deptName)
+//                   .fontSize($r('app.float.fontSize_28'))
+//                   .fontWeight(FontWeight.Medium)
+//                   .fontColor(this.dept && this.dept.id === item.id ? $r('app.color.FFFFFF') : $r('app.color.000000'))
+//                 //.opacity($r('app.float.general_font_opacity'))
+//               }
+//               .height('15%')
+//               .width('80%')
+//               .backgroundColor(this.dept && this.dept.id === item.id ? $r('app.color.0A59F7') : $r('app.color.FFFFFF'))
+//               .borderRadius($r('app.float.virtualSize_6_4'))
+//               .padding({ left: 10 })
+//               .onClick(() => {
+//                 this.dept = item
+//                 if (this.controller != undefined) {
+//                   this.controller.close()
+//                 }
+//               })
+//             }
+//           })
+//         }
+//         .alignListItem(ListItemAlign.Center)
+//       }
+//       .height('70%')
+//       .width('80%')
+//       .justifyContent(FlexAlign.Start)
+//     }
+//     .width('48%')
+//     .height('63%')
+//     .backgroundColor($r('app.color.F1F3F5'))
+//     .justifyContent(FlexAlign.Start)
+//     .borderRadius($r('app.float.virtualSize_6_4'))
+//   }
+// }
+//
+// // 产线选择弹框
+// @CustomDialog
+// struct ProductionLineDialog {
+//   @Link productionLine: ProductionLine
+//   @State lineArray: ProductionLine[] = []
+//   @Link workstation: WorkstationInfo
+//   @Link workstationArray: WorkstationInfo[]
+//   controller?: CustomDialogController
+//   cancel: () => void = () => {
+//   }
+//   confirm: () => void = () => {
+//   }
+//
+//   async aboutToAppear() {
+//     if (this.lineArray && this.lineArray.length > 0) {
+//       return
+//     }
+//     // 查询产线
+//     this.lineArray = await JGRequest.post("/api/v1/base/productionLine/list/list", {
+//     } as RequestParamModel) as ProductionLine[]
+//     if (this.lineArray && this.lineArray.length > 0) {
+//       this.productionLine = this.lineArray[0]
+//       // 根据产线查询工位
+//       this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code + "/1", {
+//       }) as WorkstationInfo[]
+//       console.log("====================1234567890" + "成功+++++" + this.workstationArray[0])
+//       if (this.workstationArray && this.workstationArray.length > 0) {
+//         this.workstation = this.workstationArray[0]
+//         console.log("====================1234567890" + "成功" + this.workstation)
+//       }
+//     }
+//   }
+//
+//   build() {
+//     Column() {
+//       Row() {
+//         Text('选择产线')
+//           .fontSize($r('app.float.fontSize_38'))
+//           .fontWeight(FontWeight.Medium)
+//           .fontColor($r('app.color.000000'))
+//         //.opacity($r('app.float.general_font_opacity'))
+//       }
+//       .height('20%')
+//       .justifyContent(FlexAlign.Center)
+//
+//       Column() {
+//         List({ space: 10 }) {
+//           ForEach(this.lineArray, (item: ProductionLine) => {
+//             ListItem() {
+//               Row() {
+//                 Text(item.name)
+//                   .fontSize($r('app.float.fontSize_28'))
+//                   .fontWeight(FontWeight.Medium)
+//                   .fontColor(this.productionLine && this.productionLine.id === item.id ? $r('app.color.FFFFFF') : $r('app.color.000000'))
+//                 //.opacity($r('app.float.general_font_opacity'))
+//               }
+//               .height('15%')
+//               .width('80%')
+//               .backgroundColor(this.productionLine && this.productionLine.id === item.id ? $r('app.color.0A59F7') : $r('app.color.FFFFFF'))
+//               .borderRadius($r('app.float.virtualSize_6_4'))
+//               .padding({ left: 10 })
+//               .onClick(async () => {
+//                 this.productionLine = item
+//                 // 根据产线查询工位
+//                 this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code + "/1", {
+//                 }) as WorkstationInfo[]
+//                 if (this.workstationArray && this.workstationArray.length > 0) {
+//                   this.workstation = this.workstationArray[0]
+//                 } else {
+//                   this.workstation = {}
+//                 }
+//                 if (this.controller != undefined) {
+//                   this.controller.close()
+//                 }
+//               })
+//             }
+//           })
+//         }
+//         .alignListItem(ListItemAlign.Center)
+//       }
+//       .height('70%')
+//       .width('80%')
+//       .justifyContent(FlexAlign.Start)
+//     }
+//     .width('48%')
+//     .height('63%')
+//     .backgroundColor($r('app.color.F1F3F5'))
+//     .justifyContent(FlexAlign.Start)
+//     .borderRadius($r('app.float.virtualSize_6_4'))
+//   }
+// }
+//
+// // 工位选择弹框
+// @CustomDialog
+// struct SelectWorkstationDialog {
+//   @Link stationDictValue: string
+//   @Link workstation: WorkstationInfo
+//   // 产线编码
+//   private lineCode: string = ''
+//   @Link workstationArray: WorkstationInfo[]
+//   controller?: CustomDialogController
+//   cancel: () => void = () => {
+//   }
+//   confirm: () => void = () => {
+//   }
+//
+//   async aboutToAppear() {
+//     if (this.workstationArray && this.workstationArray.length > 0) {
+//       return
+//     }
+//     if (!this.lineCode || this.lineCode.length <= 0) {
+//       return
+//     }
+//     // 根据产线查询工位
+//     this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.lineCode + "/1", {
+//     }) as WorkstationInfo[]
+//     if (this.workstationArray && this.workstationArray.length > 0) {
+//       this.workstation = this.workstationArray[0]
+//     }
+//   }
+//
+//   build() {
+//     Column() {
+//       Row() {
+//         Text('选择工位')
+//           .fontSize($r('app.float.fontSize_38'))
+//           .fontWeight(FontWeight.Medium)
+//           .fontColor($r('app.color.000000'))
+//         //.opacity($r('app.float.general_font_opacity'))
+//       }
+//       .height('20%')
+//       .justifyContent(FlexAlign.Center)
+//
+//       Column() {
+//         List({ space: 10 }) {
+//           ForEach(this.workstationArray, (item: WorkstationInfo, index: number) => {
+//             ListItem() {
+//               Row() {
+//                 Text(item.name)
+//                   .fontSize($r('app.float.fontSize_28'))
+//                   .fontWeight(FontWeight.Medium)
+//                   .fontColor(this.workstation && this.workstation.id === item.id ? $r('app.color.FFFFFF') : $r('app.color.000000'))
+//                 //.opacity($r('app.float.general_font_opacity'))
+//               }
+//               .height('15%')
+//               .width('80%')
+//               .backgroundColor(this.workstation && this.workstation.id === item.id ? $r('app.color.0A59F7') : $r('app.color.FFFFFF'))
+//               .borderRadius($r('app.float.virtualSize_6_4'))
+//               .padding({ left: 10 })
+//               .onClick(() => {
+//                 this.workstation = item
+//                 this.stationDictValue = item.stationDictValue!
+//                 CommonConstants.stationDictValue = this.workstationArray[index].stationDictValue!
+//
+//
+//                 if (this.controller != undefined) {
+//                   this.controller.close()
+//                 }
+//               })
+//             }
+//           })
+//         }
+//         .alignListItem(ListItemAlign.Center)
+//       }
+//       .height('70%')
+//       .width('80%')
+//       .justifyContent(FlexAlign.Start)
+//     }
+//     .width('48%')
+//     .height('63%')
+//     .backgroundColor($r('app.color.F1F3F5'))
+//     .justifyContent(FlexAlign.Start)
+//     .borderRadius($r('app.float.virtualSize_6_4'))
+//   }
+// }
+//
+// export class DeptInfo {
+//   id?: number
+//   // 部门名称
+//   deptName?: string
+//   // 组织id
+//   orgId?: number
+// }
+//
+// export class WorkstationInfo {
+//   id?: string
+//   // 工位名称
+//   name?: string
+//   //工位类型
+//   stationDictValue?: string
+// }
+//
+// class ProductionLine {
+//   // 产线code
+//   code?: string
+//   // 创建时间
+//   created?: string
+//   // 创建人
+//   creato?: string
+//   // 是否删除
+//   deleted?: number
+//   // 部门ID
+//   deptId?: string
+//   // 主键
+//   id?: string
+//   // 数级结构层级
+//   level?: string
+//   // 产线管理者
+//   manager?: string
+//   // 产线名称
+//   name?: string
+//   // 组织ID
+//   orgId?: string
+//   // 所属车间code
+//   parentCode?: string
+//   // 产线位置
+//   position?: string
+//   // 产线描述
+//   remark?: string
+//   // 修改时间
+//   updated?: string
+//   // 上次修改人
+//   updator?: string
+//   // 所属车间
+//   workShopName?: string
+// }

+ 8 - 9
entry/src/main/ets/pages/Menu.ets

@@ -12,13 +12,11 @@ const TAG: string = 'MENU'
 @Entry
 @Component
 struct menu {
-  @State materialBoxID: string = 'LX-00010';
   @State pages: PageRes = {}
   @State inBoundOrders: BoundOrder[]=[]
   @State outBoundOrders: BoundOrder[]=[]
 
-  requestBoundOrder = async () => {
-    const loadOrders = async (type: number, targetArray: BoundOrder[]) => {
+   loadOrders = async (type: number, targetArray: BoundOrder[]) => {
       const pages = await WmsRequest.post('/api/v1/wmsOrder/page', { type } as RequestParamModel) as PageRes;
       if (pages?.records) {
         for (const record of pages.records) {
@@ -31,11 +29,6 @@ struct menu {
           });
         }
       }
-    };
-    await Promise.all([
-      loadOrders(1, this.inBoundOrders),
-      loadOrders(2, this.outBoundOrders)
-    ]);
   }
 
   connectMQTT=async ()=>{
@@ -67,7 +60,8 @@ struct menu {
   }
 
   async aboutToAppear() {
-    this.requestBoundOrder();
+    this.loadOrders(1, this.inBoundOrders)
+    this.loadOrders(2, this.outBoundOrders)
     this.connectMQTT();
   }
 
@@ -223,6 +217,11 @@ struct menu {
             .borderRadius($r('app.float.virtualSize_6_4'))
             .backgroundImage($r("app.media.little_material_outbound"))
             .backgroundImageSize(ImageSize.Cover)
+            .onClick(()=>{
+              router.pushUrl({
+                url: 'pages/LittleMaterialOutBound'
+              })
+            })
           } .alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.SpaceAround).height('95%').width('30%')
           Divider()
             .vertical(true)

+ 5 - 12
entry/src/main/ets/pages/OrderMaterialsStorage.ets

@@ -9,14 +9,12 @@ import {TimeAndTitle} from "../component/TimeAndTitle"
 import {OrderMaterialStorageFirstStep} from '../view/wms/OrderMaterialStorageFirstStep'
 import {OrderMaterialStorageSecondStep} from '../view/wms/OrderMaterialStorageSecondStep'
 import {OrderMaterialStorageThirdStep} from '../view/wms/OrderMaterialStorageThirdStep'
+import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
 @Entry
 @Component
 struct orderMaterialsStorage {
   @State materialBoxID: string = 'LX-00010';
-  @State selectedOrderNo: string = '';
-  @State selectedOrderDate: string = ''
-  @State selectedOrderName: string = ''
-  @State selectedOrderInRatio:string = ''
+  @State selectWorkOrder:WorkOrderInfo = {}
   @State messages:string[] = []
   @State currentStep: number = 1;
   @State emptyBoxes: EmptyBox[] = [
@@ -261,20 +259,15 @@ struct orderMaterialsStorage {
        {
          OrderMaterialStorageFirstStep({
            currentStep:this.currentStep,
-           selectedOrderNo:this.selectedOrderNo,
-           selectedOrderName:this.selectedOrderName,
-           selectedOrderDate:this.selectedOrderDate,
-           selectedOrderInRatio:this.selectedOrderInRatio
+           selectWorkOrder:this.selectWorkOrder
          })
        }
        else if(this.currentStep === 2)
        {
          OrderMaterialStorageSecondStep({
            currentStep:this.currentStep,
-           selectedOrderNo:this.selectedOrderNo,
-           selectedOrderName:this.selectedOrderName,
-           selectedOrderDate:this.selectedOrderDate,
-           selectedOrderInRatio:this.selectedOrderInRatio
+           selectWorkOrder:this.selectWorkOrder
+
          })
         }
         if(this.currentStep === 3){

+ 642 - 0
entry/src/main/ets/pages/RgvControl.ets

@@ -0,0 +1,642 @@
+/*
+ * 零星物料入库
+ * */
+import router from '@ohos.router';
+import {InfoRow} from '../component/RgvControlView'
+import RobotErrorHandleRequest from '../common/util/request/RobotErrorHandleRequest'
+import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
+import {RgvButton,RobotSelector,MoveControllerButton,CommonConfirmDialog}from "../component/RgvControlView"
+import {RobotInfo,RgvInfo,RequestParam} from "../params/RobotsParam"
+import CommonConstants from '../common/constants/CommonConstants'
+const TAG: string = 'RGV'
+@Entry
+@Component
+struct RgvControl {
+  @State robotsList: RobotInfo[] = CommonConstants.ROBOTS
+  @State hangingHeight : Array<SelectOption> =CommonConstants.HANGING_HEIGHT
+  @State rgvStatus : Record<string, string> = CommonConstants.RGV_STATUS
+  @State robotArray: Array<SelectOption> = []
+  @State hangingIndex : number = 0;
+  @State messages: string[] = []
+  @State currentStep: number = 1;
+  @State selectWorkOrder: WorkOrderInfo = {}
+  @State workOrderArray: WorkOrderInfo[] = []
+  @State scaleValue: number = 1;
+  @State selectRobotIndex : number = 0
+  @State axisNumberX : number = 0
+  @State axisNumberY : number = 0
+  @State rgvPosition : string = ""
+  @State rgvBatteryLevel  : string = ""
+  @State rgvCurrentStatus: string = ""
+  @State rgvInfoInterval: number | null = null;
+
+  commonDialogController: CustomDialogController | null = null;
+
+  // 显示通用确认弹窗
+  executeShutdown=async()=>{
+    console.info(TAG,"dasdasdasdsa")
+}
+  private showConfirmDialog(params: ConfirmDialogParams) {
+    if (this.commonDialogController) {
+      this.commonDialogController.close()
+    }
+
+    this.commonDialogController = new CustomDialogController({
+      builder: CommonConfirmDialog({
+        title: params.title || '提示',
+        message: params.message,
+        confirmText: params.confirmText || '确定',
+        cancelText: params.cancelText || '取消',
+        onConfirm: params.onConfirm
+      }),
+      cancel: () => console.log('用户取消操作'),
+      customStyle: true
+    });
+
+    this.commonDialogController.open();
+  }
+
+  dialogController: CustomDialogController = new CustomDialogController({
+    builder: MoveDialog(),
+    cancel: () => console.log('弹窗关闭'),
+    autoCancel: true, // 点击遮罩关闭
+    customStyle:true
+  })
+
+  loadRgvSelection=()=>{
+    if (this.robotsList && this.robotsList.length > 0) {
+      for (const robot of this.robotsList ) {
+        let option: SelectOption = { value: robot.id ? `${robot.id}号仓储机器人` : ''}
+        this.robotArray.push(option)
+      }
+    }
+  }
+
+  loadRgvInfo = async () => {
+    let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/' + this.robotsList[this.selectRobotIndex].robotCode, {}) as RgvInfo
+    this.rgvPosition = `X=${res.x},Y=${res.y}`
+    this.rgvBatteryLevel = `${res.batlevel}}`
+    let status: string = res.status ?? '';
+    this.rgvCurrentStatus = `${this.rgvStatus[status] || '故障'}`;
+    console.info(TAG,this.robotsList[this.selectRobotIndex].robotCode+ this.rgvPosition)
+  }
+  aboutToAppear(): void {
+    this.loadRgvSelection();
+    this.rgvInfoInterval = setInterval(() => {
+      this.loadRgvInfo();
+    }, 1000);
+  }
+
+  boutToDisappear(): void {
+    if (this.rgvInfoInterval) {
+      clearInterval(this.rgvInfoInterval);
+      this.rgvInfoInterval = null;
+    }
+  }
+
+  build() {
+    Row() {
+      Column() {
+        Row() {
+
+        }.width('100%')
+        .height('3.4%')
+        Row(){
+          Row() {
+            Image($r('app.media.general_return'))
+              .height($r('app.float.virtualSize_22_4'))
+              .width($r('app.float.virtualSize_22_4'))
+              .fillColor($r('app.color.FFFFFF'))
+            Text('仓储机器人控制')
+              .fontColor($r('app.color.FFFFFF'))
+              .fontSize($r('app.float.fontSize_15_2'))
+          }
+          .width('85%')
+          .justifyContent(FlexAlign.Start)
+          .margin({ left: '3%' })
+          .onClick(() => {
+            router.back()
+          })
+          Button({type:ButtonType.Normal}){
+            Row() {
+              Image($r('app.media.rgv_clean_error'))
+                .width('12%')
+                .height('50%')
+                .margin({ right: 8 })
+                .fillColor($r('app.color.0A84FF'))
+              Text("清除错误")
+                .fontSize($r('app.float.fontSize_12'))
+                .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
+            }.justifyContent(FlexAlign.Center)
+          }
+          .width('10%')
+          .height('100%')
+          .backgroundColor($r('app.color.20FFFFFF'))
+          .borderRadius($r('app.float.virtualSize_6_4'))
+          .scale({ x: this.scaleValue, y: this.scaleValue })
+          .animation({
+            duration: 200,
+            curve: Curve.Linear  // 弹性曲线更生动
+          })
+          .onClick(() => {
+            this.scaleValue = 0.9;  // 点击时缩小
+            setTimeout(() => {
+              this.scaleValue = 1; // 0.2秒后恢复
+            }, 200);
+          })
+        } .height('4%').width('100%').justifyContent(FlexAlign.Start)
+
+        Row(){
+          Column(){
+            Row(){
+              Image($r('app.media.rgv_001'))
+                .width('70%')
+                .objectFit(ImageFit.Contain)
+                .interpolation(ImageInterpolation.High)
+              //.fillColor($r('app.color.0A84FF'))
+              Image($r('app.media.rgv_set_position'))
+                .height($r('app.float.virtualSize_22_4'))
+                .width($r('app.float.virtualSize_22_4'))
+                .fillColor($r('app.color.FFFFFF'))
+            }
+            .height('40%')
+            .width('100%')
+            //.margin({top:'5%'})
+            .alignItems(VerticalAlign.Bottom)
+            .justifyContent(FlexAlign.Center)
+            Column({space:10}){
+              InfoRow({
+                label:"编号:",
+                value:"DF441AS114F5555",
+              })
+              InfoRow({
+                label:"状态:",
+                value:this.rgvCurrentStatus,
+                valueColor:$r('app.color.30D158')
+              })
+              InfoRow({
+                label:"当前电量:",
+                value:this.rgvBatteryLevel,
+                valueColor:$r('app.color.30D158')
+              })
+              InfoRow({
+                label:"当前位置:",
+                value:this.rgvPosition,
+                valueColor:$r('app.color.30D158')
+              })
+              InfoRow({
+                label:"维保有效期:",
+                value:"2024/11/11~2025/11/11",
+              })
+              InfoRow({
+                label:"充电电压:",
+                value:"28v",
+              })
+              InfoRow({
+                label:"额定负载:",
+                value:"20kg",
+              })
+            }.justifyContent(FlexAlign.Start)//.margin({top:'5%',left:'5%'})
+            Column(){
+              Text("切换仓储机器人")
+                .fontColor($r('app.color.FFFFFF'))
+                .fontSize($r('app.float.fontSize_8'))
+              // RobotSelector({robotsList:this.robotArray}).width('80%').height('95%').margin({top:'1%'})
+              Select(this.robotArray)
+                .selected(0)
+                .value(String(this.robotArray[0].value))
+                .height('23%')
+                .width('80%')
+                .borderRadius($r('app.float.virtualSize_6_4'))
+                .backgroundColor($r('app.color.20FFFFFF'))
+                .fontColor($r('app.color.FFFFFF'))
+                .font({size:$r('app.float.fontSize_12')})
+                .onSelect((index: number) => {
+                  this.selectRobotIndex = index
+                })
+            }.height('30%')//.margin({top:'10%'})
+          }.width('22%').justifyContent(FlexAlign.SpaceAround).height('100%')
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.20FFFFFF'))
+            .margin({top:'10%'})
+            //.margin({top:'2%'})
+          Column(){
+            Column(){
+              Column(){
+                Text('电源')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_15_2'))
+                  .width('80%')
+                  .textAlign(TextAlign.Start).margin({top:'5%'})
+              }.height('15%')
+              RgvButton({
+                text:"开机",
+                icon:$r('app.media.rgv_turn_on'),
+                onButtonClick: async () => {
+                  try {
+                    // 第一步:开启电机
+                    let res: object= await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOn', {
+                      rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                      option: 'motor'
+                    } as RequestParam);
+                    console.log(TAG,'电机启动:' + res.toString());
+
+                    // 第二步:延迟 5 秒后开启主电源
+                    await delayExecution(async () => {
+                      res = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOn', {
+                        rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                        option: 'mainPower'
+                      } as RequestParam);
+                      console.log(TAG,'主电源启动:' + res.toString());
+                    }, 5000);
+
+                    // 第三步:再延迟 5 秒后开启 MCU
+                    await delayExecution(async () => {
+                      res = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOn', {
+                        rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                        option: 'mcu'
+                      } as RequestParam);
+                      console.log(TAG,'MCU 启动:' + res.toString());
+                    }, 5000);
+
+                  } catch (error) {
+                    console.error('开机流程失败:', error);
+                  }
+                }
+              }).height('16%').width('80%').margin({top:'15%'})
+              RgvButton({
+                text:"关机",
+                icon:$r('app.media.rgv_turn_off'),
+                onButtonClick: async () => {
+                  try {
+
+                    let res: object = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/TurnChargingSwitch', {
+                      rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                      option: 'off'
+                    } as RequestParam);
+
+                    await delayExecution(async () => {
+                      res = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOff', {
+                      rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                      option: 'motor'
+                    } as RequestParam);
+                      console.log(TAG,'motor 关闭:' + res.toString());
+                    }, 5000);
+
+
+                    // 第二步:延迟 5 秒后开启主电源
+                    await delayExecution(async () => {
+                      res = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOff', {
+                        rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                        option: 'mainPower'
+                      } as RequestParam);
+                      console.log(TAG,'mainPower 关闭:' + res.toString());
+                    }, 5000);
+
+                    // 第三步:再延迟 5 秒后开启 MCU
+                    await delayExecution(async () => {
+                      res = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOff', {
+                        rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
+                        option: 'mcu'
+                      } as RequestParam);
+                      console.log(TAG,'MCU 关闭:' + res.toString());
+                    }, 5000);
+
+                  } catch (error) {
+                    console.error('关机流程失败:', error);
+                  }
+                }
+              }).height('16%').width('80%').margin({top:'10%'})
+            }.height('48%')
+            Divider()
+              .vertical(false)
+              .strokeWidth(1)
+              .color($r('app.color.20FFFFFF'))
+            Column(){
+              Column(){
+                Text('充电')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_15_2'))
+                  .width('80%')
+                  .textAlign(TextAlign.Start)
+                  .margin({top:'5%'})
+              }.height('15%')
+              RgvButton({
+                text:"开始充电",
+                icon:$r('app.media.rgv_start_charge'),
+                onButtonClick: () => {
+                }
+              }).height('16%').width('80%').margin({top:'15%'})
+              RgvButton({
+                text:"结束充电",
+                icon:$r('app.media.rgv_stop_charge'),
+                onButtonClick: () => {
+                }
+              }).height('16%').width('80%').margin({top:'10%'})
+            }.height('48%')
+          }.justifyContent(FlexAlign.SpaceAround).margin({top:'5%'})
+          .height('100%')
+          .width('22%')
+
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.20FFFFFF'))
+            .margin({top:'10%'})
+
+          Column(){
+            Column(){
+              Column(){
+                Text('位移')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_15_2'))
+                  .width('80%')
+                  .textAlign(TextAlign.Start).margin({top:'5%'})
+              }.height('15%')
+              Column(){
+                Text('X轴方向')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .width('80%')
+                  .margin({bottom:'2%'})
+              }.height('15%').justifyContent(FlexAlign.End)
+              Row(){
+                MoveControllerButton({
+                  icon:$r('app.media.rgv_subtraction'),
+                  onButtonClick: () => {
+                    this.axisNumberX --
+                    this.axisNumberY = 0
+                  }
+                }).width('20%')
+                Row(){
+                  Text(String(this.axisNumberX))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_38'))
+                }.width('60%').justifyContent(FlexAlign.Center)
+                MoveControllerButton({
+                  icon:$r('app.media.rgv_add'),
+                  onButtonClick: () => {
+                    this.axisNumberX ++
+                    this.axisNumberY = 0
+                  }
+                }).width('20%')
+              }.height('16%').width('80%').backgroundColor($r('app.color.10FFFFFF'))
+              Column(){
+                Text('Y轴方向')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .width('80%')
+                  .margin({bottom:'2%'})
+              }.height('10%').justifyContent(FlexAlign.End)
+              Row(){
+                MoveControllerButton({
+                  icon:$r('app.media.rgv_subtraction'),
+                  onButtonClick: () => {
+                    this.axisNumberY --
+                    this.axisNumberX = 0
+                  }
+                }).width('20%')
+                Row(){
+                  Text(String(this.axisNumberY))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_38'))
+                }.width('60%').justifyContent(FlexAlign.Center)
+                MoveControllerButton({
+                  icon:$r('app.media.rgv_add'),
+                  onButtonClick: () => {
+                    this.axisNumberY ++
+                    this.axisNumberX = 0
+                  }
+                }).width('20%')
+              }.height('16%').width('80%').backgroundColor($r('app.color.10FFFFFF'))
+              RgvButton({
+                text:"移动",
+                icon:$r('app.media.rgv_move'),
+                onButtonClick: () => {
+                }
+              }).height('16%').width('80%').margin({top:'10%'})
+            }.height('48%')
+            Column(){
+              Divider()
+                .vertical(false)
+                .strokeWidth(1)
+                .color($r('app.color.20FFFFFF'))
+                .margin({top:'25%'})
+              Column(){
+                Text('设置终点位置移动')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .width('80%')
+                  .margin({bottom:'2%'})
+              }.height('10%').justifyContent(FlexAlign.End).margin({top:'21%'})
+              RgvButton({
+                text:"终点移动",
+                icon:$r('app.media.rgv_end_position'),
+                onButtonClick: () => {
+                  this.dialogController.open()
+                }
+              }).height('16%').width('80%')
+            }.height('48%')
+
+          }.justifyContent(FlexAlign.SpaceAround).margin({top:'5%'})
+          .height('100%')
+          .width('22%')
+
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.20FFFFFF'))
+            .margin({top:'10%'})
+
+          Column(){
+            Column(){
+              Column(){
+                Text('吊篮')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_15_2'))
+                  .width('80%')
+                  .textAlign(TextAlign.Start).margin({top:'5%'})
+              }.height('15%')
+              Column(){
+                Text('设置吊篮层数')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_8'))
+                  .textAlign(TextAlign.Start)
+                  .width('80%')
+                  .margin({bottom:'2%'})
+              }.height('15%').justifyContent(FlexAlign.End)
+              Select(this.hangingHeight)
+                .selected(0)
+                .value(String(this.hangingHeight[0].value))
+                .height('16%')
+                .width('80%')
+                .borderRadius($r('app.float.virtualSize_6_4'))
+                .backgroundColor($r('app.color.20FFFFFF'))
+                .fontColor($r('app.color.FFFFFF'))
+                .font({size:$r('app.float.fontSize_12')})
+                .onSelect((index: number) => {
+                  if(index == 7) this.hangingIndex=130
+                  else if(index == 8) this.hangingIndex=129
+                  else this.hangingIndex = index
+                })
+              RgvButton({
+                text:`升降`,
+                icon:$r('app.media.rgv_lifting'),
+                onButtonClick: () => {
+                }
+              }).height('16%').width('80%').margin({top:'10%'})
+            }.height('48%')
+            Divider()
+              .vertical(false)
+              .strokeWidth(1)
+              .color($r('app.color.20FFFFFF'))
+            Column(){
+              Column(){
+                Text('爪夹')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_15_2'))
+                  .width('80%')
+                  .textAlign(TextAlign.Start)
+                  .margin({top:'5%'})
+              }.height('15%')
+              RgvButton({
+                text:"爪夹张开",
+                icon:$r('app.media.rgv_paw_open'),
+                onButtonClick: () => {
+                  this.showConfirmDialog({
+                    title: '关机确认',
+                    message: `确定要关闭 ${this.robotsList[this.selectRobotIndex].robotCode} 机器人吗?`,
+                    confirmText: '确认关机',
+                    onConfirm: ()=> {
+                      this.executeShutdown()
+                    }
+                  });
+                }
+              }).height('16%').width('80%').margin({top:'15%'})
+              RgvButton({
+                text:"爪夹闭合",
+                icon:$r('app.media.rgv_paw_close'),
+                onButtonClick: () => {
+                }
+              }).height('16%').width('80%').margin({top:'10%'})
+            }.height('48%')
+          }.justifyContent(FlexAlign.SpaceAround).margin({top:'5%'})
+          .height('100%')
+          .width('22%')
+        }.height('80%').width('100%').justifyContent(FlexAlign.SpaceAround)
+      }
+      .width('100%')
+      .height('100%')
+      .backgroundColor($r('app.color.000000'))
+    }
+    .height('100%')
+  }
+}
+
+
+// 弹窗组件定义
+@CustomDialog
+struct MoveDialog {
+  @State xValue1: string = ''
+  @State xValue2: string = ''
+  controller: CustomDialogController
+
+  build() {
+    Column() {
+      Column(){
+        Text('终点移动')
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_15_2'))
+      }.height('20%')
+      .justifyContent(FlexAlign.Center)
+
+      Text('设置终点坐标')
+        .fontColor($r('app.color.FFFFFF'))
+        .fontSize(14)
+        .margin({ bottom: 24 })
+
+      // 输入区域
+      Column() {
+        // 第一个X轴输入
+        Column() {
+          Text('X轴')
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize(14)
+            .margin({ bottom: 8 })
+
+          TextInput({ text: this.xValue1 })
+            .width('100%')
+            .height(48)
+            .backgroundColor('#000000')
+            .fontColor($r('app.color.FFFFFF'))
+            .caretColor('#0A84FF')
+            .borderRadius(8)
+        }
+        .margin({ bottom: 20 })
+
+        // 第二个X轴输入
+        Column() {
+          Text('X轴')
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize(14)
+            .margin({ bottom: 8 })
+
+          TextInput({ text: this.xValue2 })
+            .width('100%')
+            .height(48)
+            .backgroundColor('#000000')
+            .fontColor($r('app.color.FFFFFF'))
+            .caretColor('#0A84FF')
+            .borderRadius(8)
+        }
+      }
+      .padding(16)
+
+      // 按钮区域
+      Flex({ justifyContent: FlexAlign.SpaceBetween }) {
+        Button('取消', { type: ButtonType.Normal })
+          .width('45%')
+          .backgroundColor('#333333')
+          .fontColor('#FFFFFF')
+          .onClick(() => this.controller.close())
+
+        Button('移动', { type: ButtonType.Normal })
+          .width('45%')
+          .backgroundColor('#0A84FF')
+          .fontColor('#FFFFFF')
+          .onClick(() => {
+            console.log(`移动至坐标: ${this.xValue1}, ${this.xValue2}`)
+            this.controller.close()
+          })
+      }
+      .width('100%')
+      .padding({ left: 16, right: 16, bottom: 24 })
+    }
+    .height(365)
+    .width(540)
+    .backgroundColor($r('app.color.2A2A2A'))
+    .borderRadius(16)
+  }
+}
+
+function delayExecution(callback: Function, delay: number): Promise<void> {
+  return new Promise((resolve) => {
+    setTimeout(() => {
+      callback();
+      resolve();
+    }, delay);
+  });
+}
+
+interface ConfirmDialogParams {
+  title?: string
+  message: string
+  confirmText?: string
+  cancelText?: string
+  onConfirm: () => void
+}

+ 51 - 0
entry/src/main/ets/params/MaterialInformationParam.ets

@@ -0,0 +1,51 @@
+// 响应接口
+export interface MaterialListInformation {
+  batchCode: string;
+  codeStr: string;
+  coordinate: string;
+  created: string;
+  creator: string;
+  deptId: string;
+  houseArea: string;
+  houseNo: string;
+  houseType: string;
+  id: string;
+  locationNo: string;
+  //物料名称
+  materialName: string;
+  //物料编码
+  materialNo: string;
+  num: number;
+  orgId: string;
+  planNo: string;
+  position: number;
+  seqNo: string;
+  spec: string;
+  taskNo: string;
+  unit: string;
+  updated:string;
+  updator: string;
+  vehicleCode: string;
+  warningMsg: string;
+}
+
+export interface MaterialBoxInfo {
+  coordinate?: string;
+  houseArea?: string;
+  houseNo?: string;
+  houseType?: string;
+  //位置
+  locationNo?: string;
+  planNo?: string;
+  position?: number;
+  taskNo?: string;
+  //料箱编码
+  vehicleCode?: string;
+}
+
+export interface outBoxClass {
+  //料箱ID
+  vehicleId: string
+  //料箱名称
+  vehicleName: string
+}

+ 58 - 0
entry/src/main/ets/params/RobotsParam.ets

@@ -0,0 +1,58 @@
+
+export  class RobotInfo {
+  // id
+  id?: number;
+  // 机器人编码
+  robotCode?:string;
+  // 所属仓库id
+  storageId?: number;
+  // 机器人位置x坐标
+  x?: number = 0
+  // 机器人位置y坐标
+  y?: number = 0
+  // 车类型(1:轨道 2:仓储)
+  robotType?:number
+  //机器人的朝向(1:x+ 2:x- 3:y+ 4:y-)
+  robotToward?: number = 0
+  // 上次自检日期
+  lastSelfCheck? : string
+  robotId?:number
+  checkName?:string
+  checkTime?:string
+  checkStatus?:number
+}
+
+export  class RgvInfo{
+  id?:string
+  x?:string
+  y?:string
+  status?:string
+  auto?:string
+  dx?:string
+  dy?:string
+  mv?:string
+  batlevel?:string
+  charging?:string
+  errCode?:string
+  cmd?:string
+  load?:string
+  boxNo?:string
+  regTime?:string
+  traMiles?:string
+  chargeCount?:string
+  forward?:string
+  ts?:string
+}
+
+export  class RequestParam {
+  rgvNo?: string
+  x?: string
+  y?: string
+  category?: number
+  state?: number
+  option?: string
+  level?: string
+  action?: string
+  destX?:string
+  destY?:string
+}

+ 22 - 11
entry/src/main/ets/view/wms/OrderMaterialStorageFirstStep.ets

@@ -1,13 +1,12 @@
 import {MaterialList,OrderListComponent} from "../../component/OrderMaterialsStorageView"
 import {OrderParams,DemandMaterial} from "../../params/OrderMaterialsStorageParams"
+import WmsRequest from '../../common/util/request/WmsRequest'
+import RequestParamModel from '../../viewmodel/wms/RequestParamModel'
+import WorkOrderInfo from '../../viewmodel/wms/WorkOrderInfo'
 
 
 @Component
 export struct OrderMaterialStorageFirstStep {
-  @Link selectedOrderNo: string
-  @Link selectedOrderDate: string
-  @Link selectedOrderName: string
-  @Link selectedOrderInRatio:string
   @Link currentStep: number
   @State orders:OrderParams[]= [
     { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
@@ -30,6 +29,21 @@ export struct OrderMaterialStorageFirstStep {
     {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
     {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
   ];
+
+  @Link selectWorkOrder: WorkOrderInfo
+
+  @State workOrderArray: WorkOrderInfo[] = []
+
+  loadWorkOrders = async () => {
+    this.workOrderArray = await WmsRequest.post('/api/v1/plan/workOrder/list', {
+      queryComplete: 0,
+    } as RequestParamModel) as WorkOrderInfo[]
+  }
+  aboutToAppear(): void {
+    this.loadWorkOrders();
+  }
+
+
   build() {
     Column(){
       Row(){
@@ -41,11 +55,8 @@ export struct OrderMaterialStorageFirstStep {
           }.height('10%')
           Row(){
             OrderListComponent({
-              orders:this.orders,
-              selectedOrderNo: this.selectedOrderNo,
-              selectedOrderDate:this.selectedOrderDate,
-              selectedOrderName:this.selectedOrderName,
-              selectedOrderInRatio:this.selectedOrderInRatio
+              workOrders:this.workOrderArray,
+              selectWorkOrder: this.selectWorkOrder
             }).width('95%').height('90%')
           }
         }.width('30%').backgroundColor($r('app.color.10FFFFFF'))
@@ -79,9 +90,9 @@ export struct OrderMaterialStorageFirstStep {
       .width('22%')
       .height('6%')
       .margin({bottom:'3%',left:'73%'})
-      .backgroundColor(this.selectedOrderNo ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
+      .backgroundColor(this.selectWorkOrder.orderCode ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
       .borderRadius($r('app.float.virtualSize_6_4'))
-      .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+      .enabled(!!this.selectWorkOrder.orderCode ) // 只有选中订单时才启用按钮
       .onClick(() => {
         this.currentStep = 2;
       })

+ 74 - 179
entry/src/main/ets/view/wms/OrderMaterialStorageSecondStep.ets

@@ -1,189 +1,69 @@
 import {SingleOrder,BoxGrid} from "../../component/OrderMaterialsStorageView"
-import {OrderParams,DemandMaterial,MaterialBox, EmptyBox} from "../../params/OrderMaterialsStorageParams"
+import WorkOrderInfo from '../../viewmodel/wms/WorkOrderInfo'
+import WmsRequest from '../../common/util/request/WmsRequest'
+import {MaterialListInformation,MaterialBoxInfo,outBoxClass} from '../../params/MaterialInformationParam'
+import RequestParamModel from '../../viewmodel/wms/RequestParamModel'
+import CommonConstants from '../../common/constants/CommonConstants'
+import promptAction from '@ohos.promptAction'
+
 
 @Component
 export struct OrderMaterialStorageSecondStep {
-  @Prop selectedOrderNo: string = '';
-  @Prop selectedOrderDate: string = ''
-  @Prop selectedOrderName: string = ''
-  @Prop selectedOrderInRatio:string = ''
+  @Prop  selectWorkOrder:WorkOrderInfo = {}
   @Link currentStep: number
-  @State emptyBoxes: EmptyBox[] = [
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' },
-    { position: 'X-1Y-2' } // 图片显示6个空箱位置
-  ]
-  @State materialBoxes: MaterialBox[] = [
-  // 第一行物料箱
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
+  @State scanCodeValue:string = ''
+  @State selectedMaterialBox: MaterialBoxInfo = {};
+  @State outBoundButtonClick :number = 1
+  @State isQueryMaterial: boolean = false
+  @State emptyBoxes: MaterialBoxInfo[] = []
+  @State materialBoxes: MaterialBoxInfo[] = []
+  getStoreList = async () => {
+    let res: MaterialListInformation[] = await WmsRequest.post("/api/v1/stock/mergeList", {
+      houseType: "1",
+      materialNo: this.scanCodeValue,
+    } as RequestParamModel)
+    this.scanCodeValue = ''
+    console.log('qqqq' + '列表' + JSON.stringify(res))
+  }
 
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
+  MaterialpositionHttp = async (item: MaterialListInformation) => {
+    let res: MaterialBoxInfo[] = await WmsRequest.post("/api/v1/stock/groupList", {
+      materialName: item.materialName,
+    } as RequestParamModel);
+  }
 
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
-    {
-      id: '1', type: 'material',
-      name: '物料名称XXXXX',
-      boxNumber: 'LX-12345',
-      boxType: '通用类型',
-      order: 'XXXXX订单',
-      quantity: 10,
-      position: 'X-1 Y-2'
-    },
-    // 其他2个物料箱...
+  //暂时取空箱
+  getEmptyBox = async () => {
+    let res: MaterialBoxInfo[] = await WmsRequest.post("/api/v1/stock/groupList", {
+      materialName: "空盒",
+    } as RequestParamModel);
+    this.emptyBoxes = res;
+    console.info( "qqqqq"+JSON.stringify(res))
+  }
 
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    }, {
-    id: '1', type: 'material',
-    name: '物料名称XXXXX',
-    boxNumber: 'LX-12345',
-    boxType: '通用类型',
-    order: 'XXXXX订单',
-    quantity: 10,
-    position: 'X-1 Y-2'
-  },
+  boxOutBound = async () => {
+    let res: outBoxClass = await WmsRequest.post("/api/v1/wmsOrder/outBox", {
+      houseNo:this.selectedMaterialBox?.houseNo,
+      vehicleNo:this.selectedMaterialBox?.vehicleCode,
+      stanCode:CommonConstants.STATION_CODE
+    } as RequestParamModel)
+   promptAction.showToast({
+      message: "任务进行中,请等待....",
+      duration: 1800,
+      bottom: '50%'
+    })
+  }
 
-    // 其他2个物料箱...
 
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-    // 第二行空箱
-    {
-      id: '4', type: 'empty',
-      name: '空箱',
-      boxNumber: 'LX-67890',
-      boxType: '通用类型',
-      position: 'X-3 Y-1'
-    },
-  // 其他2个空箱...
-  ];
+  aboutToAppear(): void {
+     this.getEmptyBox()
+  }
   build() {
     Column(){
       Row(){
         Column(){
           SingleOrder({
-            selectedOrderNo:this.selectedOrderNo,
-            selectedOrderDate:this.selectedOrderDate,
-            selectedOrderName:this.selectedOrderName,
-            selectedOrderInRatio:this.selectedOrderInRatio
+            selectWorkOrder:this.selectWorkOrder,
           }).height('18%').width('95%')
           Column(){
             Text('查询物料')
@@ -224,22 +104,22 @@ export struct OrderMaterialStorageSecondStep {
                 .height($r('app.float.virtualSize_23'))
                 .fillColor($r('app.color.FFFFFF'))
               Column({space:5}){
-                Text('DIANLUBANPCBAADD123124114232423ASD')
+                Text('')
                   .fontSize($r('app.float.fontSize_12'))
                   .fontColor($r('app.color.0A84FF'))
                   .textAlign(TextAlign.Start)
                   .width('100%')
-                Text('产品型号:12322221232321222332211233')
+                Text('')
                   .fontSize($r('app.float.fontSize_8'))
                   .fontColor($r('app.color.0A84FF'))
                   .textAlign(TextAlign.Start)
                   .width('100%')
-                Text('序列号:123254213452465346346456')
+                Text('')
                   .fontSize($r('app.float.fontSize_8'))
                   .fontColor($r('app.color.0A84FF'))
                   .textAlign(TextAlign.Start)
                   .width('100%')
-                Text('数量:10个')
+                Text('')
                   .fontSize($r('app.float.fontSize_8'))
                   .fontColor($r('app.color.0A84FF'))
                   .textAlign(TextAlign.Start)
@@ -254,7 +134,7 @@ export struct OrderMaterialStorageSecondStep {
                 Text('当前有 ')
                   .fontSize($r('app.float.fontSize_8'))
                   .fontColor($r('app.color.60FFFFFF'))
-                Text('6')
+                Text('0')
                   .fontSize($r('app.float.fontSize_12'))
                   .fontColor($r('app.color.0A84FF'))
                 Text(' 个料箱装有同型号物料')
@@ -277,7 +157,12 @@ export struct OrderMaterialStorageSecondStep {
               .fontSize($r('app.float.fontSize_15_2'))
           }.height('10%')
           Row() {
-            BoxGrid({ materialBoxes:this.materialBoxes,emptyBoxes:this.emptyBoxes })
+            BoxGrid({
+              materialBoxes:this.materialBoxes,
+              emptyBoxes:this.emptyBoxes,
+              isQueryMaterial:this.isQueryMaterial,
+              selectedMaterialBox:this.selectedMaterialBox
+            })
               .width('100%')
               .height('100%')
           }.width('100%').height('90%')
@@ -309,9 +194,19 @@ export struct OrderMaterialStorageSecondStep {
         .height('100%')
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
-       // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
+        .backgroundColor(this.selectedMaterialBox.vehicleCode ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
+        .enabled(!!this.selectedMaterialBox.vehicleCode) // 只有选中订单时才启用按钮
+        .scale({ x: this.outBoundButtonClick, y: this.outBoundButtonClick })
+        .animation({
+          duration: 200,
+          curve: Curve.Linear  // 弹性曲线更生动
+        })
         .onClick(() => {
-          this.currentStep = 2;
+          this.outBoundButtonClick = 0.9; // 点击时缩小
+          setTimeout(() => {
+            this.outBoundButtonClick = 1; // 0.2秒后恢复
+          }, 200);
+         this.boxOutBound();
         })
         Button({type:ButtonType.Normal}) {
           Text("下一步")

+ 6 - 6
entry/src/main/ets/view/wms/OrderMaterialStorageThirdStep.ets

@@ -7,12 +7,12 @@ export struct OrderMaterialStorageThirdStep {
   @State messages:string[] = []
   @Link currentStep: number
   @State orders:OrderParams[]= [
-    { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
-    { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
-    { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' },
-    { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
-    { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
-    { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
+    // { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
+    // { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
+    // { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' },
+    // { orderName: '订单名称XXXXX', orderNo: '123123213', date: '2025/11/11', progress: '50%' },
+    // { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
+    // { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
   ]
   build() {
     Column(){

+ 12 - 0
entry/src/main/ets/viewmodel/wms/RequestParamModel.ets

@@ -4,4 +4,16 @@ export default class RequestParamModel {
   queryComplete?: number
   //工单类型 1 入库单 2 出库单
   type?: number
+  //储位类型
+  houseType?: string;
+  //储位编号
+  houseNo?:string
+  //物料名称
+  materialName?: string;
+  //物料编号
+  materialNo?:string
+  //工位编号
+  stanCode?:string
+  //料箱编号
+  vehicleNo?:string
 }

+ 12 - 0
entry/src/main/resources/base/element/color.json

@@ -13,6 +13,18 @@
       "value": "#000000"
     },
     {
+      "name": "A0A8B2",
+      "value": "#A0A8B2"
+    },
+    {
+      "name": "0A59F7",
+      "value": "#0A59F7"
+    },
+    {
+      "name": "F1F3F5",
+      "value": "#F1F3F5"
+    },
+    {
       "name": "0A84FF",
       "value": "#0A84FF"
     },

+ 4 - 0
entry/src/main/resources/base/element/font.json

@@ -65,6 +65,10 @@
       "value": "3vp"
     },
     {
+      "name": "virtualSize_3",
+      "value": "5vp"
+    },
+    {
       "name": "virtualSize_120",
       "value": "180vp"
     },

BIN
entry/src/main/resources/base/media/login_backgroundImage.png


BIN
entry/src/main/resources/base/media/rgv_001.png


+ 3 - 0
entry/src/main/resources/base/media/rgv_add.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path d="M25.5 42.32c0 .835-.672 1.512-1.5 1.512s-1.5-.677-1.5-1.512V25.177h-17c-.828 0-1.5-.677-1.5-1.513 0-.835.672-1.512 1.5-1.512h17V5.009c0-.836.672-1.513 1.5-1.513s1.5.677 1.5 1.513v37.31Zm17-20.168c.828 0 1.5.677 1.5 1.512 0 .836-.672 1.513-1.5 1.513h-15v-3.025h15Z"/>
+</svg>

File diff suppressed because it is too large
+ 8 - 0
entry/src/main/resources/base/media/rgv_clean_error.svg


File diff suppressed because it is too large
+ 8 - 0
entry/src/main/resources/base/media/rgv_end_position.svg


+ 4 - 0
entry/src/main/resources/base/media/rgv_lifting.svg

@@ -0,0 +1,4 @@
+<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M33.9377 31H14.0931L24.0154 41.4443L33.9377 31ZM22.6094 44.32L10.6581 31.74C9.95508 31.06 9.95508 30.04 9.95508 29.36C10.3066 28.68 11.0096 28 12.0641 28H35.9667C36.6697 28 37.7242 28.68 37.7242 29.36C38.0757 30.04 38.0757 31.06 37.3727 31.74L25.4214 44.32C25.0699 44.66 24.3669 45 24.0154 45C23.3124 45 22.9609 44.66 22.6094 44.32Z" fill="#0A84FF"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M33.9377 17H14.0931L24.0154 6.55567L33.9377 17ZM25.4214 3.68L37.3727 16.26C38.0757 16.94 38.0757 17.62 37.7242 18.64C37.7242 19.32 36.6697 20 35.9667 20H12.0641C11.0096 20 9.95508 19.66 9.95508 18.64C9.95508 17.62 9.95508 16.94 10.6581 16.26L22.6094 3.68C22.9609 3.34 23.3124 3 24.0154 3C24.3669 3 25.0699 3.34 25.4214 3.68Z" fill="#0A84FF"/>
+</svg>

File diff suppressed because it is too large
+ 8 - 0
entry/src/main/resources/base/media/rgv_move.svg


File diff suppressed because it is too large
+ 6 - 0
entry/src/main/resources/base/media/rgv_paw_close.svg


File diff suppressed because it is too large
+ 6 - 0
entry/src/main/resources/base/media/rgv_paw_open.svg


File diff suppressed because it is too large
+ 5 - 0
entry/src/main/resources/base/media/rgv_set_position.svg


File diff suppressed because it is too large
+ 4 - 0
entry/src/main/resources/base/media/rgv_start_charge.svg


File diff suppressed because it is too large
+ 4 - 0
entry/src/main/resources/base/media/rgv_stop_charge.svg


+ 3 - 0
entry/src/main/resources/base/media/rgv_subtraction.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path d="M5.5 25.177c-.828 0-1.5-.678-1.5-1.513 0-.835.672-1.513 1.5-1.513h37c.828 0 1.5.678 1.5 1.513 0 .835-.672 1.513-1.5 1.513h-37Z"/>
+</svg>

File diff suppressed because it is too large
+ 4 - 0
entry/src/main/resources/base/media/rgv_turn_off.svg


File diff suppressed because it is too large
+ 4 - 0
entry/src/main/resources/base/media/rgv_turn_on.svg


+ 3 - 1
entry/src/main/resources/base/profile/main_pages.json

@@ -5,6 +5,8 @@
     "pages/OrderMaterialsStorage",
     "pages/ProcessMaterialKit",
     "pages/Menu",
-    "pages/LittleMaterialsStorage"
+    "pages/LittleMaterialsStorage",
+    "pages/LittleMaterialOutBound",
+    "pages/RgvControl"
   ]
 }