import 'package:cs_resources/generated/l10n.dart'; import 'package:cs_resources/theme/app_colors_theme.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/src/widgets/framework.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:router/componentRouter/component_service_manager.dart'; import 'package:widgets/ext/ex_widget.dart'; import 'package:widgets/my_button.dart'; import 'package:widgets/my_text_view.dart'; import '../apply/form_terms_page.dart'; import 'form_detail_view_model.dart'; class DetailApprovedFragment extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final state = ref.watch(formDetailViewModelProvider); return SizedBox( width: double.infinity, height: double.infinity, child: Column( children: [ SingleChildScrollView( scrollDirection: Axis.vertical, physics: const BouncingScrollPhysics(), child: Container( width: double.infinity, color: context.appColors.whiteBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ //状态 MyTextView( S.current.approved, marginTop: 17, textColor: context.appColors.textPrimary, fontSize: 24, isFontMedium: true, ), MyTextView( S.current.status, marginTop: 12, textColor: context.appColors.textBlack, fontSize: 17, isFontRegular: true, ), //Send On时间 RichText( text: TextSpan( style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack), children: [ TextSpan( text: S.current.send_on_sometime(' '), ), TextSpan( text: state.forDetail?.sentOn ?? "-", style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack), ), ], ), ).marginOnly(top: 12), //处理时间 RichText( text: TextSpan( style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack), children: [ TextSpan( text: S.current.approved_on_sometime(' '), ), TextSpan( text: state.forDetail?.approvedOn ?? "-", style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack), ), ], ), ).marginOnly(top: 10), //分割线 Container( margin: const EdgeInsets.only(top: 19, bottom: 33), width: 260, color: context.appColors.dividerDefault, height: 0.5, ), //通行卡的数据 // MyTextView( // S.current.serial_number, // marginLeft: 50, // marginRight: 50, // textAlign: TextAlign.center, // textColor: context.appColors.textBlack, // fontSize: 17, // isFontRegular: true, // ), // // MyTextView( // "PL24087", // marginTop: 16, // marginBottom: 16, // textColor: context.appColors.textPrimary, // fontSize: 24, // isFontMedium: true, // ), //提示 Feedback 文本 MyTextView( S.current.send_feedback_management, marginBottom: 33, marginLeft: 50, marginRight: 50, textAlign: TextAlign.center, textColor: context.appColors.textBlack, fontSize: 15, isFontRegular: true, ), ], ), ), ).expanded(), Row( children: [ MyButton( onPressed: () { ComponentServiceManager().mainService.startFeedbackCreatePage(context: context); }, text: S.current.send_feedback, textColor: Colors.white, fontSize: 15, fontWeight: FontWeight.w400, radius: 7, backgroundColor: context.appColors.btnBgDefault, ).expanded(), const SizedBox(width: 10), MyButton( onPressed: () { FormTermsPage.startInstance( formType: state.typeId ?? "", estateFormId: state.estateFormId, formItem: null, enableEdit: false, formContent: state.forDetail?.content, ); }, text: S.current.view_application, textColor: Colors.white, fontSize: 15, fontWeight: FontWeight.w400, radius: 7, backgroundColor: context.appColors.greenBG, ).expanded(), ], ).marginOnly(left: 15, right: 15), MyButton( onPressed: () {}, text: S.current.remove, textColor: Colors.white, fontSize: 15, fontWeight: FontWeight.w400, radius: 7, backgroundColor: context.appColors.orangeBG, ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5), ], ), ); } }