|
@@ -53,6 +53,7 @@ export struct ManualWarehousing {
|
|
|
@State index: number = 0
|
|
|
@State batchCode: string = ''
|
|
|
@State materialName: string = ''
|
|
|
+ @State imgSrc:Resource = $r('app.media.drawer_inside')
|
|
|
//齐套料箱状态不可以点击:0,可以点击:1
|
|
|
@State completeSetMaterialState: number = 0
|
|
|
@State num: number = 0
|
|
@@ -68,6 +69,25 @@ export struct ManualWarehousing {
|
|
|
@State BoxWeight: number = 20
|
|
|
@State private recentlyRecordObject: StationInfoModel = {}
|
|
|
currentTimer: number = -1;
|
|
|
+ //设置img图片路径
|
|
|
+ setImgSrc = ()=>{
|
|
|
+ if(this.drawerPositionStatus == 1 && this.materialGridStatus == 0){
|
|
|
+ this.imgSrc = $r('app.media.drawer_inside')
|
|
|
+
|
|
|
+ }else if(this.drawerPositionStatus == 0 && this.materialGridStatus == 0){
|
|
|
+ this.imgSrc = $r('app.media.drawer_outside')
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(this.drawerPositionStatus === 1 && this.materialGridStatus === 1){
|
|
|
+ this.imgSrc = $r('app.media.D_W_inside')
|
|
|
+
|
|
|
+ }
|
|
|
+ else if(this.drawerPositionStatus === 0 && this.materialGridStatus === 1) {
|
|
|
+ this.imgSrc = $r('app.media.D_W_outside')
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
//扫码请求
|
|
|
ScanStorageCode = async (itemCode: string) => {
|
|
|
|
|
@@ -123,19 +143,22 @@ export struct ManualWarehousing {
|
|
|
gridCount: 4,
|
|
|
customStyle: true,
|
|
|
})
|
|
|
+ //获取RFID信息
|
|
|
locationRequest = async (): Promise<StationInfoModel> => {
|
|
|
let res: StationInfoModel = await StorageRequest.post("api/v1/wms/common/queryStationInfo", {
|
|
|
stanCode: CommonConstants.STATION_CODE
|
|
|
} as RequestParamModel)
|
|
|
this.recentlyRecordObject = res
|
|
|
-
|
|
|
this.materialGridStatus = 0
|
|
|
if (this.recentlyRecordObject && this.recentlyRecordObject.rfid) {
|
|
|
this.materialGridStatus = 1
|
|
|
this.BoxWeight = Number(this.recentlyRecordObject.weight)
|
|
|
this.recentlyRecordObject.weight = this.recentlyRecordObject.weight + 'Kg'
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
+ this.drawerPositionStatus = res.lock==null? 1: Number(res.lock)
|
|
|
+
|
|
|
+ this.setImgSrc()
|
|
|
// 有数据 {"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"}}
|
|
|
return this.recentlyRecordObject
|
|
@@ -253,26 +276,26 @@ export struct ManualWarehousing {
|
|
|
|
|
|
// RFID的信息
|
|
|
Column() {
|
|
|
- Text('料箱重量')
|
|
|
- .textAlign(TextAlign.End)
|
|
|
- .width('48%')
|
|
|
- .height('20%')
|
|
|
- .fontWeight(FontWeight.Regular)
|
|
|
- .fontSize($r('app.float.fontSize_20'))
|
|
|
- .fontColor($r('app.color.process_nameplate_grey_color'))
|
|
|
- .focusable(true)
|
|
|
- .defaultFocus(true)
|
|
|
+ // Text('料箱重量')
|
|
|
+ // .textAlign(TextAlign.End)
|
|
|
+ // .width('48%')
|
|
|
+ // .height('20%')
|
|
|
+ // .fontWeight(FontWeight.Regular)
|
|
|
+ // .fontSize($r('app.float.fontSize_20'))
|
|
|
+ // .fontColor($r('app.color.process_nameplate_grey_color'))
|
|
|
+ // .focusable(true)
|
|
|
+ // .defaultFocus(true)
|
|
|
// Text(this.BoxWeight.toString() + '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(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)
|
|
|
.width('48%')
|
|
@@ -636,8 +659,7 @@ export struct ManualWarehousing {
|
|
|
|
|
|
Column() {
|
|
|
Stack() {
|
|
|
- Image(this.drawerPositionStatus === 1 && this.materialGridStatus === 0 ? $r('app.media.drawer_inside') : (this.drawerPositionStatus === 2 && this.materialGridStatus === 0 ? $r('app.media.drawer_outside') :
|
|
|
- (this.drawerPositionStatus === 1 && this.materialGridStatus === 1 ? $r('app.media.D_W_inside') : $r('app.media.D_W_outside'))))
|
|
|
+ Image(this.imgSrc)
|
|
|
.width(px2vp(608))
|
|
|
.height('100%')
|
|
|
.borderRadius($r('app.float.borderRadius_16'))
|