Browse Source

物料流转增加删除功能。MaterialInformationModel修改。

jiaxiaoqiang 8 months ago
parent
commit
b1ca57c4f4

+ 23 - 25
entry/src/main/ets/model/MaterialInformation.ets

@@ -1,25 +1,25 @@
-export interface MaterialInformationList{
+export interface MaterialInformationModel {
   //物料类型(等级)
-  vehicleLevel?:string
+  vehicleLevel?: string
   //更改的数量
-  exchangeNumber?:number
+  exchangeNumber?: number
   //物料编码
-  materialCode?:string
-  label?:string
+  materialCode?: string
+  label?: string
   //订单编号
-  taskId?:string
+  taskId?: string
   //批次号
-  spec?:string
+  spec?: string
   //已经占用箱数
-  useNum?:number
+  useNum?: number
   //空箱数
-  emptyBoxNum?:string
+  emptyBoxNum?: string
   //可用箱数
-  canUsedNum?:string
+  canUsedNum?: string
   //总容量箱数
-  allNum?:number
+  allNum?: number
   //仓储类型
-  type?:string
+  type?: string
   //批次号
   coordinate?: string
   //创建时间
@@ -27,15 +27,15 @@ export interface MaterialInformationList{
   //
   creator?: string
   //仓库编码
-  houseNo?:string
+  houseNo?: string
   deptId?: string
-  houseType?:string
-  unitDictLabel?:string
+  houseType?: string
+  unitDictLabel?: string
   //主键
-  id?:string
+  id?: string
   locationNo?: string
   //	物料名称
-  materialName?:string
+  materialName?: string
   //物料编码
   materialNo?: string
   //出入库数量
@@ -46,21 +46,19 @@ export interface MaterialInformationList{
   //	序列号
   seqNo?: string
   // 状态;1-待处理;2-处理中;3-处理异常;4-已完成
-  state?:string
+  state?: string
   //	库存数量
-  stockNum?:string
+  stockNum?: string
   //出入库任务单号
   taskNo?: string
-  unit?:string
+  unit?: string
   updated?: string
   //任务名称
-  taskName?:string
+  taskName?: string
   updator?: string
   vehicleNo?: string
-  batchCode?:string
-  code?:string
-
-
+  batchCode?: string
+  code?: string
 
 
 }

+ 4 - 4
entry/src/main/ets/pages/Warehousing.ets

@@ -1,7 +1,7 @@
 import { TitleStateComp } from '../common/component/TitleStateComp'
 import EquipmentRequest from '../common/util/request/EquipmentRequest'
 import StorageRequest from '../common/util/request/StorageRequest'
-import { MaterialInformationList } from '../model/MaterialInformation'
+import { MaterialInformationModel } from '../model/MaterialInformation'
 import { boxMaterialClass, controlClass } from '../view/CompleteSet'
 import { IntelligentWarehousingGo, stat1 } from '../view/IntelligentWarehousingGo'
 import { ManualWarehousing } from '../view/ManualWarehousing'
@@ -30,7 +30,7 @@ struct Warehousing {
   //取料箱中物料信息
   @State private boxMaterials: Array<boxMaterialClass> = []
   //定义物料信息
-  @State private MaterialInformation: Array<MaterialInformationList> = []
+  @State private MaterialInformation: Array<MaterialInformationModel> = []
   @State private entranceWaiting: Array<stat1> = []
   //后端控制系统料箱出库
   controlHttp = async (): Promise<controlClass[]> => {
@@ -52,8 +52,8 @@ struct Warehousing {
   //todo
   //暂时扫的是库存里的料箱编码信息
   //查询取出料箱里面的物料信息
-  boxMaterialHttp = async (): Promise<MaterialInformationList[]> => {
-    let res: MaterialInformationList[] = await StorageRequest.post("/api/v1/stock/list", {
+  boxMaterialHttp = async (): Promise<MaterialInformationModel[]> => {
+    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/stock/list", {
       //todo 读取RFId的料箱编码,要根据硬件读到的改
       vehicleCode: this.binCode
     } as RequestParamModel)

+ 40 - 11
entry/src/main/ets/pages/process/MaterialCirculationPage.ets

@@ -3,7 +3,7 @@ import { ProcessTitleComp } from '../../common/component/ProcessTitleComp'
 import CommonConstants from '../../common/constants/CommonConstants'
 import JGRequest from '../../common/util/request/Request'
 import StorageRequest from '../../common/util/request/StorageRequest'
-import { MaterialInformationList } from '../../model/MaterialInformation'
+import { MaterialInformationModel } from '../../model/MaterialInformation'
 import { StationInfoModel } from '../../model/StorageSpace'
 import MaterialInfo from '../../viewmodel/MaterialInfo'
 import RequestParamModel from '../../viewmodel/RequestParamModel'
@@ -18,7 +18,7 @@ import promptAction from '@ohos.promptAction'
 export struct MaterialCirculationPage {
   @State materialCode: string = ''
   // 扫码后展示的物料
-  @State materialArray: MaterialInformationList[] = []
+  @State materialArray: MaterialInformationModel[] = []
   // 料箱号
   @State materialBoxCode: string = ''
   @State materialBox: MaterialBox = {}
@@ -49,16 +49,30 @@ export struct MaterialCirculationPage {
     this.destinationArray = await JGRequest.get("/api/v1/process/circulation/target/" + type, {})
   }
 
-  // 查询物料信息(type: 1有仓库  0没有仓库)
-  async queryAndDisplayMaterial(materialCode: string) {
-    let result: MaterialInformationList = await JGRequest.post("/api/v1/process/circulation/material", {
-      label: this.materialCode
-    } as RequestParamModel)
-    if (result) {
-      this.materialArray.push(result)
+  queryAndDisplayMaterial = async (itemCode: string) => {
+    this.materialCode = ""
+
+    let res: MaterialInformationModel = await StorageRequest.post("/api/v1/process/circulation/material", {
+      label: itemCode //"#gys022#sc022#100#20220929#31"
+    } as MaterialInformationModel)
+
+    let obj: MaterialInformationModel = JSON.parse(JSON.stringify(res))
+    // 扫码完成之后,如果数组中有对应的值,就添加数量否则就push
+    let toPushArray: MaterialInformationModel[] = [...this.materialArray]
+    let has = false
+    for (let i = 0; i < toPushArray.length; i++) {
+      let box = toPushArray[i]
+      if (obj.materialCode == box.materialCode) {
+        let number = obj.num! + box.num!
+        box.num = number
+        has = true
+      }
+    }
+    if (!has) {
+      toPushArray.push(JSON.parse(JSON.stringify(obj)))
     }
+    this.materialArray = [...toPushArray]
   }
-
   // 扫描料箱弹窗
   materialBoxController: CustomDialogController = new CustomDialogController({
     builder: MaterialBoxDialog({
@@ -160,7 +174,7 @@ export struct MaterialCirculationPage {
                 .justifyContent(FlexAlign.End)
 
 
-                TextInput({ placeholder: '请扫描物料编码' })
+                TextInput({ text: this.materialCode, placeholder: '请扫描物料编码' })
                   .placeholderColor($r('app.color.text_input_placeholder_font_color'))
                   .placeholderFont({ size: $r('app.float.process_card_middle_font_size'), weight: FontWeight.Medium })
                   .fontSize($r('app.float.process_card_middle_font_size'))
@@ -194,6 +208,21 @@ export struct MaterialCirculationPage {
               ForEach(this.materialArray, (item: MaterialInfo, index: number) => {
                 ListItem() {
                   Column() {
+
+                    // 删除按钮
+                    Row() {
+                      Image($r("app.media.reduce")).width(25).height(5)
+                    }
+                    .width(30)
+                    .height(30)
+                    .position({ x: '90%', y: 8 })
+                    .alignItems(VerticalAlign.Center)
+                    .justifyContent(FlexAlign.Center)
+                    .onClick(() => {
+                      this.materialArray.splice(index, 1)
+                    })
+
+
                     Column() {
                       Text(item.materialName)
                         .fontSize($r('app.float.process_card_middle_font_size'))

+ 18 - 18
entry/src/main/ets/view/CompleteSet.ets

@@ -9,7 +9,7 @@ import ProcessData from '../viewmodel/ProcessData'
 import RequestParamModel from '../viewmodel/RequestParamModel'
 import RequestParamModel2 from '../viewmodel/RequestParamModel2'
 import { stat2 } from './ManualWarehousing'
-import { MaterialInformationList } from '../model/MaterialInformation'
+import { MaterialInformationModel } from '../model/MaterialInformation'
 import promptAction from '@ohos.promptAction'
 import CommonConstants from '../common/constants/CommonConstants'
 import { StationInfoModel } from '../model/StorageSpace'
@@ -42,7 +42,7 @@ export struct CompleteSet {
   //扫描料箱获得料箱编码绑定料箱为齐套料箱
   @State boxInfo: BoxInfo = {}
   //取料箱中物料信息
-  @State private boxMaterials: Array<MaterialInformationList> = []
+  @State private boxMaterials: Array<MaterialInformationModel> = []
   //取出料箱
   @State private outBox: Array<outBoxClass> = []
   //物料位置
@@ -136,21 +136,21 @@ export struct CompleteSet {
     }
   }
   //扫码请求
-  @State private MaterialInformation: Array<MaterialInformationList> = []
+  @State private MaterialInformation: Array<MaterialInformationModel> = []
   ScanStorageCode = async (itemCode: string) => {
 
     this.scanCodeValue = ""
-    let res: MaterialInformationList = await StorageRequest.post("/api/v1/process/circulation/material", {
+    let res: MaterialInformationModel = await StorageRequest.post("/api/v1/process/circulation/material", {
       label: itemCode //"#gys022#sc022#100#20220929#31"
-    } as MaterialInformationList)
+    } as MaterialInformationModel)
 
     //let res = await StorageRequest.get("/api/v3/stock/selectSafeList/1")
     // {"batchCode":"BM47111400130447;SL5","codeType":"BATCH","materialCode":"47111400130447","materialName":"穿心电容","num":5,"spec":"G CT52-4-1-2C1-63V-103-M","unitDictLabel":"个","unitDictValue":"个"}
-    let obj: MaterialInformationList = JSON.parse(JSON.stringify(res))
+    let obj: MaterialInformationModel = JSON.parse(JSON.stringify(res))
 
 
     // 扫码完成之后,如果数组中有对应的值,就添加数量否则就push
-    let toPushArray: MaterialInformationList[] = [...this.MaterialInformation]
+    let toPushArray: MaterialInformationModel[] = [...this.MaterialInformation]
 
     let has = false
     for (let i = 0; i < toPushArray.length; i++) {
@@ -259,8 +259,8 @@ export struct CompleteSet {
 
 
   //后端回库入库操作
-  Warehousing = async (): Promise<MaterialInformationList[]> => {
-    let res: MaterialInformationList[] = await StorageRequest.post("/api/v1/wmsOrder/inBox", {
+  Warehousing = async (): Promise<MaterialInformationModel[]> => {
+    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/wmsOrder/inBox", {
       houseNo: '1',
       stanCode: CommonConstants.STATION_CODE,
       vehicleCode: this.recentlyRecordObject.rfid,
@@ -352,8 +352,8 @@ export struct CompleteSet {
   //   } as RequestParamModel) as BoxInfo
   // }
   //查询取出的料箱里面的物料信息
-  boxMaterialHttp = async (): Promise<MaterialInformationList[]> => {
-    let res: MaterialInformationList[] = await StorageRequest.post("/api/v1/stock/list", {
+  boxMaterialHttp = async (): Promise<MaterialInformationModel[]> => {
+    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/stock/list", {
       vehicleCode: this.entranceWaiting[0].rfid!
     } as RequestParamModel)
     console.log('testTag', 'aaaaaaaa2' + JSON.stringify(res));
@@ -380,7 +380,7 @@ export struct CompleteSet {
     } as RequestParamModel)
 
     // =====================
-    let toPushArray: MaterialInformationList[] = [...this.boxMaterials]
+    let toPushArray: MaterialInformationModel[] = [...this.boxMaterials]
     this.MaterialInformation.forEach((middleBox) => {
       let has = false
       for (let i = 0; i < toPushArray.length; i++) {
@@ -745,7 +745,7 @@ export struct CompleteSet {
 
           })
         List({ space: '2%' }) {
-          ForEach(this.boxMaterials, (item: MaterialInformationList, index: number) => {
+          ForEach(this.boxMaterials, (item: MaterialInformationModel, index: number) => {
             ListItem() {
               Row() {
                 Column() {
@@ -904,7 +904,7 @@ export struct CompleteSet {
 
         Column() {
           List() {
-            ForEach(this.MaterialInformation, (item: MaterialInformationList, index: number) => {
+            ForEach(this.MaterialInformation, (item: MaterialInformationModel, index: number) => {
               ListItem() {
                 Row() {
                   Column() {
@@ -1089,7 +1089,7 @@ struct MaterialLocationDialog {
   @Link orderId: string
   @Link materialGridStatus: number
   @Link outBox: outBoxClass[]
-  @Link boxMaterials: MaterialInformationList[]
+  @Link boxMaterials: MaterialInformationModel[]
   @State selectMaterial: number = -1
   @Link Mposition: Materialpositionclass[]
   @Link materialPositionArray: Materialpositionclass[]
@@ -1122,8 +1122,8 @@ struct MaterialLocationDialog {
   }
   //todo 这里删掉,应该是出库位置自动识别rfid读取料箱里面物料信息
   //查询取出的料箱里面的物料信息
-  boxMaterialHttp = async (): Promise<MaterialInformationList[]> => {
-    let res: MaterialInformationList[] = await StorageRequest.post("/api/v1/stock/list", {
+  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));
@@ -1230,7 +1230,7 @@ struct MaterialLocationDialog {
                 this.materialPosition = item
                 console.log("testTag1" + '----------++' + this.vehicleNo)
                 //先查询点击的料箱物流信息用于展示在回库下面
-                this.boxMaterialHttp().then((res: MaterialInformationList[]) => {
+                this.boxMaterialHttp().then((res: MaterialInformationModel[]) => {
                   console.log('testTag', 'result cccccc22' + JSON.stringify(res))
                   if (res && res.length > 0) {
                     this.boxMaterials = res

+ 324 - 302
entry/src/main/ets/view/IntelligentWarehousingGo.ets

@@ -1,90 +1,95 @@
 import { ScanStorageclass } from './IntelligentWarehousingOutbound'
 import { AddAndSubtractComp } from '../common/component/AddAndSubtractComp';
 import StorageRequest from '../common/util/request/StorageRequest';
-import { MaterialInformationList } from '../model/MaterialInformation';
+import { MaterialInformationModel } from '../model/MaterialInformation';
 import RequestParamModel from '../viewmodel/RequestParamModel';
 import EquipmentRequest from '../common/util/request/EquipmentRequest';
 import { boxMaterialClass } from './CompleteSet';
 
-export interface exchangeClass{
-  exchangeNumber?:number
+export interface exchangeClass {
+  exchangeNumber?: number
 }
-export interface stat1{
-  statNo?:string
+
+export interface stat1 {
+  statNo?: string
   //料箱编号
   rfid?: string
   //料箱检测的io位,1:有,0:没有
   io?: string
   //重量
   weight?: string
-  ts?:string
+  ts?: string
 }
+
 @Component
-export struct IntelligentWarehousingGo{
-  @Link  entranceWaiting:Array<stat1>
+export struct IntelligentWarehousingGo {
+  @Link entranceWaiting: Array<stat1>
   //暂时固定的料箱编码
-  @Link binCode:string
+  @Link binCode: string
   //定义物料信息
-  @Link MaterialInformation:Array<MaterialInformationList>
-  @State private exchange:Array<exchangeClass>=[]
+  @Link MaterialInformation: Array<MaterialInformationModel>
+  @State private exchange: Array<exchangeClass> = []
   //更改数量的list的index
-  @State  exchangeIndex:number=0
+  @State exchangeIndex: number = 0
   //更改的数量
-  @State exchangeNumber:number=0
+  @State exchangeNumber: number = 0
   //需要展示和更改的物料信息
-  @State index:number=0
-  @State batchCode:string=''
-  @State materialName:string=''
-  @State num:number=0
-  @State seqNo:string=''
-  @State spec:string=''
-  @State materialNo:string='2010100002301'
+  @State index: number = 0
+  @State batchCode: string = ''
+  @State materialName: string = ''
+  @State num: number = 0
+  @State seqNo: string = ''
+  @State spec: string = ''
+  @State materialNo: string = '2010100002301'
   //有无违禁品
-  @Link contraband:number
+  @Link contraband: number
   //料箱等级(类型)
-  @Link vehicleLevel:string
+  @Link vehicleLevel: string
   //自动入库开关
-  @Link automaticWarehousing:number
+  @Link automaticWarehousing: number
   ///料箱状态
-  @Link materialBox:number
+  @Link materialBox: number
   //料箱id
-  @State materialBoxId:string='5817389208-2'
+  @State materialBoxId: string = '5817389208-2'
   //任务单id
-  @State taskSheetId:string='652704381920-2435'
+  @State taskSheetId: string = '652704381920-2435'
   //重量
-  @Link weight:number
+  @Link weight: number
   //正在存料
-  @State storingMaterials:number=0
+  @State storingMaterials: number = 0
   //料箱里的物料
-  @Link private scanStorageList:Array<ScanStorageclass>
+  @Link private scanStorageList: Array<ScanStorageclass>
   //扫码控制器
   textcontroller: TextInputController = new TextInputController()
   //取料箱中物料信息
   @Link private boxMaterials: Array<boxMaterialClass>
+
   //删除操作
-  @Builder itemEnd(index:number) {
-    Row () {
+  @Builder
+  itemEnd(index: number) {
+    Row() {
 
       Button("删除").margin("4vp")
-        .onClick(()=>{
-          this.MaterialInformation.splice(index,1)
+        .onClick(() => {
+          this.MaterialInformation.splice(index, 1)
         })
     }.padding("4vp").justifyContent(FlexAlign.SpaceEvenly)
   }
+
   //物料详情弹窗
   materialDetailsController: CustomDialogController = new CustomDialogController({
-    builder:materialDetails({
-      exchange:this.exchange,
-      exchangeIndex:this.exchangeIndex,
-      exchangeNumber:this.exchangeNumber,
-      MaterialInformation:this.MaterialInformation,
-      index:this.index,
-      batchCode:this.batchCode,
-      materialName:this.materialName,
-      num:this.num,
-      seqNo:this.seqNo,
-      spec:this.spec,
-      materialNo:this.materialNo
+    builder: materialDetails({
+      exchange: this.exchange,
+      exchangeIndex: this.exchangeIndex,
+      exchangeNumber: this.exchangeNumber,
+      MaterialInformation: this.MaterialInformation,
+      index: this.index,
+      batchCode: this.batchCode,
+      materialName: this.materialName,
+      num: this.num,
+      seqNo: this.seqNo,
+      spec: this.spec,
+      materialNo: this.materialNo
 
 
     }),
@@ -92,15 +97,14 @@ export struct IntelligentWarehousingGo{
     gridCount: 4,
     customStyle: true,
   })
-
   //扫码请求
-  ScanStorageCode= async(itemCode:string) : Promise<ScanStorageclass> => {
-    console.log('9999'+this.materialNo)
+  ScanStorageCode = async (itemCode: string): Promise<ScanStorageclass> => {
+    console.log('9999' + this.materialNo)
     let obj: ScanStorageclass
-    let res:ScanStorageclass = await StorageRequest.post("/api/v1/process/circulation/material",{
-      label:this.materialNo+"#gys022#sc022#100#20220929#31"
-    }as ScanStorageclass)
-    console.log('testAge1'+'请求参数'+this.materialNo)
+    let res: ScanStorageclass = await StorageRequest.post("/api/v1/process/circulation/material", {
+      label: this.materialNo + "#gys022#sc022#100#20220929#31"
+    } as ScanStorageclass)
+    console.log('testAge1' + '请求参数' + this.materialNo)
     //let res = await StorageRequest.get("/api/v3/stock/selectSafeList/1")
     console.log('testTag', '扫码成功1!' + JSON.stringify(res))
     obj = JSON.parse(JSON.stringify(res))
@@ -108,23 +112,24 @@ export struct IntelligentWarehousingGo{
     console.log('testTag', '扫码成功1!' + obj.batchCode)
     return obj
   }
+
   build() {
-    Row(){
-      Column(){
-        Row(){
-          if (this.materialBox===0){
+    Row() {
+      Column() {
+        Row() {
+          if (this.materialBox === 0) {
             Image($r('app.media.no_boxes'))
               .width('100%')
               .height("100%")
-              .borderRadius({ topLeft:px2vp(8),topRight:px2vp(8) })
+              .borderRadius({ topLeft: px2vp(8), topRight: px2vp(8) })
 
-          }else if (this.materialBox===1&&this.weight<=15){
+          } else if (this.materialBox === 1 && this.weight <= 15) {
             Image($r('app.media.normal_material_box'))
               .width('100%')
               .height("100%")
               .borderRadius(px2vp(16))
 
-          }else if (this.materialBox===1&&this.weight>=15){
+          } else if (this.materialBox === 1 && this.weight >= 15) {
             Image($r('app.media.overweight_material_box'))
               .width('100%')
               .height("100%")
@@ -134,11 +139,12 @@ export struct IntelligentWarehousingGo{
         }.width('100%')
         .height('40%')
         .borderRadius(px2vp(16))
-        Column(){
-          Row(){
-            Text(this.contraband===1?'违禁品':this.weight===0?'等待':this.weight<=15?'正常':this.weight>=15?'超重':'',)
+
+        Column() {
+          Row() {
+            Text(this.contraband === 1 ? '违禁品' : this.weight === 0 ? '等待' : this.weight <= 15 ? '正常' : this.weight >= 15 ? '超重' : '',)
               .borderRadius(px2vp(8))
-              .backgroundColor(this.contraband===1?$r('app.color.brown_100'):this.weight===0?$r('app.color.grey_100'):this.weight<=15?$r('app.color.green_100'):this.weight>=15?$r('app.color.brown_100'):'')
+              .backgroundColor(this.contraband === 1 ? $r('app.color.brown_100') : this.weight === 0 ? $r('app.color.grey_100') : this.weight <= 15 ? $r('app.color.green_100') : this.weight >= 15 ? $r('app.color.brown_100') : '')
               .fontWeight(FontWeight.Regular)
               .fontColor($r('app.color.black_90'))
               .textAlign(TextAlign.Center)
@@ -147,13 +153,13 @@ export struct IntelligentWarehousingGo{
               .height(px2vp(56))
 
             Blank()
-            Column(){
+            Column() {
               Text('料箱ID')
                 .height('50%')
                 .fontWeight(FontWeight.Regular)
                 .fontSize($r('app.float.fontSize_20'))
                 .fontColor($r('app.color.black_60'))
-              Text(this.materialBox===1||this.materialBox===2?this.materialBoxId:'-')
+              Text(this.materialBox === 1 || this.materialBox === 2 ? this.materialBoxId : '-')
                 .height('50%')
                 .fontWeight(FontWeight.Regular)
                 .fontSize($r('app.float.fontSize_20'))
@@ -162,21 +168,20 @@ export struct IntelligentWarehousingGo{
 
             }.width('60%')
             .height('100%')
-            .padding({right:px2vp(30)})
+            .padding({ right: px2vp(30) })
             .alignItems(HorizontalAlign.End)
 
-
-
           }.width('100%')
           .height('30%')
-          .padding({left:px2vp(30)})
-          Column(){
+          .padding({ left: px2vp(30) })
+
+          Column() {
             Text('入库任务单')
               .height('50%')
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.black_60'))
-            Text(this.materialBox===1||this.materialBox===2?this.taskSheetId:'-')
+            Text(this.materialBox === 1 || this.materialBox === 2 ? this.taskSheetId : '-')
               .height('50%')
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
@@ -184,252 +189,261 @@ export struct IntelligentWarehousingGo{
           }
           .width('100%')
           .height('30%')
-          .padding({right:px2vp(30)})
+          .padding({ right: px2vp(30) })
           .alignItems(HorizontalAlign.End)
+
           Blank()
-          Row(){
-            Text('限载'+'[≤'+"15"+'Kg]')
+          Row() {
+            Text('限载' + '[≤' + "15" + 'Kg]')
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.black_60'))
             Blank()
-            Text(this.materialBox===1||this.materialBox===2?this.weight.toString():'-')
+            Text(this.materialBox === 1 || this.materialBox === 2 ? this.weight.toString() : '-')
               .fontSize(px2vp(48))
               .fontWeight(FontWeight.Bold)
-              .fontColor(this.weight>=15?$r('app.color.brown_100'):$r('app.color.green_100'))
+              .fontColor(this.weight >= 15 ? $r('app.color.brown_100') : $r('app.color.green_100'))
             Text('Kg')
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.black_60'))
           }
-          .padding({right:px2vp(50),left:px2vp(30)})
+          .padding({ right: px2vp(50), left: px2vp(30) })
           .width('100%')
           .height('30%')
         }.width('100%')
         .height('35%')
-        .borderRadius({ bottomLeft:px2vp(8),bottomRight:px2vp(8) })
+        .borderRadius({ bottomLeft: px2vp(8), bottomRight: px2vp(8) })
         .backgroundColor($r('app.color.process_divider_white_color'))
+
         Blank()
-        Row(){
-          if (this.weight!==0){
+        Row() {
+          if (this.weight !== 0) {
             LoadingProgress()
               .color(Color.Blue)
               .width('10%')
           }
-            Text(this.weight===0?'':this.weight>15?'操作料箱':"自动入库中")
-              .fontWeight(FontWeight.Regular)
-              .fontSize($r('app.float.fontSize_20'))
-              .fontColor($r('app.color.black_60'))
+          Text(this.weight === 0 ? '' : this.weight > 15 ? '操作料箱' : "自动入库中")
+            .fontWeight(FontWeight.Regular)
+            .fontSize($r('app.float.fontSize_20'))
+            .fontColor($r('app.color.black_60'))
         }.width('100%')
-         .height('5%')
+        .height('5%')
         .justifyContent(FlexAlign.Center)
-          Row(){
-            if (this.weight!==0&&this.weight<=15){
-              Button('停止自动入库', { type: ButtonType.Normal, stateEffect: true })
-                .width('100%')
-                .height('90%')
-                .borderRadius(px2vp(50))
-                .backgroundColor($r('app.color.brown_100'))
-                .onClick(()=>{
-                  this.automaticWarehousing=1
-
-                })
-            }else if (this.weight==0||this.weight>15||this.contraband===1){
-              Button('启动自动入库', { type: ButtonType.Normal, stateEffect: true })
-                .width('100%')
-                .height('90%')
-                .borderRadius(px2vp(50))
-                .opacity(0.2)
-                .backgroundColor($r('app.color.blue_100'))
-                .onClick(()=>{
-                  this.automaticWarehousing=0
 
-                })
-            }
-            // else if (this.weight!==0&&this.weight<=15){
-            //   Button('启动自动入库', { type: ButtonType.Normal, stateEffect: true })
-            //     .width('100%')
-            //     .height('90%')
-            //     .borderRadius(px2vp(50))
-            //     .backgroundColor($r('app.color.blue_100'))
-            //
-            // }
+        Row() {
+          if (this.weight !== 0 && this.weight <= 15) {
+            Button('停止自动入库', { type: ButtonType.Normal, stateEffect: true })
+              .width('100%')
+              .height('90%')
+              .borderRadius(px2vp(50))
+              .backgroundColor($r('app.color.brown_100'))
+              .onClick(() => {
+                this.automaticWarehousing = 1
 
+              })
+          } else if (this.weight == 0 || this.weight > 15 || this.contraband === 1) {
+            Button('启动自动入库', { type: ButtonType.Normal, stateEffect: true })
+              .width('100%')
+              .height('90%')
+              .borderRadius(px2vp(50))
+              .opacity(0.2)
+              .backgroundColor($r('app.color.blue_100'))
+              .onClick(() => {
+                this.automaticWarehousing = 0
 
+              })
           }
-          .width('100%')
-          .height('10%')
-        
+          // else if (this.weight!==0&&this.weight<=15){
+          //   Button('启动自动入库', { type: ButtonType.Normal, stateEffect: true })
+          //     .width('100%')
+          //     .height('90%')
+          //     .borderRadius(px2vp(50))
+          //     .backgroundColor($r('app.color.blue_100'))
+          //
+          // }
+
+
+        }
+        .width('100%')
+        .height('10%')
+
       }.width(px2vp(608))
       .height('100%')
-      .margin({right:px2vp(24)})
-      Column(){
-        Row(){
+      .margin({ right: px2vp(24) })
+
+      Column() {
+        Row() {
           Image($r('app.media.shaoma'))
             .width(px2vp(32))
             .height(px2vp(32))
-          Row(){
-            TextInput({ text:this.materialNo,
+          Row() {
+            TextInput({ text: this.materialNo,
               placeholder: '请点击扫码或者输入物料编码',
-              controller: this.textcontroller }).width('92%')
-              .placeholderFont({size:$r('app.float.fontSize_24')})
+              controller: this.textcontroller })
+              .width('92%')
+              .placeholderFont({ size: $r('app.float.fontSize_24') })
               .height('100%')
               .fontWeight(FontWeight.Medium)
               .fontSize($r('app.float.fontSize_24'))
               .backgroundColor("#ffff")
               .borderRadius(21)
               .onSubmit(() => {
-               //执行什么操作
-                if (this.automaticWarehousing===1) {
-                  this.materialBox=1
-                  console.log('testAge'+'请求参数'+this.materialNo)
-                  this.ScanStorageCode(this.materialNo).then((obj : MaterialInformationList)=>{
+                //执行什么操作
+                if (this.automaticWarehousing === 1) {
+                  this.materialBox = 1
+                  console.log('testAge' + '请求参数' + this.materialNo)
+                  this.ScanStorageCode(this.materialNo).then((obj: MaterialInformationModel) => {
                     this.MaterialInformation.push(obj)
                   })
                 }
 
               })
-              .onChange((value:string)=>{
-              //  this.itemCode=value
+              .onChange((value: string) => {
+                //  this.itemCode=value
               })
           }.width('80%')
-          .padding({left:10})
+          .padding({ left: 10 })
+
           Image($r('app.media.search'))
             .width(px2vp(32))
             .height(px2vp(32))
-            .onClick(async ()=>{
-              if (this.automaticWarehousing===1) {
-                this.materialBox=1
-                console.log('testAge'+'请求参数'+this.materialNo)
-                this.ScanStorageCode(this.materialNo).then((obj : MaterialInformationList)=>{
+            .onClick(async () => {
+              if (this.automaticWarehousing === 1) {
+                this.materialBox = 1
+                console.log('testAge' + '请求参数' + this.materialNo)
+                this.ScanStorageCode(this.materialNo).then((obj: MaterialInformationModel) => {
                   this.MaterialInformation.push(obj)
                 })
               }
 
             })
         }
-        .border({width:0.1})
+        .border({ width: 0.1 })
         .borderRadius(40)
         .width(px2vp(608))
         .height(px2vp(80))
         .backgroundColor('#fff')
         .justifyContent(FlexAlign.Center)
-        Column(){
+
+        Column() {
           List() {
-            ForEach(this.MaterialInformation, (item:MaterialInformationList,index:number) => {
-             // ForEach(this.exchange,(exchangeItem:exchangeClass,exchangeIndex:number)=>{
-                ListItem() {
-                  Row(){
-                    Column(){
-                      Text(item.materialName)
+            ForEach(this.MaterialInformation, (item: MaterialInformationModel, index: number) => {
+              // ForEach(this.exchange,(exchangeItem:exchangeClass,exchangeIndex:number)=>{
+              ListItem() {
+                Row() {
+                  Column() {
+                    Text(item.materialName)
+                      .fontWeight(FontWeight.Medium)// Text(item.materialCode)
+                      .fontSize($r('app.float.fontSize_24'))
+                    Text(item.materialNo)
+                      .fontColor("#666666")
+                      .fontWeight(FontWeight.Regular)
+                      .fontSize($r('app.float.fontSize_20'))
+                    Text(item.type)
+                      .fontColor("#666666")
+                      .fontWeight(FontWeight.Regular)
+                      .fontSize($r('app.float.fontSize_20'))
+                    Row() {
+                      Text(item.num?.toString())
+                        .fontWeight(FontWeight.Bold)
+                        .fontSize($r('app.float.fontSize_38'))
+                      Text('个')
+                        .fontColor("#666666")
                         .fontWeight(FontWeight.Medium)
-                     // Text(item.materialCode)
                         .fontSize($r('app.float.fontSize_24'))
-                      Text(item.materialNo)
-                        .fontColor("#666666")
-                        .fontWeight(FontWeight.Regular)
-                        .fontSize($r('app.float.fontSize_20'))
-                      Text(item.type)
-                        .fontColor("#666666")
-                        .fontWeight(FontWeight.Regular)
-                        .fontSize($r('app.float.fontSize_20'))
-                      Row(){
-                        Text(item.num?.toString())
-                          .fontWeight(FontWeight.Bold)
-                          . fontSize($r('app.float.fontSize_38'))
-                        Text('个')
-                          .fontColor("#666666")
-                          .fontWeight(FontWeight.Medium)
-                          .fontSize($r('app.float.fontSize_24'))
-                      }
-                    }.width('70%')
-                    .padding({left:px2vp(30)})
-                    .borderRadius(10)
-                    .alignItems(HorizontalAlign.Start)
+                    }
+                  }
+                  .width('70%')
+                  .padding({ left: px2vp(30) })
+                  .borderRadius(10)
+                  .alignItems(HorizontalAlign.Start)
+                  .justifyContent(FlexAlign.Center)
+                  .height('100%')
+                  .backgroundColor(item.materialNo === "42944402000591" ? $r('app.color.brown_100') : '#fff')
+
+                  if (item.exchangeNumber !== undefined) {
+                    Row() {
+                      Image((item.exchangeNumber!) >= 0 ? $r('app.media.plus') : $r('app.media.reduce'))
+                        .width(px2vp(30))
+                        .height((item.exchangeNumber!) >= 0 ? px2vp(30) : px2vp(8))
+                      Text((item.exchangeNumber!) >= 0 ? item.exchangeNumber?.toString() : (-(item.exchangeNumber!))?.toString())// .backgroundColor(item.exchangeNumber>0?$r('app.color.green_100'):item?.exchangeNumber===0?'':$r('app.color.brown_100'))
+                        .fontSize($r('app.float.fontSize_38'))
+                        .fontWeight(FontWeight.Bold)
+                        .fontColor((item.exchangeNumber!) >= 0 ? $r('app.color.green_100') : $r('app.color.brown_100'))
+                    }.width('20%')
                     .justifyContent(FlexAlign.Center)
+                    .alignItems(VerticalAlign.Center)
                     .height('100%')
-                    .backgroundColor(item.materialNo==="42944402000591"?$r('app.color.brown_100'):'#fff')
-                    if (item.exchangeNumber!==undefined){
-                      Row(){
-                        Image((item.exchangeNumber!)>=0?$r('app.media.plus'):$r('app.media.reduce'))
-                          .width(px2vp(30))
-                          .height((item.exchangeNumber!)>=0?px2vp(30):px2vp(8))
-                        Text((item.exchangeNumber!)>=0?item.exchangeNumber?.toString():(-(item.exchangeNumber!))?.toString())
-                          // .backgroundColor(item.exchangeNumber>0?$r('app.color.green_100'):item?.exchangeNumber===0?'':$r('app.color.brown_100'))
-                          . fontSize($r('app.float.fontSize_38'))
-                          .fontWeight(FontWeight.Bold)
-                          .fontColor((item.exchangeNumber!)>=0?$r('app.color.green_100'):$r('app.color.brown_100'))
-                      }.width('20%')
-                      .justifyContent(FlexAlign.Center)
-                      .alignItems(VerticalAlign.Center)
-                      .height('100%')
-                    }else {
-                      Column(){
-                      }.width('20%')
-                      .justifyContent(FlexAlign.Center)
-                      .alignItems(HorizontalAlign.Center)
-                      .height('100%')
-                    }
+                  } else {
+                    Column() {
+                    }.width('20%')
+                    .justifyContent(FlexAlign.Center)
+                    .alignItems(HorizontalAlign.Center)
+                    .height('100%')
+                  }
 
-                    Column(){
-                      Image($r('app.media.subscript_space'))
-                        .width($r('app.float.storage_set_image_effect_height'))
-                        .height($r('app.float.storage_set_image_effect_height'))
+                  Column() {
+                    Image($r('app.media.subscript_space'))
+                      .width($r('app.float.storage_set_image_effect_height'))
+                      .height($r('app.float.storage_set_image_effect_height'))
 
-                    }.width('10%')
-                    .justifyContent(FlexAlign.End)
-                    .alignItems(HorizontalAlign.End)
-                    .height('100%')
+                  }.width('10%')
+                  .justifyContent(FlexAlign.End)
+                  .alignItems(HorizontalAlign.End)
+                  .height('100%')
 
-                  }.width(px2vp(608))
-                  .height(px2vp(210))
-                  .borderRadius($r('app.float.borderRadius_16'))
-                  .backgroundColor('#fff')
-                  .onClick(()=>{
-                 //  this.exchangeIndex=exchangeIndex!
-                    this.index=index
-                    this.batchCode=item.batchCode!
-                    this.materialName=item.materialName!
-                    this.materialNo=item.materialNo!
-                    this.num=item.num!
-                    this.seqNo=item.seqNo!
-                    this.spec=item.spec!
-                    //if (item.exchangeNumber===null){
-                     // this.MaterialInformation[index].exchangeNumber=0
-
-                    // if (this.exchangeNumber!==0) {
-                    //   this.MaterialInformation[index]= {
-                    //     taskId: this.MaterialInformation[index].taskId,
-                    //     materialName: this.MaterialInformation[index].materialName,
-                    //     exchangeNumber:0,
-                    //     num:this.MaterialInformation[index].num,
-                    //     materialNo: this.MaterialInformation[index].materialNo,
-                    //     batchCode: this.MaterialInformation[index].batchCode,
-                    //     seqNo: this.MaterialInformation[index].seqNo,
-                    //     spec: this.MaterialInformation[index].spec,
-                    //   }
-                    // }
-                    // }else if (item.exchangeNumber!==0){
-                    //   item.exchangeNumber=0
-                    // }
-
-                   // this.exchangeNumber=item.exchangeNumber!
-                   //  this.scanStorageList[index]= {
-                   //    taskId: item.taskId!,
-                   //    materialName: item.materialName!,
-                   //    num: item.num!,
-                   //    exchangeNumber:this.exchangeNumber!,
-                   //    materialNo: item.materialNo!,
-                   //    batchCode: item.batchCode!,
-                   //    seqNo: item.seqNo!,
-                   //    spec: item.spec!,
-                   //  }
-                    this.materialDetailsController.open()
-                  })
                 }
-                .swipeAction({ end:this.itemEnd(index)})
-                .margin({right:px2vp(12),top:px2vp(24),bottom:px2vp(24)})
-            //  })
+                .width(px2vp(608))
+                .height(px2vp(210))
+                .borderRadius($r('app.float.borderRadius_16'))
+                .backgroundColor('#fff')
+                .onClick(() => {
+                  //  this.exchangeIndex=exchangeIndex!
+                  this.index = index
+                  this.batchCode = item.batchCode!
+                  this.materialName = item.materialName!
+                  this.materialNo = item.materialNo!
+                  this.num = item.num!
+                  this.seqNo = item.seqNo!
+                  this.spec = item.spec!
+                  //if (item.exchangeNumber===null){
+                  // this.MaterialInformation[index].exchangeNumber=0
+
+                  // if (this.exchangeNumber!==0) {
+                  //   this.MaterialInformation[index]= {
+                  //     taskId: this.MaterialInformation[index].taskId,
+                  //     materialName: this.MaterialInformation[index].materialName,
+                  //     exchangeNumber:0,
+                  //     num:this.MaterialInformation[index].num,
+                  //     materialNo: this.MaterialInformation[index].materialNo,
+                  //     batchCode: this.MaterialInformation[index].batchCode,
+                  //     seqNo: this.MaterialInformation[index].seqNo,
+                  //     spec: this.MaterialInformation[index].spec,
+                  //   }
+                  // }
+                  // }else if (item.exchangeNumber!==0){
+                  //   item.exchangeNumber=0
+                  // }
+
+                  // this.exchangeNumber=item.exchangeNumber!
+                  //  this.scanStorageList[index]= {
+                  //    taskId: item.taskId!,
+                  //    materialName: item.materialName!,
+                  //    num: item.num!,
+                  //    exchangeNumber:this.exchangeNumber!,
+                  //    materialNo: item.materialNo!,
+                  //    batchCode: item.batchCode!,
+                  //    seqNo: item.seqNo!,
+                  //    spec: item.spec!,
+                  //  }
+                  this.materialDetailsController.open()
+                })
+              }
+              .swipeAction({ end: this.itemEnd(index) })
+              .margin({ right: px2vp(12), top: px2vp(24), bottom: px2vp(24) })
+
+              //  })
             })
           }
           .lanes(2)
@@ -441,114 +455,122 @@ export struct IntelligentWarehousingGo{
 
         }.width(px2vp(1260))
         .height('92%')
-        .margin({right:px2vp(24)})
+        .margin({ right: px2vp(24) })
       }.width(px2vp(1260))
       .height('100%')
       .alignItems(HorizontalAlign.Start)
     }.width('100%')
     .height('92%')
-    .padding({left:px2vp(24),right:px2vp(24),top:$r('app.float.fontSize_20'),bottom:$r('app.float.fontSize_20')})
- }
+    .padding({
+      left: px2vp(24),
+      right: px2vp(24),
+      top: $r('app.float.fontSize_20'),
+      bottom: $r('app.float.fontSize_20')
+    })
+  }
 }
+
 @CustomDialog
   ///无批次号物料详情弹窗
 struct materialDetails {
-  @Link exchangeNumber:number
-  @Link index:number
-  @Link batchCode:string
-  @Link materialName:string
-  @Link exchangeIndex:number
+  @Link exchangeNumber: number
+  @Link index: number
+  @Link batchCode: string
+  @Link materialName: string
+  @Link exchangeIndex: number
   // @State materialNo:string=''
-  @Link num:number
-  @Link seqNo:string
-  @Link spec:string
-  @Link  materialNo:string
-  @Link private exchange:Array<exchangeClass>
-  @Link private MaterialInformation:Array<MaterialInformationList>
+  @Link num: number
+  @Link seqNo: string
+  @Link spec: string
+  @Link materialNo: string
+  @Link private exchange: Array<exchangeClass>
+  @Link private MaterialInformation: Array<MaterialInformationModel>
   scroller: Scroller = new Scroller()
-  @State navigation:number=0
+  @State navigation: number = 0
   controller: CustomDialogController
+
   // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
   build() {
     Column() {
-      Column(){
+      Column() {
 
       }.width('100%')
       .height('20%')
-      .onClick(()=>{
-        this.exchangeNumber=0
+      .onClick(() => {
+        this.exchangeNumber = 0
         this.controller.close()
       })
-      Row(){
-        Row(){
+
+      Row() {
+        Row() {
 
         }.width('25%')
         .height('100%')
-        .onClick(()=>{
-          this.exchangeNumber=0
+        .onClick(() => {
+          this.exchangeNumber = 0
           this.controller.close()
         })
-        Column({space:20}){
+
+        Column({ space: 20 }) {
           Text('物料详情')
             .textAlign(TextAlign.Center)
             .width('100%')
             .height('20%')
             .fontWeight(FontWeight.Medium)
             .fontSize($r('app.float.fontSize_38'))
-          Column({space:10}){
+          Column({ space: 10 }) {
             Text(this.materialName)
               .fontSize($r('app.float.fontSize_24'))
               .fontWeight(FontWeight.Medium)
               .width('100%')
-            Text('物料编码:'+this.materialNo)
+            Text('物料编码:' + this.materialNo)
               .fontSize($r('app.float.fontSize_20'))
               .textAlign(TextAlign.Start)
               .fontColor('#99000000')
               .width('100%')
-            Text('规格描述'+this.spec)
+            Text('规格描述' + this.spec)
               .fontSize($r('app.float.fontSize_20'))
               .textAlign(TextAlign.Start)
               .fontColor('#99000000')
               .width('100%')
-            Text('批次号:'+this.batchCode)
+            Text('批次号:' + this.batchCode)
               .fontSize($r('app.float.fontSize_20'))
               .textAlign(TextAlign.Start)
               .fontColor('#99000000')
               .width('100%')
-              .textOverflow({overflow:TextOverflow.Ellipsis})
-            Text('序列号:'+this.seqNo)
+              .textOverflow({ overflow: TextOverflow.Ellipsis })
+            Text('序列号:' + this.seqNo)
               .fontSize($r('app.float.fontSize_20'))
               .textAlign(TextAlign.Start)
               .fontColor('#99000000')
               .width('100%')
 
 
-
           }.width('40%')
           .height('30%')
 
           Divider().vertical(false)
             .width('60%')
-          Column(){
+          Column() {
             Text('录入数量')
               .fontSize($r('app.float.fontSize_20'))
               .textAlign(TextAlign.Start)
               .fontColor('#99000000')
               .width('40%')
-            Row(){
+            Row() {
               Image($r('app.media.subtract_disabled'))
                 .width(px2vp(80))
                 .height(px2vp(80))
-                .border({width:0.8})
-                .borderRadius({ topLeft:px2vp(16),bottomLeft:px2vp(16) })
-                .onClick(()=>{
+                .border({ width: 0.8 })
+                .borderRadius({ topLeft: px2vp(16), bottomLeft: px2vp(16) })
+                .onClick(() => {
                   this.num--
                   this.exchangeNumber--
-                  this.MaterialInformation[this.index]= {
+                  this.MaterialInformation[this.index] = {
                     taskId: this.MaterialInformation[this.index].taskId,
                     materialName: this.MaterialInformation[this.index].materialName,
-                   // exchangeNumber:this.MaterialInformation[this.index].exchangeNumber,
-                    exchangeNumber:this.exchangeNumber,
+                    // exchangeNumber:this.MaterialInformation[this.index].exchangeNumber,
+                    exchangeNumber: this.exchangeNumber,
                     num: this.num,
                     materialNo: this.MaterialInformation[this.index].materialNo,
                     batchCode: this.MaterialInformation[this.index].batchCode,
@@ -556,24 +578,23 @@ struct materialDetails {
                     spec: this.MaterialInformation[this.index].spec,
                   }
                 })
-              TextInput({text: this.num?.toString()})
+              TextInput({ text: this.num?.toString() })
                 .fontSize($r('app.float.fontSize_38'))
                 .fontWeight(FontWeight.Bold)
-                .fontColor($r('app.color.general_font_color'))
-                  // .opacity($r('app.float.general_font_opacity'))
+                .fontColor($r('app.color.general_font_color'))// .opacity($r('app.float.general_font_opacity'))
                 .height(px2vp(80))
                 .width(px2vp(154))
                 .type(InputType.Number)
                 .textAlign(TextAlign.Center)
                 .backgroundColor($r('app.color.general_card_background_color'))
                 .borderRadius(0)
-                .border({width:0.8})
-                .onChange(()=>{
-                  this.MaterialInformation[this.index]= {
+                .border({ width: 0.8 })
+                .onChange(() => {
+                  this.MaterialInformation[this.index] = {
                     taskId: this.MaterialInformation[this.index].taskId!,
                     materialName: this.MaterialInformation[this.index].materialName!,
-                   // exchangeNumber:this.MaterialInformation[this.index].exchangeNumber!,
-                    exchangeNumber:this.exchangeNumber,
+                    // exchangeNumber:this.MaterialInformation[this.index].exchangeNumber!,
+                    exchangeNumber: this.exchangeNumber,
                     num: this.num,
                     materialNo: this.MaterialInformation[this.index].materialNo!,
                     batchCode: this.MaterialInformation[this.index].batchCode!,
@@ -585,17 +606,17 @@ struct materialDetails {
               Image($r('app.media.add_disabled'))
                 .width(px2vp(80))
                 .height(px2vp(80))
-                .border({width:0.8})
-                .borderRadius({topRight:px2vp(16),bottomRight:px2vp(16)})
+                .border({ width: 0.8 })
+                .borderRadius({ topRight: px2vp(16), bottomRight: px2vp(16) })
 
-                .onClick(()=>{
+                .onClick(() => {
                   this.exchangeNumber++
                   this.num++
-                  this.MaterialInformation[this.index]= {
+                  this.MaterialInformation[this.index] = {
                     taskId: this.MaterialInformation[this.index].taskId,
                     materialName: this.MaterialInformation[this.index].materialName,
                     //exchangeNumber:this.MaterialInformation[this.index].exchangeNumber,
-                    exchangeNumber:this.exchangeNumber,
+                    exchangeNumber: this.exchangeNumber,
                     num: this.num,
                     materialNo: this.MaterialInformation[this.index].materialNo,
                     batchCode: this.MaterialInformation[this.index].batchCode,
@@ -617,22 +638,23 @@ struct materialDetails {
         .height(px2vp(670))
         .backgroundColor('#F1F3F5')
         .borderRadius(20)
-        Row(){
+
+        Row() {
 
         }.width('25%')
         .height('100%')
-        .onClick(()=>{
-          this.exchangeNumber=0
+        .onClick(() => {
+          this.exchangeNumber = 0
           this.controller.close()
         })
       }.width('100%')
       .height('60%')
 
-      Column(){
+      Column() {
 
       }.width('100%')
       .height('20%')
-      .onClick(()=>{
+      .onClick(() => {
         this.controller.close()
       })
 

File diff suppressed because it is too large
+ 15 - 15
entry/src/main/ets/view/ManualOutbound.ets


+ 17 - 17
entry/src/main/ets/view/ManualWarehousing.ets

@@ -1,6 +1,6 @@
 import EquipmentRequest from '../common/util/request/EquipmentRequest'
 import StorageRequest from '../common/util/request/StorageRequest'
-import { MaterialInformationList } from '../model/MaterialInformation'
+import { MaterialInformationModel } from '../model/MaterialInformation'
 import RequestParamModel from '../viewmodel/RequestParamModel'
 import { Materialpositionclass, ScanStorageclass } from './IntelligentWarehousingOutbound'
 import CommonConstants from '../common/constants/CommonConstants'
@@ -35,9 +35,9 @@ export struct ManualWarehousing {
   //更改的数量
   @State exchangeNumber: number = 0
   //料箱中的物料信息
-  @State private boxMaterials: Array<MaterialInformationList> = []
+  @State private boxMaterials: Array<MaterialInformationModel> = []
   //定义物料信息
-  @State private MaterialInformation: Array<MaterialInformationList> = []
+  @State private MaterialInformation: Array<MaterialInformationModel> = []
   ///料箱状态
   @State materialBox: number = 0
   // 中间输入框绑定的值
@@ -73,17 +73,17 @@ export struct ManualWarehousing {
   ScanStorageCode = async (itemCode: string) => {
 
     this.scanCodeValue = ""
-    let res: MaterialInformationList = await StorageRequest.post("/api/v1/process/circulation/material", {
+    let res: MaterialInformationModel = await StorageRequest.post("/api/v1/process/circulation/material", {
       label: itemCode //"#gys022#sc022#100#20220929#31"
-    } as MaterialInformationList)
+    } as MaterialInformationModel)
 
     //let res = await StorageRequest.get("/api/v3/stock/selectSafeList/1")
     // {"batchCode":"BM47111400130447;SL5","codeType":"BATCH","materialCode":"47111400130447","materialName":"穿心电容","num":5,"spec":"G CT52-4-1-2C1-63V-103-M","unitDictLabel":"个","unitDictValue":"个"}
-    let obj: MaterialInformationList = JSON.parse(JSON.stringify(res))
+    let obj: MaterialInformationModel = JSON.parse(JSON.stringify(res))
 
 
     // 扫码完成之后,如果数组中有对应的值,就添加数量否则就push
-    let toPushArray: MaterialInformationList[] = [...this.MaterialInformation]
+    let toPushArray: MaterialInformationModel[] = [...this.MaterialInformation]
 
     let has = false
     for (let i = 0; i < toPushArray.length; i++) {
@@ -142,8 +142,8 @@ export struct ManualWarehousing {
     return this.recentlyRecordObject
   }
   //后端入库操作
-  Warehousing = async (): Promise<MaterialInformationList[]> => {
-    let res: MaterialInformationList[] = await StorageRequest.post("/api/v1/wmsOrder/inBox", {
+  Warehousing = async (): Promise<MaterialInformationModel[]> => {
+    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/wmsOrder/inBox", {
       houseNo: '1',
       stanCode: CommonConstants.STATION_CODE,
       vehicleCode: this.recentlyRecordObject.rfid,
@@ -163,8 +163,8 @@ export struct ManualWarehousing {
 
   }
   //硬件请求入库操作
-  warehousingHttp = async (): Promise<MaterialInformationList> => {
-    let res: MaterialInformationList = await StorageRequest.post("/api/v1/wcs/stockin", {
+  warehousingHttp = async (): Promise<MaterialInformationModel> => {
+    let res: MaterialInformationModel = await StorageRequest.post("/api/v1/wcs/stockin", {
       boxNo: this.recentlyRecordObject.rfid,
       position: CommonConstants.STATION_CODE,
       mtype: this.vehicleLevel
@@ -173,8 +173,8 @@ export struct ManualWarehousing {
     return res
   }
   //查询取出料箱里面的物料信息
-  boxMaterialHttp = async (): Promise<MaterialInformationList[]> => {
-    let res: MaterialInformationList[] = await StorageRequest.post("/api/v1/stock/list", {
+  boxMaterialHttp = async (): Promise<MaterialInformationModel[]> => {
+    let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/stock/list", {
       //读取RFId的料箱编码,要根据硬件读到的改
       vehicleCode: this.materialNo
     } as RequestParamModel)
@@ -287,7 +287,7 @@ export struct ManualWarehousing {
             // 扫码之后在左边rfid下面的列表
             Column() {
               List() {
-                ForEach(this.boxMaterials, (item: MaterialInformationList, index: number) => {
+                ForEach(this.boxMaterials, (item: MaterialInformationModel, index: number) => {
                   ListItem() {
                     Row() {
                       Column() {
@@ -414,7 +414,7 @@ export struct ManualWarehousing {
 
             Column() {
               List() {
-                ForEach(this.MaterialInformation, (item: MaterialInformationList, index: number) => {
+                ForEach(this.MaterialInformation, (item: MaterialInformationModel, index: number) => {
                   // ForEach(this.exchange,(exchangeItem:exchangeClass,exchangeIndex:number)=>{
 
                   ListItem() {
@@ -567,7 +567,7 @@ export struct ManualWarehousing {
               .backgroundColor($r('app.color.blue_100'))
               .onClick(() => {
                 //   把中间的数据push到左边的数组,如果xx一样就数量相加
-                let toPushArray: MaterialInformationList[] = [...this.boxMaterials]
+                let toPushArray: MaterialInformationModel[] = [...this.boxMaterials]
 
                 this.MaterialInformation.forEach((middleBox) => {
 
@@ -722,7 +722,7 @@ struct materialDetails {
   @Link seqNo: string
   @Link spec: string
   @Link materialNo: string
-  @Link private MaterialInformation: Array<MaterialInformationList>
+  @Link private MaterialInformation: Array<MaterialInformationModel>
   scroller: Scroller = new Scroller()
   @State navigation: number = 0
   controller: CustomDialogController

+ 3 - 6
entry/src/main/ets/viewmodel/RequestParamModel.ets

@@ -1,5 +1,5 @@
 //通用请求后台参数
-import { MaterialInformationList } from '../model/MaterialInformation'
+import { MaterialInformationModel } from '../model/MaterialInformation'
 import { InDataClass } from '../pages/RfidAllocation'
 import { detailsListvlass } from '../view/IntelligentWarehousingOutbound'
 import MaterialInfo from './MaterialInfo'
@@ -50,7 +50,7 @@ export default class RequestParamModel {
   processUserReportList?: RequestParamModel[]
   accessoriesType?: string
   label?: string
-  circulationDetail?: MaterialInformationList[]
+  circulationDetail?: MaterialInformationModel[]
   houseNo?: string
   targetType?: string
   vehicleCode?: string
@@ -60,8 +60,5 @@ export default class RequestParamModel {
   creator?: string
   state?: number
   orderId?: string
-  processVehicleMaterialList?: MaterialInformationList[]
-
-
-
+  processVehicleMaterialList?: MaterialInformationModel[]
 }