Commit 260c5709543b2d13b73ea92442010be54e4df2e6

Authored by wdn127929
1 parent 5cf7fb7c

营销任务UI

  1 +class TemplateModel {
  2 + String title;
  3 + String content;
  4 + TemplateModel(this.title, this.content);
  5 +}
@@ -23,6 +23,9 @@ import 'package:one_key/widgets/v_empty_view.dart'; @@ -23,6 +23,9 @@ import 'package:one_key/widgets/v_empty_view.dart';
23 import 'package:provider/provider.dart'; 23 import 'package:provider/provider.dart';
24 import 'package:sendsms/sendsms.dart'; 24 import 'package:sendsms/sendsms.dart';
25 25
  26 +import '../../../../models/template_model.dart';
  27 +import '../../../../utils/screen_util.dart';
  28 +
26 typedef ClickCallback = void Function(dynamic value); 29 typedef ClickCallback = void Function(dynamic value);
27 30
28 class MyMakeMarkingPage extends StatefulWidget { 31 class MyMakeMarkingPage extends StatefulWidget {
@@ -56,10 +59,29 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -56,10 +59,29 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
56 String andriodPhone = ''; 59 String andriodPhone = '';
57 List<String> iosPhone = []; 60 List<String> iosPhone = [];
58 61
  62 + List<TemplateModel> data = [];
  63 +
59 @override 64 @override
60 void initState() { 65 void initState() {
61 super.initState(); 66 super.initState();
62 67
  68 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  69 +
  70 + data = [
  71 + TemplateModel('新菜上市',
  72 + '尊敬的贵宾,本店最近有新菜上市,欢迎您来品尝,活动期间一律7折,提前预订热线${userModel.user.sellerphone},${userModel.user.sellername}全体员工恭候您的大驾光临!'),
  73 + TemplateModel('生日营销1',
  74 + '尊敬的贵宾,${userModel.user.sellername}全体员工提前祝您生日快乐!凡是生日当天在本店享有7折的优惠,并且为您准备了一份精美小礼品,快快来领取吧!详情请点击{礼品领取链接}。'),
  75 + TemplateModel('生日营销2',
  76 + '尊敬的贵宾,提前祝您生日快乐!${userModel.user.sellername}从来也没忘记在这样特别的日子里祝您:生日快乐,生活幸福。生日当天在本店消费享有6折优惠!'),
  77 + TemplateModel('节日',
  78 + '尊敬的贵宾:值xx节日将至,在x月x日至x日,到我店消费即可免费领取价值98节日礼包一份,大礼不断,优惠不断!详情请点击{礼品领取链接}。'),
  79 + TemplateModel('存酒超期',
  80 + '尊敬的贵宾:您在我店存放的酒水已经等待您30天了!已开启酒水长期存放将影响口感,${userModel.user.sellername}全体员工期待您早日到店享用完毕,静候您的光临!'),
  81 + TemplateModel('沉睡唤醒',
  82 + '尊敬的贵宾:对不起!很冒昧的给您发这条短信,我是${userModel.user.sellername}的${userModel.user.nickName ?? ''}.您都有很长一段时间没来我们这里了,我们非常想念您。或许是我们的服务还没有让您满意,或许是给您搭配的餐品还没有满足您的需求,总之,都是我们做的不够好!我们正在不断的改进,希望可以变得更完美,请您原谅以往我们的不足,有空回來看看我们!为您准备了一份精美小礼品,快快来领取吧!详情请点击{礼品领取链接}。')
  83 + ];
  84 +
63 _focusNode.addListener(() { 85 _focusNode.addListener(() {
64 if (_focusNode.hasFocus) { 86 if (_focusNode.hasFocus) {
65 //有焦点 87 //有焦点
@@ -241,6 +263,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -241,6 +263,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
241 Expanded( 263 Expanded(
242 child: Text( 264 child: Text(
243 title, 265 title,
  266 + textAlign: TextAlign.right,
244 overflow: TextOverflow.ellipsis, 267 overflow: TextOverflow.ellipsis,
245 style: TextStyle( 268 style: TextStyle(
246 color: title == '时间(选填)' || 269 color: title == '时间(选填)' ||
@@ -248,22 +271,50 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -248,22 +271,50 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
248 title == '选择优惠' || 271 title == '选择优惠' ||
249 !customerMakingProvider.isUse 272 !customerMakingProvider.isUse
250 ? MyColours.color_999999 273 ? MyColours.color_999999
251 - : MyColours.color_199095, 274 + : MyColours.color_438E93,
  275 + fontWeight: FontWeight.bold,
252 fontSize: ScreenUtil().setWidth(30)), 276 fontSize: ScreenUtil().setWidth(30)),
253 )), 277 )),
254 - HEmptyView(10), 278 + HEmptyView(20),
255 Image.asset( 279 Image.asset(
256 // Utils.getImgPath(!customerMakingProvider.isUse 280 // Utils.getImgPath(!customerMakingProvider.isUse
257 // ? 'c_arrow_down_unsel' 281 // ? 'c_arrow_down_unsel'
258 // : 'c_arrow_down'), 282 // : 'c_arrow_down'),
259 - Utils.getImgPath('c_arrow_down'),  
260 - width: ScreenUtil().setWidth(30), 283 + Utils.getImgPath('down_c'),
  284 + width: ScreenUtil().setWidth(44),
261 // height: ScreenUtil().setWidth(10), 285 // height: ScreenUtil().setWidth(10),
262 ) 286 )
263 ], 287 ],
264 ))); 288 )));
265 } 289 }
266 290
  291 + List<Widget> _templateUI() {
  292 + List<Widget> templates = [];
  293 + data.forEach((element) {
  294 + templates.add(InkWell(
  295 + onTap: () {
  296 + //选择模版.默认数据
  297 +
  298 + customerMakingProvider.controller.text = element.content;
  299 + },
  300 + child: Container(
  301 + padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(5)),
  302 + decoration: BoxDecoration(
  303 + borderRadius: BorderRadius.circular(r(5)),
  304 + color: MyColours.color_ffffff,
  305 + border: Border.all(width: w(1), color: MyColours.color_438E93)),
  306 + child: Text(
  307 + element.title,
  308 + style: TextStyle(
  309 + color: MyColours.color_438E93,
  310 + fontSize: font(12),
  311 + fontWeight: FontWeight.bold),
  312 + ),
  313 + )));
  314 + });
  315 + return templates;
  316 + }
  317 +
267 ///短信内容编辑UI 318 ///短信内容编辑UI
268 Widget _contentWidget(String hintText) { 319 Widget _contentWidget(String hintText) {
269 return Container( 320 return Container(
@@ -277,7 +328,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -277,7 +328,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
277 // title, 328 // title,
278 // textAlign: TextAlign.left, 329 // textAlign: TextAlign.left,
279 // style: TextStyle( 330 // style: TextStyle(
280 - // color: MyColours.color_333333, 331 + // color: MyColours.color_515151,
281 // fontWeight: FontWeight.bold, 332 // fontWeight: FontWeight.bold,
282 // fontSize: ScreenUtil().setSp(34)), 333 // fontSize: ScreenUtil().setSp(34)),
283 // )), 334 // )),
@@ -285,14 +336,14 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -285,14 +336,14 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
285 TextField( 336 TextField(
286 controller: customerMakingProvider.controller, 337 controller: customerMakingProvider.controller,
287 // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘 338 // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
288 - maxLines: 10, 339 + maxLines: 6,
289 focusNode: _focusNode, 340 focusNode: _focusNode,
290 // maxLength: 50, 341 // maxLength: 50,
291 342
292 // maxLengthEnforced: true, 343 // maxLengthEnforced: true,
293 style: TextStyle( 344 style: TextStyle(
294 fontSize: ScreenUtil().setSp(28), 345 fontSize: ScreenUtil().setSp(28),
295 - color: MyColours.color_333333), //输入文本的样式 346 + color: MyColours.color_515151), //输入文本的样式
296 decoration: InputDecoration( 347 decoration: InputDecoration(
297 contentPadding: EdgeInsets.all(ScreenUtil().setWidth(30)), 348 contentPadding: EdgeInsets.all(ScreenUtil().setWidth(30)),
298 hintText: hintText, 349 hintText: hintText,
@@ -300,14 +351,14 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -300,14 +351,14 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
300 color: MyColours.color_999999, 351 color: MyColours.color_999999,
301 fontSize: ScreenUtil().setSp(28), 352 fontSize: ScreenUtil().setSp(28),
302 ), 353 ),
303 - fillColor: MyColours.color_F9F9F9, 354 + fillColor: MyColours.color_ffffff,
304 // fillColor: Colors.red, 355 // fillColor: Colors.red,
305 filled: true, 356 filled: true,
306 enabledBorder: OutlineInputBorder( 357 enabledBorder: OutlineInputBorder(
307 //未选中时候的颜色 358 //未选中时候的颜色
308 borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)), 359 borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
309 borderSide: BorderSide( 360 borderSide: BorderSide(
310 - color: MyColours.color_cccccc, 361 + color: MyColours.color_DBDBDB,
311 width: ScreenUtil().setWidth(2)), 362 width: ScreenUtil().setWidth(2)),
312 ), 363 ),
313 focusedBorder: OutlineInputBorder( 364 focusedBorder: OutlineInputBorder(
@@ -328,6 +379,38 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -328,6 +379,38 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
328 }, 379 },
329 ), 380 ),
330 VEmptyView(20), 381 VEmptyView(20),
  382 + Container(
  383 + padding: EdgeInsets.only(left: w(10), right: w(10), bottom: w(10)),
  384 + decoration: BoxDecoration(
  385 + borderRadius: BorderRadius.circular(r(5)),
  386 + border: Border.all(width: w(1), color: MyColours.color_F8F7F3)),
  387 + child: Column(
  388 + crossAxisAlignment: CrossAxisAlignment.start,
  389 + children: [
  390 + Container(
  391 + height: w(34),
  392 + alignment: Alignment.centerLeft,
  393 + child: Text(
  394 + '常用模版',
  395 + style: TextStyle(
  396 + color: MyColours.color_515151,
  397 + fontSize: font(12),
  398 + ),
  399 + ),
  400 + ),
  401 + VEmptyView(10),
  402 + Padding(
  403 + padding: EdgeInsets.only(left: w(10)),
  404 + child: Wrap(
  405 + spacing: w(10),
  406 + runSpacing: w(5),
  407 + children: _templateUI(),
  408 + ),
  409 + )
  410 + ],
  411 + ),
  412 + ),
  413 + VEmptyView(50),
331 Row( 414 Row(
332 mainAxisAlignment: MainAxisAlignment.spaceBetween, 415 mainAxisAlignment: MainAxisAlignment.spaceBetween,
333 children: [ 416 children: [
@@ -338,21 +421,20 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -338,21 +421,20 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
338 // NavigatorUtil.goMarketingRecordsDetailPage(context); 421 // NavigatorUtil.goMarketingRecordsDetailPage(context);
339 }, 422 },
340 child: Padding( 423 child: Padding(
341 - padding: EdgeInsets.symmetric(  
342 - horizontal: ScreenUtil().setWidth(20)), 424 + padding: EdgeInsets.only(right: ScreenUtil().setWidth(20)),
343 child: Text('清空', 425 child: Text('清空',
344 style: TextStyle( 426 style: TextStyle(
345 color: MyColours.color_199095, 427 color: MyColours.color_199095,
346 - fontSize: ScreenUtil().setSp(26))), 428 + fontSize: ScreenUtil().setSp(30))),
347 )), 429 )),
348 Text( 430 Text(
349 '共 ${customerMakingProvider.controller.text.length} 字 ${customerMakingProvider.selectCustomer.length} 条短信', 431 '共 ${customerMakingProvider.controller.text.length} 字 ${customerMakingProvider.selectCustomer.length} 条短信',
350 style: TextStyle( 432 style: TextStyle(
351 - color: MyColours.color_333333,  
352 - fontSize: ScreenUtil().setSp(26))), 433 + color: MyColours.color_515151,
  434 + fontSize: ScreenUtil().setSp(30))),
353 ], 435 ],
354 ), 436 ),
355 - VEmptyView(40), 437 + VEmptyView(36),
356 InkWell( 438 InkWell(
357 onTap: () { 439 onTap: () {
358 customerMakingProvider.isUse = !customerMakingProvider.isUse; 440 customerMakingProvider.isUse = !customerMakingProvider.isUse;
@@ -361,19 +443,19 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -361,19 +443,19 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
361 child: Row(children: [ 443 child: Row(children: [
362 Image.asset( 444 Image.asset(
363 Utils.getImgPath(customerMakingProvider.isUse 445 Utils.getImgPath(customerMakingProvider.isUse
364 - ? 'c_mul_select'  
365 - : 'c_mul_select_un'),  
366 - width: ScreenUtil().setWidth(30)), 446 + ? 'f_select'
  447 + : 'f_select_not'),
  448 + width: ScreenUtil().setWidth(44)),
367 HEmptyView(15), 449 HEmptyView(15),
368 Text( 450 Text(
369 - '营销加入优惠', 451 + '在当前位置插入优惠',
370 style: TextStyle( 452 style: TextStyle(
371 - fontSize: ScreenUtil().setSp(36), 453 + fontSize: ScreenUtil().setSp(32),
372 fontWeight: FontWeight.bold, 454 fontWeight: FontWeight.bold,
373 - color: MyColours.color_333333), 455 + color: MyColours.color_515151),
374 ), 456 ),
375 ])), 457 ])),
376 - VEmptyView(30), 458 + VEmptyView(26),
377 Row(children: [ 459 Row(children: [
378 Expanded( 460 Expanded(
379 child: Container( 461 child: Container(
@@ -382,7 +464,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -382,7 +464,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
382 decoration: BoxDecoration( 464 decoration: BoxDecoration(
383 borderRadius: 465 borderRadius:
384 BorderRadius.circular(ScreenUtil().setWidth(10)), 466 BorderRadius.circular(ScreenUtil().setWidth(10)),
385 - color: Color.fromRGBO(239, 239, 239, 1)), 467 + color: MyColours.color_DBDBDB),
386 child: 468 child:
387 _buttonChoose(customerMakingProvider.youhui, (value) { 469 _buttonChoose(customerMakingProvider.youhui, (value) {
388 FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 470 FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
@@ -400,25 +482,25 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -400,25 +482,25 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
400 customerMakingProvider.couponSelectIndex]; 482 customerMakingProvider.couponSelectIndex];
401 }); 483 });
402 484
403 - // var cursorPos = customerMakingProvider  
404 - // .controller.selection.base.offset; //获取到光标的在字符串的位置  
405 -  
406 - // String textAfterCursor = customerMakingProvider  
407 - // .controller.text  
408 - // .substring(cursorPos); //把字符串从光标的位置截取,光标后面的  
409 -  
410 - // String textBeforeCursor = customerMakingProvider  
411 - // .controller.text  
412 - // .substring(0, cursorPos); //光标前面的字符串  
413 - // customerMakingProvider.controller.text =  
414 - // textBeforeCursor +  
415 - // "http://www.baidu.com" +  
416 - // textAfterCursor; //把想要的插入的内容拼接在光标位置处  
417 -  
418 - // customerMakingProvider.controller.selection =  
419 - // TextSelection.collapsed(  
420 - // offset: customerMakingProvider  
421 - // .controller.text.length); 485 + var cursorPos = customerMakingProvider
  486 + .controller.selection.base.offset; //获取到光标的在字符串的位置
  487 +
  488 + String textAfterCursor = customerMakingProvider
  489 + .controller.text
  490 + .substring(cursorPos); //把字符串从光标的位置截取,光标后面的
  491 +
  492 + String textBeforeCursor = customerMakingProvider
  493 + .controller.text
  494 + .substring(0, cursorPos); //光标前面的字符串
  495 + customerMakingProvider.controller.text =
  496 + textBeforeCursor +
  497 + "http://www.baidu.com" +
  498 + textAfterCursor; //把想要的插入的内容拼接在光标位置处
  499 +
  500 + customerMakingProvider.controller.selection =
  501 + TextSelection.collapsed(
  502 + offset: customerMakingProvider
  503 + .controller.text.length);
422 } 504 }
423 }, 505 },
424 selecteds: customerMakingProvider 506 selecteds: customerMakingProvider
@@ -444,8 +526,9 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -444,8 +526,9 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
444 child: Text('创建新优惠', 526 child: Text('创建新优惠',
445 style: TextStyle( 527 style: TextStyle(
446 decoration: TextDecoration.underline, 528 decoration: TextDecoration.underline,
447 - color: MyColours.color_199095,  
448 - fontSize: ScreenUtil().setSp(26)))), 529 + color: MyColours.color_438E93,
  530 + fontWeight: FontWeight.bold,
  531 + fontSize: ScreenUtil().setSp(28)))),
449 ]), 532 ]),
450 ], 533 ],
451 ), 534 ),
@@ -463,7 +546,8 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -463,7 +546,8 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
463 FocusScope.of(context).requestFocus(new FocusNode()); 546 FocusScope.of(context).requestFocus(new FocusNode());
464 }, 547 },
465 child: Scaffold( 548 child: Scaffold(
466 - backgroundColor: Color.fromRGBO(246, 248, 250, 1), 549 + // backgroundColor: Color.fromRGBO(246, 248, 250, 1),
  550 + backgroundColor: MyColours.color_ffffff,
467 key: scaffoldKey, 551 key: scaffoldKey,
468 appBar: SystemAppBar( 552 appBar: SystemAppBar(
469 '创建营销任务', 553 '创建营销任务',
@@ -553,41 +637,47 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { @@ -553,41 +637,47 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
553 ], 637 ],
554 ), 638 ),
555 )), 639 )),
556 - RoundButton(  
557 - text: '群发短信',  
558 - gradientStart: MyColours.color_199095,  
559 - gradientEnd: MyColours.color_199095,  
560 - // borderColor: MyColours.color_999999,  
561 - radius: ScreenUtil().setWidth(40),  
562 - height: ScreenUtil().setWidth(80),  
563 - fontSize: 26,  
564 - margin: EdgeInsets.symmetric(  
565 - horizontal: ScreenUtil().setWidth(230)),  
566 - isBold: false,  
567 - onPressed: () {  
568 - //群发短信  
569 - _createMarketing();  
570 - },  
571 - ),  
572 - VEmptyView(30),  
573 - RoundButton(  
574 - text: '取消',  
575 - gradientStart: MyColours.color_ffffff,  
576 - gradientEnd: MyColours.color_ffffff,  
577 - textColor: MyColours.color_199095,  
578 - borderColor: MyColours.color_199095,  
579 - radius: ScreenUtil().setWidth(40),  
580 - height: ScreenUtil().setWidth(80),  
581 - fontSize: 26,  
582 - margin: EdgeInsets.symmetric(  
583 - horizontal: ScreenUtil().setWidth(230)),  
584 - isBold: false,  
585 - onPressed: () {  
586 - customerMakingProvider.clearData();  
587 - Navigator.pop(context);  
588 - },  
589 - ),  
590 - VEmptyView(40), 640 + Container(
  641 + padding: EdgeInsets.only(
  642 + left: w(23), right: w(23), top: w(12), bottom: w(25)),
  643 + child: Row(
  644 + children: [
  645 + RoundButton(
  646 + text: '取消',
  647 + width: w(100),
  648 + gradientStart: MyColours.color_ffffff,
  649 + gradientEnd: MyColours.color_ffffff,
  650 + textColor: MyColours.color_199095,
  651 + borderColor: MyColours.color_199095,
  652 + radius: r(5),
  653 + height: w(43),
  654 + fontSize: 32,
  655 + isBold: true,
  656 + onPressed: () {
  657 + customerMakingProvider.clearData();
  658 + Navigator.pop(context);
  659 + },
  660 + ),
  661 + HEmptyView(30),
  662 + Expanded(
  663 + child: RoundButton(
  664 + text: '群发短信',
  665 + gradientStart: MyColours.color_438E93,
  666 + gradientEnd: MyColours.color_438E93,
  667 + // borderColor: MyColours.color_999999,
  668 + radius: r(5),
  669 + height: w(43),
  670 + fontSize: 32,
  671 +
  672 + isBold: true,
  673 + onPressed: () {
  674 + //群发短信
  675 + _createMarketing();
  676 + },
  677 + )),
  678 + ],
  679 + ),
  680 + )
591 ], 681 ],
592 )), 682 )),
593 )); 683 ));
@@ -25,6 +25,9 @@ import 'package:provider/provider.dart'; @@ -25,6 +25,9 @@ import 'package:provider/provider.dart';
25 import 'package:one_key/models/store_customer_home_model.dart' 25 import 'package:one_key/models/store_customer_home_model.dart'
26 as storeCustomerHomeModel; 26 as storeCustomerHomeModel;
27 27
  28 +import '../../../../models/template_model.dart';
  29 +import '../../../../utils/screen_util.dart';
  30 +
28 typedef ClickCallback = void Function(dynamic value); 31 typedef ClickCallback = void Function(dynamic value);
29 32
30 class MakeMarkingPage extends StatefulWidget { 33 class MakeMarkingPage extends StatefulWidget {
@@ -54,10 +57,28 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -54,10 +57,28 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
54 bool needClear = true; 57 bool needClear = true;
55 String gid = ''; 58 String gid = '';
56 59
  60 + List<TemplateModel> data = [];
  61 +
57 @override 62 @override
58 void initState() { 63 void initState() {
59 super.initState(); 64 super.initState();
60 65
  66 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  67 + data = [
  68 + TemplateModel('新菜上市',
  69 + '尊敬的贵宾,本店最近有新菜上市,欢迎您来品尝,活动期间一律7折,提前预订热线${userModel.user.sellerphone},${userModel.user.sellername}全体员工恭候您的大驾光临!'),
  70 + TemplateModel('生日营销1',
  71 + '尊敬的贵宾,${userModel.user.sellername}全体员工提前祝您生日快乐!凡是生日当天在本店享有7折的优惠,并且为您准备了一份精美小礼品,快快来领取吧!详情请点击{礼品领取链接}。'),
  72 + TemplateModel('生日营销2',
  73 + '尊敬的贵宾,提前祝您生日快乐!${userModel.user.sellername}从来也没忘记在这样特别的日子里祝您:生日快乐,生活幸福。生日当天在本店消费享有6折优惠!'),
  74 + TemplateModel('节日',
  75 + '尊敬的贵宾:值xx节日将至,在x月x日至x日,到我店消费即可免费领取价值98节日礼包一份,大礼不断,优惠不断!详情请点击{礼品领取链接}。'),
  76 + TemplateModel('存酒超期',
  77 + '尊敬的贵宾:您在我店存放的酒水已经等待您30天了!已开启酒水长期存放将影响口感,${userModel.user.sellername}全体员工期待您早日到店享用完毕,静候您的光临!'),
  78 + TemplateModel('沉睡唤醒',
  79 + '尊敬的贵宾:对不起!很冒昧的给您发这条短信,我是${userModel.user.sellername}的${userModel.user.nickName ?? ''}.您都有很长一段时间没来我们这里了,我们非常想念您。或许是我们的服务还没有让您满意,或许是给您搭配的餐品还没有满足您的需求,总之,都是我们做的不够好!我们正在不断的改进,希望可以变得更完美,请您原谅以往我们的不足,有空回來看看我们!为您准备了一份精美小礼品,快快来领取吧!详情请点击{礼品领取链接}。')
  80 + ];
  81 +
61 _focusNode.addListener(() { 82 _focusNode.addListener(() {
62 if (_focusNode.hasFocus) { 83 if (_focusNode.hasFocus) {
63 //有焦点 84 //有焦点
@@ -225,28 +246,56 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -225,28 +246,56 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
225 child: Text( 246 child: Text(
226 title, 247 title,
227 overflow: TextOverflow.ellipsis, 248 overflow: TextOverflow.ellipsis,
  249 + textAlign: TextAlign.right,
228 style: TextStyle( 250 style: TextStyle(
229 color: title == '时间(选填)' || 251 color: title == '时间(选填)' ||
230 title == '(选填)' || 252 title == '(选填)' ||
231 title == '选择优惠' || 253 title == '选择优惠' ||
232 !customerMakingProvider.isUse 254 !customerMakingProvider.isUse
233 ? MyColours.color_999999 255 ? MyColours.color_999999
234 - : MyColours.color_199095, 256 + : MyColours.color_438E93,
235 fontSize: ScreenUtil().setWidth(30)), 257 fontSize: ScreenUtil().setWidth(30)),
236 )), 258 )),
237 - HEmptyView(10), 259 + HEmptyView(20),
238 Image.asset( 260 Image.asset(
239 // Utils.getImgPath(!customerMakingProvider.isUse 261 // Utils.getImgPath(!customerMakingProvider.isUse
240 // ? 'c_arrow_down_unsel' 262 // ? 'c_arrow_down_unsel'
241 // : 'c_arrow_down'), 263 // : 'c_arrow_down'),
242 - Utils.getImgPath('c_arrow_down'),  
243 - width: ScreenUtil().setWidth(30), 264 + Utils.getImgPath('down_c'),
  265 + width: ScreenUtil().setWidth(44),
244 // height: ScreenUtil().setWidth(10), 266 // height: ScreenUtil().setWidth(10),
245 ) 267 )
246 ], 268 ],
247 ))); 269 )));
248 } 270 }
249 271
  272 + List<Widget> _templateUI() {
  273 + List<Widget> templates = [];
  274 + data.forEach((element) {
  275 + templates.add(InkWell(
  276 + onTap: () {
  277 + //选择模版.默认数据
  278 +
  279 + customerMakingProvider.controller.text = element.content;
  280 + },
  281 + child: Container(
  282 + padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(5)),
  283 + decoration: BoxDecoration(
  284 + borderRadius: BorderRadius.circular(r(5)),
  285 + color: MyColours.color_ffffff,
  286 + border: Border.all(width: w(1), color: MyColours.color_438E93)),
  287 + child: Text(
  288 + element.title,
  289 + style: TextStyle(
  290 + color: MyColours.color_438E93,
  291 + fontSize: font(12),
  292 + fontWeight: FontWeight.bold),
  293 + ),
  294 + )));
  295 + });
  296 + return templates;
  297 + }
  298 +
250 ///短信内容编辑UI 299 ///短信内容编辑UI
251 Widget _contentWidget(String hintText) { 300 Widget _contentWidget(String hintText) {
252 return Container( 301 return Container(
@@ -260,7 +309,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -260,7 +309,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
260 // title, 309 // title,
261 // textAlign: TextAlign.left, 310 // textAlign: TextAlign.left,
262 // style: TextStyle( 311 // style: TextStyle(
263 - // color: MyColours.color_333333, 312 + // color: MyColours.color_515151,
264 // fontWeight: FontWeight.bold, 313 // fontWeight: FontWeight.bold,
265 // fontSize: ScreenUtil().setSp(34)), 314 // fontSize: ScreenUtil().setSp(34)),
266 // )), 315 // )),
@@ -268,14 +317,14 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -268,14 +317,14 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
268 TextField( 317 TextField(
269 controller: customerMakingProvider.controller, 318 controller: customerMakingProvider.controller,
270 // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘 319 // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
271 - maxLines: 10, 320 + maxLines: 6,
272 focusNode: _focusNode, 321 focusNode: _focusNode,
273 // maxLength: 50, 322 // maxLength: 50,
274 323
275 // maxLengthEnforced: true, 324 // maxLengthEnforced: true,
276 style: TextStyle( 325 style: TextStyle(
277 fontSize: ScreenUtil().setSp(28), 326 fontSize: ScreenUtil().setSp(28),
278 - color: MyColours.color_333333), //输入文本的样式 327 + color: MyColours.color_515151), //输入文本的样式
279 decoration: InputDecoration( 328 decoration: InputDecoration(
280 contentPadding: EdgeInsets.all(ScreenUtil().setWidth(30)), 329 contentPadding: EdgeInsets.all(ScreenUtil().setWidth(30)),
281 hintText: hintText, 330 hintText: hintText,
@@ -283,7 +332,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -283,7 +332,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
283 color: MyColours.color_999999, 332 color: MyColours.color_999999,
284 fontSize: ScreenUtil().setSp(28), 333 fontSize: ScreenUtil().setSp(28),
285 ), 334 ),
286 - fillColor: MyColours.color_F9F9F9, 335 + fillColor: MyColours.color_ffffff,
287 // fillColor: Colors.red, 336 // fillColor: Colors.red,
288 filled: true, 337 filled: true,
289 enabledBorder: OutlineInputBorder( 338 enabledBorder: OutlineInputBorder(
@@ -311,6 +360,38 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -311,6 +360,38 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
311 }, 360 },
312 ), 361 ),
313 VEmptyView(20), 362 VEmptyView(20),
  363 + Container(
  364 + padding: EdgeInsets.only(left: w(10), right: w(10), bottom: w(10)),
  365 + decoration: BoxDecoration(
  366 + borderRadius: BorderRadius.circular(r(5)),
  367 + border: Border.all(width: w(1), color: MyColours.color_F8F7F3)),
  368 + child: Column(
  369 + crossAxisAlignment: CrossAxisAlignment.start,
  370 + children: [
  371 + Container(
  372 + height: w(34),
  373 + alignment: Alignment.centerLeft,
  374 + child: Text(
  375 + '常用模版',
  376 + style: TextStyle(
  377 + color: MyColours.color_515151,
  378 + fontSize: font(12),
  379 + ),
  380 + ),
  381 + ),
  382 + VEmptyView(10),
  383 + Padding(
  384 + padding: EdgeInsets.only(left: w(10)),
  385 + child: Wrap(
  386 + spacing: w(10),
  387 + runSpacing: w(5),
  388 + children: _templateUI(),
  389 + ),
  390 + )
  391 + ],
  392 + ),
  393 + ),
  394 + VEmptyView(50),
314 Row( 395 Row(
315 mainAxisAlignment: MainAxisAlignment.spaceBetween, 396 mainAxisAlignment: MainAxisAlignment.spaceBetween,
316 children: [ 397 children: [
@@ -321,17 +402,16 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -321,17 +402,16 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
321 // NavigatorUtil.goMarketingRecordsDetailPage(context); 402 // NavigatorUtil.goMarketingRecordsDetailPage(context);
322 }, 403 },
323 child: Padding( 404 child: Padding(
324 - padding: EdgeInsets.symmetric(  
325 - horizontal: ScreenUtil().setWidth(20)), 405 + padding: EdgeInsets.only(right: ScreenUtil().setWidth(20)),
326 child: Text('清空', 406 child: Text('清空',
327 style: TextStyle( 407 style: TextStyle(
328 color: MyColours.color_199095, 408 color: MyColours.color_199095,
329 - fontSize: ScreenUtil().setSp(26))), 409 + fontSize: ScreenUtil().setSp(30))),
330 )), 410 )),
331 Text( 411 Text(
332 '共 ${customerMakingProvider.controller.text.length} 字 ${customerMakingProvider.selectCustomerSeller.length} 条短信', 412 '共 ${customerMakingProvider.controller.text.length} 字 ${customerMakingProvider.selectCustomerSeller.length} 条短信',
333 style: TextStyle( 413 style: TextStyle(
334 - color: MyColours.color_333333, 414 + color: MyColours.color_515151,
335 fontSize: ScreenUtil().setSp(26))), 415 fontSize: ScreenUtil().setSp(26))),
336 ], 416 ],
337 ), 417 ),
@@ -344,19 +424,19 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -344,19 +424,19 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
344 child: Row(children: [ 424 child: Row(children: [
345 Image.asset( 425 Image.asset(
346 Utils.getImgPath(customerMakingProvider.isUse 426 Utils.getImgPath(customerMakingProvider.isUse
347 - ? 'c_mul_select'  
348 - : 'c_mul_select_un'),  
349 - width: ScreenUtil().setWidth(30)), 427 + ? 'f_select'
  428 + : 'f_select_not'),
  429 + width: ScreenUtil().setWidth(44)),
350 HEmptyView(15), 430 HEmptyView(15),
351 Text( 431 Text(
352 - '营销加入优惠', 432 + '在当前位置插入优惠',
353 style: TextStyle( 433 style: TextStyle(
354 - fontSize: ScreenUtil().setSp(36), 434 + fontSize: ScreenUtil().setSp(32),
355 fontWeight: FontWeight.bold, 435 fontWeight: FontWeight.bold,
356 - color: MyColours.color_333333), 436 + color: MyColours.color_515151),
357 ), 437 ),
358 ])), 438 ])),
359 - VEmptyView(30), 439 + VEmptyView(32),
360 Row(children: [ 440 Row(children: [
361 Expanded( 441 Expanded(
362 child: Container( 442 child: Container(
@@ -365,7 +445,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -365,7 +445,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
365 decoration: BoxDecoration( 445 decoration: BoxDecoration(
366 borderRadius: 446 borderRadius:
367 BorderRadius.circular(ScreenUtil().setWidth(10)), 447 BorderRadius.circular(ScreenUtil().setWidth(10)),
368 - color: Color.fromRGBO(239, 239, 239, 1)), 448 + color: MyColours.color_DBDBDB),
369 child: 449 child:
370 _buttonChoose(customerMakingProvider.youhui, (value) { 450 _buttonChoose(customerMakingProvider.youhui, (value) {
371 FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 451 FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
@@ -382,6 +462,25 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -382,6 +462,25 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
382 customerMakingProvider.youhui = couponList[ 462 customerMakingProvider.youhui = couponList[
383 customerMakingProvider.couponSelectIndex]; 463 customerMakingProvider.couponSelectIndex];
384 }); 464 });
  465 + var cursorPos = customerMakingProvider
  466 + .controller.selection.base.offset; //获取到光标的在字符串的位置
  467 +
  468 + String textAfterCursor = customerMakingProvider
  469 + .controller.text
  470 + .substring(cursorPos); //把字符串从光标的位置截取,光标后面的
  471 +
  472 + String textBeforeCursor = customerMakingProvider
  473 + .controller.text
  474 + .substring(0, cursorPos); //光标前面的字符串
  475 + customerMakingProvider.controller.text =
  476 + textBeforeCursor +
  477 + "http://www.baidu.com" +
  478 + textAfterCursor; //把想要的插入的内容拼接在光标位置处
  479 +
  480 + customerMakingProvider.controller.selection =
  481 + TextSelection.collapsed(
  482 + offset: customerMakingProvider
  483 + .controller.text.length);
385 } 484 }
386 }, 485 },
387 selecteds: customerMakingProvider 486 selecteds: customerMakingProvider
@@ -391,7 +490,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -391,7 +490,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
391 : [customerMakingProvider.couponSelectIndex]) 490 : [customerMakingProvider.couponSelectIndex])
392 .then((value) {}); 491 .then((value) {});
393 }))), 492 }))),
394 - HEmptyView(30), 493 + HEmptyView(40),
395 InkWell( 494 InkWell(
396 onTap: () async { 495 onTap: () async {
397 // NavigatorUtil.goMarketingRecordsDetailPage(context); 496 // NavigatorUtil.goMarketingRecordsDetailPage(context);
@@ -407,8 +506,9 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -407,8 +506,9 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
407 child: Text('创建新优惠', 506 child: Text('创建新优惠',
408 style: TextStyle( 507 style: TextStyle(
409 decoration: TextDecoration.underline, 508 decoration: TextDecoration.underline,
410 - color: MyColours.color_199095,  
411 - fontSize: ScreenUtil().setSp(26)))), 509 + color: MyColours.color_438E93,
  510 + fontWeight: FontWeight.bold,
  511 + fontSize: ScreenUtil().setSp(28)))),
412 ]), 512 ]),
413 Column( 513 Column(
414 children: [ 514 children: [
@@ -422,15 +522,16 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -422,15 +522,16 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
422 child: Row(children: [ 522 child: Row(children: [
423 Image.asset( 523 Image.asset(
424 Utils.getImgPath(customerMakingProvider.isUpdate 524 Utils.getImgPath(customerMakingProvider.isUpdate
425 - ? 'c_mul_select'  
426 - : 'c_mul_select_un'),  
427 - width: ScreenUtil().setWidth(30)), 525 + ? 'f_select'
  526 + : 'f_select_not'),
  527 + width: ScreenUtil().setWidth(44)),
428 HEmptyView(15), 528 HEmptyView(15),
429 Text( 529 Text(
430 '客户经理不可修改短信内容', 530 '客户经理不可修改短信内容',
431 style: TextStyle( 531 style: TextStyle(
432 - fontSize: ScreenUtil().setSp(26),  
433 - color: MyColours.color_333333), 532 + fontWeight: FontWeight.bold,
  533 + fontSize: ScreenUtil().setSp(32),
  534 + color: MyColours.color_515151),
434 ), 535 ),
435 ])), 536 ])),
436 VEmptyView(30), 537 VEmptyView(30),
@@ -443,72 +544,109 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -443,72 +544,109 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
443 }, 544 },
444 child: Image.asset( 545 child: Image.asset(
445 Utils.getImgPath(customerMakingProvider.isDate 546 Utils.getImgPath(customerMakingProvider.isDate
446 - ? 'c_mul_select'  
447 - : 'c_mul_select_un'),  
448 - width: ScreenUtil().setWidth(30))), 547 + ? 'f_select'
  548 + : 'f_select_not'),
  549 + width: ScreenUtil().setWidth(44))),
449 HEmptyView(15), 550 HEmptyView(15),
450 Text( 551 Text(
451 '最晚完成期限', 552 '最晚完成期限',
452 style: TextStyle( 553 style: TextStyle(
453 - fontSize: ScreenUtil().setSp(26),  
454 - color: MyColours.color_333333),  
455 - ),  
456 - HEmptyView(15),  
457 - InkWell(  
458 - onTap: () {  
459 - FocusScope.of(context)  
460 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
461 - //弹出时间选择器  
462 - // showPickerDateTime(context);  
463 - showDateSelWidget = true;  
464 - DialogUtil.showPickerDateTime24(  
465 - context,  
466 - scaffoldKey,  
467 - (value) {  
468 - // {'text': picker.adapter.text, 'select': selecteds}  
469 - if (value != null) {  
470 - setState(() {  
471 - print(value);  
472 - customerMakingProvider.edate =  
473 - DateUtil.formatDateStr(value,  
474 - format: DateFormats.full);  
475 - });  
476 - }  
477 - showDateSelWidget = false;  
478 - },  
479 - dateTime:  
480 - DateUtil.getDateTime(customerMakingProvider.edate),  
481 - onCancel: () {  
482 - showDateSelWidget = false;  
483 - });  
484 - },  
485 - child: Row(  
486 - children: [  
487 - Container(  
488 - // height: ScreenUtil().setWidth(70),  
489 - alignment: Alignment.center,  
490 - // width: ScreenUtil().setWidth(280),  
491 - padding: EdgeInsets.symmetric(  
492 - horizontal: ScreenUtil().setWidth(30)),  
493 - decoration: BoxDecoration(  
494 - border: Border(  
495 - bottom: BorderSide(  
496 - color: Color.fromRGBO(175, 176, 177, 1),  
497 - width: ScreenUtil().setWidth(2)))),  
498 - child: Text(customerMakingProvider.edate,  
499 - style: TextStyle(  
500 - fontSize: ScreenUtil().setSp(26),  
501 - color: customerMakingProvider.isDate  
502 - ? MyColours.color_333333  
503 - : MyColours.color_999999))),  
504 - Image.asset(  
505 - Utils.getImgPath('c_arrow_down'),  
506 - width: ScreenUtil().setWidth(30),  
507 - // height: ScreenUtil().setWidth(10),  
508 - )  
509 - ],  
510 - ), 554 + fontSize: ScreenUtil().setSp(32),
  555 + fontWeight: FontWeight.bold,
  556 + color: MyColours.color_515151),
511 ), 557 ),
  558 + HEmptyView(40),
  559 + Expanded(
  560 + child: Container(
  561 + height: ScreenUtil().setWidth(70),
  562 + // width: ScreenUtil().setWidth(130),
  563 + decoration: BoxDecoration(
  564 + borderRadius: BorderRadius.circular(
  565 + ScreenUtil().setWidth(10)),
  566 + color: MyColours.color_DBDBDB),
  567 + child: _buttonChoose(customerMakingProvider.edate,
  568 + (value) {
  569 + FocusScope.of(context)
  570 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  571 + //弹出时间选择器
  572 + // showPickerDateTime(context);
  573 + showDateSelWidget = true;
  574 + DialogUtil.showPickerDateTime24(
  575 + context,
  576 + scaffoldKey,
  577 + (value) {
  578 + // {'text': picker.adapter.text, 'select': selecteds}
  579 + if (value != null) {
  580 + setState(() {
  581 + print(value);
  582 + customerMakingProvider.edate =
  583 + DateUtil.formatDateStr(value,
  584 + format: DateFormats.full);
  585 + });
  586 + }
  587 + showDateSelWidget = false;
  588 + },
  589 + dateTime: DateUtil.getDateTime(
  590 + customerMakingProvider.edate),
  591 + onCancel: () {
  592 + showDateSelWidget = false;
  593 + });
  594 + }))),
  595 + // InkWell(
  596 + // onTap: () {
  597 + // FocusScope.of(context)
  598 + // .requestFocus(FocusNode()); //点击空白处隐藏键盘
  599 + // //弹出时间选择器
  600 + // // showPickerDateTime(context);
  601 + // showDateSelWidget = true;
  602 + // DialogUtil.showPickerDateTime24(
  603 + // context,
  604 + // scaffoldKey,
  605 + // (value) {
  606 + // // {'text': picker.adapter.text, 'select': selecteds}
  607 + // if (value != null) {
  608 + // setState(() {
  609 + // print(value);
  610 + // customerMakingProvider.edate =
  611 + // DateUtil.formatDateStr(value,
  612 + // format: DateFormats.full);
  613 + // });
  614 + // }
  615 + // showDateSelWidget = false;
  616 + // },
  617 + // dateTime:
  618 + // DateUtil.getDateTime(customerMakingProvider.edate),
  619 + // onCancel: () {
  620 + // showDateSelWidget = false;
  621 + // });
  622 + // },
  623 + // child: Row(
  624 + // children: [
  625 + // Container(
  626 + // // height: ScreenUtil().setWidth(70),
  627 + // alignment: Alignment.center,
  628 + // // width: ScreenUtil().setWidth(280),
  629 + // padding: EdgeInsets.symmetric(
  630 + // horizontal: ScreenUtil().setWidth(30)),
  631 + // decoration: BoxDecoration(
  632 + // border: Border(
  633 + // bottom: BorderSide(
  634 + // color: Color.fromRGBO(175, 176, 177, 1),
  635 + // width: ScreenUtil().setWidth(2)))),
  636 + // child: Text(customerMakingProvider.edate,
  637 + // style: TextStyle(
  638 + // fontSize: ScreenUtil().setSp(26),
  639 + // color: customerMakingProvider.isDate
  640 + // ? MyColours.color_515151
  641 + // : MyColours.color_999999))),
  642 + // Image.asset(
  643 + // Utils.getImgPath('c_arrow_down'),
  644 + // width: ScreenUtil().setWidth(30),
  645 + // // height: ScreenUtil().setWidth(10),
  646 + // )
  647 + // ],
  648 + // ),
  649 + // ),
512 ]), 650 ]),
513 VEmptyView(30), 651 VEmptyView(30),
514 ], 652 ],
@@ -529,7 +667,8 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -529,7 +667,8 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
529 FocusScope.of(context).requestFocus(new FocusNode()); 667 FocusScope.of(context).requestFocus(new FocusNode());
530 }, 668 },
531 child: Scaffold( 669 child: Scaffold(
532 - backgroundColor: Color.fromRGBO(246, 248, 250, 1), 670 + // backgroundColor: Color.fromRGBO(246, 248, 250, 1),
  671 + backgroundColor: MyColours.color_ffffff,
533 key: scaffoldKey, 672 key: scaffoldKey,
534 appBar: SystemAppBar( 673 appBar: SystemAppBar(
535 '创建营销任务', 674 '创建营销任务',
@@ -627,43 +766,85 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { @@ -627,43 +766,85 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> {
627 ], 766 ],
628 ), 767 ),
629 )), 768 )),
630 - RoundButton(  
631 - text: '确认下发任务',  
632 - gradientStart: MyColours.color_199095,  
633 - gradientEnd: MyColours.color_199095,  
634 - // borderColor: MyColours.color_999999,  
635 - radius: ScreenUtil().setWidth(40),  
636 - height: ScreenUtil().setWidth(80),  
637 - fontSize: 26,  
638 - margin: EdgeInsets.symmetric(  
639 - horizontal: ScreenUtil().setWidth(230)),  
640 - isBold: false,  
641 - onPressed: () {  
642 - // NavigatorUtil.goEnterStoreEnvironmentPage(context);  
643 -  
644 - //确认下发任务  
645 - _createMarketingBySeller();  
646 - },  
647 - ),  
648 - VEmptyView(30),  
649 - RoundButton(  
650 - text: '取消',  
651 - gradientStart: MyColours.color_ffffff,  
652 - gradientEnd: MyColours.color_ffffff,  
653 - textColor: MyColours.color_199095,  
654 - borderColor: MyColours.color_199095,  
655 - radius: ScreenUtil().setWidth(40),  
656 - height: ScreenUtil().setWidth(80),  
657 - fontSize: 26,  
658 - margin: EdgeInsets.symmetric(  
659 - horizontal: ScreenUtil().setWidth(230)),  
660 - isBold: false,  
661 - onPressed: () {  
662 - customerMakingProvider.clearData();  
663 - Navigator.pop(context);  
664 - },  
665 - ),  
666 - VEmptyView(40), 769 +
  770 + Container(
  771 + padding: EdgeInsets.only(
  772 + left: w(23), right: w(23), top: w(12), bottom: w(25)),
  773 + child: Row(
  774 + children: [
  775 + RoundButton(
  776 + text: '取消',
  777 + width: w(100),
  778 + gradientStart: MyColours.color_ffffff,
  779 + gradientEnd: MyColours.color_ffffff,
  780 + textColor: MyColours.color_199095,
  781 + borderColor: MyColours.color_199095,
  782 + radius: r(5),
  783 + height: w(43),
  784 + fontSize: 32,
  785 + isBold: true,
  786 + onPressed: () {
  787 + customerMakingProvider.clearData();
  788 + Navigator.pop(context);
  789 + },
  790 + ),
  791 + HEmptyView(30),
  792 + Expanded(
  793 + child: RoundButton(
  794 + text: '确认下发任务',
  795 + gradientStart: MyColours.color_438E93,
  796 + gradientEnd: MyColours.color_438E93,
  797 + // borderColor: MyColours.color_999999,
  798 + radius: r(5),
  799 + height: w(43),
  800 + fontSize: 32,
  801 +
  802 + isBold: true,
  803 + onPressed: () {
  804 + //确认下发任务
  805 + _createMarketingBySeller();
  806 + },
  807 + )),
  808 + ],
  809 + ),
  810 + )
  811 + // RoundButton(
  812 + // text: '确认下发任务',
  813 + // gradientStart: MyColours.color_199095,
  814 + // gradientEnd: MyColours.color_199095,
  815 + // // borderColor: MyColours.color_999999,
  816 + // radius: ScreenUtil().setWidth(40),
  817 + // height: ScreenUtil().setWidth(80),
  818 + // fontSize: 26,
  819 + // margin: EdgeInsets.symmetric(
  820 + // horizontal: ScreenUtil().setWidth(230)),
  821 + // isBold: false,
  822 + // onPressed: () {
  823 + // // NavigatorUtil.goEnterStoreEnvironmentPage(context);
  824 +
  825 + // //确认下发任务
  826 + // _createMarketingBySeller();
  827 + // },
  828 + // ),
  829 + // VEmptyView(30),
  830 + // RoundButton(
  831 + // text: '取消',
  832 + // gradientStart: MyColours.color_ffffff,
  833 + // gradientEnd: MyColours.color_ffffff,
  834 + // textColor: MyColours.color_199095,
  835 + // borderColor: MyColours.color_199095,
  836 + // radius: ScreenUtil().setWidth(40),
  837 + // height: ScreenUtil().setWidth(80),
  838 + // fontSize: 26,
  839 + // margin: EdgeInsets.symmetric(
  840 + // horizontal: ScreenUtil().setWidth(230)),
  841 + // isBold: false,
  842 + // onPressed: () {
  843 + // customerMakingProvider.clearData();
  844 + // Navigator.pop(context);
  845 + // },
  846 + // ),
  847 + // VEmptyView(40),
667 ], 848 ],
668 )), 849 )),
669 )); 850 ));