#
whycq
2025-03-03 6a90c5bde0facc8330ce4c7c7d89292717b7ac65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
 
import '../../../common/main_card.dart';
 
 
class OrderShowCard extends StatefulWidget {
  final int index;
  final String orderNo;
  final String matnr;
  final String maktx;
  final double count;
  const OrderShowCard({super.key,required this.index, required this.orderNo, required this.matnr, required this.maktx, required this.count});
 
  @override
  State<OrderShowCard> createState() => _OrderShowCardState();
}
 
class _OrderShowCardState extends State<OrderShowCard> {
  @override
  Widget build(BuildContext context) {
    return MainCard(
      isPadding: true,
      child: Column(
        children: [
          Row(
            children: [
              Text(widget.orderNo,
                  style: TextStyle(fontSize: 12, color: Colors.black54)),
              Spacer(),
              Container(
                padding: const EdgeInsets.all(1),
                constraints: BoxConstraints(minWidth: 18, minHeight: 18),
                decoration: BoxDecoration(
                  shape: BoxShape.circle,
                  color: Colors.blue,
                ),
                child: Center(
                  child: Text(widget.index.toString(),
                      style: TextStyle(fontSize: 9, color: Colors.white)),
                ),
              ),
            ],
          ),
          Divider(
            height: 10,
            color: Colors.black12,
          ),
          Row(
            children: [
              Expanded(
                child: Text(widget.maktx,
                    style: TextStyle(
                        fontSize: 16,
                        color: Colors.black,
                        fontWeight: FontWeight.bold),
                    softWrap: true,
                    overflow: TextOverflow.ellipsis,
                    maxLines: 3),
              ),
            ],
          ),
          Row(
            children: [
              Container(
                decoration: BoxDecoration(
                  border: Border.all(color: Colors.black12, width: 0.5),
                  color: Colors.grey[100],
                  borderRadius: BorderRadius.circular(3),
                ),
                padding: const EdgeInsets.only(left: 5, right: 5),
                child: Text('ID:${widget.matnr}',
                    style: TextStyle(fontSize: 12, color: Colors.black26)),
              ),
            ],
          ),
          Row(
            crossAxisAlignment: CrossAxisAlignment.end,
            children: [
              Expanded(
                child:  Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Row(
                      children: [
                        Text('批号: 24090010',
                            style: TextStyle(fontSize: 12, color: Colors.black54))
                      ],
                    ),
                    Row(
                      children: [
                        Text('批号: 24090010',
                            style: TextStyle(fontSize: 12, color: Colors.black54))
                      ],
                    ),
                    Row(
                      children: [
                        Expanded( // 对长文本使用 Expanded
                          child: Text(
                            '批号: W/HiTouch_PressGestureDetector(32540): Touch pointer move a lot. The moving distance of X is: 10.0, limit is: 40. The moving distance of Y is: 57.0, limit is: 40',
                            style: TextStyle(fontSize: 12, color: Colors.black54),
                            softWrap: true,
                            overflow: TextOverflow.ellipsis,
                            maxLines: 3,
                          ),
                        ),
                      ],
                    ),
                  ],
                ),
              ),
              SizedBox(width: 20),
              Row(
                children: [
                  Baseline(
                    baseline: 15.0, // 可以自定义这个值来调整对齐位置
                    baselineType: TextBaseline.alphabetic,
                    child: Text(
                      '数量:',
                      style: TextStyle(fontSize: 12, color: Colors.black54),
                    ),
                  ),
                  Text(widget.count.toString(),
                      style: TextStyle(
                          fontSize: 18,
                          color: Colors.orange,
                          fontWeight: FontWeight.bold)),
                ],
              ),
            ],
          ),
        ],
      ),
    );
  }
}