1
0
فهرست منبع

重量相关。

jiaxiaoqiang 8 ماه پیش
والد
کامیت
a70a402176

+ 1 - 1
AppScope/resources/base/element/string.json

@@ -2,7 +2,7 @@
   "string": [
     {
       "name": "app_name",
-      "value": "WonderfulDemo"
+      "value": "MES"
     },
     {
       "name": "user_reason",

+ 1 - 1
entry/src/main/ets/model/StorageSpace.ets

@@ -45,5 +45,5 @@ export class StationInfoModel {
   lockStr?: string;
   rfid?: string;
   statNo?: string;
-  weight?: null;
+  weight?: string;
 }

+ 156 - 126
entry/src/main/ets/pages/LoginPage.ets

@@ -1,7 +1,7 @@
 import router from '@ohos.router'
 import CommonConstants from '../common/constants/CommonConstants'
 import JGRequest from '../common/util/request/Request'
-import {getToken, getUserInfo} from '../common/util/request/RequestInstance'
+import { getToken, getUserInfo } from '../common/util/request/RequestInstance'
 import AssistantSetModel from '../model/database/AssistantSetModel'
 import UserAuthModel from '../model/database/UserAuthModel';
 import UserInfo from '../model/UserInfo'
@@ -9,26 +9,25 @@ import process from '@ohos.process'
 import RequestParamModel from '../viewmodel/RequestParamModel'
 import StorageRequest from '../common/util/request/StorageRequest'
 import EquipmentRequest from '../common/util/request/EquipmentRequest'
-export const stationDictValue:string=''
+
+export const stationDictValue: string = ''
+
 @Entry
 @Component
 struct LoginPage {
   controller: TextInputController = new TextInputController()
   //1是拣选,2是装配,3是测试,4是维修站,5是入库,6是出库
-  @State stationDictValue:string= ''
+  @State stationDictValue: string = ''
   @State loginName: string = 'JGtest-32'
   @State password: string = 'admin@123'
-
-  @State dept: DeptInfo = {deptName:'仿真中心'}
+  @State dept: DeptInfo = { deptName: '仿真中心' }
   @State workstation: WorkstationInfo = {}
-  @State productionLine: ProductionLine = {name:'仿真中心电装产线'}
-
+  @State productionLine: ProductionLine = { name: '仿真中心电装产线' }
   @State deptArray: DeptInfo[] = []
   @State lineArray: ProductionLine[] = []
-  @State workstationArray: WorkstationInfo[] = [{name:'入库工位',stationDictValue:"5"},
-    {name:'预齐套工位',stationDictValue:"6"},
-{name:'装配工位',stationDictValue:"3"}]
-
+  @State workstationArray: WorkstationInfo[] = [{ name: '入库工位', stationDictValue: "5" },
+    { name: '预齐套工位', stationDictValue: "6" },
+    { name: '装配工位', stationDictValue: "3" }]
   // 部门选择弹框
   selectDeptController: CustomDialogController = new CustomDialogController({
     builder: SelectDeptDialog({
@@ -40,7 +39,6 @@ struct LoginPage {
     // gridCount: 3,
     customStyle: true,
   })
-
   // 产线选择弹框
   selectProductionLineController: CustomDialogController = new CustomDialogController({
     builder: ProductionLineDialog({
@@ -54,11 +52,10 @@ struct LoginPage {
     // gridCount: 3,
     customStyle: true,
   })
-
   // 工位选择弹框
   selectWorkstationController: CustomDialogController = new CustomDialogController({
     builder: SelectWorkstationDialog({
-      stationDictValue:this.stationDictValue,
+      stationDictValue: this.stationDictValue,
       workstation: this.workstation,
       workstationArray: this.workstationArray,
       lineCode: this.productionLine.code,
@@ -79,14 +76,16 @@ struct LoginPage {
       this.dept = this.deptArray[0]
     }
     //查询产线
-    this.lineArray = await JGRequest.post("/api/v1/base/productionLine/list/list", {} as RequestParamModel) as ProductionLine[]
+    this.lineArray = await JGRequest.post("/api/v1/base/productionLine/list/list", {
+    } as RequestParamModel) as ProductionLine[]
     if (this.lineArray && this.lineArray.length > 0) {
       this.productionLine = this.lineArray[0]
       // 根据产线查询工位
-      this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code, {}) as WorkstationInfo[]
+      this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code + "/1", {
+      }) as WorkstationInfo[]
       if (this.workstationArray && this.workstationArray.length > 0) {
         this.workstation = this.workstationArray[0]
-        CommonConstants.stationDictValue=this.workstationArray[0].stationDictValue!
+        CommonConstants.stationDictValue = this.workstationArray[0].stationDictValue!
       }
     }
 
@@ -101,41 +100,42 @@ struct LoginPage {
     if (userInfo && userInfo.maintainLoginStatus === 1) {
       CommonConstants.STATION_NANE = userInfo.stationName!
       CommonConstants.STATION_ID = userInfo.stationId!
-      await getToken(userInfo.userName as string, userInfo.password as string, userInfo.orgId as number, userInfo?.stationId!.toString()).then(token=>{
-        if (token && token.length > 0) {
-          CommonConstants.AUTH_TOKEN = token
-        }
-      })
+      await getToken(userInfo.userName as string, userInfo.password as string, userInfo.orgId as number, userInfo?.stationId!.toString())
+        .then(token => {
+          if (token && token.length > 0) {
+            CommonConstants.AUTH_TOKEN = token
+          }
+        })
       let user = await getUserInfo() as UserInfo
       if (null != user) {
-        CommonConstants.USER_ID= user.id!
+        CommonConstants.USER_ID = user.id!
         CommonConstants.USER_NAME = user.userName!
         CommonConstants.USER_AVATAR = user.avatar!
         CommonConstants.USER_AVATAR = user.avatar!
         CommonConstants.LOGIN_OUT = false
       }
       if (CommonConstants.AUTH_TOKEN && CommonConstants.AUTH_TOKEN.length > 0) {
-        if ( CommonConstants.stationDictValue === '5') {
+        if (CommonConstants.stationDictValue === '5') {
           router.pushUrl({
-           url:'pages/Warehousing',
+            url: 'pages/Warehousing',
             params: {
-              userName:CommonConstants.USER_NAME as UserInfo,
-              avatar:CommonConstants.USER_AVATAR as UserInfo,
-              stationId:CommonConstants.STATION_NANE as WorkstationInfo
+              userName: CommonConstants.USER_NAME as UserInfo,
+              avatar: CommonConstants.USER_AVATAR as UserInfo,
+              stationId: CommonConstants.STATION_NANE as WorkstationInfo
             }
           })
-        } else if ( CommonConstants.stationDictValue=== '6'){
+        } else if (CommonConstants.stationDictValue === '6') {
           router.pushUrl({
-            url:'pages/OutboundStation',
+            url: 'pages/OutboundStation',
             params: {
-              userName:CommonConstants.USER_NAME as UserInfo,
-              avatar:CommonConstants.USER_AVATAR as UserInfo,
-              stationId:CommonConstants.STATION_NANE as WorkstationInfo
+              userName: CommonConstants.USER_NAME as UserInfo,
+              avatar: CommonConstants.USER_AVATAR as UserInfo,
+              stationId: CommonConstants.STATION_NANE as WorkstationInfo
             }
           })
         } else {
           router.pushUrl({
-            url:'pages/process/ProcessHome',
+            url: 'pages/process/ProcessHome',
           })
         }
       }
@@ -155,9 +155,9 @@ struct LoginPage {
         .alignItems(VerticalAlign.Center)
         .justifyContent(FlexAlign.Start)
 
-        TextInput({placeholder: '账号', text: this.loginName ,controller:this.controller})
+        TextInput({ placeholder: '账号', text: this.loginName, controller: this.controller })
           .placeholderColor($r('app.color.login_text_input_placeholder_color'))
-          .placeholderFont({ size: $r('app.float.set_card_font_size'), weight: FontWeight.Medium})
+          .placeholderFont({ size: $r('app.float.set_card_font_size'), weight: FontWeight.Medium })
           .fontColor($r('app.color.login_text_input_font_color'))
           .fontWeight(FontWeight.Medium)
           .fontSize($r('app.float.fontSize_24'))
@@ -170,11 +170,12 @@ struct LoginPage {
           .onChange((value: string) => {
             this.loginName = value
           })
-        Row() {}.height('4%')
+        Row() {
+        }.height('4%')
 
-        TextInput({placeholder: '密码', text: this.password })
+        TextInput({ placeholder: '密码', text: this.password })
           .placeholderColor($r('app.color.login_text_input_placeholder_color'))
-          .placeholderFont({ size: $r('app.float.set_card_font_size'), weight: FontWeight.Medium})
+          .placeholderFont({ size: $r('app.float.set_card_font_size'), weight: FontWeight.Medium })
           .fontColor($r('app.color.login_text_input_font_color'))
           .width('90.4%')
           .height('10.6%')
@@ -188,7 +189,8 @@ struct LoginPage {
             this.password = value
           })
 
-        Row() {}.height('2.65%')
+        Row() {
+        }.height('2.65%')
 
         // 部门、产线选择
         Row() {
@@ -200,6 +202,7 @@ struct LoginPage {
           .width('47.8%')
           .height('100%')
           .alignItems(VerticalAlign.Top)
+
           Blank()
           Row() {
             Text('产线')
@@ -212,6 +215,7 @@ struct LoginPage {
         }
         .height('4.5%')
         .width('90.4%')
+
         // 部门选择
         Row() {
           Row() {
@@ -233,19 +237,20 @@ struct LoginPage {
           }
           .width('47.8%')
           .height('100%')
-          .padding({left: 10})
+          .padding({ left: 10 })
           .backgroundColor($r('app.color.general_card_background_color'))
           .borderRadius($r('app.float.general_border_radius'))
-          .onClick(async ()=>{
+          .onClick(async () => {
             this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
             if (this.deptArray && this.deptArray.length > 0) {
               this.dept = this.deptArray[0]
             }
             // 查询工位
-            this.workstationArray = await JGRequest.get("/api/v1/base/station/queryStationList", {}) as WorkstationInfo[]
+            this.workstationArray = await JGRequest.get("/api/v1/base/station/queryStationList", {
+            }) as WorkstationInfo[]
             if (this.workstationArray && this.workstationArray.length > 0) {
               this.workstation = this.workstationArray[0]
-              CommonConstants.stationDictValue=this.workstationArray[0].stationDictValue!
+              CommonConstants.stationDictValue = this.workstationArray[0].stationDictValue!
 
             }
             this.selectDeptController.open()
@@ -273,19 +278,20 @@ struct LoginPage {
           }
           .width('47.8%')
           .height('100%')
-          .padding({left: 10})
+          .padding({ left: 10 })
           .backgroundColor($r('app.color.general_card_background_color'))
           .borderRadius($r('app.float.general_border_radius'))
-          .onClick(async ()=>{
+          .onClick(async () => {
             this.deptArray = await JGRequest.get("/api/v1/sys/dept/orgList", {}) as DeptInfo[]
             if (this.deptArray && this.deptArray.length > 0) {
               this.dept = this.deptArray[0]
             }
             // 查询工位
-            this.workstationArray = await JGRequest.get("/api/v1/base/station/queryStationList", {}) as WorkstationInfo[]
+            this.workstationArray = await JGRequest.get("/api/v1/base/station/queryStationList", {
+            }) as WorkstationInfo[]
             if (this.workstationArray && this.workstationArray.length > 0) {
               this.workstation = this.workstationArray[0]
-              CommonConstants.stationDictValue=this.workstationArray[0].stationDictValue!
+              CommonConstants.stationDictValue = this.workstationArray[0].stationDictValue!
 
             }
             this.selectProductionLineController.open()
@@ -294,10 +300,12 @@ struct LoginPage {
         .width('90.4%')
         .height('10.6%')
 
-        Row() {}.height('2.65%')
+        Row() {
+        }.height('2.65%')
 
         if (JSON.stringify(this.productionLine) === '{}') {
-          Row() {}.height('15.1%')
+          Row() {
+          }.height('15.1%')
         } else {
           // 工位选择
           Row() {
@@ -331,9 +339,9 @@ struct LoginPage {
           .height('10.6%')
           .backgroundColor($r('app.color.general_card_background_color'))
           .borderRadius($r('app.float.general_border_radius'))
-          .padding({left: 10})
-          .onClick(()=>{
-            if (!this.workstationArray || this.workstationArray.length <= 0 ) {
+          .padding({ left: 10 })
+          .onClick(() => {
+            if (!this.workstationArray || this.workstationArray.length <= 0) {
               return
             }
             this.selectWorkstationController.open()
@@ -357,25 +365,26 @@ struct LoginPage {
         .layoutWeight(1)
         .alignItems(HorizontalAlign.Center)
         .justifyContent(FlexAlign.Start)
-        .onClick(async ()=>{
+        .onClick(async () => {
           //todo
-         // 没有网的时候直接进去
-         //  router.pushUrl({
-         //    url:'pages/OutboundStation',
-         //    params: {
-         //      userName:CommonConstants.USER_NAME as UserInfo,
-         //      avatar:CommonConstants.USER_AVATAR as UserInfo,
-         //      stationId:CommonConstants.STATION_NANE as WorkstationInfo
-         //    }
-         //  })
-
-          console.log("tesTag1"+'+++++++++++++++'+this.workstation.stationDictValue)
-         if (this.loginName && this.loginName.length > 0 && this.password && this.password.length > 0) {
-            await getToken(this.loginName, this.password, this.dept?.id ? this.dept.id : 0, this.workstation?.id ? this.workstation.id : '0').then(token =>{
-              if (token && token.length > 0) {
-                CommonConstants.AUTH_TOKEN = token
-              }
-            })
+          // 没有网的时候直接进去
+          //  router.pushUrl({
+          //    url:'pages/OutboundStation',
+          //    params: {
+          //      userName:CommonConstants.USER_NAME as UserInfo,
+          //      avatar:CommonConstants.USER_AVATAR as UserInfo,
+          //      stationId:CommonConstants.STATION_NANE as WorkstationInfo
+          //    }
+          //  })
+
+          console.log("tesTag1" + '+++++++++++++++' + this.workstation.stationDictValue)
+          if (this.loginName && this.loginName.length > 0 && this.password && this.password.length > 0) {
+            await getToken(this.loginName, this.password, this.dept?.id ? this.dept.id : 0, this.workstation?.id ? this.workstation.id : '0')
+              .then(token => {
+                if (token && token.length > 0) {
+                  CommonConstants.AUTH_TOKEN = token
+                }
+              })
             if (CommonConstants.AUTH_TOKEN.length <= 0) {
               return
             }
@@ -383,51 +392,67 @@ struct LoginPage {
             CommonConstants.USER_ID = userInfo.id!
             CommonConstants.USER_NAME = userInfo.userName!
             CommonConstants.USER_AVATAR = userInfo.avatar!
-           CommonConstants.STATION_CODE = userInfo.stationCode!
+            CommonConstants.STATION_CODE = userInfo.stationCode!
             CommonConstants.STATION_NANE = this.workstation && this.workstation.name ? this.workstation.name : ''
             CommonConstants.STATION_ID = this.workstation && this.workstation.id ? Number.parseInt(this.workstation.id) : 0
-            let user = await UserAuthModel.getByUserId(userInfo.id?userInfo.id:0)
+            let user = await UserAuthModel.getByUserId(userInfo.id ? userInfo.id : 0)
             if (!user || !user.id) {
               // 将后端数据库id作为userId, 默认是保持登录
-              user = {userId: userInfo.id, userName: this.loginName, password: this.password, orgId: this.dept ? this.dept.id : 0,
-                stationId: this.workstation ? Number.parseInt(this.workstation.id!) : 0, stationName: this.workstation && this.workstation.name ? this.workstation.name : '',
-                stationDictValue: this.workstation?.stationDictValue ? this.workstation.stationDictValue! : '', avatar: userInfo.avatar, maintainLoginStatus: 1, updateTime: new Date().getTime()}
+              user = {
+                userId: userInfo.id,
+                userName: this.loginName,
+                password: this.password,
+                orgId: this.dept ? this.dept.id : 0,
+                stationId: this.workstation ? Number.parseInt(this.workstation.id!) : 0,
+                stationName: this.workstation && this.workstation.name ? this.workstation.name : '',
+                stationDictValue: this.workstation?.stationDictValue ? this.workstation.stationDictValue! : '',
+                avatar: userInfo.avatar,
+                maintainLoginStatus: 1,
+                updateTime: new Date().getTime()
+              }
               let res = await UserAuthModel.addUser(user)
-              res = await AssistantSetModel.addAssistantSet({userId: userInfo.id, voiceWakeUp: 1, timbre: 2, wakeFree: 2, promptBroadcast: 1, voiceVolume: 0})
+              res = await AssistantSetModel.addAssistantSet({
+                userId: userInfo.id,
+                voiceWakeUp: 1,
+                timbre: 2,
+                wakeFree: 2,
+                promptBroadcast: 1,
+                voiceVolume: 0
+              })
             }
             CommonConstants.LOGIN_OUT = false
 
             if (this.workstation.stationDictValue === '6') {
               router.pushUrl({
-                url:'pages/OutboundStation',
+                url: 'pages/OutboundStation',
                 params: {
-                  userName:CommonConstants.USER_NAME as UserInfo,
-                  avatar:CommonConstants.USER_AVATAR as UserInfo,
-                  stationId:CommonConstants.STATION_NANE as WorkstationInfo
+                  userName: CommonConstants.USER_NAME as UserInfo,
+                  avatar: CommonConstants.USER_AVATAR as UserInfo,
+                  stationId: CommonConstants.STATION_NANE as WorkstationInfo
                 }
               })
-            } else if (this.workstation.stationDictValue === '5'){
+            } else if (this.workstation.stationDictValue === '5') {
               router.pushUrl({
-                url:'pages/Warehousing',
+                url: 'pages/Warehousing',
                 params: {
-                  userName:CommonConstants.USER_NAME as UserInfo,
-                  avatar:CommonConstants.USER_AVATAR as UserInfo,
-                  stationId:CommonConstants.STATION_NANE as WorkstationInfo
+                  userName: CommonConstants.USER_NAME as UserInfo,
+                  avatar: CommonConstants.USER_AVATAR as UserInfo,
+                  stationId: CommonConstants.STATION_NANE as WorkstationInfo
                 }
               })
             } else {
               router.pushUrl({
-                url:'pages/process/ProcessHome',
+                url: 'pages/process/ProcessHome',
               })
             }
-        }
+          }
         })
       }
       .width('35%')
       .height('70%')
       .backgroundColor($r('app.color.login_background_color'))
       .borderRadius($r('app.float.general_border_radius'))
-      .margin({right: '8.25%'})
+      .margin({ right: '8.25%' })
 
       Row() {
         Image($r('app.media.shutdown'))
@@ -438,8 +463,8 @@ struct LoginPage {
       .width('100%')
       .alignItems(VerticalAlign.Bottom)
       .justifyContent(FlexAlign.End)
-      .margin({bottom: '1%', right: '1%'})
-      .onClick(()=>{
+      .margin({ bottom: '1%', right: '1%' })
+      .onClick(() => {
         let pro = new process.ProcessManager();
         pro.exit(0);
       })
@@ -447,7 +472,7 @@ struct LoginPage {
     .width('100%')
     .height('100%')
     .backgroundImage($r('app.media.login_backgroundImage'))
-    .backgroundImageSize({width: '100%', height: '100%'})
+    .backgroundImageSize({ width: '100%', height: '100%' })
     .alignItems(HorizontalAlign.End)
     .justifyContent(FlexAlign.End)
 
@@ -458,12 +483,12 @@ struct LoginPage {
 @CustomDialog
 struct SelectDeptDialog {
   @Link dept: DeptInfo
-
-  @State deptArray: DeptInfo[] = [{deptName:'仿真中心',id:111,orgId:112}]
-
+  @State deptArray: DeptInfo[] = [{ deptName: '仿真中心', id: 111, orgId: 112 }]
   controller?: CustomDialogController
-  cancel: () => void = () => {}
-  confirm: () => void = () => {}
+  cancel: () => void = () => {
+  }
+  confirm: () => void = () => {
+  }
 
   async aboutToAppear() {
     if (!this.deptArray || this.deptArray.length <= 0) {
@@ -487,8 +512,8 @@ struct SelectDeptDialog {
       .justifyContent(FlexAlign.Center)
 
       Column() {
-        List({space: 10}) {
-          ForEach(this.deptArray, (item: DeptInfo)=>{
+        List({ space: 10 }) {
+          ForEach(this.deptArray, (item: DeptInfo) => {
             ListItem() {
               Row() {
                 Text(item.deptName)
@@ -501,8 +526,8 @@ struct SelectDeptDialog {
               .width('80%')
               .backgroundColor(this.dept && this.dept.id === item.id ? $r('app.color.order_select_background') : $r('app.color.general_card_background_color'))
               .borderRadius($r('app.float.general_border_radius'))
-              .padding({left: 10})
-              .onClick(()=>{
+              .padding({ left: 10 })
+              .onClick(() => {
                 this.dept = item
                 if (this.controller != undefined) {
                   this.controller.close()
@@ -529,29 +554,31 @@ struct SelectDeptDialog {
 @CustomDialog
 struct ProductionLineDialog {
   @Link productionLine: ProductionLine
-
   @State lineArray: ProductionLine[] = []
-
   @Link workstation: WorkstationInfo
   @Link workstationArray: WorkstationInfo[]
   controller?: CustomDialogController
-  cancel: () => void = () => {}
-  confirm: () => void = () => {}
+  cancel: () => void = () => {
+  }
+  confirm: () => void = () => {
+  }
 
   async aboutToAppear() {
     if (this.lineArray && this.lineArray.length > 0) {
       return
     }
     // 查询产线
-    this.lineArray = await JGRequest.post("/api/v1/base/productionLine/list/list", {} as RequestParamModel) as ProductionLine[]
+    this.lineArray = await JGRequest.post("/api/v1/base/productionLine/list/list", {
+    } as RequestParamModel) as ProductionLine[]
     if (this.lineArray && this.lineArray.length > 0) {
       this.productionLine = this.lineArray[0]
       // 根据产线查询工位
-      this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code, {}) as WorkstationInfo[]
-      console.log("====================1234567890"+"成功+++++"+this.workstationArray[0])
+      this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code + "/1", {
+      }) as WorkstationInfo[]
+      console.log("====================1234567890" + "成功+++++" + this.workstationArray[0])
       if (this.workstationArray && this.workstationArray.length > 0) {
         this.workstation = this.workstationArray[0]
-        console.log("====================1234567890"+"成功"+this.workstation)
+        console.log("====================1234567890" + "成功" + this.workstation)
       }
     }
   }
@@ -569,8 +596,8 @@ struct ProductionLineDialog {
       .justifyContent(FlexAlign.Center)
 
       Column() {
-        List({space: 10}) {
-          ForEach(this.lineArray, (item: ProductionLine)=>{
+        List({ space: 10 }) {
+          ForEach(this.lineArray, (item: ProductionLine) => {
             ListItem() {
               Row() {
                 Text(item.name)
@@ -583,11 +610,12 @@ struct ProductionLineDialog {
               .width('80%')
               .backgroundColor(this.productionLine && this.productionLine.id === item.id ? $r('app.color.order_select_background') : $r('app.color.general_card_background_color'))
               .borderRadius($r('app.float.general_border_radius'))
-              .padding({left: 10})
-              .onClick(async ()=>{
+              .padding({ left: 10 })
+              .onClick(async () => {
                 this.productionLine = item
                 // 根据产线查询工位
-                this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code, {}) as WorkstationInfo[]
+                this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.productionLine.code + "/1", {
+                }) as WorkstationInfo[]
                 if (this.workstationArray && this.workstationArray.length > 0) {
                   this.workstation = this.workstationArray[0]
                 } else {
@@ -617,15 +645,16 @@ struct ProductionLineDialog {
 // 工位选择弹框
 @CustomDialog
 struct SelectWorkstationDialog {
-  @Link stationDictValue:string
+  @Link stationDictValue: string
   @Link workstation: WorkstationInfo
   // 产线编码
   private lineCode: string = ''
   @Link workstationArray: WorkstationInfo[]
-
   controller?: CustomDialogController
-  cancel: () => void = () => {}
-  confirm: () => void = () => {}
+  cancel: () => void = () => {
+  }
+  confirm: () => void = () => {
+  }
 
   async aboutToAppear() {
     if (this.workstationArray && this.workstationArray.length > 0) {
@@ -635,7 +664,8 @@ struct SelectWorkstationDialog {
       return
     }
     // 根据产线查询工位
-    this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.lineCode, {}) as WorkstationInfo[]
+    this.workstationArray = await JGRequest.get("/api/v1/base/station/getStationList/" + this.lineCode + "/1", {
+    }) as WorkstationInfo[]
     if (this.workstationArray && this.workstationArray.length > 0) {
       this.workstation = this.workstationArray[0]
     }
@@ -654,8 +684,8 @@ struct SelectWorkstationDialog {
       .justifyContent(FlexAlign.Center)
 
       Column() {
-        List({space: 10}) {
-          ForEach(this.workstationArray, (item: WorkstationInfo,index:number)=>{
+        List({ space: 10 }) {
+          ForEach(this.workstationArray, (item: WorkstationInfo, index: number) => {
             ListItem() {
               Row() {
                 Text(item.name)
@@ -668,11 +698,11 @@ struct SelectWorkstationDialog {
               .width('80%')
               .backgroundColor(this.workstation && this.workstation.id === item.id ? $r('app.color.order_select_background') : $r('app.color.general_card_background_color'))
               .borderRadius($r('app.float.general_border_radius'))
-              .padding({left: 10})
-              .onClick(()=>{
+              .padding({ left: 10 })
+              .onClick(() => {
                 this.workstation = item
-                this.stationDictValue=item.stationDictValue!
-                CommonConstants.stationDictValue=this.workstationArray[index].stationDictValue!
+                this.stationDictValue = item.stationDictValue!
+                CommonConstants.stationDictValue = this.workstationArray[index].stationDictValue!
 
 
                 if (this.controller != undefined) {
@@ -709,7 +739,7 @@ export class WorkstationInfo {
   // 工位名称
   name?: string
   //工位类型
-  stationDictValue?:string
+  stationDictValue?: string
 }
 
 class ProductionLine {

+ 60 - 58
entry/src/main/ets/pages/OutboundStation.ets

@@ -1,6 +1,6 @@
 import { TitleStateComp } from '../common/component/TitleStateComp'
 import { CompleteSet } from '../view/CompleteSet'
-import  {Statistics}from '../view/Statistics'
+import { Statistics } from '../view/Statistics'
 import { AdjustStorageView } from '../view/storage/AdjustStorageView'
 import { ManualOutbound } from '../view/ManualOutbound'
 import { WarehouseMap } from './WarehouseMap'
@@ -12,18 +12,18 @@ import { WarehouseMap } from './WarehouseMap'
 @Component
 struct OutboundStation {
   //齐套按钮(0:齐套 1:手动出库 2:调仓:3:统计)
-  @State inboundButton:number = 0
-  @State Button:number=0
+  @State inboundButton: number = 0
+  @State Button: number = 0
   //仓储和其他仓储点击按钮变色
   @State warehouseButton: number = 0
-
   @State isHomePage: boolean = false
+
   build() {
-    Column(){
-      TitleStateComp({ isHomePage: this.isHomePage,})
-      Column(){
-        Row({space:px2vp(24)}){
-          Row(){
+    Column() {
+      TitleStateComp({ isHomePage: this.isHomePage, })
+      Column() {
+        Row({ space: px2vp(24) }) {
+          Row() {
             Text('智能仓储')
               .textAlign(TextAlign.Center)
               .borderRadius(px2vp(16))
@@ -31,30 +31,31 @@ struct OutboundStation {
               .height(px2vp(80))
               .fontWeight(FontWeight.Medium)
               .fontSize(px2vp(24))
-              .fontColor(this.warehouseButton===0?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.warehouseButton===0?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.warehouseButton=0
+              .fontColor(this.warehouseButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
+              .backgroundColor(this.warehouseButton === 0 ? $r('app.color.process_divider_white_color') : '')
+              .onClick(() => {
+                this.warehouseButton = 0
               })
             Blank()
-            Text('其他仓储')
-              .textAlign(TextAlign.Center)
-              .borderRadius(px2vp(16))
-              .width(px2vp(292))
-              .height(px2vp(80))
-              .fontWeight(FontWeight.Medium)
-              .fontSize(px2vp(24))
-              .fontColor(this.warehouseButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.warehouseButton===1?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.warehouseButton=1
-              })
+            // Text('xxxxxxx')
+            //   .textAlign(TextAlign.Center)
+            //   .borderRadius(px2vp(16))
+            //   .width(px2vp(292))
+            //   .height(px2vp(80))
+            //   .fontWeight(FontWeight.Medium)
+            //   .fontSize(px2vp(24))
+            //   .fontColor(this.warehouseButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
+            //   .backgroundColor(this.warehouseButton===1?$r('app.color.process_divider_white_color'):'')
+            //   .onClick(()=>{
+            //     this.warehouseButton=1
+            //   })
           }
           .width(px2vp(608))
           .borderRadius(px2vp(16))
           .height(px2vp(80))
           .backgroundColor($r('app.color.black_10'))
-          Row({space:px2vp(24)}){
+
+          Row({ space: px2vp(24) }) {
             Text('齐套')
               .textAlign(TextAlign.Center)
               .borderRadius(px2vp(16))
@@ -62,10 +63,10 @@ struct OutboundStation {
               .height(px2vp(80))
               .fontWeight(FontWeight.Medium)
               .fontSize(px2vp(24))
-              .fontColor(this.inboundButton===0?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.inboundButton===0?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.inboundButton=0
+              .fontColor(this.inboundButton === 0 ? $r('app.color.black_90') : $r('app.color.black_60'))
+              .backgroundColor(this.inboundButton === 0 ? $r('app.color.process_divider_white_color') : '')
+              .onClick(() => {
+                this.inboundButton = 0
               })
             Text('手动出库')
               .textAlign(TextAlign.Center)
@@ -74,10 +75,10 @@ struct OutboundStation {
               .height(px2vp(80))
               .fontWeight(FontWeight.Medium)
               .fontSize(px2vp(24))
-              .fontColor(this.inboundButton===1?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.inboundButton===1?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.inboundButton=1
+              .fontColor(this.inboundButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
+              .backgroundColor(this.inboundButton === 1 ? $r('app.color.process_divider_white_color') : '')
+              .onClick(() => {
+                this.inboundButton = 1
               })
             Text('调仓')
               .textAlign(TextAlign.Center)
@@ -86,10 +87,10 @@ struct OutboundStation {
               .height(px2vp(80))
               .fontWeight(FontWeight.Medium)
               .fontSize(px2vp(24))
-              .fontColor(this.inboundButton===2?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.inboundButton===2?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.inboundButton=2
+              .fontColor(this.inboundButton === 2 ? $r('app.color.black_90') : $r('app.color.black_60'))
+              .backgroundColor(this.inboundButton === 2 ? $r('app.color.process_divider_white_color') : '')
+              .onClick(() => {
+                this.inboundButton = 2
               })
             Text('统计')
               .textAlign(TextAlign.Center)
@@ -98,10 +99,10 @@ struct OutboundStation {
               .height(px2vp(80))
               .fontWeight(FontWeight.Medium)
               .fontSize(px2vp(24))
-              .fontColor(this.inboundButton===3?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.inboundButton===3?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.inboundButton=3
+              .fontColor(this.inboundButton === 3 ? $r('app.color.black_90') : $r('app.color.black_60'))
+              .backgroundColor(this.inboundButton === 3 ? $r('app.color.process_divider_white_color') : '')
+              .onClick(() => {
+                this.inboundButton = 3
               })
             Text('叫车')
               .textAlign(TextAlign.Center)
@@ -110,10 +111,10 @@ struct OutboundStation {
               .height(px2vp(80))
               .fontWeight(FontWeight.Medium)
               .fontSize(px2vp(24))
-              .fontColor(this.Button===1?$r('app.color.black_90'):$r('app.color.black_60'))
-              .backgroundColor(this.Button===1?$r('app.color.process_divider_white_color'):'')
-              .onClick(()=>{
-                this.Button=1
+              .fontColor(this.Button === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
+              .backgroundColor(this.Button === 1 ? $r('app.color.process_divider_white_color') : '')
+              .onClick(() => {
+                this.Button = 1
 
               })
 
@@ -124,44 +125,45 @@ struct OutboundStation {
         }
         .width(px2vp(1920))
         .height(px2vp(80))
-        .padding({left:px2vp(24),right:px2vp(24)})
-        if (this.warehouseButton === 0&& this.inboundButton === 0){
+        .padding({ left: px2vp(24), right: px2vp(24) })
+
+        if (this.warehouseButton === 0 && this.inboundButton === 0) {
           //齐套
-          Column(){
+          Column() {
             CompleteSet()
           }
-          .margin({top:px2vp(20),bottom:$r('app.float.topMargins_20')})
+          .margin({ top: px2vp(20), bottom: $r('app.float.topMargins_20') })
           .width(px2vp(1920))
           .height(px2vp(900))
-        }else if (this.warehouseButton===0&&this.inboundButton===2){
-          Column(){
+        } else if (this.warehouseButton === 0 && this.inboundButton === 2) {
+          Column() {
             //调仓
             //AdjustStorageView()
             WarehouseMap()
           }
           .width('100%')
           .height('92%')
-        } else if (this.warehouseButton===0&&this.inboundButton===3){
-          Column(){
+        } else if (this.warehouseButton === 0 && this.inboundButton === 3) {
+          Column() {
             //智能仓储统计
             Statistics()
           }
           .width('100%')
           .height('92%')
         }
-        else if (this.warehouseButton===0&&this.inboundButton===1){
-          Column(){
+        else if (this.warehouseButton === 0 && this.inboundButton === 1) {
+          Column() {
             //手动出库
             ManualOutbound()
           }
-          .margin({top:$r('app.float.topMargins_20'),bottom:$r('app.float.topMargins_20')})
+          .margin({ top: $r('app.float.topMargins_20'), bottom: $r('app.float.topMargins_20') })
           .width('100%')
           .height('92%')
         }
       }
       .width('100%')
       .height('92%')
-      .padding({left:px2vp(24),right:px2vp(24)})
+      .padding({ left: px2vp(24), right: px2vp(24) })
       .backgroundColor($r('app.color.white_f1f3f5'))
     }.width('100%')
     .height('100%')

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

@@ -186,18 +186,18 @@ struct Warehousing {
                 this.warehouseButton = 0
               })
             Blank()
-            Text('其他仓储')
-              .textAlign(TextAlign.Center)
-              .borderRadius(px2vp(16))
-              .width('292px')
-              .height('80px')
-              .fontWeight(FontWeight.Medium)
-              .fontSize(px2vp(24))
-              .fontColor(this.warehouseButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
-              .backgroundColor(this.warehouseButton === 1 ? $r('app.color.process_divider_white_color') : '')
-              .onClick(() => {
-                this.warehouseButton = 1
-              })
+            // Text('xxxxxx')
+            //   .textAlign(TextAlign.Center)
+            //   .borderRadius(px2vp(16))
+            //   .width('292px')
+            //   .height('80px')
+            //   .fontWeight(FontWeight.Medium)
+            //   .fontSize(px2vp(24))
+            //   .fontColor(this.warehouseButton === 1 ? $r('app.color.black_90') : $r('app.color.black_60'))
+            //   .backgroundColor(this.warehouseButton === 1 ? $r('app.color.process_divider_white_color') : '')
+            //   .onClick(() => {
+            //     this.warehouseButton = 1
+            //   })
 
 
           }

+ 1 - 11
entry/src/main/ets/pages/process/ProcessHome.ets

@@ -18,7 +18,7 @@ struct ProcessHome {
   @State processes: ProcessData[] = [];
   @State selectProcess: number = 0
   // 扫描到的序列号
-  @State seqNo: string = '6030100001261-20240515-8'
+  @State seqNo: string = ''
   // 统计——当前订单
   @State planNum?: number = 0
   @State completeNum?: number = 0
@@ -498,16 +498,6 @@ struct ProcessHome {
                 .enableKeyboardOnFocus(false)
                 .borderRadius($r('app.float.robot_set_radius'))
                 .backgroundColor($r('app.color.general_font_white_color'))
-                .onClick(() => {
-                  router.pushUrl({
-                    url: 'pages/process/ProcessStepPage',
-                    params: {
-                      // startWorkInfo: res,
-                      processInfo: this.processes[this.selectProcess],
-                      processes: this.processes,
-                    }
-                  })
-                })
                 .onChange((value: string) => {
                   this.seqNo = value
                 })

+ 8 - 2
entry/src/main/ets/view/CompleteSet.ets

@@ -124,9 +124,13 @@ export struct CompleteSet {
     } as RequestParamModel)
     this.recentlyRecordObject = res
 
+
+    console.log("jjjj", JSON.stringify(this.recentlyRecordObject))
+
     this.materialGridStatus = 0
     if (this.recentlyRecordObject && this.recentlyRecordObject.rfid) {
       this.materialGridStatus = 1
+      this.recentlyRecordObject.weight = this.recentlyRecordObject.weight + 'Kg'
     }
   }
   //扫码请求
@@ -689,7 +693,7 @@ export struct CompleteSet {
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.process_nameplate_grey_color'))
-            Text(this.drawerPositionStatus === 1 ? '料格内' : '料格外')
+            Text(this.recentlyRecordObject.lockStr)
               .textAlign(TextAlign.End)
               .width('48%')
               .height('25%')
@@ -821,13 +825,15 @@ export struct CompleteSet {
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.process_nameplate_grey_color'))
-            Text(this.recentlyRecordObject.weight ?? '' + 'Kg')
+
+            Text(this.recentlyRecordObject.weight)
               .textAlign(TextAlign.End)
               .width('48%')
               .height('25%')
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_24'))
               .fontColor(this.BoxWeight <= 15 ? $r('app.color.black_90') : $r('app.color.brown_100'))
+
             Blank()
             Text('料箱ID')
               .textAlign(TextAlign.End)

+ 7 - 3
entry/src/main/ets/view/ManualWarehousing.ets

@@ -133,6 +133,8 @@ export struct ManualWarehousing {
     this.materialGridStatus = 0
     if (this.recentlyRecordObject && this.recentlyRecordObject.rfid) {
       this.materialGridStatus = 1
+      this.recentlyRecordObject.weight = this.recentlyRecordObject.weight + 'Kg'
+
     }
     // 有数据 {"code":200,"message":"ok","data":{"RFID":"2024080613602207","UID":"992fa202530104e0","errCode":"0","ts":"1722568500"}}
     // 无数据 {"code":200,"message":"ok","data":{"RFID":"","UID":"0000000000000000","errCode":"0","ts":"1722568502"}}
@@ -244,13 +246,15 @@ export struct ManualWarehousing {
                   .focusable(true)
                   .defaultFocus(true)
                 // Text(this.BoxWeight.toString() + 'Kg')
-                Text(this.recentlyRecordObject.weight ?? "" + "Kg")
+
+                Text(this.recentlyRecordObject.weight)
                   .textAlign(TextAlign.End)
                   .width('48%')
                   .height('25%')
                   .fontWeight(FontWeight.Regular)
                   .fontSize($r('app.float.fontSize_24'))
                   .fontColor(this.BoxWeight <= 15 ? $r('app.color.black_90') : $r('app.color.brown_100'))
+
                 Blank()
                 Text('料箱ID')
                   .textAlign(TextAlign.End)
@@ -608,7 +612,7 @@ export struct ManualWarehousing {
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.process_nameplate_grey_color'))
-            Text(this.drawerPositionStatus === 1 ? '料格内' : '料格外')
+            Text(this.recentlyRecordObject.lockStr)
               .textAlign(TextAlign.End)
               .width('48%')
               .height('25%')
@@ -623,7 +627,7 @@ export struct ManualWarehousing {
               .fontWeight(FontWeight.Regular)
               .fontSize($r('app.float.fontSize_20'))
               .fontColor($r('app.color.process_nameplate_grey_color'))
-            Text(this.materialGridStatus === 1 && this.materialPosition?.vehicleCode && this.materialPosition.vehicleCode!.length > 0 ? this.materialPosition.vehicleCode! : '')
+            Text(this.recentlyRecordObject.rfid)
               .textAlign(TextAlign.End)
               .width('100%')
               .height('25%')

+ 1 - 1
entry/src/main/resources/base/element/string.json

@@ -10,7 +10,7 @@
     },
     {
       "name": "EntryAbility_label",
-      "value": "工控MES"
+      "value": "工控WMS"
     },
     {
       "name": "title_set",

+ 1 - 1
entry/src/main/resources/en_US/element/string.json

@@ -10,7 +10,7 @@
     },
     {
       "name": "EntryAbility_label",
-      "value": "工控MES"
+      "value": "工控WMS"
     },
     {
       "name": "title_set",

+ 1 - 2
entry/src/main/resources/zh_CN/element/string.json

@@ -10,7 +10,7 @@
     },
     {
       "name": "EntryAbility_label",
-      "value": "工控MES"
+      "value": "工控WMS"
     },
     {
       "name": "title_set",
@@ -36,6 +36,5 @@
       "name": "set_card_user_info",
       "value": "我的"
     }
-
   ]
 }

+ 1 - 1
oh-package.json5

@@ -9,7 +9,7 @@
     "pinyin-pro": "^3.18.3"
   },
   "author": "",
-  "name": "wonderfuldemo",
+  "name": "MES",
   "description": "Please describe the basic information.",
   "main": "",
   "version": "1.0.0",