|
@@ -2,13 +2,31 @@ import 'package:flutter/material.dart';
|
2
|
2
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
3
|
3
|
import 'package:get/get.dart';
|
4
|
4
|
|
|
5
|
+import '../models/entities/OrderListAll.dart';
|
5
|
6
|
import '../pages/OrderConfirmation/index.dart';
|
6
|
7
|
import '../pages/orderInfo/index.dart';
|
7
|
8
|
import 'LinearGradientText.dart';
|
8
|
|
-import 'OrderInfoCard.dart';
|
9
|
9
|
|
10
|
|
-class OrderListCard extends StatelessWidget {
|
11
|
|
- const OrderListCard({Key? key}) : super(key: key);
|
|
10
|
+
|
|
11
|
+class OrderListCard extends StatefulWidget {
|
|
12
|
+
|
|
13
|
+ final OrderListAll item;
|
|
14
|
+
|
|
15
|
+ const OrderListCard({Key? key, required this.item}) : super(key: key);
|
|
16
|
+
|
|
17
|
+ @override
|
|
18
|
+ _OrderListCardPages createState() => _OrderListCardPages(item);
|
|
19
|
+}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+class _OrderListCardPages extends State<OrderListCard> {
|
|
25
|
+
|
|
26
|
+ final OrderListAll item;
|
|
27
|
+
|
|
28
|
+ _OrderListCardPages(this.item);
|
|
29
|
+
|
12
|
30
|
|
13
|
31
|
@override
|
14
|
32
|
Widget build(BuildContext context) {
|
|
@@ -55,7 +73,7 @@ class OrderListCard extends StatelessWidget {
|
55
|
73
|
children: [
|
56
|
74
|
Container(
|
57
|
75
|
child: RichText(
|
58
|
|
- text: const TextSpan(children: <InlineSpan>[
|
|
76
|
+ text: TextSpan(children: <InlineSpan>[
|
59
|
77
|
TextSpan(
|
60
|
78
|
text: '订单编号:',
|
61
|
79
|
style: TextStyle(
|
|
@@ -63,7 +81,7 @@ class OrderListCard extends StatelessWidget {
|
63
|
81
|
fontSize: 16,
|
64
|
82
|
fontWeight: FontWeight.bold)),
|
65
|
83
|
TextSpan(
|
66
|
|
- text: 'XUHUI12345',
|
|
84
|
+ text: item.orderNo,
|
67
|
85
|
style: TextStyle(
|
68
|
86
|
color: Color(0xff222222),
|
69
|
87
|
fontSize: 16,
|
|
@@ -93,7 +111,7 @@ class OrderListCard extends StatelessWidget {
|
93
|
111
|
Padding(
|
94
|
112
|
padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
|
95
|
113
|
child: RichText(
|
96
|
|
- text: const TextSpan(children: <InlineSpan>[
|
|
114
|
+ text: TextSpan(children: <InlineSpan>[
|
97
|
115
|
TextSpan(
|
98
|
116
|
text: '农机名称:',
|
99
|
117
|
style: TextStyle(
|
|
@@ -101,7 +119,7 @@ class OrderListCard extends StatelessWidget {
|
101
|
119
|
fontSize: 16,
|
102
|
120
|
fontWeight: FontWeight.bold)),
|
103
|
121
|
TextSpan(
|
104
|
|
- text: '老李家收割机MVGV-005',
|
|
122
|
+ text: item.machineryName,
|
105
|
123
|
style: TextStyle(
|
106
|
124
|
color: Color(0xff222222),
|
107
|
125
|
fontSize: 16,
|
|
@@ -112,7 +130,7 @@ class OrderListCard extends StatelessWidget {
|
112
|
130
|
Padding(
|
113
|
131
|
padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
|
114
|
132
|
child: RichText(
|
115
|
|
- text: const TextSpan(children: <InlineSpan>[
|
|
133
|
+ text: TextSpan(children: <InlineSpan>[
|
116
|
134
|
TextSpan(
|
117
|
135
|
text: '作业面积:',
|
118
|
136
|
style: TextStyle(
|
|
@@ -120,7 +138,7 @@ class OrderListCard extends StatelessWidget {
|
120
|
138
|
fontSize: 16,
|
121
|
139
|
fontWeight: FontWeight.bold)),
|
122
|
140
|
TextSpan(
|
123
|
|
- text: '2辆',
|
|
141
|
+ text: item.amount.toString(),
|
124
|
142
|
style: TextStyle(
|
125
|
143
|
color: Color(0xff222222),
|
126
|
144
|
fontSize: 16,
|
|
@@ -131,7 +149,7 @@ class OrderListCard extends StatelessWidget {
|
131
|
149
|
Padding(
|
132
|
150
|
padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
|
133
|
151
|
child: RichText(
|
134
|
|
- text: const TextSpan(children: <InlineSpan>[
|
|
152
|
+ text: TextSpan(children: <InlineSpan>[
|
135
|
153
|
TextSpan(
|
136
|
154
|
text: '需求时间:',
|
137
|
155
|
style: TextStyle(
|
|
@@ -139,7 +157,7 @@ class OrderListCard extends StatelessWidget {
|
139
|
157
|
fontSize: 16,
|
140
|
158
|
fontWeight: FontWeight.bold)),
|
141
|
159
|
TextSpan(
|
142
|
|
- text: '2018-08-21',
|
|
160
|
+ text: item.appointmentDate.toString(),
|
143
|
161
|
style: TextStyle(
|
144
|
162
|
color: Color(0xff222222),
|
145
|
163
|
fontSize: 16,
|
|
@@ -150,7 +168,7 @@ class OrderListCard extends StatelessWidget {
|
150
|
168
|
Padding(
|
151
|
169
|
padding: EdgeInsets.fromLTRB(0, 0, 0, 4),
|
152
|
170
|
child: RichText(
|
153
|
|
- text: const TextSpan(children: <InlineSpan>[
|
|
171
|
+ text: TextSpan(children: <InlineSpan>[
|
154
|
172
|
TextSpan(
|
155
|
173
|
text: '下单时间:',
|
156
|
174
|
style: TextStyle(
|
|
@@ -158,7 +176,7 @@ class OrderListCard extends StatelessWidget {
|
158
|
176
|
fontSize: 16,
|
159
|
177
|
fontWeight: FontWeight.bold)),
|
160
|
178
|
TextSpan(
|
161
|
|
- text: '2022-04-13',
|
|
179
|
+ text: item.createDate.toString(),
|
162
|
180
|
style: TextStyle(
|
163
|
181
|
color: Color(0xff222222),
|
164
|
182
|
fontSize: 16,
|
|
@@ -208,10 +226,10 @@ class OrderListCard extends StatelessWidget {
|
208
|
226
|
Color(0xFFB61515),
|
209
|
227
|
],
|
210
|
228
|
child: RichText(
|
211
|
|
- text: const TextSpan(
|
|
229
|
+ text: TextSpan(
|
212
|
230
|
children: <InlineSpan>[
|
213
|
231
|
TextSpan(
|
214
|
|
- text: "8808",
|
|
232
|
+ text:( item.charges!/100).toString(),
|
215
|
233
|
style: TextStyle(
|
216
|
234
|
fontSize: 16,
|
217
|
235
|
fontWeight: FontWeight.bold,
|