detail_processing_fragment.dart 6.1 KB

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