소스 검색

零星叫料

cjb 1 주 전
부모
커밋
ed50a406f6

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

@@ -33,7 +33,7 @@ const ProcessRequest = axios.create(
 ProcessRequest.interceptors.request.use((config: InternalAxiosRequestConfig) => {
 
   // 以后登录之后可以在这里传
-  config.headers.Authorization = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOnsic3RhdGlvbkNvZGUiOiJ6aHVhbmd0aWFvMSIsInN0YXRpb25UeXBlIjoiMTgiLCJkZXB0SWQiOjE3LCJpZCI6MTAwMDAsInN0YXRpb25JcCI6IjE5Mi4xNjguMS4xMSIsInVzZXJOYW1lIjoiYWRtaW4iLCJvcmdJZCI6MTcsInN0YXRpb25JZCI6Njh9LCJkZXZpY2UiOiJhaW8iLCJlZmYiOjE3NDgzMTI4MjM0NDAsInJuU3RyIjoiUzBwekxoRWx6azMySVRFS0FKazZrMTBVQmpYaUYxUEQifQ.9V6ZcUUYb9kDzD4HEsbrK9PhI65biY1fXW0g7e4lmXE"
+  config.headers.Authorization = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOnsiZGVwdElkIjoxNywiaWQiOjEwMDAwLCJhdmF0YXIiOiIvamdmaWxlLy8yMDI0LzUvMjcvMjc0MzI5Mzk1ODM4ODUyLmpwZyIsInVzZXJOYW1lIjoiYWRtaW4iLCJvcmdJZCI6MTd9LCJkZXZpY2UiOiJiYWNrIiwiZWZmIjoxNzQ4NDIyMDk5MTk3LCJyblN0ciI6InduUktQS25iQmpVQ2hYTEJBbk5YbXdSZU0yOG5PQ1hzIn0.2be90J5J2sjxPgn1GJqNuXTH5XD9GF4t4jM6qmxrdVg"
    //config.headers.Authorization ="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOnsic3RhdGlvbkNvZGUiOiJ6aHVhbmd0aWFvMSIsInN0YXRpb25UeXBlIjoiMTgiLCJkZXB0SWQiOjE3LCJpZCI6MTAwMDAsInN0YXRpb25JcCI6IjE5Mi4xNjguMS4xMSIsInVzZXJOYW1lIjoiYWRtaW4iLCJvcmdJZCI6MTcsInN0YXRpb25JZCI6Njh9LCJkZXZpY2UiOiJhaW8iLCJlZmYiOjE3NDgwNTQ4ODg5MzUsInJuU3RyIjoiMmJ5NnJlOVpMa2JZOE1CcjBHSlBENjlXZTNwSjgyREIifQ.nY0PPEjgjW2-PX1TqI_SGxa5Mu4dGOCwbGDitvN_oqA"
   //config.headers.Authorization ="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOnsiaWQiOjM3LCJsb2dpblR5cGUiOiJhaW8ifSwiZGV2aWNlIjoiYWlvIiwiZWZmIjoxNzE3NTExMjYwODI4LCJyblN0ciI6InRSenNBTGdlZ3lqS0FHeDZTSkdYZTNLbFY3eWh1OG1PIn0.FVAeESiz_PH1NtBFDmGZr0IwtXzubV2d8JTQdGdJnxc"
   printRequest(config)

+ 303 - 0
entry/src/main/ets/view/BarcodeAssociationDialog.ets

@@ -0,0 +1,303 @@
+//条码关联
+import TaskSeqVO from '../viewmodel/process/TaskSeqInfo'
+@CustomDialog
+export struct BarcodeAssociationDialog {
+  private scrollerMaterial: Scroller = new Scroller()
+  //0:序列号排序,1:铭牌号排序 -1:默认
+  @State currentClick:number = -1
+  @State originalBarcodeList: BarcodeInfo[] = [];
+  @State BarcodeList: BarcodeInfo[] = [
+    {
+      streamNumber: "SN20231001-001",
+      serialNumber: "",
+      nameplateNumber: ""
+    },
+    {
+      streamNumber: "SN20231002-002",
+      serialNumber: "SR987654321",
+      nameplateNumber: "NP-XYZ-2023-002"
+    },
+    {
+      streamNumber: "SN20231003-003",
+      serialNumber: "SR456789123",
+      nameplateNumber: "NP-DEF-2023-003"
+    },
+    {
+      streamNumber: "SN20231004-004",
+      serialNumber: "SR789123456",
+      nameplateNumber: "NP-GHI-2023-004"
+    },
+    {
+      streamNumber: "SN20231001-001",
+      serialNumber: "",
+      nameplateNumber: ""
+    },
+    {
+      streamNumber: "SN20231001-001",
+      serialNumber: "SN20231006-006",
+      nameplateNumber: ""
+    },
+    {
+      streamNumber: "SN20231005-005",
+      serialNumber: "SR321654987",
+      nameplateNumber: "NP-JKL-2023-005"
+    },
+    {
+      streamNumber: "SN20231006-006",
+      serialNumber: "",
+      nameplateNumber: "SN20231006-006"
+    },
+    {
+      streamNumber: "SN20231007-007",
+      serialNumber: "SR147258369",
+      nameplateNumber: "NP-PQR-2023-007"
+    },
+    {
+      streamNumber: "SN20231008-008",
+      serialNumber: "",
+      nameplateNumber: "NP-STU-2023-008"
+    },
+    {
+      streamNumber: "SN20231009-009",
+      serialNumber: "",
+      nameplateNumber: ""
+    },
+    {
+      streamNumber: "SN20231010-010",
+      serialNumber: "SR852963741",
+      nameplateNumber: ""
+    }
+  ];
+  controller: CustomDialogController
+  onConfirm: () => void = () => {
+  }
+
+  //序列号排序,没有的在前面
+  onSerialNumberClick() {
+    if (this.currentClick === 0) {
+      this.BarcodeList = [...this.originalBarcodeList];
+      this.currentClick = -1;
+    } else {
+      this.BarcodeList.sort((a, b) => {
+        const aSerial = a.serialNumber ?? "";
+        const bSerial = b.serialNumber ?? "";
+        const aStream = a.streamNumber ?? "";
+        const bStream = b.streamNumber ?? "";
+
+        if (!aSerial && !bSerial) {
+          return aStream.localeCompare(bStream);
+        } else if (!aSerial) {
+          return -1;
+        } else if (!bSerial) {
+          return 1;
+        } else {
+          return aStream.localeCompare(bStream);
+        }
+      });
+      this.currentClick = 0;
+    }
+  }
+  //铭牌号排序,没有的在前面
+  onNameplateClick() {
+    if (this.currentClick === 1) {
+      this.BarcodeList = [...this.originalBarcodeList];
+      this.currentClick = -1;
+    } else {
+      this.BarcodeList.sort((a, b) => {
+        const aNameplate = a.nameplateNumber ?? "";
+        const bNameplate = b.nameplateNumber ?? "";
+        const aStream = a.streamNumber ?? "";
+        const bStream = b.streamNumber ?? "";
+
+        if (!aNameplate && !bNameplate) {
+          return aStream.localeCompare(bStream);
+        } else if (!aNameplate) {
+          return -1;
+        } else if (!bNameplate) {
+          return 1;
+        } else {
+          return aStream.localeCompare(bStream);
+        }
+      });
+      this.currentClick = 1;
+    }
+  }
+
+  aboutToAppear(): void {
+    this.originalBarcodeList = [...this.BarcodeList];
+  }
+
+  build() {
+    Column() {
+      Column() {
+        Text("条码关联")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }.height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+
+      Row() {
+        Row(){
+          Text(`流水号`)
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_24'))
+        }
+        .width('33%')
+        .justifyContent(FlexAlign.Center)
+        Row(){
+          Text(`序列号`)
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_24'))
+          Image($r('app.media.process_sort'))
+            .width($r('app.float.virtualSize_48'))
+            .height($r('app.float.virtualSize_48'))
+            .fillColor(this.currentClick === 0 ?$r('app.color.0A84FF'):$r('app.color.FFFFFF'))
+        }
+        .width('33%')
+        .justifyContent(FlexAlign.Center)
+        .onClick(()=>{
+          this.onSerialNumberClick();
+        })
+        Row(){
+          Text(`铭牌号`)
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_24'))
+          Image($r('app.media.process_sort'))
+            .width($r('app.float.virtualSize_48'))
+            .height($r('app.float.virtualSize_48'))
+            .fillColor(this.currentClick === 1 ?$r('app.color.0A84FF'):$r('app.color.FFFFFF'))
+        }
+        .width('33%')
+        .justifyContent(FlexAlign.Center)
+        .onClick(()=>{
+         this.onNameplateClick();
+        })
+      }
+      .height('4%')
+      .width('96%')
+      .justifyContent(FlexAlign.End)
+      .margin({left:'2%',right:'2%',top:'1%'})
+
+
+
+      Divider()
+        .vertical(false)
+        .strokeWidth(1)
+        .color($r('app.color.15FFFFFF'))
+        .margin({ top: '1%' ,bottom:'2%',left:'2%',right:'2%'})
+
+      Row(){
+        Column(){
+          List({scroller:this.scrollerMaterial}) {
+            ForEach(this.BarcodeList, (item:BarcodeInfo) => {
+              ListItem() {
+                Row() {
+                  Row(){
+                    Text(item.streamNumber)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                  }
+                  .width('33%')
+                  .justifyContent(FlexAlign.Center)
+                  Row() {
+                    Image($r('app.media.material_qr_code'))
+                      .width($r('app.float.virtualSize_24'))
+                      .height($r('app.float.virtualSize_24'))
+                      .fillColor($r('app.color.FFFFFF'))
+                      .margin({left:'4%'})
+                    TextInput({text:item.serialNumber,placeholder:item.serialNumber})
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .width('90%')
+                      .textAlign(TextAlign.Start)
+                  }
+                  .backgroundColor($r('app.color.000000'))
+                  .borderRadius($r('app.float.virtualSize_16'))
+                  .width('29%')
+                  .margin({left:'2%',right:'2%'})
+                  .justifyContent(FlexAlign.Center)
+                  Row() {
+                    Image($r('app.media.material_qr_code'))
+                      .width($r('app.float.virtualSize_24'))
+                      .height($r('app.float.virtualSize_24'))
+                      .fillColor($r('app.color.FFFFFF'))
+                      .margin({left:'4%'})
+                    TextInput({text:item.nameplateNumber,placeholder:item.nameplateNumber})
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .width('90%')
+                      .textAlign(TextAlign.Start)
+                  }
+                  .backgroundColor($r('app.color.000000'))
+                  .borderRadius($r('app.float.virtualSize_16'))
+                  .width('29%')
+                  .margin({left:'2%',right:'2%'})
+                  .justifyContent(FlexAlign.Center)
+                }
+                  .width('100%')
+              }
+              .height('10%')
+            })
+          }
+          .width('100%')
+          .height('100%')
+        }
+          .width('100%')
+          .alignItems(HorizontalAlign.Center)
+      }
+      .height('72%')
+      .margin({left:'2%',right:'2%'})
+
+      Column() {
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row() {
+          Row() {
+            Text('取消')
+              .fontColor($r('app.color.60FFFFFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => this.controller.close())
+
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Text('保存')
+              .fontColor($r('app.color.007AFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => {
+            this.onConfirm();
+            this.controller.close();
+          })
+        }
+      }
+      .width('100%')
+      .height('8%')
+
+    }
+    .height('71%')
+    .width('62%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}
+
+interface BarcodeInfo{
+  streamNumber?:string,
+  serialNumber?:string,
+  nameplateNumber?:string,
+}

+ 218 - 0
entry/src/main/ets/view/CompleteReceiveDialog.ets

@@ -0,0 +1,218 @@
+import ProcessRequest from '../common/util/request/ProcessRequest'
+import MaterialInfo from '../viewmodel/MaterialInfo'
+import OperationInfo from '../viewmodel/process/OperationInfo'
+import RequestParamModel from '../viewmodel/RequestParamModel'
+import VehicleInfo from '../viewmodel/VehicleInfo'
+
+@CustomDialog
+export struct CompleteReceiveDialog {
+  private scrollerMaterial: Scroller = new Scroller()
+  private scrollerVehicle: Scroller = new Scroller()
+  //工序载具列表
+  @State processVehicleList: VehicleInfo[] = []
+  //当前工单号
+  @Link currentWorkOrderCode:string
+  //当前工序号
+  @Link currentOperationId:string
+  //当前载具物料列表
+  @State vehicleMaterialsList: MaterialInfo[] = [];
+  //载具绑定工序id
+  @State vehicleOperationId:string =''
+  //选择的载具索引
+  @State selectedVehicleIndex: number = -1
+  controller: CustomDialogController
+  onConfirm: () => void = () => {}
+
+  //加载工序所有载具
+  loadProcessVehicle = async () => {
+    let res = await ProcessRequest.post('/api/v1/process/vehicleOperation/list', {
+      workOrderCode:this.currentWorkOrderCode,
+      operationId:this.currentOperationId
+    } as RequestParamModel) as OperationInfo;
+    this.processVehicleList = res.processVehicleList??[]
+  };
+
+  //加载载具物料信息
+  loadVehicleMaterial = async () => {
+    this.vehicleMaterialsList = await ProcessRequest.post('/api/v1/process/vehicleMaterial/list', {
+      vehicleOperationId:this.vehicleOperationId
+    } as RequestParamModel) as MaterialInfo[];
+  };
+
+  //确认出库
+  confirmOutBound = async ()=>{
+    let res = await ProcessRequest.post('/api/v1/process/vehicleOperation/vehicleOut', {
+      vehicleOperationId:this.vehicleOperationId
+    } as RequestParamModel) as VehicleInfo;
+  }
+
+
+  private onSelectOrder(index: number) {
+    this.selectedVehicleIndex = index
+  }
+
+  aboutToAppear(): void {
+    this.loadProcessVehicle();
+  }
+
+  build() {
+    Column() {
+      Column() {
+        Text("齐套接收")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }.height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+
+      Row(){
+        Column() {
+          List({scroller:this.scrollerVehicle}) {
+            ForEach(this.processVehicleList, (item: VehicleInfo, index) => {
+              ListItem(){
+                Column() {
+                  Text(`${item.vehicleCode}`)
+                    .fontSize($r('app.float.fontSize_24'))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .textAlign(TextAlign.Start)
+                    .margin({bottom:'2%' })
+                  Text(`工单编号: ${item.workOrderCode}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontWeight(FontWeight.Lighter)
+                    .margin({bottom:'1%' })
+                  Text(`工序: ${item.operationName}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontWeight(FontWeight.Lighter)
+                }
+                .alignItems(HorizontalAlign.Start)
+                .height('90%')
+                .width('90%')
+                .margin({left:'2%' })
+                .justifyContent(FlexAlign.Center)
+              }
+              .height('15%')
+              .width('100%')
+              .backgroundColor(index === this.selectedVehicleIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
+              .borderRadius($r('app.float.virtualSize_24'))
+              .border({
+                width: index === this.selectedVehicleIndex ? 2 : 0,
+                color: index === this.selectedVehicleIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')
+              })
+              .onClick(() => {
+                this.onSelectOrder(index)
+                this.vehicleOperationId = item.id??""
+                this.loadVehicleMaterial()
+              })
+
+            })
+          }
+          .width('90%')
+          .height('100%')
+        }
+        .width('48%')
+        .alignItems(HorizontalAlign.Center)
+        Divider()
+          .vertical(true)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+          .margin({ bottom: '2%',left:'2%',right:'2%'})
+        Column() {
+          List({scroller:this.scrollerMaterial}) {
+            ForEach(this.vehicleMaterialsList, (item:MaterialInfo) => {
+              ListItem() {
+                Row() {
+                  Column(){
+                    Text(item.materialName)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                    Text(`型号: ${item.materialCode}`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('80%')
+                  .alignItems(HorizontalAlign.Start)
+                  Row(){
+                    Text(`${item.num}`)
+                      .fontSize($r('app.float.fontSize_30'))
+                      .fontColor($r('app.color.FFFFFF'))
+                    Text(`${item.unit}`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .margin({left:'1%'})
+                  }
+                  .width('20%')
+                  .alignItems(VerticalAlign.Bottom)
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+                }
+                .width('100%')
+                .justifyContent(FlexAlign.SpaceEvenly)
+                .height('8%')
+              }
+            })
+          }
+          .width('90%')
+          .height('100%')
+          .divider({
+            strokeWidth: 1,
+            color: $r('app.color.20FFFFFF')
+          })
+        }
+        .width('48%')
+
+      }
+      .height('81%')
+      .width('100%')
+      .margin({top:'2%'})
+
+      Column() {
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row() {
+          Row() {
+            Text('取消')
+              .fontColor($r('app.color.60FFFFFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => this.controller.close())
+
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Text('料箱出库')
+              .fontColor($r('app.color.007AFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => {
+            if(this.selectedVehicleIndex==-1) return
+            this.confirmOutBound()
+            this.controller.close();
+          })
+        }
+      }
+      .width('100%')
+      .height('8%')
+
+    }
+    .height('71%')
+    .width('62%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}

+ 68 - 0
entry/src/main/ets/view/ConfirmDialog.ets

@@ -0,0 +1,68 @@
+//确认框
+@CustomDialog
+export struct CommonConfirmDialog {
+  @State title: string = '提示'
+  @State message: string = '确定要执行此操作吗?'
+  @State confirmText: string = '确定'
+  @State cancelText: string = '取消'
+
+  controller: CustomDialogController
+  onConfirm: () => void = () => {}
+
+  build() {
+    Column() {
+      // 标题
+      Column(){
+        Text(this.title)
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_38'))
+      }.height('30%')
+      .justifyContent(FlexAlign.Center)
+      Column(){
+        Text(this.message)
+          .fontColor($r('app.color.30FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }.height('30%')
+      .justifyContent(FlexAlign.Center)
+
+      Column(){
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row(){
+          Row(){
+            Text('取消')
+              .fontColor($r('app.color.60FFFFFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => this.controller.close())
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row(){
+            Text('确认')
+              .fontColor($r('app.color.007AFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => {
+            this.onConfirm();
+            this.controller.close();
+          })
+        }
+      }
+      .width('100%')
+      .height('30%')
+    }
+    .height(200)
+    .width(400)
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .borderRadius(16)
+  }
+}

+ 400 - 0
entry/src/main/ets/view/LittleMaterialRequestDialog.ets

@@ -0,0 +1,400 @@
+import ProcessRequest from '../common/util/request/ProcessRequest'
+import DictInfo from '../viewmodel/DictInfo'
+import DictValue from '../viewmodel/DictValue'
+import MaterialInfo, { MaterialPage} from '../viewmodel/MaterialInfo'
+import RequestParamModel from '../viewmodel/RequestParamModel'
+
+@CustomDialog
+export struct LittleMaterialRequestDialog {
+  private scrollerMaterial: Scroller = new Scroller()
+  //物料配件列表
+  @State materialTypesList: MaterialInfo[] = [];
+  //监控选中的索引
+  @State @Watch('onSelectedIndexesChange') selectedIndexes: number[] = [];
+  //选中物料
+  @State selectMaterials:MaterialInfo[]=[]
+  //查询物料名字
+  @State queryMaterialName: string = ''
+  //物料map(名称,数量)
+  @State materialNumMap: Record<string, number> = {};
+
+  //实时更新选中物料
+  onSelectedIndexesChange() {
+    this.selectMaterials = this.selectedIndexes.map(index => this.materialTypesList[index]);
+  }
+  controller: CustomDialogController
+  onConfirm: () => void = () => {}
+
+  //加载物料配件类型
+  loadMaterialTypes = async () => {
+    let res = await ProcessRequest.post('/api/v1/base/material/page',
+      {
+        materialName: this.queryMaterialName
+      }  as RequestParamModel) as MaterialPage;
+    this.materialTypesList = res.records??[]
+    //初始所有物料数量为0
+    this.materialTypesList.forEach(item => {
+      this.materialNumMap[item.materialName??''] = 0;
+    });
+  };
+
+
+  private onDeleteMaterial(item: MaterialInfo) {
+    // 找到物料在已选列表中的索引
+    const selectedIndex = this.selectMaterials.findIndex(m => m.materialName === item.materialName);
+    if (selectedIndex !== -1) {
+      // 从已选列表中移除
+      this.selectMaterials.splice(selectedIndex, 1);
+      this.selectMaterials = [...this.selectMaterials]; // 触发状态更新
+      // 找到物料在总列表中的索引
+      const materialIndex = this.materialTypesList.findIndex(m => m.materialName === item.materialName);
+      if (materialIndex !== -1) {
+        // 从选中索引中移除
+        this.selectedIndexes = this.selectedIndexes.filter(i => i !== materialIndex);
+      }
+    }
+  }
+
+  private onSelectMaterial(index: number) {
+    if (this.selectedIndexes.includes(index)) {
+      this.selectedIndexes = this.selectedIndexes.filter(i => i !== index);
+    } else {
+      this.selectedIndexes = [index, ...this.selectedIndexes];
+    }
+  }
+  aboutToAppear(): void {
+    this.loadMaterialTypes()
+  }
+
+  sendMaterialRequest=async()=>{
+    let res = await ProcessRequest.post('/api/v1/process/vehicleOperation/sporadicCallItem',
+      {
+        // materialName: this.queryMaterialName
+      }  as RequestParamModel) as MaterialPage;
+  }
+
+  build() {
+    Column() {
+      Column() {
+        Text("零星叫料")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }
+      .height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+
+      Row(){
+        Column() {
+          Text("查询物料")
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_24'))
+          Row() {
+            TextInput({ text: this.queryMaterialName, placeholder: '输入物料名称' })
+              .type(InputType.Normal)
+              .placeholderFont({ size: $r('app.float.fontSize_16') })
+              .placeholderColor($r('app.color.30FFFFFF'))
+              .fontSize($r('app.float.fontSize_16'))
+              .fontColor($r('app.color.FFFFFF'))
+              .enableKeyboardOnFocus(false)
+              .width('84%')
+              .onChange((value: string) => {
+                this.queryMaterialName = value
+                this.loadMaterialTypes()
+              })
+            Row() {
+              Image($r('app.media.process_search'))
+                .width($r('app.float.virtualSize_48'))
+                .height($r('app.float.virtualSize_48'))
+                .fillColor($r('app.color.0A84FF'))
+                .onClick(() => {
+                  this.loadMaterialTypes()
+                })
+            }
+            .width('16%')
+            .height('100%')
+            .justifyContent(FlexAlign.Center)
+            .borderRadius($r('app.float.virtualSize_16'))
+            .backgroundColor($r('app.color.20FFFFFF'))
+          }
+          .height('8%')
+          .width('60%')
+          .margin({bottom:'2%',top:'2%'})
+          .borderRadius($r('app.float.virtualSize_16'))
+          .backgroundColor($r('app.color.000000'))
+          List({ scroller: this.scrollerMaterial }) {
+            ForEach(this.materialTypesList, (item: MaterialInfo, index) => {
+              ListItem() {
+                Row() {
+                  Column({space:5}){
+                    Text(`${item.materialName}`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                    Text(`${item.spec}`)
+                      .fontSize($r('app.float.fontSize_12'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('90%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+                  .alignItems(HorizontalAlign.Start)
+                  Column(){
+                    Text(`${item.unitDictValue}`)
+                      .fontSize($r('app.float.fontSize_16'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('10%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+
+                }
+                .height('90%')
+                .width('95%')
+                .margin({ left: '2%' })
+                .justifyContent(FlexAlign.Center)
+              }
+              .height('10%')
+              .width('100%')
+              .margin({ bottom: 8})
+              .borderRadius($r('app.float.virtualSize_16'))
+              .backgroundColor(
+                this.selectedIndexes.includes(index) ?
+                $r('app.color.2030D158') :
+                $r('app.color.20FFFFFF')
+              )
+              .border({
+                width: this.selectedIndexes.includes(index) ? 2 : 0,
+                color: this.selectedIndexes.includes(index) ?
+                $r('app.color.2030D158') :
+                $r('app.color.20FFFFFF')
+              })
+              .onClick(() => {
+                this.onSelectMaterial(index)
+              })
+            })
+          }
+          .width('100%')
+          .height('82%')
+        }
+        .width('50%')
+        .alignItems(HorizontalAlign.Start)
+        .justifyContent(FlexAlign.Start)
+        .margin({left:'2%'})
+        .height('100%')
+        Image($r('app.media.arrow_right'))
+          .width($r('app.float.virtualSize_48'))
+          .height($r('app.float.virtualSize_48'))
+          .fillColor($r('app.color.FFFFFF'))
+          .margin({left:'2%',right:'2%'})
+        Column() {
+          Row(){
+           Text("已选物料")
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_24'))
+          }
+          .width('100%')
+          .height('6%')
+          .justifyContent(FlexAlign.Start)
+          List({ scroller: this.scrollerMaterial }) {
+            ForEach(this.selectMaterials, (item: MaterialInfo) => {
+              ListItem() {
+                Column(){
+                  Row(){
+                    Column({space:5}){
+                      Text(`${item.materialName}`)
+                        .fontSize($r('app.float.fontSize_24'))
+                        .fontColor($r('app.color.FFFFFF'))
+                      Text(`${item.spec}`)
+                        .fontSize($r('app.float.fontSize_16'))
+                        .fontColor($r('app.color.FFFFFF'))
+                        .fontWeight(FontWeight.Lighter)
+                    }
+                    .width('86%')
+                    .alignItems(HorizontalAlign.Start)
+                    Column(){
+                      Image($r('app.media.process_delete_seq'))
+                        .width($r('app.float.virtualSize_48'))
+                        .height($r('app.float.virtualSize_48'))
+                        .fillColor($r('app.color.FF453A'))
+                        .onClick(()=>{
+                          this.onDeleteMaterial(item)
+                        })
+                    }
+                    .width('14%')
+                    .alignItems(HorizontalAlign.End)
+                  }
+                  .height('38%')
+                  Text(`数量(${item.unitDictValue})`)
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .margin({bottom:'1%'})
+                    .width('100%')
+                    .textAlign(TextAlign.Start)
+                  Column(){
+                    AddAndSubButton({
+                      materialNum:this.materialNumMap[item.materialName??''],
+                      onChange: (num: number) => {
+                        this.materialNumMap[item.materialName??''] = num
+                      }
+                    })
+                  }
+                  .height('52%')
+                  .width('100%')
+                  .margin({bottom:'2%'})
+                }
+                .height('100%')
+                .width('100%')
+                .alignItems(HorizontalAlign.Start)
+              }
+              .height('30%')
+              .width('100%')
+              .margin({ bottom: 8})
+            })
+          }
+          .width('95%')
+          .height('92%')
+          .divider({
+            strokeWidth:1,
+            color:$r('app.color.15FFFFFF')
+          })
+        }
+        .width('40%')
+        .alignItems(HorizontalAlign.Start)
+        .justifyContent(FlexAlign.Start)
+        .height('100%')
+
+      }
+      .height('84%')
+      .width('100%')
+
+      Column() {
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row() {
+          Row() {
+            Text('取消')
+              .fontColor($r('app.color.60FFFFFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => this.controller.close())
+
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Text('发送叫料')
+              .fontColor($r('app.color.007AFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => {
+            this.controller.close();
+          })
+        }
+      }
+      .width('100%')
+      .height('8%')
+    }
+    .height('71%')
+    .width('62%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}
+
+@Component
+struct AddAndSubButton {
+  @State addClick: number = 1
+  @State subClick: number = 1
+  @Prop materialNum: number
+  onChange: (num: number) => void = () => {}
+  handleValueChange(delta: number) {
+    const newNum = this.materialNum + delta
+    if (newNum >= 0) {
+      this.onChange(newNum)
+    }
+  }
+
+  build() {
+    Row() {
+      Row() {
+        Button({ type: ButtonType.Normal }) {
+          Image($r('app.media.process_material_subtraction'))
+            .width('50%')
+            .height('50%')
+            .objectFit(ImageFit.Contain)
+            .fillColor($r('app.color.FFFFFF'))
+        }
+        .width('100%')
+        .height('100%')
+        .backgroundColor($r('app.color.20FFFFFF'))
+        .borderRadius($r('app.float.virtualSize_16'))
+        .scale({ x: this.addClick, y: this.addClick })
+        .animation({
+          duration: 200,
+          curve: Curve.Linear
+        })
+        .onClick(() => {
+          this.addClick = 0.9;
+          setTimeout(() => {
+            this.addClick = 1;
+            if(this.materialNum>0)
+            {
+              this.handleValueChange(-1)
+            }
+          }, 200);
+        })
+      }.width('22%')
+
+      Row() {
+        Text(String(this.materialNum))
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_38'))
+      }
+      .width('56%')
+      .justifyContent(FlexAlign.Center)
+
+      Row() {
+        Button({ type: ButtonType.Normal }) {
+          Image($r('app.media.process_material_add'))
+            .width('50%')
+            .height('50%')
+            .objectFit(ImageFit.Contain)
+            .fillColor($r('app.color.FFFFFF'))
+            .borderRadius($r('app.float.virtualSize_16'))
+        }
+        .width('100%')
+        .height('100%')
+        .backgroundColor($r('app.color.20FFFFFF'))
+        .borderRadius($r('app.float.virtualSize_16'))
+        .scale({ x: this.subClick, y: this.subClick })
+        .animation({
+          duration: 200,
+          curve: Curve.Linear
+        })
+        .onClick(() => {
+          this.subClick = 0.9;
+          setTimeout(() => {
+            this.subClick = 1;
+            this.handleValueChange(1)
+          }, 200);
+        })
+      }.width('22%')
+    }.width('100%')
+    .height('100%')
+    .backgroundColor($r('app.color.10FFFFFF'))
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}

+ 1 - 1
entry/src/main/ets/view/ModifyMaterialNumDialog.ets

@@ -1,4 +1,4 @@
-// 确认框
+// 数量修改
 @CustomDialog
 export struct ModifyMaterialNumDialog {
   @Prop currentMaterialName :string = ''

+ 123 - 0
entry/src/main/ets/view/PictureDrawingDialog.ets

@@ -0,0 +1,123 @@
+//图纸资料
+import ProcessRequest from '../common/util/request/ProcessRequest'
+import { DrawingInfo } from '../viewmodel/DrawingInfo'
+import RequestParamModel from '../viewmodel/RequestParamModel'
+import CommonConstants from'../common/constants/CommonConstants'
+
+@CustomDialog
+export struct PictureDrawingDialog {
+  private scrollerMaterial: Scroller = new Scroller()
+  //作业图片列表
+  @State drawingList: DrawingInfo[] = []
+
+  controller: CustomDialogController
+  onConfirm: () => void = () => {
+  }
+
+  //加载所有作业
+  loadWorkInstructions = async () => {
+    this.drawingList = await ProcessRequest.post('/api/v1/base/drawing/list', {
+    } as RequestParamModel) as DrawingInfo[];
+  };
+
+  aboutToAppear(): void {
+    this.loadWorkInstructions();
+  }
+
+  build() {
+    Column() {
+      Column() {
+        Text("图纸资料")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }.height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+
+      Column() {
+        Grid(this.scrollerMaterial) {
+          ForEach(this.drawingList, (item: DrawingInfo) => {
+            GridItem() {
+              Column(){
+                Image(CommonConstants.PICTURE_URL_PREFIX+item.drawingPath)
+                  .width('100%')
+                  .height('65%')
+                  .objectFit(ImageFit.Fill)
+                  .borderRadius($r('app.float.virtualSize_24'))
+                Column() {
+                  Text(`文件名称:${item.fileName}`)
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontColor($r('app.color.FFFFFF'))
+                    .textAlign(TextAlign.Start)
+                    .fontWeight(FontWeight.Lighter)
+                  Text(`文件编号: ${item.drawingCode}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontWeight(FontWeight.Lighter)
+                    .textAlign(TextAlign.Start)
+                  Text(`版本号: ${item.drawingVersion} `)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontWeight(FontWeight.Lighter)
+                    .textAlign(TextAlign.Start)
+                  Text(`上传时间: ${item.updated}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontWeight(FontWeight.Lighter)
+                    .textAlign(TextAlign.Start)
+                  Text(`编辑人员: ${item.updator}`)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .fontSize($r('app.float.fontSize_16'))
+                    .fontWeight(FontWeight.Lighter)
+                    .textAlign(TextAlign.Start)
+                }
+                .alignItems(HorizontalAlign.Start)
+                .height('35%')
+                .width('96%')
+                .margin({left:'4%',top:"2%"})
+              }
+            }
+            .height('50%')
+            .backgroundColor( $r('app.color.20FFFFFF')) // 选中状态加深
+            .borderRadius($r('app.float.virtualSize_24'))
+            // .onClick(() => {
+            // })
+          })
+        }
+        .columnsTemplate('1fr 1fr 1fr')
+        .columnsGap(10)
+        .rowsGap(10)
+        .width('100%')
+        .height('97%')
+        .padding(10)
+      }
+      .height('81%')
+      .margin({left:'1%',right:'1%'})
+
+      Column() {
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row() {
+          Text('关闭')
+            .fontColor($r('app.color.60FFFFFF'))
+            .fontSize($r('app.float.fontSize_30'))
+        }
+        .width('100%')
+        .justifyContent(FlexAlign.Center)
+        .height('8%')
+        .width('50%')
+        .onClick(() => this.controller.close())
+      }
+    }
+    .height('71%')
+    .width('62%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}

+ 2 - 3
entry/src/main/ets/view/SelectOrderDialog.ets

@@ -38,7 +38,7 @@ export struct SelectOrderDialog {
       Column() {
         Text("选择工单")
           .fontColor($r('app.color.FFFFFF'))
-          .fontSize($r('app.float.fontSize_38'))
+          .fontSize($r('app.float.fontSize_30'))
       }.height('8%')
       .width('100%')
       .justifyContent(FlexAlign.Center)
@@ -144,9 +144,8 @@ export struct SelectOrderDialog {
               }
             }
             .height('27%')
-            .backgroundColor(index === this.selectedOrderIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')) // 选中状态加深
+            .backgroundColor(index === this.selectedOrderIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
             .borderRadius($r('app.float.virtualSize_24'))
-            //.padding(8)
             .border({
               width: 2,
               color: index === this.selectedOrderIndex ? $r('app.color.2030D158') : $r('app.color.20FFFFFF')

+ 2 - 2
entry/src/main/ets/view/SerialNoMaterialDialog.ets

@@ -1,5 +1,5 @@
+//本次扫描物料
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo'
-
 @CustomDialog
 export struct SerialNoMaterialDialog {
   private scrollerMaterial: Scroller = new Scroller()
@@ -44,7 +44,7 @@ export struct SerialNoMaterialDialog {
       Column() {
         Text("本次扫描物料")
           .fontColor($r('app.color.FFFFFF'))
-          .fontSize($r('app.float.fontSize_38'))
+          .fontSize($r('app.float.fontSize_30'))
       }.height('8%')
       .width('100%')
       .justifyContent(FlexAlign.Center)

+ 2 - 2
entry/src/main/ets/view/SwitchingProductDialog.ets

@@ -1,3 +1,4 @@
+//切换产品
 import ProcessRequest from '../common/util/request/ProcessRequest'
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo'
 import RequestParamModel from '../viewmodel/RequestParamModel'
@@ -35,7 +36,6 @@ export struct SwitchingProductDialog{
       operationId:this.currentOperationId,
       qrCode:this.scanSeqValue
     } as RequestParamModel) as TaskSeqVO;
-
   }
 
   handleAllClick():void {
@@ -91,7 +91,7 @@ export struct SwitchingProductDialog{
       Column() {
         Text("切换产品")
           .fontColor($r('app.color.FFFFFF'))
-          .fontSize($r('app.float.fontSize_38'))
+          .fontSize($r('app.float.fontSize_30'))
       }
       .height('8%')
       .width('100%')

+ 1 - 1
entry/src/main/ets/view/WorkInstructionsDialog.ets

@@ -29,7 +29,7 @@ export struct WorkInstructionsDialog {
       Column() {
         Text("作业指导")
           .fontColor($r('app.color.FFFFFF'))
-          .fontSize($r('app.float.fontSize_38'))
+          .fontSize($r('app.float.fontSize_30'))
       }.height('8%')
       .width('100%')
       .justifyContent(FlexAlign.Center)

+ 8 - 0
entry/src/main/ets/viewmodel/ConfirmDialogParam.ets

@@ -0,0 +1,8 @@
+export interface ConfirmDialogParams {
+  title?: string
+  message: string
+  confirmText?: string
+  cancelText?: string
+  onConfirm: () => void
+}
+

+ 2 - 0
entry/src/main/ets/viewmodel/DictInfo.ets

@@ -5,4 +5,6 @@ export default class DictInfo {
   dictCode?: string
   // 字典值
   list?: DictValue[]
+  //配件类型
+  accessories_type?:DictValue[]
 }

+ 9 - 0
entry/src/main/ets/viewmodel/MaterialInfo.ets

@@ -18,4 +18,13 @@ export default class MaterialInfo {
   batchNo?: string;
   // 物料单位
   unitDictLabel?:string
+  //物料单位
+  unitDictValue?:string
+}
+
+export interface MaterialPage{
+  pageNo?:string,
+  pageSize?:string,
+  //消息记录
+  records?:MaterialInfo[]
 }

+ 2 - 0
entry/src/main/ets/viewmodel/RequestParamModel.ets

@@ -72,4 +72,6 @@ export default class RequestParamModel {
   qrCode?:string
   //消息id集合
   ids?:string[]
+  //载具绑定工序id
+  vehicleOperationId?:string
 }

+ 23 - 0
entry/src/main/ets/viewmodel/VehicleInfo.ets

@@ -0,0 +1,23 @@
+
+export default class VehicleInfo {
+  // 料箱编号
+  vehicleNo?: string;
+  // 料箱名称
+  vehicleName?: string;
+  // 料箱ID
+  vehicleId?: string;
+  // 仓库编号
+  houseNo?: string;
+  // 储位编号
+  locationNo?: string;
+  // 坐标
+  coordinate?: string;
+  //工单编号
+  workOrderCode?:string
+  //工序名称
+  operationName?:string
+  //载具编号
+  vehicleCode?:string
+  //工序绑定载具id
+  id?:string
+}

+ 3 - 0
entry/src/main/ets/viewmodel/process/OperationInfo.ets

@@ -1,3 +1,4 @@
+import VehicleInfo from '../VehicleInfo'
 import TaskSeqInfo from './TaskSeqInfo'
 // 工序信息
 export default class OperationInfo {
@@ -33,4 +34,6 @@ export default class OperationInfo {
   stationId?: string
   // 工位名称
   stationName?: string
+  //工序载具列表
+  processVehicleList?:VehicleInfo[]
 }

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


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

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path d="m17.617 16.328 3.196 3.196a1 1 0 0 1-1.414 1.414L16.19 17.73a9.434 9.434 0 0 0 1.427-1.4ZM10.375 2a8.375 8.375 0 0 1 6.62 13.505l-.215.266a8.432 8.432 0 0 1-.325.364l-.136.14-.18.176-.134.124-.338.292-.187.147A8.375 8.375 0 1 1 10.375 2Zm0 2a6.375 6.375 0 1 0 0 12.75 6.375 6.375 0 0 0 0-12.75Z"/>
+</svg>

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

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 48 48">
+  <path d="M29 10a1.5 1.5 0 0 1 0 3H6a1.5 1.5 0 0 1 0-3h23Zm0 13a1.5 1.5 0 0 1 0 3H6a1.5 1.5 0 0 1 0-3h23Zm5.5-11.5a1.5 1.5 0 0 1 3 0v21.944l3.361-3.92a1.5 1.5 0 0 1 2.278 1.953l-6 7A1.5 1.5 0 0 1 34.5 37.5v-26ZM29 36a1.5 1.5 0 0 1 0 3H6a1.5 1.5 0 0 1 0-3h23Z"/>
+</svg>