|
...
|
...
|
@@ -51,7 +51,9 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { |
|
|
|
_focusNode.addListener(() {
|
|
|
|
if (_focusNode.hasFocus) {
|
|
|
|
//有焦点
|
|
|
|
_editingController.text = '¥';
|
|
|
|
if (_editingController.text.length == 0) {
|
|
|
|
_editingController.text = '¥';
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
//失去焦点
|
|
|
|
// _editingController.text = '';
|
|
...
|
...
|
@@ -122,8 +124,10 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { |
|
|
|
await _onlineCheckEditProvider.updateOrderInfo(context, params);
|
|
|
|
if (result) {
|
|
|
|
// 跳转至在线买单处理完的详情页面
|
|
|
|
NavigatorUtil.goOnlineCheckDetailPage(context,
|
|
|
|
rid: '${widget.rid}', replace: true);
|
|
|
|
Future.delayed(Duration(milliseconds: 200), () {
|
|
|
|
NavigatorUtil.goOnlineCheckDetailPage(context,
|
|
|
|
rid: '${widget.rid}', replace: true);
|
|
|
|
});
|
|
|
|
setMessageStatus();
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -334,46 +338,46 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { |
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _editingController,
|
|
|
|
focusNode: _focusNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "点击填写金额",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_9C9C9C,
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
maxLines: 1,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _editingController,
|
|
|
|
focusNode: _focusNode,
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.numberWithOptions(decimal: true),
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "点击填写金额",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_9C9C9C,
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
border: InputBorder.none,
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
border: InputBorder.none,
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print(value);
|
|
|
|
// currentRemark = value;
|
|
|
|
// print();
|
|
|
|
setState(() {
|
|
|
|
if (value != '¥' && value.trim().length > 0) {
|
|
|
|
btnState = 1;
|
|
|
|
} else {
|
|
|
|
btnState = -1;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_focusNode.unfocus();
|
|
|
|
onChanged: (value) {
|
|
|
|
print(value);
|
|
|
|
// currentRemark = value;
|
|
|
|
// print();
|
|
|
|
setState(() {
|
|
|
|
if (value != '¥' && value.trim().length > 0) {
|
|
|
|
btnState = 1;
|
|
|
|
} else {
|
|
|
|
btnState = -1;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_focusNode.unfocus();
|
|
|
|
|
|
|
|
// _editingController.text = '';
|
|
|
|
// _needNode.unfocus();
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
))
|
|
|
|
// _editingController.text = '';
|
|
|
|
// _needNode.unfocus();
|
|
|
|
}))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
...
|
...
|
@@ -495,79 +499,86 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { |
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _scrollController,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
//图标
|
|
|
|
_getLogoWidget(),
|
|
|
|
VEmptyView(40),
|
|
|
|
_getTabAndMoneyInfoWidget(),
|
|
|
|
VEmptyView(10),
|
|
|
|
// 备注信息
|
|
|
|
Offstage(
|
|
|
|
offstage:
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel !=
|
|
|
|
null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.orderRemark ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel !=
|
|
|
|
null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.orderRemark
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_FD5656),
|
|
|
|
body: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_focusNode.unfocus();
|
|
|
|
},
|
|
|
|
child: Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _scrollController,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
//图标
|
|
|
|
_getLogoWidget(),
|
|
|
|
VEmptyView(40),
|
|
|
|
_getTabAndMoneyInfoWidget(),
|
|
|
|
VEmptyView(10),
|
|
|
|
// 备注信息
|
|
|
|
Offstage(
|
|
|
|
offstage:
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel !=
|
|
|
|
null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.orderRemark ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel !=
|
|
|
|
null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.orderRemark
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_FD5656),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
ImgPickerWidget(scrollController: _scrollController),
|
|
|
|
VEmptyView(20),
|
|
|
|
_customInfoWidget()
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(ScreenUtil().setWidth(16), 0,
|
|
|
|
ScreenUtil().setWidth(16), ScreenUtil().setWidth(40)),
|
|
|
|
child: CommonButton(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 84,
|
|
|
|
fontSize: 34,
|
|
|
|
content: '发送给顾客',
|
|
|
|
state: btnState,
|
|
|
|
onPress: () async {
|
|
|
|
if (_editingController.text.startsWith('¥') &&
|
|
|
|
_editingController.text.length == 1) {
|
|
|
|
Utils.showToast('请输入金额');
|
|
|
|
setState(() {
|
|
|
|
btnState = -1;
|
|
|
|
VEmptyView(20),
|
|
|
|
ImgPickerWidget(
|
|
|
|
scrollController: _scrollController),
|
|
|
|
VEmptyView(20),
|
|
|
|
_customInfoWidget()
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(ScreenUtil().setWidth(16), 0,
|
|
|
|
ScreenUtil().setWidth(16), ScreenUtil().setWidth(40)),
|
|
|
|
child: CommonButton(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 84,
|
|
|
|
fontSize: 34,
|
|
|
|
content: '发送给顾客',
|
|
|
|
state: btnState,
|
|
|
|
onPress: () async {
|
|
|
|
if (_editingController.text.startsWith('¥') &&
|
|
|
|
_editingController.text.length == 1) {
|
|
|
|
Utils.showToast('请输入金额');
|
|
|
|
setState(() {
|
|
|
|
btnState = -1;
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
DialogUtil.confirmDialog(
|
|
|
|
context, _editingController.text, 426, onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
_updateOrderInfo();
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
DialogUtil.confirmDialog(
|
|
|
|
context, _editingController.text, 426, onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
_updateOrderInfo();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
},
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|