cjb hace 3 semanas
padre
commit
26c2df4a78

+ 5 - 5
build-profile.json5

@@ -4,13 +4,13 @@
       {
         "name": "default",
         "material": {
-          "certpath": "C:/Users/cjb/.ohos/config/openharmony/default_HJ_openHarmony_wms_rQnzWoksJickD8RhCnzkUZTSF3iYKXeLwF00Sm7dv6A=.cer",
-          "storePassword": "0000001B6A9A1D67F230207CCC6D4DC1E6FC79E6F33AF532691BCD716FF4197BFB5C1C2222E1F08363BA64",
+          "certpath": "C:/Users/hjzx2/.ohos/config/openharmony/default_HJ_openHarmony_wms_6LSsbSXu9-Bq6Rc32LRcP_9tpSBQOaTwbid7WSbZjJ4=.cer",
+          "storePassword": "0000001BAC1B49306D753EB58F093BD20E79FCF96B0B253F19B01C6A867BBADFC36C8D06910F1CA9C0D7A6",
           "keyAlias": "debugKey",
-          "keyPassword": "0000001B6CF76A6E79831E0D2806322FFBC883E405FF7E8FBFBCFBFF7530C88AAD01B4C6799F194997688D",
-          "profile": "C:/Users/cjb/.ohos/config/openharmony/default_HJ_openHarmony_wms_rQnzWoksJickD8RhCnzkUZTSF3iYKXeLwF00Sm7dv6A=.p7b",
+          "keyPassword": "0000001BD8698B51BE1CDFE079D5BF51BA9A4081483DBC78BBA373F2D18D808237016992822066C1BBD88F",
+          "profile": "C:/Users/hjzx2/.ohos/config/openharmony/default_HJ_openHarmony_wms_6LSsbSXu9-Bq6Rc32LRcP_9tpSBQOaTwbid7WSbZjJ4=.p7b",
           "signAlg": "SHA256withECDSA",
-          "storeFile": "C:/Users/cjb/.ohos/config/openharmony/default_HJ_openHarmony_wms_rQnzWoksJickD8RhCnzkUZTSF3iYKXeLwF00Sm7dv6A=.p12"
+          "storeFile": "C:/Users/hjzx2/.ohos/config/openharmony/default_HJ_openHarmony_wms_6LSsbSXu9-Bq6Rc32LRcP_9tpSBQOaTwbid7WSbZjJ4=.p12"
         }
       }
     ],

+ 10 - 2
entry/src/main/ets/common/constants/CommonConstants.ets

@@ -18,8 +18,6 @@ export default class CommonConstants {
   static STATION_CODE: string = 'GW0002'
   static STATION_IP: string = ''
   static stationDictValue: string = ''
-
-  static MATERIAL_BOX_ID: string = ''
   // 是否是退出登陆
   static LOGIN_OUT: boolean = false
   static readonly STORAGE_TYPE: string[] = ['电子元器件', '电路板', '结构件', '辅助材料']
@@ -56,6 +54,16 @@ export default class CommonConstants {
       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 DICT_DATA: HashMap<string, DictValue[]> = new HashMap<string, DictValue[]>()

+ 0 - 151
entry/src/main/ets/common/util/AssistantSetModel.ets

@@ -1,151 +0,0 @@
-// import relationalStore from '@ohos.data.relationalStore';
-// import CommonConstants from '../../common/constants/CommonConstants';
-// import AssistantSet from '../AssistantSet';
-//
-// class AssistantSetModel {
-//
-//   private rdbStore: relationalStore.RdbStore | undefined=undefined
-//   private tableName: string = 'ASSISTANT_SET'
-//
-//   /**
-//    * 初始化表
-//    */
-//   async initTaskDB(context:Context){
-//     // 1.rdb配置
-//     const config = {
-//       name: CommonConstants.RDB_NAME,
-//       securityLevel: relationalStore.SecurityLevel.S1
-//     }as relationalStore.StoreConfig
-//     try {
-//       // 获取数据库存储对象
-//       this.rdbStore = await relationalStore.getRdbStore(context,config);
-//     } catch (err) {
-//       console.info(`getRdbStore err ${JSON.stringify(err)}`);
-//     }
-//     // 2.初始化SQL语句
-//     const sql = `CREATE TABLE IF NOT EXISTS ASSISTANT_SET (
-//                   ID INTEGER PRIMARY KEY AUTOINCREMENT,
-//                   USER_ID INTEGER NOT NULL,
-//                   VOICE_WAKE_UP INTEGER NOT NULL,
-//                   TIMBRE INTEGER NOT NULL,
-//                   WAKE_FREE INTEGER NOT NULL,
-//                   PROMPT_BROADCAST INTEGER NOT NULL,
-//                   VOICE_VOLUME INTEGER NOT NULL
-//                  )`
-//     // 3.获取rdb
-//     relationalStore.getRdbStore(context, config, (err, rdbStore) => {
-//       if(err){
-//         console.log('testTag', '获取rdbStore失败!')
-//         return
-//       }
-//       // 执行Sql
-//       rdbStore.executeSql(sql).then(()=>{
-//         console.log('testTag', '创建智汇助手表成功!')
-//       }).catch((err: object)=>{
-//         console.log('testTag', '创建失败')
-//       })
-//       // 保存rdbStore
-//       this.rdbStore = rdbStore
-//     })
-//   }
-//
-//   // 根据用户查询对应的智汇助手设置信息
-//   async getByUserId(userId: number): Promise<AssistantSet | undefined> {
-//     if (!userId) {
-//       return
-//     }
-//     // 1.构建查询条件
-//     let predicates = new relationalStore.RdbPredicates(this.tableName)
-//     predicates.equalTo('USER_ID', userId)
-//     predicates.limitAs(1)
-//     // 2.查询
-//     let result = await this.rdbStore?.query(predicates, ['ID', 'USER_ID', 'VOICE_WAKE_UP', 'TIMBRE', 'WAKE_FREE', 'PROMPT_BROADCAST', 'VOICE_VOLUME'])
-//     // 3.2.遍历封装 只取第一条
-//     while(result && !result?.isAtLastRow){
-//       // 3.3.指针移动到下一行
-//       result.goToNextRow()
-//       // 3.4.获取数据
-//       let id = result.getLong(result.getColumnIndex('ID'))
-//       let userId = result.getLong(result.getColumnIndex('USER_ID'))
-//       let voiceWakeUp = result.getLong(result.getColumnIndex('VOICE_WAKE_UP'))
-//       let timbre = result.getLong(result.getColumnIndex('TIMBRE'))
-//       let wakeFree = result.getLong(result.getColumnIndex('WAKE_FREE'))
-//       let promptBroadcast = result.getLong(result.getColumnIndex('PROMPT_BROADCAST'))
-//       let voiceVolume = result.getLong(result.getColumnIndex('VOICE_VOLUME'))
-//       return {id: id, userId: userId, voiceWakeUp: voiceWakeUp, timbre: timbre, wakeFree: wakeFree, promptBroadcast: promptBroadcast, voiceVolume: voiceVolume}
-//     }
-//     return
-//   }
-//
-//   /**
-//    * 查询智汇助手列表
-//    */
-//   async getAssistantSetList(){
-//     // 1.构建查询条件
-//     let predicates = new relationalStore.RdbPredicates(this.tableName)
-//     // 2.查询
-//     let result = await this.rdbStore?.query(predicates, ['ID', 'USER_ID', 'VOICE_WAKE_UP', 'TIMBRE', 'WAKE_FREE', 'PROMPT_BROADCAST', 'VOICE_VOLUME'])
-//     // 3.解析查询结果
-//     // 3.1.定义一个数组,组装最终的查询结果
-//     let AssistantSets: AssistantSet[] = []
-//     // 3.2.遍历封装
-//     while(result && !result?.isAtLastRow){
-//       // 3.3.指针移动到下一行
-//       result.goToNextRow()
-//       // 3.4.获取数据
-//       let id = result.getLong(result.getColumnIndex('ID'))
-//       let userId = result.getLong(result.getColumnIndex('USER_ID'))
-//       let voiceWakeUp = result.getLong(result.getColumnIndex('VOICE_WAKE_UP'))
-//       let timbre = result.getLong(result.getColumnIndex('TIMBRE'))
-//       let wakeFree = result.getLong(result.getColumnIndex('WAKE_FREE'))
-//       let promptBroadcast = result.getLong(result.getColumnIndex('PROMPT_BROADCAST'))
-//       let voiceVolume = result.getLong(result.getColumnIndex('VOICE_VOLUME'))
-//       // 3.5.封装到数组
-//       AssistantSets.push({id, userId, voiceWakeUp, timbre, wakeFree, promptBroadcast, voiceVolume})
-//     }
-//     return AssistantSets
-//   }
-//
-//   /**
-//    * 添加智汇助手
-//    * @param set 智汇助手设置信息
-//    * @returns 智汇助手id
-//    */
-//   addAssistantSet(set: AssistantSet): Promise<number> | undefined{
-//     return this.rdbStore?.insert(this.tableName, {USER_ID: set.userId, VOICE_WAKE_UP: set.voiceWakeUp, TIMBRE: set.timbre,
-//       WAKE_FREE: set.wakeFree, PROMPT_BROADCAST: set.promptBroadcast, VOICE_VOLUME: set.voiceVolume} as relationalStore.ValuesBucket)
-//   }
-//
-//   /**
-//    * 根据id更新智汇助手状态
-//    * @param set 智汇助手设置信息
-//    */
-//   updateAssistantSet(set: AssistantSet) {
-//       if (!set || !set.id) {
-//         return
-//       }
-//     // 1.要更新的数据
-//     let data:relationalStore.ValuesBucket | undefined = {VOICE_WAKE_UP: set.voiceWakeUp as number, TIMBRE: set.timbre as number, WAKE_FREE: set.wakeFree as number, PROMPT_BROADCAST: set.promptBroadcast as number, VOICE_VOLUME: set.voiceVolume as number}
-//     // 2.更新的条件
-//     let predicates = new relationalStore.RdbPredicates(this.tableName)
-//     predicates.equalTo('ID', set.id)
-//     // 3.更新操作
-//     return this.rdbStore?.update(data, predicates)
-//   }
-//
-//   /**
-//    * 根据id删除任务
-//    * @param id 任务id
-//    */
-//   deleteAssistantSetById(id: number){
-//     // 1.删除的条件
-//     let predicates = new relationalStore.RdbPredicates(this.tableName)
-//     predicates.equalTo('ID', id)
-//     // 2.删除操作
-//     return this.rdbStore?.delete(predicates)
-//   }
-// }
-//
-// let assistantSetModel = new AssistantSetModel();
-//
-// export default assistantSetModel as AssistantSetModel;

+ 0 - 158
entry/src/main/ets/common/util/UserAuthModel.ets

@@ -1,158 +0,0 @@
-import relationalStore from '@ohos.data.relationalStore';
-import CommonConstants from '../../common/constants/CommonConstants';
-import {UserAuthInfo } from '../../viewmodel/wms/UserInfo';
-
-class UserModel {
-
-  private rdbStore: relationalStore.RdbStore |undefined=undefined
-  private tableName: string = 'USER'
-
-  /**
-   * 初始化表
-   */
-  async initTaskDB(context:Context){
-    // 1.rdb配置
-    const config = {
-      name: CommonConstants.RDB_NAME,
-      securityLevel: relationalStore.SecurityLevel.S1
-    }as relationalStore.StoreConfig
-    try {
-      // 获取数据库存储对象
-      this.rdbStore = await relationalStore.getRdbStore(context,config);
-    } catch (err) {
-      console.info(`getRdbStore err ${JSON.stringify(err)}`);
-    }
-    // 2.初始化SQL语句
-    const sql = `CREATE TABLE IF NOT EXISTS USER (
-                  ID INTEGER PRIMARY KEY AUTOINCREMENT,
-                  USER_ID INTEGER NOT NULL,
-                  USER_NAME VARCHAR NOT NULL,
-                  PASSWORD VARCHAR NOT NULL,
-                  ORG_ID INTEGER NOT NULL,
-                  STATION_ID INTEGER NOT NULL,
-                  STATION_NAME VARCHAR NULL,
-                  STATION_DICE_VALUE VARCHAR NULL,
-                  AVATAR VARCHAR NULL,
-                  MAINTAIN_LOGIN_STATUS INTEGER NOT NULL,
-                  UPDATE_TIME INTEGER NOT NULL
-                 )`
-    // 3.获取rdb
-    relationalStore.getRdbStore(context, config, (err, rdbStore) => {
-      if(err){
-        console.log('testTag', '获取rdbStore失败!')
-        return
-      }
-      // 执行Sql
-      rdbStore.executeSql(sql).then(()=>{
-        console.log('testTag', '创建用户设置表成功!')
-      }).catch((err: object)=>{
-        console.log('testTag', '创建失败')
-      })
-      // 保存rdbStore
-      this.rdbStore = rdbStore
-    })
-  }
-
-  // 查询最后一次用户登录的数据
-  async getLast(): Promise<UserAuthInfo | undefined> {
-    // 1.构建查询条件
-    let predicates = new relationalStore.RdbPredicates(this.tableName)
-    predicates.orderByDesc('UPDATE_TIME')
-    predicates.limitAs(1)
-    // 2.查询
-    let result = await this.rdbStore?.query(predicates, ['ID', 'USER_ID', 'USER_NAME', 'PASSWORD', 'ORG_ID', 'STATION_ID', 'STATION_NAME', 'STATION_DICE_VALUE', 'AVATAR', 'MAINTAIN_LOGIN_STATUS', 'UPDATE_TIME'])
-    // 3.2.遍历封装 只取第一条
-    while(!result?.isAtLastRow){
-      // 3.3.指针移动到下一行
-      result?.goToNextRow()
-      // 3.4.获取数据
-      let id = result?.getLong(result?.getColumnIndex('ID'))
-      let userId = result?.getLong(result?.getColumnIndex('USER_ID'))
-      let userName = result?.getString(result?.getColumnIndex('USER_NAME'))
-      let password = result?.getString(result?.getColumnIndex('PASSWORD'))
-      let orgId = result?.getLong(result?.getColumnIndex('ORG_ID'))
-      let stationId = result?.getLong(result?.getColumnIndex('STATION_ID'))
-      let stationName = result?.getString(result?.getColumnIndex('STATION_NAME'))
-      let stationDictValue = result?.getString(result?.getColumnIndex('STATION_DICE_VALUE'))
-      let avatar = result?.getString(result?.getColumnIndex('AVATAR'))
-      let maintainLoginStatus = result?.getLong(result?.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
-      let updateTime = result?.getLong(result?.getColumnIndex('UPDATE_TIME'))
-      return {id: id, userId: userId, userName: userName, password: password, orgId: orgId, stationId: stationId, stationName: stationName, stationDictValue: stationDictValue, avatar: avatar, maintainLoginStatus: maintainLoginStatus, updateTime: updateTime}
-    }
-    return
-  }
-
-  // 查询最后一次用户登录的数据
-  async getByUserId(userId: number): Promise<UserAuthInfo | undefined> {
-    if (!userId) {
-      return
-    }
-    // 1.构建查询条件
-    let predicates = new relationalStore.RdbPredicates(this.tableName)
-    predicates.equalTo('USER_ID', userId)
-    predicates.orderByDesc('UPDATE_TIME')
-    predicates.limitAs(1)
-    // 2.查询
-    let result: relationalStore.ResultSet | undefined = await this.rdbStore?.query(predicates, ['ID', 'USER_ID', 'USER_NAME', 'PASSWORD', 'ORG_ID', 'STATION_ID', 'STATION_NAME', 'STATION_DICE_VALUE', 'AVATAR', 'MAINTAIN_LOGIN_STATUS', 'UPDATE_TIME'])
-    // 3.2.遍历封装 只取第一条
-    while(result && !result?.isAtLastRow){
-      // 3.3.指针移动到下一行
-      result.goToNextRow()
-      // 3.4.获取数据
-      let id = result.getLong(result.getColumnIndex('ID'))
-      let userId = result.getLong(result.getColumnIndex('USER_ID'))
-      let userName = result.getString(result.getColumnIndex('USER_NAME'))
-      let password = result.getString(result.getColumnIndex('PASSWORD'))
-      let orgId = result.getLong(result.getColumnIndex('ORG_ID'))
-      let stationId = result.getLong(result.getColumnIndex('STATION_ID'))
-      let stationName = result?.getString(result?.getColumnIndex('STATION_NAME'))
-      let stationDictValue = result?.getString(result?.getColumnIndex('STATION_DICE_VALUE'))
-      let avatar = result.getString(result.getColumnIndex('AVATAR'))
-      let maintainLoginStatus = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
-      let updateTime = result.getLong(result.getColumnIndex('UPDATE_TIME'))
-      return {id: id, userId: userId, userName: userName, password: password, orgId: orgId, stationId: stationId, stationName: stationName, stationDictValue: stationDictValue, avatar: avatar, maintainLoginStatus: maintainLoginStatus, updateTime: updateTime}
-    }
-    return
-  }
-
-  /**
-   * 添加用户设置
-   * @param user 用户信息
-   * @returns 用户信息id
-   */
-  addUser(user: UserAuthInfo): Promise<number> | undefined {
-    return this.rdbStore?.insert(this.tableName, {USER_ID: user.userId, USER_NAME: user.userName, PASSWORD: user.password, ORG_ID: user.orgId, STATION_ID: user.stationId, STATION_NAME: user.stationName, STATION_DICE_VALUE: user.stationDictValue, AVATAR: user.avatar, MAINTAIN_LOGIN_STATUS: user.maintainLoginStatus, UPDATE_TIME: user.updateTime} as relationalStore.ValuesBucket)
-  }
-
-  /**
-   * 根据id更新用户设置状态
-   * @param id 任务id
-   * @param finished 任务是否完成
-   */
-  updateUser(user: UserAuthInfo) {
-
-    // 1.要更新的数据
-    let data: relationalStore.ValuesBucket = {USER_ID: user.userId as number, USER_NAME: user.userName as string, PASSWORD: user.password as string, ORG_ID: user.orgId as number, STATION_ID: user.stationId as number, STATION_NAME: user.stationName as string, STATION_DICE_VALUE: user.stationDictValue as string, AVATAR: user.avatar as string, MAINTAIN_LOGIN_STATUS: user.maintainLoginStatus as number, UPDATE_TIME: user.updateTime as number}
-    // 2.更新的条件
-    let predicates = new relationalStore.RdbPredicates(this.tableName)
-    predicates.equalTo('ID', user.id)
-    // 3.更新操作
-    return this.rdbStore?.update(data, predicates)
-  }
-
-  /**
-   * 根据id删除任务
-   * @param id 任务id
-   */
-  deleteUserById(id: number){
-    // 1.删除的条件
-    let predicates = new relationalStore.RdbPredicates(this.tableName)
-    predicates.equalTo('ID', id)
-    // 2.删除操作
-    return this.rdbStore?.delete(predicates)
-  }
-}
-
-let userModel = new UserModel();
-
-export default userModel as UserModel;

+ 0 - 37
entry/src/main/ets/common/util/request/RequestInstance.ets

@@ -1,37 +0,0 @@
-// import UserInfo from '../../../model/UserInfo'
-// import RequestParamModel from '../../../viewmodel/RequestParamModel'
-// import JGRequest from './Request'
-//
-// const getToken = async (loginName: string, password: string, orgId: number, stationId: number): Promise<string> => {
-//   return await JGRequest.post("/api/auth/aioLogin", {
-//     userName: loginName,
-//     password: password,
-//     orgId: orgId,
-//     stationId: stationId,
-//   }as RequestParamModel)
-// }
-//
-// const getUserInfo = async (): Promise<UserInfo> => {
-//   return await JGRequest.get("/api/auth", {})
-// }
-//
-// export{getToken, getUserInfo}
-import {UserInfo} from '../../../viewmodel/wms/UserInfo'
-import RequestParamModel from '../../../viewmodel/wms/RequestParamModel'
-import WmsRequest from './WmsRequest'
-
-const getToken = async (loginName: string, password: string, orgId: number, stationId: string): Promise<string> => {
-  return await WmsRequest.post("/api/auth/aioLogin", {
-    userName: loginName,
-    password: password,
-    orgId: orgId,
-    stationId: stationId,
-  }as RequestParamModel)
-}
-
-const getUserInfo = async (): Promise<UserInfo> => {
-  return await WmsRequest.get("/api/auth", {})
-}
-
-export{getToken, getUserInfo}
-

+ 4 - 5
entry/src/main/ets/common/util/request/WmsRequest.ets

@@ -6,14 +6,12 @@ import axios, {
   CreateAxiosDefaults,
   InternalAxiosRequestConfig
 } from '@ohos/axios';
-import CommonConstants from '../../constants/CommonConstants';
 import { printError, printRequest, printResponse, handleRes } from './Helps';
 
 
 // jiaxiaoqiang:这里要改
-//const baseUrl = "http://192.168.1.3:11010/" //chuangke
-// const baseUrl = "http://192.168.1.174:8079"//huajing
-const baseUrl = "http://192.168.1.3:11010"//huajing
+const baseUrl = "http://192.168.1.3:11010/" //chuangke
+//const baseUrl = "http://192.168.1.174:8079"//huajing
 // const baseUrl = "http://192.168.1.4:8079/" //chuangke
 const DEBUG = true //
 
@@ -33,7 +31,7 @@ const WmsRequest = axios.create(
 WmsRequest.interceptors.request.use((config: InternalAxiosRequestConfig) => {
 
   // 以后登录之后可以在这里传
-   config.headers.Authorization = CommonConstants.AUTH_TOKEN
+  // config.headers.Authorization = CommonConstants.AUTH_TOKEN
   // config.headers.Authorization ="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOnsiaWQiOjM3LCJsb2dpblR5cGUiOiJhaW8ifSwiZGV2aWNlIjoiYWlvIiwiZWZmIjoxNzE3NTExMjYwODI4LCJyblN0ciI6InRSenNBTGdlZ3lqS0FHeDZTSkdYZTNLbFY3eWh1OG1PIn0.FVAeESiz_PH1NtBFDmGZr0IwtXzubV2d8JTQdGdJnxc"
   printRequest(config)
   return config;
@@ -46,6 +44,7 @@ WmsRequest.interceptors.request.use((config: InternalAxiosRequestConfig) => {
 
 // 添加响应拦截器
 WmsRequest.interceptors.response.use((response: AxiosResponse) => {
+  console.log("hhtest", "---------------------------")
   // 对响应数据做点什么
   printResponse(response)
   let res = handleRes(response)

+ 5 - 53
entry/src/main/ets/component/InBoundView.ets

@@ -7,9 +7,6 @@ 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'
-import {detailsListClass} from '../viewmodel/wms/InBoundOrderInfo'
-import {CommonConfirmDialog}from "../component/OrderMaterialsStorageView"
-import {ConfirmDialogParams} from "../params/OrderMaterialsStorageParams"
 @Component
 export struct InBoundView {
   @Prop messages: string[] = []
@@ -18,39 +15,14 @@ export struct InBoundView {
   @State putOutButtonClick :number = 1
   @State putInButtonClick :number = 1
   @State InboundButtonClick :number = 1
-  @State private boxMaterials: Array<detailsListClass> = []
   //料箱重量
   @State materialBoxWeight: number = 0
 
-  commonDialogController: CustomDialogController | null = null;
-  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,
-      maskColor: 'rgba(0,0,0,0.6)'
-    });
-
-    this.commonDialogController.open();
-  }
-
   Warehousing = async () => {
-    console.info("sssss"+this.materialBoxID)
     let res: MaterialBoxInfo[] = await WmsRequest.post("/api/v1/wmsOrder/inBox", {
       houseNo:'1',
       stanCode:CommonConstants.STATION_CODE,
-      vehicleCode:this.materialBoxID,
-      detailsList:this.boxMaterials
+      vehicleNo:this.materialBoxID
     } as RequestParamModel)
     console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
 
@@ -66,7 +38,7 @@ export struct InBoundView {
     emitter.on({
       eventId: EventId.MQTT_MESSAGE
       }, (eventData: emitter.EventData) => {
-      //this.materialBoxID = eventData?.data?.['rfid']
+      this.materialBoxID = eventData?.data?.['rfid']
       this.drawerPositionStatus = Number(eventData?.data?.['station2Set'])
       this.materialBoxWeight = Number(eventData?.data?.['station2Weight'])
     })
@@ -98,8 +70,6 @@ export struct InBoundView {
   }
   aboutToAppear(): void {
     this.refreshTag()
-    this.materialBoxID = CommonConstants.MATERIAL_BOX_ID
-    console.info("sssss"+this.materialBoxID)
   }
 
   aboutToDisappear(): void
@@ -205,14 +175,8 @@ export struct InBoundView {
           this.putOutButtonClick = 0.9; // 点击时缩小
           setTimeout(() => {
             this.putOutButtonClick = 1; // 0.2秒后恢复
-            this.showConfirmDialog({
-              title: '抽屉伸出',
-              message: `确定要抽屉伸出吗?`,
-              onConfirm: ()=> {
-                this.pushOut();
-              }
-            });
           }, 200);
+          this.pushOut()
         })
 
         Button({ type: ButtonType.Normal }) {
@@ -233,14 +197,8 @@ export struct InBoundView {
           this.putInButtonClick = 0.9; // 点击时缩小
           setTimeout(() => {
             this.putInButtonClick = 1; // 0.2秒后恢复
-            this.showConfirmDialog({
-              title: '抽屉缩回',
-              message: `确定要抽屉缩回吗?`,
-              onConfirm: () => {
-                this.pushIn();
-              }
-            })
           }, 200);
+          this.pushIn()
         })
       }
       .width('95%')
@@ -268,15 +226,9 @@ export struct InBoundView {
         this.InboundButtonClick = 0.9; // 点击时缩小
         setTimeout(() => {
           this.InboundButtonClick = 1; // 0.2秒后恢复
-          this.showConfirmDialog({
-            title: '入库确认',
-            message: `确定要${this.materialBoxID}料箱入库吗?`,
-            onConfirm: () => {
-              this.Warehousing();
-            }
-          })
         }, 200);
         // 按钮点击事件处理\
+        this.Warehousing();
       })
     }
     .width('100%')

+ 2 - 89
entry/src/main/ets/component/OrderMaterialsStorageView.ets

@@ -239,8 +239,8 @@ export struct BoxGrid {
     this.selectedMaterialIndex = -1
   }
 
-  @Link materialBoxes: MaterialBoxInfo[] ;
-  @Link emptyBoxes: MaterialBoxInfo[]
+  @Prop materialBoxes: MaterialBoxInfo[] = [];
+  @Prop emptyBoxes: MaterialBoxInfo[] = [];
   build() {
     Column() {
       if(this.isQueryMaterial){
@@ -643,91 +643,4 @@ export struct MaterialButton {
       })
     }
   }
-}
-
-@CustomDialog
-export struct RemindDialog {
-  controller: CustomDialogController
-  @Link remind: string
-  build() {
-    Column() {
-      Text(this.remind)
-        .fontColor($r('app.color.FFFFFF'))
-        .fontSize($r('app.float.fontSize_12'))
-    }
-    .backgroundColor($r('app.color.2A2A2A'))
-    .borderRadius($r('app.float.virtualSize_11_6'))
-    .justifyContent(FlexAlign.Center)
-    .width(300)
-    .height(50)
-  }
-}
-
-
-@CustomDialog
-export struct CommonConfirmDialog {
-  @State title: string = '提示'
-  @State message: string = '确定要执行此操作吗?'
-  @State confirmText: string = '确定'
-  @State cancelText: string = '取消'
-
-  controller: CustomDialogController
-  onConfirm: () => void = () => {}
-
-  build() {
-    Column() {
-      // 标题
-      Column(){
-        Text(this.title)
-          .fontColor($r('app.color.FFFFFF'))
-          .fontSize($r('app.float.fontSize_15_2'))
-      }.height('30%')
-      .justifyContent(FlexAlign.Center)
-      Column(){
-        Text(this.message)
-          .fontColor($r('app.color.30FFFFFF'))
-          .fontSize($r('app.float.fontSize_12'))
-      }.height('30%')
-      .justifyContent(FlexAlign.Center)
-
-      Column(){
-        Divider()
-          .vertical(false)
-          .strokeWidth(1)
-          .color($r('app.color.20FFFFFF'))
-        Row(){
-          Row(){
-            Text('取消')
-              .fontColor($r('app.color.60FFFFFF'))
-              .fontSize($r('app.float.fontSize_12'))
-          }
-          .justifyContent(FlexAlign.Center)
-          .width('50%')
-          .onClick(() => this.controller.close())
-          Divider()
-            .vertical(true)
-            .strokeWidth(1)
-            .color($r('app.color.20FFFFFF'))
-          Row(){
-            Text('确认')
-              .fontColor($r('app.color.007AFF'))
-              .fontSize($r('app.float.fontSize_12'))
-          }
-          .justifyContent(FlexAlign.Center)
-          .width('50%')
-          .onClick(() => {
-            this.onConfirm();
-            this.controller.close();
-          })
-        }
-      }
-      .width('100%')
-      .height('30%')
-    }
-    .height(200)
-    .width(400)
-    .backgroundColor($r('app.color.2A2A2A'))
-    .justifyContent(FlexAlign.End)
-    .borderRadius(16)
-  }
 }

+ 21 - 22
entry/src/main/ets/component/RgvControlView.ets

@@ -236,6 +236,25 @@ export struct CommonConfirmDialog {
       }
       .width('100%')
       .height('30%')
+      // // 按钮区域
+      // 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 })
     }
     .height(200)
     .width(400)
@@ -250,21 +269,19 @@ export struct CommonConfirmDialog {
 export struct MoveDialog {
   @Link rgvEndX: number
   @Link rgvEndY: number
-  @Prop title : string = ''
-  @Prop info : string = ''
   controller: CustomDialogController
   onConfirm: () => void = () => {}
 
   build() {
     Column() {
       Column(){
-        Text(this.title)
+        Text('终点移动')
           .fontColor($r('app.color.FFFFFF'))
           .fontSize($r('app.float.fontSize_15_2'))
       }.height('30%')
       .justifyContent(FlexAlign.Center)
 
-      Text(this.info)
+      Text('设置终点坐标')
         .fontColor($r('app.color.FFFFFF'))
         .fontSize($r('app.float.fontSize_8'))
         .width('70%')
@@ -386,21 +403,3 @@ export struct MoveDialog {
     .borderRadius($r('app.float.virtualSize_11_6'))
   }
 }
-
-@CustomDialog
-export struct RemindDialog {
-  controller: CustomDialogController
-  @Link remind: string
-  build() {
-    Column() {
-      Text(this.remind)
-        .fontColor($r('app.color.FFFFFF'))
-        .fontSize($r('app.float.fontSize_12'))
-    }
-    .backgroundColor($r('app.color.2A2A2A'))
-    .borderRadius($r('app.float.virtualSize_11_6'))
-    .justifyContent(FlexAlign.Center)
-    .width(300)
-    .height(50)
-  }
-}

+ 1 - 25
entry/src/main/ets/pages/Menu.ets

@@ -8,10 +8,6 @@ import PageRes from "../viewmodel/wms/InBoundOrderInfo"
 import router from '@ohos.router';
 import MqttManager from '../common/util/mqtt';
 import { MqttClientOptions, MqttConnectOptions } from '@ohos/mqtt';
-import CommonConstants from '../common/constants/CommonConstants'
-import DictInfo from '../viewmodel/DictInfo'
-import connection from '@ohos.net.connection';
-
 const TAG: string = 'MENU'
 @Entry
 @Component
@@ -67,29 +63,9 @@ struct menu {
     this.loadOrders(1, this.inBoundOrders)
     this.loadOrders(2, this.outBoundOrders)
     this.connectMQTT();
-
-    // 查询数据字典放到CommonConstants的DICT_DATA变量中
-    let res: DictInfo[] = await WmsRequest.post('/api/v1/sys/dictData/all',)
-    if (res && res.length > 0) {
-      for (const dict of res) {
-        CommonConstants.DICT_DATA.set(dict.dictCode, dict.list)
-      }
-    }
-    try {
-      const netHandle = connection.getDefaultNetSync();
-      if (netHandle) {
-        let connectionProperties = await connection.getConnectionProperties(netHandle)
-        if (connectionProperties && connectionProperties.linkAddresses) {
-          connectionProperties.linkAddresses.forEach((address: connection.LinkAddress, index: number) => {
-            console.info('hhtest', "get address info: " + JSON.stringify(address));
-          })
-        }
-      }
-    } catch (err) {
-      console.log('hhtest', err);
-    }
   }
 
+
   build() {
     Row() {
       Column() {

+ 23 - 95
entry/src/main/ets/pages/RgvControl.ets

@@ -5,7 +5,7 @@ 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,RemindDialog,MoveControllerButton,CommonConfirmDialog,MoveDialog}from "../component/RgvControlView"
+import {RgvButton,RobotSelector,MoveControllerButton,CommonConfirmDialog,MoveDialog}from "../component/RgvControlView"
 import {RobotInfo,RgvInfo,ErrorMessage,RequestParam,ConfirmDialogParams,RobotSingleMovePost} from "../params/RobotsParam"
 import CommonConstants from '../common/constants/CommonConstants'
 const TAG: string = 'RGV'
@@ -31,68 +31,35 @@ struct RgvControl {
   @State rgvBatteryLevel  : string = ""
   @State rgvCurrentStatus: string = ""
   @State rgvInfoInterval: number = 0;
-  @State reminds:string='1'
 
   commonDialogController: CustomDialogController | null = null;
-  remindController: CustomDialogController = new CustomDialogController({
-    builder: RemindDialog({
-      remind: this.reminds,}
-    ),
-    customStyle: true,
-    maskColor: 'rgba(0,0,0,0.6)',
-    autoCancel:false
-  })
   // rgv开机
   executePowerOn = async()=>{
     try {
-      this.reminds = '机器人开机中,请稍后....'
-      this.remindController.open()
       // 第一步:开启电机
       let res: object= await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/rgvPowerOn', {
         rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
-        option: 'mcu'
+        option: 'motor'
       } as RequestParam);
       console.log(TAG,'电机启动:' + res.toString());
 
-      await delayExecution(async () => {
-        this.remindController.close()
-        let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/' + this.robotsList[this.selectRobotIndex].robotCode, {}) as RgvInfo
-        console.log('小车开机http:' + JSON.stringify(res))
-        if(res) {
-          if(res.x != res.rx || res.y != res.ry)
-          {
-            this.reminds = "小车位置错误,请重新设置!"
-            AlertDialog.show({
-              title: "小车异常",
-              message: this.reminds,
-              confirm: {
-                value: "确定",
-                action: () => {
-
-                }
-              }
-            });
-          }
-        }
-      }, 3000);
-
       // 第二步:延迟 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);
+      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);
+      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(TAG,'开机流程失败:', error);
@@ -101,8 +68,6 @@ struct RgvControl {
   // rgv关机
   executeShutdown=async()=>{
     try {
-      this.reminds = '机器人关机中,请稍后....'
-      this.remindController.open()
       let res: object = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/TurnChargingSwitch', {
         rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
         option: 'off'
@@ -134,7 +99,7 @@ struct RgvControl {
         } as RequestParam);
         console.log(TAG,'MCU 关闭:' + res.toString());
       }, 5000);
-      this.remindController.close()
+
     } catch (error) {
       console.error(TAG,'关机流程失败:', error);
     }
@@ -230,19 +195,6 @@ struct RgvControl {
     }
   }
 
-  //设置小车位置
-  executeSetPosition = async()=>{
-    try {
-      let res: object = await RobotErrorHandleRequest.post('/api/v1/wcs/rgv/newposition', {
-        rgvNo: this.robotsList[this.selectRobotIndex].robotCode,
-        x: this.rgvEndX.toString(),
-        y: this.rgvEndY.toString()
-      } as RequestParam)
-    } catch (error) {
-      console.error(TAG,'终点移动位置:', error);
-    }
-  }
-
   //位移移动
   executeAxisMove = async () => {
     try {
@@ -311,12 +263,10 @@ struct RgvControl {
     this.commonDialogController.open();
   }
 
-  endMoveDialog: CustomDialogController = new CustomDialogController({
+  dialogController: CustomDialogController = new CustomDialogController({
     builder: MoveDialog({
       rgvEndX:this.rgvEndX,
       rgvEndY:this.rgvEndY,
-      title:"终点移动",
-      info:"设置终点坐标",
       onConfirm: () => { this.executeEndMove()}
     }),
     cancel: () => console.log('弹窗关闭'),
@@ -325,20 +275,6 @@ struct RgvControl {
     maskColor: 'rgba(0,0,0,0.8)',  // 黑色遮罩
   })
 
-  settingPositionDialog: CustomDialogController = new CustomDialogController({
-    builder: MoveDialog({
-      title:"当前位置",
-      info:"设置当前坐标",
-      rgvEndX:this.rgvEndX,
-      rgvEndY:this.rgvEndY,
-      onConfirm: () => { this.executeSetPosition()}
-    }),
-    cancel: () => console.log('弹窗关闭'),
-    autoCancel: true, // 点击遮罩关闭
-    customStyle: true,
-    maskColor: 'rgba(0,0,0,0.8)',  // 黑色遮罩
-  })
-
   loadRgvSelection=()=>{
     if (this.robotsList && this.robotsList.length > 0) {
       for (const robot of this.robotsList ) {
@@ -437,18 +373,10 @@ struct RgvControl {
                 .objectFit(ImageFit.Contain)
                 .interpolation(ImageInterpolation.High)
               //.fillColor($r('app.color.0A84FF'))
-              Column(){
-                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'))
-                  .onClick(()=>{
-                    this.settingPositionDialog.open();
-                  })
-                Text('设置小车位置')
-                  .fontColor($r('app.color.FFFFFF'))
-                  .fontSize($r('app.float.fontSize_8'))
-              }
+              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%')
@@ -700,7 +628,7 @@ struct RgvControl {
                 text:"终点移动",
                 icon:$r('app.media.rgv_end_position'),
                 onButtonClick: () => {
-                  this.endMoveDialog.open()
+                  this.dialogController.open()
                 }
               }).height('16%').width('80%')
             }.height('48%')

+ 0 - 7
entry/src/main/ets/params/OrderMaterialsStorageParams.ets

@@ -42,11 +42,4 @@ export interface EmptyBox {
   position: string
 }
 
-export interface ConfirmDialogParams {
-  title?: string
-  message: string
-  confirmText?: string
-  cancelText?: string
-  onConfirm: () => void
-}
 

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

@@ -26,8 +26,6 @@ export  class RgvInfo{
   id?:string
   x?:string
   y?:string
-  rx?:string
-  ry?:string
   status?:string
   auto?:string
   dx?:string

+ 1 - 1
entry/src/main/ets/view/wms/OperationMaterialKitTwoStep.ets

@@ -33,7 +33,7 @@ export struct OperationMaterialKitTwoStep {
         let houseNo = ''
         for (const element of this.houseStocks) {
           if (this.selectVehicleCode === element.vehicleCode) {
-            houseNo = element.houseNo
+            houseNo = element.houseNo?element.houseNo:""
           }
         }
         let res: VehicleInfo = await WmsRequest.post("/api/v1/wmsOrder/outBox", {

+ 1 - 12
entry/src/main/ets/view/wms/OrderMaterialStorageFirstStep.ets

@@ -33,7 +33,6 @@ export struct OrderMaterialStorageFirstStep {
   @Link selectWorkOrder: WorkOrderInfo
 
   @State workOrderArray: WorkOrderInfo[] = []
-  @State nextStepButtonClick:number =1
 
   loadWorkOrders = async () => {
     this.workOrderArray = await WmsRequest.post('/api/v1/plan/workOrder/list', {
@@ -42,7 +41,6 @@ export struct OrderMaterialStorageFirstStep {
   }
   aboutToAppear(): void {
     this.loadWorkOrders();
-    this.selectWorkOrder = {}
   }
 
 
@@ -95,17 +93,8 @@ export struct OrderMaterialStorageFirstStep {
       .backgroundColor(this.selectWorkOrder.orderCode ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
       .borderRadius($r('app.float.virtualSize_6_4'))
       .enabled(!!this.selectWorkOrder.orderCode ) // 只有选中订单时才启用按钮
-      .scale({ x: this.nextStepButtonClick, y: this.nextStepButtonClick })
-      .animation({
-        duration: 200,
-        curve: Curve.Linear  // 弹性曲线更生动
-      })
       .onClick(() => {
-        this.nextStepButtonClick = 0.9;
-        setTimeout(() => {
-          this.nextStepButtonClick = 1;
-          this.currentStep = 2;
-        }, 200);
+        this.currentStep = 2;
       })
     }.height('83.6%').margin({top:'3%'}).width('100%')
     .justifyContent(FlexAlign.SpaceAround)

+ 17 - 118
entry/src/main/ets/view/wms/OrderMaterialStorageSecondStep.ets

@@ -1,16 +1,11 @@
-import {SingleOrder,BoxGrid,RemindDialog} from "../../component/OrderMaterialsStorageView"
+import {SingleOrder,BoxGrid} from "../../component/OrderMaterialsStorageView"
 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'
-import emitter from '@ohos.events.emitter';
-import {EventId} from '../../common/util/mqtt';
-import {RgvInfo} from "../../params/RobotsParam"
-import {CommonConfirmDialog}from "../../component/OrderMaterialsStorageView"
-import {ConfirmDialogParams} from "../../params/OrderMaterialsStorageParams"
-import RobotErrorHandleRequest from '../../common/util/request/RobotErrorHandleRequest'
+
 
 @Component
 export struct OrderMaterialStorageSecondStep {
@@ -19,33 +14,9 @@ export struct OrderMaterialStorageSecondStep {
   @State scanCodeValue:string = ''
   @State selectedMaterialBox: MaterialBoxInfo = {};
   @State outBoundButtonClick :number = 1
-  @State nextStepButtonClick:number = 1
-  @State preStepButtonClick:number = 1
   @State isQueryMaterial: boolean = false
   @State emptyBoxes: MaterialBoxInfo[] = []
   @State materialBoxes: MaterialBoxInfo[] = []
-  @State materialBoxWeight: number = 0
-  @State reminds:string='1'
-  @State drawerPositionStatus: number = 1
-
-  refreshTag=()=>{
-    emitter.on({
-      eventId: EventId.MQTT_MESSAGE
-    }, (eventData: emitter.EventData) => {
-      //this.materialBoxID = eventData?.data?.['rfid']
-      this.drawerPositionStatus = Number(eventData?.data?.['station2Set'])
-      this.materialBoxWeight = Number(eventData?.data?.['station2Weight'])
-    })
-  }
-
-  remindController: CustomDialogController = new CustomDialogController({
-    builder: RemindDialog({
-      remind: this.reminds,}
-    ),
-    customStyle: true,
-    maskColor: 'rgba(0,0,0,0.6)',
-    autoCancel:false
-  })
   getStoreList = async () => {
     let res: MaterialListInformation[] = await WmsRequest.post("/api/v1/stock/mergeList", {
       houseType: "1",
@@ -69,69 +40,23 @@ export struct OrderMaterialStorageSecondStep {
     this.emptyBoxes = res;
     console.info( "qqqqq"+JSON.stringify(res))
   }
-  commonDialogController: CustomDialogController | null = null;
-  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,
-      maskColor: 'rgba(0,0,0,0.6)'
-    });
-
-    this.commonDialogController.open();
-  }
 
   boxOutBound = async () => {
-    try {
-      const res: outBoxClass = await WmsRequest.post("/api/v1/wmsOrder/outBox", {
-        houseNo: this.selectedMaterialBox?.houseNo,
-        vehicleNo: this.selectedMaterialBox?.vehicleCode,
-        stanCode: CommonConstants.STATION_CODE
-      } as RequestParamModel);
-      this.reminds="正在出库中,请稍等..."
-      this.remindController.open()
-      const checkInterval = setInterval(() => {
-        if (this.materialBoxWeight > 0) {
-          clearInterval(checkInterval);  // 停止轮询
-          this.getEmptyBox();
-          this.remindController.close(); // 关闭弹窗
-        }
-      }, 500); // 每500毫秒检查一次
-      // 成功后的刷新逻辑
-    } catch (error) {
-      console.error("出库操作失败:", error);
-      promptAction.showToast({
-        message: "出库失败,请重试",
-        duration: 1800,
-        bottom: '5%'
-      });
-    }
+    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%'
+    })
   }
 
-  async queryRgvInfo(): Promise<boolean> {
-    let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/rgv1', {}) as RgvInfo;
-    if (res) {
-      if (res.status != '0' || res.x != res.rx || res.y != res.ry) {
-        return false;
-      }
-      return true; // 如果条件不满足,返回 true
-    }
-    return false; // 如果 res 为 null 或 undefined,返回 false
-  }
 
   aboutToAppear(): void {
      this.getEmptyBox()
-    this.refreshTag();
   }
   build() {
     Column(){
@@ -258,17 +183,8 @@ export struct OrderMaterialStorageSecondStep {
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
         // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
-        .scale({ x: this.preStepButtonClick, y: this.preStepButtonClick })
-        .animation({
-          duration: 200,
-          curve: Curve.Linear  // 弹性曲线更生动
-        })
         .onClick(() => {
-          this.preStepButtonClick = 0.9;
-          setTimeout(() => {
-            this.preStepButtonClick = 1;
-            this.currentStep = 1;
-          }, 200);
+          this.currentStep = 1;
         })
         Button({type:ButtonType.Normal}) {
           Text("料箱出库")
@@ -287,19 +203,11 @@ export struct OrderMaterialStorageSecondStep {
           curve: Curve.Linear  // 弹性曲线更生动
         })
         .onClick(() => {
-          this.outBoundButtonClick = 0.9;
+          this.outBoundButtonClick = 0.9; // 点击时缩小
           setTimeout(() => {
-            this.outBoundButtonClick = 1;
-            this.showConfirmDialog({
-              title: '料箱出库',
-              message: `确定要${this.selectedMaterialBox.vehicleCode}料箱出库吗?`,
-              onConfirm: ()=> {
-                this.boxOutBound();
-              }
-            });
-            CommonConstants.MATERIAL_BOX_ID = this.selectedMaterialBox.vehicleCode?this.selectedMaterialBox.vehicleCode:""
-            console.info("rgvs"+CommonConstants.MATERIAL_BOX_ID)
+            this.outBoundButtonClick = 1; // 0.2秒后恢复
           }, 200);
+         this.boxOutBound();
         })
         Button({type:ButtonType.Normal}) {
           Text("下一步")
@@ -311,17 +219,8 @@ export struct OrderMaterialStorageSecondStep {
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
         // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
-        .scale({ x: this.nextStepButtonClick, y: this.nextStepButtonClick })
-        .animation({
-          duration: 200,
-          curve: Curve.Linear  // 弹性曲线更生动
-        })
         .onClick(() => {
-          this.nextStepButtonClick = 0.9;
-          setTimeout(() => {
-            this.nextStepButtonClick = 1;
-            this.currentStep = 3;
-          }, 200);
+          this.currentStep = 3;
         })
 
       }.width('100%').height('6%').justifyContent(FlexAlign.End).margin({bottom:'3%',right:'5%'})

+ 2 - 22
entry/src/main/ets/view/wms/OrderMaterialStorageThirdStep.ets

@@ -14,8 +14,6 @@ export struct OrderMaterialStorageThirdStep {
     // { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
     // { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
   ]
-  @State firstStepButtonClick:number = 1
-  @State preStepButtonClick:number = 1
   build() {
     Column(){
       Row(){
@@ -80,17 +78,8 @@ export struct OrderMaterialStorageThirdStep {
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
         // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
-        .scale({ x: this.firstStepButtonClick, y: this.firstStepButtonClick })
-        .animation({
-          duration: 200,
-          curve: Curve.Linear  // 弹性曲线更生动
-        })
         .onClick(() => {
-          this.firstStepButtonClick = 0.9;
-          setTimeout(() => {
-            this.firstStepButtonClick = 1;
-            this.currentStep = 1;
-          }, 200);
+          this.currentStep = 1;
         })
         Button({type:ButtonType.Normal}) {
           Text("上一步")
@@ -102,17 +91,8 @@ export struct OrderMaterialStorageThirdStep {
         .backgroundColor($r('app.color.20FFFFFF'))
         .borderRadius($r('app.float.virtualSize_6_4'))
         // .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
-        .scale({ x: this.preStepButtonClick, y: this.preStepButtonClick })
-        .animation({
-          duration: 200,
-          curve: Curve.Linear  // 弹性曲线更生动
-        })
         .onClick(() => {
-          this.preStepButtonClick = 0.9;
-          setTimeout(() => {
-            this.preStepButtonClick = 1;
-            this.currentStep = 2;
-          }, 200);
+          this.currentStep = 2;
         })
       }.width('100%').height('6%').justifyContent(FlexAlign.Start).margin({bottom:'3%',left:'5%'})
     }.height('83.6%').margin({top:'3%'}).width('100%')

+ 0 - 29
entry/src/main/ets/viewmodel/wms/InBoundOrderInfo.ets

@@ -36,32 +36,3 @@ interface Records{
   updator: string;
   vehicleCode: string;
 }
-
-export interface detailsListClass {
-  index?:number
-  //产品规格
-  spec?:string
-  //	物料名称
-  materialName?:string
-  //物料编码
-  materialNo?: string
-  //	序列号
-  seqNo?: string
-  //储位坐标
-  coordinate?:string
-  //仓库编号
-  houseNo?:string
-  //储位编号
-  locationNo?:string
-  //单位
-  unit?:string
-  //数量
-  num?:number
-  //批次号
-  batchCode?:string
-  //载具编号
-  vehicleCode?:string
-  position?:string
-  housetype?:string
-
-}

+ 0 - 51
entry/src/main/ets/viewmodel/wms/UserInfo.ets

@@ -1,51 +0,0 @@
-// 用户信息
-export  class UserInfo {
-  // id
-  id?: number;
-  // 仓储id
-  userId?: number;
-  // 用户名
-  userName?: string;
-  // 登录密码
-  password?: string;
-  // 组织id
-  orgId?: number;
-  // 工位id
-  stationId?: number;
-  // 用户头像
-  avatar?: string
-  // 保持登录状态(1:是 2:否)
-  maintainLoginStatus?: number;
-  // 更新时间戳
-  updateTime?: number;
-  stationCode?: string
-  stationIp?: string
-}
-
-// 用户登陆信息
-export  class UserAuthInfo {
-  // id
-  id?: number;
-  // 仓储id
-  userId?: number;
-  // 用户名
-  userName?: string;
-  // 登录密码
-  password?: string;
-  // 组织id
-  orgId?: number;
-  // 工位id
-  stationId?: number;
-  // 工位名称
-  stationName?: string;
-  // 维护站类型
-  stationDictValue?: string;
-  // 保持登录状态(1:是 2:否)
-  maintainLoginStatus?: number;
-  // 更新时间戳
-  updateTime?: number;
-  // 用户头像
-  avatar?: string;
-
-  isLogin?:boolean //是否是登录的状态
-}