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.

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "oneKey_wdn",
"request": "launch",
"type": "dart"
}
]
}
\ No newline at end of file
... ...
{
"agcgw":{
"backurl":"connect-drcn.dbankcloud.cn",
"url":"connect-drcn.hispace.hicloud.com"
},
"client":{
"cp_id":"890086000102028635",
"product_id":"736430079244628022",
"client_id":"447630859449664704",
"client_secret":"C7F0060C796F3C59EC7928525D6B09D66139F06EDA5C3C6B772583D34A946BBB",
"app_id":"102832405",
"package_name":"com.naji.one_key",
"api_key":"CgB6e3x9K3RbzJwcAdFaQxGHXy+cqz0hCk6o/By+YxTV++JZtUgxAHKZNq4t1vOpQFjD/FSlkuuPdEiHm5dQ7Cd0"
},
"service":{
"analytics":{
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"resource_id":"p1",
"channel_id":""
},
"cloudstorage":{
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
},
"ml":{
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
}
},
"region":"CN",
"configuration_version":"1.0"
}
\ No newline at end of file
... ...
... ... @@ -43,8 +43,8 @@ android {
applicationId "com.naji.one_key"
minSdkVersion 21
targetSdkVersion 28
versionCode 7
versionName "1.0.7"
versionCode 111
versionName "1.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
... ...
No preview for this file type
No preview for this file type
531384610a6c9ce5834584b7a30c7a32
\ No newline at end of file
... ...
# Uncomment this line to define a global platform for your project
# source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
... ... @@ -11,81 +10,32 @@ project 'Runner', {
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
generated_key_values
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
flutter_additional_ios_build_settings(target)
end
end
... ...
... ... @@ -5,10 +5,6 @@ PODS:
- connectivity (0.0.1):
- Flutter
- Reachability
- connectivity_for_web (0.1.0):
- Flutter
- connectivity_macos (0.0.1):
- Flutter
- contacts_service (0.2.2):
- Flutter
- device_info (0.0.1):
... ... @@ -33,21 +29,11 @@ PODS:
- Flutter
- path_provider (0.0.1):
- Flutter
- path_provider_linux (0.0.1):
- Flutter
- path_provider_macos (0.0.1):
- Flutter
- "permission_handler (4.4.0+hotfix.4)":
- Flutter
- Reachability (3.2)
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_linux (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
- Flutter
- shared_preferences_web (0.0.1):
- Flutter
- sqflite (0.0.1):
- Flutter
- FMDB (~> 2.7.2)
... ... @@ -57,12 +43,6 @@ PODS:
- TPNS-iOS (= 1.2.7.2)
- url_launcher (0.0.1):
- Flutter
- url_launcher_linux (0.0.1):
- Flutter
- url_launcher_macos (0.0.1):
- Flutter
- url_launcher_web (0.0.1):
- Flutter
- webview_flutter (0.0.1):
- Flutter
- WechatOpenSDK (1.8.7.1)
... ... @@ -70,8 +50,6 @@ PODS:
DEPENDENCIES:
- audioplayers (from `.symlinks/plugins/audioplayers/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- contacts_service (from `.symlinks/plugins/contacts_service/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- Flutter (from `Flutter`)
... ... @@ -82,19 +60,11 @@ DEPENDENCIES:
- install_plugin (from `.symlinks/plugins/install_plugin/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- tpns_flutter_plugin (from `.symlinks/plugins/tpns_flutter_plugin/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
SPEC REPOS:
... ... @@ -110,10 +80,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/audioplayers/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
:path: ".symlinks/plugins/connectivity_for_web/ios"
connectivity_macos:
:path: ".symlinks/plugins/connectivity_macos/ios"
contacts_service:
:path: ".symlinks/plugins/contacts_service/ios"
device_info:
... ... @@ -134,32 +100,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
path_provider_linux:
:path: ".symlinks/plugins/path_provider_linux/ios"
path_provider_macos:
:path: ".symlinks/plugins/path_provider_macos/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
:path: ".symlinks/plugins/shared_preferences_linux/ios"
shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
tpns_flutter_plugin:
:path: ".symlinks/plugins/tpns_flutter_plugin/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
url_launcher_linux:
:path: ".symlinks/plugins/url_launcher_linux/ios"
url_launcher_macos:
:path: ".symlinks/plugins/url_launcher_macos/ios"
url_launcher_web:
:path: ".symlinks/plugins/url_launcher_web/ios"
webview_flutter:
:path: ".symlinks/plugins/webview_flutter/ios"
... ... @@ -167,8 +117,6 @@ SPEC CHECKSUMS:
audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c
Bugly: fd066c75c4a0eca1440f9b6a84bd37d51bfc85ac
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
contacts_service: 849e1f84281804c8bfbec1b4c3eedcb23c5d3eca
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
... ... @@ -180,24 +128,16 @@ SPEC CHECKSUMS:
install_plugin: a13e7ddd2bab0c701b48cd359c26d0394125b6fb
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
permission_handler: 8278954f2382902f63f00dd8828769c0bd6d511b
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
TPNS-iOS: 9b35473a4a0d07f2c2730ea1e66c6749c2b98095
tpns_flutter_plugin: 8dbbee157aab91a878f64d056c1383726a6c5c4d
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
PODFILE CHECKSUM: 6d186dc4668603071619657511aa873d9a684d13
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
COCOAPODS: 1.9.1
... ...
... ... @@ -9,11 +9,7 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
... ... @@ -27,8 +23,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
... ... @@ -41,13 +35,11 @@
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>"; };
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>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* 一键订.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "一键订.app"; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
... ... @@ -64,8 +56,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
A7F352227F0F121A53D9A543 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
... ... @@ -94,9 +84,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
... ... @@ -235,7 +223,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
... ... @@ -257,9 +245,42 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
"${BUILT_PRODUCTS_DIR}/audioplayers/audioplayers.framework",
"${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework",
"${BUILT_PRODUCTS_DIR}/contacts_service/contacts_service.framework",
"${BUILT_PRODUCTS_DIR}/device_info/device_info.framework",
"${BUILT_PRODUCTS_DIR}/flutter_statusbarcolor/flutter_statusbarcolor.framework",
"${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework",
"${BUILT_PRODUCTS_DIR}/install_plugin/install_plugin.framework",
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audioplayers.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/contacts_service.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_statusbarcolor.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/install_plugin.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
... ... @@ -324,7 +345,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
... ... @@ -382,9 +402,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = 8J59HM8B82;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
... ... @@ -399,7 +420,7 @@
MARKETING_VERSION = 1.0.8;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "OneKey Distribution Profile";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
... ... @@ -408,7 +429,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
... ... @@ -466,7 +486,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
... ...
... ... @@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>一键订</string>
<string>Runner</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
... ... @@ -85,8 +85,8 @@
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>XG_ACCESS_ID</key>
<string>${1600012876}</string>
<string>1600012876</string>
<key>XG_ACCESS_KEY</key>
<string>${INUIMFK21WGH}</string>
<string>INUIMFK21WGH</string>
</dict>
</plist>
... ...
import 'package:dio/dio.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
... ... @@ -39,11 +38,11 @@ Future<void> main() async {
),
ChangeNotifierProvider<MessageDialogModel>(
create: (_) => MessageDialogModel()..init(),
)
),
],
child: MyApp(),
));
FlutterBugly.init(androidAppId: "f71a313f42",iOSAppId: "3089e4587e");
FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e");
});
}
... ... @@ -55,8 +54,7 @@ class MyApp extends StatefulWidget {
}
}
class MyAppState extends State<MyApp>{
class MyAppState extends State<MyApp> {
@override
void initState() {
// TODO: implement initState
... ... @@ -74,11 +72,11 @@ class MyAppState extends State<MyApp>{
await registerWxApi(
appId: "wx85aa3cdd0f791e65",
doOnAndroid: true,
doOnIOS: true,
universalLink: "https://xt04.colorcun.com/link/OneKey/");
var result = await isWeChatInstalled;
LogUtil.v("is installed $result");
}
doOnIOS: true,
universalLink: "https://xt04.colorcun.com/link/OneKey/");
var result = await isWeChatInstalled;
LogUtil.v("is installed $result");
}
//初始化dio
initDio() {
... ... @@ -90,7 +88,6 @@ class MyAppState extends State<MyApp>{
DioUtil().setConfig(config);
}
@override
Widget build(BuildContext context) {
// TODO: implement build
... ... @@ -102,7 +99,8 @@ class MyAppState extends State<MyApp>{
brightness: Brightness.light,
primaryColor: Colors.white,
splashColor: Colors.transparent,
textTheme: TextTheme(overline: TextStyle(decoration: TextDecoration.none)),
textTheme:
TextTheme(overline: TextStyle(decoration: TextDecoration.none)),
tooltipTheme: TooltipThemeData(verticalOffset: -100000)),
home: LoginPage(),
onGenerateRoute: App.router.generator,
... ...
... ... @@ -9,7 +9,7 @@ part of 'message.dart';
Message _$MessageFromJson(Map<String, dynamic> json) {
return Message()
..id = json['id'] as String
..message_type = json['message_type'] as dynamic
..message_type = json['message_type']
..handle_time = json['handle_time'] as String
..read_time = json['read_time'] as String
..is_read = json['is_read'] as String
... ...
import 'package:json_annotation/json_annotation.dart';
part 'seller_info.g.dart';
@JsonSerializable()
class SellerInfoModel extends Object {
@JsonKey(name: 'ret')
int ret;
@JsonKey(name: 'data')
SunSellerInfoModel data;
@JsonKey(name: 'msg')
String msg;
SellerInfoModel(
this.ret,
this.data,
this.msg,
);
factory SellerInfoModel.fromJson(Map<String, dynamic> srcJson) =>
_$SellerInfoModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$SellerInfoModelToJson(this);
}
@JsonSerializable()
class SunSellerInfoModel extends Object {
@JsonKey(name: 'seller')
Seller seller;
@JsonKey(name: 'manager')
List<Manager> manager;
@JsonKey(name: 'seller_user')
SellerUser sellerUser;
@JsonKey(name: 'daily')
Daily daily;
@JsonKey(name: 'config')
List<dynamic> config;
@JsonKey(name: 'setting')
Setting setting;
@JsonKey(name: 'scatter')
int scatter;
@JsonKey(name: 'room')
int room;
@JsonKey(name: 'cassette')
int cassette;
SunSellerInfoModel(
this.seller,
this.manager,
this.sellerUser,
this.daily,
this.config,
this.setting,
this.scatter,
this.room,
this.cassette,
);
factory SunSellerInfoModel.fromJson(Map<String, dynamic> srcJson) =>
_$SunSellerInfoModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$SunSellerInfoModelToJson(this);
}
@JsonSerializable()
class Seller extends Object {
@JsonKey(name: 'id')
String id;
@JsonKey(name: 'sellername')
String sellername;
@JsonKey(name: 'selleralias')
String selleralias;
@JsonKey(name: 'seller_image')
String sellerImage;
@JsonKey(name: 'map_address')
String mapAddress;
@JsonKey(name: 'is_call_tel')
String isCallTel;
@JsonKey(name: 'daily')
String daily;
@JsonKey(name: 'lat')
String lat;
@JsonKey(name: 'long')
String long;
@JsonKey(name: 'is_sms')
String isSms;
@JsonKey(name: 'is_open_order')
String isOpenOrder;
@JsonKey(name: 'is_open_wine')
String isOpenWine;
Seller(
this.id,
this.sellername,
this.selleralias,
this.sellerImage,
this.mapAddress,
this.isCallTel,
this.daily,
this.lat,
this.long,
this.isSms,
this.isOpenOrder,
this.isOpenWine,
);
factory Seller.fromJson(Map<String, dynamic> srcJson) =>
_$SellerFromJson(srcJson);
Map<String, dynamic> toJson() => _$SellerToJson(this);
}
@JsonSerializable()
class Manager extends Object {
@JsonKey(name: 'role_name')
String roleName;
@JsonKey(name: 'id')
dynamic id;
@JsonKey(name: 'sellerid')
dynamic sellerid;
@JsonKey(name: 'openid')
String openid;
@JsonKey(name: 'receipt_code')
String receiptCode;
@JsonKey(name: 'user_name')
String userName;
@JsonKey(name: 'cdate')
String cdate;
@JsonKey(name: 'status')
dynamic status;
@JsonKey(name: 'is_first')
dynamic isFirst;
@JsonKey(name: 'disting')
dynamic disting;
@JsonKey(name: 'code')
dynamic code;
@JsonKey(name: 'uid')
dynamic uid;
@JsonKey(name: 'nick_name')
String nickName;
Manager(
this.roleName,
this.id,
this.sellerid,
this.openid,
this.receiptCode,
this.userName,
this.cdate,
this.status,
this.isFirst,
this.disting,
this.code,
this.uid,
this.nickName,
);
factory Manager.fromJson(Map<String, dynamic> srcJson) =>
_$ManagerFromJson(srcJson);
Map<String, dynamic> toJson() => _$ManagerToJson(this);
}
@JsonSerializable()
class SellerUser extends Object {
SellerUser();
factory SellerUser.fromJson(Map<String, dynamic> srcJson) =>
_$SellerUserFromJson(srcJson);
Map<String, dynamic> toJson() => _$SellerUserToJson(this);
}
@JsonSerializable()
class Daily extends Object {
@JsonKey(name: 'morning')
String morning;
@JsonKey(name: 'noon')
String noon;
@JsonKey(name: 'night')
String night;
Daily(
this.morning,
this.noon,
this.night,
);
factory Daily.fromJson(Map<String, dynamic> srcJson) =>
_$DailyFromJson(srcJson);
Map<String, dynamic> toJson() => _$DailyToJson(this);
}
@JsonSerializable()
class Setting extends Object {
@JsonKey(name: 'template_code')
String templateCode;
Setting(
this.templateCode,
);
factory Setting.fromJson(Map<String, dynamic> srcJson) =>
_$SettingFromJson(srcJson);
Map<String, dynamic> toJson() => _$SettingToJson(this);
}
... ...
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'seller_info.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SellerInfoModel _$SellerInfoModelFromJson(Map<String, dynamic> json) {
return SellerInfoModel(
json['ret'] as int,
json['data'] == null
? null
: SunSellerInfoModel.fromJson(json['data'] as Map<String, dynamic>),
json['msg'] as String);
}
Map<String, dynamic> _$SellerInfoModelToJson(SellerInfoModel instance) =>
<String, dynamic>{
'ret': instance.ret,
'data': instance.data,
'msg': instance.msg
};
SunSellerInfoModel _$SunSellerInfoModelFromJson(Map<String, dynamic> json) {
return SunSellerInfoModel(
json['seller'] == null
? null
: Seller.fromJson(json['seller'] as Map<String, dynamic>),
(json['manager'] as List)
?.map((e) =>
e == null ? null : Manager.fromJson(e as Map<String, dynamic>))
?.toList(),
json['seller_user'] == null
? null
: SellerUser.fromJson(json['seller_user'] as Map<String, dynamic>),
json['daily'] == null
? null
: Daily.fromJson(json['daily'] as Map<String, dynamic>),
json['config'] as List,
json['setting'] == null
? null
: Setting.fromJson(json['setting'] as Map<String, dynamic>),
json['scatter'] as int,
json['room'] as int,
json['cassette'] as int);
}
Map<String, dynamic> _$SunSellerInfoModelToJson(SunSellerInfoModel instance) =>
<String, dynamic>{
'seller': instance.seller,
'manager': instance.manager,
'seller_user': instance.sellerUser,
'daily': instance.daily,
'config': instance.config,
'setting': instance.setting,
'scatter': instance.scatter,
'room': instance.room,
'cassette': instance.cassette
};
Seller _$SellerFromJson(Map<String, dynamic> json) {
return Seller(
json['id'] as String,
json['sellername'] as String,
json['selleralias'] as String,
json['seller_image'] as String,
json['map_address'] as String,
json['is_call_tel'] as String,
json['daily'] as String,
json['lat'] as String,
json['long'] as String,
json['is_sms'] as String,
json['is_open_order'] as String,
json['is_open_wine'] as String);
}
Map<String, dynamic> _$SellerToJson(Seller instance) => <String, dynamic>{
'id': instance.id,
'sellername': instance.sellername,
'selleralias': instance.selleralias,
'seller_image': instance.sellerImage,
'map_address': instance.mapAddress,
'is_call_tel': instance.isCallTel,
'daily': instance.daily,
'lat': instance.lat,
'long': instance.long,
'is_sms': instance.isSms,
'is_open_order': instance.isOpenOrder,
'is_open_wine': instance.isOpenWine
};
Manager _$ManagerFromJson(Map<String, dynamic> json) {
return Manager(
json['role_name'] as String,
json['id'],
json['sellerid'],
json['openid'] as String,
json['receipt_code'] as String,
json['user_name'] as String,
json['cdate'] as String,
json['status'],
json['is_first'],
json['disting'],
json['code'],
json['uid'],
json['nick_name'] as String);
}
Map<String, dynamic> _$ManagerToJson(Manager instance) => <String, dynamic>{
'role_name': instance.roleName,
'id': instance.id,
'sellerid': instance.sellerid,
'openid': instance.openid,
'receipt_code': instance.receiptCode,
'user_name': instance.userName,
'cdate': instance.cdate,
'status': instance.status,
'is_first': instance.isFirst,
'disting': instance.disting,
'code': instance.code,
'uid': instance.uid,
'nick_name': instance.nickName
};
SellerUser _$SellerUserFromJson(Map<String, dynamic> json) {
return SellerUser();
}
Map<String, dynamic> _$SellerUserToJson(SellerUser instance) =>
<String, dynamic>{};
Daily _$DailyFromJson(Map<String, dynamic> json) {
return Daily(json['morning'] as String, json['noon'] as String,
json['night'] as String);
}
Map<String, dynamic> _$DailyToJson(Daily instance) => <String, dynamic>{
'morning': instance.morning,
'noon': instance.noon,
'night': instance.night
};
Setting _$SettingFromJson(Map<String, dynamic> json) {
return Setting(json['template_code'] as String);
}
Map<String, dynamic> _$SettingToJson(Setting instance) =>
<String, dynamic>{'template_code': instance.templateCode};
... ...
... ... @@ -22,10 +22,10 @@ Table _$TableFromJson(Map<String, dynamic> json) {
..rname = json['rname'] as String
..max = json['max'] as String
..low = json['low'] as String
..sign=json['sign'] as String
..reserver=json['reserver'] as String
..notebookId=json['notebookId'] as String
..selected=json["selected"] as bool;
..sign = json['sign'] as String
..reserver = json['reserver'] as String
..notebookId = json['notebookId'] as String
..selected = json['selected'] as bool;
}
Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{
... ... @@ -43,9 +43,8 @@ Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{
'rname': instance.rname,
'max': instance.max,
'low': instance.low,
'sign':instance.sign,
'reserver':instance.reserver,
'notebookId':instance.notebookId,
'selected':instance.selected
'sign': instance.sign,
'reserver': instance.reserver,
'notebookId': instance.notebookId,
'selected': instance.selected
};
... ...
import 'package:json_annotation/json_annotation.dart';
part 'table_list.g.dart';
@JsonSerializable()
class TableListModel extends Object {
@JsonKey(name: 'ret')
int ret;
@JsonKey(name: 'data')
List<TableListSunModel> data;
@JsonKey(name: 'msg')
String msg;
TableListModel(
this.ret,
this.data,
this.msg,
);
factory TableListModel.fromJson(Map<String, dynamic> srcJson) =>
_$TableListModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$TableListModelToJson(this);
}
@JsonSerializable()
class TableListSunModel extends Object {
@JsonKey(name: 'name')
String name;
@JsonKey(name: 'list')
List<TableList> list;
TableListSunModel(
this.name,
this.list,
);
factory TableListSunModel.fromJson(Map<String, dynamic> srcJson) =>
_$TableListSunModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$TableListSunModelToJson(this);
}
@JsonSerializable()
class TableList extends Object {
@JsonKey(name: 'id')
String id;
@JsonKey(name: 'rid')
String rid;
@JsonKey(name: 'sellerid')
String sellerid;
@JsonKey(name: 'name')
String name;
@JsonKey(name: 'qrcode')
String qrcode;
@JsonKey(name: 'table_pnum')
String tablePnum;
@JsonKey(name: 'most_pnum')
String mostPnum;
@JsonKey(name: 'tid')
String tid;
@JsonKey(name: 'hot')
String hot;
@JsonKey(name: 'order_o')
String orderO;
@JsonKey(name: 'status')
String status;
@JsonKey(name: 'enable')
String enable;
@JsonKey(name: 'spell')
String spell;
@JsonKey(name: 'cdate')
String cdate;
@JsonKey(name: 'rname')
String rname;
String table_pnum; //桌位最少可做人数
String most_pnum; //桌位最多可做人数
String low; //最低消费
//获取桌位类型
String get tidStr {
switch (tid) {
case "1":
return "散座";
case "2":
return "包间";
case "3":
return "卡座";
}
}
String reserver; //订餐人
String notebookId; //桌位对应的预订id
bool selected = false; //是否选中
String max; //最多可做人数
String sign; //标签 桌位状态 0:待确认,1:已定座,2:确认到店,3:用餐完成,4:取消预订,5:安排包间,6拒绝订单
String get maxText {
if (max == null || max == "0" || max == "null") {
return "";
} else {
return "最多可坐" + max + "人";
}
}
//获取桌位可坐人数
String get tableNum {
if (table_pnum == null || table_pnum.isEmpty || table_pnum == "0") {
return "";
} else if (most_pnum != null &&
most_pnum.isNotEmpty &&
most_pnum != "0" &&
most_pnum != "null") {
if (table_pnum == most_pnum) {
return "$table_pnum人";
} else {
return "$table_pnum-$most_pnum人";
}
} else {
return "$table_pnum人";
}
}
//获取最低消费
String get lowStr {
return (low == null || low.isEmpty || low == "0") ? "" : "最低消费\n$low元";
}
String get signStr {
if (enable == "0") return "已停用";
if (sign != null) {
switch (sign) {
case "1": //已预订
case "5": //已安排包间
return "已预订";
case "2": //用餐中
return "用餐中";
default:
return "";
}
}
return "";
}
TableList(
this.id,
this.rid,
this.sellerid,
this.name,
this.qrcode,
this.tablePnum,
this.mostPnum,
this.tid,
this.hot,
this.orderO,
this.status,
this.enable,
this.spell,
this.cdate,
this.rname);
factory TableList.fromJson(Map<String, dynamic> srcJson) =>
_$TableListFromJson(srcJson);
Map<String, dynamic> toJson() => _$TableListToJson(this);
}
... ...
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'table_list.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
TableListModel _$TableListModelFromJson(Map<String, dynamic> json) {
return TableListModel(
json['ret'] as int,
(json['data'] as List)
?.map((e) => e == null
? null
: TableListSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String);
}
Map<String, dynamic> _$TableListModelToJson(TableListModel instance) =>
<String, dynamic>{
'ret': instance.ret,
'data': instance.data,
'msg': instance.msg
};
TableListSunModel _$TableListSunModelFromJson(Map<String, dynamic> json) {
return TableListSunModel(
json['name'] as String,
(json['list'] as List)
?.map((e) =>
e == null ? null : TableList.fromJson(e as Map<String, dynamic>))
?.toList());
}
Map<String, dynamic> _$TableListSunModelToJson(TableListSunModel instance) =>
<String, dynamic>{'name': instance.name, 'list': instance.list};
TableList _$TableListFromJson(Map<String, dynamic> json) {
return TableList(
json['id'] as String,
json['rid'] as String,
json['sellerid'] as String,
json['name'] as String,
json['qrcode'] as String,
json['table_pnum'] as String,
json['most_pnum'] as String,
json['tid'] as String,
json['hot'] as String,
json['order_o'] as String,
json['status'] as String,
json['enable'] as String,
json['spell'] as String,
json['cdate'] as String,
json['rname'] as String);
}
Map<String, dynamic> _$TableListToJson(TableList instance) => <String, dynamic>{
'id': instance.id,
'rid': instance.rid,
'sellerid': instance.sellerid,
'name': instance.name,
'qrcode': instance.qrcode,
'table_pnum': instance.tablePnum,
'most_pnum': instance.mostPnum,
'tid': instance.tid,
'hot': instance.hot,
'order_o': instance.orderO,
'status': instance.status,
'enable': instance.enable,
'spell': instance.spell,
'cdate': instance.cdate,
'rname': instance.rname
};
... ...
... ... @@ -6,8 +6,9 @@ class BaseResp<T> {
int code;
String msg;
T data;
Map responseData;
BaseResp(this.status, this.code, this.msg, this.data);
BaseResp(this.status, this.code, this.msg, this.data,this.responseData);
@override
String toString() {
... ...
... ... @@ -9,7 +9,6 @@ import 'package:one_key/widgets/loading.dart';
import 'base_resp.dart';
/**
* @Author: thl
* @GitHub: https://github.com/Sky24n
... ... @@ -167,15 +166,19 @@ class DioUtil {
/// [data] The request data
/// [options] The request options.
/// <BaseResp<T> 返回 status code msg data .
Future<BaseResp<T>> request<T>(BuildContext context,String method, String path,
{data, Options options, CancelToken cancelToken,bool showLoading=true}) async {
bool connectivity=await Utils.checkConnectiviy();
Future<BaseResp<T>> request<T>(
BuildContext context, String method, String path,
{data,
Options options,
CancelToken cancelToken,
bool showLoading = true}) async {
bool connectivity = await Utils.checkConnectiviy();
// if(!connectivity){
// Utils.showToast("网络错误,请稍后重试");
// return new Future.error("网络错误,请稍后重试");
// }
if(showLoading)Loading.showLoading(context);
try{
if (showLoading) Loading.showLoading(context);
try {
Response response = await _dio.request(path,
data: data,
options: _checkOptions(method, options),
... ... @@ -185,6 +188,7 @@ class DioUtil {
int _code;
String _msg;
T _data;
Map _responseData;
if (response.statusCode == HttpStatus.ok ||
response.statusCode == HttpStatus.created) {
try {
... ... @@ -197,6 +201,7 @@ class DioUtil {
: response.data[_codeKey];
_msg = response.data[_msgKey];
_data = response.data[_dataKey];
_responseData = response.data;
} else {
Map<String, dynamic> _dataMap = _decodeData(response);
_status = (_dataMap[_statusKey] is int)
... ... @@ -207,9 +212,10 @@ class DioUtil {
: _dataMap[_codeKey];
_msg = _dataMap[_msgKey];
_data = _dataMap[_dataKey];
_responseData = _dataMap;
}
Loading.hideLoading(context);
return new BaseResp(_status, _code, _msg, _data);
return new BaseResp(_status, _code, _msg, _data, _responseData);
} catch (e) {
Loading.hideLoading(context);
return new Future.error(new DioError(
... ... @@ -225,11 +231,11 @@ class DioUtil {
message: "statusCode: $response.statusCode, service error",
type: DioErrorType.RESPONSE,
));
}on DioError catch(error){
if(showLoading){
} on DioError catch (error) {
if (showLoading) {
Loading.hideLoading(context);
}
if(error is DioError &&error.type==DioErrorType.CONNECT_TIMEOUT){
if (error is DioError && error.type == DioErrorType.CONNECT_TIMEOUT) {
Utils.showToast("网络链接超时,请稍后重试");
}
throw error;
... ...
class HttpUrl{
static const String server_address = "https://xt04.colorcun.com/";//服务端请求地址
static const String app_user_login="?service=Android.User.AppUserLogin";//登录地址
static const String user_token_init="?service=Android.User.UserTokenInit";//初始化推送token
static const String sellerinfo="?service=Android.Reserve.SellerInfo";//获取商家信息
static const String login_out="?service=Android.User.AppLoginOut";//退出登录
static const String get_message_list="?service=Android.Reserve.GetMessageList";//获取消息列表
static const String get_reserve_list="?service=Android.Reserve.NewGetReserveList";//获取已预订列表
static const String reserve_count_day="?service=Android.Reserve.NewReservesCountDay";//获取一天订单统计数目
static const String reserve_detail="?service=Android.Reserve.Detail";//订单详情
static const String set_reserve_cusman="?service=Android.Reserve.SetReserveCusman";//设置客户经理
static const String table_list="?service=Android.Tables.GetTableListsBySellerId";//桌位列表
static const String set_reserve_status="?service=Android.Customer.SetReserveStatus";//设置订单状态
static const String set_message_status="?service=Android.Advance.SetMessageStatus";//设置消息状态
static const String get_sms_content="?service=App.SendSMS.GetSmsContent";//获取短信内容
static const String send_sms="?service=App.SendSMS.NewMessage";//发送短信
static const String check_update="http://xt03.colorcun.com/admin/api/compareversion?flat=3";
static const String upload_contact="?service=App.Seller.SaveCallRecord";//上传通讯录
}
\ No newline at end of file
class HttpUrl {
static const String server_address = "https://xt04.colorcun.com/"; //服务端请求地址
static const String app_user_login =
"?service=Android.User.AppUserLogin"; //登录地址
static const String user_token_init =
"?service=Android.User.UserTokenInit"; //初始化推送token
static const String sellerinfo =
"?service=Android.Reserve.SellerInfo"; //获取商家信息
static const String login_out = "?service=Android.User.AppLoginOut"; //退出登录
static const String get_message_list =
"?service=Android.Reserve.GetMessageList"; //获取消息列表
static const String get_reserve_list =
"?service=Android.Reserve.NewGetReserveList"; //获取已预订列表
static const String reserve_count_day =
"?service=Android.Reserve.NewReservesCountDay"; //获取一天订单统计数目
static const String reserve_detail = "?service=Android.Reserve.Detail"; //订单详情
static const String set_reserve_cusman =
"?service=Android.Reserve.SetReserveCusman"; //设置客户经理
static const String table_list =
"?service=Android.Tables.GetTableListsBySellerId"; //桌位列表
static const String set_reserve_status =
"?service=Android.Customer.SetReserveStatus"; //设置订单状态
static const String set_message_status =
"?service=Android.Advance.SetMessageStatus"; //设置消息状态
static const String get_sms_content =
"?service=App.SendSMS.GetSmsContent"; //获取短信内容
static const String send_sms = "?service=App.SendSMS.NewMessage"; //发送短信
static const String check_update =
"http://xt03.colorcun.com/admin/api/compareversion?flat=3";
static const String upload_contact =
"?service=App.Seller.SaveCallRecord"; //上传通讯录
static const String get_table_list =
"?service=Android.Reserve.NewGetTableList"; //根据商家ID 获取桌位信息列表: 1:散座 2:包间 默认:获取所有数据
}
... ...
... ... @@ -22,10 +22,9 @@ import 'package:provider/provider.dart';
import 'package:one_key/utils/event_bus.dart';
class HandleOnlinePage extends StatefulWidget {
final String rid;
final String mid;
HandleOnlinePage(this.rid,this.mid);
HandleOnlinePage(this.rid, this.mid);
@override
State<StatefulWidget> createState() {
... ... @@ -34,110 +33,128 @@ class HandleOnlinePage extends StatefulWidget {
}
}
class HandleOnlinePageState extends State<HandleOnlinePage> {
NotebookDetailModel detailModel= NotebookDetailModel();
NotebookDetailModel detailModel = NotebookDetailModel();
NotebookDetail detailEntity;
String cusmanText="";
String cusmanText = "";
List<Manager> managers=[];//客户经理
List<Manager> managers = []; //客户经理
Manager manager=Manager();
Manager manager = Manager();
@override
void initState() {
// TODO: implement initState
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) async {
detailEntity=await detailModel.getReserveDetail(context, {
"rid":widget.rid,
detailEntity = await detailModel.getReserveDetail(context, {
"rid": widget.rid,
});
setState(() {//未处理
cusmanText=detailEntity.cusman.isEmpty?"请选择":detailEntity.cusman;
setState(() {
//未处理
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
});
if(detailEntity.status!="0"){//已处理
Future.delayed(Duration(milliseconds: 200),(){
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,replace: true);
if (detailEntity.status != "0") {
//已处理
Future.delayed(Duration(milliseconds: 200), () {
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,
replace: true);
});
setMessageStatus();
}else{
managers=await detailModel.getManagers(context);
} else {
managers = await detailModel.getManagers(context);
}
});
}
//设置当前客户经理
_setCurrManager(){
manager=managers.firstWhere((manager)=>manager.userName==cusmanText,orElse: ()=>Manager());
if(manager.id==null||manager.id.toString().isEmpty)return;
Map<String,String> params={
"rid":detailEntity.id,
"cusman_id":manager.id.toString(),
"cusman":manager.userName
_setCurrManager() {
manager = managers.firstWhere((manager) => manager.userName == cusmanText,
orElse: () => Manager());
if (manager.id == null || manager.id.toString().isEmpty) return;
Map<String, String> params = {
"rid": detailEntity.id,
"cusman_id": manager.id.toString(),
"cusman": manager.userName
};
detailModel.setReserveCusmnan(context, params);
}
//拒绝订单弹框
_showRefuseDialog(){
showDialog(context: context,builder: (context){
return AlertDialog(
title: Text("确定拒绝订单吗?\n拒绝后无法联系客户"),
titleTextStyle: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(32)),
content: Text("如果包间类型订满,请及时停用"),
contentTextStyle:TextStyle(color: MyColours.color_828282,fontSize: ScreenUtil().setSp(28)),
actions: <Widget>[
FlatButton(
child: Text("拒绝订单",style: TextStyle(fontSize: ScreenUtil().setSp(32)),),
onPressed: (){
Navigator.of(context).pop();
setReserveStatus("6");
},
),
FlatButton(
child: Text("去安排",style: TextStyle(fontSize: ScreenUtil().setSp(32)),),
onPressed: () async {
Navigator.of(context).pop();
String tid=await NavigatorUtil.goSelectTablePage(context,widget.rid,int.parse(detailEntity.ddate)*1000,detailEntity.ddate_solt);
if(tid!=null){
setReserveStatus("5",tid:tid);
}
},
)
],
);
});
_showRefuseDialog() {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text("确定拒绝订单吗?\n拒绝后无法联系客户"),
titleTextStyle: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(32)),
content: Text("如果包间类型订满,请及时停用"),
contentTextStyle: TextStyle(
color: MyColours.color_828282,
fontSize: ScreenUtil().setSp(28)),
actions: <Widget>[
FlatButton(
child: Text(
"拒绝订单",
style: TextStyle(fontSize: ScreenUtil().setSp(32)),
),
onPressed: () {
Navigator.of(context).pop();
setReserveStatus("6");
},
),
FlatButton(
child: Text(
"去安排",
style: TextStyle(fontSize: ScreenUtil().setSp(32)),
),
onPressed: () async {
Navigator.of(context).pop();
String tid = await NavigatorUtil.goSelectTablePage(
context,
widget.rid,
int.parse(detailEntity.ddate) * 1000,
detailEntity.ddate_solt);
if (tid != null) {
setReserveStatus("5", tid: tid);
}
},
)
],
);
});
}
//处理在线预订
setReserveStatus(String status,{String tid=""}){
bus.emit("remove_untreated_message",widget.mid);
UserModel userModel=Provider.of<UserModel>(context,listen: false);
Map<String,String> causeMap={
"uid":userModel.user.openid,
"uname":userModel.user.account,
"desc":"",
setReserveStatus(String status, {String tid = ""}) {
bus.emit("remove_untreated_message", widget.mid);
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> causeMap = {
"uid": userModel.user.openid,
"uname": userModel.user.account,
"desc": "",
};
Map<String,String> params={
"rid":widget.rid,
"status":status,//5安排包间 6 拒绝订单
"tid":tid,
"mid":widget.mid,
"cause":json.encode(causeMap)
Map<String, String> params = {
"rid": widget.rid,
"status": status, //5安排包间 6 拒绝订单
"tid": tid,
"mid": widget.mid,
"cause": json.encode(causeMap)
};
detailModel.setReserveStatus(context, params);
}
//处理在线预订
setMessageStatus(){
bus.emit("remove_untreated_message",widget.mid);
Map<String,String> params={
"sid":Provider.of<UserModel>(context,listen: false).user.sellerid,
"id":widget.mid,
"status":"is_handle"
setMessageStatus() {
bus.emit("remove_untreated_message", widget.mid);
Map<String, String> params = {
"sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
"id": widget.mid,
"status": "is_handle"
};
detailModel.setMessageStatus(context, params);
}
... ... @@ -146,186 +163,251 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
Widget build(BuildContext context) {
// TODO: implement build
return SafeArea(
child: detailEntity==null?Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
):Column(
children: <Widget>[
MyAppBar(
"在线预订详情",
showBack: true,
),
Expanded(
child: DefaultTextStyle(style: TextStyle(decoration: TextDecoration.none), child: Container(
child: detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText("用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
Column(
)
: Column(
children: <Widget>[
MyAppBar(
"在线预订详情",
showBack: true,
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
Column(
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
Offstage(
offstage:
detailEntity.type == "0"
? false
: true,
child: RowMultiText("用餐人数",
detailEntity.pnum),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(30),
)
],
),
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage:
detailEntity.demands.length >
0
? false
: true,
child: Container(
height:
ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
)),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone),
RowMultiText(
"备注信息", detailEntity.cusdem ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(
manager.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list)
.then((value) {
setState(() {
cusmanText = managers[
value.first]
.userName;
});
_setCurrManager();
});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration: TextDecoration
.underline,
),
),
),
)
],
),
),
],
)),
),
Container(
margin: EdgeInsets.only(
top: ScreenUtil().setHeight(30),
bottom: ScreenUtil().setHeight(30)),
child: Column(
children: <Widget>[
RowMultiText("用餐时间", detailEntity.ddateHm),
Offstage(
offstage: detailEntity.type=="0"?false:true,
child: RowMultiText("用餐人数", detailEntity.pnum),
)
],
),
Image.asset(detailEntity.statuImgAssets,width: ScreenUtil().setWidth(100),height: ScreenUtil().setWidth(30),)
],
),
RowMultiText("包间需求", (detailEntity.demands.length.toString()+"个")??""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity.demands.length>0?false:true,
child: Container(
height: ScreenUtil().setHeight(210),
child: ListView.builder(itemBuilder: (BuildContext contxt,int index){
return NeedItem(detailEntity.demands[index]);
},itemCount: detailEntity.demands.length,shrinkWrap: true,scrollDirection: Axis.horizontal,),
),
)
),
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText("客户电话", detailEntity.phone),
RowMultiText("备注信息",detailEntity.cusdem??""),
MyDivider(double.infinity, ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours.color_828282,
fontSize: ScreenUtil().setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list=[];
for(Manager manager in managers){
list.add(manager.roleUserName);
CommonButton(
content: "安排包间",
width: 669,
height: 76,
fontSize: 34,
onPress: () async {
String tid = await NavigatorUtil
.goSelectTablePage(
context,
widget.rid,
int.parse(detailEntity.ddate) *
1000,
detailEntity.ddate_solt);
if (tid != null) {
setReserveStatus("5", tid: tid);
}
DialogUtil.showSelectCusmanDialog(context,list).then((value){
setState(() {
cusmanText=managers[value.first].userName;
});
_setCurrManager();
});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30),
decoration: TextDecoration.underline,
),
),
),
)
],
),
),
],
)),
),
Container(
margin: EdgeInsets.only(top: ScreenUtil().setHeight(30),bottom: ScreenUtil().setHeight(30)),
child: Column(
children: <Widget>[
CommonButton(
content: "安排包间",
width: 669,
height: 76,
fontSize: 34,
onPress: () async {
String tid=await NavigatorUtil.goSelectTablePage(context,widget.rid,int.parse(detailEntity.ddate)*1000,detailEntity.ddate_solt);
if(tid!=null){
setReserveStatus("5",tid:tid);
}
},
),
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
decoration: BoxDecoration(
border: Border.all(color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"拒绝订单",
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(34)),
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
),
),
onTap: () {
_showRefuseDialog();
},
)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
),
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"联系顾客",
style: TextStyle(
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"拒绝订单",
style: TextStyle(
color:
MyColours.color_199095,
fontSize:
ScreenUtil().setSp(34)),
),
),
onTap: () {
_showRefuseDialog();
},
)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(34)),
),
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"联系顾客",
style: TextStyle(
color:
MyColours.color_199095,
fontSize:
ScreenUtil().setSp(34)),
),
),
onTap: () {
if (detailEntity.phone != null &&
detailEntity
.phone.isNotEmpty) {
Utils.goPhone(
detailEntity.phone);
} else {
Utils.showToast("没有客户电话!");
}
},
)),
],
),
),
onTap: () {
if(detailEntity.phone!=null&&detailEntity.phone.isNotEmpty){
Utils.goPhone(detailEntity.phone);
}else{
Utils.showToast("没有客户电话!");
}
},
)),
)
],
),
)
],
),
)
],
),
)
],
)
)),
)
],
),
))),
)
],
),
);
}
}
... ...
import 'dart:ui';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/models/notebook_detail.dart';
import 'package:one_key/provider/notebook_detail_change_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/app_bar.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/new_table_item.dart';
import 'package:one_key/widgets/table_item.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
typedef clickCallback = void Function(String value);
class NoteBookChangePage extends StatefulWidget {
final NotebookDetail detailEntity;
final String rid;
const NoteBookChangePage({Key key, this.detailEntity, this.rid})
: super(key: key);
@override
_NoteBookChangePageState createState() => _NoteBookChangePageState();
}
class _NoteBookChangePageState extends State<NoteBookChangePage> {
// String dateText = ""; //当前显示日期时间
// int currTimeIndex = 1; //当前选中时间段
// String morning; //早市时间段
// String noon; //午市时间段
// String night; //晚市时间段
DateTime dateTime; //当前日期
NotebookDetailChangeModel _notebookDetailChangeModel;
FocusNode _phoneNode = FocusNode();
FocusNode _nameNode = FocusNode();
FocusNode _needNode = FocusNode();
// //生成日期文本
// _createDateText(DateTime day) {
// if (Utils.isOneDay(day, dateTime)) return; //日期没变
// setState(() {
// DateTime dateNow = DateTime.now();
// if (Utils.isOneDay(day, dateNow)) {
// dateText = Utils.addZeroNumber(dateNow.month) +
// "-" +
// Utils.addZeroNumber(dateNow.day) +
// " 今天";
// } else {
// dateText =
// Utils.addZeroNumber(day.month) + "-" + Utils.addZeroNumber(day.day);
// }
// dateTime = day;
// });
// // _getReserveList();
// // _reserveCountDay();
// }
//初始化时间
_initTime() {
_notebookDetailChangeModel =
Provider.of<NotebookDetailChangeModel>(context, listen: false);
//今天
DateTime dateTime = DateTime.now();
int dateTimeMill = dateTime.millisecondsSinceEpoch;
String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'MM-dd');
_notebookDetailChangeModel.dateList.add({
'title': dateText,
'select': false,
'fontSize': 34.0,
'dayText': ' 今天',
'isImage': false
});
//明天
int tomorrowMill = dateTimeMill + 24 * 60 * 60 * 1000;
String dateTextTomorrow =
DateUtil.formatDateMs(tomorrowMill, format: 'MM-dd');
_notebookDetailChangeModel.dateList.add({
'title': dateTextTomorrow,
'select': false,
'fontSize': 34.0,
'dayText': ' 明天',
'isImage': false
});
//第三个
_notebookDetailChangeModel.dateList.add({
'title': '其他',
'select': true,
'fontSize': 30.0,
'dayText': '',
'isImage': true
});
print(widget.detailEntity);
// dateList.add(value)
// morning =
// userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;
// noon = userModel.user.noon.isEmpty ? "00:00-00:00" : userModel.user.noon;
// night = userModel.user.night.isEmpty ? "00:00-00:00" : userModel.user.night;
// if (dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
// "-" +
// Utils.addZeroNumber(dateTime.month) +
// "-" +
// Utils.addZeroNumber(dateTime.day) +
// " " +
// morning.split("-")[1] +
// ":00"))) {
// //未过早市
// currTimeIndex = 1;
// } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
// "-" +
// Utils.addZeroNumber(dateTime.month) +
// "-" +
// Utils.addZeroNumber(dateTime.day) +
// " " +
// morning.split("-")[1] +
// ":00")) &&
// dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
// "-" +
// Utils.addZeroNumber(dateTime.month) +
// "-" +
// Utils.addZeroNumber(dateTime.day) +
// " " +
// noon.split("-")[1] +
// ":00"))) {
// //过了早市,未过午市
// currTimeIndex = 2;
// } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
// "-" +
// Utils.addZeroNumber(dateTime.month) +
// "-" +
// Utils.addZeroNumber(dateTime.day) +
// " " +
// noon.split("-")[1] +
// ":00")) &&
// dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
// "-" +
// Utils.addZeroNumber(dateTime.month) +
// "-" +
// Utils.addZeroNumber(dateTime.day) +
// " " +
// night.split("-")[1] +
// ":00"))) {
// //过了午市,未过晚市
// currTimeIndex = 3;
// } else {
// //过了晚市
// currTimeIndex = 3;
// }
}
@override
void initState() {
super.initState();
dateTime = DateTime.now();
_notebookDetailChangeModel =
Provider.of<NotebookDetailChangeModel>(context, listen: false);
_notebookDetailChangeModel.initDateHourMinuteList(context);
_notebookDetailChangeModel.getNewTableList(context);
_initData();
// _initTime();
}
_initData() {
print(widget.detailEntity);
for (var item in widget.detailEntity.tables) {
item.selected = true;
}
}
_topWidget() {
return Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
child: Column(
children: [
//第一行 日期选择
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: _notebookDetailChangeModel.dateList.map((value) {
return CustomButton(
dateText: value['title'],
fontSize: value['fontSize'],
dayText: value['dayText'],
isImage: value['isImage'],
isSelect: value['select'],
onTap: () {
for (int j = 0;
j < _notebookDetailChangeModel.dateList.length;
j++) {
_notebookDetailChangeModel.dateList[j]['select'] = false;
if (_notebookDetailChangeModel.dateList[j]['title'] ==
value['title']) {
_notebookDetailChangeModel.dateList[j]['select'] = true;
if (j == 0 || j == 1) {
_notebookDetailChangeModel.dateList[2]['title'] =
'其他';
}
if (j ==
_notebookDetailChangeModel.dateList.length - 1) {
String selectStr =
_notebookDetailChangeModel.dateList[2]['title'];
String timeNow = DateUtil.formatDate(
DateTime.now(),
);
String selectDate =
timeNow.replaceRange(5, 10, selectStr);
DialogUtil.showCalendarDialog(
context, DateUtil.getDateTime(selectDate))
.then((day) {
if (day != null) {
// _createDateText(day);
dateTime = day;
int dateTimeMill = day.millisecondsSinceEpoch;
String dateText = DateUtil.formatDateMs(
dateTimeMill,
format: 'MM-dd');
bool isThird = true;
for (int i = 0;
i <
_notebookDetailChangeModel
.dateList.length;
i++) {
_notebookDetailChangeModel.dateList[i]
['select'] = false;
if (_notebookDetailChangeModel.dateList[i]
['title'] ==
dateText) {
_notebookDetailChangeModel.dateList[i]
['select'] = true;
isThird = false;
}
}
if (isThird) {
_notebookDetailChangeModel.dateList[2]
['select'] = true;
_notebookDetailChangeModel.dateList[2]
['title'] = dateText;
} else {
_notebookDetailChangeModel.dateList[2]
['title'] = '其他';
}
}
_notebookDetailChangeModel.notifyListeners();
});
}
}
}
_notebookDetailChangeModel.notifyListeners();
},
);
}).toList()),
VEmptyView(60),
//早市、午市、晚市
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: _notebookDetailChangeModel.sunDateList.map((value) {
return Container(
margin: _notebookDetailChangeModel.sunDateList.length == 3 &&
value['ddateSolt'] == 3
? EdgeInsets.only(right: 0)
: EdgeInsets.only(right: ScreenUtil().setWidth(20)),
child: CustomButton(
onTap: () {
for (var item in _notebookDetailChangeModel.sunDateList) {
item['isSelect'] = false;
if (item['dateText'] == value['dateText']) {
item['isSelect'] = true;
String key = '';
if (item['ddateSolt'] == 1) {
//早市
key = 'morning';
} else if (item['ddateSolt'] == 2) {
//午市
key = 'noon';
} else if (item['ddateSolt'] == 3) {
//晚市
key = 'night';
}
if (key != '') {
for (var sunitem
in _notebookDetailChangeModel.dailyMap[key]) {
if (sunitem['select'] == true) {
_notebookDetailChangeModel.ddateStr =
sunitem['title'];
}
}
}
}
}
_notebookDetailChangeModel.notifyListeners();
},
dateText: value['dateText'],
dayText: '',
isSelect: value['isSelect'],
),
);
}).toList()),
VEmptyView(60),
///人数选择
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: _notebookDetailChangeModel.personNumList.map((value) {
return CustomButton(
onTap: () {
for (int j = 0;
j < _notebookDetailChangeModel.personNumList.length;
j++) {
_notebookDetailChangeModel.personNumList[j]['isSelect'] =
false;
if (_notebookDetailChangeModel.personNumList[j]
['dateText'] ==
value['dateText']) {
_notebookDetailChangeModel.personNumList[j]['isSelect'] =
true;
_notebookDetailChangeModel.numController.text =
value['dateText'];
// if (j < 5) {
// _notebookDetailChangeModel.personNumList[5]
// ['dateText'] = '更多';
// }
}
}
_notebookDetailChangeModel.notifyListeners();
},
dateText: value['dateText'],
fontSize: value['fontSize'],
dayText: '',
width: value['width'],
isImage: value['isImage'],
isSelect: value['isSelect'],
isTextFiled: value['isTextFiled'],
model: _notebookDetailChangeModel,
);
}).toList(),
)
],
),
);
}
/// 可订桌位
_middleWidget() {
return Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
color: MyColours.color_f5f5f5,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'可订桌位',
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
),
InkWell(
onTap: () async {
String tid = await NavigatorUtil.goSelectTablePage(
context,
widget.rid,
int.parse(widget.detailEntity.ddate) * 1000,
widget.detailEntity.ddate_solt);
if (tid != null) {
// setReserveStatus("5", tid: tid);
}
},
child: Row(
children: [
Text('更多',
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(26))),
HEmptyView(20),
Image.asset(
'assets/arr_right_gray.png',
width: ScreenUtil().setWidth(12),
height: ScreenUtil().setWidth(22),
)
],
),
)
],
),
VEmptyView(32),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: _notebookDetailChangeModel.tableList.length > 0
? false
: true,
child: Container(
// height: ScreenUtil().setHeight(178),
height: ScreenUtil().setHeight(210),
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext contxt, int index) {
return NewTableItem(
_notebookDetailChangeModel.tableList[index],
height: 160,
);
},
itemCount: _notebookDetailChangeModel.tableList.length > 3
? 3
: _notebookDetailChangeModel.tableList.length,
shrinkWrap: true,
scrollDirection: Axis.horizontal,
),
),
)),
],
),
);
}
_bottomWidget() {
return Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(72)),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
controller: _notebookDetailChangeModel.phoneController,
focusNode: _phoneNode,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: "客户电话",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(34),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
border: InputBorder.none,
),
onChanged: (value) {},
onEditingComplete: () {
print('fff');
_phoneNode.unfocus();
},
keyboardType: TextInputType.number,
),
),
HEmptyView(40),
InkWell(
onTap: () {
_showDateChooseWidget(context);
},
child: Text(
int.parse(widget.detailEntity.is_set_ddate) == 0
? '未设置到店时间'
: _notebookDetailChangeModel.ddateStr,
style: TextStyle(
color: int.parse(widget.detailEntity.is_set_ddate) == 0
? MyColours.color_999999
: MyColours.color_199095,
fontSize: ScreenUtil().setSp(34),
),
),
),
],
),
VEmptyView(40),
MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2),
color: MyColours.color_F1F0F4),
VEmptyView(72),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
controller: _notebookDetailChangeModel.nameController,
focusNode: _nameNode,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: "客户姓名(必填)",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(34),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
border: InputBorder.none,
),
onChanged: (value) {},
onEditingComplete: () {
print('fff');
_nameNode.unfocus();
},
// keyboardType: TextInputType.number,
),
),
HEmptyView(40),
Row(
children: _notebookDetailChangeModel.sexList.map((value) {
return _callButton(
onPress: () {
for (var item in _notebookDetailChangeModel.sexList) {
item['select'] = false;
if (item['title'] == value['title']) {
item['select'] = true;
}
}
_notebookDetailChangeModel.notifyListeners();
},
content: value['title'],
hasLeftBorder: value['hasLeftBorder'],
isSelect: value['select']);
}).toList()),
],
),
VEmptyView(40),
MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2),
color: MyColours.color_F1F0F4),
VEmptyView(72),
TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
controller: _notebookDetailChangeModel.customController,
focusNode: _needNode,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: "客户要求(25字以内,选填)",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(34),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
border: InputBorder.none,
),
onChanged: (value) {},
onEditingComplete: () {
print('fff');
_needNode.unfocus();
},
// keyboardType: TextInputType.number,
),
VEmptyView(40),
MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2),
color: MyColours.color_F1F0F4),
// VEmptyView(72),
// VEmptyView(62),
],
),
);
}
///底部弹框,设置时间30分钟间隔布局
_showDateChooseWidget(BuildContext context) async {
List tempMndList = [];
String title = '早市';
String key;
for (var item in _notebookDetailChangeModel.sunDateList) {
if (item['isSelect'] == true) {
title = item['dateText'];
key = item['key'];
tempMndList = _notebookDetailChangeModel.dailyMap[key];
}
}
//计算行数
int line = 0;
int count = tempMndList.length;
if (count % 3 == 0) {
line = int.parse('${count / 3}');
} else {
line = (count / 3).ceil();
}
int height = 85 + 40 + 36 * line + (line - 1) * 15;
final option = await showModalBottomSheet(
context: context,
backgroundColor: Colors.white,
builder: (context) {
return StatefulBuilder(builder: (context, state) {
return SafeArea(
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(10))),
height: ScreenUtil().setWidth(height * 2),
child: Column(
children: [
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Align(
alignment: Alignment.centerRight,
child: Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(10)),
child: Image.asset(
'assets/icon_exist.png',
width: ScreenUtil().setWidth(32),
),
),
),
),
Center(
child: Text(title,
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
fontWeight: FontWeight.bold,
color: MyColours.color_353535)),
),
VEmptyView(40),
Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(60)),
child: GridView.builder(
padding:
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount: tempMndList.length,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
childAspectRatio: 80 / 36,
mainAxisSpacing:
ScreenUtil().setWidth(15 * 2),
crossAxisSpacing:
ScreenUtil().setWidth(38 * 2)),
itemBuilder: (BuildContext context, int index) {
// locationState = state;
return CustomButton(
onTap: () {
// state(() {
for (var item in tempMndList) {
item['select'] = false;
if (item['title'] ==
tempMndList[index]['title']) {
item['select'] = true;
widget.detailEntity.is_set_ddate = '1';
_notebookDetailChangeModel.ddateStr =
item['title'];
}
}
// });
_notebookDetailChangeModel.notifyListeners();
Navigator.pop(context);
},
width: 80,
height: 36,
dateText: tempMndList[index]['title'].toString(),
dayText: '',
isSelect: tempMndList[index]['select'],
);
}))
],
),
));
});
});
}
Widget _callButton(
{GestureTapCallback onPress,
content,
hasLeftBorder = true,
isSelect = false}) {
return InkWell(
onTap: onPress,
child: Container(
width: ScreenUtil().setWidth(84),
height: ScreenUtil().setHeight(48),
decoration: BoxDecoration(
color: isSelect ? MyColours.color_199095 : MyColours.color_fefefe,
border: Border(
bottom: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2)),
top: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(1)),
left: hasLeftBorder
? BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2))
: BorderSide.none,
right: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2)))),
child: Align(
alignment: Alignment.center,
child: Text(
content,
style: TextStyle(
color: isSelect ? Colors.white : MyColours.color_353535,
fontSize: ScreenUtil().setSp(28)),
),
),
),
);
}
@override
Widget build(BuildContext context) {
_notebookDetailChangeModel =
Provider.of<NotebookDetailChangeModel>(context, listen: true);
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
},
child: Scaffold(
backgroundColor: Colors.white,
body: Column(children: <Widget>[
SizedBox(height: ScreenUtil.statusBarHeight),
MyAppBar(
"变更预订",
showBack: true,
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [_topWidget(), _middleWidget(), _bottomWidget()],
))),
Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(60),
),
child: CommonButton(
width: double.infinity,
height: 84,
fontSize: 34,
content: "确定修改",
state: 2,
onPress: () {
_notebookDetailChangeModel.setReserveInfo(context);
// messageDialogModel.removeMessage(message.id);
// NavigatorUtil.goHandleOnlinePage(
// context, message.rid.toString(), message.id,
// replace: messageDialogModel.messages.isEmpty);
},
))
]),
));
}
}
class CustomButton extends StatefulWidget {
final String dateText;
final String dayText;
final bool isSelect;
final double fontSize;
final bool isImage;
final double width;
final GestureTapCallback onTap;
final bool isTextFiled;
final NotebookDetailChangeModel model;
final double height;
const CustomButton({
Key key,
this.dateText,
this.dayText,
this.isSelect,
this.fontSize = 34,
this.isImage = false,
this.width = 105,
this.onTap,
this.isTextFiled = false,
this.model,
this.height = 25,
}) : super(key: key);
@override
_ButtonState createState() => _ButtonState();
}
class _ButtonState extends State<CustomButton> {
FocusNode _cancelNode = FocusNode();
@override
Widget build(BuildContext context) {
return InkWell(
onTap: widget.onTap,
child: Container(
width: ScreenUtil().setWidth(widget.width * 2),
height: ScreenUtil().setWidth(widget.height * 2),
decoration: BoxDecoration(
color: widget.isSelect ? MyColours.color_199095 : Colors.white,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
border: Border.all(
color: MyColours.color_199095,
width: ScreenUtil().setWidth(2))),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
widget.isTextFiled
? Container(
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(50),
child: TextField(
controller: widget.model.numController,
maxLines: 1,
inputFormatters: [LengthLimitingTextInputFormatter(3)],
//光标颜色
cursorColor: widget.isSelect
? Colors.white
: MyColours.color_199095,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: widget.isSelect
? Colors.white
: MyColours.color_199095),
// controller: _cancelController,
focusNode: _cancelNode,
textAlignVertical: TextAlignVertical.bottom,
decoration: InputDecoration(
// fillColor: Colors.lightGreenAccent,
// filled: true,
border: OutlineInputBorder(borderSide: BorderSide.none),
hintText: "更多",
hintStyle: TextStyle(
color: widget.isSelect
? Colors.white
: MyColours.color_199095,
fontSize: ScreenUtil().setSp(30),
),
// contentPadding: EdgeInsets.only(
// bottom: ScreenUtil().setWidth(30)), //ios 17
// border: InputBorder.none,
),
onChanged: (value) {
bool isThird = true;
for (int i = 0;
i < widget.model.personNumList.length;
i++) {
widget.model.personNumList[i]['isSelect'] = false;
if (widget.model.personNumList[i]['dateText'] ==
value) {
widget.model.personNumList[i]['isSelect'] = true;
isThird = false;
}
}
if (isThird) {
widget.model.personNumList[5]['isSelect'] = true;
widget.model.personNumList[5]['dateText'] = value;
} else {
widget.model.personNumList[5]['dateText'] = '更多';
}
widget.model.notifyListeners();
},
onEditingComplete: () {
print('fff');
_cancelNode.unfocus();
},
keyboardType: TextInputType.number,
),
)
: Text(widget.dateText,
style: TextStyle(
fontWeight: FontWeight.bold,
color: widget.isSelect
? MyColours.color_fefefe
: MyColours.color_199095,
fontSize: ScreenUtil().setSp(widget.fontSize))),
widget.isImage ? HEmptyView(20) : Container(),
widget.isImage
? Image.asset(
widget.isSelect
? 'assets/message_selected.png'
: 'assets/message_default.png',
width: ScreenUtil().setWidth(36))
: Text(widget.dayText,
style: TextStyle(
fontWeight: FontWeight.bold,
color: widget.isSelect
? MyColours.color_fefefe
: MyColours.color_199095,
fontSize: ScreenUtil().setSp(30)))
],
),
),
);
}
}
... ...
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_picker/flutter_picker.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
... ... @@ -13,7 +15,11 @@ import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/app_bar.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/dialog.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/loading.dart';
import 'package:one_key/widgets/need_item.dart';
import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/row_multi_text.dart';
import 'package:one_key/widgets/table_item.dart';
import 'package:one_key/models/table.dart' as t;
... ... @@ -21,7 +27,6 @@ import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
class NotebookDetailPage extends StatefulWidget {
final String rid;
NotebookDetailPage(this.rid);
... ... @@ -34,227 +39,601 @@ class NotebookDetailPage extends StatefulWidget {
}
class NotebookDetailPageState extends State<NotebookDetailPage> {
NotebookDetailModel detailModel= NotebookDetailModel();
NotebookDetailModel detailModel = NotebookDetailModel();
NotebookDetail detailEntity;
String cusmanText="";
List<Manager> managers=[];//客户经理
String cusmanText = "";
List<Manager> managers = []; //客户经理
Manager manager=Manager();
Manager manager = Manager();
List cancelReasonList = [];
bool isShowTF = false;
int paddingBottom = 174;
int paddingTop = 138;
FocusNode _cancelNode = FocusNode();
TextEditingController _cancelController = TextEditingController();
StateSetter _cancelState;
@override
void initState() {
// TODO: implement initState
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) async {
detailEntity=await detailModel.getReserveDetail(context, {
"rid":widget.rid,
_getReserveDetail();
managers = await detailModel.getManagers(context);
_initCancel();
//添加listener监听
//对应的TextField失去或者获取焦点都会回调此监听
_cancelNode.addListener(() {
if (_cancelNode.hasFocus) {
print('得到焦点');
paddingTop = 125;
} else {
print('失去焦点');
paddingTop = 138;
}
_cancelState(() {});
});
setState(() {
cusmanText=detailEntity.cusman.isEmpty?"请选择":detailEntity.cusman;
});
managers=await detailModel.getManagers(context);
});
}
_getReserveDetail() async {
detailEntity = await detailModel.getReserveDetail(context, {
"rid": widget.rid,
});
setState(() {
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
});
}
/// 初始化取消原因数据
_initCancel() {
isShowTF = false;
paddingBottom = 174;
cancelReasonList = [
{'title': '顾客取消', 'select': false},
{'title': '顾客行程有变', 'select': false},
{'title': '信息填写有误', 'select': false},
{'title': '操作失误', 'select': false},
{'title': '其他原因', 'select': false},
];
}
//设置当前客户经理
_setCurrManager(){
manager=managers.firstWhere((manager)=>manager.userName==cusmanText,orElse: ()=>Manager());
if(manager.id==null||manager.id.toString().isEmpty)return;
Map<String,String> params={
"rid":detailEntity.id,
"cusman_id":manager.id.toString(),
"cusman":manager.userName
_setCurrManager() {
manager = managers.firstWhere((manager) => manager.userName == cusmanText,
orElse: () => Manager());
if (manager.id == null || manager.id.toString().isEmpty) return;
Map<String, String> params = {
"rid": detailEntity.id,
"cusman_id": manager.id.toString(),
"cusman": manager.userName
};
detailModel.setReserveCusmnan(context, params);
}
///处理在线预订
setReserveStatus(String status, {String tid = "", String desc}) async {
// bus.emit("remove_untreated_message",widget.mid);
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> causeMap = {
"uid": userModel.user.openid,
"uname": userModel.user.account,
"desc": desc,
};
Map<String, String> params = {
"rid": widget.rid,
"status": status, //5安排包间 6 拒绝订单
"tid": tid,
// "mid": widget.mid,
"cause": json.encode(causeMap)
};
bool success =
await detailModel.setReserveStatus(context, params, ifPush: false);
if (success) {
_getReserveDetail();
}
}
/// 取消预订, 变更预订按钮
Widget _cancelAndChangeBtn(GestureTapCallback onTap, String title) {
return InkWell(
onTap: onTap,
child: Align(
alignment: Alignment.center,
child: Text(title,
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(34))),
),
);
}
///取消预订弹框
_showCancelWidget(context) {
showGeneralDialog(
context: context,
barrierDismissible: false,
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel,
transitionDuration: const Duration(milliseconds: 150),
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
return StatefulBuilder(builder: (context, state) {
_cancelState = state;
return GestureDetector(
behavior: HitTestBehavior.opaque,
// onTap: () {
// Navigator.of(context).pop();
// },
child: Container(
decoration: BoxDecoration(
color: Color.fromRGBO(00, 00, 00, 0.5),
),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(50),
ScreenUtil().setWidth(paddingTop * 2),
ScreenUtil().setWidth(50),
ScreenUtil().setWidth(paddingBottom * 2)),
child: Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(10)),
),
child: Column(
children: [
Stack(
children: [
Center(
child: Text(
'请选择取消原因',
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: MyColours.color_353535),
),
),
Positioned(
top: ScreenUtil().setWidth(8),
right: ScreenUtil().setWidth(0),
child: GestureDetector(
onTap: () {
_initCancel();
Navigator.of(context).pop();
},
child: Image.asset(
'assets/message_selected.png',
width: ScreenUtil().setWidth(32)),
))
],
),
VEmptyView(60),
Column(
children: cancelReasonList.map((value) {
return GestureDetector(
onTap: () {
for (var item in cancelReasonList) {
item['select'] = false;
isShowTF = false;
paddingBottom = 174;
if (item['title'] == value['title']) {
item['select'] = true;
if (item['title'] == '其他原因') {
isShowTF = true;
paddingBottom = 130;
}
}
}
state(() {});
},
child: Column(children: [
Row(
children: [
Image.asset(
value['select']
? 'assets/message_selected.png'
: 'assets/message_default.png',
width: ScreenUtil().setWidth(44)),
HEmptyView(30),
Text(value['title'],
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.normal,
decoration: TextDecoration.none,
color: MyColours.color_333333))
],
),
value['title'] == '其他原因' && isShowTF
? Material(
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(76)),
child: TextField(
maxLines: 1,
controller: _cancelController,
focusNode: _cancelNode,
textAlignVertical:
TextAlignVertical.bottom,
decoration: InputDecoration(
hintText: "请填写原因",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color:
MyColours.color_d8d8d8),
),
// border: InputBorder.none,
),
onChanged: (_) {
setState(() {});
},
onEditingComplete: () {
print('fff');
_cancelNode.unfocus();
},
// keyboardType: TextInputType.number,
),
))
: Container(),
VEmptyView(40)
]),
);
}).toList(),
),
VEmptyView(15),
Material(
child: RoundButton(
onPressed: () {
String desc = '';
for (var value in cancelReasonList) {
if (value['select'] == true) {
desc = value['title'];
if (value['title'] == '其他原因') {
desc = _cancelController.text.trim();
if (desc.isEmpty) {
Utils.showToast("请填写原因");
return;
}
}
}
}
if (desc == '') {
Utils.showToast('请选择原因');
return;
}
Navigator.of(context).pop();
setReserveStatus('4', desc: desc);
},
text: '确认',
height: ScreenUtil().setWidth(80),
width: ScreenUtil().setWidth(300),
radius: ScreenUtil().setWidth(10),
),
)
],
),
)),
);
});
});
}
@override
Widget build(BuildContext context) {
// TODO: implement build
return SafeArea(
child: detailEntity==null?Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
):Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
MyAppBar(
"订座详情",
showBack: true,
),
Expanded(
child: DefaultTextStyle(style: TextStyle(decoration: TextDecoration.none),child: Container(
color: MyColours.color_ffffff,
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText("用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
Column(
return detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
SizedBox(height: ScreenUtil.statusBarHeight),
MyAppBar(
"订座详情",
showBack: true,
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText("用餐时间", detailEntity.ddateHm),
RowMultiText("用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
Column(
children: <Widget>[
RowMultiText(
"用餐时间", detailEntity.ddateHm),
Offstage(
offstage: detailEntity.type == "0"
? false
: true,
child: RowMultiText(
"用餐人数", detailEntity.pnum),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(30),
)
],
),
Offstage(
offstage: detailEntity.type=="0"?false:true,
child: RowMultiText("用餐人数", detailEntity.pnum),
)
],
),
Image.asset(detailEntity.statuImgAssets,width: ScreenUtil().setWidth(100),height: ScreenUtil().setWidth(30),)
],
),
Offstage(
offstage: detailEntity.demands.length<=0?true:false,
child: Column(
children: <Widget>[
RowMultiText("包间需求", (detailEntity.demands.length.toString()+"个")??""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity.demands.length>0?false:true,
child: Container(
height: ScreenUtil().setHeight(210),
child: ListView.builder(itemBuilder: (BuildContext contxt,int index){
return NeedItem(detailEntity.demands[index]);
},itemCount: detailEntity.demands.length,shrinkWrap: true,scrollDirection: Axis.horizontal,),
offstage: detailEntity.demands.length <= 0
? true
: false,
child: Column(
children: <Widget>[
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage:
detailEntity.demands.length >
0
? false
: true,
child: Container(
height:
ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
))
],
),
)
)
],
),
),
RowMultiText("预订桌位", (detailEntity.tables.length.toString()+"个")),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity.tables.length>0?false:true,
child: Container(
height: ScreenUtil().setHeight(210),
child: ListView.builder(itemBuilder: (BuildContext contxt,int index){
return TableItem(detailEntity.tables[index]);
},itemCount: detailEntity.tables.length,shrinkWrap: true,scrollDirection: Axis.horizontal,),
),
)
),
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText("客户电话", detailEntity.phone??""),
RowMultiText("备注信息",detailEntity.cusdem??""),
MyDivider(double.infinity, ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours.color_828282,
fontSize: ScreenUtil().setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list=[];
for(Manager manager in managers){
list.add(manager.roleUserName);
}
DialogUtil.showSelectCusmanDialog(context,list).then((value){
if(value!=null){
setState(() {
cusmanText=managers[value.first].userName;
});
_setCurrManager();
}
});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30),
decoration: TextDecoration.underline,
),
RowMultiText(
"预订桌位",
(detailEntity.tables.length.toString() +
"个")),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity.tables.length > 0
? false
: true,
child: Container(
height: ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder: (BuildContext contxt,
int index) {
return TableItem(
detailEntity.tables[index]);
},
itemCount:
detailEntity.tables.length,
shrinkWrap: true,
scrollDirection: Axis.horizontal,
),
),
)),
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone ?? ""),
RowMultiText(
"备注信息", detailEntity.cusdem ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours.color_828282,
fontSize:
ScreenUtil().setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(manager.roleUserName);
}
DialogUtil.showSelectCusmanDialog(
context, list)
.then((value) {
if (value != null) {
setState(() {
cusmanText =
managers[value.first]
.userName;
});
_setCurrManager();
}
});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours.color_353535,
fontSize:
ScreenUtil().setSp(30),
decoration:
TextDecoration.underline,
),
),
),
)
],
),
),
)
],
),
),
RowMultiText("记录人", detailEntity.note_name??""),
Offstage(
offstage: (detailEntity.status=="4"&&detailEntity.cancel!=null)?false:true,
child: Column(
children: <Widget>[
MyDivider(double.infinity, ScreenUtil().setHeight(2)),
RowMultiText("取消原因", detailEntity.cancel?.desc??""),
RowMultiText("取消时间", detailEntity.cancel?.cdateStr??""),
RowMultiText("操作人", detailEntity.cancel?.uname??""),
],
),
),
],
RowMultiText(
"记录人", detailEntity.note_name ?? ""),
Offstage(
offstage: (detailEntity.status == "4" &&
detailEntity.cancel != null)
? false
: true,
child: Column(
children: <Widget>[
MyDivider(double.infinity,
ScreenUtil().setHeight(2)),
RowMultiText("取消原因",
detailEntity.cancel?.desc ?? "",
textAlign: TextAlign.left),
RowMultiText(
"取消时间",
detailEntity.cancel?.cdateStr ??
""),
RowMultiText("操作人",
detailEntity.cancel?.uname ?? ""),
],
),
),
],
)),
),
)),
),
)),
),
Offstage(
offstage: (detailEntity.status=="3"||detailEntity.status=="4"||detailEntity.status=="6")?true:false,
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: MyColours.color_ffffff,
border: Border(top:BorderSide(color: MyColours.color_dbe3e3,width: ScreenUtil().setWidth(1)))
),
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(20),horizontal: ScreenUtil().setHeight(36)),
child:CommonButton(
content: "通知顾客",
width: 669,
height: 80,
fontSize: 34,
onPress: () {
DialogUtil.showShareDialog(context)?.then((value){
switch(value){
case 1://微信
NavigatorUtil.goInvicationPage(context,detailEntity.id,detailEntity.tableinfoStr,detailEntity.ddate,detailEntity.ddateStr);
break;
case 2://短信
NavigatorUtil.goSmsPage(context, detailEntity.id);
break;
case 3://电话
if(detailEntity.phone!=null&&detailEntity.phone.isNotEmpty){
Utils.goPhone(detailEntity.phone);
}else{
Utils.showToast("没有客户电话!");
Offstage(
offstage: (detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: MyColours.color_ffffff,
border: Border(
top: BorderSide(
color: MyColours.color_dbe3e3,
width: ScreenUtil().setWidth(1)))),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20)),
child: CommonButton(
content: "通知客户",
width: 669,
height: 80,
fontSize: 34,
onPress: () {
DialogUtil.showShareDialog(context)?.then((value) {
switch (value) {
case 1: //微信
NavigatorUtil.goInvicationPage(
context,
detailEntity.id,
detailEntity.tableinfoStr,
detailEntity.ddate,
detailEntity.ddateStr);
break;
case 2: //短信
NavigatorUtil.goSmsPage(context, detailEntity.id);
break;
case 3: //电话
if (detailEntity.phone != null &&
detailEntity.phone.isNotEmpty) {
Utils.goPhone(detailEntity.phone);
} else {
Utils.showToast("没有客户电话!");
}
break;
}
break;
}
});
},
});
},
),
),
),
),
)
],
),
),
);
Offstage(
offstage: (detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(80),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(5)),
),
// child: Text('fff'),
child: Material(
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
_showCancelWidget(context);
}, '取消预订')),
],
)),
),
),
VEmptyView(ScreenUtil().setWidth(60))
],
),
);
}
}
... ...
import 'dart:async';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
... ... @@ -63,7 +64,8 @@ class HomePageState extends State<HomePage>{
));
WidgetsBinding.instance.addPostFrameCallback((_){
if(widget.initialIndex==0)return;
ContactModel.getInstance().uploadLocalContact(context);
ContactModel.getInstance().uploadLocalContact(context);
getUntreatedMessage();
timer=Timer.periodic(Duration(minutes: 3), (_){
getUntreatedMessage();
});
... ... @@ -161,8 +163,8 @@ class HomePageState extends State<HomePage>{
UserModel userModel=Provider.of<UserModel>(context,listen: false);
Map<String,String> params={
"sid":userModel.user.sellerid,
"type_id":"10",
"status":"0",
"type_id":"10",//10 在线预订
"status":"0",//未处理
"offset":"0",
"limit":"100",
};
... ... @@ -261,4 +263,4 @@ class HomePageState extends State<HomePage>{
}
XgFlutterPlugin().stopXg();
}
}
\ No newline at end of file
}
... ...
... ... @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/models/message.dart';
import 'package:one_key/provider/message_dialog_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/widgets/common_button.dart';
... ... @@ -114,9 +115,15 @@ class MessageDialogItem extends StatelessWidget {
onPress: () {
messageDialogModel.removeMessage(message.id);
if(message.message_type=="10"){
NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id,replace: messageDialogModel.messages.isEmpty);
NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id,replace: messageDialogModel.messages.isEmpty?true:false);
}else{
NavigatorUtil.goNotebookDetailPage(context,message.rid);
NavigatorUtil.goNotebookDetailPage(context,message.rid.toString(),replace: messageDialogModel.messages.isEmpty?true:false);
Map<String, String> params = {
"sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
"id": message.id,
"status": "is_handle"
};
messageDialogModel.setMessageStatus(context,params);
}
},
),
... ...
... ... @@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/models/message.dart';
import 'package:one_key/provider/message_dialog_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/event_bus.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/h_empty_view.dart';
... ... @@ -30,6 +32,7 @@ class MessageItem extends StatelessWidget {
child: Stack(
children: <Widget>[
Container(
height: ScreenUtil().setWidth(280),
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(39),vertical: ScreenUtil().setWidth(12)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(12),
... ... @@ -63,26 +66,39 @@ class MessageItem extends StatelessWidget {
],
),
VEmptyView(20),
message.message_type=="11"?
Text(
"包间需求:${message.room_demand}",
"${message.ddateStr}的${message.rnameStr}取消了预订",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(10),
Text(
"就餐时间:${message.ddateStr}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(10),
Text(
"预订人:${message.rnameStr}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
):
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"包间需求:${message.room_demand}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(10),
Text(
"就餐时间:${message.ddateStr}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(10),
Text(
"预订人:${message.rnameStr}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
],
)
],
),
),
... ... @@ -95,11 +111,22 @@ class MessageItem extends StatelessWidget {
width: 160,
height: 48,
fontSize: 28,
content: "立即处理",
content:message.message_type=="10"?"立即处理":"立即查看",
state: 1,
onPress: () {
messageDialogModel.removeMessage(message.id);
NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id);
if(message.message_type=="10"){
NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id);
}else{
NavigatorUtil.goNotebookDetailPage(context,message.rid.toString());
bus.emit("remove_untreated_message", message.id);
Map<String, String> params = {
"sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
"id": message.id,
"status": "is_handle"
};
messageDialogModel.setMessageStatus(context,params);
}
},
),
),
... ...
... ... @@ -278,10 +278,11 @@ class NoteBookPageState extends State<NoteBookPage> {
child: Center(
child: GestureDetector(
onTap: () {
DialogUtil.showCalendarDialog(context,dateTime).then((day) {
if(day!=null){
_createDateText(day);
}
DialogUtil.showCalendarDialog(context, dateTime)
.then((day) {
if (day != null) {
_createDateText(day);
}
});
},
child: Text(
... ... @@ -322,6 +323,7 @@ class NoteBookPageState extends State<NoteBookPage> {
width: ScreenUtil().setWidth(180),
height: ScreenUtil().setHeight(100),
fontSize: 32,
onPress: () {},
)),
),
),
... ... @@ -344,6 +346,7 @@ class NoteBookPageState extends State<NoteBookPage> {
width: ScreenUtil().setWidth(180),
height: ScreenUtil().setHeight(100),
fontSize: 32,
onPress: () {},
)),
)),
Offstage(
... ... @@ -365,6 +368,7 @@ class NoteBookPageState extends State<NoteBookPage> {
width: ScreenUtil().setWidth(180),
height: ScreenUtil().setHeight(100),
fontSize: 32,
onPress: () {},
)),
)),
],
... ... @@ -392,34 +396,35 @@ class NoteBookPageState extends State<NoteBookPage> {
},
),
_buildListTitle(),
Expanded(
child: Consumer<NoteBookModel>(
builder: (context,model,_){
if(model.connect_timeout){
return Center(
child: ErrorPage(callback: (){
_getReserveList();
},),
);
}else{
return EasyRefresh.custom(
controller: _controller,
slivers: [
SliverFixedExtentList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return NoteBookItem(model.notebooks[index], index);
}, childCount: model.notebooks.length),
itemExtent: ScreenUtil().setHeight(112),
)
],
onRefresh: () async {
_getReserveList();
},
);
}
},
))
Expanded(child: Consumer<NoteBookModel>(
builder: (context, model, _) {
if (model.connect_timeout) {
return Center(
child: ErrorPage(
callback: () {
_getReserveList();
},
),
);
} else {
return EasyRefresh.custom(
controller: _controller,
slivers: [
SliverFixedExtentList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return NoteBookItem(model.notebooks[index], index);
}, childCount: model.notebooks.length),
itemExtent: ScreenUtil().setHeight(112),
)
],
onRefresh: () async {
_getReserveList();
},
);
}
},
))
],
),
);
... ...
... ... @@ -222,4 +222,4 @@ class SelectTablePageState extends State<SelectTablePage>{
),
);
}
}
\ No newline at end of file
}
... ...
... ... @@ -32,7 +32,7 @@ class ContactModel{
}
uploadLocalContact(BuildContext context) async {
bool isUpload=App.sp.getBool("isUpload");
bool isUpload=App.sp.getBool("isUpload")??false;
if(isUpload)return;
bool authority=await requestContactPermission();
if(authority){
... ...
... ... @@ -8,6 +8,7 @@ import 'package:one_key/net/http_url.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:audioplayers/audio_cache.dart';
import 'package:one_key/utils/log_util.dart';
import 'package:one_key/utils/utils.dart';
class MessageDialogModel extends ChangeNotifier{
... ... @@ -31,7 +32,7 @@ class MessageDialogModel extends ChangeNotifier{
_player.play("tts_cancel.mp3");
break;
case "-1"://>3
_player.play("all.mp3");
_player.play("tts_all.mp3");
break;
}
}
... ... @@ -57,7 +58,7 @@ class MessageDialogModel extends ChangeNotifier{
//获取未处理在线预订消息
getUntreatedMsg(BuildContext context,Map<String,String> params) async {
BaseResp<List> baseResp = await DioUtil()
.request<List>(context, Method.get, HttpUrl.get_message_list,
.request<List>(context, Method.get, HttpUrl.get_message_list,showLoading: false,
data: params)
.catchError((error) {
print(error.toString());
... ... @@ -66,14 +67,24 @@ class MessageDialogModel extends ChangeNotifier{
messages=baseResp.data.map<Message>((value){
return Message.fromJson(value);
}).toList();
messages.removeWhere((message)=>message.message_type.toString()!="10");
messages.removeWhere((message){
if(message.message_type.toString()=="10"){
if(message.status=="4"){
return true;
}
return false;
}else if(message.message_type.toString()=="11"){
return false;
}
return true;
});
if(messages.isNotEmpty){
if(!showMessageDialog){
DialogUtil.showMessageDialog(context);
}else{
notifyListeners();
}
if(messages.length>3){
if(messages.length>1){
play("-1");
}else{
for(Message message in messages){
... ... @@ -83,4 +94,18 @@ class MessageDialogModel extends ChangeNotifier{
}
}
}
//设置消息状态
setMessageStatus(BuildContext context, Map<String, String> params) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.set_message_status,
data: params, showLoading: false)
.catchError((error) {
print(error.toString());
});
if (baseResp.code == Constant.status_success) {
} else {
Utils.showToast(baseResp.msg);
}
}
}
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@ import 'package:one_key/net/base_resp.dart';
import 'package:one_key/net/dio_util.dart';
import 'package:one_key/net/http_url.dart';
import 'package:one_key/utils/log_util.dart';
import 'package:one_key/utils/utils.dart';
class MessageModel extends ChangeNotifier{
... ... @@ -30,7 +31,17 @@ class MessageModel extends ChangeNotifier{
untreatedMsgs=baseResp.data.map<Message>((value){
return Message.fromJson(value);
}).toList();
untreatedMsgs.removeWhere((message)=>message.message_type.toString()!="10");
untreatedMsgs.removeWhere((message){
if(message.message_type.toString()=="10"){
if(message.status=="4"){
return true;
}
return false;
}else if(message.message_type.toString()=="11"){
return false;
}
return true;
});
notifyListeners();
}
}
... ... @@ -57,7 +68,12 @@ class MessageModel extends ChangeNotifier{
return Message.fromJson(value);
}).toList());
}
treatedMsgs.removeWhere((message)=>message.message_type.toString()!="10");
treatedMsgs.removeWhere((message){
if(message.message_type.toString()=="10"||message.message_type.toString()=="11"){
return false;
}
return true;
});
notifyListeners();
}
}
... ...
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:one_key/constant/constant.dart';
import 'package:one_key/models/notebook_detail.dart';
import 'package:one_key/models/seller_info.dart';
import 'package:one_key/models/table_list.dart';
import 'package:one_key/net/base_resp.dart';
import 'package:one_key/net/dio_util.dart';
import 'package:one_key/net/http_url.dart';
import 'package:one_key/provider/notebook_detail_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/utils/utils.dart';
import 'package:provider/provider.dart';
class NotebookDetailChangeModel with ChangeNotifier {
List dateList = []; //日期选择 月-日 某天
List sunDateList = []; // 早市、午市、晚市
List personNumList = []; // 人数
TextEditingController numController = TextEditingController(); //人数
TextEditingController phoneController = TextEditingController(); //电话
TextEditingController nameController = TextEditingController(); //客户姓名
TextEditingController customController = TextEditingController(); //客户要求
List sexList = []; // 先生、女士、公司
Map dailyMap = {}; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟
String ddateStr = ''; //16:30
NotebookDetail detailEntity;
List<TableList> tableList = [];
//构造函数,初始化
NotebookDetailChangeModel(this.detailEntity) {
print(detailEntity);
if (detailEntity.phone != '0') {
phoneController.text = detailEntity.phone;
}
if (detailEntity.rnameStr != '') {
nameController.text = detailEntity.rnameStr;
}
if (detailEntity.cusdem != '') {
customController.text = detailEntity.cusdem;
}
_initDateList();
_initPersonNumList();
_initSexList();
}
///初始化 日期选择 月-日 某天
_initDateList() {
String createtime = detailEntity.ddate.toString() + '000';
DateTime createTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(createtime));
ddateStr = DateUtil.formatDate(createTime, format: DateFormats.h_m);
String dateTimeSelect = DateUtil.formatDateMs(
createTime.millisecondsSinceEpoch,
format: 'MM-dd');
//今天
DateTime dateTime = DateTime.now();
int dateTimeMill = dateTime.millisecondsSinceEpoch;
String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'MM-dd');
dateList.add({
'title': dateText,
'select': dateTimeSelect == dateText ? true : false,
'fontSize': 34.0,
'dayText': ' 今天',
'isImage': false
});
//明天
int tomorrowMill = dateTimeMill + 24 * 60 * 60 * 1000;
String dateTextTomorrow =
DateUtil.formatDateMs(tomorrowMill, format: 'MM-dd');
dateList.add({
'title': dateTextTomorrow,
'select': dateTimeSelect == dateTextTomorrow ? true : false,
'fontSize': 34.0,
'dayText': ' 明天',
'isImage': false
});
//第三个
dateList.add({
'title': dateTimeSelect != dateText && dateTimeSelect != dateTextTomorrow
? dateTimeSelect
: '其他',
'select': dateTimeSelect != dateText && dateTimeSelect != dateTextTomorrow
? true
: false,
'fontSize': 30.0,
'dayText': '',
'isImage': true
});
}
/// 初始化 早市、午市、晚市
_initSunDateList(morning, noon, night) {
String ddateSolt = detailEntity.ddate_solt;
if (morning != '') {
sunDateList.add({
'dateText': '早市',
'dayText': '',
'ddateSolt': 1,
'key': 'morning',
'isSelect': ddateSolt == '1' ? true : false
});
}
if (noon != '') {
sunDateList.add({
'dateText': '午市',
'dayText': '',
'ddateSolt': 2,
'key': 'noon',
'isSelect': ddateSolt == '2' ? true : false
});
}
if (noon != '') {
sunDateList.add({
'dateText': '晚市',
'dayText': '',
'ddateSolt': 3,
'key': 'night',
'isSelect': ddateSolt == '3' ? true : false
});
}
notifyListeners();
}
//人数
_initPersonNumList() {
String pnum = detailEntity.pnum;
if (int.parse(pnum) < 6 || int.parse(pnum) > 10) {
numController.text = pnum;
}
personNumList = [
{
'dateText': '6',
'width': 30.0,
'fontSize': 34.0,
'isImage': false,
'isSelect': pnum == '6' ? true : false,
'isTextFiled': false
},
{
'dateText': '7',
'width': 30.0,
'fontSize': 34.0,
'isImage': false,
'isSelect': pnum == '7' ? true : false,
'isTextFiled': false
},
{
'dateText': '8',
'width': 30.0,
'fontSize': 34.0,
'isImage': false,
'isSelect': pnum == '8' ? true : false,
'isTextFiled': false
},
{
'dateText': '9',
'width': 30.0,
'fontSize': 34.0,
'isImage': false,
'isSelect': pnum == '9' ? true : false,
'isTextFiled': false
},
{
'dateText': '10',
'width': 30.0,
'fontSize': 34.0,
'isImage': false,
'isSelect': pnum == '10' ? true : false,
'isTextFiled': false
},
{
'dateText': numController.text.length > 0 ? numController.text : '更多',
'width': 105.0,
'fontSize': 30.0,
'isImage': true,
'isSelect': int.parse(pnum) < 6 || int.parse(pnum) > 10 ? true : false,
'isTextFiled': true
}
];
}
///称谓
_initSexList() {
String sexStr = detailEntity.sex;
sexList = [
{
'title': '先生',
'select': sexStr == '1' ? true : false,
'code': '1',
'hasLeftBorder': true
},
{
'title': '女士',
'select': sexStr == '2' ? true : false,
'code': '2',
'hasLeftBorder': false
},
{
'title': '公司',
'select': sexStr == '3' ? true : false,
'code': '3',
'hasLeftBorder': false
}
];
}
/// 早市、午市、晚市对应的半个小时间隔时间段
initDateHourMinuteList(BuildContext context) async {
SunSellerInfoModel model = await getManagersInfo(context);
model.daily.morning == ''
? dailyMap.putIfAbsent('morning', () => '')
: dailyMap.putIfAbsent(
'morning', () => _getHourAndMinute(model.daily.morning, 1, model));
model.daily.noon == ''
? dailyMap.putIfAbsent('noon', () => '')
: dailyMap.putIfAbsent(
'noon', () => _getHourAndMinute(model.daily.noon, 2, model));
model.daily.night == ''
? dailyMap.putIfAbsent('night', () => '')
: dailyMap.putIfAbsent(
'night', () => _getHourAndMinute(model.daily.night, 3, model));
_initSunDateList(model.daily.morning, model.daily.noon, model.daily.night);
}
//根据获取时间 11:00-12:30 获取30分钟间隔组装的数组
_getHourAndMinute(
String hourAndMinuteStr, int mnd, SunSellerInfoModel model) {
List tempDate = hourAndMinuteStr.split("-");
String beginDate = tempDate[0];
String endDate = tempDate[1];
List tempHour = beginDate.split(':');
String isSetDate = detailEntity.is_set_ddate;
String ddateSolt = detailEntity.ddate_solt;
/*获取开始小时*/
int beginHour = int.parse(tempHour[0]);
/*获取开始分钟*/
int beginMinute = int.parse(tempHour[1]);
List res = [];
bool tempLimit = true;
while (tempLimit) {
String temp = _dealTime(beginHour, beginMinute);
bool tempSelect = false;
if (int.parse(isSetDate) == 1) //设置预订时间
{
if (temp == ddateStr) {
tempSelect = true;
}
} else {
if (mnd == 1) {
if (temp == '08:00') {
tempSelect = true;
}
} else if (mnd == 2) {
if (temp == '12:00') {
tempSelect = true;
}
} else if (mnd == 3) {
if (temp == '16:30') {
tempSelect = true;
}
}
}
Map tempMap = {'title': temp, 'select': tempSelect};
res.add(tempMap);
if (temp == endDate) {
tempLimit = false;
break;
}
if (beginMinute == 30) {
beginHour++;
if (beginHour >= 24) {
beginHour = 0;
}
}
beginMinute = (beginMinute + 30) % 60;
}
return res;
}
/// 根据时间和分钟组装 格式:11:00
_dealTime(int begin, int mm) {
String sb = '';
if (begin < 10) {
sb = '0$begin';
} else {
sb = '$begin';
}
sb = '$sb:';
if (mm < 10) {
sb = '${sb}0${mm}';
} else {
sb = '${sb}${mm}';
}
return sb;
}
///获取某个商家下所有服务员信息 **** 取得某个商家的早市、午市、晚市营业时间
Future<SunSellerInfoModel> getManagersInfo(BuildContext context) async {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> params = {
"seller_id": userModel.user.sellerid,
"seller_openid": userModel.user.openid
};
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
data: params)
.catchError((error) {
print(error.toString());
});
SunSellerInfoModel itemModel;
if (baseResp == null) return itemModel;
if (baseResp.code == Constant.status_success) {
if (int.parse(baseResp.status) != Constant.status_success) {
Utils.showToast(baseResp.msg ?? "");
return itemModel;
}
if (baseResp.responseData['data'] != null) {
itemModel = SellerInfoModel.fromJson(baseResp.responseData).data;
} else {
Utils.showToast(baseResp.msg ?? "");
}
return itemModel;
}
}
///根据商家ID 获取桌位信息列表: 1:散座 2:包间 默认:获取所有数据
Future<List<TableListSunModel>> getNewTableList(BuildContext context) async {
// String createtime = detailEntity.ddate.toString() + '000';
// DateTime createTime =
// DateTime.fromMillisecondsSinceEpoch(int.parse(createtime));
// String rdate = DateUtil.formatDate(createTime, format: "yyyyMMdd");
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> params = {
"sid": userModel.user.sellerid,
"rid": detailEntity.id,
"rdate": _getRdate(),
'ddate_solt': detailEntity.ddate_solt
};
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.get_table_list,
data: params)
.catchError((error) {
print(error.toString());
});
List<TableListSunModel> itemModelList;
if (baseResp == null) return itemModelList;
if (baseResp.code == Constant.status_success) {
if (int.parse(baseResp.status) != Constant.status_success) {
Utils.showToast(baseResp.msg ?? "");
return itemModelList;
}
if (baseResp.responseData['data'] != null) {
itemModelList = TableListModel.fromJson(baseResp.responseData).data;
} else {
Utils.showToast(baseResp.msg ?? "");
}
for (TableListSunModel item in itemModelList) {
for (var item in item.list) {
for (var table in detailEntity.tables) {
if (item.id == table.id) {
item.selected = true;
tableList.add(item);
}
}
}
}
notifyListeners();
return itemModelList;
}
}
///录入顾客订座相关信息,同时更新商家桌位状态
Future<SunSellerInfoModel> setReserveInfo(BuildContext context) async {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
String pnum = '6';
for (var item in personNumList) {
if (item['isSelect']) {
pnum = item['dateText'];
}
}
String sex = '1';
for (var item in sexList) {
if (item['select']) {
sex = item['code'];
}
}
String tempDdate = _getRdate() + ' ' + ddateStr + ':00';
int ddate = DateUtil.getDateMsByTimeStr(tempDdate);
String tableSelectInfo = '';
for (TableList item in tableList) {
if (item.selected) {
tableSelectInfo += ',${item.id}';
}
}
print(tableSelectInfo);
if (tableSelectInfo.startsWith(',')) {
tableSelectInfo = tableSelectInfo.substring(1);
}
print(tableSelectInfo);
String rdate = '';
for (var item in sunDateList) {
if (item['isSelect'] == true) {
if (item['ddateSolt'] == 1) {
//早市
List morning = dailyMap['morning'];
String start = ddateStr;
String end = morning.last;
} else if (item['ddateSolt'] == 2) {
//午市
List noon = dailyMap['noon'];
} else if (item['ddateSolt'] == 3) {
//晚市
List night = dailyMap['night'];
}
}
}
Map<String, String> params = {
"rid": detailEntity.id, //变更订单必传预定ID
"sid": userModel.user.sellerid, //商家ID
"tid": tableSelectInfo, //桌子ID: 格式 2,3,4
"pnum": pnum, //预定用餐人数
"rname": nameController.text, //预订人姓名
"sex": sex, //预订人姓名:1:男 2:女
"phone": phoneController.text, //预订人电话
"cusdem": customController.text, //预订人需求:25汉字
"rdate": _getRdate(), //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
"ddate": '${ddate / 1000}', //到店时间
};
print(params);
// BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
// .request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
// data: params)
// .catchError((error) {
// print(error.toString());
// });
// SunSellerInfoModel itemModel;
// if (baseResp == null) return itemModel;
// if (baseResp.code == Constant.status_success) {
// if (int.parse(baseResp.status) != Constant.status_success) {
// Utils.showToast(baseResp.msg ?? "");
// return itemModel;
// }
// if (baseResp.responseData['data'] != null) {
// itemModel = SellerInfoModel.fromJson(baseResp.responseData).data;
// } else {
// Utils.showToast(baseResp.msg ?? "");
// }
// return itemModel;
// }
}
//rdate字段值获取
_getRdate() {
String createtime = detailEntity.ddate.toString() + '000';
DateTime createTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(createtime));
String rdate = DateUtil.formatDate(createTime, format: "yyyyMMdd");
return rdate;
}
}
... ...
... ... @@ -9,14 +9,15 @@ import 'package:one_key/provider/user_model.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:provider/provider.dart';
class NotebookDetailModel extends ChangeNotifier{
class NotebookDetailModel extends ChangeNotifier {
///获取已预订订单
Future<NotebookDetail> getReserveDetail(BuildContext context,Map<String,String> params) async {
BaseResp<Map<String,dynamic>> baseResp = await DioUtil()
.request<Map<String,dynamic>>(context, Method.get, HttpUrl.reserve_detail,
data: params)
Future<NotebookDetail> getReserveDetail(
BuildContext context, Map<String, String> params) async {
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(
context, Method.get, HttpUrl.reserve_detail,
data: params)
.catchError((error) {
print(error.toString());
});
... ... @@ -27,59 +28,71 @@ class NotebookDetailModel extends ChangeNotifier{
///获取商家信息
Future<List<Manager>> getManagers(BuildContext context) async {
UserModel userModel=Provider.of<UserModel>(context,listen: false);
Map<String,String> params={"seller_id": userModel.user.sellerid, "seller_openid": userModel.user.openid};
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> params = {
"seller_id": userModel.user.sellerid,
"seller_openid": userModel.user.openid
};
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
data: params)
data: params)
.catchError((error) {
print(error.toString());
});
if (baseResp.code == Constant.status_success) {
return (baseResp.data["manager"] as List).map((value)=>Manager.fromJson(value as Map<String,dynamic>)).toList();
return (baseResp.data["manager"] as List)
.map((value) => Manager.fromJson(value as Map<String, dynamic>))
.toList();
}
}
///设置客户经理
setReserveCusmnan(BuildContext context,Map<String,String> params) async {
setReserveCusmnan(BuildContext context, Map<String, String> params) async {
BaseResp<String> baseResp = await DioUtil()
.request<String>(context, Method.get, HttpUrl.set_reserve_cusman,
data: params)
data: params)
.catchError((error) {
print(error.toString());
});
if (baseResp.code == Constant.status_success) {
}else{
Utils.showToast(baseResp.msg??"");
} else {
Utils.showToast(baseResp.msg ?? "");
}
}
//安排在线预订
setReserveStatus(BuildContext context,Map<String,String> params) async {
BaseResp<Map<String,dynamic>> baseResp = await DioUtil()
.request<Map<String,dynamic>>(context, Method.get, HttpUrl.set_reserve_status,
data: params,showLoading: false)
setReserveStatus(BuildContext context, Map<String, String> params,
{ifPush = true}) async {
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(
context, Method.get, HttpUrl.set_reserve_status,
data: params, showLoading: false)
.catchError((error) {
print(error.toString());
});
if(baseResp.code==Constant.status_success){
NavigatorUtil.goNotebookDetailPage(context, params["rid"],replace: true);
}else{
if (baseResp.code == Constant.status_success) {
if (ifPush) {
NavigatorUtil.goNotebookDetailPage(context, params["rid"],
replace: true);
} else {
return true;
}
} else {
Utils.showToast(baseResp.msg);
}
}
//设置消息状态
setMessageStatus(BuildContext context,Map<String,String> params) async {
setMessageStatus(BuildContext context, Map<String, String> params) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.set_message_status,
data: params,showLoading: false)
data: params, showLoading: false)
.catchError((error) {
print(error.toString());
});
if(baseResp.code==Constant.status_success){
}else{
if (baseResp.code == Constant.status_success) {
} else {
Utils.showToast(baseResp.msg);
}
}
}
\ No newline at end of file
}
... ...
import 'package:flutter/material.dart';
class MyColours {
static const Color app_main = Color(0xFF24A4A8);
static const Color color_ffffff=Color(0xffffffff);
static const Color color_fefefe=Color(0xfffefefe);
static const Color color_f5f5f5=Color(0xfff5f5f5);
static const Color color_199095=Color(0xff199095);
static const Color color_999999=Color(0xff999999);
static const Color color_353535=Color(0xff353535);
static const Color color_d8d8d8=Color(0xffD8D8D8);
static const Color color_bff6f7=Color(0xffBFF6F7);
static const Color color_c1c1c1=Color(0xffC1C1C1);
static const Color color_2bb5b7=Color(0xff2BB5B7);
static const Color color_26000000=Color(0x26000000);
static const Color color_d93535=Color(0xffD93535);
static const Color color_E14553=Color(0xffE14553);
static const Color color_131313=Color(0xff131313);
static const Color color_2e000000=Color(0x2e000000);
static const Color color_14000000=Color(0x14000000);
static const Color color_bfbfbf=Color(0xffBFBFBF);
static const Color color_828282=Color(0xff828282);
static const Color color_a8e2e4=Color(0xffA8E2E4);
static const Color color_63a6d1=Color(0xff63A6D1);
static const Color color_666666=Color(0xff666666);
static const Color color_777777=Color(0xff777777);
static const Color color_ea5750=Color(0xffEA5750);
static const Color color_89c0b7=Color(0xff89C0B7);
static const Color color_ededed=Color(0xffededed);
static const Color color_f7fdfd=Color(0xffF7FDFD);
static const Color color_dbe3e3=Color(0xffdbe3e3);
static const Color color_f3f3f3=Color(0xfff3f3f3);
static const Color color_f49a5e=Color(0xffF49A5E);
static const Color color_ff0000=Color(0xffff0000);
static const Color color_000000=Color(0xff000000);
static const Color color_97e9ea=Color(0xff97E9EA);
static const Color color_f1f1f1=Color(0xfff1f1f1);
static const Color color_eadab9=Color(0xffeadab9);
static const Color color_e3d2ac=Color(0xffe3d2ac);
static const Color color_83734d=Color(0xff83734d);
static const Color color_dfdfdf=Color(0xffdfdfdf);
static const Color color_ffffff = Color(0xffffffff);
static const Color color_fefefe = Color(0xfffefefe);
static const Color color_f5f5f5 = Color(0xfff5f5f5);
static const Color color_199095 = Color(0xff199095);
static const Color color_999999 = Color(0xff999999);
static const Color color_353535 = Color(0xff353535);
static const Color color_d8d8d8 = Color(0xffD8D8D8);
static const Color color_bff6f7 = Color(0xffBFF6F7);
static const Color color_c1c1c1 = Color(0xffC1C1C1);
static const Color color_2bb5b7 = Color(0xff2BB5B7);
static const Color color_26000000 = Color(0x26000000);
static const Color color_d93535 = Color(0xffD93535);
static const Color color_E14553 = Color(0xffE14553);
static const Color color_131313 = Color(0xff131313);
static const Color color_2e000000 = Color(0x2e000000);
static const Color color_14000000 = Color(0x14000000);
static const Color color_bfbfbf = Color(0xffBFBFBF);
static const Color color_828282 = Color(0xff828282);
static const Color color_a8e2e4 = Color(0xffA8E2E4);
static const Color color_63a6d1 = Color(0xff63A6D1);
static const Color color_666666 = Color(0xff666666);
static const Color color_777777 = Color(0xff777777);
static const Color color_ea5750 = Color(0xffEA5750);
static const Color color_89c0b7 = Color(0xff89C0B7);
static const Color color_ededed = Color(0xffededed);
static const Color color_f7fdfd = Color(0xffF7FDFD);
static const Color color_dbe3e3 = Color(0xffdbe3e3);
static const Color color_f3f3f3 = Color(0xfff3f3f3);
static const Color color_f49a5e = Color(0xffF49A5E);
static const Color color_ff0000 = Color(0xffff0000);
static const Color color_000000 = Color(0xff000000);
static const Color color_97e9ea = Color(0xff97E9EA);
static const Color color_f1f1f1 = Color(0xfff1f1f1);
static const Color color_eadab9 = Color(0xffeadab9);
static const Color color_e3d2ac = Color(0xffe3d2ac);
static const Color color_83734d = Color(0xff83734d);
static const Color color_dfdfdf = Color(0xffdfdfdf);
static const Color color_333333 = Color(0xff333333);
static const Color color_F1F0F4 = Color(0xffF1F0F4);
static const Color color_6AB6B9 = Color(0xff6AB6B9);
static const Color color_74BBBE = Color(0xff74BBBE);
}
... ...