constants_services.dart 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. import 'package:cs_resources/generated/l10n.dart';
  2. class servicesConstants {
  3. static Map<String, Map<String, dynamic>> servicesType = {
  4. "houseCleaning": {
  5. "text": S.current.house_cleaning,
  6. "type": "paid",
  7. 'code': "House Cleaning", // 业务做 标识 字段
  8. },
  9. "airConditioner": {
  10. "text": S.current.air_conditioning_cleaning,
  11. "type": "paid",
  12. 'code': "Air Conditioning Cleaning", // 业务做 标识 字段
  13. },
  14. "repairAirConditioner": {
  15. "text": S.current.maintenance,
  16. "type": "inquiry",
  17. 'code': "Repair air Conditioner", // 业务做 标识 字段
  18. }
  19. };
  20. static Map<String, dynamic> servicesStatus = {
  21. "0": {
  22. "text": S.current.pending,
  23. "type": "pending",
  24. 'code': 0,
  25. },
  26. "1": {
  27. "text": S.current.in_progress,
  28. "type": "inProgress",
  29. 'code': 1,
  30. },
  31. "2": {
  32. "text": S.current.completed,
  33. "type": "completed",
  34. 'code': 2,
  35. },
  36. "3": {
  37. "text": S.current.canceled,
  38. "type": "canceled",
  39. 'code': 3,
  40. }
  41. };
  42. static Map<int, List<Map<String, dynamic>>> servicesStatusActionBtnList = {
  43. // pending, inProgress, completed, canceled
  44. servicesStatus['0']['code']: [
  45. actionBtn['0'],
  46. actionBtn['1'],
  47. actionBtn['2'],
  48. ],
  49. servicesStatus['1']['code']: [
  50. actionBtn['0'],
  51. actionBtn['1'],
  52. actionBtn['2'],
  53. ],
  54. servicesStatus['2']['code']: [
  55. actionBtn['3'],
  56. actionBtn['4'],
  57. ],
  58. servicesStatus['3']['code']: [
  59. actionBtn['3'],
  60. ]
  61. };
  62. static Map<String, dynamic> actionBtn = {
  63. "0": {
  64. "text": S.current.cancel,
  65. "type": "cancel",
  66. 'code': 0,
  67. 'btnColor': '#FFFE6C00',
  68. 'btnWidth': 65.0,
  69. 'btnHeight': 35.0,
  70. },
  71. "1": {
  72. "text": S.current.contact_merchant,
  73. "type": "contactMerchant",
  74. 'code': 1,
  75. 'btnColor': '#FF4161D0',
  76. 'btnWidth': 115.0,
  77. 'btnHeight': 35.0,
  78. },
  79. "2": {
  80. "text": S.current.contact_service_personnel,
  81. "type": "contactServicePersonnel",
  82. 'code': 2,
  83. 'btnColor': '#FF01CA48',
  84. 'btnWidth': 115.0,
  85. 'btnHeight': 35.0,
  86. },
  87. "3": {
  88. "text": S.current.delete,
  89. "type": "delete",
  90. 'code': 3,
  91. 'btnColor': '#FFFE4066',
  92. 'btnWidth': 98.0,
  93. 'btnHeight': 30.0,
  94. },
  95. "4": {
  96. "text": S.current.evaluate,
  97. "type": "evaluate",
  98. 'code': 4,
  99. 'btnColor': '#FF4161D0',
  100. 'btnWidth': 98.0,
  101. 'btnHeight': 30.0,
  102. }
  103. };
  104. }