|
@@ -9,6 +9,8 @@ import DictInfo from '../../viewmodel/DictInfo'
|
|
|
import HashMap from '@ohos.util.HashMap'
|
|
|
import { isAxiosError } from '@ohos/axios'
|
|
|
import VehicleInfo from '../../viewmodel/wms/VehicleInfo'
|
|
|
+import { InBoundView } from '../../component/InBoundView'
|
|
|
+import HouseStockMaterial from '../../viewmodel/wms/HouseStockMaterial'
|
|
|
|
|
|
@Component
|
|
|
export struct OperationMaterialKitTwoStep {
|
|
@@ -18,8 +20,14 @@ export struct OperationMaterialKitTwoStep {
|
|
|
@Link operationItems: OperationItem[]
|
|
|
|
|
|
@State operationNames: string = ''
|
|
|
+ // 选择已有料箱,出库料箱
|
|
|
@State selectVehicleCode: string = ''
|
|
|
@State houseStocks: HouseStock[] = []
|
|
|
+ @State messages: string[] = []
|
|
|
+ // 空箱编码
|
|
|
+ @State vehicleCode: string = ''
|
|
|
+ @State materialTotal: number = 0
|
|
|
+ @State materialArray: HouseStockMaterial[] = []
|
|
|
stationType: string = 'station_type'
|
|
|
|
|
|
houseStockDialogController: CustomDialogController = new CustomDialogController({
|
|
@@ -33,7 +41,7 @@ export struct OperationMaterialKitTwoStep {
|
|
|
let houseNo = ''
|
|
|
for (const element of this.houseStocks) {
|
|
|
if (this.selectVehicleCode === element.vehicleCode) {
|
|
|
- houseNo = element.houseNo?element.houseNo:""
|
|
|
+ houseNo = element.houseNo!
|
|
|
}
|
|
|
}
|
|
|
let res: VehicleInfo = await WmsRequest.post("/api/v1/wmsOrder/outBox", {
|
|
@@ -130,7 +138,7 @@ export struct OperationMaterialKitTwoStep {
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.opacity(item.storageNum! > 0 ? 1 : 0.3)
|
|
|
.onClick(async ()=>{
|
|
|
- this.houseStocks = await WmsRequest.post('/api/v1/process/vehicleOperation/stockMaterials', {
|
|
|
+ this.houseStocks = await WmsRequest.post('/api/v1/process/vehicleOperation/processVehicle', {
|
|
|
label: item.itemCode
|
|
|
} as RequestParamModel) as HouseStock[]
|
|
|
if (this.houseStocks) {
|
|
@@ -168,26 +176,22 @@ export struct OperationMaterialKitTwoStep {
|
|
|
}
|
|
|
this.houseStockDialogController.open()
|
|
|
})
|
|
|
-
|
|
|
+ Image($r("app.media.wms_arrow_right"))
|
|
|
+ .height($r('app.float.virtualSize_19_2'))
|
|
|
+ .width($r('app.float.virtualSize_19_2'))
|
|
|
+ // 出入库料口操作
|
|
|
Column() {
|
|
|
- Row() {
|
|
|
- Text('出入库料口操作')
|
|
|
- .fontSize($r('app.float.fontSize_12'))
|
|
|
- .fontColor($r('app.color.FFFFFF'))
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- }
|
|
|
- .height('10%')
|
|
|
- .width('100%')
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
-
|
|
|
-
|
|
|
+ InBoundView({messages:this.messages});
|
|
|
}
|
|
|
.height('100%')
|
|
|
.width('29.6%')
|
|
|
.borderRadius($r('app.float.virtualSize_6_4'))
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.backgroundColor($r('app.color.10FFFFFF'))
|
|
|
-
|
|
|
+ Image($r("app.media.wms_arrow_right"))
|
|
|
+ .height($r('app.float.virtualSize_19_2'))
|
|
|
+ .width($r('app.float.virtualSize_19_2'))
|
|
|
+ // 拣选工作台
|
|
|
Column() {
|
|
|
Row() {
|
|
|
Text('拣选工作台')
|
|
@@ -198,7 +202,87 @@ export struct OperationMaterialKitTwoStep {
|
|
|
.height('10%')
|
|
|
.width('100%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
+ Column() {
|
|
|
+ Stack() {
|
|
|
+ Image(this.vehicleCode && this.vehicleCode.length > 0 ? $r("app.media.wms_read_vehicle") : $r("app.media.wms_not_read_vehicle"))
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ .borderRadius($r('app.float.virtualSize_6_4'))
|
|
|
+ .objectFit(ImageFit.Fill)
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text('物料:' + this.materialTotal)
|
|
|
+ .fontSize($r('app.float.fontSize_9_6'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .width('29.2%')
|
|
|
+ .height('30.8%')
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .borderRadius($r('app.float.virtualSize_6_4'))
|
|
|
+ .backgroundColor($r('app.color.60000000'))
|
|
|
+ .margin({top: $r('app.float.virtualSize_4_8'), right: $r('app.float.virtualSize_4_8')})
|
|
|
+ Blank()
|
|
|
+ Row({space: 3}) {
|
|
|
+ Image($r("app.media.wms_card_reader"))
|
|
|
+ .height($r('app.float.virtualSize_9_6'))
|
|
|
+ .width($r('app.float.virtualSize_9_6'))
|
|
|
+ .fillColor(this.vehicleCode && this.vehicleCode.length > 0 ? $r('app.color.30D158') : $r('app.color.FF453A'))
|
|
|
+ Text(this.vehicleCode)
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontColor($r('app.color.30D158'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .height('24%')
|
|
|
+ .width('96.8%')
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+ .padding({bottom: 3})
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ .alignItems(HorizontalAlign.End)
|
|
|
+ }
|
|
|
+ .height('26.4%')
|
|
|
+ .width('92.6%')
|
|
|
|
|
|
+ Row() {
|
|
|
+ Row() {
|
|
|
+ Row().width('3.4%')
|
|
|
+ // 左侧二维码图标
|
|
|
+ Image($r('app.media.material_qr_code')) // 请替换为您的二维码图片资源
|
|
|
+ .width($r('app.float.virtualSize_9_6'))
|
|
|
+ .height($r('app.float.virtualSize_9_6'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ // 扫码输入框
|
|
|
+ TextInput({ placeholder: '请扫描物料编码' })
|
|
|
+ .type(InputType.Normal)
|
|
|
+ .placeholderFont({ size: $r('app.float.fontSize_6_4')})
|
|
|
+ .placeholderColor($r('app.color.30FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_6_4'))
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .enableKeyboardOnFocus(false)
|
|
|
+ }
|
|
|
+ .width('82%')
|
|
|
+ .height('100%')
|
|
|
+ .borderRadius($r('app.float.virtualSize_6_4'))
|
|
|
+ .backgroundColor($r('app.color.000000'))
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+
|
|
|
+ }
|
|
|
+ .height('8.1%')
|
|
|
+ .width('92.6%')
|
|
|
+ .margin({top: $r('app.float.virtualSize_8'), bottom: $r('app.float.fontSize_4_8')})
|
|
|
+
|
|
|
+ List() {
|
|
|
+
|
|
|
+ }
|
|
|
+ .height('24.4%')
|
|
|
+ .width('92.6%')
|
|
|
+ .alignListItem(ListItemAlign.Center)
|
|
|
+ }
|
|
|
+ .height('90%')
|
|
|
+ .width('100%')
|
|
|
}
|
|
|
.height('100%')
|
|
|
.width('29.6%')
|