Commit 42f057589b0cfa10eaedf25a385fc9ca6db75730

Authored by wdn127929
1 parent 0fcf9bc2

ui

16.4 KB | W: | H:

6.13 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -8,6 +8,7 @@ import 'package:one_key/pages/my/customer_type/contant_list_page.dart'; @@ -8,6 +8,7 @@ import 'package:one_key/pages/my/customer_type/contant_list_page.dart';
8 import 'package:one_key/provider/customer_provider.dart'; 8 import 'package:one_key/provider/customer_provider.dart';
9 import 'package:one_key/provider/user_model.dart'; 9 import 'package:one_key/provider/user_model.dart';
10 import 'package:one_key/res/colors.dart'; 10 import 'package:one_key/res/colors.dart';
  11 +import 'package:one_key/route/navigator_util.dart';
11 12
12 import 'package:one_key/utils/event_bus.dart'; 13 import 'package:one_key/utils/event_bus.dart';
13 import 'package:one_key/utils/utils.dart'; 14 import 'package:one_key/utils/utils.dart';
@@ -92,6 +93,9 @@ class _CustomerListPageState extends State<CustomerListPage> @@ -92,6 +93,9 @@ class _CustomerListPageState extends State<CustomerListPage>
92 HEmptyView(20), 93 HEmptyView(20),
93 Expanded( 94 Expanded(
94 child: InkWell( 95 child: InkWell(
  96 + onTap: () {
  97 + NavigatorUtil.goMakeMarkingPage(context);
  98 + },
95 child: Container( 99 child: Container(
96 alignment: Alignment.center, 100 alignment: Alignment.center,
97 padding: EdgeInsets.all(ScreenUtil().setWidth(20)), 101 padding: EdgeInsets.all(ScreenUtil().setWidth(20)),
  1 +import 'package:common_utils/common_utils.dart';
  2 +import 'package:flutter/material.dart';
  3 +import 'package:flutter_screenutil/screenutil.dart';
  4 +import 'package:one_key/pages/coupon/coupon_page.dart';
  5 +import 'package:one_key/res/colors.dart';
  6 +import 'package:one_key/utils/dialog_util.dart';
  7 +import 'package:one_key/utils/utils.dart';
  8 +import 'package:one_key/widgets/h_empty_view.dart';
  9 +import 'package:one_key/widgets/round_button.dart';
  10 +import 'package:one_key/widgets/system_app_bar.dart';
  11 +import 'package:one_key/widgets/v_empty_view.dart';
  12 +
  13 +typedef ClickCallback = void Function(dynamic value);
  14 +
  15 +class MakeMarkingPage extends StatefulWidget {
  16 + MakeMarkingPage({Key key}) : super(key: key);
  17 +
  18 + @override
  19 + _MakeMarkingPageState createState() => _MakeMarkingPageState();
  20 +}
  21 +
  22 +class _MakeMarkingPageState extends State<MakeMarkingPage> {
  23 + TextEditingController controller = TextEditingController();
  24 + List<String> couponList = [
  25 + '98折(ccccckkkkshjhjsjsvc)kkkkkk',
  26 + 'fffff',
  27 + 'fffff',
  28 + 'ffsdfasfaf'
  29 + ];
  30 + int couponSelectIndex = 0;
  31 + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
  32 + FocusNode _focusNode = FocusNode();
  33 + bool showDateSelWidget = false;
  34 + String limitDate = '';
  35 +
  36 + @override
  37 + void initState() {
  38 + super.initState();
  39 + _focusNode.addListener(() {
  40 + if (_focusNode.hasFocus) {
  41 + //有焦点
  42 + if (showDateSelWidget) {
  43 + Navigator.pop(context);
  44 + showDateSelWidget = false;
  45 + }
  46 + } else {
  47 + //失去焦点
  48 + // _editingController.text = '';
  49 + }
  50 + });
  51 + }
  52 +
  53 + _buttonChoose(String title, ClickCallback callback) {
  54 + return InkWell(
  55 + onTap: () {
  56 + callback(title);
  57 + },
  58 + child: Padding(
  59 + padding: EdgeInsets.symmetric(
  60 + horizontal: ScreenUtil().setWidth(20),
  61 + vertical: ScreenUtil().setWidth(10)),
  62 + // height: ScreenUtil().setWidth(50),
  63 + // decoration: BoxDecoration(
  64 + // // border: Border.all(
  65 + // // width: ScreenUtil().setWidth(2),
  66 + // // color: MyColours.color_199095),
  67 + // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
  68 + child: Row(
  69 + children: [
  70 + Expanded(
  71 + child: Text(
  72 + title,
  73 + overflow: TextOverflow.ellipsis,
  74 + style: TextStyle(
  75 + color: title == '时间(选填)' || title == '(选填)'
  76 + ? MyColours.color_999999
  77 + : MyColours.color_199095,
  78 + fontSize: ScreenUtil().setWidth(30)),
  79 + )),
  80 + HEmptyView(10),
  81 + Image.asset(
  82 + Utils.getImgPath('c_arrow_down'),
  83 + width: ScreenUtil().setWidth(30),
  84 + // height: ScreenUtil().setWidth(10),
  85 + )
  86 + ],
  87 + )));
  88 + }
  89 +
  90 + ///短信内容编辑UI
  91 + Widget _contentWidget(String hintText) {
  92 + return Container(
  93 + // height: ScreenUtil().setWidth(380),
  94 + child: Column(
  95 + crossAxisAlignment: CrossAxisAlignment.start,
  96 + children: [
  97 + // Align(
  98 + // alignment: Alignment.centerLeft,
  99 + // child: Text(
  100 + // title,
  101 + // textAlign: TextAlign.left,
  102 + // style: TextStyle(
  103 + // color: MyColours.color_333333,
  104 + // fontWeight: FontWeight.bold,
  105 + // fontSize: ScreenUtil().setSp(34)),
  106 + // )),
  107 + // VEmptyView(30),
  108 + TextField(
  109 + controller: controller,
  110 + // keyboardType: TextInputType.number, //键盘类型,数字键盘
  111 + maxLines: 10,
  112 + focusNode: _focusNode,
  113 + // maxLength: 50,
  114 +
  115 + // maxLengthEnforced: true,
  116 + style: TextStyle(
  117 + fontSize: ScreenUtil().setSp(28),
  118 + color: MyColours.color_333333), //输入文本的样式
  119 + decoration: InputDecoration(
  120 + contentPadding: EdgeInsets.all(ScreenUtil().setWidth(30)),
  121 + hintText: hintText,
  122 + hintStyle: TextStyle(
  123 + color: MyColours.color_999999,
  124 + fontSize: ScreenUtil().setSp(28),
  125 + ),
  126 + fillColor: MyColours.color_F9F9F9,
  127 + // fillColor: Colors.red,
  128 + filled: true,
  129 + enabledBorder: OutlineInputBorder(
  130 + //未选中时候的颜色
  131 + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
  132 + borderSide: BorderSide(
  133 + color: MyColours.color_cccccc,
  134 + width: ScreenUtil().setWidth(2)),
  135 + ),
  136 + focusedBorder: OutlineInputBorder(
  137 + //选中时外边框颜色
  138 + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
  139 + borderSide: BorderSide(
  140 + color: MyColours.app_main,
  141 + ),
  142 + ),
  143 + // border: OutlineInputBorder(
  144 + // borderRadius:
  145 + // BorderRadius.circular(ScreenUtil().setWidth(20)),
  146 + // borderSide: BorderSide(
  147 + // color: Colors.red, width: ScreenUtil().setWidth(2))),
  148 + ),
  149 + onChanged: (value) {
  150 + setState(() {});
  151 + },
  152 + ),
  153 + VEmptyView(20),
  154 + Row(
  155 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  156 + children: [
  157 + InkWell(
  158 + onTap: () {
  159 + // NavigatorUtil.goMarketingRecordsDetailPage(context);
  160 + },
  161 + child: Padding(
  162 + padding: EdgeInsets.symmetric(
  163 + horizontal: ScreenUtil().setWidth(20)),
  164 + child: Text('清空',
  165 + style: TextStyle(
  166 + color: MyColours.color_199095,
  167 + fontSize: ScreenUtil().setSp(26))),
  168 + )),
  169 + Text('共 ${controller.text.length} 字 0 条短信',
  170 + style: TextStyle(
  171 + color: MyColours.color_333333,
  172 + fontSize: ScreenUtil().setSp(26))),
  173 + ],
  174 + ),
  175 + VEmptyView(40),
  176 + Row(children: [
  177 + Image.asset(
  178 + Utils.getImgPath(true ? 'c_mul_select' : 'c_mul_select_un'),
  179 + width: ScreenUtil().setWidth(30)),
  180 + HEmptyView(15),
  181 + Text(
  182 + '营销加入优惠',
  183 + style: TextStyle(
  184 + fontSize: ScreenUtil().setSp(36),
  185 + fontWeight: FontWeight.bold,
  186 + color: MyColours.color_333333),
  187 + ),
  188 + ]),
  189 + VEmptyView(30),
  190 + Row(children: [
  191 + Expanded(
  192 + child: Container(
  193 + height: ScreenUtil().setWidth(70),
  194 + // width: ScreenUtil().setWidth(130),
  195 + decoration: BoxDecoration(
  196 + borderRadius:
  197 + BorderRadius.circular(ScreenUtil().setWidth(10)),
  198 + color: Color.fromRGBO(239, 239, 239, 1)),
  199 + child:
  200 + _buttonChoose(couponList[couponSelectIndex], (value) {
  201 + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
  202 + DialogUtil.showSelectCusmanDialog(context, couponList,
  203 + (value) {
  204 + if (value != null) {
  205 + setState(() {
  206 + couponSelectIndex = value.first;
  207 + });
  208 + }
  209 + },
  210 + selecteds: couponSelectIndex == null
  211 + ? []
  212 + : [couponSelectIndex])
  213 + .then((value) {});
  214 + }))),
  215 + HEmptyView(30),
  216 + InkWell(
  217 + onTap: () {
  218 + // NavigatorUtil.goMarketingRecordsDetailPage(context);
  219 + },
  220 + child: Text('创建新优惠',
  221 + style: TextStyle(
  222 + decoration: TextDecoration.underline,
  223 + color: MyColours.color_199095,
  224 + fontSize: ScreenUtil().setSp(26)))),
  225 + ]),
  226 + VEmptyView(30),
  227 + Row(children: [
  228 + Image.asset(
  229 + Utils.getImgPath(true ? 'c_mul_select' : 'c_mul_select_un'),
  230 + width: ScreenUtil().setWidth(30)),
  231 + HEmptyView(15),
  232 + Text(
  233 + '客户经理不可修改短信内容',
  234 + style: TextStyle(
  235 + fontSize: ScreenUtil().setSp(26),
  236 + color: MyColours.color_333333),
  237 + ),
  238 + ]),
  239 + VEmptyView(30),
  240 + Row(children: [
  241 + Image.asset(
  242 + Utils.getImgPath(true ? 'c_mul_select' : 'c_mul_select_un'),
  243 + width: ScreenUtil().setWidth(30)),
  244 + HEmptyView(15),
  245 + Text(
  246 + '最晚完成期限',
  247 + style: TextStyle(
  248 + fontSize: ScreenUtil().setSp(26),
  249 + color: MyColours.color_333333),
  250 + ),
  251 + HEmptyView(15),
  252 + InkWell(
  253 + onTap: () {
  254 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  255 + //弹出时间选择器
  256 + // showPickerDateTime(context);
  257 + showDateSelWidget = true;
  258 + DialogUtil.showPickerDateTime24(
  259 + context,
  260 + scaffoldKey,
  261 + (value) {
  262 + // {'text': picker.adapter.text, 'select': selecteds}
  263 + if (value != null) {
  264 + setState(() {
  265 + print(value);
  266 + limitDate = DateUtil.formatDateStr(value,
  267 + format: DateFormats.full);
  268 + });
  269 + }
  270 + showDateSelWidget = false;
  271 + },
  272 + dateTime: DateUtil.getDateTime(limitDate),
  273 + onCancel: () {
  274 + showDateSelWidget = false;
  275 + });
  276 + },
  277 + child: Row(
  278 + children: [
  279 + Container(
  280 + // height: ScreenUtil().setWidth(70),
  281 + alignment: Alignment.center,
  282 + // width: ScreenUtil().setWidth(280),
  283 + padding: EdgeInsets.symmetric(
  284 + horizontal: ScreenUtil().setWidth(30)),
  285 + decoration: BoxDecoration(
  286 + border: Border(
  287 + bottom: BorderSide(
  288 + color: Color.fromRGBO(175, 176, 177, 1),
  289 + width: ScreenUtil().setWidth(2)))),
  290 + child: Text(
  291 + limitDate,
  292 + style: TextStyle(
  293 + fontSize: ScreenUtil().setSp(26),
  294 + color: MyColours.color_333333),
  295 + )),
  296 + Image.asset(
  297 + Utils.getImgPath('c_arrow_down'),
  298 + width: ScreenUtil().setWidth(30),
  299 + // height: ScreenUtil().setWidth(10),
  300 + )
  301 + ],
  302 + ),
  303 + ),
  304 + ]),
  305 + ],
  306 + ),
  307 + );
  308 + }
  309 +
  310 + @override
  311 + Widget build(BuildContext context) {
  312 + return Scaffold(
  313 + backgroundColor: Color.fromRGBO(246, 248, 250, 1),
  314 + key: scaffoldKey,
  315 + appBar: SystemAppBar(
  316 + '创建营销任务',
  317 + onTap: () {
  318 + Navigator.pop(context);
  319 + },
  320 + ),
  321 + body: Column(
  322 + children: [
  323 + Expanded(
  324 + child: SingleChildScrollView(
  325 + child: Column(
  326 + children: [
  327 + VEmptyView(10),
  328 + Container(
  329 + color: MyColours.color_199095,
  330 + padding: EdgeInsets.symmetric(
  331 + horizontal: ScreenUtil().setWidth(30),
  332 + vertical: ScreenUtil().setWidth(30)),
  333 + child: Row(
  334 + children: [
  335 + Expanded(
  336 + child: Text(
  337 + '已选[沉睡、活跃、流失]100位顾客',
  338 + style: TextStyle(
  339 + color: MyColours.color_ffffff,
  340 + fontSize: ScreenUtil().setSp(32)),
  341 + )),
  342 + HEmptyView(10),
  343 + InkWell(
  344 + onTap: () {
  345 + // NavigatorUtil.goMarketingRecordsDetailPage(context);
  346 + },
  347 + child: Text('查看',
  348 + style: TextStyle(
  349 + decoration: TextDecoration.underline,
  350 + color: MyColours.color_ffffff,
  351 + fontSize: ScreenUtil().setSp(26)))),
  352 + ],
  353 + ),
  354 + ),
  355 + Padding(
  356 + padding: EdgeInsets.symmetric(
  357 + horizontal: ScreenUtil().setWidth(30),
  358 + ),
  359 + child: Column(
  360 + children: [VEmptyView(50), _contentWidget('输入营销短信内容')],
  361 + ),
  362 + )
  363 + ],
  364 + ),
  365 + )),
  366 + RoundButton(
  367 + text: '确认下发任务',
  368 + gradientStart: MyColours.color_199095,
  369 + gradientEnd: MyColours.color_199095,
  370 + // borderColor: MyColours.color_999999,
  371 + radius: ScreenUtil().setWidth(40),
  372 + height: ScreenUtil().setWidth(80),
  373 + fontSize: 26,
  374 + margin:
  375 + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(230)),
  376 + isBold: false,
  377 + onPressed: () {
  378 + // NavigatorUtil.goEnterStoreEnvironmentPage(context);
  379 + },
  380 + ),
  381 + VEmptyView(30),
  382 + RoundButton(
  383 + text: '取消',
  384 + gradientStart: MyColours.color_ffffff,
  385 + gradientEnd: MyColours.color_ffffff,
  386 + textColor: MyColours.color_199095,
  387 + borderColor: MyColours.color_199095,
  388 + radius: ScreenUtil().setWidth(40),
  389 + height: ScreenUtil().setWidth(80),
  390 + fontSize: 26,
  391 + margin:
  392 + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(230)),
  393 + isBold: false,
  394 + onPressed: () {
  395 + // DialogUtil.cupertinoAlertDialog(context,
  396 + // title: "取消任务",
  397 + // content: "点击确定立即取消任务,已完成的客户经理继续生效",
  398 + // lTitle: "返回",
  399 + // rTitle: "确定取消", lCallback: () {
  400 + // print("返回");
  401 + // }, rCallback: () {
  402 + // print("确定取消任务");
  403 + // });
  404 + },
  405 + ),
  406 + VEmptyView(40),
  407 + ],
  408 + ),
  409 + );
  410 + }
  411 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  3 +import 'package:one_key/res/colors.dart';
  4 +import 'package:one_key/utils/dialog_util.dart';
  5 +import 'package:one_key/utils/utils.dart';
  6 +import 'package:one_key/widgets/h_empty_view.dart';
  7 +import 'package:one_key/widgets/round_button.dart';
  8 +import 'package:one_key/widgets/row_multi_text.dart';
  9 +import 'package:one_key/widgets/system_app_bar.dart';
  10 +import 'package:one_key/widgets/v_empty_view.dart';
  11 +
  12 +class MarketingRecordsDetailPage extends StatefulWidget {
  13 + MarketingRecordsDetailPage({Key key}) : super(key: key);
  14 +
  15 + @override
  16 + _MarketingRecordsDetailPageState createState() =>
  17 + _MarketingRecordsDetailPageState();
  18 +}
  19 +
  20 +class _MarketingRecordsDetailPageState
  21 + extends State<MarketingRecordsDetailPage> {
  22 + //构建经理btn
  23 + List<Widget> _buildLabelItem(List<String> data,
  24 + {Color bgColor = MyColours.color_199095}) {
  25 + List<Widget> items = [];
  26 +
  27 + for (String item in data) {
  28 + items.add(InkWell(
  29 + onTap: () {},
  30 + child: Container(
  31 + // height: ScreenUtil().setWidth(40),
  32 + padding: EdgeInsets.symmetric(
  33 + horizontal: ScreenUtil().setWidth(20),
  34 + vertical: ScreenUtil().setWidth(6)),
  35 + decoration: BoxDecoration(
  36 + color: item.contains('未完成')
  37 + ? Color.fromRGBO(207, 29, 35, 1)
  38 + : MyColours.color_199095,
  39 + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
  40 + child: Text(
  41 + item,
  42 + style: TextStyle(
  43 + color: MyColours.color_ffffff,
  44 + fontSize: ScreenUtil().setSp(26),
  45 + ),
  46 + ),
  47 + )));
  48 + }
  49 + return items;
  50 + }
  51 +
  52 + @override
  53 + Widget build(BuildContext context) {
  54 + return Scaffold(
  55 + backgroundColor: Color.fromRGBO(246, 248, 250, 1),
  56 + appBar: SystemAppBar(
  57 + '营销任务详情',
  58 + onTap: () {
  59 + Navigator.pop(context);
  60 + },
  61 + ),
  62 + body: Padding(
  63 + padding: EdgeInsets.symmetric(
  64 + horizontal: ScreenUtil().setWidth(30),
  65 + // vertical: ScreenUtil().setWidth(40)
  66 + ),
  67 + child: Column(
  68 + children: [
  69 + Expanded(
  70 + child: SingleChildScrollView(
  71 + child: Column(
  72 + crossAxisAlignment: CrossAxisAlignment.start,
  73 + children: [
  74 + Stack(
  75 + alignment: Alignment.bottomCenter,
  76 + children: [
  77 + Column(
  78 + children: [
  79 + RowMultiText(
  80 + '创建日期',
  81 + '2021-12-22',
  82 + textColor: MyColours.color_333333,
  83 + bgColor: Color.fromRGBO(246, 248, 250, 1),
  84 + ),
  85 + RowMultiText(
  86 + '创建人',
  87 + '管理员',
  88 + textColor: MyColours.color_333333,
  89 + bgColor: Color.fromRGBO(246, 248, 250, 1),
  90 + ),
  91 + ],
  92 + ),
  93 + Positioned(
  94 + child: Image.asset(
  95 + Utils.getImgPath('c_state_ing'),
  96 + width: ScreenUtil().setWidth(140),
  97 + ))
  98 + ],
  99 + ),
  100 + RowMultiText(
  101 + '完成期限',
  102 + '2021-12-22 23:59:59',
  103 + textColor: MyColours.color_333333,
  104 + bgColor: Color.fromRGBO(246, 248, 250, 1),
  105 + ),
  106 + RowMultiText(
  107 + '修改短信内容',
  108 + '可修改',
  109 + textColor: MyColours.color_333333,
  110 + bgColor: Color.fromRGBO(246, 248, 250, 1),
  111 + ),
  112 + RowMultiText(
  113 + '优惠信息',
  114 + '98折(仅限菜品堂食)',
  115 + textColor: MyColours.color_333333,
  116 + bgColor: Color.fromRGBO(246, 248, 250, 1),
  117 + ),
  118 + Padding(
  119 + padding: EdgeInsets.only(
  120 + top: ScreenUtil().setWidth(25),
  121 + bottom: ScreenUtil().setWidth(20)),
  122 + child: Text(
  123 + '短信内容',
  124 + style: TextStyle(
  125 + color: MyColours.color_333333,
  126 + fontSize: ScreenUtil().setSp(30)),
  127 + )),
  128 + Padding(
  129 + padding:
  130 + EdgeInsets.only(bottom: ScreenUtil().setWidth(25)),
  131 + child: Text(
  132 + 'dfdsgdfgdksgsdkghjksdhgjskdhgjsdhgsjkhdgfjksdhgsdjfdgg\nhsdfgjgsjgdhsddhfghdgjsgjdg',
  133 + style: TextStyle(
  134 + color: MyColours.color_999999,
  135 + fontSize: ScreenUtil().setSp(30)),
  136 + )),
  137 + Padding(
  138 + padding: EdgeInsets.symmetric(
  139 + vertical: ScreenUtil().setWidth(25),
  140 + ),
  141 + child: Row(
  142 + crossAxisAlignment: CrossAxisAlignment.center,
  143 + children: [
  144 + Text(
  145 + '总客户人数',
  146 + style: TextStyle(
  147 + color: MyColours.color_333333,
  148 + fontSize: ScreenUtil().setSp(30)),
  149 + ),
  150 + Spacer(),
  151 + Text('55人',
  152 + style: TextStyle(
  153 + color: MyColours.color_333333,
  154 + fontSize: ScreenUtil().setSp(30))),
  155 + HEmptyView(10),
  156 + InkWell(
  157 + onTap: () {
  158 + // NavigatorUtil.goMarketingRecordsDetailPage(context);
  159 + },
  160 + child: Text('查看',
  161 + style: TextStyle(
  162 + decoration: TextDecoration.underline,
  163 + color: MyColours.color_199095,
  164 + fontSize: ScreenUtil().setSp(30)))),
  165 + ])),
  166 + RowMultiText(
  167 + '参与经理',
  168 + '5人',
  169 + textColor: MyColours.color_333333,
  170 + bgColor: Color.fromRGBO(246, 248, 250, 1),
  171 + ),
  172 + Padding(
  173 + padding: EdgeInsets.only(
  174 + bottom: ScreenUtil().setWidth(25),
  175 + ),
  176 + child: Wrap(
  177 + spacing: ScreenUtil().setWidth(20),
  178 + runSpacing: ScreenUtil().setWidth(10),
  179 + children: _buildLabelItem([
  180 + 'xx经理已完成',
  181 + 'xx经理未完成',
  182 + 'dfsdfsf',
  183 + 'ff',
  184 + 'ff',
  185 + 'sfsuhfsuhfiuhfuaihuf'
  186 + ]))),
  187 + ]))),
  188 + RoundButton(
  189 + text: '催促未完成经理',
  190 + gradientStart: MyColours.color_199095,
  191 + gradientEnd: MyColours.color_199095,
  192 + // borderColor: MyColours.color_999999,
  193 + radius: ScreenUtil().setWidth(10),
  194 + height: ScreenUtil().setWidth(80),
  195 + fontSize: 26,
  196 + margin: EdgeInsets.symmetric(
  197 + horizontal: ScreenUtil().setWidth(200)),
  198 + isBold: false,
  199 + onPressed: () {
  200 + // NavigatorUtil.goEnterStoreEnvironmentPage(context);
  201 + },
  202 + ),
  203 + VEmptyView(10),
  204 + RoundButton(
  205 + text: '取消任务',
  206 + gradientStart: MyColours.color_ffffff,
  207 + gradientEnd: MyColours.color_ffffff,
  208 + textColor: MyColours.color_199095,
  209 + // borderColor: MyColours.color_999999,
  210 + radius: ScreenUtil().setWidth(10),
  211 + height: ScreenUtil().setWidth(80),
  212 + fontSize: 26,
  213 + margin: EdgeInsets.symmetric(
  214 + horizontal: ScreenUtil().setWidth(200)),
  215 + isBold: false,
  216 + onPressed: () {
  217 + DialogUtil.cupertinoAlertDialog(context,
  218 + title: "取消任务",
  219 + content: "点击确定立即取消任务,已完成的客户经理继续生效",
  220 + lTitle: "返回",
  221 + rTitle: "确定取消", lCallback: () {
  222 + print("返回");
  223 + }, rCallback: () {
  224 + print("确定取消任务");
  225 + });
  226 + },
  227 + ),
  228 + VEmptyView(30),
  229 + ],
  230 + )),
  231 + );
  232 + }
  233 +}
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 2 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/res/colors.dart'; 3 import 'package:one_key/res/colors.dart';
  4 +import 'package:one_key/route/navigator_util.dart';
4 import 'package:one_key/utils/utils.dart'; 5 import 'package:one_key/utils/utils.dart';
5 import 'package:one_key/widgets/h_empty_view.dart'; 6 import 'package:one_key/widgets/h_empty_view.dart';
6 import 'package:one_key/widgets/round_button.dart'; 7 import 'package:one_key/widgets/round_button.dart';
@@ -74,11 +75,15 @@ class _MarketingRecordsPageState extends State<MarketingRecordsPage> { @@ -74,11 +75,15 @@ class _MarketingRecordsPageState extends State<MarketingRecordsPage> {
74 color: MyColours.color_333333, 75 color: MyColours.color_333333,
75 fontSize: ScreenUtil().setSp(26)))), 76 fontSize: ScreenUtil().setSp(26)))),
76 HEmptyView(10), 77 HEmptyView(10),
77 - Text('查看详情',  
78 - style: TextStyle(  
79 - decoration: TextDecoration.underline,  
80 - color: MyColours.color_199095,  
81 - fontSize: ScreenUtil().setSp(26))), 78 + InkWell(
  79 + onTap: () {
  80 + NavigatorUtil.goMarketingRecordsDetailPage(context);
  81 + },
  82 + child: Text('查看详情',
  83 + style: TextStyle(
  84 + decoration: TextDecoration.underline,
  85 + color: MyColours.color_199095,
  86 + fontSize: ScreenUtil().setSp(26)))),
82 ], 87 ],
83 )); 88 ));
84 }), 89 }),
@@ -540,4 +540,18 @@ class NavigatorUtil { @@ -540,4 +540,18 @@ class NavigatorUtil {
540 return _navigateTo(context, "${Routes.marketing_records_page}", 540 return _navigateTo(context, "${Routes.marketing_records_page}",
541 replace: replace); 541 replace: replace);
542 } 542 }
  543 +
  544 + /// 全店营销记录详情
  545 + static Future<dynamic> goMarketingRecordsDetailPage(BuildContext context,
  546 + {replace = false}) {
  547 + return _navigateTo(context, "${Routes.marketing_records_detail_page}",
  548 + replace: replace);
  549 + }
  550 +
  551 + /// 创建营销
  552 + static Future<dynamic> goMakeMarkingPage(BuildContext context,
  553 + {replace = false}) {
  554 + return _navigateTo(context, "${Routes.make_marketing_page}",
  555 + replace: replace);
  556 + }
543 } 557 }
@@ -41,6 +41,8 @@ import 'package:one_key/pages/login/web_page.dart'; @@ -41,6 +41,8 @@ import 'package:one_key/pages/login/web_page.dart';
41 import 'package:one_key/pages/message/message_order_menu.dart'; 41 import 'package:one_key/pages/message/message_order_menu.dart';
42 import 'package:one_key/pages/my/customer_type/customer_list_page.dart'; 42 import 'package:one_key/pages/my/customer_type/customer_list_page.dart';
43 import 'package:one_key/pages/my/customer_type/customer_setting_page.dart'; 43 import 'package:one_key/pages/my/customer_type/customer_setting_page.dart';
  44 +import 'package:one_key/pages/my/customer_type/make_marking_page.dart';
  45 +import 'package:one_key/pages/my/customer_type/marketing_records_detail_page.dart';
44 import 'package:one_key/pages/my/customer_type/marketing_records_page.dart'; 46 import 'package:one_key/pages/my/customer_type/marketing_records_page.dart';
45 import 'package:one_key/pages/my/customer_type/store_customer_page.dart'; 47 import 'package:one_key/pages/my/customer_type/store_customer_page.dart';
46 import 'package:one_key/pages/my/personnel_type/personnel_detail_page.dart'; 48 import 'package:one_key/pages/my/personnel_type/personnel_detail_page.dart';
@@ -851,3 +853,19 @@ var marketingRecordsPageHandle = new Handler( @@ -851,3 +853,19 @@ var marketingRecordsPageHandle = new Handler(
851 return ChangeNotifierProvider<CustomerProvider>( 853 return ChangeNotifierProvider<CustomerProvider>(
852 create: (_) => CustomerProvider(), child: MarketingRecordsPage()); 854 create: (_) => CustomerProvider(), child: MarketingRecordsPage());
853 }); 855 });
  856 +
  857 +///全店营销记录详情
  858 +var marketingRecordsDetailPageHandle = new Handler(
  859 + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
  860 + // String idstr = params["idstr"].first;
  861 + return ChangeNotifierProvider<CustomerProvider>(
  862 + create: (_) => CustomerProvider(), child: MarketingRecordsDetailPage());
  863 +});
  864 +
  865 +///创建营销
  866 +var makeMarkingPageHandle = new Handler(
  867 + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
  868 + // String idstr = params["idstr"].first;
  869 + return ChangeNotifierProvider<CustomerProvider>(
  870 + create: (_) => CustomerProvider(), child: MakeMarkingPage());
  871 +});
@@ -71,6 +71,11 @@ class Routes { @@ -71,6 +71,11 @@ class Routes {
71 static String customer_list_page = "/customer_list_page"; //客情列表 71 static String customer_list_page = "/customer_list_page"; //客情列表
72 static String customer_set_page = "/customer_set_page"; //客情设置 72 static String customer_set_page = "/customer_set_page"; //客情设置
73 static String marketing_records_page = "/marketing_records_page"; //全店营销记录 73 static String marketing_records_page = "/marketing_records_page"; //全店营销记录
  74 + static String marketing_records_detail_page =
  75 + "/marketing_records_detail_page"; //全店营销记录详情
  76 + static String make_marketing_page =
  77 + "/make_marketing_page"; //创建营销
  78 +
74 79
75 static void configureRoutes(FluroRouter router) { 80 static void configureRoutes(FluroRouter router) {
76 router.notFoundHandler = new Handler( 81 router.notFoundHandler = new Handler(
@@ -150,6 +155,11 @@ class Routes { @@ -150,6 +155,11 @@ class Routes {
150 router.define(customer_list_page, handler: customerListPageHandle); 155 router.define(customer_list_page, handler: customerListPageHandle);
151 router.define(customer_set_page, handler: customerSettingPageHandle); 156 router.define(customer_set_page, handler: customerSettingPageHandle);
152 router.define(marketing_records_page, handler: marketingRecordsPageHandle); 157 router.define(marketing_records_page, handler: marketingRecordsPageHandle);
153 - 158 + router.define(marketing_records_detail_page,
  159 + handler: marketingRecordsDetailPageHandle);
  160 + router.define(make_marketing_page,
  161 + handler: makeMarkingPageHandle);
  162 +
  163 +
154 } 164 }
155 } 165 }
@@ -7,16 +7,16 @@ class RowMultiText extends StatelessWidget { @@ -7,16 +7,16 @@ class RowMultiText extends StatelessWidget {
7 final String content; 7 final String content;
8 final TextAlign textAlign; 8 final TextAlign textAlign;
9 final Color textColor; 9 final Color textColor;
10 - 10 + final Color bgColor;
11 RowMultiText(this.title, this.content, 11 RowMultiText(this.title, this.content,
12 {this.textAlign = TextAlign.right, 12 {this.textAlign = TextAlign.right,
13 - this.textColor = MyColours.color_828282}); 13 + this.textColor = MyColours.color_828282,
  14 + this.bgColor = MyColours.color_ffffff});
14 15
15 @override 16 @override
16 Widget build(BuildContext context) { 17 Widget build(BuildContext context) {
17 - // TODO: implement build  
18 return Container( 18 return Container(
19 - color: MyColours.color_ffffff, 19 + color: bgColor,
20 width: double.infinity, 20 width: double.infinity,
21 padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(25)), 21 padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(25)),
22 alignment: Alignment.center, 22 alignment: Alignment.center,