|
|
@@ -24,7 +24,8 @@ class MemberListPage extends StatefulWidget {
|
|
|
bool isAll;
|
|
|
bool isPartner = false;
|
|
|
MyShopBeanDataData data;
|
|
|
- MemberListPage(this.store, this.isAll,this.data,{this.isPartner});
|
|
|
+
|
|
|
+ MemberListPage(this.store, this.isAll, this.data, {this.isPartner});
|
|
|
|
|
|
@override
|
|
|
_MemberListPageState createState() => _MemberListPageState(store, isAll);
|
|
|
@@ -57,7 +58,7 @@ class _MemberListPageState extends State<MemberListPage> {
|
|
|
child: Scaffold(
|
|
|
body: Column(
|
|
|
children: [
|
|
|
- MyViews().myAppBar(widget.isPartner?'合伙人':'货帮成员', context, []),
|
|
|
+ MyViews().myAppBar(widget.isPartner ? '合伙人' : '货帮成员', context, []),
|
|
|
Expanded(
|
|
|
child: Column(
|
|
|
children: [
|
|
|
@@ -147,13 +148,39 @@ class _MemberListPageState extends State<MemberListPage> {
|
|
|
onLoading: onLoading,
|
|
|
enablePullUp: true,
|
|
|
enablePullDown: true,
|
|
|
- child: AzListView(
|
|
|
- itemBuilder: (c, index) {
|
|
|
+ // child: AzListView(
|
|
|
+ // itemBuilder: (c, index) {
|
|
|
+ // return GestureDetector(
|
|
|
+ // child: MyViews().getMemberListItems(
|
|
|
+ // widget.store, member[index], context),
|
|
|
+ // onTap: () {
|
|
|
+ // if (permissionToModifyCustomerName(widget.data.role)) {
|
|
|
+ // if (MyCookie().getUID() !=
|
|
|
+ // member[index].userUid) {
|
|
|
+ // MyTools().toPage(
|
|
|
+ // context, MemberDetailsPage(member[index]),
|
|
|
+ // (then) {
|
|
|
+ // controller.requestRefresh();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // behavior: HitTestBehavior.translucent,
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ // itemCount: member.length,
|
|
|
+ // data: member,
|
|
|
+ // ),
|
|
|
+ child: ListView.builder(
|
|
|
+ itemBuilder: (BuildContext context, int index) {
|
|
|
return GestureDetector(
|
|
|
child: MyViews().getMemberListItems(
|
|
|
widget.store, member[index], context),
|
|
|
onTap: () {
|
|
|
- if (permissionToModifyCustomerName(widget.data.role)) {
|
|
|
+ if (permissionToModifyCustomerName(
|
|
|
+ widget.data.role)) {
|
|
|
if (MyCookie().getUID() !=
|
|
|
member[index].userUid) {
|
|
|
MyTools().toPage(
|
|
|
@@ -170,7 +197,6 @@ class _MemberListPageState extends State<MemberListPage> {
|
|
|
);
|
|
|
},
|
|
|
itemCount: member.length,
|
|
|
- data: member,
|
|
|
),
|
|
|
),
|
|
|
)
|
|
|
@@ -200,16 +226,12 @@ class _MemberListPageState extends State<MemberListPage> {
|
|
|
conditions.add('user_name LIKE ${_description.text.toString()}');
|
|
|
}
|
|
|
if (isAll) {
|
|
|
- filters = {
|
|
|
- "conditions": conditions
|
|
|
- };
|
|
|
+ filters = {"conditions": conditions};
|
|
|
} else {
|
|
|
conditions.add("role == $shopUserStaff");
|
|
|
- filters = {
|
|
|
- "conditions":conditions
|
|
|
- };
|
|
|
+ filters = {"conditions": conditions};
|
|
|
}
|
|
|
- if(widget.isPartner){
|
|
|
+ if (widget.isPartner) {
|
|
|
conditions.add('role == $shopUserPartner');
|
|
|
}
|
|
|
MyDio().query({
|