Commit 52aba0724170c36e977cdf15b9d9612cf9dbdce2

Authored by wdn127929
1 parent d7abef32

ui和统计权限

@@ -11,14 +11,14 @@ if (flutterRoot == null) { @@ -11,14 +11,14 @@ if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 } 12 }
13 13
14 -def flutterVersionCode = "290" 14 +def flutterVersionCode = "291"
15 if (flutterVersionCode == null) { 15 if (flutterVersionCode == null) {
16 - flutterVersionCode = '290' 16 + flutterVersionCode = '291'
17 } 17 }
18 18
19 -def flutterVersionName = "2.9.0" 19 +def flutterVersionName = "2.9.1"
20 if (flutterVersionName == null) { 20 if (flutterVersionName == null) {
21 - flutterVersionName = '2.9.0' 21 + flutterVersionName = '2.9.1'
22 } 22 }
23 23
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
@@ -92,16 +92,30 @@ class _StatisticsPageState extends State<StatisticsPage> { @@ -92,16 +92,30 @@ class _StatisticsPageState extends State<StatisticsPage> {
92 return; 92 return;
93 } 93 }
94 UserModel userModel = Provider.of<UserModel>(context, listen: false); 94 UserModel userModel = Provider.of<UserModel>(context, listen: false);
  95 + int startDay = DateTime.parse((_provider.datetimeS.year.toString() +
  96 + "-" +
  97 + Utils.addZeroNumber(_provider.datetimeS.month) +
  98 + "-" +
  99 + Utils.addZeroNumber(_provider.datetimeS.day) +
  100 + " 00:00:00"))
  101 + .millisecondsSinceEpoch;
  102 + int endDay = DateTime.parse((_provider.datetimeE.year.toString() +
  103 + "-" +
  104 + Utils.addZeroNumber(_provider.datetimeE.month) +
  105 + "-" +
  106 + Utils.addZeroNumber(_provider.datetimeE.day) +
  107 + " 00:00:00"))
  108 + .millisecondsSinceEpoch;
95 Map<String, String> params = { 109 Map<String, String> params = {
96 "sid": userModel.user.sellerid, 110 "sid": userModel.user.sellerid,
97 - "uid": userModel.user.openid,  
98 - "stime":  
99 - '${_provider.datetimeS.millisecondsSinceEpoch.toString().substring(0, 10)}',  
100 - "etime":  
101 - '${_provider.datetimeE.millisecondsSinceEpoch.toString().substring(0, 10)}', 111 + "stime": '${startDay.toString().substring(0, 10)}',
  112 + "etime": '${endDay.toString().substring(0, 10)}',
102 "size": _provider.controller.text, 113 "size": _provider.controller.text,
103 "od": '${_provider.currentIndex + 1}', 114 "od": '${_provider.currentIndex + 1}',
104 }; 115 };
  116 + if (userModel.user.role_name != '管理员' && userModel.user.role_name != '店长') {
  117 + params['uid'] = userModel.user.openid;
  118 + }
105 await _provider.getStatisticsList(context, params); 119 await _provider.getStatisticsList(context, params);
106 if (_provider.dataStatics.length > 0) { 120 if (_provider.dataStatics.length > 0) {
107 switch (_provider.currentIndex) { 121 switch (_provider.currentIndex) {
@@ -199,11 +213,12 @@ class _StatisticsPageState extends State<StatisticsPage> { @@ -199,11 +213,12 @@ class _StatisticsPageState extends State<StatisticsPage> {
199 border: Border.all( 213 border: Border.all(
200 color: MyColours.color_cccccc, 214 color: MyColours.color_cccccc,
201 width: ScreenUtil().setWidth(2))), 215 width: ScreenUtil().setWidth(2))),
202 - width: ScreenUtil().setWidth(132 * 2),  
203 - constraints: BoxConstraints(  
204 - maxHeight: ScreenUtil().setWidth(104 * 2),  
205 - ), 216 + width: ScreenUtil().setWidth(136 * 2),
  217 + // constraints: BoxConstraints(
  218 + // maxHeight: ScreenUtil().setWidth(130 * 2),
  219 + // ),
206 child: ListView.builder( 220 child: ListView.builder(
  221 + shrinkWrap: true,
207 padding: 222 padding:
208 EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)), 223 EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
209 itemCount: data.length, 224 itemCount: data.length,
@@ -517,6 +532,7 @@ class _StatisticsPageState extends State<StatisticsPage> { @@ -517,6 +532,7 @@ class _StatisticsPageState extends State<StatisticsPage> {
517 }), 532 }),
518 VEmptyView(10), 533 VEmptyView(10),
519 Container( 534 Container(
  535 + // color: Colors.red,
520 // margin: EdgeInsets.only( 536 // margin: EdgeInsets.only(
521 // bottom: ScreenUtil().setWidth(58 + 10)), 537 // bottom: ScreenUtil().setWidth(58 + 10)),
522 child: Material( 538 child: Material(