|
@@ -2,6 +2,9 @@ import { TimeAndTitle } from '../component/TimeAndTitle';
|
|
|
import router from '@ohos.router';
|
|
|
import WorkOrderInfo from '../viewmodel/WorkOrderInfo';
|
|
|
import CommonConstants from '../common/constants/CommonConstants';
|
|
|
+import ProcessRequest from '../common/util/request/ProcessRequest';
|
|
|
+import RequestParamModel from '../viewmodel/RequestParamModel';
|
|
|
+import OperationInfo from '../viewmodel/process/OperationInfo';
|
|
|
|
|
|
@Entry
|
|
|
@Component
|
|
@@ -13,7 +16,19 @@ struct Index {
|
|
|
@State selectWorkOder: WorkOrderInfo = {}
|
|
|
// 工位通知数量
|
|
|
@State noticeNum: number = 100
|
|
|
+
|
|
|
+ pageNo: number = 1
|
|
|
+ pageSize: number = 9
|
|
|
+
|
|
|
async aboutToAppear() {
|
|
|
+ if (!this.selectWorkOder || !this.selectWorkOder.workOrderCode) {
|
|
|
+ // this.workOrders = await ProcessRequest.post('/api/v1/plan/workOrder/taskPage', {
|
|
|
+ // //查询未完成的工单
|
|
|
+ // queryComplete: 0,
|
|
|
+ // pageNo: this.pageNo,
|
|
|
+ // pageSize: this.pageSize
|
|
|
+ // } as RequestParamModel) as WorkOrderInfo[]
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -92,8 +107,86 @@ struct Index {
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.borderRadius($r('app.float.fontSize_16'))
|
|
|
// 工序
|
|
|
- Column() {
|
|
|
-
|
|
|
+ Column({space: 3}) {
|
|
|
+ Row() {
|
|
|
+ Text('工序')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontColor($r('app.color.FFFFFF'))
|
|
|
+ .fontSize($r('app.float.fontSize_24'))
|
|
|
+ }
|
|
|
+ .width('83.4%')
|
|
|
+ .height('8.4%')
|
|
|
+ .alignItems(VerticalAlign.Bottom)
|
|
|
+ List() {
|
|
|
+ ForEach(this.selectWorkOder.ops!, (item: OperationInfo, index: number) => {
|
|
|
+ ListItem() {
|
|
|
+ // Column() {
|
|
|
+ // Row({ space: 4 }) {
|
|
|
+ // Stack() {
|
|
|
+ // Circle()
|
|
|
+ // .width('100%')
|
|
|
+ // .height('100%')
|
|
|
+ // .fillOpacity(0)
|
|
|
+ // .strokeWidth('1px')
|
|
|
+ // .stroke(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_selected_background'))
|
|
|
+ // Row() {
|
|
|
+ // Text(JSON.stringify(item.step))
|
|
|
+ // .fontSize($r('app.float.process_step_font_size'))
|
|
|
+ // .fontColor(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_font_default_color'))
|
|
|
+ // .fontWeight(FontWeight.Bold)
|
|
|
+ // .padding({ right: 3 })
|
|
|
+ // }
|
|
|
+ // .width('100%')
|
|
|
+ // .height('100%')
|
|
|
+ // .alignItems(VerticalAlign.Center)
|
|
|
+ // .justifyContent(FlexAlign.Center)
|
|
|
+ // }
|
|
|
+ // .width('20%')
|
|
|
+ // .height('100%')
|
|
|
+ //
|
|
|
+ // Text(item.processName)
|
|
|
+ // .fontSize($r('app.float.three_text_size'))
|
|
|
+ // .fontColor(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_font_default_color'))
|
|
|
+ // .fontWeight(FontWeight.Bold)
|
|
|
+ // Blank()
|
|
|
+ // Text(item.completedQuantity.toString())
|
|
|
+ // .fontSize($r('app.float.card_large_font_size'))
|
|
|
+ // .fontColor(this.selectProcess === item.step ? $r('app.color.card_font_selected_color') : $r('app.color.card_font_default_color'))
|
|
|
+ // .fontWeight(FontWeight.Bold)
|
|
|
+ // }
|
|
|
+ // .width('100%')
|
|
|
+ // .height('70%')
|
|
|
+ // .justifyContent(FlexAlign.Start)
|
|
|
+ // .backgroundColor(this.selectProcess === item.step ? $r('app.color.card_selected_background') : $r('app.color.card_default_background'))
|
|
|
+ // .borderRadius('70px')
|
|
|
+ // .padding({ right: '5%' })
|
|
|
+ // .border({ color: $r('app.color.card_selected_background'), width: '1px' })
|
|
|
+ // .onClick(() => {
|
|
|
+ // this.selectProcess = item.step
|
|
|
+ // })
|
|
|
+ //
|
|
|
+ // if (index < this.processes.length - 1) {
|
|
|
+ // Row() {
|
|
|
+ // Divider()
|
|
|
+ // .vertical(true)
|
|
|
+ // .color($r('app.color.divider_horizontal_color'))
|
|
|
+ // .strokeWidth('1px')
|
|
|
+ // .padding({ right: 3 })
|
|
|
+ // }
|
|
|
+ // .justifyContent(FlexAlign.Center)
|
|
|
+ // .width('20%')
|
|
|
+ // .layoutWeight(1)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // .width('100%')
|
|
|
+ // .height('20%')
|
|
|
+ // .alignItems(HorizontalAlign.Start)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .width('83.4%')
|
|
|
+ .height('88.6%')
|
|
|
+ .alignListItem(ListItemAlign.Center)
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('77.2%')
|