Commit b4860752f480cde03843f0f63898ff7a381c48e6

Authored by weixin_45529955
1 parent 159b689f

我的页面UI调整 && 部分新增消费金功能 准备发版 调整

... ... @@ -156,40 +156,40 @@ class _ConsumeHomePageState extends State<ConsumeHomePage> {
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(24),
InkWell(
onTap: () {
//
},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(12),
right: w(12)),
child: Row(
children: [
Text(
'客户裂变设置',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setWidth(32)),
),
Spacer(),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(7), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: ScreenUtil().setWidth(18),
height: ScreenUtil().setWidth(32),
),
)
],
))),
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
// InkWell(
// onTap: () {
// //
// },
// child: Padding(
// padding: EdgeInsets.only(
// left: w(16),
// top: w(12),
// bottom: w(12),
// right: w(12)),
// child: Row(
// children: [
// Text(
// '客户裂变设置',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setWidth(32)),
// ),
// Spacer(),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: w(7), vertical: w(4)),
// child: Image.asset(
// "assets/arrow_right_new.png",
// width: ScreenUtil().setWidth(18),
// height: ScreenUtil().setWidth(32),
// ),
// )
// ],
// ))),
// Padding(
// padding: EdgeInsets.only(left: w(16)),
// child: MyDivider(double.infinity, w(0.5),
// color: MyColours.color_E7E7E7)),
],
),
)),
... ...
... ... @@ -67,35 +67,50 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
children: [
InkWell(
onTap: () async {
if (userModel.user?.role_name == '管理员' ||
userModel.user?.role_name == '店长') {
if (Utils.getAuthority(context, '全店客情')) {
if (widget.sellerNormalSpecial) {
//标准版
// if (userModel.user?.role_name == '管理员' ||
// userModel.user?.role_name == '店长') {
// if (Utils.getAuthority(context, '全店客情')) {
// if (widget.sellerNormalSpecial) {
// //标准版
if (widget.sellerPreserve ||
widget.sellerMarketing) {
NavigatorUtil.goCustomerStatisticsPage(context);
} else {
NavigatorUtil.goCustomerListPageSim(context);
}
} else {
NavigatorUtil.goCustomerStatisticsPage(context);
}
}
} else {
if (Utils.getAuthority(context, '我的客情')) {
if (widget.sellerNormalSpecial) {
//标准版
if (widget.sellerPreserve ||
widget.sellerMarketing) {
NavigatorUtil.goMyCustomerPage(context);
} else {
NavigatorUtil.goMyCustomerListPageSim(context);
}
// if (widget.sellerPreserve ||
// widget.sellerMarketing) {
// NavigatorUtil.goCustomerStatisticsPage(context);
// } else {
// NavigatorUtil.goCustomerListPageSim(context);
// }
// } else {
// NavigatorUtil.goCustomerStatisticsPage(context);
// }
// }
// } else {
// if (Utils.getAuthority(context, '我的客情')) {
// if (widget.sellerNormalSpecial) {
// //标准版
// if (widget.sellerPreserve ||
// widget.sellerMarketing) {
// NavigatorUtil.goMyCustomerPage(context);
// } else {
// NavigatorUtil.goMyCustomerListPageSim(context);
// }
// } else {
// NavigatorUtil.goMyCustomerPage(context);
// }
// }
// }
if (Utils.getAuthority(context, '全店客情')) {
if (widget.sellerNormalSpecial) {
//标准版
if (widget.sellerPreserve ||
widget.sellerMarketing) {
NavigatorUtil.goStoreCustomerPage(context);
} else {
NavigatorUtil.goMyCustomerPage(context);
NavigatorUtil.goCustomerListPageSim(context);
}
} else {
NavigatorUtil.goStoreCustomerPage(context);
}
}
},
... ... @@ -108,7 +123,7 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
child: Row(
children: [
Text(
'客户汇总',
'全店客情',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setWidth(32)),
... ... @@ -132,35 +147,49 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
VEmptyView(24),
InkWell(
onTap: () {
if (userModel.user?.role_name == '管理员' ||
userModel.user?.role_name == '店长') {
if (Utils.getAuthority(context, '全店客情')) {
if (widget.sellerNormalSpecial) {
//标准版
// if (userModel.user?.role_name == '管理员' ||
// userModel.user?.role_name == '店长') {
// if (Utils.getAuthority(context, '全店客情')) {
// if (widget.sellerNormalSpecial) {
// //标准版
if (widget.sellerPreserve ||
widget.sellerMarketing) {
NavigatorUtil.goStoreCustomerPage(context);
} else {
NavigatorUtil.goCustomerListPageSim(context);
}
} else {
NavigatorUtil.goStoreCustomerPage(context);
}
}
} else {
if (Utils.getAuthority(context, '我的客情')) {
if (widget.sellerNormalSpecial) {
//标准版
if (widget.sellerPreserve ||
widget.sellerMarketing) {
NavigatorUtil.goMyCustomerPage(context);
} else {
NavigatorUtil.goMyCustomerListPageSim(context);
}
} else {
// if (widget.sellerPreserve ||
// widget.sellerMarketing) {
// NavigatorUtil.goStoreCustomerPage(context);
// } else {
// NavigatorUtil.goCustomerListPageSim(context);
// }
// } else {
// NavigatorUtil.goStoreCustomerPage(context);
// }
// }
// } else {
// if (Utils.getAuthority(context, '我的客情')) {
// if (widget.sellerNormalSpecial) {
// //标准版
// if (widget.sellerPreserve ||
// widget.sellerMarketing) {
// NavigatorUtil.goMyCustomerPage(context);
// } else {
// NavigatorUtil.goMyCustomerListPageSim(context);
// }
// } else {
// NavigatorUtil.goMyCustomerPage(context);
// }
// }
// }
if (Utils.getAuthority(context, '我的客情')) {
if (widget.sellerNormalSpecial) {
//标准版
if (widget.sellerPreserve ||
widget.sellerMarketing) {
NavigatorUtil.goMyCustomerPage(context);
} else {
NavigatorUtil.goMyCustomerListPageSim(context);
}
} else {
NavigatorUtil.goMyCustomerPage(context);
}
}
},
... ... @@ -173,7 +202,7 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
child: Row(
children: [
Text(
'客户列表',
'我的客情',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setWidth(32)),
... ... @@ -195,42 +224,42 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(24),
InkWell(
onTap: () {
//
// InkWell(
// onTap: () {
// //
NavigatorUtil.goCustomLabelPage(context);
},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(12),
right: w(12)),
child: Row(
children: [
Text(
'客户自定义标签',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setWidth(32)),
),
Spacer(),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(7), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: ScreenUtil().setWidth(18),
height: ScreenUtil().setWidth(32),
),
)
],
))),
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
// NavigatorUtil.goCustomLabelPage(context);
// },
// child: Padding(
// padding: EdgeInsets.only(
// left: w(16),
// top: w(12),
// bottom: w(12),
// right: w(12)),
// child: Row(
// children: [
// Text(
// '客户自定义标签',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setWidth(32)),
// ),
// Spacer(),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: w(7), vertical: w(4)),
// child: Image.asset(
// "assets/arrow_right_new.png",
// width: ScreenUtil().setWidth(18),
// height: ScreenUtil().setWidth(32),
// ),
// )
// ],
// ))),
// Padding(
// padding: EdgeInsets.only(left: w(16)),
// child: MyDivider(double.infinity, w(0.5),
// color: MyColours.color_E7E7E7)),
],
),
)),
... ...
... ... @@ -62,7 +62,7 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
// EventBus().emit('changeStatusColor');
bus.off('refresh_my_customer_home');
// bus.off("refresh_coupon_list");
super.dispose();
... ...
import 'package:flutter/material.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/screen_util.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/round_button.dart';
... ... @@ -148,6 +149,7 @@ class _BalanceDetailsPageState extends State<BalanceDetailsPage> {
radius: r(5),
onPressed: () {
//
DialogUtil.showRechargeDialog(context, '充值余额', (value) {});
},
),
HEmptyView(20),
... ...
... ... @@ -56,7 +56,7 @@ class _StoreCustomerHomePageState extends State<StoreCustomerHomePage>
@override
void dispose() {
EventBus().emit('changeStatusColor');
// EventBus().emit('changeStatusColor');
super.dispose();
}
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/event_bus.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import '../../../res/colors.dart';
... ... @@ -20,6 +21,12 @@ class FinanceManageHomePage extends StatefulWidget {
}
class _FinanceManageHomePageState extends State<FinanceManageHomePage> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
super.dispose();
}
///时间选择
Widget _item(String title, GestureTapCallback onTap) {
return InkWell(
... ...
... ... @@ -374,39 +374,39 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> {
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(24),
InkWell(
onTap: () {},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(12),
right: w(12)),
child: Row(
children: [
Text(
'沉睡/流失客户唤醒营销设置',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setWidth(32)),
),
Spacer(),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(7), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: ScreenUtil().setWidth(18),
height: ScreenUtil().setWidth(32),
),
)
],
))),
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(24),
// InkWell(
// onTap: () {},
// child: Padding(
// padding: EdgeInsets.only(
// left: w(16),
// top: w(12),
// bottom: w(12),
// right: w(12)),
// child: Row(
// children: [
// Text(
// '沉睡/流失客户唤醒营销设置',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setWidth(32)),
// ),
// Spacer(),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: w(7), vertical: w(4)),
// child: Image.asset(
// "assets/arrow_right_new.png",
// width: ScreenUtil().setWidth(18),
// height: ScreenUtil().setWidth(32),
// ),
// )
// ],
// ))),
// Padding(
// padding: EdgeInsets.only(left: w(16)),
// child: MyDivider(double.infinity, w(0.5),
// color: MyColours.color_E7E7E7)),
// VEmptyView(24),
// InkWell(
// onTap: () {
// NavigatorUtil.goPaymentSettingPage(context);
... ...
... ... @@ -56,8 +56,7 @@ class _RechargeFirstHomePageState extends State<RechargeFirstHomePage> {
InkWell(
onTap: () async {
//
NavigatorUtil.goRechargeHomePage(
context);
NavigatorUtil.goRechargeHomePage(context);
},
child: Padding(
padding: EdgeInsets.only(
... ... @@ -90,41 +89,41 @@ class _RechargeFirstHomePageState extends State<RechargeFirstHomePage> {
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(24),
InkWell(
onTap: () {
//
NavigatorUtil.goPaymentSettingPage(context);
},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(12),
right: w(12)),
child: Row(
children: [
Text(
'店铺充值记录',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setWidth(32)),
),
Spacer(),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(7), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: ScreenUtil().setWidth(18),
height: ScreenUtil().setWidth(32),
),
)
],
))),
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
// InkWell(
// onTap: () {
// //
// NavigatorUtil.goPaymentSettingPage(context);
// },
// child: Padding(
// padding: EdgeInsets.only(
// left: w(16),
// top: w(12),
// bottom: w(12),
// right: w(12)),
// child: Row(
// children: [
// Text(
// '店铺充值记录',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setWidth(32)),
// ),
// Spacer(),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: w(7), vertical: w(4)),
// child: Image.asset(
// "assets/arrow_right_new.png",
// width: ScreenUtil().setWidth(18),
// height: ScreenUtil().setWidth(32),
// ),
// )
// ],
// ))),
// Padding(
// padding: EdgeInsets.only(left: w(16)),
// child: MyDivider(double.infinity, w(0.5),
// color: MyColours.color_E7E7E7)),
],
),
)),
... ...
... ... @@ -1450,13 +1450,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
child: _item(
outDay == '0' ||
!Utils.getAuthority(
context, '客户管理')
context, '我的客情')
? Utils.getImgPath('yhgl_un')
: Utils.getImgPath('yhgl'),
'客户管理',
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '客户管理'))),
context, '我的客情'))),
// InkWell(
// onTap: () async {
// if (outDay == '0') {
... ...
... ... @@ -232,10 +232,12 @@ class _MyPlanDishHomePageState extends State<MyPlanDishHomePage>
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RoundButton(
Expanded(
child: RoundButton(
text: '创建新排菜',
width: w(105),
// width: w(105),
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(14),
isBold: false,
... ... @@ -269,91 +271,91 @@ class _MyPlanDishHomePageState extends State<MyPlanDishHomePage>
}
}
},
),
HEmptyView(20),
Expanded(
child: RoundButton(
text: '生成二维码',
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(14),
gradientStart: tabController?.index == 1 &&
!Utils.getAuthority(context, '生成二维码')
? MyColours.color_ffffff
: MyColours.color_ffffff,
gradientEnd: tabController?.index == 1 &&
!Utils.getAuthority(context, '生成二维码')
? MyColours.color_ffffff
: MyColours.color_ffffff,
fontSize: 28,
textColor: MyColours.color_199095,
borderColor: MyColours.color_199095,
onPressed: () async {
// UserModel userModel =
// Provider.of<UserModel>(context, listen: false);
if (!(tabController?.index == 1 &&
!Utils.getAuthority(context, '生成二维码'))) {
if (Utils.getAuthority(context, '生成二维码')) {
bool? needRefresh =
await NavigatorUtil.goPlanDishQrcodePage(
context,
);
} else {
bool? needRefresh =
await NavigatorUtil.goPlanDishQrcodePage(
context,
);
print(needRefresh);
if (needRefresh != null && needRefresh) {
// bus.emit('refresh_coupon_list_f');
//刷新页面数据
// _controller.callRefresh();
// _couponNetworkData(tabController.index);
}
}
}
},
)),
HEmptyView(20),
Expanded(
child: RoundButton(
text: '分享给客户',
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(14),
gradientStart: tabController?.index == 1 &&
!Utils.getAuthority(context, '创建新排菜')
? MyColours.color_ffffff
: MyColours.color_ffffff,
gradientEnd: tabController?.index == 1 &&
!Utils.getAuthority(context, '创建新排菜')
? MyColours.color_ffffff
: MyColours.color_ffffff,
fontSize: 28,
textColor: MyColours.color_199095,
borderColor: MyColours.color_199095,
onPressed: () async {
// UserModel userModel =
// Provider.of<UserModel>(context, listen: false);
if (!(tabController?.index == 1 &&
!Utils.getAuthority(context, '创建新排菜'))) {
if (Utils.getAuthority(context, '创建新排菜')) {
NavigatorUtil.goPlanDishCreateSelectTypePage(
context);
} else {
bool? needRefresh =
await NavigatorUtil.goPlanDishEditPage(context,
isMine: true, isEdit: true);
print(needRefresh);
if (needRefresh != null && needRefresh) {
// bus.emit('refresh_coupon_list_f');
//刷新页面数据
// _controller.callRefresh();
// _couponNetworkData(tabController.index);
}
}
}
},
),
)
// HEmptyView(20),
// Expanded(
// child: RoundButton(
// text: '生成二维码',
// height: ScreenUtil().setWidth(80),
// radius: ScreenUtil().setWidth(14),
// gradientStart: tabController?.index == 1 &&
// !Utils.getAuthority(context, '生成二维码')
// ? MyColours.color_ffffff
// : MyColours.color_ffffff,
// gradientEnd: tabController?.index == 1 &&
// !Utils.getAuthority(context, '生成二维码')
// ? MyColours.color_ffffff
// : MyColours.color_ffffff,
// fontSize: 28,
// textColor: MyColours.color_199095,
// borderColor: MyColours.color_199095,
// onPressed: () async {
// // UserModel userModel =
// // Provider.of<UserModel>(context, listen: false);
// if (!(tabController?.index == 1 &&
// !Utils.getAuthority(context, '生成二维码'))) {
// if (Utils.getAuthority(context, '生成二维码')) {
// bool? needRefresh =
// await NavigatorUtil.goPlanDishQrcodePage(
// context,
// );
// } else {
// bool? needRefresh =
// await NavigatorUtil.goPlanDishQrcodePage(
// context,
// );
// print(needRefresh);
// if (needRefresh != null && needRefresh) {
// // bus.emit('refresh_coupon_list_f');
// //刷新页面数据
// // _controller.callRefresh();
// // _couponNetworkData(tabController.index);
// }
// }
// }
// },
// )),
// HEmptyView(20),
// Expanded(
// child: RoundButton(
// text: '分享给客户',
// height: ScreenUtil().setWidth(80),
// radius: ScreenUtil().setWidth(14),
// gradientStart: tabController?.index == 1 &&
// !Utils.getAuthority(context, '创建新排菜')
// ? MyColours.color_ffffff
// : MyColours.color_ffffff,
// gradientEnd: tabController?.index == 1 &&
// !Utils.getAuthority(context, '创建新排菜')
// ? MyColours.color_ffffff
// : MyColours.color_ffffff,
// fontSize: 28,
// textColor: MyColours.color_199095,
// borderColor: MyColours.color_199095,
// onPressed: () async {
// // UserModel userModel =
// // Provider.of<UserModel>(context, listen: false);
// if (!(tabController?.index == 1 &&
// !Utils.getAuthority(context, '创建新排菜'))) {
// if (Utils.getAuthority(context, '创建新排菜')) {
// NavigatorUtil.goPlanDishCreateSelectTypePage(
// context);
// } else {
// bool? needRefresh =
// await NavigatorUtil.goPlanDishEditPage(context,
// isMine: true, isEdit: true);
// print(needRefresh);
// if (needRefresh != null && needRefresh) {
// // bus.emit('refresh_coupon_list_f');
// //刷新页面数据
// // _controller.callRefresh();
// // _couponNetworkData(tabController.index);
// }
// }
// }
// },
// ),
// )
],
))
],
... ...
import 'dart:async';
import 'dart:convert';
import 'dart:ui';
import 'package:cached_network_image/cached_network_image.dart';
... ... @@ -13,30 +14,27 @@ import 'package:flutter_lunar_datetime_picker/flutter_lunar_datetime_picker.dart
import 'package:flutter_picker_plus/flutter_picker_plus.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/constant/constant.dart';
import 'package:one_key/models/filter_btn_model.dart';
import 'package:one_key/models/remark.dart';
import 'package:one_key/models/seller_role_model.dart';
import 'package:one_key/models/table_list.dart';
import 'package:one_key/pages/message/message_dialog_item.dart';
import 'package:one_key/pages/message/message_dialog_item_f.dart';
import 'package:one_key/provider/message_dialog_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/NumLengthInputFormatter.dart';
import 'package:one_key/utils/misc.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/pick_date_nonli_gongli/lunar_calendar_util.dart';
import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_day.dart';
import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_month.dart';
import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_year.dart';
import 'package:one_key/utils/screen_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/table_item.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import 'package:table_calendar/table_calendar.dart';
... ... @@ -56,10 +54,9 @@ import '../models/seller_version_model.dart';
import '../models/table_or_reserve_model.dart';
import '../models/theme_color_model.dart';
import '../models/titlte_type_model.dart';
import '../pages/my/marketing_center/theme_model.dart';
import '../provider/collect_store_provider.dart';
import 'package:flutter_lunar_datetime_picker/flutter_lunar_datetime_picker.dart';
import 'package:flutter_lunar_datetime_picker/datetime_picker_theme.dart'
as picker_theme;
... ... @@ -1545,6 +1542,312 @@ class DialogUtil {
}));
});
}
static rechargeItem(context, String title, String subTitle) {
return Row(
children: [
Container(
child: Text(title,
style: TextStyle(
color: MyColours.color_515151, fontSize: font(14)))),
HEmptyView(32),
Expanded(
child: InkWell(
onTap: () {},
child: Container(
height: w(40),
padding: EdgeInsets.symmetric(horizontal: w(12)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(10)),
border: Border.all(
width: w(0.5), color: MyColours.color_CBCBCB)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: TextField(
// controller: controller,
textAlign: TextAlign.left,
textAlignVertical: TextAlignVertical.bottom,
maxLines: 1,
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
// inputFormatters: title ==
// '券名称'
// ? [
// LengthLimitingTextInputFormatter(
// 15)
// ]
// : title == '领取后有效天数' ||
// title ==
// '发放总量限制'
// ? [
// FilteringTextInputFormatter
// .digitsOnly
// ]
// : title == '券金额' ||
// title ==
// '分享佣金' ||
// title ==
// '消费要求(0为无门槛)'
// ? [
// FilteringTextInputFormatter.allow(
// RegExp("[0-9.]")),
// ]
// : [], // 限制输入为数字,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28),
),
// focusNode: focusNode,
decoration: InputDecoration(
isCollapsed: true,
border: OutlineInputBorder(
borderSide: BorderSide.none),
hintText: '请输入',
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(28),
),
enabledBorder: new UnderlineInputBorder(
borderSide: BorderSide.none,
),
focusedBorder: new UnderlineInputBorder(
borderSide: BorderSide.none,
),
),
onChanged: (value) {},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
})),
Container(
child: Text(subTitle,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(14)))),
],
)),
),
)
],
);
}
///券说明
static Widget rechargeWidget(String title, String hintText,
TextEditingController controller, FocusNode node) {
return Container(
// height: ScreenUtil().setWidth(380),
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(28)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Align(
alignment: Alignment.centerLeft,
child: Text(
title,
textAlign: TextAlign.left,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32)),
)),
VEmptyView(26),
Container(
height: ScreenUtil().setWidth(2),
color: MyColours.color_E7E7E7,
),
TextField(
controller: controller,
focusNode: node,
// keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
maxLines: 3,
maxLength: 150,
// maxLengthEnforced: true,
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_333333), //输入文本的样式
decoration: InputDecoration(
contentPadding:
EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(30)),
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(32),
),
border: OutlineInputBorder(borderSide: BorderSide.none),
enabledBorder: new UnderlineInputBorder(
borderSide: BorderSide.none,
),
focusedBorder: new UnderlineInputBorder(
borderSide: BorderSide.none,
),
// fillColor: MyColours.color_F9F9F9,
// // fillColor: Colors.red,
// filled: true,
// enabledBorder: OutlineInputBorder(
// //未选中时候的颜色
// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
// borderSide: BorderSide(
// color: MyColours.color_cccccc,
// width: ScreenUtil().setWidth(2)),
// ),
// focusedBorder: OutlineInputBorder(
// //选中时外边框颜色
// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
// borderSide: BorderSide(
// color: MyColours.app_main,
// ),
// ),
// border: OutlineInputBorder(
// borderRadius:
// BorderRadius.circular(ScreenUtil().setWidth(20)),
// borderSide: BorderSide(
// color: Colors.red, width: ScreenUtil().setWidth(2))),
),
onChanged: (value) {},
),
],
),
);
}
//余额充值弹框
static showRechargeDialog(
BuildContext context, String title, CustomCallBack callback,
{GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
return showDialog(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return Center(child: StatefulBuilder(builder: (context, state) {
// locationState = state;
return Material(
color: Colors.transparent,
child: Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: w(37)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
r(8),
)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.symmetric(horizontal: w(20)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
VEmptyView(40),
Container(
alignment: Alignment.center,
child: Text('充值余额',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: font(16)))),
VEmptyView(30),
Row(
children: [
Container(
child: Text('充值优惠活动',
style: TextStyle(
color:
MyColours.color_515151,
fontSize: font(14)))),
HEmptyView(32),
Expanded(
child: InkWell(
onTap: () {},
child: Container(
height: w(40),
padding: EdgeInsets.symmetric(
horizontal: w(12)),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
r(10)),
border: Border.all(
width: w(0.5),
color: MyColours
.color_CBCBCB)),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Text('请选择',
style: TextStyle(
color: true
? MyColours
.color_999999
: MyColours
.color_515151,
fontSize:
font(14))),
Image.asset(
Utils.getImgPath(
'c_arrow_down_unsel'),
width: w(17),
)
],
)),
),
)
],
),
VEmptyView(30),
rechargeItem(context, '充值金额', '元'),
VEmptyView(30),
rechargeItem(context, '赠送金额', '元'),
VEmptyView(30),
rechargeItem(context, '赠送积分', '分'),
rechargeWidget('备注', '请输入备注',
TextEditingController(), FocusNode()),
MyDivider(double.infinity, w(1),
color: MyColours.color_DBDBDB),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 1,
child: RoundButton(
text: '确定',
// width: (ScreenUtil().screenWidth -
// ScreenUtil().setWidth(62) * 2) /
// 2,
height:
ScreenUtil().setWidth(112),
// radius: ScreenUtil().setWidth(10),
gradientStart:
Colors.transparent,
gradientEnd: Colors.transparent,
textColor:
MyColours.color_515151,
isBold: false,
fontSize: 32,
onPressed: () {
if (Navigator.canPop(
context)) {
Navigator.pop(context);
}
})),
],
),
]))
])));
}));
});
}
// static showSellerVersionBuyDialog(
// BuildContext context, String title, CustomCallBack callback,
// {GestureTapCallback onTapLeft, GestureTapCallback onTapRight}) {
... ...