|
|
|
import 'package:dotted_border/dotted_border.dart';
|
|
|
|
import 'package:flutter/gestures.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/widgets/MyDivider.dart';
|
|
|
|
import 'package:one_key/widgets/round_button.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import '../../models/feast_menu_model.dart';
|
|
|
|
import '../../provider/feast_model.dart';
|
|
|
|
import '../../provider/upload_img_provider.dart';
|
|
|
|
import '../../res/colors.dart';
|
|
|
|
import '../../utils/dialog_util.dart';
|
|
|
|
import '../../utils/screen_util.dart';
|
|
|
|
import '../../utils/upload_image_util.dart';
|
|
|
|
import '../../utils/utils.dart';
|
|
|
|
import '../../widgets/h_empty_view.dart';
|
|
|
|
import '../../widgets/set_time_widget.dart';
|
|
|
|
import '../../widgets/system_app_bar.dart';
|
|
|
|
import '../online_check/img_picker_widget_f.dart';
|
|
|
|
import '../table/area_item_table.dart';
|
|
|
|
|
|
|
|
class FeastCreatePage extends StatefulWidget {
|
|
|
|
FeastCreatePage({Key key}) : super(key: key);
|
|
...
|
...
|
@@ -23,18 +33,62 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
TextEditingController phoneC = TextEditingController();
|
|
|
|
FocusNode nameF = FocusNode();
|
|
|
|
FocusNode phoneF = FocusNode();
|
|
|
|
TextEditingController customC = TextEditingController();
|
|
|
|
FocusNode customF = FocusNode();
|
|
|
|
TextEditingController customC = TextEditingController(); //意向备注
|
|
|
|
FocusNode customF = FocusNode(); //意向备注
|
|
|
|
TextEditingController customCxt = TextEditingController(); //选台备注
|
|
|
|
FocusNode customFxt = FocusNode(); //选台备注
|
|
|
|
TextEditingController customCdb = TextEditingController(); //担保说明
|
|
|
|
FocusNode customFdb = FocusNode(); //担保说明
|
|
|
|
List sexList;
|
|
|
|
int sexSelectIndex = 0;
|
|
|
|
String sexStr = '先生';
|
|
|
|
ScrollController _scrollController = ScrollController();
|
|
|
|
DateTime dateTime; //宴会日期
|
|
|
|
String dateTimeShow = '请选择'; //宴会日期显示 2022-08-02(周二 七月十五)
|
|
|
|
String jdShow = '请选择'; //接单人
|
|
|
|
String gdShow = '请选择'; //跟单人
|
|
|
|
int jdSelIndex; //接单人选择index
|
|
|
|
int gdSelIndex; //跟单人选择index
|
|
|
|
FeastModel feastModel;
|
|
|
|
String feastTypeShow = '请选择'; //宴会类型
|
|
|
|
int feastTypeSelIndex; //宴会类型选择index
|
|
|
|
Map<String, FeastMenuModel> menuMap = {}; // 菜单数据
|
|
|
|
|
|
|
|
String selectMenu = '意向'; //当前选中的菜单名称
|
|
|
|
Set<String> menuSet = {}; //已经保存的菜单名称
|
|
|
|
String cdShow = '请选择'; //餐段显示
|
|
|
|
String qsDateShow = '请选择'; //起始时间
|
|
|
|
String startDate = '';
|
|
|
|
String endDate = '';
|
|
|
|
String dateTimeShowxt = '请选择'; //宴会日期显示 选台 2022-08-02(周二 七月十五)
|
|
|
|
DateTime dateTimext; //宴会日期
|
|
|
|
ScrollController controller = ScrollController();
|
|
|
|
String djDBR = '请选择'; //定金担保人
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
// TODO: implement initState
|
|
|
|
super.initState();
|
|
|
|
dateTime = DateTime.now();
|
|
|
|
dateTimext = DateTime.now();
|
|
|
|
Utils.changeStatusColor(color: MyColours.color_438E93);
|
|
|
|
initSexList();
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
_getSellerUserBySellerid();
|
|
|
|
// scrollController.jumpTo(scrollController.position.minScrollExtent);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///商家编辑页面 ----- 获取经理数据
|
|
|
|
_getSellerUserBySellerid() async {
|
|
|
|
await feastModel.getSellerUserBySellerid(context);
|
|
|
|
|
|
|
|
// for (int i = 0; i < feastModel.sellerManageList.length; i++) {
|
|
|
|
// if (manageShow == feastModel.sellerManageList[i].title) {
|
|
|
|
// customerProvider.manageSelIndex = i;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
///称谓
|
|
...
|
...
|
@@ -62,19 +116,31 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget menuBtn(String title, bool select) {
|
|
|
|
return Container(
|
|
|
|
width: w(40),
|
|
|
|
height: h(40),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: select ? MyColours.color_438E93 : MyColours.color_BFC4D4,
|
|
|
|
borderRadius: BorderRadius.circular(r(20))),
|
|
|
|
child: Text(
|
|
|
|
title,
|
|
|
|
style: TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
Widget menuBtn(String title, {GestureTapCallback onTap}) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (menuSet.contains(title)) {
|
|
|
|
setState(() {
|
|
|
|
selectMenu = title;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: w(40),
|
|
|
|
height: h(40),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: title == selectMenu
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: menuSet.contains(title)
|
|
|
|
? MyColours.color_00A870
|
|
|
|
: MyColours.color_BFC4D4,
|
|
|
|
borderRadius: BorderRadius.circular(r(20))),
|
|
|
|
child: Text(
|
|
|
|
title,
|
|
|
|
style: TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget arrow() {
|
|
...
|
...
|
@@ -91,40 +157,30 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
menuBtn('意向', true),
|
|
|
|
menuBtn(
|
|
|
|
'意向',
|
|
|
|
),
|
|
|
|
arrow(),
|
|
|
|
menuBtn('选台', false),
|
|
|
|
menuBtn(
|
|
|
|
'选台',
|
|
|
|
),
|
|
|
|
arrow(),
|
|
|
|
menuBtn('定金', false),
|
|
|
|
menuBtn(
|
|
|
|
'定金',
|
|
|
|
),
|
|
|
|
arrow(),
|
|
|
|
menuBtn('签约', false),
|
|
|
|
menuBtn(
|
|
|
|
'签约',
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _selectWidget(String title, String labelShow) {
|
|
|
|
Widget _selectWidget(String title, String labelShow,
|
|
|
|
{GestureTapCallback onTap, bool need = true}) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
// FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// DialogUtil.showSelectCusmanDialog(
|
|
|
|
// context,
|
|
|
|
// customerProvider.labelList.map((item) {
|
|
|
|
// return item.label;
|
|
|
|
// }).toList(), (value) {
|
|
|
|
// if (value != null) {
|
|
|
|
// setState(() {
|
|
|
|
// customerProvider.labelSelIndex = value.first;
|
|
|
|
// labelShow = customerProvider
|
|
|
|
// .labelList[customerProvider.labelSelIndex].label;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// selecteds: customerProvider.labelSelIndex == null
|
|
|
|
// ? []
|
|
|
|
// : [customerProvider.labelSelIndex])
|
|
|
|
// .then((value) {});
|
|
|
|
},
|
|
|
|
onTap: onTap,
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setWidth(60),
|
|
|
|
padding: EdgeInsets.only(
|
|
...
|
...
|
@@ -158,7 +214,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: '*',
|
|
|
|
text: need ? '*' : '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
...
|
...
|
@@ -172,7 +228,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
labelShow,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
color: labelShow == '请选择'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
)),
|
|
...
|
...
|
@@ -269,7 +327,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: labelShow,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
color: labelShow == '请输入'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
...
|
...
|
@@ -335,7 +395,8 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget remark() {
|
|
|
|
Widget remark(TextEditingController textEditC, FocusNode node,
|
|
|
|
{String hintText = "请输入备注"}) {
|
|
|
|
return Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: h(29), left: w(16), right: w(18), bottom: h(22)),
|
|
...
|
...
|
@@ -352,8 +413,8 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
color: MyColours.color_DBDBDB, width: ScreenUtil().setWidth(2)),
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: TextField(
|
|
|
|
controller: customC,
|
|
|
|
focusNode: customF,
|
|
|
|
controller: textEditC,
|
|
|
|
focusNode: node,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
...
|
...
|
@@ -362,7 +423,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
maxLines: 5,
|
|
|
|
maxLength: 100,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "请输入备注",
|
|
|
|
hintText: hintText,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
...
|
...
|
@@ -371,44 +432,1103 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
onChanged: (value) {
|
|
|
|
// setState(() {
|
|
|
|
// currentRemark = value ?? "";
|
|
|
|
// });
|
|
|
|
// if (value.length < currRemark.length &&
|
|
|
|
// currRemark.substring(value.length) != ',') {
|
|
|
|
// setState(() {
|
|
|
|
// currRemark = value ?? "";
|
|
|
|
// });
|
|
|
|
// if (sum == 0) {
|
|
|
|
// for (int i = 0; i < remarks.length; i++) {
|
|
|
|
// if (remarks[i].isSelect &&
|
|
|
|
// remarks[i].remark == selectItem.last) {
|
|
|
|
// setState(() {
|
|
|
|
// remarks[i].isSelect = false;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// sum++;
|
|
|
|
// if (sum == selectItem.last.length ||
|
|
|
|
// selectItem.length == 1 ||
|
|
|
|
// selectItem.length == 0) {
|
|
|
|
// selectItem.removeLast();
|
|
|
|
// sum = 0;
|
|
|
|
onChanged: (value) {}),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
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)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
//生成日期文本
|
|
|
|
createDateText(BuildContext context, DateTime day) {
|
|
|
|
// if (Utils.isOneDay(day, dateTime)) return; //日期没变
|
|
|
|
String ymd = "${day.year}-" +
|
|
|
|
Utils.addZeroNumber(day.month) +
|
|
|
|
"-" +
|
|
|
|
Utils.addZeroNumber(day.day);
|
|
|
|
ymd += " (周${Utils.formatWeekDayNum(day.weekday)} ";
|
|
|
|
ymd += Utils.lunarCalendarHolidays(day);
|
|
|
|
ymd += ')';
|
|
|
|
return ymd;
|
|
|
|
}
|
|
|
|
|
|
|
|
///意向
|
|
|
|
Widget yxWidget() {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
menu(),
|
|
|
|
MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB),
|
|
|
|
VEmptyView(26),
|
|
|
|
_selectWidget('宴会日期', dateTimeShow, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showCalendarDialog(context, dateTime).then((day) async {
|
|
|
|
if (day != null) {
|
|
|
|
dateTime = day;
|
|
|
|
dateTimeShow = createDateText(context, day);
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
_selectWidget('接单人', jdShow, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context,
|
|
|
|
feastModel.sellerManageList.map((item) {
|
|
|
|
return item.title;
|
|
|
|
}).toList(), (value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
jdSelIndex = value.first;
|
|
|
|
jdShow = feastModel.sellerManageList[jdSelIndex].title;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
cancelText: '',
|
|
|
|
title: '选择经理',
|
|
|
|
selecteds: jdSelIndex == null ? [] : [jdSelIndex])
|
|
|
|
.then((value) {});
|
|
|
|
}),
|
|
|
|
_selectWidget('跟单人', gdShow, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context,
|
|
|
|
feastModel.sellerManageList.map((item) {
|
|
|
|
return item.title;
|
|
|
|
}).toList(), (value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
gdSelIndex = value.first;
|
|
|
|
gdShow = feastModel.sellerManageList[gdSelIndex].title;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
cancelText: '',
|
|
|
|
title: '选择经理',
|
|
|
|
selecteds: gdSelIndex == null ? [] : [gdSelIndex])
|
|
|
|
.then((value) {});
|
|
|
|
}),
|
|
|
|
_selectWidget('宴会类型', feastTypeShow, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context,
|
|
|
|
feastModel.sellerManageList.map((item) {
|
|
|
|
return item.title;
|
|
|
|
}).toList(), (value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
feastTypeSelIndex = value.first;
|
|
|
|
feastTypeShow =
|
|
|
|
feastModel.sellerManageList[feastTypeSelIndex].title;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
cancelText: '',
|
|
|
|
title: '选择宴会类型',
|
|
|
|
selecteds:
|
|
|
|
feastTypeSelIndex == null ? [] : [feastTypeSelIndex])
|
|
|
|
.then((value) {});
|
|
|
|
}),
|
|
|
|
_inputWidget('预订人', '请输入', nameC, nameF),
|
|
|
|
_inputWidget('电话', '请输入', phoneC, phoneF),
|
|
|
|
remark(customC, customF),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(24)),
|
|
|
|
child: Consumer<UploadImageProvider>(builder: (context, model, _) {
|
|
|
|
return ImgPickerFWidget(
|
|
|
|
model: model,
|
|
|
|
scrollController: _scrollController,
|
|
|
|
uploadType: UploadType.FeastRemarkType,
|
|
|
|
bgColor: MyColours.color_DBDBDB,
|
|
|
|
size: 64,
|
|
|
|
crossAxisCount: 4,
|
|
|
|
maxImageNumber: 8,
|
|
|
|
mainAxisSpacing: 72,
|
|
|
|
crossAxisSpacing: 56,
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
VEmptyView(150)
|
|
|
|
]))),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {},
|
|
|
|
content: '仅保存',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
selectMenu = '选台';
|
|
|
|
menuSet.add('意向');
|
|
|
|
menuSet.add('选台');
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
content: '保存并下一步',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: true))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///选台
|
|
|
|
Widget xtWidget() {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: controller,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
menu(),
|
|
|
|
MyDivider(double.infinity, h(1),
|
|
|
|
color: MyColours.color_DBDBDB),
|
|
|
|
VEmptyView(26),
|
|
|
|
Container(
|
|
|
|
height: h(33),
|
|
|
|
child: ListView.builder(
|
|
|
|
padding: EdgeInsets.only(left: w(21)),
|
|
|
|
itemCount: 2,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
if (index == 1) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () async {
|
|
|
|
// //添加区域弹框
|
|
|
|
// await DialogUtil
|
|
|
|
// .openCreateAreaDialog(context,
|
|
|
|
// onTap: (value) async {
|
|
|
|
// print(value);
|
|
|
|
// //添加区域
|
|
|
|
// bool success =
|
|
|
|
// await tableManagerModel
|
|
|
|
// .addTableAreas(
|
|
|
|
// context, value);
|
|
|
|
// print(success);
|
|
|
|
// if (success) {
|
|
|
|
// Utils.showToast('添加成功!');
|
|
|
|
// tableManagerModel.currentArea =
|
|
|
|
// value;
|
|
|
|
|
|
|
|
// await tableManagerModel
|
|
|
|
// .refreshTable(context);
|
|
|
|
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
},
|
|
|
|
child: DottedBorder(
|
|
|
|
dashPattern: [2, 2, 2, 2],
|
|
|
|
borderType: BorderType.RRect,
|
|
|
|
radius: Radius.circular(r(6)),
|
|
|
|
// padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
strokeWidth: ScreenUtil().setWidth(2),
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(33 * 2),
|
|
|
|
width: ScreenUtil().setWidth(70 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(r(6)),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('add_area'),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(24)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
} else {
|
|
|
|
return Container(
|
|
|
|
height: h(33),
|
|
|
|
width: w(70),
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal: w(8),
|
|
|
|
// ),
|
|
|
|
margin: EdgeInsets.only(right: w(8)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(6)),
|
|
|
|
color: true
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_ffffff),
|
|
|
|
child: Text(
|
|
|
|
'第一场',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: true
|
|
|
|
? MyColours.color_F6F6F6
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: font(18),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
VEmptyView(26),
|
|
|
|
_selectWidget('宴会日期', dateTimeShowxt, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showCalendarDialog(context, dateTimext)
|
|
|
|
.then((day) async {
|
|
|
|
if (day != null) {
|
|
|
|
dateTimext = day;
|
|
|
|
dateTimeShowxt = createDateText(context, day);
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
_selectWidget('餐段选择', cdShow, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context,
|
|
|
|
feastModel.sellerManageList.map((item) {
|
|
|
|
return item.title;
|
|
|
|
}).toList(), (value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
jdSelIndex = value.first;
|
|
|
|
jdShow =
|
|
|
|
feastModel.sellerManageList[jdSelIndex].title;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
cancelText: '',
|
|
|
|
title: '选择餐段',
|
|
|
|
selecteds:
|
|
|
|
jdSelIndex == null ? [] : [jdSelIndex])
|
|
|
|
.then((value) {});
|
|
|
|
}),
|
|
|
|
_selectWidget('起始时间', qsDateShow, need: false, onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
|
|
|
|
SetTimeWidget.init.showFeastTimeSelector(
|
|
|
|
context,
|
|
|
|
SetTimeWidget.init.getFeastDateData('00:00-23:30'),
|
|
|
|
startDate,
|
|
|
|
endDate, (value) {
|
|
|
|
if (value != null) {
|
|
|
|
startDate =
|
|
|
|
SetTimeWidget.init.getSelectTitle(value[0]);
|
|
|
|
endDate =
|
|
|
|
SetTimeWidget.init.getSelectTitle(value[1]);
|
|
|
|
qsDateShow = startDate + '-' + endDate;
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// DialogUtil.showSelectCusmanDialog(
|
|
|
|
// context,
|
|
|
|
// feastModel.sellerManageList.map((item) {
|
|
|
|
// return item.title;
|
|
|
|
// }).toList(), (value) {
|
|
|
|
// if (value != null) {
|
|
|
|
// setState(() {
|
|
|
|
// gdSelIndex = value.first;
|
|
|
|
// gdShow = feastModel.sellerManageList[gdSelIndex].title;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// cancelText: '',
|
|
|
|
// title: '选择经理',
|
|
|
|
// selecteds: gdSelIndex == null ? [] : [gdSelIndex])
|
|
|
|
// .then((value) {});
|
|
|
|
}),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(32),
|
|
|
|
right: ScreenUtil().setWidth(32),
|
|
|
|
top: h(24)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: '桌位选择',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: '*',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: '(共0桌)',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
..onTap = () {}),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 2,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
height: h(42),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: h(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'包间$index',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
width: w(22),
|
|
|
|
child: Text(
|
|
|
|
'30',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
HEmptyView(32),
|
|
|
|
InkWell(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('f_delete_red'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
VEmptyView(28),
|
|
|
|
RoundButton(
|
|
|
|
text: '添加桌位',
|
|
|
|
radius: r(6),
|
|
|
|
width: w(56),
|
|
|
|
height: h(21),
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
),
|
|
|
|
VEmptyView(52),
|
|
|
|
Text(
|
|
|
|
'套餐选择',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 2,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
height: h(80),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: h(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceAround,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'1299套餐',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'f_tiaocai'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'调菜',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_515151,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
HEmptyView(32),
|
|
|
|
InkWell(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'f_delete_red'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
taocanText('1299', ' 元/桌'),
|
|
|
|
taocanText('10', ' 人/桌'),
|
|
|
|
taocanTextType(
|
|
|
|
'保证 ', '1299', ' 桌'),
|
|
|
|
taocanTextType('备用 ', '2', ' 桌'),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
VEmptyView(28),
|
|
|
|
RoundButton(
|
|
|
|
text: '添加套餐',
|
|
|
|
radius: r(6),
|
|
|
|
width: w(56),
|
|
|
|
height: h(21),
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
),
|
|
|
|
VEmptyView(52),
|
|
|
|
Text(
|
|
|
|
'酒水选择',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 2,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
height: h(42),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: h(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'剑南春52度500ml',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
taocanText('1299', ' 元/份'),
|
|
|
|
HEmptyView(32),
|
|
|
|
taocanText('12', ' 份'),
|
|
|
|
HEmptyView(32),
|
|
|
|
InkWell(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('f_delete_red'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
VEmptyView(28),
|
|
|
|
RoundButton(
|
|
|
|
text: '添加酒水',
|
|
|
|
radius: r(6),
|
|
|
|
width: w(56),
|
|
|
|
height: h(21),
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
),
|
|
|
|
VEmptyView(52),
|
|
|
|
Text(
|
|
|
|
'其他配置',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 2,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
height: h(42),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: h(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'LED大屏',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
taocanText('1299', ' 元/份'),
|
|
|
|
HEmptyView(32),
|
|
|
|
taocanText('12', ' 份'),
|
|
|
|
HEmptyView(32),
|
|
|
|
InkWell(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('f_delete_red'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
VEmptyView(28),
|
|
|
|
RoundButton(
|
|
|
|
text: '添加配置',
|
|
|
|
radius: r(6),
|
|
|
|
width: w(56),
|
|
|
|
height: h(21),
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
remark(customCxt, customFxt),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(24)),
|
|
|
|
child: Consumer<UploadImageProvider>(
|
|
|
|
builder: (context, model, _) {
|
|
|
|
return ImgPickerFWidget(
|
|
|
|
model: model,
|
|
|
|
scrollController: _scrollController,
|
|
|
|
uploadType: UploadType.FeastRemarkXtType,
|
|
|
|
bgColor: MyColours.color_DBDBDB,
|
|
|
|
size: 64,
|
|
|
|
crossAxisCount: 4,
|
|
|
|
maxImageNumber: 8,
|
|
|
|
mainAxisSpacing: 72,
|
|
|
|
crossAxisSpacing: 56,
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
VEmptyView(150)
|
|
|
|
]))),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {},
|
|
|
|
content: '仅保存',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
selectMenu = '定金';
|
|
|
|
menuSet.add('选台');
|
|
|
|
menuSet.add('定金');
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
content: '保存并下一步',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: true))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///定金页面
|
|
|
|
Widget djWidget() {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
menu(),
|
|
|
|
MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB),
|
|
|
|
VEmptyView(26),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(24),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(Utils.getImgPath('f_dj'), width: w(20)),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
'定金付款',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000, fontSize: font(18)),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
RoundButton(
|
|
|
|
text: '添加一项',
|
|
|
|
radius: r(6),
|
|
|
|
width: w(56),
|
|
|
|
height: h(21),
|
|
|
|
fontSize: 24,
|
|
|
|
textColor: MyColours.color_F6F6F6,
|
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
ListView.builder(
|
|
|
|
padding: EdgeInsets.only(left: w(13), right: w(13), top: h(20)),
|
|
|
|
itemCount: 2,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
height: h(110),
|
|
|
|
margin: EdgeInsets.only(bottom: h(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
border: Border.all(
|
|
|
|
width: h(1), color: MyColours.color_438E93)),
|
|
|
|
child: Column(children: [
|
|
|
|
Container(
|
|
|
|
height: h(24),
|
|
|
|
padding: EdgeInsets.only(left: w(16), right: w(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(r(4)),
|
|
|
|
topRight: Radius.circular(r(4))),
|
|
|
|
border: Border.all(
|
|
|
|
width: h(1), color: MyColours.color_438E93)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'定金1',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_F6F6F6,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'收据编号 SJ000001',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_F6F6F6,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('f_dj_delete'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: [
|
|
|
|
djTextType1('定金金额 ', '200', ' 元'),
|
|
|
|
djText('支付方式 ', '现金'),
|
|
|
|
djText('定金类型 ', '宴会定金')
|
|
|
|
],
|
|
|
|
),
|
|
|
|
HEmptyView(140),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: [
|
|
|
|
djText('付款时间 ', '2022-08-03'),
|
|
|
|
djText('收款人 ', '刘经理'),
|
|
|
|
djText('付款人 ', '方先生')
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
))
|
|
|
|
]));
|
|
|
|
}),
|
|
|
|
VEmptyView(62),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(24),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(Utils.getImgPath('f_dj_db'), width: w(20)),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
'担保',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000, fontSize: font(18)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(48),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// DialogUtil.showSelectCusmanDialog(
|
|
|
|
// context,
|
|
|
|
// customerProvider.labelList.map((item) {
|
|
|
|
// return item.label;
|
|
|
|
// }).toList(), (value) {
|
|
|
|
// if (value != null) {
|
|
|
|
// setState(() {
|
|
|
|
// customerProvider.labelSelIndex =
|
|
|
|
// value.first;
|
|
|
|
// labelShow = customerProvider
|
|
|
|
// .labelList[
|
|
|
|
// customerProvider.labelSelIndex]
|
|
|
|
// .label;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// setState(() {
|
|
|
|
// currRemark = value ?? "";
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// selecteds:
|
|
|
|
// customerProvider.labelSelIndex == null
|
|
|
|
// ? []
|
|
|
|
// : [
|
|
|
|
// customerProvider.labelSelIndex
|
|
|
|
// ])
|
|
|
|
// .then((value) {});
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(40),
|
|
|
|
Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
width: ScreenUtil().setWidth(150),
|
|
|
|
height: ScreenUtil().setWidth(35),
|
|
|
|
child: Text(
|
|
|
|
'担保人',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(60),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(64),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: Color.fromRGBO(220, 220, 220, 1)))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
djDBR,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: djDBR == '请选择'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('f_arrow_down'),
|
|
|
|
width: ScreenUtil().setWidth(64),
|
|
|
|
// height: ScreenUtil().setWidth(10),
|
|
|
|
),
|
|
|
|
HEmptyView(16),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
HEmptyView(24),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
remark(customCdb, customFdb,hintText: '担保说明'),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(24)),
|
|
|
|
child: Consumer<UploadImageProvider>(builder: (context, model, _) {
|
|
|
|
return ImgPickerFWidget(
|
|
|
|
model: model,
|
|
|
|
scrollController: _scrollController,
|
|
|
|
uploadType: UploadType.FeastRemarkDjType,
|
|
|
|
bgColor: MyColours.color_DBDBDB,
|
|
|
|
size: 64,
|
|
|
|
crossAxisCount: 4,
|
|
|
|
maxImageNumber: 8,
|
|
|
|
mainAxisSpacing: 72,
|
|
|
|
crossAxisSpacing: 56,
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(150)
|
|
|
|
]))),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {},
|
|
|
|
content: '仅保存',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
selectMenu = '选台';
|
|
|
|
menuSet.add('意向');
|
|
|
|
menuSet.add('选台');
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
content: '保存并下一步',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: true))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget taocanTextType(String per1, String title, String per) {
|
|
|
|
return RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: per1,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: per,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget taocanText(String title, String per) {
|
|
|
|
return RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: per,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget djTextType1(String title, String data, String per) {
|
|
|
|
return RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: data,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: per,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget djText(String title, String per) {
|
|
|
|
return RichText(
|
|
|
|
textScaleFactor: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
TextSpan(
|
|
|
|
text: per,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
//点击事件
|
|
|
|
recognizer: TapGestureRecognizer()..onTap = () {}),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
feastModel = Provider.of<FeastModel>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar(
|
|
...
|
...
|
@@ -420,18 +1540,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
menu(),
|
|
|
|
MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB),
|
|
|
|
VEmptyView(26),
|
|
|
|
_selectWidget('宴会日期', '2022-08-02(周二 七月十五)'),
|
|
|
|
_selectWidget('接单人', '刘经理'),
|
|
|
|
_selectWidget('跟单人', '请选择'),
|
|
|
|
_selectWidget('宴会类型', '请选择'),
|
|
|
|
_inputWidget('预订人', '请输入', nameC, nameF),
|
|
|
|
_inputWidget('电话', '请输入', phoneC, phoneF),
|
|
|
|
remark()
|
|
|
|
])));
|
|
|
|
body: selectMenu == '意向'
|
|
|
|
? yxWidget()
|
|
|
|
: selectMenu == '选台'
|
|
|
|
? xtWidget()
|
|
|
|
: selectMenu == '定金'
|
|
|
|
? djWidget()
|
|
|
|
: SizedBox());
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|