Commit 2985f80a75fb1e163f31fb7bd672fa1a97e40285

Authored by wdn127929
1 parent f87f61de

部分修改

... ... @@ -12,14 +12,14 @@ if (flutterRoot == null) {
}
def flutterVersionCode = "389"
def flutterVersionCode = "391"
if (flutterVersionCode == null) {
flutterVersionCode = '389'
flutterVersionCode = '391'
}
def flutterVersionName = "3.8.9"
def flutterVersionName = "3.9.1"
if (flutterVersionName == null) {
flutterVersionName = '3.8.9'
flutterVersionName = '3.9.1'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
... ...
... ... @@ -502,7 +502,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.8.8;
MARKETING_VERSION = 3.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -636,7 +636,7 @@
CURRENT_PROJECT_VERSION = 380;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = debug;
FLUTTER_BUILD_MODE = release;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
... ... @@ -648,7 +648,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.8.8;
MARKETING_VERSION = 3.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -684,7 +684,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.8.8;
MARKETING_VERSION = 3.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -104,6 +104,9 @@ class NewUnmessage extends Object {
@JsonKey(name: 'uname')
String uname;
@JsonKey(name: 'nick_name')
String nickName;
NewUnmessage(
this.id,
this.uid,
... ... @@ -123,7 +126,8 @@ class NewUnmessage extends Object {
this.cancelName,
this.status,
this.room_info,
this.uname);
this.uname,
this.nickName);
String get rnameStr {
if (rname == null || rname == '') return "";
... ...
... ... @@ -61,6 +61,7 @@ NewUnmessage _$NewUnmessageFromJson(Map<String, dynamic> json) {
json['status'] as dynamic,
json['room_info'] as dynamic,
json['uname'] as String,
json['nick_name'] as String,
);
}
... ... @@ -84,5 +85,6 @@ Map<String, dynamic> _$NewUnmessageToJson(NewUnmessage instance) =>
'cancel_name': instance.cancelName,
'status': instance.status,
'room_info': instance.room_info,
'uname': instance.uname
'uname': instance.uname,
'nick_name':instance.nickName
};
... ...
... ... @@ -353,7 +353,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> causeMap = {
"uid": userModel.user.openid,
"uname": userModel.user.account,
"uname": userModel.user.nickName,
"desc": "",
};
Map<String, String> params = {
... ...
... ... @@ -381,7 +381,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> causeMap = {
"uid": userModel.user.openid,
"uname": userModel.user.account,
"uname": userModel.user.nickName,
"desc": desc,
};
Map<String, String> params = {
... ...
... ... @@ -41,6 +41,8 @@ import 'package:provider/provider.dart';
import 'package:one_key/models/table_list.dart' as t;
import 'dart:ui' as ui;
import '../../app.dart';
class InvicationPage extends StatefulWidget {
final String rid; //预订订单id
// final String tableInfo; //桌位信息
... ... @@ -142,6 +144,7 @@ class InvicationPageState extends State<InvicationPage>
super.initState();
WidgetsBinding.instance.addObserver(this);
enterMore = App.sp.getBool("enterMore") ?? false;
personNumList = Utils.getPersonNumList();
sexList = ['先生', '女士', '公司'];
... ... @@ -725,7 +728,7 @@ class InvicationPageState extends State<InvicationPage>
bool sucess = await detailModel.upReserveInfo(
context, widget.rid,
dateStr: ddateHm,
ymd: detailEntity.ddateYMD);
ymd: detailEntity.ddateYMD,needToast: false);
if (sucess) {
EventBus()
... ... @@ -772,7 +775,7 @@ class InvicationPageState extends State<InvicationPage>
sex = '${sexList.indexOf(sexStr) + 1}';
bool sucess = await detailModel.upReserveInfo(context, widget.rid,
name: name, sex: sex, phone: phone, cusdem: remark);
name: name, sex: sex, phone: phone, cusdem: remark,needToast: false);
if (sucess) {
reserverPhone = phone;
oldPhone = phone;
... ... @@ -1304,7 +1307,7 @@ class InvicationPageState extends State<InvicationPage>
child: _buttonChoose(youhui, (value) {
if (couponsCan == null || couponsCan.length == 0) {
Utils.showToast('暂无优惠券,请创建新优惠');
return;
// return;
}
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
DialogUtil.showSelectCusmanDialog(
... ... @@ -1456,7 +1459,7 @@ class InvicationPageState extends State<InvicationPage>
await detailModel.upReserveInfo(
context, widget.rid,
actualPum:
detailModel.selectNum);
detailModel.selectNum,needToast: false);
if (sucess) {
EventBus().emit(
... ... @@ -1542,7 +1545,7 @@ class InvicationPageState extends State<InvicationPage>
await detailModel.upReserveInfo(
context, widget.rid,
dateStr: ddateHm,
ymd: detailEntity.ddateYMD);
ymd: detailEntity.ddateYMD,needToast: false);
if (sucess) {
EventBus().emit(
... ... @@ -2059,6 +2062,7 @@ class InvicationPageState extends State<InvicationPage>
setState(() {
enterMore = !enterMore;
});
App.sp.setBool("enterMore", enterMore);
},
child: Row(
children: [
... ... @@ -2793,7 +2797,7 @@ class InvicationPageState extends State<InvicationPage>
// });
bool sucess = await detailModel.upReserveInfo(
context, widget.rid,
actualPum: detailModel.selectNum);
actualPum: detailModel.selectNum,needToast: false);
if (sucess) {
EventBus().emit("refresh_tablemanager"); //刷新桌位
... ... @@ -3306,13 +3310,13 @@ class InvicationPageState extends State<InvicationPage>
_getContactData() async {
Contact contact = await _contactPicker.selectContactWithNative();
DialogUtil.cupertinoAlertDialog(context,
title: "客户信息",
content: "客户信息已修改,是否确定修改",
lTitle: "取消",
rTitle: "确定修改", lCallback: () {
print("取消");
}, rCallback: () {
// DialogUtil.cupertinoAlertDialog(context,
// title: "客户信息",
// content: "客户信息已修改,是否确定修改",
// lTitle: "取消",
// rTitle: "确定修改", lCallback: () {
// print("取消");
// }, rCallback: () {
setState(() {
String fullName =
contact.fullName.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
... ... @@ -3330,7 +3334,7 @@ class InvicationPageState extends State<InvicationPage>
_addNameSuffix(fullName, sexStr);
});
_updateReserve();
});
// });
}
_addNameSuffix(String name, String suffix) {
... ...
... ... @@ -420,7 +420,7 @@ class MessageDialogItemF extends StatelessWidget {
: Text(
message.message_type == "11"
? '取消操作人:顾客在线取消'
: '取消操作人:${message.uname}',
: '取消操作人:${message.nickName}',
style: TextStyle(
color: isTreated
? MyColours.color_BFC4D4
... ...
... ... @@ -461,7 +461,7 @@ class MessageItemF extends StatelessWidget {
: Text(
message.message_type == "11"
? '取消操作人:顾客在线取消'
: '取消操作人:${message.uname}',
: '取消操作人:${message.nickName}',
style: TextStyle(
color: isTreated
? MyColours.color_BFC4D4
... ...
... ... @@ -126,7 +126,7 @@ class NoteBookItemFState extends State<NoteBookItemF>
if (status == '4') {
Map<String, String> causeMap = {
"uid": userModel.user.openid,
"uname": userModel.user.account,
"uname": userModel.user.nickName,
"desc": desc,
};
params["cause"] = json.encode(causeMap);
... ...
... ... @@ -138,7 +138,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
if (status == '4') {
Map<String, String> causeMap = {
"uid": userModel.user.openid,
"uname": userModel.user.account,
"uname": userModel.user.nickName,
"desc": desc,
};
params["cause"] = json.encode(causeMap);
... ...
... ... @@ -388,6 +388,10 @@ class TableManagerPageState extends State<TableManagerPage> {
tableManagerModel.selectTables
.removeWhere((t) => t.id == table.id);
}
if (tableManagerModel.selectTables.length == 0) {
// wechatNotification = true;
_clearData();
}
// if (tableManagerModel.selectTables.length > 1) {
// _scrollCrl.position
// .didUpdateScrollPositionBy(0); //这里触发更新滚动条
... ... @@ -1394,32 +1398,7 @@ class TableManagerPageState extends State<TableManagerPage> {
right: ScreenUtil().setWidth(40),
child: InkWell(
onTap: () {
nameStr = '';
_baseIndoProvider.nameController.text = '';
_baseIndoProvider.phoneController.text = '';
sexSelectIndex = 0;
sexStr = '先生';
actualPnum = '选填';
ddateHm = '选填';
actualPnumIndex = null;
ddateIndex = null;
youhui = '选择优惠';
couponSelectIndex = 0;
tableManagerModel.selectTables = [];
if (showErro != '短信余额不足,请充值短信条数') {
showErro = '';
}
for (t.Table item in tableManagerModel.tablesShow) {
item.selected = false;
}
tableManagerModel.areaTableMapShow
.forEach((key, value) {
value.forEach((element) {
element.selected = false;
});
});
tableManagerModel.notifyListeners();
_clearData();
},
child: Text(
'清空',
... ... @@ -1468,6 +1447,11 @@ class TableManagerPageState extends State<TableManagerPage> {
//删除已经选择的桌位
tableManagerModel.selectTables
.removeWhere((t) => t.id == table.id);
if (tableManagerModel.selectTables.length ==
0) {
// wechatNotification = true;
_clearData();
}
for (t.Table item
in tableManagerModel.tablesShow) {
... ... @@ -1476,14 +1460,17 @@ class TableManagerPageState extends State<TableManagerPage> {
setState(() {});
}
}
for (t.Table item in tableManagerModel
.areaTableMapShow[
tableManagerModel
.areas[tableManagerModel.selectNumber]
.name]) {
if (item.id == table.id) {
item.selected = false;
setState(() {});
if (tableManagerModel.selectNumber != null) {
for (t.Table item in tableManagerModel
.areaTableMapShow[
tableManagerModel
.areas[
tableManagerModel.selectNumber]
.name]) {
if (item.id == table.id) {
item.selected = false;
setState(() {});
}
}
}
},
... ... @@ -1526,7 +1513,11 @@ class TableManagerPageState extends State<TableManagerPage> {
ObjectUtil.isNotEmpty(_model.row) &&
ObjectUtil.isNotEmpty(_model.row.id)) {
print('成功');
tableManagerModel.selectTables = [];
// tableManagerModel.selectTables = [];
// wechatNotification = true;
_clearData();
// _homeEnterModel.clearData();
bus.emit("refresh_tablemanager"); //刷新当前页面
bus.emit("refresh_book_list"); //刷新已预订列表
... ... @@ -1645,7 +1636,9 @@ class TableManagerPageState extends State<TableManagerPage> {
ObjectUtil.isNotEmpty(_model.row) &&
ObjectUtil.isNotEmpty(_model.row.id)) {
print('成功');
tableManagerModel.selectTables = [];
// tableManagerModel.selectTables = [];
// wechatNotification = true;
_clearData();
// _homeEnterModel.clearData();
bus.emit("refresh_tablemanager"); //刷新当前页面
bus.emit("refresh_book_list"); //刷新已预订列表
... ... @@ -1703,6 +1696,37 @@ class TableManagerPageState extends State<TableManagerPage> {
));
}
///清空数据
_clearData() {
nameStr = '';
_baseIndoProvider.nameController.text = '';
_baseIndoProvider.phoneController.text = '';
sexSelectIndex = 0;
sexStr = '先生';
actualPnum = '选填';
ddateHm = '选填';
actualPnumIndex = null;
ddateIndex = null;
youhui = '选择优惠';
couponSelectIndex = 0;
tableManagerModel.selectTables = [];
wechatNotification = true;
if (showErro != '短信余额不足,请充值短信条数') {
showErro = '';
}
for (t.Table item in tableManagerModel.tablesShow) {
item.selected = false;
}
tableManagerModel.areaTableMapShow.forEach((key, value) {
value.forEach((element) {
element.selected = false;
});
});
tableManagerModel.notifyListeners();
}
///选中的桌子widget
Widget _selectTableWidgetSms() {
return Container(
... ... @@ -1764,32 +1788,7 @@ class TableManagerPageState extends State<TableManagerPage> {
right: ScreenUtil().setWidth(40),
child: InkWell(
onTap: () {
nameStr = '';
_baseIndoProvider.nameController.text = '';
_baseIndoProvider.phoneController.text = '';
sexSelectIndex = 0;
sexStr = '先生';
actualPnum = '选填';
ddateHm = '选填';
actualPnumIndex = null;
ddateIndex = null;
youhui = '选择优惠';
couponSelectIndex = 0;
tableManagerModel.selectTables = [];
if (showErro != '短信余额不足,请充值短信条数') {
showErro = '';
}
for (t.Table item in tableManagerModel.tablesShow) {
item.selected = false;
}
tableManagerModel.areaTableMapShow
.forEach((key, value) {
value.forEach((element) {
element.selected = false;
});
});
tableManagerModel.notifyListeners();
_clearData();
},
child: Text(
'清空',
... ... @@ -1838,6 +1837,11 @@ class TableManagerPageState extends State<TableManagerPage> {
//删除已经选择的桌位
tableManagerModel.selectTables
.removeWhere((t) => t.id == table.id);
if (tableManagerModel.selectTables.length ==
0) {
// wechatNotification = true;
_clearData();
}
for (t.Table item
in tableManagerModel.tablesShow) {
... ... @@ -2008,7 +2012,10 @@ class TableManagerPageState extends State<TableManagerPage> {
ObjectUtil.isNotEmpty(_model.row) &&
ObjectUtil.isNotEmpty(_model.row.id)) {
print('成功');
tableManagerModel.selectTables = [];
// tableManagerModel.selectTables = [];
// wechatNotification = true;
_clearData();
// _homeEnterModel.clearData();
bus.emit("refresh_tablemanager"); //刷新当前页面
bus.emit("refresh_book_list"); //刷新已预订列表
... ...
... ... @@ -200,7 +200,8 @@ class NotebookDetailModel extends ChangeNotifier {
String name,
String phone,
String ymd,
bool showLoading = false}) async {
bool showLoading = false,
bool needToast = true}) async {
Map<String, dynamic> params = {
"rid": rid,
};
... ... @@ -227,10 +228,10 @@ class NotebookDetailModel extends ChangeNotifier {
if (phone != null && phone != '') {
params['phone'] = phone;
}
bool sucess =
await _upReserveInfo(context, params, showLoading: showLoading);
bool sucess = await _upReserveInfo(context, params,
showLoading: showLoading, needToast: needToast);
if (sucess) {
if (!showLoading) {
if (!showLoading && needToast) {
Utils.showToast("修改成功!");
}
... ... @@ -240,7 +241,7 @@ class NotebookDetailModel extends ChangeNotifier {
}
Future<bool> _upReserveInfo(BuildContext context, Map<String, dynamic> params,
{ifPush = true, showLoading = false}) async {
{ifPush = true, showLoading = false, bool needToast = true}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.up_reserve_info,
data: params, showLoading: showLoading)
... ... @@ -251,7 +252,10 @@ class NotebookDetailModel extends ChangeNotifier {
if (baseResp.code == Constant.status_success && baseResp.data != null) {
return true;
} else {
Utils.showToast(baseResp.msg);
if (needToast) {
Utils.showToast(baseResp.msg);
}
return false;
}
}
... ...