Commit 09f8325f31a7196e6e08b46205d0277cd304945d

Authored by wdn127929
1 parent 8f84f536

批量修改桌位名称+汉字

@@ -449,7 +449,7 @@ @@ -449,7 +449,7 @@
449 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 449 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
450 CLANG_ENABLE_MODULES = YES; 450 CLANG_ENABLE_MODULES = YES;
451 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 451 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
452 - CURRENT_PROJECT_VERSION = 55092; 452 + CURRENT_PROJECT_VERSION = 55093;
453 DEVELOPMENT_TEAM = 8J59HM8B82; 453 DEVELOPMENT_TEAM = 8J59HM8B82;
454 ENABLE_BITCODE = NO; 454 ENABLE_BITCODE = NO;
455 INFOPLIST_FILE = Runner/Info.plist; 455 INFOPLIST_FILE = Runner/Info.plist;
@@ -632,7 +632,7 @@ @@ -632,7 +632,7 @@
632 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 632 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
633 CLANG_ENABLE_MODULES = YES; 633 CLANG_ENABLE_MODULES = YES;
634 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 634 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
635 - CURRENT_PROJECT_VERSION = 55092; 635 + CURRENT_PROJECT_VERSION = 55093;
636 DEVELOPMENT_TEAM = 8J59HM8B82; 636 DEVELOPMENT_TEAM = 8J59HM8B82;
637 ENABLE_BITCODE = NO; 637 ENABLE_BITCODE = NO;
638 INFOPLIST_FILE = Runner/Info.plist; 638 INFOPLIST_FILE = Runner/Info.plist;
@@ -658,7 +658,7 @@ @@ -658,7 +658,7 @@
658 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 658 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
659 CLANG_ENABLE_MODULES = YES; 659 CLANG_ENABLE_MODULES = YES;
660 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 660 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
661 - CURRENT_PROJECT_VERSION = 55092; 661 + CURRENT_PROJECT_VERSION = 55093;
662 DEVELOPMENT_TEAM = 8J59HM8B82; 662 DEVELOPMENT_TEAM = 8J59HM8B82;
663 ENABLE_BITCODE = NO; 663 ENABLE_BITCODE = NO;
664 INFOPLIST_FILE = Runner/Info.plist; 664 INFOPLIST_FILE = Runner/Info.plist;
@@ -10,10 +10,10 @@ class Constant { @@ -10,10 +10,10 @@ class Constant {
10 * 10 *
11 * 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!! 11 * 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!!
12 * */ 12 * */
13 - // static const WXMiniProgramType wxMiniProgramType =  
14 - // WXMiniProgramType.release; //正式版  
15 static const WXMiniProgramType wxMiniProgramType = 13 static const WXMiniProgramType wxMiniProgramType =
16 - WXMiniProgramType.preview; //体验版 14 + WXMiniProgramType.release; //正式版
  15 + // static const WXMiniProgramType wxMiniProgramType =
  16 + // WXMiniProgramType.preview; //体验版
17 // static const WXMiniProgramType wxMiniProgramType = 17 // static const WXMiniProgramType wxMiniProgramType =
18 // WXMiniProgramType.test; //开发版 18 // WXMiniProgramType.test; //开发版
19 19
@@ -1628,9 +1628,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1628,9 +1628,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1628 !Utils.getAuthority( 1628 !Utils.getAuthority(
1629 context, '收银管理') 1629 context, '收银管理')
1630 ? Utils.getImgPath( 1630 ? Utils.getImgPath(
1631 - 'my_comment_un')  
1632 - : Utils.getImgPath(  
1633 - 'my_comment'), 1631 + 'finance_un')
  1632 + : Utils.getImgPath('finance'),
1634 '收银管理', 1633 '收银管理',
1635 isRowLow: outDay == '0' || 1634 isRowLow: outDay == '0' ||
1636 !Utils.getAuthority( 1635 !Utils.getAuthority(
@@ -1302,6 +1302,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -1302,6 +1302,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
1302 'skip_four': value['skip_four'], 1302 'skip_four': value['skip_four'],
1303 'skip_seven': value['skip_seven'], 1303 'skip_seven': value['skip_seven'],
1304 }; 1304 };
  1305 + if (value['fixname'] != null &&
  1306 + value['fixname']!
  1307 + .trim()
  1308 + .length >
  1309 + 0) {
  1310 + params['name_1'] =
  1311 + value['fixname'];
  1312 + }
1305 1313
1306 bool success = 1314 bool success =
1307 await tableManagerModel 1315 await tableManagerModel
@@ -5998,6 +5998,265 @@ class DialogUtil { @@ -5998,6 +5998,265 @@ class DialogUtil {
5998 }); 5998 });
5999 } 5999 }
6000 6000
  6001 + // ///批量改名
  6002 +
  6003 + // static Future openMyTableManageModifyTableNameDialog(
  6004 + // BuildContext context, {
  6005 + // CustomCallBackMap ?onTap,
  6006 + // }) async {
  6007 + // final action = await showDialog(
  6008 + // context: context,
  6009 + // barrierDismissible: false,
  6010 + // builder: (BuildContext context) {
  6011 + // TextEditingController controller = TextEditingController();
  6012 + // bool jumpFour = false;
  6013 + // bool jumpSeven = false;
  6014 + // return StatefulBuilder(builder: (context, state) {
  6015 + // // globalState = state;
  6016 +
  6017 + // return Scaffold(
  6018 + // backgroundColor: Colors.transparent,
  6019 + // body: Center(
  6020 + // child: Container(
  6021 + // // margin: EdgeInsets.only(top: ScreenUtil().setWidth(500)),
  6022 + // padding: EdgeInsets.symmetric(
  6023 + // horizontal: ScreenUtil().setWidth(50)),
  6024 + // // height: ScreenUtil().setWidth(286 * 2),
  6025 + // decoration: BoxDecoration(
  6026 + // borderRadius:
  6027 + // BorderRadius.circular(ScreenUtil().setWidth(10))),
  6028 + // child: Card(
  6029 + // shape: RoundedRectangleBorder(
  6030 + // borderRadius: BorderRadius.all(
  6031 + // Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角
  6032 + // child: Column(
  6033 + // mainAxisSize: MainAxisSize.min,
  6034 + // children: [
  6035 + // VEmptyView(54),
  6036 + // Container(
  6037 + // padding: EdgeInsets.symmetric(
  6038 + // horizontal: ScreenUtil().setWidth(44)),
  6039 + // // height: ScreenUtil().setWidth(48),
  6040 + // alignment: Alignment.center,
  6041 + // child: Text('批量改名',
  6042 + // style: TextStyle(
  6043 + // fontWeight: FontWeight.bold,
  6044 + // fontSize: ScreenUtil().setSp(34),
  6045 + // color: MyColours.color_333333)),
  6046 + // ),
  6047 + // VEmptyView(40),
  6048 + // Container(
  6049 + // margin: EdgeInsets.symmetric(
  6050 + // horizontal: ScreenUtil().setWidth(44)),
  6051 + // height: ScreenUtil().setWidth(48 * 2),
  6052 + // // margin: EdgeInsets.symmetric(
  6053 + // // horizontal:
  6054 + // // ScreenUtil().setWidth(40)),
  6055 + // decoration: BoxDecoration(
  6056 + // color: MyColours.color_f3f3f3,
  6057 + // borderRadius: BorderRadius.circular(
  6058 + // ScreenUtil().setWidth(10))),
  6059 + // child: Row(
  6060 + // crossAxisAlignment: CrossAxisAlignment.center,
  6061 + // children: [
  6062 + // HEmptyView(20),
  6063 + // Expanded(
  6064 + // child: TextField(
  6065 + // controller: controller,
  6066 + // maxLines: 1,
  6067 + // // //光标颜色
  6068 + // // cursorColor:
  6069 + // // widget.isSelect ? Colors.white : MyColours.color_199095,
  6070 + // //输入文本的样式
  6071 + // style: TextStyle(
  6072 + // fontSize: ScreenUtil().setSp(32),
  6073 + // color: MyColours.color_515151),
  6074 +
  6075 + // decoration: InputDecoration(
  6076 + // contentPadding: EdgeInsets.only(
  6077 + // bottom: ScreenUtil()
  6078 + // .setWidth(40)), //设置文字内容与边框距离
  6079 + // // enabledBorder: UnderlineInputBorder(
  6080 + // // borderSide: BorderSide(
  6081 + // // color: MyColours.color_efefef),
  6082 + // // ),
  6083 + // // focusedBorder: UnderlineInputBorder(
  6084 + // // borderSide: BorderSide(
  6085 + // // color: MyColours.color_efefef,
  6086 + // // width: ScreenUtil().setWidth(2)),
  6087 + // // ),
  6088 + // // prefixText: '*',
  6089 + // // prefixStyle: TextStyle(
  6090 + // // fontSize: ScreenUtil().setSp(32),
  6091 + // // color: MyColours.color_E95750),
  6092 + // border: OutlineInputBorder(
  6093 + // borderSide: BorderSide.none),
  6094 + // hintText: '桌位名称',
  6095 + // hintStyle: TextStyle(
  6096 + // color: MyColours.color_BFC4D4,
  6097 + // fontSize: ScreenUtil().setSp(32),
  6098 + // ),
  6099 + // ),
  6100 + // keyboardType: TextInputType.numberWithOptions(
  6101 + // decimal: true),
  6102 + // onChanged: (value) {
  6103 + // state(() {});
  6104 + // },
  6105 + // onEditingComplete: () {
  6106 + // FocusScope.of(context)
  6107 + // .requestFocus(FocusNode()); //点击空白处隐藏键盘
  6108 + // },
  6109 + // ),
  6110 + // )
  6111 + // ],
  6112 + // ),
  6113 + // ),
  6114 + // VEmptyView(36),
  6115 + // Container(
  6116 + // margin: EdgeInsets.symmetric(
  6117 + // horizontal: ScreenUtil().setWidth(44)),
  6118 + // child: Row(
  6119 + // children: [
  6120 + // InkWell(
  6121 + // onTap: () {
  6122 + // state(() {
  6123 + // jumpFour = !jumpFour;
  6124 + // });
  6125 + // },
  6126 + // child: Row(
  6127 + // crossAxisAlignment:
  6128 + // CrossAxisAlignment.center,
  6129 + // children: [
  6130 + // Image.asset(
  6131 + // Utils.getImgPath((jumpFour
  6132 + // ? 'mine_radio_sel'
  6133 + // : 'mine_radio_nor')),
  6134 + // width: ScreenUtil().setWidth(34)),
  6135 + // HEmptyView(4),
  6136 + // Text(
  6137 + // '跳过4',
  6138 + // style: TextStyle(
  6139 + // color: MyColours.color_515151,
  6140 + // fontSize: ScreenUtil().setSp(32)),
  6141 + // )
  6142 + // ],
  6143 + // )),
  6144 + // HEmptyView(50),
  6145 + // InkWell(
  6146 + // onTap: () {
  6147 + // state(() {
  6148 + // jumpSeven = !jumpSeven;
  6149 + // });
  6150 + // },
  6151 + // child: Row(
  6152 + // crossAxisAlignment:
  6153 + // CrossAxisAlignment.center,
  6154 + // children: [
  6155 + // Image.asset(
  6156 + // Utils.getImgPath((jumpSeven
  6157 + // ? 'mine_radio_sel'
  6158 + // : 'mine_radio_nor')),
  6159 + // width: ScreenUtil().setWidth(34)),
  6160 + // HEmptyView(4),
  6161 + // Text(
  6162 + // '跳过7',
  6163 + // style: TextStyle(
  6164 + // color: MyColours.color_515151,
  6165 + // fontSize: ScreenUtil().setSp(32)),
  6166 + // )
  6167 + // ],
  6168 + // )),
  6169 + // ],
  6170 + // )),
  6171 + // VEmptyView(26),
  6172 + // Container(
  6173 + // margin: EdgeInsets.symmetric(
  6174 + // horizontal: ScreenUtil().setWidth(44)),
  6175 + // child: Row(children: [
  6176 + // Image.asset(Utils.getImgPath('error-circle'),
  6177 + // width: ScreenUtil().setWidth(36)),
  6178 + // HEmptyView(8),
  6179 + // Text(
  6180 + // '批量改名累加只适合纯数字桌位,如101',
  6181 + // style: TextStyle(
  6182 + // color: MyColours.color_438E93,
  6183 + // fontSize: ScreenUtil().setSp(24)),
  6184 + // )
  6185 + // ])),
  6186 + // VEmptyView(50),
  6187 + // MyDivider(double.infinity, ScreenUtil().setWidth(2),
  6188 + // color: MyColours.color_f3f3f3),
  6189 + // Row(
  6190 + // // mainAxisAlignment:
  6191 + // // MainAxisAlignment.spaceBetween,
  6192 + // children: [
  6193 + // RoundButton(
  6194 + // text: '取消',
  6195 + // width: (ScreenUtil().screenWidth -
  6196 + // ScreenUtil().setWidth(62) * 2) /
  6197 + // 2,
  6198 + // height: ScreenUtil().setWidth(112),
  6199 + // radius: ScreenUtil().setWidth(0),
  6200 + // gradientStart: Colors.transparent,
  6201 + // gradientEnd: Colors.transparent,
  6202 + // textColor: MyColours.color_000000,
  6203 + // isBold: false,
  6204 + // fontSize: 34,
  6205 + // onPressed: () {
  6206 + // if (Navigator.canPop(context)) {
  6207 + // Navigator.pop(context);
  6208 + // }
  6209 + // }),
  6210 + // MyDivider(ScreenUtil().setWidth(2),
  6211 + // ScreenUtil().setWidth(112),
  6212 + // color: MyColours.color_f3f3f3),
  6213 + // RoundButton(
  6214 + // text: '确定',
  6215 + // width: (ScreenUtil().screenWidth -
  6216 + // ScreenUtil().setWidth(62) * 2) /
  6217 + // 2,
  6218 + // height: ScreenUtil().setWidth(112),
  6219 + // radius: ScreenUtil().setWidth(0),
  6220 + // gradientStart: Colors.transparent,
  6221 + // gradientEnd: Colors.transparent,
  6222 + // textColor: controller.text == ''
  6223 + // ? MyColours.color_999999
  6224 + // : MyColours.color_438E93,
  6225 + // fontSize: 34,
  6226 + // onPressed: () {
  6227 + // if (controller.text.trim() == '') {
  6228 + // Utils.showToast('请输入桌位名称!');
  6229 + // return;
  6230 + // }
  6231 + // if (!Utils.isNumber(controller.text)) {
  6232 + // Utils.showToast('请输入纯数字!');
  6233 + // return;
  6234 + // }
  6235 + // // 当前选中区域
  6236 + // // areas[currentAreaIndex]
  6237 + // //最低人数
  6238 + // // pnumMin
  6239 + // //最高人数
  6240 + // // pnumMax
  6241 +
  6242 + // onTap!({
  6243 + // 'name': controller.text,
  6244 + // 'skip_four': jumpFour ? '1' : '0',
  6245 + // 'skip_seven': jumpSeven ? '1' : '0'
  6246 + // });
  6247 + // if (Navigator.canPop(context)) {
  6248 + // Navigator.pop(context);
  6249 + // }
  6250 + // }),
  6251 + // ])
  6252 + // ],
  6253 + // ),
  6254 + // ),
  6255 + // )));
  6256 + // });
  6257 + // });
  6258 + // }
  6259 +
6001 ///批量改名 6260 ///批量改名
6002 6261
6003 static Future openMyTableManageModifyTableNameDialog( 6262 static Future openMyTableManageModifyTableNameDialog(
@@ -6008,6 +6267,7 @@ class DialogUtil { @@ -6008,6 +6267,7 @@ class DialogUtil {
6008 context: context, 6267 context: context,
6009 barrierDismissible: false, 6268 barrierDismissible: false,
6010 builder: (BuildContext context) { 6269 builder: (BuildContext context) {
  6270 + TextEditingController controllerFix = TextEditingController();
6011 TextEditingController controller = TextEditingController(); 6271 TextEditingController controller = TextEditingController();
6012 bool jumpFour = false; 6272 bool jumpFour = false;
6013 bool jumpSeven = false; 6273 bool jumpSeven = false;
@@ -6048,65 +6308,137 @@ class DialogUtil { @@ -6048,65 +6308,137 @@ class DialogUtil {
6048 Container( 6308 Container(
6049 margin: EdgeInsets.symmetric( 6309 margin: EdgeInsets.symmetric(
6050 horizontal: ScreenUtil().setWidth(44)), 6310 horizontal: ScreenUtil().setWidth(44)),
6051 - height: ScreenUtil().setWidth(48 * 2), 6311 + // height: ScreenUtil().setWidth(48 * 2),
6052 // margin: EdgeInsets.symmetric( 6312 // margin: EdgeInsets.symmetric(
6053 // horizontal: 6313 // horizontal:
6054 // ScreenUtil().setWidth(40)), 6314 // ScreenUtil().setWidth(40)),
6055 - decoration: BoxDecoration(  
6056 - color: MyColours.color_f3f3f3,  
6057 - borderRadius: BorderRadius.circular(  
6058 - ScreenUtil().setWidth(10))), 6315 + // decoration: BoxDecoration(
  6316 + // color: MyColours.color_f3f3f3,
  6317 + // borderRadius: BorderRadius.circular(
  6318 + // ScreenUtil().setWidth(10))),
6059 child: Row( 6319 child: Row(
6060 crossAxisAlignment: CrossAxisAlignment.center, 6320 crossAxisAlignment: CrossAxisAlignment.center,
6061 children: [ 6321 children: [
6062 - HEmptyView(20),  
6063 Expanded( 6322 Expanded(
6064 - child: TextField(  
6065 - controller: controller,  
6066 - maxLines: 1,  
6067 - // //光标颜色  
6068 - // cursorColor:  
6069 - // widget.isSelect ? Colors.white : MyColours.color_199095,  
6070 - //输入文本的样式  
6071 - style: TextStyle(  
6072 - fontSize: ScreenUtil().setSp(32),  
6073 - color: MyColours.color_515151), 6323 + child: Container(
  6324 + alignment: Alignment.center,
  6325 + height: ScreenUtil().setWidth(48 * 2),
  6326 + decoration: BoxDecoration(
  6327 + color: MyColours.color_f3f3f3,
  6328 + borderRadius: BorderRadius.circular(
  6329 + ScreenUtil().setWidth(10))),
  6330 + child: TextField(
  6331 + controller: controllerFix,
  6332 + maxLines: 1,
  6333 + // //光标颜色
  6334 + // cursorColor:
  6335 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  6336 + //输入文本的样式
  6337 + textAlign: TextAlign.center,
  6338 + style: TextStyle(
  6339 + fontSize: ScreenUtil().setSp(32),
  6340 + color: MyColours.color_515151),
6074 6341
6075 - decoration: InputDecoration(  
6076 - contentPadding: EdgeInsets.only(  
6077 - bottom: ScreenUtil()  
6078 - .setWidth(40)), //设置文字内容与边框距离  
6079 - // enabledBorder: UnderlineInputBorder(  
6080 - // borderSide: BorderSide(  
6081 - // color: MyColours.color_efefef),  
6082 - // ),  
6083 - // focusedBorder: UnderlineInputBorder(  
6084 - // borderSide: BorderSide(  
6085 - // color: MyColours.color_efefef,  
6086 - // width: ScreenUtil().setWidth(2)),  
6087 - // ),  
6088 - // prefixText: '*',  
6089 - // prefixStyle: TextStyle(  
6090 - // fontSize: ScreenUtil().setSp(32),  
6091 - // color: MyColours.color_E95750),  
6092 - border: OutlineInputBorder(  
6093 - borderSide: BorderSide.none),  
6094 - hintText: '桌位名称',  
6095 - hintStyle: TextStyle(  
6096 - color: MyColours.color_BFC4D4,  
6097 - fontSize: ScreenUtil().setSp(32),  
6098 - ),  
6099 - ),  
6100 - keyboardType: TextInputType.numberWithOptions(  
6101 - decimal: true),  
6102 - onChanged: (value) {  
6103 - state(() {});  
6104 - },  
6105 - onEditingComplete: () {  
6106 - FocusScope.of(context)  
6107 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
6108 - },  
6109 - ), 6342 + decoration: InputDecoration(
  6343 + contentPadding: EdgeInsets.only(
  6344 + bottom: ScreenUtil()
  6345 + .setWidth(40)), //设置文字内容与边框距离
  6346 + // enabledBorder: UnderlineInputBorder(
  6347 + // borderSide: BorderSide(
  6348 + // color: MyColours.color_efefef),
  6349 + // ),
  6350 + // focusedBorder: UnderlineInputBorder(
  6351 + // borderSide: BorderSide(
  6352 + // color: MyColours.color_efefef,
  6353 + // width: ScreenUtil().setWidth(2)),
  6354 + // ),
  6355 + // prefixText: '*',
  6356 + // prefixStyle: TextStyle(
  6357 + // fontSize: ScreenUtil().setSp(32),
  6358 + // color: MyColours.color_E95750),
  6359 + border: OutlineInputBorder(
  6360 + borderSide: BorderSide.none),
  6361 + hintText: '输入固定文本',
  6362 + hintStyle: TextStyle(
  6363 + color: MyColours.color_BFC4D4,
  6364 + fontSize: ScreenUtil().setSp(32),
  6365 + ),
  6366 + ),
  6367 + keyboardType: TextInputType.text,
  6368 + onChanged: (value) {
  6369 + state(() {});
  6370 + },
  6371 + onEditingComplete: () {
  6372 + FocusScope.of(context).requestFocus(
  6373 + FocusNode()); //点击空白处隐藏键盘
  6374 + },
  6375 + )),
  6376 + ),
  6377 + HEmptyView(26),
  6378 + Expanded(
  6379 + child: Container(
  6380 + alignment: Alignment.center,
  6381 + // margin: EdgeInsets.symmetric(
  6382 + // horizontal: ScreenUtil().setWidth(44)),
  6383 + height: ScreenUtil().setWidth(48 * 2),
  6384 + // margin: EdgeInsets.symmetric(
  6385 + // horizontal:
  6386 + // ScreenUtil().setWidth(40)),
  6387 + decoration: BoxDecoration(
  6388 + color: MyColours.color_f3f3f3,
  6389 + borderRadius: BorderRadius.circular(
  6390 + ScreenUtil().setWidth(10))),
  6391 + child: TextField(
  6392 + controller: controller,
  6393 + maxLines: 1,
  6394 + // //光标颜色
  6395 + // cursorColor:
  6396 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  6397 + //输入文本的样式
  6398 + textAlign: TextAlign.center,
  6399 + style: TextStyle(
  6400 + fontSize: ScreenUtil().setSp(32),
  6401 + color: MyColours.color_515151),
  6402 + inputFormatters: [
  6403 + FilteringTextInputFormatter
  6404 + .digitsOnly //只允许输入数字
  6405 + ],
  6406 + decoration: InputDecoration(
  6407 + contentPadding: EdgeInsets.only(
  6408 + bottom: ScreenUtil()
  6409 + .setWidth(40)), //设置文字内容与边框距离
  6410 + // enabledBorder: UnderlineInputBorder(
  6411 + // borderSide: BorderSide(
  6412 + // color: MyColours.color_efefef),
  6413 + // ),
  6414 + // focusedBorder: UnderlineInputBorder(
  6415 + // borderSide: BorderSide(
  6416 + // color: MyColours.color_efefef,
  6417 + // width: ScreenUtil().setWidth(2)),
  6418 + // ),
  6419 + // prefixText: '*',
  6420 + // prefixStyle: TextStyle(
  6421 + // fontSize: ScreenUtil().setSp(32),
  6422 + // color: MyColours.color_E95750),
  6423 + border: OutlineInputBorder(
  6424 + borderSide: BorderSide.none),
  6425 + hintText: '输入可变数字',
  6426 + hintStyle: TextStyle(
  6427 + color: MyColours.color_BFC4D4,
  6428 + fontSize: ScreenUtil().setSp(32),
  6429 + ),
  6430 + ),
  6431 + keyboardType:
  6432 + TextInputType.numberWithOptions(
  6433 + decimal: true),
  6434 + onChanged: (value) {
  6435 + state(() {});
  6436 + },
  6437 + onEditingComplete: () {
  6438 + FocusScope.of(context).requestFocus(
  6439 + FocusNode()); //点击空白处隐藏键盘
  6440 + },
  6441 + )),
6110 ) 6442 )
6111 ], 6443 ],
6112 ), 6444 ),
@@ -6177,7 +6509,7 @@ class DialogUtil { @@ -6177,7 +6509,7 @@ class DialogUtil {
6177 width: ScreenUtil().setWidth(36)), 6509 width: ScreenUtil().setWidth(36)),
6178 HEmptyView(8), 6510 HEmptyView(8),
6179 Text( 6511 Text(
6180 - '批量改名累加只适合纯数字桌位,如101', 6512 + '适合xxx01、xxx02类型命名桌位',
6181 style: TextStyle( 6513 style: TextStyle(
6182 color: MyColours.color_438E93, 6514 color: MyColours.color_438E93,
6183 fontSize: ScreenUtil().setSp(24)), 6515 fontSize: ScreenUtil().setSp(24)),
@@ -6219,13 +6551,13 @@ class DialogUtil { @@ -6219,13 +6551,13 @@ class DialogUtil {
6219 radius: ScreenUtil().setWidth(0), 6551 radius: ScreenUtil().setWidth(0),
6220 gradientStart: Colors.transparent, 6552 gradientStart: Colors.transparent,
6221 gradientEnd: Colors.transparent, 6553 gradientEnd: Colors.transparent,
6222 - textColor: controller.text == '' 6554 + textColor: controller.text.trim().length == 0
6223 ? MyColours.color_999999 6555 ? MyColours.color_999999
6224 : MyColours.color_438E93, 6556 : MyColours.color_438E93,
6225 fontSize: 34, 6557 fontSize: 34,
6226 onPressed: () { 6558 onPressed: () {
6227 if (controller.text.trim() == '') { 6559 if (controller.text.trim() == '') {
6228 - Utils.showToast('请输入桌位名称!'); 6560 + Utils.showToast('请输入可变数字');
6229 return; 6561 return;
6230 } 6562 }
6231 if (!Utils.isNumber(controller.text)) { 6563 if (!Utils.isNumber(controller.text)) {
@@ -6240,6 +6572,7 @@ class DialogUtil { @@ -6240,6 +6572,7 @@ class DialogUtil {
6240 // pnumMax 6572 // pnumMax
6241 6573
6242 onTap!({ 6574 onTap!({
  6575 + 'fixname': controllerFix.text,
6243 'name': controller.text, 6576 'name': controller.text,
6244 'skip_four': jumpFour ? '1' : '0', 6577 'skip_four': jumpFour ? '1' : '0',
6245 'skip_seven': jumpSeven ? '1' : '0' 6578 'skip_seven': jumpSeven ? '1' : '0'
@@ -1453,13 +1453,13 @@ class Utils { @@ -1453,13 +1453,13 @@ class Utils {
1453 1453
1454 Fluwx fluwx = Fluwx(); 1454 Fluwx fluwx = Fluwx();
1455 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail); 1455 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
1456 - Uint8List? result=pngByte; 1456 + Uint8List? result = pngByte;
1457 1457
1458 if (pngByte != null && await isImageLargerThan120KB(pngByte)) { 1458 if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
1459 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片 1459 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
1460 result = resultnew == null 1460 result = resultnew == null
1461 ? null 1461 ? null
1462 - : await compressImage(resultnew, mb: 120/ 1024); 1462 + : await compressImage(resultnew, mb: 120 / 1024);
1463 } 1463 }
1464 var model = new WeChatShareMiniProgramModel( 1464 var model = new WeChatShareMiniProgramModel(
1465 miniProgramType: Constant.wxMiniProgramType, 1465 miniProgramType: Constant.wxMiniProgramType,
@@ -1501,7 +1501,7 @@ class Utils { @@ -1501,7 +1501,7 @@ class Utils {
1501 // Uint8List source = await testComporessList(context, _thumbnail); 1501 // Uint8List source = await testComporessList(context, _thumbnail);
1502 Fluwx fluwx = Fluwx(); 1502 Fluwx fluwx = Fluwx();
1503 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail); 1503 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
1504 - Uint8List? result=pngByte; 1504 + Uint8List? result = pngByte;
1505 if (pngByte != null && await isImageLargerThan120KB(pngByte)) { 1505 if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
1506 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片 1506 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
1507 result = resultnew == null 1507 result = resultnew == null
@@ -1596,7 +1596,7 @@ class Utils { @@ -1596,7 +1596,7 @@ class Utils {
1596 // Uint8List source = await testComporessList(context, _thumbnail); 1596 // Uint8List source = await testComporessList(context, _thumbnail);
1597 Fluwx fluwx = Fluwx(); 1597 Fluwx fluwx = Fluwx();
1598 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail); 1598 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
1599 - Uint8List? result=pngByte; 1599 + Uint8List? result = pngByte;
1600 if (pngByte != null && await isImageLargerThan120KB(pngByte)) { 1600 if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
1601 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片 1601 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
1602 result = resultnew == null 1602 result = resultnew == null
@@ -1774,7 +1774,7 @@ class Utils { @@ -1774,7 +1774,7 @@ class Utils {
1774 minHeight: minHeight, 1774 minHeight: minHeight,
1775 quality: quality, 1775 quality: quality,
1776 ); 1776 );
1777 - 1777 + print(size(result.length));
1778 return result; 1778 return result;
1779 } 1779 }
1780 1780
@@ -2029,7 +2029,7 @@ class Utils { @@ -2029,7 +2029,7 @@ class Utils {
2029 String _description = "诚邀您参加储值优惠活动,点击查看详情。"; 2029 String _description = "诚邀您参加储值优惠活动,点击查看详情。";
2030 // Uint8List source = await testComporessList(context, _thumbnail); 2030 // Uint8List source = await testComporessList(context, _thumbnail);
2031 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail); 2031 Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
2032 - Uint8List? result=pngByte; 2032 + Uint8List? result = pngByte;
2033 if (pngByte != null && await isImageLargerThan120KB(pngByte)) { 2033 if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
2034 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片 2034 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
2035 result = resultnew == null 2035 result = resultnew == null
@@ -3200,7 +3200,8 @@ class Utils { @@ -3200,7 +3200,8 @@ class Utils {
3200 String _thumbnail = sellerImage == null || sellerImage == '' 3200 String _thumbnail = sellerImage == null || sellerImage == ''
3201 ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png' 3201 ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
3202 : sellerImage; 3202 : sellerImage;
3203 - late Uint8List? _thumbnailUint8List; 3203 + Uint8List? _thumbnailUint8List =
  3204 + await WxSdk.fetchImageAsUint8List(_thumbnail);
3204 print(size(_thumbnail.length)); 3205 print(size(_thumbnail.length));
3205 3206
3206 String dsoltStr = '${ddateHm == null || ddateHm == '' ? '' : ddateHm}'; 3207 String dsoltStr = '${ddateHm == null || ddateHm == '' ? '' : ddateHm}';
@@ -3286,7 +3287,16 @@ class Utils { @@ -3286,7 +3287,16 @@ class Utils {
3286 _thumbnailUint8List = pngByte; 3287 _thumbnailUint8List = pngByte;
3287 if (pngByte != null && await isImageLargerThan120KB(pngByte)) { 3288 if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
3288 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片 3289 Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
3289 - _thumbnailUint8List= resultnew == null 3290 + _thumbnailUint8List = resultnew == null
  3291 + ? null
  3292 + : await compressImage(resultnew, mb: 120 / 1024);
  3293 + }
  3294 + } else {
  3295 + if (_thumbnailUint8List != null &&
  3296 + await isImageLargerThan120KB(_thumbnailUint8List)) {
  3297 + Uint8List? resultnew =
  3298 + await realComporessList(_thumbnailUint8List); //压缩图片
  3299 + _thumbnailUint8List = resultnew == null
3290 ? null 3300 ? null
3291 : await compressImage(resultnew, mb: 120 / 1024); 3301 : await compressImage(resultnew, mb: 120 / 1024);
3292 } 3302 }