Commit 148f8d18950879ccbf4b9a2c2819c0c3e1e273f7

Authored by wdn
1 parent a22d7081

变更预订、取消预订按钮布局

{
// 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
... ...
196f9f292c7f47fcf809595ac8fc6ce8
\ 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, '8.0'
# source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
... ...
PODS:
- audioplayers (0.0.1):
- Flutter
- connectivity (0.0.1):
- Flutter
- Reachability
- connectivity_macos (0.0.1):
- Flutter
- Bugly (2.5.71)
- Flutter (1.0.0)
- flutter_bugly (0.0.1):
- Bugly
- Flutter
- flutter_statusbarcolor (0.0.1):
- Flutter
- fluttertoast (0.0.2):
- Flutter
- fluwx (0.0.1):
- Flutter
- WechatOpenSDK (= 1.8.6.2)
- WechatOpenSDK (= 1.8.7.1)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- install_plugin (0.0.1):
- Flutter
- JCore (2.2.5)
- JPush (3.3.2):
- JCore (2.3.4)
- JPush (3.3.6):
- JCore (< 3.0.0, >= 2.0.0)
- jpush_flutter (0.0.2):
- Flutter
- JPush
- package_info (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- path_provider_macos (0.0.1):
- Flutter
- permission_handler (4.4.0):
- Flutter
- Reachability (3.2)
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
... ... @@ -47,18 +47,18 @@ PODS:
- Flutter
- url_launcher_web (0.0.1):
- Flutter
- WechatOpenSDK (1.8.6.2)
- WechatOpenSDK (1.8.7.1)
DEPENDENCIES:
- audioplayers (from `.symlinks/plugins/audioplayers/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- Flutter (from `Flutter`)
- flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`)
- flutter_statusbarcolor (from `.symlinks/plugins/flutter_statusbarcolor/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
- install_plugin (from `.symlinks/plugins/install_plugin/ios`)
- jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
... ... @@ -71,22 +71,20 @@ DEPENDENCIES:
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
trunk:
- Bugly
- FMDB
- JCore
- JPush
- Reachability
- WechatOpenSDK
EXTERNAL SOURCES:
audioplayers:
:path: ".symlinks/plugins/audioplayers/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_macos:
:path: ".symlinks/plugins/connectivity_macos/ios"
Flutter:
:path: Flutter
flutter_bugly:
:path: ".symlinks/plugins/flutter_bugly/ios"
flutter_statusbarcolor:
:path: ".symlinks/plugins/flutter_statusbarcolor/ios"
fluttertoast:
... ... @@ -97,6 +95,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/install_plugin/ios"
jpush_flutter:
:path: ".symlinks/plugins/jpush_flutter/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
path_provider_macos:
... ... @@ -120,21 +120,21 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c
connectivity: 6e94255659cc86dcbef1d452ad3e0491bb1b3e75
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
Bugly: fd066c75c4a0eca1440f9b6a84bd37d51bfc85ac
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_bugly: c9800f4d5bc5bdc27ffdde3417a26ba44266e0c3
flutter_statusbarcolor: 8afb1071ed8c58be929f1e32b36c629771fd2259
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
fluwx: 03e098a7284c556d7b197e0b82984eb0b25183af
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
install_plugin: a13e7ddd2bab0c701b48cd359c26d0394125b6fb
JCore: d75c0306dc99875d323d23e5a063b3a3ef22335a
JPush: 9468c84a3809dc3ac2fc1c89c6d1d6c858a91bf5
JCore: 8aa29dc57ba3730dd9fe7544ce1a4e1cbe221135
JPush: a401b946dcc76b37335422487201bc1ecc8dd296
jpush_flutter: 69133df35eaf9135e540549b154d992c44f8ee44
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
permission_handler: f615215121f43c1640d2b8500d4ad749512828a8
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
... ... @@ -142,8 +142,8 @@ SPEC CHECKSUMS:
url_launcher: a1c0cc845906122c4784c542523d8cacbded5626
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
WechatOpenSDK: 8b3ba4239193d1112205c139c94e21934e8f369a
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
PODFILE CHECKSUM: a5c9f5cbedb217afa5108d75ed888500ab689803
PODFILE CHECKSUM: 6d186dc4668603071619657511aa873d9a684d13
COCOAPODS: 1.9.1
COCOAPODS: 1.9.3
... ...
... ... @@ -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;
... ... @@ -324,7 +312,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
... ... @@ -382,7 +369,8 @@
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 = 3;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
... ... @@ -399,7 +387,7 @@
MARKETING_VERSION = 1.0.3;
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 +396,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
... ... @@ -466,7 +453,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
... ... @@ -542,7 +528,7 @@
MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "Push Development Profile";
PROVISIONING_PROFILE_SPECIFIER = wdn_yjd;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
... ...
... ... @@ -21,7 +21,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 +33,366 @@ 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();
@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;
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
});
managers=await detailModel.getManagers(context);
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);
}
/// 取消预订, 变更预订按钮
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))),
),
);
}
@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(
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.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,),
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(
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.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,
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,
),
),
))
],
),
),
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??""),
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(
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;
}
});
},
),
),
),
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('点击变更预订');
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
print('点击取消预订');
}, '取消预订')),
],
)),
),
)),
),
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("没有客户电话!");
}
break;
}
});
},
),
),
),
VEmptyView(ScreenUtil().setWidth(60))
],
),
)
],
),
),
),
);
}
}
... ...
... ... @@ -27,13 +27,13 @@ class Utils {
}
//给数字前面加0
static String addZeroNumber(int num){
return num<10?"0"+num.toString():num.toString();
static String addZeroNumber(int num) {
return num < 10 ? "0" + num.toString() : num.toString();
}
//转换日期数字
static String formatWeekDayNum(int num){
switch(num){
static String formatWeekDayNum(int num) {
switch (num) {
case 1:
return "一";
case 2:
... ... @@ -69,39 +69,40 @@ class Utils {
//跳转拨打电话页面
static goPhone(String phoneNum) async {
String url="tel:$phoneNum";
if(await canLaunch(url)){
String url = "tel:$phoneNum";
if (await canLaunch(url)) {
await launch(url);
}else{
} else {
LogUtil.e("Could not launch $url");
}
}
//跳转拨打电话页面
static goHelp() async {
String url="https://support.qq.com/product/152856";
if(await canLaunch(url)){
String url = "https://support.qq.com/product/152856";
if (await canLaunch(url)) {
await launch(url);
}else{
} else {
LogUtil.e("Could not launch $url");
}
}
//获取应用版本昊
static Future<String> getCurrVersion() async {
PackageInfo packageInfo=await PackageInfo.fromPlatform();
String version=packageInfo.version;
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String version = packageInfo.version;
return version;
}
//比较两个日期是否同一天
static isOneDay(DateTime one,DateTime two){
if(one.year==two.year&&one.month==two.month&&one.day==two.day)return true;
static isOneDay(DateTime one, DateTime two) {
if (one.year == two.year && one.month == two.month && one.day == two.day)
return true;
return false;
}
//分享邀请函
static goShareInvicationToWeChat(String rid){
static goShareInvicationToWeChat(String rid) {
String _webPageUrl = "http://colorcun.com/";
String _thumbnail =
"https://qn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148572.jpg";
... ... @@ -115,13 +116,12 @@ class Utils {
title: _title,
path: _path,
description: _description,
thumbnail: WeChatImage.network(_thumbnail)
);
thumbnail: WeChatImage.network(_thumbnail));
shareToWeChat(model);
}
//检查网络连接
static Future<bool> checkConnectiviy()async{
static Future<bool> checkConnectiviy() async {
var connectivityResult = await (new Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
// I am connected to a mobile network.
... ...
... ... @@ -8,13 +8,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.36.4"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
... ... @@ -28,7 +21,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
version: "2.4.2"
audioplayers:
dependency: "direct main"
description:
... ... @@ -42,7 +35,7 @@ packages:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
version: "2.0.0"
build:
dependency: transitive
description:
... ... @@ -106,13 +99,20 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
version: "1.1.3"
checked_yaml:
dependency: transitive
description:
... ... @@ -120,6 +120,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
code_builder:
dependency: transitive
description:
... ... @@ -133,28 +140,35 @@ packages:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.11"
version: "1.14.13"
connectivity:
dependency: "direct main"
description:
name: connectivity
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.8+2"
version: "0.4.9+2"
connectivity_for_web:
dependency: transitive
description:
name: connectivity_for_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.1+2"
connectivity_macos:
dependency: transitive
description:
name: connectivity_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.0+2"
version: "0.1.0+4"
connectivity_platform_interface:
dependency: transitive
description:
name: connectivity_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "1.0.6"
convert:
dependency: transitive
description:
... ... @@ -210,14 +224,21 @@ packages:
name: extended_image
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.1"
version: "1.1.1"
extended_image_library:
dependency: transitive
description:
name: extended_image_library
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.0"
version: "0.3.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
fixnum:
dependency: transitive
description:
... ... @@ -231,7 +252,7 @@ packages:
name: fluro
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.1"
version: "1.6.3"
flutter:
dependency: "direct main"
description: flutter
... ... @@ -366,13 +387,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.3"
image:
dependency: transitive
description:
name: image
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
install_plugin:
dependency: "direct main"
description:
... ... @@ -449,7 +463,7 @@ packages:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: transitive
description:
... ... @@ -512,7 +526,7 @@ packages:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.4"
version: "1.7.0"
path_provider:
dependency: "direct main"
description:
... ... @@ -555,13 +569,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
... ... @@ -678,7 +685,7 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.5"
version: "1.7.0"
sqflite:
dependency: "direct main"
description:
... ... @@ -692,7 +699,7 @@ packages:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
... ... @@ -741,7 +748,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.11"
version: "0.2.17"
timing:
dependency: transitive
description:
... ... @@ -755,7 +762,7 @@ packages:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
version: "1.2.0"
url_launcher:
dependency: "direct main"
description:
... ... @@ -812,13 +819,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.5.0"
yaml:
dependency: transitive
description:
... ... @@ -827,5 +827,5 @@ packages:
source: hosted
version: "2.2.0"
sdks:
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <1.16.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.17.0 <2.0.0"
... ...
... ... @@ -42,7 +42,7 @@ dependencies:
# 文件系统访问
path_provider: ^1.6.5
# 官方image组件扩展,支持多种图片效果展示
extended_image: ^0.7.1
extended_image: ^1.1.1
# 任意位置访问navigator
get_it: ^3.0.1
# 刷新加载
... ...