设施预约bug

pull/1/head
戴余标 3 years ago
parent a693c81e91
commit cae0380d42

@ -150,7 +150,11 @@ class FacilityAppointmentCard extends StatelessWidget {
? Column(
children: [
Container(
color: Colors.black12.withOpacity(0.25),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.w),
color: Color(0xFFF9F9F9),
),
width: double.infinity,
padding: EdgeInsets.all(10.w),
child: Text(
'作废原因:${model.nullifyReason??''}',
@ -160,6 +164,7 @@ class FacilityAppointmentCard extends StatelessWidget {
),
),
),
20.hb,
Row(
children: [
if (showTip)

@ -41,11 +41,36 @@ class _FacilityPreorderDatePickerState
getNum(widget.typeModel.openStartDT!),
(index) => index + 1);
DateTime? start;
List<int> models = [];
List models = [];
List<int> _selectIndex = [];
List<int> _selectDates = [];
_load() async {
BaseModel model =
await NetUtil().get(SAASAPI.facilities.allAppointmentPeriod, params: {
'facilitiesManageId': widget.typeModel.id,
'todayDate': DateTime.now(),
});
if (model.success) {
models = (model.data as List);
print(models);
}
setState(() {
});
}
@override
void initState() {
Future.delayed(
Duration.zero,
() => setState(() {
_load();
}));
super.initState();
}
@override
Widget build(BuildContext context) {
return BeeChooseDatePicker(
@ -80,16 +105,7 @@ class _FacilityPreorderDatePickerState
Widget _datesList(int index) {
DateTime start = widget.typeModel.openStartDT!;
() async {
BaseModel model =
await NetUtil().get(SAASAPI.facilities.allAppointmentPeriod, params: {
'facilitiesManageId': widget.typeModel.id,
'todayDate': DateTime.now(),
});
if (model.success) {
models = (model.data as List<int>);
}
};
return GestureDetector(
onTap: () {
//print(getNum(start)+index);
@ -130,7 +146,7 @@ class _FacilityPreorderDatePickerState
.color(Colors.black.withOpacity(0.45))
.make()
: models.contains(getNum(start) + index)
? '已被他人预约'
? '已被预约'
.text
.size(30.sp)
.color(Colors.black.withOpacity(0.45))

@ -1,3 +1,4 @@
import 'package:aku_new_community/widget/bee_image_network.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@ -19,7 +20,7 @@ class FacilityTypeCard extends StatelessWidget {
return MaterialButton(
color: Colors.white,
elevation: 0,
padding: EdgeInsets.all(30.w),
padding: EdgeInsets.all(25.w),
clipBehavior: Clip.antiAlias,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.w),
@ -29,13 +30,18 @@ class FacilityTypeCard extends StatelessWidget {
Material(
borderRadius: BorderRadius.circular(10.w),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: SAASAPI.image(ImgModel.first(model.imgUrls)),
child: BeeImageNetwork(
imgs: model.imgUrls??[],
height: 280.w,
width: double.infinity,
fit: BoxFit.cover,
),
// FadeInImage.assetNetwork(
// placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
// image: SAASAPI.image(ImgModel.first(model.imgUrls)),
// height: 280.w,
// width: double.infinity,
// fit: BoxFit.cover,
// ),
),
24.hb,
Row(

@ -9,6 +9,7 @@ import 'package:aku_new_community/model/common/img_model.dart';
import 'package:aku_new_community/utils/headers.dart';
import '../../../models/facility/facility_type_detail_model.dart';
import '../../../models/facility/facility_type_model.dart';
import '../../../widget/bee_image_network.dart';
import 'facility_preorder_page.dart';
class FacilityTypeDetailCard extends StatelessWidget {
@ -36,13 +37,19 @@ class FacilityTypeDetailCard extends StatelessWidget {
Material(
borderRadius: BorderRadius.circular(10.w),
clipBehavior: Clip.antiAliasWithSaveLayer,
child:FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: SAASAPI.image(ImgModel.first(model.imgList)),
child:BeeImageNetwork(
imgs: model.imgList??[],
height: 150.h,
width: 200.w,
fit: BoxFit.cover,
),
// FadeInImage.assetNetwork(
// placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
// image: SAASAPI.image(ImgModel.first(model.imgList)),
// height: 150.h,
// width: 200.w,
// fit: BoxFit.cover,
// ),
),
30.wb,
Column(

Loading…
Cancel
Save