Commit 3c1d99dc30c378c709818431131da107a36e99d1

Authored by wdn127929
1 parent 92ee8cbd

预订安排页和日历调整

... ... @@ -12,14 +12,14 @@ if (flutterRoot == null) {
}
def flutterVersionCode = "386"
def flutterVersionCode = "388"
if (flutterVersionCode == null) {
flutterVersionCode = '386'
flutterVersionCode = '388'
}
def flutterVersionName = "3.8.6"
def flutterVersionName = "3.8.8"
if (flutterVersionName == null) {
flutterVersionName = '3.8.6'
flutterVersionName = '3.8.8'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
... ...
... ... @@ -9,7 +9,7 @@ import android.util.Log
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodCall
import android.content.Intent
import me.yohom.foundation_fluttify.ima
class MainActivity: FlutterActivity() {
... ...
... ... @@ -502,7 +502,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.8.6;
MARKETING_VERSION = 3.8.7;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -648,7 +648,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.8.6;
MARKETING_VERSION = 3.8.7;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -684,7 +684,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.8.6;
MARKETING_VERSION = 3.8.7;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -2033,17 +2033,17 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> {
NavigatorUtil.goInvicationPage(
context,
_model.row.id,
_nameStr,
_model.row.ddate,
ddate_solt,
_model.row.phone,
_model.row.ddateSolt,
_model.row.rname == null
? ''
: _model.row.rname,
_model.row.sex == null ? '' : _model.row.sex,
_model.row.cusdem,
tid: _tid,
// _nameStr,
// _model.row.ddate,
// ddate_solt,
// _model.row.phone,
// _model.row.ddateSolt,
// _model.row.rname == null
// ? ''
// : _model.row.rname,
// _model.row.sex == null ? '' : _model.row.sex,
// _model.row.cusdem,
// tid: _tid,
replace: true);
}
EventBus().emit("refresh_tablemanager"); //刷新桌位
... ...
... ... @@ -2508,53 +2508,36 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
flex: 2,
child: InkWell(
onTap: () {
String _nameStr = '';
String _tid = '';
for (int i = 0;
i <
detailEntity
.tables.length;
i++) {
_nameStr +=
'${detailEntity.tables[i].name},';
_tid +=
'${detailEntity.tables[i].id},';
}
if (_tid.endsWith(',')) {
_tid = _tid.substring(
0, _tid.length - 1);
}
if (_nameStr.endsWith(',')) {
_nameStr =
_nameStr.substring(
0,
_nameStr.length -
1);
}
// String _nameStr = '';
// String _tid = '';
// for (int i = 0;
// i <
// detailEntity
// .tables.length;
// i++) {
// _nameStr +=
// '${detailEntity.tables[i].name},';
// _tid +=
// '${detailEntity.tables[i].id},';
// }
// if (_tid.endsWith(',')) {
// _tid = _tid.substring(
// 0, _tid.length - 1);
// }
// if (_nameStr.endsWith(',')) {
// _nameStr =
// _nameStr.substring(
// 0,
// _nameStr.length -
// 1);
// }
NavigatorUtil
.goInvicationPage(
context,
detailEntity.id,
_nameStr,
detailEntity.ddate,
detailEntity.ddateStr,
detailEntity.phone,
detailEntity
.ddate_solt,
detailEntity.rname ==
null
? ''
: detailEntity
.rname,
detailEntity.sex ==
null
? ''
: detailEntity
.sex,
detailEntity.cusdem,
tid: _tid);
);
},
child: Container(
decoration: BoxDecoration(
... ...
... ... @@ -756,50 +756,50 @@ class _EnterPageState extends State<EnterPage> {
print('录入成功');
// _enterModel.clearData();
bus.emit("refresh_detail");
String ddate_solt = '';
if (_model.row.isSetDdate == '1') {
String createtime =
_model.row.ddate.toString() + '000';
DateTime createTime =
DateTime.fromMillisecondsSinceEpoch(
int.parse(createtime));
ddate_solt = DateUtil.formatDate(createTime,
format: DateFormats.h_m);
} else {
if (_model.row.ddateSolt == '1') {
ddate_solt = '早餐';
} else if (_model.row.ddateSolt == '2') {
ddate_solt = '午餐';
} else if (_model.row.ddateSolt == '3') {
ddate_solt = '晚餐';
}
}
List<dynamic> tableinfo =
convert.jsonDecode(_model.row.tableinfo);
print(tableinfo);
String _nameStr = _model.row.name;
if (tableinfo.length > 1) {
_nameStr = _model.row.name + '等${tableinfo.length}桌';
}
String _tid = '';
for (int i = 0; i < tableinfo.length; i++) {
_tid += '${t.TableList.fromJson(tableinfo[i]).id},';
}
if (_tid.endsWith(',')) {
_tid = _tid.substring(0, _tid.length - 1);
}
// String ddate_solt = '';
// if (_model.row.isSetDdate == '1') {
// String createtime =
// _model.row.ddate.toString() + '000';
// DateTime createTime =
// DateTime.fromMillisecondsSinceEpoch(
// int.parse(createtime));
// ddate_solt = DateUtil.formatDate(createTime,
// format: DateFormats.h_m);
// } else {
// if (_model.row.ddateSolt == '1') {
// ddate_solt = '早餐';
// } else if (_model.row.ddateSolt == '2') {
// ddate_solt = '午餐';
// } else if (_model.row.ddateSolt == '3') {
// ddate_solt = '晚餐';
// }
// }
// List<dynamic> tableinfo =
// convert.jsonDecode(_model.row.tableinfo);
// print(tableinfo);
// String _nameStr = _model.row.name;
// if (tableinfo.length > 1) {
// _nameStr = _model.row.name + '等${tableinfo.length}桌';
// }
// String _tid = '';
// for (int i = 0; i < tableinfo.length; i++) {
// _tid += '${t.TableList.fromJson(tableinfo[i]).id},';
// }
// if (_tid.endsWith(',')) {
// _tid = _tid.substring(0, _tid.length - 1);
// }
NavigatorUtil.goInvicationPage(
context,
_model.row.id,
_nameStr,
_model.row.ddate,
ddate_solt,
_model.row.phone,
_model.row.ddateSolt,
_model.row.rname == null ? '' : _model.row.rname,
_model.row.sex == null ? '' : _model.row.sex,
_model.row.cusdem,
tid: _tid,
// _nameStr,
// _model.row.ddate,
// ddate_solt,
// _model.row.phone,
// _model.row.ddateSolt,
// _model.row.rname == null ? '' : _model.row.rname,
// _model.row.sex == null ? '' : _model.row.sex,
// _model.row.cusdem,
// tid: _tid,
replace: true);
} else {
Utils.showToast("录入预订订单失败,请重试!");
... ...
... ... @@ -1422,15 +1422,15 @@ class _HomeEnterPageState extends State<HomeEnterPage>
NavigatorUtil.goInvicationPage(
context,
_model.row.id,
_nameStr,
_model.row.ddate,
ddate_solt,
_model.row.phone,
_model.row.ddateSolt,
_model.row.rname == null ? '' : _model.row.rname,
_model.row.sex == null ? '' : _model.row.sex,
_model.row.cusdem,
tid: _tid,
// _nameStr,
// _model.row.ddate,
// ddate_solt,
// _model.row.phone,
// _model.row.ddateSolt,
// _model.row.rname == null ? '' : _model.row.rname,
// _model.row.sex == null ? '' : _model.row.sex,
// _model.row.cusdem,
// tid: _tid,
replace: false);
//今天 明天 其他天
String tempTime = _homeEnterModel.ddateStr;
... ...
... ... @@ -43,18 +43,17 @@ import 'dart:ui' as ui;
class InvicationPage extends StatefulWidget {
final String rid; //预订订单id
final String tableInfo; //桌位信息
final String ddate;
final String ddateStr;
final String phone;
final String dateSolt;
final String tid;
final String name;
final String sex;
final String remark;
// final String tableInfo; //桌位信息
// final String ddate;
// final String ddateStr;
// final String phone;
// final String dateSolt;
// final String tid;
// final String name;
// final String sex;
// final String remark;
InvicationPage(this.rid, this.tableInfo, this.ddate, this.ddateStr,
this.phone, this.dateSolt, this.tid, this.name, this.sex, this.remark);
InvicationPage(this.rid);
@override
State<StatefulWidget> createState() {
... ... @@ -91,6 +90,7 @@ class InvicationPageState extends State<InvicationPage>
int couponSelectIndex = 0;
NotebookDetail detailEntity;
final ScrollController _scrollController = new ScrollController();
List<Map<String, String>> tableInfo = []; //桌位信息
String ddate;
... ... @@ -116,7 +116,6 @@ class InvicationPageState extends State<InvicationPage>
bool needWechat = false;
String youhui = '选择优惠';
ScrollController scrollController = ScrollController();
final GlobalKey botGlobalKey = GlobalKey();
int sexSelectIndex = 0;
String sexStr = '先生';
... ... @@ -136,6 +135,7 @@ class InvicationPageState extends State<InvicationPage>
bool canSendSms = true;
bool showErroInfo = false;
String erroInfo = '';
bool _showOverlay = false;
@override
void initState() {
... ... @@ -148,6 +148,7 @@ class InvicationPageState extends State<InvicationPage>
_nameNode.addListener(() {
if (_nameNode.hasFocus) {
showOverlay(context);
setState(() {});
} else {
if (!needBack &&
!needBlack &&
... ... @@ -163,6 +164,7 @@ class InvicationPageState extends State<InvicationPage>
_cusdemNode.addListener(() {
if (_cusdemNode.hasFocus) {
showOverlay(context);
setState(() {});
} else {
if (!needBack &&
!needBlack &&
... ... @@ -179,6 +181,7 @@ class InvicationPageState extends State<InvicationPage>
_phoneNode.addListener(() {
if (_phoneNode.hasFocus) {
showOverlay(context);
setState(() {});
Scrollable.ensureVisible(botGlobalKey.currentContext);
} else {
if (!needBack &&
... ... @@ -221,6 +224,13 @@ class InvicationPageState extends State<InvicationPage>
user = Provider.of<UserModel>(context, listen: false).user;
}
handlePostFrame(_) {
if (_scrollController.hasClients) {
_scrollController.jumpTo(_scrollController.position.maxScrollExtent +
ScreenUtil().setWidth(140));
}
}
@override
void dispose() {
Utils.changeStatusColor();
... ... @@ -229,13 +239,17 @@ class InvicationPageState extends State<InvicationPage>
bus.off("refresh_invitaion_info");
bus.off("refresh_photo_invication");
WidgetsBinding.instance.removeObserver(this); //销毁观察者
_timer.cancel();
if (_timer != null) {
_timer.cancel();
}
super.dispose();
}
@override
void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback(handlePostFrame);
super.didChangeDependencies();
super.didChangeMetrics();
print(MediaQuery.of(context).viewInsets.bottom);
... ... @@ -272,7 +286,7 @@ class InvicationPageState extends State<InvicationPage>
needWechat = false,
needRemark = false,
int index,
VoidCallback callback}) {
VoidCallback callback}) async {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
String phone = '';
String name = '';
... ... @@ -293,113 +307,153 @@ class InvicationPageState extends State<InvicationPage>
needHistory ||
needRemark ||
oldRemark != remark) {
DialogUtil.cupertinoAlertDialog(context,
title: "客户信息",
content: "客户信息已修改,是否确定修改",
lTitle: "取消",
rTitle: "确定修改", lCallback: () {
print("取消");
showPhoneHistory = false;
showPhoneHistory = false;
if (needWechat) {
needWechat = false;
await _updateReserve();
callback();
} else {
if (needBack) {
needBack = false;
Navigator.of(context).pop();
} else {
if (needSex) {
if (oldSex == '1') {
sexStr = '先生';
} else if (oldSex == '2') {
sexStr = '女士';
} else if (oldSex == '3') {
sexStr = '公司';
}
if (nameStr != null && nameStr != '') {
_addNameSuffix(nameStr, sexStr);
}
sexSelectIndex = sexList.indexOf(sexStr);
setState(() {});
needSex = false;
}
}
if (needSex) {
needSex = false;
}
// if (needRemark) {
// needRemark = false;
// }
if (needHistory) {
setState(() {
showPhoneHistory = false;
_baseIndoProvider.phoneController.text =
_baseIndoProvider.userHistorys[index].phone != null
? _baseIndoProvider.userHistorys[index].phone
: '';
// _homeEnterModel.nameController.text =
// _homeEnterModel
// .userHistorys[index].rname +
// _nameSuffix();
_addNameSuffix(_baseIndoProvider.userHistorys[index].rname, sexStr);
nameStr = _baseIndoProvider.userHistorys[index].rname;
_phoneNode.unfocus();
_baseIndoProvider.userHistorys.clear();
});
needHistory = false;
}
if (needBlack) {
needBlack = false;
}
if (needHistory) {
needHistory = false;
}
_updateReserve();
}
// DialogUtil.cupertinoAlertDialog(context,
// title: "客户信息",
// content: "客户信息已修改,是否确定修改",
// lTitle: "取消",
// rTitle: "确定修改", lCallback: () {
// print("取消");
// showPhoneHistory = false;
// if (needBack) {
// needBack = false;
// Navigator.of(context).pop();
// } else {
// if (needSex) {
// if (oldSex == '1') {
// sexStr = '先生';
// } else if (oldSex == '2') {
// sexStr = '女士';
// } else if (oldSex == '3') {
// sexStr = '公司';
// }
// if (nameStr != null && nameStr != '') {
// _addNameSuffix(nameStr, sexStr);
// }
// sexSelectIndex = sexList.indexOf(sexStr);
// setState(() {});
// needSex = false;
// }
if (needBlack) {
needBlack = false;
}
if (needWechat) {
needWechat = false;
callback();
}
// if (needHistory) {
// needHistory = false;
// }
if (_baseIndoProvider.phoneController.text.trim().length > 0) {
_baseIndoProvider.phoneController.text = oldPhone;
}
if (customController.text.trim().length > 0) {
currentRemark = oldRemark ?? '';
customController.text = oldRemark ?? "";
for (Remark item in remarkManagerModel.ofenRemarks) {
if (item.custom == oldRemarkBtn) {
item.selected = false;
}
}
setState(() {});
}
if (nameStr != null && nameStr.trim().length > 0) {
nameStr = oldName;
// if (needBlack) {
// needBlack = false;
// }
// if (needWechat) {
// needWechat = false;
// callback();
// }
if (nameStr != null && nameStr != '') {
_addNameSuffix(nameStr, sexStr);
} else {
_baseIndoProvider.nameController.text = '';
}
}
// if (_baseIndoProvider.phoneController.text.trim().length > 0) {
// _baseIndoProvider.phoneController.text = oldPhone;
// }
// if (customController.text.trim().length > 0) {
// currentRemark = oldRemark ?? '';
// customController.text = oldRemark ?? "";
// for (Remark item in remarkManagerModel.ofenRemarks) {
// if (item.custom == oldRemarkBtn) {
// item.selected = false;
// }
// }
// setState(() {});
// }
// if (nameStr != null && nameStr.trim().length > 0) {
// nameStr = oldName;
setState(() {});
}
}, rCallback: () async {
showPhoneHistory = false;
if (needWechat) {
needWechat = false;
await _updateReserve();
callback();
} else {
if (needBack) {
needBack = false;
Navigator.of(context).pop();
}
if (needSex) {
needSex = false;
}
// if (needRemark) {
// needRemark = false;
// }
if (needHistory) {
setState(() {
showPhoneHistory = false;
_baseIndoProvider.phoneController.text =
_baseIndoProvider.userHistorys[index].phone != null
? _baseIndoProvider.userHistorys[index].phone
: '';
// _homeEnterModel.nameController.text =
// _homeEnterModel
// .userHistorys[index].rname +
// _nameSuffix();
_addNameSuffix(
_baseIndoProvider.userHistorys[index].rname, sexStr);
nameStr = _baseIndoProvider.userHistorys[index].rname;
_phoneNode.unfocus();
_baseIndoProvider.userHistorys.clear();
});
needHistory = false;
}
if (needBlack) {
needBlack = false;
}
// if (nameStr != null && nameStr != '') {
// _addNameSuffix(nameStr, sexStr);
// } else {
// _baseIndoProvider.nameController.text = '';
// }
// }
_updateReserve();
}
});
// setState(() {});
// }
// }, rCallback: () async {
// showPhoneHistory = false;
// if (needWechat) {
// needWechat = false;
// await _updateReserve();
// callback();
// } else {
// if (needBack) {
// needBack = false;
// Navigator.of(context).pop();
// }
// if (needSex) {
// needSex = false;
// }
// // if (needRemark) {
// // needRemark = false;
// // }
// if (needHistory) {
// setState(() {
// showPhoneHistory = false;
// _baseIndoProvider.phoneController.text =
// _baseIndoProvider.userHistorys[index].phone != null
// ? _baseIndoProvider.userHistorys[index].phone
// : '';
// // _homeEnterModel.nameController.text =
// // _homeEnterModel
// // .userHistorys[index].rname +
// // _nameSuffix();
// _addNameSuffix(
// _baseIndoProvider.userHistorys[index].rname, sexStr);
// nameStr = _baseIndoProvider.userHistorys[index].rname;
// _phoneNode.unfocus();
// _baseIndoProvider.userHistorys.clear();
// });
// needHistory = false;
// }
// if (needBlack) {
// needBlack = false;
// }
// _updateReserve();
// }
// });
} else {
if (needBack) {
needBack = false;
... ... @@ -3190,6 +3244,9 @@ class InvicationPageState extends State<InvicationPage>
if (overlayEntry != null) return;
OverlayState overlayState = Overlay.of(context);
overlayEntry = OverlayEntry(builder: (context) {
// setState(() {
_showOverlay = true;
// });
return Positioned(
bottom: MediaQuery.of(context).viewInsets.bottom,
right: 0.0,
... ... @@ -3206,6 +3263,10 @@ class InvicationPageState extends State<InvicationPage>
removeOverlay() {
if (overlayEntry != null) {
// setState(() {
_showOverlay = false;
// });
overlayEntry.remove();
overlayEntry = null;
}
... ... @@ -4090,109 +4151,67 @@ class InvicationPageState extends State<InvicationPage>
_showConfirmWidget();
},
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: [
// Container(
// width: double.infinity,
// // color: backgroundColor,
// padding: EdgeInsets.symmetric(
// vertical: ScreenUtil().setHeight(30)),
// child: Stack(
// alignment: Alignment.center,
// children: <Widget>[
// Positioned(
// left: 0,
// child: InkWell(
// onTap: () {
// needBack = true;
// _showConfirmWidget(needBack: true);
// },
// // behavior: HitTestBehavior.opaque,
// child: Padding(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(40),
// vertical: ScreenUtil().setHeight(15)),
// child: Image.asset(
// "assets/icon_back.png",
// width: ScreenUtil().setWidth(20),
// height: ScreenUtil().setHeight(31),
// ),
// ),
// ),
// ),
// Center(
// child: Image.asset(
// "assets/yd_logo.png",
// width: ScreenUtil().setWidth(103 * 2),
// // height: ScreenUtil().setHeight(21 * 2),
// ))
// ],
// )),
Expanded(child: Consumer<BaseIndoProvider>(
builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
pageState: model.pageState,
callback: () async {
model.pageState = PageState.Loading;
await _couponNetworkData(isShowLoading: false);
await _getCustomerActivityBaseinfo();
await _getTablesPhoto();
await _getReserveDetail(showCicle: false);
model.notifyListeners();
},
emptyMsg: "稍后加载",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
} else {
return Container(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
controller: scrollController,
scrollDirection: Axis.vertical,
//true 滑动到底部
padding: EdgeInsets.all(0.0),
reverse:
_phoneNode.hasFocus ? true : false,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
VEmptyView(38),
_reverseTimeWidget(),
VEmptyView(24),
_tableInfoWidget(),
VEmptyView(34),
_enterMoreWidget(),
// VEmptyView(40),
// _managerWidget(),
// VEmptyView(50),
// _orderInfoWidget(),
// VEmptyView(30),
// _couponWidget(),
// VEmptyView(20),
Container(
key: botGlobalKey,
height:
ScreenUtil().setWidth(20))
],
))),
Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(48)),
child: _btnWidget()),
],
),
);
}
})),
],
)),
color: MyColours.color_ffffff,
child: Consumer<BaseIndoProvider>(builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
pageState: model.pageState,
callback: () async {
model.pageState = PageState.Loading;
await _couponNetworkData(isShowLoading: false);
await _getCustomerActivityBaseinfo();
await _getTablesPhoto();
await _getReserveDetail(showCicle: false);
model.notifyListeners();
},
emptyMsg: "稍后加载",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
} else {
return Column(children: [
Expanded(
child: SingleChildScrollView(
controller: _scrollController,
scrollDirection: Axis.vertical,
//true 滑动到底部
padding: EdgeInsets.all(0.0),
// reverse: _phoneNode.hasFocus ? true : false,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
VEmptyView(38),
_reverseTimeWidget(),
VEmptyView(24),
_tableInfoWidget(),
VEmptyView(34),
_enterMoreWidget(),
// VEmptyView(40),
// _managerWidget(),
// VEmptyView(50),
// _orderInfoWidget(),
// VEmptyView(30),
// _couponWidget(),
// VEmptyView(20),
Container(
key: botGlobalKey,
height: ScreenUtil().setWidth(20)),
],
))),
Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(48)),
child: _btnWidget()),
_showOverlay ? VEmptyView(100) : SizedBox()
])
// Padding(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(48)),
// child: _btnWidget()),
;
}
}),
),
)));
}
}
... ...
... ... @@ -143,7 +143,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}, showToast: false);
}
Widget _item(String name, String title) {
Widget _item(String name, String title, {bool isRowLow = false}) {
return Column(
children: [
Image.asset(
... ... @@ -155,8 +155,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
title,
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_999999,
fontSize: ScreenUtil().setWidth(20)),
color: isRowLow ? MyColours.color_999999 : MyColours.color_515151,
fontSize: ScreenUtil().setWidth(24)),
)
],
);
... ... @@ -424,7 +424,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
ScreenUtil().setWidth(32 * 2),
color: MyColours.color_f3f3f3,
),
Column(
InkWell(
onTap:(){
NavigatorUtil.goSmsManagePage(context,
smsInfoData: smsInfoData);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
... ... @@ -464,7 +471,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
smsInfoData: smsInfoData);
})
],
),
)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(32 * 2),
... ... @@ -525,6 +532,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}, body: Consumer<UserModel>(
builder: (BuildContext context, UserModel model, Widget child) {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
bool isRoleLow = userModel.user.role_name == '收银员' ||
userModel.user.role_name == '服务员' ||
userModel.user.role_name == '客户经理'
? true
: false;
bool isRoleLowNoManage = userModel.user.role_name == '收银员' ||
userModel.user.role_name == '服务员'
? true
: false;
return Container(
color: MyColours.color_F8F9FD,
padding:
... ... @@ -653,12 +669,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () async {
if (userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员' ||
userModel.user.role_name ==
'客户经理') {
} else {
if (!isRoleLow) {
Map image = await NavigatorUtil
.goStoreBaseInfoPage(context);
print(image['image']);
... ... @@ -674,61 +685,42 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员' ||
userModel.user.role_name ==
'客户经理'
isRoleLow
? Utils.getImgPath('dpxx_un')
: Utils.getImgPath('dpxx'),
'店铺信息')),
'店铺信息',
isRowLow: isRoleLow)),
InkWell(
onTap: () {
if (userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员' ||
userModel.user.role_name ==
'客户经理') {
} else {
if (!isRoleLow) {
NavigatorUtil.goStoreCustomerPage(
context);
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员' ||
userModel.user.role_name ==
'客户经理'
isRoleLow
? Utils.getImgPath('qdkq_un')
: Utils.getImgPath('qdkq'),
'全店客情')),
'全店客情',
isRowLow: isRoleLow)),
InkWell(
onTap: () {
if (userModel.user.role_name ==
'收银员' ||
userModel.user.role_name ==
'服务员') {
} else {
NavigatorUtil
.goMyTableManagerHomePage(
context);
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员'
? Utils.getImgPath('zwgl_un')
: Utils.getImgPath('zwgl'),
'桌位管理')),
onTap: () {
if (!isRoleLowNoManage) {
NavigatorUtil
.goMyTableManagerHomePage(
context);
}
},
child: _item(
isRoleLowNoManage
? Utils.getImgPath('zwgl_un')
: Utils.getImgPath('zwgl'),
'桌位管理',
isRowLow: isRoleLowNoManage),
),
InkWell(
onTap: () async {
if (userModel.user.role_name ==
'收银员' ||
userModel.user.role_name ==
'服务员') {
} else {
if (!isRoleLowNoManage) {
// Map temp =
await NavigatorUtil
.goPhotoManagerSelectTablePage(
... ... @@ -750,12 +742,11 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员'
isRoleLowNoManage
? Utils.getImgPath('zwzp_un')
: Utils.getImgPath('zwzp'),
'桌位照片'))
'桌位照片',
isRowLow: isRoleLowNoManage))
],
),
VEmptyView(68),
... ... @@ -765,77 +756,57 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
if (userModel.user.role_name ==
'收银员' ||
userModel.user.role_name ==
'服务员') {
} else {
if (!isRoleLowNoManage) {
NavigatorUtil.goPersonnelManagePage(
context);
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员'
isRoleLowNoManage
? Utils.getImgPath('yggl_un')
: Utils.getImgPath('yggl'),
'员工管理')),
'员工管理',
isRowLow: isRoleLowNoManage)),
InkWell(
onTap: () {
if (userModel.user.role_name ==
'收银员' ||
userModel.user.role_name ==
'服务员') {
} else {
if (!isRoleLowNoManage) {
NavigatorUtil.goMenuManagePage(
context);
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员'
isRoleLowNoManage
? Utils.getImgPath('cdgl_un')
: Utils.getImgPath('cdgl'),
'菜单管理')),
'菜单管理',
isRowLow: isRoleLowNoManage)),
InkWell(
onTap: () {
if (userModel.user.role_name ==
'收银员' ||
userModel.user.role_name ==
'服务员') {
} else {
if (!isRoleLowNoManage) {
NavigatorUtil.goRoomTypeManagePage(
context);
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员'
isRoleLowNoManage
? Utils.getImgPath('bjlx_un')
: Utils.getImgPath('bjlx'),
'包间类型')),
'包间类型',
isRowLow: isRoleLowNoManage)),
InkWell(
onTap: () {
if (userModel.user.role_name ==
'收银员' ||
userModel.user.role_name ==
'服务员') {
} else {
if (!isRoleLowNoManage) {
NavigatorUtil
.goStoreTypeFillManagePage(
context);
}
},
child: _item(
userModel.user.role_name == '收银员' ||
userModel.user.role_name ==
'服务员'
isRoleLowNoManage
? Utils.getImgPath('bjzm_un')
: Utils.getImgPath('bjzm'),
'包间置满'))
'包间置满',
isRowLow: isRoleLowNoManage))
],
)
],
... ...
... ... @@ -78,15 +78,16 @@ class NoteBookItemFState extends State<NoteBookItemF>
NavigatorUtil.goInvicationPage(
context,
widget.notebook.id,
widget.notebook.tableinfoStr,
widget.notebook.ddate,
widget.notebook.ddateStr,
widget.notebook.phone,
widget.notebook.ddate_solt,
widget.notebook.rname == null ? '' : widget.notebook.rname,
widget.notebook.sex == null ? '' : widget.notebook.sex,
widget.notebook.cusdem,
tid: widget.notebook.tid);
// widget.notebook.tableinfoStr,
// widget.notebook.ddate,
// widget.notebook.ddateStr,
// widget.notebook.phone,
// widget.notebook.ddate_solt,
// widget.notebook.rname == null ? '' : widget.notebook.rname,
// widget.notebook.sex == null ? '' : widget.notebook.sex,
// widget.notebook.cusdem,
// tid: widget.notebook.tid
);
}
}
... ...
... ... @@ -88,17 +88,18 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
// 1);
// }
NavigatorUtil.goInvicationPage(
context,
widget.notebook.id,
widget.notebook.tableinfoStr,
widget.notebook.ddate,
widget.notebook.ddateStr,
widget.notebook.phone,
widget.notebook.ddate_solt,
widget.notebook.rname == null ? '' : widget.notebook.rname,
widget.notebook.sex == null ? '' : widget.notebook.sex,
widget.notebook.cusdem,
tid: widget.notebook.tid);
context,
widget.notebook.id,
// widget.notebook.tableinfoStr,
// widget.notebook.ddate,
// widget.notebook.ddateStr,
// widget.notebook.phone,
// widget.notebook.ddate_solt,
// widget.notebook.rname == null ? '' : widget.notebook.rname,
// widget.notebook.sex == null ? '' : widget.notebook.sex,
// widget.notebook.cusdem,
// tid: widget.notebook.tid
);
}
}
... ... @@ -533,7 +534,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
children: [
notebook.rnameStr == ''
? SizedBox()
: Container(
: Expanded(
child: Text(
notebook.rnameStr,
maxLines: 1,
... ...
... ... @@ -51,15 +51,16 @@ class NotebookItemState extends State<NoteBookItem> {
NavigatorUtil.goInvicationPage(
context,
widget.notebook.id,
widget.notebook.tableinfoStr,
widget.notebook.ddate,
widget.notebook.ddateStr,
widget.notebook.phone,
widget.notebook.ddate_solt,
widget.notebook.rname == null ? '' : widget.notebook.rname,
widget.notebook.sex == null ? '' : widget.notebook.sex,
widget.notebook.cusdem,
tid: widget.notebook.tid);
// widget.notebook.tableinfoStr,
// widget.notebook.ddate,
// widget.notebook.ddateStr,
// widget.notebook.phone,
// widget.notebook.ddate_solt,
// widget.notebook.rname == null ? '' : widget.notebook.rname,
// widget.notebook.sex == null ? '' : widget.notebook.sex,
// widget.notebook.cusdem,
// tid: widget.notebook.tid
);
}
}
... ...
... ... @@ -257,7 +257,7 @@ class NoteBookPageState extends State<NoteBookPage> {
}
//获取订单统计数目
_reserveCountDay() {
_reserveCountDay() async {
NoteBookModel model = Provider.of<NoteBookModel>(context, listen: false);
Map<String, String> params = {
"sid": userModel.user.sellerid,
... ... @@ -272,7 +272,7 @@ class NoteBookPageState extends State<NoteBookPage> {
if (tabIndex == 1) {
params["account"] = userModel.user.account;
}
model.getReserveCountDay(context, params);
await model.getReserveCountDay(context, params);
}
//构建List表头
... ... @@ -380,134 +380,134 @@ class NoteBookPageState extends State<NoteBookPage> {
_reserveCountDay();
}
Widget _buildTabbar() {
Container container = Container(
color: MyColours.color_ffffff,
width: double.infinity,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(20), top: ScreenUtil().setWidth(20)),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
child: GestureDetector(
onTap: () {
if (tabIndex == 0) return;
setState(() {
tabIndex = 0;
_getReserveList();
_reserveCountDay();
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"全部预订",
style: TextStyle(
color: tabIndex == 0
? MyColours.color_353535
: MyColours.color_999999,
fontSize: tabIndex == 0
? ScreenUtil().setSp(36)
: ScreenUtil().setSp(28),
fontWeight: tabIndex == 0
? FontWeight.bold
: FontWeight.normal),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: ScreenUtil().setWidth(6),
width: ScreenUtil().setWidth(60),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)),
decoration: tabIndex == 0
? BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(6)))
: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(6))),
),
),
],
)),
),
Container(
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
child: GestureDetector(
onTap: () {
if (tabIndex == 1) return;
setState(() {
tabIndex = 1;
_getReserveList();
_reserveCountDay();
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"我录入的",
style: TextStyle(
color: tabIndex == 1
? MyColours.color_353535
: MyColours.color_999999,
fontSize: tabIndex == 1
? ScreenUtil().setSp(36)
: ScreenUtil().setSp(28),
fontWeight: tabIndex == 1
? FontWeight.bold
: FontWeight.normal),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: ScreenUtil().setWidth(6),
width: ScreenUtil().setWidth(60),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)),
decoration: tabIndex == 1
? BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(6)))
: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(6))),
),
),
],
)),
),
Spacer(),
GestureDetector(
onTap: () {
NavigatorUtil.goStatisticsPage(context);
},
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(40),
right: ScreenUtil().setWidth(40),
bottom: ScreenUtil().setWidth(30)),
child: Text(
"统计列表",
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(36),
fontWeight: FontWeight.bold),
))),
],
),
);
return container;
}
// Widget _buildTabbar() {
// Container container = Container(
// color: MyColours.color_ffffff,
// width: double.infinity,
// padding: EdgeInsets.only(
// left: ScreenUtil().setWidth(20), top: ScreenUtil().setWidth(20)),
// child: Row(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Container(
// padding:
// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
// child: GestureDetector(
// onTap: () {
// if (tabIndex == 0) return;
// setState(() {
// tabIndex = 0;
// _getReserveList();
// _reserveCountDay();
// });
// },
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// Text(
// "全部预订",
// style: TextStyle(
// color: tabIndex == 0
// ? MyColours.color_353535
// : MyColours.color_999999,
// fontSize: tabIndex == 0
// ? ScreenUtil().setSp(36)
// : ScreenUtil().setSp(28),
// fontWeight: tabIndex == 0
// ? FontWeight.bold
// : FontWeight.normal),
// ),
// Align(
// alignment: Alignment.bottomCenter,
// child: Container(
// height: ScreenUtil().setWidth(6),
// width: ScreenUtil().setWidth(60),
// margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)),
// decoration: tabIndex == 0
// ? BoxDecoration(
// color: MyColours.color_199095,
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(6)))
// : BoxDecoration(
// color: MyColours.color_ffffff,
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(6))),
// ),
// ),
// ],
// )),
// ),
// Container(
// padding:
// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
// child: GestureDetector(
// onTap: () {
// if (tabIndex == 1) return;
// setState(() {
// tabIndex = 1;
// _getReserveList();
// _reserveCountDay();
// });
// },
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// Text(
// "我录入的",
// style: TextStyle(
// color: tabIndex == 1
// ? MyColours.color_353535
// : MyColours.color_999999,
// fontSize: tabIndex == 1
// ? ScreenUtil().setSp(36)
// : ScreenUtil().setSp(28),
// fontWeight: tabIndex == 1
// ? FontWeight.bold
// : FontWeight.normal),
// ),
// Align(
// alignment: Alignment.bottomCenter,
// child: Container(
// height: ScreenUtil().setWidth(6),
// width: ScreenUtil().setWidth(60),
// margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)),
// decoration: tabIndex == 1
// ? BoxDecoration(
// color: MyColours.color_199095,
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(6)))
// : BoxDecoration(
// color: MyColours.color_ffffff,
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(6))),
// ),
// ),
// ],
// )),
// ),
// Spacer(),
// GestureDetector(
// onTap: () {
// NavigatorUtil.goStatisticsPage(context);
// },
// child: Container(
// color: Colors.white,
// padding: EdgeInsets.only(
// left: ScreenUtil().setWidth(40),
// right: ScreenUtil().setWidth(40),
// bottom: ScreenUtil().setWidth(30)),
// child: Text(
// "统计列表",
// style: TextStyle(
// color: MyColours.color_199095,
// fontSize: ScreenUtil().setSp(36),
// fontWeight: FontWeight.bold),
// ))),
// ],
// ),
// );
// return container;
// }
_simpleState() {
if (noteBookModel.notebooks.length > 0) {
... ... @@ -573,10 +573,11 @@ class NoteBookPageState extends State<NoteBookPage> {
right: ScreenUtil().setWidth(24),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: TableCalendar(
rowHeight: ScreenUtil().setWidth(38 * 2),
rowHeight: ScreenUtil().setWidth(74 * 2),
calendarController: _calendarController,
initialSelectedDay: dateTimeNow,
headerVisible: false,
... ... @@ -600,6 +601,7 @@ class NoteBookPageState extends State<NoteBookPage> {
locale: "zh_CN",
initialCalendarFormat: CalendarFormat.week,
calendarStyle: CalendarStyle(
renderDaysOfWeek: false,
weekdayStyle: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
... ... @@ -632,22 +634,46 @@ class NoteBookPageState extends State<NoteBookPage> {
),
builders: CalendarBuilders(
dayBuilder: (context, dateTime, events) {
return Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
return Column(children: [
Container(
color: MyColours.color_ffffff,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(16)),
child: Text(
DateTime.now().weekday ==
dateTime.weekday
? '今日'
: Utils.formatWeekDayNum(
dateTime.weekday),
style: TextStyle(
color: dateTimeNow.weekday ==
dateTime.weekday &&
!clearSel
? MyColours.color_438E93
: MyColours.color_BFC4D4,
fontSize: ScreenUtil().setSp(28)),
),
),
alignment: Alignment.center,
padding: EdgeInsets.zero,
margin: EdgeInsets.all(
ScreenUtil().setWidth(8)),
child: Text(
dateTime.day.toString(),
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_515151,
fontWeight: FontWeight.bold),
),
);
Container(
width: ScreenUtil().setWidth(28 * 2),
height: ScreenUtil().setWidth(28 * 2),
decoration: BoxDecoration(
shape: BoxShape.circle,
),
alignment: Alignment.center,
padding: EdgeInsets.zero,
margin: EdgeInsets.all(
ScreenUtil().setWidth(8)),
child: Text(
dateTime.day.toString(),
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_515151,
fontWeight: FontWeight.bold),
),
)
]);
},
unavailableDayBuilder:
(context, dateTime, events) {
... ... @@ -694,50 +720,106 @@ class NoteBookPageState extends State<NoteBookPage> {
selectedDayBuilder: (context, date, _) {
return clearSel
? Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
? Column(children: [
Container(
color: MyColours.color_ffffff,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical:
ScreenUtil().setWidth(16)),
child: Text(
DateTime.now().weekday ==
date.weekday
? '今日'
: Utils.formatWeekDayNum(
date.weekday),
style: TextStyle(
color: dateTimeNow.weekday ==
date.weekday &&
!clearSel
? MyColours.color_438E93
: MyColours.color_BFC4D4,
fontSize:
ScreenUtil().setSp(28)),
),
),
alignment: Alignment.center,
padding: EdgeInsets.zero,
margin: EdgeInsets.all(
ScreenUtil().setWidth(8)),
child: Text(
date.day.toString(),
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(28),
color: MyColours.color_515151,
fontWeight: FontWeight.bold),
Container(
width:
ScreenUtil().setWidth(28 * 2),
height:
ScreenUtil().setWidth(28 * 2),
decoration: BoxDecoration(
shape: BoxShape.circle,
),
alignment: Alignment.center,
padding: EdgeInsets.zero,
margin: EdgeInsets.all(
ScreenUtil().setWidth(8)),
child: Text(
date.day.toString(),
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(28),
color: MyColours.color_515151,
fontWeight: FontWeight.bold),
),
)
])
: Column(children: [
Container(
color: MyColours.color_ffffff,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical:
ScreenUtil().setWidth(16)),
child: Text(
DateTime.now().weekday ==
date.weekday
? '今日'
: Utils.formatWeekDayNum(
date.weekday),
style: TextStyle(
color: dateTimeNow.weekday ==
date.weekday &&
!clearSel
? MyColours.color_438E93
: MyColours.color_BFC4D4,
fontSize:
ScreenUtil().setSp(28)),
),
),
)
: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
colors: [
MyColours.color_438E93,
MyColours.color_438E93
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter),
Container(
width:
ScreenUtil().setWidth(28 * 2),
height:
ScreenUtil().setWidth(28 * 2),
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
colors: [
MyColours.color_438E93,
MyColours.color_438E93
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter),
// border: Border.all(color: MyColours.color_FFB116)
),
alignment: Alignment.center,
margin: EdgeInsets.all(
ScreenUtil().setWidth(8)),
padding: EdgeInsets.all(
ScreenUtil().setWidth(4),
),
child: Text(
date.day.toString(),
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(28),
color: MyColours.color_ffffff,
fontWeight: FontWeight.bold),
),
);
),
alignment: Alignment.center,
margin: EdgeInsets.all(
ScreenUtil().setWidth(8)),
padding: EdgeInsets.all(
ScreenUtil().setWidth(4),
),
child: Text(
date.day.toString(),
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(28),
color: MyColours.color_ffffff,
fontWeight: FontWeight.bold),
),
)
]);
},
// todayDayBuilder: (context, date, _) {
// return Container(
... ... @@ -791,6 +873,7 @@ class NoteBookPageState extends State<NoteBookPage> {
ScreenUtil().setWidth(10))),
child: Text(
dateText,
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_ffffff,
... ... @@ -837,7 +920,8 @@ class NoteBookPageState extends State<NoteBookPage> {
model.totalmorning,
builder: (context, total, child) {
return CommonButtonFlat(
content: "早餐" + total,
content: "早餐" +
'${total == '(0)' ? '' : total}',
state: currTimeIndex == 1 ? 1 : 0,
fontSize: 28,
padding: EdgeInsets.symmetric(
... ... @@ -873,7 +957,8 @@ class NoteBookPageState extends State<NoteBookPage> {
model.totalnoon,
builder: (context, total, child) {
return CommonButtonFlat(
content: "午餐" + total,
content: "午餐" +
'${total == '(0)' ? '' : total}',
state: currTimeIndex == 2 ? 1 : 0,
fontSize: 28,
width: ScreenUtil().setWidth(240 * 2) /
... ... @@ -911,7 +996,8 @@ class NoteBookPageState extends State<NoteBookPage> {
model.totalnight,
builder: (context, total, child) {
return CommonButtonFlat(
content: "晚餐" + total,
content: "晚餐" +
'${total == '(0)' ? '' : total}',
left: morning == "00:00-00:00" &&
noon == "00:00-00:00"
? true
... ...
... ... @@ -1675,17 +1675,19 @@ class TableManagerPageState extends State<TableManagerPage> {
// }
// }
// } else {
bool isSuccess =
await Utils.goShareInvicationToWeChat(
context,
_model.row.id,
Provider.of<UserModel>(context,
listen: false)
.user
.openid);
if (isSuccess) {
_addForward(_model.row.id);
}
NavigatorUtil.goInvicationPage(
context, _model.row.id);
// bool isSuccess =
// await Utils.goShareInvicationToWeChat(
// context,
// _model.row.id,
// Provider.of<UserModel>(context,
// listen: false)
// .user
// .openid);
// if (isSuccess) {
// _addForward(_model.row.id);
// }
// }
} else {
//失败
... ...
... ... @@ -83,13 +83,14 @@ class NoteBookModel extends ChangeNotifier {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
// total = "已订" + (morning + noon + night).toString();
if (userModel.user.morning.isNotEmpty) {
totalmorning += "($morning";
totalmorning = "($morning)";
}
if (userModel.user.noon.isNotEmpty) {
totalmorning += "($noon";
totalnoon = "($noon)";
}
if (userModel.user.night.isNotEmpty) {
totalmorning += "($night";
totalnight = "($night)";
}
notifyListeners();
}
... ...
... ... @@ -136,22 +136,9 @@ class NavigatorUtil {
}
/// 邀请函
static void goInvicationPage(
BuildContext context,
String rid,
String tableInfo,
String ddate,
String ddateStr,
String phone,
String ddate_solt,
String name,
String sex,
String remark,
{bool replace = false,
String tid}) {
_navigateTo(context,
"${Routes.invication}?rid=$rid&tid=$tid&tableInfo=${FluroConvertUtils.fluroCnParamsEncode(tableInfo)}&ddate=$ddate&ddateStr=${FluroConvertUtils.fluroCnParamsEncode(ddateStr)}&phone=$phone&ddate_solt=$ddate_solt&name=${Uri.encodeComponent(name)}&sex=$sex&remark=${remark == null ? '' : Uri.encodeComponent(remark)}",
replace: replace);
static void goInvicationPage(BuildContext context, String rid,
{bool replace = false}) {
_navigateTo(context, "${Routes.invication}?rid=$rid", replace: replace);
}
/// 发短信
... ...
... ... @@ -307,24 +307,23 @@ var photoManagerPageHandle = new Handler(
var handleInvicationHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String rid = params["rid"].first;
String tableInfo =
FluroConvertUtils.fluroCnParamsDecode(params["tableInfo"].first);
String ddate = params["ddate"].first;
String ddateStr =
FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first);
String phone = params["phone"].first;
String ddate_solt = params["ddate_solt"].first;
String tid = params["tid"].first;
String name = params["name"].first;
String sex = params["sex"].first;
String remark = params["remark"].first;
// String tableInfo =
// FluroConvertUtils.fluroCnParamsDecode(params["tableInfo"].first);
// String ddate = params["ddate"].first;
// String ddateStr =
// FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first);
// String phone = params["phone"].first;
// String ddate_solt = params["ddate_solt"].first;
// String tid = params["tid"].first;
// String name = params["name"].first;
// String sex = params["sex"].first;
// String remark = params["remark"].first;
return ChangeNotifierProvider<RemarkManagerModel>(
create: (_) => RemarkManagerModel(),
child: ChangeNotifierProvider<BaseIndoProvider>(
create: (_) => BaseIndoProvider(),
child: InvicationPage(rid, tableInfo, ddate, ddateStr, phone,
ddate_solt, tid, name, sex,remark)));
child: InvicationPage(rid)));
});
// 发短信
... ...
... ... @@ -3660,7 +3660,8 @@ class DialogUtil {
radius: ScreenUtil().setWidth(10),
)
],
)
),
VEmptyView(40)
],
))
... ... @@ -3696,7 +3697,7 @@ class DialogUtil {
});
return SizedBox(
width: double.infinity,
height: ScreenUtil().setWidth(935),
height: ScreenUtil().setWidth(975),
child: widget,
);
});
... ...