Commit 622ea624b9dd30cb3fd739beefabc46a1a8b503c

Authored by weixin_45529955
1 parent 8bedf33e

我的页面UI桌位合并

... ... @@ -535,7 +535,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5641;
CURRENT_PROJECT_VERSION = 5642;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -718,7 +718,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5641;
CURRENT_PROJECT_VERSION = 5642;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -744,7 +744,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5641;
CURRENT_PROJECT_VERSION = 5642;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ...
... ... @@ -72,7 +72,7 @@ class Constant {
'包间置满': [
'管理员',
'店长',
'客户经理',
// '客户经理',
],
'宴会管理': [
'管理员',
... ... @@ -86,6 +86,10 @@ class Constant {
'管理员',
'店长',
],
'桌位设置': [
'管理员',
'店长',
],
'创建宴会': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
'编辑宴会': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
'丢单': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
... ...
... ... @@ -101,7 +101,10 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
// _getSellerById();
if (Provider.of<UserModel>(context,listen: false).user!.role_name_addition == '迎宾') {
if (Provider.of<UserModel>(context, listen: false)
.user!
.role_name_addition ==
'迎宾') {
_getAuthUserLists(showLoading: false);
}
getMyPageCountData();
... ... @@ -1428,68 +1431,23 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
return;
}
if (Utils.getAuthority(
context, '桌位管理')) {
NavigatorUtil
.goMyTableManagerHomePage(
context);
context, '桌位设置')) {
NavigatorUtil.goTableHome(context);
}
},
child: _item(
outDay == '0' ||
!Utils.getAuthority(
context, '桌位管理')
? Utils.getImgPath('zwgl_un')
: Utils.getImgPath('zwgl'),
'桌位管理',
context, '桌位设置')
? Utils.getImgPath(
'table_home_un')
: Utils.getImgPath('table_home'),
'桌位设置',
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '桌位管理')),
context, '桌位设置')),
),
InkWell(
onTap: () async {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '桌位照片')) {
// Map temp =
await NavigatorUtil
.goPhotoManagerSelectTablePage(
context,
"",
DateTime.now()
.millisecondsSinceEpoch,
"1",
canChoose: true,
object: null,
fromPage: "tablePhoto",
tid: '');
// if (temp != null && temp['tid'] != '') {
// // print(temp['tid']);
// // print(temp['tname']);
// // tname = temp['tname'];
// // tid = temp['tid'];
// // _getTablePhoto(context, temp['tid'], showLoading: true)
}
},
child: _item(
outDay == '0' ||
!Utils.getAuthority(
context, '桌位照片')
? Utils.getImgPath('zwzp_un')
: Utils.getImgPath('zwzp'),
'桌位照片',
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '桌位照片')))
],
),
VEmptyView(68),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
... ... @@ -1510,6 +1468,50 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '员工管理'))),
// InkWell(
// onTap: () async {
// if (outDay == '0') {
// return;
// }
// if (Utils.getAuthority(
// context, '桌位照片')) {
// // Map temp =
// await NavigatorUtil
// .goPhotoManagerSelectTablePage(
// context,
// "",
// DateTime.now()
// .millisecondsSinceEpoch,
// "1",
// canChoose: true,
// object: null,
// fromPage: "tablePhoto",
// tid: '');
// // if (temp != null && temp['tid'] != '') {
// // // print(temp['tid']);
// // // print(temp['tname']);
// // // tname = temp['tname'];
// // // tid = temp['tid'];
// // // _getTablePhoto(context, temp['tid'], showLoading: true)
// }
// },
// child: _item(
// outDay == '0' ||
// !Utils.getAuthority(
// context, '桌位照片')
// ? Utils.getImgPath('zwzp_un')
// : Utils.getImgPath('zwzp'),
// '桌位照片',
// isRowLow: outDay == '0' ||
// !Utils.getAuthority(
// context, '桌位照片')))
],
),
VEmptyView(68),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
if (outDay == '0') {
... ... @@ -1537,56 +1539,6 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
return;
}
if (Utils.getAuthority(
context, '包间类型')) {
NavigatorUtil.goRoomTypeManagePage(
context);
}
},
child: _item(
outDay == '0' ||
!Utils.getAuthority(
context, '包间类型')
? Utils.getImgPath('bjlx_un')
: Utils.getImgPath('bjlx'),
'包间类型',
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '包间类型'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '包间置满')) {
NavigatorUtil
.goStoreTypeFillManagePage(
context);
}
},
child: _item(
outDay == '0' ||
!Utils.getAuthority(
context, '包间置满')
? Utils.getImgPath('bjzm_un')
: Utils.getImgPath('bjzm'),
'包间置满',
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '包间置满')))
],
),
VEmptyView(68),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '宴会管理')) {
NavigatorUtil.goFeastManageHomePage(
context);
... ... @@ -1648,6 +1600,56 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '评价管理'))),
// InkWell(
// onTap: () {
// if (outDay == '0') {
// return;
// }
// if (Utils.getAuthority(
// context, '包间类型')) {
// NavigatorUtil.goRoomTypeManagePage(
// context);
// }
// },
// child: _item(
// outDay == '0' ||
// !Utils.getAuthority(
// context, '包间类型')
// ? Utils.getImgPath('bjlx_un')
// : Utils.getImgPath('bjlx'),
// '包间类型',
// isRowLow: outDay == '0' ||
// !Utils.getAuthority(
// context, '包间类型'))),
// InkWell(
// onTap: () {
// if (outDay == '0') {
// return;
// }
// if (Utils.getAuthority(
// context, '包间置满')) {
// NavigatorUtil
// .goStoreTypeFillManagePage(
// context);
// }
// },
// child: _item(
// outDay == '0' ||
// !Utils.getAuthority(
// context, '包间置满')
// ? Utils.getImgPath('bjzm_un')
// : Utils.getImgPath('bjzm'),
// '包间置满',
// isRowLow: outDay == '0' ||
// !Utils.getAuthority(
// context, '包间置满')))
],
),
VEmptyView(68),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
if (outDay == '0') {
... ... @@ -1670,6 +1672,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '收银管理'))),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
],
)
],
... ...
... ... @@ -94,7 +94,7 @@ class PhotoManagerPageState extends State<PhotoManagerPage> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
// EventBus().emit('changeStatusColor');
super.dispose();
bus.off("refresh_photo_manager");
}
... ...
... ... @@ -38,7 +38,7 @@ class _RoomTypeManagePageState extends State<RoomTypeManagePage> {
@override
void dispose() {
// TODO: implement dispose
EventBus().emit('changeStatusColor');
// EventBus().emit('changeStatusColor');
super.dispose();
EventBus().off('table_manage_page');
}
... ...
... ... @@ -81,7 +81,7 @@ class StoreTypeFillManagePageState extends State<StoreTypeFillManagePage> {
void dispose() {
// TODO: implement dispose
// _calendarController.dispose();
EventBus().emit('changeStatusColor');
// EventBus().emit('changeStatusColor');
super.dispose();
}
... ... @@ -98,10 +98,10 @@ class StoreTypeFillManagePageState extends State<StoreTypeFillManagePage> {
//初始化时间
initTimeTable({bool needInit = true}) {
String? morning = "00:00-00:00"; //早市时间段
String? noon="00:00-00:00"; //午市时间段
String? night="00:00-00:00"; //晚市时间段
String? meal1="00:00-00:00"; //晚市时间段
String? meal2="00:00-00:00"; //晚市时间段
String? noon = "00:00-00:00"; //午市时间段
String? night = "00:00-00:00"; //晚市时间段
String? meal1 = "00:00-00:00"; //晚市时间段
String? meal2 = "00:00-00:00"; //晚市时间段
if (storeBaseIndoProvider.dayDateData != null &&
storeBaseIndoProvider.dayDateData!.length > 0) {
pageState = PageState.Success;
... ...
import 'package:contacts_service/contacts_service.dart';
import 'package:flutter/material.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/event_bus.dart';
import 'package:one_key/utils/screen_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/system_app_bar.dart';
/**
* 桌位设置
*/
class TableHome extends StatefulWidget {
const TableHome({super.key});
@override
State<TableHome> createState() => _TableHomeState();
}
class _TableHomeState extends State<TableHome> {
@override
void dispose() {
// TODO: implement dispose
// controller.removeListener(scheduleRebuild);
EventBus().emit('changeStatusColor');
super.dispose();
// EventBus().off("refresh_tablePhoto");
}
_item(String title, {GestureTapCallback? onTap}) {
return InkWell(
onTap: onTap,
child: Container(
height: w(48),
margin: EdgeInsets.only(top: w(12), left: w(16)),
padding: EdgeInsets.only(top: 12, bottom: 12, right: 16),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: MyColours.color_E7E7E7, width: w(0.5)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151),
),
Image.asset(
"assets/arrow_right_new.png",
width: w(7),
height: w(11),
)
],
),
));
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: SystemAppBar('桌位设置'),
backgroundColor: MyColours.color_ffffff,
body: SingleChildScrollView(
child: Column(
children: [
_item('桌位管理', onTap: () {
NavigatorUtil.goMyTableManagerHomePage(context);
}),
_item('桌位照片', onTap: () async {
await NavigatorUtil.goPhotoManagerSelectTablePage(
context, "", DateTime.now().millisecondsSinceEpoch, "1",
canChoose: true,
object: null,
fromPage: "tablePhoto",
tid: '');
}),
_item('包间类型', onTap: () {
NavigatorUtil.goRoomTypeManagePage(context);
}),
_item('包间置满', onTap: () {
NavigatorUtil.goStoreTypeFillManagePage(context);
})
],
),
),
);
}
}
... ...
... ... @@ -105,7 +105,7 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
void dispose() {
// TODO: implement dispose
// controller.removeListener(scheduleRebuild);
EventBus().emit('changeStatusColor');
// EventBus().emit('changeStatusColor');
super.dispose();
EventBus().off("refresh_table_area");
// EventBus().off("refresh_tablePhoto");
... ...
... ... @@ -1093,7 +1093,10 @@ class NavigatorUtil {
///优惠券----可发放员工
static Future<dynamic> goCouponToPersonnalPage(
BuildContext context, String? uids,
{replace = false,bool needSave = false, bool onlyShow = false,String id = ''}) {
{replace = false,
bool needSave = false,
bool onlyShow = false,
String id = ''}) {
return _navigateTo(context,
"${Routes.coupon_to_personnel_page}?uids=$uids&onlyShow=$onlyShow&needSave=$needSave&id=$id",
replace: replace);
... ... @@ -2400,28 +2403,24 @@ class NavigatorUtil {
replace: replace);
}
///会员充值交易详情
///会员充值交易详情
static Future<dynamic> goVipRecordDetailPage(
BuildContext context,
// String? status,
String? id, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.vip_record_detail_page}?id=$id",
return _navigateTo(context, "${Routes.vip_record_detail_page}?id=$id",
replace: replace);
}
///预订订金交易详情
///预订订金交易详情
static Future<dynamic> goDepositRecordDetailPage(
BuildContext context,
String? id, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.deposit_record_detail_page}?id=$id",
return _navigateTo(context, "${Routes.deposit_record_detail_page}?id=$id",
replace: replace);
}
... ... @@ -2452,26 +2451,18 @@ class NavigatorUtil {
replace: replace);
}
static Future<dynamic> goSetBirthdayPage(
BuildContext context,String? gid, String? lunar, String? solar, {
replace = false,
String from = 'store'
}) {
return _navigateTo(context, "${Routes.set_birthday_page}?gid=$gid&lunar=$lunar&solar=$solar&from=$from",
BuildContext context, String? gid, String? lunar, String? solar,
{replace = false, String from = 'store'}) {
return _navigateTo(context,
"${Routes.set_birthday_page}?gid=$gid&lunar=$lunar&solar=$solar&from=$from",
replace: replace);
}
static Future<dynamic> goTableHome(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.table_home}", replace: replace);
}
}
... ...
... ... @@ -116,6 +116,7 @@ import 'package:one_key/pages/my/store_base_info_page.dart';
import 'package:one_key/pages/my/store_base_info_page_old.dart';
import 'package:one_key/pages/my/store_type_fill_manage_page.dart';
import 'package:one_key/pages/my/store_wine_manage/create_store_wine_page.dart';
import 'package:one_key/pages/my/table_home.dart';
import 'package:one_key/pages/my/table_manage/areas_select_page.dart';
import 'package:one_key/pages/my/table_manage/my_areas_manage_page.dart';
import 'package:one_key/pages/my/table_manage/my_table_manage_home_page.dart';
... ... @@ -4265,8 +4266,8 @@ var setBirthdayPageHandle = new Handler(
String? solar = params["solar"]!.first as String;
String? lunar = params["lunar"]!.first as String;
String? from = params["from"]!.first as String;
String? from = params["from"]!.first as String;
// String status = params["status"]!.first as String;
// bool isMine =
// FluroConvertUtils.string2bool(params["isMine"]!.first as String);
... ... @@ -4280,11 +4281,12 @@ var setBirthdayPageHandle = new Handler(
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: SetBirthdayPage(
gid: gid,
birthdayLunar: lunar,
birthdaySolar: solar,
from:from
));
gid: gid, birthdayLunar: lunar, birthdaySolar: solar, from: from));
});
var tableHomeHandle = new Handler(
handlerFunc: (BuildContext? context, Map<String, List<Object>> params) {
return TableHome();
});
///支付返券
... ...
... ... @@ -429,6 +429,13 @@ class Routes {
static String set_birthday_page = "/set_birthday_page"; //客户生日
static String table_home = "/table_home"; // 桌位设置
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
... ... @@ -812,6 +819,10 @@ class Routes {
router.define(set_birthday_page, handler: setBirthdayPageHandle);
router.define(table_home, handler: tableHomeHandle);
}
}
... ...