|
...
|
...
|
@@ -5998,6 +5998,265 @@ class DialogUtil { |
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// ///批量改名
|
|
|
|
|
|
|
|
// 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 Scaffold(
|
|
|
|
// backgroundColor: Colors.transparent,
|
|
|
|
// body: 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(
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// VEmptyView(54),
|
|
|
|
// 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),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// keyboardType: TextInputType.numberWithOptions(
|
|
|
|
// decimal: true),
|
|
|
|
// onChanged: (value) {
|
|
|
|
// state(() {});
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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('error-circle'),
|
|
|
|
// 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().screenWidth -
|
|
|
|
// ScreenUtil().setWidth(62) * 2) /
|
|
|
|
// 2,
|
|
|
|
// height: ScreenUtil().setWidth(112),
|
|
|
|
// radius: ScreenUtil().setWidth(0),
|
|
|
|
// gradientStart: Colors.transparent,
|
|
|
|
// gradientEnd: Colors.transparent,
|
|
|
|
// textColor: MyColours.color_000000,
|
|
|
|
// isBold: false,
|
|
|
|
// fontSize: 34,
|
|
|
|
// onPressed: () {
|
|
|
|
// if (Navigator.canPop(context)) {
|
|
|
|
// 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(0),
|
|
|
|
// gradientStart: Colors.transparent,
|
|
|
|
// gradientEnd: Colors.transparent,
|
|
|
|
// textColor: controller.text == ''
|
|
|
|
// ? MyColours.color_999999
|
|
|
|
// : MyColours.color_438E93,
|
|
|
|
// fontSize: 34,
|
|
|
|
// onPressed: () {
|
|
|
|
// if (controller.text.trim() == '') {
|
|
|
|
// Utils.showToast('请输入桌位名称!');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (!Utils.isNumber(controller.text)) {
|
|
|
|
// Utils.showToast('请输入纯数字!');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// // 当前选中区域
|
|
|
|
// // areas[currentAreaIndex]
|
|
|
|
// //最低人数
|
|
|
|
// // pnumMin
|
|
|
|
// //最高人数
|
|
|
|
// // pnumMax
|
|
|
|
|
|
|
|
// onTap!({
|
|
|
|
// 'name': controller.text,
|
|
|
|
// 'skip_four': jumpFour ? '1' : '0',
|
|
|
|
// 'skip_seven': jumpSeven ? '1' : '0'
|
|
|
|
// });
|
|
|
|
// if (Navigator.canPop(context)) {
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// }
|
|
|
|
// }),
|
|
|
|
// ])
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )));
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
///批量改名
|
|
|
|
|
|
|
|
static Future openMyTableManageModifyTableNameDialog(
|
|
...
|
...
|
@@ -6008,6 +6267,7 @@ class DialogUtil { |
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
TextEditingController controllerFix = TextEditingController();
|
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
bool jumpFour = false;
|
|
|
|
bool jumpSeven = false;
|
|
...
|
...
|
@@ -6048,65 +6308,137 @@ class DialogUtil { |
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
// height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
// margin: EdgeInsets.symmetric(
|
|
|
|
// horizontal:
|
|
|
|
// ScreenUtil().setWidth(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
// 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),
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
child: TextField(
|
|
|
|
controller: controllerFix,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
),
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context).requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
HEmptyView(26),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
// 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: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
inputFormatters: [
|
|
|
|
FilteringTextInputFormatter
|
|
|
|
.digitsOnly //只允许输入数字
|
|
|
|
],
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context).requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -6177,7 +6509,7 @@ class DialogUtil { |
|
|
|
width: ScreenUtil().setWidth(36)),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'批量改名累加只适合纯数字桌位,如101',
|
|
|
|
'适合xxx01、xxx02类型命名桌位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
...
|
...
|
@@ -6219,13 +6551,13 @@ class DialogUtil { |
|
|
|
radius: ScreenUtil().setWidth(0),
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
textColor: controller.text == ''
|
|
|
|
textColor: controller.text.trim().length == 0
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_438E93,
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (controller.text.trim() == '') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
Utils.showToast('请输入可变数字');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!Utils.isNumber(controller.text)) {
|
|
...
|
...
|
@@ -6240,6 +6572,7 @@ class DialogUtil { |
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap!({
|
|
|
|
'fixname': controllerFix.text,
|
|
|
|
'name': controller.text,
|
|
|
|
'skip_four': jumpFour ? '1' : '0',
|
|
|
|
'skip_seven': jumpSeven ? '1' : '0'
|
...
|
...
|
|