Commit eeaa715f722ade74e7daba5c83530155f6af0d26

Authored by gaiyaguang
2 parents e6d769df 3c9b5a41

冲突解决

... ... @@ -404,7 +404,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 116;
CURRENT_PROJECT_VERSION = 121;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -417,7 +417,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.6;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -546,7 +546,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 116;
CURRENT_PROJECT_VERSION = 121;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -559,7 +559,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.6;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -579,7 +579,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 116;
CURRENT_PROJECT_VERSION = 121;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -592,7 +592,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.6;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -21,8 +21,6 @@ import Flutter
}
}
GeneratedPluginRegistrant.register(with: self)
// NSDictionary * userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];//获取
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
... ...
... ... @@ -22,11 +22,10 @@ import 'package:provider/provider.dart';
import 'package:one_key/utils/event_bus.dart';
class HandleOnlinePage extends StatefulWidget {
final String rid;
final String mid;
final bool fromNotify;
HandleOnlinePage(this.rid, this.mid, {this.fromNotify=false});
HandleOnlinePage(this.rid, this.mid, {this.fromNotify = false});
@override
State<StatefulWidget> createState() {
... ... @@ -61,8 +60,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
if (detailEntity.status != "0") {
//已处理
Future.delayed(Duration(milliseconds: 200), () {
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,fromNotify: widget.fromNotify,
replace: true);
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,
fromNotify: widget.fromNotify, replace: true);
});
setMessageStatus();
} else {
... ... @@ -132,7 +131,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
}
//处理在线预订
setReserveStatus(String status, {String tid = ""}) {
setReserveStatus(String status, {String tid = ""}) async {
bus.emit("remove_untreated_message", widget.mid);
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> causeMap = {
... ... @@ -147,7 +146,11 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"mid": widget.mid,
"cause": json.encode(causeMap)
};
detailModel.setReserveStatus(context, params,showLoading: true);
bool success =
await detailModel.setReserveStatus(context, params, showLoading: true);
if (success) {
bus.emit("refresh_book_list");
}
}
//处理在线预订
... ... @@ -165,241 +168,246 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
Widget build(BuildContext context) {
// TODO: implement build
return SafeArea(
child: WillPopScope(
child: detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
: Column(
children: <Widget>[
MyAppBar(
"在线预订详情",
showBack: true,
callback: (){
if(widget.fromNotify){
NavigatorUtil.goHomePage(context,initialIndex: 0);
}else{
Navigator.of(context).pop();
}
},
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
Expanded(
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
child: WillPopScope(
child: detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
: Column(
children: <Widget>[
MyAppBar(
"在线预订详情",
showBack: true,
callback: () {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
} else {
Navigator.of(context).pop();
}
},
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
Expanded(
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
Column(
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
Offstage(
offstage:
detailEntity.type == "0"
? false
: true,
child: RowMultiText("用餐人数",
detailEntity.pnum),
Column(
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
Offstage(
offstage:
detailEntity.type == "0"
? false
: true,
child: RowMultiText("用餐人数",
detailEntity.pnum),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width:
ScreenUtil().setWidth(100),
height:
ScreenUtil().setWidth(30),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(30),
)
],
),
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage:
detailEntity.demands.length >
0
? false
: true,
child: Container(
height:
ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
)),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone),
RowMultiText(
"备注信息", detailEntity.cusdem ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(
manager.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list,(value){
if(value!=null){
setState(() {
cusmanText = managers[
value.first]
.userName;
});
_setCurrManager();
}
})
.then((value) {
});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration: TextDecoration
.underline,
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity
.demands.length >
0
? false
: true,
child: Container(
height: ScreenUtil()
.setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(
detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
),
)
],
),
),
],
)),
),
),
Container(
margin: EdgeInsets.only(
top: ScreenUtil().setHeight(30),
bottom: ScreenUtil().setHeight(30)),
child: Column(
children: <Widget>[
CommonButton(
content: "安排包间",
width: 669,
height: 76,
fontSize: 34,
onPress: () async {
Map map = await NavigatorUtil
.goSelectTablePage(
context,
widget.rid,
int.parse(detailEntity.ddate) *
1000,
detailEntity.ddate_solt);
if (map['tid'] != null) {
setReserveStatus("5", tid: map['tid']);
}
},
)),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone),
RowMultiText("备注信息",
detailEntity.cusdem ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(manager
.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list,
(value) {
if (value != null) {
setState(() {
cusmanText =
managers[value
.first]
.userName;
});
_setCurrManager();
}
}).then((value) {});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration:
TextDecoration
.underline,
),
),
),
)
],
),
),
],
)),
),
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
),
Container(
margin: EdgeInsets.only(
top: ScreenUtil().setHeight(30),
bottom: ScreenUtil().setHeight(30)),
child: Column(
children: <Widget>[
CommonButton(
content: "安排包间",
width: 669,
height: 76,
fontSize: 34,
onPress: () async {
Map map = await NavigatorUtil
.goSelectTablePage(
context,
widget.rid,
int.parse(detailEntity.ddate) *
1000,
detailEntity.ddate_solt);
if (map['tid'] != null) {
setReserveStatus("5",
tid: map['tid']);
}
},
),
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"拒绝订单",
style: TextStyle(
color:
MyColours.color_199095,
MyColours.color_199095,
fontSize:
ScreenUtil().setSp(34)),
ScreenUtil().setSp(34)),
),
),
onTap: () {
_showRefuseDialog();
},
)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
),
Expanded(
child: GestureDetector(
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
),
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"联系顾客",
style: TextStyle(
color:
MyColours.color_199095,
MyColours.color_199095,
fontSize:
ScreenUtil().setSp(34)),
ScreenUtil().setSp(34)),
),
),
onTap: () {
... ... @@ -413,26 +421,25 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
}
},
)),
],
),
)
],
),
)
],
))),
)
],
),
onWillPop: ()async{
if(widget.fromNotify){
NavigatorUtil.goHomePage(context,initialIndex: 0);
return true;
}
Navigator.of(context).pop();
],
),
)
],
),
)
],
))),
)
],
),
onWillPop: () async {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
return true;
},
)
);
}
Navigator.of(context).pop();
return true;
},
));
}
}
... ...
... ... @@ -103,6 +103,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
@override
void dispose() {
super.dispose();
bus.off("refresh_detail");
}
... ... @@ -161,8 +162,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
"cause": json.encode(causeMap)
};
bool success =
await detailModel.setReserveStatus(context, params, ifPush: false);
await detailModel.setReserveStatus(context, params, ifPush: false);
if (success) {
bus.emit("refresh_book_list");
_getReserveDetail();
}
}
... ... @@ -188,7 +190,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
context: context,
barrierDismissible: false,
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel,
MaterialLocalizations.of(context).modalBarrierDismissLabel,
transitionDuration: const Duration(milliseconds: 150),
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
... ... @@ -215,7 +217,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(10)),
BorderRadius.circular(ScreenUtil().setWidth(10)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
... ... @@ -295,7 +297,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
Text(value['title'],
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
ScreenUtil().setSp(32),
fontWeight: FontWeight.normal,
decoration: TextDecoration.none,
color: MyColours.color_333333))
... ... @@ -303,42 +305,42 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
),
value['title'] == '其他原因' && isShowTF
? Material(
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
left:
ScreenUtil().setWidth(76)),
child: TextField(
maxLines: 1,
controller: _cancelController,
focusNode: _cancelNode,
textAlignVertical:
TextAlignVertical.bottom,
decoration: InputDecoration(
hintText: "请填写原因",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize:
ScreenUtil().setSp(30),
),
enabledBorder:
UnderlineInputBorder(
borderSide: BorderSide(
color: MyColours
.color_d8d8d8),
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
left:
ScreenUtil().setWidth(76)),
child: TextField(
maxLines: 1,
controller: _cancelController,
focusNode: _cancelNode,
textAlignVertical:
TextAlignVertical.bottom,
decoration: InputDecoration(
hintText: "请填写原因",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize:
ScreenUtil().setSp(30),
),
enabledBorder:
UnderlineInputBorder(
borderSide: BorderSide(
color: MyColours
.color_d8d8d8),
),
// border: InputBorder.none,
),
// border: InputBorder.none,
onChanged: (_) {
setState(() {});
},
onEditingComplete: () {
print('fff');
_cancelNode.unfocus();
},
// keyboardType: TextInputType.number,
),
onChanged: (_) {
setState(() {});
},
onEditingComplete: () {
print('fff');
_cancelNode.unfocus();
},
// keyboardType: TextInputType.number,
),
))
))
: Container(),
VEmptyView(40)
]),
... ... @@ -371,8 +373,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
Navigator.of(context).pop();
Loading.showLoading(context);
setReserveStatus('4', desc: desc);
bus.emit("refresh_book_list");
},
text: '确认',
height: ScreenUtil().setWidth(80),
... ... @@ -397,321 +399,334 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
return WillPopScope(
child: detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
SizedBox(height: ScreenUtil.statusBarHeight),
MyAppBar(
"订座详情",
showBack: true,
callback: (){
if(widget.fromNotify){
NavigatorUtil.goHomePage(context,initialIndex: 0);
}else{
Navigator.of(context).pop();
}
},
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
SizedBox(height: ScreenUtil.statusBarHeight),
MyAppBar(
"订座详情",
showBack: true,
callback: () {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
} else {
Navigator.of(context).pop();
}
},
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText("用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
Column(
children: <Widget>[
RowMultiText(
"用餐时间", detailEntity.ddateHm),
Offstage(
offstage: detailEntity.type == "0"
? false
: true,
child: RowMultiText(
"用餐人数", detailEntity.pnum),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(30),
)
],
),
Offstage(
offstage: detailEntity.demands.length <= 0
? true
: false,
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText("用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
Column(
children: <Widget>[
RowMultiText(
"用餐时间", detailEntity.ddateHm),
Offstage(
offstage: detailEntity.type == "0"
? false
: true,
child: RowMultiText(
"用餐人数", detailEntity.pnum),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(30),
)
],
),
Offstage(
offstage: detailEntity.demands.length <= 0
? true
: false,
child: Column(
children: <Widget>[
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity
.demands.length >
0
? false
: true,
child: Container(
height: ScreenUtil()
.setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(
detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
))
],
),
),
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
"预订桌位",
(detailEntity.tables.length.toString() +
"个")),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage:
detailEntity.demands.length >
0
? false
: true,
detailEntity.tables.length > 0
? false
: true,
child: Container(
height:
ScreenUtil().setHeight(210),
height: ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
itemBuilder: (BuildContext contxt,
int index) {
return NeedItem(detailEntity
.demands[index]);
return TableItem(
detailEntity.tables[index]);
},
itemCount: detailEntity
.demands.length,
itemCount:
detailEntity.tables.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
scrollDirection: Axis.horizontal,
),
),
))
],
),
),
RowMultiText(
"预订桌位",
(detailEntity.tables.length.toString() +
"个")),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity.tables.length > 0
? false
: true,
child: Container(
height: ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder: (BuildContext contxt,
int index) {
return TableItem(
detailEntity.tables[index]);
},
itemCount:
detailEntity.tables.length,
shrinkWrap: true,
scrollDirection: Axis.horizontal,
),
)),
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone ?? ""),
Offstage(
offstage: detailEntity.cusdem == '' ||
detailEntity.cusdem == null,
child: RowMultiText(
"备注信息", detailEntity.cusdem ?? ""),
),
)),
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours.color_828282,
fontSize:
ScreenUtil().setSp(30)),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours.color_828282,
fontSize:
ScreenUtil().setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(
manager.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list, (value) {
if (value != null) {
setState(() {
cusmanText =
managers[value.first]
.userName;
});
_setCurrManager();
}
}).then((value) {});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours.color_353535,
fontSize:
ScreenUtil().setSp(30),
decoration:
TextDecoration.underline,
),
),
),
)
],
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(manager.roleUserName);
}
DialogUtil.showSelectCusmanDialog(
context, list, (value) {
if (value != null) {
setState(() {
cusmanText =
managers[value.first]
.userName;
});
_setCurrManager();
}
}).then((value) {});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours.color_353535,
fontSize:
ScreenUtil().setSp(30),
decoration:
TextDecoration.underline,
),
),
Offstage(
offstage: detailEntity.note_name == '' ||
detailEntity.note_name == null,
child: RowMultiText(
"记录人", detailEntity.note_name ?? ""),
),
Offstage(
offstage: (detailEntity.status == "4" &&
detailEntity.cancel != null)
? false
: true,
child: Column(
children: <Widget>[
MyDivider(double.infinity,
ScreenUtil().setHeight(2)),
RowMultiText("取消原因",
detailEntity.cancel?.desc ?? "",
textAlign: TextAlign.left),
RowMultiText(
"取消时间",
detailEntity.cancel?.cdateStr ??
""),
RowMultiText(
"操作人",
detailEntity.abolition == '2'
? '顾客在线取消'
: detailEntity
.cancel?.uname ??
""),
],
),
)
],
),
),
Offstage(
offstage: detailEntity.note_name == '',
child: RowMultiText(
"记录人", detailEntity.note_name ?? ""),
),
Offstage(
offstage: (detailEntity.status == "4" &&
detailEntity.cancel != null)
? false
: true,
child: Column(
children: <Widget>[
MyDivider(double.infinity,
ScreenUtil().setHeight(2)),
RowMultiText("取消原因",
detailEntity.cancel?.desc ?? "",
textAlign: TextAlign.left),
RowMultiText(
"取消时间",
detailEntity.cancel?.cdateStr ??
""),
RowMultiText(
"操作人",
detailEntity.abolition == '2'
? '顾客在线取消'
: detailEntity.cancel?.uname ??
""),
),
],
),
),
],
)),
)),
),
)),
),
Offstage(
offstage: (detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: MyColours.color_ffffff,
border: Border(
top: BorderSide(
color: MyColours.color_dbe3e3,
width: ScreenUtil().setWidth(1)))),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20)),
child: CommonButton(
content: "通知客户",
width: 669,
height: 80,
fontSize: 34,
onPress: () {
DialogUtil.showShareDialog(context)?.then((value) {
switch (value) {
case 1: //微信
NavigatorUtil.goInvicationPage(
context,
detailEntity.id,
detailEntity.tableinfoStr,
detailEntity.ddate,
detailEntity.ddateStr);
break;
case 2: //短信
NavigatorUtil.goSmsPage(
context, detailEntity.id);
break;
case 3: //电话
if (detailEntity.phone != null &&
detailEntity.phone.isNotEmpty) {
Utils.goPhone(detailEntity.phone);
} else {
Utils.showToast("没有客户电话!");
}
break;
}
});
},
),
),
)),
),
Offstage(
offstage: (detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: MyColours.color_ffffff,
border: Border(
top: BorderSide(
color: MyColours.color_dbe3e3,
width: ScreenUtil().setWidth(1)))),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20)),
child: CommonButton(
content: "通知客户",
width: 669,
height: 80,
fontSize: 34,
onPress: () {
DialogUtil.showShareDialog(context)?.then((value) {
switch (value) {
case 1: //微信
NavigatorUtil.goInvicationPage(
context,
detailEntity.id,
detailEntity.tableinfoStr,
detailEntity.ddate,
detailEntity.ddateStr);
break;
case 2: //短信
NavigatorUtil.goSmsPage(context, detailEntity.id);
break;
case 3: //电话
if (detailEntity.phone != null &&
detailEntity.phone.isNotEmpty) {
Utils.goPhone(detailEntity.phone);
} else {
Utils.showToast("没有客户电话!");
}
break;
}
});
},
),
),
),
Offstage(
offstage: (detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(80),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(5)),
),
// child: Text('fff'),
child: Material(
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
_showCancelWidget(context);
}, '取消预订')),
],
)),
),
Offstage(
offstage: (detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(80),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(5)),
),
// child: Text('fff'),
child: Material(
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
_showCancelWidget(context);
}, '取消预订')),
],
)),
),
),
VEmptyView(ScreenUtil().setWidth(60))
],
),
),
VEmptyView(ScreenUtil().setWidth(60))
],
),
),
onWillPop: ()async{
if(widget.fromNotify){
NavigatorUtil.goHomePage(context,initialIndex: 0);
onWillPop: () async {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
return true;
}
Navigator.of(context).pop();
... ...
... ... @@ -18,8 +18,10 @@ import 'package:one_key/provider/update_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/log_util.dart';
import 'package:one_key/utils/misc.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
... ... @@ -239,18 +241,46 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
void didChangeAppLifecycleState(AppLifecycleState state) async {
// TODO: implement didChangeAppLifecycleState
super.didChangeAppLifecycleState(state);
switch (state) {
case AppLifecycleState.resumed: //应用前台可见
// getUntreatedMessage();
break;
case AppLifecycleState.inactive:
print('inactive');
break;
case AppLifecycleState.paused:
print('paused');
break;
case AppLifecycleState.detached:
print('detached');
break;
default:
break;
}
}
// 系统窗口相关改变回调
void didChangeMetrics() {
super.didChangeMetrics();
print('fffff');
}
// // 系统亮度改变回调
// void didChangePlatformBrightness() {
// super.didChangePlatformBrightness();
// print('fdddddd');
// }
// // 文本缩放系数改变回调
// void didChangeTextScaleFactor() {}
// // 内存不足警告回调
// void didHaveMemoryPressure() {}
@override
Widget build(BuildContext context) {
// TODO: implement build
... ...
... ... @@ -45,12 +45,13 @@ class NoteBookPageState extends State<NoteBookPage> {
userModel = Provider.of<UserModel>(context, listen: false);
_controller = EasyRefreshController();
_initTime();
bus.on("refresh_book_list", (args) {
_getReserveList();
});
WidgetsBinding.instance.addPostFrameCallback((_) {
_getReserveList();
_reserveCountDay();
bus.on("refresh_book_list", (args) {
_getReserveList();
});
});
}
... ... @@ -251,19 +252,15 @@ class NoteBookPageState extends State<NoteBookPage> {
setState(() {
DateTime dateNow = DateTime.now();
dateText =
Utils.addZeroNumber(day.month) + "-" +Utils.addZeroNumber(day.day);
Utils.addZeroNumber(day.month) + "-" + Utils.addZeroNumber(day.day);
if (Utils.isOneDay(day, dateNow)) {
dateText +=
" 今天";
} else if(Utils.isOneDay(day,dateNow.add(Duration(days: 1)))){
dateText +=
" 明天";
}else if(Utils.isOneDay(day,dateNow.add(Duration(days: 2)))){
dateText +=
" 后天";
}else{
dateText +=
" 周${Utils.formatWeekDayNum(day.weekday)}";
dateText += " 今天";
} else if (Utils.isOneDay(day, dateNow.add(Duration(days: 1)))) {
dateText += " 明天";
} else if (Utils.isOneDay(day, dateNow.add(Duration(days: 2)))) {
dateText += " 后天";
} else {
dateText += " 周${Utils.formatWeekDayNum(day.weekday)}";
}
dateTime = day;
});
... ...
... ... @@ -62,7 +62,7 @@ class NotebookDetailModel extends ChangeNotifier {
//安排在线预订
setReserveStatus(BuildContext context, Map<String, String> params,
{ifPush = true,showLoading=false}) async {
{ifPush = true, showLoading = false}) async {
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(
context, Method.get, HttpUrl.set_reserve_status,
... ... @@ -74,9 +74,8 @@ class NotebookDetailModel extends ChangeNotifier {
if (ifPush) {
NavigatorUtil.goNotebookDetailPage(context, params["rid"],
replace: true);
} else {
return true;
}
return true;
} else {
Utils.showToast(baseResp.msg);
}
... ...
... ... @@ -15,13 +15,12 @@ import 'package:provider/provider.dart';
import 'package:table_calendar/table_calendar.dart';
class DialogUtil {
//显示消息弹框
static showMessageDialog(BuildContext context) async {
MessageDialogModel messageModel =
Provider.of<MessageDialogModel>(context, listen: false);
Provider.of<MessageDialogModel>(context, listen: false);
if (messageModel.messages.isEmpty) return null;
messageModel.showMessageDialog=true;
messageModel.showMessageDialog = true;
await showModalBottomSheet<int>(
context: context,
isScrollControlled: true,
... ... @@ -33,12 +32,14 @@ class DialogUtil {
children: <Widget>[
Consumer<MessageDialogModel>(builder: (BuildContext context,
MessageDialogModel model, Widget child) {
if(messageModel.messages.isEmpty)return Container();
if (messageModel.messages.isEmpty) return Container();
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: ScreenUtil().setWidth(21),bottom: ScreenUtil().setWidth(12)),
margin: EdgeInsets.only(
top: ScreenUtil().setWidth(21),
bottom: ScreenUtil().setWidth(12)),
width: double.infinity,
child: Stack(
alignment: Alignment.center,
... ... @@ -56,8 +57,8 @@ class DialogUtil {
Navigator.of(dialogContext).pop();
},
child: Padding(
padding:
EdgeInsets.all(ScreenUtil().setWidth(12)),
padding: EdgeInsets.all(
ScreenUtil().setWidth(12)),
child: Image.asset(
"assets/icon_close.png",
width: ScreenUtil().setWidth(28),
... ... @@ -67,70 +68,78 @@ class DialogUtil {
))
],
)),
model.messages.length>3?Container(
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(22),vertical: ScreenUtil().setWidth(11)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(16),
ScreenUtil().setWidth(76),
ScreenUtil().setWidth(16),
ScreenUtil().setWidth(41)),
decoration: BoxDecoration(
color: MyColours.color_fefefe,
borderRadius:
BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
"在线预订",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
),
Spacer(),
Text(
"刚刚",
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(22)),
),
],
),
VEmptyView(20),
Text(
"在线预订:${model.messages.length}个",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Spacer(),
CommonButton(
width: 160,
height: 48,
fontSize: 32,
content: "立即处理",
state: 1,
onPress: () {
NavigatorUtil.goHomePage(context,initialIndex: 0);
},
)
],
model.messages.length > 3
? Container(
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(22),
vertical: ScreenUtil().setWidth(11)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(16),
ScreenUtil().setWidth(76),
ScreenUtil().setWidth(16),
ScreenUtil().setWidth(41)),
decoration: BoxDecoration(
color: MyColours.color_fefefe,
borderRadius: BorderRadius.all(
Radius.circular(
ScreenUtil().setWidth(8)))),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Text(
"在线预订",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
),
Spacer(),
Text(
"刚刚",
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(22)),
),
],
),
VEmptyView(20),
Text(
"在线预订:${model.messages.length}个",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Spacer(),
CommonButton(
width: 160,
height: 48,
fontSize: 32,
content: "立即处理",
state: 1,
onPress: () {
NavigatorUtil.goHomePage(context,
initialIndex: 0);
},
)
],
)
],
),
)
],
),
):ListView.builder(
itemBuilder: (context, index) {
return MessageDialogItem(model.messages[index]);
},
itemCount: model.messages.length,
shrinkWrap: true)
: ListView.builder(
itemBuilder: (context, index) {
return MessageDialogItem(model.messages[index]);
},
itemCount: model.messages.length,
shrinkWrap: true)
],
);
})
... ... @@ -139,30 +148,42 @@ class DialogUtil {
);
return widget;
});
messageModel.showMessageDialog=false;
messageModel.showMessageDialog = false;
}
//解析返回显示的日期
static String _parseDateDay(DateTime dateTime){
DateTime now=DateTime.now();
if(Utils.isOneDay(dateTime,now)){
static String _parseDateDay(DateTime dateTime) {
DateTime now = DateTime.now();
if (Utils.isOneDay(dateTime, now)) {
return "今";
}else if(Utils.isOneDay(dateTime,now.add(Duration(days: 1)))){
} else if (Utils.isOneDay(dateTime, now.add(Duration(days: 1)))) {
return "明";
}else if(Utils.isOneDay(dateTime,now.add(Duration(days: 2)))){
} else if (Utils.isOneDay(dateTime, now.add(Duration(days: 2)))) {
return "后";
}else{
} else {
return dateTime.day.toString();
}
}
//显示日历弹框
static Future<DateTime> showCalendarDialog(BuildContext context,DateTime selectDateTime) {
static Future<DateTime> showCalendarDialog(
BuildContext context, DateTime selectDateTime) {
CalendarController _calendarController = CalendarController();
Map<DateTime, List> _events = {};
final _selectedDay = DateTime.now();
Map<DateTime, List> _events = {
_selectedDay: ['Event A7', 'Event B7', 'Event C7', 'Event D7'],
_selectedDay.add(Duration(days: 1)): [
'Event A8',
'Event B8',
'Event C8',
'Event D8'
],
_selectedDay.add(Duration(days: 2)):
Set.from(['Event A9', 'Event A9', 'Event B9']).toList(),
};
return showModalBottomSheet<DateTime>(
context: context,
isScrollControlled:true,
isScrollControlled: true,
builder: (BuildContext context) {
BuildContext dialogContext = context;
Widget widget = StatefulBuilder(builder: (context, _setState) {
... ... @@ -183,8 +204,8 @@ class DialogUtil {
locale: "zh_CN",
initialCalendarFormat: CalendarFormat.month,
headerStyle: HeaderStyle(
decoration: BoxDecoration(
color: MyColours.color_2bb5b7),
decoration:
BoxDecoration(color: MyColours.color_2bb5b7),
headerPadding: EdgeInsets.zero,
formatButtonVisible: false,
centerHeaderTitle: false,
... ... @@ -197,10 +218,10 @@ class DialogUtil {
titleTextStyle: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(30)),
leftChevronIcon:
const Icon(Icons.chevron_left, color: Colors.white),
rightChevronIcon:
const Icon(Icons.chevron_right, color: Colors.white),
leftChevronIcon: const Icon(Icons.chevron_left,
color: Colors.white),
rightChevronIcon: const Icon(Icons.chevron_right,
color: Colors.white),
),
calendarStyle: CalendarStyle(
contentPadding: const EdgeInsets.only(bottom: 4.0),
... ... @@ -218,6 +239,7 @@ class DialogUtil {
return Container(
color: MyColours.color_2bb5b7,
alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 20),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(25)),
child: Text(
... ... @@ -228,17 +250,20 @@ class DialogUtil {
),
);
},
dayBuilder: (context,date,_){
dayBuilder: (context, date, _) {
return Container(
height: 100,
decoration: BoxDecoration(
shape: BoxShape.circle,
shape: BoxShape.circle,
// color: Colors.blue,
),
alignment: Alignment.center,
margin: const EdgeInsets.all(6.0),
margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
padding: const EdgeInsets.only(
bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
child: Text(
"${_parseDateDay(date)}",
// "${_parseDateDay(date)}",
'${date.day}',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_353535),
... ... @@ -249,14 +274,14 @@ class DialogUtil {
return Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: MyColours.color_2bb5b7
),
color: MyColours.color_2bb5b7),
alignment: Alignment.center,
margin: const EdgeInsets.all(6.0),
margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
padding: const EdgeInsets.only(
bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
child: Text(
"${_parseDateDay(date)}",
// "${_parseDateDay(date)}",
'${date.day}',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_ffffff),
... ... @@ -270,29 +295,59 @@ class DialogUtil {
border: Border.all(
color: MyColours.color_2bb5b7, width: 1)),
alignment: Alignment.center,
margin: const EdgeInsets.all(6.0),
margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
padding: const EdgeInsets.only(
bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
child: Text(
'今',
// '今',
'${date.day}',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_2bb5b7),
),
);
},
singleMarkerBuilder: (context, dateTime, event) {
return Container(
width: ScreenUtil().setWidth(6),
height: ScreenUtil().setWidth(6),
margin: const EdgeInsets.symmetric(
horizontal: 0.3),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: MyColours.color_ff0000,
),
markersBuilder: (context, date, events, holidays) {
final children = <Widget>[];
// if (events.isNotEmpty) {
// children.add(
// Positioned(
// right: 1,
// bottom: 1,
// child: _buildEventsMarker(date, events),
// ),
// );
// }
// if (holidays.isNotEmpty) {
children.add(
Positioned(
right: ScreenUtil().setWidth(27),
bottom: 0,
top: 5,
child: buildMarker(date)),
// Align(
// alignment: Alignment.bottomCenter,
// child: buildMarker(date),
// )
);
// }
return children;
},
// singleMarkerBuilder: (context, dateTime, event) {
// return Container(
// width: ScreenUtil().setWidth(6),
// height: ScreenUtil().setWidth(6),
// margin:
// const EdgeInsets.symmetric(horizontal: 0.3),
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: MyColours.color_ff0000,
// ),
// );
// },
),
),
],
... ... @@ -310,17 +365,17 @@ class DialogUtil {
child: Container(
child: ClipOval(
child: Container(
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(100),
alignment: Alignment.center,
color: MyColours.color_2bb5b7,
child: Text(
"今天",
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(32)),
),
)),
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(100),
alignment: Alignment.center,
color: MyColours.color_2bb5b7,
child: Text(
"回到\n今天",
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(26)),
),
)),
),
),
),
... ... @@ -336,93 +391,131 @@ class DialogUtil {
});
}
static Widget buildMarker(date) {
return Container(
height: ScreenUtil().setWidth(30),
// color: Colors.red,
// decoration:
// BoxDecoration(shape: BoxShape.circle, color: MyColours.color_2bb5b7),
alignment: Alignment.bottomCenter,
margin: const EdgeInsets.fromLTRB(6, 6, 6, 0),
padding: const EdgeInsets.only(top: 10.0),
child: Text(
"${_parseDateDay(date)}",
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(28), color: MyColours.color_2bb5b7),
),
);
}
//显示分享弹框
static showShareDialog(BuildContext context) {
return showModalBottomSheet(context: context, builder: (context) {
Widget widget = Container(
width: double.infinity,
height: ScreenUtil().setHeight(233),
color: MyColours.color_f1f1f1,
child: Row(
children: <Widget>[
Expanded(
child: GestureDetector(
onTap: (){
Navigator.of(context).pop(1);
},
behavior: HitTestBehavior.opaque,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/icon_wechat.png", width: ScreenUtil().setWidth(140),
height: ScreenUtil().setWidth(140),),
Text("微信", style: TextStyle(color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),)
],
return showModalBottomSheet(
context: context,
builder: (context) {
Widget widget = Container(
width: double.infinity,
height: ScreenUtil().setHeight(233),
color: MyColours.color_f1f1f1,
child: Row(
children: <Widget>[
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop(1);
},
behavior: HitTestBehavior.opaque,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/icon_wechat.png",
width: ScreenUtil().setWidth(140),
height: ScreenUtil().setWidth(140),
),
Text(
"微信",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
)
],
),
),
),
),
),
Expanded(
child: GestureDetector(
onTap: (){
Navigator.of(context).pop(2);
},
behavior: HitTestBehavior.opaque,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/icon_sms.png", width: ScreenUtil().setWidth(140),
height: ScreenUtil().setWidth(140),),
Text("短信", style: TextStyle(color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),)
],
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop(2);
},
behavior: HitTestBehavior.opaque,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/icon_sms.png",
width: ScreenUtil().setWidth(140),
height: ScreenUtil().setWidth(140),
),
Text(
"短信",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
)
],
),
),
),
),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop(3);
},
behavior: HitTestBehavior.opaque,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/icon_phone.png",
width: ScreenUtil().setWidth(140),
height: ScreenUtil().setWidth(140),
),
Text(
"电话",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
)
],
),
),
)
],
),
Expanded(
child: GestureDetector(
onTap: (){
Navigator.of(context).pop(3);
},
behavior: HitTestBehavior.opaque,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/icon_phone.png", width: ScreenUtil().setWidth(140),
height: ScreenUtil().setWidth(140),),
Text("电话", style: TextStyle(color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),)
],
),
),
)
],
),
);
return widget;
});
);
return widget;
});
}
//显示选择客户经理弹框
static Future<List<int>> showSelectCusmanDialog(BuildContext context,List<String> data,ValueChanged valueChanged){
static Future<List<int>> showSelectCusmanDialog(
BuildContext context, List<String> data, ValueChanged valueChanged) {
return Picker(
adapter: PickerDataAdapter<String>(pickerdata: data),
hideHeader: false,
cancelText: "取消",
cancelTextStyle: TextStyle(color: MyColours.color_828282,fontSize: 20),
cancelTextStyle: TextStyle(color: MyColours.color_828282, fontSize: 20),
confirmText: "确定",
confirmTextStyle: TextStyle(color: MyColours.color_2bb5b7,fontSize: 20),
confirmTextStyle:
TextStyle(color: MyColours.color_2bb5b7, fontSize: 20),
selectedTextStyle: TextStyle(color: Colors.blue),
onConfirm: (Picker picker, List value) {
print(value.toString());
if(valueChanged!=null){
if (valueChanged != null) {
valueChanged(value);
}
}
).showModal<List<int>>(context).then((value){
}).showModal<List<int>>(context).then((value) {
LogUtil.v("value:${value.toString()}");
return value;
});
... ...
... ... @@ -154,7 +154,7 @@ packages:
name: connectivity
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.9+2"
version: "0.4.9+3"
connectivity_for_web:
dependency: transitive
description:
... ... @@ -168,7 +168,7 @@ packages:
name: connectivity_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.0+4"
version: "0.1.0+5"
connectivity_platform_interface:
dependency: transitive
description:
... ... @@ -238,7 +238,7 @@ packages:
name: device_info
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2+7"
version: "0.4.2+8"
device_info_platform_interface:
dependency: transitive
description:
... ... @@ -260,6 +260,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
file:
dependency: transitive
description:
... ... @@ -561,7 +568,7 @@ packages:
name: path_provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.14"
version: "1.6.18"
path_provider_linux:
dependency: transitive
description:
... ... @@ -575,7 +582,7 @@ packages:
name: path_provider_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4+3"
version: "0.0.4+4"
path_provider_platform_interface:
dependency: transitive
description:
... ... @@ -583,6 +590,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4+1"
pedantic:
dependency: transitive
description:
... ... @@ -611,13 +625,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
platform_detect:
dependency: transitive
description:
name: platform_detect
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
plugin_platform_interface:
dependency: transitive
description:
... ... @@ -687,7 +694,7 @@ packages:
name: shared_preferences
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.5.10"
version: "0.5.12"
shared_preferences_linux:
dependency: transitive
description:
... ... @@ -716,6 +723,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2+7"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+1"
shelf:
dependency: transitive
description:
... ... @@ -855,7 +869,7 @@ packages:
name: url_launcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.6.0"
version: "5.7.2"
url_launcher_linux:
dependency: transitive
description:
... ... @@ -869,7 +883,7 @@ packages:
name: url_launcher_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+7"
version: "0.0.1+8"
url_launcher_platform_interface:
dependency: transitive
description:
... ... @@ -883,7 +897,7 @@ packages:
name: url_launcher_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3+2"
version: "0.1.4+1"
url_launcher_windows:
dependency: transitive
description:
... ... @@ -925,7 +939,14 @@ packages:
name: webview_flutter
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.22+1"
version: "0.3.24"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.3"
xdg_directories:
dependency: transitive
description:
... ...
... ... @@ -39,6 +39,7 @@ dependencies:
fluttertoast: ^3.1.3
# 权限管理
permission_handler: ^4.4.0
# permission_handler: ^5.0.1+1
# 文件系统访问
path_provider: ^1.6.5
## 官方image组件扩展,支持多种图片效果展示
... ...