Commit 06e16d8d8d8b005036984e1b9e31e615009573dc

Authored by wdn
1 parent 755b1927

合并

import 'package:dio/dio.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
... ... @@ -38,11 +37,11 @@ Future<void> main() async {
),
ChangeNotifierProvider<MessageDialogModel>(
create: (_) => MessageDialogModel()..init(),
)
),
],
child: MyApp(),
));
FlutterBugly.init(androidAppId: "f71a313f42",iOSAppId: "3089e4587e");
FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e");
});
}
... ... @@ -54,8 +53,7 @@ class MyApp extends StatefulWidget {
}
}
class MyAppState extends State<MyApp>{
class MyAppState extends State<MyApp> {
@override
void initState() {
// TODO: implement initState
... ... @@ -73,11 +71,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");
}
initDio() {
DioUtil.openDebug();
... ... @@ -88,7 +86,6 @@ class MyAppState extends State<MyApp>{
DioUtil().setConfig(config);
}
@override
Widget build(BuildContext context) {
// TODO: implement build
... ... @@ -100,7 +97,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";//上传通讯录
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/utils.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/round_button.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; //晚市时间段
// 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();
}
// //生成日期文本
// _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() {
dateTime = DateTime.now();
dateText = Utils.addZeroNumber(dateTime.month) +
"-" +
Utils.addZeroNumber(dateTime.day);
_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;
... ... @@ -105,74 +159,628 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
@override
void initState() {
super.initState();
_initTime();
dateTime = DateTime.now();
_notebookDetailChangeModel =
Provider.of<NotebookDetailChangeModel>(context, listen: false);
_notebookDetailChangeModel.initDateHourMinuteList(context);
_notebookDetailChangeModel.getNewTableList(context);
_initData();
// _initTime();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: SingleChildScrollView(
child: Column(children: <Widget>[
SizedBox(height: ScreenUtil.statusBarHeight),
MyAppBar(
"在线预订详情",
showBack: true,
),
//第一行
Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
child: Row(
_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: [
CustomButton(
dateText: dateText,
dayText: ' 今天',
isSelect: true,
),
CustomButton(
dateText: dateText,
dayText: ' 明天',
isSelect: false,
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),
)
],
),
CustomButton(
dateText: '其他',
fontSize: 30,
dayText: '',
isImage: true,
isSelect: false,
)
],
),
)
],
),
//第二行
Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomButton(
dateText: '早市',
dayText: '',
isSelect: true,
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,
),
),
CustomButton(
dateText: '午市',
dayText: '',
isSelect: false,
)),
],
),
);
}
_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),
),
),
CustomButton(
dateText: '晚市',
dayText: '',
isSelect: false,
)
],
),
],
),
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 {
... ... @@ -181,55 +789,134 @@ class CustomButton extends StatefulWidget {
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})
: super(key: key);
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 Container(
width: ScreenUtil().setWidth(105 * 2),
height: ScreenUtil().setWidth(25 * 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: [
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
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,
fontSize: ScreenUtil().setSp(30)))
],
//输入文本的样式
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)))
],
),
),
);
}
... ...
... ... @@ -615,7 +615,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
NavigatorUtil.goNoteBookChangePage(context);
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
... ...
... ... @@ -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
}
... ...
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;
}
}
... ...
... ... @@ -40,4 +40,7 @@ class MyColours {
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);
}
... ...
import 'dart:convert';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:one_key/models/notebook.dart';
import 'package:one_key/models/notebook_detail.dart';
import 'package:one_key/pages/detail/notebook_detail_change_page.dart';
import 'package:one_key/pages/home/home_page.dart';
import 'package:one_key/pages/invicate/invitation_page.dart';
... ... @@ -10,75 +13,85 @@ import 'package:one_key/pages/detail/notebook_detail_page.dart';
import 'package:one_key/pages/sms/sms_page.dart';
import 'package:one_key/pages/table/select_table_page.dart';
import 'package:one_key/pages/webview/webview_page.dart';
import 'package:one_key/provider/notebook_detail_change_model.dart';
import 'package:one_key/utils/fluro_convert_utils.dart';
import 'package:one_key/utils/log_util.dart';
import 'package:provider/provider.dart';
// 登录页
var loginHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
return LoginPage();
});
return LoginPage();
});
// 跳转到主页
var homeHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String initialIndex=params["initialIndex"].first;
return HomePage(initialIndex: int.parse(initialIndex),);
});
String initialIndex = params["initialIndex"].first;
return HomePage(
initialIndex: int.parse(initialIndex),
);
});
// 跳转到处理在线预订
var reserveDetailHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String rid=params['rid'].first;
return NotebookDetailPage(rid);
});
String rid = params['rid'].first;
return NotebookDetailPage(rid);
});
// 跳转到处理在线预订
var handleOnlineHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String rid=params['rid'].first;
String mid=params["mid"].first;
return HandleOnlinePage(rid,mid);
});
String rid = params['rid'].first;
String mid = params["mid"].first;
return HandleOnlinePage(rid, mid);
});
// 跳转到选择桌位
var handleSelectTableHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String rid=params['rid'].first;
DateTime dateTime=DateTime.fromMillisecondsSinceEpoch(int.parse(params["dateTime"].first));
String ddate_slot=params["ddate_slot"].first;
return SelectTablePage(rid,dateTime,ddate_slot);
});
String rid = params['rid'].first;
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(params["dateTime"].first));
String ddate_slot = params["ddate_slot"].first;
return SelectTablePage(rid, dateTime, ddate_slot);
});
// 跳转到邀请函页面
var handleInvicationHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String rid=params["rid"].first;
String tableInfo=FluroConvertUtils.fluroCnParamsDecode(params["tableInfo"].first);
String ddate=params["ddate"].first;
String ddateStr=FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first);
return InvicationPage(rid,tableInfo,ddate,ddateStr);
});
String rid = params["rid"].first;
String tableInfo =
FluroConvertUtils.fluroCnParamsDecode(params["tableInfo"].first);
String ddate = params["ddate"].first;
String ddateStr =
FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first);
return InvicationPage(rid, tableInfo, ddate, ddateStr);
});
// 发短信
var handleSmsHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String rid=params["rid"].first;
return SmsPage(rid);
});
String rid = params["rid"].first;
return SmsPage(rid);
});
// 浏览网页
var handleWebviewHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
return WebViewPage();
});
return WebViewPage();
});
// 跳转到变更预订
// 跳转到变更预订
var handleChangeDetailHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
// String rid=params['rid'].first;
// String mid=params["mid"].first;
return NoteBookChangePage();
});
// String rid=params['rid'].first;
// NotebookDetail detailEntity = params["detailEntity"].first;
NotebookDetail detailEntity = NotebookDetail.fromJson(json
.decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
String rid = params['rid'].first;
return ChangeNotifierProvider<NotebookDetailChangeModel>(
create: (_) => NotebookDetailChangeModel(detailEntity),
child: NoteBookChangePage(detailEntity: detailEntity,rid: rid));
});
... ...
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:one_key/models/notebook.dart';
import 'package:one_key/models/notebook_detail.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/routes.dart';
import 'package:one_key/utils/fluro_convert_utils.dart';
... ... @@ -65,7 +66,7 @@ class NavigatorUtil {
}
/// 变更预订
static void goNoteBookChangePage(BuildContext context,{replace=false}) {
_navigateTo(context,"${Routes.change_detail}",replace: replace);
static void goNoteBookChangePage(BuildContext context,NotebookDetail detailEntity,String rid,{replace=false}) {
_navigateTo(context,"${Routes.change_detail}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid",replace: replace);
}
}
... ...
... ... @@ -3,7 +3,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/res/colors.dart';
class CommonButton extends StatelessWidget {
final VoidCallback onPress;
final String content;
final double width;
... ... @@ -30,14 +29,15 @@ class CommonButton extends StatelessWidget {
color: MyColours.color_d8d8d8,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor=MyColours.color_ffffff;
fontColor = MyColours.color_ffffff;
break;
case 0:
boxDecoration = BoxDecoration(
border: Border.all(color: MyColours.color_199095,width: ScreenUtil().setWidth(2)),
border: Border.all(
color: MyColours.color_199095, width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor=MyColours.color_199095;
fontColor = MyColours.color_199095;
break;
case 1:
boxDecoration = BoxDecoration(
... ... @@ -47,14 +47,28 @@ class CommonButton extends StatelessWidget {
end: Alignment.bottomCenter),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor=MyColours.color_fefefe;
fontColor = MyColours.color_fefefe;
break;
case 2:
boxDecoration = BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor = MyColours.color_fefefe;
break;
case -2:
boxDecoration = BoxDecoration(
color: MyColours.color_74BBBE,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor = MyColours.color_fefefe;
break;
default:
boxDecoration = BoxDecoration(
border: Border.all(color: MyColours.color_199095),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor=MyColours.color_fefefe;
fontColor = MyColours.color_fefefe;
break;
break;
}
... ... @@ -65,11 +79,14 @@ class CommonButton extends StatelessWidget {
child: Container(
width: ScreenUtil().setWidth(width),
height: ScreenUtil().setHeight(height),
decoration:boxDecoration,
decoration: boxDecoration,
child: Align(
alignment: Alignment.center,
child: Text(content, style: TextStyle(color: fontColor,
fontSize: ScreenUtil().setSp(fontSize)),),
child: Text(
content,
style: TextStyle(
color: fontColor, fontSize: ScreenUtil().setSp(fontSize)),
),
),
),
),
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/models/table_list.dart' as t;
import 'package:one_key/widgets/v_empty_view.dart';
class NewTableItem extends StatefulWidget{
final t.TableList table;
final bool canSelected;//是否能选中
final ValueChanged onSelected;
final int height;//高度
NewTableItem(this.table,{this.onSelected,this.canSelected=false,this.height=183});
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return new NewTableItemState();
}
}
class NewTableItemState extends State<NewTableItem>{
@override
Widget build(BuildContext context) {
// TODO: implement build
t.TableList table=widget.table;
return GestureDetector(
onTap: (){
if(widget.canSelected&&table.signStr.isEmpty){
setState(() {
table.selected=!(table.selected??false);
});
widget.onSelected(table);
}
},
child: Stack(
children: <Widget>[
Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(widget.height),
margin:EdgeInsets.all( ScreenUtil().setWidth(9)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))
),
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
top: 0,
child: table.tidStr==null?Container():Container(
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setHeight(32),
alignment: Alignment.center,
decoration: BoxDecoration(
color: MyColours.color_63a6d1,
borderRadius: BorderRadius.only(topLeft: Radius.circular(ScreenUtil().setWidth(8)),topRight: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
),
child: Text(table.tidStr,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal)),
),
),
Container(
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
VEmptyView(20),
Text(table.name,style: TextStyle(color: MyColours.color_131313,fontSize: ScreenUtil().setSp(30),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
VEmptyView(5),
Text((table.reserver==null||table.reserver.isEmpty)?table.tableNum:table.reserver,style: TextStyle(color: (table.reserver==null||table.reserver.isEmpty)?MyColours.color_777777:MyColours.color_2bb5b7,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
VEmptyView(5),
Text(table.lowStr,style: TextStyle(color: MyColours.color_777777,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,)
],
),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: table.signStr.isEmpty?Container():Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setHeight(40),
alignment: Alignment.center,
decoration: BoxDecoration(
color:MyColours.color_89c0b7,
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
),
child: Text(table.signStr,style: TextStyle(color:MyColours.color_ffffff,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
),
),
],
),
),
Positioned(
top: 3,
right: 5,
child: !(table.selected??false)?Container():Image.asset("assets/icon_selected.png",width: ScreenUtil().setWidth(40),height: ScreenUtil().setWidth(40),)
)
],
),
);
}
}
... ...
... ... @@ -109,4 +109,4 @@ class TableItemState extends State<TableItem>{
),
);
}
}
\ No newline at end of file
}
... ...
... ... @@ -245,7 +245,7 @@ packages:
name: device_info_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
version: "1.0.1"
dio:
dependency: "direct main"
description:
... ... @@ -372,7 +372,7 @@ packages:
name: fluwx
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.0"
version: "2.1.0"
front_end:
dependency: transitive
description:
... ... @@ -673,7 +673,7 @@ packages:
name: provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.3.2+1"
version: "4.3.2+2"
pub_semver:
dependency: transitive
description:
... ... @@ -874,7 +874,7 @@ packages:
name: url_launcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.5.2"
version: "5.5.3"
url_launcher_linux:
dependency: transitive
description:
... ... @@ -902,7 +902,7 @@ packages:
name: url_launcher_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3+1"
version: "0.1.3+2"
uuid:
dependency: transitive
description:
... ...
... ... @@ -64,7 +64,7 @@ dependencies:
# 日历
table_calendar: ^2.2.1
# 微信SDK
fluwx: ^2.1.0
fluwx: 2.1.0
#网页,短信,电话
url_launcher: ^5.4.2
# 滚轮选择器
... ...