Kaynağa Gözat

修改需求。优化代码。

jiaxiaoqiang 8 ay önce
ebeveyn
işleme
a089299388

+ 20 - 20
entry/src/main/ets/common/component/TitleStateComp.ets

@@ -159,31 +159,31 @@ export struct TitleStateComp {
                 .fontWeight(FontWeight.Medium)
                 .width('95%')
                 .maxLines(1)
-              Progress({ value: this.completeNum!, total: this.planNum!, type: ProgressType.Linear })
-                .width('95%')
-                .backgroundColor($r('app.color.grey_100'))
-                .style({ strokeWidth: 5 })
-              Text('任务进度:' + ((this.completeNum!) / (this.planNum!)) * 100 + '%')
-                .fontSize($r('app.float.fontSize_14'))
-                .fontColor($r('app.color.general_font_color'))
-                .opacity($r('app.float.card_font_default_opacity'))
-                .fontWeight(FontWeight.Medium)
-                .maxLines(1)
+              // Progress({ value: this.completeNum!, total: this.planNum!, type: ProgressType.Linear })
+              //   .width('95%')
+              //   .backgroundColor($r('app.color.grey_100'))
+              //   .style({ strokeWidth: 5 })
+              // Text('任务进度:' + ((this.completeNum!) / (this.planNum!)) * 100 + '%')
+              //   .fontSize($r('app.float.fontSize_14'))
+              //   .fontColor($r('app.color.general_font_color'))
+              //   .opacity($r('app.float.card_font_default_opacity'))
+              //   .fontWeight(FontWeight.Medium)
+              //   .maxLines(1)
             }
             .justifyContent(FlexAlign.Center)
             .height(px2vp(105))
             .width('58%')
 
-            Row() {
-              Image(CommonConstants.USER_AVATAR && CommonConstants.USER_AVATAR.length > 0 ? CommonConstants.FILE_URL_PREFIX + CommonConstants.USER_AVATAR : $r('app.media.user_white'))
-                .width(px2vp(48))
-                .height(px2vp(48))
-                .borderRadius(px2vp(100))
-                .onClick(() => {
-                  this.AvatarController.open()
-                })
-            }
-            .layoutWeight(1)
+            // Row() {
+            //   Image(CommonConstants.USER_AVATAR && CommonConstants.USER_AVATAR.length > 0 ? CommonConstants.FILE_URL_PREFIX + CommonConstants.USER_AVATAR : $r('app.media.user_white'))
+            //     .width(px2vp(48))
+            //     .height(px2vp(48))
+            //     .borderRadius(px2vp(100))
+            //     .onClick(() => {
+            //       this.AvatarController.open()
+            //     })
+            // }
+            // .layoutWeight(1)
           }
           .width('22%')
           .height('90%')

+ 2 - 0
entry/src/main/ets/common/util/request/StorageRequestInstance.ets

@@ -5,6 +5,7 @@ import WorkBinInfo from '../../../model/WorkBinInfo';
 import OutboundData from '../../../model/OutboundDats';
 import RequestParamModel from '../../../viewmodel/RequestParamModel';
 import { records } from '../../../view/Statistics';
+import { MaterialInformationModel } from '../../../model/MaterialInformation';
 
 // 定义数据类型最好用xxxModel, 所有属性都是可选来适用 as。  在swagger或者控制台 复制返回的json到  https://xiets.gitee.io/json-to-any-web/ 即可获得所有TS类型。
 export interface StorageStatus {
@@ -406,6 +407,7 @@ export interface Materialpositionclass {
   vehicleNo?: string
   pageNo?: number
   pageSize?: number
+  materials?: MaterialInformationModel[]
 }
 
 // const Materialposition = async() : Promise< Materialpositionclass[]> => {

+ 1 - 0
entry/src/main/ets/model/MaterialInformation.ets

@@ -58,6 +58,7 @@ export interface MaterialInformationModel {
   updator?: string
   vehicleNo?: string
   batchCode?: string
+  batchNo?: string
   code?: string
 
 

+ 32 - 4
entry/src/main/ets/pages/Outbound.ets

@@ -1,3 +1,4 @@
+import { SureToDoDialog } from '../common/component/SureToDoDialog'
 import { TitleStateComp } from '../common/component/TitleStateComp'
 import { CompleteSet } from '../view/CompleteSet'
 
@@ -5,10 +6,36 @@ import { CompleteSet } from '../view/CompleteSet'
 @Component
 struct Outbound {
   //齐套按钮:0、手动出库:1、调仓:2.统计:3
+
   @State inboundButton: number = 0
   //仓储和其他仓储点击按钮变色
   @State warehouseButton: number = 0
   @State isHomePage: boolean = false
+  // 切换tab添加提示
+  goingToChangeTabIndex: number = 0
+  goingToChangeTab = (tabIndex: number) => {
+    this.goingToChangeTabIndex = tabIndex
+    this.changeTabController.open()
+  }
+  sureToChangeTab = () => {
+    this.inboundButton = this.goingToChangeTabIndex
+  }
+  cancel = () => {
+    this.changeTabController.close()
+  }
+  changeTabController: CustomDialogController = new CustomDialogController({
+    builder: SureToDoDialog(
+      {
+        cancel: this.cancel,
+        confirm: this.sureToChangeTab,
+        title: "提示",
+        info: '切换会中断当前的操作'
+      }
+    ),
+    alignment: DialogAlignment.Center,
+    customStyle: true,
+    autoCancel: false,
+  })
 
   build() {
     Column() {
@@ -59,7 +86,8 @@ struct Outbound {
               .fontColor(this.inboundButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 0 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 0
+                this.goingToChangeTab(0)
+
               })
             Text('手动出库')
               .textAlign(TextAlign.Center)
@@ -71,7 +99,7 @@ struct Outbound {
               .fontColor(this.inboundButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 1 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 1
+                this.goingToChangeTab(1)
               })
             Text('调仓')
               .textAlign(TextAlign.Center)
@@ -83,7 +111,7 @@ struct Outbound {
               .fontColor(this.inboundButton === 2 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 2 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 2
+                this.goingToChangeTab(2)
               })
             Text('统计')
               .textAlign(TextAlign.Center)
@@ -95,7 +123,7 @@ struct Outbound {
               .fontColor(this.inboundButton === 3 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 3 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 3
+                this.goingToChangeTab(3)
               })
           }.width('67%')
           .borderRadius(px2vp(15))

+ 36 - 4
entry/src/main/ets/pages/OutboundStation.ets

@@ -5,6 +5,7 @@ import { AdjustStorageView } from '../view/storage/AdjustStorageView'
 import { ManualOutbound } from '../view/ManualOutbound'
 import { WarehouseMap } from './WarehouseMap'
 import { MaterialCirculationPage } from './process/MaterialCirculationPage'
+import { SureToDoDialog } from '../common/component/SureToDoDialog'
 
 /*
  * 出库工位
@@ -20,6 +21,37 @@ struct OutboundStation {
   @State isHomePage: boolean = false
   fourWidth: number = 280
   twoWidth: number = 150
+  // 切换tab添加提示
+  goingToChangeTabIndex: number = 0
+  goingToChangeTab = (tabIndex: number) => {
+
+    if (this.inboundButton == 3) {
+      this.inboundButton = tabIndex
+    }
+    else {
+      this.goingToChangeTabIndex = tabIndex
+      this.changeTabController.open()
+    }
+  }
+  sureToChangeTab = () => {
+    this.inboundButton = this.goingToChangeTabIndex
+  }
+  cancel = () => {
+    this.changeTabController.close()
+  }
+  changeTabController: CustomDialogController = new CustomDialogController({
+    builder: SureToDoDialog(
+      {
+        cancel: this.cancel,
+        confirm: this.sureToChangeTab,
+        title: "提示",
+        info: '切换会中断当前的操作'
+      }
+    ),
+    alignment: DialogAlignment.Center,
+    customStyle: true,
+    autoCancel: false,
+  })
 
   build() {
     Column() {
@@ -69,7 +101,7 @@ struct OutboundStation {
               .fontColor(this.inboundButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 0 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 0
+                this.goingToChangeTab(0)
               })
             Text('手动出库')
               .textAlign(TextAlign.Center)
@@ -81,7 +113,7 @@ struct OutboundStation {
               .fontColor(this.inboundButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 1 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 1
+                this.goingToChangeTab(1)
               })
 
             // Text('物料流转')
@@ -107,7 +139,7 @@ struct OutboundStation {
               .fontColor(this.inboundButton === 2 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 2 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 2
+                this.goingToChangeTab(2)
               })
             Text('统计')
               .textAlign(TextAlign.Center)
@@ -119,7 +151,7 @@ struct OutboundStation {
               .fontColor(this.inboundButton === 3 ? $r('app.color.black_90') : $r('app.color.black_60'))
               .backgroundColor(this.inboundButton === 3 ? $r('app.color.process_divider_white_color') : '')
               .onClick(() => {
-                this.inboundButton = 3
+                this.goingToChangeTab(3)
               })
 
           }.width(px2vp(this.fourWidth + this.twoWidth * 3 + 24 * 3))

+ 1 - 1
entry/src/main/ets/pages/StationDevicesPage.ets

@@ -76,7 +76,7 @@ struct StationDevicesPage {
                     .fontWeight(FontWeight.Regular)
                     .fontSize($r('app.float.fontSize_20'))
                   Row() {
-                    Image(item.devicePic)
+                    Image($r(`app.media.${item.devicePic}`))
                       .width(px2vp(120))
                       .height(px2vp(120))
                       .margin({ top: 40 })

+ 68 - 144
entry/src/main/ets/view/CompleteSet.ets

@@ -45,8 +45,8 @@ export struct CompleteSet {
   @State private boxMaterials: Array<MaterialInformationModel> = []
   //取出料箱
   @State private outBox: Array<outBoxClass> = []
-  //物料位置
-  @State private Mposition: Array<Materialpositionclass> = []
+  //齐套物料信息
+  @State private Mposition: Array<MaterialInformationModel> = []
   //查询物料存放的所有位置
   @State materialPositionArray: Array<Materialpositionclass> = []
   //选中取出的物料位置
@@ -251,6 +251,7 @@ export struct CompleteSet {
         //
         // }
         this.materialArray = res.records ?? []
+        this.textController.stopEditing()
       }
     }),
     alignment: DialogAlignment.Center,
@@ -284,38 +285,23 @@ export struct CompleteSet {
     return res
 
   }
-  /////请求物料位置
-  Materialposition = async (): Promise<Materialpositionclass[]> => {
-
-    let res: Materialpositionclass[] = await StorageRequest.post("/api/v1/stock/list", {
-      materialName: this.materialName
+  /////请求齐套物料信息
+  Materialposition = async (item: MaterialInfo) => {
+    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/process/vehicleMaterial/list", {
+      materialName: item.materialName,
+      materialCode: item.materialCode,
+      operationId: this.selectProcess.operationId
     } as RequestParamModel)
-    console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
+    this.materialName = item?.materialName ?? ""
+    console.log("xxxxxxxxxxxxxxxxxx", JSON.stringify(item), JSON.stringify(res))
     this.Mposition = res
-    return res
+    this.materialLocationController.open()
   }
-  //物料位置
+  //齐套的物料信息
   materialLocationController: CustomDialogController = new CustomDialogController({
     builder: MaterialLocationDialog({
-      orderId: this.orderId,
-      materialGridStatus: this.materialGridStatus,
-      outBox: this.outBox,
-      boxMaterials: this.boxMaterials,
-      Mposition: this.Mposition,
       materialName: this.materialName,
-      materialPositionArray: this.materialPositionArray,
-      materialPosition: this.materialPosition,
-      // confirm: async ()=>{
-      //   if (this.materialPosition?.vehicleCode && JSON.stringify(this.materialPosition) != '{}') {
-      //     let params: RequestParamModel = new RequestParamModel()
-      //     params.vehicleCode = this.materialPosition?.vehicleCode!
-      //     this.boxMaterials = await this.queryStockList(params)
-      //     console.log('testTag', JSON.stringify(this.boxMaterials))
-      //     // todo 需要根据硬件返回数据判断当前出库口的状态
-      //     this.drawerPositionStatus = 1
-      //     this.materialGridStatus = 1
-      //   }
-      // }
+      boxMaterials: this.Mposition,
     }),
     alignment: DialogAlignment.Center,
     customStyle: true,
@@ -537,7 +523,9 @@ export struct CompleteSet {
         .width(px2vp(608))
         .height(px2vp(900))
         .borderRadius($r('app.float.borderRadius_16'))
-      } else if (this.orderMaterialSwitch === 2) {
+      }
+      //         已经选择了工序后 展示的列表和上面的title
+      else if (this.orderMaterialSwitch === 2) {
         Column() {
           Row() {
             Image($r('app.media.circular_return'))
@@ -644,20 +632,14 @@ export struct CompleteSet {
                   .height('25%')
                   .width(px2vp(608))
                   .onClick(async () => {
-                    this.materialName = item.materialName!
-                    this.Materialposition().then((res: Materialpositionclass[]) => {
-                      console.log('testTag', 'result cccccc' + JSON.stringify(res))
-                      if (res && res.length > 0) {
-                        this.Mposition = res
-                      }
-                    })
-                    let params: RequestParamModel = new RequestParamModel()
-                    params.materialNo = item.materialCode!
-                    this.materialPositionArray = await this.queryStockList(params)
-                    this.materialLocationController.open()
+
+
+                    this.Materialposition(item)
+
+
                   })
-                  .backgroundColor(this.onclick === index ?
-                  $r('app.color.robot_set_card_blue') : $r('app.color.robot_set_card_white'))
+                  .backgroundColor(item.completeNum! >= item.totalMaterial! ?
+                  $r('app.color.green_100') : $r('app.color.robot_set_card_white'))
                 }
               })
             }
@@ -683,6 +665,8 @@ export struct CompleteSet {
         .height(px2vp(900))
         .borderRadius($r('app.float.borderRadius_16'))
       }
+
+
       Column() {
         Stack() {
           Image(this.drawerPositionStatus === 1 && this.materialGridStatus === 0 ? $r('app.media.drawer_inside') : (this.drawerPositionStatus === 2 && this.materialGridStatus === 0 ? $r('app.media.drawer_outside') :
@@ -914,12 +898,20 @@ export struct CompleteSet {
                   Column() {
                     Column() {
                       Row().height('23%')
-                      Text(item.materialName ? item.materialName! : '')
+                      Text(item.materialName)
                         .fontSize($r('app.float.fontSize_24'))
                         .fontColor($r('app.color.general_font_color'))
                         .fontWeight(FontWeight.Medium)
                         .opacity($r('app.float.general_font_opacity'))
-                      Text(item.materialCode ? item.materialCode : '')
+                      Text(item.batchNo)
+                        .fontSize($r('app.float.fontSize_20'))
+                        .fontColor($r('app.color.process_nameplate_grey_color'))
+                        .fontWeight(FontWeight.Medium)
+                      Text(item.materialCode)
+                        .fontSize($r('app.float.fontSize_20'))
+                        .fontColor($r('app.color.process_nameplate_grey_color'))
+                        .fontWeight(FontWeight.Medium)
+                      Text(item.spec)
                         .fontSize($r('app.float.fontSize_20'))
                         .fontColor($r('app.color.process_nameplate_grey_color'))
                         .fontWeight(FontWeight.Medium)
@@ -936,8 +928,9 @@ export struct CompleteSet {
                           .fontWeight(FontWeight.Bold)
                           .fontColor($r('app.color.general_font_color'))// .opacity($r('app.float.general_font_opacity'))
                           .height(30)
-                          .width(150)
+                          .width(120)
                           .type(InputType.Number)
+                          .defaultFocus(false)
                           .textAlign(TextAlign.Start)
                           .borderRadius(0)
                           .border({ width: 0.4 })
@@ -950,13 +943,14 @@ export struct CompleteSet {
                           .fontWeight(FontWeight.Medium)
                       }
                       .width('90%')
+                      .justifyContent(FlexAlign.End)
 
-                      Blank()
-                      Row() {
-                        Image($r('app.media.subscript_space'))
-                          .height($r('app.float.card_subscript_new_size'))
-                          .width($r('app.float.card_subscript_new_size'))
-                      }
+                      // Blank()
+                      // Row() {
+                      //   Image($r('app.media.subscript_space'))
+                      //     .height($r('app.float.card_subscript_new_size'))
+                      //     .width($r('app.float.card_subscript_new_size'))
+                      // }
                       .alignItems(VerticalAlign.Bottom)
                       .justifyContent(FlexAlign.End)
                       .width('100%')
@@ -971,7 +965,7 @@ export struct CompleteSet {
                     }
                     .width(30)
                     .height(30)
-                    .position({ x: '90%', y: 8 })
+                    .position({ x: '90%', y: 5 })
                     .alignItems(VerticalAlign.Center)
                     .justifyContent(FlexAlign.Center)
                     .onClick(() => {
@@ -1114,59 +1108,10 @@ struct SelectProcessDialog {
 // 物料位置(物料在哪些料箱里面)
 @CustomDialog
 struct MaterialLocationDialog {
-  @Link orderId: string
-  @Link materialGridStatus: number
-  @Link outBox: outBoxClass[]
-  @Link boxMaterials: MaterialInformationModel[]
-  @State selectMaterial: number = -1
-  @Link Mposition: Materialpositionclass[]
-  @Link materialPositionArray: Materialpositionclass[]
-  @Link materialPosition: Materialpositionclass
   @Link materialName: string
-  @State houseNo: string = ''
-  @State vehicleNo: string = ''
-  @State private controlList: Array<controlClass> = []
+  @Link boxMaterials: MaterialInformationModel[]
   Controller: CustomDialogController
   scroller: Scroller = new Scroller()
-  //后端料箱出库
-  RemoveMaterialBox = async (): Promise<outBoxClass[]> => {
-    let res: outBoxClass[] = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
-      houseNo: this.houseNo,
-      vehicleNo: this.vehicleNo
-    } as RequestParamModel)
-    console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
-    this.outBox = res
-    return res
-  }
-  //后端控制系统料箱出库
-  controlHttp = async (): Promise<controlClass[]> => {
-    let res: controlClass[] = await StorageRequest.post("/api/v1/wms/common/receiveResult", {
-      orderId: this.orderId,
-      state: 1
-    } as RequestParamModel)
-    console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
-    this.controlList = res
-    return res
-  }
-  //todo 这里删掉,应该是出库位置自动识别rfid读取料箱里面物料信息
-  //查询取出的料箱里面的物料信息
-  boxMaterialHttp = async (): Promise<MaterialInformationModel[]> => {
-    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/stock/list", {
-      vehicleCode: this.vehicleNo
-    } as RequestParamModel)
-    console.log('testTag', 'aaaaaaaa2' + JSON.stringify(res));
-    this.boxMaterials = res
-    return res
-  }
-  //硬件请求出库操作
-  outboundHttp = async (): Promise<outboundClass> => {
-    let res: outboundClass = await StorageRequest.post("/api/v1/wcs/stockout", {
-      boxNo: this.vehicleNo,
-      position: "stat3"
-    } as RequestParamModel)
-    console.log('testTag1', '----------' + JSON.stringify(res));
-    return res
-  }
 
   build() {
     Stack() {
@@ -1210,34 +1155,46 @@ struct MaterialLocationDialog {
         .padding({ top: 8 })
 
         Grid(this.scroller) {
-          ForEach(this.Mposition, (item: Materialpositionclass, index: number) => {
+          ForEach(this.boxMaterials, (item: MaterialInformationModel, index: number) => {
             GridItem() {
               Row() {
                 Column() {
-                  Text(item?.locationNo && item.locationNo.length > 0 ? getMaterialPositionStr(item.locationNo) : '')
+                  Text(item.materialName)
                     .fontSize($r('app.float.fontSize_24'))
                     .fontWeight(FontWeight.Regular)
-                    .fontColor($r('app.color.black_90'))
+                    .fontColor($r('app.color.black_60'))
                     .height('20%')
                     .width('100%')
-                  Text(item.materialName)
+                  Text(item.materialCode)
+                    .fontSize($r('app.float.fontSize_24'))
+                    .fontWeight(FontWeight.Regular)
+                    .fontColor($r('app.color.black_60'))
+                    .height('20%')
+                    .width('100%')
+                  Text(item.spec)
+                    .fontSize($r('app.float.fontSize_24'))
+                    .fontWeight(FontWeight.Regular)
+                    .fontColor($r('app.color.black_60'))
+                    .height('20%')
+                    .width('100%')
+                  Text(item.batchNo)
                     .fontSize($r('app.float.fontSize_24'))
                     .fontWeight(FontWeight.Regular)
                     .fontColor($r('app.color.black_60'))
                     .height('20%')
                     .width('100%')
-                  Blank()
                   Row() {
                     Text(item.num?.toString())
                       .fontSize($r('app.float.fontSize_38'))
                       .fontWeight(FontWeight.Bold)
                       .fontColor($r('app.color.black_90'))
-                    Text(item.unit)
+                    Text(item.unit ?? item.unitDictLabel)
                       .fontSize($r('app.float.fontSize_24'))
                       .fontWeight(FontWeight.Regular)
                       .fontColor($r('app.color.black_60'))
                   }
-                  .height('50%')
+                  .margin({ top: 5 })
+
                 }
                 .width('100%')
                 .padding(10)
@@ -1250,47 +1207,14 @@ struct MaterialLocationDialog {
               .borderRadius(10)
               .height('25%')
               .width('100%')
-              .backgroundColor(this.selectMaterial === index ? $r('app.color.robot_set_card_blue') : $r('app.color.robot_set_card_white'))
-              .onClick(async () => {
-                this.houseNo = item.houseNo!
-                this.vehicleNo = item.vehicleCode!
-                this.selectMaterial = index
-                this.materialPosition = item
-                console.log("testTag1" + '----------++' + this.vehicleNo)
-                //先查询点击的料箱物流信息用于展示在回库下面
-                this.boxMaterialHttp().then((res: MaterialInformationModel[]) => {
-                  console.log('testTag', 'result cccccc22' + JSON.stringify(res))
-                  if (res && res.length > 0) {
-                    this.boxMaterials = res
-                  }
-                })
-
-                //执行硬件出库
-                this.outboundHttp().then((res: outboundClass) => {
-                  console.log('testTag1', '-------result cccccc11' + JSON.stringify(res))
-
-                })
+              .backgroundColor(Color.White)
 
-                // todo 打开执行出库操作后端
-                // this.RemoveMaterialBox().then((res :outBoxClass[]) => {
-                //   console.log('testTag', 'result cccccc11'+JSON.stringify(res))
-                //   if (res && res.length > 0) {
-                //     this.outBox = res
-                //   }
-                // })
-                //控制终端
-                this.controlHttp().then((res: controlClass[]) => {
-                  console.log('testTag1', '-------result cccccc11' + JSON.stringify(res))
-                })
-
-                this.Controller?.close()
-              })
             }
             .padding({ left: 5 })
           })
         }
         .padding(10)
-        .columnsTemplate('1fr 1fr 1fr 1fr 1fr 1fr')
+        .columnsTemplate('1fr 1fr 1fr')
         .columnsGap(10)
         .rowsGap(10)
         .width('100%')

+ 43 - 36
entry/src/main/ets/view/ManualOutbound.ets

@@ -46,10 +46,7 @@ export struct ManualOutbound {
   currentBoxStationModel: Materialpositionclass = {}
   goingToLookDetail = async (m: Materialpositionclass) => {
     this.currentBoxStationModel = m
-    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
-      vehicleCode: m.vehicleCode ?? ""
-    } as RequestParamModel)
-    this.positionInfoList = res
+    this.positionInfoList = m?.materials ?? []
     this.infoListController.open()
   }
   goingToOut = (m: Materialpositionclass) => {
@@ -118,14 +115,12 @@ export struct ManualOutbound {
     autoCancel: false,
   })
   //请求物料位置
-  MaterialpositionHttp = async (): Promise<Materialpositionclass[]> => {
-
-    let res: Materialpositionclass[] = await StorageRequest.post("/api/v1/stock/list", {
-      materialName: this.materialName
+  MaterialpositionHttp = async (item: MaterialInformationModel) => {
+    let res: Materialpositionclass[] = await StorageRequest.post("/api/v1/stock/groupList", {
+      materialNo: item.materialNo,
+      materialCode: item.materialCode,
     } as RequestParamModel)
-    console.log('testTag', 'aaaaaaaa1' + JSON.stringify(res));
     this.Materialposition = res
-    return res
   }
   //回库操作
   Warehousing = async () => {
@@ -297,6 +292,22 @@ export struct ManualOutbound {
     this.outEnable = true
     this.outboundMaterials = []
   }
+  tooutCancel = () => {
+    this.toOUTController.close()
+  }
+  toOUTController: CustomDialogController = new CustomDialogController({
+    builder: SureToDoDialog(
+      {
+        cancel: this.dialogCancel,
+        confirm: this.sureToOutFun,
+        title: "提示",
+        info: '确认出库吗?'
+      }
+    ),
+    alignment: DialogAlignment.Center,
+    customStyle: true,
+    autoCancel: false,
+  })
 
   build() {
     Row({ space: px2vp(24) }) {
@@ -396,12 +407,7 @@ export struct ManualOutbound {
                   this.materialLocationController.open()
                   this.onclick = index
                   this.materialName = item.materialName!
-                  // this.MaterialpositionHttp().then((res: Materialpositionclass[]) => {
-                  //   console.log('testTag', 'result cccccc' + JSON.stringify(res))
-                  //   if (res && res.length > 0) {
-                  //     this.Materialposition = res
-                  //   }
-                  // })
+                  this.MaterialpositionHttp(item)
                 })
               }
             })
@@ -796,29 +802,24 @@ struct MaterialLocationDialog {
             GridItem() {
               Row() {
                 Column() {
-                  Row() {
-                    Text(item?.coordinate ? item.coordinate + '-' + item.position : "")
-                      .fontSize($r('app.float.fontSize_24'))
-                      .fontWeight(FontWeight.Regular)
-                      .fontColor($r('app.color.black_90'))
-                      .margin({ right: 15 })
-                    Text(item.num?.toString())
-                      .fontSize($r('app.float.fontSize_38'))
-                      .fontWeight(FontWeight.Bold)
-                      .fontColor($r('app.color.black_90'))
-                    Text(item.unit)
-                      .fontSize($r('app.float.fontSize_24'))
-                      .fontWeight(FontWeight.Regular)
-                      .fontColor($r('app.color.black_60'))
-                  }
 
-                  Text(item.materialName)
+                  Text(item.vehicleCode)
                     .fontSize($r('app.float.fontSize_24'))
                     .fontWeight(FontWeight.Regular)
                     .fontColor($r('app.color.black_60'))
                     .width('100%')
-                  Blank()
 
+                  Text("坐标: " + item?.coordinate)
+                    .fontSize($r('app.float.fontSize_24'))
+                    .fontWeight(FontWeight.Regular)
+                    .fontColor($r('app.color.black_90'))
+                    .margin({ right: 15 })
+
+                  Text("层数: " + item.position)
+                    .fontSize($r('app.float.fontSize_24'))
+                    .fontWeight(FontWeight.Regular)
+                    .fontColor($r('app.color.black_90'))
+                    .margin({ right: 15 })
                 }
                 .width('60%')
                 .alignItems(HorizontalAlign.Start)
@@ -870,7 +871,7 @@ struct MaterialLocationDialog {
           })
         }
         .padding(10)
-        .columnsTemplate('1fr 1fr')
+        .columnsTemplate('1fr 1fr 1fr')
         .columnsGap(10)
         .rowsGap(10)
         .width('100%')
@@ -912,7 +913,7 @@ struct LocationInfoListDialog {
                       .fontSize($r('app.float.fontSize_38'))
                       .fontWeight(FontWeight.Bold)
                       .fontColor($r('app.color.black_90'))
-                    Text(item.unitDictLabel)
+                    Text(item.unit)
                       .fontSize($r('app.float.fontSize_24'))
                       .fontWeight(FontWeight.Regular)
                       .fontColor($r('app.color.black_60'))
@@ -921,7 +922,12 @@ struct LocationInfoListDialog {
                 .justifyContent(FlexAlign.SpaceBetween)
                 .width('100%')
 
-                Text(item.materialCode)
+                Text(item.materialNo)
+                  .fontSize($r('app.float.fontSize_24'))
+                  .fontWeight(FontWeight.Regular)
+                  .fontColor($r('app.color.black_60'))
+                  .width('100%')
+                Text(item.spec)
                   .fontSize($r('app.float.fontSize_24'))
                   .fontWeight(FontWeight.Regular)
                   .fontColor($r('app.color.black_60'))
@@ -931,6 +937,7 @@ struct LocationInfoListDialog {
               .width('100%')
               .alignItems(HorizontalAlign.Start)
               .justifyContent(FlexAlign.Center)
+              .padding({ left: 8, right: 10 })
               .height('60')
 
             }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 469 - 448
entry/src/main/ets/view/Statistics.ets


+ 11 - 10
entry/src/main/ets/viewmodel/MaterialInfo.ets

@@ -3,33 +3,33 @@
  * */
 export default class MaterialInfo {
   //总共需要
-  totalMaterial?:number
+  totalMaterial?: number
   //已拣
-  completeNum?:number
+  completeNum?: number
   // 创建时间
-  created?:	string
+  created?: string
   // 创建人
-  creator?:	string
+  creator?: string
   // 部门ID
   deptId?: string
   // 主键
   id?: number
   // 组织ID
-  orgId?:	string
+  orgId?: string
   // 修改时间
-  updated?:	string
+  updated?: string
   // 上次修改人
-  updator?:	string
+  updator?: string
   // 流转卡号/序列号
-  batchCode?:	string
+  batchCode?: string
   // 是否删除
-  deleted?:	number
+  deleted?: number
   // 物料编码
   materialCode?: string
   // 物料名称
   materialName?: string
   // 物料数量
-  num?:	string
+  num?: string
   // 规格
   spec?: string
   // 单位
@@ -40,4 +40,5 @@ export default class MaterialInfo {
   unitDictLabel?: string
   // 单位字典值
   unitDictValue?: string
+  operationId?: string
 }