Commit 15fc40aba6c21f8058b369e2315384dc1003ba11

Authored by wdn127929
1 parent 4553bfc9

存酒设置

@@ -18,19 +18,19 @@ if (flutterRoot == null) { @@ -18,19 +18,19 @@ if (flutterRoot == null) {
18 18
19 19
20 20
21 -def flutterVersionCode = "520" 21 +def flutterVersionCode = "529"
22 if (flutterVersionCode == null) { 22 if (flutterVersionCode == null) {
23 - flutterVersionCode = '520' 23 + flutterVersionCode = '529'
24 24
25 25
26 26
27 } 27 }
28 28
29 29
30 -def flutterVersionName = "5.2.0" 30 +def flutterVersionName = "5.2.9"
31 31
32 if (flutterVersionName == null) { 32 if (flutterVersionName == null) {
33 - flutterVersionName = '5.2.0' 33 + flutterVersionName = '5.2.9'
34 34
35 35
36 } 36 }
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  3 +import 'package:one_key/widgets/system_app_bar.dart';
  4 +
  5 +import '../../../res/colors.dart';
  6 +import '../../../utils/screen_util.dart';
  7 +
  8 +class WineSettingMsgPage extends StatefulWidget {
  9 + const WineSettingMsgPage();
  10 +
  11 + @override
  12 + State<WineSettingMsgPage> createState() => _WineSettingMsgPageState();
  13 +}
  14 +
  15 +class _WineSettingMsgPageState extends State<WineSettingMsgPage> {
  16 + String contentChangeStart = '尊敬的@var(clientname),您好!您的酒水@var(beveragename)已经在我店存放@var(days)了。点击这里编辑您的短信内容。上面的文字时固定不可编辑的。';
  17 + TextEditingController controller = TextEditingController();
  18 +
  19 +
  20 + @override
  21 + Widget build(BuildContext context) {
  22 + return Scaffold(
  23 + appBar: SystemAppBar('fff'),
  24 + body: SingleChildScrollView(child:
  25 + Column(children: [
  26 + Container(
  27 + width: double.infinity,
  28 + padding: EdgeInsets.all(w(10)),
  29 + margin: EdgeInsets.symmetric(horizontal: w(16)),
  30 + decoration: BoxDecoration(
  31 + border: Border.all(
  32 + color: MyColours.color_DBDBDB, width: w(1)),
  33 + borderRadius: BorderRadius.circular(r(8))),
  34 + child: Column(
  35 + crossAxisAlignment: CrossAxisAlignment.start,
  36 + children: [
  37 +
  38 + Text(
  39 + contentChangeStart,
  40 + style: TextStyle(
  41 + height: 1.5,
  42 + color: MyColours.color_66000000,
  43 + fontSize: font(14)),
  44 + ),
  45 + TextField(
  46 + enabled: true,
  47 + controller: controller,
  48 + // textAlign: TextAlign.right,
  49 + // textAlignVertical: TextAlignVertical.bottom,
  50 + maxLines: 10,
  51 +
  52 + // inputFormatters: title == '金额'
  53 + // ? [
  54 + // FilteringTextInputFormatter(RegExp("[0-9.]"),
  55 + // allow: true),
  56 + // MyNumberTextInputFormatter(digit: 2),
  57 + // ]
  58 + // : [],
  59 +
  60 + // //光标颜色
  61 + // cursorColor:
  62 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  63 + //输入文本的样式
  64 + style: TextStyle(
  65 + fontSize: ScreenUtil().setSp(28),
  66 + color: MyColours.color_515151),
  67 + // focusNode: focusNode,
  68 + decoration: InputDecoration(
  69 + border:
  70 + OutlineInputBorder(borderSide: BorderSide.none),
  71 + hintText:
  72 + '以上内容为固定不可编辑,点击这里开始编辑短信内容' ,
  73 + hintStyle: TextStyle(
  74 + color: MyColours.color_999999,
  75 + fontSize: ScreenUtil().setSp(28),
  76 + ),
  77 + contentPadding: EdgeInsets.zero,
  78 + ),
  79 + onChanged: (value) {
  80 + //添加的代码:光标一直在文本框后面
  81 + // controller.value = TextEditingValue(
  82 + // text: controller.text,
  83 + // selection:
  84 + // TextSelection.fromPosition(TextPosition(
  85 + // affinity: TextAffinity.downstream,
  86 + // offset: controller.text.length,
  87 + // )));
  88 + // setState(() {
  89 + // _cursorPosition = controller.selection.baseOffset;
  90 + // });
  91 + },
  92 + onEditingComplete: () {
  93 + FocusScope.of(context)
  94 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  95 + },
  96 + // keyboardType: inputType,
  97 + )
  98 + ],
  99 + ),
  100 + ),
  101 + ],),),
  102 + );
  103 + }
  104 +}
@@ -9,6 +9,7 @@ import 'package:one_key/utils/utils.dart'; @@ -9,6 +9,7 @@ import 'package:one_key/utils/utils.dart';
9 import 'package:one_key/widgets/MyDivider.dart'; 9 import 'package:one_key/widgets/MyDivider.dart';
10 import 'package:one_key/widgets/round_button.dart'; 10 import 'package:one_key/widgets/round_button.dart';
11 import 'package:one_key/widgets/system_app_bar.dart'; 11 import 'package:one_key/widgets/system_app_bar.dart';
  12 +import 'package:one_key/widgets/v_empty_view.dart';
12 import 'package:provider/provider.dart'; 13 import 'package:provider/provider.dart';
13 14
14 import '../../../provider/user_model.dart'; 15 import '../../../provider/user_model.dart';
@@ -30,6 +31,9 @@ class _WineSettingPageState extends State<WineSettingPage> { @@ -30,6 +31,9 @@ class _WineSettingPageState extends State<WineSettingPage> {
30 TextEditingController dayC = TextEditingController(); 31 TextEditingController dayC = TextEditingController();
31 FocusNode dayF = FocusNode(); 32 FocusNode dayF = FocusNode();
32 bool swich = true; 33 bool swich = true;
  34 +
  35 + bool swichNotice = true; //推送消息
  36 + bool swichMsg = true; //发短信
33 MenuManageProvider menuManageProvider; 37 MenuManageProvider menuManageProvider;
34 38
35 @override 39 @override
@@ -254,6 +258,100 @@ class _WineSettingPageState extends State<WineSettingPage> { @@ -254,6 +258,100 @@ class _WineSettingPageState extends State<WineSettingPage> {
254 inputType: 258 inputType:
255 TextInputType.numberWithOptions(decimal: true))), 259 TextInputType.numberWithOptions(decimal: true))),
256 _divider(), 260 _divider(),
  261 + VEmptyView(20),
  262 + InkWell(
  263 + onTap: () {
  264 + setState(() {
  265 + swichNotice = !swichNotice;
  266 + });
  267 + },
  268 + child: Container(
  269 + height: w(48),
  270 + padding: EdgeInsets.only(left: w(30), right: w(26)),
  271 + child: Row(
  272 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  273 + children: [
  274 + Text(
  275 + '存酒超期时发送超期消息',
  276 + style: TextStyle(
  277 + fontSize: font(16),
  278 + color: MyColours.color_515151),
  279 + ),
  280 + Image.asset(
  281 + Utils.getImgPath(
  282 + swichNotice ? 'swich_on' : 'swich_off'),
  283 + width: w(44),
  284 + )
  285 + ],
  286 + ),
  287 + )),
  288 + Padding(
  289 + padding: EdgeInsets.only(left: w(15), right: w(10)),
  290 + child: _divider(),
  291 + ),
  292 + VEmptyView(20),
  293 + InkWell(
  294 + onTap: () {
  295 + setState(() {
  296 + swichMsg = !swichMsg;
  297 + });
  298 + },
  299 + child: Container(
  300 + height: w(48),
  301 + padding: EdgeInsets.only(left: w(30), right: w(26)),
  302 + child: Row(
  303 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  304 + children: [
  305 + Text(
  306 + '存酒超期时自动给客户发送短信',
  307 + style: TextStyle(
  308 + fontSize: font(16),
  309 + color: MyColours.color_515151),
  310 + ),
  311 + Image.asset(
  312 + Utils.getImgPath(
  313 + swichMsg ? 'swich_on' : 'swich_off'),
  314 + width: w(44),
  315 + )
  316 + ],
  317 + ),
  318 + )),
  319 + Padding(
  320 + padding: EdgeInsets.only(left: w(15), right: w(10)),
  321 + child: _divider(),
  322 + ),
  323 + VEmptyView(20),
  324 + InkWell(
  325 + onTap: () {
  326 + // NavigatorUtil.goSmsTemplateSettingPage(
  327 + // context, smsTemplate, bookinginfo);
  328 + },
  329 + child: Container(
  330 + height: w(48),
  331 + padding: EdgeInsets.only(left: w(30), right: w(26)),
  332 + child: Row(
  333 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  334 + children: [
  335 + Text(
  336 + '存酒超期通知短信设置',
  337 + style: TextStyle(
  338 + color: MyColours.color_515151,
  339 + fontSize: font(16)),
  340 + ),
  341 + Container(
  342 + padding: EdgeInsets.symmetric(
  343 + horizontal: w(11), vertical: w(4)),
  344 + child: Image.asset(
  345 + "assets/arrow_right_new.png",
  346 + width: w(9),
  347 + height: w(16),
  348 + ),
  349 + )
  350 + ]))),
  351 + Padding(
  352 + padding: EdgeInsets.only(left: w(15), right: w(10)),
  353 + child: _divider(),
  354 + ),
257 ], 355 ],
258 )), 356 )),
259 ), 357 ),