Commit c10e6361d5f640fe3a8028970cba6638ea69c02b

Authored by wdn127929
1 parent 5fddba11

纪念日提醒配置&生日配置

  1 +// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
  2 +// This is a library that looks up messages for specific locales by
  3 +// delegating to the appropriate library.
  4 +
  5 +// Ignore issues from commonly used lints in this file.
  6 +// ignore_for_file:implementation_imports, file_names, unnecessary_new
  7 +// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
  8 +// ignore_for_file:argument_type_not_assignable, invalid_assignment
  9 +// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
  10 +// ignore_for_file:comment_references
  11 +
  12 +import 'dart:async';
  13 +
  14 +import 'package:intl/intl.dart';
  15 +import 'package:intl/message_lookup_by_library.dart';
  16 +import 'package:intl/src/intl_helpers.dart';
  17 +
  18 +import 'messages_en.dart' as messages_en;
  19 +
  20 +typedef Future<dynamic> LibraryLoader();
  21 +Map<String, LibraryLoader> _deferredLibraries = {
  22 + 'en': () => new Future.value(null),
  23 +};
  24 +
  25 +MessageLookupByLibrary _findExact(String localeName) {
  26 + switch (localeName) {
  27 + case 'en':
  28 + return messages_en.messages;
  29 + default:
  30 + return null;
  31 + }
  32 +}
  33 +
  34 +/// User programs should call this before using [localeName] for messages.
  35 +Future<bool> initializeMessages(String localeName) async {
  36 + var availableLocale = Intl.verifiedLocale(
  37 + localeName,
  38 + (locale) => _deferredLibraries[locale] != null,
  39 + onFailure: (_) => null);
  40 + if (availableLocale == null) {
  41 + return new Future.value(false);
  42 + }
  43 + var lib = _deferredLibraries[availableLocale];
  44 + await (lib == null ? new Future.value(false) : lib());
  45 + initializeInternalMessageLookup(() => new CompositeMessageLookup());
  46 + messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
  47 + return new Future.value(true);
  48 +}
  49 +
  50 +bool _messagesExistFor(String locale) {
  51 + try {
  52 + return _findExact(locale) != null;
  53 + } catch (e) {
  54 + return false;
  55 + }
  56 +}
  57 +
  58 +MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
  59 + var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
  60 + onFailure: (_) => null);
  61 + if (actualLocale == null) return null;
  62 + return _findExact(actualLocale);
  63 +}
  1 +// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
  2 +// This is a library that provides messages for a en locale. All the
  3 +// messages from the main program should be duplicated here with the same
  4 +// function name.
  5 +
  6 +// Ignore issues from commonly used lints in this file.
  7 +// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
  8 +// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
  9 +// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
  10 +// ignore_for_file:unused_import, file_names
  11 +
  12 +import 'package:intl/intl.dart';
  13 +import 'package:intl/message_lookup_by_library.dart';
  14 +
  15 +final messages = new MessageLookup();
  16 +
  17 +typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
  18 +
  19 +class MessageLookup extends MessageLookupByLibrary {
  20 + String get localeName => 'en';
  21 +
  22 + final messages = _notInlinedMessages(_notInlinedMessages);
  23 + static _notInlinedMessages(_) => <String, Function> {
  24 +
  25 + };
  26 +}
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +import 'package:flutter/material.dart';
  3 +import 'package:intl/intl.dart';
  4 +import 'intl/messages_all.dart';
  5 +
  6 +// **************************************************************************
  7 +// Generator: Flutter Intl IDE plugin
  8 +// Made by Localizely
  9 +// **************************************************************************
  10 +
  11 +// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
  12 +// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
  13 +// ignore_for_file: avoid_redundant_argument_values
  14 +
  15 +class S {
  16 + S();
  17 +
  18 + static S current;
  19 +
  20 + static const AppLocalizationDelegate delegate =
  21 + AppLocalizationDelegate();
  22 +
  23 + static Future<S> load(Locale locale) {
  24 + final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString();
  25 + final localeName = Intl.canonicalizedLocale(name);
  26 + return initializeMessages(localeName).then((_) {
  27 + Intl.defaultLocale = localeName;
  28 + S.current = S();
  29 +
  30 + return S.current;
  31 + });
  32 + }
  33 +
  34 + static S of(BuildContext context) {
  35 + return Localizations.of<S>(context, S);
  36 + }
  37 +
  38 +
  39 +}
  40 +
  41 +class AppLocalizationDelegate extends LocalizationsDelegate<S> {
  42 + const AppLocalizationDelegate();
  43 +
  44 + List<Locale> get supportedLocales {
  45 + return const <Locale>[
  46 + Locale.fromSubtags(languageCode: 'en'),
  47 + ];
  48 + }
  49 +
  50 + @override
  51 + bool isSupported(Locale locale) => _isSupported(locale);
  52 + @override
  53 + Future<S> load(Locale locale) => S.load(locale);
  54 + @override
  55 + bool shouldReload(AppLocalizationDelegate old) => false;
  56 +
  57 + bool _isSupported(Locale locale) {
  58 + if (locale != null) {
  59 + for (var supportedLocale in supportedLocales) {
  60 + if (supportedLocale.languageCode == locale.languageCode) {
  61 + return true;
  62 + }
  63 + }
  64 + }
  65 + return false;
  66 + }
  67 +}
@@ -103,11 +103,21 @@ class Guest extends Object { @@ -103,11 +103,21 @@ class Guest extends Object {
103 @JsonKey(name: 'is_member') 103 @JsonKey(name: 'is_member')
104 String isMember; 104 String isMember;
105 105
  106 + @JsonKey(name: 'c_day_self')
  107 + String cDaySelf;
  108 +
106 String get rnameStr { 109 String get rnameStr {
107 if (rname == null || rname == '' || rname == ' ') return ""; 110 if (rname == null || rname == '' || rname == ' ') return "";
108 return rname; 111 return rname;
109 } 112 }
110 113
  114 + String get cdaySelfStr {
  115 + if (cDaySelf == null || cDaySelf == '') return '';
  116 + return DateUtil.formatDate(
  117 + DateTime.fromMillisecondsSinceEpoch(int.parse(cDaySelf) * 1000),
  118 + format: DateFormats.y_mo_d);
  119 + }
  120 +
111 String get sexStr { 121 String get sexStr {
112 if (sex == null || sex == '' || sex == '0') return "先生"; 122 if (sex == null || sex == '' || sex == '0') return "先生";
113 switch (sex.toString()) { 123 switch (sex.toString()) {
@@ -146,7 +156,8 @@ class Guest extends Object { @@ -146,7 +156,8 @@ class Guest extends Object {
146 this.udate, 156 this.udate,
147 this.label, 157 this.label,
148 this.nickName, 158 this.nickName,
149 - this.isMember); 159 + this.isMember,
  160 + this.cDaySelf);
150 161
151 factory Guest.fromJson(Map<String, dynamic> srcJson) => 162 factory Guest.fromJson(Map<String, dynamic> srcJson) =>
152 _$GuestFromJson(srcJson); 163 _$GuestFromJson(srcJson);
@@ -76,6 +76,7 @@ Guest _$GuestFromJson(Map<String, dynamic> json) { @@ -76,6 +76,7 @@ Guest _$GuestFromJson(Map<String, dynamic> json) {
76 json['label'] as String, 76 json['label'] as String,
77 json['nick_name'] as String, 77 json['nick_name'] as String,
78 json['is_member'] as String, 78 json['is_member'] as String,
  79 + json['c_day_self'] as String,
79 ); 80 );
80 } 81 }
81 82
@@ -97,7 +98,8 @@ Map<String, dynamic> _$GuestToJson(Guest instance) => <String, dynamic>{ @@ -97,7 +98,8 @@ Map<String, dynamic> _$GuestToJson(Guest instance) => <String, dynamic>{
97 'udate': instance.udate, 98 'udate': instance.udate,
98 'label': instance.label, 99 'label': instance.label,
99 'nick_name': instance.nickName, 100 'nick_name': instance.nickName,
100 - 'is_member': instance.isMember 101 + 'is_member': instance.isMember,
  102 + 'c_day_self': instance.cDaySelf
101 }; 103 };
102 104
103 Cday _$CdayFromJson(Map<String, dynamic> json) { 105 Cday _$CdayFromJson(Map<String, dynamic> json) {
  1 +class SaiYouYunBirthdayModel {
  2 + final int ret;
  3 + final List<SaiYouYunBirthdaySunModel> data;
  4 + final String msg;
  5 + const SaiYouYunBirthdayModel({this.ret, this.data, this.msg});
  6 + SaiYouYunBirthdayModel copyWith(
  7 + {int ret, List<SaiYouYunBirthdaySunModel> data, String msg}) {
  8 + return SaiYouYunBirthdayModel(
  9 + ret: ret ?? this.ret, data: data ?? this.data, msg: msg ?? this.msg);
  10 + }
  11 +
  12 + Map<String, Object> toJson() {
  13 + return {
  14 + 'ret': ret,
  15 + 'data': data?.map<Map<String, dynamic>>((data) => data.toJson()).toList(),
  16 + 'msg': msg
  17 + };
  18 + }
  19 +
  20 + static SaiYouYunBirthdayModel fromJson(Map<String, Object> json) {
  21 + return SaiYouYunBirthdayModel(
  22 + ret: json['ret'] == null ? null : json['ret'] as int,
  23 + data: json['data'] == null
  24 + ? null
  25 + : (json['data'] as List)
  26 + .map<SaiYouYunBirthdaySunModel>((data) =>
  27 + SaiYouYunBirthdaySunModel.fromJson(
  28 + data as Map<String, Object>))
  29 + .toList(),
  30 + msg: json['msg'] == null ? null : json['msg'] as String);
  31 + }
  32 +
  33 + @override
  34 + String toString() {
  35 + return '''SaiYouYunBirthdayModel(
  36 + ret:$ret,
  37 +data:${data.toString()},
  38 +msg:$msg
  39 + ) ''';
  40 + }
  41 +
  42 + @override
  43 + bool operator ==(Object other) {
  44 + return other is SaiYouYunBirthdayModel &&
  45 + other.runtimeType == runtimeType &&
  46 + other.ret == ret &&
  47 + other.data == data &&
  48 + other.msg == msg;
  49 + }
  50 +
  51 + @override
  52 + int get hashCode {
  53 + return Object.hash(runtimeType, ret, data, msg);
  54 + }
  55 +}
  56 +
  57 +class SaiYouYunBirthdaySunModel {
  58 + final String id;
  59 + final String templateCode;
  60 + final String templateParam;
  61 + final dynamic templateDemo;
  62 + final String type;
  63 + final dynamic bestwish;
  64 + const SaiYouYunBirthdaySunModel({
  65 + this.id,
  66 + this.templateCode,
  67 + this.templateParam,
  68 + this.templateDemo,
  69 + this.type,
  70 + this.bestwish,
  71 + });
  72 + SaiYouYunBirthdaySunModel copyWith({
  73 + String id,
  74 + String templateCode,
  75 + String templateParam,
  76 + dynamic templateDemo,
  77 + String type,
  78 + dynamic bestwish,
  79 + }) {
  80 + return SaiYouYunBirthdaySunModel(
  81 + id: id ?? this.id,
  82 + templateCode: templateCode ?? this.templateCode,
  83 + templateParam: templateParam ?? this.templateParam,
  84 + templateDemo: templateDemo ?? this.templateDemo,
  85 + type: type ?? this.type,
  86 + bestwish: bestwish ?? this.bestwish,
  87 + );
  88 + }
  89 +
  90 + Map<String, Object> toJson() {
  91 + return {
  92 + 'id': id,
  93 + 'template_code': templateCode,
  94 + 'template_param': templateParam,
  95 + 'template_demo': templateDemo,
  96 + 'type': type,
  97 + 'bestwish': bestwish
  98 + };
  99 + }
  100 +
  101 + static SaiYouYunBirthdaySunModel fromJson(Map<String, Object> json) {
  102 + return SaiYouYunBirthdaySunModel(
  103 + id: json['id'] == null ? null : json['id'] as String,
  104 + templateCode: json['template_code'] == null
  105 + ? null
  106 + : json['template_code'] as String,
  107 + templateParam: json['template_param'] == null
  108 + ? null
  109 + : json['template_param'] as String,
  110 + templateDemo: json['template_demo'] as dynamic,
  111 + type: json['type'] == null ? null : json['type'] as String,
  112 + bestwish: json['bestwish'] as dynamic);
  113 + }
  114 +
  115 + @override
  116 + String toString() {
  117 + return '''Data(
  118 + id:$id,
  119 +templateCode:$templateCode,
  120 +templateParam:$templateParam,
  121 +templateDemo:$templateDemo,
  122 +type:$type,
  123 +bestwish:$bestwish
  124 + ) ''';
  125 + }
  126 +
  127 + @override
  128 + bool operator ==(Object other) {
  129 + return other is SaiYouYunBirthdaySunModel &&
  130 + other.runtimeType == runtimeType &&
  131 + other.id == id &&
  132 + other.templateCode == templateCode &&
  133 + other.templateParam == templateParam &&
  134 + other.templateDemo == templateDemo &&
  135 + other.type == type &&
  136 + other.bestwish == bestwish;
  137 + }
  138 +
  139 + @override
  140 + int get hashCode {
  141 + return Object.hash(runtimeType, id, templateCode, templateParam,
  142 + templateDemo, type, bestwish);
  143 + }
  144 +}
  1 +class SellerGuestModel {
  2 + final int ret;
  3 + final SellerGuestSunModel data;
  4 + final String msg;
  5 + const SellerGuestModel({this.ret, this.data, this.msg});
  6 + SellerGuestModel copyWith({int ret, SellerGuestSunModel data, String msg}) {
  7 + return SellerGuestModel(
  8 + ret: ret ?? this.ret, data: data ?? this.data, msg: msg ?? this.msg);
  9 + }
  10 +
  11 + Map<String, Object> toJson() {
  12 + return {'ret': ret, 'data': data?.toJson(), 'msg': msg};
  13 + }
  14 +
  15 + static SellerGuestModel fromJson(Map<String, Object> json) {
  16 + return SellerGuestModel(
  17 + ret: json['ret'] == null ? null : json['ret'] as int,
  18 + data: json['data'] == null
  19 + ? null
  20 + : SellerGuestSunModel.fromJson(json['data'] as Map<String, Object>),
  21 + msg: json['msg'] == null ? null : json['msg'] as String);
  22 + }
  23 +
  24 + @override
  25 + String toString() {
  26 + return '''SellerGuestModel(
  27 + ret:$ret,
  28 +data:${data.toString()},
  29 +msg:$msg
  30 + ) ''';
  31 + }
  32 +
  33 + @override
  34 + bool operator ==(Object other) {
  35 + return other is SellerGuestModel &&
  36 + other.runtimeType == runtimeType &&
  37 + other.ret == ret &&
  38 + other.data == data &&
  39 + other.msg == msg;
  40 + }
  41 +
  42 + @override
  43 + int get hashCode {
  44 + return Object.hash(runtimeType, ret, data, msg);
  45 + }
  46 +}
  47 +
  48 +class SellerGuestSunModel {
  49 + final String id;
  50 + final String sellerid;
  51 + final String isAdditional;
  52 + final String isEnterSelf;
  53 + final dynamic birthdayAdvNotice;
  54 + final dynamic birthdayAdvNoticeSms;
  55 + final dynamic birthdayNotice;
  56 + final dynamic birthdayNoticeDay;
  57 + final dynamic commemorationDay;
  58 + final dynamic commemorationNotice;
  59 + const SellerGuestSunModel(
  60 + {this.id,
  61 + this.sellerid,
  62 + this.isAdditional,
  63 + this.isEnterSelf,
  64 + this.birthdayAdvNotice,
  65 + this.birthdayAdvNoticeSms,
  66 + this.birthdayNotice,
  67 + this.birthdayNoticeDay,
  68 + this.commemorationDay,
  69 + this.commemorationNotice});
  70 + SellerGuestSunModel copyWith(
  71 + {String id,
  72 + String sellerid,
  73 + String isAdditional,
  74 + String isEnterSelf,
  75 + dynamic birthdayAdvNotice,
  76 + dynamic birthdayAdvNoticeSms,
  77 + dynamic birthdayNotice,
  78 + dynamic birthdayNoticeDay,
  79 + dynamic commemorationDay,
  80 + dynamic commemorationNotice}) {
  81 + return SellerGuestSunModel(
  82 + id: id ?? this.id,
  83 + sellerid: sellerid ?? this.sellerid,
  84 + isAdditional: isAdditional ?? this.isAdditional,
  85 + isEnterSelf: isEnterSelf ?? this.isEnterSelf,
  86 + birthdayAdvNotice: birthdayAdvNotice ?? this.birthdayAdvNotice,
  87 + birthdayAdvNoticeSms: birthdayAdvNoticeSms ?? this.birthdayAdvNoticeSms,
  88 + birthdayNotice: birthdayNotice ?? this.birthdayNotice,
  89 + birthdayNoticeDay: birthdayNoticeDay ?? this.birthdayNoticeDay,
  90 + commemorationDay: commemorationDay ?? this.commemorationDay,
  91 + commemorationNotice: commemorationNotice ?? this.commemorationNotice);
  92 + }
  93 +
  94 + Map<String, Object> toJson() {
  95 + return {
  96 + 'id': id,
  97 + 'sellerid': sellerid,
  98 + 'is_additional': isAdditional,
  99 + 'is_enter_self': isEnterSelf,
  100 + 'birthday_adv_notice': birthdayAdvNotice,
  101 + 'birthday_adv_notice_sms': birthdayAdvNoticeSms,
  102 + 'birthday_notice': birthdayNotice,
  103 + 'birthday_notice_day': birthdayNoticeDay,
  104 + 'commemoration_day': commemorationDay,
  105 + 'commemoration_notice': commemorationNotice
  106 + };
  107 + }
  108 +
  109 + static SellerGuestSunModel fromJson(Map<String, Object> json) {
  110 + return SellerGuestSunModel(
  111 + id: json['id'] == null ? null : json['id'] as String,
  112 + sellerid: json['sellerid'] == null ? null : json['sellerid'] as String,
  113 + isAdditional: json['is_additional'] == null
  114 + ? null
  115 + : json['is_additional'] as String,
  116 + isEnterSelf: json['is_enter_self'] == null
  117 + ? null
  118 + : json['is_enter_self'] as String,
  119 + birthdayAdvNotice: json['birthday_adv_notice'] as dynamic,
  120 + birthdayAdvNoticeSms: json['birthday_adv_notice_sms'] as dynamic,
  121 + birthdayNotice: json['birthday_notice'] as dynamic,
  122 + birthdayNoticeDay: json['birthday_notice_day'] as dynamic,
  123 + commemorationDay: json['commemoration_day'] as dynamic,
  124 + commemorationNotice: json['commemoration_notice'] as dynamic);
  125 + }
  126 +
  127 + @override
  128 + String toString() {
  129 + return '''Data(
  130 + id:$id,
  131 +sellerid:$sellerid,
  132 +isAdditional:$isAdditional,
  133 +isEnterSelf:$isEnterSelf,
  134 +birthdayAdvNotice:$birthdayAdvNotice,
  135 +birthdayAdvNoticeSms:$birthdayAdvNoticeSms,
  136 +birthdayNotice:$birthdayNotice,
  137 +birthdayNoticeDay:$birthdayNoticeDay,
  138 +commemorationDay:$commemorationDay,
  139 +commemorationNotice:$commemorationNotice
  140 + ) ''';
  141 + }
  142 +
  143 + @override
  144 + bool operator ==(Object other) {
  145 + return other is SellerGuestSunModel &&
  146 + other.runtimeType == runtimeType &&
  147 + other.id == id &&
  148 + other.sellerid == sellerid &&
  149 + other.isAdditional == isAdditional &&
  150 + other.isEnterSelf == isEnterSelf &&
  151 + other.birthdayAdvNotice == birthdayAdvNotice &&
  152 + other.birthdayAdvNoticeSms == birthdayAdvNoticeSms &&
  153 + other.birthdayNotice == birthdayNotice &&
  154 + other.birthdayNoticeDay == birthdayNoticeDay &&
  155 + other.commemorationDay == commemorationDay &&
  156 + other.commemorationNotice == commemorationNotice;
  157 + }
  158 +
  159 + @override
  160 + int get hashCode {
  161 + return Object.hash(
  162 + runtimeType,
  163 + id,
  164 + sellerid,
  165 + isAdditional,
  166 + isEnterSelf,
  167 + birthdayAdvNotice,
  168 + birthdayAdvNoticeSms,
  169 + birthdayNotice,
  170 + birthdayNoticeDay,
  171 + commemorationDay,
  172 + commemorationNotice);
  173 + }
  174 +}
@@ -583,6 +583,16 @@ class HttpUrl { @@ -583,6 +583,16 @@ class HttpUrl {
583 583
584 static const get_meal_section_by_day = 584 static const get_meal_section_by_day =
585 "?service=App.Seller.getMealSectionByDay"; // 获取日期对应的时段 585 "?service=App.Seller.getMealSectionByDay"; // 获取日期对应的时段
  586 + static const get_sai_you_yun_birthday_temp =
  587 + "?service=App.GuestManage.GetSaiYouYunBirthdayTemp"; // 获取客户生日提醒短信模板配置内容
  588 +
  589 + static const set_sai_you_yun_birthday =
  590 + "?service=App.GuestManage.SetSaiYouYunBirthday"; // 客户生日提醒短信模板
  591 +
  592 +
  593 +
  594 +
  595 +
586 596
587 597
588 598
  1 +import 'package:common_utils/common_utils.dart';
1 import 'package:flutter/material.dart'; 2 import 'package:flutter/material.dart';
  3 +import 'package:flutter_picker/Picker.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/constant/state.dart'; 5 import 'package:one_key/constant/state.dart';
4 import 'package:one_key/models/customer_list_model.dart'; 6 import 'package:one_key/models/customer_list_model.dart';
@@ -40,7 +42,8 @@ class MyCustomerDetailPage extends StatefulWidget { @@ -40,7 +42,8 @@ class MyCustomerDetailPage extends StatefulWidget {
40 class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { 42 class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
41 ScrollController controller = ScrollController(); 43 ScrollController controller = ScrollController();
42 CustomerProvider customerProvider; 44 CustomerProvider customerProvider;
43 - 45 + String birthday = '';
  46 + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
44 @override 47 @override
45 void initState() { 48 void initState() {
46 super.initState(); 49 super.initState();
@@ -66,6 +69,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -66,6 +69,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
66 'phone': widget.userHistoryEntity.phone 69 'phone': widget.userHistoryEntity.phone
67 }; 70 };
68 await customerProvider.getGuestInfo(context, params); 71 await customerProvider.getGuestInfo(context, params);
  72 + birthday = customerProvider.guestInfoSunModel.guest.cdaySelfStr;
  73 + setState(() {});
69 // await customerProvider.searchData(customerProvider.controller.text); 74 // await customerProvider.searchData(customerProvider.controller.text);
70 } 75 }
71 76
@@ -189,7 +194,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -189,7 +194,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
189 )), 194 )),
190 ], 195 ],
191 ), 196 ),
192 - customerProvider.guestInfoSunModel.guest.label != null &&customerProvider.guestInfoSunModel.guest.label != '' 197 + customerProvider.guestInfoSunModel.guest.label != null &&
  198 + customerProvider.guestInfoSunModel.guest.label != ''
193 ? Container( 199 ? Container(
194 padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)), 200 padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)),
195 constraints: 201 constraints:
@@ -289,7 +295,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -289,7 +295,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
289 fontSize: ScreenUtil().setSp(20))))); 295 fontSize: ScreenUtil().setSp(20)))));
290 } 296 }
291 297
292 - if (customerProvider.guestInfoSunModel.guest.label != null&&customerProvider.guestInfoSunModel.guest.label != '') { 298 + if (customerProvider.guestInfoSunModel.guest.label != null &&
  299 + customerProvider.guestInfoSunModel.guest.label != '') {
293 List<String> labels = 300 List<String> labels =
294 customerProvider.guestInfoSunModel.guest.label.split(','); 301 customerProvider.guestInfoSunModel.guest.label.split(',');
295 labels.forEach((element) { 302 labels.forEach((element) {
@@ -579,15 +586,18 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -579,15 +586,18 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
579 crossAxisAlignment: WrapCrossAlignment.center, 586 crossAxisAlignment: WrapCrossAlignment.center,
580 children: [ 587 children: [
581 Text( 588 Text(
582 - customerProvider.guestInfoSunModel.last?.ddate == null ? '': Utils.formatFromMill(  
583 - customerProvider.guestInfoSunModel.last?.ddate), 589 + customerProvider.guestInfoSunModel.last?.ddate == null
  590 + ? ''
  591 + : Utils.formatFromMill(
  592 + customerProvider.guestInfoSunModel.last?.ddate),
584 overflow: TextOverflow.ellipsis, 593 overflow: TextOverflow.ellipsis,
585 style: TextStyle( 594 style: TextStyle(
586 fontSize: ScreenUtil().setSp(20), 595 fontSize: ScreenUtil().setSp(20),
587 color: MyColours.color_E34D59), 596 color: MyColours.color_E34D59),
588 ), 597 ),
589 Text( 598 Text(
590 - customerProvider.guestInfoSunModel.last?.ddateSoltStr??"", 599 + customerProvider.guestInfoSunModel.last?.ddateSoltStr ??
  600 + "",
591 style: TextStyle( 601 style: TextStyle(
592 fontSize: ScreenUtil().setSp(20), 602 fontSize: ScreenUtil().setSp(20),
593 color: MyColours.color_438E93), 603 color: MyColours.color_438E93),
@@ -599,7 +609,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -599,7 +609,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
599 color: MyColours.color_515151), 609 color: MyColours.color_515151),
600 ), 610 ),
601 Text( 611 Text(
602 - customerProvider.guestInfoSunModel.last?.tableinfoName??'', 612 + customerProvider.guestInfoSunModel.last?.tableinfoName ??
  613 + '',
603 style: TextStyle( 614 style: TextStyle(
604 fontSize: ScreenUtil().setSp(20), 615 fontSize: ScreenUtil().setSp(20),
605 color: MyColours.color_438E93), 616 color: MyColours.color_438E93),
@@ -729,8 +740,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -729,8 +740,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
729 isBold: true, 740 isBold: true,
730 height: w(22), 741 height: w(22),
731 onPressed: () { 742 onPressed: () {
732 - NavigatorUtil.goWineDetailPage(context,  
733 - customerProvider.guestInfoSunModel.store.id, 743 + NavigatorUtil.goWineDetailPage(
  744 + context, customerProvider.guestInfoSunModel.store.id,
734 onlyShow: true); 745 onlyShow: true);
735 }, 746 },
736 ) 747 )
@@ -761,6 +772,7 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -761,6 +772,7 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
761 customerProvider = Provider.of<CustomerProvider>(context, listen: true); 772 customerProvider = Provider.of<CustomerProvider>(context, listen: true);
762 return Scaffold( 773 return Scaffold(
763 backgroundColor: Color.fromRGBO(246, 248, 250, 1), 774 backgroundColor: Color.fromRGBO(246, 248, 250, 1),
  775 + key: scaffoldKey,
764 appBar: SystemAppBar( 776 appBar: SystemAppBar(
765 '客户详情', 777 '客户详情',
766 onTap: () { 778 onTap: () {
@@ -947,6 +959,78 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -947,6 +959,78 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
947 '${customerProvider.guestInfoSunModel.guest.serve == null ? '' : customerProvider.guestInfoSunModel.guest.serve}'), 959 '${customerProvider.guestInfoSunModel.guest.serve == null ? '' : customerProvider.guestInfoSunModel.guest.serve}'),
948 VEmptyView(20), 960 VEmptyView(20),
949 Container( 961 Container(
  962 + padding: EdgeInsets.symmetric(
  963 + horizontal: ScreenUtil().setWidth(40),
  964 + vertical: ScreenUtil().setWidth(30)),
  965 + color: MyColours.color_ffffff,
  966 + child: Row(
  967 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  968 + children: [
  969 + Text(
  970 + '生日',
  971 + style: TextStyle(
  972 + fontSize: ScreenUtil().setSp(36),
  973 + color: MyColours.color_333333),
  974 + ),
  975 + Spacer(),
  976 + Text(
  977 + birthday,
  978 + style: TextStyle(
  979 + fontSize: ScreenUtil().setSp(26),
  980 + color: MyColours.color_333333),
  981 + ),
  982 + HEmptyView(20),
  983 + RoundButton(
  984 + text: '编辑',
  985 + radius: ScreenUtil().setWidth(20),
  986 + width: ScreenUtil().setWidth(90),
  987 + height: ScreenUtil().setWidth(50),
  988 + fontSize: 26,
  989 + isBold: false,
  990 + onPressed: () {
  991 + DialogUtil.showPickerDateTime24(
  992 + context,
  993 + scaffoldKey,
  994 + (value) async {
  995 + // {'text': picker.adapter.text, 'select': selecteds}
  996 + if (value != null) {
  997 + setState(() {
  998 + print(value);
  999 + birthday = DateUtil.formatDateStr(value,
  1000 + format: DateFormats.y_mo_d);
  1001 + });
  1002 + // 请求接口,设置生日
  1003 + String from = birthday + ' 00:00:00';
  1004 + Map<String, String> params = {
  1005 + 'id': widget.userHistoryEntity.id,
  1006 + 'c_day':
  1007 + '${(DateUtil.getDateMsByTimeStr(from) / 1000).floor()}',
  1008 + };
  1009 + bool sucess = await customerProvider
  1010 + .setGuestInfo(context, params,
  1011 + showLoading: true);
  1012 + if (sucess) {
  1013 + Utils.showToast('保存成功');
  1014 + }
  1015 + }
  1016 + // showDateSelWidget = false;
  1017 + },
  1018 + yearBegin: 1925,
  1019 + minValue: DateTime(1925),
  1020 + dateTime: birthday == ''
  1021 + ? DateTime.now()
  1022 + : DateUtil.getDateTime(birthday),
  1023 + pickerDateTimeType: PickerDateTimeType.kYMD,
  1024 + onCancel: () {
  1025 + // showDateSelWidget = false;
  1026 + });
  1027 + },
  1028 + ),
  1029 + ],
  1030 + ),
  1031 + ),
  1032 + VEmptyView(20),
  1033 + Container(
950 padding: EdgeInsets.symmetric( 1034 padding: EdgeInsets.symmetric(
951 horizontal: ScreenUtil().setWidth(40), 1035 horizontal: ScreenUtil().setWidth(40),
952 vertical: ScreenUtil().setWidth(30)), 1036 vertical: ScreenUtil().setWidth(30)),
  1 +import 'package:common_utils/common_utils.dart';
1 import 'package:flutter/material.dart'; 2 import 'package:flutter/material.dart';
  3 +import 'package:flutter_picker/Picker.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/constant/state.dart'; 5 import 'package:one_key/constant/state.dart';
4 import 'package:one_key/models/customer_by_seller_model.dart'; 6 import 'package:one_key/models/customer_by_seller_model.dart';
@@ -34,6 +36,9 @@ class CustomerDetailPage extends StatefulWidget { @@ -34,6 +36,9 @@ class CustomerDetailPage extends StatefulWidget {
34 class _CustomerDetailPageState extends State<CustomerDetailPage> { 36 class _CustomerDetailPageState extends State<CustomerDetailPage> {
35 ScrollController controller = ScrollController(); 37 ScrollController controller = ScrollController();
36 CustomerProvider customerProvider; 38 CustomerProvider customerProvider;
  39 + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
  40 +
  41 + String birthday = '';
37 42
38 @override 43 @override
39 void initState() { 44 void initState() {
@@ -59,6 +64,9 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -59,6 +64,9 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
59 'phone': widget.userHistoryEntity.phone 64 'phone': widget.userHistoryEntity.phone
60 }; 65 };
61 await customerProvider.getGuestInfo(context, params); 66 await customerProvider.getGuestInfo(context, params);
  67 +
  68 + birthday = customerProvider.guestInfoSunModel.guest.cdaySelfStr;
  69 + setState(() {});
62 // await customerProvider.searchData(customerProvider.controller.text); 70 // await customerProvider.searchData(customerProvider.controller.text);
63 } 71 }
64 72
@@ -204,7 +212,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -204,7 +212,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
204 )), 212 )),
205 ], 213 ],
206 ), 214 ),
207 - customerProvider.guestInfoSunModel.guest.label != null&& customerProvider.guestInfoSunModel.guest.label != '' 215 + customerProvider.guestInfoSunModel.guest.label != null &&
  216 + customerProvider.guestInfoSunModel.guest.label != ''
208 ? Container( 217 ? Container(
209 padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)), 218 padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)),
210 constraints: 219 constraints:
@@ -488,15 +497,19 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -488,15 +497,19 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
488 crossAxisAlignment: WrapCrossAlignment.center, 497 crossAxisAlignment: WrapCrossAlignment.center,
489 children: [ 498 children: [
490 Text( 499 Text(
491 - customerProvider.guestInfoSunModel.last?.ddate == null ? '': Utils.formatFromMill(  
492 - customerProvider.guestInfoSunModel.last?.ddate ??''), 500 + customerProvider.guestInfoSunModel.last?.ddate == null
  501 + ? ''
  502 + : Utils.formatFromMill(
  503 + customerProvider.guestInfoSunModel.last?.ddate ??
  504 + ''),
493 overflow: TextOverflow.ellipsis, 505 overflow: TextOverflow.ellipsis,
494 style: TextStyle( 506 style: TextStyle(
495 fontSize: ScreenUtil().setSp(20), 507 fontSize: ScreenUtil().setSp(20),
496 color: MyColours.color_E34D59), 508 color: MyColours.color_E34D59),
497 ), 509 ),
498 Text( 510 Text(
499 - customerProvider.guestInfoSunModel.last?.ddateSoltStr??'', 511 + customerProvider.guestInfoSunModel.last?.ddateSoltStr ??
  512 + '',
500 style: TextStyle( 513 style: TextStyle(
501 fontSize: ScreenUtil().setSp(20), 514 fontSize: ScreenUtil().setSp(20),
502 color: MyColours.color_438E93), 515 color: MyColours.color_438E93),
@@ -508,7 +521,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -508,7 +521,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
508 color: MyColours.color_515151), 521 color: MyColours.color_515151),
509 ), 522 ),
510 Text( 523 Text(
511 - customerProvider.guestInfoSunModel.last.tableinfoName??'', 524 + customerProvider.guestInfoSunModel.last.tableinfoName ??
  525 + '',
512 style: TextStyle( 526 style: TextStyle(
513 fontSize: ScreenUtil().setSp(20), 527 fontSize: ScreenUtil().setSp(20),
514 color: MyColours.color_438E93), 528 color: MyColours.color_438E93),
@@ -638,8 +652,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -638,8 +652,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
638 isBold: true, 652 isBold: true,
639 height: w(22), 653 height: w(22),
640 onPressed: () { 654 onPressed: () {
641 - NavigatorUtil.goWineDetailPage(context,  
642 - customerProvider.guestInfoSunModel.store.id, 655 + NavigatorUtil.goWineDetailPage(
  656 + context, customerProvider.guestInfoSunModel.store.id,
643 onlyShow: true); 657 onlyShow: true);
644 }, 658 },
645 ) 659 )
@@ -699,7 +713,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -699,7 +713,8 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
699 fontSize: ScreenUtil().setSp(20))))); 713 fontSize: ScreenUtil().setSp(20)))));
700 } 714 }
701 715
702 - if (customerProvider.guestInfoSunModel.guest.label != null&& customerProvider.guestInfoSunModel.guest.label != '') { 716 + if (customerProvider.guestInfoSunModel.guest.label != null &&
  717 + customerProvider.guestInfoSunModel.guest.label != '') {
703 List<String> labels = 718 List<String> labels =
704 customerProvider.guestInfoSunModel.guest.label.split(','); 719 customerProvider.guestInfoSunModel.guest.label.split(',');
705 labels.forEach((element) { 720 labels.forEach((element) {
@@ -771,6 +786,7 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -771,6 +786,7 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
771 Widget build(BuildContext context) { 786 Widget build(BuildContext context) {
772 customerProvider = Provider.of<CustomerProvider>(context, listen: true); 787 customerProvider = Provider.of<CustomerProvider>(context, listen: true);
773 return Scaffold( 788 return Scaffold(
  789 + key: scaffoldKey,
774 backgroundColor: Color.fromRGBO(246, 248, 250, 1), 790 backgroundColor: Color.fromRGBO(246, 248, 250, 1),
775 appBar: SystemAppBar( 791 appBar: SystemAppBar(
776 '客户详情', 792 '客户详情',
@@ -958,6 +974,78 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -958,6 +974,78 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
958 '${customerProvider.guestInfoSunModel.guest.serve == null ? '' : customerProvider.guestInfoSunModel.guest.serve}'), 974 '${customerProvider.guestInfoSunModel.guest.serve == null ? '' : customerProvider.guestInfoSunModel.guest.serve}'),
959 VEmptyView(20), 975 VEmptyView(20),
960 Container( 976 Container(
  977 + padding: EdgeInsets.symmetric(
  978 + horizontal: ScreenUtil().setWidth(40),
  979 + vertical: ScreenUtil().setWidth(30)),
  980 + color: MyColours.color_ffffff,
  981 + child: Row(
  982 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  983 + children: [
  984 + Text(
  985 + '生日',
  986 + style: TextStyle(
  987 + fontSize: ScreenUtil().setSp(36),
  988 + color: MyColours.color_333333),
  989 + ),
  990 + Spacer(),
  991 + Text(
  992 + birthday,
  993 + style: TextStyle(
  994 + fontSize: ScreenUtil().setSp(26),
  995 + color: MyColours.color_333333),
  996 + ),
  997 + HEmptyView(20),
  998 + RoundButton(
  999 + text: '编辑',
  1000 + radius: ScreenUtil().setWidth(20),
  1001 + width: ScreenUtil().setWidth(90),
  1002 + height: ScreenUtil().setWidth(50),
  1003 + fontSize: 26,
  1004 + isBold: false,
  1005 + onPressed: () {
  1006 + DialogUtil.showPickerDateTime24(
  1007 + context,
  1008 + scaffoldKey,
  1009 + (value) async {
  1010 + // {'text': picker.adapter.text, 'select': selecteds}
  1011 + if (value != null) {
  1012 + setState(() {
  1013 + print(value);
  1014 + birthday = DateUtil.formatDateStr(value,
  1015 + format: DateFormats.y_mo_d);
  1016 + });
  1017 + // 请求接口,设置生日
  1018 + String from = birthday + ' 00:00:00';
  1019 + Map<String, String> params = {
  1020 + 'id': widget.userHistoryEntity.gid,
  1021 + 'c_day':
  1022 + '${(DateUtil.getDateMsByTimeStr(from) / 1000).floor()}',
  1023 + };
  1024 + bool sucess = await customerProvider
  1025 + .setGuestInfo(context, params,
  1026 + showLoading: true);
  1027 + if (sucess) {
  1028 + Utils.showToast('保存成功');
  1029 + }
  1030 + }
  1031 + // showDateSelWidget = false;
  1032 + },
  1033 + yearBegin: 1925,
  1034 + minValue: DateTime(1925),
  1035 + dateTime: birthday == ''
  1036 + ? DateTime.now()
  1037 + : DateUtil.getDateTime(birthday),
  1038 + pickerDateTimeType: PickerDateTimeType.kYMD,
  1039 + onCancel: () {
  1040 + // showDateSelWidget = false;
  1041 + });
  1042 + },
  1043 + ),
  1044 + ],
  1045 + ),
  1046 + ),
  1047 + VEmptyView(20),
  1048 + Container(
961 padding: EdgeInsets.symmetric( 1049 padding: EdgeInsets.symmetric(
962 horizontal: ScreenUtil().setWidth(40), 1050 horizontal: ScreenUtil().setWidth(40),
963 vertical: ScreenUtil().setWidth(30)), 1051 vertical: ScreenUtil().setWidth(30)),
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter/services.dart';
  3 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  4 +import 'package:one_key/widgets/system_app_bar.dart';
  5 +import 'package:provider/provider.dart';
  6 +
  7 +import '../../../constant/state.dart';
  8 +import '../../../provider/customer_provider.dart';
  9 +import '../../../provider/marketing_center_provider.dart';
  10 +import '../../../provider/user_model.dart';
  11 +import '../../../res/colors.dart';
  12 +import '../../../route/navigator_util.dart';
  13 +import '../../../utils/screen_util.dart';
  14 +import '../../../utils/utils.dart';
  15 +import '../../../widgets/MyDivider.dart';
  16 +import '../../../widgets/h_empty_view.dart';
  17 +import '../../../widgets/page_exception.dart';
  18 +import '../../../widgets/round_button.dart';
  19 +import '../../../widgets/v_empty_view.dart';
  20 +
  21 +/**
  22 + *
  23 +
  24 +客户生日提醒及营销
  25 + */
  26 +class BirthdaySettingPage extends StatefulWidget {
  27 + const BirthdaySettingPage({Key key}) : super(key: key);
  28 +
  29 + @override
  30 + _BirthdaySettingPageState createState() => _BirthdaySettingPageState();
  31 +}
  32 +
  33 +class _BirthdaySettingPageState extends State<BirthdaySettingPage> {
  34 + CustomerProvider customerProvider;
  35 + TextEditingController pushBirthdayDayC = TextEditingController();
  36 + TextEditingController pushMemorialDayC = TextEditingController();
  37 + bool isPushBAhead = false;
  38 + bool isSmsBAhead = false;
  39 + bool isSmsBNow = false;
  40 + bool isPushMemorial = false;
  41 + @override
  42 + void initState() {
  43 + // TODO: implement initState
  44 + super.initState();
  45 + WidgetsBinding.instance.addPostFrameCallback((_) {
  46 + _sellerGuestGet();
  47 + });
  48 + }
  49 +
  50 + ///获取客情配置
  51 + _sellerGuestGet() async {
  52 + bool success = await customerProvider.getSellerGuest(context);
  53 + if (success) {
  54 + //有数据,默认数据
  55 +
  56 + isPushBAhead = customerProvider.sellerGuestData.birthdayAdvNotice == '1'
  57 + ? true
  58 + : false;
  59 + isSmsBAhead = customerProvider.sellerGuestData.birthdayAdvNoticeSms == '1'
  60 + ? true
  61 + : false;
  62 + isSmsBNow =
  63 + customerProvider.sellerGuestData.birthdayNotice == '1' ? true : false;
  64 + isPushMemorial =
  65 + customerProvider.sellerGuestData.commemorationNotice == '1'
  66 + ? true
  67 + : false;
  68 + pushBirthdayDayC.text =
  69 + customerProvider.sellerGuestData.birthdayNoticeDay ?? '';
  70 + pushMemorialDayC.text =
  71 + customerProvider.sellerGuestData.commemorationDay ?? '';
  72 + customerProvider.notifyListeners();
  73 + }
  74 + }
  75 +
  76 + ///修改客情配置
  77 +
  78 + Future<bool> _sellerGuestSet() async {
  79 + Map<String, String> params = {
  80 + "sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  81 + 'birthday_adv_notice': isPushBAhead ? "1" : "0",
  82 + 'birthday_adv_notice_sms': isSmsBAhead ? '1' : '0',
  83 + 'birthday_notice': isSmsBNow ? '1' : '0',
  84 + 'commemoration_notice': isPushMemorial ? '1' : '0',
  85 + };
  86 + if (pushBirthdayDayC.text.trim() != '') {
  87 + params['birthday_notice_day'] = pushBirthdayDayC.text;
  88 + }
  89 + if (pushMemorialDayC.text.trim() != '') {
  90 + params['commemoration_day'] = pushMemorialDayC.text;
  91 + }
  92 + bool success = await customerProvider.setSellerGuest(context, params,
  93 + showLoading: true);
  94 + if (success) {
  95 + Utils.showToast('保存成功');
  96 + return true;
  97 + } else {
  98 + return false;
  99 + }
  100 + }
  101 +
  102 + Widget _item(String title, {GestureTapCallback onTap}) {
  103 + return InkWell(
  104 + onTap: onTap,
  105 + child: Container(
  106 + // decoration: BoxDecoration(
  107 + // border: Border(
  108 + // bottom: BorderSide(
  109 + // color: MyColours.color_E7E7E7, width: w(0.5)))),
  110 + // margin: EdgeInsets.only(
  111 + // right: w(12), left: w(16), bottom: w(0), top: w(14)),
  112 + padding: EdgeInsets.only(
  113 + left: w(16), top: w(14), bottom: w(3), right: w(12)),
  114 + child: Row(
  115 + children: [
  116 + Text(
  117 + title,
  118 + style: TextStyle(
  119 + color: MyColours.color_515151, fontSize: font(14)),
  120 + ),
  121 + Spacer(),
  122 + Container(
  123 + padding:
  124 + EdgeInsets.symmetric(horizontal: w(7), vertical: w(4)),
  125 + child: Image.asset(
  126 + "assets/arrow_right_new.png",
  127 + width: w(9),
  128 + height: w(16),
  129 + ),
  130 + )
  131 + ],
  132 + )));
  133 + }
  134 +
  135 + Widget _itemSmsWidget(bool isSelect, String title,
  136 + {GestureTapCallback onTap, int fontSize = 14, int left = 16}) {
  137 + return Column(
  138 + children: [
  139 + InkWell(
  140 + onTap: onTap,
  141 + child: Padding(
  142 + padding: EdgeInsets.only(
  143 + left: w(left), top: w(14), bottom: w(3), right: w(12)),
  144 + child: Row(
  145 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  146 + children: [
  147 + Text(
  148 + title,
  149 + style: TextStyle(
  150 + color: MyColours.color_515151,
  151 + fontSize: font(fontSize)),
  152 + ),
  153 + Spacer(),
  154 + Container(
  155 + margin: EdgeInsets.symmetric(
  156 + horizontal: w(7), vertical: w(4)),
  157 + child: Image.asset(
  158 + Utils.getImgPath(isSelect ? 'swich_on' : 'swich_off'),
  159 + width: w(44),
  160 + ),
  161 + )
  162 + // RoundButton(
  163 + // text: '预览',
  164 + // gradientStart: MyColours.color_ffffff,
  165 + // gradientEnd: MyColours.color_ffffff,
  166 + // borderColor: MyColours.color_438E93,
  167 + // textColor: MyColours.color_438E93,
  168 + // radius: ScreenUtil().setWidth(22),
  169 + // fontSize: 24,
  170 + // width: w(72),
  171 + // height: ScreenUtil().setWidth(44),
  172 + // isBold: true,
  173 + // onPressed: () {
  174 + // NavigatorUtil.goMarkingPreviewPage(context);
  175 + // },
  176 + // ),
  177 + ]))),
  178 + Padding(
  179 + padding: EdgeInsets.only(left: w(left)),
  180 + child: MyDivider(double.infinity, w(0.5),
  181 + color: MyColours.color_E7E7E7)),
  182 + ],
  183 + );
  184 + }
  185 +
  186 + Widget _title(String title) {
  187 + return Column(
  188 + crossAxisAlignment: CrossAxisAlignment.start,
  189 + children: [
  190 + Padding(
  191 + padding: EdgeInsets.symmetric(vertical: w(8)),
  192 + child: Text(
  193 + title,
  194 + style: TextStyle(color: MyColours.color_515151, fontSize: font(16)),
  195 + ),
  196 + ),
  197 + MyDivider(double.infinity, w(0.5), color: MyColours.color_E7E7E7),
  198 + ],
  199 + );
  200 + }
  201 +
  202 + ///输入框
  203 + Widget _textfield(
  204 + String title,
  205 + String hintText,
  206 + TextEditingController controller,
  207 + ) {
  208 + return Container(
  209 + margin: EdgeInsets.only(right: w(12)),
  210 + child: Row(
  211 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  212 + children: [
  213 + Container(
  214 + child: Text(
  215 + title,
  216 + style: TextStyle(
  217 + color: MyColours.color_515151,
  218 + fontSize: ScreenUtil().setSp(32)),
  219 + ),
  220 + ),
  221 + HEmptyView(80),
  222 + Expanded(
  223 + // width: ScreenUtil().setWidth(231 * 2),
  224 + child: TextField(
  225 + controller: controller,
  226 + textAlign: TextAlign.right,
  227 + textAlignVertical: TextAlignVertical.bottom,
  228 + maxLines: 1,
  229 + // //光标颜色
  230 + // cursorColor:
  231 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  232 + //输入文本的样式
  233 + // inputFormatters: title == '券名称'
  234 + // ? [LengthLimitingTextInputFormatter(15)]
  235 + // : [],
  236 + style: TextStyle(
  237 + color: MyColours.color_515151,
  238 + fontSize: ScreenUtil().setSp(32),
  239 + ),
  240 + keyboardType: TextInputType.number,
  241 + inputFormatters: <TextInputFormatter>[
  242 + FilteringTextInputFormatter.digitsOnly
  243 + ],
  244 + // focusNode: focusNode,
  245 + decoration: InputDecoration(
  246 + isCollapsed: true,
  247 + border: OutlineInputBorder(borderSide: BorderSide.none),
  248 + hintText: hintText,
  249 + hintStyle: TextStyle(
  250 + color: MyColours.color_999999,
  251 + fontSize: ScreenUtil().setSp(32),
  252 + ),
  253 + enabledBorder: new UnderlineInputBorder(
  254 + borderSide: BorderSide.none,
  255 + ),
  256 + focusedBorder: new UnderlineInputBorder(
  257 + borderSide: BorderSide.none,
  258 + ),
  259 + ),
  260 + onChanged: (value) {},
  261 + onEditingComplete: () {
  262 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  263 + },
  264 + ),
  265 + ),
  266 + Text(
  267 + '天',
  268 + style: TextStyle(color: MyColours.color_515151, fontSize: font(16)),
  269 + ),
  270 + // HEmptyView(32)
  271 + ],
  272 + ),
  273 + );
  274 + }
  275 +
  276 + @override
  277 + Widget build(BuildContext context) {
  278 + customerProvider = Provider.of<CustomerProvider>(context, listen: true);
  279 + return Scaffold(
  280 + backgroundColor: MyColours.color_ffffff,
  281 + appBar: SystemAppBar('客户生日提醒及营销'),
  282 + body: Consumer<CustomerProvider>(builder: (context1, model, _) {
  283 + if (model.pageStateBirthdaySetting != PageState.Success) {
  284 + return ExceptionPage(
  285 + pageState: model.pageStateBirthdaySetting,
  286 + callback: () async {
  287 + _sellerGuestGet();
  288 + },
  289 + emptyMsg: "暂时没有客户生日提醒及营销哦",
  290 + emptyImg: "empty_search",
  291 + showMsg: "加载中,请稍后...",
  292 + );
  293 + } else {
  294 + return Column(
  295 + children: [
  296 + Expanded(
  297 + child: SingleChildScrollView(
  298 + child: Padding(
  299 + padding: EdgeInsets.only(left: w(16)),
  300 + child: Column(
  301 + crossAxisAlignment: CrossAxisAlignment.start,
  302 + children: [
  303 + VEmptyView(24),
  304 + _textfield('客户生日提前提醒日期', '请输入', pushBirthdayDayC),
  305 + VEmptyView(24),
  306 + MyDivider(double.infinity, w(0.5),
  307 + color: MyColours.color_E7E7E7),
  308 + _itemSmsWidget(isPushBAhead, '客户生日到达前发送提醒消息',
  309 + onTap: () {
  310 + setState(() {
  311 + isPushBAhead = !isPushBAhead;
  312 + });
  313 + }),
  314 + _itemSmsWidget(isSmsBAhead, '客户生日到达前自动给客户发送短信',
  315 + onTap: () {
  316 + setState(() {
  317 + isSmsBAhead = !isSmsBAhead;
  318 + });
  319 + }),
  320 + VEmptyView(16),
  321 + _item('客户本人生日通知短信设置', onTap: () {
  322 + NavigatorUtil.goBirthdaySmsModuleSettingPage(
  323 + context, '1');
  324 + }),
  325 + VEmptyView(16),
  326 + Padding(
  327 + padding: EdgeInsets.only(left: w(16)),
  328 + child: MyDivider(double.infinity, w(0.5),
  329 + color: MyColours.color_E7E7E7)),
  330 + VEmptyView(16),
  331 + _itemSmsWidget(isSmsBNow, '客户生日当天发送短信',
  332 + fontSize: 16, left: 0, onTap: () {
  333 + setState(() {
  334 + isSmsBNow = !isSmsBNow;
  335 + });
  336 + }),
  337 + VEmptyView(16),
  338 + _item('客户本人生日当天通知短信设置', onTap: () {
  339 + NavigatorUtil.goBirthdaySmsModuleSettingPage(
  340 + context, '2');
  341 + }),
  342 + VEmptyView(16),
  343 + Padding(
  344 + padding: EdgeInsets.only(left: w(16)),
  345 + child: MyDivider(double.infinity, w(0.5),
  346 + color: MyColours.color_E7E7E7)),
  347 + VEmptyView(48),
  348 + _textfield('客户纪念日提前提醒日期', '请输入', pushMemorialDayC),
  349 + VEmptyView(24),
  350 + MyDivider(double.infinity, w(0.5),
  351 + color: MyColours.color_E7E7E7),
  352 + VEmptyView(16),
  353 + _itemSmsWidget(isPushMemorial, '客户生日到达前发送提醒消息',
  354 + onTap: () {
  355 + setState(() {
  356 + isPushMemorial = !isPushMemorial;
  357 + });
  358 + }),
  359 + VEmptyView(16),
  360 + ],
  361 + )),
  362 + )),
  363 + Container(
  364 + color: MyColours.color_ffffff,
  365 + padding: EdgeInsets.only(
  366 + left: w(23), right: w(23), top: w(12), bottom: w(25)),
  367 + child: Row(
  368 + children: [
  369 + // RoundButton(
  370 + // text: '图文预览',
  371 + // width: w(100),
  372 + // gradientStart: MyColours.color_ffffff,
  373 + // gradientEnd: MyColours.color_ffffff,
  374 + // borderColor: MyColours.color_438E93,
  375 + // radius: r(5),
  376 + // fontSize: 32,
  377 + // height: w(40),
  378 + // textColor: MyColours.color_438E93,
  379 + // isBold: true,
  380 + // onPressed: () async {
  381 + // // NavigatorUtil.goMarkingPreviewPage(context);
  382 + // if (previewUrl == '') {
  383 + // Utils.showToast('暂时没有可预览的图文信息');
  384 + // return;
  385 + // }
  386 + // //
  387 + // _showPhotoView(context, 0, [previewUrl]);
  388 + // }),
  389 + // HEmptyView(30),
  390 + Expanded(
  391 + child: RoundButton(
  392 + text: '保存',
  393 + gradientStart: MyColours.color_199095,
  394 + gradientEnd: MyColours.color_199095,
  395 + // borderColor: MyColours.color_999999,
  396 + radius: r(5),
  397 + fontSize: 32,
  398 + height: w(40),
  399 + isBold: true,
  400 + onPressed: () async {
  401 + //调用接口
  402 + // _setData();
  403 + FocusScope.of(context)
  404 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  405 + _sellerGuestSet();
  406 + }))
  407 + ],
  408 + ))
  409 + ],
  410 + );
  411 + }
  412 + }));
  413 + }
  414 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  3 +import 'package:one_key/provider/user_model.dart';
  4 +import 'package:one_key/res/colors.dart';
  5 +import 'package:one_key/utils/dialog_util.dart';
  6 +import 'package:one_key/utils/utils.dart';
  7 +import 'package:one_key/widgets/h_empty_view.dart';
  8 +import 'package:one_key/widgets/system_app_bar.dart';
  9 +import 'package:one_key/widgets/v_empty_view.dart';
  10 +import 'package:provider/provider.dart';
  11 +
  12 +import '../../../constant/state.dart';
  13 +import '../../../models/sai_you_yun_birthday_temp.dart';
  14 +import '../../../models/sai_you_yun_change_model.dart';
  15 +import '../../../models/sai_you_yun_model.dart';
  16 +import '../../../provider/customer_provider.dart';
  17 +import '../../../provider/marketing_center_provider.dart';
  18 +import '../../../route/navigator_util.dart';
  19 +import '../../../utils/event_bus.dart';
  20 +import '../../../utils/screen_util.dart';
  21 +import '../../../widgets/page_exception.dart';
  22 +import '../../../widgets/round_button.dart';
  23 +
  24 +/**
  25 + * 生日短信模版配置页面
  26 + */
  27 +
  28 +class BirthdaySmsModuleSettingPage extends StatefulWidget {
  29 + final String type;
  30 + BirthdaySmsModuleSettingPage({Key key, this.type}) : super(key: key);
  31 +
  32 + @override
  33 + _BirthdaySmsModuleSettingPageState createState() =>
  34 + _BirthdaySmsModuleSettingPageState();
  35 +}
  36 +
  37 +class _BirthdaySmsModuleSettingPageState
  38 + extends State<BirthdaySmsModuleSettingPage> {
  39 + String contentChangeStart = '';
  40 +
  41 + TextEditingController controller = TextEditingController();
  42 +
  43 + CustomerProvider customerProvider;
  44 +
  45 + int _cursorPosition = 0;
  46 + List<String> couponList = [];
  47 + bool isUse = false;
  48 + String youhui = '选择优惠券';
  49 + int couponSelectIndex;
  50 + String selectCode = '';
  51 +
  52 + @override
  53 + void initState() {
  54 + // TODO: implement initState
  55 + super.initState();
  56 +
  57 + WidgetsBinding.instance.addPostFrameCallback((_) {
  58 + getSaiYouYunBirthdayTemp();
  59 + _couponNetworkData(isShowLoading: false);
  60 + });
  61 + }
  62 +
  63 + getSaiYouYunBirthdayTemp() async {
  64 + await customerProvider.getSaiYouYunBirthdayTemp(
  65 + context,
  66 + {
  67 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  68 + 'type': widget.type
  69 + },
  70 + isShowLoading: false);
  71 + if (customerProvider.saiYouYunBirData != null &&
  72 + customerProvider.saiYouYunBirData.length > 0) {
  73 + customerProvider.saiYouYunBirData.forEach((element) {
  74 + if (element.bestwish != null) {
  75 + selectCode = element.templateCode;
  76 + contentChangeStart = element.templateParam;
  77 + controller.text = element.bestwish;
  78 + }
  79 + });
  80 + if (selectCode == '') {
  81 + selectCode = customerProvider.saiYouYunBirData[0].templateCode;
  82 + contentChangeStart = customerProvider.saiYouYunBirData[0].templateParam;
  83 + }
  84 + setState(() {});
  85 + }
  86 + }
  87 +
  88 + setSaiYouYunBirthday() async {
  89 + Map<String, String> pramas = {
  90 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  91 + 'sms_code': selectCode,
  92 + 'type': widget.type,
  93 + 'content': controller.text
  94 + };
  95 + bool success = await customerProvider.setSaiYouYunBirthday(context, pramas);
  96 + if (success) {
  97 + Utils.showToast('保存成功');
  98 + Navigator.pop(context);
  99 + }
  100 + }
  101 +
  102 + ///消费券
  103 + _couponNetworkData({bool isShowLoading = true}) async {
  104 + //couponSelectIndex = 0;
  105 + Map<String, String> params = {
  106 + "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  107 + 'status': '1'
  108 + };
  109 + await customerProvider.getCustomerSelectActivityNew(context, params,
  110 + isShowLoading: isShowLoading);
  111 + //此人已经新建好券
  112 + if (customerProvider.couponListSelect.length > 0) {
  113 + // couponProvider.initCouponSelect(context);
  114 + couponList = [];
  115 + for (int i = 0; i < customerProvider.couponListSelect.length; i++) {
  116 + couponList.add(customerProvider.couponListSelect[i].aname);
  117 + }
  118 + customerProvider.notifyListeners();
  119 + } else {
  120 + //没有新建的优惠券
  121 + }
  122 + }
  123 +
  124 + _insertUrllink(String link) {
  125 + // *************开始直接插入会报错***********还没有改
  126 +
  127 + var cursorPos = controller.selection.base.offset; //获取到光标的在字符串的位置
  128 +
  129 + if (cursorPos < 0) {
  130 + controller.text += link;
  131 + } else {
  132 + String textAfterCursor =
  133 + controller.text.substring(cursorPos); //把字符串从光标的位置截取,光标后面的
  134 +
  135 + String textBeforeCursor =
  136 + controller.text.substring(0, cursorPos); //光标前面的字符串
  137 + controller.text =
  138 + textBeforeCursor + link + textAfterCursor; //把想要的插入的内容拼接在光标位置处
  139 +
  140 + controller.selection =
  141 + TextSelection.collapsed(offset: controller.text.length);
  142 + }
  143 + }
  144 +
  145 + List<Widget> templateChangesWidgets(
  146 + String title, List<SaiYouYunBirthdaySunModel> temData) {
  147 + List<Widget> data = [];
  148 + for (var i = 0; i < temData.length; i++) {
  149 + data.add(btnItem(temData[i].templateCode, onTap: () {
  150 + selectCode = temData[i].templateCode;
  151 + controller.text = temData[i].bestwish ?? '';
  152 + contentChangeStart = temData[i].templateParam;
  153 + setState(() {});
  154 + }));
  155 + }
  156 + return data;
  157 + }
  158 +
  159 + Widget btnItem(String title, {GestureTapCallback onTap}) {
  160 + return InkWell(
  161 + onTap: onTap,
  162 + child: Container(
  163 + padding: EdgeInsets.all(w(3)),
  164 + decoration: BoxDecoration(
  165 + color: selectCode == title
  166 + ? MyColours.color_438E93
  167 + : MyColours.color_ffffff,
  168 + borderRadius: BorderRadius.circular(r(5)),
  169 + border: Border.all(width: w(1), color: MyColours.color_438E93)),
  170 + child: Text(title,
  171 + style: TextStyle(
  172 + color: selectCode == title
  173 + ? MyColours.color_ffffff
  174 + : MyColours.color_438E93,
  175 + fontSize: font(12),
  176 + fontWeight: FontWeight.bold)),
  177 + ),
  178 + );
  179 + }
  180 +
  181 + Widget _templeteWidget(
  182 + String title,
  183 + ) {
  184 + return Container(
  185 + margin: EdgeInsets.symmetric(horizontal: w(16), vertical: w(5)),
  186 + child: Row(
  187 + crossAxisAlignment: CrossAxisAlignment.start,
  188 + children: [
  189 + Text(
  190 + title,
  191 + style: TextStyle(fontSize: font(16), color: MyColours.color_515151),
  192 + ),
  193 + HEmptyView(34),
  194 + Expanded(
  195 + child: Wrap(
  196 + spacing: w(5),
  197 + runSpacing: w(5),
  198 + children: templateChangesWidgets(
  199 + title, customerProvider.saiYouYunBirData),
  200 + ))
  201 + ],
  202 + ),
  203 + );
  204 + }
  205 +
  206 + _buttonChoose(String title, ClickCallback callback) {
  207 + return InkWell(
  208 + onTap: () {
  209 + callback(title);
  210 + },
  211 + child: Padding(
  212 + padding: EdgeInsets.symmetric(
  213 + horizontal: ScreenUtil().setWidth(20),
  214 + vertical: ScreenUtil().setWidth(10)),
  215 + // height: ScreenUtil().setWidth(50),
  216 + // decoration: BoxDecoration(
  217 + // // border: Border.all(
  218 + // // width: ScreenUtil().setWidth(2),
  219 + // // color: MyColours.color_199095),
  220 + // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
  221 + child: Row(
  222 + children: [
  223 + Expanded(
  224 + child: Text(
  225 + title,
  226 + textAlign: TextAlign.right,
  227 + overflow: TextOverflow.ellipsis,
  228 + style: TextStyle(
  229 + color: title == '选择优惠券'
  230 + ? MyColours.color_999999
  231 + : MyColours.color_438E93,
  232 + fontWeight: FontWeight.bold,
  233 + fontSize: ScreenUtil().setWidth(30)),
  234 + )),
  235 + HEmptyView(20),
  236 + Image.asset(
  237 + // Utils.getImgPath(!customerMakingProvider.isUse
  238 + // ? 'c_arrow_down_unsel'
  239 + // : 'c_arrow_down'),
  240 + Utils.getImgPath('down_c'),
  241 + width: ScreenUtil().setWidth(44),
  242 + // height: ScreenUtil().setWidth(10),
  243 + )
  244 + ],
  245 + )));
  246 + }
  247 +
  248 + @override
  249 + Widget build(BuildContext context) {
  250 + customerProvider = Provider.of<CustomerProvider>(context, listen: true);
  251 + return Scaffold(
  252 + backgroundColor: MyColours.color_ffffff,
  253 + appBar:
  254 + SystemAppBar(widget.type == '1' ? '客户生日提前通知短信设置' : '客户生日当天通知短信设置'),
  255 + body: Consumer<CustomerProvider>(builder: (context1, model, _) {
  256 + if (model.pageStateBirthday != PageState.Success) {
  257 + return ExceptionPage(
  258 + pageState: model.pageStateBirthday,
  259 + callback: () async {
  260 + getSaiYouYunBirthdayTemp();
  261 + _couponNetworkData(isShowLoading: false);
  262 + },
  263 + emptyMsg: "暂时没有客户生日提前通知短信设置哦",
  264 + emptyImg: "empty_search",
  265 + showMsg: "加载中,请稍后...",
  266 + );
  267 + } else {
  268 + return Column(
  269 + children: [
  270 + Expanded(
  271 + child: SingleChildScrollView(
  272 + child: Column(
  273 + crossAxisAlignment: CrossAxisAlignment.start,
  274 + children: [
  275 + _templeteWidget('模版'),
  276 + VEmptyView(10),
  277 + Container(
  278 + width: double.infinity,
  279 + padding: EdgeInsets.all(w(10)),
  280 + margin: EdgeInsets.symmetric(horizontal: w(16)),
  281 + decoration: BoxDecoration(
  282 + border: Border.all(
  283 + color: MyColours.color_DBDBDB, width: w(1)),
  284 + borderRadius: BorderRadius.circular(r(8))),
  285 + child: Column(
  286 + crossAxisAlignment: CrossAxisAlignment.start,
  287 + children: [
  288 + Text(
  289 + contentChangeStart,
  290 + style: TextStyle(
  291 + height: 1.5,
  292 + color: MyColours.color_66000000,
  293 + fontSize: font(14)),
  294 + ),
  295 + TextField(
  296 + enabled: true,
  297 + controller: controller,
  298 + // textAlign: TextAlign.right,
  299 + // textAlignVertical: TextAlignVertical.bottom,
  300 + maxLines: 10,
  301 +
  302 + // inputFormatters: title == '金额'
  303 + // ? [
  304 + // FilteringTextInputFormatter(RegExp("[0-9.]"),
  305 + // allow: true),
  306 + // MyNumberTextInputFormatter(digit: 2),
  307 + // ]
  308 + // : [],
  309 +
  310 + // //光标颜色
  311 + // cursorColor:
  312 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  313 + //输入文本的样式
  314 + style: TextStyle(
  315 + fontSize: ScreenUtil().setSp(28),
  316 + color: MyColours.color_515151),
  317 + // focusNode: focusNode,
  318 + decoration: InputDecoration(
  319 + border: OutlineInputBorder(
  320 + borderSide: BorderSide.none),
  321 + hintText: true
  322 + ? '点击这里编辑您的短信内容。上面的文字时固定不可编辑的。'
  323 + : '请选择模版',
  324 + hintStyle: TextStyle(
  325 + color: MyColours.color_999999,
  326 + fontSize: ScreenUtil().setSp(28),
  327 + ),
  328 + contentPadding: EdgeInsets.zero,
  329 + ),
  330 + onChanged: (value) {
  331 + //添加的代码:光标一直在文本框后面
  332 + // controller.value = TextEditingValue(
  333 + // text: controller.text,
  334 + // selection:
  335 + // TextSelection.fromPosition(TextPosition(
  336 + // affinity: TextAffinity.downstream,
  337 + // offset: controller.text.length,
  338 + // )));
  339 + // setState(() {
  340 + // _cursorPosition = controller.selection.baseOffset;
  341 + // });
  342 + },
  343 + onEditingComplete: () {
  344 + FocusScope.of(context)
  345 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  346 + },
  347 + // keyboardType: inputType,
  348 + )
  349 + ],
  350 + ),
  351 + ),
  352 + VEmptyView(36),
  353 + InkWell(
  354 + onTap: () {
  355 + isUse = !isUse;
  356 + setState(() {});
  357 + },
  358 + child: Padding(
  359 + padding: EdgeInsets.symmetric(horizontal: w(16)),
  360 + child: Row(children: [
  361 + // Image.asset(
  362 + // Utils.getImgPath(
  363 + // isUse ? 'f_select' : 'f_select_not'),
  364 + // width: ScreenUtil().setWidth(44)),
  365 + // HEmptyView(15),
  366 + Text(
  367 + '在当前位置插入优惠',
  368 + style: TextStyle(
  369 + fontSize: ScreenUtil().setSp(32),
  370 + fontWeight: FontWeight.bold,
  371 + color: MyColours.color_515151),
  372 + ),
  373 + ]))),
  374 + VEmptyView(26),
  375 + Padding(
  376 + padding: EdgeInsets.symmetric(horizontal: w(16)),
  377 + child: Row(children: [
  378 + Expanded(
  379 + child: Container(
  380 + height: ScreenUtil().setWidth(70),
  381 + // width: ScreenUtil().setWidth(130),
  382 + decoration: BoxDecoration(
  383 + borderRadius: BorderRadius.circular(
  384 + ScreenUtil().setWidth(10)),
  385 + color: MyColours.color_DBDBDB),
  386 + child: _buttonChoose(youhui, (value) {
  387 + FocusScope.of(context)
  388 + .requestFocus(FocusNode()); //隐藏键盘
  389 + if (couponList == null ||
  390 + couponList.length == 0) {
  391 + Utils.showToast('暂无优惠券,请创建新优惠');
  392 + return;
  393 + }
  394 + DialogUtil.showSelectCusmanDialog(
  395 + context, couponList,
  396 + (value) async {
  397 + if (value != null) {
  398 + if (customerProvider
  399 + .couponListSelect[value.first]
  400 + .urllink ==
  401 + null) {
  402 + //创建链接
  403 + //创建券的二维码
  404 + Map<String, String> param = {
  405 + "sid": Provider.of<UserModel>(
  406 + context,
  407 + listen: false)
  408 + .user
  409 + .sellerid,
  410 + "id": customerProvider
  411 + .couponListSelect[value.first]
  412 + .id,
  413 + };
  414 + dynamic object =
  415 + await customerProvider
  416 + .createActivityUrlLink(
  417 + context, param);
  418 + if (object is bool) {
  419 + //
  420 +
  421 + } else {
  422 + //成功
  423 + _insertUrllink(object);
  424 + }
  425 + } else {
  426 + // 直接使用
  427 + setState(() {
  428 + couponSelectIndex = value.first;
  429 + youhui =
  430 + couponList[couponSelectIndex];
  431 + });
  432 +
  433 + _insertUrllink(customerProvider
  434 + .couponListSelect[value.first]
  435 + .urllink);
  436 + }
  437 + }
  438 + },
  439 + selecteds:
  440 + couponSelectIndex == null
  441 + ? []
  442 + : [couponSelectIndex])
  443 + .then((value) {});
  444 + }))),
  445 + HEmptyView(30),
  446 + InkWell(
  447 + onTap: () async {
  448 + // NavigatorUtil.goMarketingRecordsDetailPage(context);
  449 + bool needRefresh =
  450 + await NavigatorUtil.goCouponEditPage(
  451 + context);
  452 + print(needRefresh);
  453 + if (needRefresh != null && needRefresh) {
  454 + //刷新页面数据
  455 + // _controller.callRefresh();
  456 + _couponNetworkData();
  457 + }
  458 + },
  459 + child: Text('创建新优惠',
  460 + style: TextStyle(
  461 + decoration: TextDecoration.underline,
  462 + color: MyColours.color_438E93,
  463 + fontWeight: FontWeight.bold,
  464 + fontSize: ScreenUtil().setSp(28)))),
  465 + ])),
  466 + ],
  467 + ),
  468 + )),
  469 + Container(
  470 + height: ScreenUtil().setWidth(91 * 2),
  471 + width: double.infinity,
  472 + padding: EdgeInsets.only(
  473 + top: ScreenUtil().setWidth(16 * 2),
  474 + bottom: ScreenUtil().setWidth(35 * 2),
  475 + left: ScreenUtil().setWidth(23 * 2),
  476 + right: ScreenUtil().setWidth(23 * 2),
  477 + ),
  478 + decoration: BoxDecoration(
  479 + color: MyColours.color_ffffff,
  480 + boxShadow: [
  481 + BoxShadow(
  482 + spreadRadius: ScreenUtil().setWidth(2),
  483 + color: Color.fromRGBO(0, 0, 0, 0.1),
  484 + offset: Offset(0, ScreenUtil().setWidth(-2)),
  485 + blurRadius: ScreenUtil().setWidth(8))
  486 + ],
  487 + borderRadius: BorderRadius.all(
  488 + Radius.circular(ScreenUtil().setWidth(16)),
  489 + ),
  490 + ),
  491 + child: Row(
  492 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  493 + children: [
  494 + // RoundButton(
  495 + // text: '预览效果',
  496 + // width: w(100),
  497 + // height: ScreenUtil().setWidth(80),
  498 + // radius: ScreenUtil().setWidth(14),
  499 + // gradientStart: MyColours.color_ffffff,
  500 + // gradientEnd: MyColours.color_ffffff,
  501 + // borderColor: MyColours.color_438E93,
  502 + // textColor: MyColours.color_438E93,
  503 + // isBold: true,
  504 + // fontSize: 32,
  505 + // onPressed: () {
  506 + // DialogUtil.cupertinoAlertDialog(context,
  507 + // textAlign: TextAlign.left,
  508 + // showlTitle: false,
  509 + // content: canChange
  510 + // ? contentChangeStart + controller.text
  511 + // : controller.text);
  512 + // },
  513 + // ),
  514 + // HEmptyView(30),
  515 + Expanded(
  516 + child: RoundButton(
  517 + text: '保存',
  518 + height: ScreenUtil().setWidth(80),
  519 + radius: ScreenUtil().setWidth(14),
  520 + isBold: true,
  521 + fontSize: 32,
  522 + onPressed: () async {
  523 + if (selectCode == '') {
  524 + Utils.showToast('请选择模版类型');
  525 + return;
  526 + }
  527 + if (controller.text.trim().length == 0) {
  528 + Utils.showToast('请输入内容后保存');
  529 + return;
  530 + }
  531 +
  532 + setSaiYouYunBirthday();
  533 +
  534 + // }
  535 + // print('fffff');
  536 + },
  537 + ),
  538 + )
  539 + ],
  540 + )),
  541 + ],
  542 + );
  543 + }
  544 + }));
  545 + }
  546 +}
@@ -224,13 +224,11 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> { @@ -224,13 +224,11 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> {
224 224
225 data.add(additionModel); 225 data.add(additionModel);
226 } 226 }
227 - if (marketingCenterProvider.markDataModel.chef.image != null &&marketingCenterProvider.markDataModel.chef.image.length > 0) { 227 + if (marketingCenterProvider.markDataModel.chef.image != null &&marketingCenterProvider.markDataModel.chef.image!='') {
228 //设置过图片 228 //设置过图片
229 - for (int i = 0;  
230 - i < marketingCenterProvider.markDataModel.chef.image.length;  
231 - i++) { 229 +
232 String imageUrl = 230 String imageUrl =
233 - marketingCenterProvider.markDataModel.chef.image[i]; 231 + marketingCenterProvider.markDataModel.chef.image;
234 AdditionModel additionModel = AdditionModel(); 232 AdditionModel additionModel = AdditionModel();
235 additionModel.content = imageUrl; 233 additionModel.content = imageUrl;
236 additionModel.type = '1'; 234 additionModel.type = '1';
@@ -241,7 +239,7 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> { @@ -241,7 +239,7 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> {
241 data.add(additionModel); 239 data.add(additionModel);
242 240
243 imgAll.add(imageUrl); 241 imgAll.add(imageUrl);
244 - } 242 +
245 } 243 }
246 } else { 244 } else {
247 addStoreIntroduce = 245 addStoreIntroduce =
@@ -35,16 +35,12 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { @@ -35,16 +35,12 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> {
35 // bool selectShowPrice = true; //分享排菜单给客户时展示菜品价格 35 // bool selectShowPrice = true; //分享排菜单给客户时展示菜品价格
36 CollectStoreProvider collectStoreProvider; 36 CollectStoreProvider collectStoreProvider;
37 37
38 -  
39 -  
40 @override 38 @override
41 void initState() { 39 void initState() {
42 super.initState(); 40 super.initState();
43 41
44 WidgetsBinding.instance.addPostFrameCallback((_) { 42 WidgetsBinding.instance.addPostFrameCallback((_) {
45 getSellerVersion(); 43 getSellerVersion();
46 -  
47 -  
48 }); 44 });
49 } 45 }
50 46
@@ -151,7 +147,7 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { @@ -151,7 +147,7 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> {
151 @override 147 @override
152 void dispose() { 148 void dispose() {
153 EventBus().emit('changeStatusColor'); 149 EventBus().emit('changeStatusColor');
154 - 150 +
155 super.dispose(); 151 super.dispose();
156 } 152 }
157 153
@@ -380,6 +376,41 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { @@ -380,6 +376,41 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> {
380 VEmptyView(24), 376 VEmptyView(24),
381 InkWell( 377 InkWell(
382 onTap: () { 378 onTap: () {
  379 + NavigatorUtil.goBirthdaySettingPage(context);
  380 + },
  381 + child: Padding(
  382 + padding: EdgeInsets.only(
  383 + left: w(16),
  384 + top: w(12),
  385 + bottom: w(12),
  386 + right: w(12)),
  387 + child: Row(
  388 + children: [
  389 + Text(
  390 + '客户纪念日提醒及营销',
  391 + style: TextStyle(
  392 + color: MyColours.color_515151,
  393 + fontSize: ScreenUtil().setWidth(32)),
  394 + ),
  395 + Spacer(),
  396 + Container(
  397 + padding: EdgeInsets.symmetric(
  398 + horizontal: w(7), vertical: w(4)),
  399 + child: Image.asset(
  400 + "assets/arrow_right_new.png",
  401 + width: ScreenUtil().setWidth(18),
  402 + height: ScreenUtil().setWidth(32),
  403 + ),
  404 + )
  405 + ],
  406 + ))),
  407 + Padding(
  408 + padding: EdgeInsets.only(left: w(16)),
  409 + child: MyDivider(double.infinity, w(0.5),
  410 + color: MyColours.color_E7E7E7)),
  411 + VEmptyView(24),
  412 + InkWell(
  413 + onTap: () {
383 NavigatorUtil.goPaymentSettingPage(context); 414 NavigatorUtil.goPaymentSettingPage(context);
384 }, 415 },
385 child: Padding( 416 child: Padding(
@@ -408,7 +439,7 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { @@ -408,7 +439,7 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> {
408 ) 439 )
409 ], 440 ],
410 ))), 441 ))),
411 - Padding( 442 + Padding(
412 padding: EdgeInsets.only(left: w(16)), 443 padding: EdgeInsets.only(left: w(16)),
413 child: MyDivider(double.infinity, w(0.5), 444 child: MyDivider(double.infinity, w(0.5),
414 color: MyColours.color_E7E7E7)), 445 color: MyColours.color_E7E7E7)),
@@ -3518,7 +3518,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -3518,7 +3518,7 @@ class TableManagerPageState extends State<TableManagerPage> {
3518 } 3518 }
3519 */ 3519 */
3520 Guest guest = Guest(null, null, null, null, null, null, null, null, null, 3520 Guest guest = Guest(null, null, null, null, null, null, null, null, null,
3521 - null, null, null, null, null, null, null, null, null); 3521 + null, null, null, null, null, null, null, null, null,null);
3522 // if (widget.guest == null) { 3522 // if (widget.guest == null) {
3523 3523
3524 guest.phone = 3524 guest.phone =
@@ -598,9 +598,7 @@ class _CustomerNoticeSettingPageSimState @@ -598,9 +598,7 @@ class _CustomerNoticeSettingPageSimState
598 _item('客户互动设置', onTap: () { 598 _item('客户互动设置', onTap: () {
599 NavigatorUtil.goMarkingInteractionPage(context); 599 NavigatorUtil.goMarkingInteractionPage(context);
600 }), 600 }),
601 - _item('客户互动设置', onTap: () {  
602 - NavigatorUtil.goMarkingInteractionPage(context);  
603 - }), 601 +
604 ], 602 ],
605 )), 603 )),
606 )), 604 )),
@@ -3169,7 +3169,7 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { @@ -3169,7 +3169,7 @@ class TableManagerPageSimState extends State<TableManagerPageSim> {
3169 } 3169 }
3170 */ 3170 */
3171 Guest guest = Guest(null, null, null, null, null, null, null, null, null, 3171 Guest guest = Guest(null, null, null, null, null, null, null, null, null,
3172 - null, null, null, null, null, null, null, null, null); 3172 + null, null, null, null, null, null, null, null, null,null);
3173 // if (widget.guest == null) { 3173 // if (widget.guest == null) {
3174 3174
3175 guest.phone = 3175 guest.phone =
@@ -34,7 +34,9 @@ import '../models/get_export_info_model.dart'; @@ -34,7 +34,9 @@ import '../models/get_export_info_model.dart';
34 import '../models/get_report_field_model.dart'; 34 import '../models/get_report_field_model.dart';
35 import '../models/marketing_sms_template_model.dart'; 35 import '../models/marketing_sms_template_model.dart';
36 import '../models/month_statics_model.dart'; 36 import '../models/month_statics_model.dart';
  37 +import '../models/sai_you_yun_birthday_temp.dart';
37 import '../models/seller_counts_list.dart'; 38 import '../models/seller_counts_list.dart';
  39 +import '../models/seller_guest_model.dart';
38 import '../pages/my/customer_type/store_customer/bar_chart_page.dart'; 40 import '../pages/my/customer_type/store_customer/bar_chart_page.dart';
39 import '../res/colors.dart'; 41 import '../res/colors.dart';
40 42
@@ -121,11 +123,12 @@ class CustomerProvider extends ChangeNotifier { @@ -121,11 +123,12 @@ class CustomerProvider extends ChangeNotifier {
121 123
122 PageState pageStateMonth = PageState.Loading; 124 PageState pageStateMonth = PageState.Loading;
123 PageState pageStateDay = PageState.Loading; 125 PageState pageStateDay = PageState.Loading;
  126 + PageState pageStateBirthday = PageState.Loading;
124 127
125 bool isrepair = false; 128 bool isrepair = false;
126 bool isselfphone = false; 129 bool isselfphone = false;
127 bool ispcphone = true; 130 bool ispcphone = true;
128 - bool ispcname = true; 131 + bool ispcname = true;
129 bool isAddOver = true; 132 bool isAddOver = true;
130 bool isSetOver = true; 133 bool isSetOver = true;
131 bool isReserveOver = true; 134 bool isReserveOver = true;
@@ -134,14 +137,16 @@ class CustomerProvider extends ChangeNotifier { @@ -134,14 +137,16 @@ class CustomerProvider extends ChangeNotifier {
134 bool cancelOrderdayManager = true; 137 bool cancelOrderdayManager = true;
135 bool cancelOrderdayOther = true; 138 bool cancelOrderdayOther = true;
136 139
137 -  
138 -  
139 List<MarketingSmsTemplateSunModel> marketingSmsData = []; 140 List<MarketingSmsTemplateSunModel> marketingSmsData = [];
140 141
141 List<GetReportFieldSunModel> reportFieldModelData = []; //导出数据字段 142 List<GetReportFieldSunModel> reportFieldModelData = []; //导出数据字段
142 143
143 GetExportInfoSunModel exportInfoSunModel; //预订导出数据 144 GetExportInfoSunModel exportInfoSunModel; //预订导出数据
144 145
  146 + SellerGuestSunModel sellerGuestData;
  147 + PageState pageStateBirthdaySetting = PageState.Loading;
  148 + List<SaiYouYunBirthdaySunModel> saiYouYunBirData = [];
  149 +
145 /// 获取全店日订单统计数据 150 /// 获取全店日订单统计数据
146 Future<DayStaticsSunModel> getSellerCountsListByDay( 151 Future<DayStaticsSunModel> getSellerCountsListByDay(
147 BuildContext context, Map<String, String> params, 152 BuildContext context, Map<String, String> params,
@@ -173,6 +178,67 @@ class CustomerProvider extends ChangeNotifier { @@ -173,6 +178,67 @@ class CustomerProvider extends ChangeNotifier {
173 return dayStaticsData; 178 return dayStaticsData;
174 } 179 }
175 180
  181 +
  182 + ///客户生日提醒短信模板
  183 +
  184 + Future<bool> setSaiYouYunBirthday(BuildContext context, Map<String, String> params,
  185 + {isShowLoading = true}) async {
  186 + BaseResp<dynamic> baseResp = await DioUtil()
  187 + .request<dynamic>(context, Method.post, HttpUrl.set_sai_you_yun_birthday,
  188 + data: params, showLoading: false)
  189 + .catchError((error) {
  190 + print(error.toString());
  191 + if (error is MyError) {
  192 + switch (error.type) {
  193 + }
  194 + }
  195 + return false;
  196 + });
  197 + if (baseResp.code == Constant.status_success) {
  198 + return true;
  199 + } else {
  200 + if (baseResp != null) {
  201 + Utils.showToast(baseResp.msg ?? "");
  202 + }
  203 + }
  204 + return false;
  205 + }
  206 +
  207 +
  208 +
  209 +
  210 +
  211 + /// 获取客户生日提醒短信模板配置内容
  212 + getSaiYouYunBirthdayTemp(
  213 + BuildContext context, Map<String, String> params,
  214 + {isShowLoading = true}) async {
  215 + BaseResp<dynamic> baseResp = await DioUtil()
  216 + .request<dynamic>(
  217 + context, Method.post, HttpUrl.get_sai_you_yun_birthday_temp,
  218 + data: params, showLoading: isShowLoading)
  219 + .catchError((error) {
  220 + print(error.toString());
  221 + if (error is MyError) {
  222 + switch (error.type) {
  223 + }
  224 + }
  225 + pageStateBirthday = PageState.ConnectivityError;
  226 + notifyListeners();
  227 + });
  228 + if (baseResp == null) return null;
  229 + if (baseResp.code == Constant.status_success) {
  230 + saiYouYunBirData = SaiYouYunBirthdayModel.fromJson(baseResp.responseData).data;
  231 + pageStateBirthday = PageState.Success;
  232 + } else {
  233 + if (baseResp != null) {
  234 + Utils.showToast(baseResp.msg ?? "");
  235 + }
  236 + pageStateBirthday = PageState.ConnectivityError;
  237 + }
  238 + notifyListeners();
  239 + return saiYouYunBirData;
  240 + }
  241 +
176 /// 获取全店全月订单统计数据 242 /// 获取全店全月订单统计数据
177 Future<MonthStaticsSunModel> getSellerCountsListByMonth( 243 Future<MonthStaticsSunModel> getSellerCountsListByMonth(
178 BuildContext context, Map<String, String> params, 244 BuildContext context, Map<String, String> params,
@@ -2094,16 +2160,11 @@ class CustomerProvider extends ChangeNotifier { @@ -2094,16 +2160,11 @@ class CustomerProvider extends ChangeNotifier {
2094 notifyListeners(); 2160 notifyListeners();
2095 }); 2161 });
2096 if (baseResp != null && baseResp.code == Constant.status_success) { 2162 if (baseResp != null && baseResp.code == Constant.status_success) {
2097 - // guestReserveSunModel =  
2098 - // GuestReserveModel.fromJson(baseResp.responseData).data;  
2099 -  
2100 - if (baseResp.responseData['data'] is Map) {  
2101 - isrepair = baseResp.responseData['data']['is_additional'] == '1'  
2102 - ? true  
2103 - : false;  
2104 - isselfphone = baseResp.responseData['data']['is_enter_self'] == '1'  
2105 - ? true  
2106 - : false; 2163 + sellerGuestData = SellerGuestModel.fromJson(baseResp.responseData).data;
  2164 + if (sellerGuestData != null) {
  2165 + isrepair = sellerGuestData.isAdditional == '1' ? true : false;
  2166 + isselfphone = sellerGuestData.isEnterSelf == '1' ? true : false;
  2167 + pageStateBirthdaySetting = PageState.Success;
2107 return true; 2168 return true;
2108 } 2169 }
2109 2170
@@ -33,6 +33,7 @@ class MarketingCenterProvider extends ChangeNotifier { @@ -33,6 +33,7 @@ class MarketingCenterProvider extends ChangeNotifier {
33 PageState pageStateBookInfo = PageState.Loading; 33 PageState pageStateBookInfo = PageState.Loading;
34 PageState pageStateThemeHome = PageState.Loading; 34 PageState pageStateThemeHome = PageState.Loading;
35 PageState pageStateSetting = PageState.Loading; 35 PageState pageStateSetting = PageState.Loading;
  36 +
36 PageState pageStateSettingMini = PageState.Loading; 37 PageState pageStateSettingMini = PageState.Loading;
37 List<RechargeListSunModel> rechargeList = []; 38 List<RechargeListSunModel> rechargeList = [];
38 39
@@ -2326,4 +2326,28 @@ return _navigateTo(context, "${Routes.book_time_setting_edit_page}?sunModel=${Fl @@ -2326,4 +2326,28 @@ return _navigateTo(context, "${Routes.book_time_setting_edit_page}?sunModel=${Fl
2326 2326
2327 2327
2328 2328
  2329 +
  2330 + ///设置纪念日营销
  2331 + static Future<dynamic> goBirthdaySettingPage(
  2332 + BuildContext context, {
  2333 +
  2334 + replace = false,
  2335 + }) {
  2336 + return _navigateTo(context, "${Routes.birthday_setting_page}",
  2337 + replace: replace);
  2338 + }
  2339 +
  2340 +
  2341 +
  2342 +
  2343 + ///生日短信模版
  2344 + static Future<dynamic> goBirthdaySmsModuleSettingPage(
  2345 + BuildContext context, String type, {
  2346 +
  2347 + replace = false,
  2348 + }) {
  2349 + return _navigateTo(context, "${Routes.birthday_sms_module_setting_page}?type=$type",
  2350 + replace: replace);
  2351 + }
  2352 +
2329 } 2353 }
@@ -221,6 +221,8 @@ import '../pages/my/feast_manage/feast_type_page.dart'; @@ -221,6 +221,8 @@ import '../pages/my/feast_manage/feast_type_page.dart';
221 import '../pages/my/feast_manage/feast_wine_manage_edit_page.dart'; 221 import '../pages/my/feast_manage/feast_wine_manage_edit_page.dart';
222 import '../pages/my/feast_manage/feast_wine_manage_page.dart'; 222 import '../pages/my/feast_manage/feast_wine_manage_page.dart';
223 import '../pages/my/input_name_phone_setting_page.dart'; 223 import '../pages/my/input_name_phone_setting_page.dart';
  224 +import '../pages/my/marketing_center/birthday_setting_page.dart';
  225 +import '../pages/my/marketing_center/birthday_sms_module_setting_page.dart';
224 import '../pages/my/marketing_center/book_notification/book_info_page.dart'; 226 import '../pages/my/marketing_center/book_notification/book_info_page.dart';
225 import '../pages/my/marketing_center/book_notification/chef_introduce_page.dart'; 227 import '../pages/my/marketing_center/book_notification/chef_introduce_page.dart';
226 import '../pages/my/marketing_center/book_notification/chef_introduce_page_old.dart'; 228 import '../pages/my/marketing_center/book_notification/chef_introduce_page_old.dart';
@@ -3985,4 +3987,33 @@ var parkInfoPageHandle = new Handler( @@ -3985,4 +3987,33 @@ var parkInfoPageHandle = new Handler(
3985 3987
3986 3988
3987 3989
  3990 +var birthdaySettingPageHandle = new Handler(
  3991 + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
  3992 + // String idstr = params["idstr"].first;
  3993 + // NotebookDetail detailEntity = NotebookDetail.fromJson(json
  3994 + // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
  3995 +
  3996 +
  3997 + return ChangeNotifierProvider<CustomerProvider>(
  3998 + create: (_) => CustomerProvider(), child: BirthdaySettingPage());
  3999 +});
  4000 +
  4001 +
  4002 +
  4003 +
  4004 +
  4005 + var birthdaySmsModuleSettingPageHandle = new Handler(
  4006 + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
  4007 + String type = params["type"].first;
  4008 + // NotebookDetail detailEntity = NotebookDetail.fromJson(json
  4009 + // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
  4010 +
  4011 +
  4012 + return ChangeNotifierProvider<CustomerProvider>(
  4013 + create: (_) => CustomerProvider(), child: BirthdaySmsModuleSettingPage(type:type));
  4014 +});
  4015 +
  4016 +
  4017 +
  4018 +
3988 4019
@@ -404,6 +404,13 @@ class Routes { @@ -404,6 +404,13 @@ class Routes {
404 static String park_info_page = 404 static String park_info_page =
405 "/park_info_page"; //停车指引介绍 405 "/park_info_page"; //停车指引介绍
406 406
  407 + static String birthday_setting_page =
  408 + "/birthday_setting_page"; //客户生日提醒及营销
  409 +
  410 + static String birthday_sms_module_setting_page =
  411 + "/birthday_sms_module_setting_page"; //客户生日提前通知短信设置
  412 +
  413 +
407 414
408 415
409 416
@@ -764,6 +771,15 @@ router.define(select_table_f_or_reserve, handler: handleSelectTableFOrReserveHan @@ -764,6 +771,15 @@ router.define(select_table_f_or_reserve, handler: handleSelectTableFOrReserveHan
764 router.define(book_time_setting_edit_page, handler:bookTimeSettingEditPageHandle); 771 router.define(book_time_setting_edit_page, handler:bookTimeSettingEditPageHandle);
765 772
766 router.define(park_info_page, handler:parkInfoPageHandle); 773 router.define(park_info_page, handler:parkInfoPageHandle);
  774 +
  775 +
  776 + router.define(birthday_setting_page, handler:birthdaySettingPageHandle);
  777 +
  778 + router.define(birthday_sms_module_setting_page, handler:birthdaySmsModuleSettingPageHandle);
  779 +
  780 +
  781 +
  782 +
767 783
768 784
769 785
  1 +# Generated by pub
  2 +# See https://dart.dev/tools/pub/glossary#lockfile
  3 +packages:
  4 + _fe_analyzer_shared:
  5 + dependency: transitive
  6 + description:
  7 + name: _fe_analyzer_shared
  8 + url: "https://pub.flutter-io.cn"
  9 + source: hosted
  10 + version: "22.0.0"
  11 + analyzer:
  12 + dependency: transitive
  13 + description:
  14 + name: analyzer
  15 + url: "https://pub.flutter-io.cn"
  16 + source: hosted
  17 + version: "1.7.2"
  18 + args:
  19 + dependency: transitive
  20 + description:
  21 + name: args
  22 + url: "https://pub.flutter-io.cn"
  23 + source: hosted
  24 + version: "2.4.1"
  25 + async:
  26 + dependency: transitive
  27 + description:
  28 + name: async
  29 + url: "https://pub.flutter-io.cn"
  30 + source: hosted
  31 + version: "2.11.0"
  32 + boolean_selector:
  33 + dependency: transitive
  34 + description:
  35 + name: boolean_selector
  36 + url: "https://pub.flutter-io.cn"
  37 + source: hosted
  38 + version: "2.1.1"
  39 + build:
  40 + dependency: transitive
  41 + description:
  42 + name: build
  43 + url: "https://pub.flutter-io.cn"
  44 + source: hosted
  45 + version: "2.0.3"
  46 + build_config:
  47 + dependency: transitive
  48 + description:
  49 + name: build_config
  50 + url: "https://pub.flutter-io.cn"
  51 + source: hosted
  52 + version: "0.4.7"
  53 + build_daemon:
  54 + dependency: transitive
  55 + description:
  56 + name: build_daemon
  57 + url: "https://pub.flutter-io.cn"
  58 + source: hosted
  59 + version: "2.1.10"
  60 + build_resolvers:
  61 + dependency: transitive
  62 + description:
  63 + name: build_resolvers
  64 + url: "https://pub.flutter-io.cn"
  65 + source: hosted
  66 + version: "2.0.4"
  67 + build_runner:
  68 + dependency: "direct dev"
  69 + description:
  70 + name: build_runner
  71 + url: "https://pub.flutter-io.cn"
  72 + source: hosted
  73 + version: "1.12.2"
  74 + build_runner_core:
  75 + dependency: transitive
  76 + description:
  77 + name: build_runner_core
  78 + url: "https://pub.flutter-io.cn"
  79 + source: hosted
  80 + version: "6.1.12"
  81 + built_collection:
  82 + dependency: transitive
  83 + description:
  84 + name: built_collection
  85 + url: "https://pub.flutter-io.cn"
  86 + source: hosted
  87 + version: "5.1.1"
  88 + built_value:
  89 + dependency: transitive
  90 + description:
  91 + name: built_value
  92 + url: "https://pub.flutter-io.cn"
  93 + source: hosted
  94 + version: "8.8.0"
  95 + checked_yaml:
  96 + dependency: transitive
  97 + description:
  98 + name: checked_yaml
  99 + url: "https://pub.flutter-io.cn"
  100 + source: hosted
  101 + version: "2.0.1"
  102 + cli_util:
  103 + dependency: transitive
  104 + description:
  105 + name: cli_util
  106 + url: "https://pub.flutter-io.cn"
  107 + source: hosted
  108 + version: "0.3.5"
  109 + code_builder:
  110 + dependency: transitive
  111 + description:
  112 + name: code_builder
  113 + url: "https://pub.flutter-io.cn"
  114 + source: hosted
  115 + version: "3.7.0"
  116 + collection:
  117 + dependency: transitive
  118 + description:
  119 + name: collection
  120 + url: "https://pub.flutter-io.cn"
  121 + source: hosted
  122 + version: "1.18.0"
  123 + convert:
  124 + dependency: transitive
  125 + description:
  126 + name: convert
  127 + url: "https://pub.flutter-io.cn"
  128 + source: hosted
  129 + version: "3.1.1"
  130 + coverage:
  131 + dependency: "direct dev"
  132 + description:
  133 + name: coverage
  134 + url: "https://pub.flutter-io.cn"
  135 + source: hosted
  136 + version: "1.0.3"
  137 + crypto:
  138 + dependency: transitive
  139 + description:
  140 + name: crypto
  141 + url: "https://pub.flutter-io.cn"
  142 + source: hosted
  143 + version: "3.0.2"
  144 + dart_style:
  145 + dependency: transitive
  146 + description:
  147 + name: dart_style
  148 + url: "https://pub.flutter-io.cn"
  149 + source: hosted
  150 + version: "2.1.1"
  151 + file:
  152 + dependency: transitive
  153 + description:
  154 + name: file
  155 + url: "https://pub.flutter-io.cn"
  156 + source: hosted
  157 + version: "6.1.4"
  158 + fixnum:
  159 + dependency: transitive
  160 + description:
  161 + name: fixnum
  162 + url: "https://pub.flutter-io.cn"
  163 + source: hosted
  164 + version: "1.0.1"
  165 + frontend_server_client:
  166 + dependency: transitive
  167 + description:
  168 + name: frontend_server_client
  169 + url: "https://pub.flutter-io.cn"
  170 + source: hosted
  171 + version: "2.1.3"
  172 + glob:
  173 + dependency: transitive
  174 + description:
  175 + name: glob
  176 + url: "https://pub.flutter-io.cn"
  177 + source: hosted
  178 + version: "2.1.1"
  179 + graphs:
  180 + dependency: transitive
  181 + description:
  182 + name: graphs
  183 + url: "https://pub.flutter-io.cn"
  184 + source: hosted
  185 + version: "1.0.0"
  186 + http:
  187 + dependency: "direct main"
  188 + description:
  189 + name: http
  190 + url: "https://pub.flutter-io.cn"
  191 + source: hosted
  192 + version: "0.13.5"
  193 + http_multi_server:
  194 + dependency: transitive
  195 + description:
  196 + name: http_multi_server
  197 + url: "https://pub.flutter-io.cn"
  198 + source: hosted
  199 + version: "3.2.1"
  200 + http_parser:
  201 + dependency: transitive
  202 + description:
  203 + name: http_parser
  204 + url: "https://pub.flutter-io.cn"
  205 + source: hosted
  206 + version: "4.0.2"
  207 + io:
  208 + dependency: transitive
  209 + description:
  210 + name: io
  211 + url: "https://pub.flutter-io.cn"
  212 + source: hosted
  213 + version: "1.0.4"
  214 + js:
  215 + dependency: transitive
  216 + description:
  217 + name: js
  218 + url: "https://pub.flutter-io.cn"
  219 + source: hosted
  220 + version: "0.6.5"
  221 + json_annotation:
  222 + dependency: "direct main"
  223 + description:
  224 + name: json_annotation
  225 + url: "https://pub.flutter-io.cn"
  226 + source: hosted
  227 + version: "4.1.0"
  228 + json_serializable:
  229 + dependency: "direct dev"
  230 + description:
  231 + name: json_serializable
  232 + url: "https://pub.flutter-io.cn"
  233 + source: hosted
  234 + version: "4.1.4"
  235 + logging:
  236 + dependency: transitive
  237 + description:
  238 + name: logging
  239 + url: "https://pub.flutter-io.cn"
  240 + source: hosted
  241 + version: "1.1.1"
  242 + matcher:
  243 + dependency: transitive
  244 + description:
  245 + name: matcher
  246 + url: "https://pub.flutter-io.cn"
  247 + source: hosted
  248 + version: "0.12.11"
  249 + meta:
  250 + dependency: "direct main"
  251 + description:
  252 + name: meta
  253 + url: "https://pub.flutter-io.cn"
  254 + source: hosted
  255 + version: "1.16.0"
  256 + mime:
  257 + dependency: transitive
  258 + description:
  259 + name: mime
  260 + url: "https://pub.flutter-io.cn"
  261 + source: hosted
  262 + version: "1.0.4"
  263 + node_preamble:
  264 + dependency: transitive
  265 + description:
  266 + name: node_preamble
  267 + url: "https://pub.flutter-io.cn"
  268 + source: hosted
  269 + version: "2.0.2"
  270 + package_config:
  271 + dependency: transitive
  272 + description:
  273 + name: package_config
  274 + url: "https://pub.flutter-io.cn"
  275 + source: hosted
  276 + version: "2.1.0"
  277 + path:
  278 + dependency: transitive
  279 + description:
  280 + name: path
  281 + url: "https://pub.flutter-io.cn"
  282 + source: hosted
  283 + version: "1.8.3"
  284 + pedantic:
  285 + dependency: "direct dev"
  286 + description:
  287 + name: pedantic
  288 + url: "https://pub.flutter-io.cn"
  289 + source: hosted
  290 + version: "1.11.1"
  291 + pool:
  292 + dependency: transitive
  293 + description:
  294 + name: pool
  295 + url: "https://pub.flutter-io.cn"
  296 + source: hosted
  297 + version: "1.5.1"
  298 + pub_semver:
  299 + dependency: transitive
  300 + description:
  301 + name: pub_semver
  302 + url: "https://pub.flutter-io.cn"
  303 + source: hosted
  304 + version: "2.1.4"
  305 + pubspec_parse:
  306 + dependency: transitive
  307 + description:
  308 + name: pubspec_parse
  309 + url: "https://pub.flutter-io.cn"
  310 + source: hosted
  311 + version: "1.1.0"
  312 + shelf:
  313 + dependency: transitive
  314 + description:
  315 + name: shelf
  316 + url: "https://pub.flutter-io.cn"
  317 + source: hosted
  318 + version: "1.4.1"
  319 + shelf_packages_handler:
  320 + dependency: transitive
  321 + description:
  322 + name: shelf_packages_handler
  323 + url: "https://pub.flutter-io.cn"
  324 + source: hosted
  325 + version: "3.0.2"
  326 + shelf_static:
  327 + dependency: transitive
  328 + description:
  329 + name: shelf_static
  330 + url: "https://pub.flutter-io.cn"
  331 + source: hosted
  332 + version: "1.1.2"
  333 + shelf_web_socket:
  334 + dependency: transitive
  335 + description:
  336 + name: shelf_web_socket
  337 + url: "https://pub.flutter-io.cn"
  338 + source: hosted
  339 + version: "1.0.4"
  340 + source_gen:
  341 + dependency: transitive
  342 + description:
  343 + name: source_gen
  344 + url: "https://pub.flutter-io.cn"
  345 + source: hosted
  346 + version: "1.0.3"
  347 + source_map_stack_trace:
  348 + dependency: transitive
  349 + description:
  350 + name: source_map_stack_trace
  351 + url: "https://pub.flutter-io.cn"
  352 + source: hosted
  353 + version: "2.1.1"
  354 + source_maps:
  355 + dependency: transitive
  356 + description:
  357 + name: source_maps
  358 + url: "https://pub.flutter-io.cn"
  359 + source: hosted
  360 + version: "0.10.12"
  361 + source_span:
  362 + dependency: transitive
  363 + description:
  364 + name: source_span
  365 + url: "https://pub.flutter-io.cn"
  366 + source: hosted
  367 + version: "1.10.0"
  368 + stack_trace:
  369 + dependency: transitive
  370 + description:
  371 + name: stack_trace
  372 + url: "https://pub.flutter-io.cn"
  373 + source: hosted
  374 + version: "1.11.1"
  375 + stream_channel:
  376 + dependency: transitive
  377 + description:
  378 + name: stream_channel
  379 + url: "https://pub.flutter-io.cn"
  380 + source: hosted
  381 + version: "2.1.1"
  382 + stream_transform:
  383 + dependency: transitive
  384 + description:
  385 + name: stream_transform
  386 + url: "https://pub.flutter-io.cn"
  387 + source: hosted
  388 + version: "2.1.0"
  389 + string_scanner:
  390 + dependency: transitive
  391 + description:
  392 + name: string_scanner
  393 + url: "https://pub.flutter-io.cn"
  394 + source: hosted
  395 + version: "1.2.0"
  396 + term_glyph:
  397 + dependency: transitive
  398 + description:
  399 + name: term_glyph
  400 + url: "https://pub.flutter-io.cn"
  401 + source: hosted
  402 + version: "1.2.1"
  403 + test:
  404 + dependency: "direct dev"
  405 + description:
  406 + name: test
  407 + url: "https://pub.flutter-io.cn"
  408 + source: hosted
  409 + version: "1.18.1"
  410 + test_api:
  411 + dependency: transitive
  412 + description:
  413 + name: test_api
  414 + url: "https://pub.flutter-io.cn"
  415 + source: hosted
  416 + version: "0.4.5"
  417 + test_core:
  418 + dependency: transitive
  419 + description:
  420 + name: test_core
  421 + url: "https://pub.flutter-io.cn"
  422 + source: hosted
  423 + version: "0.4.4"
  424 + timing:
  425 + dependency: transitive
  426 + description:
  427 + name: timing
  428 + url: "https://pub.flutter-io.cn"
  429 + source: hosted
  430 + version: "1.0.0"
  431 + typed_data:
  432 + dependency: transitive
  433 + description:
  434 + name: typed_data
  435 + url: "https://pub.flutter-io.cn"
  436 + source: hosted
  437 + version: "1.3.2"
  438 + vm_service:
  439 + dependency: transitive
  440 + description:
  441 + name: vm_service
  442 + url: "https://pub.flutter-io.cn"
  443 + source: hosted
  444 + version: "7.5.0"
  445 + watcher:
  446 + dependency: transitive
  447 + description:
  448 + name: watcher
  449 + url: "https://pub.flutter-io.cn"
  450 + source: hosted
  451 + version: "1.0.2"
  452 + web_socket_channel:
  453 + dependency: transitive
  454 + description:
  455 + name: web_socket_channel
  456 + url: "https://pub.flutter-io.cn"
  457 + source: hosted
  458 + version: "2.4.0"
  459 + webkit_inspection_protocol:
  460 + dependency: transitive
  461 + description:
  462 + name: webkit_inspection_protocol
  463 + url: "https://pub.flutter-io.cn"
  464 + source: hosted
  465 + version: "1.2.0"
  466 + yaml:
  467 + dependency: transitive
  468 + description:
  469 + name: yaml
  470 + url: "https://pub.flutter-io.cn"
  471 + source: hosted
  472 + version: "3.1.1"
  473 +sdks:
  474 + dart: ">=2.18.0 <3.0.0"