|
...
|
...
|
@@ -401,12 +401,12 @@ class DialogUtil { |
|
|
|
MyDivider(double.infinity, ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil().setWidth(60) * 2) /
|
|
|
|
ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2,
|
|
|
|
height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
...
|
...
|
@@ -424,7 +424,7 @@ class DialogUtil { |
|
|
|
RoundButton(
|
|
|
|
text: '确定',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil().setWidth(60) * 2) /
|
|
|
|
ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2,
|
|
|
|
height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
...
|
...
|
@@ -1088,14 +1088,14 @@ class DialogUtil { |
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(110) *
|
|
|
|
.setWidth(62) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height:
|
|
...
|
...
|
@@ -1118,7 +1118,7 @@ class DialogUtil { |
|
|
|
text: '确定',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(110) *
|
|
|
|
.setWidth(62) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height:
|
|
...
|
...
|
@@ -1529,14 +1529,14 @@ class DialogUtil { |
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(110) *
|
|
|
|
.setWidth(62) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height:
|
|
...
|
...
|
@@ -1559,7 +1559,7 @@ class DialogUtil { |
|
|
|
text: '确定',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(110) *
|
|
|
|
.setWidth(62) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height:
|
|
...
|
...
|
@@ -1651,13 +1651,16 @@ class DialogUtil { |
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///批量改名
|
|
|
|
|
|
|
|
static Future openMyTableManageModifyTableNameDialog(
|
|
|
|
BuildContext context, {
|
|
|
|
///批量修改人数
|
|
|
|
static Future openMyTableManageModifyTableNumDialog(
|
|
|
|
BuildContext context,
|
|
|
|
List<String> pnum, {
|
|
|
|
String pnumMin = '',
|
|
|
|
String pnumMax = '',
|
|
|
|
CustomCallBackMap onTap,
|
|
|
|
}) async {
|
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
bool showPnumMin = true;
|
|
|
|
bool showPnumMax = true;
|
|
|
|
|
|
|
|
final action = await showDialog(
|
|
|
|
context: context,
|
|
...
|
...
|
@@ -1667,236 +1670,577 @@ class DialogUtil { |
|
|
|
// globalState = state;
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(top: ScreenUtil().setWidth(300)),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
// height: ScreenUtil().setWidth(326 * 2) +
|
|
|
|
// ScreenUtil().setWidth(250 * 2),
|
|
|
|
height:
|
|
|
|
ScreenUtil().setWidth(226 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Stack(children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Stack(
|
|
|
|
overflow: Overflow.visible,
|
|
|
|
Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(64),
|
|
|
|
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(20),
|
|
|
|
Container(
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(top: ScreenUtil().setWidth(40)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(44),
|
|
|
|
right: ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(64),
|
|
|
|
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(60),
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(26),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
(true
|
|
|
|
? 'mine_radio_sel'
|
|
|
|
: 'mine_radio_nor'),
|
|
|
|
width:
|
|
|
|
ScreenUtil().setWidth(34)),
|
|
|
|
Text(
|
|
|
|
'跳过4',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
(true
|
|
|
|
? 'mine_radio_sel'
|
|
|
|
: 'mine_radio_nor'),
|
|
|
|
width:
|
|
|
|
ScreenUtil().setWidth(34)),
|
|
|
|
Text(
|
|
|
|
'跳过7',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
MyDivider(double.infinity,
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: (ScreenUtil.screenWidthDp -
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(110) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height:
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
gradientStart:
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
gradientEnd:
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
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(110) *
|
|
|
|
2) /
|
|
|
|
2,
|
|
|
|
height:
|
|
|
|
ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
gradientStart:
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
gradientEnd:
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
textColor: controller.text == ''
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (controller.text.trim() ==
|
|
|
|
'') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap({
|
|
|
|
'name': controller.text,
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
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(() {
|
|
|
|
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(() {
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(102),
|
|
|
|
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: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
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: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
textColor: pnumMax == '' || pnumMin == ''
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (pnumMax == '' || pnumMin == '') {
|
|
|
|
Utils.showToast('请选择人数!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap({
|
|
|
|
'pnumMin': pnumMin,
|
|
|
|
'pnumMax': pnumMax,
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(0),
|
|
|
|
top: ScreenUtil().setWidth(90 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMin,
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
pnumMin = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(106 * 2),
|
|
|
|
top: ScreenUtil().setWidth(90 * 2),
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMax,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
pnumMax = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
]));
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///批量修改桌位类型
|
|
|
|
static Future openMyTableManageModifyTableTypeDialog(
|
|
|
|
BuildContext context,
|
|
|
|
List<String> baojianList, {
|
|
|
|
String tidStr,
|
|
|
|
CustomCallBackMap onTap,
|
|
|
|
}) async {
|
|
|
|
bool showBaojian = true;
|
|
|
|
|
|
|
|
int currentBaojianIndex = tidStr == null
|
|
|
|
? 0
|
|
|
|
: baojianList.indexWhere((element) => element == tidStr) ?? 0;
|
|
|
|
String baojian = baojianList[currentBaojianIndex];
|
|
|
|
|
|
|
|
final action = await showDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
// globalState = state;
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: ScreenUtil().setWidth(202 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Stack(
|
|
|
|
overflow: Overflow.visible,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(64),
|
|
|
|
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(60),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
Text(
|
|
|
|
baojian,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
HEmptyView(12),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'table_manage_arrow_down'),
|
|
|
|
width: ScreenUtil().setWidth(40)),
|
|
|
|
HEmptyView(32),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
VEmptyView(52),
|
|
|
|
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: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
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: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
onTap({
|
|
|
|
'bjtype':
|
|
|
|
baojianList[currentBaojianIndex],
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(100 * 2),
|
|
|
|
top: ScreenUtil().setWidth(65 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showBaojian,
|
|
|
|
child: tableManageSelectWidget(baojianList, 210,
|
|
|
|
(index) {
|
|
|
|
state(() {
|
|
|
|
showBaojian = !showBaojian;
|
|
|
|
currentBaojianIndex = index;
|
|
|
|
baojian = baojianList[currentBaojianIndex];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
);
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///批量改名
|
|
|
|
|
|
|
|
static Future openMyTableManageModifyTableNameDialog(
|
|
|
|
BuildContext context, {
|
|
|
|
CustomCallBackMap onTap,
|
|
|
|
}) async {
|
|
|
|
final action = await showDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
bool jumpFour = false;
|
|
|
|
bool jumpSeven = false;
|
|
|
|
return StatefulBuilder(builder: (context, state) {
|
|
|
|
// globalState = state;
|
|
|
|
|
|
|
|
return Center(
|
|
|
|
child: Container(
|
|
|
|
// margin: EdgeInsets.only(top: ScreenUtil().setWidth(500)),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: ScreenUtil().setWidth(286 * 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(84),
|
|
|
|
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),
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(36),
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
jumpFour = !jumpFour;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath((jumpFour
|
|
|
|
? 'mine_radio_sel'
|
|
|
|
: 'mine_radio_nor')),
|
|
|
|
width: ScreenUtil().setWidth(34)),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
'跳过4',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
HEmptyView(50),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
|
|
jumpSeven = !jumpSeven;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath((jumpSeven
|
|
|
|
? 'mine_radio_sel'
|
|
|
|
: 'mine_radio_nor')),
|
|
|
|
width: ScreenUtil().setWidth(34)),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
'跳过7',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(26),
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
child: Row(children: [
|
|
|
|
Image.asset(Utils.getImgPath('mine_radio_nor'),
|
|
|
|
width: ScreenUtil().setWidth(36)),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'批量改名累加只适合纯数字桌位,如101',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
)
|
|
|
|
])),
|
|
|
|
VEmptyView(50),
|
|
|
|
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: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
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: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
textColor: controller.text == ''
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (controller.text.trim() == '') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap({
|
|
|
|
'name': controller.text,
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///输入框
|
|
|
|
static Widget textfield(
|
|
|
|
BuildContext context,
|
...
|
...
|
|