|
@@ -7,8 +7,14 @@ import { NavigationBar } from '../component/NavigationBar'
|
|
|
import { OperationMaterialKitOneStep } from '../view/wms/OperationMaterialKitOneStep'
|
|
|
import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
|
|
|
import { OperationMaterialKitTwoStep } from '../view/wms/OperationMaterialKitTwoStep'
|
|
|
+import { OperationMaterialKitThreeStep } from '../view/wms/OperationMaterialKitThreeStep'
|
|
|
import OperationInfo from '../viewmodel/wms/OperationInfo'
|
|
|
import OperationItem from '../viewmodel/wms/OperationItem'
|
|
|
+import VehicleInfo from '../viewmodel/wms/VehicleInfo'
|
|
|
+import WmsRequest from '../common/util/request/WmsRequest'
|
|
|
+import promptAction from '@ohos.promptAction'
|
|
|
+import RequestParamModel from '../viewmodel/wms/RequestParamModel'
|
|
|
+import CommonConstants from '../common/constants/CommonConstants'
|
|
|
|
|
|
@Entry
|
|
|
@Component
|
|
@@ -22,6 +28,22 @@ struct OperationMaterialKit {
|
|
|
// 选中工序需求的物料
|
|
|
@State operationItems: OperationItem[] = []
|
|
|
|
|
|
+ // 空箱出库的方法
|
|
|
+ callEmptyBoxFun = async () => {
|
|
|
+ let res: VehicleInfo = await WmsRequest.post('/api/v1/stock/queryEmptyBox')
|
|
|
+ console.log("hhtest", JSON.stringify(res), res?.vehicleNo)
|
|
|
+ await WmsRequest.post('/api/v1/wmsOrder/outBox', {
|
|
|
+ stanCode: CommonConstants.STATION_CODE,
|
|
|
+ vehicleNo: res!.vehicleNo,
|
|
|
+ houseNo: res!.houseNo
|
|
|
+ } as RequestParamModel)
|
|
|
+ promptAction.showToast({
|
|
|
+ message: "箱子正在运行中....",
|
|
|
+ duration: 1800,
|
|
|
+ bottom: '50%'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
build() {
|
|
|
Column() {
|
|
|
// 顶部时间和菜单栏
|
|
@@ -78,7 +100,13 @@ struct OperationMaterialKit {
|
|
|
Divider()
|
|
|
.vertical(false)
|
|
|
.strokeWidth(1)
|
|
|
+ .layoutWeight(1)
|
|
|
+ .height($r('app.float.virtualSize_19_2'))
|
|
|
.color($r('app.color.15FFFFFF'))
|
|
|
+ .margin({
|
|
|
+ left: '-3%',
|
|
|
+ right: '-3%',// 向左延伸至圆心
|
|
|
+ })
|
|
|
Column({space: 5}) {
|
|
|
Stack() {
|
|
|
Circle()
|
|
@@ -97,6 +125,17 @@ struct OperationMaterialKit {
|
|
|
.fontColor(this.step === 2 ? $r('app.color.FFFFFF') : $r('app.color.60FFFFFF'))
|
|
|
.fontWeight(FontWeight.Regular)
|
|
|
}
|
|
|
+ Divider()
|
|
|
+ .vertical(false)
|
|
|
+ .strokeWidth(1)
|
|
|
+ .layoutWeight(1)
|
|
|
+ .height($r('app.float.virtualSize_19_2'))
|
|
|
+ .color($r('app.color.15FFFFFF'))
|
|
|
+ .margin({
|
|
|
+ left: '-3%',
|
|
|
+ right: '-3%',// 向左延伸至圆心
|
|
|
+ //
|
|
|
+ })
|
|
|
Column({space: 5}) {
|
|
|
Stack() {
|
|
|
Circle()
|
|
@@ -118,7 +157,7 @@ struct OperationMaterialKit {
|
|
|
}
|
|
|
.height('80%')
|
|
|
.width('18%')
|
|
|
- .justifyContent(FlexAlign.SpaceBetween)
|
|
|
+ // .justifyContent(FlexAlign.SpaceBetween)
|
|
|
.alignItems(VerticalAlign.Top)
|
|
|
|
|
|
Blank()
|
|
@@ -144,88 +183,81 @@ struct OperationMaterialKit {
|
|
|
selectOperations: this.selectOperations,
|
|
|
operationItems: this.operationItems,
|
|
|
})
|
|
|
+ } else {
|
|
|
+ OperationMaterialKitThreeStep({
|
|
|
+ workOrder: this.workOrder,
|
|
|
+ selectOperations: this.selectOperations,
|
|
|
+ operationItems: this.operationItems,
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
.height('71%')
|
|
|
.width('94.8%')
|
|
|
// 步骤切换按钮
|
|
|
Row() {
|
|
|
- if (this.step > 2) {
|
|
|
- Row () {
|
|
|
- Text('第一步')
|
|
|
- .fontSize($r('app.float.fontSize_9_6'))
|
|
|
- .fontColor($r('app.color.0A84FF'))
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- }
|
|
|
- .height('85%')
|
|
|
- .width('24.1%')
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
- .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
- .onClick(()=>{
|
|
|
- this.step = 1
|
|
|
- })
|
|
|
- } else {
|
|
|
- Row().width('24.1%')
|
|
|
+ Row () {
|
|
|
+ Text('第一步')
|
|
|
+ .fontSize($r('app.float.fontSize_9_6'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
}
|
|
|
+ .height('85%')
|
|
|
+ .width('24.1%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
+ .opacity(this.step > 2 ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.step = 1
|
|
|
+ })
|
|
|
Row().width('1.2%')
|
|
|
- if (this.step > 1) {
|
|
|
- Row () {
|
|
|
- Text('上一步')
|
|
|
- .fontSize($r('app.float.fontSize_9_6'))
|
|
|
- .fontColor($r('app.color.0A84FF'))
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- }
|
|
|
- .height('85%')
|
|
|
- .width('24.1%')
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
- .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
- .onClick(()=>{
|
|
|
- this.step -= 1
|
|
|
- })
|
|
|
- } else {
|
|
|
- Row().width('24.1%')
|
|
|
+ Row () {
|
|
|
+ Text('上一步')
|
|
|
+ .fontSize($r('app.float.fontSize_9_6'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
}
|
|
|
-
|
|
|
+ .height('85%')
|
|
|
+ .width('24.1%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
+ .opacity(this.step > 1 ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.step -= 1
|
|
|
+ })
|
|
|
Row().width('1.2%')
|
|
|
-
|
|
|
- if (this.step === 2) {
|
|
|
- Row () {
|
|
|
- Text('空箱出库')
|
|
|
- .fontSize($r('app.float.fontSize_9_6'))
|
|
|
- .fontColor($r('app.color.0A84FF'))
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- }
|
|
|
- .height('85%')
|
|
|
- .width('24.1%')
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
- .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
- } else {
|
|
|
- Row().width('24.1%')
|
|
|
+ Row () {
|
|
|
+ Text('空箱出库')
|
|
|
+ .fontSize($r('app.float.fontSize_9_6'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
}
|
|
|
-
|
|
|
+ .height('85%')
|
|
|
+ .width('24.1%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
+ .opacity(this.step === 2 ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.callEmptyBoxFun()
|
|
|
+ })
|
|
|
Row().width('1.2%')
|
|
|
-
|
|
|
- if (this.step < 3) {
|
|
|
- Row () {
|
|
|
- Text('下一步')
|
|
|
- .fontSize($r('app.float.fontSize_9_6'))
|
|
|
- .fontColor($r('app.color.0A84FF'))
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- }
|
|
|
- .height('85%')
|
|
|
- .width('24.1%')
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
- .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
- .onClick(()=>{
|
|
|
- this.step += 1
|
|
|
- })
|
|
|
- } else {
|
|
|
- Row().width('24.1%')
|
|
|
+ Row () {
|
|
|
+ Text('下一步')
|
|
|
+ .fontSize($r('app.float.fontSize_9_6'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
}
|
|
|
+ .height('85%')
|
|
|
+ .width('24.1%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_6_4'))
|
|
|
+ .opacity(this.step < 3 ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.step += 1
|
|
|
+ })
|
|
|
}
|
|
|
.width('94.8%')
|
|
|
.height('6.1%')
|