Browse Source

注释消息的websocket。齐套选择工序问题。

jiaxiaoqiang 7 months ago
parent
commit
5219d145dc

+ 2 - 1
entry/src/main/ets/common/component/TitleStateComp.ets

@@ -84,7 +84,8 @@ export struct TitleStateComp {
     //   this.planNum = res.planNum
     // })
 
-    this.creatWebsocket()
+    // todo:
+    // this.creatWebsocket()
   }
 
   setMessageRead = async (m: MessageInfoModel, index: number) => {

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

@@ -11,8 +11,8 @@ import CommonConstants from '../../constants/CommonConstants';
 import { printError, printRequest, printResponse, handleRes } from './Helps';
 
 // const baseUrl = "http://10.88.20.188:8079/"
-// const baseUrl = "http://10.88.11.200:8079/"
-const baseUrl = "http://192.168.101.4:8079/"
+const baseUrl = "http://10.88.11.200:8079/"
+// const baseUrl = "http://192.168.101.188:8079/"
 
 // 创建实例
 const JGRequest = axios.create(

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

@@ -10,8 +10,8 @@ import CommonConstants from '../../constants/CommonConstants';
 import { printError, printRequest, printResponse, handleRes } from './Helps';
 
 // const baseUrl = "http://10.88.20.188:8079/"
-// const baseUrl = "http://10.88.11.200:8079/"
-const baseUrl = "http://192.168.101.4:8079/"
+const baseUrl = "http://10.88.11.200:8079/"
+// const baseUrl = "http://192.168.101.188:8079/"
 const DEBUG = true //
 
 // 创建实例

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

@@ -91,7 +91,7 @@ const handleRes = (response: AxiosResponse): [boolean, string] => {
   if (!isSuccess) {
     promptAction.showToast({
       message: msg,
-      duration: 1500,
+      duration: 2000,
       bottom: 100
     })
 

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

@@ -70,7 +70,7 @@ struct LoginPage {
     this.controller.stopEditing()
     let userInfo = await UserAuthModel.getLast()
     //登录时,查询部门、
-    //todo
+
     this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
     if (this.deptArray && this.deptArray.length > 0) {
       this.dept = this.deptArray[0]

+ 2 - 3
entry/src/main/ets/pages/RfidAllocation.ets

@@ -11,7 +11,7 @@ import { StationInfoModel } from '../model/StorageSpace';
 @Entry
 @CustomDialog
 export struct RfidAllocation {
-  //todo 读写器编号
+
   @State ReadingWriting: string = 'SGHRI3LR48500'
   //写入rfid
   @State InRfid: string = ''
@@ -76,7 +76,6 @@ export struct RfidAllocation {
   }
   //写入rfid
   InRfidHttp = async (): Promise<InRfidClass> => {
-    //todo SGHRI3LR48500设备编号,从后端数据获取,暂时写死
     let res: InRfidClass = await EquipmentRequest.post("/api/v1/device/setup", {
       deviceNo: this.ReadingWriting,
       data: {
@@ -182,7 +181,7 @@ export struct RfidAllocation {
                     + ':' + (dateTime.getSeconds().toString().padStart(2, '0'))
                   this.MaterialBoxTime = time
 
-                  //todo 后台接口完善后要放开注释
+                  // 后台接口完善后要放开注释
                   // this.newMaterialBox().then((res:newMaterialBoxList)=>{
                   //   this.newMaterial.push(res)
                   // })

+ 11 - 20
entry/src/main/ets/view/CompleteSet.ets

@@ -52,7 +52,7 @@ export struct CompleteSet {
   //选中取出的物料位置
   @State materialPosition: Materialpositionclass = {}
   //暂时固定的料箱编码
-  //todo
+
   @State binCode: string = 'ZJ-JG031'
   //点击任务单
   @State selectOrder: number = -2
@@ -142,7 +142,8 @@ export struct CompleteSet {
   @State private MaterialInformation: Array<MaterialInformationModel> = []
   ScanStorageCode = async (itemCode: string) => {
 
-    this.scanCodeValue = "BM51264341413217;SL9;PHthi5558;"
+    // BM51264341413217;SL9;PHthi5558;
+    this.scanCodeValue = ""
     let res: MaterialInformationModel = await StorageRequest.post("/api/v1/process/circulation/material", {
       label: itemCode //"#gys022#sc022#100#20220929#31"
     } as MaterialInformationModel)
@@ -175,15 +176,15 @@ export struct CompleteSet {
 
     let has = false
     for (let i = 0; i < toPushArray.length; i++) {
-      let box = toPushArray[i]
-      if (obj.materialCode == box.materialCode) {
+      let box: MaterialInformationModel = toPushArray[i]
+      if (obj.materialCode == box.materialCode && obj.batchCode == box.batchCode && obj.batchNo == box.batchNo) {
         let number = obj.num! + box.num!
         box.num = number
         has = true
       }
     }
     if (!has) {
-      toPushArray.push(JSON.parse(JSON.stringify(obj)))
+      toPushArray.unshift(JSON.parse(JSON.stringify(obj)))
     }
 
     this.MaterialInformation = [...toPushArray]
@@ -239,19 +240,7 @@ export struct CompleteSet {
     } as RequestParamModel2) as PageModel<MaterialInfo>
   }
 
-  //查询库存信息
-  async queryStockList(params: RequestParamModel) {
-    // todo 删除
-    if (params.materialNo != undefined && params?.materialNo.length > 0) {
-      params.materialNo = 'BL00000111188'
-    }
-    // todo 删除
-    if (params.vehicleCode != undefined && params?.vehicleCode.length > 0) {
-      params.vehicleCode = 'ZJ-JG016'
-    }
-    console.log('testTag', JSON.stringify(params))
-    return await StorageRequest.post('/api/v1/stock/list', params) as Materialpositionclass[]
-  }
+
 
   //工序弹窗
   selectProcessController: CustomDialogController = new CustomDialogController({
@@ -260,6 +249,7 @@ export struct CompleteSet {
       processes: this.processes,
       orderMaterialSwitch: this.orderMaterialSwitch,
       confirm: async () => {
+        this.materialArray = []
         // 查询工序关联的物料信息
         let res = await this.queryMaterialPage()
         // if (res.totalCount === undefined || res.totalCount <= 0 || res.totalPages === undefined || res.totalPages <= 0) {
@@ -502,6 +492,7 @@ export struct CompleteSet {
                   //   this.selectProcess = {}
                   //   this.processes = []
                   // }
+                  this.processes = []
                   this.currentWorkOrderCode = item.workOrderCode ?? ""
                   this.orderId = item.taskId!
                   if (item?.workOrderCode && item.workOrderCode.length > 0) {
@@ -833,6 +824,7 @@ export struct CompleteSet {
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.process_nameplate_grey_color'))
 
+
             Text(this.recentlyRecordObject.weight)
               .textAlign(TextAlign.End)
               .width('48%')
@@ -948,7 +940,7 @@ export struct CompleteSet {
                         .onChange((value) => {
                           item.num = Number(value)
                         })
-                      Text(item.unitDictLabel ?? "个")
+                      Text(item.unitDictLabel ?? item.unit ?? "个")
                         .fontSize($r('app.float.fontSize_20'))
                         .fontColor($r('app.color.process_nameplate_grey_color'))
                         .fontWeight(FontWeight.Medium)
@@ -1309,7 +1301,6 @@ struct EmptyBoxDialog {
           .height('100%')
           .backgroundColor($r('app.color.blue_100'))
           .onClick(() => {
-            // todo 调用硬件
             this.isTakeOutBox = 1
             this.controller?.close()
           })

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

@@ -61,7 +61,7 @@ export struct ManualOutbound {
   dialogSure = async () => {
     let res: outBoxClass = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
       houseNo: this.currentBoxStationModel?.houseNo ?? "",
-      vehicleNo: this.currentBoxStationModel?.vehicleNo ?? "",
+      vehicleNo: this.currentBoxStationModel?.vehicleNo ?? this.currentBoxStationModel.vehicleCode ?? "",
       stanCode: CommonConstants.STATION_CODE
     } as RequestParamModel)
 

+ 0 - 1
entry/src/main/ets/view/ManualWarehousing.ets

@@ -43,7 +43,6 @@ export struct ManualWarehousing {
   // 中间输入框绑定的值
   @State scanCodeValue: string = ""
   @State materialNo: string = ''
-  //todo
   //1:抽屉在料格内 0:抽屉在料格外
   @State drawerPositionStatus: number = 1
   //入库口料格状态(1:有料箱 0:无料箱)