|
...
|
...
|
@@ -12,6 +12,7 @@ import 'package:one_key/constant/constant.dart'; |
|
|
|
import 'package:one_key/models/remark.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/provider/table_manager_model.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
...
|
...
|
@@ -827,435 +828,414 @@ class DialogUtil { |
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return
|
|
|
|
// Scaffold(
|
|
|
|
// resizeToAvoidBottomInset: false,
|
|
|
|
// backgroundColor: Colors.transparent,
|
|
|
|
// body:
|
|
|
|
return
|
|
|
|
// Scaffold(
|
|
|
|
// resizeToAvoidBottomInset: false,
|
|
|
|
// backgroundColor: Colors.transparent,
|
|
|
|
// body:
|
|
|
|
Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
// globalState = state;
|
|
|
|
// globalState = state;
|
|
|
|
|
|
|
|
return Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Stack(
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(150)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: mulCreate
|
|
|
|
? ScreenUtil().setWidth(310 * 2)
|
|
|
|
: ScreenUtil().setWidth(346 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
Container(
|
|
|
|
return Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Stack(
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(bottom: ScreenUtil().setWidth(150)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: mulCreate
|
|
|
|
? ScreenUtil().setWidth(310 * 2)
|
|
|
|
: ScreenUtil().setWidth(346 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('新建桌位',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_333333)),
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
mulCreate = !mulCreate;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('新建桌位',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_333333)),
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
mulCreate = !mulCreate;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal:
|
|
|
|
ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Text('批量创建',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color: MyColours
|
|
|
|
.color_000000)),
|
|
|
|
Spacer(),
|
|
|
|
Image.asset(
|
|
|
|
mulCreate
|
|
|
|
? Utils.getImgPath(
|
|
|
|
'table_manage_swich_on')
|
|
|
|
: Utils.getImgPath(
|
|
|
|
'table_manage_swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(60),
|
|
|
|
// height: ScreenUtil().setWidth(82),
|
|
|
|
),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
VEmptyView(30),
|
|
|
|
// MyDivider(double.infinity,
|
|
|
|
// ScreenUtil().setWidth(2),
|
|
|
|
// color: MyColours.color_E7E7E7),
|
|
|
|
// VEmptyView(30),
|
|
|
|
mulCreate
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal:
|
|
|
|
ScreenUtil().setWidth(72),
|
|
|
|
),
|
|
|
|
child: textfield(
|
|
|
|
context,
|
|
|
|
'数量',
|
|
|
|
'填写个数',
|
|
|
|
_norNumController,
|
|
|
|
_norNumFocusNode,
|
|
|
|
'个',
|
|
|
|
state))
|
|
|
|
: Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal:
|
|
|
|
ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
// margin: EdgeInsets.symmetric(
|
|
|
|
// horizontal:
|
|
|
|
// ScreenUtil().setWidth(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(10))),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(32),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
40)), //设置文字内容与边框距离
|
|
|
|
// enabledBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef),
|
|
|
|
// ),
|
|
|
|
// focusedBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef,
|
|
|
|
// width: ScreenUtil().setWidth(2)),
|
|
|
|
// ),
|
|
|
|
// prefixText: '*',
|
|
|
|
// prefixStyle: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_E95750),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide.none),
|
|
|
|
hintText: '桌位名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_BFC4D4,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(32),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.text,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Text('批量创建',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_000000)),
|
|
|
|
Spacer(),
|
|
|
|
Image.asset(
|
|
|
|
mulCreate
|
|
|
|
? Utils.getImgPath(
|
|
|
|
'table_manage_swich_on')
|
|
|
|
: Utils.getImgPath(
|
|
|
|
'table_manage_swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(60),
|
|
|
|
// height: ScreenUtil().setWidth(82),
|
|
|
|
),
|
|
|
|
VEmptyView(32),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showBaojian = !showBaojian;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal:
|
|
|
|
ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Text(
|
|
|
|
'桌位类型',
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
VEmptyView(30),
|
|
|
|
// MyDivider(double.infinity,
|
|
|
|
// ScreenUtil().setWidth(2),
|
|
|
|
// color: MyColours.color_E7E7E7),
|
|
|
|
// VEmptyView(30),
|
|
|
|
mulCreate
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(72),
|
|
|
|
),
|
|
|
|
child: textfield(
|
|
|
|
context,
|
|
|
|
'数量',
|
|
|
|
'填写个数',
|
|
|
|
_norNumController,
|
|
|
|
_norNumFocusNode,
|
|
|
|
'个',
|
|
|
|
state))
|
|
|
|
: Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal:
|
|
|
|
ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
// margin: EdgeInsets.symmetric(
|
|
|
|
// horizontal:
|
|
|
|
// ScreenUtil().setWidth(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_000000),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
Text(
|
|
|
|
baojian,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
MyColours.color_515151),
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
40)), //设置文字内容与边框距离
|
|
|
|
// enabledBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef),
|
|
|
|
// ),
|
|
|
|
// focusedBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef,
|
|
|
|
// width: ScreenUtil().setWidth(2)),
|
|
|
|
// ),
|
|
|
|
// prefixText: '*',
|
|
|
|
// prefixStyle: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_E95750),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide.none),
|
|
|
|
hintText: '桌位名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_BFC4D4,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32)),
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
),
|
|
|
|
HEmptyView(12),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'table_manage_arrow_down'),
|
|
|
|
width:
|
|
|
|
ScreenUtil().setWidth(40)),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(32),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showBaojian = !showBaojian;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Text(
|
|
|
|
'桌位类型',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_000000),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
|
|
|
|
mulCreate
|
|
|
|
? SizedBox()
|
|
|
|
: Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(30)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(44),
|
|
|
|
right: ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Text(
|
|
|
|
'人数',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_000000),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChooseTableManagePnum(
|
|
|
|
pnumMin,
|
|
|
|
'min',
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(40),
|
|
|
|
Text(
|
|
|
|
'至',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_000000),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
btnChooseTableManagePnum(
|
|
|
|
pnumMax,
|
|
|
|
'max',
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
Text(
|
|
|
|
baojian,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity, ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil().setWidth(62) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
textColor: MyColours.color_000000,
|
|
|
|
isBold: false,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
RoundButton(
|
|
|
|
text: '确定',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil().setWidth(62) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
textColor: (!mulCreate &&
|
|
|
|
controller.text ==
|
|
|
|
'') ||
|
|
|
|
(mulCreate &&
|
|
|
|
_norNumController.text
|
|
|
|
.trim() ==
|
|
|
|
'')
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (mulCreate &&
|
|
|
|
_norNumController.text
|
|
|
|
.trim()
|
|
|
|
.length ==
|
|
|
|
0) {
|
|
|
|
Utils.showToast('请输入数量!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mulCreate &&
|
|
|
|
!Utils.isNumber(
|
|
|
|
_norNumController.text)) {
|
|
|
|
Utils.showToast('请输入数字!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mulCreate &&
|
|
|
|
int.parse(_norNumController
|
|
|
|
.text) >
|
|
|
|
20) {
|
|
|
|
Utils.showToast('最多可创建20个桌位!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!mulCreate &&
|
|
|
|
controller.text.trim() ==
|
|
|
|
'') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
HEmptyView(12),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'table_manage_arrow_down'),
|
|
|
|
width: ScreenUtil().setWidth(40)),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
|
|
|
|
onTap({
|
|
|
|
'bjtype': baojianList[
|
|
|
|
currentBaojianIndex],
|
|
|
|
'name': controller.text,
|
|
|
|
'pnumMin': pnumMin,
|
|
|
|
'pnumMax': pnumMax,
|
|
|
|
'mulcreate':
|
|
|
|
mulCreate.toString(),
|
|
|
|
'tablenum':
|
|
|
|
mulCreate
|
|
|
|
? SizedBox()
|
|
|
|
: Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(30)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(44),
|
|
|
|
right: ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
HEmptyView(32),
|
|
|
|
Text(
|
|
|
|
'人数',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_000000),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChooseTableManagePnum(
|
|
|
|
pnumMin,
|
|
|
|
'min',
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(40),
|
|
|
|
Text(
|
|
|
|
'至',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_000000),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
btnChooseTableManagePnum(
|
|
|
|
pnumMax,
|
|
|
|
'max',
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity, ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2,
|
|
|
|
height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
textColor: MyColours.color_000000,
|
|
|
|
isBold: false,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
RoundButton(
|
|
|
|
text: '确定',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2,
|
|
|
|
height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
textColor: (!mulCreate &&
|
|
|
|
controller.text == '') ||
|
|
|
|
(mulCreate &&
|
|
|
|
_norNumController.text
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(0),
|
|
|
|
top: ScreenUtil().setWidth(194 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showBaojian,
|
|
|
|
child: tableManageSelectWidget(baojianList, 210,
|
|
|
|
(index) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = !showBaojian;
|
|
|
|
currentBaojianIndex = index;
|
|
|
|
baojian = baojianList[currentBaojianIndex];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(190 * 2),
|
|
|
|
top: ScreenUtil().setWidth(242 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMin,
|
|
|
|
child: selectWidgetTableManage(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
pnumMin = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(0),
|
|
|
|
top: ScreenUtil().setWidth(242 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMax,
|
|
|
|
child: selectWidgetTableManage(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
pnumMax = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}));
|
|
|
|
.trim() ==
|
|
|
|
'')
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (mulCreate &&
|
|
|
|
_norNumController.text
|
|
|
|
.trim()
|
|
|
|
.length ==
|
|
|
|
0) {
|
|
|
|
Utils.showToast('请输入数量!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mulCreate &&
|
|
|
|
!Utils.isNumber(
|
|
|
|
_norNumController.text)) {
|
|
|
|
Utils.showToast('请输入数字!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (mulCreate &&
|
|
|
|
int.parse(
|
|
|
|
_norNumController.text) >
|
|
|
|
20) {
|
|
|
|
Utils.showToast('最多可创建20个桌位!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!mulCreate &&
|
|
|
|
controller.text.trim() == '') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap({
|
|
|
|
'bjtype': baojianList[
|
|
|
|
currentBaojianIndex],
|
|
|
|
'name': controller.text,
|
|
|
|
'pnumMin': pnumMin,
|
|
|
|
'pnumMax': pnumMax,
|
|
|
|
'mulcreate': mulCreate.toString(),
|
|
|
|
'tablenum': _norNumController.text
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(0),
|
|
|
|
top: ScreenUtil().setWidth(194 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showBaojian,
|
|
|
|
child: tableManageSelectWidget(baojianList, 210,
|
|
|
|
(index) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = !showBaojian;
|
|
|
|
currentBaojianIndex = index;
|
|
|
|
baojian = baojianList[currentBaojianIndex];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(190 * 2),
|
|
|
|
top: ScreenUtil().setWidth(242 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMin,
|
|
|
|
child: selectWidgetTableManage(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
pnumMin = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(0),
|
|
|
|
top: ScreenUtil().setWidth(242 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMax,
|
|
|
|
child: selectWidgetTableManage(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
pnumMax = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -2994,7 +2974,7 @@ class DialogUtil { |
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (BuildContext dialogContext) {
|
|
|
|
Widget widget = Container(
|
|
|
|
color: MyColours.app_main,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
...
|
...
|
@@ -3006,8 +2986,8 @@ class DialogUtil { |
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(21),
|
|
|
|
bottom: ScreenUtil().setWidth(12)),
|
|
|
|
top: ScreenUtil().setWidth(31),
|
|
|
|
bottom: ScreenUtil().setWidth(2)),
|
|
|
|
width: double.infinity,
|
|
|
|
child: Stack(
|
|
|
|
alignment: Alignment.center,
|
|
...
|
...
|
@@ -3015,7 +2995,7 @@ class DialogUtil { |
|
|
|
Text(
|
|
|
|
"您有一条新的消息",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
...
|
...
|
@@ -3028,7 +3008,7 @@ class DialogUtil { |
|
|
|
padding: EdgeInsets.all(
|
|
|
|
ScreenUtil().setWidth(12)),
|
|
|
|
child: Image.asset(
|
|
|
|
"assets/icon_close.png",
|
|
|
|
"assets/close1.png",
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28),
|
|
|
|
),
|
|
...
|
...
|
@@ -3104,7 +3084,8 @@ class DialogUtil { |
|
|
|
)
|
|
|
|
: ListView.builder(
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return MessageDialogItem(model.messages[index]);
|
|
|
|
return MessageDialogItemF(
|
|
|
|
model.messages[index]);
|
|
|
|
},
|
|
|
|
itemCount: model.messages.length,
|
|
|
|
shrinkWrap: true)
|
...
|
...
|
|