Commit f03822cd20fd6fb63334c7bc66e733fc8691c972

Authored by wdn127929
1 parent f02b6a19

allall

Showing 28 changed files with 1607 additions and 212 deletions
... ... @@ -83,6 +83,11 @@ class CustomerListSunModel extends Object with ISuspensionBean {
String monthCount;
@JsonKey(name: 'label')
String label;
@JsonKey(name: 'nick_name')
String nickName;
@JsonKey(name: 'gid')
String gid;
bool select = false;
List<String> pinyinList; //全拼数组
... ... @@ -112,27 +117,30 @@ class CustomerListSunModel extends Object with ISuspensionBean {
}
CustomerListSunModel(
this.id,
this.sellerid,
this.uid,
this.rname,
this.sex,
this.phone,
this.cdate,
this.leiji,
this.attr,
this.ddate,
this.ddateSolt,
this.company,
this.section,
this.position,
this.taboos,
this.like,
this.serve,
this.cDay,
this.udate,
this.monthCount,
this.label);
this.id,
this.sellerid,
this.uid,
this.rname,
this.sex,
this.phone,
this.cdate,
this.leiji,
this.attr,
this.ddate,
this.ddateSolt,
this.company,
this.section,
this.position,
this.taboos,
this.like,
this.serve,
this.cDay,
this.udate,
this.monthCount,
this.label,
this.nickName,
this.gid,
);
factory CustomerListSunModel.fromJson(Map<String, dynamic> srcJson) =>
_$CustomerListSunModelFromJson(srcJson);
... ...
... ... @@ -48,6 +48,8 @@ CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) {
json['udate'] as String,
json['month_count'] as String,
json['label'] as String,
json['nick_name'] as String,
json['id'] as String,
);
}
... ... @@ -74,5 +76,7 @@ Map<String, dynamic> _$CustomerListSunModelToJson(
'c_day': instance.cDay,
'udate': instance.udate,
'month_count': instance.monthCount,
'label': instance.label
'label': instance.label,
'nick_name': instance.nickName,
'gid': instance.gid
};
... ...
import 'package:json_annotation/json_annotation.dart';
part 'get_seller_user_by_sellerid_model.g.dart';
@JsonSerializable()
class GetSellerUserBySelleridModel extends Object {
@JsonKey(name: 'ret')
int ret;
@JsonKey(name: 'data')
List<GetSellerUserBySelleridSunModel> data;
@JsonKey(name: 'msg')
String msg;
GetSellerUserBySelleridModel(
this.ret,
this.data,
this.msg,
);
factory GetSellerUserBySelleridModel.fromJson(Map<String, dynamic> srcJson) =>
_$GetSellerUserBySelleridModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$GetSellerUserBySelleridModelToJson(this);
}
@JsonSerializable()
class GetSellerUserBySelleridSunModel extends Object {
@JsonKey(name: 'nick_name')
String nickName;
@JsonKey(name: 'id')
String id;
GetSellerUserBySelleridSunModel(
this.nickName,
this.id,
);
factory GetSellerUserBySelleridSunModel.fromJson(
Map<String, dynamic> srcJson) =>
_$GetSellerUserBySelleridSunModelFromJson(srcJson);
Map<String, dynamic> toJson() =>
_$GetSellerUserBySelleridSunModelToJson(this);
}
... ...
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'get_seller_user_by_sellerid_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
GetSellerUserBySelleridModel _$GetSellerUserBySelleridModelFromJson(
Map<String, dynamic> json) {
return GetSellerUserBySelleridModel(
json['ret'] as int,
(json['data'] as List)
?.map((e) => e == null
? null
: GetSellerUserBySelleridSunModel.fromJson(
e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
);
}
Map<String, dynamic> _$GetSellerUserBySelleridModelToJson(
GetSellerUserBySelleridModel instance) =>
<String, dynamic>{
'ret': instance.ret,
'data': instance.data,
'msg': instance.msg,
};
GetSellerUserBySelleridSunModel _$GetSellerUserBySelleridSunModelFromJson(
Map<String, dynamic> json) {
return GetSellerUserBySelleridSunModel(
json['nick_name'] as String,
json['id'] as String,
);
}
Map<String, dynamic> _$GetSellerUserBySelleridSunModelToJson(
GetSellerUserBySelleridSunModel instance) =>
<String, dynamic>{
'nick_name': instance.nickName,
'id': instance.id,
};
... ...
... ... @@ -99,6 +99,8 @@ class Guest extends Object {
@JsonKey(name: 'label')
String label;
@JsonKey(name: 'nick_name')
String nickName;
String get rnameStr {
if (rname == null || rname == '') return "";
... ... @@ -138,7 +140,8 @@ class Guest extends Object {
this.serve,
this.cDay,
this.udate,
this.label);
this.label,
this.nickName);
factory Guest.fromJson(Map<String, dynamic> srcJson) =>
_$GuestFromJson(srcJson);
... ...
... ... @@ -70,6 +70,7 @@ Guest _$GuestFromJson(Map<String, dynamic> json) {
?.toList(),
json['udate'] as String,
json['label'] as String,
json['nick_name'] as String,
);
}
... ... @@ -90,6 +91,7 @@ Map<String, dynamic> _$GuestToJson(Guest instance) => <String, dynamic>{
'c_day': instance.cDay,
'udate': instance.udate,
'label': instance.label,
'nick_name': instance.nickName
};
Cday _$CdayFromJson(Map<String, dynamic> json) {
... ...
... ... @@ -214,5 +214,13 @@ class HttpUrl {
"?service=App.GuestManage.PullMarketingByUid"; // 获取推送失败的营销消息
static const String set_pull_marketing_by_id =
"?service=App.GuestManage.SetPullMarketingByid"; // 修改拉取后消息的状态
static const String del_guest_cday =
"?service=App.GuestManage.DelGuestCday"; // 删除纪念日
static const String set_marketing_status_by_uid =
"?service=App.GuestManage.SetMarketingStatusByUid"; // 修改完成任务后的状态
static const String get_seller_user_by_sellerid =
"?service=App.GuestManage.GetSellerUserBySellerid"; // 获取客户经理列表
static const String send_marketing_msg_by_mid =
"?service=App.GuestManage.SendMarketingMsgByMid"; // 催促未完成任务经理发消息
}
... ...
... ... @@ -109,7 +109,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
Provider.of<UserModel>(context, listen: false)
.pullMarketingByUidSunModel;
if (data != null && data.length > 0) {
Future.delayed(Duration(seconds: 300), () {
Future.delayed(Duration(milliseconds: 300), () {
DialogUtil.cupertinoAlertDialog(context,
title: "全店任务",
content: "管理员发布了新的任务,请立即查看并完成任务",
... ...
... ... @@ -88,8 +88,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage>
WidgetsBinding.instance.addPostFrameCallback((_) async {
bool first = true;
customerProvider.index = tabController.index;
if (widget.fromPage == FromPage.FromPageMakeRecord ||
widget.fromPage == FromPage.FromPageMyCustomer) {
if (widget.fromPage == FromPage.FromPageMakeRecord ) {
customerProvider.selectCustomer = customerMakingProvider.selectCustomer;
customerProvider.labels = customerMakingProvider.labels;
first = false;
... ... @@ -190,6 +189,8 @@ class _MyCustomerListPageState extends State<MyCustomerListPage>
// params['reserve_sort'] 1 等于 2 小于 3 大于
await customerProvider.getCustomerList(context, params);
print(first);
// if (customerProvider.userHistorys.length ==
// customerProvider.selectCustomer.length) {
// customerProvider.checkValue = true;
... ...
... ... @@ -38,8 +38,8 @@ class _MyCustomerPageState extends State<MyCustomerPage> {
_getMarketingByUid();
});
bus.on("refresh_my_customer_home", (arg) {
_getGuestManageData(isShowLoading: false);
_getMarketingByUid();
});
}
... ... @@ -52,9 +52,9 @@ class _MyCustomerPageState extends State<MyCustomerPage> {
}
///我的客户首页
_getGuestManageData() async {
GuestManageSunModel model =
await customerProvider.getGuestManageData(context);
_getGuestManageData({bool isShowLoading = true}) async {
GuestManageSunModel model = await customerProvider
.getGuestManageData(context, isShowLoading: isShowLoading);
// setState(() {});
}
... ...
... ... @@ -62,6 +62,22 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> {
}
}
_delGuestInfocDay(String id) async {
Map<String, String> params = {"id": id};
bool sucess =
await customerProvider.delGuestCday(context, params, showLoading: true);
if (sucess) {
Utils.showToast('删除成功');
//刷新当前页
_getGuestInfoCday();
// 刷新
bus.emit('refresh_guest_info');
bus.emit('refresh_guest_list');
// Navigator.pop(context);
}
}
@override
Widget build(BuildContext context) {
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
... ... @@ -140,6 +156,15 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> {
print(name);
_setGuestInfocDay(model.cday[index].id, name);
// _addCookbookClass(name, showLoading: true);
}, delCallback: () {
//弹框确认是否删除
DialogUtil.cupertinoAlertDialog(context,
title: "",
content: "是否确定删除该纪念日",
rTitle: "确定删除", rCallback: () {
Navigator.pop(context);
_delGuestInfocDay(model.cday[index].id);
});
},
yearStr: yearStr,
monthStr: monthStr,
... ... @@ -183,12 +208,16 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> {
fontSize: 26,
isBold: false,
onPressed: () {
DialogUtil.festivalAlertDialog(context, '', 520,
rCallback: (name) {
print(name);
_setGuestInfocDay('', name);
// _addCookbookClass(name, showLoading: true);
});
DialogUtil.festivalAlertDialog(
context,
'',
520,
rCallback: (name) {
print(name);
_setGuestInfocDay('', name);
// _addCookbookClass(name, showLoading: true);
},
);
},
),
VEmptyView(30)
... ...
... ... @@ -14,6 +14,7 @@ import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/event_bus.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/round_button.dart';
... ... @@ -34,7 +35,8 @@ class MyMakeMarkingPageOnlyShow extends StatefulWidget {
_MyMakeMarkingPageOnlyShowState();
}
class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow>
with WidgetsBindingObserver {
List<String> couponList = [];
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
... ... @@ -51,7 +53,7 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
_focusNode.addListener(() {
if (_focusNode.hasFocus) {
//有焦点
... ... @@ -87,8 +89,33 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) async {
// TODO: implement didChangeAppLifecycleState
super.didChangeAppLifecycleState(state);
switch (state) {
case AppLifecycleState.resumed: //应用前台可见
// _getSmsInfo(context);
print('fff');
_refresh();
break;
case AppLifecycleState.inactive:
print('inactive');
break;
case AppLifecycleState.paused:
print('paused');
break;
case AppLifecycleState.detached:
print('detached');
break;
default:
break;
}
}
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
if (needClear) {
customerMakingProvider.clearData();
}
... ... @@ -172,18 +199,30 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
}
}
_createMarketing() async {
//这块需要调用经理完成全店任务的接口,不是经理创建营销的接口
// Map<String, String> params = {
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
// "gid": gid,
// "content": customerMakingProvider.controller.text
// };
// if (widget.sellerList.aid != null) {
// params['aid'] = widget.sellerList.aid;
_setMarketingStatusByUid() async {
// 这块需要调用经理完成全店任务的接口,不是经理创建营销的接口
Map<String, String> params = {
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
"gid": gid,
"mid": widget.sellerList.id //任务id
};
bool sucess = await customerProvider
.setMarketingStatusByUid(context, params, showLoading: true);
// if (sucess) {
// bus.emit("refresh_my_customer_home");
// bus.emit('refresh_my_records_page');
// bus.emit('refresh_my_records_detail_seller_page');
// }
// await customerProvider.createMarketing(context, params, showLoading: true);
// _goSms();
// Future.delayed(Duration(milliseconds: 300), () {
_goSms();
// });
}
_refresh() {
bus.emit("refresh_my_customer_home");
bus.emit('refresh_my_records_page');
bus.emit('refresh_my_records_detail_seller_page');
}
_goSms() async {
... ... @@ -192,12 +231,13 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
// print('取消发送');
// }, rCallback: () async {
String message = customerMakingProvider.controller.text;
bool sucess = false;
if (Platform.isIOS) {
// List<String> phoneNumber = ['18161963378', '18729572142', '18765432345'];
try {
String _result = await sendSMS(message: message, recipients: iosPhone);
print(_result);
// sucess = _result;
} catch (error) {
print(error.toString());
}
... ... @@ -208,7 +248,7 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
// await Sendsms.onGetPermission();
// if (await Sendsms.hasPermission()) {
await Sendsms.onSendSMS(andriodPhone, message);
sucess = await Sendsms.onSendSMS(andriodPhone, message);
}
// }
... ... @@ -476,7 +516,7 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
InkWell(
onTap: () {
needClear = false;
NavigatorUtil.goShowCustomerListPage(
NavigatorUtil.goMyShowCustomerListPage(
context,
FromPage.FromPageMakeRecordDetail,
widget.sellerList.gid);
... ... @@ -514,7 +554,7 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> {
isBold: false,
onPressed: () {
//群发短信
_createMarketing();
_setMarketingStatusByUid();
},
),
VEmptyView(30),
... ...
... ... @@ -176,7 +176,7 @@ class _MyMarketingRecordsDetailPageState
HEmptyView(10),
InkWell(
onTap: () {
NavigatorUtil.goShowCustomerListPage(
NavigatorUtil.goMyShowCustomerListPage(
context,
FromPage.FromPageMakeRecordDetail,
widget.selfList.gid);
... ...
... ... @@ -8,6 +8,7 @@ import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/event_bus.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/page_exception.dart';
... ... @@ -46,10 +47,15 @@ class _SellerMyMarketingRecordsDetailPageState
_getMarketingByUid();
// _couponNetworkData();
});
bus.on("refresh_my_records_detail_seller_page", (arg) {
_getMarketingByUid();
});
}
@override
void dispose() {
bus.off('refresh_my_records_detail_seller_page');
super.dispose();
}
... ... @@ -239,7 +245,7 @@ class _SellerMyMarketingRecordsDetailPageState
)),
InkWell(
onTap: () {
NavigatorUtil.goShowCustomerListPage(
NavigatorUtil.goMyShowCustomerListPage(
context,
FromPage.FromPageStoreCustomer,
sellerList.gid);
... ...
... ... @@ -27,17 +27,17 @@ import 'package:provider/provider.dart';
typedef ClickCallback = void Function(dynamic value);
class ShowCustomerListPage extends StatefulWidget {
class MyShowCustomerListPage extends StatefulWidget {
final FromPage fromPage;
final String gid;
const ShowCustomerListPage({Key key, this.fromPage, this.gid})
const MyShowCustomerListPage({Key key, this.fromPage, this.gid})
: super(key: key);
@override
_ShowCustomerListPageState createState() => _ShowCustomerListPageState();
_MyShowCustomerListPageState createState() => _MyShowCustomerListPageState();
}
class _ShowCustomerListPageState extends State<ShowCustomerListPage>
class _MyShowCustomerListPageState extends State<MyShowCustomerListPage>
with TickerProviderStateMixin, SingleTickerProviderStateMixin {
List _tabBarTitle;
TabController tabController;
... ...
... ... @@ -114,15 +114,17 @@ class _ContactListPageState extends State<ContactListPage> {
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
List<CustomerBySellerSunModel> data =
widget.provider.customerBySellerList;
data[index].select = !data[index].select;
if (data[index].select) {
widget.provider.addData(index);
} else {
widget.provider.cancelData(index);
if (model.gid != null) {
List<CustomerBySellerSunModel> data =
widget.provider.customerBySellerList;
data[index].select = !data[index].select;
if (data[index].select) {
widget.provider.addData(index);
} else {
widget.provider.cancelData(index);
}
widget.provider.getCheckValue();
}
widget.provider.getCheckValue();
},
child: Stack(
alignment: Alignment.bottomCenter,
... ... @@ -144,13 +146,15 @@ class _ContactListPageState extends State<ContactListPage> {
fontSize: ScreenUtil().setSp(42)),
),
),
Positioned(
left: ScreenUtil().setWidth(-18),
child: Image.asset(
Utils.getImgPath(
model.select ? 'select' : 'unselect'),
width: ScreenUtil().setWidth(36),
))
widget.fromPage == FromPage.FromPageShowCutomerList
? SizedBox()
: Positioned(
left: ScreenUtil().setWidth(-18),
child: Image.asset(
Utils.getImgPath(
model.select ? 'select' : 'unselect'),
width: ScreenUtil().setWidth(36),
))
]),
Positioned(
bottom: ScreenUtil().setWidth(-20),
... ... @@ -189,9 +193,11 @@ class _ContactListPageState extends State<ContactListPage> {
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (model.gid != null) {
if (model.gid != null &&
widget.fromPage !=
FromPage.FromPageShowCutomerList) {
NavigatorUtil.goCustomerDetailPage(
context, model, widget.fromPage, model.nickName);
context, model, widget.fromPage);
}
},
child: Column(
... ...
... ... @@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/constant/state.dart';
import 'package:one_key/models/customer_label_model.dart';
import 'package:one_key/models/filter_btn_model.dart';
import 'package:one_key/models/guest_info_model.dart';
import 'package:one_key/models/store_customer_home_model.dart';
import 'package:one_key/provider/customer_provider.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
... ... @@ -45,6 +47,7 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
CustomerProvider customerProvider;
String labelShow = '';
String manageShow = '';
ScrollController scrollController = ScrollController();
@override
void initState() {
... ... @@ -82,15 +85,16 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
xhController.text = widget.guest.like ?? '';
fwController.text = widget.guest.serve ?? '';
labelShow = widget.guest.label ?? '';
manageShow = widget.guest.nickName ?? '';
setState(() {});
_getLabelBySellerid();
_getSellerUserBySellerid();
// scrollController.jumpTo(scrollController.position.minScrollExtent);
});
}
///获取商家标签
_getLabelBySellerid() async {
List<CustomerLabelSunModel> modelLabel =
await customerProvider.getLabelBySellerid(context);
... ... @@ -103,6 +107,17 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
}
}
///商家编辑页面 ----- 获取经理数据
_getSellerUserBySellerid() async {
await customerProvider.getSellerUserBySellerid(context);
for (int i = 0; i < customerProvider.sellerManageList.length; i++) {
if (manageShow == customerProvider.sellerManageList[i].title) {
customerProvider.manageSelIndex = i;
}
}
}
_setGuestInfo() async {
if (nameStr.trim().length == 0) {
Utils.showToast('请填写客户姓名');
... ... @@ -137,6 +152,10 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
if (labelShow != '') {
params['label'] = labelShow;
}
if (manageShow != '') {
params['uid'] =
customerProvider.sellerManageList[customerProvider.manageSelIndex].id;
}
if (jkController.text.trim().length > 0) {
params['taboos'] = jkController.text;
}
... ... @@ -150,10 +169,11 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
await customerProvider.setGuestInfo(context, params, showLoading: true);
if (sucess) {
Utils.showToast('保存成功');
// 刷新前一页
bus.emit('refresh_guest_info');
bus.emit('refresh_guest_list');
bus.emit('refresh_store_customer_home'); //编辑经理后需要刷新
Navigator.pop(context);
// 刷新前一页
}
}
... ... @@ -568,68 +588,80 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
],
),
)),
InkWell(
onTap: () {
// DialogUtil.showSelectCusmanDialog(
// context, couponList, (value) {
// if (value != null) {
// setState(() {
// couponSelectIndex = value.first;
// });
// }
// },
// selecteds: couponSelectIndex == null
// ? []
// : [couponSelectIndex])
// .then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(50)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(
220, 220, 220, 1)))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'客户经理',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: Text(
'xxxj',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
InkWell(
onTap: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //隐藏键盘
DialogUtil.showSelectCusmanDialog(
context,
customerProvider.sellerManageList
.map((item) {
return item.title;
}).toList(), (value) {
if (value != null) {
setState(() {
customerProvider.manageSelIndex =
value.first;
manageShow = customerProvider
.sellerManageList[
customerProvider.manageSelIndex]
.title;
});
}
},
selecteds: customerProvider
.manageSelIndex ==
null
? []
: [customerProvider.manageSelIndex])
.then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(50)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(
220, 220, 220, 1)))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'客户经理',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(showLabel
? 'c_arrow_up'
: 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
color: MyColours.color_333333),
),
),
)),
Expanded(
child: Text(
manageShow,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(showLabel
? 'c_arrow_up'
: 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
)),
VEmptyView(60),
_textMulLine('忌口', '输入忌口的东西', jkController),
VEmptyView(30),
... ...
... ... @@ -21,10 +21,8 @@ import 'package:provider/provider.dart';
class CustomerDetailPage extends StatefulWidget {
final CustomerBySellerSunModel userHistoryEntity;
final FromPage fromPage;
final String nickName;
CustomerDetailPage(
{Key key, this.userHistoryEntity, this.fromPage, this.nickName})
CustomerDetailPage({Key key, this.userHistoryEntity, this.fromPage})
: super(key: key);
@override
... ... @@ -159,7 +157,9 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
// widget.userHistoryEntity.rnameStr == ''
// ? '未指派经理'
// : widget.userHistoryEntity.rnameStr,
'${widget.nickName}经理',
customerProvider.guestInfoSunModel.guest.nickName == null
? '未指派经理'
: '${customerProvider.guestInfoSunModel.guest.nickName}经理',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
... ...
... ... @@ -243,7 +243,7 @@ class _CustomerListPageState extends State<CustomerListPage>
}
await customerProvider.getCustomerBySeller(context, params);
// if (customerProvider.customerBySellerList.length ==
print(first); // if (customerProvider.customerBySellerList.length ==
// customerProvider.selectCustomerSeller.length) {
// customerProvider.checkValue = true;
// } else {
... ...
... ... @@ -62,6 +62,22 @@ class _FestivalEditPageState extends State<FestivalEditPage> {
}
}
_delGuestInfocDay(String id) async {
Map<String, String> params = {"id": id};
bool sucess =
await customerProvider.delGuestCday(context, params, showLoading: true);
if (sucess) {
Utils.showToast('删除成功');
//刷新当前页
_getGuestInfoCday();
// 刷新
bus.emit('refresh_guest_info');
bus.emit('refresh_guest_list');
// Navigator.pop(context);
}
}
@override
Widget build(BuildContext context) {
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
... ... @@ -142,6 +158,15 @@ class _FestivalEditPageState extends State<FestivalEditPage> {
print(name);
_setGuestInfocDay(model.cday[index].id, name);
// _addCookbookClass(name, showLoading: true);
}, delCallback: () {
//弹框确认是否删除
DialogUtil.cupertinoAlertDialog(context,
title: "",
content: "是否确定删除该纪念日",
rTitle: "确定删除", rCallback: () {
Navigator.pop(context);
_delGuestInfocDay(model.cday[index].id);
});
},
yearStr: yearStr,
monthStr: monthStr,
... ...
... ... @@ -73,6 +73,15 @@ class _MarketingRecordsDetailPageState
await customerProvider.getMarketingById(context, params);
}
///催促未完成任务经理发消息
_sendMarketingMsgByMid(String mid) async {
Map<String, String> params = {"mid": mid}; //任务id
bool sucess = await customerProvider.sendMarketingMsgByMid(context, params);
if (sucess) {
Utils.showToast('催促成功');
}
}
///消费券
_couponNetworkData({bool isShowLoading = true}) async {
// customerMakingProvider.couponSelectIndex = 0;
... ... @@ -318,7 +327,8 @@ class _MarketingRecordsDetailPageState
horizontal: ScreenUtil().setWidth(200)),
isBold: false,
onPressed: () {
// NavigatorUtil.goEnterStoreEnvironmentPage(context);
_sendMarketingMsgByMid(
model.marketingByIdSunModel.id);
},
),
VEmptyView(10),
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/constant/state.dart';
import 'package:one_key/pages/my/customer_type/my_customer/my_contant_list_page.dart';
import 'package:one_key/pages/my/customer_type/store_customer/contant_list_page.dart';
import 'package:one_key/provider/customer_making_provider.dart';
import 'package:one_key/provider/customer_provider.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/event_bus.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/common_button_flat.dart';
import 'package:one_key/widgets/custom_tab_indicator.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/page_exception.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
typedef ClickCallback = void Function(dynamic value);
class ShowCustomerListPage extends StatefulWidget {
final FromPage fromPage;
final String gid;
const ShowCustomerListPage({Key key, this.fromPage, this.gid})
: super(key: key);
@override
_ShowCustomerListPageState createState() => _ShowCustomerListPageState();
}
class _ShowCustomerListPageState extends State<ShowCustomerListPage>
with TickerProviderStateMixin, SingleTickerProviderStateMixin {
List _tabBarTitle;
TabController tabController;
CustomerProvider customerProvider;
CustomerMakingProvider customerMakingProvider;
bool showFilter = false;
ScrollController _scrollCrl = ScrollController();
int dropValue = 0;
bool showDrop = true;
List<String> timeTilte = ['大于', '等于', '小于'];
@override
void initState() {
_tabBarTitle = ['全部', '活跃', '沉睡', '流失'];
// timeTilte = ['大于', '等于', '小于'];
super.initState();
tabController = TabController(length: 4, vsync: this);
tabController.addListener(() {
if (tabController.index == tabController.animation.value) {
print(tabController.index);
customerProvider.index = tabController.index;
// customerProvider.searchData(customerProvider.controller.text);
}
});
WidgetsBinding.instance.addPostFrameCallback((_) async {
_getSellerGuestByGid();
});
}
_getSellerGuestByGid() async {
Map<String, String> params = {
"gid": widget.gid,
};
await customerProvider.getSellerGuestByGid(context, params);
}
/// 搜索框
Widget _searchWidget() {
return Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
),
height: ScreenUtil().setWidth(45 * 2),
// alignment: Alignment.center,
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(20 * 2),
),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(24 * 2)),
border: Border.all(color: Color.fromRGBO(228, 228, 228, 1)),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(220, 220, 220, 1), //投影颜色
offset: Offset(2, 3), //x,y轴
blurRadius: ScreenUtil().setWidth(6) //投影距离
)
]),
child: Row(children: [
Expanded(
child: TextField(
maxLines: 1,
controller: customerProvider.controller,
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "输入手机号或姓名",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(26),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
// 左边图标设置
icon: Image.asset(
Utils.getImgPath('search'),
width: ScreenUtil().setWidth(30),
),
//右边图标设置
// suffixIcon:
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
),
Offstage(
offstage: customerProvider.controller.text == '',
child: GestureDetector(
child: Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(20),
),
// color: Colors.orange,
alignment: Alignment.centerRight,
child: Image.asset(
Utils.getImgPath('clear'),
width: ScreenUtil().setWidth(30),
height: ScreenUtil().setWidth(30),
),
),
onTap: () {
WidgetsBinding.instance.addPostFrameCallback(((_) {
customerProvider.controller.clear();
// customerProvider.searchData('');
}));
},
)),
// Offstage(
// offstage: false,
// child: GestureDetector(
// child: Container(
// padding: EdgeInsets.only(
// right: ScreenUtil().setWidth(30),
// bottom: ScreenUtil().setWidth(20),
// top: ScreenUtil().setWidth(20),
// ),
// child: Text(
// '搜索',
// style: TextStyle(
// color: MyColours.color_199095,
// fontSize: ScreenUtil().setSp(28)),
// ),
// ),
// onTap: () {
// customerProvider.searchData(
// customerProvider.controller.text);
// },
// ))
])));
}
Widget _menuWidget() {
return Container(
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(color: MyColours.color_ffffff, boxShadow: [
BoxShadow(
// color: Colors.red,
color: Color.fromRGBO(220, 220, 220, 1), //投影颜色
offset: Offset(2, 2), //x,y轴
blurRadius: ScreenUtil().setWidth(6) //投影距离
)
]),
child: Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
margin:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
child: TabBar(
controller: tabController,
indicator: CustomTabIndicator(
radius: 0,
),
indicatorColor: MyColours.color_199095,
indicatorSize: TabBarIndicatorSize.tab,
// indicatorPadding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(12)),
labelColor: MyColours.color_199095,
labelStyle: TextStyle(
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.bold),
labelPadding: EdgeInsets.zero,
unselectedLabelStyle: TextStyle(
fontWeight: FontWeight.normal,
fontSize: ScreenUtil().setSp(28),
),
unselectedLabelColor: MyColours.color_999999,
tabs: _tabBarTitle.map((value) {
return Tab(
child: Text(value),
);
}).toList()),
)),
InkWell(
onTap: () {
setState(() {
showFilter = !showFilter;
});
if (showFilter) {
_showFilterDialogFromTop(context, onPressedReset: () {
Navigator.of(context).pop();
setState(() {
showFilter = false;
});
}, onPressedComplete: () {
Navigator.of(context).pop();
setState(() {
showFilter = false;
});
}, tapWhiteBack: () {
// Navigator.of(context).pop();
// setState(() {
// showFilter = false;
// });
});
}
},
child: Container(
padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
margin: EdgeInsets.only(right: ScreenUtil().setWidth(30)),
width: ScreenUtil().setWidth(100),
// height: ScreenUtil().setWidth(50),
child: Row(
children: [
Text(
'筛选',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_999999),
),
HEmptyView(10),
Image.asset(
Utils.getImgPath(
showFilter ? 'c_arrow_up' : 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
)),
)
],
));
}
///筛选弹框
_showFilterDialogFromTop(BuildContext context,
{VoidCallback onPressedReset,
VoidCallback onPressedComplete,
GestureTapCallback tapWhiteBack}) {
showGeneralDialog(
context: context,
barrierDismissible: false,
barrierColor: Colors.transparent,
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel,
transitionDuration: const Duration(milliseconds: 150),
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
return Scaffold(
backgroundColor: Colors.transparent,
// resizeToAvoidBottomInset: false,
body: StatefulBuilder(builder: (context, state) {
return GestureDetector(
// behavior: HitTestBehavior.opaque,
onTap: tapWhiteBack,
child: _filterWidget(
state,
onPressedReset,
onPressedComplete,
));
}));
});
}
///弹框text
_textWidget(String title, Color textColor, FontWeight fontWeight, int size) {
return Text(title,
style: TextStyle(
color: textColor,
decoration: TextDecoration.none,
fontWeight: fontWeight,
fontSize: ScreenUtil().setSp(size)));
}
///客户经理
Widget _managerWidget() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_textWidget('客户经理', MyColours.color_333333, FontWeight.bold, 28),
GestureDetector(
onTap: () {},
child: _textWidget(
'全选', MyColours.color_199095, FontWeight.normal, 24),
)
],
),
VEmptyView(30),
Wrap(
spacing: ScreenUtil().setWidth(20),
runSpacing: ScreenUtil().setWidth(20),
children: _buildFilterItem([
{'title': 'kkkk', 'select': false},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'k', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'k', 'select': true},
{'title': 'kdsfjsfsdfhjsdfh', 'select': true},
{'title': 'kkkk', 'select': true},
], false)),
],
);
}
///活跃度
Widget _activityWidget() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_textWidget('活跃度', MyColours.color_333333, FontWeight.bold, 28),
GestureDetector(
onTap: () {},
child: _textWidget(
'全选', MyColours.color_199095, FontWeight.normal, 24),
)
],
),
VEmptyView(30),
Wrap(
spacing: ScreenUtil().setWidth(20),
runSpacing: ScreenUtil().setWidth(20),
children: _buildFilterItem([
{'title': 'kkkk', 'select': false},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'k', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'k', 'select': true},
{'title': 'kdsfjsfsdfhjsdfh', 'select': true},
{'title': 'kkkk', 'select': true},
], false)),
],
);
}
///自定义标签
Widget _labelWidget() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_textWidget('自定义标签', MyColours.color_333333, FontWeight.bold, 28),
GestureDetector(
onTap: () {},
child: _textWidget(
'全选', MyColours.color_199095, FontWeight.normal, 24),
)
],
),
VEmptyView(30),
Wrap(
spacing: ScreenUtil().setWidth(20),
runSpacing: ScreenUtil().setWidth(20),
children: _buildFilterItem([
{'title': 'kkkk', 'select': false},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'k', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'kkkk', 'select': true},
{'title': 'k', 'select': true},
{'title': 'kdsfjsfsdfhjsdfh', 'select': false},
{'title': 'kkkk', 'select': true},
], true)),
],
);
}
///大于、等于、小于
List<DropdownMenuItem> _dropdownMenuItem() {
List<DropdownMenuItem> list = [];
for (int i = 0; i < timeTilte.length; i++) {
list.add(DropdownMenuItem(
child: _textWidget(
timeTilte[i], MyColours.color_199095, FontWeight.normal, 24),
value: i));
}
return list;
}
_selectWidget(List<String> data, ClickCallback onTap) {
return Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
border: Border.all(
color: MyColours.color_cccccc,
width: ScreenUtil().setWidth(2))),
width: ScreenUtil().setWidth(130 * 2),
// constraints: BoxConstraints(
// maxHeight: ScreenUtil().setWidth(130 * 2),
// ),
child: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(8)),
itemCount: data.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
onTap(index);
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: MyColours.color_efefef,
width: data.length - 1 == index
? 0
: ScreenUtil().setWidth(2)))),
child: Text(data[index],
style: TextStyle(
color: MyColours.color_199095,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(28))),
),
);
}));
}
///高级筛选
Widget _advancedFilterWidget(state) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_textWidget('高级筛选', MyColours.color_333333, FontWeight.bold, 28),
GestureDetector(
onTap: () {},
child: _textWidget(
'清空', MyColours.color_199095, FontWeight.normal, 24),
)
],
),
VEmptyView(30),
Row(
children: [
Expanded(child: _textFeildWidget()),
HEmptyView(10),
_textWidget('至', MyColours.color_199095, FontWeight.normal, 24),
HEmptyView(10),
Expanded(child: _textFeildWidget()),
],
),
VEmptyView(30),
Wrap(
spacing: ScreenUtil().setWidth(20),
runSpacing: ScreenUtil().setWidth(20),
children: _buildFilterItem([
{'title': '7天', 'select': true},
{'title': '30天', 'select': true},
{'title': '60天', 'select': true},
{'title': '120天', 'select': true},
], true, grayBack: true)),
VEmptyView(30),
_textWidget('时间内预订次数', MyColours.color_333333, FontWeight.normal, 24),
VEmptyView(30),
/**
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Material(
child: Container(
height: ScreenUtil().setWidth(50),
width: ScreenUtil().setWidth(130),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(30)),
color: Color.fromRGBO(239, 239, 239, 1)),
child: _buttonChoose(dropValue, (value) {
state(() {
showDrop = !showDrop;
_scrollCrl.jumpTo(_scrollCrl.position.maxScrollExtent);
});
// _scrollCrl.position
// .didUpdateScrollPositionBy(2); //这里触发更新滚动条
}))),
VEmptyView(10),
Material(
child: Offstage(
offstage: showDrop,
child: _selectWidget(timeTilte, (index) {
print(timeTilte[index]);
state(() {
showDrop = !showDrop;
// _provider.currentIndex = index;
dropValue = timeTilte[index];
});
}),
)),
]),
VEmptyView(50),
*/
Row(children: [
Material(
child: Container(
height: ScreenUtil().setWidth(50),
// width: ScreenUtil().setWidth(100),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(30)),
color: Color.fromRGBO(239, 239, 239, 1)),
child: DropdownButton(
underline: SizedBox(),
value: dropValue,
isDense: true,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28)),
focusColor: MyColours.color_199095,
items: _dropdownMenuItem(),
icon: Row(
children: [
HEmptyView(10),
Image.asset(
Utils.getImgPath('c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
onChanged: (value) {
print(value);
state(() => dropValue = value);
}))),
HEmptyView(20),
Container(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(20),
// ),
width: ScreenUtil().setWidth(160),
height: ScreenUtil().setWidth(50),
// alignment: Alignment.center,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(180, 180, 180, 1),
width: ScreenUtil().setWidth(2))),
),
child: Material(
color: MyColours.color_ffffff,
child: TextField(
maxLines: 1,
controller: customerProvider.controller,
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
// hintText: "xxx",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(26),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
)),
HEmptyView(20),
_textWidget('次预订', MyColours.color_333333, FontWeight.normal, 24),
]),
VEmptyView(30),
],
);
}
_buttonChoose(String title, ClickCallback callback) {
return InkWell(
onTap: () {
callback(title);
},
child: Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(10)),
height: ScreenUtil().setWidth(60),
decoration: BoxDecoration(
// border: Border.all(
// width: ScreenUtil().setWidth(2),
// color: MyColours.color_199095),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),
child: Row(
children: [
Text(
title,
style: TextStyle(
color: title == '时间(选填)' || title == '(选填)'
? MyColours.color_999999
: MyColours.color_199095,
fontSize: ScreenUtil().setWidth(28)),
),
HEmptyView(10),
Image.asset(
Utils.getImgPath('enter_order_arrow'),
width: ScreenUtil().setWidth(20),
height: ScreenUtil().setWidth(10),
)
],
)));
}
/// 高级筛选输入框
Widget _textFeildWidget() {
return Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
),
height: ScreenUtil().setWidth(50),
// alignment: Alignment.center,
decoration: BoxDecoration(
color: Color.fromRGBO(239, 239, 239, 1),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),
child: Material(
color: Color.fromRGBO(239, 239, 239, 1),
child: Row(children: [
Expanded(
child: TextField(
maxLines: 1,
controller: customerProvider.controller,
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "xxx",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(26),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
),
_textWidget('天', MyColours.color_333333, FontWeight.normal, 24),
])));
}
///筛选布局
Widget _filterWidget(
StateSetter state,
VoidCallback onPressedReset,
VoidCallback onPressedComplete,
) {
return Container(
padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(30),
),
// height: ScreenUtil().setWidth(100),
margin: EdgeInsets.only(
top: ScreenUtil().setWidth(92 + 52 + 30 * 3 + 90) +
ScreenUtil.statusBarHeight),
color: Color.fromRGBO(00, 00, 00, 0.49),
child: Align(
alignment: Alignment.topCenter,
child: Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(ScreenUtil().setWidth(20)),
bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))),
margin: EdgeInsets.only(
left: ScreenUtil().setWidth(40),
bottom: ScreenUtil().setWidth(140),
right: ScreenUtil().setWidth(40)),
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)),
child: Column(
children: [
Expanded(
child: Scrollbar(
isAlwaysShown: true, //设置滚动条常亮
controller: _scrollCrl, //必须设置一个controller
///添加进度条
child: SingleChildScrollView(
controller: _scrollCrl,
// primary: true,
// reverse: true,
// physics: BouncingScrollPhysics(),
// padding: EdgeInsets.only(
// bottom:
// MediaQuery.of(context).viewInsets.bottom),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
VEmptyView(20),
_managerWidget(),
VEmptyView(30),
_activityWidget(),
VEmptyView(30),
_labelWidget(),
VEmptyView(30),
_advancedFilterWidget(state)
],
),
))),
Row(
children: [
Container(
width: ScreenUtil.screenWidthDp -
ScreenUtil().setWidth(40 * 4),
height: ScreenUtil().setWidth(100),
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(40)),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: MyColours.color_E0E0E0,
blurRadius: ScreenUtil().setWidth(14))
],
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(20),
)),
child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
flex: 1,
child: Material(
child: InkWell(
onTap: onPressedReset,
child: Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(
ScreenUtil().setWidth(20)),
topLeft: Radius.circular(
ScreenUtil().setWidth(20)),
)),
child: Align(
alignment: Alignment.center,
child: _textWidget(
'重置',
MyColours.color_333333,
FontWeight.normal,
30),
),
),
))),
Expanded(
flex: 1,
child: Material(
child: InkWell(
onTap: onPressedComplete,
child: Container(
decoration: BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.only(
topRight: Radius.circular(
ScreenUtil().setWidth(20)),
bottomRight: Radius.circular(
ScreenUtil().setWidth(20)),
)),
child: Align(
alignment: Alignment.center,
child: _textWidget(
'确定',
MyColours.color_ffffff,
FontWeight.normal,
30),
),
),
)))
],
),
),
],
),
VEmptyView(30)
],
),
)));
}
//构建筛选按钮
List<Widget> _buildFilterItem(List<Map> data, bool round,
{bool grayBack = false}) {
List<Widget> items = [];
for (Map item in data) {
items.add(Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(6)),
decoration: BoxDecoration(
color: grayBack
? Color.fromRGBO(239, 239, 239, 1)
: item['select']
? MyColours.color_199095
: MyColours.color_ffffff,
border: Border.all(
color: grayBack
? Color.fromRGBO(239, 239, 239, 1)
: item['select']
? MyColours.color_199095
: round
? Color.fromRGBO(155, 155, 155, 1)
: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(round ? 30 : 10))),
child: _textWidget(
item['title'],
grayBack
? MyColours.color_333333
: item['select']
? MyColours.color_ffffff
: round
? MyColours.color_333333
: MyColours.color_199095,
FontWeight.normal,
24)));
}
return items;
}
@override
Widget build(BuildContext context) {
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
customerMakingProvider =
Provider.of<CustomerMakingProvider>(context, listen: true);
return Material(
child: InkWell(
onTap: () {
// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
},
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'客户',
onTap: () {
Navigator.of(context).pop();
},
),
body: Consumer<CustomerProvider>(builder: (context, model, _) {
if (model.pageStateListShow != PageState.Success) {
return ExceptionPage(
pageState: model.pageStateListShow,
callback: () {
model.pageStateListShow = PageState.Loading;
model.notifyListeners();
_getSellerGuestByGid();
},
emptyMsg: "暂时没有客户哦",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
} else {
return ContactListPage(
contacts: customerProvider.selectCustomerSeller,
provider: customerProvider,
fromPage: FromPage.FromPageShowCutomerList);
}
}),
),
));
}
}
... ...
... ... @@ -39,6 +39,7 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
});
bus.on("refresh_store_customer_home", (arg) {
_getMarketingBySeller();
_getSellerGuestManage();
});
}
... ...
import 'dart:convert';
import 'package:azlistview/azlistview.dart';
import 'package:flutter/material.dart';
import 'package:lpinyin/lpinyin.dart';
... ... @@ -9,6 +11,7 @@ import 'package:one_key/models/customer_by_seller_model.dart';
import 'package:one_key/models/customer_label_model.dart';
import 'package:one_key/models/customer_list_model.dart';
import 'package:one_key/models/filter_btn_model.dart';
import 'package:one_key/models/get_seller_user_by_sellerid_model.dart';
import 'package:one_key/models/guest_info_model.dart';
import 'package:one_key/models/guest_manage_model.dart';
import 'package:one_key/models/guest_reserve_model.dart';
... ... @@ -65,9 +68,12 @@ class CustomerProvider extends ChangeNotifier {
MarketingByIdSunModel marketingByIdSunModel;
List<CustomerLabelSunModel> labelList = []; //标签数据
List<FilterBtnModel> sellerManageList = []; //经理数据 ---- 商家编辑页面
int labelSelIndex;
int manageSelIndex;
MarketingByUidsSunModel myRecordData; //我的营销记录数据(包含详情)
PageState pageStateListShow = PageState.Loading;
... ... @@ -359,39 +365,6 @@ class CustomerProvider extends ChangeNotifier {
// userHistorys[i] = item;
// }
// userHistorysShow = userHistorys; //全部客户列表信息
// userHistorysShowHuoyue = [];
// userHistorysShowChenshui = [];
// userHistorysShowLiushi = [];
// for (CustomerListSunModel item in userHistorysShow) {
// if (item.attr == '活跃') {
// userHistorysShowHuoyue.add(item);
// } else if (item.attr == '沉睡') {
// userHistorysShowChenshui.add(item);
// } else if (item.attr == '流失') {
// userHistorysShowLiushi.add(item);
// }
// }
// if (userHistorysShowHuoyue.length > 0) {
// pageStateHuoyue = PageState.Success;
// } else {
// pageStateHuoyue = PageState.Empty;
// }
// if (userHistorysShowChenshui.length > 0) {
// pageStateChenshui = PageState.Success;
// } else {
// pageStateChenshui = PageState.Empty;
// }
// if (userHistorysShowLiushi.length > 0) {
// pageStateLiushi = PageState.Success;
// } else {
// pageStateLiushi = PageState.Empty;
// }
// addAll();
// pageState = PageState.Success;
// }
// notifyListeners();
// }
}
//客户经理营销中的用户列表
... ... @@ -450,7 +423,7 @@ class CustomerProvider extends ChangeNotifier {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
pageStateGuestInfo = PageState.ConnectivityTimeOut;
pageStateListShow = PageState.ConnectivityTimeOut;
}
notifyListeners();
}
... ... @@ -528,6 +501,33 @@ class CustomerProvider extends ChangeNotifier {
}
notifyListeners();
}
//删除纪念日
Future<bool> delGuestCday(BuildContext context, Map<String, String> params,
{bool showLoading = false}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.del_guest_cday,
data: params, showLoading: showLoading)
.catchError((error) {
print(error.toString());
if (error is MyError) {}
notifyListeners();
});
if (baseResp != null && baseResp.code == Constant.status_success) {
// guestReserveSunModel =
// GuestReserveModel.fromJson(baseResp.responseData).data;
if (baseResp.responseData['data'] == 1 ||
baseResp.responseData['data'] == 0) {
return true;
}
return false;
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
return false;
}
}
// //获取历史录入
// getUserHistorys(BuildContext context, Map<String, String> params) async {
// BaseResp<List> baseResp = await DioUtil()
... ... @@ -650,6 +650,42 @@ class CustomerProvider extends ChangeNotifier {
notifyListeners();
}
///催促未完成任务经理发消息
Future<bool> sendMarketingMsgByMid(
BuildContext context, Map<String, String> params,
{bool showLoading = false}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(
context, Method.get, HttpUrl.send_marketing_msg_by_mid,
data: params, showLoading: showLoading)
.catchError((error) {
print(error.toString());
if (error is MyError) {}
notifyListeners();
});
if (baseResp != null && baseResp.code == Constant.status_success) {
// guestReserveSunModel =
// GuestReserveModel.fromJson(baseResp.responseData).data;
if (baseResp.responseData['data'] != null &&
baseResp.responseData['data'].length == 1) {
String url = baseResp.responseData['data'][0];
Map map = json.decode(url);
print(map);
String pushId = map['push_id'];
if (pushId.length > 0) {
return true;
}
return false;
}
return false;
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
return false;
}
}
//修改客户信息
Future<bool> setGuestInfo(BuildContext context, Map<String, String> params,
{bool showLoading = false}) async {
... ... @@ -677,6 +713,35 @@ class CustomerProvider extends ChangeNotifier {
}
}
//修改完成任务后的状态
Future<bool> setMarketingStatusByUid(
BuildContext context, Map<String, String> params,
{bool showLoading = false}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(
context, Method.get, HttpUrl.set_marketing_status_by_uid,
data: params, showLoading: showLoading)
.catchError((error) {
print(error.toString());
if (error is MyError) {}
notifyListeners();
});
if (baseResp != null && baseResp.code == Constant.status_success) {
// guestReserveSunModel =
// GuestReserveModel.fromJson(baseResp.responseData).data;
// if (baseResp.responseData['data']. == 1 ||
// baseResp.responseData['data'] == 0) {
// return true;
// }
return true;
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
return false;
}
}
//修改客户信息纪念日
Future<bool> setGuestInfocDay(
BuildContext context, Map<String, String> params,
... ... @@ -1072,7 +1137,7 @@ class CustomerProvider extends ChangeNotifier {
return storeSunmodel;
}
//商家营销中的用户列表
//商家---营销中的用户列表
getSellerGuestByGid(BuildContext context, Map<String, String> params) async {
BaseResp<List> baseResp = await DioUtil()
.request<List>(context, Method.get, HttpUrl.get_guest_by_gid,
... ... @@ -1096,10 +1161,18 @@ class CustomerProvider extends ChangeNotifier {
});
if (baseResp != null && baseResp.code == Constant.status_success) {
List<CustomerBySellerSunModel> user =
baseResp.data.map<CustomerBySellerSunModel>((value) {
return CustomerBySellerSunModel.fromJson(value);
List<CustomerListSunModel> data =
baseResp.data.map<CustomerListSunModel>((value) {
return CustomerListSunModel.fromJson(value);
}).toList();
List<CustomerBySellerSunModel> user = data.map((value) {
print(json.encode(value));
return CustomerBySellerSunModel.fromJson(
json.decode(json.encode(value)));
}).toList();
// for (int i = 0; i < user.length;i++){
// }
if (user.length == 0) {
pageStateListShow = PageState.Empty;
} else {
... ... @@ -1128,20 +1201,58 @@ class CustomerProvider extends ChangeNotifier {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
pageStateGuestInfo = PageState.ConnectivityTimeOut;
pageStateListShow = PageState.ConnectivityTimeOut;
}
notifyListeners();
}
///商家详情编辑页面 ------ 获取经理数据
Future<List<FilterBtnModel>> getSellerUserBySellerid(BuildContext context,
{isShowLoading = true}) async {
Map<String, String> params = {
'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid
};
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(
context, Method.get, HttpUrl.get_seller_user_by_sellerid,
data: params, showLoading: false)
.catchError((error) {
print(error.toString());
if (error is MyError) {}
});
if (baseResp.code == Constant.status_success) {
List<GetSellerUserBySelleridSunModel> sunmodel =
GetSellerUserBySelleridModel.fromJson(baseResp.responseData).data;
sellerManageList = [];
if (sunmodel != null && sunmodel.length > 0) {
for (GetSellerUserBySelleridSunModel item in sunmodel) {
if (item.nickName != null) {
FilterBtnModel model = FilterBtnModel();
model.id = item.id;
model.title = item.nickName;
sellerManageList.add(model);
}
}
}
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
}
return sellerManageList;
}
//全选按钮执行“全选”
addAll() async {
//把数据状态全部改成true,即选中状态
selectCustomerSeller = [];
for (var i = 0; i < customerBySellerList.length; i++) {
customerBySellerList[i].select = true;
selectCustomerSeller.add(customerBySellerList[i]);
if (customerBySellerList[i].gid != null) {
customerBySellerList[i].select = true;
selectCustomerSeller.add(customerBySellerList[i]);
}
}
checkValue = true;
getCheckValue();
labelsValue();
notifyListeners();
}
... ... @@ -1187,7 +1298,7 @@ class CustomerProvider extends ChangeNotifier {
//未选中
cancelData(int index) {
userHistorys[index].select = false;
// userHistorys[index].select = false;
selectCustomerSeller.removeWhere(
(element) => element.gid == customerBySellerList[index].gid);
labelsValue();
... ...
... ... @@ -548,7 +548,7 @@ class NavigatorUtil {
replace: replace);
}
/// 仅展示客情列表
/// 仅展示客情列表 --- 商家
static Future<dynamic> goShowCustomerListPage(
BuildContext context, FromPage fromPage, String gid,
{replace = false, bool needBtn = false}) {
... ... @@ -557,6 +557,15 @@ class NavigatorUtil {
replace: replace);
}
/// 仅展示客情列表 --- 我的
static Future<dynamic> goMyShowCustomerListPage(
BuildContext context, FromPage fromPage, String gid,
{replace = false, bool needBtn = false}) {
return _navigateTo(context,
"${Routes.my_show_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&gid=$gid",
replace: replace);
}
/// 客情设置
static Future<dynamic> goCustomerSetPage(BuildContext context,
{replace = false}) {
... ... @@ -598,12 +607,11 @@ class NavigatorUtil {
static Future<dynamic> goCustomerDetailPage(
BuildContext context,
CustomerBySellerSunModel userHistoryEntity,
FromPage fromPage,
String nickName, {
FromPage fromPage, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.customer_detail_page}?userHistoryEntity=${FluroConvertUtils.object2string(userHistoryEntity)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&nickName=${Uri.encodeComponent(nickName)}",
"${Routes.customer_detail_page}?userHistoryEntity=${FluroConvertUtils.object2string(userHistoryEntity)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
... ...
... ... @@ -58,7 +58,8 @@ import 'package:one_key/pages/my/customer_type/my_customer/my_make_marking_page_
import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_detail_page.dart';
import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_detail_page_seller.dart';
import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_page.dart';
import 'package:one_key/pages/my/customer_type/show_customer_list_page.dart';
import 'package:one_key/pages/my/customer_type/my_customer/my_show_customer_list_page.dart';
import 'package:one_key/pages/my/customer_type/store_customer/show_customer_list_page.dart';
import 'package:one_key/pages/my/customer_type/store_customer/customer_detail_edit_page.dart';
import 'package:one_key/pages/my/customer_type/store_customer/customer_detail_page.dart';
... ... @@ -884,7 +885,7 @@ var customerListPageHandle = new Handler(
child: CustomerListPage(fromPage: fromPage, index: index, uidStr: uid));
});
///仅供展示的客情列表
///仅供展示的客情列表 ---商家
var showCustomerListPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
FromPage fromPage = FluroConvertUtils.enumFromString<FromPage>(
... ... @@ -897,6 +898,19 @@ var showCustomerListPageHandle = new Handler(
child: ShowCustomerListPage(fromPage: fromPage, gid: gid));
});
///仅供展示的客情列表 --- 我的
var myShowCustomerListPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
FromPage fromPage = FluroConvertUtils.enumFromString<FromPage>(
FromPage.values, params["fromPage"].first);
print(fromPage);
String gid = params["gid"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyShowCustomerListPage(fromPage: fromPage, gid: gid));
});
///我的客情列表
var myCustomerListPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
... ... @@ -1041,13 +1055,12 @@ var customerDetailPageHandle = new Handler(
FromPage.values, params["fromPage"].first);
print(fromPage);
String nickName = params["nickName"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: CustomerDetailPage(
userHistoryEntity: userHistoryEntity,
fromPage: fromPage,
nickName: nickName));
userHistoryEntity: userHistoryEntity,
fromPage: fromPage,
));
});
///我的客户详情
... ... @@ -1078,10 +1091,7 @@ var customerDetailEditPageHandle = new Handler(
FromPage.values, params["fromPage"].first);
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: CustomerDetailEditPage(
guest: guest,
fromPage: fromPage,
));
child: CustomerDetailEditPage(guest: guest, fromPage: fromPage));
});
///我的编辑客户详情
... ...
... ... @@ -94,11 +94,14 @@ class Routes {
static String my_festival_edit_page = "/my_festival_edit_page"; //编辑纪念日
static String my_customer_order_page = "/my_customer_order_page"; //客户订单
static String show_customer_list_page = "/show_customer_list_page"; //仅展示的客户列表
static String show_customer_list_page = "/show_customer_list_page"; //仅展示的客户列表 --- 商家
static String seller_my_marketing_records_detail_page =
"/seller_my_marketing_records_detail_page"; //我的客情---营销详情----全店任务详情
static String my_make_marketing_page_only_show = "/my_make_marketing_page_only_show"; //我的--完成全店营销
static String my_make_marketing_page_only_show =
"/my_make_marketing_page_only_show"; //我的--完成全店营销
static String my_show_customer_list_page =
"/my_show_customer_list_page"; //仅展示的客户列表----我的
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
... ... @@ -202,8 +205,9 @@ class Routes {
router.define(show_customer_list_page, handler: showCustomerListPageHandle);
router.define(seller_my_marketing_records_detail_page,
handler: sellerMyMarketingRecordsDetailPageHandle);
router.define(my_make_marketing_page_only_show,
router.define(my_make_marketing_page_only_show,
handler: myMakeMarkingPageOnlyShowHandle);
router.define(my_show_customer_list_page,
handler: myShowCustomerListPageHandle);
}
}
... ...
... ... @@ -2346,6 +2346,7 @@ class DialogUtil {
static Future festivalAlertDialog(
BuildContext context, String name, double height,
{CustomCallBack rCallback,
GestureTapCallback delCallback,
double fontSize = 28,
String yearStr = '选填',
String monthStr = '',
... ... @@ -2393,12 +2394,20 @@ class DialogUtil {
),
Positioned(
right: 0,
top: ScreenUtil().setWidth(36),
child: Text('删除',
style: TextStyle(
decoration: TextDecoration.underline,
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095)))
top: 0,
child: InkWell(
onTap: delCallback,
child: Padding(
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(36)),
child: Text('删除',
style: TextStyle(
decoration:
TextDecoration.underline,
fontSize:
ScreenUtil().setSp(26),
color: MyColours.color_199095)),
)))
]),
Container(
... ...