cjb 3 тижнів тому
батько
коміт
ad08ac16fd

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

@@ -13,7 +13,7 @@ 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:8079"//huajing
+const baseUrl = "http://192.168.1.3:20010"//huajing
 // const baseUrl = "http://192.168.1.4:8079/" //chuangke
 const DEBUG = true //
 

+ 2 - 2
entry/src/main/ets/component/InBoundView.ets

@@ -25,7 +25,7 @@ export struct InBoundView {
   //入库按钮缩放
   @State InboundButtonClick :number = 1
   //入库料箱物料表
-  @State private boxMaterials: Array<detailsListClass> = []
+  @Prop private boxMaterials: Array<MaterialBoxInfo> = []
   //弹窗提示内容
   @State reminds:string = ''
   //全局变量 料箱重量
@@ -79,7 +79,7 @@ export struct InBoundView {
       detailsList:this.boxMaterials
     } as RequestParamModel)
     console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
-
+    this.boxMaterials = []
     promptAction.showToast({
       message: '请求成功,业务处理中。。。',
       duration: 2000,

+ 3 - 1
entry/src/main/ets/component/OrderMaterialsStorageView.ets

@@ -234,6 +234,7 @@ export struct BoxGrid {
   @State selectedEmptyIndex: number = -1     // 空箱选中索引
   @Link isQueryMaterial : boolean
   @Link selectedMaterialBox : MaterialBoxInfo
+  @Prop isQueryEmpty:boolean =true
 
   // 独立的选择回调
   private onSelectMaterial(index: number) {
@@ -309,6 +310,7 @@ export struct BoxGrid {
             .backgroundColor(index === this.selectedMaterialIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')) // 选中状态加深
             .borderRadius($r('app.float.virtualSize_9_6'))
             .padding(8)
+            .height(this.isQueryEmpty?'50%':'25%')
             .border({
               width: 2,
               color: index === this.selectedMaterialIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')
@@ -326,7 +328,7 @@ export struct BoxGrid {
         .columnsGap(10) // 移除网格内部列间距
         .rowsGap(10) // 移除网格内部行间距
         .width('100%') // 确保填满父容器
-        .height('48%')
+        .height(this.isQueryEmpty?'48%':'96%')
         .padding(10)
 
         Divider()

+ 236 - 36
entry/src/main/ets/pages/LittleMaterialsStorage.ets

@@ -1,26 +1,43 @@
 /*
  * 零星物料入库
  * */
-import {ProcessFlow,BoxGrid,MaterialListComponent} from "../component/OrderMaterialsStorageView"
+import {ProcessFlow,BoxGrid,MaterialListComponent,RemindDialog} from "../component/OrderMaterialsStorageView"
 import {OrderParams,MaterialBox, EmptyBox} from "../params/OrderMaterialsStorageParams"
 import router from '@ohos.router';
+import RobotErrorHandleRequest from '../common/util/request/RobotErrorHandleRequest'
+import RequestParamModel from '../viewmodel/wms/RequestParamModel'
+import {CommonConfirmDialog}from "../component/OrderMaterialsStorageView"
+import {ConfirmDialogParams} from "../params/OrderMaterialsStorageParams"
+import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
+import CommonConstants from '../common/constants/CommonConstants'
+import WmsRequest from '../common/util/request/WmsRequest'
+import {RgvInfo} from "../params/RobotsParam"
 import {NavigationBar} from '../component/NavigationBar'
 import {TimeAndTitle} from "../component/TimeAndTitle"
 import {InBoundView} from '../component/InBoundView'
-import {MaterialListInformation,MaterialBoxInfo} from '../params/MaterialInformationParam'
+import {outBoxClass,materialsInfo,MaterialBoxInfo} from '../params/MaterialInformationParam'
+const TAG = 'LittleMaterialInbound';
 @Entry
 @Component
 struct LittleMaterialsStorage{
   @State materialNum:number=0
   @State currentStep: number = 1;
   @State emptyBoxes: MaterialBoxInfo[] = []
+  @State scanBoxValue:string = ''
+  @State scanMaterialValue:string = ''
   @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[]= [
+  @State queryMaterialBoxNum:number = 0
+  @State ScanMaterialList:WorkOrderInfo[] = []
+  @State reminds:string=''
+  @State queryTargetMaterial:materialsInfo={}
+  @StorageLink('materialBoxWeight') materialBoxWeight: number =0;
+  @StorageLink('drawerPositionStatus') drawerPositionStatus: number=1 ;
+  @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%' },
@@ -28,6 +45,131 @@ struct LittleMaterialsStorage{
     { orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
     { orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
   ]
+  remindController: CustomDialogController = new CustomDialogController({
+    builder: RemindDialog({
+      remind: this.reminds,}
+    ),
+    customStyle: true,
+    maskColor: 'rgba(0,0,0,0.6)',
+    //autoCancel:false
+  })
+
+
+
+  //扫描物料编码
+  ScanMaterialCode = async (itemCode: string) => {
+    try{
+      this.scanMaterialValue = ""
+      let res: WorkOrderInfo = await WmsRequest.post("/api/v1/process/circulation/material", {
+        label: `BM${itemCode};18*18*1-6;SL50;20240111` //"#gys022#sc022#100#20220929#31"
+      } as RequestParamModel)
+
+      // 验证1:检查是否已在扫描列表中
+      const isDuplicate = this.ScanMaterialList.some(
+        item => item.materialCode === res.materialCode
+      );
+      if (isDuplicate) {
+        console.warn(`物料 ${res.materialCode} 已存在,无法重复添加`);
+        this.reminds="物料已存在!"
+        this.remindController.open()
+        setTimeout(() => {
+          this.remindController.close();
+        }, 2000);
+        return
+      }
+      this.ScanMaterialList = [...this.ScanMaterialList, res];
+      this.materialNum = this.ScanMaterialList.length; // 更新物料数量统计
+    }catch (err) {
+      console.error(TAG, `http ScanMaterialCode failed: ${JSON.stringify(err)}`);
+    }
+  }
+
+  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
+  }
+
+  getMaterialBoxList = async (currentMaterialNo: string) => {
+    this.queryTargetMaterial = {}
+    this.queryMaterialBoxNum = 0
+    this.scanBoxValue = ''
+    this.materialBoxes = await WmsRequest.post("/api/v1/stock/groupList", {
+      materialNo: currentMaterialNo,
+    } as RequestParamModel);
+    if (this.materialBoxes.length == 0) {
+      this.reminds = "无当前物料料箱!"
+      this.remindController.open()
+      setTimeout(() => {
+        this.remindController.close();
+      }, 2000); // 2000毫秒 = 2秒
+    } else {
+      this.isQueryMaterial = true;
+      this.queryMaterialBoxNum = this.materialBoxes.length
+      if (this.materialBoxes[0]?.materials) {
+        this.queryTargetMaterial = this.materialBoxes[0].materials.find(
+          (material) => material.materialNo === currentMaterialNo
+        ) || {} as materialsInfo; // 如果找不到就使用空对象
+      }
+    }
+  }
+
+  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,
+      autoCancel:false,
+      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毫秒检查一次
+      setTimeout(() => {
+        clearInterval(checkInterval);
+      }, 300000);
+    } catch (error) {
+      this.reminds="出库失败..."
+      this.remindController.open()
+      setTimeout(() => {
+        this.remindController.close();
+      }, 2000);
+    }
+  }
+
   build() {
     Row() {
       Column() {
@@ -98,13 +240,19 @@ struct LittleMaterialsStorage{
                       .fillColor($r('app.color.FFFFFF'))
                       .margin({left:'2%'})
                     // 扫码输入框
-                    TextInput({ placeholder: '请扫描物料编码' })
+                    TextInput({ text:this.scanBoxValue,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'))
                       .enableKeyboardOnFocus(false)
+                      .onSubmit(() => {
+                        this.getMaterialBoxList(this.scanBoxValue)
+                      })
+                      .onChange((value: string) => {
+                        this.scanBoxValue = value
+                      })
                   }
                   .margin({top:'3%'})
                   .height('8%')
@@ -125,26 +273,29 @@ struct LittleMaterialsStorage{
                       .height($r('app.float.virtualSize_23'))
                       .fillColor($r('app.color.FFFFFF'))
                     Column({space:5}){
-                      Text('DIANLUBANPCBAADD123124114232423ASD')
-                        .fontSize($r('app.float.fontSize_12'))
-                        .fontColor($r('app.color.0A84FF'))
-                        .textAlign(TextAlign.Start)
-                        .width('100%')
-                      Text('产品型号:12322221232321222332211233')
-                        .fontSize($r('app.float.fontSize_8'))
-                        .fontColor($r('app.color.0A84FF'))
-                        .textAlign(TextAlign.Start)
-                        .width('100%')
-                      Text('序列号:123254213452465346346456')
-                        .fontSize($r('app.float.fontSize_8'))
-                        .fontColor($r('app.color.0A84FF'))
-                        .textAlign(TextAlign.Start)
-                        .width('100%')
-                      Text('数量:10个')
-                        .fontSize($r('app.float.fontSize_8'))
-                        .fontColor($r('app.color.0A84FF'))
-                        .textAlign(TextAlign.Start)
-                        .width('100%')
+                      if(this.isQueryMaterial)
+                      {
+                        Text(this.queryTargetMaterial.materialName)
+                          .fontSize($r('app.float.fontSize_12'))
+                          .fontColor($r('app.color.0A84FF'))
+                          .textAlign(TextAlign.Start)
+                          .width('100%')
+                        Text(`型号:${this.queryTargetMaterial.materialNo}`)
+                          .fontSize($r('app.float.fontSize_8'))
+                          .fontColor($r('app.color.0A84FF'))
+                          .textAlign(TextAlign.Start)
+                          .width('100%')
+                        Text(`序列号:${this.queryTargetMaterial.spec}`)
+                          .fontSize($r('app.float.fontSize_8'))
+                          .fontColor($r('app.color.0A84FF'))
+                          .textAlign(TextAlign.Start)
+                          .width('100%')
+                        Text(`数量:${this.queryTargetMaterial.num}${this.queryTargetMaterial.unit}`)
+                          .fontSize($r('app.float.fontSize_8'))
+                          .fontColor($r('app.color.0A84FF'))
+                          .textAlign(TextAlign.Start)
+                          .width('100%')
+                      }
                     }.backgroundColor($r('app.color.000000'))
                     .borderRadius($r('app.float.virtualSize_7_2'))
                     .padding(16)
@@ -155,7 +306,7 @@ struct LittleMaterialsStorage{
                       Text('当前有 ')
                         .fontSize($r('app.float.fontSize_8'))
                         .fontColor($r('app.color.60FFFFFF'))
-                      Text('6')
+                      Text(`${this.queryMaterialBoxNum}`)
                         .fontSize($r('app.float.fontSize_12'))
                         .fontColor($r('app.color.0A84FF'))
                       Text(' 个料箱装有同型号物料')
@@ -179,6 +330,7 @@ struct LittleMaterialsStorage{
                 }.height('10%')
                 Row() {
                   BoxGrid({
+                    isQueryEmpty:false,
                     materialBoxes:this.materialBoxes,
                     emptyBoxes:this.emptyBoxes,
                     isQueryMaterial:this.isQueryMaterial,
@@ -200,20 +352,59 @@ struct LittleMaterialsStorage{
               }
               .width('22%')
               .height('100%')
-              .backgroundColor($r('app.color.20FFFFFF'))
+              .backgroundColor(this.selectedMaterialBox.vehicleCode ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
               .borderRadius($r('app.float.virtualSize_6_4'))
+              .enabled(!!this.selectedMaterialBox.vehicleCode) // 只有选中订单时才启用按钮
               .scale({ x: this.outBoundButtonClick, y: this.outBoundButtonClick })
               .animation({
                 duration: 200,
                 curve: Curve.Linear  // 弹性曲线更生动
               })
-              //.enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
-              .onClick(() => {
-                this.outBoundButtonClick = 0.9; // 点击时缩小
+              .onClick(async() => {
+                this.outBoundButtonClick = 0.9;
                 setTimeout(() => {
-                  this.outBoundButtonClick = 1; // 0.2秒后恢复
+                  this.outBoundButtonClick = 1;
                 }, 200);
-                this.currentStep = 1;
+
+                //查询小车的状态
+                const rgvStatusNormal = await this.queryRgvInfo()
+                if(!rgvStatusNormal){
+                  this.reminds = "小车状态异常或位置错误,请检查后重试"
+                  this.remindController.open()
+                  setTimeout(() => {
+                    this.remindController.close()
+                  }, 2000);
+                  return
+                }
+                console.info("ssss"+this.drawerPositionStatus+"as")
+                if(this.drawerPositionStatus == 0)
+                {
+                  this.reminds = "抽屉未缩回,请检查后重试"
+                  this.remindController.open()
+                  setTimeout(() => {
+                    this.remindController.close()
+                  }, 2000);
+                  return
+                }
+
+                if(this.materialBoxWeight > 0)
+                {
+                  this.reminds = "抽屉已有料箱,请检查后重试"
+                  this.remindController.open()
+                  setTimeout(() => {
+                    this.remindController.close()
+                  }, 2000);
+                  return
+                }
+
+                //查询抽屉的状态
+                this.showConfirmDialog({
+                  title: '料箱出库',
+                  message: `确定要${this.selectedMaterialBox.vehicleCode}料箱出库吗?`,
+                  onConfirm: ()=> {
+                    this.boxOutBound();
+                  }
+                });
               })
               Button({type:ButtonType.Normal}) {
                 Text("下一步")
@@ -234,8 +425,8 @@ struct LittleMaterialsStorage{
                 this.nextStepButtonClick = 0.9; // 点击时缩小
                 setTimeout(() => {
                   this.nextStepButtonClick = 1; // 0.2秒后恢复
+                  this.currentStep = 2
                 }, 200);
-                this.currentStep = 2
               })
 
             }.width('100%').height('6%').justifyContent(FlexAlign.End).margin({bottom:'3%',right:'5%'})
@@ -261,13 +452,19 @@ struct LittleMaterialsStorage{
                       .fillColor($r('app.color.FFFFFF'))
                       .margin({left:'2%'})
                     // 扫码输入框
-                    TextInput({ placeholder: '请扫描物料编码' })
+                    TextInput({ text:this.scanMaterialValue,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'))
                       .enableKeyboardOnFocus(false)
+                      .onSubmit(()=>{
+                        this.ScanMaterialCode(this.scanMaterialValue)
+                      })
+                      .onChange((value: string) => {
+                        this.scanMaterialValue = value
+                      })
                   }.width('35%')
                   .borderRadius($r('app.float.virtualSize_7_2'))
                   .backgroundColor($r('app.color.000000'))
@@ -278,7 +475,7 @@ struct LittleMaterialsStorage{
 
                 Row() {
                   MaterialListComponent({
-                    ScanMaterialList:this.orders,
+                    ScanMaterialList:this.ScanMaterialList,
                     materialNum:this.materialNum
                   }).width('95%')
                 }.width('100%').height('90%').justifyContent(FlexAlign.Center)
@@ -290,7 +487,10 @@ struct LittleMaterialsStorage{
                 .margin({left:'-2%',right:'-2%'})
 
               Column(){
-                InBoundView({materialNum:this.materialNum})
+                InBoundView({
+                  materialNum:this.materialNum,
+                  boxMaterials:this.ScanMaterialList
+                })
               }.width('29%').backgroundColor($r('app.color.10FFFFFF'))
             }
             .height('85%')
@@ -318,8 +518,8 @@ struct LittleMaterialsStorage{
                 this.preStepButtonClick = 0.9; // 点击时缩小
                 setTimeout(() => {
                   this.preStepButtonClick = 1; // 0.2秒后恢复
+                  this.currentStep = 1;
                 }, 200);
-                this.currentStep = 1;
               })
             }.width('100%').height('6%').justifyContent(FlexAlign.Start).margin({bottom:'3%',left:'5%'})
           }.height('83.6%').margin({top:'3%'}).width('100%')

+ 20 - 1
entry/src/main/ets/params/MaterialInformationParam.ets

@@ -43,9 +43,28 @@ export interface MaterialBoxInfo {
   //料箱编码
   vehicleCode?: string;
   materials?:materialsInfo[]
+
+  index?:number
+  //产品规格
+  spec?:string
+  //	物料名称
+  materialName?:string
+  //物料编码
+  materialNo?: string
+  //	序列号
+  seqNo?: string
+  //单位
+  unit?:string
+  //数量
+  num?:number
+  //批次号
+  batchCode?:string
+  applyCode?: string;
+  materialCode?: string;
+  unitDictLabel?: string;
 }
 
-interface materialsInfo {
+export interface materialsInfo {
   codes?:[]
   materialName?: string,
   materialNo?: string,

+ 44 - 32
entry/src/main/ets/view/wms/OrderMaterialStorageSecondStep.ets

@@ -1,10 +1,10 @@
 import {SingleOrder,BoxGrid,RemindDialog} from "../../component/OrderMaterialsStorageView"
 import WorkOrderInfo from '../../viewmodel/wms/WorkOrderInfo'
 import WmsRequest from '../../common/util/request/WmsRequest'
-import {MaterialBoxInfo,outBoxClass} from '../../params/MaterialInformationParam'
+import {MaterialBoxInfo,outBoxClass,materialsInfo} from '../../params/MaterialInformationParam'
 import RequestParamModel from '../../viewmodel/wms/RequestParamModel'
-import CommonConstants from '../../common/constants/CommonConstants'
 import promptAction from '@ohos.promptAction';
+import CommonConstants from '../../common/constants/CommonConstants'
 import {RgvInfo} from "../../params/RobotsParam"
 import {CommonConfirmDialog}from "../../component/OrderMaterialsStorageView"
 import {ConfirmDialogParams} from "../../params/OrderMaterialsStorageParams"
@@ -19,8 +19,10 @@ export struct OrderMaterialStorageSecondStep {
   @State outBoundButtonClick :number = 1
   @State nextStepButtonClick:number = 1
   @State preStepButtonClick:number = 1
+  @State queryMaterialBoxNum:number = 0
   @State isQueryMaterial: boolean = false
   @State emptyBoxes: MaterialBoxInfo[] = []
+  @State queryTargetMaterial:materialsInfo={}
   @State materialBoxes: MaterialBoxInfo[] = []
   @State reminds:string='1'
   @StorageLink('materialBoxWeight') materialBoxWeight: number =0;
@@ -38,17 +40,26 @@ export struct OrderMaterialStorageSecondStep {
   })
 
   getMaterialBoxList = async (currentMaterialNo: string) => {
+    this.queryTargetMaterial = {}
+    this.scanCodeValue = ''
+    this.queryMaterialBoxNum = 0
     this.materialBoxes = await WmsRequest.post("/api/v1/stock/groupList", {
-        materialNo: currentMaterialNo,
-      } as RequestParamModel);
-    if(this.materialBoxes.length==0){
-      this.reminds="无当前物料料箱!"
+      materialNo: currentMaterialNo,
+    } as RequestParamModel);
+    if (this.materialBoxes.length == 0) {
+      this.reminds = "无当前物料料箱!"
       this.remindController.open()
       setTimeout(() => {
         this.remindController.close();
-      }, 2000); // 2000毫秒 = 2秒
-    }else{
+      }, 2000);
+    } else {
       this.isQueryMaterial = true;
+      this.queryMaterialBoxNum = this.materialBoxes.length
+      if (this.materialBoxes[0]?.materials) {
+        this.queryTargetMaterial = this.materialBoxes[0].materials.find(
+          (material) => material.materialNo === currentMaterialNo
+        ) || {} as materialsInfo; // 如果找不到就使用空对象
+      }
     }
   }
 
@@ -149,7 +160,7 @@ export struct OrderMaterialStorageSecondStep {
                 .fillColor($r('app.color.FFFFFF'))
                 .margin({left:'2%'})
               // 扫码输入框
-              TextInput({ placeholder: '请扫描物料编码' })
+              TextInput({ text:this.scanCodeValue,placeholder: '请扫描物料编码' })
                 .type(InputType.Normal)
                 .placeholderFont({ size: $r('app.float.fontSize_12')})
                 .placeholderColor($r('app.color.30FFFFFF'))
@@ -182,26 +193,29 @@ export struct OrderMaterialStorageSecondStep {
                 .height($r('app.float.virtualSize_23'))
                 .fillColor($r('app.color.FFFFFF'))
               Column({space:5}){
-                Text('')
-                  .fontSize($r('app.float.fontSize_12'))
-                  .fontColor($r('app.color.0A84FF'))
-                  .textAlign(TextAlign.Start)
-                  .width('100%')
-                Text('')
-                  .fontSize($r('app.float.fontSize_8'))
-                  .fontColor($r('app.color.0A84FF'))
-                  .textAlign(TextAlign.Start)
-                  .width('100%')
-                Text('')
-                  .fontSize($r('app.float.fontSize_8'))
-                  .fontColor($r('app.color.0A84FF'))
-                  .textAlign(TextAlign.Start)
-                  .width('100%')
-                Text('')
-                  .fontSize($r('app.float.fontSize_8'))
-                  .fontColor($r('app.color.0A84FF'))
-                  .textAlign(TextAlign.Start)
-                  .width('100%')
+                if(this.isQueryMaterial)
+                {
+                  Text(this.queryTargetMaterial.materialName)
+                    .fontSize($r('app.float.fontSize_12'))
+                    .fontColor($r('app.color.0A84FF'))
+                    .textAlign(TextAlign.Start)
+                    .width('100%')
+                  Text(`型号:${this.queryTargetMaterial.materialNo}`)
+                    .fontSize($r('app.float.fontSize_8'))
+                    .fontColor($r('app.color.0A84FF'))
+                    .textAlign(TextAlign.Start)
+                    .width('100%')
+                  Text(`序列号:${this.queryTargetMaterial.spec}`)
+                    .fontSize($r('app.float.fontSize_8'))
+                    .fontColor($r('app.color.0A84FF'))
+                    .textAlign(TextAlign.Start)
+                    .width('100%')
+                  Text(`数量:${this.queryTargetMaterial.num}${this.queryTargetMaterial.unit}`)
+                    .fontSize($r('app.float.fontSize_8'))
+                    .fontColor($r('app.color.0A84FF'))
+                    .textAlign(TextAlign.Start)
+                    .width('100%')
+                }
               }.backgroundColor($r('app.color.000000'))
               .borderRadius($r('app.float.virtualSize_7_2'))
               .padding(16)
@@ -212,7 +226,7 @@ export struct OrderMaterialStorageSecondStep {
                 Text('当前有 ')
                   .fontSize($r('app.float.fontSize_8'))
                   .fontColor($r('app.color.60FFFFFF'))
-                Text('0')
+                Text(`${this.queryMaterialBoxNum}`)
                   .fontSize($r('app.float.fontSize_12'))
                   .fontColor($r('app.color.0A84FF'))
                 Text(' 个料箱装有同型号物料')
@@ -333,8 +347,6 @@ export struct OrderMaterialStorageSecondStep {
               this.boxOutBound();
             }
           });
-          CommonConstants.MATERIAL_BOX_ID = this.selectedMaterialBox.vehicleCode?this.selectedMaterialBox.vehicleCode:""
-          console.info("rgvs"+CommonConstants.MATERIAL_BOX_ID)
         })
         Button({type:ButtonType.Normal}) {
           Text("下一步")

+ 4 - 1
entry/src/main/ets/view/wms/OrderMaterialStorageThirdStep.ets

@@ -139,7 +139,10 @@ export struct OrderMaterialStorageThirdStep {
           .margin({left:'-2%',right:'-2%'})
 
         Column(){
-          InBoundView({materialNum:this.materialNum})
+          InBoundView({
+            materialNum:this.materialNum,
+            boxMaterials:this.ScanMaterialList
+          })
         }.width('29%').backgroundColor($r('app.color.10FFFFFF'))
       }
       .height('85%')

+ 16 - 23
entry/src/main/ets/viewmodel/wms/InBoundOrderInfo.ets

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