Commit 972ba380a95f5a8847850b3f94f55ea5d1ae64e3

Authored by gaiyaguang
2 parents 4ae801a2 06e16d8d

2020-09-15 15:58

Too many changes to show.

To preserve performance only 34 of 34+ files are displayed.

  1 +{
  2 + // Use IntelliSense to learn about possible attributes.
  3 + // Hover to view descriptions of existing attributes.
  4 + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  5 + "version": "0.2.0",
  6 + "configurations": [
  7 + {
  8 + "name": "oneKey_wdn",
  9 + "request": "launch",
  10 + "type": "dart"
  11 + }
  12 + ]
  13 +}
  1 +{
  2 + "agcgw":{
  3 + "backurl":"connect-drcn.dbankcloud.cn",
  4 + "url":"connect-drcn.hispace.hicloud.com"
  5 + },
  6 + "client":{
  7 + "cp_id":"890086000102028635",
  8 + "product_id":"736430079244628022",
  9 + "client_id":"447630859449664704",
  10 + "client_secret":"C7F0060C796F3C59EC7928525D6B09D66139F06EDA5C3C6B772583D34A946BBB",
  11 + "app_id":"102832405",
  12 + "package_name":"com.naji.one_key",
  13 + "api_key":"CgB6e3x9K3RbzJwcAdFaQxGHXy+cqz0hCk6o/By+YxTV++JZtUgxAHKZNq4t1vOpQFjD/FSlkuuPdEiHm5dQ7Cd0"
  14 + },
  15 + "service":{
  16 + "analytics":{
  17 + "collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
  18 + "resource_id":"p1",
  19 + "channel_id":""
  20 + },
  21 + "cloudstorage":{
  22 + "storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
  23 + },
  24 + "ml":{
  25 + "mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
  26 + }
  27 + },
  28 + "region":"CN",
  29 + "configuration_version":"1.0"
  30 +}
@@ -43,8 +43,8 @@ android { @@ -43,8 +43,8 @@ android {
43 applicationId "com.naji.one_key" 43 applicationId "com.naji.one_key"
44 minSdkVersion 21 44 minSdkVersion 21
45 targetSdkVersion 28 45 targetSdkVersion 28
46 - versionCode 7  
47 - versionName "1.0.7" 46 + versionCode 111
  47 + versionName "1.1.1"
48 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 48 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
49 49
50 ndk { 50 ndk {
No preview for this file type
No preview for this file type
  1 +531384610a6c9ce5834584b7a30c7a32
1 # Uncomment this line to define a global platform for your project 1 # Uncomment this line to define a global platform for your project
2 -# source 'https://github.com/CocoaPods/Specs.git'  
3 - platform :ios, '9.0' 2 +# platform :ios, '9.0'
4 3
5 # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
6 ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -11,81 +10,32 @@ project 'Runner', { @@ -11,81 +10,32 @@ project 'Runner', {
11 'Release' => :release, 10 'Release' => :release,
12 } 11 }
13 12
14 -def parse_KV_file(file, separator='=')  
15 - file_abs_path = File.expand_path(file)  
16 - if !File.exists? file_abs_path  
17 - return []; 13 +def flutter_root
  14 + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  15 + unless File.exist?(generated_xcode_build_settings_path)
  16 + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
18 end 17 end
19 - generated_key_values = {}  
20 - skip_line_start_symbols = ["#", "/"]  
21 - File.foreach(file_abs_path) do |line|  
22 - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }  
23 - plugin = line.split(pattern=separator)  
24 - if plugin.length == 2  
25 - podname = plugin[0].strip()  
26 - path = plugin[1].strip()  
27 - podpath = File.expand_path("#{path}", file_abs_path)  
28 - generated_key_values[podname] = podpath  
29 - else  
30 - puts "Invalid plugin specification: #{line}"  
31 - end 18 +
  19 + File.foreach(generated_xcode_build_settings_path) do |line|
  20 + matches = line.match(/FLUTTER_ROOT\=(.*)/)
  21 + return matches[1].strip if matches
32 end 22 end
33 - generated_key_values 23 + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
34 end 24 end
35 25
  26 +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  27 +
  28 +flutter_ios_podfile_setup
  29 +
36 target 'Runner' do 30 target 'Runner' do
37 use_frameworks! 31 use_frameworks!
38 use_modular_headers! 32 use_modular_headers!
39 -  
40 - # Flutter Pod  
41 33
42 - copied_flutter_dir = File.join(__dir__, 'Flutter')  
43 - copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')  
44 - copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')  
45 - unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)  
46 - # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.  
47 - # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.  
48 - # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.  
49 -  
50 - generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')  
51 - unless File.exist?(generated_xcode_build_settings_path)  
52 - raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"  
53 - end  
54 - generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)  
55 - cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];  
56 -  
57 - unless File.exist?(copied_framework_path)  
58 - FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)  
59 - end  
60 - unless File.exist?(copied_podspec_path)  
61 - FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)  
62 - end  
63 - end  
64 -  
65 - # Keep pod path relative so it can be checked into Podfile.lock.  
66 - pod 'Flutter', :path => 'Flutter'  
67 -  
68 - # Plugin Pods  
69 -  
70 - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock  
71 - # referring to absolute paths on developers' machines.  
72 - system('rm -rf .symlinks')  
73 - system('mkdir -p .symlinks/plugins')  
74 - plugin_pods = parse_KV_file('../.flutter-plugins')  
75 - plugin_pods.each do |name, path|  
76 - symlink = File.join('.symlinks', 'plugins', name)  
77 - File.symlink(path, symlink)  
78 - pod name, :path => File.join(symlink, 'ios')  
79 - end 34 + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
80 end 35 end
81 36
82 -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.  
83 -install! 'cocoapods', :disable_input_output_paths => true  
84 -  
85 post_install do |installer| 37 post_install do |installer|
86 installer.pods_project.targets.each do |target| 38 installer.pods_project.targets.each do |target|
87 - target.build_configurations.each do |config|  
88 - config.build_settings['ENABLE_BITCODE'] = 'NO'  
89 - end 39 + flutter_additional_ios_build_settings(target)
90 end 40 end
91 end 41 end
@@ -5,10 +5,6 @@ PODS: @@ -5,10 +5,6 @@ PODS:
5 - connectivity (0.0.1): 5 - connectivity (0.0.1):
6 - Flutter 6 - Flutter
7 - Reachability 7 - Reachability
8 - - connectivity_for_web (0.1.0):  
9 - - Flutter  
10 - - connectivity_macos (0.0.1):  
11 - - Flutter  
12 - contacts_service (0.2.2): 8 - contacts_service (0.2.2):
13 - Flutter 9 - Flutter
14 - device_info (0.0.1): 10 - device_info (0.0.1):
@@ -33,21 +29,11 @@ PODS: @@ -33,21 +29,11 @@ PODS:
33 - Flutter 29 - Flutter
34 - path_provider (0.0.1): 30 - path_provider (0.0.1):
35 - Flutter 31 - Flutter
36 - - path_provider_linux (0.0.1):  
37 - - Flutter  
38 - - path_provider_macos (0.0.1):  
39 - - Flutter  
40 - "permission_handler (4.4.0+hotfix.4)": 32 - "permission_handler (4.4.0+hotfix.4)":
41 - Flutter 33 - Flutter
42 - Reachability (3.2) 34 - Reachability (3.2)
43 - shared_preferences (0.0.1): 35 - shared_preferences (0.0.1):
44 - Flutter 36 - Flutter
45 - - shared_preferences_linux (0.0.1):  
46 - - Flutter  
47 - - shared_preferences_macos (0.0.1):  
48 - - Flutter  
49 - - shared_preferences_web (0.0.1):  
50 - - Flutter  
51 - sqflite (0.0.1): 37 - sqflite (0.0.1):
52 - Flutter 38 - Flutter
53 - FMDB (~> 2.7.2) 39 - FMDB (~> 2.7.2)
@@ -57,12 +43,6 @@ PODS: @@ -57,12 +43,6 @@ PODS:
57 - TPNS-iOS (= 1.2.7.2) 43 - TPNS-iOS (= 1.2.7.2)
58 - url_launcher (0.0.1): 44 - url_launcher (0.0.1):
59 - Flutter 45 - Flutter
60 - - url_launcher_linux (0.0.1):  
61 - - Flutter  
62 - - url_launcher_macos (0.0.1):  
63 - - Flutter  
64 - - url_launcher_web (0.0.1):  
65 - - Flutter  
66 - webview_flutter (0.0.1): 46 - webview_flutter (0.0.1):
67 - Flutter 47 - Flutter
68 - WechatOpenSDK (1.8.7.1) 48 - WechatOpenSDK (1.8.7.1)
@@ -70,8 +50,6 @@ PODS: @@ -70,8 +50,6 @@ PODS:
70 DEPENDENCIES: 50 DEPENDENCIES:
71 - audioplayers (from `.symlinks/plugins/audioplayers/ios`) 51 - audioplayers (from `.symlinks/plugins/audioplayers/ios`)
72 - connectivity (from `.symlinks/plugins/connectivity/ios`) 52 - connectivity (from `.symlinks/plugins/connectivity/ios`)
73 - - connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)  
74 - - connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)  
75 - contacts_service (from `.symlinks/plugins/contacts_service/ios`) 53 - contacts_service (from `.symlinks/plugins/contacts_service/ios`)
76 - device_info (from `.symlinks/plugins/device_info/ios`) 54 - device_info (from `.symlinks/plugins/device_info/ios`)
77 - Flutter (from `Flutter`) 55 - Flutter (from `Flutter`)
@@ -82,19 +60,11 @@ DEPENDENCIES: @@ -82,19 +60,11 @@ DEPENDENCIES:
82 - install_plugin (from `.symlinks/plugins/install_plugin/ios`) 60 - install_plugin (from `.symlinks/plugins/install_plugin/ios`)
83 - package_info (from `.symlinks/plugins/package_info/ios`) 61 - package_info (from `.symlinks/plugins/package_info/ios`)
84 - path_provider (from `.symlinks/plugins/path_provider/ios`) 62 - path_provider (from `.symlinks/plugins/path_provider/ios`)
85 - - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)  
86 - - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)  
87 - permission_handler (from `.symlinks/plugins/permission_handler/ios`) 63 - permission_handler (from `.symlinks/plugins/permission_handler/ios`)
88 - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 64 - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
89 - - shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)  
90 - - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)  
91 - - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)  
92 - sqflite (from `.symlinks/plugins/sqflite/ios`) 65 - sqflite (from `.symlinks/plugins/sqflite/ios`)
93 - tpns_flutter_plugin (from `.symlinks/plugins/tpns_flutter_plugin/ios`) 66 - tpns_flutter_plugin (from `.symlinks/plugins/tpns_flutter_plugin/ios`)
94 - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 67 - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
95 - - url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)  
96 - - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)  
97 - - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)  
98 - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) 68 - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
99 69
100 SPEC REPOS: 70 SPEC REPOS:
@@ -110,10 +80,6 @@ EXTERNAL SOURCES: @@ -110,10 +80,6 @@ EXTERNAL SOURCES:
110 :path: ".symlinks/plugins/audioplayers/ios" 80 :path: ".symlinks/plugins/audioplayers/ios"
111 connectivity: 81 connectivity:
112 :path: ".symlinks/plugins/connectivity/ios" 82 :path: ".symlinks/plugins/connectivity/ios"
113 - connectivity_for_web:  
114 - :path: ".symlinks/plugins/connectivity_for_web/ios"  
115 - connectivity_macos:  
116 - :path: ".symlinks/plugins/connectivity_macos/ios"  
117 contacts_service: 83 contacts_service:
118 :path: ".symlinks/plugins/contacts_service/ios" 84 :path: ".symlinks/plugins/contacts_service/ios"
119 device_info: 85 device_info:
@@ -134,32 +100,16 @@ EXTERNAL SOURCES: @@ -134,32 +100,16 @@ EXTERNAL SOURCES:
134 :path: ".symlinks/plugins/package_info/ios" 100 :path: ".symlinks/plugins/package_info/ios"
135 path_provider: 101 path_provider:
136 :path: ".symlinks/plugins/path_provider/ios" 102 :path: ".symlinks/plugins/path_provider/ios"
137 - path_provider_linux:  
138 - :path: ".symlinks/plugins/path_provider_linux/ios"  
139 - path_provider_macos:  
140 - :path: ".symlinks/plugins/path_provider_macos/ios"  
141 permission_handler: 103 permission_handler:
142 :path: ".symlinks/plugins/permission_handler/ios" 104 :path: ".symlinks/plugins/permission_handler/ios"
143 shared_preferences: 105 shared_preferences:
144 :path: ".symlinks/plugins/shared_preferences/ios" 106 :path: ".symlinks/plugins/shared_preferences/ios"
145 - shared_preferences_linux:  
146 - :path: ".symlinks/plugins/shared_preferences_linux/ios"  
147 - shared_preferences_macos:  
148 - :path: ".symlinks/plugins/shared_preferences_macos/ios"  
149 - shared_preferences_web:  
150 - :path: ".symlinks/plugins/shared_preferences_web/ios"  
151 sqflite: 107 sqflite:
152 :path: ".symlinks/plugins/sqflite/ios" 108 :path: ".symlinks/plugins/sqflite/ios"
153 tpns_flutter_plugin: 109 tpns_flutter_plugin:
154 :path: ".symlinks/plugins/tpns_flutter_plugin/ios" 110 :path: ".symlinks/plugins/tpns_flutter_plugin/ios"
155 url_launcher: 111 url_launcher:
156 :path: ".symlinks/plugins/url_launcher/ios" 112 :path: ".symlinks/plugins/url_launcher/ios"
157 - url_launcher_linux:  
158 - :path: ".symlinks/plugins/url_launcher_linux/ios"  
159 - url_launcher_macos:  
160 - :path: ".symlinks/plugins/url_launcher_macos/ios"  
161 - url_launcher_web:  
162 - :path: ".symlinks/plugins/url_launcher_web/ios"  
163 webview_flutter: 113 webview_flutter:
164 :path: ".symlinks/plugins/webview_flutter/ios" 114 :path: ".symlinks/plugins/webview_flutter/ios"
165 115
@@ -167,8 +117,6 @@ SPEC CHECKSUMS: @@ -167,8 +117,6 @@ SPEC CHECKSUMS:
167 audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c 117 audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c
168 Bugly: fd066c75c4a0eca1440f9b6a84bd37d51bfc85ac 118 Bugly: fd066c75c4a0eca1440f9b6a84bd37d51bfc85ac
169 connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 119 connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
170 - connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b  
171 - connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191  
172 contacts_service: 849e1f84281804c8bfbec1b4c3eedcb23c5d3eca 120 contacts_service: 849e1f84281804c8bfbec1b4c3eedcb23c5d3eca
173 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 121 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
174 Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 122 Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
@@ -180,24 +128,16 @@ SPEC CHECKSUMS: @@ -180,24 +128,16 @@ SPEC CHECKSUMS:
180 install_plugin: a13e7ddd2bab0c701b48cd359c26d0394125b6fb 128 install_plugin: a13e7ddd2bab0c701b48cd359c26d0394125b6fb
181 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 129 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
182 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 130 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
183 - path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4  
184 - path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0  
185 permission_handler: 8278954f2382902f63f00dd8828769c0bd6d511b 131 permission_handler: 8278954f2382902f63f00dd8828769c0bd6d511b
186 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 132 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
187 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d 133 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
188 - shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78  
189 - shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087  
190 - shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9  
191 sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 134 sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
192 TPNS-iOS: 9b35473a4a0d07f2c2730ea1e66c6749c2b98095 135 TPNS-iOS: 9b35473a4a0d07f2c2730ea1e66c6749c2b98095
193 tpns_flutter_plugin: 8dbbee157aab91a878f64d056c1383726a6c5c4d 136 tpns_flutter_plugin: 8dbbee157aab91a878f64d056c1383726a6c5c4d
194 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef 137 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
195 - url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0  
196 - url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313  
197 - url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c  
198 webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 138 webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
199 WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44 139 WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
200 140
201 -PODFILE CHECKSUM: 6d186dc4668603071619657511aa873d9a684d13 141 +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
202 142
203 COCOAPODS: 1.9.1 143 COCOAPODS: 1.9.1
@@ -9,11 +9,7 @@ @@ -9,11 +9,7 @@
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 10 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 11 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };  
13 - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
14 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 12 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };  
16 - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
17 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 13 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 14 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 15 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -27,8 +23,6 @@ @@ -27,8 +23,6 @@
27 dstPath = ""; 23 dstPath = "";
28 dstSubfolderSpec = 10; 24 dstSubfolderSpec = 10;
29 files = ( 25 files = (
30 - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,  
31 - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,  
32 ); 26 );
33 name = "Embed Frameworks"; 27 name = "Embed Frameworks";
34 runOnlyForDeploymentPostprocessing = 0; 28 runOnlyForDeploymentPostprocessing = 0;
@@ -41,13 +35,11 @@ @@ -41,13 +35,11 @@
41 22513BD076488FBD50F0303F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; 35 22513BD076488FBD50F0303F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
42 2DCAB49DF131E02F3BAF38E1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; 36 2DCAB49DF131E02F3BAF38E1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
43 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; 37 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
44 - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };  
45 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; 38 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
46 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 39 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
47 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; 40 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
48 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; 41 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
49 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; 42 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
50 - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };  
51 97C146EE1CF9000F007C117D /* 一键订.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "一键订.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 43 97C146EE1CF9000F007C117D /* 一键订.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "一键订.app"; sourceTree = BUILT_PRODUCTS_DIR; };
52 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 44 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
53 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 45 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -64,8 +56,6 @@ @@ -64,8 +56,6 @@
64 isa = PBXFrameworksBuildPhase; 56 isa = PBXFrameworksBuildPhase;
65 buildActionMask = 2147483647; 57 buildActionMask = 2147483647;
66 files = ( 58 files = (
67 - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,  
68 - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,  
69 A7F352227F0F121A53D9A543 /* Pods_Runner.framework in Frameworks */, 59 A7F352227F0F121A53D9A543 /* Pods_Runner.framework in Frameworks */,
70 ); 60 );
71 runOnlyForDeploymentPostprocessing = 0; 61 runOnlyForDeploymentPostprocessing = 0;
@@ -94,9 +84,7 @@ @@ -94,9 +84,7 @@
94 9740EEB11CF90186004384FC /* Flutter */ = { 84 9740EEB11CF90186004384FC /* Flutter */ = {
95 isa = PBXGroup; 85 isa = PBXGroup;
96 children = ( 86 children = (
97 - 3B80C3931E831B6300D905FE /* App.framework */,  
98 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 87 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
99 - 9740EEBA1CF902C7004384FC /* Flutter.framework */,  
100 9740EEB21CF90195004384FC /* Debug.xcconfig */, 88 9740EEB21CF90195004384FC /* Debug.xcconfig */,
101 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 89 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
102 9740EEB31CF90195004384FC /* Generated.xcconfig */, 90 9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -235,7 +223,7 @@ @@ -235,7 +223,7 @@
235 ); 223 );
236 runOnlyForDeploymentPostprocessing = 0; 224 runOnlyForDeploymentPostprocessing = 0;
237 shellPath = /bin/sh; 225 shellPath = /bin/sh;
238 - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 226 + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
239 }; 227 };
240 9740EEB61CF901F6004384FC /* Run Script */ = { 228 9740EEB61CF901F6004384FC /* Run Script */ = {
241 isa = PBXShellScriptBuildPhase; 229 isa = PBXShellScriptBuildPhase;
@@ -257,9 +245,42 @@ @@ -257,9 +245,42 @@
257 files = ( 245 files = (
258 ); 246 );
259 inputPaths = ( 247 inputPaths = (
  248 + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
  249 + "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
  250 + "${PODS_ROOT}/../Flutter/Flutter.framework",
  251 + "${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
  252 + "${BUILT_PRODUCTS_DIR}/audioplayers/audioplayers.framework",
  253 + "${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework",
  254 + "${BUILT_PRODUCTS_DIR}/contacts_service/contacts_service.framework",
  255 + "${BUILT_PRODUCTS_DIR}/device_info/device_info.framework",
  256 + "${BUILT_PRODUCTS_DIR}/flutter_statusbarcolor/flutter_statusbarcolor.framework",
  257 + "${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework",
  258 + "${BUILT_PRODUCTS_DIR}/install_plugin/install_plugin.framework",
  259 + "${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
  260 + "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
  261 + "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
  262 + "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
  263 + "${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
  264 + "${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework",
260 ); 265 );
261 name = "[CP] Embed Pods Frameworks"; 266 name = "[CP] Embed Pods Frameworks";
262 outputPaths = ( 267 outputPaths = (
  268 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
  269 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
  270 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
  271 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audioplayers.framework",
  272 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework",
  273 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/contacts_service.framework",
  274 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework",
  275 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_statusbarcolor.framework",
  276 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework",
  277 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/install_plugin.framework",
  278 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
  279 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
  280 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
  281 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
  282 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
  283 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter.framework",
263 ); 284 );
264 runOnlyForDeploymentPostprocessing = 0; 285 runOnlyForDeploymentPostprocessing = 0;
265 shellPath = /bin/sh; 286 shellPath = /bin/sh;
@@ -324,7 +345,6 @@ @@ -324,7 +345,6 @@
324 /* Begin XCBuildConfiguration section */ 345 /* Begin XCBuildConfiguration section */
325 249021D3217E4FDB00AE95B9 /* Profile */ = { 346 249021D3217E4FDB00AE95B9 /* Profile */ = {
326 isa = XCBuildConfiguration; 347 isa = XCBuildConfiguration;
327 - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;  
328 buildSettings = { 348 buildSettings = {
329 ALWAYS_SEARCH_USER_PATHS = NO; 349 ALWAYS_SEARCH_USER_PATHS = NO;
330 CLANG_ANALYZER_NONNULL = YES; 350 CLANG_ANALYZER_NONNULL = YES;
@@ -382,9 +402,10 @@ @@ -382,9 +402,10 @@
382 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 402 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
383 CLANG_ENABLE_MODULES = YES; 403 CLANG_ENABLE_MODULES = YES;
384 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 404 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
385 - CODE_SIGN_STYLE = Manual; 405 + CODE_SIGN_IDENTITY = "Apple Development";
  406 + CODE_SIGN_STYLE = Automatic;
386 CURRENT_PROJECT_VERSION = 8; 407 CURRENT_PROJECT_VERSION = 8;
387 - DEVELOPMENT_TEAM = 8J59HM8B82; 408 + DEVELOPMENT_TEAM = "";
388 ENABLE_BITCODE = NO; 409 ENABLE_BITCODE = NO;
389 FRAMEWORK_SEARCH_PATHS = ( 410 FRAMEWORK_SEARCH_PATHS = (
390 "$(inherited)", 411 "$(inherited)",
@@ -399,7 +420,7 @@ @@ -399,7 +420,7 @@
399 MARKETING_VERSION = 1.0.8; 420 MARKETING_VERSION = 1.0.8;
400 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 421 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
401 PRODUCT_NAME = "一键订"; 422 PRODUCT_NAME = "一键订";
402 - PROVISIONING_PROFILE_SPECIFIER = "OneKey Distribution Profile"; 423 + PROVISIONING_PROFILE_SPECIFIER = "";
403 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 424 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
404 SWIFT_VERSION = 5.0; 425 SWIFT_VERSION = 5.0;
405 VERSIONING_SYSTEM = "apple-generic"; 426 VERSIONING_SYSTEM = "apple-generic";
@@ -408,7 +429,6 @@ @@ -408,7 +429,6 @@
408 }; 429 };
409 97C147031CF9000F007C117D /* Debug */ = { 430 97C147031CF9000F007C117D /* Debug */ = {
410 isa = XCBuildConfiguration; 431 isa = XCBuildConfiguration;
411 - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;  
412 buildSettings = { 432 buildSettings = {
413 ALWAYS_SEARCH_USER_PATHS = NO; 433 ALWAYS_SEARCH_USER_PATHS = NO;
414 CLANG_ANALYZER_NONNULL = YES; 434 CLANG_ANALYZER_NONNULL = YES;
@@ -466,7 +486,6 @@ @@ -466,7 +486,6 @@
466 }; 486 };
467 97C147041CF9000F007C117D /* Release */ = { 487 97C147041CF9000F007C117D /* Release */ = {
468 isa = XCBuildConfiguration; 488 isa = XCBuildConfiguration;
469 - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;  
470 buildSettings = { 489 buildSettings = {
471 ALWAYS_SEARCH_USER_PATHS = NO; 490 ALWAYS_SEARCH_USER_PATHS = NO;
472 CLANG_ANALYZER_NONNULL = YES; 491 CLANG_ANALYZER_NONNULL = YES;
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <key>CFBundleInfoDictionaryVersion</key> 13 <key>CFBundleInfoDictionaryVersion</key>
14 <string>6.0</string> 14 <string>6.0</string>
15 <key>CFBundleName</key> 15 <key>CFBundleName</key>
16 - <string>一键订</string> 16 + <string>Runner</string>
17 <key>CFBundlePackageType</key> 17 <key>CFBundlePackageType</key>
18 <string>APPL</string> 18 <string>APPL</string>
19 <key>CFBundleShortVersionString</key> 19 <key>CFBundleShortVersionString</key>
@@ -85,8 +85,8 @@ @@ -85,8 +85,8 @@
85 <key>io.flutter.embedded_views_preview</key> 85 <key>io.flutter.embedded_views_preview</key>
86 <true/> 86 <true/>
87 <key>XG_ACCESS_ID</key> 87 <key>XG_ACCESS_ID</key>
88 - <string>${1600012876}</string> 88 + <string>1600012876</string>
89 <key>XG_ACCESS_KEY</key> 89 <key>XG_ACCESS_KEY</key>
90 - <string>${INUIMFK21WGH}</string> 90 + <string>INUIMFK21WGH</string>
91 </dict> 91 </dict>
92 </plist> 92 </plist>
1 -  
2 import 'package:dio/dio.dart'; 1 import 'package:dio/dio.dart';
3 import 'package:fluro/fluro.dart'; 2 import 'package:fluro/fluro.dart';
4 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
@@ -39,11 +38,11 @@ Future<void> main() async { @@ -39,11 +38,11 @@ Future<void> main() async {
39 ), 38 ),
40 ChangeNotifierProvider<MessageDialogModel>( 39 ChangeNotifierProvider<MessageDialogModel>(
41 create: (_) => MessageDialogModel()..init(), 40 create: (_) => MessageDialogModel()..init(),
42 - ) 41 + ),
43 ], 42 ],
44 child: MyApp(), 43 child: MyApp(),
45 )); 44 ));
46 - FlutterBugly.init(androidAppId: "f71a313f42",iOSAppId: "3089e4587e"); 45 + FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e");
47 }); 46 });
48 } 47 }
49 48
@@ -55,8 +54,7 @@ class MyApp extends StatefulWidget { @@ -55,8 +54,7 @@ class MyApp extends StatefulWidget {
55 } 54 }
56 } 55 }
57 56
58 -class MyAppState extends State<MyApp>{  
59 - 57 +class MyAppState extends State<MyApp> {
60 @override 58 @override
61 void initState() { 59 void initState() {
62 // TODO: implement initState 60 // TODO: implement initState
@@ -74,11 +72,11 @@ class MyAppState extends State<MyApp>{ @@ -74,11 +72,11 @@ class MyAppState extends State<MyApp>{
74 await registerWxApi( 72 await registerWxApi(
75 appId: "wx85aa3cdd0f791e65", 73 appId: "wx85aa3cdd0f791e65",
76 doOnAndroid: true, 74 doOnAndroid: true,
77 - doOnIOS: true,  
78 - universalLink: "https://xt04.colorcun.com/link/OneKey/");  
79 - var result = await isWeChatInstalled;  
80 - LogUtil.v("is installed $result");  
81 -} 75 + doOnIOS: true,
  76 + universalLink: "https://xt04.colorcun.com/link/OneKey/");
  77 + var result = await isWeChatInstalled;
  78 + LogUtil.v("is installed $result");
  79 + }
82 80
83 //初始化dio 81 //初始化dio
84 initDio() { 82 initDio() {
@@ -90,7 +88,6 @@ class MyAppState extends State<MyApp>{ @@ -90,7 +88,6 @@ class MyAppState extends State<MyApp>{
90 DioUtil().setConfig(config); 88 DioUtil().setConfig(config);
91 } 89 }
92 90
93 -  
94 @override 91 @override
95 Widget build(BuildContext context) { 92 Widget build(BuildContext context) {
96 // TODO: implement build 93 // TODO: implement build
@@ -102,7 +99,8 @@ class MyAppState extends State<MyApp>{ @@ -102,7 +99,8 @@ class MyAppState extends State<MyApp>{
102 brightness: Brightness.light, 99 brightness: Brightness.light,
103 primaryColor: Colors.white, 100 primaryColor: Colors.white,
104 splashColor: Colors.transparent, 101 splashColor: Colors.transparent,
105 - textTheme: TextTheme(overline: TextStyle(decoration: TextDecoration.none)), 102 + textTheme:
  103 + TextTheme(overline: TextStyle(decoration: TextDecoration.none)),
106 tooltipTheme: TooltipThemeData(verticalOffset: -100000)), 104 tooltipTheme: TooltipThemeData(verticalOffset: -100000)),
107 home: LoginPage(), 105 home: LoginPage(),
108 onGenerateRoute: App.router.generator, 106 onGenerateRoute: App.router.generator,
@@ -9,7 +9,7 @@ part of 'message.dart'; @@ -9,7 +9,7 @@ part of 'message.dart';
9 Message _$MessageFromJson(Map<String, dynamic> json) { 9 Message _$MessageFromJson(Map<String, dynamic> json) {
10 return Message() 10 return Message()
11 ..id = json['id'] as String 11 ..id = json['id'] as String
12 - ..message_type = json['message_type'] as dynamic 12 + ..message_type = json['message_type']
13 ..handle_time = json['handle_time'] as String 13 ..handle_time = json['handle_time'] as String
14 ..read_time = json['read_time'] as String 14 ..read_time = json['read_time'] as String
15 ..is_read = json['is_read'] as String 15 ..is_read = json['is_read'] as String
  1 +import 'package:json_annotation/json_annotation.dart';
  2 +
  3 +part 'seller_info.g.dart';
  4 +
  5 +@JsonSerializable()
  6 +class SellerInfoModel extends Object {
  7 + @JsonKey(name: 'ret')
  8 + int ret;
  9 +
  10 + @JsonKey(name: 'data')
  11 + SunSellerInfoModel data;
  12 +
  13 + @JsonKey(name: 'msg')
  14 + String msg;
  15 +
  16 + SellerInfoModel(
  17 + this.ret,
  18 + this.data,
  19 + this.msg,
  20 + );
  21 +
  22 + factory SellerInfoModel.fromJson(Map<String, dynamic> srcJson) =>
  23 + _$SellerInfoModelFromJson(srcJson);
  24 +
  25 + Map<String, dynamic> toJson() => _$SellerInfoModelToJson(this);
  26 +}
  27 +
  28 +@JsonSerializable()
  29 +class SunSellerInfoModel extends Object {
  30 + @JsonKey(name: 'seller')
  31 + Seller seller;
  32 +
  33 + @JsonKey(name: 'manager')
  34 + List<Manager> manager;
  35 +
  36 + @JsonKey(name: 'seller_user')
  37 + SellerUser sellerUser;
  38 +
  39 + @JsonKey(name: 'daily')
  40 + Daily daily;
  41 +
  42 + @JsonKey(name: 'config')
  43 + List<dynamic> config;
  44 +
  45 + @JsonKey(name: 'setting')
  46 + Setting setting;
  47 +
  48 + @JsonKey(name: 'scatter')
  49 + int scatter;
  50 +
  51 + @JsonKey(name: 'room')
  52 + int room;
  53 +
  54 + @JsonKey(name: 'cassette')
  55 + int cassette;
  56 +
  57 + SunSellerInfoModel(
  58 + this.seller,
  59 + this.manager,
  60 + this.sellerUser,
  61 + this.daily,
  62 + this.config,
  63 + this.setting,
  64 + this.scatter,
  65 + this.room,
  66 + this.cassette,
  67 + );
  68 +
  69 + factory SunSellerInfoModel.fromJson(Map<String, dynamic> srcJson) =>
  70 + _$SunSellerInfoModelFromJson(srcJson);
  71 +
  72 + Map<String, dynamic> toJson() => _$SunSellerInfoModelToJson(this);
  73 +}
  74 +
  75 +@JsonSerializable()
  76 +class Seller extends Object {
  77 + @JsonKey(name: 'id')
  78 + String id;
  79 +
  80 + @JsonKey(name: 'sellername')
  81 + String sellername;
  82 +
  83 + @JsonKey(name: 'selleralias')
  84 + String selleralias;
  85 +
  86 + @JsonKey(name: 'seller_image')
  87 + String sellerImage;
  88 +
  89 + @JsonKey(name: 'map_address')
  90 + String mapAddress;
  91 +
  92 + @JsonKey(name: 'is_call_tel')
  93 + String isCallTel;
  94 +
  95 + @JsonKey(name: 'daily')
  96 + String daily;
  97 +
  98 + @JsonKey(name: 'lat')
  99 + String lat;
  100 +
  101 + @JsonKey(name: 'long')
  102 + String long;
  103 +
  104 + @JsonKey(name: 'is_sms')
  105 + String isSms;
  106 +
  107 + @JsonKey(name: 'is_open_order')
  108 + String isOpenOrder;
  109 +
  110 + @JsonKey(name: 'is_open_wine')
  111 + String isOpenWine;
  112 +
  113 + Seller(
  114 + this.id,
  115 + this.sellername,
  116 + this.selleralias,
  117 + this.sellerImage,
  118 + this.mapAddress,
  119 + this.isCallTel,
  120 + this.daily,
  121 + this.lat,
  122 + this.long,
  123 + this.isSms,
  124 + this.isOpenOrder,
  125 + this.isOpenWine,
  126 + );
  127 +
  128 + factory Seller.fromJson(Map<String, dynamic> srcJson) =>
  129 + _$SellerFromJson(srcJson);
  130 +
  131 + Map<String, dynamic> toJson() => _$SellerToJson(this);
  132 +}
  133 +
  134 +@JsonSerializable()
  135 +class Manager extends Object {
  136 + @JsonKey(name: 'role_name')
  137 + String roleName;
  138 +
  139 + @JsonKey(name: 'id')
  140 + dynamic id;
  141 +
  142 + @JsonKey(name: 'sellerid')
  143 + dynamic sellerid;
  144 +
  145 + @JsonKey(name: 'openid')
  146 + String openid;
  147 +
  148 + @JsonKey(name: 'receipt_code')
  149 + String receiptCode;
  150 +
  151 + @JsonKey(name: 'user_name')
  152 + String userName;
  153 +
  154 + @JsonKey(name: 'cdate')
  155 + String cdate;
  156 +
  157 + @JsonKey(name: 'status')
  158 + dynamic status;
  159 +
  160 + @JsonKey(name: 'is_first')
  161 + dynamic isFirst;
  162 +
  163 + @JsonKey(name: 'disting')
  164 + dynamic disting;
  165 +
  166 + @JsonKey(name: 'code')
  167 + dynamic code;
  168 +
  169 + @JsonKey(name: 'uid')
  170 + dynamic uid;
  171 +
  172 + @JsonKey(name: 'nick_name')
  173 + String nickName;
  174 +
  175 + Manager(
  176 + this.roleName,
  177 + this.id,
  178 + this.sellerid,
  179 + this.openid,
  180 + this.receiptCode,
  181 + this.userName,
  182 + this.cdate,
  183 + this.status,
  184 + this.isFirst,
  185 + this.disting,
  186 + this.code,
  187 + this.uid,
  188 + this.nickName,
  189 + );
  190 +
  191 + factory Manager.fromJson(Map<String, dynamic> srcJson) =>
  192 + _$ManagerFromJson(srcJson);
  193 +
  194 + Map<String, dynamic> toJson() => _$ManagerToJson(this);
  195 +}
  196 +
  197 +@JsonSerializable()
  198 +class SellerUser extends Object {
  199 + SellerUser();
  200 +
  201 + factory SellerUser.fromJson(Map<String, dynamic> srcJson) =>
  202 + _$SellerUserFromJson(srcJson);
  203 +
  204 + Map<String, dynamic> toJson() => _$SellerUserToJson(this);
  205 +}
  206 +
  207 +@JsonSerializable()
  208 +class Daily extends Object {
  209 + @JsonKey(name: 'morning')
  210 + String morning;
  211 +
  212 + @JsonKey(name: 'noon')
  213 + String noon;
  214 +
  215 + @JsonKey(name: 'night')
  216 + String night;
  217 +
  218 + Daily(
  219 + this.morning,
  220 + this.noon,
  221 + this.night,
  222 + );
  223 +
  224 + factory Daily.fromJson(Map<String, dynamic> srcJson) =>
  225 + _$DailyFromJson(srcJson);
  226 +
  227 + Map<String, dynamic> toJson() => _$DailyToJson(this);
  228 +}
  229 +
  230 +@JsonSerializable()
  231 +class Setting extends Object {
  232 + @JsonKey(name: 'template_code')
  233 + String templateCode;
  234 +
  235 + Setting(
  236 + this.templateCode,
  237 + );
  238 +
  239 + factory Setting.fromJson(Map<String, dynamic> srcJson) =>
  240 + _$SettingFromJson(srcJson);
  241 +
  242 + Map<String, dynamic> toJson() => _$SettingToJson(this);
  243 +}
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +
  3 +part of 'seller_info.dart';
  4 +
  5 +// **************************************************************************
  6 +// JsonSerializableGenerator
  7 +// **************************************************************************
  8 +
  9 +SellerInfoModel _$SellerInfoModelFromJson(Map<String, dynamic> json) {
  10 + return SellerInfoModel(
  11 + json['ret'] as int,
  12 + json['data'] == null
  13 + ? null
  14 + : SunSellerInfoModel.fromJson(json['data'] as Map<String, dynamic>),
  15 + json['msg'] as String);
  16 +}
  17 +
  18 +Map<String, dynamic> _$SellerInfoModelToJson(SellerInfoModel instance) =>
  19 + <String, dynamic>{
  20 + 'ret': instance.ret,
  21 + 'data': instance.data,
  22 + 'msg': instance.msg
  23 + };
  24 +
  25 +SunSellerInfoModel _$SunSellerInfoModelFromJson(Map<String, dynamic> json) {
  26 + return SunSellerInfoModel(
  27 + json['seller'] == null
  28 + ? null
  29 + : Seller.fromJson(json['seller'] as Map<String, dynamic>),
  30 + (json['manager'] as List)
  31 + ?.map((e) =>
  32 + e == null ? null : Manager.fromJson(e as Map<String, dynamic>))
  33 + ?.toList(),
  34 + json['seller_user'] == null
  35 + ? null
  36 + : SellerUser.fromJson(json['seller_user'] as Map<String, dynamic>),
  37 + json['daily'] == null
  38 + ? null
  39 + : Daily.fromJson(json['daily'] as Map<String, dynamic>),
  40 + json['config'] as List,
  41 + json['setting'] == null
  42 + ? null
  43 + : Setting.fromJson(json['setting'] as Map<String, dynamic>),
  44 + json['scatter'] as int,
  45 + json['room'] as int,
  46 + json['cassette'] as int);
  47 +}
  48 +
  49 +Map<String, dynamic> _$SunSellerInfoModelToJson(SunSellerInfoModel instance) =>
  50 + <String, dynamic>{
  51 + 'seller': instance.seller,
  52 + 'manager': instance.manager,
  53 + 'seller_user': instance.sellerUser,
  54 + 'daily': instance.daily,
  55 + 'config': instance.config,
  56 + 'setting': instance.setting,
  57 + 'scatter': instance.scatter,
  58 + 'room': instance.room,
  59 + 'cassette': instance.cassette
  60 + };
  61 +
  62 +Seller _$SellerFromJson(Map<String, dynamic> json) {
  63 + return Seller(
  64 + json['id'] as String,
  65 + json['sellername'] as String,
  66 + json['selleralias'] as String,
  67 + json['seller_image'] as String,
  68 + json['map_address'] as String,
  69 + json['is_call_tel'] as String,
  70 + json['daily'] as String,
  71 + json['lat'] as String,
  72 + json['long'] as String,
  73 + json['is_sms'] as String,
  74 + json['is_open_order'] as String,
  75 + json['is_open_wine'] as String);
  76 +}
  77 +
  78 +Map<String, dynamic> _$SellerToJson(Seller instance) => <String, dynamic>{
  79 + 'id': instance.id,
  80 + 'sellername': instance.sellername,
  81 + 'selleralias': instance.selleralias,
  82 + 'seller_image': instance.sellerImage,
  83 + 'map_address': instance.mapAddress,
  84 + 'is_call_tel': instance.isCallTel,
  85 + 'daily': instance.daily,
  86 + 'lat': instance.lat,
  87 + 'long': instance.long,
  88 + 'is_sms': instance.isSms,
  89 + 'is_open_order': instance.isOpenOrder,
  90 + 'is_open_wine': instance.isOpenWine
  91 + };
  92 +
  93 +Manager _$ManagerFromJson(Map<String, dynamic> json) {
  94 + return Manager(
  95 + json['role_name'] as String,
  96 + json['id'],
  97 + json['sellerid'],
  98 + json['openid'] as String,
  99 + json['receipt_code'] as String,
  100 + json['user_name'] as String,
  101 + json['cdate'] as String,
  102 + json['status'],
  103 + json['is_first'],
  104 + json['disting'],
  105 + json['code'],
  106 + json['uid'],
  107 + json['nick_name'] as String);
  108 +}
  109 +
  110 +Map<String, dynamic> _$ManagerToJson(Manager instance) => <String, dynamic>{
  111 + 'role_name': instance.roleName,
  112 + 'id': instance.id,
  113 + 'sellerid': instance.sellerid,
  114 + 'openid': instance.openid,
  115 + 'receipt_code': instance.receiptCode,
  116 + 'user_name': instance.userName,
  117 + 'cdate': instance.cdate,
  118 + 'status': instance.status,
  119 + 'is_first': instance.isFirst,
  120 + 'disting': instance.disting,
  121 + 'code': instance.code,
  122 + 'uid': instance.uid,
  123 + 'nick_name': instance.nickName
  124 + };
  125 +
  126 +SellerUser _$SellerUserFromJson(Map<String, dynamic> json) {
  127 + return SellerUser();
  128 +}
  129 +
  130 +Map<String, dynamic> _$SellerUserToJson(SellerUser instance) =>
  131 + <String, dynamic>{};
  132 +
  133 +Daily _$DailyFromJson(Map<String, dynamic> json) {
  134 + return Daily(json['morning'] as String, json['noon'] as String,
  135 + json['night'] as String);
  136 +}
  137 +
  138 +Map<String, dynamic> _$DailyToJson(Daily instance) => <String, dynamic>{
  139 + 'morning': instance.morning,
  140 + 'noon': instance.noon,
  141 + 'night': instance.night
  142 + };
  143 +
  144 +Setting _$SettingFromJson(Map<String, dynamic> json) {
  145 + return Setting(json['template_code'] as String);
  146 +}
  147 +
  148 +Map<String, dynamic> _$SettingToJson(Setting instance) =>
  149 + <String, dynamic>{'template_code': instance.templateCode};
@@ -22,10 +22,10 @@ Table _$TableFromJson(Map<String, dynamic> json) { @@ -22,10 +22,10 @@ Table _$TableFromJson(Map<String, dynamic> json) {
22 ..rname = json['rname'] as String 22 ..rname = json['rname'] as String
23 ..max = json['max'] as String 23 ..max = json['max'] as String
24 ..low = json['low'] as String 24 ..low = json['low'] as String
25 - ..sign=json['sign'] as String  
26 - ..reserver=json['reserver'] as String  
27 - ..notebookId=json['notebookId'] as String  
28 - ..selected=json["selected"] as bool; 25 + ..sign = json['sign'] as String
  26 + ..reserver = json['reserver'] as String
  27 + ..notebookId = json['notebookId'] as String
  28 + ..selected = json['selected'] as bool;
29 } 29 }
30 30
31 Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{ 31 Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{
@@ -43,9 +43,8 @@ Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{ @@ -43,9 +43,8 @@ Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{
43 'rname': instance.rname, 43 'rname': instance.rname,
44 'max': instance.max, 44 'max': instance.max,
45 'low': instance.low, 45 'low': instance.low,
46 - 'sign':instance.sign,  
47 - 'reserver':instance.reserver,  
48 - 'notebookId':instance.notebookId,  
49 - 'selected':instance.selected 46 + 'sign': instance.sign,
  47 + 'reserver': instance.reserver,
  48 + 'notebookId': instance.notebookId,
  49 + 'selected': instance.selected
50 }; 50 };
51 -  
  1 +import 'package:json_annotation/json_annotation.dart';
  2 +
  3 +part 'table_list.g.dart';
  4 +
  5 +@JsonSerializable()
  6 +class TableListModel extends Object {
  7 + @JsonKey(name: 'ret')
  8 + int ret;
  9 +
  10 + @JsonKey(name: 'data')
  11 + List<TableListSunModel> data;
  12 +
  13 + @JsonKey(name: 'msg')
  14 + String msg;
  15 +
  16 + TableListModel(
  17 + this.ret,
  18 + this.data,
  19 + this.msg,
  20 + );
  21 +
  22 + factory TableListModel.fromJson(Map<String, dynamic> srcJson) =>
  23 + _$TableListModelFromJson(srcJson);
  24 +
  25 + Map<String, dynamic> toJson() => _$TableListModelToJson(this);
  26 +}
  27 +
  28 +@JsonSerializable()
  29 +class TableListSunModel extends Object {
  30 + @JsonKey(name: 'name')
  31 + String name;
  32 +
  33 + @JsonKey(name: 'list')
  34 + List<TableList> list;
  35 +
  36 + TableListSunModel(
  37 + this.name,
  38 + this.list,
  39 + );
  40 +
  41 + factory TableListSunModel.fromJson(Map<String, dynamic> srcJson) =>
  42 + _$TableListSunModelFromJson(srcJson);
  43 +
  44 + Map<String, dynamic> toJson() => _$TableListSunModelToJson(this);
  45 +}
  46 +
  47 +@JsonSerializable()
  48 +class TableList extends Object {
  49 + @JsonKey(name: 'id')
  50 + String id;
  51 +
  52 + @JsonKey(name: 'rid')
  53 + String rid;
  54 +
  55 + @JsonKey(name: 'sellerid')
  56 + String sellerid;
  57 +
  58 + @JsonKey(name: 'name')
  59 + String name;
  60 +
  61 + @JsonKey(name: 'qrcode')
  62 + String qrcode;
  63 +
  64 + @JsonKey(name: 'table_pnum')
  65 + String tablePnum;
  66 +
  67 + @JsonKey(name: 'most_pnum')
  68 + String mostPnum;
  69 +
  70 + @JsonKey(name: 'tid')
  71 + String tid;
  72 +
  73 + @JsonKey(name: 'hot')
  74 + String hot;
  75 +
  76 + @JsonKey(name: 'order_o')
  77 + String orderO;
  78 +
  79 + @JsonKey(name: 'status')
  80 + String status;
  81 +
  82 + @JsonKey(name: 'enable')
  83 + String enable;
  84 +
  85 + @JsonKey(name: 'spell')
  86 + String spell;
  87 +
  88 + @JsonKey(name: 'cdate')
  89 + String cdate;
  90 +
  91 + @JsonKey(name: 'rname')
  92 + String rname;
  93 + String table_pnum; //桌位最少可做人数
  94 + String most_pnum; //桌位最多可做人数
  95 + String low; //最低消费
  96 +
  97 + //获取桌位类型
  98 + String get tidStr {
  99 + switch (tid) {
  100 + case "1":
  101 + return "散座";
  102 + case "2":
  103 + return "包间";
  104 + case "3":
  105 + return "卡座";
  106 + }
  107 + }
  108 +
  109 + String reserver; //订餐人
  110 + String notebookId; //桌位对应的预订id
  111 + bool selected = false; //是否选中
  112 + String max; //最多可做人数
  113 + String sign; //标签 桌位状态 0:待确认,1:已定座,2:确认到店,3:用餐完成,4:取消预订,5:安排包间,6拒绝订单
  114 +
  115 + String get maxText {
  116 + if (max == null || max == "0" || max == "null") {
  117 + return "";
  118 + } else {
  119 + return "最多可坐" + max + "人";
  120 + }
  121 + }
  122 +
  123 + //获取桌位可坐人数
  124 + String get tableNum {
  125 + if (table_pnum == null || table_pnum.isEmpty || table_pnum == "0") {
  126 + return "";
  127 + } else if (most_pnum != null &&
  128 + most_pnum.isNotEmpty &&
  129 + most_pnum != "0" &&
  130 + most_pnum != "null") {
  131 + if (table_pnum == most_pnum) {
  132 + return "$table_pnum人";
  133 + } else {
  134 + return "$table_pnum-$most_pnum人";
  135 + }
  136 + } else {
  137 + return "$table_pnum人";
  138 + }
  139 + }
  140 +
  141 + //获取最低消费
  142 + String get lowStr {
  143 + return (low == null || low.isEmpty || low == "0") ? "" : "最低消费\n$low元";
  144 + }
  145 +
  146 + String get signStr {
  147 + if (enable == "0") return "已停用";
  148 + if (sign != null) {
  149 + switch (sign) {
  150 + case "1": //已预订
  151 + case "5": //已安排包间
  152 + return "已预订";
  153 + case "2": //用餐中
  154 + return "用餐中";
  155 + default:
  156 + return "";
  157 + }
  158 + }
  159 + return "";
  160 + }
  161 +
  162 + TableList(
  163 + this.id,
  164 + this.rid,
  165 + this.sellerid,
  166 + this.name,
  167 + this.qrcode,
  168 + this.tablePnum,
  169 + this.mostPnum,
  170 + this.tid,
  171 + this.hot,
  172 + this.orderO,
  173 + this.status,
  174 + this.enable,
  175 + this.spell,
  176 + this.cdate,
  177 + this.rname);
  178 +
  179 + factory TableList.fromJson(Map<String, dynamic> srcJson) =>
  180 + _$TableListFromJson(srcJson);
  181 +
  182 + Map<String, dynamic> toJson() => _$TableListToJson(this);
  183 +}
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +
  3 +part of 'table_list.dart';
  4 +
  5 +// **************************************************************************
  6 +// JsonSerializableGenerator
  7 +// **************************************************************************
  8 +
  9 +TableListModel _$TableListModelFromJson(Map<String, dynamic> json) {
  10 + return TableListModel(
  11 + json['ret'] as int,
  12 + (json['data'] as List)
  13 + ?.map((e) => e == null
  14 + ? null
  15 + : TableListSunModel.fromJson(e as Map<String, dynamic>))
  16 + ?.toList(),
  17 + json['msg'] as String);
  18 +}
  19 +
  20 +Map<String, dynamic> _$TableListModelToJson(TableListModel instance) =>
  21 + <String, dynamic>{
  22 + 'ret': instance.ret,
  23 + 'data': instance.data,
  24 + 'msg': instance.msg
  25 + };
  26 +
  27 +TableListSunModel _$TableListSunModelFromJson(Map<String, dynamic> json) {
  28 + return TableListSunModel(
  29 + json['name'] as String,
  30 + (json['list'] as List)
  31 + ?.map((e) =>
  32 + e == null ? null : TableList.fromJson(e as Map<String, dynamic>))
  33 + ?.toList());
  34 +}
  35 +
  36 +Map<String, dynamic> _$TableListSunModelToJson(TableListSunModel instance) =>
  37 + <String, dynamic>{'name': instance.name, 'list': instance.list};
  38 +
  39 +TableList _$TableListFromJson(Map<String, dynamic> json) {
  40 + return TableList(
  41 + json['id'] as String,
  42 + json['rid'] as String,
  43 + json['sellerid'] as String,
  44 + json['name'] as String,
  45 + json['qrcode'] as String,
  46 + json['table_pnum'] as String,
  47 + json['most_pnum'] as String,
  48 + json['tid'] as String,
  49 + json['hot'] as String,
  50 + json['order_o'] as String,
  51 + json['status'] as String,
  52 + json['enable'] as String,
  53 + json['spell'] as String,
  54 + json['cdate'] as String,
  55 + json['rname'] as String);
  56 +}
  57 +
  58 +Map<String, dynamic> _$TableListToJson(TableList instance) => <String, dynamic>{
  59 + 'id': instance.id,
  60 + 'rid': instance.rid,
  61 + 'sellerid': instance.sellerid,
  62 + 'name': instance.name,
  63 + 'qrcode': instance.qrcode,
  64 + 'table_pnum': instance.tablePnum,
  65 + 'most_pnum': instance.mostPnum,
  66 + 'tid': instance.tid,
  67 + 'hot': instance.hot,
  68 + 'order_o': instance.orderO,
  69 + 'status': instance.status,
  70 + 'enable': instance.enable,
  71 + 'spell': instance.spell,
  72 + 'cdate': instance.cdate,
  73 + 'rname': instance.rname
  74 + };
@@ -6,8 +6,9 @@ class BaseResp<T> { @@ -6,8 +6,9 @@ class BaseResp<T> {
6 int code; 6 int code;
7 String msg; 7 String msg;
8 T data; 8 T data;
  9 + Map responseData;
9 10
10 - BaseResp(this.status, this.code, this.msg, this.data); 11 + BaseResp(this.status, this.code, this.msg, this.data,this.responseData);
11 12
12 @override 13 @override
13 String toString() { 14 String toString() {
@@ -9,7 +9,6 @@ import 'package:one_key/widgets/loading.dart'; @@ -9,7 +9,6 @@ import 'package:one_key/widgets/loading.dart';
9 9
10 import 'base_resp.dart'; 10 import 'base_resp.dart';
11 11
12 -  
13 /** 12 /**
14 * @Author: thl 13 * @Author: thl
15 * @GitHub: https://github.com/Sky24n 14 * @GitHub: https://github.com/Sky24n
@@ -167,15 +166,19 @@ class DioUtil { @@ -167,15 +166,19 @@ class DioUtil {
167 /// [data] The request data 166 /// [data] The request data
168 /// [options] The request options. 167 /// [options] The request options.
169 /// <BaseResp<T> 返回 status code msg data . 168 /// <BaseResp<T> 返回 status code msg data .
170 - Future<BaseResp<T>> request<T>(BuildContext context,String method, String path,  
171 - {data, Options options, CancelToken cancelToken,bool showLoading=true}) async {  
172 - bool connectivity=await Utils.checkConnectiviy(); 169 + Future<BaseResp<T>> request<T>(
  170 + BuildContext context, String method, String path,
  171 + {data,
  172 + Options options,
  173 + CancelToken cancelToken,
  174 + bool showLoading = true}) async {
  175 + bool connectivity = await Utils.checkConnectiviy();
173 // if(!connectivity){ 176 // if(!connectivity){
174 // Utils.showToast("网络错误,请稍后重试"); 177 // Utils.showToast("网络错误,请稍后重试");
175 // return new Future.error("网络错误,请稍后重试"); 178 // return new Future.error("网络错误,请稍后重试");
176 // } 179 // }
177 - if(showLoading)Loading.showLoading(context);  
178 - try{ 180 + if (showLoading) Loading.showLoading(context);
  181 + try {
179 Response response = await _dio.request(path, 182 Response response = await _dio.request(path,
180 data: data, 183 data: data,
181 options: _checkOptions(method, options), 184 options: _checkOptions(method, options),
@@ -185,6 +188,7 @@ class DioUtil { @@ -185,6 +188,7 @@ class DioUtil {
185 int _code; 188 int _code;
186 String _msg; 189 String _msg;
187 T _data; 190 T _data;
  191 + Map _responseData;
188 if (response.statusCode == HttpStatus.ok || 192 if (response.statusCode == HttpStatus.ok ||
189 response.statusCode == HttpStatus.created) { 193 response.statusCode == HttpStatus.created) {
190 try { 194 try {
@@ -197,6 +201,7 @@ class DioUtil { @@ -197,6 +201,7 @@ class DioUtil {
197 : response.data[_codeKey]; 201 : response.data[_codeKey];
198 _msg = response.data[_msgKey]; 202 _msg = response.data[_msgKey];
199 _data = response.data[_dataKey]; 203 _data = response.data[_dataKey];
  204 + _responseData = response.data;
200 } else { 205 } else {
201 Map<String, dynamic> _dataMap = _decodeData(response); 206 Map<String, dynamic> _dataMap = _decodeData(response);
202 _status = (_dataMap[_statusKey] is int) 207 _status = (_dataMap[_statusKey] is int)
@@ -207,9 +212,10 @@ class DioUtil { @@ -207,9 +212,10 @@ class DioUtil {
207 : _dataMap[_codeKey]; 212 : _dataMap[_codeKey];
208 _msg = _dataMap[_msgKey]; 213 _msg = _dataMap[_msgKey];
209 _data = _dataMap[_dataKey]; 214 _data = _dataMap[_dataKey];
  215 + _responseData = _dataMap;
210 } 216 }
211 Loading.hideLoading(context); 217 Loading.hideLoading(context);
212 - return new BaseResp(_status, _code, _msg, _data); 218 + return new BaseResp(_status, _code, _msg, _data, _responseData);
213 } catch (e) { 219 } catch (e) {
214 Loading.hideLoading(context); 220 Loading.hideLoading(context);
215 return new Future.error(new DioError( 221 return new Future.error(new DioError(
@@ -225,11 +231,11 @@ class DioUtil { @@ -225,11 +231,11 @@ class DioUtil {
225 message: "statusCode: $response.statusCode, service error", 231 message: "statusCode: $response.statusCode, service error",
226 type: DioErrorType.RESPONSE, 232 type: DioErrorType.RESPONSE,
227 )); 233 ));
228 - }on DioError catch(error){  
229 - if(showLoading){ 234 + } on DioError catch (error) {
  235 + if (showLoading) {
230 Loading.hideLoading(context); 236 Loading.hideLoading(context);
231 } 237 }
232 - if(error is DioError &&error.type==DioErrorType.CONNECT_TIMEOUT){ 238 + if (error is DioError && error.type == DioErrorType.CONNECT_TIMEOUT) {
233 Utils.showToast("网络链接超时,请稍后重试"); 239 Utils.showToast("网络链接超时,请稍后重试");
234 } 240 }
235 throw error; 241 throw error;
1 -class HttpUrl{  
2 - static const String server_address = "https://xt04.colorcun.com/";//服务端请求地址  
3 - static const String app_user_login="?service=Android.User.AppUserLogin";//登录地址  
4 - static const String user_token_init="?service=Android.User.UserTokenInit";//初始化推送token  
5 - static const String sellerinfo="?service=Android.Reserve.SellerInfo";//获取商家信息  
6 - static const String login_out="?service=Android.User.AppLoginOut";//退出登录  
7 - static const String get_message_list="?service=Android.Reserve.GetMessageList";//获取消息列表  
8 - static const String get_reserve_list="?service=Android.Reserve.NewGetReserveList";//获取已预订列表  
9 - static const String reserve_count_day="?service=Android.Reserve.NewReservesCountDay";//获取一天订单统计数目  
10 - static const String reserve_detail="?service=Android.Reserve.Detail";//订单详情  
11 - static const String set_reserve_cusman="?service=Android.Reserve.SetReserveCusman";//设置客户经理  
12 - static const String table_list="?service=Android.Tables.GetTableListsBySellerId";//桌位列表  
13 - static const String set_reserve_status="?service=Android.Customer.SetReserveStatus";//设置订单状态  
14 - static const String set_message_status="?service=Android.Advance.SetMessageStatus";//设置消息状态  
15 - static const String get_sms_content="?service=App.SendSMS.GetSmsContent";//获取短信内容  
16 - static const String send_sms="?service=App.SendSMS.NewMessage";//发送短信  
17 - static const String check_update="http://xt03.colorcun.com/admin/api/compareversion?flat=3";  
18 - static const String upload_contact="?service=App.Seller.SaveCallRecord";//上传通讯录  
19 -}  
  1 +class HttpUrl {
  2 + static const String server_address = "https://xt04.colorcun.com/"; //服务端请求地址
  3 + static const String app_user_login =
  4 + "?service=Android.User.AppUserLogin"; //登录地址
  5 + static const String user_token_init =
  6 + "?service=Android.User.UserTokenInit"; //初始化推送token
  7 + static const String sellerinfo =
  8 + "?service=Android.Reserve.SellerInfo"; //获取商家信息
  9 + static const String login_out = "?service=Android.User.AppLoginOut"; //退出登录
  10 + static const String get_message_list =
  11 + "?service=Android.Reserve.GetMessageList"; //获取消息列表
  12 + static const String get_reserve_list =
  13 + "?service=Android.Reserve.NewGetReserveList"; //获取已预订列表
  14 + static const String reserve_count_day =
  15 + "?service=Android.Reserve.NewReservesCountDay"; //获取一天订单统计数目
  16 + static const String reserve_detail = "?service=Android.Reserve.Detail"; //订单详情
  17 + static const String set_reserve_cusman =
  18 + "?service=Android.Reserve.SetReserveCusman"; //设置客户经理
  19 + static const String table_list =
  20 + "?service=Android.Tables.GetTableListsBySellerId"; //桌位列表
  21 + static const String set_reserve_status =
  22 + "?service=Android.Customer.SetReserveStatus"; //设置订单状态
  23 + static const String set_message_status =
  24 + "?service=Android.Advance.SetMessageStatus"; //设置消息状态
  25 + static const String get_sms_content =
  26 + "?service=App.SendSMS.GetSmsContent"; //获取短信内容
  27 + static const String send_sms = "?service=App.SendSMS.NewMessage"; //发送短信
  28 + static const String check_update =
  29 + "http://xt03.colorcun.com/admin/api/compareversion?flat=3";
  30 + static const String upload_contact =
  31 + "?service=App.Seller.SaveCallRecord"; //上传通讯录
  32 + static const String get_table_list =
  33 + "?service=Android.Reserve.NewGetTableList"; //根据商家ID 获取桌位信息列表: 1:散座 2:包间 默认:获取所有数据
  34 +}
@@ -22,10 +22,9 @@ import 'package:provider/provider.dart'; @@ -22,10 +22,9 @@ import 'package:provider/provider.dart';
22 import 'package:one_key/utils/event_bus.dart'; 22 import 'package:one_key/utils/event_bus.dart';
23 23
24 class HandleOnlinePage extends StatefulWidget { 24 class HandleOnlinePage extends StatefulWidget {
25 -  
26 final String rid; 25 final String rid;
27 final String mid; 26 final String mid;
28 - HandleOnlinePage(this.rid,this.mid); 27 + HandleOnlinePage(this.rid, this.mid);
29 28
30 @override 29 @override
31 State<StatefulWidget> createState() { 30 State<StatefulWidget> createState() {
@@ -34,110 +33,128 @@ class HandleOnlinePage extends StatefulWidget { @@ -34,110 +33,128 @@ class HandleOnlinePage extends StatefulWidget {
34 } 33 }
35 } 34 }
36 35
37 -  
38 class HandleOnlinePageState extends State<HandleOnlinePage> { 36 class HandleOnlinePageState extends State<HandleOnlinePage> {
39 -  
40 - NotebookDetailModel detailModel= NotebookDetailModel(); 37 + NotebookDetailModel detailModel = NotebookDetailModel();
41 38
42 NotebookDetail detailEntity; 39 NotebookDetail detailEntity;
43 40
44 - String cusmanText=""; 41 + String cusmanText = "";
45 42
46 - List<Manager> managers=[];//客户经理 43 + List<Manager> managers = []; //客户经理
47 44
48 - Manager manager=Manager(); 45 + Manager manager = Manager();
49 46
50 @override 47 @override
51 void initState() { 48 void initState() {
52 // TODO: implement initState 49 // TODO: implement initState
53 super.initState(); 50 super.initState();
54 WidgetsBinding.instance.addPostFrameCallback((_) async { 51 WidgetsBinding.instance.addPostFrameCallback((_) async {
55 - detailEntity=await detailModel.getReserveDetail(context, {  
56 - "rid":widget.rid, 52 + detailEntity = await detailModel.getReserveDetail(context, {
  53 + "rid": widget.rid,
57 }); 54 });
58 - setState(() {//未处理  
59 - cusmanText=detailEntity.cusman.isEmpty?"请选择":detailEntity.cusman; 55 + setState(() {
  56 + //未处理
  57 + cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
60 }); 58 });
61 - if(detailEntity.status!="0"){//已处理  
62 - Future.delayed(Duration(milliseconds: 200),(){  
63 - NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,replace: true); 59 + if (detailEntity.status != "0") {
  60 + //已处理
  61 + Future.delayed(Duration(milliseconds: 200), () {
  62 + NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,
  63 + replace: true);
64 }); 64 });
65 setMessageStatus(); 65 setMessageStatus();
66 - }else{  
67 - managers=await detailModel.getManagers(context); 66 + } else {
  67 + managers = await detailModel.getManagers(context);
68 } 68 }
69 }); 69 });
70 } 70 }
71 71
72 //设置当前客户经理 72 //设置当前客户经理
73 - _setCurrManager(){  
74 - manager=managers.firstWhere((manager)=>manager.userName==cusmanText,orElse: ()=>Manager());  
75 - if(manager.id==null||manager.id.toString().isEmpty)return;  
76 - Map<String,String> params={  
77 - "rid":detailEntity.id,  
78 - "cusman_id":manager.id.toString(),  
79 - "cusman":manager.userName 73 + _setCurrManager() {
  74 + manager = managers.firstWhere((manager) => manager.userName == cusmanText,
  75 + orElse: () => Manager());
  76 + if (manager.id == null || manager.id.toString().isEmpty) return;
  77 + Map<String, String> params = {
  78 + "rid": detailEntity.id,
  79 + "cusman_id": manager.id.toString(),
  80 + "cusman": manager.userName
80 }; 81 };
81 detailModel.setReserveCusmnan(context, params); 82 detailModel.setReserveCusmnan(context, params);
82 } 83 }
83 84
84 //拒绝订单弹框 85 //拒绝订单弹框
85 - _showRefuseDialog(){  
86 - showDialog(context: context,builder: (context){  
87 - return AlertDialog(  
88 - title: Text("确定拒绝订单吗?\n拒绝后无法联系客户"),  
89 - titleTextStyle: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(32)),  
90 - content: Text("如果包间类型订满,请及时停用"),  
91 - contentTextStyle:TextStyle(color: MyColours.color_828282,fontSize: ScreenUtil().setSp(28)),  
92 - actions: <Widget>[  
93 - FlatButton(  
94 - child: Text("拒绝订单",style: TextStyle(fontSize: ScreenUtil().setSp(32)),),  
95 - onPressed: (){  
96 - Navigator.of(context).pop();  
97 - setReserveStatus("6");  
98 - },  
99 - ),  
100 - FlatButton(  
101 - child: Text("去安排",style: TextStyle(fontSize: ScreenUtil().setSp(32)),),  
102 - onPressed: () async {  
103 - Navigator.of(context).pop();  
104 - String tid=await NavigatorUtil.goSelectTablePage(context,widget.rid,int.parse(detailEntity.ddate)*1000,detailEntity.ddate_solt);  
105 - if(tid!=null){  
106 - setReserveStatus("5",tid:tid);  
107 - }  
108 - },  
109 - )  
110 - ],  
111 - );  
112 - }); 86 + _showRefuseDialog() {
  87 + showDialog(
  88 + context: context,
  89 + builder: (context) {
  90 + return AlertDialog(
  91 + title: Text("确定拒绝订单吗?\n拒绝后无法联系客户"),
  92 + titleTextStyle: TextStyle(
  93 + color: MyColours.color_353535,
  94 + fontSize: ScreenUtil().setSp(32)),
  95 + content: Text("如果包间类型订满,请及时停用"),
  96 + contentTextStyle: TextStyle(
  97 + color: MyColours.color_828282,
  98 + fontSize: ScreenUtil().setSp(28)),
  99 + actions: <Widget>[
  100 + FlatButton(
  101 + child: Text(
  102 + "拒绝订单",
  103 + style: TextStyle(fontSize: ScreenUtil().setSp(32)),
  104 + ),
  105 + onPressed: () {
  106 + Navigator.of(context).pop();
  107 + setReserveStatus("6");
  108 + },
  109 + ),
  110 + FlatButton(
  111 + child: Text(
  112 + "去安排",
  113 + style: TextStyle(fontSize: ScreenUtil().setSp(32)),
  114 + ),
  115 + onPressed: () async {
  116 + Navigator.of(context).pop();
  117 + String tid = await NavigatorUtil.goSelectTablePage(
  118 + context,
  119 + widget.rid,
  120 + int.parse(detailEntity.ddate) * 1000,
  121 + detailEntity.ddate_solt);
  122 + if (tid != null) {
  123 + setReserveStatus("5", tid: tid);
  124 + }
  125 + },
  126 + )
  127 + ],
  128 + );
  129 + });
113 } 130 }
114 131
115 //处理在线预订 132 //处理在线预订
116 - setReserveStatus(String status,{String tid=""}){  
117 - bus.emit("remove_untreated_message",widget.mid);  
118 - UserModel userModel=Provider.of<UserModel>(context,listen: false);  
119 - Map<String,String> causeMap={  
120 - "uid":userModel.user.openid,  
121 - "uname":userModel.user.account,  
122 - "desc":"", 133 + setReserveStatus(String status, {String tid = ""}) {
  134 + bus.emit("remove_untreated_message", widget.mid);
  135 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  136 + Map<String, String> causeMap = {
  137 + "uid": userModel.user.openid,
  138 + "uname": userModel.user.account,
  139 + "desc": "",
123 }; 140 };
124 - Map<String,String> params={  
125 - "rid":widget.rid,  
126 - "status":status,//5安排包间 6 拒绝订单  
127 - "tid":tid,  
128 - "mid":widget.mid,  
129 - "cause":json.encode(causeMap) 141 + Map<String, String> params = {
  142 + "rid": widget.rid,
  143 + "status": status, //5安排包间 6 拒绝订单
  144 + "tid": tid,
  145 + "mid": widget.mid,
  146 + "cause": json.encode(causeMap)
130 }; 147 };
131 detailModel.setReserveStatus(context, params); 148 detailModel.setReserveStatus(context, params);
132 } 149 }
133 150
134 //处理在线预订 151 //处理在线预订
135 - setMessageStatus(){  
136 - bus.emit("remove_untreated_message",widget.mid);  
137 - Map<String,String> params={  
138 - "sid":Provider.of<UserModel>(context,listen: false).user.sellerid,  
139 - "id":widget.mid,  
140 - "status":"is_handle" 152 + setMessageStatus() {
  153 + bus.emit("remove_untreated_message", widget.mid);
  154 + Map<String, String> params = {
  155 + "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  156 + "id": widget.mid,
  157 + "status": "is_handle"
141 }; 158 };
142 detailModel.setMessageStatus(context, params); 159 detailModel.setMessageStatus(context, params);
143 } 160 }
@@ -146,186 +163,251 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -146,186 +163,251 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
146 Widget build(BuildContext context) { 163 Widget build(BuildContext context) {
147 // TODO: implement build 164 // TODO: implement build
148 return SafeArea( 165 return SafeArea(
149 - child: detailEntity==null?Container(  
150 - width: double.infinity,  
151 - height: double.infinity,  
152 - color: MyColours.color_ffffff,  
153 - ):Column(  
154 - children: <Widget>[  
155 - MyAppBar(  
156 - "在线预订详情",  
157 - showBack: true,  
158 - ),  
159 - Expanded(  
160 - child: DefaultTextStyle(style: TextStyle(decoration: TextDecoration.none), child: Container( 166 + child: detailEntity == null
  167 + ? Container(
  168 + width: double.infinity,
  169 + height: double.infinity,
161 color: MyColours.color_ffffff, 170 color: MyColours.color_ffffff,
162 - child: Column(  
163 - children: <Widget>[  
164 - SingleChildScrollView(  
165 - child: Container(  
166 - color: MyColours.color_ffffff,  
167 - padding:  
168 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(43)),  
169 - child: Column(  
170 - children: <Widget>[  
171 - RowMultiText("用餐时段", detailEntity.ddateMd),  
172 - Stack(  
173 - alignment: Alignment.center,  
174 - children: <Widget>[  
175 - Column( 171 + )
  172 + : Column(
  173 + children: <Widget>[
  174 + MyAppBar(
  175 + "在线预订详情",
  176 + showBack: true,
  177 + ),
  178 + Expanded(
  179 + child: DefaultTextStyle(
  180 + style: TextStyle(decoration: TextDecoration.none),
  181 + child: Container(
  182 + color: MyColours.color_ffffff,
  183 + child: Column(
  184 + children: <Widget>[
  185 + SingleChildScrollView(
  186 + child: Container(
  187 + color: MyColours.color_ffffff,
  188 + padding: EdgeInsets.symmetric(
  189 + horizontal: ScreenUtil().setWidth(43)),
  190 + child: Column(
  191 + children: <Widget>[
  192 + RowMultiText(
  193 + "用餐时段", detailEntity.ddateMd),
  194 + Stack(
  195 + alignment: Alignment.center,
  196 + children: <Widget>[
  197 + Column(
  198 + children: <Widget>[
  199 + RowMultiText("用餐时间",
  200 + detailEntity.ddateHm),
  201 + Offstage(
  202 + offstage:
  203 + detailEntity.type == "0"
  204 + ? false
  205 + : true,
  206 + child: RowMultiText("用餐人数",
  207 + detailEntity.pnum),
  208 + )
  209 + ],
  210 + ),
  211 + Image.asset(
  212 + detailEntity.statuImgAssets,
  213 + width: ScreenUtil().setWidth(100),
  214 + height: ScreenUtil().setWidth(30),
  215 + )
  216 + ],
  217 + ),
  218 + RowMultiText(
  219 + "包间需求",
  220 + (detailEntity.demands.length
  221 + .toString() +
  222 + "个") ??
  223 + ""),
  224 + Align(
  225 + alignment: Alignment.centerRight,
  226 + child: Offstage(
  227 + offstage:
  228 + detailEntity.demands.length >
  229 + 0
  230 + ? false
  231 + : true,
  232 + child: Container(
  233 + height:
  234 + ScreenUtil().setHeight(210),
  235 + child: ListView.builder(
  236 + itemBuilder:
  237 + (BuildContext contxt,
  238 + int index) {
  239 + return NeedItem(detailEntity
  240 + .demands[index]);
  241 + },
  242 + itemCount: detailEntity
  243 + .demands.length,
  244 + shrinkWrap: true,
  245 + scrollDirection:
  246 + Axis.horizontal,
  247 + ),
  248 + ),
  249 + )),
  250 + RowMultiText(
  251 + "客户姓名", detailEntity.rnameStr),
  252 + RowMultiText(
  253 + "客户电话", detailEntity.phone),
  254 + RowMultiText(
  255 + "备注信息", detailEntity.cusdem ?? ""),
  256 + MyDivider(double.infinity,
  257 + ScreenUtil().setHeight(1)),
  258 + Container(
  259 + color: MyColours.color_ffffff,
  260 + width: double.infinity,
  261 + height: ScreenUtil().setHeight(80),
  262 + alignment: Alignment.center,
  263 + child: Stack(
  264 + alignment: Alignment.center,
  265 + children: <Widget>[
  266 + Positioned(
  267 + left: 0,
  268 + child: Text(
  269 + "客户经理",
  270 + style: TextStyle(
  271 + color: MyColours
  272 + .color_828282,
  273 + fontSize: ScreenUtil()
  274 + .setSp(30)),
  275 + ),
  276 + ),
  277 + Positioned(
  278 + right: 0,
  279 + child: GestureDetector(
  280 + onTap: () async {
  281 + List<String> list = [];
  282 + for (Manager manager
  283 + in managers) {
  284 + list.add(
  285 + manager.roleUserName);
  286 + }
  287 + DialogUtil
  288 + .showSelectCusmanDialog(
  289 + context, list)
  290 + .then((value) {
  291 + setState(() {
  292 + cusmanText = managers[
  293 + value.first]
  294 + .userName;
  295 + });
  296 + _setCurrManager();
  297 + });
  298 + },
  299 + child: Text(
  300 + cusmanText,
  301 + style: TextStyle(
  302 + color: MyColours
  303 + .color_353535,
  304 + fontSize: ScreenUtil()
  305 + .setSp(30),
  306 + decoration: TextDecoration
  307 + .underline,
  308 + ),
  309 + ),
  310 + ),
  311 + )
  312 + ],
  313 + ),
  314 + ),
  315 + ],
  316 + )),
  317 + ),
  318 + Container(
  319 + margin: EdgeInsets.only(
  320 + top: ScreenUtil().setHeight(30),
  321 + bottom: ScreenUtil().setHeight(30)),
  322 + child: Column(
176 children: <Widget>[ 323 children: <Widget>[
177 - RowMultiText("用餐时间", detailEntity.ddateHm),  
178 - Offstage(  
179 - offstage: detailEntity.type=="0"?false:true,  
180 - child: RowMultiText("用餐人数", detailEntity.pnum),  
181 - )  
182 - ],  
183 - ),  
184 - Image.asset(detailEntity.statuImgAssets,width: ScreenUtil().setWidth(100),height: ScreenUtil().setWidth(30),)  
185 - ],  
186 - ),  
187 - RowMultiText("包间需求", (detailEntity.demands.length.toString()+"个")??""),  
188 - Align(  
189 - alignment: Alignment.centerRight,  
190 - child: Offstage(  
191 - offstage: detailEntity.demands.length>0?false:true,  
192 - child: Container(  
193 - height: ScreenUtil().setHeight(210),  
194 - child: ListView.builder(itemBuilder: (BuildContext contxt,int index){  
195 - return NeedItem(detailEntity.demands[index]);  
196 - },itemCount: detailEntity.demands.length,shrinkWrap: true,scrollDirection: Axis.horizontal,),  
197 - ),  
198 - )  
199 - ),  
200 - RowMultiText("客户姓名", detailEntity.rnameStr),  
201 - RowMultiText("客户电话", detailEntity.phone),  
202 - RowMultiText("备注信息",detailEntity.cusdem??""),  
203 - MyDivider(double.infinity, ScreenUtil().setHeight(1)),  
204 - Container(  
205 - color: MyColours.color_ffffff,  
206 - width: double.infinity,  
207 - height: ScreenUtil().setHeight(80),  
208 - alignment: Alignment.center,  
209 - child: Stack(  
210 - alignment: Alignment.center,  
211 - children: <Widget>[  
212 - Positioned(  
213 - left: 0,  
214 - child: Text(  
215 - "客户经理",  
216 - style: TextStyle(  
217 - color: MyColours.color_828282,  
218 - fontSize: ScreenUtil().setSp(30)),  
219 - ),  
220 - ),  
221 - Positioned(  
222 - right: 0,  
223 - child: GestureDetector(  
224 - onTap: () async {  
225 - List<String> list=[];  
226 - for(Manager manager in managers){  
227 - list.add(manager.roleUserName); 324 + CommonButton(
  325 + content: "安排包间",
  326 + width: 669,
  327 + height: 76,
  328 + fontSize: 34,
  329 + onPress: () async {
  330 + String tid = await NavigatorUtil
  331 + .goSelectTablePage(
  332 + context,
  333 + widget.rid,
  334 + int.parse(detailEntity.ddate) *
  335 + 1000,
  336 + detailEntity.ddate_solt);
  337 + if (tid != null) {
  338 + setReserveStatus("5", tid: tid);
228 } 339 }
229 - DialogUtil.showSelectCusmanDialog(context,list).then((value){  
230 - setState(() {  
231 - cusmanText=managers[value.first].userName;  
232 - });  
233 - _setCurrManager();  
234 - });  
235 }, 340 },
236 - child: Text(  
237 - cusmanText,  
238 - style: TextStyle(  
239 - color: MyColours.color_353535,  
240 - fontSize: ScreenUtil().setSp(30),  
241 - decoration: TextDecoration.underline,  
242 - ),  
243 - ),  
244 ), 341 ),
245 - )  
246 - ],  
247 - ),  
248 - ),  
249 - ],  
250 - )),  
251 - ),  
252 - Container(  
253 - margin: EdgeInsets.only(top: ScreenUtil().setHeight(30),bottom: ScreenUtil().setHeight(30)),  
254 - child: Column(  
255 - children: <Widget>[  
256 - CommonButton(  
257 - content: "安排包间",  
258 - width: 669,  
259 - height: 76,  
260 - fontSize: 34,  
261 - onPress: () async {  
262 - String tid=await NavigatorUtil.goSelectTablePage(context,widget.rid,int.parse(detailEntity.ddate)*1000,detailEntity.ddate_solt);  
263 - if(tid!=null){  
264 - setReserveStatus("5",tid:tid);  
265 - }  
266 - },  
267 - ),  
268 - VEmptyView(20),  
269 - Container(  
270 - width: ScreenUtil().setWidth(669),  
271 - height: ScreenUtil().setHeight(76),  
272 - decoration: BoxDecoration(  
273 - border: Border.all(color: MyColours.color_199095),  
274 - borderRadius: BorderRadius.circular(  
275 - ScreenUtil().setWidth(5)),  
276 - ),  
277 - child: Row(  
278 - crossAxisAlignment: CrossAxisAlignment.center,  
279 - children: <Widget>[  
280 - Expanded(  
281 - child: GestureDetector(  
282 - child: Center(  
283 - child: Text(  
284 - "拒绝订单",  
285 - style: TextStyle(  
286 - color: MyColours.color_199095,  
287 - fontSize: ScreenUtil().setSp(34)), 342 + VEmptyView(20),
  343 + Container(
  344 + width: ScreenUtil().setWidth(669),
  345 + height: ScreenUtil().setHeight(76),
  346 + decoration: BoxDecoration(
  347 + border: Border.all(
  348 + color: MyColours.color_199095),
  349 + borderRadius: BorderRadius.circular(
  350 + ScreenUtil().setWidth(5)),
288 ), 351 ),
289 - ),  
290 - onTap: () {  
291 - _showRefuseDialog();  
292 - },  
293 - )),  
294 - MyDivider(  
295 - ScreenUtil().setWidth(2),  
296 - ScreenUtil().setHeight(52),  
297 - color: MyColours.color_199095,  
298 - ),  
299 - Expanded(  
300 - child: GestureDetector(  
301 - child: Center(  
302 - child: Text(  
303 - "联系顾客",  
304 - style: TextStyle( 352 + child: Row(
  353 + crossAxisAlignment:
  354 + CrossAxisAlignment.center,
  355 + children: <Widget>[
  356 + Expanded(
  357 + child: GestureDetector(
  358 + child: Center(
  359 + child: Text(
  360 + "拒绝订单",
  361 + style: TextStyle(
  362 + color:
  363 + MyColours.color_199095,
  364 + fontSize:
  365 + ScreenUtil().setSp(34)),
  366 + ),
  367 + ),
  368 + onTap: () {
  369 + _showRefuseDialog();
  370 + },
  371 + )),
  372 + MyDivider(
  373 + ScreenUtil().setWidth(2),
  374 + ScreenUtil().setHeight(52),
305 color: MyColours.color_199095, 375 color: MyColours.color_199095,
306 - fontSize: ScreenUtil().setSp(34)), 376 + ),
  377 + Expanded(
  378 + child: GestureDetector(
  379 + child: Center(
  380 + child: Text(
  381 + "联系顾客",
  382 + style: TextStyle(
  383 + color:
  384 + MyColours.color_199095,
  385 + fontSize:
  386 + ScreenUtil().setSp(34)),
  387 + ),
  388 + ),
  389 + onTap: () {
  390 + if (detailEntity.phone != null &&
  391 + detailEntity
  392 + .phone.isNotEmpty) {
  393 + Utils.goPhone(
  394 + detailEntity.phone);
  395 + } else {
  396 + Utils.showToast("没有客户电话!");
  397 + }
  398 + },
  399 + )),
  400 + ],
307 ), 401 ),
308 - ),  
309 - onTap: () {  
310 - if(detailEntity.phone!=null&&detailEntity.phone.isNotEmpty){  
311 - Utils.goPhone(detailEntity.phone);  
312 - }else{  
313 - Utils.showToast("没有客户电话!");  
314 - }  
315 - },  
316 - )), 402 + )
  403 + ],
  404 + ),
  405 + )
317 ], 406 ],
318 - ),  
319 - )  
320 - ],  
321 - ),  
322 - )  
323 - ],  
324 - )  
325 - )),  
326 - )  
327 - ],  
328 - ), 407 + ))),
  408 + )
  409 + ],
  410 + ),
329 ); 411 );
330 } 412 }
331 } 413 }
  1 +import 'dart:ui';
  2 +
  3 +import 'package:common_utils/common_utils.dart';
  4 +import 'package:flutter/material.dart';
  5 +import 'package:flutter/services.dart';
  6 +import 'package:flutter_screenutil/screenutil.dart';
  7 +import 'package:one_key/models/notebook_detail.dart';
  8 +import 'package:one_key/provider/notebook_detail_change_model.dart';
  9 +import 'package:one_key/res/colors.dart';
  10 +import 'package:one_key/utils/dialog_util.dart';
  11 +import 'package:one_key/utils/navigator_util.dart';
  12 +import 'package:one_key/widgets/MyDivider.dart';
  13 +import 'package:one_key/widgets/app_bar.dart';
  14 +import 'package:one_key/widgets/common_button.dart';
  15 +import 'package:one_key/widgets/h_empty_view.dart';
  16 +import 'package:one_key/widgets/new_table_item.dart';
  17 +import 'package:one_key/widgets/table_item.dart';
  18 +import 'package:one_key/widgets/v_empty_view.dart';
  19 +import 'package:provider/provider.dart';
  20 +
  21 +typedef clickCallback = void Function(String value);
  22 +
  23 +class NoteBookChangePage extends StatefulWidget {
  24 + final NotebookDetail detailEntity;
  25 + final String rid;
  26 +
  27 + const NoteBookChangePage({Key key, this.detailEntity, this.rid})
  28 + : super(key: key);
  29 + @override
  30 + _NoteBookChangePageState createState() => _NoteBookChangePageState();
  31 +}
  32 +
  33 +class _NoteBookChangePageState extends State<NoteBookChangePage> {
  34 + // String dateText = ""; //当前显示日期时间
  35 + // int currTimeIndex = 1; //当前选中时间段
  36 + // String morning; //早市时间段
  37 + // String noon; //午市时间段
  38 + // String night; //晚市时间段
  39 +
  40 + DateTime dateTime; //当前日期
  41 + NotebookDetailChangeModel _notebookDetailChangeModel;
  42 + FocusNode _phoneNode = FocusNode();
  43 + FocusNode _nameNode = FocusNode();
  44 + FocusNode _needNode = FocusNode();
  45 +
  46 + // //生成日期文本
  47 + // _createDateText(DateTime day) {
  48 + // if (Utils.isOneDay(day, dateTime)) return; //日期没变
  49 + // setState(() {
  50 + // DateTime dateNow = DateTime.now();
  51 + // if (Utils.isOneDay(day, dateNow)) {
  52 + // dateText = Utils.addZeroNumber(dateNow.month) +
  53 + // "-" +
  54 + // Utils.addZeroNumber(dateNow.day) +
  55 + // " 今天";
  56 + // } else {
  57 + // dateText =
  58 + // Utils.addZeroNumber(day.month) + "-" + Utils.addZeroNumber(day.day);
  59 + // }
  60 + // dateTime = day;
  61 + // });
  62 + // // _getReserveList();
  63 + // // _reserveCountDay();
  64 + // }
  65 +
  66 + //初始化时间
  67 + _initTime() {
  68 + _notebookDetailChangeModel =
  69 + Provider.of<NotebookDetailChangeModel>(context, listen: false);
  70 + //今天
  71 + DateTime dateTime = DateTime.now();
  72 + int dateTimeMill = dateTime.millisecondsSinceEpoch;
  73 + String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'MM-dd');
  74 + _notebookDetailChangeModel.dateList.add({
  75 + 'title': dateText,
  76 + 'select': false,
  77 + 'fontSize': 34.0,
  78 + 'dayText': ' 今天',
  79 + 'isImage': false
  80 + });
  81 + //明天
  82 + int tomorrowMill = dateTimeMill + 24 * 60 * 60 * 1000;
  83 + String dateTextTomorrow =
  84 + DateUtil.formatDateMs(tomorrowMill, format: 'MM-dd');
  85 + _notebookDetailChangeModel.dateList.add({
  86 + 'title': dateTextTomorrow,
  87 + 'select': false,
  88 + 'fontSize': 34.0,
  89 + 'dayText': ' 明天',
  90 + 'isImage': false
  91 + });
  92 + //第三个
  93 + _notebookDetailChangeModel.dateList.add({
  94 + 'title': '其他',
  95 + 'select': true,
  96 + 'fontSize': 30.0,
  97 + 'dayText': '',
  98 + 'isImage': true
  99 + });
  100 +
  101 + print(widget.detailEntity);
  102 + // dateList.add(value)
  103 + // morning =
  104 + // userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;
  105 + // noon = userModel.user.noon.isEmpty ? "00:00-00:00" : userModel.user.noon;
  106 + // night = userModel.user.night.isEmpty ? "00:00-00:00" : userModel.user.night;
  107 + // if (dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
  108 + // "-" +
  109 + // Utils.addZeroNumber(dateTime.month) +
  110 + // "-" +
  111 + // Utils.addZeroNumber(dateTime.day) +
  112 + // " " +
  113 + // morning.split("-")[1] +
  114 + // ":00"))) {
  115 + // //未过早市
  116 + // currTimeIndex = 1;
  117 + // } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
  118 + // "-" +
  119 + // Utils.addZeroNumber(dateTime.month) +
  120 + // "-" +
  121 + // Utils.addZeroNumber(dateTime.day) +
  122 + // " " +
  123 + // morning.split("-")[1] +
  124 + // ":00")) &&
  125 + // dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
  126 + // "-" +
  127 + // Utils.addZeroNumber(dateTime.month) +
  128 + // "-" +
  129 + // Utils.addZeroNumber(dateTime.day) +
  130 + // " " +
  131 + // noon.split("-")[1] +
  132 + // ":00"))) {
  133 + // //过了早市,未过午市
  134 + // currTimeIndex = 2;
  135 + // } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
  136 + // "-" +
  137 + // Utils.addZeroNumber(dateTime.month) +
  138 + // "-" +
  139 + // Utils.addZeroNumber(dateTime.day) +
  140 + // " " +
  141 + // noon.split("-")[1] +
  142 + // ":00")) &&
  143 + // dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
  144 + // "-" +
  145 + // Utils.addZeroNumber(dateTime.month) +
  146 + // "-" +
  147 + // Utils.addZeroNumber(dateTime.day) +
  148 + // " " +
  149 + // night.split("-")[1] +
  150 + // ":00"))) {
  151 + // //过了午市,未过晚市
  152 + // currTimeIndex = 3;
  153 + // } else {
  154 + // //过了晚市
  155 + // currTimeIndex = 3;
  156 + // }
  157 + }
  158 +
  159 + @override
  160 + void initState() {
  161 + super.initState();
  162 + dateTime = DateTime.now();
  163 +
  164 + _notebookDetailChangeModel =
  165 + Provider.of<NotebookDetailChangeModel>(context, listen: false);
  166 + _notebookDetailChangeModel.initDateHourMinuteList(context);
  167 + _notebookDetailChangeModel.getNewTableList(context);
  168 + _initData();
  169 +
  170 + // _initTime();
  171 + }
  172 +
  173 + _initData() {
  174 + print(widget.detailEntity);
  175 + for (var item in widget.detailEntity.tables) {
  176 + item.selected = true;
  177 + }
  178 + }
  179 +
  180 + _topWidget() {
  181 + return Container(
  182 + padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
  183 + child: Column(
  184 + children: [
  185 + //第一行 日期选择
  186 + Row(
  187 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  188 + children: _notebookDetailChangeModel.dateList.map((value) {
  189 + return CustomButton(
  190 + dateText: value['title'],
  191 + fontSize: value['fontSize'],
  192 + dayText: value['dayText'],
  193 + isImage: value['isImage'],
  194 + isSelect: value['select'],
  195 + onTap: () {
  196 + for (int j = 0;
  197 + j < _notebookDetailChangeModel.dateList.length;
  198 + j++) {
  199 + _notebookDetailChangeModel.dateList[j]['select'] = false;
  200 +
  201 + if (_notebookDetailChangeModel.dateList[j]['title'] ==
  202 + value['title']) {
  203 + _notebookDetailChangeModel.dateList[j]['select'] = true;
  204 + if (j == 0 || j == 1) {
  205 + _notebookDetailChangeModel.dateList[2]['title'] =
  206 + '其他';
  207 + }
  208 + if (j ==
  209 + _notebookDetailChangeModel.dateList.length - 1) {
  210 + String selectStr =
  211 + _notebookDetailChangeModel.dateList[2]['title'];
  212 + String timeNow = DateUtil.formatDate(
  213 + DateTime.now(),
  214 + );
  215 + String selectDate =
  216 + timeNow.replaceRange(5, 10, selectStr);
  217 + DialogUtil.showCalendarDialog(
  218 + context, DateUtil.getDateTime(selectDate))
  219 + .then((day) {
  220 + if (day != null) {
  221 + // _createDateText(day);
  222 + dateTime = day;
  223 + int dateTimeMill = day.millisecondsSinceEpoch;
  224 + String dateText = DateUtil.formatDateMs(
  225 + dateTimeMill,
  226 + format: 'MM-dd');
  227 + bool isThird = true;
  228 + for (int i = 0;
  229 + i <
  230 + _notebookDetailChangeModel
  231 + .dateList.length;
  232 + i++) {
  233 + _notebookDetailChangeModel.dateList[i]
  234 + ['select'] = false;
  235 +
  236 + if (_notebookDetailChangeModel.dateList[i]
  237 + ['title'] ==
  238 + dateText) {
  239 + _notebookDetailChangeModel.dateList[i]
  240 + ['select'] = true;
  241 + isThird = false;
  242 + }
  243 + }
  244 + if (isThird) {
  245 + _notebookDetailChangeModel.dateList[2]
  246 + ['select'] = true;
  247 + _notebookDetailChangeModel.dateList[2]
  248 + ['title'] = dateText;
  249 + } else {
  250 + _notebookDetailChangeModel.dateList[2]
  251 + ['title'] = '其他';
  252 + }
  253 + }
  254 + _notebookDetailChangeModel.notifyListeners();
  255 + });
  256 + }
  257 + }
  258 + }
  259 + _notebookDetailChangeModel.notifyListeners();
  260 + },
  261 + );
  262 + }).toList()),
  263 +
  264 + VEmptyView(60),
  265 + //早市、午市、晚市
  266 + Row(
  267 + // mainAxisAlignment: MainAxisAlignment.spaceBetween,
  268 + children: _notebookDetailChangeModel.sunDateList.map((value) {
  269 + return Container(
  270 + margin: _notebookDetailChangeModel.sunDateList.length == 3 &&
  271 + value['ddateSolt'] == 3
  272 + ? EdgeInsets.only(right: 0)
  273 + : EdgeInsets.only(right: ScreenUtil().setWidth(20)),
  274 + child: CustomButton(
  275 + onTap: () {
  276 + for (var item in _notebookDetailChangeModel.sunDateList) {
  277 + item['isSelect'] = false;
  278 + if (item['dateText'] == value['dateText']) {
  279 + item['isSelect'] = true;
  280 + String key = '';
  281 +
  282 + if (item['ddateSolt'] == 1) {
  283 + //早市
  284 + key = 'morning';
  285 + } else if (item['ddateSolt'] == 2) {
  286 + //午市
  287 + key = 'noon';
  288 + } else if (item['ddateSolt'] == 3) {
  289 + //晚市
  290 + key = 'night';
  291 + }
  292 + if (key != '') {
  293 + for (var sunitem
  294 + in _notebookDetailChangeModel.dailyMap[key]) {
  295 + if (sunitem['select'] == true) {
  296 + _notebookDetailChangeModel.ddateStr =
  297 + sunitem['title'];
  298 + }
  299 + }
  300 + }
  301 + }
  302 + }
  303 + _notebookDetailChangeModel.notifyListeners();
  304 + },
  305 + dateText: value['dateText'],
  306 + dayText: '',
  307 + isSelect: value['isSelect'],
  308 + ),
  309 + );
  310 + }).toList()),
  311 + VEmptyView(60),
  312 +
  313 + ///人数选择
  314 + Row(
  315 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  316 + children: _notebookDetailChangeModel.personNumList.map((value) {
  317 + return CustomButton(
  318 + onTap: () {
  319 + for (int j = 0;
  320 + j < _notebookDetailChangeModel.personNumList.length;
  321 + j++) {
  322 + _notebookDetailChangeModel.personNumList[j]['isSelect'] =
  323 + false;
  324 +
  325 + if (_notebookDetailChangeModel.personNumList[j]
  326 + ['dateText'] ==
  327 + value['dateText']) {
  328 + _notebookDetailChangeModel.personNumList[j]['isSelect'] =
  329 + true;
  330 + _notebookDetailChangeModel.numController.text =
  331 + value['dateText'];
  332 + // if (j < 5) {
  333 + // _notebookDetailChangeModel.personNumList[5]
  334 + // ['dateText'] = '更多';
  335 + // }
  336 + }
  337 + }
  338 + _notebookDetailChangeModel.notifyListeners();
  339 + },
  340 + dateText: value['dateText'],
  341 + fontSize: value['fontSize'],
  342 + dayText: '',
  343 + width: value['width'],
  344 + isImage: value['isImage'],
  345 + isSelect: value['isSelect'],
  346 + isTextFiled: value['isTextFiled'],
  347 + model: _notebookDetailChangeModel,
  348 + );
  349 + }).toList(),
  350 + )
  351 + ],
  352 + ),
  353 + );
  354 + }
  355 +
  356 + /// 可订桌位
  357 + _middleWidget() {
  358 + return Container(
  359 + padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
  360 + color: MyColours.color_f5f5f5,
  361 + child: Column(
  362 + children: [
  363 + Row(
  364 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  365 + crossAxisAlignment: CrossAxisAlignment.end,
  366 + children: [
  367 + Text(
  368 + '可订桌位',
  369 + style: TextStyle(
  370 + color: MyColours.color_353535,
  371 + fontSize: ScreenUtil().setSp(30)),
  372 + ),
  373 + InkWell(
  374 + onTap: () async {
  375 + String tid = await NavigatorUtil.goSelectTablePage(
  376 + context,
  377 + widget.rid,
  378 + int.parse(widget.detailEntity.ddate) * 1000,
  379 + widget.detailEntity.ddate_solt);
  380 + if (tid != null) {
  381 + // setReserveStatus("5", tid: tid);
  382 + }
  383 + },
  384 + child: Row(
  385 + children: [
  386 + Text('更多',
  387 + style: TextStyle(
  388 + color: MyColours.color_353535,
  389 + fontSize: ScreenUtil().setSp(26))),
  390 + HEmptyView(20),
  391 + Image.asset(
  392 + 'assets/arr_right_gray.png',
  393 + width: ScreenUtil().setWidth(12),
  394 + height: ScreenUtil().setWidth(22),
  395 + )
  396 + ],
  397 + ),
  398 + )
  399 + ],
  400 + ),
  401 + VEmptyView(32),
  402 + Align(
  403 + alignment: Alignment.centerRight,
  404 + child: Offstage(
  405 + offstage: _notebookDetailChangeModel.tableList.length > 0
  406 + ? false
  407 + : true,
  408 + child: Container(
  409 + // height: ScreenUtil().setHeight(178),
  410 + height: ScreenUtil().setHeight(210),
  411 + child: ListView.builder(
  412 + physics: const NeverScrollableScrollPhysics(),
  413 + itemBuilder: (BuildContext contxt, int index) {
  414 + return NewTableItem(
  415 + _notebookDetailChangeModel.tableList[index],
  416 + height: 160,
  417 + );
  418 + },
  419 + itemCount: _notebookDetailChangeModel.tableList.length > 3
  420 + ? 3
  421 + : _notebookDetailChangeModel.tableList.length,
  422 + shrinkWrap: true,
  423 + scrollDirection: Axis.horizontal,
  424 + ),
  425 + ),
  426 + )),
  427 + ],
  428 + ),
  429 + );
  430 + }
  431 +
  432 + _bottomWidget() {
  433 + return Container(
  434 + padding: EdgeInsets.symmetric(
  435 + horizontal: ScreenUtil().setWidth(40),
  436 + ),
  437 + margin: EdgeInsets.only(top: ScreenUtil().setWidth(72)),
  438 + child: Column(
  439 + children: [
  440 + Row(
  441 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  442 + crossAxisAlignment: CrossAxisAlignment.center,
  443 + children: [
  444 + Expanded(
  445 + child: TextField(
  446 + maxLines: 1,
  447 + //输入文本的样式
  448 + style: TextStyle(
  449 + fontSize: ScreenUtil().setSp(34),
  450 + color: MyColours.color_353535),
  451 + controller: _notebookDetailChangeModel.phoneController,
  452 + focusNode: _phoneNode,
  453 + // textAlignVertical: TextAlignVertical.top,
  454 + decoration: InputDecoration(
  455 + hintText: "客户电话",
  456 + hintStyle: TextStyle(
  457 + color: MyColours.color_999999,
  458 + fontSize: ScreenUtil().setSp(34),
  459 + ),
  460 + // contentPadding:
  461 + // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
  462 + border: InputBorder.none,
  463 + ),
  464 + onChanged: (value) {},
  465 + onEditingComplete: () {
  466 + print('fff');
  467 + _phoneNode.unfocus();
  468 + },
  469 + keyboardType: TextInputType.number,
  470 + ),
  471 + ),
  472 + HEmptyView(40),
  473 + InkWell(
  474 + onTap: () {
  475 + _showDateChooseWidget(context);
  476 + },
  477 + child: Text(
  478 + int.parse(widget.detailEntity.is_set_ddate) == 0
  479 + ? '未设置到店时间'
  480 + : _notebookDetailChangeModel.ddateStr,
  481 + style: TextStyle(
  482 + color: int.parse(widget.detailEntity.is_set_ddate) == 0
  483 + ? MyColours.color_999999
  484 + : MyColours.color_199095,
  485 + fontSize: ScreenUtil().setSp(34),
  486 + ),
  487 + ),
  488 + ),
  489 + ],
  490 + ),
  491 + VEmptyView(40),
  492 + MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2),
  493 + color: MyColours.color_F1F0F4),
  494 + VEmptyView(72),
  495 + Row(
  496 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  497 + crossAxisAlignment: CrossAxisAlignment.center,
  498 + children: [
  499 + Expanded(
  500 + child: TextField(
  501 + maxLines: 1,
  502 + //输入文本的样式
  503 + style: TextStyle(
  504 + fontSize: ScreenUtil().setSp(34),
  505 + color: MyColours.color_353535),
  506 + controller: _notebookDetailChangeModel.nameController,
  507 + focusNode: _nameNode,
  508 + // textAlignVertical: TextAlignVertical.top,
  509 + decoration: InputDecoration(
  510 + hintText: "客户姓名(必填)",
  511 + hintStyle: TextStyle(
  512 + color: MyColours.color_999999,
  513 + fontSize: ScreenUtil().setSp(34),
  514 + ),
  515 + // contentPadding:
  516 + // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
  517 + border: InputBorder.none,
  518 + ),
  519 + onChanged: (value) {},
  520 + onEditingComplete: () {
  521 + print('fff');
  522 + _nameNode.unfocus();
  523 + },
  524 + // keyboardType: TextInputType.number,
  525 + ),
  526 + ),
  527 + HEmptyView(40),
  528 + Row(
  529 + children: _notebookDetailChangeModel.sexList.map((value) {
  530 + return _callButton(
  531 + onPress: () {
  532 + for (var item in _notebookDetailChangeModel.sexList) {
  533 + item['select'] = false;
  534 + if (item['title'] == value['title']) {
  535 + item['select'] = true;
  536 + }
  537 + }
  538 + _notebookDetailChangeModel.notifyListeners();
  539 + },
  540 + content: value['title'],
  541 + hasLeftBorder: value['hasLeftBorder'],
  542 + isSelect: value['select']);
  543 + }).toList()),
  544 + ],
  545 + ),
  546 + VEmptyView(40),
  547 + MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2),
  548 + color: MyColours.color_F1F0F4),
  549 + VEmptyView(72),
  550 + TextField(
  551 + maxLines: 1,
  552 + //输入文本的样式
  553 + style: TextStyle(
  554 + fontSize: ScreenUtil().setSp(34),
  555 + color: MyColours.color_353535),
  556 + controller: _notebookDetailChangeModel.customController,
  557 + focusNode: _needNode,
  558 + // textAlignVertical: TextAlignVertical.top,
  559 + decoration: InputDecoration(
  560 + hintText: "客户要求(25字以内,选填)",
  561 + hintStyle: TextStyle(
  562 + color: MyColours.color_999999,
  563 + fontSize: ScreenUtil().setSp(34),
  564 + ),
  565 + // contentPadding:
  566 + // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
  567 + border: InputBorder.none,
  568 + ),
  569 + onChanged: (value) {},
  570 + onEditingComplete: () {
  571 + print('fff');
  572 + _needNode.unfocus();
  573 + },
  574 + // keyboardType: TextInputType.number,
  575 + ),
  576 + VEmptyView(40),
  577 + MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2),
  578 + color: MyColours.color_F1F0F4),
  579 + // VEmptyView(72),
  580 + // VEmptyView(62),
  581 + ],
  582 + ),
  583 + );
  584 + }
  585 +
  586 + ///底部弹框,设置时间30分钟间隔布局
  587 + _showDateChooseWidget(BuildContext context) async {
  588 + List tempMndList = [];
  589 +
  590 + String title = '早市';
  591 + String key;
  592 + for (var item in _notebookDetailChangeModel.sunDateList) {
  593 + if (item['isSelect'] == true) {
  594 + title = item['dateText'];
  595 + key = item['key'];
  596 + tempMndList = _notebookDetailChangeModel.dailyMap[key];
  597 + }
  598 + }
  599 + //计算行数
  600 +
  601 + int line = 0;
  602 + int count = tempMndList.length;
  603 + if (count % 3 == 0) {
  604 + line = int.parse('${count / 3}');
  605 + } else {
  606 + line = (count / 3).ceil();
  607 + }
  608 + int height = 85 + 40 + 36 * line + (line - 1) * 15;
  609 + final option = await showModalBottomSheet(
  610 + context: context,
  611 + backgroundColor: Colors.white,
  612 + builder: (context) {
  613 + return StatefulBuilder(builder: (context, state) {
  614 + return SafeArea(
  615 + child: Container(
  616 + decoration: BoxDecoration(
  617 + borderRadius:
  618 + BorderRadius.circular(ScreenUtil().setWidth(10))),
  619 + height: ScreenUtil().setWidth(height * 2),
  620 + child: Column(
  621 + children: [
  622 + InkWell(
  623 + onTap: () {
  624 + Navigator.pop(context);
  625 + },
  626 + child: Align(
  627 + alignment: Alignment.centerRight,
  628 + child: Container(
  629 + padding: EdgeInsets.fromLTRB(
  630 + ScreenUtil().setWidth(40),
  631 + ScreenUtil().setWidth(40),
  632 + ScreenUtil().setWidth(40),
  633 + ScreenUtil().setWidth(10)),
  634 + child: Image.asset(
  635 + 'assets/icon_exist.png',
  636 + width: ScreenUtil().setWidth(32),
  637 + ),
  638 + ),
  639 + ),
  640 + ),
  641 + Center(
  642 + child: Text(title,
  643 + style: TextStyle(
  644 + fontSize: ScreenUtil().setSp(34),
  645 + fontWeight: FontWeight.bold,
  646 + color: MyColours.color_353535)),
  647 + ),
  648 + VEmptyView(40),
  649 + Padding(
  650 + padding: EdgeInsets.symmetric(
  651 + horizontal: ScreenUtil().setWidth(60)),
  652 + child: GridView.builder(
  653 + padding:
  654 + EdgeInsets.only(top: ScreenUtil().setWidth(20)),
  655 + shrinkWrap: true,
  656 + cacheExtent: ScreenUtil().setWidth(0),
  657 + itemCount: tempMndList.length,
  658 + gridDelegate:
  659 + SliverGridDelegateWithFixedCrossAxisCount(
  660 + crossAxisCount: 3,
  661 + childAspectRatio: 80 / 36,
  662 + mainAxisSpacing:
  663 + ScreenUtil().setWidth(15 * 2),
  664 + crossAxisSpacing:
  665 + ScreenUtil().setWidth(38 * 2)),
  666 + itemBuilder: (BuildContext context, int index) {
  667 + // locationState = state;
  668 + return CustomButton(
  669 + onTap: () {
  670 + // state(() {
  671 + for (var item in tempMndList) {
  672 + item['select'] = false;
  673 + if (item['title'] ==
  674 + tempMndList[index]['title']) {
  675 + item['select'] = true;
  676 + widget.detailEntity.is_set_ddate = '1';
  677 + _notebookDetailChangeModel.ddateStr =
  678 + item['title'];
  679 + }
  680 + }
  681 + // });
  682 +
  683 + _notebookDetailChangeModel.notifyListeners();
  684 + Navigator.pop(context);
  685 + },
  686 + width: 80,
  687 + height: 36,
  688 + dateText: tempMndList[index]['title'].toString(),
  689 + dayText: '',
  690 + isSelect: tempMndList[index]['select'],
  691 + );
  692 + }))
  693 + ],
  694 + ),
  695 + ));
  696 + });
  697 + });
  698 + }
  699 +
  700 + Widget _callButton(
  701 + {GestureTapCallback onPress,
  702 + content,
  703 + hasLeftBorder = true,
  704 + isSelect = false}) {
  705 + return InkWell(
  706 + onTap: onPress,
  707 + child: Container(
  708 + width: ScreenUtil().setWidth(84),
  709 + height: ScreenUtil().setHeight(48),
  710 + decoration: BoxDecoration(
  711 + color: isSelect ? MyColours.color_199095 : MyColours.color_fefefe,
  712 + border: Border(
  713 + bottom: BorderSide(
  714 + color: MyColours.color_6AB6B9,
  715 + width: ScreenUtil().setWidth(2)),
  716 + top: BorderSide(
  717 + color: MyColours.color_6AB6B9,
  718 + width: ScreenUtil().setWidth(1)),
  719 + left: hasLeftBorder
  720 + ? BorderSide(
  721 + color: MyColours.color_6AB6B9,
  722 + width: ScreenUtil().setWidth(2))
  723 + : BorderSide.none,
  724 + right: BorderSide(
  725 + color: MyColours.color_6AB6B9,
  726 + width: ScreenUtil().setWidth(2)))),
  727 + child: Align(
  728 + alignment: Alignment.center,
  729 + child: Text(
  730 + content,
  731 + style: TextStyle(
  732 + color: isSelect ? Colors.white : MyColours.color_353535,
  733 + fontSize: ScreenUtil().setSp(28)),
  734 + ),
  735 + ),
  736 + ),
  737 + );
  738 + }
  739 +
  740 + @override
  741 + Widget build(BuildContext context) {
  742 + _notebookDetailChangeModel =
  743 + Provider.of<NotebookDetailChangeModel>(context, listen: true);
  744 + return GestureDetector(
  745 + behavior: HitTestBehavior.translucent,
  746 + onTap: () {
  747 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  748 + },
  749 + child: Scaffold(
  750 + backgroundColor: Colors.white,
  751 + body: Column(children: <Widget>[
  752 + SizedBox(height: ScreenUtil.statusBarHeight),
  753 + MyAppBar(
  754 + "变更预订",
  755 + showBack: true,
  756 + ),
  757 + Expanded(
  758 + child: SingleChildScrollView(
  759 + child: Column(
  760 + children: [_topWidget(), _middleWidget(), _bottomWidget()],
  761 + ))),
  762 + Container(
  763 + padding: EdgeInsets.symmetric(
  764 + horizontal: ScreenUtil().setWidth(40),
  765 + vertical: ScreenUtil().setWidth(60),
  766 + ),
  767 + child: CommonButton(
  768 + width: double.infinity,
  769 + height: 84,
  770 + fontSize: 34,
  771 + content: "确定修改",
  772 + state: 2,
  773 + onPress: () {
  774 + _notebookDetailChangeModel.setReserveInfo(context);
  775 + // messageDialogModel.removeMessage(message.id);
  776 + // NavigatorUtil.goHandleOnlinePage(
  777 + // context, message.rid.toString(), message.id,
  778 + // replace: messageDialogModel.messages.isEmpty);
  779 + },
  780 + ))
  781 + ]),
  782 + ));
  783 + }
  784 +}
  785 +
  786 +class CustomButton extends StatefulWidget {
  787 + final String dateText;
  788 + final String dayText;
  789 + final bool isSelect;
  790 + final double fontSize;
  791 + final bool isImage;
  792 + final double width;
  793 + final GestureTapCallback onTap;
  794 + final bool isTextFiled;
  795 + final NotebookDetailChangeModel model;
  796 + final double height;
  797 +
  798 + const CustomButton({
  799 + Key key,
  800 + this.dateText,
  801 + this.dayText,
  802 + this.isSelect,
  803 + this.fontSize = 34,
  804 + this.isImage = false,
  805 + this.width = 105,
  806 + this.onTap,
  807 + this.isTextFiled = false,
  808 + this.model,
  809 + this.height = 25,
  810 + }) : super(key: key);
  811 + @override
  812 + _ButtonState createState() => _ButtonState();
  813 +}
  814 +
  815 +class _ButtonState extends State<CustomButton> {
  816 + FocusNode _cancelNode = FocusNode();
  817 + @override
  818 + Widget build(BuildContext context) {
  819 + return InkWell(
  820 + onTap: widget.onTap,
  821 + child: Container(
  822 + width: ScreenUtil().setWidth(widget.width * 2),
  823 + height: ScreenUtil().setWidth(widget.height * 2),
  824 + decoration: BoxDecoration(
  825 + color: widget.isSelect ? MyColours.color_199095 : Colors.white,
  826 + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
  827 + border: Border.all(
  828 + color: MyColours.color_199095,
  829 + width: ScreenUtil().setWidth(2))),
  830 + child: Row(
  831 + mainAxisAlignment: MainAxisAlignment.center,
  832 + children: [
  833 + widget.isTextFiled
  834 + ? Container(
  835 + width: ScreenUtil().setWidth(70),
  836 + height: ScreenUtil().setWidth(50),
  837 + child: TextField(
  838 + controller: widget.model.numController,
  839 + maxLines: 1,
  840 + inputFormatters: [LengthLimitingTextInputFormatter(3)],
  841 + //光标颜色
  842 + cursorColor: widget.isSelect
  843 + ? Colors.white
  844 + : MyColours.color_199095,
  845 + //输入文本的样式
  846 + style: TextStyle(
  847 + fontSize: ScreenUtil().setSp(30),
  848 + color: widget.isSelect
  849 + ? Colors.white
  850 + : MyColours.color_199095),
  851 + // controller: _cancelController,
  852 + focusNode: _cancelNode,
  853 + textAlignVertical: TextAlignVertical.bottom,
  854 + decoration: InputDecoration(
  855 + // fillColor: Colors.lightGreenAccent,
  856 + // filled: true,
  857 + border: OutlineInputBorder(borderSide: BorderSide.none),
  858 + hintText: "更多",
  859 + hintStyle: TextStyle(
  860 + color: widget.isSelect
  861 + ? Colors.white
  862 + : MyColours.color_199095,
  863 + fontSize: ScreenUtil().setSp(30),
  864 + ),
  865 + // contentPadding: EdgeInsets.only(
  866 + // bottom: ScreenUtil().setWidth(30)), //ios 17
  867 + // border: InputBorder.none,
  868 + ),
  869 + onChanged: (value) {
  870 + bool isThird = true;
  871 + for (int i = 0;
  872 + i < widget.model.personNumList.length;
  873 + i++) {
  874 + widget.model.personNumList[i]['isSelect'] = false;
  875 +
  876 + if (widget.model.personNumList[i]['dateText'] ==
  877 + value) {
  878 + widget.model.personNumList[i]['isSelect'] = true;
  879 + isThird = false;
  880 + }
  881 + }
  882 + if (isThird) {
  883 + widget.model.personNumList[5]['isSelect'] = true;
  884 + widget.model.personNumList[5]['dateText'] = value;
  885 + } else {
  886 + widget.model.personNumList[5]['dateText'] = '更多';
  887 + }
  888 + widget.model.notifyListeners();
  889 + },
  890 + onEditingComplete: () {
  891 + print('fff');
  892 + _cancelNode.unfocus();
  893 + },
  894 + keyboardType: TextInputType.number,
  895 + ),
  896 + )
  897 + : Text(widget.dateText,
  898 + style: TextStyle(
  899 + fontWeight: FontWeight.bold,
  900 + color: widget.isSelect
  901 + ? MyColours.color_fefefe
  902 + : MyColours.color_199095,
  903 + fontSize: ScreenUtil().setSp(widget.fontSize))),
  904 + widget.isImage ? HEmptyView(20) : Container(),
  905 + widget.isImage
  906 + ? Image.asset(
  907 + widget.isSelect
  908 + ? 'assets/message_selected.png'
  909 + : 'assets/message_default.png',
  910 + width: ScreenUtil().setWidth(36))
  911 + : Text(widget.dayText,
  912 + style: TextStyle(
  913 + fontWeight: FontWeight.bold,
  914 + color: widget.isSelect
  915 + ? MyColours.color_fefefe
  916 + : MyColours.color_199095,
  917 + fontSize: ScreenUtil().setSp(30)))
  918 + ],
  919 + ),
  920 + ),
  921 + );
  922 + }
  923 +}
  1 +import 'dart:convert';
  2 +
1 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
2 import 'package:flutter_picker/flutter_picker.dart'; 4 import 'package:flutter_picker/flutter_picker.dart';
3 import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -13,7 +15,11 @@ import 'package:one_key/utils/utils.dart'; @@ -13,7 +15,11 @@ import 'package:one_key/utils/utils.dart';
13 import 'package:one_key/widgets/MyDivider.dart'; 15 import 'package:one_key/widgets/MyDivider.dart';
14 import 'package:one_key/widgets/app_bar.dart'; 16 import 'package:one_key/widgets/app_bar.dart';
15 import 'package:one_key/widgets/common_button.dart'; 17 import 'package:one_key/widgets/common_button.dart';
  18 +import 'package:one_key/widgets/dialog.dart';
  19 +import 'package:one_key/widgets/h_empty_view.dart';
  20 +import 'package:one_key/widgets/loading.dart';
16 import 'package:one_key/widgets/need_item.dart'; 21 import 'package:one_key/widgets/need_item.dart';
  22 +import 'package:one_key/widgets/round_button.dart';
17 import 'package:one_key/widgets/row_multi_text.dart'; 23 import 'package:one_key/widgets/row_multi_text.dart';
18 import 'package:one_key/widgets/table_item.dart'; 24 import 'package:one_key/widgets/table_item.dart';
19 import 'package:one_key/models/table.dart' as t; 25 import 'package:one_key/models/table.dart' as t;
@@ -21,7 +27,6 @@ import 'package:one_key/widgets/v_empty_view.dart'; @@ -21,7 +27,6 @@ import 'package:one_key/widgets/v_empty_view.dart';
21 import 'package:provider/provider.dart'; 27 import 'package:provider/provider.dart';
22 28
23 class NotebookDetailPage extends StatefulWidget { 29 class NotebookDetailPage extends StatefulWidget {
24 -  
25 final String rid; 30 final String rid;
26 31
27 NotebookDetailPage(this.rid); 32 NotebookDetailPage(this.rid);
@@ -34,227 +39,601 @@ class NotebookDetailPage extends StatefulWidget { @@ -34,227 +39,601 @@ class NotebookDetailPage extends StatefulWidget {
34 } 39 }
35 40
36 class NotebookDetailPageState extends State<NotebookDetailPage> { 41 class NotebookDetailPageState extends State<NotebookDetailPage> {
37 -  
38 - NotebookDetailModel detailModel= NotebookDetailModel(); 42 + NotebookDetailModel detailModel = NotebookDetailModel();
39 43
40 NotebookDetail detailEntity; 44 NotebookDetail detailEntity;
41 45
42 - String cusmanText="";  
43 -  
44 - List<Manager> managers=[];//客户经理 46 + String cusmanText = "";
  47 +
  48 + List<Manager> managers = []; //客户经理
45 49
46 - Manager manager=Manager(); 50 + Manager manager = Manager();
  51 + List cancelReasonList = [];
  52 + bool isShowTF = false;
  53 + int paddingBottom = 174;
  54 + int paddingTop = 138;
  55 + FocusNode _cancelNode = FocusNode();
  56 + TextEditingController _cancelController = TextEditingController();
  57 + StateSetter _cancelState;
47 58
48 @override 59 @override
49 void initState() { 60 void initState() {
50 // TODO: implement initState 61 // TODO: implement initState
51 super.initState(); 62 super.initState();
52 WidgetsBinding.instance.addPostFrameCallback((_) async { 63 WidgetsBinding.instance.addPostFrameCallback((_) async {
53 - detailEntity=await detailModel.getReserveDetail(context, {  
54 - "rid":widget.rid, 64 + _getReserveDetail();
  65 + managers = await detailModel.getManagers(context);
  66 + _initCancel();
  67 + //添加listener监听
  68 + //对应的TextField失去或者获取焦点都会回调此监听
  69 + _cancelNode.addListener(() {
  70 + if (_cancelNode.hasFocus) {
  71 + print('得到焦点');
  72 + paddingTop = 125;
  73 + } else {
  74 + print('失去焦点');
  75 + paddingTop = 138;
  76 + }
  77 + _cancelState(() {});
55 }); 78 });
56 - setState(() {  
57 - cusmanText=detailEntity.cusman.isEmpty?"请选择":detailEntity.cusman;  
58 - });  
59 - managers=await detailModel.getManagers(context);  
60 }); 79 });
61 } 80 }
62 81
  82 + _getReserveDetail() async {
  83 + detailEntity = await detailModel.getReserveDetail(context, {
  84 + "rid": widget.rid,
  85 + });
  86 + setState(() {
  87 + cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
  88 + });
  89 + }
  90 +
  91 + /// 初始化取消原因数据
  92 + _initCancel() {
  93 + isShowTF = false;
  94 + paddingBottom = 174;
  95 + cancelReasonList = [
  96 + {'title': '顾客取消', 'select': false},
  97 + {'title': '顾客行程有变', 'select': false},
  98 + {'title': '信息填写有误', 'select': false},
  99 + {'title': '操作失误', 'select': false},
  100 + {'title': '其他原因', 'select': false},
  101 + ];
  102 + }
  103 +
63 //设置当前客户经理 104 //设置当前客户经理
64 - _setCurrManager(){  
65 - manager=managers.firstWhere((manager)=>manager.userName==cusmanText,orElse: ()=>Manager());  
66 - if(manager.id==null||manager.id.toString().isEmpty)return;  
67 - Map<String,String> params={  
68 - "rid":detailEntity.id,  
69 - "cusman_id":manager.id.toString(),  
70 - "cusman":manager.userName 105 + _setCurrManager() {
  106 + manager = managers.firstWhere((manager) => manager.userName == cusmanText,
  107 + orElse: () => Manager());
  108 + if (manager.id == null || manager.id.toString().isEmpty) return;
  109 + Map<String, String> params = {
  110 + "rid": detailEntity.id,
  111 + "cusman_id": manager.id.toString(),
  112 + "cusman": manager.userName
71 }; 113 };
72 detailModel.setReserveCusmnan(context, params); 114 detailModel.setReserveCusmnan(context, params);
73 } 115 }
74 116
  117 + ///处理在线预订
  118 + setReserveStatus(String status, {String tid = "", String desc}) async {
  119 + // bus.emit("remove_untreated_message",widget.mid);
  120 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  121 + Map<String, String> causeMap = {
  122 + "uid": userModel.user.openid,
  123 + "uname": userModel.user.account,
  124 + "desc": desc,
  125 + };
  126 + Map<String, String> params = {
  127 + "rid": widget.rid,
  128 + "status": status, //5安排包间 6 拒绝订单
  129 + "tid": tid,
  130 + // "mid": widget.mid,
  131 + "cause": json.encode(causeMap)
  132 + };
  133 + bool success =
  134 + await detailModel.setReserveStatus(context, params, ifPush: false);
  135 + if (success) {
  136 + _getReserveDetail();
  137 + }
  138 + }
  139 +
  140 + /// 取消预订, 变更预订按钮
  141 + Widget _cancelAndChangeBtn(GestureTapCallback onTap, String title) {
  142 + return InkWell(
  143 + onTap: onTap,
  144 + child: Align(
  145 + alignment: Alignment.center,
  146 + child: Text(title,
  147 + style: TextStyle(
  148 + color: MyColours.color_199095,
  149 + fontSize: ScreenUtil().setSp(34))),
  150 + ),
  151 + );
  152 + }
  153 +
  154 + ///取消预订弹框
  155 + _showCancelWidget(context) {
  156 + showGeneralDialog(
  157 + context: context,
  158 + barrierDismissible: false,
  159 + barrierLabel:
  160 + MaterialLocalizations.of(context).modalBarrierDismissLabel,
  161 + transitionDuration: const Duration(milliseconds: 150),
  162 + pageBuilder: (BuildContext context, Animation animation,
  163 + Animation secondaryAnimation) {
  164 + return StatefulBuilder(builder: (context, state) {
  165 + _cancelState = state;
  166 + return GestureDetector(
  167 + behavior: HitTestBehavior.opaque,
  168 + // onTap: () {
  169 + // Navigator.of(context).pop();
  170 + // },
  171 + child: Container(
  172 + decoration: BoxDecoration(
  173 + color: Color.fromRGBO(00, 00, 00, 0.5),
  174 + ),
  175 + padding: EdgeInsets.fromLTRB(
  176 + ScreenUtil().setWidth(50),
  177 + ScreenUtil().setWidth(paddingTop * 2),
  178 + ScreenUtil().setWidth(50),
  179 + ScreenUtil().setWidth(paddingBottom * 2)),
  180 + child: Container(
  181 + padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
  182 + decoration: BoxDecoration(
  183 + color: Colors.white,
  184 + borderRadius:
  185 + BorderRadius.circular(ScreenUtil().setWidth(10)),
  186 + ),
  187 + child: Column(
  188 + children: [
  189 + Stack(
  190 + children: [
  191 + Center(
  192 + child: Text(
  193 + '请选择取消原因',
  194 + style: TextStyle(
  195 + fontSize: ScreenUtil().setSp(34),
  196 + fontWeight: FontWeight.bold,
  197 + decoration: TextDecoration.none,
  198 + color: MyColours.color_353535),
  199 + ),
  200 + ),
  201 + Positioned(
  202 + top: ScreenUtil().setWidth(8),
  203 + right: ScreenUtil().setWidth(0),
  204 + child: GestureDetector(
  205 + onTap: () {
  206 + _initCancel();
  207 + Navigator.of(context).pop();
  208 + },
  209 + child: Image.asset(
  210 + 'assets/message_selected.png',
  211 + width: ScreenUtil().setWidth(32)),
  212 + ))
  213 + ],
  214 + ),
  215 + VEmptyView(60),
  216 + Column(
  217 + children: cancelReasonList.map((value) {
  218 + return GestureDetector(
  219 + onTap: () {
  220 + for (var item in cancelReasonList) {
  221 + item['select'] = false;
  222 + isShowTF = false;
  223 + paddingBottom = 174;
  224 + if (item['title'] == value['title']) {
  225 + item['select'] = true;
  226 + if (item['title'] == '其他原因') {
  227 + isShowTF = true;
  228 + paddingBottom = 130;
  229 + }
  230 + }
  231 + }
  232 + state(() {});
  233 + },
  234 + child: Column(children: [
  235 + Row(
  236 + children: [
  237 + Image.asset(
  238 + value['select']
  239 + ? 'assets/message_selected.png'
  240 + : 'assets/message_default.png',
  241 + width: ScreenUtil().setWidth(44)),
  242 + HEmptyView(30),
  243 + Text(value['title'],
  244 + style: TextStyle(
  245 + fontSize: ScreenUtil().setSp(32),
  246 + fontWeight: FontWeight.normal,
  247 + decoration: TextDecoration.none,
  248 + color: MyColours.color_333333))
  249 + ],
  250 + ),
  251 + value['title'] == '其他原因' && isShowTF
  252 + ? Material(
  253 + child: Container(
  254 + color: Colors.white,
  255 + padding: EdgeInsets.only(
  256 + left: ScreenUtil().setWidth(76)),
  257 + child: TextField(
  258 + maxLines: 1,
  259 + controller: _cancelController,
  260 + focusNode: _cancelNode,
  261 + textAlignVertical:
  262 + TextAlignVertical.bottom,
  263 + decoration: InputDecoration(
  264 + hintText: "请填写原因",
  265 + hintStyle: TextStyle(
  266 + color: MyColours.color_999999,
  267 + fontSize: ScreenUtil().setSp(30),
  268 + ),
  269 + enabledBorder: UnderlineInputBorder(
  270 + borderSide: BorderSide(
  271 + color:
  272 + MyColours.color_d8d8d8),
  273 + ),
  274 + // border: InputBorder.none,
  275 + ),
  276 + onChanged: (_) {
  277 + setState(() {});
  278 + },
  279 + onEditingComplete: () {
  280 + print('fff');
  281 + _cancelNode.unfocus();
  282 + },
  283 + // keyboardType: TextInputType.number,
  284 + ),
  285 + ))
  286 + : Container(),
  287 + VEmptyView(40)
  288 + ]),
  289 + );
  290 + }).toList(),
  291 + ),
  292 + VEmptyView(15),
  293 + Material(
  294 + child: RoundButton(
  295 + onPressed: () {
  296 + String desc = '';
  297 + for (var value in cancelReasonList) {
  298 + if (value['select'] == true) {
  299 + desc = value['title'];
  300 + if (value['title'] == '其他原因') {
  301 + desc = _cancelController.text.trim();
  302 + if (desc.isEmpty) {
  303 + Utils.showToast("请填写原因");
  304 + return;
  305 + }
  306 + }
  307 + }
  308 + }
  309 +
  310 + if (desc == '') {
  311 + Utils.showToast('请选择原因');
  312 + return;
  313 + }
  314 +
  315 + Navigator.of(context).pop();
  316 + setReserveStatus('4', desc: desc);
  317 + },
  318 + text: '确认',
  319 + height: ScreenUtil().setWidth(80),
  320 + width: ScreenUtil().setWidth(300),
  321 + radius: ScreenUtil().setWidth(10),
  322 + ),
  323 + )
  324 + ],
  325 + ),
  326 + )),
  327 + );
  328 + });
  329 + });
  330 + }
75 331
76 @override 332 @override
77 Widget build(BuildContext context) { 333 Widget build(BuildContext context) {
78 // TODO: implement build 334 // TODO: implement build
79 - return SafeArea(  
80 - child: detailEntity==null?Container(  
81 - width: double.infinity,  
82 - height: double.infinity,  
83 - color: MyColours.color_ffffff,  
84 - ):Container(  
85 - color: MyColours.color_ffffff,  
86 - child: Column(  
87 - children: <Widget>[  
88 - MyAppBar(  
89 - "订座详情",  
90 - showBack: true,  
91 - ),  
92 - Expanded(  
93 - child: DefaultTextStyle(style: TextStyle(decoration: TextDecoration.none),child: Container(  
94 - color: MyColours.color_ffffff,  
95 - child: SingleChildScrollView(  
96 - child: Container(  
97 - color: MyColours.color_ffffff,  
98 - padding:  
99 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(43)),  
100 - child: Column(  
101 - children: <Widget>[  
102 - RowMultiText("用餐时段", detailEntity.ddateMd),  
103 - Stack(  
104 - alignment: Alignment.center,  
105 - children: <Widget>[  
106 - Column( 335 + return detailEntity == null
  336 + ? Container(
  337 + width: double.infinity,
  338 + height: double.infinity,
  339 + color: MyColours.color_ffffff,
  340 + )
  341 + : Container(
  342 + color: MyColours.color_ffffff,
  343 + child: Column(
  344 + children: <Widget>[
  345 + SizedBox(height: ScreenUtil.statusBarHeight),
  346 + MyAppBar(
  347 + "订座详情",
  348 + showBack: true,
  349 + ),
  350 + Expanded(
  351 + child: DefaultTextStyle(
  352 + style: TextStyle(decoration: TextDecoration.none),
  353 + child: Container(
  354 + color: MyColours.color_ffffff,
  355 + child: SingleChildScrollView(
  356 + child: Container(
  357 + color: MyColours.color_ffffff,
  358 + padding: EdgeInsets.symmetric(
  359 + horizontal: ScreenUtil().setWidth(43)),
  360 + child: Column(
107 children: <Widget>[ 361 children: <Widget>[
108 - RowMultiText("用餐时间", detailEntity.ddateHm), 362 + RowMultiText("用餐时段", detailEntity.ddateMd),
  363 + Stack(
  364 + alignment: Alignment.center,
  365 + children: <Widget>[
  366 + Column(
  367 + children: <Widget>[
  368 + RowMultiText(
  369 + "用餐时间", detailEntity.ddateHm),
  370 + Offstage(
  371 + offstage: detailEntity.type == "0"
  372 + ? false
  373 + : true,
  374 + child: RowMultiText(
  375 + "用餐人数", detailEntity.pnum),
  376 + )
  377 + ],
  378 + ),
  379 + Image.asset(
  380 + detailEntity.statuImgAssets,
  381 + width: ScreenUtil().setWidth(100),
  382 + height: ScreenUtil().setWidth(30),
  383 + )
  384 + ],
  385 + ),
109 Offstage( 386 Offstage(
110 - offstage: detailEntity.type=="0"?false:true,  
111 - child: RowMultiText("用餐人数", detailEntity.pnum),  
112 - )  
113 - ],  
114 - ),  
115 - Image.asset(detailEntity.statuImgAssets,width: ScreenUtil().setWidth(100),height: ScreenUtil().setWidth(30),)  
116 - ],  
117 - ),  
118 - Offstage(  
119 - offstage: detailEntity.demands.length<=0?true:false,  
120 - child: Column(  
121 - children: <Widget>[  
122 - RowMultiText("包间需求", (detailEntity.demands.length.toString()+"个")??""),  
123 - Align(  
124 - alignment: Alignment.centerRight,  
125 - child: Offstage(  
126 - offstage: detailEntity.demands.length>0?false:true,  
127 - child: Container(  
128 - height: ScreenUtil().setHeight(210),  
129 - child: ListView.builder(itemBuilder: (BuildContext contxt,int index){  
130 - return NeedItem(detailEntity.demands[index]);  
131 - },itemCount: detailEntity.demands.length,shrinkWrap: true,scrollDirection: Axis.horizontal,), 387 + offstage: detailEntity.demands.length <= 0
  388 + ? true
  389 + : false,
  390 + child: Column(
  391 + children: <Widget>[
  392 + RowMultiText(
  393 + "包间需求",
  394 + (detailEntity.demands.length
  395 + .toString() +
  396 + "个") ??
  397 + ""),
  398 + Align(
  399 + alignment: Alignment.centerRight,
  400 + child: Offstage(
  401 + offstage:
  402 + detailEntity.demands.length >
  403 + 0
  404 + ? false
  405 + : true,
  406 + child: Container(
  407 + height:
  408 + ScreenUtil().setHeight(210),
  409 + child: ListView.builder(
  410 + itemBuilder:
  411 + (BuildContext contxt,
  412 + int index) {
  413 + return NeedItem(detailEntity
  414 + .demands[index]);
  415 + },
  416 + itemCount: detailEntity
  417 + .demands.length,
  418 + shrinkWrap: true,
  419 + scrollDirection:
  420 + Axis.horizontal,
  421 + ),
  422 + ),
  423 + ))
  424 + ],
132 ), 425 ),
133 - )  
134 - )  
135 - ],  
136 - ),  
137 - ),  
138 - RowMultiText("预订桌位", (detailEntity.tables.length.toString()+"个")),  
139 - Align(  
140 - alignment: Alignment.centerRight,  
141 - child: Offstage(  
142 - offstage: detailEntity.tables.length>0?false:true,  
143 - child: Container(  
144 - height: ScreenUtil().setHeight(210),  
145 - child: ListView.builder(itemBuilder: (BuildContext contxt,int index){  
146 - return TableItem(detailEntity.tables[index]);  
147 - },itemCount: detailEntity.tables.length,shrinkWrap: true,scrollDirection: Axis.horizontal,),  
148 - ),  
149 - )  
150 - ),  
151 - RowMultiText("客户姓名", detailEntity.rnameStr),  
152 - RowMultiText("客户电话", detailEntity.phone??""),  
153 - RowMultiText("备注信息",detailEntity.cusdem??""),  
154 - MyDivider(double.infinity, ScreenUtil().setHeight(1)),  
155 - Container(  
156 - color: MyColours.color_ffffff,  
157 - width: double.infinity,  
158 - height: ScreenUtil().setHeight(80),  
159 - alignment: Alignment.center,  
160 - child: Stack(  
161 - alignment: Alignment.center,  
162 - children: <Widget>[  
163 - Positioned(  
164 - left: 0,  
165 - child: Text(  
166 - "客户经理",  
167 - style: TextStyle(  
168 - color: MyColours.color_828282,  
169 - fontSize: ScreenUtil().setSp(30)),  
170 ), 426 ),
171 - ),  
172 - Positioned(  
173 - right: 0,  
174 - child: GestureDetector(  
175 - onTap: () async {  
176 - List<String> list=[];  
177 - for(Manager manager in managers){  
178 - list.add(manager.roleUserName);  
179 - }  
180 - DialogUtil.showSelectCusmanDialog(context,list).then((value){  
181 - if(value!=null){  
182 - setState(() {  
183 - cusmanText=managers[value.first].userName;  
184 - });  
185 - _setCurrManager();  
186 - }  
187 - });  
188 - },  
189 - child: Text(  
190 - cusmanText,  
191 - style: TextStyle(  
192 - color: MyColours.color_353535,  
193 - fontSize: ScreenUtil().setSp(30),  
194 - decoration: TextDecoration.underline,  
195 - ), 427 + RowMultiText(
  428 + "预订桌位",
  429 + (detailEntity.tables.length.toString() +
  430 + "个")),
  431 + Align(
  432 + alignment: Alignment.centerRight,
  433 + child: Offstage(
  434 + offstage: detailEntity.tables.length > 0
  435 + ? false
  436 + : true,
  437 + child: Container(
  438 + height: ScreenUtil().setHeight(210),
  439 + child: ListView.builder(
  440 + itemBuilder: (BuildContext contxt,
  441 + int index) {
  442 + return TableItem(
  443 + detailEntity.tables[index]);
  444 + },
  445 + itemCount:
  446 + detailEntity.tables.length,
  447 + shrinkWrap: true,
  448 + scrollDirection: Axis.horizontal,
  449 + ),
  450 + ),
  451 + )),
  452 + RowMultiText("客户姓名", detailEntity.rnameStr),
  453 + RowMultiText(
  454 + "客户电话", detailEntity.phone ?? ""),
  455 + RowMultiText(
  456 + "备注信息", detailEntity.cusdem ?? ""),
  457 + MyDivider(double.infinity,
  458 + ScreenUtil().setHeight(1)),
  459 + Container(
  460 + color: MyColours.color_ffffff,
  461 + width: double.infinity,
  462 + height: ScreenUtil().setHeight(80),
  463 + alignment: Alignment.center,
  464 + child: Stack(
  465 + alignment: Alignment.center,
  466 + children: <Widget>[
  467 + Positioned(
  468 + left: 0,
  469 + child: Text(
  470 + "客户经理",
  471 + style: TextStyle(
  472 + color: MyColours.color_828282,
  473 + fontSize:
  474 + ScreenUtil().setSp(30)),
  475 + ),
  476 + ),
  477 + Positioned(
  478 + right: 0,
  479 + child: GestureDetector(
  480 + onTap: () async {
  481 + List<String> list = [];
  482 + for (Manager manager
  483 + in managers) {
  484 + list.add(manager.roleUserName);
  485 + }
  486 + DialogUtil.showSelectCusmanDialog(
  487 + context, list)
  488 + .then((value) {
  489 + if (value != null) {
  490 + setState(() {
  491 + cusmanText =
  492 + managers[value.first]
  493 + .userName;
  494 + });
  495 + _setCurrManager();
  496 + }
  497 + });
  498 + },
  499 + child: Text(
  500 + cusmanText,
  501 + style: TextStyle(
  502 + color: MyColours.color_353535,
  503 + fontSize:
  504 + ScreenUtil().setSp(30),
  505 + decoration:
  506 + TextDecoration.underline,
  507 + ),
  508 + ),
  509 + ),
  510 + )
  511 + ],
196 ), 512 ),
197 ), 513 ),
198 - )  
199 - ],  
200 - ),  
201 - ),  
202 - RowMultiText("记录人", detailEntity.note_name??""),  
203 - Offstage(  
204 - offstage: (detailEntity.status=="4"&&detailEntity.cancel!=null)?false:true,  
205 - child: Column(  
206 - children: <Widget>[  
207 - MyDivider(double.infinity, ScreenUtil().setHeight(2)),  
208 - RowMultiText("取消原因", detailEntity.cancel?.desc??""),  
209 - RowMultiText("取消时间", detailEntity.cancel?.cdateStr??""),  
210 - RowMultiText("操作人", detailEntity.cancel?.uname??""),  
211 - ],  
212 - ),  
213 - ),  
214 - ], 514 + RowMultiText(
  515 + "记录人", detailEntity.note_name ?? ""),
  516 + Offstage(
  517 + offstage: (detailEntity.status == "4" &&
  518 + detailEntity.cancel != null)
  519 + ? false
  520 + : true,
  521 + child: Column(
  522 + children: <Widget>[
  523 + MyDivider(double.infinity,
  524 + ScreenUtil().setHeight(2)),
  525 + RowMultiText("取消原因",
  526 + detailEntity.cancel?.desc ?? "",
  527 + textAlign: TextAlign.left),
  528 + RowMultiText(
  529 + "取消时间",
  530 + detailEntity.cancel?.cdateStr ??
  531 + ""),
  532 + RowMultiText("操作人",
  533 + detailEntity.cancel?.uname ?? ""),
  534 + ],
  535 + ),
  536 + ),
  537 + ],
  538 + )),
  539 + ),
215 )), 540 )),
216 ), 541 ),
217 - )),  
218 - ),  
219 - Offstage(  
220 - offstage: (detailEntity.status=="3"||detailEntity.status=="4"||detailEntity.status=="6")?true:false,  
221 - child: Container(  
222 - width: double.infinity,  
223 - decoration: BoxDecoration(  
224 - color: MyColours.color_ffffff,  
225 - border: Border(top:BorderSide(color: MyColours.color_dbe3e3,width: ScreenUtil().setWidth(1)))  
226 - ),  
227 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(20),horizontal: ScreenUtil().setHeight(36)),  
228 - child:CommonButton(  
229 - content: "通知顾客",  
230 - width: 669,  
231 - height: 80,  
232 - fontSize: 34,  
233 - onPress: () {  
234 - DialogUtil.showShareDialog(context)?.then((value){  
235 - switch(value){  
236 - case 1://微信  
237 - NavigatorUtil.goInvicationPage(context,detailEntity.id,detailEntity.tableinfoStr,detailEntity.ddate,detailEntity.ddateStr);  
238 - break;  
239 - case 2://短信  
240 - NavigatorUtil.goSmsPage(context, detailEntity.id);  
241 - break;  
242 - case 3://电话  
243 - if(detailEntity.phone!=null&&detailEntity.phone.isNotEmpty){  
244 - Utils.goPhone(detailEntity.phone);  
245 - }else{  
246 - Utils.showToast("没有客户电话!"); 542 + Offstage(
  543 + offstage: (detailEntity.status == "3" ||
  544 + detailEntity.status == "4" ||
  545 + detailEntity.status == "6")
  546 + ? true
  547 + : false,
  548 + child: Container(
  549 + width: double.infinity,
  550 + decoration: BoxDecoration(
  551 + color: MyColours.color_ffffff,
  552 + border: Border(
  553 + top: BorderSide(
  554 + color: MyColours.color_dbe3e3,
  555 + width: ScreenUtil().setWidth(1)))),
  556 + padding: EdgeInsets.symmetric(
  557 + horizontal: ScreenUtil().setHeight(40)),
  558 + margin: EdgeInsets.symmetric(
  559 + vertical: ScreenUtil().setHeight(20)),
  560 + child: CommonButton(
  561 + content: "通知客户",
  562 + width: 669,
  563 + height: 80,
  564 + fontSize: 34,
  565 + onPress: () {
  566 + DialogUtil.showShareDialog(context)?.then((value) {
  567 + switch (value) {
  568 + case 1: //微信
  569 + NavigatorUtil.goInvicationPage(
  570 + context,
  571 + detailEntity.id,
  572 + detailEntity.tableinfoStr,
  573 + detailEntity.ddate,
  574 + detailEntity.ddateStr);
  575 + break;
  576 + case 2: //短信
  577 + NavigatorUtil.goSmsPage(context, detailEntity.id);
  578 + break;
  579 + case 3: //电话
  580 + if (detailEntity.phone != null &&
  581 + detailEntity.phone.isNotEmpty) {
  582 + Utils.goPhone(detailEntity.phone);
  583 + } else {
  584 + Utils.showToast("没有客户电话!");
  585 + }
  586 + break;
247 } 587 }
248 - break;  
249 - }  
250 - });  
251 - }, 588 + });
  589 + },
  590 + ),
  591 + ),
252 ), 592 ),
253 - ),  
254 - )  
255 - ],  
256 - ),  
257 - ),  
258 - ); 593 + Offstage(
  594 + offstage: (detailEntity.status == "3" ||
  595 + detailEntity.status == "4" ||
  596 + detailEntity.status == "6")
  597 + ? true
  598 + : false,
  599 + child: Container(
  600 + width: double.infinity,
  601 + height: ScreenUtil().setWidth(80),
  602 + margin: EdgeInsets.symmetric(
  603 + horizontal: ScreenUtil().setHeight(40)),
  604 + decoration: BoxDecoration(
  605 + border: Border.all(
  606 + color: MyColours.color_199095,
  607 + width: ScreenUtil().setWidth(2)),
  608 + borderRadius:
  609 + BorderRadius.circular(ScreenUtil().setWidth(5)),
  610 + ),
  611 + // child: Text('fff'),
  612 + child: Material(
  613 + child: Row(
  614 + children: [
  615 + Expanded(
  616 + child: _cancelAndChangeBtn(() {
  617 + print('点击变更预订');
  618 + NavigatorUtil.goNoteBookChangePage(
  619 + context, detailEntity, widget.rid);
  620 + }, '变更预订')),
  621 + MyDivider(
  622 + ScreenUtil().setWidth(2),
  623 + ScreenUtil().setWidth(50),
  624 + color: MyColours.color_199095,
  625 + ),
  626 + Expanded(
  627 + child: _cancelAndChangeBtn(() {
  628 + _showCancelWidget(context);
  629 + }, '取消预订')),
  630 + ],
  631 + )),
  632 + ),
  633 + ),
  634 + VEmptyView(ScreenUtil().setWidth(60))
  635 + ],
  636 + ),
  637 + );
259 } 638 }
260 } 639 }
1 import 'dart:async'; 1 import 'dart:async';
  2 +import 'dart:io';
2 import 'package:flutter/cupertino.dart'; 3 import 'package:flutter/cupertino.dart';
3 import 'package:flutter/material.dart'; 4 import 'package:flutter/material.dart';
4 import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -63,7 +64,8 @@ class HomePageState extends State<HomePage>{ @@ -63,7 +64,8 @@ class HomePageState extends State<HomePage>{
63 )); 64 ));
64 WidgetsBinding.instance.addPostFrameCallback((_){ 65 WidgetsBinding.instance.addPostFrameCallback((_){
65 if(widget.initialIndex==0)return; 66 if(widget.initialIndex==0)return;
66 - ContactModel.getInstance().uploadLocalContact(context); 67 + ContactModel.getInstance().uploadLocalContact(context);
  68 + getUntreatedMessage();
67 timer=Timer.periodic(Duration(minutes: 3), (_){ 69 timer=Timer.periodic(Duration(minutes: 3), (_){
68 getUntreatedMessage(); 70 getUntreatedMessage();
69 }); 71 });
@@ -161,8 +163,8 @@ class HomePageState extends State<HomePage>{ @@ -161,8 +163,8 @@ class HomePageState extends State<HomePage>{
161 UserModel userModel=Provider.of<UserModel>(context,listen: false); 163 UserModel userModel=Provider.of<UserModel>(context,listen: false);
162 Map<String,String> params={ 164 Map<String,String> params={
163 "sid":userModel.user.sellerid, 165 "sid":userModel.user.sellerid,
164 - "type_id":"10",  
165 - "status":"0", 166 + "type_id":"10",//10 在线预订
  167 + "status":"0",//未处理
166 "offset":"0", 168 "offset":"0",
167 "limit":"100", 169 "limit":"100",
168 }; 170 };
@@ -261,4 +263,4 @@ class HomePageState extends State<HomePage>{ @@ -261,4 +263,4 @@ class HomePageState extends State<HomePage>{
261 } 263 }
262 XgFlutterPlugin().stopXg(); 264 XgFlutterPlugin().stopXg();
263 } 265 }
264 -}  
  266 +}
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 2 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/models/message.dart'; 3 import 'package:one_key/models/message.dart';
4 import 'package:one_key/provider/message_dialog_model.dart'; 4 import 'package:one_key/provider/message_dialog_model.dart';
  5 +import 'package:one_key/provider/user_model.dart';
5 import 'package:one_key/res/colors.dart'; 6 import 'package:one_key/res/colors.dart';
6 import 'package:one_key/utils/navigator_util.dart'; 7 import 'package:one_key/utils/navigator_util.dart';
7 import 'package:one_key/widgets/common_button.dart'; 8 import 'package:one_key/widgets/common_button.dart';
@@ -114,9 +115,15 @@ class MessageDialogItem extends StatelessWidget { @@ -114,9 +115,15 @@ class MessageDialogItem extends StatelessWidget {
114 onPress: () { 115 onPress: () {
115 messageDialogModel.removeMessage(message.id); 116 messageDialogModel.removeMessage(message.id);
116 if(message.message_type=="10"){ 117 if(message.message_type=="10"){
117 - NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id,replace: messageDialogModel.messages.isEmpty); 118 + NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id,replace: messageDialogModel.messages.isEmpty?true:false);
118 }else{ 119 }else{
119 - NavigatorUtil.goNotebookDetailPage(context,message.rid); 120 + NavigatorUtil.goNotebookDetailPage(context,message.rid.toString(),replace: messageDialogModel.messages.isEmpty?true:false);
  121 + Map<String, String> params = {
  122 + "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  123 + "id": message.id,
  124 + "status": "is_handle"
  125 + };
  126 + messageDialogModel.setMessageStatus(context,params);
120 } 127 }
121 }, 128 },
122 ), 129 ),
@@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; @@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 2 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/models/message.dart'; 3 import 'package:one_key/models/message.dart';
4 import 'package:one_key/provider/message_dialog_model.dart'; 4 import 'package:one_key/provider/message_dialog_model.dart';
  5 +import 'package:one_key/provider/user_model.dart';
5 import 'package:one_key/res/colors.dart'; 6 import 'package:one_key/res/colors.dart';
  7 +import 'package:one_key/utils/event_bus.dart';
6 import 'package:one_key/utils/navigator_util.dart'; 8 import 'package:one_key/utils/navigator_util.dart';
7 import 'package:one_key/widgets/common_button.dart'; 9 import 'package:one_key/widgets/common_button.dart';
8 import 'package:one_key/widgets/h_empty_view.dart'; 10 import 'package:one_key/widgets/h_empty_view.dart';
@@ -30,6 +32,7 @@ class MessageItem extends StatelessWidget { @@ -30,6 +32,7 @@ class MessageItem extends StatelessWidget {
30 child: Stack( 32 child: Stack(
31 children: <Widget>[ 33 children: <Widget>[
32 Container( 34 Container(
  35 + height: ScreenUtil().setWidth(280),
33 margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(39),vertical: ScreenUtil().setWidth(12)), 36 margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(39),vertical: ScreenUtil().setWidth(12)),
34 padding: EdgeInsets.fromLTRB( 37 padding: EdgeInsets.fromLTRB(
35 ScreenUtil().setWidth(12), 38 ScreenUtil().setWidth(12),
@@ -63,26 +66,39 @@ class MessageItem extends StatelessWidget { @@ -63,26 +66,39 @@ class MessageItem extends StatelessWidget {
63 ], 66 ],
64 ), 67 ),
65 VEmptyView(20), 68 VEmptyView(20),
  69 + message.message_type=="11"?
66 Text( 70 Text(
67 - "包间需求:${message.room_demand}", 71 + "${message.ddateStr}的${message.rnameStr}取消了预订",
68 style: TextStyle( 72 style: TextStyle(
69 color: textColor, 73 color: textColor,
70 fontSize: ScreenUtil().setSp(28)), 74 fontSize: ScreenUtil().setSp(28)),
71 - ),  
72 - VEmptyView(10),  
73 - Text(  
74 - "就餐时间:${message.ddateStr}",  
75 - style: TextStyle(  
76 - color: textColor,  
77 - fontSize: ScreenUtil().setSp(28)),  
78 - ),  
79 - VEmptyView(10),  
80 - Text(  
81 - "预订人:${message.rnameStr}",  
82 - style: TextStyle(  
83 - color: textColor,  
84 - fontSize: ScreenUtil().setSp(28)),  
85 - ), 75 + ):
  76 + Column(
  77 + mainAxisSize: MainAxisSize.min,
  78 + crossAxisAlignment: CrossAxisAlignment.start,
  79 + children: <Widget>[
  80 + Text(
  81 + "包间需求:${message.room_demand}",
  82 + style: TextStyle(
  83 + color: textColor,
  84 + fontSize: ScreenUtil().setSp(28)),
  85 + ),
  86 + VEmptyView(10),
  87 + Text(
  88 + "就餐时间:${message.ddateStr}",
  89 + style: TextStyle(
  90 + color: textColor,
  91 + fontSize: ScreenUtil().setSp(28)),
  92 + ),
  93 + VEmptyView(10),
  94 + Text(
  95 + "预订人:${message.rnameStr}",
  96 + style: TextStyle(
  97 + color: textColor,
  98 + fontSize: ScreenUtil().setSp(28)),
  99 + ),
  100 + ],
  101 + )
86 ], 102 ],
87 ), 103 ),
88 ), 104 ),
@@ -95,11 +111,22 @@ class MessageItem extends StatelessWidget { @@ -95,11 +111,22 @@ class MessageItem extends StatelessWidget {
95 width: 160, 111 width: 160,
96 height: 48, 112 height: 48,
97 fontSize: 28, 113 fontSize: 28,
98 - content: "立即处理", 114 + content:message.message_type=="10"?"立即处理":"立即查看",
99 state: 1, 115 state: 1,
100 onPress: () { 116 onPress: () {
101 messageDialogModel.removeMessage(message.id); 117 messageDialogModel.removeMessage(message.id);
102 - NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id); 118 + if(message.message_type=="10"){
  119 + NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id);
  120 + }else{
  121 + NavigatorUtil.goNotebookDetailPage(context,message.rid.toString());
  122 + bus.emit("remove_untreated_message", message.id);
  123 + Map<String, String> params = {
  124 + "sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  125 + "id": message.id,
  126 + "status": "is_handle"
  127 + };
  128 + messageDialogModel.setMessageStatus(context,params);
  129 + }
103 }, 130 },
104 ), 131 ),
105 ), 132 ),
@@ -278,10 +278,11 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -278,10 +278,11 @@ class NoteBookPageState extends State<NoteBookPage> {
278 child: Center( 278 child: Center(
279 child: GestureDetector( 279 child: GestureDetector(
280 onTap: () { 280 onTap: () {
281 - DialogUtil.showCalendarDialog(context,dateTime).then((day) {  
282 - if(day!=null){  
283 - _createDateText(day);  
284 - } 281 + DialogUtil.showCalendarDialog(context, dateTime)
  282 + .then((day) {
  283 + if (day != null) {
  284 + _createDateText(day);
  285 + }
285 }); 286 });
286 }, 287 },
287 child: Text( 288 child: Text(
@@ -322,6 +323,7 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -322,6 +323,7 @@ class NoteBookPageState extends State<NoteBookPage> {
322 width: ScreenUtil().setWidth(180), 323 width: ScreenUtil().setWidth(180),
323 height: ScreenUtil().setHeight(100), 324 height: ScreenUtil().setHeight(100),
324 fontSize: 32, 325 fontSize: 32,
  326 + onPress: () {},
325 )), 327 )),
326 ), 328 ),
327 ), 329 ),
@@ -344,6 +346,7 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -344,6 +346,7 @@ class NoteBookPageState extends State<NoteBookPage> {
344 width: ScreenUtil().setWidth(180), 346 width: ScreenUtil().setWidth(180),
345 height: ScreenUtil().setHeight(100), 347 height: ScreenUtil().setHeight(100),
346 fontSize: 32, 348 fontSize: 32,
  349 + onPress: () {},
347 )), 350 )),
348 )), 351 )),
349 Offstage( 352 Offstage(
@@ -365,6 +368,7 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -365,6 +368,7 @@ class NoteBookPageState extends State<NoteBookPage> {
365 width: ScreenUtil().setWidth(180), 368 width: ScreenUtil().setWidth(180),
366 height: ScreenUtil().setHeight(100), 369 height: ScreenUtil().setHeight(100),
367 fontSize: 32, 370 fontSize: 32,
  371 + onPress: () {},
368 )), 372 )),
369 )), 373 )),
370 ], 374 ],
@@ -392,34 +396,35 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -392,34 +396,35 @@ class NoteBookPageState extends State<NoteBookPage> {
392 }, 396 },
393 ), 397 ),
394 _buildListTitle(), 398 _buildListTitle(),
395 - Expanded(  
396 - child: Consumer<NoteBookModel>(  
397 - builder: (context,model,_){  
398 - if(model.connect_timeout){  
399 - return Center(  
400 - child: ErrorPage(callback: (){  
401 - _getReserveList();  
402 - },),  
403 - );  
404 - }else{  
405 - return EasyRefresh.custom(  
406 - controller: _controller,  
407 - slivers: [  
408 - SliverFixedExtentList(  
409 - delegate: SliverChildBuilderDelegate(  
410 - (BuildContext context, int index) {  
411 - return NoteBookItem(model.notebooks[index], index);  
412 - }, childCount: model.notebooks.length),  
413 - itemExtent: ScreenUtil().setHeight(112),  
414 - )  
415 - ],  
416 - onRefresh: () async {  
417 - _getReserveList();  
418 - },  
419 - );  
420 - }  
421 - },  
422 - )) 399 + Expanded(child: Consumer<NoteBookModel>(
  400 + builder: (context, model, _) {
  401 + if (model.connect_timeout) {
  402 + return Center(
  403 + child: ErrorPage(
  404 + callback: () {
  405 + _getReserveList();
  406 + },
  407 + ),
  408 + );
  409 + } else {
  410 + return EasyRefresh.custom(
  411 + controller: _controller,
  412 + slivers: [
  413 + SliverFixedExtentList(
  414 + delegate: SliverChildBuilderDelegate(
  415 + (BuildContext context, int index) {
  416 + return NoteBookItem(model.notebooks[index], index);
  417 + }, childCount: model.notebooks.length),
  418 + itemExtent: ScreenUtil().setHeight(112),
  419 + )
  420 + ],
  421 + onRefresh: () async {
  422 + _getReserveList();
  423 + },
  424 + );
  425 + }
  426 + },
  427 + ))
423 ], 428 ],
424 ), 429 ),
425 ); 430 );
@@ -222,4 +222,4 @@ class SelectTablePageState extends State<SelectTablePage>{ @@ -222,4 +222,4 @@ class SelectTablePageState extends State<SelectTablePage>{
222 ), 222 ),
223 ); 223 );
224 } 224 }
225 -}  
  225 +}
@@ -32,7 +32,7 @@ class ContactModel{ @@ -32,7 +32,7 @@ class ContactModel{
32 } 32 }
33 33
34 uploadLocalContact(BuildContext context) async { 34 uploadLocalContact(BuildContext context) async {
35 - bool isUpload=App.sp.getBool("isUpload"); 35 + bool isUpload=App.sp.getBool("isUpload")??false;
36 if(isUpload)return; 36 if(isUpload)return;
37 bool authority=await requestContactPermission(); 37 bool authority=await requestContactPermission();
38 if(authority){ 38 if(authority){
@@ -8,6 +8,7 @@ import 'package:one_key/net/http_url.dart'; @@ -8,6 +8,7 @@ import 'package:one_key/net/http_url.dart';
8 import 'package:one_key/utils/dialog_util.dart'; 8 import 'package:one_key/utils/dialog_util.dart';
9 import 'package:audioplayers/audio_cache.dart'; 9 import 'package:audioplayers/audio_cache.dart';
10 import 'package:one_key/utils/log_util.dart'; 10 import 'package:one_key/utils/log_util.dart';
  11 +import 'package:one_key/utils/utils.dart';
11 12
12 class MessageDialogModel extends ChangeNotifier{ 13 class MessageDialogModel extends ChangeNotifier{
13 14
@@ -31,7 +32,7 @@ class MessageDialogModel extends ChangeNotifier{ @@ -31,7 +32,7 @@ class MessageDialogModel extends ChangeNotifier{
31 _player.play("tts_cancel.mp3"); 32 _player.play("tts_cancel.mp3");
32 break; 33 break;
33 case "-1"://>3 34 case "-1"://>3
34 - _player.play("all.mp3"); 35 + _player.play("tts_all.mp3");
35 break; 36 break;
36 } 37 }
37 } 38 }
@@ -57,7 +58,7 @@ class MessageDialogModel extends ChangeNotifier{ @@ -57,7 +58,7 @@ class MessageDialogModel extends ChangeNotifier{
57 //获取未处理在线预订消息 58 //获取未处理在线预订消息
58 getUntreatedMsg(BuildContext context,Map<String,String> params) async { 59 getUntreatedMsg(BuildContext context,Map<String,String> params) async {
59 BaseResp<List> baseResp = await DioUtil() 60 BaseResp<List> baseResp = await DioUtil()
60 - .request<List>(context, Method.get, HttpUrl.get_message_list, 61 + .request<List>(context, Method.get, HttpUrl.get_message_list,showLoading: false,
61 data: params) 62 data: params)
62 .catchError((error) { 63 .catchError((error) {
63 print(error.toString()); 64 print(error.toString());
@@ -66,14 +67,24 @@ class MessageDialogModel extends ChangeNotifier{ @@ -66,14 +67,24 @@ class MessageDialogModel extends ChangeNotifier{
66 messages=baseResp.data.map<Message>((value){ 67 messages=baseResp.data.map<Message>((value){
67 return Message.fromJson(value); 68 return Message.fromJson(value);
68 }).toList(); 69 }).toList();
69 - messages.removeWhere((message)=>message.message_type.toString()!="10"); 70 + messages.removeWhere((message){
  71 + if(message.message_type.toString()=="10"){
  72 + if(message.status=="4"){
  73 + return true;
  74 + }
  75 + return false;
  76 + }else if(message.message_type.toString()=="11"){
  77 + return false;
  78 + }
  79 + return true;
  80 + });
70 if(messages.isNotEmpty){ 81 if(messages.isNotEmpty){
71 if(!showMessageDialog){ 82 if(!showMessageDialog){
72 DialogUtil.showMessageDialog(context); 83 DialogUtil.showMessageDialog(context);
73 }else{ 84 }else{
74 notifyListeners(); 85 notifyListeners();
75 } 86 }
76 - if(messages.length>3){ 87 + if(messages.length>1){
77 play("-1"); 88 play("-1");
78 }else{ 89 }else{
79 for(Message message in messages){ 90 for(Message message in messages){
@@ -83,4 +94,18 @@ class MessageDialogModel extends ChangeNotifier{ @@ -83,4 +94,18 @@ class MessageDialogModel extends ChangeNotifier{
83 } 94 }
84 } 95 }
85 } 96 }
  97 +
  98 + //设置消息状态
  99 + setMessageStatus(BuildContext context, Map<String, String> params) async {
  100 + BaseResp<dynamic> baseResp = await DioUtil()
  101 + .request<dynamic>(context, Method.get, HttpUrl.set_message_status,
  102 + data: params, showLoading: false)
  103 + .catchError((error) {
  104 + print(error.toString());
  105 + });
  106 + if (baseResp.code == Constant.status_success) {
  107 + } else {
  108 + Utils.showToast(baseResp.msg);
  109 + }
  110 + }
86 } 111 }
@@ -5,6 +5,7 @@ import 'package:one_key/net/base_resp.dart'; @@ -5,6 +5,7 @@ import 'package:one_key/net/base_resp.dart';
5 import 'package:one_key/net/dio_util.dart'; 5 import 'package:one_key/net/dio_util.dart';
6 import 'package:one_key/net/http_url.dart'; 6 import 'package:one_key/net/http_url.dart';
7 import 'package:one_key/utils/log_util.dart'; 7 import 'package:one_key/utils/log_util.dart';
  8 +import 'package:one_key/utils/utils.dart';
8 9
9 10
10 class MessageModel extends ChangeNotifier{ 11 class MessageModel extends ChangeNotifier{
@@ -30,7 +31,17 @@ class MessageModel extends ChangeNotifier{ @@ -30,7 +31,17 @@ class MessageModel extends ChangeNotifier{
30 untreatedMsgs=baseResp.data.map<Message>((value){ 31 untreatedMsgs=baseResp.data.map<Message>((value){
31 return Message.fromJson(value); 32 return Message.fromJson(value);
32 }).toList(); 33 }).toList();
33 - untreatedMsgs.removeWhere((message)=>message.message_type.toString()!="10"); 34 + untreatedMsgs.removeWhere((message){
  35 + if(message.message_type.toString()=="10"){
  36 + if(message.status=="4"){
  37 + return true;
  38 + }
  39 + return false;
  40 + }else if(message.message_type.toString()=="11"){
  41 + return false;
  42 + }
  43 + return true;
  44 + });
34 notifyListeners(); 45 notifyListeners();
35 } 46 }
36 } 47 }
@@ -57,7 +68,12 @@ class MessageModel extends ChangeNotifier{ @@ -57,7 +68,12 @@ class MessageModel extends ChangeNotifier{
57 return Message.fromJson(value); 68 return Message.fromJson(value);
58 }).toList()); 69 }).toList());
59 } 70 }
60 - treatedMsgs.removeWhere((message)=>message.message_type.toString()!="10"); 71 + treatedMsgs.removeWhere((message){
  72 + if(message.message_type.toString()=="10"||message.message_type.toString()=="11"){
  73 + return false;
  74 + }
  75 + return true;
  76 + });
61 notifyListeners(); 77 notifyListeners();
62 } 78 }
63 } 79 }
  1 +import 'package:common_utils/common_utils.dart';
  2 +import 'package:flutter/material.dart';
  3 +import 'package:one_key/constant/constant.dart';
  4 +import 'package:one_key/models/notebook_detail.dart';
  5 +import 'package:one_key/models/seller_info.dart';
  6 +import 'package:one_key/models/table_list.dart';
  7 +import 'package:one_key/net/base_resp.dart';
  8 +import 'package:one_key/net/dio_util.dart';
  9 +import 'package:one_key/net/http_url.dart';
  10 +import 'package:one_key/provider/notebook_detail_model.dart';
  11 +import 'package:one_key/provider/user_model.dart';
  12 +import 'package:one_key/utils/utils.dart';
  13 +import 'package:provider/provider.dart';
  14 +
  15 +class NotebookDetailChangeModel with ChangeNotifier {
  16 + List dateList = []; //日期选择 月-日 某天
  17 + List sunDateList = []; // 早市、午市、晚市
  18 + List personNumList = []; // 人数
  19 + TextEditingController numController = TextEditingController(); //人数
  20 + TextEditingController phoneController = TextEditingController(); //电话
  21 + TextEditingController nameController = TextEditingController(); //客户姓名
  22 + TextEditingController customController = TextEditingController(); //客户要求
  23 + List sexList = []; // 先生、女士、公司
  24 + Map dailyMap = {}; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟
  25 + String ddateStr = ''; //16:30
  26 + NotebookDetail detailEntity;
  27 + List<TableList> tableList = [];
  28 + //构造函数,初始化
  29 + NotebookDetailChangeModel(this.detailEntity) {
  30 + print(detailEntity);
  31 + if (detailEntity.phone != '0') {
  32 + phoneController.text = detailEntity.phone;
  33 + }
  34 + if (detailEntity.rnameStr != '') {
  35 + nameController.text = detailEntity.rnameStr;
  36 + }
  37 + if (detailEntity.cusdem != '') {
  38 + customController.text = detailEntity.cusdem;
  39 + }
  40 +
  41 + _initDateList();
  42 + _initPersonNumList();
  43 + _initSexList();
  44 + }
  45 +
  46 + ///初始化 日期选择 月-日 某天
  47 + _initDateList() {
  48 + String createtime = detailEntity.ddate.toString() + '000';
  49 + DateTime createTime =
  50 + DateTime.fromMillisecondsSinceEpoch(int.parse(createtime));
  51 + ddateStr = DateUtil.formatDate(createTime, format: DateFormats.h_m);
  52 + String dateTimeSelect = DateUtil.formatDateMs(
  53 + createTime.millisecondsSinceEpoch,
  54 + format: 'MM-dd');
  55 + //今天
  56 + DateTime dateTime = DateTime.now();
  57 + int dateTimeMill = dateTime.millisecondsSinceEpoch;
  58 + String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'MM-dd');
  59 + dateList.add({
  60 + 'title': dateText,
  61 + 'select': dateTimeSelect == dateText ? true : false,
  62 + 'fontSize': 34.0,
  63 + 'dayText': ' 今天',
  64 + 'isImage': false
  65 + });
  66 + //明天
  67 + int tomorrowMill = dateTimeMill + 24 * 60 * 60 * 1000;
  68 + String dateTextTomorrow =
  69 + DateUtil.formatDateMs(tomorrowMill, format: 'MM-dd');
  70 + dateList.add({
  71 + 'title': dateTextTomorrow,
  72 + 'select': dateTimeSelect == dateTextTomorrow ? true : false,
  73 + 'fontSize': 34.0,
  74 + 'dayText': ' 明天',
  75 + 'isImage': false
  76 + });
  77 + //第三个
  78 + dateList.add({
  79 + 'title': dateTimeSelect != dateText && dateTimeSelect != dateTextTomorrow
  80 + ? dateTimeSelect
  81 + : '其他',
  82 + 'select': dateTimeSelect != dateText && dateTimeSelect != dateTextTomorrow
  83 + ? true
  84 + : false,
  85 + 'fontSize': 30.0,
  86 + 'dayText': '',
  87 + 'isImage': true
  88 + });
  89 + }
  90 +
  91 + /// 初始化 早市、午市、晚市
  92 + _initSunDateList(morning, noon, night) {
  93 + String ddateSolt = detailEntity.ddate_solt;
  94 + if (morning != '') {
  95 + sunDateList.add({
  96 + 'dateText': '早市',
  97 + 'dayText': '',
  98 + 'ddateSolt': 1,
  99 + 'key': 'morning',
  100 + 'isSelect': ddateSolt == '1' ? true : false
  101 + });
  102 + }
  103 + if (noon != '') {
  104 + sunDateList.add({
  105 + 'dateText': '午市',
  106 + 'dayText': '',
  107 + 'ddateSolt': 2,
  108 + 'key': 'noon',
  109 + 'isSelect': ddateSolt == '2' ? true : false
  110 + });
  111 + }
  112 + if (noon != '') {
  113 + sunDateList.add({
  114 + 'dateText': '晚市',
  115 + 'dayText': '',
  116 + 'ddateSolt': 3,
  117 + 'key': 'night',
  118 + 'isSelect': ddateSolt == '3' ? true : false
  119 + });
  120 + }
  121 + notifyListeners();
  122 + }
  123 +
  124 +//人数
  125 + _initPersonNumList() {
  126 + String pnum = detailEntity.pnum;
  127 + if (int.parse(pnum) < 6 || int.parse(pnum) > 10) {
  128 + numController.text = pnum;
  129 + }
  130 + personNumList = [
  131 + {
  132 + 'dateText': '6',
  133 + 'width': 30.0,
  134 + 'fontSize': 34.0,
  135 + 'isImage': false,
  136 + 'isSelect': pnum == '6' ? true : false,
  137 + 'isTextFiled': false
  138 + },
  139 + {
  140 + 'dateText': '7',
  141 + 'width': 30.0,
  142 + 'fontSize': 34.0,
  143 + 'isImage': false,
  144 + 'isSelect': pnum == '7' ? true : false,
  145 + 'isTextFiled': false
  146 + },
  147 + {
  148 + 'dateText': '8',
  149 + 'width': 30.0,
  150 + 'fontSize': 34.0,
  151 + 'isImage': false,
  152 + 'isSelect': pnum == '8' ? true : false,
  153 + 'isTextFiled': false
  154 + },
  155 + {
  156 + 'dateText': '9',
  157 + 'width': 30.0,
  158 + 'fontSize': 34.0,
  159 + 'isImage': false,
  160 + 'isSelect': pnum == '9' ? true : false,
  161 + 'isTextFiled': false
  162 + },
  163 + {
  164 + 'dateText': '10',
  165 + 'width': 30.0,
  166 + 'fontSize': 34.0,
  167 + 'isImage': false,
  168 + 'isSelect': pnum == '10' ? true : false,
  169 + 'isTextFiled': false
  170 + },
  171 + {
  172 + 'dateText': numController.text.length > 0 ? numController.text : '更多',
  173 + 'width': 105.0,
  174 + 'fontSize': 30.0,
  175 + 'isImage': true,
  176 + 'isSelect': int.parse(pnum) < 6 || int.parse(pnum) > 10 ? true : false,
  177 + 'isTextFiled': true
  178 + }
  179 + ];
  180 + }
  181 +
  182 + ///称谓
  183 + _initSexList() {
  184 + String sexStr = detailEntity.sex;
  185 + sexList = [
  186 + {
  187 + 'title': '先生',
  188 + 'select': sexStr == '1' ? true : false,
  189 + 'code': '1',
  190 + 'hasLeftBorder': true
  191 + },
  192 + {
  193 + 'title': '女士',
  194 + 'select': sexStr == '2' ? true : false,
  195 + 'code': '2',
  196 + 'hasLeftBorder': false
  197 + },
  198 + {
  199 + 'title': '公司',
  200 + 'select': sexStr == '3' ? true : false,
  201 + 'code': '3',
  202 + 'hasLeftBorder': false
  203 + }
  204 + ];
  205 + }
  206 +
  207 + /// 早市、午市、晚市对应的半个小时间隔时间段
  208 + initDateHourMinuteList(BuildContext context) async {
  209 + SunSellerInfoModel model = await getManagersInfo(context);
  210 + model.daily.morning == ''
  211 + ? dailyMap.putIfAbsent('morning', () => '')
  212 + : dailyMap.putIfAbsent(
  213 + 'morning', () => _getHourAndMinute(model.daily.morning, 1, model));
  214 + model.daily.noon == ''
  215 + ? dailyMap.putIfAbsent('noon', () => '')
  216 + : dailyMap.putIfAbsent(
  217 + 'noon', () => _getHourAndMinute(model.daily.noon, 2, model));
  218 + model.daily.night == ''
  219 + ? dailyMap.putIfAbsent('night', () => '')
  220 + : dailyMap.putIfAbsent(
  221 + 'night', () => _getHourAndMinute(model.daily.night, 3, model));
  222 + _initSunDateList(model.daily.morning, model.daily.noon, model.daily.night);
  223 + }
  224 +
  225 +//根据获取时间 11:00-12:30 获取30分钟间隔组装的数组
  226 + _getHourAndMinute(
  227 + String hourAndMinuteStr, int mnd, SunSellerInfoModel model) {
  228 + List tempDate = hourAndMinuteStr.split("-");
  229 + String beginDate = tempDate[0];
  230 + String endDate = tempDate[1];
  231 + List tempHour = beginDate.split(':');
  232 + String isSetDate = detailEntity.is_set_ddate;
  233 + String ddateSolt = detailEntity.ddate_solt;
  234 + /*获取开始小时*/
  235 + int beginHour = int.parse(tempHour[0]);
  236 + /*获取开始分钟*/
  237 + int beginMinute = int.parse(tempHour[1]);
  238 + List res = [];
  239 + bool tempLimit = true;
  240 + while (tempLimit) {
  241 + String temp = _dealTime(beginHour, beginMinute);
  242 + bool tempSelect = false;
  243 + if (int.parse(isSetDate) == 1) //设置预订时间
  244 + {
  245 + if (temp == ddateStr) {
  246 + tempSelect = true;
  247 + }
  248 + } else {
  249 + if (mnd == 1) {
  250 + if (temp == '08:00') {
  251 + tempSelect = true;
  252 + }
  253 + } else if (mnd == 2) {
  254 + if (temp == '12:00') {
  255 + tempSelect = true;
  256 + }
  257 + } else if (mnd == 3) {
  258 + if (temp == '16:30') {
  259 + tempSelect = true;
  260 + }
  261 + }
  262 + }
  263 +
  264 + Map tempMap = {'title': temp, 'select': tempSelect};
  265 + res.add(tempMap);
  266 + if (temp == endDate) {
  267 + tempLimit = false;
  268 + break;
  269 + }
  270 + if (beginMinute == 30) {
  271 + beginHour++;
  272 + if (beginHour >= 24) {
  273 + beginHour = 0;
  274 + }
  275 + }
  276 + beginMinute = (beginMinute + 30) % 60;
  277 + }
  278 + return res;
  279 + }
  280 +
  281 + /// 根据时间和分钟组装 格式:11:00
  282 + _dealTime(int begin, int mm) {
  283 + String sb = '';
  284 + if (begin < 10) {
  285 + sb = '0$begin';
  286 + } else {
  287 + sb = '$begin';
  288 + }
  289 + sb = '$sb:';
  290 + if (mm < 10) {
  291 + sb = '${sb}0${mm}';
  292 + } else {
  293 + sb = '${sb}${mm}';
  294 + }
  295 + return sb;
  296 + }
  297 +
  298 + ///获取某个商家下所有服务员信息 **** 取得某个商家的早市、午市、晚市营业时间
  299 + Future<SunSellerInfoModel> getManagersInfo(BuildContext context) async {
  300 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  301 + Map<String, String> params = {
  302 + "seller_id": userModel.user.sellerid,
  303 + "seller_openid": userModel.user.openid
  304 + };
  305 + BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
  306 + .request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
  307 + data: params)
  308 + .catchError((error) {
  309 + print(error.toString());
  310 + });
  311 + SunSellerInfoModel itemModel;
  312 + if (baseResp == null) return itemModel;
  313 + if (baseResp.code == Constant.status_success) {
  314 + if (int.parse(baseResp.status) != Constant.status_success) {
  315 + Utils.showToast(baseResp.msg ?? "");
  316 + return itemModel;
  317 + }
  318 + if (baseResp.responseData['data'] != null) {
  319 + itemModel = SellerInfoModel.fromJson(baseResp.responseData).data;
  320 + } else {
  321 + Utils.showToast(baseResp.msg ?? "");
  322 + }
  323 + return itemModel;
  324 + }
  325 + }
  326 +
  327 + ///根据商家ID 获取桌位信息列表: 1:散座 2:包间 默认:获取所有数据
  328 + Future<List<TableListSunModel>> getNewTableList(BuildContext context) async {
  329 + // String createtime = detailEntity.ddate.toString() + '000';
  330 + // DateTime createTime =
  331 + // DateTime.fromMillisecondsSinceEpoch(int.parse(createtime));
  332 + // String rdate = DateUtil.formatDate(createTime, format: "yyyyMMdd");
  333 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  334 + Map<String, String> params = {
  335 + "sid": userModel.user.sellerid,
  336 + "rid": detailEntity.id,
  337 + "rdate": _getRdate(),
  338 + 'ddate_solt': detailEntity.ddate_solt
  339 + };
  340 + BaseResp<dynamic> baseResp = await DioUtil()
  341 + .request<dynamic>(context, Method.get, HttpUrl.get_table_list,
  342 + data: params)
  343 + .catchError((error) {
  344 + print(error.toString());
  345 + });
  346 + List<TableListSunModel> itemModelList;
  347 + if (baseResp == null) return itemModelList;
  348 + if (baseResp.code == Constant.status_success) {
  349 + if (int.parse(baseResp.status) != Constant.status_success) {
  350 + Utils.showToast(baseResp.msg ?? "");
  351 + return itemModelList;
  352 + }
  353 + if (baseResp.responseData['data'] != null) {
  354 + itemModelList = TableListModel.fromJson(baseResp.responseData).data;
  355 + } else {
  356 + Utils.showToast(baseResp.msg ?? "");
  357 + }
  358 + for (TableListSunModel item in itemModelList) {
  359 + for (var item in item.list) {
  360 + for (var table in detailEntity.tables) {
  361 + if (item.id == table.id) {
  362 + item.selected = true;
  363 + tableList.add(item);
  364 + }
  365 + }
  366 + }
  367 + }
  368 + notifyListeners();
  369 + return itemModelList;
  370 + }
  371 + }
  372 +
  373 + ///录入顾客订座相关信息,同时更新商家桌位状态
  374 + Future<SunSellerInfoModel> setReserveInfo(BuildContext context) async {
  375 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  376 + String pnum = '6';
  377 + for (var item in personNumList) {
  378 + if (item['isSelect']) {
  379 + pnum = item['dateText'];
  380 + }
  381 + }
  382 + String sex = '1';
  383 + for (var item in sexList) {
  384 + if (item['select']) {
  385 + sex = item['code'];
  386 + }
  387 + }
  388 + String tempDdate = _getRdate() + ' ' + ddateStr + ':00';
  389 + int ddate = DateUtil.getDateMsByTimeStr(tempDdate);
  390 + String tableSelectInfo = '';
  391 + for (TableList item in tableList) {
  392 + if (item.selected) {
  393 + tableSelectInfo += ',${item.id}';
  394 + }
  395 + }
  396 + print(tableSelectInfo);
  397 + if (tableSelectInfo.startsWith(',')) {
  398 + tableSelectInfo = tableSelectInfo.substring(1);
  399 + }
  400 + print(tableSelectInfo);
  401 + String rdate = '';
  402 + for (var item in sunDateList) {
  403 + if (item['isSelect'] == true) {
  404 + if (item['ddateSolt'] == 1) {
  405 + //早市
  406 + List morning = dailyMap['morning'];
  407 + String start = ddateStr;
  408 + String end = morning.last;
  409 + } else if (item['ddateSolt'] == 2) {
  410 + //午市
  411 + List noon = dailyMap['noon'];
  412 + } else if (item['ddateSolt'] == 3) {
  413 + //晚市
  414 + List night = dailyMap['night'];
  415 + }
  416 + }
  417 + }
  418 + Map<String, String> params = {
  419 + "rid": detailEntity.id, //变更订单必传预定ID
  420 + "sid": userModel.user.sellerid, //商家ID
  421 + "tid": tableSelectInfo, //桌子ID: 格式 2,3,4
  422 + "pnum": pnum, //预定用餐人数
  423 + "rname": nameController.text, //预订人姓名
  424 + "sex": sex, //预订人姓名:1:男 2:女
  425 + "phone": phoneController.text, //预订人电话
  426 + "cusdem": customController.text, //预订人需求:25汉字
  427 + "rdate": _getRdate(), //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
  428 + "ddate": '${ddate / 1000}', //到店时间
  429 + };
  430 + print(params);
  431 + // BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
  432 + // .request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
  433 + // data: params)
  434 + // .catchError((error) {
  435 + // print(error.toString());
  436 + // });
  437 + // SunSellerInfoModel itemModel;
  438 + // if (baseResp == null) return itemModel;
  439 + // if (baseResp.code == Constant.status_success) {
  440 + // if (int.parse(baseResp.status) != Constant.status_success) {
  441 + // Utils.showToast(baseResp.msg ?? "");
  442 + // return itemModel;
  443 + // }
  444 + // if (baseResp.responseData['data'] != null) {
  445 + // itemModel = SellerInfoModel.fromJson(baseResp.responseData).data;
  446 + // } else {
  447 + // Utils.showToast(baseResp.msg ?? "");
  448 + // }
  449 + // return itemModel;
  450 + // }
  451 + }
  452 +
  453 +//rdate字段值获取
  454 + _getRdate() {
  455 + String createtime = detailEntity.ddate.toString() + '000';
  456 + DateTime createTime =
  457 + DateTime.fromMillisecondsSinceEpoch(int.parse(createtime));
  458 + String rdate = DateUtil.formatDate(createTime, format: "yyyyMMdd");
  459 + return rdate;
  460 + }
  461 +}
@@ -9,14 +9,15 @@ import 'package:one_key/provider/user_model.dart'; @@ -9,14 +9,15 @@ import 'package:one_key/provider/user_model.dart';
9 import 'package:one_key/utils/navigator_util.dart'; 9 import 'package:one_key/utils/navigator_util.dart';
10 import 'package:one_key/utils/utils.dart'; 10 import 'package:one_key/utils/utils.dart';
11 import 'package:provider/provider.dart'; 11 import 'package:provider/provider.dart';
12 -class NotebookDetailModel extends ChangeNotifier{  
13 -  
14 12
  13 +class NotebookDetailModel extends ChangeNotifier {
15 ///获取已预订订单 14 ///获取已预订订单
16 - Future<NotebookDetail> getReserveDetail(BuildContext context,Map<String,String> params) async {  
17 - BaseResp<Map<String,dynamic>> baseResp = await DioUtil()  
18 - .request<Map<String,dynamic>>(context, Method.get, HttpUrl.reserve_detail,  
19 - data: params) 15 + Future<NotebookDetail> getReserveDetail(
  16 + BuildContext context, Map<String, String> params) async {
  17 + BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
  18 + .request<Map<String, dynamic>>(
  19 + context, Method.get, HttpUrl.reserve_detail,
  20 + data: params)
20 .catchError((error) { 21 .catchError((error) {
21 print(error.toString()); 22 print(error.toString());
22 }); 23 });
@@ -27,59 +28,71 @@ class NotebookDetailModel extends ChangeNotifier{ @@ -27,59 +28,71 @@ class NotebookDetailModel extends ChangeNotifier{
27 28
28 ///获取商家信息 29 ///获取商家信息
29 Future<List<Manager>> getManagers(BuildContext context) async { 30 Future<List<Manager>> getManagers(BuildContext context) async {
30 - UserModel userModel=Provider.of<UserModel>(context,listen: false);  
31 - Map<String,String> params={"seller_id": userModel.user.sellerid, "seller_openid": userModel.user.openid}; 31 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  32 + Map<String, String> params = {
  33 + "seller_id": userModel.user.sellerid,
  34 + "seller_openid": userModel.user.openid
  35 + };
32 BaseResp<Map<String, dynamic>> baseResp = await DioUtil() 36 BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
33 .request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo, 37 .request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
34 - data: params) 38 + data: params)
35 .catchError((error) { 39 .catchError((error) {
36 print(error.toString()); 40 print(error.toString());
37 }); 41 });
38 if (baseResp.code == Constant.status_success) { 42 if (baseResp.code == Constant.status_success) {
39 - return (baseResp.data["manager"] as List).map((value)=>Manager.fromJson(value as Map<String,dynamic>)).toList(); 43 + return (baseResp.data["manager"] as List)
  44 + .map((value) => Manager.fromJson(value as Map<String, dynamic>))
  45 + .toList();
40 } 46 }
41 } 47 }
42 48
43 ///设置客户经理 49 ///设置客户经理
44 - setReserveCusmnan(BuildContext context,Map<String,String> params) async { 50 + setReserveCusmnan(BuildContext context, Map<String, String> params) async {
45 BaseResp<String> baseResp = await DioUtil() 51 BaseResp<String> baseResp = await DioUtil()
46 .request<String>(context, Method.get, HttpUrl.set_reserve_cusman, 52 .request<String>(context, Method.get, HttpUrl.set_reserve_cusman,
47 - data: params) 53 + data: params)
48 .catchError((error) { 54 .catchError((error) {
49 print(error.toString()); 55 print(error.toString());
50 }); 56 });
51 if (baseResp.code == Constant.status_success) { 57 if (baseResp.code == Constant.status_success) {
52 - }else{  
53 - Utils.showToast(baseResp.msg??""); 58 + } else {
  59 + Utils.showToast(baseResp.msg ?? "");
54 } 60 }
55 } 61 }
56 62
57 //安排在线预订 63 //安排在线预订
58 - setReserveStatus(BuildContext context,Map<String,String> params) async {  
59 - BaseResp<Map<String,dynamic>> baseResp = await DioUtil()  
60 - .request<Map<String,dynamic>>(context, Method.get, HttpUrl.set_reserve_status,  
61 - data: params,showLoading: false) 64 + setReserveStatus(BuildContext context, Map<String, String> params,
  65 + {ifPush = true}) async {
  66 + BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
  67 + .request<Map<String, dynamic>>(
  68 + context, Method.get, HttpUrl.set_reserve_status,
  69 + data: params, showLoading: false)
62 .catchError((error) { 70 .catchError((error) {
63 print(error.toString()); 71 print(error.toString());
64 }); 72 });
65 - if(baseResp.code==Constant.status_success){  
66 - NavigatorUtil.goNotebookDetailPage(context, params["rid"],replace: true);  
67 - }else{ 73 + if (baseResp.code == Constant.status_success) {
  74 + if (ifPush) {
  75 + NavigatorUtil.goNotebookDetailPage(context, params["rid"],
  76 + replace: true);
  77 + } else {
  78 + return true;
  79 + }
  80 + } else {
68 Utils.showToast(baseResp.msg); 81 Utils.showToast(baseResp.msg);
69 } 82 }
70 } 83 }
71 84
72 //设置消息状态 85 //设置消息状态
73 - setMessageStatus(BuildContext context,Map<String,String> params) async { 86 + setMessageStatus(BuildContext context, Map<String, String> params) async {
74 BaseResp<dynamic> baseResp = await DioUtil() 87 BaseResp<dynamic> baseResp = await DioUtil()
75 .request<dynamic>(context, Method.get, HttpUrl.set_message_status, 88 .request<dynamic>(context, Method.get, HttpUrl.set_message_status,
76 - data: params,showLoading: false) 89 + data: params, showLoading: false)
77 .catchError((error) { 90 .catchError((error) {
78 print(error.toString()); 91 print(error.toString());
79 }); 92 });
80 - if(baseResp.code==Constant.status_success){  
81 - }else{ 93 + if (baseResp.code == Constant.status_success) {
  94 + } else {
82 Utils.showToast(baseResp.msg); 95 Utils.showToast(baseResp.msg);
83 } 96 }
84 } 97 }
85 -}  
  98 +}
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 2
3 class MyColours { 3 class MyColours {
4 -  
5 static const Color app_main = Color(0xFF24A4A8); 4 static const Color app_main = Color(0xFF24A4A8);
6 - static const Color color_ffffff=Color(0xffffffff);  
7 - static const Color color_fefefe=Color(0xfffefefe);  
8 - static const Color color_f5f5f5=Color(0xfff5f5f5);  
9 - static const Color color_199095=Color(0xff199095);  
10 - static const Color color_999999=Color(0xff999999);  
11 - static const Color color_353535=Color(0xff353535);  
12 - static const Color color_d8d8d8=Color(0xffD8D8D8);  
13 - static const Color color_bff6f7=Color(0xffBFF6F7);  
14 - static const Color color_c1c1c1=Color(0xffC1C1C1);  
15 - static const Color color_2bb5b7=Color(0xff2BB5B7);  
16 - static const Color color_26000000=Color(0x26000000);  
17 - static const Color color_d93535=Color(0xffD93535);  
18 - static const Color color_E14553=Color(0xffE14553);  
19 - static const Color color_131313=Color(0xff131313);  
20 - static const Color color_2e000000=Color(0x2e000000);  
21 - static const Color color_14000000=Color(0x14000000);  
22 - static const Color color_bfbfbf=Color(0xffBFBFBF);  
23 - static const Color color_828282=Color(0xff828282);  
24 - static const Color color_a8e2e4=Color(0xffA8E2E4);  
25 - static const Color color_63a6d1=Color(0xff63A6D1);  
26 - static const Color color_666666=Color(0xff666666);  
27 - static const Color color_777777=Color(0xff777777);  
28 - static const Color color_ea5750=Color(0xffEA5750);  
29 - static const Color color_89c0b7=Color(0xff89C0B7);  
30 - static const Color color_ededed=Color(0xffededed);  
31 - static const Color color_f7fdfd=Color(0xffF7FDFD);  
32 - static const Color color_dbe3e3=Color(0xffdbe3e3);  
33 - static const Color color_f3f3f3=Color(0xfff3f3f3);  
34 - static const Color color_f49a5e=Color(0xffF49A5E);  
35 - static const Color color_ff0000=Color(0xffff0000);  
36 - static const Color color_000000=Color(0xff000000);  
37 - static const Color color_97e9ea=Color(0xff97E9EA);  
38 - static const Color color_f1f1f1=Color(0xfff1f1f1);  
39 - static const Color color_eadab9=Color(0xffeadab9);  
40 - static const Color color_e3d2ac=Color(0xffe3d2ac);  
41 - static const Color color_83734d=Color(0xff83734d);  
42 - static const Color color_dfdfdf=Color(0xffdfdfdf); 5 + static const Color color_ffffff = Color(0xffffffff);
  6 + static const Color color_fefefe = Color(0xfffefefe);
  7 + static const Color color_f5f5f5 = Color(0xfff5f5f5);
  8 + static const Color color_199095 = Color(0xff199095);
  9 + static const Color color_999999 = Color(0xff999999);
  10 + static const Color color_353535 = Color(0xff353535);
  11 + static const Color color_d8d8d8 = Color(0xffD8D8D8);
  12 + static const Color color_bff6f7 = Color(0xffBFF6F7);
  13 + static const Color color_c1c1c1 = Color(0xffC1C1C1);
  14 + static const Color color_2bb5b7 = Color(0xff2BB5B7);
  15 + static const Color color_26000000 = Color(0x26000000);
  16 + static const Color color_d93535 = Color(0xffD93535);
  17 + static const Color color_E14553 = Color(0xffE14553);
  18 + static const Color color_131313 = Color(0xff131313);
  19 + static const Color color_2e000000 = Color(0x2e000000);
  20 + static const Color color_14000000 = Color(0x14000000);
  21 + static const Color color_bfbfbf = Color(0xffBFBFBF);
  22 + static const Color color_828282 = Color(0xff828282);
  23 + static const Color color_a8e2e4 = Color(0xffA8E2E4);
  24 + static const Color color_63a6d1 = Color(0xff63A6D1);
  25 + static const Color color_666666 = Color(0xff666666);
  26 + static const Color color_777777 = Color(0xff777777);
  27 + static const Color color_ea5750 = Color(0xffEA5750);
  28 + static const Color color_89c0b7 = Color(0xff89C0B7);
  29 + static const Color color_ededed = Color(0xffededed);
  30 + static const Color color_f7fdfd = Color(0xffF7FDFD);
  31 + static const Color color_dbe3e3 = Color(0xffdbe3e3);
  32 + static const Color color_f3f3f3 = Color(0xfff3f3f3);
  33 + static const Color color_f49a5e = Color(0xffF49A5E);
  34 + static const Color color_ff0000 = Color(0xffff0000);
  35 + static const Color color_000000 = Color(0xff000000);
  36 + static const Color color_97e9ea = Color(0xff97E9EA);
  37 + static const Color color_f1f1f1 = Color(0xfff1f1f1);
  38 + static const Color color_eadab9 = Color(0xffeadab9);
  39 + static const Color color_e3d2ac = Color(0xffe3d2ac);
  40 + static const Color color_83734d = Color(0xff83734d);
  41 + static const Color color_dfdfdf = Color(0xffdfdfdf);
  42 + static const Color color_333333 = Color(0xff333333);
  43 + static const Color color_F1F0F4 = Color(0xffF1F0F4);
  44 + static const Color color_6AB6B9 = Color(0xff6AB6B9);
  45 + static const Color color_74BBBE = Color(0xff74BBBE);
43 } 46 }
44 -