|
...
|
...
|
@@ -112,18 +112,19 @@ class _MyContactListPageState extends State<MyContactListPage> { |
|
|
|
width: ScreenUtil().setWidth(2)))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: () {
|
|
|
|
if (widget.fromPage != FromPage.FromPageShowCutomerList) {
|
|
|
|
List<CustomerListSunModel> data =
|
|
|
|
widget.provider.userHistorys;
|
|
|
|
data[index].select = !data[index].select;
|
|
|
|
if (data[index].select) {
|
|
|
|
widget.provider.addData(index);
|
|
|
|
widget.provider.addDataMy(index);
|
|
|
|
} else {
|
|
|
|
widget.provider.cancelData(index);
|
|
|
|
widget.provider.cancelDataMy(index);
|
|
|
|
}
|
|
|
|
widget.provider.getCheckValue();
|
|
|
|
widget.provider.getCheckValueMy();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Stack(
|
|
...
|
...
|
@@ -190,140 +191,164 @@ class _MyContactListPageState extends State<MyContactListPage> { |
|
|
|
)),
|
|
|
|
HEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
model.rnameStr != null && model.rnameStr != ''
|
|
|
|
? Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: ScreenUtil().setWidth(200)),
|
|
|
|
child: Text(
|
|
|
|
model.rnameStr,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(4)),
|
|
|
|
child: Text(
|
|
|
|
model.sexStr != ''
|
|
|
|
? '[${model.sexStr}]'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
model.label != null
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(4)),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: ScreenUtil().setWidth(150)),
|
|
|
|
child: Text(
|
|
|
|
model.label,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color.fromRGBO(193, 194, 63, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: SizedBox()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
widget.fromPage == FromPage.FromPageMyCustomer &&
|
|
|
|
((model.company != null && model.company != '') ||
|
|
|
|
(model.phone != null && model.phone != ''))
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(10)),
|
|
|
|
child: Row(
|
|
|
|
child: GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: () {
|
|
|
|
if (widget.fromPage !=
|
|
|
|
FromPage.FromPageShowCutomerList) {
|
|
|
|
NavigatorUtil.goMyCustomerDetailPage(
|
|
|
|
context, model, widget.fromPage);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
model.company != null && model.company != ''
|
|
|
|
model.rnameStr != null && model.rnameStr != ''
|
|
|
|
? Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth:
|
|
|
|
ScreenUtil().setWidth(200)),
|
|
|
|
child: Text(
|
|
|
|
model.rnameStr,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(36),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom:
|
|
|
|
ScreenUtil().setWidth(4)),
|
|
|
|
child: Text(
|
|
|
|
model.sexStr != ''
|
|
|
|
? '[${model.sexStr}]'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(22),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
model.label != null
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
right: ScreenUtil().setWidth(10)),
|
|
|
|
bottom: ScreenUtil().setWidth(4)),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: ScreenUtil().setWidth(200)),
|
|
|
|
maxWidth: ScreenUtil().setWidth(150)),
|
|
|
|
child: Text(
|
|
|
|
'[${model.company}]',
|
|
|
|
model.label,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
color:
|
|
|
|
Color.fromRGBO(193, 194, 63, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
model.phone != null && model.phone != ''
|
|
|
|
? Text(
|
|
|
|
model.phone,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
: SizedBox()
|
|
|
|
],
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
Row(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Utils.formatFromYmd(model.ddate),
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color.fromRGBO(208, 31, 37, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
model.ddateSolt != null ? model.ddateSolt : '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color.fromRGBO(208, 31, 37, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
model.monthCount == '0' || model.monthCount == null
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
'30天内${model.monthCount}单',
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
widget.fromPage == FromPage.FromPageMyCustomer &&
|
|
|
|
((model.company != null &&
|
|
|
|
model.company != '') ||
|
|
|
|
(model.phone != null &&
|
|
|
|
model.phone != ''))
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(10)),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
model.company != null &&
|
|
|
|
model.company != ''
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
right: ScreenUtil()
|
|
|
|
.setWidth(10)),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: ScreenUtil()
|
|
|
|
.setWidth(200)),
|
|
|
|
child: Text(
|
|
|
|
'[${model.company}]',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30)),
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
model.phone != null && model.phone != ''
|
|
|
|
? Text(
|
|
|
|
model.phone,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30)),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
Row(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Utils.formatFromYmd(model.ddate),
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
color: Color.fromRGBO(208, 31, 37, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
model.ddateSolt != null ? model.ddateSolt : '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color.fromRGBO(208, 31, 37, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'累计${model.leiji}单',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
model.monthCount == '0' ||
|
|
|
|
model.monthCount == null
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
'30天内${model.monthCount}单',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'累计${model.leiji}单',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
...
|
...
|
@@ -354,15 +379,7 @@ class _MyContactListPageState extends State<MyContactListPage> { |
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
// if (index == 0) return _buildHeader();
|
|
|
|
CustomerListSunModel model = widget.contacts[index];
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (widget.fromPage != FromPage.FromPageShowCutomerList) {
|
|
|
|
NavigatorUtil.goMyCustomerDetailPage(
|
|
|
|
context, model, widget.fromPage);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: _buildListItem(model, index),
|
|
|
|
);
|
|
|
|
return _buildListItem(model, index);
|
|
|
|
},
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
|
...
|
...
|
|