Commit 0ce1aca44984a2b31caa1a2231efa244979cbc29

Authored by wdn127929
1 parent 55ebf60f

话机部分页面尺寸调整(宴会看板、宴会首页、桌位管理首页)

... ... @@ -105,7 +105,8 @@ android {
signingConfig signingConfigs.release
}
debug{
minifyEnabled false
// minifyEnabled false
minifyEnabled true
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
... ...
... ... @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
... ... @@ -512,7 +512,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5132;
CURRENT_PROJECT_VERSION = 513;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -658,7 +658,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5132;
CURRENT_PROJECT_VERSION = 513;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -694,7 +694,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5132;
CURRENT_PROJECT_VERSION = 513;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ...
... ... @@ -239,6 +239,8 @@ class MyAppState extends State<MyApp> {
// TODO: implement build
return ScreenUtilInit(
designSize: const Size(750, 1334),
// designSize: const Size(900, 1200),//话机尺寸,不能按照屏幕尺寸,大概调整合适
minTextAdapt: true,
splitScreenMode: true,
builder: (context, child) {
... ...
... ... @@ -3400,11 +3400,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
context, '变更预订') ||
widget.uid ==
userModel.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长')) {
(userModel.user.role_name ==
'店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长')) {
NavigatorUtil
.goNoteBookChangeFPage(
context,
... ... @@ -3421,14 +3422,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
border: Border.all(
width: w(1),
color: !(Utils.getAuthority(
context, '变更预订') ||
widget.uid ==
userModel.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长'))
context, '变更预订') ||
widget.uid ==
userModel
.user.openid ||
(userModel.user
.role_name ==
'店长' &&
detailEntity
.role_name !=
'管理员' &&
detailEntity
.role_name !=
'店长'))
? MyColours.color_999999
: MyColours.color_199095,
),
... ... @@ -3442,14 +3448,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
child: Text('变更预订',
style: TextStyle(
color: !(Utils.getAuthority(
context, '变更预订') ||
widget.uid ==
userModel.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长'))
context, '变更预订') ||
widget.uid ==
userModel.user
.openid ||
(userModel.user
.role_name ==
'店长' &&
detailEntity
.role_name !=
'管理员' &&
detailEntity
.role_name !=
'店长'))
? MyColours
.color_999999
: MyColours
... ...
... ... @@ -188,420 +188,460 @@ class _FeastBoardPageState extends State<FeastBoardPage> {
),
body: Column(
children: <Widget>[
Container(
decoration:
BoxDecoration(color: MyColours.color_ffffff, boxShadow: [
BoxShadow(
offset: Offset(
0,
ScreenUtil().setWidth(8),
),
blurRadius: ScreenUtil().setWidth(8),
color: MyColours.color_26000000)
]),
child: Column(
children: [
TableCalendar(
// rowHeight: ScreenUtil().setWidth(100),
rowHeight: ScreenUtil().setWidth(114),
calendarController: _calendarController,
initialSelectedDay: dateTimeNow,
onDaySelected: (day, events, holidays) {
if (!Utils.isOneDay(day, dateTimeNow)) {
//不是一天
dateTimeNow = day;
_getBanquetByDate();
}
},
// holidays: _holidays,
availableGestures: AvailableGestures.none,
Expanded(
child: SingleChildScrollView(
controller: controller,
child: Column(children: <Widget>[
Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
offset: Offset(
0,
ScreenUtil().setWidth(8),
),
blurRadius: ScreenUtil().setWidth(8),
color: MyColours.color_26000000)
]),
child: Column(
children: [
TableCalendar(
// rowHeight: ScreenUtil().setWidth(100),
rowHeight: ScreenUtil().setWidth(114),
calendarController: _calendarController,
initialSelectedDay: dateTimeNow,
onDaySelected: (day, events, holidays) {
if (!Utils.isOneDay(day, dateTimeNow)) {
//不是一天
dateTimeNow = day;
_getBanquetByDate();
}
},
// holidays: _holidays,
availableGestures: AvailableGestures.none,
locale: "zh_CN",
onVisibleDaysChanged: (date1, date2, cal) async {
feastModel.fullStatusByTime = {};
print('r');
UserModel userModel =
Provider.of<UserModel>(context, listen: false);
String startDay = (date1.millisecondsSinceEpoch / 1000)
.floor()
.toString();
String endDay = (date2.millisecondsSinceEpoch / 1000)
.floor()
.toString();
locale: "zh_CN",
onVisibleDaysChanged: (date1, date2, cal) async {
feastModel.fullStatusByTime = {};
print('r');
UserModel userModel = Provider.of<UserModel>(
context,
listen: false);
String startDay =
(date1.millisecondsSinceEpoch / 1000)
.floor()
.toString();
String endDay =
(date2.millisecondsSinceEpoch / 1000)
.floor()
.toString();
Map<String, String> pramas = {
'sid': userModel.user.sellerid,
'rdate': '${startDay}',
'edate': '${endDay}'
};
await feastModel.getExitsBanquetByDate(context, pramas,
showLoading: true);
setState(() {});
},
initialCalendarFormat: calendarShow
? CalendarFormat.month
: CalendarFormat.week,
headerStyle: HeaderStyle(
decoration: BoxDecoration(color: MyColours.color_ffffff),
headerPadding: EdgeInsets.symmetric(
// vertical: ScreenUtil().setWidth(24),
horizontal: ScreenUtil().setWidth(66)),
formatButtonVisible: false,
centerHeaderTitle: true,
titleTextBuilder: (dateTime, _) {
return dateTime.year.toString() +
' ' +
"年" +
' ' +
dateTime.month.toString() +
' ' +
"月";
},
titleTextStyle: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(44)),
leftChevronIcon: Icon(Icons.chevron_left,
color: MyColours.color_000000,
size: ScreenUtil().setWidth(48)),
rightChevronIcon: Icon(Icons.chevron_right,
color: MyColours.color_000000,
size: ScreenUtil().setWidth(48)),
),
calendarStyle: CalendarStyle(
contentPadding:
EdgeInsets.only(bottom: ScreenUtil().setWidth(8)),
weekdayStyle: TextStyle(
color: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(32)),
weekendStyle: TextStyle(
color: MyColours.color_f49a5e,
fontSize: ScreenUtil().setSp(32)),
selectedColor: MyColours.color_2bb5b7,
outsideDaysVisible: false,
),
builders: CalendarBuilders(
dowWeekdayBuilder: (context, weekday) {
return Container(
color: MyColours.color_ffffff,
alignment: Alignment.center,
// margin:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(15)),
child: Text(
weekday,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(32)),
),
);
},
dayBuilder: (context, date, _) {
String keytemp = '${date.year}' +
'-' +
'${Utils.addZeroNumber(date.month)}' +
'-' +
'${Utils.addZeroNumber(date.day)}';
return Container(
// height: ScreenUtil().setWidth(210),
decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: Colors.blue,
Map<String, String> pramas = {
'sid': userModel.user.sellerid,
'rdate': '${startDay}',
'edate': '${endDay}'
};
await feastModel.getExitsBanquetByDate(
context, pramas,
showLoading: true);
setState(() {});
},
initialCalendarFormat: calendarShow
? CalendarFormat.month
: CalendarFormat.week,
headerStyle: HeaderStyle(
decoration: BoxDecoration(
color: MyColours.color_ffffff),
headerPadding: EdgeInsets.symmetric(
// vertical: ScreenUtil().setWidth(24),
horizontal: ScreenUtil().setWidth(66)),
formatButtonVisible: false,
centerHeaderTitle: true,
titleTextBuilder: (dateTime, _) {
return dateTime.year.toString() +
' ' +
"年" +
' ' +
dateTime.month.toString() +
' ' +
"月";
},
titleTextStyle: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(44)),
leftChevronIcon: Icon(Icons.chevron_left,
color: MyColours.color_000000,
size: ScreenUtil().setWidth(48)),
rightChevronIcon: Icon(Icons.chevron_right,
color: MyColours.color_000000,
size: ScreenUtil().setWidth(48)),
),
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(10)),
// padding: EdgeInsets.symmetric(
// // horizontal: ScreenUtil().setWidth(12),
// vertical: ScreenUtil().setWidth(8),
// ),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "${_parseDateDay(date)}",
// '${Utils.addZeroNumber(date.day)}',
'${date.day}',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_515151,
fontWeight: FontWeight.bold)),
VEmptyView(4),
// Text(
// // "${_parseDateDay(date)}",
// '${Utils.getLunarSpecialDate(date)}',
// style: TextStyle().copyWith(
// fontSize: ScreenUtil().setSp(22),
// color: MyColours.color_353535),
// ),
Text(
"${_parseDateDay(date)}",
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
calendarStyle: CalendarStyle(
contentPadding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(8)),
weekdayStyle: TextStyle(
color: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(32)),
weekendStyle: TextStyle(
color: MyColours.color_f49a5e,
fontSize: ScreenUtil().setSp(32)),
selectedColor: MyColours.color_2bb5b7,
outsideDaysVisible: false,
),
feastModel.fullStatusByTime.keys
.contains(keytemp) &&
feastModel.fullStatusByTime[keytemp] ==
'1'
? Container(
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(4)),
width: ScreenUtil().setWidth(16),
height: ScreenUtil().setWidth(16),
builders: CalendarBuilders(
dowWeekdayBuilder: (context, weekday) {
return Container(
color: MyColours.color_ffffff,
alignment: Alignment.center,
// margin:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(15)),
child: Text(
weekday,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(32)),
),
);
},
dayBuilder: (context, date, _) {
String keytemp = '${date.year}' +
'-' +
'${Utils.addZeroNumber(date.month)}' +
'-' +
'${Utils.addZeroNumber(date.day)}';
return Container(
// height: ScreenUtil().setWidth(210),
decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: Colors.blue,
),
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(10)),
// padding: EdgeInsets.symmetric(
// // horizontal: ScreenUtil().setWidth(12),
// vertical: ScreenUtil().setWidth(8),
// ),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
// "${_parseDateDay(date)}",
// '${Utils.addZeroNumber(date.day)}',
'${date.day}',
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(32),
color: MyColours.color_515151,
fontWeight: FontWeight.bold)),
VEmptyView(4),
// Text(
// // "${_parseDateDay(date)}",
// '${Utils.getLunarSpecialDate(date)}',
// style: TextStyle().copyWith(
// fontSize: ScreenUtil().setSp(22),
// color: MyColours.color_353535),
// ),
Text(
"${_parseDateDay(date)}",
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
feastModel.fullStatusByTime.keys
.contains(keytemp) &&
feastModel.fullStatusByTime[
keytemp] ==
'1'
? Container(
margin: EdgeInsets.symmetric(
vertical: ScreenUtil()
.setWidth(4)),
width:
ScreenUtil().setWidth(16),
height:
ScreenUtil().setWidth(16),
decoration: BoxDecoration(
color:
MyColours.color_E34D59,
borderRadius:
BorderRadius.circular(
ScreenUtil()
.radius(8))),
)
: SizedBox()
],
),
);
},
selectedDayBuilder: (context, date, _) {
String keytemp = '${date.year}' +
'-' +
'${Utils.addZeroNumber(date.month)}' +
'-' +
'${Utils.addZeroNumber(date.day)}';
return Container(
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
padding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(0),
left: ScreenUtil().setWidth(5),
right: ScreenUtil().setWidth(5),
top: ScreenUtil().setWidth(0)),
child: Container(
decoration: BoxDecoration(
color: MyColours.color_E34D59,
borderRadius: BorderRadius.circular(
ScreenUtil().radius(8))),
)
: SizedBox()
],
),
);
},
selectedDayBuilder: (context, date, _) {
String keytemp = '${date.year}' +
'-' +
'${Utils.addZeroNumber(date.month)}' +
'-' +
'${Utils.addZeroNumber(date.day)}';
return Container(
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
padding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(0),
left: ScreenUtil().setWidth(5),
right: ScreenUtil().setWidth(5),
top: ScreenUtil().setWidth(0)),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
color: MyColours.color_438E93),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "${_parseDateDay(date)}",
// '${Utils.addZeroNumber(date.day)}',
'${date.day}',
style: TextStyle().copyWith(
color: MyColours.color_F6F6F6,
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.bold),
),
Text(
"${_parseDateDay(date)}",
// '${Utils.lunarCalendarHolidaysShow(date)}',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(22),
color: MyColours.color_F6F6F6),
),
feastModel.fullStatusByTime.keys
.contains(keytemp) &&
feastModel.fullStatusByTime[keytemp] ==
'1'
? Container(
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(4)),
width: ScreenUtil().setWidth(16),
height: ScreenUtil().setWidth(16),
decoration: BoxDecoration(
color: MyColours.color_E34D59,
borderRadius: BorderRadius.circular(
ScreenUtil().radius(8))),
)
: SizedBox()
],
),
),
);
},
todayDayBuilder: (context, date, _) {
String keytemp = '${date.year}' +
'-' +
'${Utils.addZeroNumber(date.month)}' +
'-' +
'${Utils.addZeroNumber(date.day)}';
return Container(
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
padding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(0),
left: ScreenUtil().setWidth(5),
right: ScreenUtil().setWidth(5),
top: ScreenUtil().setWidth(0)),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
color: MyColours.color_2bb5b7),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "${_parseDateDay(date)}",
// '${Utils.addZeroNumber(date.day)}',
'${date.day}',
style: TextStyle().copyWith(
color: MyColours.color_F6F6F6,
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.bold),
),
Text(
"${_parseDateDay(date)}",
// '${Utils.lunarCalendarHolidaysShow(date)}',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(22),
color: MyColours.color_F6F6F6),
),
feastModel.fullStatusByTime.keys
.contains(keytemp) &&
feastModel.fullStatusByTime[keytemp] ==
'1'
? Container(
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(4)),
width: ScreenUtil().setWidth(16),
height: ScreenUtil().setWidth(16),
decoration: BoxDecoration(
color: MyColours.color_E34D59,
borderRadius: BorderRadius.circular(
ScreenUtil().radius(8))),
)
: SizedBox()
],
),
),
);
// return Container(
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// border: Border.all(
// color: MyColours.color_2bb5b7,
// width: ScreenUtil().setWidth(2))),
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
// padding: EdgeInsets.only(
// bottom: ScreenUtil().setWidth(8),
// left: ScreenUtil().setWidth(16),
// right: ScreenUtil().setWidth(16),
// top: ScreenUtil().setWidth(8)),
// child: Text(
// // '今',
// '${Utils.addZeroNumber(date.day)}',
// style: TextStyle().copyWith(
// fontSize: ScreenUtil().setSp(32),
// color: MyColours.color_2bb5b7),
// ),
// );
},
markersBuilder: (context, date, events, holidays) {
final children = <Widget>[];
ScreenUtil().setWidth(10)),
color: MyColours.color_438E93),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
// "${_parseDateDay(date)}",
// '${Utils.addZeroNumber(date.day)}',
'${date.day}',
style: TextStyle().copyWith(
color: MyColours.color_F6F6F6,
fontSize:
ScreenUtil().setSp(32),
fontWeight: FontWeight.bold),
),
Text(
"${_parseDateDay(date)}",
// '${Utils.lunarCalendarHolidaysShow(date)}',
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(22),
color: MyColours.color_F6F6F6),
),
feastModel.fullStatusByTime.keys
.contains(keytemp) &&
feastModel.fullStatusByTime[
keytemp] ==
'1'
? Container(
margin: EdgeInsets.symmetric(
vertical: ScreenUtil()
.setWidth(4)),
width:
ScreenUtil().setWidth(16),
height:
ScreenUtil().setWidth(16),
decoration: BoxDecoration(
color: MyColours
.color_E34D59,
borderRadius:
BorderRadius.circular(
ScreenUtil()
.radius(8))),
)
: SizedBox()
],
),
),
);
},
todayDayBuilder: (context, date, _) {
String keytemp = '${date.year}' +
'-' +
'${Utils.addZeroNumber(date.month)}' +
'-' +
'${Utils.addZeroNumber(date.day)}';
return Container(
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
padding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(0),
left: ScreenUtil().setWidth(5),
right: ScreenUtil().setWidth(5),
top: ScreenUtil().setWidth(0)),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
color: MyColours.color_2bb5b7),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
// "${_parseDateDay(date)}",
// '${Utils.addZeroNumber(date.day)}',
'${date.day}',
style: TextStyle().copyWith(
color: MyColours.color_F6F6F6,
fontSize:
ScreenUtil().setSp(32),
fontWeight: FontWeight.bold),
),
Text(
"${_parseDateDay(date)}",
// '${Utils.lunarCalendarHolidaysShow(date)}',
style: TextStyle().copyWith(
fontSize:
ScreenUtil().setSp(22),
color: MyColours.color_F6F6F6),
),
feastModel.fullStatusByTime.keys
.contains(keytemp) &&
feastModel.fullStatusByTime[
keytemp] ==
'1'
? Container(
margin: EdgeInsets.symmetric(
vertical: ScreenUtil()
.setWidth(4)),
width:
ScreenUtil().setWidth(16),
height:
ScreenUtil().setWidth(16),
decoration: BoxDecoration(
color: MyColours
.color_E34D59,
borderRadius:
BorderRadius.circular(
ScreenUtil()
.radius(8))),
)
: SizedBox()
],
),
),
);
// return Container(
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// border: Border.all(
// color: MyColours.color_2bb5b7,
// width: ScreenUtil().setWidth(2))),
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
// padding: EdgeInsets.only(
// bottom: ScreenUtil().setWidth(8),
// left: ScreenUtil().setWidth(16),
// right: ScreenUtil().setWidth(16),
// top: ScreenUtil().setWidth(8)),
// child: Text(
// // '今',
// '${Utils.addZeroNumber(date.day)}',
// style: TextStyle().copyWith(
// fontSize: ScreenUtil().setSp(32),
// color: MyColours.color_2bb5b7),
// ),
// );
},
markersBuilder:
(context, date, events, holidays) {
final children = <Widget>[];
// if (events.isNotEmpty) {
// children.add(
// Positioned(
// right: 1,
// bottom: 1,
// child: _buildEventsMarker(date, events),
// ),
// );
// }
// 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: ScreenUtil().setWidth(30),
// child: buildMarker(date)),
// Align(
// alignment: Alignment.bottomCenter,
// child: buildMarker(date),
// )
// );
// }
// if (holidays.isNotEmpty) {
// children.add(
// Positioned(
// right: ScreenUtil().setWidth(27),
// bottom: 0,
// top: ScreenUtil().setWidth(30),
// child: buildMarker(date)),
// Align(
// alignment: Alignment.bottomCenter,
// child: buildMarker(date),
// )
// );
// }
return [];
},
// 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,
// ),
// );
// },
),
),
InkWell(
onTap: () {
calendarShow = !calendarShow;
return [];
},
// 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,
// ),
// );
// },
),
),
InkWell(
onTap: () {
calendarShow = !calendarShow;
if (calendarShow) {
_calendarController
.setCalendarFormat(CalendarFormat.month);
} else {
_calendarController
.setCalendarFormat(CalendarFormat.week);
}
setState(() {});
},
child: Container(
width: double.infinity,
color: Colors.white,
child: Column(
children: [
VEmptyView(4),
Image.asset(
Utils.getImgPath(calendarShow
? 'y_chevron_up_circle'
: 'y_chevron_down_circle'),
width: ScreenUtil().setWidth(32)),
VEmptyView(32),
if (calendarShow) {
_calendarController.setCalendarFormat(
CalendarFormat.month);
} else {
_calendarController
.setCalendarFormat(CalendarFormat.week);
}
setState(() {});
},
child: Container(
width: double.infinity,
color: Colors.white,
child: Column(
children: [
VEmptyView(4),
Image.asset(
Utils.getImgPath(calendarShow
? 'y_chevron_up_circle'
: 'y_chevron_down_circle'),
width: ScreenUtil().setWidth(32)),
VEmptyView(32),
],
),
))
],
),
))
],
)),
VEmptyView(48),
Expanded(
child: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(8)),
controller: controller,
itemBuilder: (context, index) {
FeastBoardModel boardModel =
feastModel.banquetByDateData[index];
return FeastBoardItem(
boardModel: boardModel,
controller: controller,
isOpen: !calendarShow,
);
},
itemCount: feastModel.banquetByDateData.length)),
)),
VEmptyView(48),
ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(8)),
controller: controller,
itemBuilder: (context, index) {
FeastBoardModel boardModel =
feastModel.banquetByDateData[index];
return FeastBoardItem(
boardModel: boardModel,
controller: controller,
isOpen: !calendarShow,
);
},
itemCount: feastModel.banquetByDateData.length)
]))),
Row(
children: [
Expanded(
... ...
... ... @@ -121,84 +121,95 @@ class _FeastPageState extends State<FeastPage> {
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
VEmptyView(112),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
upAndDown('y_kanban', '宴会看板', onTap: () {
NavigatorUtil.goFeastBoardPage(context);
}),
upAndDown(
Utils.getAuthority(context, '新建宴会') ? 'y_new' : 'y_new_un',
'新建宴会', onTap: () {
if (Utils.getAuthority(context, '新建宴会')) {
NavigatorUtil.goFeastCreatePage(context, isCreate: true);
}
}),
InkWell(
onTap: () {
if (Utils.getAuthority(context, '待跟进')) {
NavigatorUtil.goFeastFollowUpPage(context);
}
},
child: Stack(clipBehavior: Clip.none, children: [
SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
VEmptyView(112),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
upAndDown('y_kanban', '宴会看板', onTap: () {
NavigatorUtil.goFeastBoardPage(context);
}),
upAndDown(
Utils.getAuthority(context, '待跟进')
? 'y_schedule'
: 'y_schedule_un',
'待跟进', onTap: () {
if (Utils.getAuthority(context, '待跟进')) {
NavigatorUtil.goFeastFollowUpPage(context);
Utils.getAuthority(context, '新建宴会')
? 'y_new'
: 'y_new_un',
'新建宴会', onTap: () {
if (Utils.getAuthority(context, '新建宴会')) {
NavigatorUtil.goFeastCreatePage(context,
isCreate: true);
}
}),
feastModel.beFollowData != null &&
feastModel.beFollowData.length > 0 &&
(Utils.getAuthority(context, '待跟进'))
? Positioned(
right: ScreenUtil().setWidth(0),
bottom: ScreenUtil().setWidth(38),
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(16)),
color: MyColours.color_E34D59),
// width: ScreenUtil().setWidth(32),
height: ScreenUtil().setWidth(32),
padding: EdgeInsets.symmetric(horizontal: w(4)),
child: Text(
'${feastModel.beFollowData.length}',
style: TextStyle(
color: MyColours.color_F6F6F6,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(24)),
),
),
)
: SizedBox()
])),
upAndDown(
Utils.getAuthority(context, '定金管理')
? 'y_money'
: 'y_money_un',
'定金管理', onTap: () {
if (Utils.getAuthority(context, '定金管理')) {
NavigatorUtil.goFeastDepositDataPage(context);
}
})
],
),
VEmptyView(102),
Padding(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
child: Text(
'7天内宴会',
style: TextStyle(
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
InkWell(
onTap: () {
if (Utils.getAuthority(context, '待跟进')) {
NavigatorUtil.goFeastFollowUpPage(context);
}
},
child: Stack(clipBehavior: Clip.none, children: [
upAndDown(
Utils.getAuthority(context, '待跟进')
? 'y_schedule'
: 'y_schedule_un',
'待跟进', onTap: () {
if (Utils.getAuthority(context, '待跟进')) {
NavigatorUtil.goFeastFollowUpPage(context);
}
}),
feastModel.beFollowData != null &&
feastModel.beFollowData.length > 0 &&
(Utils.getAuthority(context, '待跟进'))
? Positioned(
right: ScreenUtil().setWidth(0),
bottom: ScreenUtil().setWidth(38),
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(16)),
color: MyColours.color_E34D59),
// width: ScreenUtil().setWidth(32),
height: ScreenUtil().setWidth(32),
padding: EdgeInsets.symmetric(
horizontal: w(4)),
child: Text(
'${feastModel.beFollowData.length}',
style: TextStyle(
color: MyColours.color_F6F6F6,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(24)),
),
),
)
: SizedBox()
])),
upAndDown(
Utils.getAuthority(context, '定金管理')
? 'y_money'
: 'y_money_un',
'定金管理', onTap: () {
if (Utils.getAuthority(context, '定金管理')) {
NavigatorUtil.goFeastDepositDataPage(context);
}
})
],
),
VEmptyView(102),
Padding(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
child: Text(
'7天内宴会',
style: TextStyle(
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
),
),
VEmptyView(26),
],
),
),
VEmptyView(26),
Expanded(child: Consumer<FeastModel>(builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
... ... @@ -223,7 +234,8 @@ class _FeastPageState extends State<FeastPage> {
feastModel.banquetHome[index];
return InkWell(
onTap: () {
NavigatorUtil.goFeastDetailPage(context, sunModel.id,needChange: true);
NavigatorUtil.goFeastDetailPage(context, sunModel.id,
needChange: true);
},
child: FeastItem(controller, sunModel));
},
... ...
... ... @@ -565,7 +565,7 @@ class _MyContactListPageState extends State<MyContactListPage> {
Container(
width: w(70),
child: Text(
widget.sellerPreserve
widget.sellerPreserve??true
? model.phone
: Utils.starPhone('${model.phone}'),
overflow: TextOverflow.ellipsis,
... ...
... ... @@ -769,6 +769,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
children: [
Expanded(
child: SingleChildScrollView(
controller: _controller,
child: Column(
children: [
_item('客人所见菜单主题颜色选择', themeColerModel.name, onTap: () {
... ... @@ -794,8 +795,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
),
VEmptyView(24),
menuModelTemp == null || menuModelTemp.length == 0
? Expanded(
child: Container(
? Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(horizontal: w(20)),
child: Column(
... ... @@ -812,7 +812,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
),
],
),
))
)
:
// double cellWidth = (MediaQuery.of(context).size.width -
// ScreenUtil().setWidth(40 * 2 + 15 * 2) / 2);
... ...
... ... @@ -65,6 +65,8 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
final ItemPositionsListener itemPositionsListener =
ItemPositionsListener.create();
ScrollController controller = ScrollController();
@override
void initState() {
// TODO: implement initState
... ... @@ -235,7 +237,7 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
/// Generate item number [i].
Widget item(int i) {
return GridView.builder(
// controller: _areaController,
controller: controller,
// physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
... ... @@ -760,533 +762,478 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
],
),
),
tableManagerModel.tableOuterList.length == 0
? Padding(
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(100)),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
VEmptyView(180),
Row(
children: [
Text(
'1、',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_BFC4D4),
),
InkWell(
onTap: () async {
//添加区域弹框
await DialogUtil
.openTableManageCreateAreaDialog(
context,
onTap: (value) async {
print(value);
//添加区域
bool success =
if (tableManagerModel.tableOuterList.length == 0)
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
VEmptyView(40),
Padding(
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(100)),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
'1、',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_BFC4D4),
),
InkWell(
onTap: () async {
//添加区域弹框
await DialogUtil
.openTableManageCreateAreaDialog(
context,
onTap: (value) async {
print(value);
//添加区域
bool success =
await tableManagerModel
.addTableAreas(
context, value);
print(success);
if (success) {
Utils.showToast('添加成功!');
tableManagerModel
.currentArea = value;
// TableManagerModel
// tableManagerModel1 =
// Provider.of<
// TableManagerModel>(
// context,
// listen: false);
// tableManagerModel1
// .getTableList(
// context,
// needLoading: false,
// );
await tableManagerModel
.addTableAreas(
context, value);
print(success);
if (success) {
Utils.showToast('添加成功!');
tableManagerModel
.currentArea = value;
// TableManagerModel
// tableManagerModel1 =
// Provider.of<
// TableManagerModel>(
// context,
// listen: false);
// tableManagerModel1
// .getTableList(
// context,
// needLoading: false,
// );
await tableManagerModel
.refreshTable(context);
// await tableManagerModel
// .getTableList(context,
// needLoading: false);
// tableManagerModel.initData();
// setState(() {
// updateMenu();
// });
// _scrollToIndex(widget
// .tableManagerModel
// .areas
// .length);
}
});
},
child: Text('添加区域',
.refreshTable(
context);
// await tableManagerModel
// .getTableList(context,
// needLoading: false);
// tableManagerModel.initData();
// setState(() {
// updateMenu();
// });
// _scrollToIndex(widget
// .tableManagerModel
// .areas
// .length);
}
});
},
child: Text('添加区域',
style: TextStyle(
fontSize: ScreenUtil()
.setSp(32),
color: MyColours
.color_438E93,
decoration:
TextDecoration
.underline)),
),
Text('(如:一楼、二楼、东厅等)',
style: TextStyle(
fontSize: ScreenUtil()
.setSp(32),
color: MyColours
.color_438E93,
decoration: TextDecoration
.underline)),
),
Text('(如:一楼、二楼、东厅等)',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_BFC4D4))
],
),
VEmptyView(40),
Text('2、选择要添加桌位的区域',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color: MyColours.color_BFC4D4)),
VEmptyView(40),
Text('3、点击“+”号添加桌位',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color: MyColours.color_BFC4D4)),
VEmptyView(120),
Image.asset(
"assets/empty_search.png",
width: ScreenUtil().setWidth(520),
height: ScreenUtil().setWidth(384),
),
VEmptyView(40),
],
))
: SizedBox(),
tableManagerModel.tableOuterList.length == 0
? SizedBox()
: Expanded(
// flex: 2,
child: Container(
constraints: BoxConstraints(
minHeight:
ScreenUtil().setWidth(100)),
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(20),
horizontal:
ScreenUtil().setWidth(48)),
child: Column(
children: [
VEmptyView(26),
tableManagerModel.selectNumber !=
null &&
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list
.length ==
0
? SizedBox()
: Row(children: [
InkWell(
onTap: () {
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect =
!tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect;
.color_BFC4D4))
],
),
VEmptyView(40),
Text('2、选择要添加桌位的区域',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_BFC4D4)),
VEmptyView(40),
Text('3、点击“+”号添加桌位',
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_BFC4D4)),
],
)),
Align(
alignment: Alignment.center,
child: Image.asset(
"assets/empty_search.png",
width: ScreenUtil().setWidth(520),
height: ScreenUtil().setWidth(384),
),
),
VEmptyView(20),
],
)),
if (tableManagerModel.tableOuterList.length > 0)
Expanded(
// flex: 2,
child: Container(
constraints: BoxConstraints(
minHeight:
ScreenUtil().setWidth(100)),
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(20),
horizontal:
ScreenUtil().setWidth(48)),
child: Column(
children: [
VEmptyView(26),
tableManagerModel.selectNumber !=
null &&
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list
.length ==
0
? SizedBox()
: Row(children: [
InkWell(
onTap: () {
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect =
!tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect;
if (!tableManagerModel
if (!tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect &&
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.length >
0) {
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect &&
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.length >
0) {
for (t.Table item
in tableManagerModel
.list) {
item.selected =
false;
}
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables = [];
}
setState(() {});
},
child: Row(
children: [
Image.asset(
Utils.getImgPath(tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list) {
item.selected =
false;
}
.isSelect
? 'base_radio_sel'
: 'base_radio_un'),
width: ScreenUtil()
.setWidth(40),
),
HEmptyView(10),
Text(
'批量选择桌位',
style: TextStyle(
fontSize:
ScreenUtil()
.setSp(
32),
color: MyColours
.color_000000),
),
],
)),
Spacer(),
tableManagerModel
.tableOuterList
.length >
0 &&
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect
? InkWell(
onTap: () {
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables = [];
}
setState(() {});
},
child: Row(
children: [
Image.asset(
Utils.getImgPath(tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect
? 'base_radio_sel'
: 'base_radio_un'),
width:
ScreenUtil()
.setWidth(
40),
),
HEmptyView(10),
Text(
'批量选择桌位',
style: TextStyle(
fontSize:
ScreenUtil()
.setSp(
32),
color: MyColours
.color_000000),
),
],
)),
Spacer(),
tableManagerModel
.tableOuterList
.length >
0 &&
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isAll =
!tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isAll;
if (tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isSelect
? InkWell(
onTap: () {
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables = [];
tableManagerModel
.isAll) {
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isAll =
!tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isAll;
if (tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.isAll) {
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel.selectNumber]
.list) {
item.selected =
true;
tableManagerModel
.list) {
item.selected =
true;
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.add(item);
}
} else {
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.add(
item);
}
} else {
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel.selectNumber]
.list) {
item.selected =
false;
}
.list) {
item.selected =
false;
}
setState(() {});
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.center,
}
setState(() {});
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
Image.asset(
Utils.getImgPath(tableManagerModel
.tableOuterList[tableManagerModel
.selectNumber]
.isAll
? 'mine_radio_sel'
: 'mine_radio_nor'),
width: ScreenUtil()
.setWidth(
34)),
Text(
'全选',
style: TextStyle(
color: MyColours
.color_515151,
fontSize: ScreenUtil()
.setSp(
32)),
)
],
))
: SizedBox()
]),
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list
.length ==
0
? VEmptyView(20)
: VEmptyView(60),
Expanded(
child: Column(
children: [
// Expanded(
// child:
item(tableManagerModel
.selectNumber),
if (tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list
.length ==
0)
Expanded(
child: Padding(
padding: EdgeInsets.only(
left: ScreenUtil()
.setWidth(50)),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
VEmptyView(60),
Row(
children: [
Image.asset(
Utils.getImgPath(tableManagerModel
.tableOuterList[tableManagerModel
.selectNumber]
.isAll
? 'mine_radio_sel'
: 'mine_radio_nor'),
width: ScreenUtil()
.setWidth(
34)),
Text(
'全选',
style: TextStyle(
color: MyColours
.color_515151,
fontSize:
ScreenUtil()
.setSp(32)),
)
'1、添加区域(如:一楼、二楼、东厅等)',
style: TextStyle(
decoration:
TextDecoration
.lineThrough,
fontSize:
ScreenUtil().setSp(
32),
color: MyColours
.color_BFC4D4))
],
))
: SizedBox()
]),
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list
.length ==
0
? VEmptyView(20)
: VEmptyView(60),
Expanded(
child: item(tableManagerModel
.selectNumber)),
tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.list
.length ==
0
? Padding(
padding: EdgeInsets.only(
left: ScreenUtil()
.setWidth(50)),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
VEmptyView(60),
Row(
children: [
Text(
'1、添加区域(如:一楼、二楼、东厅等)',
),
VEmptyView(40),
Text('2、选择要添加桌位的区域',
style: TextStyle(
decoration:
TextDecoration
.lineThrough,
fontSize: ScreenUtil()
.setSp(
32),
color: MyColours
.color_BFC4D4))
],
),
VEmptyView(40),
Text('2、选择要添加桌位的区域',
style: TextStyle(
fontSize:
ScreenUtil()
.setSp(
32),
color: MyColours
.color_BFC4D4)),
VEmptyView(40),
Text('3、点击“+”号添加桌位',
style: TextStyle(
fontSize:
ScreenUtil()
.color_BFC4D4)),
VEmptyView(40),
Text('3、点击“+”号添加桌位',
style: TextStyle(
fontSize: ScreenUtil()
.setSp(
32),
color: MyColours
.color_BFC4D4)),
VEmptyView(120),
Image.asset(
"assets/empty_search.png",
width: ScreenUtil()
.setWidth(520),
height: ScreenUtil()
.setWidth(384),
),
VEmptyView(40),
],
))
: SizedBox(),
],
))),
color: MyColours
.color_BFC4D4)),
VEmptyView(40),
Align(
alignment:
Alignment
.center,
child:
Image.asset(
"assets/empty_search.png",
width: ScreenUtil()
.setWidth(
520),
height: ScreenUtil()
.setWidth(
384),
)),
// Spacer(),
],
))),
],
))
],
))),
])),
tableManagerModel.tableOuterList.length == 0
? SizedBox()
: model.pageState == PageState.Success &&
tableManagerModel
.tableOuterList[tableManagerModel.selectNumber]
.isSelect
? Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(48)),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
CommonButton(
content: "修改名称",
width: 200,
height: 72,
fontSize: 32,
onPress: () async {
if (tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.length ==
0) {
Utils.showToast('请选择桌位');
return;
}
if (tableManagerModel.tableOuterList.length > 0)
model.pageState == PageState.Success &&
tableManagerModel
.tableOuterList[tableManagerModel.selectNumber]
.isSelect
? Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(48)),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
CommonButton(
content: "修改名称",
width: 200,
height: 72,
fontSize: 32,
onPress: () async {
if (tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.length ==
0) {
Utils.showToast('请选择桌位');
return;
}
DialogUtil
.openMyTableManageModifyTableNameDialog(
context,
onTap: (Map<String, String>
value) async {
String tids = '';
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables) {
tids += '${item.id},';
}
if (tids.endsWith(',')) {
tids = tids.substring(
0, tids.length - 1);
}
Map<String, String> params = {
'name': value['name'],
'tableids': tids,
'skip_four': value['skip_four'],
'skip_seven':
value['skip_seven'],
};
bool success =
await tableManagerModel
.batchSetTable(
context, params);
print(success);
if (success) {
Utils.showToast('修改成功!');
// TableManagerModel
// tableManagerModel1 =
// Provider.of<
// TableManagerModel>(
// context,
// listen: false);
// tableManagerModel1
// .getTableList(
// context,
// needLoading: false,
// );
DialogUtil
.openMyTableManageModifyTableNameDialog(
context,
onTap: (Map<String, String>
value) async {
String tids = '';
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables) {
tids += '${item.id},';
}
if (tids.endsWith(',')) {
tids = tids.substring(
0, tids.length - 1);
}
Map<String, String> params = {
'name': value['name'],
'tableids': tids,
'skip_four': value['skip_four'],
'skip_seven': value['skip_seven'],
};
bool success =
await tableManagerModel
.refreshTable(context);
}
},
);
}),
CommonButton(
content: "修改人数",
width: 200,
height: 72,
fontSize: 32,
onPress: () async {
if (tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables
.length ==
0) {
Utils.showToast('请选择桌位');
return;
}
await DialogUtil
.openMyTableManageModifyTableNumDialog(
context,
personNumList,
pnumMin: '',
pnumMax: '',
onTap: (Map<String, String>
value) async {
String tids = '';
for (t.Table item
in tableManagerModel
.tableOuterList[
tableManagerModel
.selectNumber]
.selectTables) {
tids += '${item.id},';
}
if (tids.endsWith(',')) {
tids = tids.substring(
0, tids.length - 1);
}
Map<String, String> params = {
'tableids': tids,
};
if (value['pnumMin'] != '') {
params['table_pnum'] =
value['pnumMin'];
}
if (value['pnumMax'] != '') {
params['most_pnum'] =
value['pnumMax'];
}
bool success =
await tableManagerModel
.batchSetTable(
context, params);
print(success);
if (success) {
Utils.showToast('修改成功!');
// TableManagerModel
// tableManagerModel =
// Provider.of<
// TableManagerModel>(
// context,
// listen: false);
// tableManagerModel
// .getTableList(
// context,
// needLoading: false,
// );
.batchSetTable(
context, params);
print(success);
if (success) {
Utils.showToast('修改成功!');
// TableManagerModel
// tableManagerModel1 =
// Provider.of<
// TableManagerModel>(
// context,
// listen: false);
// tableManagerModel1
// .getTableList(
// context,
// needLoading: false,
// );
await tableManagerModel
.refreshTable(context);
}
},
);
}),
CommonButton(
content: "修改类型",
await tableManagerModel
.refreshTable(context);
}
},
);
}),
CommonButton(
content: "修改人数",
width: 200,
height: 72,
fontSize: 32,
... ... @@ -1301,22 +1248,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
Utils.showToast('请选择桌位');
return;
}
List<String> tableTypeS = [];
for (int i = 0;
i <
tableManagerModel
.tableTypeList.length;
i++) {
tableTypeS.add(tableManagerModel
.tableTypeList[i].name);
}
DialogUtil
.openMyTableManageModifyTableTypeDialog(
await DialogUtil
.openMyTableManageModifyTableNumDialog(
context,
tableTypeS,
personNumList,
pnumMin: '',
pnumMax: '',
onTap: (Map<String, String>
value) async {
String tid;
String tids = '';
for (t.Table item
in tableManagerModel
... ... @@ -1330,22 +1269,17 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
tids = tids.substring(
0, tids.length - 1);
}
for (int i = 0;
i <
tableManagerModel
.tableTypeList.length;
i++) {
if (value['bjtype'] ==
tableManagerModel
.tableTypeList[i].name) {
tid = tableManagerModel
.tableTypeList[i].id;
}
}
Map<String, String> params = {
'tableids': tids,
'tid': tid
};
if (value['pnumMin'] != '') {
params['table_pnum'] =
value['pnumMin'];
}
if (value['pnumMax'] != '') {
params['most_pnum'] =
value['pnumMax'];
}
bool success =
await tableManagerModel
... ... @@ -1371,100 +1305,182 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
}
},
);
},
),
],
),
VEmptyView(44),
CommonButton(
content: "删除桌位",
width: 200,
height: 72,
fontSize: 32,
state: -3,
onPress: () async {
if (tableManagerModel
.tableOuterList[
tableManagerModel.selectNumber]
.selectTables
.length ==
0) {
Utils.showToast('请选择桌位');
return;
}
String tids = '';
for (t.Table item in tableManagerModel
.tableOuterList[
tableManagerModel.selectNumber]
.selectTables) {
tids += '${item.id},';
}
if (tids.endsWith(',')) {
tids = tids.substring(0, tids.length - 1);
}
DialogUtil.cupertinoAlertDialog(context,
title: "",
content:
"是否确定删除${tids.split(',').length}个桌位",
lTitle: "取消",
rTitle: "确认删除",
isBold: true,
isBoldContent: true,
rColor: MyColours.color_E34D59,
lCallback: () {
print("取消");
}, rCallback: () async {
print("确定");
Map<String, String> params = {
'sid': Provider.of<UserModel>(context,
listen: false)
.user
.sellerid,
'tid': tids
};
bool success = await tableManagerModel
.delSellerTables(context, params);
print(success);
if (success) {
Utils.showToast('删除成功!');
// TableOuter tableOuter = TableOuter();
// tableOuter.name = value;
// tableOuter.list = [];
// tableManagerModel.tableOuterList.add(tableOuter);
// tableManagerModel.initData();
// Timer(
// Duration(milliseconds: 500),
// () => _areaController.jumpTo(
// _areaController.position.maxScrollExtent));
// await tableManagerModel
// .getTableList(context);
// await tableManagerModel
// .initData();
// TableManagerModel
// tableManagerModel =
// Provider.of<TableManagerModel>(
// context,
// listen: false);
// tableManagerModel.getTableList(
// context,
// needLoading: false,
// );
await tableManagerModel
.refreshTable(context);
}),
CommonButton(
content: "修改类型",
width: 200,
height: 72,
fontSize: 32,
onPress: () async {
if (tableManagerModel
.tableOuterList[tableManagerModel
.selectNumber]
.selectTables
.length ==
0) {
Utils.showToast('请选择桌位');
return;
}
List<String> tableTypeS = [];
for (int i = 0;
i <
tableManagerModel
.tableTypeList.length;
i++) {
tableTypeS.add(tableManagerModel
.tableTypeList[i].name);
}
});
},
),
VEmptyView(32),
],
))
: SizedBox()
DialogUtil
.openMyTableManageModifyTableTypeDialog(
context,
tableTypeS,
onTap:
(Map<String, String> value) async {
String tid;
String tids = '';
for (t.Table item in tableManagerModel
.tableOuterList[tableManagerModel
.selectNumber]
.selectTables) {
tids += '${item.id},';
}
if (tids.endsWith(',')) {
tids = tids.substring(
0, tids.length - 1);
}
for (int i = 0;
i <
tableManagerModel
.tableTypeList.length;
i++) {
if (value['bjtype'] ==
tableManagerModel
.tableTypeList[i].name) {
tid = tableManagerModel
.tableTypeList[i].id;
}
}
Map<String, String> params = {
'tableids': tids,
'tid': tid
};
bool success = await tableManagerModel
.batchSetTable(context, params);
print(success);
if (success) {
Utils.showToast('修改成功!');
// TableManagerModel
// tableManagerModel =
// Provider.of<
// TableManagerModel>(
// context,
// listen: false);
// tableManagerModel
// .getTableList(
// context,
// needLoading: false,
// );
await tableManagerModel
.refreshTable(context);
}
},
);
},
),
],
),
VEmptyView(44),
CommonButton(
content: "删除桌位",
width: 200,
height: 72,
fontSize: 32,
state: -3,
onPress: () async {
if (tableManagerModel
.tableOuterList[
tableManagerModel.selectNumber]
.selectTables
.length ==
0) {
Utils.showToast('请选择桌位');
return;
}
String tids = '';
for (t.Table item in tableManagerModel
.tableOuterList[
tableManagerModel.selectNumber]
.selectTables) {
tids += '${item.id},';
}
if (tids.endsWith(',')) {
tids = tids.substring(0, tids.length - 1);
}
DialogUtil.cupertinoAlertDialog(context,
title: "",
content:
"是否确定删除${tids.split(',').length}个桌位",
lTitle: "取消",
rTitle: "确认删除",
isBold: true,
isBoldContent: true,
rColor: MyColours.color_E34D59,
lCallback: () {
print("取消");
}, rCallback: () async {
print("确定");
Map<String, String> params = {
'sid': Provider.of<UserModel>(context,
listen: false)
.user
.sellerid,
'tid': tids
};
bool success = await tableManagerModel
.delSellerTables(context, params);
print(success);
if (success) {
Utils.showToast('删除成功!');
// TableOuter tableOuter = TableOuter();
// tableOuter.name = value;
// tableOuter.list = [];
// tableManagerModel.tableOuterList.add(tableOuter);
// tableManagerModel.initData();
// Timer(
// Duration(milliseconds: 500),
// () => _areaController.jumpTo(
// _areaController.position.maxScrollExtent));
// await tableManagerModel
// .getTableList(context);
// await tableManagerModel
// .initData();
// TableManagerModel
// tableManagerModel =
// Provider.of<TableManagerModel>(
// context,
// listen: false);
// tableManagerModel.getTableList(
// context,
// needLoading: false,
// );
await tableManagerModel
.refreshTable(context);
}
});
},
),
VEmptyView(32),
],
))
: SizedBox()
],
);
},
... ...
... ... @@ -8632,7 +8632,9 @@ class DialogUtil {
color: MyColours.color_E6000000)),
onPressed: () {
Navigator.of(context).pop();
lCallback();
if (lCallback != null) {
lCallback();
}
},
),
CupertinoDialogAction(
... ...