12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import { BoundOrder} from "../viewmodel/wms/OrderMaterialsStorageParams"
- @Component
- export struct StorageList {
- @Prop storageData: BoundOrder[] = []
- @Prop title: string = ''
- private scrollerForList: Scroller = new Scroller()
- build() {
- Column() {
- // 标题部分
- Text(this.title)
- .fontSize($r('app.float.fontSize_38'))
- .fontColor($r('app.color.FFFFFF'))
- .width('100%')
- .textAlign(TextAlign.Center)
- .height('15%')
- // 列表部分
- List({scroller:this.scrollerForList}) {
- ForEach(this.storageData, (item:BoundOrder) => {
- ListItem() {
- Row() {
- // 左侧信息列
- Column() {
- Text(item.batchCode)
- .fontSize($r('app.float.fontSize_24'))
- .fontColor($r('app.color.FFFFFF'))
- Text(` ${item.materialName} ${item.materialNo}`)
- .fontSize($r('app.float.fontSize_16'))
- .fontColor($r('app.color.60FFFFFF'))
- .margin({ top: 4 })
- Text(item.created)
- .fontSize($r('app.float.fontSize_16'))
- .fontColor($r('app.color.60FFFFFF'))
- .margin({ top: 4 })
- }
- .alignItems(HorizontalAlign.Start)
- // 右侧状态列
- Column() {
- Text(String(item.num))
- .fontSize($r('app.float.fontSize_38'))
- .fontColor($r('app.color.FFFFFF'))
- Text('数量')
- .fontSize($r('app.float.fontSize_16'))
- .fontColor($r('app.color.60FFFFFF'))
- .margin({ top: 4 })
- }
- .alignItems(HorizontalAlign.End)
- }
- .justifyContent(FlexAlign.SpaceBetween)
- .padding(13)
- .width('100%')
- }
- })
- }
- .width('100%')
- .height('85%')
- .divider({
- strokeWidth: 1,
- color: $r('app.color.333333')
- })
- } .backgroundColor($r('app.color.10FFFFFF'))
- .height('100%')
- .justifyContent(FlexAlign.Start)
- }
- }
|