|
@@ -85,6 +85,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
@@ -85,6 +85,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
85
|
MarketingCenterProvider marketingCenterProvider;
|
85
|
MarketingCenterProvider marketingCenterProvider;
|
|
86
|
List<String> imgAll = [];
|
86
|
List<String> imgAll = [];
|
|
87
|
|
87
|
|
|
|
|
88
|
+ TextEditingController _booktime1 = TextEditingController();
|
|
|
|
89
|
+ TextEditingController _booktime2 = TextEditingController();
|
|
|
|
90
|
+ TextEditingController _booktime3 = TextEditingController();
|
|
|
|
91
|
+ TextEditingController _booktime4 = TextEditingController();
|
|
|
|
92
|
+ TextEditingController _booktime5 = TextEditingController();
|
|
|
|
93
|
+
|
|
88
|
///获取接单时间接口
|
94
|
///获取接单时间接口
|
|
89
|
_getReceiveOrdersTime() async {
|
95
|
_getReceiveOrdersTime() async {
|
|
90
|
GetSellerInfoSunModel model = await bookSetTimeModel.getSellerById(context);
|
96
|
GetSellerInfoSunModel model = await bookSetTimeModel.getSellerById(context);
|
|
@@ -110,6 +116,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
@@ -110,6 +116,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
110
|
@override
|
116
|
@override
|
|
111
|
void initState() {
|
117
|
void initState() {
|
|
112
|
super.initState();
|
118
|
super.initState();
|
|
|
|
119
|
+
|
|
|
|
120
|
+ _booktime1.text = '早茶';
|
|
|
|
121
|
+ _booktime2.text = '午餐';
|
|
|
|
122
|
+ _booktime3.text = '晚餐';
|
|
|
|
123
|
+ _booktime4.text = '夜宵';
|
|
|
|
124
|
+
|
|
113
|
mapAddress = {
|
125
|
mapAddress = {
|
|
114
|
"address": '点击选择',
|
126
|
"address": '点击选择',
|
|
115
|
'lat': '',
|
127
|
'lat': '',
|
|
@@ -121,7 +133,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
@@ -121,7 +133,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
121
|
noon.end = '14:30';
|
133
|
noon.end = '14:30';
|
|
122
|
night.start = '16:00';
|
134
|
night.start = '16:00';
|
|
123
|
night.end = '21:00';
|
135
|
night.end = '21:00';
|
|
124
|
- swichState = [false, true, true];
|
136
|
+ swichState = [false, true, true, false, false];
|
|
125
|
Utils.changeStatusColor(color: MyColours.color_F8F9FD);
|
137
|
Utils.changeStatusColor(color: MyColours.color_F8F9FD);
|
|
126
|
_scrollController = ScrollController();
|
138
|
_scrollController = ScrollController();
|
|
127
|
receiveOrdersTime.start = '08:00';
|
139
|
receiveOrdersTime.start = '08:00';
|
|
@@ -762,7 +774,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
@@ -762,7 +774,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
762
|
context, afterImg,
|
774
|
context, afterImg,
|
|
763
|
needResize: true);
|
775
|
needResize: true);
|
|
764
|
|
776
|
|
|
765
|
- print(Utils.size(newImg.length));
|
777
|
+ print(Utils.size(newImg.length));
|
|
766
|
if (newImg != null) {
|
778
|
if (newImg != null) {
|
|
767
|
String path = await Utils.saveImage(newImg);
|
779
|
String path = await Utils.saveImage(newImg);
|
|
768
|
if (path == null) {
|
780
|
if (path == null) {
|
|
@@ -1295,26 +1307,77 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
@@ -1295,26 +1307,77 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
1295
|
);
|
1307
|
);
|
|
1296
|
}
|
1308
|
}
|
|
1297
|
|
1309
|
|
|
1298
|
- Widget _itemMorningNoonAngNight(String title, int tag) {
|
|
|
|
1299
|
- return InkWell(
|
|
|
|
1300
|
- onTap: () {
|
|
|
|
1301
|
- setState(() {
|
|
|
|
1302
|
- swichState[tag] = !swichState[tag];
|
|
|
|
1303
|
- });
|
|
|
|
1304
|
- },
|
|
|
|
1305
|
- child: Row(
|
|
|
|
1306
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
1307
|
- children: [
|
|
|
|
1308
|
- Text(title,
|
|
|
|
1309
|
- style: TextStyle(
|
|
|
|
1310
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
1311
|
- color: MyColours.color_999999)),
|
|
|
|
1312
|
- Image.asset(
|
|
|
|
1313
|
- Utils.getImgPath(
|
|
|
|
1314
|
- swichState[tag] ? 'store_swich_on' : 'store_swich_off'),
|
|
|
|
1315
|
- width: ScreenUtil().setWidth(38 * 2)),
|
|
|
|
1316
|
- ],
|
|
|
|
1317
|
- ),
|
1310
|
+ Widget _itemMorningNoonAngNight(int tag, TextEditingController booktimes) {
|
|
|
|
1311
|
+ return Row(
|
|
|
|
1312
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
1313
|
+ children: [
|
|
|
|
1314
|
+ Expanded(
|
|
|
|
1315
|
+ child: Container(
|
|
|
|
1316
|
+ // height: ScreenUtil().setWidth(50),
|
|
|
|
1317
|
+ // padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(24)),
|
|
|
|
1318
|
+ decoration: BoxDecoration(
|
|
|
|
1319
|
+ color: MyColours.color_F8F9FD,
|
|
|
|
1320
|
+ borderRadius: BorderRadius.circular(ScreenUtil().setWidth(28))),
|
|
|
|
1321
|
+ child: TextField(
|
|
|
|
1322
|
+ controller: booktimes,
|
|
|
|
1323
|
+ maxLines: 1,
|
|
|
|
1324
|
+ // inputFormatters: [
|
|
|
|
1325
|
+ // LengthLimitingTextInputFormatter(
|
|
|
|
1326
|
+ // 15),
|
|
|
|
1327
|
+ // // FilteringTextInputFormatter.digitsOnly
|
|
|
|
1328
|
+ // ],
|
|
|
|
1329
|
+
|
|
|
|
1330
|
+ // //光标颜色
|
|
|
|
1331
|
+ // cursorColor:
|
|
|
|
1332
|
+ // widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
1333
|
+ //输入文本的样式
|
|
|
|
1334
|
+ style: TextStyle(
|
|
|
|
1335
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
1336
|
+ color: MyColours.color_515151),
|
|
|
|
1337
|
+ focusNode: _phoneFocusNode,
|
|
|
|
1338
|
+ decoration: InputDecoration(
|
|
|
|
1339
|
+ border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
1340
|
+ hintText: '请输入餐段名称',
|
|
|
|
1341
|
+ hintStyle: TextStyle(
|
|
|
|
1342
|
+ color: MyColours.color_BFC4D4,
|
|
|
|
1343
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
1344
|
+ ),
|
|
|
|
1345
|
+ contentPadding: EdgeInsets.zero,
|
|
|
|
1346
|
+ isCollapsed: true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
1347
|
+ enabledBorder: new UnderlineInputBorder(
|
|
|
|
1348
|
+ borderSide: BorderSide.none,
|
|
|
|
1349
|
+ ),
|
|
|
|
1350
|
+
|
|
|
|
1351
|
+ focusedBorder: new UnderlineInputBorder(
|
|
|
|
1352
|
+ borderSide: BorderSide.none,
|
|
|
|
1353
|
+ ),
|
|
|
|
1354
|
+ ),
|
|
|
|
1355
|
+ onChanged: (value) {
|
|
|
|
1356
|
+ // if (editingController == _nameController) {
|
|
|
|
1357
|
+ // _nameController.text = value;
|
|
|
|
1358
|
+ // }
|
|
|
|
1359
|
+ },
|
|
|
|
1360
|
+ onEditingComplete: () {
|
|
|
|
1361
|
+ FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
1362
|
+ },
|
|
|
|
1363
|
+ keyboardType: TextInputType.text,
|
|
|
|
1364
|
+ ),
|
|
|
|
1365
|
+ )),
|
|
|
|
1366
|
+ // Text(title,
|
|
|
|
1367
|
+ // style: TextStyle(
|
|
|
|
1368
|
+ // fontSize: ScreenUtil().setSp(28),
|
|
|
|
1369
|
+ // color: MyColours.color_999999)),
|
|
|
|
1370
|
+ InkWell(
|
|
|
|
1371
|
+ onTap: () {
|
|
|
|
1372
|
+ setState(() {
|
|
|
|
1373
|
+ swichState[tag] = !swichState[tag];
|
|
|
|
1374
|
+ });
|
|
|
|
1375
|
+ },
|
|
|
|
1376
|
+ child: Image.asset(
|
|
|
|
1377
|
+ Utils.getImgPath(
|
|
|
|
1378
|
+ swichState[tag] ? 'store_swich_on' : 'store_swich_off'),
|
|
|
|
1379
|
+ width: ScreenUtil().setWidth(38 * 2))),
|
|
|
|
1380
|
+ ],
|
|
1318
|
);
|
1381
|
);
|
|
1319
|
}
|
1382
|
}
|
|
1320
|
|
1383
|
|
|
@@ -2113,27 +2176,73 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
@@ -2113,27 +2176,73 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { |
|
2113
|
),
|
2176
|
),
|
|
2114
|
child: Column(
|
2177
|
child: Column(
|
|
2115
|
children: [
|
2178
|
children: [
|
|
2116
|
- _itemMorningNoonAngNight('早市:', 0),
|
2179
|
+ _itemMorningNoonAngNight(0, _booktime1),
|
|
2117
|
VEmptyView(34),
|
2180
|
VEmptyView(34),
|
|
2118
|
swichState[0]
|
2181
|
swichState[0]
|
|
2119
|
? _itemBookTime(
|
2182
|
? _itemBookTime(
|
|
2120
|
morning.start, morning.end, 0)
|
2183
|
morning.start, morning.end, 0)
|
|
2121
|
: SizedBox(),
|
2184
|
: SizedBox(),
|
|
2122
|
VEmptyView(32),
|
2185
|
VEmptyView(32),
|
|
2123
|
- _itemMorningNoonAngNight('午市:', 1),
|
2186
|
+ _itemMorningNoonAngNight(1, _booktime2),
|
|
2124
|
VEmptyView(34),
|
2187
|
VEmptyView(34),
|
|
2125
|
swichState[1]
|
2188
|
swichState[1]
|
|
2126
|
? _itemBookTime(noon.start, noon.end, 1)
|
2189
|
? _itemBookTime(noon.start, noon.end, 1)
|
|
2127
|
: SizedBox(),
|
2190
|
: SizedBox(),
|
|
2128
|
VEmptyView(32),
|
2191
|
VEmptyView(32),
|
|
2129
|
- _itemMorningNoonAngNight('晚市:', 2),
|
2192
|
+ _itemMorningNoonAngNight(2, _booktime3),
|
|
2130
|
VEmptyView(34),
|
2193
|
VEmptyView(34),
|
|
2131
|
swichState[2]
|
2194
|
swichState[2]
|
|
2132
|
? _itemBookTime(
|
2195
|
? _itemBookTime(
|
|
2133
|
night.start, night.end, 2)
|
2196
|
night.start, night.end, 2)
|
|
2134
|
: SizedBox(),
|
2197
|
: SizedBox(),
|
|
|
|
2198
|
+ VEmptyView(32),
|
|
|
|
2199
|
+ _itemMorningNoonAngNight(3, _booktime4),
|
|
|
|
2200
|
+ VEmptyView(34),
|
|
|
|
2201
|
+ swichState[3]
|
|
|
|
2202
|
+ ? _itemBookTime(
|
|
|
|
2203
|
+ night.start, night.end, 3)
|
|
|
|
2204
|
+ : SizedBox(),
|
|
|
|
2205
|
+ VEmptyView(32),
|
|
|
|
2206
|
+ _itemMorningNoonAngNight(4, _booktime5),
|
|
|
|
2207
|
+ VEmptyView(34),
|
|
|
|
2208
|
+ swichState[4]
|
|
|
|
2209
|
+ ? _itemBookTime(
|
|
|
|
2210
|
+ night.start, night.end, 4)
|
|
|
|
2211
|
+ : SizedBox(),
|
|
2135
|
],
|
2212
|
],
|
|
2136
|
)),
|
2213
|
)),
|
|
|
|
2214
|
+ VEmptyView(34),
|
|
|
|
2215
|
+ InkWell(
|
|
|
|
2216
|
+ onTap: () {
|
|
|
|
2217
|
+ NavigatorUtil.goBookTimeSettingListPage(
|
|
|
|
2218
|
+ context);
|
|
|
|
2219
|
+ },
|
|
|
|
2220
|
+ child: Padding(
|
|
|
|
2221
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
2222
|
+ horizontal: ScreenUtil().setWidth(24)),
|
|
|
|
2223
|
+ child: Container(
|
|
|
|
2224
|
+ height: ScreenUtil().setWidth(40),
|
|
|
|
2225
|
+ child: Row(
|
|
|
|
2226
|
+ crossAxisAlignment:
|
|
|
|
2227
|
+ CrossAxisAlignment.center,
|
|
|
|
2228
|
+ mainAxisAlignment:
|
|
|
|
2229
|
+ MainAxisAlignment.spaceBetween,
|
|
|
|
2230
|
+ children: [
|
|
|
|
2231
|
+ Text('指定日期多时段预订设置',
|
|
|
|
2232
|
+ style: TextStyle(
|
|
|
|
2233
|
+ color: MyColours.color_999999,
|
|
|
|
2234
|
+ fontSize:
|
|
|
|
2235
|
+ ScreenUtil().setSp(28),
|
|
|
|
2236
|
+ )),
|
|
|
|
2237
|
+ Spacer(),
|
|
|
|
2238
|
+ Image.asset(
|
|
|
|
2239
|
+ Utils.getImgPath('arrow_right_new'),
|
|
|
|
2240
|
+ width: ScreenUtil().setWidth(16),
|
|
|
|
2241
|
+ height: ScreenUtil().setWidth(28),
|
|
|
|
2242
|
+ )
|
|
|
|
2243
|
+ ],
|
|
|
|
2244
|
+ ),
|
|
|
|
2245
|
+ ))),
|
|
2137
|
VEmptyView(96),
|
2246
|
VEmptyView(96),
|
|
2138
|
Text('接单时间',
|
2247
|
Text('接单时间',
|
|
2139
|
style: TextStyle(
|
2248
|
style: TextStyle(
|