|
|
|
import 'package:flutter/gestures.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/utils/dialog_util.dart';
|
|
|
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import '../../constant/state.dart';
|
|
|
|
import '../../provider/feast_model.dart';
|
|
|
|
import '../../utils/screen_util.dart';
|
|
|
|
import '../../utils/utils.dart';
|
|
|
|
import '../../widgets/MyDivider.dart';
|
|
|
|
import '../../widgets/loading.dart';
|
|
|
|
import '../../widgets/page_exception.dart';
|
|
|
|
import '../../widgets/round_button.dart';
|
|
|
|
import '../../widgets/system_app_bar.dart';
|
|
|
|
|
|
|
|
class FeastDepositDataPage extends StatefulWidget {
|
|
|
|
FeastDepositDataPage({Key key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_FeastDepositDataPageState createState() => _FeastDepositDataPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _FeastDepositDataPageState extends State<FeastDepositDataPage> {
|
|
|
|
FeastModel feastModel;
|
|
|
|
|
|
|
|
TextEditingController editingController = TextEditingController();
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
Utils.changeStatusColor(color: MyColours.color_438E93);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget buildFeastTypeHeader() {
|
|
|
|
return Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: h(46),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(width: w(1), color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
// textAlign: TextAlign.left,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: "收据编号",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
text: "*",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
HEmptyView(32),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setHeight(120),
|
|
|
|
height: w(48),
|
|
|
|
padding: EdgeInsets.only(top: w(4)),
|
|
|
|
child: TextField(
|
|
|
|
controller: editingController,
|
|
|
|
// textAlign: TextAlign.right,
|
|
|
|
// textAlignVertical: TextAlignVertical.bottom,
|
|
|
|
maxLines: 1,
|
|
|
|
inputFormatters: [],
|
|
|
|
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
// focusNode: focusNode,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
hintText: '请输入',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
),
|
|
|
|
onChanged: (value) {},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
RoundButton(
|
|
|
|
onPressed: () async {},
|
|
|
|
text: '搜索',
|
|
|
|
fontSize: 28,
|
|
|
|
isBold: false,
|
|
|
|
height: h(28),
|
|
|
|
width: w(36),
|
|
|
|
// margin: EdgeInsets.only(top: w(18), bottom: w(4)),
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
radius: r(4),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget buildFeastTypeItem() {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(36)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_f3f3f3, width: ScreenUtil().setWidth(2)),
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_1F000000,
|
|
|
|
offset: Offset(0, ScreenUtil().setWidth(8)),
|
|
|
|
blurRadius: ScreenUtil().setWidth(8))
|
|
|
|
],
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().radius(10))),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(16),
|
|
|
|
vertical: ScreenUtil().setWidth(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(ScreenUtil().radius(10)),
|
|
|
|
topRight: Radius.circular(ScreenUtil().radius(10)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'8月1日 午餐',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_F6F6F6,
|
|
|
|
fontSize: ScreenUtil().setSp(40)),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'婚宴',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_F6F6F6,
|
|
|
|
fontSize: ScreenUtil().setSp(40)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(16),
|
|
|
|
vertical: ScreenUtil().setWidth(14)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft: Radius.circular(ScreenUtil().radius(10)),
|
|
|
|
bottomRight: Radius.circular(ScreenUtil().radius(10)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Wrap(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'[定金2000]',
|
|
|
|
style: TextStyle(
|
|
|
|
color: true
|
|
|
|
? MyColours.color_00A870
|
|
|
|
: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(5),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'方先生 负责人:刘经理',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
},
|
|
|
|
text: '退定金',
|
|
|
|
fontSize: 28,
|
|
|
|
isBold: false,
|
|
|
|
height: h(28),
|
|
|
|
width: w(58),
|
|
|
|
// margin: EdgeInsets.only(top: w(18), bottom: w(4)),
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
gradientStart: MyColours.color_E34D59,
|
|
|
|
gradientEnd: MyColours.color_E34D59,
|
|
|
|
borderColor: MyColours.color_E34D59,
|
|
|
|
radius: r(4),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///取消预订弹框
|
|
|
|
_showCancelWidget(context) {
|
|
|
|
ScrollController _scrollController = ScrollController();
|
|
|
|
TextEditingController _cancelController = TextEditingController();
|
|
|
|
FocusNode _cancelNode = FocusNode();
|
|
|
|
|
|
|
|
bool showPerson = true;
|
|
|
|
bool showType = true;
|
|
|
|
String person = '请选择';
|
|
|
|
String type = '请选择';
|
|
|
|
showGeneralDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierLabel:
|
|
|
|
MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
barrierColor: Color.fromRGBO(0, 0, 0, 0.25),
|
|
|
|
pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
Animation secondaryAnimation) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Color.fromRGBO(0, 0, 0, 0.25),
|
|
|
|
body: StatefulBuilder(builder: (context, state) {
|
|
|
|
// _cancelState = state;
|
|
|
|
return GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
// onTap: () {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// },
|
|
|
|
child: Center(
|
|
|
|
child: Stack(children: [
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(28 * 2)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
),
|
|
|
|
height: ScreenUtil().setWidth(355 * 2 + 90),
|
|
|
|
child: Column(
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
// Stack(
|
|
|
|
// children: [
|
|
|
|
VEmptyView(48),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(48),
|
|
|
|
child: Text(
|
|
|
|
'退定金',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.9)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
_textfield('退款金额', '请输入', null, null, '元'),
|
|
|
|
_selectWidget('操作人', person, onTap: () {
|
|
|
|
state(() {
|
|
|
|
showType = true;
|
|
|
|
showPerson = !showPerson;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
_selectWidget('退款方式', type, onTap: () {
|
|
|
|
state(() {
|
|
|
|
showPerson = true;
|
|
|
|
showType = !showType;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
_textfield('收款人', '请输入', null, null, '',
|
|
|
|
inputType: TextInputType.text),
|
|
|
|
VEmptyView(24),
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Color.fromRGBO(240, 240, 240, 1),
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(8))),
|
|
|
|
// height: ScreenUtil().setWidth(42 * 2),
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
controller: _cancelController,
|
|
|
|
focusNode: _cancelNode,
|
|
|
|
style: TextStyle(
|
|
|
|
textBaseline: TextBaseline.alphabetic),
|
|
|
|
textAlignVertical: TextAlignVertical.center,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
hintText: "备注",
|
|
|
|
// focusColor: Color.fromRGBO(0, 0, 0, 0.4),
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.4),
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
width: 0,
|
|
|
|
color: Colors.transparent)),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
width: 0,
|
|
|
|
color: Colors.transparent)),
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
width: 0,
|
|
|
|
color: Colors.transparent)),
|
|
|
|
),
|
|
|
|
|
|
|
|
// border: InputBorder.none,
|
|
|
|
|
|
|
|
onChanged: (_) {
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_cancelNode.unfocus();
|
|
|
|
},
|
|
|
|
// keyboardType: TextInputType.number,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity, ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
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_E6000000,
|
|
|
|
isBold: false,
|
|
|
|
fontSize: 32,
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
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_E34D59,
|
|
|
|
fontSize: 32,
|
|
|
|
isBold: true,
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
Loading.showLoading(context);
|
|
|
|
|
|
|
|
// setReserveStatus('4', desc: desc);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(320),
|
|
|
|
top: ScreenUtil().setWidth(150 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPerson,
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: selectWidgetTableManage(
|
|
|
|
['dffd', 'fdf'], (index) {
|
|
|
|
state(() {
|
|
|
|
showPerson = !showPerson;
|
|
|
|
person = ['dffd', 'fdf'][index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(320),
|
|
|
|
top: ScreenUtil().setWidth(200 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showType,
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: selectWidgetTableManage([
|
|
|
|
'dffd',
|
|
|
|
'fdf',
|
|
|
|
'dffd',
|
|
|
|
'fdf',
|
|
|
|
'dffd',
|
|
|
|
'fdf'
|
|
|
|
], (index) {
|
|
|
|
state(() {
|
|
|
|
showType = !showType;
|
|
|
|
type = [
|
|
|
|
'dffd',
|
|
|
|
'fdf',
|
|
|
|
'dffd',
|
|
|
|
'fdf',
|
|
|
|
'dffd',
|
|
|
|
'fdf'
|
|
|
|
][index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
]),
|
|
|
|
));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _selectWidget(String title, String labelShow,
|
|
|
|
{GestureTapCallback onTap, bool need = true}) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: onTap,
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setWidth(60),
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(16), right: w(8), top: w(12), bottom: h(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: need ? '*' : '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
..onTap = () {}),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
HEmptyView(48),
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
labelShow,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: labelShow == '请选择'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('f_arrow_down'),
|
|
|
|
width: ScreenUtil().setWidth(32 * 2),
|
|
|
|
// height: ScreenUtil().setWidth(10),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
///请输入
|
|
|
|
///输入框
|
|
|
|
Widget _textfield(
|
|
|
|
String title,
|
|
|
|
String hintText,
|
|
|
|
TextEditingController editingController,
|
|
|
|
FocusNode focusNode,
|
|
|
|
String subTitle,
|
|
|
|
{TextInputType inputType = TextInputType.number}) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(left: w(16), right: w(8), top: w(12), bottom: h(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: '*',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
HEmptyView(48),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// border: Border(
|
|
|
|
// bottom: BorderSide(
|
|
|
|
// width: h(1), color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setHeight(120),
|
|
|
|
height: ScreenUtil().setWidth(64),
|
|
|
|
child: TextField(
|
|
|
|
controller: editingController,
|
|
|
|
// textAlign: TextAlign.right,
|
|
|
|
// textAlignVertical: TextAlignVertical.bottom,
|
|
|
|
maxLines: 1,
|
|
|
|
inputFormatters: [],
|
|
|
|
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
focusNode: focusNode,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border:
|
|
|
|
OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
hintText: hintText,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: hintText == '请输入'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
),
|
|
|
|
onChanged: (value) {},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: inputType,
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
subTitle,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
selectWidgetTableManage(List<String> data, CustomCallBack onTap) {
|
|
|
|
return Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_cccccc,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
width: ScreenUtil().setWidth(320),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxHeight: ScreenUtil().setWidth(140 * 2),
|
|
|
|
),
|
|
|
|
child: ListView.builder(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
itemCount: data.length,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap(index);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
color: MyColours.color_efefef,
|
|
|
|
width: ScreenUtil().setWidth(2)))),
|
|
|
|
child: Text(data[index],
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _callButton(
|
|
|
|
{GestureTapCallback onPress,
|
|
|
|
content,
|
|
|
|
hasLeftBorder = true,
|
|
|
|
isSelect = false}) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: onPress,
|
|
|
|
child: Container(
|
|
|
|
height: h(48),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
top: BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
left: hasLeftBorder
|
|
|
|
? BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2))
|
|
|
|
: BorderSide.none,
|
|
|
|
right: BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2)))),
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
content,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(36)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
feastModel = Provider.of<FeastModel>(context);
|
|
|
|
feastModel.pageStateDepositData = PageState.Success;
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'定金管理',
|
|
|
|
needWhite: true,
|
|
|
|
bgColor: MyColours.color_438E93,
|
|
|
|
titleColor: MyColours.color_ffffff,
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: NestedScrollView(
|
|
|
|
// controller: _scrollViewController,
|
|
|
|
headerSliverBuilder:
|
|
|
|
(BuildContext context, bool innerBoxIsScrolled) {
|
|
|
|
return <Widget>[
|
|
|
|
SliverAppBar(
|
|
|
|
pinned: true,
|
|
|
|
floating: false,
|
|
|
|
leading: null,
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
// expandedHeight: ScreenUtil().setWidth(128 * 2),
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
toolbarHeight: ScreenUtil().setWidth(64 * 2),
|
|
|
|
title: buildFeastTypeHeader(),
|
|
|
|
// flexibleSpace: FlexibleSpaceBar(
|
|
|
|
// collapseMode: CollapseMode.pin,
|
|
|
|
// title: buildFeastTypeHeader())
|
|
|
|
)
|
|
|
|
];
|
|
|
|
}, body: Consumer<FeastModel>(builder: (context, model, _) {
|
|
|
|
if (model.pageStateDepositData != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageStateDepositData,
|
|
|
|
callback: () {
|
|
|
|
// _getWine();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有定金数据哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return ListView.builder(
|
|
|
|
itemCount: 100,
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(left: w(12), top: w(19), right: w(12)),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
// WineSunModel data = feastModel.wineData[index];
|
|
|
|
return buildFeastTypeItem();
|
|
|
|
// '剑南春52度500ml', '1150元/份 不可议价'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}))),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
content: '回到今天',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {},
|
|
|
|
content: '创建宴会',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: true))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|