|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
|
|
import 'dart:ui';
|
|
|
|
|
|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
...
|
...
|
@@ -14,7 +13,6 @@ 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/models/filter_btn_model.dart';
|
|
|
|
import 'package:one_key/models/remark.dart';
|
|
|
|
import 'package:one_key/models/seller_role_model.dart';
|
|
...
|
...
|
@@ -1641,83 +1639,288 @@ class DialogUtil { |
|
|
|
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,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
margin: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(28)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
border: Border.all(width: w(0.5), color: MyColours.color_CBCBCB)),
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
focusNode: node,
|
|
|
|
// keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
|
|
|
|
maxLines: 3,
|
|
|
|
maxLength: 100,
|
|
|
|
|
|
|
|
// maxLengthEnforced: true,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_333333), //输入文本的样式
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(30)),
|
|
|
|
hintText: hintText,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
border: OutlineInputBorder(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) {},
|
|
|
|
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 showRechargeConfirmDialog(BuildContext context, String title,
|
|
|
|
{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.center,
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('warn'),
|
|
|
|
width: w(30),
|
|
|
|
height: w(30),
|
|
|
|
),
|
|
|
|
VEmptyView(28),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('提示',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)))),
|
|
|
|
VEmptyView(28),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('为客户赵先生 ${title}1000元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)))),
|
|
|
|
VEmptyView(30),
|
|
|
|
])),
|
|
|
|
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: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
})),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
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_438E93,
|
|
|
|
isBold: true,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
])));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//余额退款确认弹框
|
|
|
|
static showRefundConfirmDialog(BuildContext context, String title,
|
|
|
|
{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.center,
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('warn'),
|
|
|
|
width: w(30),
|
|
|
|
height: w(30),
|
|
|
|
),
|
|
|
|
VEmptyView(28),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('提示',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)))),
|
|
|
|
VEmptyView(28),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('为客户赵先生办理余额退款,退款后余额将清零',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))),
|
|
|
|
VEmptyView(12),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('退款金额900元',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(16)))),
|
|
|
|
VEmptyView(12),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('(钱款交易请在线下完成)',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))),
|
|
|
|
VEmptyView(30),
|
|
|
|
])),
|
|
|
|
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: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
})),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
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_438E93,
|
|
|
|
isBold: true,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
])));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//余额充值弹框
|
|
|
|
static showRechargeDialog(
|
|
|
|
BuildContext context, String title, CustomCallBack callback,
|
|
...
|
...
|
@@ -1813,37 +2016,342 @@ class DialogUtil { |
|
|
|
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);
|
|
|
|
}
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
]))
|
|
|
|
])),
|
|
|
|
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: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
})),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
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_438E93,
|
|
|
|
isBold: true,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
showRechargeConfirmDialog(
|
|
|
|
context, '充值金额');
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
])));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//扣除余额弹框
|
|
|
|
static showDeductMoneyDialog(BuildContext context, String title,
|
|
|
|
String subTitle, 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(title,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)))),
|
|
|
|
VEmptyView(30),
|
|
|
|
rechargeItem(context, subTitle, '元'),
|
|
|
|
// VEmptyView(30),
|
|
|
|
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: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
})),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
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_438E93,
|
|
|
|
isBold: true,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
showRechargeConfirmDialog(
|
|
|
|
context, '扣除消费金');
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
])));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//发放消费金弹框
|
|
|
|
static showGiveMoneyDialog(
|
|
|
|
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),
|
|
|
|
rechargeItem(context, '发放金额', '元'),
|
|
|
|
// VEmptyView(30),
|
|
|
|
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: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
})),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
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_438E93,
|
|
|
|
isBold: true,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
showRechargeConfirmDialog(
|
|
|
|
context, '发放消费金');
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
])));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//退款余额弹框
|
|
|
|
static showRefundDialog(
|
|
|
|
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),
|
|
|
|
rechargeItem(context, '顾客余额', '元'),
|
|
|
|
VEmptyView(30),
|
|
|
|
rechargeItem(context, '退款金额', '元'),
|
|
|
|
VEmptyView(30),
|
|
|
|
])),
|
|
|
|
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: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
})),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
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_438E93,
|
|
|
|
isBold: true,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
showRefundConfirmDialog(context, '退款');
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
])));
|
|
|
|
}));
|
|
|
|
});
|
...
|
...
|
|