|
@@ -8,6 +8,7 @@ import CommonConstants from '../common/constants/CommonConstants'
|
|
|
import { stat2 } from './ManualWarehousing'
|
|
|
import { MaterialInformationModel } from '../model/MaterialInformation'
|
|
|
import { StationInfoModel } from '../model/StorageSpace'
|
|
|
+import { SureToDoDialog } from '../common/component/SureToDoDialog'
|
|
|
|
|
|
@Entry
|
|
|
@Component
|
|
@@ -19,6 +20,8 @@ export struct ManualOutbound {
|
|
|
@State private Materialposition: Array<Materialpositionclass> = []
|
|
|
//物料信息表
|
|
|
@State private materialList: Array<MaterialInformationModel> = []
|
|
|
+ // 料箱位置的查看详情数据
|
|
|
+ @State private positionInfoList: Array<MaterialInformationModel> = []
|
|
|
//物料编码
|
|
|
@State materialCode: string = ''
|
|
|
//料箱编号
|
|
@@ -39,33 +42,76 @@ export struct ManualOutbound {
|
|
|
@State materiaNo: string = ''
|
|
|
//取料箱中物料信息
|
|
|
@State private boxMaterials: Array<MaterialInformationModel> = []
|
|
|
- // @State private boxMaterials: Array<MaterialInformationList> = [
|
|
|
- // {
|
|
|
- // num: 200,
|
|
|
- // materialName: "哈哈哈哈哈",
|
|
|
- // materialCode: 'BM47111400130447;SL5',
|
|
|
- // unitDictLabel: "个"
|
|
|
- //
|
|
|
- // },
|
|
|
- // {
|
|
|
- // num: 300,
|
|
|
- // materialName: "自知则知之",
|
|
|
- // materialCode: 'BM47111400130447;SL6'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // num: 400,
|
|
|
- // materialName: "天天吞吞吐吐",
|
|
|
- // materialCode: 'BM47111400130447;SL7'
|
|
|
- // }
|
|
|
- //
|
|
|
- // ]
|
|
|
+ // 打开物料位置弹窗之后的操作
|
|
|
+ currentBoxStationModel: Materialpositionclass = {}
|
|
|
+ goingToLookDetail = async (m: Materialpositionclass) => {
|
|
|
+ this.currentBoxStationModel = m
|
|
|
+ let res: MaterialInformationModel[] = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
|
|
|
+ vehicleCode: m.vehicleCode ?? ""
|
|
|
+ } as RequestParamModel)
|
|
|
+ this.positionInfoList = res
|
|
|
+ this.infoListController.open()
|
|
|
+ }
|
|
|
+ goingToOut = (m: Materialpositionclass) => {
|
|
|
+ this.currentBoxStationModel = m
|
|
|
+ this.infoDialogController.open()
|
|
|
+ }
|
|
|
+ dialogCancel = () => {
|
|
|
+ this.currentBoxStationModel = {}
|
|
|
+ this.infoDialogController.close()
|
|
|
+ this.infoListController.close()
|
|
|
+ }
|
|
|
+ dialogSure = async () => {
|
|
|
+ let res: outBoxClass = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
|
|
|
+ houseNo: this.currentBoxStationModel?.houseNo ?? "",
|
|
|
+ vehicleNo: this.currentBoxStationModel?.vehicleNo ?? "",
|
|
|
+ stanCode: CommonConstants.STATION_CODE
|
|
|
+ } as RequestParamModel)
|
|
|
+
|
|
|
+ this.outBox = res
|
|
|
+
|
|
|
+ promptAction.showToast({
|
|
|
+ message: "任务进行中,请等待....",
|
|
|
+ duration: 1800,
|
|
|
+ bottom: '50%'
|
|
|
+ })
|
|
|
+ this.infoDialogController.close()
|
|
|
+ this.materialLocationController.close()
|
|
|
+
|
|
|
+ }
|
|
|
+ infoDialogController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder: SureToDoDialog(
|
|
|
+ {
|
|
|
+ cancel: this.dialogCancel,
|
|
|
+ confirm: this.dialogSure,
|
|
|
+ title: "出库确认",
|
|
|
+ info: '确认出库当前料箱吗?'
|
|
|
+ }
|
|
|
+ ),
|
|
|
+ alignment: DialogAlignment.Center,
|
|
|
+ customStyle: true,
|
|
|
+ autoCancel: false,
|
|
|
+ })
|
|
|
+ infoListController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder: LocationInfoListDialog(
|
|
|
+ {
|
|
|
+ closeDialog: this.dialogCancel,
|
|
|
+ materials: this.positionInfoList
|
|
|
+ }
|
|
|
+ ),
|
|
|
+ alignment: DialogAlignment.Center,
|
|
|
+ customStyle: true,
|
|
|
+ autoCancel: false,
|
|
|
+ })
|
|
|
//物料位置
|
|
|
materialLocationController: CustomDialogController = new CustomDialogController({
|
|
|
builder: MaterialLocationDialog({
|
|
|
outBox: this.outBox,
|
|
|
materialName: this.materialName,
|
|
|
Materialposition: this.Materialposition,
|
|
|
- boxMaterials: this.boxMaterials
|
|
|
+ boxMaterials: this.boxMaterials,
|
|
|
+ lookDetail: this.goingToLookDetail,
|
|
|
+ goToOut: this.goingToOut,
|
|
|
}),
|
|
|
alignment: DialogAlignment.Center,
|
|
|
customStyle: true,
|
|
@@ -350,12 +396,12 @@ export struct ManualOutbound {
|
|
|
this.materialLocationController.open()
|
|
|
this.onclick = index
|
|
|
this.materialName = item.materialName!
|
|
|
- this.MaterialpositionHttp().then((res: Materialpositionclass[]) => {
|
|
|
- console.log('testTag', 'result cccccc' + JSON.stringify(res))
|
|
|
- if (res && res.length > 0) {
|
|
|
- this.Materialposition = res
|
|
|
- }
|
|
|
- })
|
|
|
+ // this.MaterialpositionHttp().then((res: Materialpositionclass[]) => {
|
|
|
+ // console.log('testTag', 'result cccccc' + JSON.stringify(res))
|
|
|
+ // if (res && res.length > 0) {
|
|
|
+ // this.Materialposition = res
|
|
|
+ // }
|
|
|
+ // })
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -673,6 +719,10 @@ struct MaterialLocationDialog {
|
|
|
@State vehicleNo: string = ''
|
|
|
@State houseNo: string = ''
|
|
|
Controller: CustomDialogController
|
|
|
+ lookDetail: (m: Materialpositionclass) => void = () => {
|
|
|
+ }
|
|
|
+ goToOut: (m: Materialpositionclass) => void = () => {
|
|
|
+ }
|
|
|
//后端料箱出库
|
|
|
RemoveMaterialBox = async () => {
|
|
|
let res: outBoxClass = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
|
|
@@ -746,20 +796,12 @@ struct MaterialLocationDialog {
|
|
|
GridItem() {
|
|
|
Row() {
|
|
|
Column() {
|
|
|
- Text(item?.coordinate ? item.coordinate + '-' + item.position : "")
|
|
|
- .fontSize($r('app.float.fontSize_24'))
|
|
|
- .fontWeight(FontWeight.Regular)
|
|
|
- .fontColor($r('app.color.black_90'))
|
|
|
- .height('20%')
|
|
|
- .width('100%')
|
|
|
- Text(item.materialName)
|
|
|
- .fontSize($r('app.float.fontSize_24'))
|
|
|
- .fontWeight(FontWeight.Regular)
|
|
|
- .fontColor($r('app.color.black_60'))
|
|
|
- .height('20%')
|
|
|
- .width('100%')
|
|
|
- Blank()
|
|
|
Row() {
|
|
|
+ Text(item?.coordinate ? item.coordinate + '-' + item.position : "")
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.black_90'))
|
|
|
+ .margin({ right: 15 })
|
|
|
Text(item.num?.toString())
|
|
|
.fontSize($r('app.float.fontSize_38'))
|
|
|
.fontWeight(FontWeight.Bold)
|
|
@@ -769,32 +811,66 @@ struct MaterialLocationDialog {
|
|
|
.fontWeight(FontWeight.Regular)
|
|
|
.fontColor($r('app.color.black_60'))
|
|
|
}
|
|
|
- .height('50%')
|
|
|
+
|
|
|
+ Text(item.materialName)
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.black_60'))
|
|
|
+ .width('100%')
|
|
|
+ Blank()
|
|
|
+
|
|
|
}
|
|
|
- .width('100%')
|
|
|
- .padding(10)
|
|
|
- .borderRadius(10)
|
|
|
+ .width('60%')
|
|
|
.alignItems(HorizontalAlign.Start)
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.height('100%')
|
|
|
+
|
|
|
+ Row() {
|
|
|
+ Text("详情")
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.white_100'))
|
|
|
+ .backgroundColor($r('app.color.blue_100'))
|
|
|
+ .height(40)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .borderRadius(10)
|
|
|
+ .width(60)
|
|
|
+ .onClick(() => {
|
|
|
+ this.lookDetail(item)
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ Text("出库")
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.white_100'))
|
|
|
+ .margin({ left: 15 })
|
|
|
+ .backgroundColor($r('app.color.warn_1'))
|
|
|
+ .height(40)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .borderRadius(10)
|
|
|
+ .width(60)
|
|
|
+ .onClick(() => {
|
|
|
+ this.goToOut(item)
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('40%')
|
|
|
+ .justifyContent(FlexAlign.End)
|
|
|
+ .height('100%')
|
|
|
}
|
|
|
.padding(5)
|
|
|
.borderRadius(10)
|
|
|
- .height('25%')
|
|
|
+ .height('12%')
|
|
|
.width('100%')
|
|
|
.backgroundColor(this.selectMaterial === index ? $r('app.color.robot_set_card_blue') : $r('app.color.robot_set_card_white'))
|
|
|
- .onClick(async () => {
|
|
|
- this.houseNo = item.houseNo!
|
|
|
- this.vehicleNo = item.vehicleCode!
|
|
|
|
|
|
- this.RemoveMaterialBox()
|
|
|
- })
|
|
|
}
|
|
|
.padding({ left: 5 })
|
|
|
})
|
|
|
}
|
|
|
.padding(10)
|
|
|
- .columnsTemplate('1fr 1fr 1fr 1fr 1fr 1fr')
|
|
|
+ .columnsTemplate('1fr 1fr')
|
|
|
.columnsGap(10)
|
|
|
.rowsGap(10)
|
|
|
.width('100%')
|
|
@@ -808,6 +884,81 @@ struct MaterialLocationDialog {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+// 物料位置(物料在哪些料箱里面)
|
|
|
+@CustomDialog
|
|
|
+struct LocationInfoListDialog {
|
|
|
+ @Link materials: MaterialInformationModel[]
|
|
|
+ scroller: Scroller = new Scroller()
|
|
|
+ Controller: CustomDialogController
|
|
|
+ closeDialog: () => void = () => {
|
|
|
+ }
|
|
|
+
|
|
|
+ build() {
|
|
|
+ Stack() {
|
|
|
+ Column() {
|
|
|
+ Grid(this.scroller) {
|
|
|
+ ForEach(this.materials, (item: MaterialInformationModel, index: number) => {
|
|
|
+ GridItem() {
|
|
|
+ Column() {
|
|
|
+ Row() {
|
|
|
+ Text(item?.materialName)
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.black_90'))
|
|
|
+ .margin({ right: 15 })
|
|
|
+ Row() {
|
|
|
+ Text(item.num?.toString())
|
|
|
+ .fontSize($r('app.float.fontSize_38'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ .fontColor($r('app.color.black_90'))
|
|
|
+ Text(item.unitDictLabel)
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.black_60'))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .justifyContent(FlexAlign.SpaceBetween)
|
|
|
+ .width('100%')
|
|
|
+
|
|
|
+ Text(item.materialCode)
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .fontColor($r('app.color.black_60'))
|
|
|
+ .width('100%')
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .height('60')
|
|
|
+
|
|
|
+ }
|
|
|
+ .padding({ left: 5, bottom: 8 })
|
|
|
+ .borderRadius(5)
|
|
|
+ .border({ width: 2, color: Color.Gray })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .padding(10)
|
|
|
+ .columnsTemplate('1fr')
|
|
|
+ .columnsGap(10)
|
|
|
+ .rowsGap(10)
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ }
|
|
|
+ .width('60%')
|
|
|
+ .height('80%')
|
|
|
+ .backgroundColor($r('app.color.page_general_background'))
|
|
|
+ .borderRadius(20)
|
|
|
+ .onClick(() => {
|
|
|
+ this.closeDialog()
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export class outboundMaterialsClass {
|
|
|
//批次号
|
|
|
batchCode?: string;
|