|
...
|
...
|
@@ -85,6 +85,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
|
|
MarketingCenterProvider marketingCenterProvider;
|
|
|
|
List<String> imgAll = [];
|
|
|
|
|
|
|
|
TextEditingController _booktime1 = TextEditingController();
|
|
|
|
TextEditingController _booktime2 = TextEditingController();
|
|
|
|
TextEditingController _booktime3 = TextEditingController();
|
|
|
|
TextEditingController _booktime4 = TextEditingController();
|
|
|
|
TextEditingController _booktime5 = TextEditingController();
|
|
|
|
|
|
|
|
///获取接单时间接口
|
|
|
|
_getReceiveOrdersTime() async {
|
|
|
|
GetSellerInfoSunModel model = await bookSetTimeModel.getSellerById(context);
|
|
...
|
...
|
@@ -110,6 +116,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
_booktime1.text = '早茶';
|
|
|
|
_booktime2.text = '午餐';
|
|
|
|
_booktime3.text = '晚餐';
|
|
|
|
_booktime4.text = '夜宵';
|
|
|
|
|
|
|
|
mapAddress = {
|
|
|
|
"address": '点击选择',
|
|
|
|
'lat': '',
|
|
...
|
...
|
@@ -121,7 +133,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
|
|
noon.end = '14:30';
|
|
|
|
night.start = '16:00';
|
|
|
|
night.end = '21:00';
|
|
|
|
swichState = [false, true, true];
|
|
|
|
swichState = [false, true, true, false, false];
|
|
|
|
Utils.changeStatusColor(color: MyColours.color_F8F9FD);
|
|
|
|
_scrollController = ScrollController();
|
|
|
|
receiveOrdersTime.start = '08:00';
|
|
...
|
...
|
@@ -762,7 +774,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
|
|
context, afterImg,
|
|
|
|
needResize: true);
|
|
|
|
|
|
|
|
print(Utils.size(newImg.length));
|
|
|
|
print(Utils.size(newImg.length));
|
|
|
|
if (newImg != null) {
|
|
|
|
String path = await Utils.saveImage(newImg);
|
|
|
|
if (path == null) {
|
|
...
|
...
|
@@ -1295,26 +1307,77 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _itemMorningNoonAngNight(String title, int tag) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
swichState[tag] = !swichState[tag];
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(title,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_999999)),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
swichState[tag] ? 'store_swich_on' : 'store_swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(38 * 2)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Widget _itemMorningNoonAngNight(int tag, TextEditingController booktimes) {
|
|
|
|
return Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
// height: ScreenUtil().setWidth(50),
|
|
|
|
// padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(24)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_F8F9FD,
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(28))),
|
|
|
|
child: TextField(
|
|
|
|
controller: booktimes,
|
|
|
|
maxLines: 1,
|
|
|
|
// inputFormatters: [
|
|
|
|
// LengthLimitingTextInputFormatter(
|
|
|
|
// 15),
|
|
|
|
// // FilteringTextInputFormatter.digitsOnly
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
focusNode: _phoneFocusNode,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
hintText: '请输入餐段名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_BFC4D4,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
isCollapsed: true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
enabledBorder: new UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide.none,
|
|
|
|
),
|
|
|
|
|
|
|
|
focusedBorder: new UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide.none,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
// if (editingController == _nameController) {
|
|
|
|
// _nameController.text = value;
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
// Text(title,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// color: MyColours.color_999999)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
swichState[tag] = !swichState[tag];
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
swichState[tag] ? 'store_swich_on' : 'store_swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(38 * 2))),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -2113,27 +2176,73 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
_itemMorningNoonAngNight('早市:', 0),
|
|
|
|
_itemMorningNoonAngNight(0, _booktime1),
|
|
|
|
VEmptyView(34),
|
|
|
|
swichState[0]
|
|
|
|
? _itemBookTime(
|
|
|
|
morning.start, morning.end, 0)
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(32),
|
|
|
|
_itemMorningNoonAngNight('午市:', 1),
|
|
|
|
_itemMorningNoonAngNight(1, _booktime2),
|
|
|
|
VEmptyView(34),
|
|
|
|
swichState[1]
|
|
|
|
? _itemBookTime(noon.start, noon.end, 1)
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(32),
|
|
|
|
_itemMorningNoonAngNight('晚市:', 2),
|
|
|
|
_itemMorningNoonAngNight(2, _booktime3),
|
|
|
|
VEmptyView(34),
|
|
|
|
swichState[2]
|
|
|
|
? _itemBookTime(
|
|
|
|
night.start, night.end, 2)
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(32),
|
|
|
|
_itemMorningNoonAngNight(3, _booktime4),
|
|
|
|
VEmptyView(34),
|
|
|
|
swichState[3]
|
|
|
|
? _itemBookTime(
|
|
|
|
night.start, night.end, 3)
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(32),
|
|
|
|
_itemMorningNoonAngNight(4, _booktime5),
|
|
|
|
VEmptyView(34),
|
|
|
|
swichState[4]
|
|
|
|
? _itemBookTime(
|
|
|
|
night.start, night.end, 4)
|
|
|
|
: SizedBox(),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(34),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goBookTimeSettingListPage(
|
|
|
|
context);
|
|
|
|
},
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(24)),
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text('指定日期多时段预订设置',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(28),
|
|
|
|
)),
|
|
|
|
Spacer(),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('arrow_right_new'),
|
|
|
|
width: ScreenUtil().setWidth(16),
|
|
|
|
height: ScreenUtil().setWidth(28),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
))),
|
|
|
|
VEmptyView(96),
|
|
|
|
Text('接单时间',
|
|
|
|
style: TextStyle(
|
...
|
...
|
|