Commit 60cb3c2c486437d518bf814dfed6df7410f92516

Authored by wdn127929
1 parent 3b591b2e

设置前台电话是否显示

@@ -102,6 +102,7 @@ class MarkHomeModel { @@ -102,6 +102,7 @@ class MarkHomeModel {
102 } 102 }
103 103
104 class MarkReserveModel { 104 class MarkReserveModel {
  105 + String swichPhone; //
105 String swichManager; // 106 String swichManager; //
106 String swichPark; // 107 String swichPark; //
107 String parkInfo; // 108 String parkInfo; //
@@ -123,7 +124,8 @@ class MarkReserveModel { @@ -123,7 +124,8 @@ class MarkReserveModel {
123 String lat; // 124 String lat; //
124 125
125 MarkReserveModel( 126 MarkReserveModel(
126 - {this.swichManager, 127 + {this.swichPhone,
  128 + this.swichManager,
127 this.swichPark, 129 this.swichPark,
128 this.parkInfo, 130 this.parkInfo,
129 this.sellerName, 131 this.sellerName,
@@ -141,6 +143,7 @@ class MarkReserveModel { @@ -141,6 +143,7 @@ class MarkReserveModel {
141 this.sellerPhone}); 143 this.sellerPhone});
142 144
143 MarkReserveModel.fromJson(Map<String, dynamic> json) { 145 MarkReserveModel.fromJson(Map<String, dynamic> json) {
  146 + swichPhone = json['swich_phone'];
144 swichManager = json['swich_manager']; 147 swichManager = json['swich_manager'];
145 swichPark = json['swich_park']; 148 swichPark = json['swich_park'];
146 149
@@ -168,6 +171,7 @@ class MarkReserveModel { @@ -168,6 +171,7 @@ class MarkReserveModel {
168 171
169 Map<String, dynamic> toJson() { 172 Map<String, dynamic> toJson() {
170 final Map<String, dynamic> data = new Map<String, dynamic>(); 173 final Map<String, dynamic> data = new Map<String, dynamic>();
  174 + data['swich_phone'] = this.swichPhone;
171 data['swich_manager'] = this.swichManager; 175 data['swich_manager'] = this.swichManager;
172 data['swich_park'] = this.swichPark; 176 data['swich_park'] = this.swichPark;
173 data['park_info'] = this.parkInfo; 177 data['park_info'] = this.parkInfo;
@@ -337,8 +341,7 @@ class MarkMarketingModel { @@ -337,8 +341,7 @@ class MarkMarketingModel {
337 isCoupon = json['is_coupon']; 341 isCoupon = json['is_coupon'];
338 isRecharge = json['is_recharge']; 342 isRecharge = json['is_recharge'];
339 rechargeData = json['recharge_data'] != null 343 rechargeData = json['recharge_data'] != null
340 - ? new RechargeListSunModel.fromJson(  
341 - json['recharge_data']) 344 + ? new RechargeListSunModel.fromJson(json['recharge_data'])
342 : null; 345 : null;
343 346
344 couponData = json['coupon_data'] != null 347 couponData = json['coupon_data'] != null
@@ -135,6 +135,7 @@ class MessageItemF extends StatelessWidget { @@ -135,6 +135,7 @@ class MessageItemF extends StatelessWidget {
135 null, 135 null,
136 null, 136 null,
137 message.phone, 137 message.phone,
  138 + // '057128223456',
138 null, 139 null,
139 null, 140 null,
140 null, 141 null,
@@ -144,6 +145,7 @@ class MessageItemF extends StatelessWidget { @@ -144,6 +145,7 @@ class MessageItemF extends StatelessWidget {
144 null, 145 null,
145 null, 146 null,
146 message.gid, 147 message.gid,
  148 + // '19358',
147 null, 149 null,
148 null, 150 null,
149 null, 151 null,
@@ -50,6 +50,7 @@ class _BookInfoPageState extends State<BookInfoPage> { @@ -50,6 +50,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
50 StoreBaseIndoProvider _storeBaseIndoProvider; 50 StoreBaseIndoProvider _storeBaseIndoProvider;
51 bool addManager = false; 51 bool addManager = false;
52 bool addParking = false; 52 bool addParking = false;
  53 + bool addPhone = true;
53 54
54 String dateValue; 55 String dateValue;
55 BaseIndoProvider _baseIndoProvider; 56 BaseIndoProvider _baseIndoProvider;
@@ -74,6 +75,9 @@ class _BookInfoPageState extends State<BookInfoPage> { @@ -74,6 +75,9 @@ class _BookInfoPageState extends State<BookInfoPage> {
74 getSellerTemplateConf() async { 75 getSellerTemplateConf() async {
75 bool success = await marketingCenterProvider.getSellerTemplateConf(context); 76 bool success = await marketingCenterProvider.getSellerTemplateConf(context);
76 if (success && marketingCenterProvider.markDataModel.reserve != null) { 77 if (success && marketingCenterProvider.markDataModel.reserve != null) {
  78 + addPhone = marketingCenterProvider.markDataModel.reserve.swichPhone == '0'
  79 + ? false
  80 + : true;
77 addManager = 81 addManager =
78 marketingCenterProvider.markDataModel.reserve.swichManager == '1' 82 marketingCenterProvider.markDataModel.reserve.swichManager == '1'
79 ? true 83 ? true
@@ -315,6 +319,12 @@ class _BookInfoPageState extends State<BookInfoPage> { @@ -315,6 +319,12 @@ class _BookInfoPageState extends State<BookInfoPage> {
315 Expanded( 319 Expanded(
316 child: SingleChildScrollView( 320 child: SingleChildScrollView(
317 child: Column(children: [ 321 child: Column(children: [
  322 + _item('展示餐厅前台电话号码', select: addPhone, onTap: () {
  323 + setState(() {
  324 + addPhone = !addPhone;
  325 + });
  326 + }),
  327 + VEmptyView(24),
318 _item('附加餐厅经理名片', select: addManager, onTap: () { 328 _item('附加餐厅经理名片', select: addManager, onTap: () {
319 setState(() { 329 setState(() {
320 addManager = !addManager; 330 addManager = !addManager;
@@ -442,7 +452,7 @@ class _BookInfoPageState extends State<BookInfoPage> { @@ -442,7 +452,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
442 ? _itemTitleAndSubTtile('停车', '${parkingIncoC.text}') 452 ? _itemTitleAndSubTtile('停车', '${parkingIncoC.text}')
443 : SizedBox(), 453 : SizedBox(),
444 addParking ? VEmptyView(10) : SizedBox(), 454 addParking ? VEmptyView(10) : SizedBox(),
445 - _itemTitleAndSubTtile('联系', '${sellerphone}'), 455 + if (addPhone) _itemTitleAndSubTtile('联系', '${sellerphone}'),
446 VEmptyView(20), 456 VEmptyView(20),
447 addManager 457 addManager
448 ? Row( 458 ? Row(
@@ -592,6 +602,7 @@ class _BookInfoPageState extends State<BookInfoPage> { @@ -592,6 +602,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
592 602
593 //接口 603 //接口
594 Map reserveData = { 604 Map reserveData = {
  605 + 'swich_phone': addPhone ? '1' : '0',
595 'swich_manager': addManager ? '1' : '0', 606 'swich_manager': addManager ? '1' : '0',
596 'swich_park': addParking ? '1' : '0', 607 'swich_park': addParking ? '1' : '0',
597 'park_info': parkingIncoC.text, 608 'park_info': parkingIncoC.text,
@@ -364,7 +364,8 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { @@ -364,7 +364,8 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
364 ? _itemTitleAndSubTtile('停车', '${reserveModel.parkInfo}') 364 ? _itemTitleAndSubTtile('停车', '${reserveModel.parkInfo}')
365 : SizedBox(), 365 : SizedBox(),
366 reserveModel.swichPark == '1' ? VEmptyView(10) : SizedBox(), 366 reserveModel.swichPark == '1' ? VEmptyView(10) : SizedBox(),
367 - _itemTitleAndSubTtile('联系', '${reserveModel.sellerPhone}'), 367 + if (reserveModel.swichPhone != '0')
  368 + _itemTitleAndSubTtile('联系', '${reserveModel.sellerPhone}'),
368 VEmptyView(20), 369 VEmptyView(20),
369 reserveModel.swichManager == '1' 370 reserveModel.swichManager == '1'
370 ? Row( 371 ? Row(
@@ -57,7 +57,7 @@ class TableManagerModel with ChangeNotifier { @@ -57,7 +57,7 @@ class TableManagerModel with ChangeNotifier {
57 String morning; //早市时间段 57 String morning; //早市时间段
58 String noon; //午市时间段 58 String noon; //午市时间段
59 String night; //晚市时间段 59 String night; //晚市时间段
60 - UserModel userModel; 60 + // UserModel userModel;
61 61
62 Map dailyMap = {}; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟 62 Map dailyMap = {}; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟
63 bool swichState = false; //仅看空座 63 bool swichState = false; //仅看空座
@@ -120,7 +120,7 @@ class TableManagerModel with ChangeNotifier { @@ -120,7 +120,7 @@ class TableManagerModel with ChangeNotifier {
120 // }); 120 // });
121 if (tableOuterList.length > 0) { 121 if (tableOuterList.length > 0) {
122 tableOuterList.forEach((element) { 122 tableOuterList.forEach((element) {
123 - temp.addAll(element.list??[]); 123 + temp.addAll(element.list ?? []);
124 }); 124 });
125 } 125 }
126 126
@@ -165,7 +165,7 @@ class TableManagerModel with ChangeNotifier { @@ -165,7 +165,7 @@ class TableManagerModel with ChangeNotifier {
165 165
166 //初始化时间 166 //初始化时间
167 initTime(BuildContext context) async { 167 initTime(BuildContext context) async {
168 - userModel = Provider.of<UserModel>(context, listen: false); 168 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
169 dateTime = DateTime.now(); 169 dateTime = DateTime.now();
170 dateText = _returnDate(dateTime); 170 dateText = _returnDate(dateTime);
171 dateTimeSelect = dateTime; 171 dateTimeSelect = dateTime;
@@ -471,7 +471,7 @@ class TableManagerModel with ChangeNotifier { @@ -471,7 +471,7 @@ class TableManagerModel with ChangeNotifier {
471 keys = 'night'; 471 keys = 'night';
472 } 472 }
473 473
474 - if (keys != '') { 474 + if (keys != '' && dailyMap.length > 0 && dailyMap[keys] != '') {
475 List temp = dailyMap[keys]; 475 List temp = dailyMap[keys];
476 String timeStrStart = ymd + ' ' + temp.first + ':00'; 476 String timeStrStart = ymd + ' ' + temp.first + ':00';
477 String timeStrEnd = ymd + ' ' + temp.last + ':00'; 477 String timeStrEnd = ymd + ' ' + temp.last + ':00';
@@ -702,6 +702,7 @@ class TableManagerModel with ChangeNotifier { @@ -702,6 +702,7 @@ class TableManagerModel with ChangeNotifier {
702 bool selfDismiss = false}) async { 702 bool selfDismiss = false}) async {
703 tableMap.clear(); 703 tableMap.clear();
704 NoteBookModel model = new NoteBookModel(); 704 NoteBookModel model = new NoteBookModel();
  705 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
705 Map<String, String> params = { 706 Map<String, String> params = {
706 "sid": userModel.user.sellerid, 707 "sid": userModel.user.sellerid,
707 "rdate": _getRdate(), 708 "rdate": _getRdate(),
@@ -862,7 +863,7 @@ class TableManagerModel with ChangeNotifier { @@ -862,7 +863,7 @@ class TableManagerModel with ChangeNotifier {
862 double startDay; 863 double startDay;
863 //一天结束时间 864 //一天结束时间
864 double endDay; 865 double endDay;
865 - if (keys != '') { 866 + if (keys != '' && dailyMap.length > 0 && dailyMap[keys] != '') {
866 List temp = dailyMap[keys]; 867 List temp = dailyMap[keys];
867 timeStrStart = ymd + ' ' + temp.first + ':00'; 868 timeStrStart = ymd + ' ' + temp.first + ':00';
868 timeStrEnd = ymd + ' ' + temp.last + ':00'; 869 timeStrEnd = ymd + ' ' + temp.last + ':00';
@@ -1115,6 +1116,7 @@ class TableManagerModel with ChangeNotifier { @@ -1115,6 +1116,7 @@ class TableManagerModel with ChangeNotifier {
1115 1116
1116 //添加商家桌位区域 1117 //添加商家桌位区域
1117 Future<bool> addTableAreas(BuildContext context, String name) async { 1118 Future<bool> addTableAreas(BuildContext context, String name) async {
  1119 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
1118 Map<String, String> params = { 1120 Map<String, String> params = {
1119 "sellerid": userModel.user.sellerid, 1121 "sellerid": userModel.user.sellerid,
1120 "name": name 1122 "name": name
@@ -1179,6 +1181,7 @@ class TableManagerModel with ChangeNotifier { @@ -1179,6 +1181,7 @@ class TableManagerModel with ChangeNotifier {
1179 //添加商家桌位 1181 //添加商家桌位
1180 Future<bool> addTable( 1182 Future<bool> addTable(
1181 BuildContext context, Map<String, String> params) async { 1183 BuildContext context, Map<String, String> params) async {
  1184 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
1182 params["sellerid"] = userModel.user.sellerid; 1185 params["sellerid"] = userModel.user.sellerid;
1183 params["tid"] = '2'; 1186 params["tid"] = '2';
1184 BaseResp<dynamic> baseResp = await DioUtil() 1187 BaseResp<dynamic> baseResp = await DioUtil()
@@ -1236,6 +1236,7 @@ class Utils { @@ -1236,6 +1236,7 @@ class Utils {
1236 String _userName = "gh_487873d353b3"; 1236 String _userName = "gh_487873d353b3";
1237 // String _path = 1237 // String _path =
1238 // "pack-cookbook/pages/success?rid=$rid&identity=2&hasOnlyShow=1"; 1238 // "pack-cookbook/pages/success?rid=$rid&identity=2&hasOnlyShow=1";
  1239 + print(data);
1239 String _path = 1240 String _path =
1240 "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"; 1241 "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";
1241 String _description = "OneKey"; 1242 String _description = "OneKey";