|
@@ -6,134 +6,134 @@ import ProcessRequest from '../common/util/request/ProcessRequest';
|
|
|
import RequestParamModel from '../viewmodel/RequestParamModel';
|
|
|
import OperationInfo from '../viewmodel/process/OperationInfo';
|
|
|
import { SelectOrderDialog } from '../view/SelectOrderDialog';
|
|
|
+import image from '@ohos.multimedia.image';
|
|
|
|
|
|
@Entry
|
|
|
@Component
|
|
|
struct Index {
|
|
|
- @State message: string = 'Hello World';
|
|
|
// 工单列表
|
|
|
@State workOrders: WorkOrderInfo[] = []
|
|
|
// 选中工单
|
|
|
@State selectWorkOder: WorkOrderInfo = {
|
|
|
- beforeNum: '0.00',
|
|
|
- completeNum:'0.00',
|
|
|
- inventoryNum:'0.00',
|
|
|
- materialCode:'GAS-RTA',
|
|
|
- materialModel: 'N2纯度99.9999%,露点<-70°C',
|
|
|
- materialName:'快速退火气体',
|
|
|
- ops:[
|
|
|
- {
|
|
|
- exists:false,
|
|
|
- firstCheck:0,
|
|
|
- inspection:0,
|
|
|
- mutualInspection:0,
|
|
|
- opComplete:false,
|
|
|
- operationCode:'GX-SFZB',
|
|
|
- operationId:'679',
|
|
|
- operationName:'三防准备',
|
|
|
- operationSort:0,
|
|
|
- selfCheck:0,
|
|
|
- seqs:[],
|
|
|
- specialInspection:0,
|
|
|
- workOrderCode:'10.25.0022'
|
|
|
- },
|
|
|
- {
|
|
|
- exists:false,
|
|
|
- firstCheck:0,
|
|
|
- inspection:0,
|
|
|
- mutualInspection:0,
|
|
|
- opComplete:false,
|
|
|
- operationCode:'GX-CXSL',
|
|
|
- operationId:'680',
|
|
|
- operationName:'程序烧录',
|
|
|
- operationSort:1,
|
|
|
- selfCheck:0,
|
|
|
- seqs:[],
|
|
|
- specialInspection:0,
|
|
|
- workOrderCode:'10.25.0022'
|
|
|
- },
|
|
|
- {
|
|
|
- exists:true,
|
|
|
- firstCheck:0,
|
|
|
- inspection:0,
|
|
|
- mutualInspection:0,
|
|
|
- opComplete:false,
|
|
|
- operationCode:'GX-WGJC',
|
|
|
- operationId:'681',
|
|
|
- operationName:'外观检测',
|
|
|
- operationSort:2,
|
|
|
- selfCheck:0,
|
|
|
- seqs:[
|
|
|
- {
|
|
|
- currentTask:'当前进度:包装工位1(三防准备)',
|
|
|
- seqNo:'10.25.0022-0001',
|
|
|
- state:'0'
|
|
|
- }
|
|
|
- ],
|
|
|
- specialInspection:0,
|
|
|
- workOrderCode:'10.25.0022'
|
|
|
- },
|
|
|
- {
|
|
|
- exists:false,
|
|
|
- firstCheck:0,
|
|
|
- inspection:0,
|
|
|
- mutualInspection:0,
|
|
|
- opComplete:false,
|
|
|
- operationCode:'GX-JY',
|
|
|
- operationId:'682',
|
|
|
- operationName:'检验',
|
|
|
- operationSort:3,
|
|
|
- selfCheck:0,
|
|
|
- seqs:[],
|
|
|
- specialInspection:0,
|
|
|
- workOrderCode:'10.25.0022'
|
|
|
- },
|
|
|
- {
|
|
|
- exists:false,
|
|
|
- firstCheck:0,
|
|
|
- inspection:0,
|
|
|
- mutualInspection:0,
|
|
|
- opComplete:false,
|
|
|
- operationCode:'GJ-WWSF',
|
|
|
- operationId:'683',
|
|
|
- operationName:'委外三防',
|
|
|
- operationSort:4,
|
|
|
- selfCheck:0,
|
|
|
- seqs:[],
|
|
|
- specialInspection:0,
|
|
|
- workOrderCode:'10.25.0022'
|
|
|
- },
|
|
|
- {
|
|
|
- exists:false,
|
|
|
- firstCheck:0,
|
|
|
- inspection:0,
|
|
|
- mutualInspection:0,
|
|
|
- opComplete:false,
|
|
|
- operationCode:'GJ-GDWCC',
|
|
|
- operationId:'677',
|
|
|
- operationName:'高低温存储',
|
|
|
- operationSort:5,
|
|
|
- selfCheck:0,
|
|
|
- seqs:[],
|
|
|
- specialInspection:0,
|
|
|
- workOrderCode:'10.25.0022'
|
|
|
- }
|
|
|
- ],
|
|
|
- orderCode:'DD2505140001',
|
|
|
- orderName:'GAS-RTA',
|
|
|
- planNum:'1.00',
|
|
|
- planStartEnd:'2025-05-16 08:26:00',
|
|
|
- planStartWhen:'2025-05-16 08:00:00',
|
|
|
- processRouteCode:'GAS-RTA',
|
|
|
- processRouteId:147,
|
|
|
- processRouteName:'GAS-RTA',
|
|
|
- productLineId:'18',
|
|
|
- productLineName:'配件产线01',
|
|
|
- workOrderCode:'10.25.0022',
|
|
|
- workOrderState:'3',
|
|
|
- workshopId:'0',
|
|
|
- workshopName:'青半002'
|
|
|
- }
|
|
|
+ beforeNum: '0.00',
|
|
|
+ completeNum:'0.00',
|
|
|
+ inventoryNum:'0.00',
|
|
|
+ materialCode:'GAS-RTA',
|
|
|
+ materialModel: 'N2纯度99.9999%,露点<-70°C',
|
|
|
+ materialName:'快速退火气体',
|
|
|
+ ops:[
|
|
|
+ {
|
|
|
+ exists:false,
|
|
|
+ firstCheck:0,
|
|
|
+ inspection:0,
|
|
|
+ mutualInspection:0,
|
|
|
+ opComplete:false,
|
|
|
+ operationCode:'GX-SFZB',
|
|
|
+ operationId:'679',
|
|
|
+ operationName:'三防准备',
|
|
|
+ operationSort:0,
|
|
|
+ selfCheck:0,
|
|
|
+ seqs:[],
|
|
|
+ specialInspection:0,
|
|
|
+ workOrderCode:'10.25.0022'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ exists:false,
|
|
|
+ firstCheck:0,
|
|
|
+ inspection:0,
|
|
|
+ mutualInspection:0,
|
|
|
+ opComplete:false,
|
|
|
+ operationCode:'GX-CXSL',
|
|
|
+ operationId:'680',
|
|
|
+ operationName:'程序烧录',
|
|
|
+ operationSort:1,
|
|
|
+ selfCheck:0,
|
|
|
+ seqs:[],
|
|
|
+ specialInspection:0,
|
|
|
+ workOrderCode:'10.25.0022'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ exists:true,
|
|
|
+ firstCheck:0,
|
|
|
+ inspection:0,
|
|
|
+ mutualInspection:0,
|
|
|
+ opComplete:false,
|
|
|
+ operationCode:'GX-WGJC',
|
|
|
+ operationId:'681',
|
|
|
+ operationName:'外观检测',
|
|
|
+ operationSort:2,
|
|
|
+ selfCheck:0,
|
|
|
+ seqs:[
|
|
|
+ {
|
|
|
+ currentTask:'当前进度:包装工位1(三防准备)',
|
|
|
+ seqNo:'10.25.0022-0001',
|
|
|
+ state:'0'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ specialInspection:0,
|
|
|
+ workOrderCode:'10.25.0022'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ exists:false,
|
|
|
+ firstCheck:0,
|
|
|
+ inspection:0,
|
|
|
+ mutualInspection:0,
|
|
|
+ opComplete:false,
|
|
|
+ operationCode:'GX-JY',
|
|
|
+ operationId:'682',
|
|
|
+ operationName:'检验',
|
|
|
+ operationSort:3,
|
|
|
+ selfCheck:0,
|
|
|
+ seqs:[],
|
|
|
+ specialInspection:0,
|
|
|
+ workOrderCode:'10.25.0022'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ exists:false,
|
|
|
+ firstCheck:0,
|
|
|
+ inspection:0,
|
|
|
+ mutualInspection:0,
|
|
|
+ opComplete:false,
|
|
|
+ operationCode:'GJ-WWSF',
|
|
|
+ operationId:'683',
|
|
|
+ operationName:'委外三防',
|
|
|
+ operationSort:4,
|
|
|
+ selfCheck:0,
|
|
|
+ seqs:[],
|
|
|
+ specialInspection:0,
|
|
|
+ workOrderCode:'10.25.0022'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ exists:false,
|
|
|
+ firstCheck:0,
|
|
|
+ inspection:0,
|
|
|
+ mutualInspection:0,
|
|
|
+ opComplete:false,
|
|
|
+ operationCode:'GJ-GDWCC',
|
|
|
+ operationId:'677',
|
|
|
+ operationName:'高低温存储',
|
|
|
+ operationSort:5,
|
|
|
+ selfCheck:0,
|
|
|
+ seqs:[],
|
|
|
+ specialInspection:0,
|
|
|
+ workOrderCode:'10.25.0022'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ orderCode:'DD2505140001',
|
|
|
+ orderName:'GAS-RTA',
|
|
|
+ planNum:'1.00',
|
|
|
+ planStartEnd:'2025-05-16 08:26:00',
|
|
|
+ planStartWhen:'2025-05-16 08:00:00',
|
|
|
+ processRouteCode:'GAS-RTA',
|
|
|
+ processRouteId:147,
|
|
|
+ processRouteName:'GAS-RTA',
|
|
|
+ productLineId:'18',
|
|
|
+ productLineName:'配件产线01',
|
|
|
+ workOrderCode:'10.25.0022',
|
|
|
+ workOrderState:'3',
|
|
|
+ workshopId:'0',
|
|
|
+ workshopName:'青半002'
|
|
|
+}
|
|
|
// 工位通知数量
|
|
|
@State noticeNum: number = 100
|
|
|
// 扫描或手动输入的物料编码
|
|
@@ -178,7 +178,8 @@ struct Index {
|
|
|
.fillColor($r('app.color.FFFFFF'))
|
|
|
Text('生产执行')
|
|
|
.fontColor($r('app.color.FFFFFF'))
|
|
|
- .fontSize($r('app.float.fontSize_38'))
|
|
|
+ .fontSize($r('app.float.fontSize_30'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
}
|
|
|
.height('4%')
|
|
|
.width('94.8%')
|
|
@@ -186,21 +187,57 @@ struct Index {
|
|
|
.onClick(()=> {
|
|
|
router.back()
|
|
|
})
|
|
|
-
|
|
|
+ Row().height('2.8%')
|
|
|
+ // 主要操作栏
|
|
|
Row() {
|
|
|
// 左侧选择工单、工位、人员;工序查看
|
|
|
Column() {
|
|
|
- Button('请选择工单', { type: ButtonType.Normal })
|
|
|
+ if (this.selectWorkOder && this.selectWorkOder.workOrderCode) {
|
|
|
+ Column() {
|
|
|
+ Text(this.selectWorkOder.materialName!)
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .width('88.9%')
|
|
|
+ Text(this.selectWorkOder.materialCode!)
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ .width('88.9%')
|
|
|
+ Row() {
|
|
|
+ Text('工单:')
|
|
|
+ .fontWeight(FontWeight.Lighter)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_12'))
|
|
|
+ Text(this.selectWorkOder.orderCode!)
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_16'))
|
|
|
+ }
|
|
|
+ .width('88.9%')
|
|
|
+ }
|
|
|
.width('100%')
|
|
|
.height('12.4%')
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- .fontColor($r('app.color.FFFFFF'))
|
|
|
- .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.borderRadius($r('app.float.fontSize_16'))
|
|
|
.onClick(()=>{
|
|
|
this.selectOrderController.open()
|
|
|
})
|
|
|
+ } else {
|
|
|
+ Button('请选择工单', { type: ButtonType.Normal })
|
|
|
+ .width('100%')
|
|
|
+ .height('12.4%')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ .onClick(()=>{
|
|
|
+ this.selectOrderController.open()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
// 工位、人员信息
|
|
|
Row() {
|
|
|
Row().width('5.6%')
|
|
@@ -254,14 +291,14 @@ struct Index {
|
|
|
ForEach(this.selectWorkOder.ops!, (item: OperationInfo, index: number) => {
|
|
|
ListItem() {
|
|
|
Column() {
|
|
|
- Row({space: 5}) {
|
|
|
+ Row() {
|
|
|
Row() {
|
|
|
Text((index + 1).toString())
|
|
|
.fontSize($r('app.float.fontSize_16'))
|
|
|
.fontColor($r('app.color.FFFFFF'))
|
|
|
.fontWeight(FontWeight.Bold)
|
|
|
}
|
|
|
- .width('16.7%')
|
|
|
+ .width('14.6%')
|
|
|
.height('80%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
Row() {
|
|
@@ -269,11 +306,21 @@ struct Index {
|
|
|
.fontSize($r('app.float.fontSize_16'))
|
|
|
.fontColor( $r('app.color.FFFFFF'))
|
|
|
.fontWeight(FontWeight.Regular)
|
|
|
+ .padding({left: 5})
|
|
|
}
|
|
|
- .width('100%')
|
|
|
- .height('70%')
|
|
|
+ .width('70.8%')
|
|
|
+ .height('100%')
|
|
|
.alignItems(VerticalAlign.Center)
|
|
|
.justifyContent(FlexAlign.Start)
|
|
|
+ Row() {
|
|
|
+ Image($r('app.media.process_complete'))
|
|
|
+ .width($r('app.float.virtualSize_24'))
|
|
|
+ .height($r('app.float.virtualSize_24'))
|
|
|
+ .fillColor($r('app.color.FFFFFF'))
|
|
|
+ }
|
|
|
+ .width('14.6%')
|
|
|
+ .height('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('70%')
|
|
@@ -360,6 +407,75 @@ struct Index {
|
|
|
.height('80%')
|
|
|
.width('94.8%')
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
+ // 底部按钮和抽屉
|
|
|
+ Stack() {
|
|
|
+ Column() {
|
|
|
+ Blank()
|
|
|
+ Row() {
|
|
|
+ Row() {
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('50%')
|
|
|
+ .height('100%')
|
|
|
+ .borderWidth(1)
|
|
|
+ Row(){
|
|
|
+
|
|
|
+ }.width('50%')
|
|
|
+ .height('100%')
|
|
|
+ .borderWidth(1)
|
|
|
+ // Image($r('app.media.process_drawer_switch'))
|
|
|
+ // .width($r('app.float.virtualSize_48'))
|
|
|
+ // .height($r('app.float.virtualSize_48'))
|
|
|
+ // .fillColor($r('app.color.60FFFFFF'))
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('47%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundImage($r('app.media.process_drawer_thumbnail'), ImageRepeat.XY)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+
|
|
|
+ Row() {
|
|
|
+ Row().width('2.6%')
|
|
|
+ Row({space: 4}) {
|
|
|
+ Image($r('app.media.process_work_instruction'))
|
|
|
+ .width($r('app.float.virtualSize_24'))
|
|
|
+ .height($r('app.float.virtualSize_24'))
|
|
|
+ .fillColor($r('app.color.0A84FF'))
|
|
|
+ Text('作业指导')
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .width('10%')
|
|
|
+ .height('58.3%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ Row().width('1.5%')
|
|
|
+ Row({space: 4}) {
|
|
|
+ Image($r('app.media.process_work_instruction'))
|
|
|
+ .width($r('app.float.virtualSize_24'))
|
|
|
+ .height($r('app.float.virtualSize_24'))
|
|
|
+ .fillColor($r('app.color.0A84FF'))
|
|
|
+ Text('作业指导')
|
|
|
+ .fontColor($r('app.color.0A84FF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .width('10%')
|
|
|
+ .height('58.3%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .backgroundColor($r('app.color.20FFFFFF'))
|
|
|
+ .borderRadius($r('app.float.fontSize_16'))
|
|
|
+ }
|
|
|
+ .height('90.6%')
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('9.8%')
|
|
|
+ .alignContent(Alignment.Top)
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('100%')
|