Commit 68c8ce6ec03d4d40cf1b03d2063538a58ef10118

Authored by wdn127929
1 parent 24dbcdb7

企业资料上传UI && 支付返券UI OK

@@ -449,7 +449,7 @@ @@ -449,7 +449,7 @@
449 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 449 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
450 CLANG_ENABLE_MODULES = YES; 450 CLANG_ENABLE_MODULES = YES;
451 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 451 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
452 - CURRENT_PROJECT_VERSION = 5507; 452 + CURRENT_PROJECT_VERSION = 55092;
453 DEVELOPMENT_TEAM = 8J59HM8B82; 453 DEVELOPMENT_TEAM = 8J59HM8B82;
454 ENABLE_BITCODE = NO; 454 ENABLE_BITCODE = NO;
455 INFOPLIST_FILE = Runner/Info.plist; 455 INFOPLIST_FILE = Runner/Info.plist;
@@ -632,7 +632,7 @@ @@ -632,7 +632,7 @@
632 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 632 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
633 CLANG_ENABLE_MODULES = YES; 633 CLANG_ENABLE_MODULES = YES;
634 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 634 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
635 - CURRENT_PROJECT_VERSION = 5507; 635 + CURRENT_PROJECT_VERSION = 55092;
636 DEVELOPMENT_TEAM = 8J59HM8B82; 636 DEVELOPMENT_TEAM = 8J59HM8B82;
637 ENABLE_BITCODE = NO; 637 ENABLE_BITCODE = NO;
638 INFOPLIST_FILE = Runner/Info.plist; 638 INFOPLIST_FILE = Runner/Info.plist;
@@ -658,7 +658,7 @@ @@ -658,7 +658,7 @@
658 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 658 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
659 CLANG_ENABLE_MODULES = YES; 659 CLANG_ENABLE_MODULES = YES;
660 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 660 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
661 - CURRENT_PROJECT_VERSION = 5507; 661 + CURRENT_PROJECT_VERSION = 55092;
662 DEVELOPMENT_TEAM = 8J59HM8B82; 662 DEVELOPMENT_TEAM = 8J59HM8B82;
663 ENABLE_BITCODE = NO; 663 ENABLE_BITCODE = NO;
664 INFOPLIST_FILE = Runner/Info.plist; 664 INFOPLIST_FILE = Runner/Info.plist;
@@ -1608,7 +1608,7 @@ class _CouponEidtPageState extends State<CouponEidtPage> { @@ -1608,7 +1608,7 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
1608 return; 1608 return;
1609 } 1609 }
1610 // 券开始早于活动开始 && 券结束大于活动结束 1610 // 券开始早于活动开始 && 券结束大于活动结束
1611 - if (widget.from != null) { 1611 + if (widget.from != null&& widget.from != 'null') {
1612 if (DateUtil.getDateTime(fromDate) 1612 if (DateUtil.getDateTime(fromDate)
1613 .compareTo(DateUtil.getDateTime(widget.from!)) > 1613 .compareTo(DateUtil.getDateTime(widget.from!)) >
1614 0) { 1614 0) {
  1 +import 'package:cached_network_image/cached_network_image.dart';
  2 +import 'package:common_utils/common_utils.dart';
  3 +import 'package:flutter/material.dart';
  4 +import 'package:flutter_picker_plus/picker.dart';
  5 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  6 +import 'package:one_key/widgets/system_app_bar.dart';
  7 +import 'package:provider/provider.dart';
1 8
2 -// import 'package:flutter/material.dart';  
3 -// import 'package:one_key/widgets/system_app_bar.dart';  
4 -  
5 -// /**  
6 -// * 企业资料上传  
7 -// */  
8 -  
9 -// class EnterpriseInformationUploadPage extends StatefulWidget {  
10 -// const EnterpriseInformationUploadPage({super.key});  
11 -  
12 -// @override  
13 -// State<EnterpriseInformationUploadPage> createState() => _EnterpriseInformationUploadPageState();  
14 -// }  
15 -  
16 -// class _EnterpriseInformationUploadPageState extends State<EnterpriseInformationUploadPage> {  
17 -// @override  
18 -// Widget build(BuildContext context) {  
19 -// return Scaffold(  
20 -// appBar: SystemAppBar('资料上传'),  
21 -// body: ,  
22 -// );  
23 -// }  
24 -// }  
  9 +import '../../../models/upload_img_model.dart';
  10 +import '../../../provider/finance_provider.dart';
  11 +import '../../../provider/upload_img_provider.dart';
  12 +import '../../../res/colors.dart';
  13 +import '../../../utils/dialog_util.dart';
  14 +import '../../../utils/screen_util.dart';
  15 +import '../../../utils/upload_image_util.dart';
  16 +import '../../../utils/utils.dart';
  17 +import '../../../widgets/h_empty_view.dart';
  18 +import '../../../widgets/round_button.dart';
  19 +import '../../../widgets/v_empty_view.dart';
  20 +import '../../online_check/img_picker_widget.dart';
  21 +import '../marketing_center/book_notification/img_picker_invitation_widget.dart';
  22 +
  23 +/**
  24 + * 企业资料上传
  25 + */
  26 +
  27 +class EnterpriseInformationUploadPage extends StatefulWidget {
  28 + const EnterpriseInformationUploadPage({super.key});
  29 +
  30 + @override
  31 + State<EnterpriseInformationUploadPage> createState() =>
  32 + _EnterpriseInformationUploadPageState();
  33 +}
  34 +
  35 +class _EnterpriseInformationUploadPageState
  36 + extends State<EnterpriseInformationUploadPage> {
  37 + String stime = '点击选择营业执照开始日期';
  38 + String etime = '点击选择营业执照结束日期';
  39 + ScrollController _controller = ScrollController();
  40 + late UploadImageProvider _uploadImageProvider;
  41 + late FinanceProvider financeProvider;
  42 +
  43 + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
  44 +
  45 + @override
  46 + void initState() {
  47 + super.initState();
  48 +
  49 + WidgetsBinding.instance.addPostFrameCallback((_) {
  50 + _getQiniuInfo();
  51 + });
  52 + }
  53 +
  54 + @override
  55 + void dispose() {
  56 + _uploadImageProvider.storeImage1 = UploadImgModel();
  57 + _uploadImageProvider.storeImage2 = UploadImgModel();
  58 +
  59 + super.dispose();
  60 + }
  61 +
  62 + ///获取七牛云token
  63 + ///
  64 + _getQiniuInfo() async {
  65 + await _uploadImageProvider.getQiniuInfo(context, {});
  66 + }
  67 +
  68 + Widget _title(String title) {
  69 + return Padding(
  70 + padding: EdgeInsets.only(left: w(16), top: w(10), bottom: w(10)),
  71 + child: Text(
  72 + title,
  73 + style: TextStyle(color: MyColours.color_515151, fontSize: font(16)),
  74 + ),
  75 + );
  76 + }
  77 +
  78 + Widget _inputWidget(String title, TextEditingController controller,
  79 + FocusNode focusNode, String hintText,
  80 + {num width = 40}) {
  81 + return Container(
  82 + margin: EdgeInsets.only(left: w(width)),
  83 + padding: EdgeInsets.only(top: w(10), bottom: w(10), right: w(16)),
  84 + decoration: BoxDecoration(
  85 + border: Border(
  86 + bottom:
  87 + BorderSide(color: MyColours.color_E7E7E7, width: w(0.5)))),
  88 + child: Row(
  89 + children: [
  90 + Text(
  91 + title,
  92 + style: TextStyle(color: MyColours.color_515151, fontSize: font(14)),
  93 + ),
  94 + HEmptyView(10),
  95 + Expanded(
  96 + child: TextField(
  97 + controller: controller,
  98 + textAlign: TextAlign.right,
  99 + textAlignVertical: TextAlignVertical.center,
  100 + maxLines: 1,
  101 + // //光标颜色
  102 + // cursorColor:
  103 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  104 + //输入文本的样式
  105 + inputFormatters: [
  106 + // FilteringTextInputFormatter.allow(RegExp("[0-9.]")),
  107 + ], // 限制输入为数字,
  108 + style: TextStyle(
  109 + color: MyColours.color_515151,
  110 + fontSize: ScreenUtil().setSp(24),
  111 + ),
  112 + focusNode: focusNode,
  113 + decoration: InputDecoration(
  114 + isCollapsed: true,
  115 + border: OutlineInputBorder(borderSide: BorderSide.none),
  116 + hintText: hintText,
  117 + hintStyle: TextStyle(
  118 + color: MyColours.color_999999,
  119 + fontSize: ScreenUtil().setSp(24),
  120 + ),
  121 + enabledBorder: new UnderlineInputBorder(
  122 + borderSide: BorderSide.none,
  123 + ),
  124 + focusedBorder: new UnderlineInputBorder(
  125 + borderSide: BorderSide.none,
  126 + ),
  127 + ),
  128 + onChanged: (value) {},
  129 + onEditingComplete: () {
  130 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  131 + },
  132 + keyboardType: TextInputType.numberWithOptions()),
  133 + ),
  134 + ],
  135 + ),
  136 + );
  137 + }
  138 +
  139 + ///是否立即启用
  140 + Widget _canUse(
  141 + String title,
  142 + bool swich,
  143 + GestureTapCallback onTap,
  144 + ) {
  145 + return InkWell(
  146 + onTap: onTap,
  147 + child: Container(
  148 + margin: EdgeInsets.only(left: w(40)),
  149 + padding: EdgeInsets.only(top: w(10), bottom: w(10), right: w(16)),
  150 + decoration: BoxDecoration(
  151 + border: Border(
  152 + bottom:
  153 + BorderSide(color: MyColours.color_E7E7E7, width: w(0.5)))),
  154 + child: Row(
  155 + crossAxisAlignment: CrossAxisAlignment.center,
  156 + mainAxisAlignment: MainAxisAlignment.center,
  157 + children: [
  158 + Container(
  159 + // height: ScreenUtil().setWidth(40),
  160 + // color: Colors.red,
  161 + child: Text(
  162 + title,
  163 + style: TextStyle(
  164 + color: MyColours.color_515151,
  165 + fontWeight: FontWeight.normal,
  166 + fontSize: font(14)),
  167 + ),
  168 + ),
  169 + Spacer(),
  170 + Image.asset(
  171 + swich
  172 + ? Utils.getImgPath('swich_on_lit')
  173 + : Utils.getImgPath('swich_off_lit'),
  174 + width: ScreenUtil().setWidth(44 * 2),
  175 + )
  176 + ],
  177 + ),
  178 + ),
  179 + );
  180 + }
  181 +
  182 + ///时间选择
  183 + Widget _select(String title, String hintText, GestureTapCallback onTap) {
  184 + return InkWell(
  185 + onTap: onTap,
  186 + child: Container(
  187 + margin: EdgeInsets.only(left: w(40)),
  188 + padding: EdgeInsets.only(top: w(10), bottom: w(10), right: w(16)),
  189 + decoration: BoxDecoration(
  190 + border: Border(
  191 + bottom:
  192 + BorderSide(color: MyColours.color_E7E7E7, width: w(0.5)))),
  193 + child: Row(
  194 + crossAxisAlignment: CrossAxisAlignment.center,
  195 + mainAxisAlignment: MainAxisAlignment.center,
  196 + children: [
  197 + Container(
  198 + // height: ScreenUtil().setWidth(40),
  199 + // color: Colors.red,
  200 + child: Text(
  201 + title,
  202 + style: TextStyle(
  203 + color: MyColours.color_515151, fontSize: font(14)),
  204 + ),
  205 + ),
  206 + HEmptyView(20),
  207 + Spacer(),
  208 + Text(hintText,
  209 + style: TextStyle(
  210 + color: hintText == '点击选择营业执照开始日期' ||
  211 + hintText == '点击选择营业执照结束日期' ||
  212 + hintText == '点击选择开户银行'
  213 + ? MyColours.color_999999
  214 + : MyColours.color_515151,
  215 + fontSize: font(12),
  216 + )),
  217 + HEmptyView(8),
  218 + Image.asset(
  219 + Utils.getImgPath('arrow_right_new'),
  220 + width: w(7),
  221 + ),
  222 + ],
  223 + ),
  224 + ),
  225 + );
  226 + }
  227 +
  228 + @override
  229 + Widget build(BuildContext context) {
  230 + _uploadImageProvider =
  231 + Provider.of<UploadImageProvider>(context, listen: false);
  232 + financeProvider = Provider.of<FinanceProvider>(context, listen: false);
  233 + return Scaffold(
  234 + backgroundColor: MyColours.color_ffffff,
  235 + key: scaffoldKey,
  236 + appBar: SystemAppBar('资料上传'),
  237 + body: Column(
  238 + crossAxisAlignment: CrossAxisAlignment.start,
  239 + children: [
  240 + Expanded(
  241 + child: SingleChildScrollView(
  242 + controller: _controller,
  243 + child: Column(
  244 + crossAxisAlignment: CrossAxisAlignment.start,
  245 + children: [
  246 + _title('营业执照信息'),
  247 + Container(
  248 + padding:
  249 + EdgeInsets.only(top: w(8), bottom: w(8), right: w(16)),
  250 + margin: EdgeInsets.only(left: w(40)),
  251 + decoration: BoxDecoration(
  252 + border: Border(
  253 + bottom: BorderSide(
  254 + width: w(0.5), color: MyColours.color_E7E7E7))),
  255 + child: Row(
  256 + children: [
  257 + Text(
  258 + '企业/个体户选择',
  259 + style: TextStyle(
  260 + color: MyColours.color_515151, fontSize: font(14)),
  261 + ),
  262 + Spacer(),
  263 + Container(
  264 + // width: w(100),
  265 + // height: w(30),
  266 + padding: EdgeInsets.symmetric(
  267 + horizontal: w(10), vertical: w(5)),
  268 + decoration: BoxDecoration(
  269 + color: MyColours.color_438E93,
  270 + borderRadius: BorderRadius.only(
  271 + topLeft: Radius.circular(r(5)),
  272 + bottomLeft: Radius.circular(r(5)))),
  273 + child: Text(
  274 + '企业',
  275 + style: TextStyle(
  276 + color: MyColours.color_ffffff,
  277 + fontSize: font(14)),
  278 + ),
  279 + ),
  280 + Container(
  281 + padding: EdgeInsets.symmetric(
  282 + horizontal: w(10), vertical: w(5)),
  283 + decoration: BoxDecoration(
  284 + color: MyColours.color_DBDBDB,
  285 + borderRadius: BorderRadius.only(
  286 + topRight: Radius.circular(r(5)),
  287 + bottomRight: Radius.circular(r(5)))),
  288 + child: Text(
  289 + '个体',
  290 + style: TextStyle(
  291 + color: MyColours.color_438E93,
  292 + fontSize: font(14)),
  293 + ),
  294 + )
  295 + ],
  296 + ),
  297 + ),
  298 + _inputWidget(
  299 + '注册号', TextEditingController(), FocusNode(), '点击输入营业执照注册号'),
  300 + _inputWidget('注册名称', TextEditingController(), FocusNode(),
  301 + '点击输入营业执照上的企业名称'),
  302 + _select('营业执照开始于', stime, () {
  303 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  304 + //弹出时间选择器
  305 +
  306 + DialogUtil.showPickerDateTime24(
  307 + context,
  308 + scaffoldKey,
  309 + (value) {
  310 + // {'text': picker.adapter.text, 'select': selecteds}
  311 + if (value != null) {
  312 + setState(() {
  313 + print(value);
  314 + stime = DateUtil.formatDateStr(value,
  315 + format: DateFormats.y_mo_d);
  316 + });
  317 + }
  318 + // showDateSelWidget = false;
  319 + },
  320 + dateTime: stime == '点击选择营业执照开始日期'
  321 + ? null
  322 + : DateUtil.getDateTime(stime),
  323 + pickerDateTimeType: PickerDateTimeType.kYMD,
  324 + onCancel: () {
  325 + // showDateSelWidget = false;
  326 + });
  327 + }),
  328 + _canUse('营业期限长期有效', true, () {}),
  329 + _select(
  330 + '营业执照结束于',
  331 + etime,
  332 + () {
  333 + FocusScope.of(context)
  334 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  335 + //弹出时间选择器
  336 +
  337 + DialogUtil.showPickerDateTime24(
  338 + context,
  339 + scaffoldKey,
  340 + (value) {
  341 + // {'text': picker.adapter.text, 'select': selecteds}
  342 + if (value != null) {
  343 + setState(() {
  344 + print(value);
  345 + etime = DateUtil.formatDateStr(value,
  346 + format: DateFormats.y_mo_d);
  347 + });
  348 + }
  349 + // showDateSelWidget = false;
  350 + },
  351 + dateTime: etime == '点击选择营业执照结束日期'
  352 + ? null
  353 + : DateUtil.getDateTime(etime),
  354 + pickerDateTimeType: PickerDateTimeType.kYMD,
  355 + onCancel: () {
  356 + // showDateSelWidget = false;
  357 + });
  358 + },
  359 + ),
  360 + _inputWidget('经营者/法人姓名', TextEditingController(), FocusNode(),
  361 + '点击输入经营者/法人姓名'),
  362 + _inputWidget(
  363 + '注册地址', TextEditingController(), FocusNode(), '点击输入注册地址'),
  364 + Consumer<UploadImageProvider>(builder: (context, model, _) {
  365 + return Padding(
  366 + padding: EdgeInsets.only(
  367 + left: w(20), top: w(20), bottom: w(12)),
  368 + child: ImgPickerWidget(
  369 + scrollController: _controller,
  370 + model: model,
  371 + maxImageNumber: 1,
  372 + uploadType: UploadType.TableManagerType,
  373 + subTips: '营业执照照片',
  374 + deleteCallback: (int index) {
  375 + // _delTablePhoto(
  376 + // context,
  377 + // _uploadImageProvider.tableImageList[index].photoID,
  378 + // index);
  379 + },
  380 + callback: () {
  381 + // for (UploadImgModel item
  382 + // in _uploadImageProvider.tableImageList) {
  383 + // if (item.process! < 1) {
  384 + // Utils.showToast('正在上传图片,请稍等');
  385 + // return;
  386 + // }
  387 + // }
  388 + // //接口,和桌子绑定
  389 + // List imageQiniuUrlList = [];
  390 + // for (int i = 0;
  391 + // i < _uploadImageProvider.tableImageList.length;
  392 + // i++) {
  393 + // if (!_uploadImageProvider.tableImageList[i].isUpload) {
  394 + // imageQiniuUrlList.add({
  395 + // "url":
  396 + // _uploadImageProvider.tableImageList[i].qiniuUrl
  397 + // });
  398 + // }
  399 + // }
  400 + // _setTablePhoto(context, imageQiniuUrlList);
  401 + },
  402 + ));
  403 + }),
  404 + VEmptyView(24),
  405 + _title('经营者/法人信息'),
  406 + VEmptyView(20),
  407 + _inputWidget('法人身份证号码', TextEditingController(), FocusNode(),
  408 + '点击输入法人身份证号码'),
  409 + _inputWidget('法人身份证住址', TextEditingController(), FocusNode(),
  410 + '点击输入法人身份证住址'),
  411 + _inputWidget(
  412 + '电话', TextEditingController(), FocusNode(), '点击输入法人电话号码'),
  413 + _inputWidget('邮箱', TextEditingController(), FocusNode(),
  414 + '点击输入用来收取支付信息的邮箱'),
  415 + Row(children: [
  416 + Padding(
  417 + padding: EdgeInsets.only(
  418 + left: w(20), top: w(20), bottom: w(12)),
  419 + child: ImgPickerInvitationWidget(
  420 + scrollController: _controller,
  421 + uploadType: UploadType.InvitationStoreType,
  422 + model: _uploadImageProvider,
  423 + index: 5,
  424 + imageModel: _uploadImageProvider.storeImage1,
  425 + subTips: '法人身份证人像页',
  426 + callback: () {},
  427 + )),
  428 + Padding(
  429 + padding: EdgeInsets.only(
  430 + left: w(20), top: w(20), bottom: w(12)),
  431 + child: ImgPickerInvitationWidget(
  432 + scrollController: _controller,
  433 + uploadType: UploadType.InvitationStoreType,
  434 + model: _uploadImageProvider,
  435 + index: 6,
  436 + imageModel: _uploadImageProvider.storeImage2,
  437 + subTips: '法人身份证国徽页',
  438 + callback: () {},
  439 + )),
  440 + ]),
  441 + _title('收款信息'),
  442 + VEmptyView(20),
  443 + _select('开户银行', '点击选择开户银行', () {
  444 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  445 + //弹出开户银行
  446 + }),
  447 + _inputWidget('开户银行网点', TextEditingController(), FocusNode(),
  448 + '点击输入开户银行网点全称'),
  449 + _inputWidget(
  450 + '银行账户', TextEditingController(), FocusNode(), '点击录入银行账户号'),
  451 + _inputWidget('收款商户简称', TextEditingController(), FocusNode(),
  452 + '点击输入商户简称,用户支付时可见'),
  453 + _inputWidget(
  454 + '服务电话', TextEditingController(), FocusNode(), '点击输入服务电话'),
  455 + VEmptyView(44),
  456 + Padding(
  457 + padding: EdgeInsets.only(left: w(16)),
  458 + child: Text(
  459 + '注:如果填写信息遇到问题,请联系400-000-9690解决。',
  460 + style: TextStyle(
  461 + fontSize: font(10), color: MyColours.color_515151),
  462 + ),
  463 + ),
  464 + VEmptyView(44),
  465 + ],
  466 + ),
  467 + )),
  468 + Container(
  469 + padding: EdgeInsets.only(
  470 + top: w(13), left: w(45), right: w(45), bottom: w(26)),
  471 + child: RoundButton(
  472 + text: '立即提交',
  473 + height: w(43),
  474 + radius: r(5),
  475 + gradientStart: MyColours.color_438E93,
  476 + gradientEnd: MyColours.color_438E93,
  477 + borderColor: MyColours.color_438E93,
  478 + textColor: MyColours.color_ffffff,
  479 + isBold: true,
  480 + fontSize: 32,
  481 + onPressed: () {},
  482 + ),
  483 + )
  484 + ],
  485 + ),
  486 + );
  487 + }
  488 +}
@@ -67,10 +67,12 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> { @@ -67,10 +67,12 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> {
67 body: SingleChildScrollView( 67 body: SingleChildScrollView(
68 child: Column( 68 child: Column(
69 children: [ 69 children: [
70 - _item('收银资料上传', () {}), 70 + _item('收银资料上传', () {
  71 + NavigatorUtil.goEnterpriseInformationUploadPage(context);
  72 + }),
71 _item('微信商户账户开通结果查询', () {}), 73 _item('微信商户账户开通结果查询', () {}),
72 _item('支付返券', () { 74 _item('支付返券', () {
73 - // NavigatorUtil.goPaymentGiftPage(context); 75 + NavigatorUtil.goPaymentGiftPage(context);
74 }), 76 }),
75 _item('门店收款码', () { 77 _item('门店收款码', () {
76 NavigatorUtil.goPaymentCodePage(context); 78 NavigatorUtil.goPaymentCodePage(context);
@@ -171,8 +171,7 @@ class _TransactionRecordDetailPageState @@ -171,8 +171,7 @@ class _TransactionRecordDetailPageState
171 // : 171 // :
172 body: Consumer<FinanceProvider>(builder: (context, model, _) { 172 body: Consumer<FinanceProvider>(builder: (context, model, _) {
173 if (model.pageStateRecordDetail != PageState.Success) { 173 if (model.pageStateRecordDetail != PageState.Success) {
174 - return Expanded(  
175 - child: ExceptionPage( 174 + return ExceptionPage(
176 pageState: model.pageStateRecordHome, 175 pageState: model.pageStateRecordHome,
177 callback: () async { 176 callback: () async {
178 _getDiscountOrderInfo(isShowLoading: true); 177 _getDiscountOrderInfo(isShowLoading: true);
@@ -180,7 +179,7 @@ class _TransactionRecordDetailPageState @@ -180,7 +179,7 @@ class _TransactionRecordDetailPageState
180 emptyMsg: "暂时没有交易详情信息哦", 179 emptyMsg: "暂时没有交易详情信息哦",
181 emptyImg: "empty_search", 180 emptyImg: "empty_search",
182 showMsg: "加载中,请稍候...", 181 showMsg: "加载中,请稍候...",
183 - )); 182 + );
184 } else { 183 } else {
185 // bool isPay = false; 184 // bool isPay = false;
186 // if ((model.discountOrderInfoModelData?.refundId != null && 185 // if ((model.discountOrderInfoModelData?.refundId != null &&
@@ -286,35 +285,39 @@ class _TransactionRecordDetailPageState @@ -286,35 +285,39 @@ class _TransactionRecordDetailPageState
286 ], 285 ],
287 ), 286 ),
288 )), 287 )),
289 - if (widget.status != '00' &&  
290 - model.discountOrderInfoModelData?.status == '2')  
291 - Container(  
292 - padding: EdgeInsets.only(  
293 - top: w(13), left: w(45), right: w(45), bottom: w(26)),  
294 - child: RoundButton(  
295 - text: '申请退款',  
296 - height: w(43),  
297 - radius: r(5),  
298 - gradientStart: MyColours.color_438E93,  
299 - gradientEnd: MyColours.color_438E93,  
300 - borderColor: MyColours.color_438E93,  
301 - textColor: MyColours.color_ffffff,  
302 - isBold: true,  
303 - fontSize: 32,  
304 - onPressed: () {  
305 - //余额充足,可申请退款  
306 - DialogUtil.cupertinoAlertDialog(context,  
307 - title: '提示',  
308 - content: '退款成功后,退款金额将原路返回到顾客账户,请确认是否退款!',  
309 - lTitle: '取消退款',  
310 - rTitle: '确认退款',  
311 - contentColor: MyColours.color_000000,  
312 - rCallback: () {  
313 - _discountPayRefundApply();  
314 - });  
315 - },  
316 - ),  
317 - ) 288 + (widget.status != '00' &&
  289 + model.discountOrderInfoModelData?.status == '2')
  290 + ? Container(
  291 + padding: EdgeInsets.only(
  292 + top: w(13),
  293 + left: w(45),
  294 + right: w(45),
  295 + bottom: w(26)),
  296 + child: RoundButton(
  297 + text: '申请退款',
  298 + height: w(43),
  299 + radius: r(5),
  300 + gradientStart: MyColours.color_438E93,
  301 + gradientEnd: MyColours.color_438E93,
  302 + borderColor: MyColours.color_438E93,
  303 + textColor: MyColours.color_ffffff,
  304 + isBold: true,
  305 + fontSize: 32,
  306 + onPressed: () {
  307 + //余额充足,可申请退款
  308 + DialogUtil.cupertinoAlertDialog(context,
  309 + title: '提示',
  310 + content: '退款成功后,退款金额将原路返回到顾客账户,请确认是否退款!',
  311 + lTitle: '取消退款',
  312 + rTitle: '确认退款',
  313 + contentColor: MyColours.color_000000,
  314 + rCallback: () {
  315 + _discountPayRefundApply();
  316 + });
  317 + },
  318 + ),
  319 + )
  320 + : SizedBox()
318 ], 321 ],
319 ); 322 );
320 } 323 }
1 -  
2 import 'dart:convert'; 1 import 'dart:convert';
3 2
4 import 'dart:io'; 3 import 'dart:io';
@@ -53,6 +52,7 @@ class ImgPickerInvitationWidget extends StatefulWidget { @@ -53,6 +52,7 @@ class ImgPickerInvitationWidget extends StatefulWidget {
53 final double height; 52 final double height;
54 53
55 final EdgeInsets padding; 54 final EdgeInsets padding;
  55 + final String? subTips;
56 ImgPickerInvitationWidget( 56 ImgPickerInvitationWidget(
57 {Key? key, 57 {Key? key,
58 this.scrollController, 58 this.scrollController,
@@ -67,7 +67,8 @@ class ImgPickerInvitationWidget extends StatefulWidget { @@ -67,7 +67,8 @@ class ImgPickerInvitationWidget extends StatefulWidget {
67 this.padding = EdgeInsets.zero, 67 this.padding = EdgeInsets.zero,
68 this.maxImageNumber, 68 this.maxImageNumber,
69 this.index, 69 this.index,
70 - this.height = 281}) 70 + this.height = 281,
  71 + this.subTips})
71 : super(key: key); 72 : super(key: key);
72 73
73 @override 74 @override
@@ -107,7 +108,7 @@ class _ImgPickerInvitationWidgetState @@ -107,7 +108,7 @@ class _ImgPickerInvitationWidgetState
107 } 108 }
108 109
109 ///#相机拍照,单图选择 110 ///#相机拍照,单图选择
110 - Future _getFromPictureOrCamera(imageSource) async { 111 + Future _getFromPictureOrCamera(imageSource) async {
111 final pickedFile = await picker.pickImage(source: imageSource); 112 final pickedFile = await picker.pickImage(source: imageSource);
112 if (pickedFile != null) { 113 if (pickedFile != null) {
113 File compressedFile = await FlutterNativeImage.compressImage( 114 File compressedFile = await FlutterNativeImage.compressImage(
@@ -135,8 +136,8 @@ class _ImgPickerInvitationWidgetState @@ -135,8 +136,8 @@ class _ImgPickerInvitationWidgetState
135 if (need) { 136 if (need) {
136 file = File(compressedFile.absolute.path); 137 file = File(compressedFile.absolute.path);
137 } 138 }
138 - UploadImageUtil()  
139 - .startUploadOnly(context, file, widget.index, true, widget.model!,widget.callback); 139 + UploadImageUtil().startUploadOnly(
  140 + context, file, widget.index, true, widget.model!, widget.callback);
140 } 141 }
141 } 142 }
142 } 143 }
@@ -314,7 +315,7 @@ class _ImgPickerInvitationWidgetState @@ -314,7 +315,7 @@ class _ImgPickerInvitationWidgetState
314 // } 315 // }
315 316
316 ///添加图片UI弹出 317 ///添加图片UI弹出
317 - Future _openModalBottomSheet(context) async { 318 + Future _openModalBottomSheet(context) async {
318 final option = await showModalBottomSheet( 319 final option = await showModalBottomSheet(
319 context: context, 320 context: context,
320 backgroundColor: Colors.transparent, 321 backgroundColor: Colors.transparent,
@@ -335,8 +336,8 @@ class _ImgPickerInvitationWidgetState @@ -335,8 +336,8 @@ class _ImgPickerInvitationWidgetState
335 Utils.getPickPermission(context, () { 336 Utils.getPickPermission(context, () {
336 _getFromPictureOrCamera(ImageSource.camera); 337 _getFromPictureOrCamera(ImageSource.camera);
337 if (Navigator.canPop(context)) { 338 if (Navigator.canPop(context)) {
338 - Navigator.pop(context);  
339 - } 339 + Navigator.pop(context);
  340 + }
340 }, Permission.camera); 341 }, Permission.camera);
341 }, 342 },
342 child: Container( 343 child: Container(
@@ -363,8 +364,8 @@ class _ImgPickerInvitationWidgetState @@ -363,8 +364,8 @@ class _ImgPickerInvitationWidgetState
363 // pickAsset(RequestType.image); 364 // pickAsset(RequestType.image);
364 _getFromPictureOrCamera(ImageSource.gallery); 365 _getFromPictureOrCamera(ImageSource.gallery);
365 if (Navigator.canPop(context)) { 366 if (Navigator.canPop(context)) {
366 - Navigator.pop(context);  
367 - } 367 + Navigator.pop(context);
  368 + }
368 }, 369 },
369 Platform.isAndroid 370 Platform.isAndroid
370 ? Permission.storage 371 ? Permission.storage
@@ -391,8 +392,7 @@ class _ImgPickerInvitationWidgetState @@ -391,8 +392,7 @@ class _ImgPickerInvitationWidgetState
391 InkWell( 392 InkWell(
392 onTap: () { 393 onTap: () {
393 if (Navigator.canPop(context)) { 394 if (Navigator.canPop(context)) {
394 -  
395 - Navigator.pop(context, '取消'); 395 + Navigator.pop(context, '取消');
396 } 396 }
397 }, 397 },
398 child: Container( 398 child: Container(
@@ -464,6 +464,8 @@ class _ImgPickerInvitationWidgetState @@ -464,6 +464,8 @@ class _ImgPickerInvitationWidgetState
464 464
465 /// 九宫格 465 /// 九宫格
466 Widget _getGridImg(context, UploadImgModel imageModel) { 466 Widget _getGridImg(context, UploadImgModel imageModel) {
  467 + double width =
  468 + (ScreenUtil().screenWidth - ScreenUtil().setWidth(40) * 2) / 3;
467 return imageModel.file != null || 469 return imageModel.file != null ||
468 (imageModel.qiniuUrl != null && imageModel.qiniuUrl != '') 470 (imageModel.qiniuUrl != null && imageModel.qiniuUrl != '')
469 ? InkWell( 471 ? InkWell(
@@ -493,88 +495,76 @@ class _ImgPickerInvitationWidgetState @@ -493,88 +495,76 @@ class _ImgPickerInvitationWidgetState
493 child: Stack(alignment: Alignment.bottomCenter, children: [ 495 child: Stack(alignment: Alignment.bottomCenter, children: [
494 Stack(clipBehavior: Clip.none, children: [ 496 Stack(clipBehavior: Clip.none, children: [
495 imageModel.qiniuUrl != null && imageModel.qiniuUrl != '' 497 imageModel.qiniuUrl != null && imageModel.qiniuUrl != ''
496 - ? Center(  
497 - child: Image.network(  
498 - imageModel.qiniuUrl!,  
499 - fit: BoxFit.contain,  
500 - // width: double.infinity,  
501 - // width: ScreenUtil()  
502 - // .setWidth(imgSize * 2),  
503 - // height: ScreenUtil().setWidth(281 * 2),  
504 - ))  
505 - : Center( 498 + ? CachedNetworkImage(
  499 + imageUrl: imageModel.qiniuUrl!,
  500 + fit: BoxFit.cover,
  501 + width: ScreenUtil().setWidth(100 * 2),
  502 + height: ScreenUtil().setWidth(100 * 2),
  503 + )
  504 + : Container(
506 child: Image.file( 505 child: Image.file(
507 - imageModel.file!,  
508 - fit: BoxFit.contain,  
509 - // width: double.infinity,  
510 - // width: ScreenUtil()  
511 - // .setWidth(imgSize * 2),  
512 - // height: ScreenUtil().setWidth(281 * 2),  
513 - )),  
514 - Positioned(  
515 - left: 0,  
516 - top: 0,  
517 - child: (imageModel.file != null) &&  
518 - imageModel.process != 1 &&  
519 - imageModel.process != 0.01  
520 - ? Container(  
521 - width: ScreenUtil().screenWidth,  
522 - height: w(widget.height),  
523 - color: MyColours.color_4D000000,  
524 - child: Center(  
525 - child: Text('上传中',  
526 - style:  
527 - TextStyle(color: MyColours.color_F8F9FD)),  
528 - ),  
529 - )  
530 - : Container()), 506 + imageModel.file!,
  507 + fit: BoxFit.cover,
  508 + width: ScreenUtil().setWidth(100 * 2),
  509 + height: ScreenUtil().setWidth(100 * 2),
  510 + ),
  511 + ),
  512 + // Positioned(
  513 + // left: 0,
  514 + // top: 0,
  515 + // child: (imageModel.file != null) &&
  516 + // imageModel.process != 1 &&
  517 + // imageModel.process != 0.01
  518 + // ? Container(
  519 + // width: ScreenUtil().screenWidth,
  520 + // height: w(widget.height),
  521 + // color: MyColours.color_4D000000,
  522 + // child: Center(
  523 + // child: Text('上传中',
  524 + // style:
  525 + // TextStyle(color: MyColours.color_F8F9FD)),
  526 + // ),
  527 + // )
  528 + // : Container()),
531 Offstage( 529 Offstage(
532 offstage: imageModel.process! < 1, 530 offstage: imageModel.process! < 1,
533 child: Align( 531 child: Align(
534 alignment: Alignment.topRight, 532 alignment: Alignment.topRight,
535 child: GestureDetector( 533 child: GestureDetector(
536 - child: Image.asset(  
537 - Utils.getImgPath("delete"),  
538 - width: ScreenUtil().setWidth(40),  
539 - height: ScreenUtil().setWidth(40),  
540 - ),  
541 - onTap: () {  
542 - // if (widget.uploadType ==  
543 - // UploadType.TableManagerType) {  
544 - // if (imageModel.isUpload) {  
545 - //已经传到服务器,弹提醒窗口,是否删除  
546 - //修改之前有内容,则弹框  
547 - DialogUtil.cupertinoAlertDialog(context,  
548 - title: "",  
549 - content: "是否确定删除该照片?", lCallback: () {  
550 - print("取消");  
551 - }, rCallback: () {  
552 - print("确定");  
553 - widget.deleteCallback!();  
554 - });  
555 - // } else {  
556 - // //直接删除  
557 - // setState(() {  
558 - // temp.removeWhere((element) =>  
559 - // element == imageModel);  
560 - // });  
561 - })), 534 + child: Image.asset(
  535 + Utils.getImgPath("delete"),
  536 + width: ScreenUtil().setWidth(40),
  537 + height: ScreenUtil().setWidth(40),
  538 + ),
  539 + onTap: () {
  540 + // if (widget.uploadType ==
  541 + // UploadType.TableManagerType) {
  542 + // if (imageModel.isUpload) {
  543 + //已经传到服务器,弹提醒窗口,是否删除
  544 + //修改之前有内容,则弹框
  545 + DialogUtil.cupertinoAlertDialog(context,
  546 + title: "", content: "是否确定删除该照片?", lCallback: () {
  547 + print("取消");
  548 + }, rCallback: () {
  549 + print("确定");
  550 + widget.deleteCallback!();
  551 + });
  552 + // } else {
  553 + // //直接删除
  554 + // setState(() {
  555 + // temp.removeWhere((element) =>
  556 + // element == imageModel);
  557 + // });
  558 + },
  559 + )),
562 ), 560 ),
563 ]), 561 ]),
564 - imageModel.process == 1  
565 - ? Container(  
566 - width: w(150),  
567 - height: w(30),  
568 - color: MyColours.color_4D000000,  
569 - alignment: Alignment.center,  
570 - child: Text(  
571 - '点击图片可以更换',  
572 - style: TextStyle(  
573 - color: MyColours.color_F8F9FD,  
574 - fontSize: font(14),  
575 - fontWeight: FontWeight.bold),  
576 - ))  
577 - : SizedBox(), 562 + Offstage(
  563 + offstage: !(imageModel.file != null &&
  564 + imageModel.process != 1 &&
  565 + imageModel.process != 0.01),
  566 + child: Progress(imageModel.process),
  567 + )
578 ])) 568 ]))
579 : InkWell( 569 : InkWell(
580 onTap: () { 570 onTap: () {
@@ -594,30 +584,39 @@ class _ImgPickerInvitationWidgetState @@ -594,30 +584,39 @@ class _ImgPickerInvitationWidgetState
594 // } 584 // }
595 }, 585 },
596 child: Container( 586 child: Container(
597 - color: MyColours.color_d9d9d9,  
598 - width: double.infinity,  
599 - height: w(widget.height), 587 + width: width,
  588 + height: width,
  589 + decoration: BoxDecoration(
  590 + border: Border.all(
  591 + color: MyColours.color_E0E0E0,
  592 + width: ScreenUtil().setWidth(2)),
  593 + ),
600 child: Column( 594 child: Column(
601 mainAxisAlignment: MainAxisAlignment.center, 595 mainAxisAlignment: MainAxisAlignment.center,
602 children: [ 596 children: [
603 // VEmptyView(80), 597 // VEmptyView(80),
  598 + // VEmptyView(46),
604 Image.asset( 599 Image.asset(
605 - Utils.getImgPath('add_img'),  
606 - width: w(63), 600 + Utils.getImgPath('add_image'),
  601 + width: ScreenUtil().setWidth(44),
  602 + height: ScreenUtil().setWidth(40),
607 ), 603 ),
608 - VEmptyView(28),  
609 - Container(  
610 - width: w(139),  
611 - height: w(60),  
612 - child: Text(  
613 - '点击上传照片\n为了更好的效果\n建议上传4:3照片',  
614 - textAlign: TextAlign.center,  
615 - style: TextStyle(  
616 - height: 1.4,  
617 - color: MyColours.color_ffffff,  
618 - fontSize: font(14),  
619 - fontWeight: FontWeight.bold),  
620 - )) 604 + VEmptyView(10),
  605 + Text(
  606 + '上传照片',
  607 + style: TextStyle(
  608 + fontSize: ScreenUtil().setSp(24),
  609 + color: MyColours.color_999999),
  610 + ),
  611 + if (widget.subTips != null)
  612 + Padding(
  613 + padding: EdgeInsets.only(top: w(5)),
  614 + child: Text(
  615 + '${widget.subTips}',
  616 + style: TextStyle(
  617 + fontSize: ScreenUtil().setSp(18),
  618 + color: MyColours.color_999999),
  619 + )),
621 ], 620 ],
622 ), 621 ),
623 )); 622 ));
@@ -102,7 +102,6 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> { @@ -102,7 +102,6 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
102 } 102 }
103 103
104 _getThemeData() async { 104 _getThemeData() async {
105 -  
106 (bool, bool, bool) result = await ( 105 (bool, bool, bool) result = await (
107 _getSellerTemplateColorList(), 106 _getSellerTemplateColorList(),
108 getSellerTemplateConf(context), 107 getSellerTemplateConf(context),
@@ -163,7 +162,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> { @@ -163,7 +162,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
163 } 162 }
164 } 163 }
165 164
166 - Future<bool> getSellerTemplateConf(BuildContext context) async { 165 + Future<bool> getSellerTemplateConf(BuildContext context) async {
167 bool success = await marketingCenterProvider.getSellerTemplateConf(context); 166 bool success = await marketingCenterProvider.getSellerTemplateConf(context);
168 if (success && marketingCenterProvider.markDataModel != null) { 167 if (success && marketingCenterProvider.markDataModel != null) {
169 return true; 168 return true;
@@ -337,7 +336,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> { @@ -337,7 +336,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
337 return false; 336 return false;
338 } 337 }
339 338
340 - Future<bool> getColorsData() async { 339 + Future<bool> getColorsData() async {
341 bool success = await marketingCenterProvider.getColorsData(context); 340 bool success = await marketingCenterProvider.getColorsData(context);
342 if (success) { 341 if (success) {
343 return true; 342 return true;
@@ -654,16 +653,31 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> { @@ -654,16 +653,31 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
654 itemBuilder: (BuildContext context, int index) { 653 itemBuilder: (BuildContext context, int index) {
655 SellerTemplateColorListSunModel themeSunModel = 654 SellerTemplateColorListSunModel themeSunModel =
656 marketingCenterProvider.templeteDatas![index]; 655 marketingCenterProvider.templeteDatas![index];
657 - return new ClipRRect(  
658 - borderRadius: BorderRadius.circular(r(10)),  
659 - child: CachedNetworkImage(  
660 - imageUrl: themeSunModel.urlSmall!,  
661 - // width:  
662 - // (ScreenUtil().screenWidth - w(62)) / 2,  
663 - // height: w(348),  
664 - fit: BoxFit.fitWidth,  
665 - alignment: Alignment.topCenter,  
666 - )); 656 + return Column(
  657 + mainAxisSize: MainAxisSize.min,
  658 + children: [
  659 + Expanded(
  660 + child: new ClipRRect(
  661 + borderRadius: BorderRadius.circular(r(10)),
  662 + child: CachedNetworkImage(
  663 + imageUrl: themeSunModel.urlSmall!,
  664 + // width:
  665 + // (ScreenUtil().screenWidth - w(62)) / 2,
  666 + // height: w(348),
  667 +
  668 + fit: BoxFit.fitWidth,
  669 + alignment: Alignment.topCenter,
  670 + )),
  671 + ),
  672 + VEmptyView(10),
  673 + Text(
  674 + '模板 ${themeSunModel.id}',
  675 + style: TextStyle(
  676 + color: MyColours.color_515151,
  677 + fontSize: font(16)),
  678 + )
  679 + ],
  680 + );
667 }, 681 },
668 onTap: (v) { 682 onTap: (v) {
669 print(v); 683 print(v);
@@ -422,11 +422,25 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -422,11 +422,25 @@ class NoteBookPageState extends State<NoteBookPage> {
422 // } 422 // }
423 423
424 dateTimeNow = day; 424 dateTimeNow = day;
425 - Duration days = day!.difference(DateTime.now()); 425 +
  426 + DateTime nowDay = (DateTime.parse((dateTimeNow!.year.toString() +
  427 + "-" +
  428 + Utils.addZeroNumber(dateTimeNow!.month) +
  429 + "-" +
  430 + Utils.addZeroNumber(dateTimeNow!.day) +
  431 + " 00:00:00")));
  432 + DateTime startDay = (DateTime.parse((DateTime.now().year.toString() +
  433 + "-" +
  434 + Utils.addZeroNumber(DateTime.now().month) +
  435 + "-" +
  436 + Utils.addZeroNumber(DateTime.now().day) +
  437 + " 00:00:00")));
  438 + Duration days = nowDay.difference(startDay);
426 print(days); 439 print(days);
427 440
428 /// _focusedDay 441 /// _focusedDay
429 - if ((days.inDays == 0) || (days.inDays > 0 && days.inDays < 7)) { 442 + if ((days.inDays == 0 ) ||
  443 + (days.inDays > 0 && days.inDays <7)) {
430 // _calendarController.setSelectedDay(day); 444 // _calendarController.setSelectedDay(day);
431 dateText = '更多\n日期'; 445 dateText = '更多\n日期';
432 clearSel = false; 446 clearSel = false;
@@ -434,7 +448,7 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -434,7 +448,7 @@ class NoteBookPageState extends State<NoteBookPage> {
434 } else { 448 } else {
435 clearSel = true; 449 clearSel = true;
436 // dateText = '${day.year}年\n${day.month}月\n${day.day}日'; 450 // dateText = '${day.year}年\n${day.month}月\n${day.day}日';
437 - dateText = '${day.month}月\n${day.day}日'; 451 + dateText = '${day!.month}月\n${day.day}日';
438 } 452 }
439 }); 453 });
440 } 454 }
@@ -704,8 +718,8 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -704,8 +718,8 @@ class NoteBookPageState extends State<NoteBookPage> {
704 Container( 718 Container(
705 color: MyColours.color_ffffff, 719 color: MyColours.color_ffffff,
706 padding: EdgeInsets.only( 720 padding: EdgeInsets.only(
707 - right: ScreenUtil().setWidth(24),  
708 - ), 721 + left: ScreenUtil().setWidth(20),
  722 + right: ScreenUtil().setWidth(20)),
709 child: Row( 723 child: Row(
710 crossAxisAlignment: CrossAxisAlignment.center, 724 crossAxisAlignment: CrossAxisAlignment.center,
711 children: [ 725 children: [
@@ -715,13 +729,15 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -715,13 +729,15 @@ class NoteBookPageState extends State<NoteBookPage> {
715 lastDay: DateTime(2050), 729 lastDay: DateTime(2050),
716 focusedDay: _focusedDay!, 730 focusedDay: _focusedDay!,
717 currentDay: DateTime.now(), 731 currentDay: DateTime.now(),
718 - rowHeight: ScreenUtil().setWidth(74 * 2), 732 + rowHeight: ScreenUtil().setWidth(40 * 2),
719 // calendarController: _calendarController, 733 // calendarController: _calendarController,
720 // initialSelectedDay: dateTimeNow, 734 // initialSelectedDay: dateTimeNow,
721 headerVisible: false, 735 headerVisible: false,
  736 + // daysOfWeekHeight: w(10),
722 startingDayOfWeek: startingDayOfWeek, 737 startingDayOfWeek: startingDayOfWeek,
723 - selectedDayPredicate: (day) =>  
724 - isSameDay(dateTimeNow!, day), 738 + selectedDayPredicate: (day) => clearSel
  739 + ? false
  740 + : isSameDay(dateTimeNow!, day),
725 // startDay: DateTime.now(), 741 // startDay: DateTime.now(),
726 // endDay: DateTime.now().add(Duration(days: 5)), 742 // endDay: DateTime.now().add(Duration(days: 5)),
727 onDaySelected: ( 743 onDaySelected: (
@@ -746,6 +762,14 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -746,6 +762,14 @@ class NoteBookPageState extends State<NoteBookPage> {
746 locale: "zh_CN", 762 locale: "zh_CN",
747 calendarFormat: CalendarFormat.week, 763 calendarFormat: CalendarFormat.week,
748 calendarStyle: CalendarStyle( 764 calendarStyle: CalendarStyle(
  765 + outsideTextStyle: TextStyle(
  766 + color: MyColours.color_515151,
  767 + fontWeight: FontWeight.bold,
  768 + fontSize: ScreenUtil().setSp(28),
  769 + ),
  770 + cellMargin: EdgeInsets.zero,
  771 + cellPadding: EdgeInsets.zero
  772 +
749 // renderDaysOfWeek: false, 773 // renderDaysOfWeek: false,
750 // defaultTextStyle: TextStyle( 774 // defaultTextStyle: TextStyle(
751 // color: MyColours.color_515151, 775 // color: MyColours.color_515151,
@@ -781,251 +805,168 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -781,251 +805,168 @@ class NoteBookPageState extends State<NoteBookPage> {
781 // color: MyColours.font_color_333333), 805 // color: MyColours.font_color_333333),
782 ), 806 ),
783 calendarBuilders: CalendarBuilders( 807 calendarBuilders: CalendarBuilders(
784 - dowBuilder: (context, date) {  
785 - return SizedBox(); 808 + dowBuilder: (context, day) {
  809 + return InkWell(
  810 + onTap: () {
  811 + if (!Utils.isOneDay(
  812 + day, dateTimeNow!)) {
  813 + //不是一天
  814 + dateTimeNow = day;
  815 + _focusedDay = dateTimeNow;
  816 + clearSel = false;
  817 + setState(() {
  818 + dateText = '更多\n日期';
  819 + });
  820 + ddateSoltSelect =
  821 + currTimeIndex.toString();
  822 + getMealSectionByDay(needInit: false);
  823 +
  824 + _reserveCountDay();
  825 + }
  826 + },
  827 + child: Container(
  828 + padding: EdgeInsets.zero,
  829 + alignment: Alignment.center,
  830 + child: Text(
  831 + DateTime.now().weekday ==
  832 + day.weekday
  833 + ? '今日'
  834 + : Utils.formatWeekDayNum(
  835 + day.weekday),
  836 + style: TextStyle(
  837 + color: dateTimeNow!.weekday ==
  838 + day.weekday &&
  839 + !clearSel
  840 + ? MyColours.color_438E93
  841 + : MyColours.color_BFC4D4,
  842 + fontSize:
  843 + ScreenUtil().setSp(28)),
  844 + )));
786 }, 845 },
787 defaultBuilder: (context, dateTime, date2) { 846 defaultBuilder: (context, dateTime, date2) {
788 - return Column(children: [  
789 - Container(  
790 - color: MyColours.color_ffffff,  
791 - alignment: Alignment.center,  
792 - padding: EdgeInsets.symmetric(  
793 - vertical: ScreenUtil().setWidth(16)),  
794 - child: Text(  
795 - DateTime.now().weekday ==  
796 - dateTime.weekday  
797 - ? '今日'  
798 - : Utils.formatWeekDayNum(  
799 - dateTime.weekday),  
800 - style: TextStyle(  
801 - color: dateTimeNow!.weekday ==  
802 - dateTime.weekday &&  
803 - !clearSel  
804 - ? MyColours.color_438E93  
805 - : MyColours.color_BFC4D4,  
806 - fontSize: ScreenUtil().setSp(28)),  
807 - ),  
808 - ),  
809 - Container(  
810 - width: ScreenUtil().setWidth(28 * 2),  
811 - height: ScreenUtil().setWidth(28 * 2),  
812 - decoration: BoxDecoration(  
813 - shape: BoxShape.circle,  
814 - ),  
815 - alignment: Alignment.center,  
816 - padding: EdgeInsets.zero,  
817 - margin: EdgeInsets.all(  
818 - ScreenUtil().setWidth(8)),  
819 - child: Text(  
820 - dateTime.day.toString(),  
821 - style: TextStyle().copyWith(  
822 - fontSize: ScreenUtil().setSp(28),  
823 - color: MyColours.color_515151,  
824 - fontWeight: FontWeight.bold),  
825 - ),  
826 - )  
827 - ]);  
828 - },  
829 - disabledBuilder: (context, dateTime, events) {  
830 return Container( 847 return Container(
  848 + // width: ScreenUtil().setWidth(28 * 2),
  849 + height: ScreenUtil().setWidth(28 * 2),
831 decoration: BoxDecoration( 850 decoration: BoxDecoration(
832 shape: BoxShape.circle, 851 shape: BoxShape.circle,
833 ), 852 ),
834 alignment: Alignment.center, 853 alignment: Alignment.center,
835 - margin: EdgeInsets.all(  
836 - ScreenUtil().setWidth(8)),  
837 - padding: EdgeInsets.all(  
838 - ScreenUtil().setWidth(4), 854 + padding: EdgeInsets.zero,
  855 + // margin: EdgeInsets.all(
  856 + // ScreenUtil().setWidth(8)),
  857 + child: Text(
  858 + dateTime.day.toString(),
  859 + style: TextStyle().copyWith(
  860 + fontSize: ScreenUtil().setSp(28),
  861 + color: MyColours.color_515151,
  862 + fontWeight: FontWeight.bold),
839 ), 863 ),
  864 + );
  865 + },
  866 + outsideBuilder: (context, day, focusedDay) {
  867 + return Container(
  868 + // width: ScreenUtil().setWidth(28 * 2),
  869 + height: ScreenUtil().setWidth(28 * 2),
  870 + // decoration: BoxDecoration(
  871 + // shape: BoxShape.circle,
  872 + // ),
  873 + alignment: Alignment.center,
  874 + padding: EdgeInsets.zero,
  875 + // margin: EdgeInsets.all(
  876 + // ScreenUtil().setWidth(8)),
  877 + child: Text(
  878 + day.day.toString(),
  879 + style: TextStyle().copyWith(
  880 + fontSize: ScreenUtil().setSp(28),
  881 + color: MyColours.color_515151,
  882 + fontWeight: FontWeight.bold),
  883 + ),
  884 + );
  885 + },
  886 + disabledBuilder: (context, dateTime, events) {
  887 + return Container(
  888 + // width: ScreenUtil().setWidth(28 * 2),
  889 + height: ScreenUtil().setWidth(28 * 2),
  890 + // decoration: BoxDecoration(
  891 + // shape: BoxShape.circle,
  892 + // ),
  893 + alignment: Alignment.center,
  894 + padding: EdgeInsets.zero,
  895 + // margin: EdgeInsets.all(
  896 + // ScreenUtil().setWidth(8)),
840 child: Text( 897 child: Text(
841 dateTime.day.toString(), 898 dateTime.day.toString(),
842 style: TextStyle().copyWith( 899 style: TextStyle().copyWith(
843 fontSize: ScreenUtil().setSp(28), 900 fontSize: ScreenUtil().setSp(28),
844 - color: MyColours.color_999999), 901 + color: MyColours.color_515151,
  902 + fontWeight: FontWeight.bold),
845 ), 903 ),
846 ); 904 );
847 }, 905 },
848 - // weekNumberBuilder: (context, weekday) {  
849 - // return Container(  
850 - // color: MyColours.color_ffffff,  
851 - // alignment: Alignment.center,  
852 - // padding: EdgeInsets.symmetric(  
853 - // vertical: ScreenUtil().setWidth(16)),  
854 - // child: Text(  
855 - // "周${Utils.formatWeekDayNum(DateTime.now().weekday)}" ==  
856 - // weekday  
857 - // ? '今日'  
858 - // : weekday.toString(),  
859 - // style: TextStyle(  
860 - // color:  
861 - // "周${Utils.formatWeekDayNum(dateTimeNow!.weekday)}" ==  
862 - // weekday &&  
863 - // !clearSel  
864 - // ? MyColours.color_438E93  
865 - // : MyColours.color_BFC4D4,  
866 - // fontSize: ScreenUtil().setSp(28)),  
867 - // ),  
868 - // );  
869 - // },  
870 -  
871 selectedBuilder: (context, date, _) { 906 selectedBuilder: (context, date, _) {
872 - return clearSel  
873 - ? Column(children: [  
874 - Container(  
875 - color: MyColours.color_ffffff,  
876 - alignment: Alignment.center,  
877 - padding: EdgeInsets.symmetric(  
878 - vertical:  
879 - ScreenUtil().setWidth(16)),  
880 - child: Text(  
881 - DateTime.now().weekday ==  
882 - date.weekday  
883 - ? '今日'  
884 - : Utils.formatWeekDayNum(  
885 - date.weekday),  
886 - style: TextStyle(  
887 - color: dateTimeNow!.weekday ==  
888 - date.weekday &&  
889 - !clearSel  
890 - ? MyColours.color_438E93  
891 - : MyColours.color_BFC4D4,  
892 - fontSize:  
893 - ScreenUtil().setSp(28)),  
894 - ),  
895 - ),  
896 - Container(  
897 - width:  
898 - ScreenUtil().setWidth(28 * 2),  
899 - height:  
900 - ScreenUtil().setWidth(28 * 2),  
901 - decoration: BoxDecoration(  
902 - shape: BoxShape.circle,  
903 - ),  
904 - alignment: Alignment.center,  
905 - padding: EdgeInsets.zero,  
906 - margin: EdgeInsets.all(  
907 - ScreenUtil().setWidth(8)),  
908 - child: Text(  
909 - date.day.toString(),  
910 - style: TextStyle().copyWith(  
911 - fontSize:  
912 - ScreenUtil().setSp(28),  
913 - color: MyColours.color_515151,  
914 - fontWeight: FontWeight.bold),  
915 - ),  
916 - )  
917 - ])  
918 - : Column(children: [  
919 - Container(  
920 - color: MyColours.color_ffffff,  
921 - alignment: Alignment.center,  
922 - padding: EdgeInsets.symmetric(  
923 - vertical:  
924 - ScreenUtil().setWidth(16)),  
925 - child: Text(  
926 - DateTime.now().weekday ==  
927 - date.weekday  
928 - ? '今日'  
929 - : Utils.formatWeekDayNum(  
930 - date.weekday),  
931 - style: TextStyle(  
932 - color: dateTimeNow!.weekday ==  
933 - date.weekday &&  
934 - !clearSel  
935 - ? MyColours.color_438E93  
936 - : MyColours.color_BFC4D4,  
937 - fontSize:  
938 - ScreenUtil().setSp(28)),  
939 - ),  
940 - ),  
941 - Container(  
942 - width:  
943 - ScreenUtil().setWidth(28 * 2),  
944 - height:  
945 - ScreenUtil().setWidth(28 * 2),  
946 - decoration: BoxDecoration(  
947 - shape: BoxShape.circle,  
948 - gradient: LinearGradient(  
949 - colors: [  
950 - MyColours.color_438E93,  
951 - MyColours.color_438E93  
952 - ],  
953 - begin: Alignment.topCenter,  
954 - end: Alignment.bottomCenter),  
955 -// border: Border.all(color: MyColours.color_FFB116)  
956 - ),  
957 - alignment: Alignment.center,  
958 - margin: EdgeInsets.all(  
959 - ScreenUtil().setWidth(8)),  
960 - padding: EdgeInsets.all(  
961 - ScreenUtil().setWidth(4),  
962 - ),  
963 - child: Text(  
964 - date.day.toString(),  
965 - style: TextStyle().copyWith(  
966 - fontSize:  
967 - ScreenUtil().setSp(28),  
968 - color: MyColours.color_ffffff,  
969 - fontWeight: FontWeight.bold),  
970 - ),  
971 - )  
972 - ]);  
973 - },  
974 - todayBuilder: (context, dateTime, _) {  
975 - return Column(children: [  
976 - Container(  
977 - color: MyColours.color_ffffff,  
978 - alignment: Alignment.center,  
979 - padding: EdgeInsets.symmetric(  
980 - vertical: ScreenUtil().setWidth(16)),  
981 - child: Text(  
982 - DateTime.now().weekday ==  
983 - dateTime.weekday  
984 - ? '今日'  
985 - : Utils.formatWeekDayNum(  
986 - dateTime.weekday),  
987 - style: TextStyle(  
988 - color: dateTimeNow!.weekday ==  
989 - dateTime.weekday &&  
990 - !clearSel  
991 - ? MyColours.color_438E93  
992 - : MyColours.color_BFC4D4,  
993 - fontSize: ScreenUtil().setSp(28)),  
994 - ), 907 + return Container(
  908 + // width: ScreenUtil().setWidth(28 * 2),
  909 + height: ScreenUtil().setWidth(28 * 2),
  910 + decoration: BoxDecoration(
  911 + shape: BoxShape.circle,
  912 + gradient: clearSel
  913 + ? null
  914 + : LinearGradient(
  915 + colors: [
  916 + MyColours.color_438E93,
  917 + MyColours.color_438E93
  918 + ],
  919 + begin: Alignment.topCenter,
  920 + end: Alignment.bottomCenter),
  921 + ),
  922 + alignment: Alignment.center,
  923 + padding: EdgeInsets.zero,
  924 + // margin: EdgeInsets.all(
  925 + // ScreenUtil().setWidth(8)),
  926 + child: Text(
  927 + date.day.toString(),
  928 + style: TextStyle().copyWith(
  929 + fontSize: ScreenUtil().setSp(28),
  930 + color: clearSel
  931 + ? MyColours.color_515151
  932 + : MyColours.color_ffffff,
  933 + fontWeight: FontWeight.bold),
995 ), 934 ),
996 - Container(  
997 - width: ScreenUtil().setWidth(28 * 2),  
998 - height: ScreenUtil().setWidth(28 * 2),  
999 - decoration: BoxDecoration(  
1000 - shape: BoxShape.circle,  
1001 - ),  
1002 - alignment: Alignment.center,  
1003 - padding: EdgeInsets.zero,  
1004 - margin: EdgeInsets.all(  
1005 - ScreenUtil().setWidth(8)),  
1006 - child: Text(  
1007 - dateTime.day.toString(),  
1008 - style: TextStyle().copyWith(  
1009 - fontSize: ScreenUtil().setSp(28),  
1010 - color: MyColours.color_515151,  
1011 - fontWeight: FontWeight.bold),  
1012 - ),  
1013 - )  
1014 - ]); 935 + );
1015 }, 936 },
1016 - singleMarkerBuilder:  
1017 - (context, dateTime, event) { 937 + todayBuilder: (context, dateTime, _) {
1018 return Container( 938 return Container(
1019 - width: ScreenUtil().setWidth(6),  
1020 - height: ScreenUtil().setWidth(6),  
1021 - margin: const EdgeInsets.symmetric(  
1022 - horizontal: 0.3), 939 + // width: ScreenUtil().setWidth(28 * 2),
  940 + height: ScreenUtil().setWidth(28 * 2),
1023 decoration: BoxDecoration( 941 decoration: BoxDecoration(
1024 shape: BoxShape.circle, 942 shape: BoxShape.circle,
1025 - color: MyColours.color_ff0000, 943 + ),
  944 + alignment: Alignment.center,
  945 + padding: EdgeInsets.zero,
  946 + // margin: EdgeInsets.all(
  947 + // ScreenUtil().setWidth(8)),
  948 + child: Text(
  949 + dateTime.day.toString(),
  950 + style: TextStyle().copyWith(
  951 + fontSize: ScreenUtil().setSp(28),
  952 + color: MyColours.color_515151,
  953 + fontWeight: FontWeight.bold),
1026 ), 954 ),
1027 ); 955 );
1028 }, 956 },
  957 + // singleMarkerBuilder:
  958 + // (context, dateTime, event) {
  959 + // return Container(
  960 + // width: ScreenUtil().setWidth(6),
  961 + // height: ScreenUtil().setWidth(6),
  962 + // margin: const EdgeInsets.symmetric(
  963 + // horizontal: 0.3),
  964 + // decoration: BoxDecoration(
  965 + // shape: BoxShape.circle,
  966 + // color: MyColours.color_ff0000,
  967 + // ),
  968 + // );
  969 + // },
1029 ))), 970 ))),
1030 InkWell( 971 InkWell(
1031 onTap: () { 972 onTap: () {
1 -  
2 import 'dart:convert'; 1 import 'dart:convert';
3 2
4 import 'dart:io'; 3 import 'dart:io';
@@ -17,6 +16,7 @@ import 'package:one_key/provider/upload_img_provider.dart'; @@ -17,6 +16,7 @@ import 'package:one_key/provider/upload_img_provider.dart';
17 import 'package:one_key/res/colors.dart'; 16 import 'package:one_key/res/colors.dart';
18 import 'package:one_key/utils/dialog_util.dart'; 17 import 'package:one_key/utils/dialog_util.dart';
19 import 'package:one_key/utils/misc.dart'; 18 import 'package:one_key/utils/misc.dart';
  19 +import 'package:one_key/utils/screen_util.dart';
20 import 'package:one_key/utils/upload_image_util.dart'; 20 import 'package:one_key/utils/upload_image_util.dart';
21 import 'package:one_key/utils/utils.dart'; 21 import 'package:one_key/utils/utils.dart';
22 import 'package:one_key/widgets/MyDivider.dart'; 22 import 'package:one_key/widgets/MyDivider.dart';
@@ -49,6 +49,7 @@ class ImgPickerWidget extends StatefulWidget { @@ -49,6 +49,7 @@ class ImgPickerWidget extends StatefulWidget {
49 final DeleteCallback? deleteCallback; 49 final DeleteCallback? deleteCallback;
50 final String? maxRemind; 50 final String? maxRemind;
51 final List<UploadImgModel>? imageList; 51 final List<UploadImgModel>? imageList;
  52 + final String? subTips;
52 ImgPickerWidget( 53 ImgPickerWidget(
53 {Key? key, 54 {Key? key,
54 this.scrollController, 55 this.scrollController,
@@ -59,7 +60,8 @@ class ImgPickerWidget extends StatefulWidget { @@ -59,7 +60,8 @@ class ImgPickerWidget extends StatefulWidget {
59 this.uploadType, 60 this.uploadType,
60 this.deleteCallback, 61 this.deleteCallback,
61 this.maxRemind, 62 this.maxRemind,
62 - this.imageList}) 63 + this.imageList,
  64 + this.subTips})
63 : super(key: key); 65 : super(key: key);
64 66
65 @override 67 @override
@@ -168,8 +170,8 @@ class _ImgPickerWidgetState extends DisposableState<ImgPickerWidget> { @@ -168,8 +170,8 @@ class _ImgPickerWidgetState extends DisposableState<ImgPickerWidget> {
168 if (need) { 170 if (need) {
169 file = File(path); 171 file = File(path);
170 } 172 }
171 - UploadImageUtil().startUpload(  
172 - context, file, temp!.length - 1, true, widget.model!, widget.uploadType, 173 + UploadImageUtil().startUpload(context, file, temp!.length - 1, true,
  174 + widget.model!, widget.uploadType,
173 callback: widget.callback, countAll: 1, imageList: widget.imageList); 175 callback: widget.callback, countAll: 1, imageList: widget.imageList);
174 } 176 }
175 } 177 }
@@ -592,6 +594,15 @@ class _ImgPickerWidgetState extends DisposableState<ImgPickerWidget> { @@ -592,6 +594,15 @@ class _ImgPickerWidgetState extends DisposableState<ImgPickerWidget> {
592 fontSize: ScreenUtil().setSp(24), 594 fontSize: ScreenUtil().setSp(24),
593 color: MyColours.color_999999), 595 color: MyColours.color_999999),
594 ), 596 ),
  597 + if (widget.subTips != null)
  598 + Padding(
  599 + padding: EdgeInsets.only(top: w(5)),
  600 + child: Text(
  601 + '${widget.subTips}',
  602 + style: TextStyle(
  603 + fontSize: ScreenUtil().setSp(18),
  604 + color: MyColours.color_999999),
  605 + )),
595 widget.maxRemind != null ? VEmptyView(10) : SizedBox(), 606 widget.maxRemind != null ? VEmptyView(10) : SizedBox(),
596 widget.maxRemind != null 607 widget.maxRemind != null
597 ? Text( 608 ? Text(
@@ -48,7 +48,8 @@ class InvitationThemeHomePageSim extends StatefulWidget { @@ -48,7 +48,8 @@ class InvitationThemeHomePageSim extends StatefulWidget {
48 _InvitationThemeHomePageSimState(); 48 _InvitationThemeHomePageSimState();
49 } 49 }
50 50
51 -class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim> { 51 +class _InvitationThemeHomePageSimState
  52 + extends State<InvitationThemeHomePageSim> {
52 late MarketingCenterProvider marketingCenterProvider; 53 late MarketingCenterProvider marketingCenterProvider;
53 ScrollController controller = ScrollController(); 54 ScrollController controller = ScrollController();
54 55
@@ -103,7 +104,6 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim> @@ -103,7 +104,6 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim>
103 } 104 }
104 105
105 _getThemeData() async { 106 _getThemeData() async {
106 -  
107 (bool, bool, bool) result = await ( 107 (bool, bool, bool) result = await (
108 _getSellerTemplateColorList(), 108 _getSellerTemplateColorList(),
109 getSellerTemplateConf(context), 109 getSellerTemplateConf(context),
@@ -164,7 +164,7 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim> @@ -164,7 +164,7 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim>
164 } 164 }
165 } 165 }
166 166
167 - Future<bool> getSellerTemplateConf(BuildContext context) async { 167 + Future<bool> getSellerTemplateConf(BuildContext context) async {
168 bool success = await marketingCenterProvider.getSellerTemplateConf(context); 168 bool success = await marketingCenterProvider.getSellerTemplateConf(context);
169 if (success && marketingCenterProvider.markDataModel != null) { 169 if (success && marketingCenterProvider.markDataModel != null) {
170 return true; 170 return true;
@@ -338,7 +338,7 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim> @@ -338,7 +338,7 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim>
338 return false; 338 return false;
339 } 339 }
340 340
341 - Future<bool> getColorsData() async { 341 + Future<bool> getColorsData() async {
342 bool success = await marketingCenterProvider.getColorsData(context); 342 bool success = await marketingCenterProvider.getColorsData(context);
343 if (success) { 343 if (success) {
344 return true; 344 return true;
@@ -655,16 +655,31 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim> @@ -655,16 +655,31 @@ class _InvitationThemeHomePageSimState extends State<InvitationThemeHomePageSim>
655 itemBuilder: (BuildContext context, int index) { 655 itemBuilder: (BuildContext context, int index) {
656 SellerTemplateColorListSunModel themeSunModel = 656 SellerTemplateColorListSunModel themeSunModel =
657 marketingCenterProvider.templeteDatas![index]; 657 marketingCenterProvider.templeteDatas![index];
658 - return new ClipRRect(  
659 - borderRadius: BorderRadius.circular(r(10)),  
660 - child: CachedNetworkImage(  
661 - imageUrl: themeSunModel.urlSmall!,  
662 - // width:  
663 - // (ScreenUtil().screenWidth - w(62)) / 2,  
664 - // height: w(348),  
665 - fit: BoxFit.fitWidth,  
666 - alignment: Alignment.topCenter,  
667 - )); 658 + return Column(
  659 + mainAxisSize: MainAxisSize.min,
  660 + children: [
  661 + Expanded(
  662 + child: new ClipRRect(
  663 + borderRadius: BorderRadius.circular(r(10)),
  664 + child: CachedNetworkImage(
  665 + imageUrl: themeSunModel.urlSmall!,
  666 + // width:
  667 + // (ScreenUtil().screenWidth - w(62)) / 2,
  668 + // height: w(348),
  669 +
  670 + fit: BoxFit.fitWidth,
  671 + alignment: Alignment.topCenter,
  672 + )),
  673 + ),
  674 + VEmptyView(10),
  675 + Text(
  676 + '模板 ${themeSunModel.id}',
  677 + style: TextStyle(
  678 + color: MyColours.color_515151,
  679 + fontSize: font(16)),
  680 + )
  681 + ],
  682 + );
668 }, 683 },
669 onTap: (v) { 684 onTap: (v) {
670 print(v); 685 print(v);
@@ -419,9 +419,9 @@ class _CustomerNoticeSettingPageSimState @@ -419,9 +419,9 @@ class _CustomerNoticeSettingPageSimState
419 backgroundColor: MyColours.color_ffffff, 419 backgroundColor: MyColours.color_ffffff,
420 appBar: SystemAppBar('客户通知设置'), 420 appBar: SystemAppBar('客户通知设置'),
421 body: Consumer<MarketingCenterProvider>(builder: (context1, model, _) { 421 body: Consumer<MarketingCenterProvider>(builder: (context1, model, _) {
422 - if (model.pageState != PageState.Success) { 422 + if (model.pageStateSetting != PageState.Success) {
423 return ExceptionPage( 423 return ExceptionPage(
424 - pageState: model.pageState, 424 + pageState: model.pageStateSetting,
425 callback: () async { 425 callback: () async {
426 getDzSellerConf(); 426 getDzSellerConf();
427 // _getThemeData(); 427 // _getThemeData();
@@ -385,8 +385,22 @@ class NoteBookPageSimState extends State<NoteBookPageSim> { @@ -385,8 +385,22 @@ class NoteBookPageSimState extends State<NoteBookPageSim> {
385 // } 385 // }
386 386
387 dateTimeNow = day; 387 dateTimeNow = day;
388 - Duration days = day!.difference(DateTime.now()); 388 +
  389 + DateTime nowDay = (DateTime.parse((dateTimeNow!.year.toString() +
  390 + "-" +
  391 + Utils.addZeroNumber(dateTimeNow!.month) +
  392 + "-" +
  393 + Utils.addZeroNumber(dateTimeNow!.day) +
  394 + " 00:00:00")));
  395 + DateTime startDay = (DateTime.parse((DateTime.now().year.toString() +
  396 + "-" +
  397 + Utils.addZeroNumber(DateTime.now().month) +
  398 + "-" +
  399 + Utils.addZeroNumber(DateTime.now().day) +
  400 + " 00:00:00")));
  401 + Duration days = nowDay.difference(startDay);
389 print(days); 402 print(days);
  403 +
390 if ((days.inDays == 0) || (days.inDays > 0 && days.inDays < 7)) { 404 if ((days.inDays == 0) || (days.inDays > 0 && days.inDays < 7)) {
391 // _calendarController.setSelectedDay(day); 405 // _calendarController.setSelectedDay(day);
392 dateTimeNow = day; 406 dateTimeNow = day;
@@ -395,7 +409,7 @@ class NoteBookPageSimState extends State<NoteBookPageSim> { @@ -395,7 +409,7 @@ class NoteBookPageSimState extends State<NoteBookPageSim> {
395 clearSel = false; 409 clearSel = false;
396 } else { 410 } else {
397 clearSel = true; 411 clearSel = true;
398 - dateText = '${day.month}月\n${day.day}日'; 412 + dateText = '${day!.month}月\n${day.day}日';
399 } 413 }
400 }); 414 });
401 } 415 }
@@ -596,13 +610,15 @@ class NoteBookPageSimState extends State<NoteBookPageSim> { @@ -596,13 +610,15 @@ class NoteBookPageSimState extends State<NoteBookPageSim> {
596 lastDay: DateTime(2050), 610 lastDay: DateTime(2050),
597 focusedDay: _focusedDay!, 611 focusedDay: _focusedDay!,
598 currentDay: DateTime.now(), 612 currentDay: DateTime.now(),
599 - rowHeight: ScreenUtil().setWidth(74 * 2), 613 + rowHeight: ScreenUtil().setWidth(40 * 2),
600 // calendarController: _calendarController, 614 // calendarController: _calendarController,
601 // initialSelectedDay: dateTimeNow, 615 // initialSelectedDay: dateTimeNow,
602 headerVisible: false, 616 headerVisible: false,
  617 + // daysOfWeekHeight: w(10),
603 startingDayOfWeek: startingDayOfWeek, 618 startingDayOfWeek: startingDayOfWeek,
604 - selectedDayPredicate: (day) =>  
605 - isSameDay(dateTimeNow!, day), 619 + selectedDayPredicate: (day) => clearSel
  620 + ? false
  621 + : isSameDay(dateTimeNow!, day),
606 // startDay: DateTime.now(), 622 // startDay: DateTime.now(),
607 // endDay: DateTime.now().add(Duration(days: 5)), 623 // endDay: DateTime.now().add(Duration(days: 5)),
608 onDaySelected: ( 624 onDaySelected: (
@@ -625,6 +641,14 @@ class NoteBookPageSimState extends State<NoteBookPageSim> { @@ -625,6 +641,14 @@ class NoteBookPageSimState extends State<NoteBookPageSim> {
625 locale: "zh_CN", 641 locale: "zh_CN",
626 calendarFormat: CalendarFormat.week, 642 calendarFormat: CalendarFormat.week,
627 calendarStyle: CalendarStyle( 643 calendarStyle: CalendarStyle(
  644 + outsideTextStyle: TextStyle(
  645 + color: MyColours.color_515151,
  646 + fontWeight: FontWeight.bold,
  647 + fontSize: ScreenUtil().setSp(28),
  648 + ),
  649 + cellMargin: EdgeInsets.zero,
  650 + cellPadding: EdgeInsets.zero
  651 +
628 // renderDaysOfWeek: false, 652 // renderDaysOfWeek: false,
629 // defaultTextStyle: TextStyle( 653 // defaultTextStyle: TextStyle(
630 // color: MyColours.color_515151, 654 // color: MyColours.color_515151,
@@ -660,248 +684,149 @@ class NoteBookPageSimState extends State<NoteBookPageSim> { @@ -660,248 +684,149 @@ class NoteBookPageSimState extends State<NoteBookPageSim> {
660 // color: MyColours.font_color_333333), 684 // color: MyColours.font_color_333333),
661 ), 685 ),
662 calendarBuilders: CalendarBuilders( 686 calendarBuilders: CalendarBuilders(
663 - dowBuilder: (context, date) {  
664 - return SizedBox(); 687 + dowBuilder: (context, day) {
  688 + return InkWell(
  689 + onTap: () {
  690 + if (!Utils.isOneDay(
  691 + day, dateTimeNow!)) {
  692 + //不是一天
  693 + dateTimeNow = day;
  694 + _focusedDay = dateTimeNow;
  695 + clearSel = false;
  696 + setState(() {
  697 + dateText = '更多\n日期';
  698 + });
  699 + _getReserveList();
  700 + _reserveCountDay();
  701 + }
  702 + },
  703 + child: Container(
  704 + padding: EdgeInsets.zero,
  705 + alignment: Alignment.center,
  706 + child: Text(
  707 + DateTime.now().weekday ==
  708 + day.weekday
  709 + ? '今日'
  710 + : Utils.formatWeekDayNum(
  711 + day.weekday),
  712 + style: TextStyle(
  713 + color: dateTimeNow!.weekday ==
  714 + day.weekday &&
  715 + !clearSel
  716 + ? MyColours.color_438E93
  717 + : MyColours.color_BFC4D4,
  718 + fontSize:
  719 + ScreenUtil().setSp(28)),
  720 + )));
665 }, 721 },
666 defaultBuilder: (context, dateTime, date2) { 722 defaultBuilder: (context, dateTime, date2) {
667 - return Column(children: [  
668 - Container(  
669 - color: MyColours.color_ffffff,  
670 - alignment: Alignment.center,  
671 - padding: EdgeInsets.symmetric(  
672 - vertical: ScreenUtil().setWidth(16)),  
673 - child: Text(  
674 - DateTime.now().weekday ==  
675 - dateTime.weekday  
676 - ? '今日'  
677 - : Utils.formatWeekDayNum(  
678 - dateTime.weekday),  
679 - style: TextStyle(  
680 - color: dateTimeNow!.weekday ==  
681 - dateTime.weekday &&  
682 - !clearSel  
683 - ? MyColours.color_438E93  
684 - : MyColours.color_BFC4D4,  
685 - fontSize: ScreenUtil().setSp(28)),  
686 - ),  
687 - ),  
688 - Container(  
689 - width: ScreenUtil().setWidth(28 * 2),  
690 - height: ScreenUtil().setWidth(28 * 2),  
691 - decoration: BoxDecoration(  
692 - shape: BoxShape.circle,  
693 - ),  
694 - alignment: Alignment.center,  
695 - padding: EdgeInsets.zero,  
696 - margin: EdgeInsets.all(  
697 - ScreenUtil().setWidth(8)),  
698 - child: Text(  
699 - dateTime.day.toString(),  
700 - style: TextStyle().copyWith(  
701 - fontSize: ScreenUtil().setSp(28),  
702 - color: MyColours.color_515151,  
703 - fontWeight: FontWeight.bold),  
704 - ),  
705 - )  
706 - ]);  
707 - },  
708 - disabledBuilder: (context, dateTime, events) {  
709 return Container( 723 return Container(
  724 + // width: ScreenUtil().setWidth(28 * 2),
  725 + height: ScreenUtil().setWidth(28 * 2),
710 decoration: BoxDecoration( 726 decoration: BoxDecoration(
711 shape: BoxShape.circle, 727 shape: BoxShape.circle,
712 ), 728 ),
713 alignment: Alignment.center, 729 alignment: Alignment.center,
714 - margin: EdgeInsets.all(  
715 - ScreenUtil().setWidth(8)),  
716 - padding: EdgeInsets.all(  
717 - ScreenUtil().setWidth(4), 730 + padding: EdgeInsets.zero,
  731 + // margin: EdgeInsets.all(
  732 + // ScreenUtil().setWidth(8)),
  733 + child: Text(
  734 + dateTime.day.toString(),
  735 + style: TextStyle().copyWith(
  736 + fontSize: ScreenUtil().setSp(28),
  737 + color: MyColours.color_515151,
  738 + fontWeight: FontWeight.bold),
718 ), 739 ),
  740 + );
  741 + },
  742 + outsideBuilder: (context, day, focusedDay) {
  743 + return Container(
  744 + // width: ScreenUtil().setWidth(28 * 2),
  745 + height: ScreenUtil().setWidth(28 * 2),
  746 + // decoration: BoxDecoration(
  747 + // shape: BoxShape.circle,
  748 + // ),
  749 + alignment: Alignment.center,
  750 + padding: EdgeInsets.zero,
  751 + // margin: EdgeInsets.all(
  752 + // ScreenUtil().setWidth(8)),
  753 + child: Text(
  754 + day.day.toString(),
  755 + style: TextStyle().copyWith(
  756 + fontSize: ScreenUtil().setSp(28),
  757 + color: MyColours.color_515151,
  758 + fontWeight: FontWeight.bold),
  759 + ),
  760 + );
  761 + },
  762 + disabledBuilder: (context, dateTime, events) {
  763 + return Container(
  764 + // width: ScreenUtil().setWidth(28 * 2),
  765 + height: ScreenUtil().setWidth(28 * 2),
  766 + // decoration: BoxDecoration(
  767 + // shape: BoxShape.circle,
  768 + // ),
  769 + alignment: Alignment.center,
  770 + padding: EdgeInsets.zero,
  771 + // margin: EdgeInsets.all(
  772 + // ScreenUtil().setWidth(8)),
719 child: Text( 773 child: Text(
720 dateTime.day.toString(), 774 dateTime.day.toString(),
721 style: TextStyle().copyWith( 775 style: TextStyle().copyWith(
722 fontSize: ScreenUtil().setSp(28), 776 fontSize: ScreenUtil().setSp(28),
723 - color: MyColours.color_999999), 777 + color: MyColours.color_515151,
  778 + fontWeight: FontWeight.bold),
724 ), 779 ),
725 ); 780 );
726 }, 781 },
727 - // weekNumberBuilder: (context, weekday) {  
728 - // return Container(  
729 - // color: MyColours.color_ffffff,  
730 - // alignment: Alignment.center,  
731 - // padding: EdgeInsets.symmetric(  
732 - // vertical: ScreenUtil().setWidth(16)),  
733 - // child: Text(  
734 - // "周${Utils.formatWeekDayNum(DateTime.now().weekday)}" ==  
735 - // weekday  
736 - // ? '今日'  
737 - // : weekday.toString(),  
738 - // style: TextStyle(  
739 - // color:  
740 - // "周${Utils.formatWeekDayNum(dateTimeNow!.weekday)}" ==  
741 - // weekday &&  
742 - // !clearSel  
743 - // ? MyColours.color_438E93  
744 - // : MyColours.color_BFC4D4,  
745 - // fontSize: ScreenUtil().setSp(28)),  
746 - // ),  
747 - // );  
748 - // },  
749 -  
750 selectedBuilder: (context, date, _) { 782 selectedBuilder: (context, date, _) {
751 - return clearSel  
752 - ? Column(children: [  
753 - Container(  
754 - color: MyColours.color_ffffff,  
755 - alignment: Alignment.center,  
756 - padding: EdgeInsets.symmetric(  
757 - vertical:  
758 - ScreenUtil().setWidth(16)),  
759 - child: Text(  
760 - DateTime.now().weekday ==  
761 - date.weekday  
762 - ? '今日'  
763 - : Utils.formatWeekDayNum(  
764 - date.weekday),  
765 - style: TextStyle(  
766 - color: dateTimeNow!.weekday ==  
767 - date.weekday &&  
768 - !clearSel  
769 - ? MyColours.color_438E93  
770 - : MyColours.color_BFC4D4,  
771 - fontSize:  
772 - ScreenUtil().setSp(28)),  
773 - ),  
774 - ),  
775 - Container(  
776 - width:  
777 - ScreenUtil().setWidth(28 * 2),  
778 - height:  
779 - ScreenUtil().setWidth(28 * 2),  
780 - decoration: BoxDecoration(  
781 - shape: BoxShape.circle,  
782 - ),  
783 - alignment: Alignment.center,  
784 - padding: EdgeInsets.zero,  
785 - margin: EdgeInsets.all(  
786 - ScreenUtil().setWidth(8)),  
787 - child: Text(  
788 - date.day.toString(),  
789 - style: TextStyle().copyWith(  
790 - fontSize:  
791 - ScreenUtil().setSp(28),  
792 - color: MyColours.color_515151,  
793 - fontWeight: FontWeight.bold),  
794 - ),  
795 - )  
796 - ])  
797 - : Column(children: [  
798 - Container(  
799 - color: MyColours.color_ffffff,  
800 - alignment: Alignment.center,  
801 - padding: EdgeInsets.symmetric(  
802 - vertical:  
803 - ScreenUtil().setWidth(16)),  
804 - child: Text(  
805 - DateTime.now().weekday ==  
806 - date.weekday  
807 - ? '今日'  
808 - : Utils.formatWeekDayNum(  
809 - date.weekday),  
810 - style: TextStyle(  
811 - color: dateTimeNow!.weekday ==  
812 - date.weekday &&  
813 - !clearSel  
814 - ? MyColours.color_438E93  
815 - : MyColours.color_BFC4D4,  
816 - fontSize:  
817 - ScreenUtil().setSp(28)),  
818 - ),  
819 - ),  
820 - Container(  
821 - width:  
822 - ScreenUtil().setWidth(28 * 2),  
823 - height:  
824 - ScreenUtil().setWidth(28 * 2),  
825 - decoration: BoxDecoration(  
826 - shape: BoxShape.circle,  
827 - gradient: LinearGradient(  
828 - colors: [  
829 - MyColours.color_438E93,  
830 - MyColours.color_438E93  
831 - ],  
832 - begin: Alignment.topCenter,  
833 - end: Alignment.bottomCenter),  
834 -// border: Border.all(color: MyColours.color_FFB116)  
835 - ),  
836 - alignment: Alignment.center,  
837 - margin: EdgeInsets.all(  
838 - ScreenUtil().setWidth(8)),  
839 - padding: EdgeInsets.all(  
840 - ScreenUtil().setWidth(4),  
841 - ),  
842 - child: Text(  
843 - date.day.toString(),  
844 - style: TextStyle().copyWith(  
845 - fontSize:  
846 - ScreenUtil().setSp(28),  
847 - color: MyColours.color_ffffff,  
848 - fontWeight: FontWeight.bold),  
849 - ),  
850 - )  
851 - ]);  
852 - },  
853 - todayBuilder: (context, dateTime, _) {  
854 - return Column(children: [  
855 - Container(  
856 - color: MyColours.color_ffffff,  
857 - alignment: Alignment.center,  
858 - padding: EdgeInsets.symmetric(  
859 - vertical: ScreenUtil().setWidth(16)),  
860 - child: Text(  
861 - DateTime.now().weekday ==  
862 - dateTime.weekday  
863 - ? '今日'  
864 - : Utils.formatWeekDayNum(  
865 - dateTime.weekday),  
866 - style: TextStyle(  
867 - color: dateTimeNow!.weekday ==  
868 - dateTime.weekday &&  
869 - !clearSel  
870 - ? MyColours.color_438E93  
871 - : MyColours.color_BFC4D4,  
872 - fontSize: ScreenUtil().setSp(28)),  
873 - ), 783 + return Container(
  784 + // width: ScreenUtil().setWidth(28 * 2),
  785 + height: ScreenUtil().setWidth(28 * 2),
  786 + decoration: BoxDecoration(
  787 + shape: BoxShape.circle,
  788 + gradient: clearSel
  789 + ? null
  790 + : LinearGradient(
  791 + colors: [
  792 + MyColours.color_438E93,
  793 + MyColours.color_438E93
  794 + ],
  795 + begin: Alignment.topCenter,
  796 + end: Alignment.bottomCenter),
874 ), 797 ),
875 - Container(  
876 - width: ScreenUtil().setWidth(28 * 2),  
877 - height: ScreenUtil().setWidth(28 * 2),  
878 - decoration: BoxDecoration(  
879 - shape: BoxShape.circle,  
880 - ),  
881 - alignment: Alignment.center,  
882 - padding: EdgeInsets.zero,  
883 - margin: EdgeInsets.all(  
884 - ScreenUtil().setWidth(8)),  
885 - child: Text(  
886 - dateTime.day.toString(),  
887 - style: TextStyle().copyWith(  
888 - fontSize: ScreenUtil().setSp(28),  
889 - color: MyColours.color_515151,  
890 - fontWeight: FontWeight.bold),  
891 - ),  
892 - )  
893 - ]); 798 + alignment: Alignment.center,
  799 + padding: EdgeInsets.zero,
  800 + // margin: EdgeInsets.all(
  801 + // ScreenUtil().setWidth(8)),
  802 + child: Text(
  803 + date.day.toString(),
  804 + style: TextStyle().copyWith(
  805 + fontSize: ScreenUtil().setSp(28),
  806 + color: clearSel
  807 + ? MyColours.color_515151
  808 + : MyColours.color_ffffff,
  809 + fontWeight: FontWeight.bold),
  810 + ),
  811 + );
894 }, 812 },
895 - singleMarkerBuilder:  
896 - (context, dateTime, event) { 813 + todayBuilder: (context, dateTime, _) {
897 return Container( 814 return Container(
898 - width: ScreenUtil().setWidth(6),  
899 - height: ScreenUtil().setWidth(6),  
900 - margin: const EdgeInsets.symmetric(  
901 - horizontal: 0.3), 815 + // width: ScreenUtil().setWidth(28 * 2),
  816 + height: ScreenUtil().setWidth(28 * 2),
902 decoration: BoxDecoration( 817 decoration: BoxDecoration(
903 shape: BoxShape.circle, 818 shape: BoxShape.circle,
904 - color: MyColours.color_ff0000, 819 + ),
  820 + alignment: Alignment.center,
  821 + padding: EdgeInsets.zero,
  822 + // margin: EdgeInsets.all(
  823 + // ScreenUtil().setWidth(8)),
  824 + child: Text(
  825 + dateTime.day.toString(),
  826 + style: TextStyle().copyWith(
  827 + fontSize: ScreenUtil().setSp(28),
  828 + color: MyColours.color_515151,
  829 + fontWeight: FontWeight.bold),
905 ), 830 ),
906 ); 831 );
907 }, 832 },
@@ -359,13 +359,18 @@ class NavigatorUtil { @@ -359,13 +359,18 @@ class NavigatorUtil {
359 359
360 /// 创建优惠券 360 /// 创建优惠券
361 static Future<dynamic> goCouponEditPage(BuildContext context, 361 static Future<dynamic> goCouponEditPage(BuildContext context,
362 - {replace = false, String? from,String? end,bool isMine = true, CouponSunModel? couponSunModel}) { 362 + {replace = false,
  363 + String? from,
  364 + String? end,
  365 + bool isMine = true,
  366 + CouponSunModel? couponSunModel}) {
363 if (couponSunModel != null) { 367 if (couponSunModel != null) {
364 return _navigateTo(context, 368 return _navigateTo(context,
365 "${Routes.coupon_edit}?isMine=${isMine}&from=${from}&end=$end&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}", 369 "${Routes.coupon_edit}?isMine=${isMine}&from=${from}&end=$end&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}",
366 replace: replace); 370 replace: replace);
367 } 371 }
368 - return _navigateTo(context, "${Routes.coupon_edit}?isMine=${isMine}&from=${from}&end=$end", 372 + return _navigateTo(
  373 + context, "${Routes.coupon_edit}?isMine=${isMine}&from=${from}&end=$end",
369 replace: replace); 374 replace: replace);
370 } 375 }
371 376
@@ -2412,4 +2417,13 @@ class NavigatorUtil { @@ -2412,4 +2417,13 @@ class NavigatorUtil {
2412 "${Routes.payment_gift_select_page}?object=${FluroConvertUtils.object2string(object)}&from=$from&end=$end&type=$type&mulSelect=${mulSelect}", 2417 "${Routes.payment_gift_select_page}?object=${FluroConvertUtils.object2string(object)}&from=$from&end=$end&type=$type&mulSelect=${mulSelect}",
2413 replace: replace); 2418 replace: replace);
2414 } 2419 }
  2420 +
  2421 + ///支付返券------企业资料上传
  2422 + static Future<dynamic> goEnterpriseInformationUploadPage(
  2423 + BuildContext context, {
  2424 + replace = false,
  2425 + }) {
  2426 + return _navigateTo(context, "${Routes.enterprise_information_upload_page}",
  2427 + replace: replace);
  2428 + }
2415 } 2429 }
@@ -221,6 +221,7 @@ import '../pages/my/feast_manage/feast_setmeal_manage_edit_page.dart'; @@ -221,6 +221,7 @@ import '../pages/my/feast_manage/feast_setmeal_manage_edit_page.dart';
221 import '../pages/my/feast_manage/feast_type_page.dart'; 221 import '../pages/my/feast_manage/feast_type_page.dart';
222 import '../pages/my/feast_manage/feast_wine_manage_edit_page.dart'; 222 import '../pages/my/feast_manage/feast_wine_manage_edit_page.dart';
223 import '../pages/my/feast_manage/feast_wine_manage_page.dart'; 223 import '../pages/my/feast_manage/feast_wine_manage_page.dart';
  224 +import '../pages/my/finance_manage/enterprise_information_upload_page.dart';
224 import '../pages/my/finance_manage/finance_manage_home_page.dart'; 225 import '../pages/my/finance_manage/finance_manage_home_page.dart';
225 import '../pages/my/finance_manage/payment_code_page.dart'; 226 import '../pages/my/finance_manage/payment_code_page.dart';
226 import '../pages/my/finance_manage/payment_gift_page.dart'; 227 import '../pages/my/finance_manage/payment_gift_page.dart';
@@ -890,8 +891,8 @@ var handleCouponEditPageHandler = new Handler( @@ -890,8 +891,8 @@ var handleCouponEditPageHandler = new Handler(
890 bool isMine = 891 bool isMine =
891 FluroConvertUtils.string2bool(params["isMine"]!.first as String); 892 FluroConvertUtils.string2bool(params["isMine"]!.first as String);
892 893
893 - String from= params["from"]?.first as String;  
894 - String end = params["end"]?.first as String; 894 + String from = params["from"]?.first as String;
  895 + String end = params["end"]?.first as String;
895 CouponSunModel? couponSunModel; 896 CouponSunModel? couponSunModel;
896 if (params.keys.contains("couponSunModel")) { 897 if (params.keys.contains("couponSunModel")) {
897 couponSunModel = CouponSunModel.fromJson(json.decode( 898 couponSunModel = CouponSunModel.fromJson(json.decode(
@@ -901,7 +902,11 @@ var handleCouponEditPageHandler = new Handler( @@ -901,7 +902,11 @@ var handleCouponEditPageHandler = new Handler(
901 902
902 return ChangeNotifierProvider<UploadImageProvider>( 903 return ChangeNotifierProvider<UploadImageProvider>(
903 create: (_) => UploadImageProvider(), 904 create: (_) => UploadImageProvider(),
904 - child: CouponEidtPage(isMine: isMine,from:from,end:end, couponSunModel: couponSunModel)); 905 + child: CouponEidtPage(
  906 + isMine: isMine,
  907 + from: from,
  908 + end: end,
  909 + couponSunModel: couponSunModel));
905 }); 910 });
906 911
907 ///选择优惠券 912 ///选择优惠券
@@ -4233,9 +4238,9 @@ var paymentGiftSelectPageHandle = new Handler( @@ -4233,9 +4238,9 @@ var paymentGiftSelectPageHandle = new Handler(
4233 // String idstr = params["idstr"].first;dfdf 4238 // String idstr = params["idstr"].first;dfdf
4234 4239
4235 String type = params["type"]!.first as String; 4240 String type = params["type"]!.first as String;
4236 - String from= params["from"]!.first as String;  
4237 - String end = params["end"]!.first as String;  
4238 - List<CouponSunModel> res = []; 4241 + String from = params["from"]!.first as String;
  4242 + String end = params["end"]!.first as String;
  4243 + List<CouponSunModel> res = [];
4239 if (params.keys.contains('object')) { 4244 if (params.keys.contains('object')) {
4240 Map object = 4245 Map object =
4241 FluroConvertUtils.string2map(params["object"]!.first as String)!; 4246 FluroConvertUtils.string2map(params["object"]!.first as String)!;
@@ -4249,8 +4254,22 @@ var paymentGiftSelectPageHandle = new Handler( @@ -4249,8 +4254,22 @@ var paymentGiftSelectPageHandle = new Handler(
4249 FluroConvertUtils.string2bool(params["mulSelect"]!.first as String); 4254 FluroConvertUtils.string2bool(params["mulSelect"]!.first as String);
4250 // NotebookDetail detailEntity = NotebookDetail.fromJson(json 4255 // NotebookDetail detailEntity = NotebookDetail.fromJson(json
4251 // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); 4256 // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
4252 - return ChangeNotifierProvider<MarketingCenterProvider>(  
4253 - create: (_) => MarketingCenterProvider(), 4257 + return ChangeNotifierProvider< FinanceProvider>(
  4258 + create: (_) => FinanceProvider(),
4254 child: PaymentGiftSelectPage( 4259 child: PaymentGiftSelectPage(
4255 - type: type, couponList: res, mulSelect: mulSelect,from :from,end:end)); 4260 + type: type,
  4261 + couponList: res,
  4262 + mulSelect: mulSelect,
  4263 + from: from,
  4264 + end: end));
  4265 +});
  4266 +
  4267 +///企业资料上传
  4268 +var enterpriseInformationUploadPageHandle = new Handler(
  4269 + handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
  4270 + return ChangeNotifierProvider< FinanceProvider>(
  4271 + create: (_) => FinanceProvider(),
  4272 + child: ChangeNotifierProvider<UploadImageProvider>(
  4273 + create: (_) => UploadImageProvider(),
  4274 + child: EnterpriseInformationUploadPage()));
4256 }); 4275 });
@@ -421,6 +421,10 @@ class Routes { @@ -421,6 +421,10 @@ class Routes {
421 "/payment_gift_page"; //支付返券 421 "/payment_gift_page"; //支付返券
422 static String payment_gift_select_page = 422 static String payment_gift_select_page =
423 "/payment_gift_select_page"; //支付返券选择券页面(免费代金券) 423 "/payment_gift_select_page"; //支付返券选择券页面(免费代金券)
  424 +
  425 + static String enterprise_information_upload_page =
  426 + "/enterprise_information_upload_page"; //企业客户资料上传页面
  427 +
424 428
425 429
426 static void configureRoutes(FluroRouter router) { 430 static void configureRoutes(FluroRouter router) {
@@ -797,6 +801,11 @@ class Routes { @@ -797,6 +801,11 @@ class Routes {
797 router.define(payment_gift_select_page, 801 router.define(payment_gift_select_page,
798 handler:paymentGiftSelectPageHandle); 802 handler:paymentGiftSelectPageHandle);
799 803
  804 + router.define(enterprise_information_upload_page,
  805 + handler:enterpriseInformationUploadPageHandle);
  806 +
  807 +
  808 +
800 809
801 810
802 811
1 -  
2 import 'package:intl/intl.dart'; 1 import 'package:intl/intl.dart';
3 2
4 class LunarCalendar { 3 class LunarCalendar {
@@ -13,7 +12,7 @@ class LunarCalendar { @@ -13,7 +12,7 @@ class LunarCalendar {
13 12
14 ///中文月名称 13 ///中文月名称
15 static List<String> chineseNumberShow = [ 14 static List<String> chineseNumberShow = [
16 - "一月", 15 + "正月",
17 "二月", 16 "二月",
18 "三月", 17 "三月",
19 "四月", 18 "四月",
@@ -27,7 +26,7 @@ class LunarCalendar { @@ -27,7 +26,7 @@ class LunarCalendar {
27 "腊月" 26 "腊月"
28 ]; 27 ];
29 28
30 - ///中文月名称 29 + ///中文月名称
31 static List<String> chineseNumber = [ 30 static List<String> chineseNumber = [
32 "一", 31 "一",
33 "二", 32 "二",
@@ -280,7 +279,7 @@ class LunarCalendar { @@ -280,7 +279,7 @@ class LunarCalendar {
280 } 279 }
281 280
282 static String getChinaDayString(int day) { 281 static String getChinaDayString(int day) {
283 - List<String> chineseTen = ["初", "十", "廿", "卅"]; 282 + List<String> chineseTen = ["初", "十", "廿", "三"];
284 int n = day % 10 == 0 ? 9 : day % 10 - 1; 283 int n = day % 10 == 0 ? 9 : day % 10 - 1;
285 if (day > 30) return ""; 284 if (day > 30) return "";
286 if (day == 10) 285 if (day == 10)
@@ -289,9 +288,9 @@ class LunarCalendar { @@ -289,9 +288,9 @@ class LunarCalendar {
289 return chineseTen[day ~/ 10] + chineseNumber[n]; 288 return chineseTen[day ~/ 10] + chineseNumber[n];
290 } 289 }
291 290
292 - String getChinaMonthString() {  
293 - return chineseNumber[month - 1];  
294 - } 291 + // String getChinaMonthString() {
  292 + // return chineseNumber[month - 1];
  293 + // }
295 294
296 String getChinaMonthStringShow() { 295 String getChinaMonthStringShow() {
297 return chineseNumberShow[month - 1]; 296 return chineseNumberShow[month - 1];
@@ -958,7 +958,7 @@ class Utils { @@ -958,7 +958,7 @@ class Utils {
958 static String lunarCalendarUtils(DateTime day) { 958 static String lunarCalendarUtils(DateTime day) {
959 LunarCalendar lunarCalendar = LunarCalendar(day); 959 LunarCalendar lunarCalendar = LunarCalendar(day);
960 String time = 960 String time =
961 - '${lunarCalendar.getChinaMonthString()}月${LunarCalendar.getChinaDayString(lunarCalendar.day!)}'; 961 + '${lunarCalendar.getChinaMonthStringShow()}${LunarCalendar.getChinaDayString(lunarCalendar.day!)}';
962 return time; 962 return time;
963 } 963 }
964 964