|
@@ -1,6 +1,9 @@
|
|
|
-import {OrderListView,ProcessFlow,MaterialGrid,SingleOrder,materialScan,BoxGrid} from "../component/OrderMaterialsStorageView"
|
|
|
-import {OrderParams,MaterialItem,MaterialBox} from "../params/OrderMaterialsStorageParams"
|
|
|
+import {ProcessFlow,MaterialList,SingleOrder,BoxGrid,
|
|
|
+ OrderListComponent} from "../component/OrderMaterialsStorageView"
|
|
|
+import {OrderParams,DemandMaterial,MaterialBox, EmptyBox} from "../params/OrderMaterialsStorageParams"
|
|
|
import router from '@ohos.router';
|
|
|
+import {NavigationBar} from '../component/NavigationBar'
|
|
|
+import {TimeAndTitle} from "../component/TimeAndTitle"
|
|
|
@Entry
|
|
|
@Component
|
|
|
struct orderMaterialsStorage {
|
|
@@ -8,8 +11,10 @@ struct orderMaterialsStorage {
|
|
|
@State selectedOrderNo: string = '';
|
|
|
@State selectedOrderDate: string = ''
|
|
|
@State selectedOrderName: string = ''
|
|
|
- @State currentStep: number = 0;
|
|
|
- @State boxData: MaterialBox[] = [
|
|
|
+ @State selectedOrderInRatio:string = ''
|
|
|
+ @State currentStep: number = 1;
|
|
|
+ @State emptyBox : EmptyBox []=[{ position: 'X-1Y-2' },{ position: 'X-1Y-2' },{ position: 'X-1Y-2' },{ position: 'X-1Y-2' }, ]
|
|
|
+ @State materialBoxes: MaterialBox[] = [
|
|
|
// 第一行物料箱
|
|
|
{
|
|
|
id: '1', type: 'material',
|
|
@@ -172,181 +177,263 @@ struct orderMaterialsStorage {
|
|
|
{ orderName: '订单名称XXXX', orderNo: '123123213', date: '2025/11/11', progress: '75%' },
|
|
|
{ orderName: '特殊订单', orderNo: 'SH2024001', date: '2024/03/01', progress: '100%' }
|
|
|
]
|
|
|
- @State materialData: MaterialItem[] = [
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- { id: '1', name: '物料名称XXXX', model: '型号×××××', completed: 11, planned: 20 },
|
|
|
- { id: '2', name: '物料名称XXX', model: '型号××××××', completed: 11, planned: 20 },
|
|
|
- // 其他7项数据...
|
|
|
+ @State materialData: DemandMaterial[] = [
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
+ {materialName: 'PCBA电路板-SADD1231241142324233231233234', materialType: '12322221232321222332211233', inBoundNum: 11, planNum: 20 },
|
|
|
];
|
|
|
|
|
|
build() {
|
|
|
Row() {
|
|
|
Column() {
|
|
|
Row(){
|
|
|
- Text('<订单物料入库')
|
|
|
- .width('40%')
|
|
|
+ TimeAndTitle()
|
|
|
+ }.width('100%')
|
|
|
+ .height('3.4%')
|
|
|
+ .alignItems(VerticalAlign.Bottom)
|
|
|
+ .justifyContent(FlexAlign.End)
|
|
|
+
|
|
|
+ Row(){
|
|
|
+ Text('< 订单物料入库')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_15_2'))
|
|
|
.onClick(()=>{
|
|
|
router.back({
|
|
|
url :"pages/Menu"
|
|
|
})
|
|
|
})
|
|
|
- //.margin({left:'%'})
|
|
|
- Row(){
|
|
|
- Button('统计')
|
|
|
- .width('22%')
|
|
|
- Button('叫料通知')
|
|
|
- .width('22%')
|
|
|
- Button('仓储日志')
|
|
|
- .width('22%')
|
|
|
- Button('仓储车调试')
|
|
|
- .width('22%')
|
|
|
- }
|
|
|
- .width('55%')
|
|
|
- .justifyContent(FlexAlign.SpaceBetween)
|
|
|
}
|
|
|
- .height('10%')
|
|
|
- if(this.currentStep === 0)
|
|
|
- {
|
|
|
+ .height('4%')
|
|
|
+ .width('100%')
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
+ .margin({left:'5%'})
|
|
|
|
|
|
+ Row(){
|
|
|
+ Row(){
|
|
|
+ ProcessFlow({
|
|
|
+ currentStep:this.currentStep
|
|
|
+ })
|
|
|
+ }.width('20%')
|
|
|
+ .margin({right:'20%'})
|
|
|
+ NavigationBar().width('20%')
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('4%')
|
|
|
+ .margin({top:'1%'})
|
|
|
+ .justifyContent(FlexAlign.End)
|
|
|
+ .alignItems(VerticalAlign.Bottom)
|
|
|
|
|
|
- Row(){
|
|
|
- ProcessFlow({
|
|
|
- circle1Color:"#1890FF",
|
|
|
- circle2Color:"#676D6F",
|
|
|
- circle3Color:"#676D6F",
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- .height('8%')
|
|
|
- .width('100%')
|
|
|
- .margin({bottom:'2%'})
|
|
|
- .justifyContent(FlexAlign.SpaceAround)
|
|
|
|
|
|
+ if(this.currentStep === 1)
|
|
|
+ {
|
|
|
+ Column(){
|
|
|
Row(){
|
|
|
- OrderListView({
|
|
|
- orders: this.orders,
|
|
|
- selectedOrderNo: this.selectedOrderNo,
|
|
|
- selectedOrderDate:this.selectedOrderDate,
|
|
|
- selectedOrderName:this.selectedOrderName
|
|
|
- })
|
|
|
- .width('20%')
|
|
|
-
|
|
|
- Row(){
|
|
|
- MaterialGrid({ materials: this.materialData })
|
|
|
- .width('100%')
|
|
|
- .height('100%')
|
|
|
- }.width('75%')
|
|
|
- .border({width:1})
|
|
|
- .height("100%")
|
|
|
- .alignItems(VerticalAlign.Top)
|
|
|
-
|
|
|
- }.height('65%')
|
|
|
- .justifyContent(FlexAlign.SpaceAround)
|
|
|
+ Column(){
|
|
|
+ Row(){
|
|
|
+ Text("选择工单")
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_15_2'))
|
|
|
+ }.height('10%')
|
|
|
+ Row(){
|
|
|
+ OrderListComponent({
|
|
|
+ orders:this.orders,
|
|
|
+ selectedOrderNo: this.selectedOrderNo,
|
|
|
+ selectedOrderDate:this.selectedOrderDate,
|
|
|
+ selectedOrderName:this.selectedOrderName,
|
|
|
+ selectedOrderInRatio:this.selectedOrderInRatio
|
|
|
+ }).width('95%').height('90%')
|
|
|
+ }
|
|
|
+ }.width('30%').backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ Image($r('app.media.arrow_right'))
|
|
|
+ .width($r('app.float.virtualSize_23'))
|
|
|
+ .height($r('app.float.virtualSize_23'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ .margin({left:'-2%',right:'-2%'})
|
|
|
+ Column(){
|
|
|
+ Row(){
|
|
|
+ Text("需求物料")
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_15_2'))
|
|
|
+ }.height('10%')
|
|
|
+ Row() {
|
|
|
+ MaterialList({ MaterialData: this.materialData })
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ }.width('95%').height('90%')
|
|
|
+ }.width('62%').backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ }
|
|
|
+ .height('85%')
|
|
|
+ .justifyContent(FlexAlign.SpaceEvenly)
|
|
|
.width('100%')
|
|
|
|
|
|
- Button("下一步")
|
|
|
- .width("30%")
|
|
|
- .backgroundColor(this.selectedOrderNo ? '#1890FF' : '#CCCCCC')
|
|
|
- .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
|
|
|
- .onClick(() => {
|
|
|
- this.currentStep = 1;
|
|
|
- })
|
|
|
- }
|
|
|
- else if(this.currentStep === 1)
|
|
|
+ Button({type:ButtonType.Normal}) {
|
|
|
+ Text("下一步")
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
|
|
|
+ }
|
|
|
+ .width('20%')
|
|
|
+ .height('6%')
|
|
|
+ .margin({bottom:'3%',left:'75%'})
|
|
|
+ .backgroundColor(this.selectedOrderNo ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_6_4'))
|
|
|
+ .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
|
|
|
+ .onClick(() => {
|
|
|
+ this.currentStep = 2;
|
|
|
+ })
|
|
|
+ }.height('83.6%').margin({top:'3%'}).width('100%')
|
|
|
+ .justifyContent(FlexAlign.SpaceAround)
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ else if(this.currentStep === 2)
|
|
|
{
|
|
|
- Row(){
|
|
|
- ProcessFlow({
|
|
|
- circle1Color:"#676D6F",
|
|
|
- circle2Color:"#1890FF",
|
|
|
- circle3Color:"#676D6F",
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- .height('8%')
|
|
|
- .width('100%')
|
|
|
- .margin({bottom:'2%'})
|
|
|
- .justifyContent(FlexAlign.SpaceAround)
|
|
|
-
|
|
|
- Row(){
|
|
|
- Column(){
|
|
|
- SingleOrder({
|
|
|
- selectedOrderNo:this.selectedOrderNo,
|
|
|
- selectedOrderDate:this.selectedOrderDate,
|
|
|
- selectedOrderName:this.selectedOrderName
|
|
|
- }).height('25%')
|
|
|
- materialScan().margin({top:'5%'}).height('65%')
|
|
|
- }.width('30%')
|
|
|
- .justifyContent(FlexAlign.Start)
|
|
|
- .height('100%')
|
|
|
+ Column(){
|
|
|
Row(){
|
|
|
- BoxGrid({ boxes: this.boxData })
|
|
|
- .width('100%')
|
|
|
- .height('100%')
|
|
|
- }.width('65%')
|
|
|
- .border({width:1})
|
|
|
- .height("100%")
|
|
|
- .alignItems(VerticalAlign.Top)
|
|
|
+ Column(){
|
|
|
+ SingleOrder({
|
|
|
+ selectedOrderNo:this.selectedOrderNo,
|
|
|
+ selectedOrderDate:this.selectedOrderDate,
|
|
|
+ selectedOrderName:this.selectedOrderName,
|
|
|
+ selectedOrderInRatio:this.selectedOrderInRatio
|
|
|
+ }).height('18%').width('95%')
|
|
|
+ Column(){
|
|
|
+ Text('查询物料')
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_15_2'))
|
|
|
+ .margin({top:'4%'})
|
|
|
+ Row() {
|
|
|
+ // 左侧二维码图标
|
|
|
+ Image($r('app.media.material_qr_code')) // 请替换为您的二维码图片资源
|
|
|
+ .width($r('app.float.virtualSize_16_8'))
|
|
|
+ .height($r('app.float.virtualSize_16_8'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ .margin({left:'2%'})
|
|
|
+ // 扫码输入框
|
|
|
+ TextInput({ placeholder: '请扫描物料编码' })
|
|
|
+ .type(InputType.Normal)
|
|
|
+ .placeholderFont({ size: $r('app.float.fontSize_12')})
|
|
|
+ .placeholderColor($r('app.color.30FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ }
|
|
|
+ .margin({top:'3%'})
|
|
|
+ .height('8%')
|
|
|
+ .width('80%')
|
|
|
+ .borderRadius($r('app.float.virtualSize_7_2'))
|
|
|
+ .backgroundColor($r('app.color.000000'))
|
|
|
+ // 操作说明
|
|
|
+ Text('通过物料扫码查询当前库存是否有同型号物')
|
|
|
+ .fontSize($r('app.float.fontSize_8'))
|
|
|
+ .fontColor($r('app.color.60FFFFFF'))
|
|
|
+ .width('100%')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .margin({top:'2%'})
|
|
|
|
|
|
- }.height('65%')
|
|
|
+ Column() {
|
|
|
+ Image($r('app.media.arrow_down'))
|
|
|
+ .width($r('app.float.virtualSize_23'))
|
|
|
+ .height($r('app.float.virtualSize_23'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ Column({space:5}){
|
|
|
+ Text('DIANLUBANPCBAADD123124114232423ASD')
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .width('100%')
|
|
|
+ Text('产品型号:12322221232321222332211233')
|
|
|
+ .fontSize($r('app.float.fontSize_8'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .width('100%')
|
|
|
+ Text('序列号:123254213452465346346456')
|
|
|
+ .fontSize($r('app.float.fontSize_8'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .width('100%')
|
|
|
+ Text('数量:10个')
|
|
|
+ .fontSize($r('app.float.fontSize_8'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .width('100%')
|
|
|
+ }.backgroundColor($r('app.color.000000'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_7_2'))
|
|
|
+ .padding(16)
|
|
|
+ .margin({top:'4%'})
|
|
|
+ .height('40%')
|
|
|
+ .width('80%')
|
|
|
+ Row(){
|
|
|
+ Text('当前有 ')
|
|
|
+ .fontSize($r('app.float.fontSize_8'))
|
|
|
+ .fontColor($r('app.color.60FFFFFF'))
|
|
|
+ Text('6')
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ Text(' 个料箱装有同型号物料')
|
|
|
+ .fontSize($r('app.float.fontSize_8'))
|
|
|
+ .fontColor($r('app.color.60FFFFFF'))
|
|
|
+ }.justifyContent(FlexAlign.Center)
|
|
|
+ .margin({top:'5%'})
|
|
|
+ }.margin({top:'4%'})
|
|
|
+ }.height('82%').width('95%').justifyContent(FlexAlign.Start)
|
|
|
+ }.width('30%').backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ Image($r('app.media.arrow_right'))
|
|
|
+ .width($r('app.float.virtualSize_23'))
|
|
|
+ .height($r('app.float.virtualSize_23'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ .margin({left:'-2%',right:'-2%'})
|
|
|
+ Column(){
|
|
|
+ Row(){
|
|
|
+ Text("选择料箱")
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_15_2'))
|
|
|
+ }.height('10%')
|
|
|
+ Row() {
|
|
|
+ BoxGrid({ materialBoxes: this.materialBoxes,emptyBoxes:this.emptyBox })
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ }.width('100%').height('90%')
|
|
|
+ }.width('62%').backgroundColor($r('app.color.10FFFFFF'))
|
|
|
+ }
|
|
|
+ .height('85%')
|
|
|
+ .justifyContent(FlexAlign.SpaceEvenly)
|
|
|
+ .width('100%')
|
|
|
+ Button({type:ButtonType.Normal}) {
|
|
|
+ Text("下一步")
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .fontColor($r('app.color.0A84FF')) // 图片中的蓝色
|
|
|
+ }
|
|
|
+ .width('20%')
|
|
|
+ .height('6%')
|
|
|
+ .margin({bottom:'3%',left:'75%'})
|
|
|
+ .backgroundColor(this.selectedOrderNo ?$r('app.color.20FFFFFF'):$r('app.color.10FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.virtualSize_6_4'))
|
|
|
+ .enabled(!!this.selectedOrderNo) // 只有选中订单时才启用按钮
|
|
|
+ .onClick(() => {
|
|
|
+ this.currentStep = 2;
|
|
|
+ })
|
|
|
+ }.height('83.6%').margin({top:'3%'}).width('100%')
|
|
|
.justifyContent(FlexAlign.SpaceAround)
|
|
|
.width('100%')
|
|
|
-
|
|
|
- Row(){
|
|
|
- Button("上一步")
|
|
|
- .width("25%")
|
|
|
- .onClick(()=>{
|
|
|
- this.currentStep = 0;
|
|
|
- })
|
|
|
- Button("料箱出库")
|
|
|
- .width("25%")
|
|
|
- .onClick(()=>{
|
|
|
- this.currentStep = 1;
|
|
|
- })
|
|
|
- Button("下一步")
|
|
|
- .width("25%")
|
|
|
- .onClick(()=>{
|
|
|
- this.currentStep = 2;
|
|
|
- })
|
|
|
- }.justifyContent(FlexAlign.SpaceEvenly)
|
|
|
- .width('100%')
|
|
|
}
|
|
|
- if(this.currentStep === 2)
|
|
|
+ if(this.currentStep === 3)
|
|
|
{
|
|
|
- Row(){
|
|
|
- ProcessFlow({
|
|
|
- circle3Color:"#1890FF",
|
|
|
- circle2Color:"#676D6F",
|
|
|
- circle1Color:"#676D6F",
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- .height('8%')
|
|
|
- .width('100%')
|
|
|
- .margin({bottom:'2%'})
|
|
|
- .justifyContent(FlexAlign.SpaceAround)
|
|
|
|
|
|
Row(){
|
|
|
|
|
|
-
|
|
|
Row(){
|
|
|
- MaterialGrid({ materials: this.materialData })
|
|
|
+
|
|
|
+ MaterialList({MaterialData: this.materialData })
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
}.width('75%')
|
|
|
- .border({width:1})
|
|
|
+ .backgroundColor($r('app.color.10FFFFFF'))
|
|
|
.height("100%")
|
|
|
.alignItems(VerticalAlign.Top)
|
|
|
|
|
@@ -374,7 +461,7 @@ struct orderMaterialsStorage {
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
- .justifyContent(FlexAlign.SpaceAround)
|
|
|
+ .backgroundColor($r('app.color.000000'))
|
|
|
}
|
|
|
.height('100%')
|
|
|
}
|