store_account_view.dart
13.4 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
import 'package:cp_offline_manage/common/colors.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'store_account_logic.dart';
class Store_accountPage extends GetView<Store_accountLogic> {
const Store_accountPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: GetBuilder<Store_accountLogic>(builder: (logic) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
width: 74,
height: 32,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(topLeft: Radius.circular(5), bottomLeft: Radius.circular(5)),
border: Border.all(color: ColorConfig.color548DEE),
color: logic.selectIndex == 0 ? ColorConfig.color548DEE : ColorConfig.white
),
child: Text('账本管理', style: TextStyle(fontSize: 14, color: logic.selectIndex == 0 ? ColorConfig.white : ColorConfig.color548DEE)),
),
onTap: (){ logic.changeSelect(0); },
),
InkWell(
child: Container(
width: 74,
height: 32,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(topRight: Radius.circular(5), bottomRight: Radius.circular(5)),
border: Border.all(color: ColorConfig.color548DEE),
color: logic.selectIndex == 1 ? ColorConfig.color548DEE : ColorConfig.white
),
child: Text('清账管理', style: TextStyle(fontSize: 14, color: logic.selectIndex == 1 ? ColorConfig.white : ColorConfig.color548DEE)),
),
onTap: (){ logic.changeSelect(1); },
),
const SizedBox(width: 40,)
],
);
},),
centerTitle: true,
backgroundColor: ColorConfig.themeColor,
shadowColor: Colors.transparent,
),
body: GetBuilder<Store_accountLogic>(builder: (logic) {
if(logic.selectIndex == 0) {
return _buildAccountManage(context);
} else {
return _buildClearManage(context);
}
},)
);
}
Widget _buildAccountManage(BuildContext context) {
return Column(
children: [
Container(
alignment: Alignment.centerLeft,
height: 40,
decoration: BoxDecoration(
color: Colors.yellow,
border: Border.all(color: Colors.orange, width: 1,)
),
child: RichText(
text: TextSpan(
children: [
WidgetSpan(child: SizedBox(width: 15,)),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(Icons.info_outline, color: ColorConfig.color99, size: 20,)
),
WidgetSpan(child: SizedBox(width: 10,)),
TextSpan(
text: "账本/礼金是什么?",
style: TextStyle(color: ColorConfig.color66, fontSize: 14)
),
WidgetSpan(child: SizedBox(width: 12,)),
TextSpan(
text: "查看详情>>",
style: TextStyle(color: ColorConfig.color548DEE, fontSize: 14)
),
]
),
),
),
Container(
color: ColorConfig.colorF0F0F0,
alignment: Alignment.centerLeft,
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 15),
child: Row(
children: [
Expanded(
child: Container(
height: 36,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(4)),
border: Border.all(color: ColorConfig.colorCBCBCB, width: 1)
),
padding: const EdgeInsets.symmetric(horizontal: 8),
child: TextField(
focusNode: controller.focusNode,
controller: controller.textController,
textInputAction: TextInputAction.search,
decoration: InputDecoration(
hintText: '请输入商品关键词'.tr,
hintStyle: const TextStyle(color: ColorConfig.color99, fontSize: 14),
hintMaxLines: 1,
border: const OutlineInputBorder(
borderSide: BorderSide(width: 0, color: Colors.transparent)
),
contentPadding: const EdgeInsets.only(top: 0, bottom: 0),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(width: 0, color: Colors.transparent)
),
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(width: 0, color: Colors.transparent)
),
disabledBorder: const OutlineInputBorder(
borderSide: BorderSide(width: 0, color: Colors.transparent)
),
),
onSubmitted: (s) { controller.searchAction(); },
onChanged: (s) {
controller.changeToolForWords(s);
},
),
)
),
const SizedBox(width: 6,),
Container(
height: 36,
width: 36,
alignment: Alignment.center,
decoration: BoxDecoration(
color: ColorConfig.color548DEE,
borderRadius: BorderRadius.all(Radius.circular(5))
),
child: Icon(Icons.search, color: ColorConfig.white, size: 20,),
)
],
),
),
Container(
alignment: Alignment.centerLeft,
color: ColorConfig.colorF0F0F0,
padding: const EdgeInsets.only(left: 15, bottom: 15),
child: const Text('账本用户: 1人, 账本总计: 999.99', style: TextStyle(color: ColorConfig.color66),),
),
const Divider(color: ColorConfig.colorCBCBCB, height: 0.5,),
Expanded(
child: ListView.builder(
itemBuilder: (item, index) {
return Column(
children: [
InkWell(
child: Container(
color: ColorConfig.white,
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 15),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("17栋2单元1002", style: TextStyle(color: ColorConfig.color548DEE, fontSize: 15),),
SizedBox(height: 5,),
Text('账本: 12.00元', style: TextStyle(color: ColorConfig.color99, fontSize: 13))
],
)
),
const Icon(Icons.keyboard_arrow_right, size: 24, color: ColorConfig.color99,)
],
),
),
onTap: () {
controller.jumpToDetail();
},
),
const Divider(color: ColorConfig.colorCBCBCB, height: 0.5,),
],
);
},
itemCount: 3,
)
)
],
);
}
Widget _buildClearManage(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Divider(color: ColorConfig.colorCBCBCB, height: 0.5,),
Container(
height: 44,
color: ColorConfig.white,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
text: '允许清账方式',
style: TextStyle(color: ColorConfig.color_999, fontSize: 14),
children: [
WidgetSpan(child: SizedBox(width: 10,)),
TextSpan(text: "微信、支付宝、现金、银行卡", style: TextStyle(fontSize: 14, color: ColorConfig.color33))
]
),
),
Text('修改>', style: TextStyle(color: ColorConfig.color548DEE, fontSize: 14),)
],
),
),
),
const Divider(color: ColorConfig.colorCBCBCB, height: 0.5,),
Container(
height: 44,
color: ColorConfig.white,
alignment: Alignment.center,
child: Row(
children: [
Expanded(
flex: 1,
child: Align(
alignment: Alignment.center,
child: RichText(
text: TextSpan(
text: "近7天",
style: TextStyle(color: ColorConfig.color66, fontSize: 13),
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(Icons.arrow_drop_down, size: 22, color: ColorConfig.color66,)
)
]
),
),
),
),
const VerticalDivider(width: 1, color: ColorConfig.colorCBCBCB, indent: 14, endIndent: 14,),
Expanded(
flex: 1,
child: Align(
alignment: Alignment.center,
child: RichText(
text: TextSpan(
text: "待处理",
style: TextStyle(color: ColorConfig.color66, fontSize: 13),
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(Icons.arrow_drop_down, size: 22, color: ColorConfig.color66,)
)
]
),
),
),
),
const VerticalDivider(width: 1, color: ColorConfig.colorCBCBCB, indent: 14, endIndent: 14,),
Expanded(
flex: 1,
child: Align(
alignment: Alignment.center,
child: RichText(
text: TextSpan(
text: "全部清账方式",
style: TextStyle(color: ColorConfig.color66, fontSize: 13),
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(Icons.arrow_drop_down, size: 22, color: ColorConfig.color66,)
)
]
),
),
),
)
],
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("笔数: 0笔 合计金额: 0.00元", style: TextStyle(fontSize: 14, color: ColorConfig.color66),),
SizedBox(height: 3,),
Text("微信: 0.00 支付宝: 0.00 现金: 0.00 银行卡: 0.00", style: TextStyle(fontSize: 14, color: ColorConfig.color66),),
],
),
),
Expanded(
child: Align(
alignment: Alignment.center,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.not_interested, size: 100, color: ColorConfig.color99,),
Text("没有匹配结果, 建议更换条件再查询", style: TextStyle(color: ColorConfig.color99),),
SizedBox(height: 100,),
],
),
)
)
],
)
)
],
);
}
}