|
|
@ -25,11 +25,16 @@ class BusinessFixCard extends StatefulWidget {
|
|
|
|
final BussinessAndFixModel model;
|
|
|
|
final BussinessAndFixModel model;
|
|
|
|
final bool homeDisplay;
|
|
|
|
final bool homeDisplay;
|
|
|
|
final bool canSeeBottomButton;
|
|
|
|
final bool canSeeBottomButton;
|
|
|
|
|
|
|
|
final VoidCallback callRefresh;
|
|
|
|
|
|
|
|
//是否是报事保修处理完成页面调用
|
|
|
|
|
|
|
|
final bool hasFinished;
|
|
|
|
BusinessFixCard(
|
|
|
|
BusinessFixCard(
|
|
|
|
{Key key,
|
|
|
|
{Key key,
|
|
|
|
@required this.model,
|
|
|
|
@required this.model,
|
|
|
|
this.homeDisplay = false,
|
|
|
|
this.homeDisplay = false,
|
|
|
|
this.canSeeBottomButton = true})
|
|
|
|
this.canSeeBottomButton = true,
|
|
|
|
|
|
|
|
this.callRefresh,
|
|
|
|
|
|
|
|
this.hasFinished = false})
|
|
|
|
: super(key: key);
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -70,8 +75,11 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return GestureDetector(
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () async {
|
|
|
|
Get.to(() => BusinessAndFixDetailPage(model: widget.model));
|
|
|
|
await Get.to(() => BusinessAndFixDetailPage(model: widget.model));
|
|
|
|
|
|
|
|
if (widget.callRefresh != null) {
|
|
|
|
|
|
|
|
widget.callRefresh();
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(24.w),
|
|
|
|
padding: EdgeInsets.all(24.w),
|
|
|
@ -93,9 +101,13 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
AkuMap.fixStatus(userInfoModel.canSendTicket,
|
|
|
|
widget.hasFinished
|
|
|
|
|
|
|
|
? '已处理'
|
|
|
|
|
|
|
|
: AkuMap.fixStatus(userInfoModel.canSendTicket,
|
|
|
|
userInfoModel.canPickUpTicket, widget.model.status),
|
|
|
|
userInfoModel.canPickUpTicket, widget.model.status),
|
|
|
|
style: TextStyle(
|
|
|
|
style: widget.hasFinished
|
|
|
|
|
|
|
|
? TextStyle(color: AppStyle.minorTextColor)
|
|
|
|
|
|
|
|
: TextStyle(
|
|
|
|
color: widget.model.status < 4
|
|
|
|
color: widget.model.status < 4
|
|
|
|
? Color(0XFFFF4501)
|
|
|
|
? Color(0XFFFF4501)
|
|
|
|
: AppStyle.minorTextColor,
|
|
|
|
: AppStyle.minorTextColor,
|
|
|
@ -194,8 +206,8 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
|
|
|
|
widget.model.status == 3 ? AkuBox.w(24) : SizedBox(),
|
|
|
|
widget.model.status == 3 ? AkuBox.w(24) : SizedBox(),
|
|
|
|
widget.model.status == 3
|
|
|
|
widget.model.status == 3
|
|
|
|
? AkuMaterialButton(
|
|
|
|
? AkuMaterialButton(
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () async {
|
|
|
|
Get.to(() => BusinessAndFixDetailPage(
|
|
|
|
await Get.to(() => BusinessAndFixDetailPage(
|
|
|
|
model: widget.model,
|
|
|
|
model: widget.model,
|
|
|
|
));
|
|
|
|
));
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -214,7 +226,7 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
|
|
|
|
: SizedBox(),
|
|
|
|
: SizedBox(),
|
|
|
|
(widget.model.status == 2) && (userInfoModel.canPickUpTicket)
|
|
|
|
(widget.model.status == 2) && (userInfoModel.canPickUpTicket)
|
|
|
|
? AkuMaterialButton(
|
|
|
|
? AkuMaterialButton(
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () async {
|
|
|
|
// final userProvider =
|
|
|
|
// final userProvider =
|
|
|
|
// Provider.of<UserProvider>(context, listen: false);
|
|
|
|
// Provider.of<UserProvider>(context, listen: false);
|
|
|
|
// widget.model.detail.fixStatuses.add(FixStatus(
|
|
|
|
// widget.model.detail.fixStatuses.add(FixStatus(
|
|
|
@ -223,9 +235,12 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
|
|
|
|
// ));
|
|
|
|
// ));
|
|
|
|
// widget.model.type = FIX_ENUM.PROCESSING;
|
|
|
|
// widget.model.type = FIX_ENUM.PROCESSING;
|
|
|
|
// Get.back();
|
|
|
|
// Get.back();
|
|
|
|
Get.to(() => BusinessAndFixDetailPage(
|
|
|
|
await Get.to(() => BusinessAndFixDetailPage(
|
|
|
|
model: widget.model,
|
|
|
|
model: widget.model,
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
if (widget.callRefresh != null) {
|
|
|
|
|
|
|
|
widget.callRefresh();
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
radius: 4.w,
|
|
|
|
radius: 4.w,
|
|
|
|
color: AppStyle.primaryColor,
|
|
|
|
color: AppStyle.primaryColor,
|
|
|
@ -252,8 +267,11 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: AkuMaterialButton(
|
|
|
|
child: AkuMaterialButton(
|
|
|
|
height: 64.w,
|
|
|
|
height: 64.w,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () async {
|
|
|
|
Get.to(() => BusinessAndFixDetailPage(model: widget.model));
|
|
|
|
Get.to(() => BusinessAndFixDetailPage(model: widget.model));
|
|
|
|
|
|
|
|
if (widget.callRefresh != null) {
|
|
|
|
|
|
|
|
widget.callRefresh();
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
radius: 4,
|
|
|
|
radius: 4,
|
|
|
|
color: AppStyle.primaryColor,
|
|
|
|
color: AppStyle.primaryColor,
|
|
|
|