|
1
|
import 'package:flutter/material.dart';
|
1
|
import 'package:flutter/material.dart';
|
|
|
|
2
|
+import 'package:one_key/res/colors.dart';
|
|
|
|
3
|
+import 'package:one_key/utils/screen_util.dart';
|
|
|
|
4
|
+import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
5
|
+import 'package:one_key/widgets/round_button.dart';
|
|
|
|
6
|
+import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
7
|
+import 'package:one_key/widgets/v_empty_view.dart';
|
|
2
|
|
8
|
|
|
3
|
/**
|
9
|
/**
|
|
4
|
* 余额明细页面
|
10
|
* 余额明细页面
|
|
@@ -12,8 +18,169 @@ class BalanceDetailsPage extends StatefulWidget { |
|
@@ -12,8 +18,169 @@ class BalanceDetailsPage extends StatefulWidget { |
|
12
|
}
|
18
|
}
|
|
13
|
|
19
|
|
|
14
|
class _BalanceDetailsPageState extends State<BalanceDetailsPage> {
|
20
|
class _BalanceDetailsPageState extends State<BalanceDetailsPage> {
|
|
|
|
21
|
+ ScrollController controller = ScrollController();
|
|
|
|
22
|
+
|
|
|
|
23
|
+ Widget _item() {
|
|
|
|
24
|
+ return Container(
|
|
|
|
25
|
+ padding: EdgeInsets.only(left: w(20), right: w(20), top: w(10)),
|
|
|
|
26
|
+ decoration: BoxDecoration(
|
|
|
|
27
|
+ border: Border(
|
|
|
|
28
|
+ bottom:
|
|
|
|
29
|
+ BorderSide(width: w(0.5), color: MyColours.color_CBCBCB))),
|
|
|
|
30
|
+ child: Column(
|
|
|
|
31
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
32
|
+ children: [
|
|
|
|
33
|
+ Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
|
|
|
34
|
+ Text(
|
|
|
|
35
|
+ '充值',
|
|
|
|
36
|
+ style: TextStyle(
|
|
|
|
37
|
+ color: MyColours.color_000000,
|
|
|
|
38
|
+ fontSize: font(14),
|
|
|
|
39
|
+ ),
|
|
|
|
40
|
+ ),
|
|
|
|
41
|
+ Text(
|
|
|
|
42
|
+ '+¥300.00',
|
|
|
|
43
|
+ style: TextStyle(
|
|
|
|
44
|
+ color: MyColours.color_438E93,
|
|
|
|
45
|
+ fontSize: font(14),
|
|
|
|
46
|
+ fontWeight: FontWeight.bold),
|
|
|
|
47
|
+ )
|
|
|
|
48
|
+ ]),
|
|
|
|
49
|
+ VEmptyView(28),
|
|
|
|
50
|
+ Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
|
|
|
51
|
+ Text(
|
|
|
|
52
|
+ '2025-08-31 15:43:23',
|
|
|
|
53
|
+ style: TextStyle(
|
|
|
|
54
|
+ color: MyColours.color_999999,
|
|
|
|
55
|
+ fontSize: font(14),
|
|
|
|
56
|
+ ),
|
|
|
|
57
|
+ ),
|
|
|
|
58
|
+ Text(
|
|
|
|
59
|
+ '变动后余额 ¥220.00',
|
|
|
|
60
|
+ style: TextStyle(
|
|
|
|
61
|
+ color: MyColours.color_999999,
|
|
|
|
62
|
+ fontSize: font(14),
|
|
|
|
63
|
+ ),
|
|
|
|
64
|
+ )
|
|
|
|
65
|
+ ]),
|
|
|
|
66
|
+ VEmptyView(16),
|
|
|
|
67
|
+ Text(
|
|
|
|
68
|
+ '备注:顾客已付现金',
|
|
|
|
69
|
+ style: TextStyle(
|
|
|
|
70
|
+ color: MyColours.color_999999,
|
|
|
|
71
|
+ fontSize: font(14),
|
|
|
|
72
|
+ ),
|
|
|
|
73
|
+ ),
|
|
|
|
74
|
+ VEmptyView(8),
|
|
|
|
75
|
+ ],
|
|
|
|
76
|
+ ),
|
|
|
|
77
|
+ );
|
|
|
|
78
|
+ }
|
|
|
|
79
|
+
|
|
15
|
@override
|
80
|
@override
|
|
16
|
Widget build(BuildContext context) {
|
81
|
Widget build(BuildContext context) {
|
|
17
|
- return const Placeholder();
|
82
|
+ return Scaffold(
|
|
|
|
83
|
+ backgroundColor: MyColours.color_ffffff,
|
|
|
|
84
|
+ appBar: SystemAppBar('余额明细'),
|
|
|
|
85
|
+ body: Column(children: [
|
|
|
|
86
|
+ Expanded(
|
|
|
|
87
|
+ child: SingleChildScrollView(
|
|
|
|
88
|
+ controller: controller,
|
|
|
|
89
|
+ child: Stack(
|
|
|
|
90
|
+ children: <Widget>[
|
|
|
|
91
|
+ ListView.builder(
|
|
|
|
92
|
+ padding: EdgeInsets.only(top: w(50)),
|
|
|
|
93
|
+ controller: controller,
|
|
|
|
94
|
+ shrinkWrap: true,
|
|
|
|
95
|
+ itemCount: 20,
|
|
|
|
96
|
+ itemBuilder: (BuildContext context, int index) {
|
|
|
|
97
|
+ return _item();
|
|
|
|
98
|
+ },
|
|
|
|
99
|
+ ),
|
|
|
|
100
|
+ Positioned(
|
|
|
|
101
|
+ top: 0, // 你可以根据需要调整位置
|
|
|
|
102
|
+ left: 0, // 你可以根据需要调整位置
|
|
|
|
103
|
+ right: 0, // 你可以根据需要调整位置
|
|
|
|
104
|
+ child: Container(
|
|
|
|
105
|
+ decoration: BoxDecoration(
|
|
|
|
106
|
+ border: Border(
|
|
|
|
107
|
+ bottom: BorderSide(
|
|
|
|
108
|
+ width: w(0.5),
|
|
|
|
109
|
+ color: MyColours.color_CBCBCB))),
|
|
|
|
110
|
+ margin: EdgeInsets.only(bottom: w(10)),
|
|
|
|
111
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
112
|
+ horizontal: w(20),
|
|
|
|
113
|
+ vertical: w(10)), // 根据需要调整内边距
|
|
|
|
114
|
+
|
|
|
|
115
|
+ child: Row(
|
|
|
|
116
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
117
|
+ children: [
|
|
|
|
118
|
+ Text(
|
|
|
|
119
|
+ '余额',
|
|
|
|
120
|
+ style: TextStyle(
|
|
|
|
121
|
+ color: MyColours.color_000000,
|
|
|
|
122
|
+ fontSize: font(16),
|
|
|
|
123
|
+ fontWeight: FontWeight.bold),
|
|
|
|
124
|
+ ),
|
|
|
|
125
|
+ Text(
|
|
|
|
126
|
+ '¥520',
|
|
|
|
127
|
+ style: TextStyle(
|
|
|
|
128
|
+ color: MyColours.color_438E93,
|
|
|
|
129
|
+ fontSize: font(20),
|
|
|
|
130
|
+ fontWeight: FontWeight.bold),
|
|
|
|
131
|
+ )
|
|
|
|
132
|
+ ],
|
|
|
|
133
|
+ )),
|
|
|
|
134
|
+ ),
|
|
|
|
135
|
+ ],
|
|
|
|
136
|
+ ))),
|
|
|
|
137
|
+ Container(
|
|
|
|
138
|
+ padding: EdgeInsets.symmetric(horizontal: w(20), vertical: w(19)),
|
|
|
|
139
|
+ child: Row(
|
|
|
|
140
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
141
|
+ children: [
|
|
|
|
142
|
+ RoundButton(
|
|
|
|
143
|
+ text: '充值',
|
|
|
|
144
|
+ width: w(105),
|
|
|
|
145
|
+ height: w(43),
|
|
|
|
146
|
+ gradientStart: MyColours.color_438E93,
|
|
|
|
147
|
+ gradientEnd: MyColours.color_438E93,
|
|
|
|
148
|
+ radius: r(5),
|
|
|
|
149
|
+ onPressed: () {
|
|
|
|
150
|
+ //
|
|
|
|
151
|
+ },
|
|
|
|
152
|
+ ),
|
|
|
|
153
|
+ HEmptyView(20),
|
|
|
|
154
|
+ RoundButton(
|
|
|
|
155
|
+ text: '扣除',
|
|
|
|
156
|
+ width: w(105),
|
|
|
|
157
|
+ height: w(43),
|
|
|
|
158
|
+ gradientStart: MyColours.color_ffffff,
|
|
|
|
159
|
+ gradientEnd: MyColours.color_ffffff,
|
|
|
|
160
|
+ borderColor: MyColours.color_438E93,
|
|
|
|
161
|
+ textColor: MyColours.color_438E93,
|
|
|
|
162
|
+ radius: r(5),
|
|
|
|
163
|
+ onPressed: () {
|
|
|
|
164
|
+ //
|
|
|
|
165
|
+ },
|
|
|
|
166
|
+ ),
|
|
|
|
167
|
+ HEmptyView(20),
|
|
|
|
168
|
+ Expanded(
|
|
|
|
169
|
+ child: RoundButton(
|
|
|
|
170
|
+ text: '退款',
|
|
|
|
171
|
+ height: w(43),
|
|
|
|
172
|
+ gradientStart: MyColours.color_ffffff,
|
|
|
|
173
|
+ gradientEnd: MyColours.color_ffffff,
|
|
|
|
174
|
+ borderColor: MyColours.color_438E93,
|
|
|
|
175
|
+ textColor: MyColours.color_438E93,
|
|
|
|
176
|
+ radius: r(5),
|
|
|
|
177
|
+ onPressed: () {
|
|
|
|
178
|
+ //
|
|
|
|
179
|
+ },
|
|
|
|
180
|
+ ))
|
|
|
|
181
|
+ ],
|
|
|
|
182
|
+ ),
|
|
|
|
183
|
+ )
|
|
|
|
184
|
+ ]));
|
|
18
|
}
|
185
|
}
|
|
19
|
} |
186
|
} |