#
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
137
138
139
140
141
142
143
144
145
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
 
import '../../../common/main_card.dart';
import '../../../widgets/buttons/custom_elevated_button.dart';
 
class OrderEditCard extends StatefulWidget {
  final VoidCallback edit;
  final String orderNo;
  final String matnr;
  final String maktx;
  final double count;
 
  const OrderEditCard(
      {super.key,
      required this.orderNo,
      required this.matnr,
      required this.maktx,
      required this.count,required this.edit});
 
  @override
  State<OrderEditCard> createState() => _OrderEditCardState();
}
 
class _OrderEditCardState extends State<OrderEditCard> {
  @override
  Widget build(BuildContext context) {
    return MainCard(
      isPadding: true,
      child: Column(
        children: [
          Row(
            children: [
              Text(widget.orderNo,
                  style: TextStyle(fontSize: 12, color: Colors.black54)),
              Container(
                margin: EdgeInsets.only(left: 10),
                padding:
                    EdgeInsets.only(left: 10, right: 10, top: 2, bottom: 2),
                constraints: BoxConstraints(minWidth: 10),
                decoration: BoxDecoration(
                  color: Colors.green,
                  borderRadius: BorderRadius.circular(10),
                ),
                child: Text('待作业',
                    style: TextStyle(fontSize: 10, color: Colors.white)),
              ),
              Spacer(),
            ],
          ),
          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(
            children: [
              Expanded(
                  child: Text('批号: 24090010',
                      style: TextStyle(fontSize: 12, color: Colors.black54)))
            ],
          ),
          Row(
            children: [
              Expanded(
                  child: Text('批号: 24090010',
                      style: TextStyle(fontSize: 12, color: Colors.black54)))
            ],
          ),
          Row(
            children: [
              Expanded(
                  child: Text('批号: 24090010',
                      style: TextStyle(fontSize: 12, color: Colors.black54)))
            ],
          ),
          Divider(
            height: 10,
            color: Colors.black12,
          ),
          Row(
            children: [
              Container(
                child: Baseline(
                  baseline: 15.0, // 可以自定义这个值来调整对齐位置
                  baselineType: TextBaseline.alphabetic,
                  child: Text(
                    '数量:',
                    style: TextStyle(fontSize: 12, color: Colors.black54),
                  ),
                ),
              ),
              Container(
                child: Text(
                  widget.count.toString(),
                  style: TextStyle(
                      fontSize: 18,
                      color: Colors.orange,
                      fontWeight: FontWeight.bold),
                ),
              ),
              Spacer(),
              Container(
                constraints: BoxConstraints(minWidth: 5, maxHeight: 25),
                child: CEBtn(
                  title: '修改',
                  type: Type.cancel,
                  btnSize: BtnSize.small,
                  onPressed: widget.edit,
                ),
              ),
            ],
          ),
        ],
      ),
    );
  }
}