Commit cb91e00a171cde08a9ed916405bfcdc143969d65

Authored by wdn127929
1 parent 3aff3931

预订安排页个人信息填写后刷新页面数据

... ... @@ -83,8 +83,8 @@ android {
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'arm64-v8a', 'x86_64', 'mips64' //魅族64位,不支持32位
// abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86_64','x86', 'mips', 'mips64'
// abiFilters 'arm64-v8a', 'x86_64', 'mips64' //魅族64位,不支持32位
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86_64','x86', 'mips', 'mips64'
}
lintOptions {
... ...
... ... @@ -548,20 +548,20 @@ class InvicationPageState extends State<InvicationPage>
noticeSms = detailModel.isNotice;
if (detailModel.baseInfoSunModel != null) {
_baseIndoProvider.baseInfoSunModel = detailModel.baseInfoSunModel;
name = _baseIndoProvider.baseInfoSunModel!.name;
qiniuUrl = _baseIndoProvider.baseInfoSunModel!.photo;
name = detailModel.baseInfoSunModel!.name;
qiniuUrl = detailModel.baseInfoSunModel!.photo;
// _uploadImageProvider.erweima.qiniuUrl =
// _baseIndoProvider.baseInfoSunModel.qrcode;
// detailModel.baseInfoSunModel.qrcode;
phone = _baseIndoProvider.baseInfoSunModel!.phone != null
? _baseIndoProvider.baseInfoSunModel!.phone
phone = detailModel.baseInfoSunModel!.phone != null
? detailModel.baseInfoSunModel!.phone
: '';
wechat = _baseIndoProvider.baseInfoSunModel!.wechat != null
? _baseIndoProvider.baseInfoSunModel!.wechat
wechat = detailModel.baseInfoSunModel!.wechat != null
? detailModel.baseInfoSunModel!.wechat
: '';
position = _baseIndoProvider.baseInfoSunModel!.position;
position = detailModel.baseInfoSunModel!.position;
setState(() {});
} else {
// name = '请填写姓名';
... ... @@ -1634,6 +1634,7 @@ class InvicationPageState extends State<InvicationPage>
? user!.sellerimage
: 'http://nosqn.colorcun.com/yd_person.png',
"position": '经理',
'phone':user!.sellerphone ?? ''
};
if (user!.userphone != null) {
params['phone'] = user!.userphone;
... ... @@ -1641,51 +1642,52 @@ class InvicationPageState extends State<InvicationPage>
bool isSuccess = await _baseIndoProvider
.setCustomerActivityBaseinfo(context, params, isShowLoading: false);
// _baseIndoProvider.baseInfoSunModel = null;
// detailModel.baseInfoSunModel = null;
if (isSuccess) {
name = user!.sellername;
qiniuUrl = user!.sellerimage != '' && user!.sellerimage != null
? user!.sellerimage
: 'http://nosqn.colorcun.com/yd_person.png';
// _uploadImageProvider.erweima.qiniuUrl =
// _baseIndoProvider.baseInfoSunModel.qrcode;
// detailModel.baseInfoSunModel.qrcode;
phone = user!.userphone != null ? user!.userphone : '填写电话';
position = '经理';
_getReserveDetailRelationData();
setState(() {});
}
}
_getCustomerActivityBaseinfo() async {
Map<String, String?> params = {
'sellerid': Provider.of<UserModel>(context, listen: false).user!.sellerid,
"uid": Provider.of<UserModel>(context, listen: false).user!.openid,
};
bool success = await _baseIndoProvider
.getCustomerActivityBaseinfo(context, params, isShowLoading: false);
if (success) {
name = _baseIndoProvider.baseInfoSunModel!.name;
qiniuUrl = _baseIndoProvider.baseInfoSunModel!.photo;
// _uploadImageProvider.erweima.qiniuUrl =
// _baseIndoProvider.baseInfoSunModel.qrcode;
phone = _baseIndoProvider.baseInfoSunModel!.phone != null
? _baseIndoProvider.baseInfoSunModel!.phone
: '';
wechat = _baseIndoProvider.baseInfoSunModel!.wechat != null
? _baseIndoProvider.baseInfoSunModel!.wechat
: '';
position = _baseIndoProvider.baseInfoSunModel!.position;
setState(() {});
} else {
// name = '请填写姓名';
// position = '请填写职位';
// phone = '请填写电话';
// qiniuUrl = '';
_setCustomerActivityBaseinfo();
}
}
// _getCustomerActivityBaseinfo() async {
// Map<String, String?> params = {
// 'sellerid': Provider.of<UserModel>(context, listen: false).user!.sellerid,
// "uid": Provider.of<UserModel>(context, listen: false).user!.openid,
// };
// bool success = await _baseIndoProvider
// .getCustomerActivityBaseinfo(context, params, isShowLoading: false);
// if (success) {
// name = detailModel.baseInfoSunModel!.name;
// qiniuUrl = detailModel.baseInfoSunModel!.photo;
// // _uploadImageProvider.erweima.qiniuUrl =
// // detailModel.baseInfoSunModel.qrcode;
// phone = detailModel.baseInfoSunModel!.phone != null
// ? detailModel.baseInfoSunModel!.phone
// : '';
// wechat = detailModel.baseInfoSunModel!.wechat != null
// ? detailModel.baseInfoSunModel!.wechat
// : '';
// position = detailModel.baseInfoSunModel!.position;
// setState(() {});
// } else {
// // name = '请填写姓名';
// // position = '请填写职位';
// // phone = '请填写电话';
// // qiniuUrl = '';
// _setCustomerActivityBaseinfo();
// }
// }
// _getActivityByRid() async {
// Map<String, String> params = {
... ... @@ -1809,11 +1811,12 @@ class InvicationPageState extends State<InvicationPage>
_goBaseInfoPage() async {
bool? needRefresh = await (NavigatorUtil.goBaseInfoPage(
context, FromPage.FromPageInvicationPage) as Future<bool?>);
context, FromPage.FromPageInvicationPage));
// Utils.changeStatusColor(color: Colors.transparent);
if (needRefresh != null && needRefresh) {
//刷新页面数据
_getCustomerActivityBaseinfo();
// _getCustomerActivityBaseinfo();
_getReserveDetailRelationData();
}
}
... ... @@ -4971,7 +4974,7 @@ class InvicationPageState extends State<InvicationPage>
await _getReserveDetailRelationData(showCicle: true);
//跳转
if (Platform.isIOS) {
if (reserverPhone != null) {
List<String> phoneNumber = [reserverPhone!];
try {
... ... @@ -4981,10 +4984,11 @@ class InvicationPageState extends State<InvicationPage>
} catch (error) {
print(error.toString());
}
} else {
bool sucess =
await Sendsms.onSendSMS(reserverPhone!, detailModel.smsContent!);
}
// else {
// bool sucess =
// await Sendsms.onSendSMS(reserverPhone!, detailModel.smsContent!);
// }
// }
// SmsModel smsModel = new SmsModel();
... ... @@ -5192,7 +5196,7 @@ class InvicationPageState extends State<InvicationPage>
return;
} else if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
detailModel.baseInfoSunModel) ||
ObjectUtil.isEmpty(_baseIndoProvider
.baseInfoSunModel!.phone)) {
// Utils.showToast('请填写经理的联系电话');
... ... @@ -5233,7 +5237,7 @@ class InvicationPageState extends State<InvicationPage>
// dateSoltStr +
// ',' +
// '餐厅经理' +
// _baseIndoProvider.baseInfoSunModel.name +
// detailModel.baseInfoSunModel.name +
// '已为您安排在' +
// widget.tableInfo.replaceAll("\n", "")
};
... ... @@ -5317,9 +5321,9 @@ class InvicationPageState extends State<InvicationPage>
});
return;
} else if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
detailModel.baseInfoSunModel) ||
ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel!.phone)) {
detailModel.baseInfoSunModel!.phone)) {
// Utils.showToast('请填写经理的联系电话');
DialogUtil.cupertinoAlertDialog(context,
title: "填写个人信息",
... ... @@ -5453,7 +5457,7 @@ class InvicationPageState extends State<InvicationPage>
needWechat: true,
callback: () async {
if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
detailModel.baseInfoSunModel) ||
ObjectUtil.isEmpty(_baseIndoProvider
.baseInfoSunModel!.phone)) {
// Utils.showToast('请填写经理的联系电话');
... ... @@ -5499,9 +5503,9 @@ class InvicationPageState extends State<InvicationPage>
removeOverlay();
} else {
if (ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel) ||
detailModel.baseInfoSunModel) ||
ObjectUtil.isEmpty(
_baseIndoProvider.baseInfoSunModel!.phone)) {
detailModel.baseInfoSunModel!.phone)) {
// Utils.showToast('请填写经理的联系电话');
DialogUtil.cupertinoAlertDialog(context,
title: "填写个人信息",
... ... @@ -5582,9 +5586,9 @@ class InvicationPageState extends State<InvicationPage>
// needWechat: true,
// callback: () async {
// if (ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel) ||
// detailModel.baseInfoSunModel) ||
// ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel.phone)) {
// detailModel.baseInfoSunModel.phone)) {
// Utils.showToast('请填写经理的联系电话');
// return;
// }
... ... @@ -5629,9 +5633,9 @@ class InvicationPageState extends State<InvicationPage>
// removeOverlay();
// } else {
// if (ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel) ||
// detailModel.baseInfoSunModel) ||
// ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel.phone)) {
// detailModel.baseInfoSunModel.phone)) {
// Utils.showToast('请填写经理的联系电话');
// return;
// }
... ... @@ -5744,7 +5748,7 @@ class InvicationPageState extends State<InvicationPage>
// // dateSoltStr +
// // ',' +
// // '餐厅经理' +
// // _baseIndoProvider.baseInfoSunModel.name +
// // detailModel.baseInfoSunModel.name +
// // '已为您安排在' +
// // widget.tableInfo.replaceAll("\n", "")
// };
... ... @@ -5828,7 +5832,7 @@ class InvicationPageState extends State<InvicationPage>
// // dateSoltStr +
// // ',' +
// // '餐厅经理' +
// // _baseIndoProvider.baseInfoSunModel.name +
// // detailModel.baseInfoSunModel.name +
// // '已为您安排在' +
// // widget.tableInfo.replaceAll("\n", "")
// };
... ...
... ... @@ -58,8 +58,8 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
late CustomerMakingProvider customerMakingProvider;
bool needClear = true;
String gid = '';
String andriodPhone = '';
List<String?> iosPhone = [];
// String andriodPhone = '';
List<String> iosPhone = [];
// List<TemplateModel> data = [];
... ... @@ -119,23 +119,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
}
_getPhoneAndGid() {
andriodPhone = '';
// andriodPhone = '';
iosPhone = [];
gid = '';
for (CustomerListSunModel item in customerMakingProvider.selectCustomer) {
gid += '${item.id},';
if (Platform.isIOS) {
iosPhone.add(item.phone);
} else {
andriodPhone += "${item.phone};";
// if (Platform.isIOS) {
if (item.phone != null) {
iosPhone.add(item.phone!);
}
// } else {
// andriodPhone += "${item.phone};";
// }
}
if (gid.endsWith(',')) {
gid = gid.substring(0, gid.length - 1);
}
if (!Platform.isIOS && andriodPhone.endsWith(';')) {
andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1);
}
// if (!Platform.isIOS && andriodPhone.endsWith(';')) {
// andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1);
// }
}
@override
... ... @@ -233,26 +236,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
// print('取消发送');
// }, rCallback: () async {
String message = customerMakingProvider.controller.text;
if (Platform.isIOS) {
// List<String> phoneNumber = ['18161963378', '18729572142', '18765432345'];
try {
String _result = await sendSMS(
message: message, recipients: iosPhone as List<String>);
print(_result);
} catch (error) {
print(error.toString());
}
} else {
print('确定发送');
// String phoneNumber = "18161963378;18729572142";
// if (Platform.isIOS) {
// List<String> phoneNumber = ['18161963378', '18729572142', '18765432345'];
try {
String _result =
await sendSMS(message: message, recipients: iosPhone);
print(_result);
} catch (error) {
print(error.toString());
}
// } else {
// print('确定发送');
// String phoneNumber = "18161963378;18729572142";
// await Sendsms.onGetPermission();
// await Sendsms.onGetPermission();
// if (await Sendsms.hasPermission()) {
bool suceess = await Sendsms.onSendSMS(andriodPhone, message);
print(suceess);
}
// if (await Sendsms.hasPermission()) {
// bool suceess = await Sendsms.onSendSMS(andriodPhone, message);
// print(suceess);
// }
// }
// SmsModel smsModel = new SmsModel();
... ...
... ... @@ -48,8 +48,8 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow>
late CustomerMakingProvider customerMakingProvider;
bool needClear = true;
String? gid = '';
String andriodPhone = '';
List<String?> iosPhone = [];
// String andriodPhone = '';
List<String> iosPhone = [];
@override
void initState() {
... ... @@ -126,22 +126,20 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow>
}
_getPhoneAndGid() {
andriodPhone = '';
// andriodPhone = '';
iosPhone = [];
for (CustomerListSunModel item in customerMakingProvider.selectCustomer) {
// gid += '${item.id},';
if (Platform.isIOS) {
iosPhone.add(item.phone);
} else {
andriodPhone += "${item.phone};";
if (item.phone != null) {
iosPhone.add(item.phone!);
}
}
// if (gid.endsWith(',')) {
// gid = gid.substring(0, gid.length - 1);
// }
if (!Platform.isIOS && andriodPhone.endsWith(';')) {
andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1);
}
// if (!Platform.isIOS && andriodPhone.endsWith(';')) {
// andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1);
// }
}
///客户经理营销中的用户列表
... ... @@ -234,25 +232,25 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow>
// print('取消发送');
// }, rCallback: () async {
String message = customerMakingProvider.controller.text;
bool sucess = false;
if (Platform.isIOS) {
// bool sucess = false;
// if (Platform.isIOS) {
// List<String> phoneNumber = ['18161963378', '18729572142', '18765432345'];
try {
String _result = await sendSMS(message: message, recipients: iosPhone as List<String>);
String _result = await sendSMS(message: message, recipients: iosPhone);
// sucess = _result;
} catch (error) {
print(error.toString());
}
} else {
print('确定发送');
// String phoneNumber = "18161963378;18729572142";
// } else {
// print('确定发送');
// // String phoneNumber = "18161963378;18729572142";
// await Sendsms.onGetPermission();
// // await Sendsms.onGetPermission();
// if (await Sendsms.hasPermission()) {
sucess = await Sendsms.onSendSMS(andriodPhone, message);
}
// // if (await Sendsms.hasPermission()) {
// sucess = await Sendsms.onSendSMS(andriodPhone, message);
// }
// }
// SmsModel smsModel = new SmsModel();
... ...
... ... @@ -41,7 +41,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
late MarketingCenterProvider marketingCenterProvider;
ScrollController controller = ScrollController();
String miniType = '2-3';
String miniType = '2-4';
late PageController pageController;
double? pageOffset = 0;
... ... @@ -89,9 +89,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
showLoading: false, selfDismiss: true);
if (success) {
marketingCenterProvider.pageStateSettingMini = PageState.Success;
miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-3';
miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-4';
if (miniType == '1' || miniType == '2' || miniType == '3') {
miniType = '2-3';
miniType = '2-4';
}
tilteContentC.text = marketingCenterProvider
.dzSellerConfModel!.liteStyleTitle ??
... ...
import 'dart:async';
import 'dart:convert';
import 'dart:io';
... ... @@ -109,7 +108,7 @@ class TableManagerPageState extends State<TableManagerPage> {
FocusNode _phoneNode = FocusNode();
bool showPhoneHistory = false; //显示客户历史记录
// EasyContactPicker _contactPicker = EasyContactPicker();
final FlutterNativeContactPicker _contactPicker =
final FlutterNativeContactPicker _contactPicker =
FlutterNativeContactPicker();
late BaseIndoProvider _baseIndoProvider;
int sexSelectIndex = 0;
... ... @@ -242,7 +241,8 @@ final FlutterNativeContactPicker _contactPicker =
sexStr = widget.guest!.sexStr;
}
}
_baseIndoProvider.phoneController.text = widget.guest!.phone??""; //预订人电话
_baseIndoProvider.phoneController.text =
widget.guest!.phone ?? ""; //预订人电话
nameStr = widget.guest!.rname;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(nameStr, sexStr);
... ... @@ -290,14 +290,7 @@ final FlutterNativeContactPicker _contactPicker =
":00"))) {
//过了早市,未过午市
currTimeIndex = 2;
} else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
"-" +
Utils.addZeroNumber(dateTime.month) +
"-" +
Utils.addZeroNumber(dateTime.day) +
" " +
noon!.split("-")[1] +
":00")) &&
} else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + "-" + Utils.addZeroNumber(dateTime.month) + "-" + Utils.addZeroNumber(dateTime.day) + " " + noon!.split("-")[1] + ":00")) &&
dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
"-" +
Utils.addZeroNumber(dateTime.month) +
... ... @@ -308,14 +301,7 @@ final FlutterNativeContactPicker _contactPicker =
":00"))) {
//过了午市,未过晚市
currTimeIndex = 3;
} else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
"-" +
Utils.addZeroNumber(dateTime.month) +
"-" +
Utils.addZeroNumber(dateTime.day) +
" " +
night!.split("-")[1] +
":00")) &&
} else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + "-" + Utils.addZeroNumber(dateTime.month) + "-" + Utils.addZeroNumber(dateTime.day) + " " + night!.split("-")[1] + ":00")) &&
dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
"-" +
Utils.addZeroNumber(dateTime.month) +
... ... @@ -334,14 +320,7 @@ final FlutterNativeContactPicker _contactPicker =
" " +
meal1!.split("-")[1] +
":00")) &&
dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
"-" +
Utils.addZeroNumber(dateTime.month) +
"-" +
Utils.addZeroNumber(dateTime.day) +
" " +
meal2!.split("-")[1] +
":00"))) {
dateTime.isBefore(DateTime.parse(dateTime.year.toString() + "-" + Utils.addZeroNumber(dateTime.month) + "-" + Utils.addZeroNumber(dateTime.day) + " " + meal2!.split("-")[1] + ":00"))) {
//过了午市,未过晚市
currTimeIndex = 5;
} else {
... ... @@ -490,7 +469,7 @@ final FlutterNativeContactPicker _contactPicker =
// _initTimeDdate(currTimeIndex, context);
}
getSpTableList() {
getSpTableList() {
String? tableList = App.sp!.getString('table_list_or_reserve');
if (tableList == null) {
tableManagerModel!.pageStateOrReserve = PageState.Loading;
... ... @@ -599,8 +578,8 @@ final FlutterNativeContactPicker _contactPicker =
//获取登陆人类型 只订不服
getUserAccountTypeById({bool showLoading = false}) async {
String accountType = await tableManagerModel!.getUserAccountTypeById(context,
showLoading: showLoading);
String accountType = await tableManagerModel!
.getUserAccountTypeById(context, showLoading: showLoading);
if (accountType == '3') {
_saveUser(Provider.of<UserModel>(context, listen: false)
.user!
... ... @@ -652,24 +631,26 @@ final FlutterNativeContactPicker _contactPicker =
smsContent = await Provider.of<SmsModel>(context, listen: false)
.getSmsContent(context, params);
// bool sucess = await Sendsms.onSendSMS(phone, smsContent);
if (Platform.isIOS) {
try {
// if (Platform.isIOS) {
try {
if (phone != null) {
String _result =
await sendSMS(message: smsContent!, recipients: [phone!]);
await sendSMS(message: smsContent!, recipients: [phone]);
print(_result);
} catch (error) {
print(error.toString());
}
} else {
print('确定发送');
// String phoneNumber = "18161963378;18729572142";
} catch (error) {
print(error.toString());
}
// } else {
// print('确定发送');
// // String phoneNumber = "18161963378;18729572142";
// await Sendsms.onGetPermission();
// // await Sendsms.onGetPermission();
// if (await Sendsms.hasPermission()) {
bool suceess = await Sendsms.onSendSMS(phone!, smsContent!);
print(suceess);
}
// // if (await Sendsms.hasPermission()) {
// bool suceess = await Sendsms.onSendSMS(phone!, smsContent!);
// print(suceess);
// }
}
///获取短信余量
... ... @@ -757,8 +738,8 @@ final FlutterNativeContactPicker _contactPicker =
///刷新图片显示
_refreshTablePhoto() async {
await tableManagerModel!.getTableListOrReserve(
context, currTimeIndex, dateTime, selectNumber);
await tableManagerModel!
.getTableListOrReserve(context, currTimeIndex, dateTime, selectNumber);
tableManagerModel!.notifyListeners();
}
... ... @@ -844,7 +825,8 @@ final FlutterNativeContactPicker _contactPicker =
vertical: ScreenUtil().setWidth(20),
horizontal: ScreenUtil().setWidth(10)),
shrinkWrap: true,
itemCount: tableManagerModel!.tablesOrReserveDataShow![i].tableList!.length,
itemCount:
tableManagerModel!.tablesOrReserveDataShow![i].tableList!.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
childAspectRatio: 1,
... ... @@ -885,7 +867,8 @@ final FlutterNativeContactPicker _contactPicker =
} else {
if (table.selected) {
tableManagerModel!.selectTablesOrReserve.add(table);
tableManagerModel!.tablesOrReserveDataShow!.forEach((element) {
tableManagerModel!.tablesOrReserveDataShow!
.forEach((element) {
element.tableList!.forEach((element1) {
if (element1.id == table.id) {
element1.selected = true;
... ... @@ -895,7 +878,8 @@ final FlutterNativeContactPicker _contactPicker =
} else {
tableManagerModel!.selectTablesOrReserve
.removeWhere((t) => t.id == table.id);
tableManagerModel!.tablesOrReserveDataShow!.forEach((element) {
tableManagerModel!.tablesOrReserveDataShow!
.forEach((element) {
element.tableList!.forEach((element1) {
if (element1.id == table.id) {
element1.selected = false;
... ... @@ -1098,11 +1082,11 @@ final FlutterNativeContactPicker _contactPicker =
child: Row(
children: [
HEmptyView(30),
Text(title ,
Text(title,
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151)),
Expanded(
child: Text(stateStr ,
child: Text(stateStr,
style: TextStyle(
fontSize: font(16),
color: MyColours.color_26000000))),
... ... @@ -1110,7 +1094,7 @@ final FlutterNativeContactPicker _contactPicker =
)),
Container(
margin: EdgeInsets.only(right: w(15)),
child: Text(sunString ,
child: Text(sunString,
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151)))
],
... ... @@ -1206,40 +1190,41 @@ final FlutterNativeContactPicker _contactPicker =
// }
_getContactData() async {
Contact? contact = await _contactPicker.selectPhoneNumber();
if (contact != null) {
Contact? contact = await _contactPicker.selectPhoneNumber();
if (contact != null) {
setState(() {
String? fullName =
contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "")??"";
// String? phone =
// contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// if (fullName.compareTo(phone) == 0) {
// fullName = '';
// } else {
// fullName = contact.fullName!;
// }
_baseIndoProvider.phoneController.text =
contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "")??"";
nameStr = fullName;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(fullName, _nameSuffix());
});
// setState(() {
// String fullName =
// contact?.fullName!.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// String phone =
// contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// if (fullName.compareTo(phone) == 0) {
// fullName = '';
// } else {
// fullName = contact[0].fullName!;
// }
// _baseIndoProvider.phoneController.text =
// contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+"), "");
// nameStr = fullName;
// // _homeEnterModel.nameController.text = fullName + _nameSuffix();
// _addNameSuffix(fullName, _nameSuffix());
// });
String? fullName =
contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "") ?? "";
// String? phone =
// contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// if (fullName.compareTo(phone) == 0) {
// fullName = '';
// } else {
// fullName = contact.fullName!;
// }
_baseIndoProvider.phoneController.text =
contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "") ??
"";
nameStr = fullName;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(fullName, _nameSuffix());
});
// setState(() {
// String fullName =
// contact?.fullName!.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// String phone =
// contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// if (fullName.compareTo(phone) == 0) {
// fullName = '';
// } else {
// fullName = contact[0].fullName!;
// }
// _baseIndoProvider.phoneController.text =
// contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+"), "");
// nameStr = fullName;
// // _homeEnterModel.nameController.text = fullName + _nameSuffix();
// _addNameSuffix(fullName, _nameSuffix());
// });
}
}
... ... @@ -2099,7 +2084,7 @@ final FlutterNativeContactPicker _contactPicker =
"uid": userModel.user!.openid
};
bool success = await couponProvider.addForwardAsReserve(context, params) ;
bool success = await couponProvider.addForwardAsReserve(context, params);
if (success) {
print('yes');
}
... ... @@ -2245,7 +2230,7 @@ final FlutterNativeContactPicker _contactPicker =
keyboardType: TextInputType.text,
onChanged: (value) {
setState(() {
currentRemark = value ;
currentRemark = value;
});
// if (value.length < currRemark.length &&
// currRemark.substring(value.length) != ',') {
... ... @@ -3599,7 +3584,6 @@ final FlutterNativeContactPicker _contactPicker =
}
guest.rname = nameStr; //预订人姓名
guest.sex = sex; //预订人性别:1:男 2:女
}
// }
String? pnum;
... ... @@ -3640,7 +3624,7 @@ final FlutterNativeContactPicker _contactPicker =
"rid": _model.row!.id,
"aid": '${couponProvider.couponListSelect![couponSelectIndex].id}'
};
bool isSuc = await couponProvider.setActivityAsReserve(context, params) ;
bool isSuc = await couponProvider.setActivityAsReserve(context, params);
if (isSuc) {
couponProvider.hasModify = true;
//发短信操作
... ... @@ -3936,9 +3920,10 @@ final FlutterNativeContactPicker _contactPicker =
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: index == storeBaseIndoProvider.dayDateData!.length - 1
? Colors.transparent
: MyColours.color_438E93,
color:
index == storeBaseIndoProvider.dayDateData!.length - 1
? Colors.transparent
: MyColours.color_438E93,
width: w(1),
))),
child: Text(
... ... @@ -4010,7 +3995,8 @@ final FlutterNativeContactPicker _contactPicker =
.then((day) async {
if (day != null) {
isRealAddOver = _getAddOrder(day, currTimeIndex);
if (tableManagerModel!.selectTablesOrReserve.length >
if (tableManagerModel!
.selectTablesOrReserve.length >
0) {
if (!isRealAddOver) {
Utils.showToast('不允许新建过去餐段的订单!');
... ... @@ -4345,7 +4331,6 @@ final FlutterNativeContactPicker _contactPicker =
});
setState(() {});
} else {
await tableManagerModel!
.getTableListOrReserve(
context,
... ... @@ -4430,7 +4415,8 @@ final FlutterNativeContactPicker _contactPicker =
],
),
),
if (tableManagerModel!.tablesOrReserveDataShow !=
if (tableManagerModel!
.tablesOrReserveDataShow !=
null &&
tableManagerModel!
.tablesOrReserveDataShow!.length >
... ...
... ... @@ -1293,10 +1293,8 @@ class InvicationPageSimState extends State<InvicationPageSim>
? user!.sellerimage
: 'http://nosqn.colorcun.com/yd_person.png',
"position": '经理',
'phone': user!.userphone ?? ''
};
if (user!.userphone != null) {
params['phone'] = user!.userphone;
}
bool isSuccess =
await _baseIndoProvider.setCustomerActivityBaseinfo(context, params);
... ... @@ -4244,7 +4242,7 @@ class InvicationPageSimState extends State<InvicationPageSim>
if (contact != null) {
setState(() {
String? fullName =
contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "")??'';
contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "") ?? '';
// String? phone =
// contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// if (fullName.compareTo(phone) == 0) {
... ... @@ -4253,7 +4251,8 @@ class InvicationPageSimState extends State<InvicationPageSim>
// fullName = contact.fullName!;
// }
_baseIndoProvider.phoneController.text =
contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "") ?? '';
contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "") ??
'';
nameStr = fullName;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(fullName, sexStr);
... ... @@ -4519,7 +4518,8 @@ class InvicationPageSimState extends State<InvicationPageSim>
erroInfo = '';
});
//跳转
if (Platform.isIOS) {
// if (Platform.isIOS) {
if (reserverPhone != null) {
List<String> phoneNumber = [reserverPhone!];
try {
... ... @@ -4529,10 +4529,12 @@ class InvicationPageSimState extends State<InvicationPageSim>
} catch (error) {
print(error.toString());
}
} else {
bool sucess = await Sendsms.onSendSMS(reserverPhone!, smsContent!);
}
// } else {
// bool sucess = await Sendsms.onSendSMS(reserverPhone!, smsContent!);
// }
// }
// SmsModel smsModel = new SmsModel();
// // String sms = await smsModel.getSmsContent(context, params);
... ...
... ... @@ -285,24 +285,27 @@ class TableManagerPageSimState extends State<TableManagerPageSim> {
smsContent = await Provider.of<SmsModel>(context, listen: false)
.getSmsContent(context, params);
// bool sucess = await Sendsms.onSendSMS(phone, smsContent);
if (Platform.isIOS) {
// if (Platform.isIOS) {
if (phone != null) {
try {
String _result =
await sendSMS(message: smsContent!, recipients: [phone!]);
await sendSMS(message: smsContent!, recipients: [phone]);
print(_result);
} catch (error) {
print(error.toString());
}
} else {
print('确定发送');
// String phoneNumber = "18161963378;18729572142";
}
// await Sendsms.onGetPermission();
// } else {
// print('确定发送');
// // String phoneNumber = "18161963378;18729572142";
// if (await Sendsms.hasPermission()) {
bool suceess = await Sendsms.onSendSMS(phone!, smsContent!);
print(suceess);
}
// // await Sendsms.onGetPermission();
// // if (await Sendsms.hasPermission()) {
// bool suceess = await Sendsms.onSendSMS(phone!, smsContent!);
// print(suceess);
// }
}
///获取短信余量
... ... @@ -858,7 +861,7 @@ class TableManagerPageSimState extends State<TableManagerPageSim> {
if (contact != null) {
setState(() {
String? fullName =
contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "")??'';
contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "") ?? '';
// String? phone =
// contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), "");
// if (fullName.compareTo(phone) == 0) {
... ... @@ -867,7 +870,8 @@ class TableManagerPageSimState extends State<TableManagerPageSim> {
// fullName = contact.fullName!;
// }
_baseIndoProvider.phoneController.text =
(contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), ""))??"";
(contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "")) ??
"";
nameStr = fullName;
// _homeEnterModel.nameController.text = fullName + _nameSuffix();
_addNameSuffix(fullName, _nameSuffix());
... ...
... ... @@ -3210,7 +3210,7 @@ class Utils {
//画图
// 4种情况的图分别画出来
if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') {
liteStyle = '2-3';
liteStyle = '2-4';
}
List<String> subType = liteStyle!.split('-');
String subType0 = subType[0]; //几号模版
... ...