|
@@ -0,0 +1,522 @@
|
|
|
+import TimeUtil from '../common/util/TimeUtil'
|
|
|
+import { BottomOperateComp } from '../common/component/BottomOperateComp';
|
|
|
+import router from '@ohos.router';
|
|
|
+import { Method } from '@ohos/axios';
|
|
|
+
|
|
|
+export default class repairList {
|
|
|
+ deviceName?:string
|
|
|
+ materialNo?:string
|
|
|
+ repairedQuantity?:number
|
|
|
+ time?:string
|
|
|
+}
|
|
|
+@CustomDialog
|
|
|
+struct materialDetails{
|
|
|
+ private repairList:Array<repairList>
|
|
|
+ controller: CustomDialogController
|
|
|
+ build(){
|
|
|
+ Column(){
|
|
|
+ Text('产品详情')
|
|
|
+ .fontSize(px2vp(51))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('90%')
|
|
|
+ .height('10%')
|
|
|
+ .margin({bottom:10})
|
|
|
+ Column(){
|
|
|
+ Text('DS123422233卫星天线1')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .width('100%')
|
|
|
+ Text('SASD-FSDDS-ASDDFFSA1')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize(px2vp(27))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .width('60%')
|
|
|
+ .height('10%')
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }.width('40%')
|
|
|
+ .height('60%')
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ .borderRadius(px2vp(21))
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+@CustomDialog
|
|
|
+struct confirm{
|
|
|
+
|
|
|
+ @Link deviceName:string
|
|
|
+ controller: CustomDialogController
|
|
|
+ build(){
|
|
|
+ Column(){
|
|
|
+ Text('替换确认')
|
|
|
+ .fontSize(px2vp(51))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('90%')
|
|
|
+ .height('10%')
|
|
|
+ .margin({top:10})
|
|
|
+ Text('是否替换:'+this.deviceName+'为新的物料?')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ .width('80%')
|
|
|
+ .height('60%')
|
|
|
+ Row({space:20}){
|
|
|
+ Text('取消')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('40%')
|
|
|
+ .height('100%')
|
|
|
+ .borderRadius(px2vp(30))
|
|
|
+ .fontColor($r('app.color.order_producing_state_background'))
|
|
|
+ .backgroundColor('#0f000000')
|
|
|
+ .onClick(()=>{
|
|
|
+ this.controller.close()
|
|
|
+ })
|
|
|
+ Text('确认')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('40%')
|
|
|
+ .height('100%')
|
|
|
+ .borderRadius(px2vp(30))
|
|
|
+ .fontColor($r('app.color.robot_set_card_white'))
|
|
|
+ .backgroundColor($r('app.color.order_producing_state_background'))
|
|
|
+ .onClick(()=>{
|
|
|
+ this.controller.close()
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ }.width('80%')
|
|
|
+ .height('20%')
|
|
|
+
|
|
|
+ }.width('40%')
|
|
|
+ .height('40%')
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ .borderRadius(px2vp(21))
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+@CustomDialog
|
|
|
+struct selectReplacementMaterials{
|
|
|
+ @State deviceName:string=''
|
|
|
+ confirmController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder:confirm({
|
|
|
+ deviceName:this.deviceName,
|
|
|
+ }),
|
|
|
+ alignment: DialogAlignment.Center,
|
|
|
+ customStyle: true,
|
|
|
+ })
|
|
|
+ private repairList:Array<repairList>
|
|
|
+ controller: CustomDialogController
|
|
|
+ build(){
|
|
|
+ Column(){
|
|
|
+ Text('选择替换物料')
|
|
|
+ .fontSize(px2vp(51))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('90%')
|
|
|
+ .height('10%')
|
|
|
+ .margin({bottom:10})
|
|
|
+ Column(){
|
|
|
+ Text('DS123422233卫星天线1')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .height('5%')
|
|
|
+ .width('90%')
|
|
|
+ Text('SASD-FSDDS-ASDDFFSA1')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize(px2vp(27))
|
|
|
+ .height('5%')
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .width('90%')
|
|
|
+ List({ space: 10 ,initialIndex: 0 }) {
|
|
|
+ ForEach(this.repairList, (item:repairList,index:number) => {
|
|
|
+ ListItem() {
|
|
|
+ Column(){
|
|
|
+ Text(item.deviceName)
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ }.width('100%')
|
|
|
+ .height('20%')
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ .borderRadius(px2vp(15))
|
|
|
+ .padding({left:10})
|
|
|
+ .onClick(()=>{
|
|
|
+ this.deviceName=item.deviceName
|
|
|
+ this.confirmController.open()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }, item => item)
|
|
|
+ }
|
|
|
+ .width('90%')
|
|
|
+ .height('80%')
|
|
|
+ }
|
|
|
+ .width('90%')
|
|
|
+ .height('90%')
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }.width('40%')
|
|
|
+ .height('60%')
|
|
|
+ .padding({top:10})
|
|
|
+ .backgroundColor($r('app.color.title_bar_background'))
|
|
|
+ .borderRadius(px2vp(21))
|
|
|
+ }
|
|
|
+}
|
|
|
+@Entry
|
|
|
+@Component
|
|
|
+struct MaintenanceStationOperations{
|
|
|
+ private repairList:Array<repairList>=[
|
|
|
+ {deviceName:"DS123422233卫星天线1", materialNo:"SASD-FSDDS-ASDDFFSA1",repairedQuantity:5,time:'2024/4/30 15:11:11'},
|
|
|
+ {deviceName:"DS123422233卫星天线2", materialNo:"SASD-FSDDS-ASDDFFSA2",repairedQuantity:5,time:'2024/4/30 15:11:11'},
|
|
|
+ {deviceName:"DS123422233卫星天线3", materialNo:"SASD-FSDDS-ASDDFFSA3",repairedQuantity:5,time:'2024/5/1 15:11:11'},
|
|
|
+ {deviceName:"DS123422233卫星天线4", materialNo:"SASD-FSDDS-ASDDFFSA4",repairedQuantity:5,time:'2024/4/30 15:11:11'},
|
|
|
+ {deviceName:"DS123422233卫星天线5", materialNo:"SASD-FSDDS-ASDDFFSA5",repairedQuantity:5,time:'2024/4/30 15:11:11'},
|
|
|
+ {deviceName:"DS123422233卫星天线6", materialNo:"SASD-FSDDS-ASDDFFSA6",repairedQuantity:5,time:'2024/5/1 15:11:11'},
|
|
|
+ ]
|
|
|
+ textcontroller: TextInputController = new TextInputController()
|
|
|
+ @State click:number=0
|
|
|
+ @State processvalue:number=50
|
|
|
+ controller: TextClockController = new TextClockController()
|
|
|
+ private isHomePage:boolean = false
|
|
|
+ materialDetailsController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder:materialDetails({
|
|
|
+ repairList:this.repairList
|
|
|
+ }),
|
|
|
+ alignment: DialogAlignment.Center,
|
|
|
+ customStyle: true,
|
|
|
+ })
|
|
|
+ selectReplacementMaterialController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder:selectReplacementMaterials({
|
|
|
+ repairList:this.repairList
|
|
|
+ }),
|
|
|
+ alignment: DialogAlignment.Center,
|
|
|
+ customStyle: true,
|
|
|
+ })
|
|
|
+ build(){
|
|
|
+ Column(){
|
|
|
+ Stack() {
|
|
|
+ Text()
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ .backgroundColor($r('app.color.title_bar_background'))
|
|
|
+ .opacity(this.isHomePage ? $r('app.float.title_bar_home_page_opacity') : $r('app.float.title_bar_general_opacity'))
|
|
|
+
|
|
|
+ Row() {
|
|
|
+ Row() {
|
|
|
+ Image($r('app.media.return'))
|
|
|
+ .objectFit(ImageFit.Contain)
|
|
|
+ }
|
|
|
+ .width('20%')
|
|
|
+ .height('90%')
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .margin({left: 10 , top: 5})
|
|
|
+ .onClick(()=>{
|
|
|
+ router.pushUrl({
|
|
|
+ url:'pages/MaintenanceStation'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ Blank()
|
|
|
+ Column() {
|
|
|
+ Text(TimeUtil.getCurrentDate())
|
|
|
+ .fontColor($r('app.color.general_font_color'))
|
|
|
+ .fontSize($r('app.float.title_date_font_size'))
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ TextClock({ timeZoneOffset: -8, controller: this.controller })
|
|
|
+ .format('HH:mm:ss')
|
|
|
+ .fontSize($r('app.float.title_time_font_size'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('6%')
|
|
|
+ .alignItems(HorizontalAlign.Center)
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ Blank()
|
|
|
+ Row({space:10}) {
|
|
|
+ Blank()
|
|
|
+ Column(){
|
|
|
+ Progress({ value:this.processvalue, total: 100,type: ProgressType.Linear, }).width('100%')
|
|
|
+ .backgroundColor('#ffff')
|
|
|
+ .style({strokeWidth:5})
|
|
|
+ Text('任务进度:'+this.processvalue+'%')
|
|
|
+ .fontSize(px2vp(19))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ }
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .height('100%')
|
|
|
+ .width('25%')
|
|
|
+
|
|
|
+ Column(){
|
|
|
+ Text('王德发')
|
|
|
+ .fontSize(px2vp(27))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ Text('装配工位001')
|
|
|
+ .fontSize(px2vp(19))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+
|
|
|
+ }.height('100%')
|
|
|
+ .width('25%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .alignItems(HorizontalAlign.End)
|
|
|
+ Image($r('app.media.user_white'))
|
|
|
+ .width(px2vp(72))
|
|
|
+ .height(px2vp(72))
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('20%')
|
|
|
+ .height('90%')
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
+ .justifyContent(FlexAlign.SpaceEvenly)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('8%')
|
|
|
+ Row() {
|
|
|
+ Column() {
|
|
|
+ Column(){
|
|
|
+ Text("SADFFFSAD-大天线")
|
|
|
+ .height('16%')
|
|
|
+ .fontSize($r('app.float.card_title_font_size'))
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor($r('app.color.general_font_color'))
|
|
|
+ .opacity($r('app.float.general_font_opacity'))
|
|
|
+ .maxLines(1)
|
|
|
+ .width('100%')
|
|
|
+ Text('SASD-FSDDS-ASDDFFSA...')
|
|
|
+ .width('100%')
|
|
|
+ .height('20%')
|
|
|
+ .fontSize($r('app.float.card_info_font_size'))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .opacity($r('app.float.card_font_default_opacity'))
|
|
|
+ .maxLines(1)
|
|
|
+ Blank()
|
|
|
+ Text('序列号')
|
|
|
+ .width('100%')
|
|
|
+ .height('12%')
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .fontSize(px2vp(27))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .opacity($r('app.float.card_font_default_opacity'))
|
|
|
+ .maxLines(1)
|
|
|
+ Text('ASD123212DSAD332')
|
|
|
+ .width('100%')
|
|
|
+ .height('20%')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize($r('app.float.card_info_font_size'))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .opacity($r('app.float.card_font_default_opacity'))
|
|
|
+ .maxLines(1)
|
|
|
+ Blank()
|
|
|
+ Text('当前工序')
|
|
|
+ .height('12%')
|
|
|
+ .width('100%')
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .fontSize(px2vp(27))
|
|
|
+ .fontColor('#99000000')
|
|
|
+ .fontWeight(FontWeight.Regular)
|
|
|
+ .opacity($r('app.float.card_font_default_opacity'))
|
|
|
+ .maxLines(1)
|
|
|
+ Row(){
|
|
|
+ Text('固封')
|
|
|
+ .height('100%')
|
|
|
+ .width('80%')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize($r('app.float.card_info_font_size'))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .opacity($r('app.float.card_font_default_opacity'))
|
|
|
+ .maxLines(1)
|
|
|
+ Image($r('app.media.subscript'))
|
|
|
+ .width($r('app.float.storage_set_image_effect_height'))
|
|
|
+ .height($r('app.float.storage_set_image_effect_height'))
|
|
|
+ }
|
|
|
+ .height('20%')
|
|
|
+ .width('100%')
|
|
|
+ }
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ .width('90%')
|
|
|
+ .height("27%")
|
|
|
+ .padding({ left:10,top:5 })
|
|
|
+ .borderRadius(px2vp(15))
|
|
|
+ .onClick(()=>{
|
|
|
+ this.materialDetailsController.open()
|
|
|
+ })
|
|
|
+ Column(){
|
|
|
+ Row(){
|
|
|
+ Text('叫料')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ Blank()
|
|
|
+ Image($r('app.media.call_material'))
|
|
|
+ .width($r('app.float.general_icon_size'))
|
|
|
+ .height($r('app.float.general_icon_size'))
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('15%')
|
|
|
+ .margin(5)
|
|
|
+ .padding({left:10,right:10})
|
|
|
+ .borderRadius(px2vp(15))
|
|
|
+ .backgroundColor(this.click===0?$r('app.color.robot_set_card_white'):this.click===1?
|
|
|
+ $r('app.color.order_finished_state_background'):$r('app.color.robot_set_card_white'))
|
|
|
+ .onClick(()=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ Row(){
|
|
|
+ Text('工位上料')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ Blank()
|
|
|
+ Image($r('app.media.station_loading'))
|
|
|
+ .width($r('app.float.general_icon_size'))
|
|
|
+ .height($r('app.float.general_icon_size'))
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('15%')
|
|
|
+ .margin(5)
|
|
|
+ .borderRadius(px2vp(15))
|
|
|
+ .padding({left:10,right:10})
|
|
|
+ .borderRadius(px2vp(15))
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ Row(){
|
|
|
+ Text('图纸')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ Blank()
|
|
|
+ Image($r('app.media.drawing'))
|
|
|
+ .width($r('app.float.general_icon_size'))
|
|
|
+ .height($r('app.float.general_icon_size'))
|
|
|
+
|
|
|
+ }.width('100%')
|
|
|
+ .height('15%')
|
|
|
+ .margin(5)
|
|
|
+ .padding({left:10,right:10})
|
|
|
+ .borderRadius(px2vp(15))
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ Row(){
|
|
|
+ Text('报工')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ Blank()
|
|
|
+ Image($r('app.media.report_work'))
|
|
|
+ .width($r('app.float.general_icon_size'))
|
|
|
+ .height($r('app.float.general_icon_size'))
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('15%')
|
|
|
+ .margin(5)
|
|
|
+ .margin(5) .borderRadius(px2vp(15))
|
|
|
+ .padding({left:10,right:10})
|
|
|
+ .backgroundColor($r('app.color.order_finished_state_background'))
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ } .width('90%')
|
|
|
+ .padding({top:5})
|
|
|
+ .height("73%")
|
|
|
+
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('20%')
|
|
|
+ .alignItems(HorizontalAlign.Center)
|
|
|
+ Column(){
|
|
|
+ Text('故障详情')
|
|
|
+ .fontSize(px2vp(51))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .width('90%')
|
|
|
+ .height('8%')
|
|
|
+ .border({width:1})
|
|
|
+ }.height('100%')
|
|
|
+ .width('30%')
|
|
|
+ Column(){
|
|
|
+ Text('物料替换')
|
|
|
+ .fontSize(px2vp(51))
|
|
|
+ .fontColor('#e6000000')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
+ .width('90%')
|
|
|
+ .height('8%')
|
|
|
+ Row(){
|
|
|
+ Image($r('app.media.shaoma'))
|
|
|
+ .width('56px')
|
|
|
+ .height('56px')
|
|
|
+ .margin({right:10})
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ TextInput({ text: '', placeholder: '点击扫码或者输入编码', controller: this.textcontroller})
|
|
|
+ .placeholderColor(Color.Grey)
|
|
|
+ //.placeholderFont({ size: 14, weight: 400 })
|
|
|
+ .caretColor(Color.Blue)
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ .height('100%')
|
|
|
+ .width('60%')
|
|
|
+ .fontSize(px2vp(32))
|
|
|
+ .fontColor(Color.Black)
|
|
|
+ .onSubmit(()=>{
|
|
|
+ router.pushUrl({
|
|
|
+ url:'pages/MaintenanceStationOperations'
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ }.width('60%')
|
|
|
+ .backgroundColor($r('app.color.robot_set_card_white'))
|
|
|
+ .borderRadius(21)
|
|
|
+ .margin({top:5})
|
|
|
+ .height('10%')
|
|
|
+ .onClick(()=>{
|
|
|
+ this.selectReplacementMaterialController.open()
|
|
|
+ })
|
|
|
+ Column(){
|
|
|
+
|
|
|
+
|
|
|
+ }.width('95%')
|
|
|
+ .height('82%')
|
|
|
+
|
|
|
+ }
|
|
|
+ .height('100%')
|
|
|
+ .width('50%')
|
|
|
+ .padding({left:20})
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }.width('100%')
|
|
|
+ .height('84%')
|
|
|
+ BottomOperateComp({isHomePage : this.isHomePage})
|
|
|
+ }
|
|
|
+ .width("100%")
|
|
|
+ .height("100%")
|
|
|
+ .backgroundColor($r('app.color.title_bar_background'))
|
|
|
+ }
|
|
|
+}
|