Commit a775b64501c30ed8a6ba9d5c08b5034d26cab2db

Authored by wdn127929
1 parent 2985f80a

消息中心自己取消的订单筛选、预订安排页经理信息未填写弹窗

... ... @@ -12,14 +12,14 @@ if (flutterRoot == null) {
}
def flutterVersionCode = "391"
def flutterVersionCode = "392"
if (flutterVersionCode == null) {
flutterVersionCode = '391'
flutterVersionCode = '392'
}
def flutterVersionName = "3.9.1"
def flutterVersionName = "3.9.2"
if (flutterVersionName == null) {
flutterVersionName = '3.9.1'
flutterVersionName = '3.9.2'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
... ...
... ... @@ -502,7 +502,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -648,7 +648,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -684,7 +684,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.9.1;
MARKETING_VERSION = 3.9.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -728,7 +728,8 @@ class InvicationPageState extends State<InvicationPage>
bool sucess = await detailModel.upReserveInfo(
context, widget.rid,
dateStr: ddateHm,
ymd: detailEntity.ddateYMD,needToast: false);
ymd: detailEntity.ddateYMD,
needToast: false);
if (sucess) {
EventBus()
... ... @@ -775,7 +776,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,needToast: false);
name: name, sex: sex, phone: phone, cusdem: remark, needToast: false);
if (sucess) {
reserverPhone = phone;
oldPhone = phone;
... ... @@ -1459,7 +1460,8 @@ class InvicationPageState extends State<InvicationPage>
await detailModel.upReserveInfo(
context, widget.rid,
actualPum:
detailModel.selectNum,needToast: false);
detailModel.selectNum,
needToast: false);
if (sucess) {
EventBus().emit(
... ... @@ -1545,7 +1547,8 @@ class InvicationPageState extends State<InvicationPage>
await detailModel.upReserveInfo(
context, widget.rid,
dateStr: ddateHm,
ymd: detailEntity.ddateYMD,needToast: false);
ymd: detailEntity.ddateYMD,
needToast: false);
if (sucess) {
EventBus().emit(
... ... @@ -2797,7 +2800,8 @@ class InvicationPageState extends State<InvicationPage>
// });
bool sucess = await detailModel.upReserveInfo(
context, widget.rid,
actualPum: detailModel.selectNum,needToast: false);
actualPum: detailModel.selectNum,
needToast: false);
if (sucess) {
EventBus().emit("refresh_tablemanager"); //刷新桌位
... ... @@ -3317,23 +3321,23 @@ class InvicationPageState extends State<InvicationPage>
// rTitle: "确定修改", lCallback: () {
// print("取消");
// }, rCallback: () {
setState(() {
String fullName =
contact.fullName.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
String phone =
contact.phoneNumber.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
if (fullName.compareTo(phone) == 0) {
fullName = '';
} else {
fullName = contact.fullName;
}
_baseIndoProvider.phoneController.text =
contact.phoneNumber.replaceAll(new RegExp(r"\s+"), "");
nameStr = fullName;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(fullName, sexStr);
});
_updateReserve();
setState(() {
String fullName =
contact.fullName.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
String phone =
contact.phoneNumber.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
if (fullName.compareTo(phone) == 0) {
fullName = '';
} else {
fullName = contact.fullName;
}
_baseIndoProvider.phoneController.text =
contact.phoneNumber.replaceAll(new RegExp(r"\s+"), "");
nameStr = fullName;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(fullName, sexStr);
});
_updateReserve();
// });
}
... ... @@ -3542,6 +3546,20 @@ class InvicationPageState extends State<InvicationPage>
});
return;
} else if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel.phone)) {
// Utils.showToast('请填写经理的联系电话');
DialogUtil.cupertinoAlertDialog(context,
title: "填写个人信息",
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
lTitle: "取消",
rTitle: "去填写",
lCallback: () {}, rCallback: () {
_goBaseInfoPage();
});
return;
} else {
/*
String dateSoltStr = '';
... ... @@ -3634,6 +3652,20 @@ class InvicationPageState extends State<InvicationPage>
erroInfo = '请正确输入11位手机号码';
});
return;
} else if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel.phone)) {
// Utils.showToast('请填写经理的联系电话');
DialogUtil.cupertinoAlertDialog(context,
title: "填写个人信息",
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
lTitle: "取消",
rTitle: "去填写",
lCallback: () {}, rCallback: () {
_goBaseInfoPage();
});
return;
} else {
setState(() {
showErroInfo = false;
... ... @@ -3698,13 +3730,22 @@ class InvicationPageState extends State<InvicationPage>
_showConfirmWidget(
needWechat: true,
callback: () async {
// if (ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel) ||
// ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel.phone)) {
// Utils.showToast('请填写经理的联系电话');
// return;
// }
if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel.phone)) {
// Utils.showToast('请填写经理的联系电话');
DialogUtil.cupertinoAlertDialog(context,
title: "填写个人信息",
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
lTitle: "取消",
rTitle: "去填写",
lCallback: () {}, rCallback: () {
_goBaseInfoPage();
});
return;
}
if (youhui != '选择优惠') {
Map<String, String> params = {
"rid": widget.rid,
... ... @@ -3749,7 +3790,15 @@ class InvicationPageState extends State<InvicationPage>
_baseIndoProvider.baseInfoSunModel) ||
ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel.phone)) {
Utils.showToast('请填写经理的联系电话');
// Utils.showToast('请填写经理的联系电话');
DialogUtil.cupertinoAlertDialog(context,
title: "填写个人信息",
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
lTitle: "取消",
rTitle: "去填写",
lCallback: () {}, rCallback: () {
_goBaseInfoPage();
});
return;
}
if (youhui != '选择优惠') {
... ...
... ... @@ -111,13 +111,13 @@ class _BaseInfoPersonnalPageState extends State<BaseInfoPersonnalPage> {
// bool success =
// await _baseIndoProvider.getCustomerActivityBaseinfo(context, params);
// if (success) {
_nameController.text = widget.sunModel.nickName;
nameStr = widget.sunModel.nickName;
_nameController.text = widget.sunModel.nickName??'';
nameStr = widget.sunModel.nickName??"";
// _uploadImageProvider.touxiang.qiniuUrl =
// _baseIndoProvider.baseInfoSunModel.photo;
// _uploadImageProvider.erweima.qiniuUrl =
// _baseIndoProvider.baseInfoSunModel.qrcode;
_phoneController.text = widget.sunModel.phone;
_phoneController.text = widget.sunModel.phone??"";
phoneStr = widget.sunModel.phone ?? '';
// _wechatController.text = _baseIndoProvider.baseInfoSunModel.wechat;
// if (_baseIndoProvider.baseInfoSunModel.wechat != null &&
... ...
... ... @@ -7,11 +7,13 @@ import 'package:one_key/models/new_unmessage_model.dart';
import 'package:one_key/net/base_resp.dart';
import 'package:one_key/net/dio_util.dart';
import 'package:one_key/net/http_url.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/utils/dialog_util.dart';
// import 'package:audioplayers/audio_cache.dart';
// import 'package:audioplayers/audioplayers.dart';
import 'package:one_key/utils/utils.dart';
import 'package:provider/provider.dart';
class MessageDialogModel extends ChangeNotifier {
final AudioCache _player = AudioCache();
... ... @@ -91,6 +93,7 @@ class MessageDialogModel extends ChangeNotifier {
messagesTemp = baseResp.data['list'].map<NewUnmessage>((value) {
return NewUnmessage.fromJson(value);
}).toList();
String uid = Provider.of<UserModel>(context, listen: false).user.openid;
messagesTemp.removeWhere((message) {
if (message.message_type.toString() == "10") {
if (message.status == "4") {
... ... @@ -98,6 +101,10 @@ class MessageDialogModel extends ChangeNotifier {
///此状态移除,不展示
return true;
}
} else if (message.message_type.toString() == "16" &&
message.uid == uid) {
//移除自己取消的订单
return true;
}
return false;
});
... ...
... ... @@ -7,7 +7,9 @@ import 'package:one_key/models/new_unmessage_model.dart';
import 'package:one_key/net/base_resp.dart';
import 'package:one_key/net/dio_util.dart';
import 'package:one_key/net/http_url.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/utils/utils.dart';
import 'package:provider/provider.dart';
class MessageModel extends ChangeNotifier {
List<NewUnmessage> messages = []; //消息
... ... @@ -56,6 +58,8 @@ class MessageModel extends ChangeNotifier {
notifyListeners();
});
if (baseResp != null && baseResp.code == Constant.status_success) {
String uid = Provider.of<UserModel>(context, listen: false).user.openid;
List<NewUnmessage> temp = [];
if (params['offset'] == "0") {
messages = baseResp.data.map<NewUnmessage>((value) {
return NewUnmessage.fromJson(value);
... ... @@ -65,6 +69,15 @@ class MessageModel extends ChangeNotifier {
return NewUnmessage.fromJson(value);
}).toList());
}
temp.addAll(messages);
messages = [];
temp.forEach((element) {
if (element.uid == uid && element.message_type == '16') {
print('object');
} else {
messages.add(element);
}
});
// if (params["type_id"] == "10") {
// //在线预订
... ... @@ -162,7 +175,9 @@ class MessageModel extends ChangeNotifier {
notifyListeners();
});
if (baseResp != null && baseResp.code == Constant.status_success) {
allUnNum = baseResp.data['count'];
int tempnum = 0;
String uid = Provider.of<UserModel>(context, listen: false).user.openid;
List<NewUnmessage> temp = [];
if (params['offset'] == "0") {
messages = baseResp.data['list'].map<NewUnmessage>((value) {
return NewUnmessage.fromJson(value);
... ... @@ -172,6 +187,21 @@ class MessageModel extends ChangeNotifier {
return NewUnmessage.fromJson(value);
}).toList());
}
temp.addAll(messages);
messages = [];
temp.forEach((element) {
if (element.uid == uid && element.message_type == '16') {
tempnum++;
} else {
messages.add(element);
}
});
if (tempnum > 0) {
allUnNum = baseResp.data['count'] - tempnum;
} else {
allUnNum = baseResp.data['count'];
}
// if(params["type_id"]=="10"){//在线预订
// messages.removeWhere((message) {
... ...
import 'package:flutter/material.dart';
class MyColours {
static const Color color_E6000000 = Color(0xE6000000);
static const Color color_99000000 = Color(0x99000000);
static const Color color_E5000000 = Color(0xE5000000);
static const Color color_005AA7 = Color(0xff005AA7);
static const Color color_FFFDE4 = Color(0xffFFFDE4);
static const Color color_2193B0 = Color(0xff2193B0);
... ...
... ... @@ -4296,7 +4296,7 @@ class DialogUtil {
static Future openAlertDialog(BuildContext context, String title,
String content, String btnTitle, double height,
{GestureTapCallback onTap, double fontSize = 36}) async {
{GestureTapCallback onTap, double fontSize = 32}) async {
final action = await showDialog(
context: context,
barrierDismissible: true,
... ... @@ -4320,8 +4320,9 @@ class DialogUtil {
alignment: Alignment.center,
child: Text(title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(fontSize),
color: MyColours.color_353535)),
color: MyColours.color_000000)),
),
VEmptyView(20),
Container(
... ... @@ -4339,8 +4340,8 @@ class DialogUtil {
child: Text(
content,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_666666,
fontSize: ScreenUtil().setSp(32),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
... ... @@ -4530,7 +4531,7 @@ class DialogUtil {
String content = "内容",
String lTitle = "取消",
String rTitle = "确定",
Color rColor = MyColours.color_199095,
Color rColor = MyColours.color_438E93,
bool isBold = false,
bool isBoldContent = false,
VoidCallback lCallback,
... ... @@ -4543,21 +4544,21 @@ class DialogUtil {
? Text(title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_353535))
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_E6000000))
: SizedBox(),
content: Text(content,
style: TextStyle(
fontWeight:
isBoldContent ? FontWeight.bold : FontWeight.normal,
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_353535)),
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_99000000)),
actions: [
CupertinoDialogAction(
child: Text(lTitle,
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_666666)),
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_E6000000)),
onPressed: () {
Navigator.of(context).pop();
lCallback();
... ... @@ -4567,7 +4568,7 @@ class DialogUtil {
child: Text(rTitle,
style: TextStyle(
fontWeight: isBold ? FontWeight.bold : FontWeight.normal,
fontSize: ScreenUtil().setSp(34),
fontSize: ScreenUtil().setSp(32),
color: rColor)),
onPressed: () {
Navigator.of(context).pop();
... ...