detail_approved_fragment.dart 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. import 'package:cs_resources/generated/l10n.dart';
  2. import 'package:cs_resources/theme/app_colors_theme.dart';
  3. import 'package:flutter/cupertino.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:flutter/src/widgets/framework.dart';
  6. import 'package:hooks_riverpod/hooks_riverpod.dart';
  7. import 'package:router/componentRouter/component_service_manager.dart';
  8. import 'package:widgets/ext/ex_widget.dart';
  9. import 'package:widgets/my_button.dart';
  10. import 'package:widgets/my_text_view.dart';
  11. import '../apply/form_terms_page.dart';
  12. import 'form_detail_view_model.dart';
  13. class DetailApprovedFragment extends HookConsumerWidget {
  14. @override
  15. Widget build(BuildContext context, WidgetRef ref) {
  16. final state = ref.watch(formDetailViewModelProvider);
  17. return SizedBox(
  18. width: double.infinity,
  19. height: double.infinity,
  20. child: Column(
  21. children: [
  22. SingleChildScrollView(
  23. scrollDirection: Axis.vertical,
  24. physics: const BouncingScrollPhysics(),
  25. child: Container(
  26. width: double.infinity,
  27. color: context.appColors.whiteBG,
  28. child: Column(
  29. mainAxisSize: MainAxisSize.min,
  30. crossAxisAlignment: CrossAxisAlignment.center,
  31. children: [
  32. //状态
  33. MyTextView(
  34. S.current.approved,
  35. marginTop: 17,
  36. textColor: context.appColors.textPrimary,
  37. fontSize: 24,
  38. isFontMedium: true,
  39. ),
  40. MyTextView(
  41. S.current.status,
  42. marginTop: 12,
  43. textColor: context.appColors.textBlack,
  44. fontSize: 17,
  45. isFontRegular: true,
  46. ),
  47. //Send On时间
  48. RichText(
  49. text: TextSpan(
  50. style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
  51. children: <TextSpan>[
  52. TextSpan(
  53. text: S.current.send_on_sometime(' '),
  54. ),
  55. TextSpan(
  56. text: state.forDetail?.sentOn ?? "-",
  57. style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
  58. ),
  59. ],
  60. ),
  61. ).marginOnly(top: 12),
  62. //处理时间
  63. RichText(
  64. text: TextSpan(
  65. style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
  66. children: <TextSpan>[
  67. TextSpan(
  68. text: S.current.approved_on_sometime(' '),
  69. ),
  70. TextSpan(
  71. text: state.forDetail?.approvedOn ?? "-",
  72. style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
  73. ),
  74. ],
  75. ),
  76. ).marginOnly(top: 10),
  77. //分割线
  78. Container(
  79. margin: const EdgeInsets.only(top: 19, bottom: 33),
  80. width: 260,
  81. color: context.appColors.dividerDefault,
  82. height: 0.5,
  83. ),
  84. //通行卡的数据
  85. // MyTextView(
  86. // S.current.serial_number,
  87. // marginLeft: 50,
  88. // marginRight: 50,
  89. // textAlign: TextAlign.center,
  90. // textColor: context.appColors.textBlack,
  91. // fontSize: 17,
  92. // isFontRegular: true,
  93. // ),
  94. //
  95. // MyTextView(
  96. // "PL24087",
  97. // marginTop: 16,
  98. // marginBottom: 16,
  99. // textColor: context.appColors.textPrimary,
  100. // fontSize: 24,
  101. // isFontMedium: true,
  102. // ),
  103. //提示 Feedback 文本
  104. MyTextView(
  105. S.current.send_feedback_management,
  106. marginBottom: 33,
  107. marginLeft: 50,
  108. marginRight: 50,
  109. textAlign: TextAlign.center,
  110. textColor: context.appColors.textBlack,
  111. fontSize: 15,
  112. isFontRegular: true,
  113. ),
  114. ],
  115. ),
  116. ),
  117. ).expanded(),
  118. Row(
  119. children: [
  120. MyButton(
  121. onPressed: () {
  122. ComponentServiceManager().mainService.startFeedbackCreatePage(context: context);
  123. },
  124. text: S.current.send_feedback,
  125. textColor: Colors.white,
  126. fontSize: 15,
  127. fontWeight: FontWeight.w400,
  128. radius: 7,
  129. backgroundColor: context.appColors.btnBgDefault,
  130. ).expanded(),
  131. const SizedBox(width: 10),
  132. MyButton(
  133. onPressed: () {
  134. FormTermsPage.startInstance(
  135. formType: state.typeId ?? "",
  136. estateFormId: state.estateFormId,
  137. formItem: null,
  138. enableEdit: false,
  139. formContent: state.forDetail?.content,
  140. );
  141. },
  142. text: S.current.view_application,
  143. textColor: Colors.white,
  144. fontSize: 15,
  145. fontWeight: FontWeight.w400,
  146. radius: 7,
  147. backgroundColor: context.appColors.greenBG,
  148. ).expanded(),
  149. ],
  150. ).marginOnly(left: 15, right: 15),
  151. MyButton(
  152. onPressed: () {},
  153. text: S.current.remove,
  154. textColor: Colors.white,
  155. fontSize: 15,
  156. fontWeight: FontWeight.w400,
  157. radius: 7,
  158. backgroundColor: context.appColors.orangeBG,
  159. ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5),
  160. ],
  161. ),
  162. );
  163. }
  164. }