Commit 60cb3c2c486437d518bf814dfed6df7410f92516

Authored by wdn127929
1 parent 3b591b2e

设置前台电话是否显示

... ... @@ -102,6 +102,7 @@ class MarkHomeModel {
}
class MarkReserveModel {
String swichPhone; //
String swichManager; //
String swichPark; //
String parkInfo; //
... ... @@ -123,7 +124,8 @@ class MarkReserveModel {
String lat; //
MarkReserveModel(
{this.swichManager,
{this.swichPhone,
this.swichManager,
this.swichPark,
this.parkInfo,
this.sellerName,
... ... @@ -141,6 +143,7 @@ class MarkReserveModel {
this.sellerPhone});
MarkReserveModel.fromJson(Map<String, dynamic> json) {
swichPhone = json['swich_phone'];
swichManager = json['swich_manager'];
swichPark = json['swich_park'];
... ... @@ -168,6 +171,7 @@ class MarkReserveModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['swich_phone'] = this.swichPhone;
data['swich_manager'] = this.swichManager;
data['swich_park'] = this.swichPark;
data['park_info'] = this.parkInfo;
... ... @@ -337,8 +341,7 @@ class MarkMarketingModel {
isCoupon = json['is_coupon'];
isRecharge = json['is_recharge'];
rechargeData = json['recharge_data'] != null
? new RechargeListSunModel.fromJson(
json['recharge_data'])
? new RechargeListSunModel.fromJson(json['recharge_data'])
: null;
couponData = json['coupon_data'] != null
... ...
... ... @@ -135,6 +135,7 @@ class MessageItemF extends StatelessWidget {
null,
null,
message.phone,
// '057128223456',
null,
null,
null,
... ... @@ -144,6 +145,7 @@ class MessageItemF extends StatelessWidget {
null,
null,
message.gid,
// '19358',
null,
null,
null,
... ...
... ... @@ -50,6 +50,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
StoreBaseIndoProvider _storeBaseIndoProvider;
bool addManager = false;
bool addParking = false;
bool addPhone = true;
String dateValue;
BaseIndoProvider _baseIndoProvider;
... ... @@ -74,6 +75,9 @@ class _BookInfoPageState extends State<BookInfoPage> {
getSellerTemplateConf() async {
bool success = await marketingCenterProvider.getSellerTemplateConf(context);
if (success && marketingCenterProvider.markDataModel.reserve != null) {
addPhone = marketingCenterProvider.markDataModel.reserve.swichPhone == '0'
? false
: true;
addManager =
marketingCenterProvider.markDataModel.reserve.swichManager == '1'
? true
... ... @@ -315,6 +319,12 @@ class _BookInfoPageState extends State<BookInfoPage> {
Expanded(
child: SingleChildScrollView(
child: Column(children: [
_item('展示餐厅前台电话号码', select: addPhone, onTap: () {
setState(() {
addPhone = !addPhone;
});
}),
VEmptyView(24),
_item('附加餐厅经理名片', select: addManager, onTap: () {
setState(() {
addManager = !addManager;
... ... @@ -442,7 +452,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
? _itemTitleAndSubTtile('停车', '${parkingIncoC.text}')
: SizedBox(),
addParking ? VEmptyView(10) : SizedBox(),
_itemTitleAndSubTtile('联系', '${sellerphone}'),
if (addPhone) _itemTitleAndSubTtile('联系', '${sellerphone}'),
VEmptyView(20),
addManager
? Row(
... ... @@ -592,6 +602,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
//接口
Map reserveData = {
'swich_phone': addPhone ? '1' : '0',
'swich_manager': addManager ? '1' : '0',
'swich_park': addParking ? '1' : '0',
'park_info': parkingIncoC.text,
... ...
... ... @@ -364,7 +364,8 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
? _itemTitleAndSubTtile('停车', '${reserveModel.parkInfo}')
: SizedBox(),
reserveModel.swichPark == '1' ? VEmptyView(10) : SizedBox(),
_itemTitleAndSubTtile('联系', '${reserveModel.sellerPhone}'),
if (reserveModel.swichPhone != '0')
_itemTitleAndSubTtile('联系', '${reserveModel.sellerPhone}'),
VEmptyView(20),
reserveModel.swichManager == '1'
? Row(
... ...
... ... @@ -57,7 +57,7 @@ class TableManagerModel with ChangeNotifier {
String morning; //早市时间段
String noon; //午市时间段
String night; //晚市时间段
UserModel userModel;
// UserModel userModel;
Map dailyMap = {}; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟
bool swichState = false; //仅看空座
... ... @@ -120,7 +120,7 @@ class TableManagerModel with ChangeNotifier {
// });
if (tableOuterList.length > 0) {
tableOuterList.forEach((element) {
temp.addAll(element.list??[]);
temp.addAll(element.list ?? []);
});
}
... ... @@ -165,7 +165,7 @@ class TableManagerModel with ChangeNotifier {
//初始化时间
initTime(BuildContext context) async {
userModel = Provider.of<UserModel>(context, listen: false);
UserModel userModel = Provider.of<UserModel>(context, listen: false);
dateTime = DateTime.now();
dateText = _returnDate(dateTime);
dateTimeSelect = dateTime;
... ... @@ -471,7 +471,7 @@ class TableManagerModel with ChangeNotifier {
keys = 'night';
}
if (keys != '') {
if (keys != '' && dailyMap.length > 0 && dailyMap[keys] != '') {
List temp = dailyMap[keys];
String timeStrStart = ymd + ' ' + temp.first + ':00';
String timeStrEnd = ymd + ' ' + temp.last + ':00';
... ... @@ -702,6 +702,7 @@ class TableManagerModel with ChangeNotifier {
bool selfDismiss = false}) async {
tableMap.clear();
NoteBookModel model = new NoteBookModel();
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> params = {
"sid": userModel.user.sellerid,
"rdate": _getRdate(),
... ... @@ -862,7 +863,7 @@ class TableManagerModel with ChangeNotifier {
double startDay;
//一天结束时间
double endDay;
if (keys != '') {
if (keys != '' && dailyMap.length > 0 && dailyMap[keys] != '') {
List temp = dailyMap[keys];
timeStrStart = ymd + ' ' + temp.first + ':00';
timeStrEnd = ymd + ' ' + temp.last + ':00';
... ... @@ -1115,6 +1116,7 @@ class TableManagerModel with ChangeNotifier {
//添加商家桌位区域
Future<bool> addTableAreas(BuildContext context, String name) async {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> params = {
"sellerid": userModel.user.sellerid,
"name": name
... ... @@ -1179,6 +1181,7 @@ class TableManagerModel with ChangeNotifier {
//添加商家桌位
Future<bool> addTable(
BuildContext context, Map<String, String> params) async {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
params["sellerid"] = userModel.user.sellerid;
params["tid"] = '2';
BaseResp<dynamic> baseResp = await DioUtil()
... ...
... ... @@ -1236,6 +1236,7 @@ class Utils {
String _userName = "gh_487873d353b3";
// String _path =
// "pack-cookbook/pages/success?rid=$rid&identity=2&hasOnlyShow=1";
print(data);
String _path =
"pack-cookbook/pages/success_new?cookbooklist=${json.encode(data)}&hasSuccess=1&oid=$oid&rid=$rid&identity=2&hasOnlyShow=1&sellerName=${Provider.of<UserModel>(context, listen: false).user.sellername}&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&type=2";
String _description = "OneKey";
... ...