Commit 1df87d001790b0be9100634f776df4ebb392290f

Authored by wdn127929
1 parent 77577167

note_name && 下单人返回

... ... @@ -161,5 +161,10 @@ class Constant {
'管理员',
'店长',
],
'全店-月订单量': [
'管理员',
'店长',
],
'个人-月订单量': ['客户经理', '收银员', '服务员', '前台'],
};
}
... ...
... ... @@ -57,6 +57,7 @@ class Notebook {
String reserveCount; //该客户预订总次数
bool large = false;
String place_order_name; //下单人
// String get tableinfoStr {
// return name +
... ...
... ... @@ -53,7 +53,8 @@ Notebook _$NotebookFromJson(Map<String, dynamic> json) {
..reserveCount = json['reserveCount'] as String
..orderInfo = json['order_info'] == null
? null
: OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>);
: OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>)
..place_order_name = json['place_order_name'] ?? '';
}
Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{
... ... @@ -100,7 +101,8 @@ Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{
'name': instance.name,
'order_info': instance.orderInfo,
'nick_name': instance.nick_name,
'reserveCount':instance.reserveCount
'reserveCount': instance.reserveCount,
'place_order_name': instance.place_order_name
};
OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
... ...
... ... @@ -102,6 +102,7 @@ class NotebookDetail {
OrderInfo orderInfo;
String con_amount;
String gid;
String place_order_name; //下单人
String get statuImgAssets {
switch (status) {
... ... @@ -297,7 +298,7 @@ class NotebookDetail {
@override
String toString() {
return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid}';
return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid,place_order_name:$place_order_name}';
}
}
... ...
... ... @@ -48,7 +48,8 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
..orderInfo = json['order_info'] == null
? null
: OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>)
..gid = json['gid'] as String;
..gid = json['gid'] as String
..place_order_name = json['place_order_name'] as String;
}
Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
... ... @@ -81,7 +82,8 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
'cancel': instance.cancel,
'order': instance.order,
'order_info': instance.orderInfo,
'gid': instance.gid
'gid': instance.gid,
'place_order_name': instance.place_order_name
};
OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
return OrderInfo(
... ...
... ... @@ -29,6 +29,7 @@ class Table {
String pnum; //预计人数
String nickName; //操作人
String noteName; //操作人
String place_order_name; //预订人
String isLock; //是否被合并上锁
String isMerge; //是否打开桌位合并开关
String tids; //被合并桌位tids
... ...
... ... @@ -363,6 +363,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"mid": widget.mid,
"cause": json.encode(causeMap),
"uid": userModel.user.openid,
'note_name':userModel.user.account,
};
if (status == "6") {
isPause = (ac == "1" ? true : false);
... ...
... ... @@ -1596,6 +1596,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
focusNode: priceF,
),
Offstage(
offstage: detailEntity.place_order_name ==
'' ||
detailEntity.place_order_name == null,
child: RowMultiText("下单人",
'${detailEntity.place_order_name ?? ''}',
textColor:
MyColours.color_333333),
),
Offstage(
offstage:
detailEntity.nick_name ==
'' ||
... ...
... ... @@ -482,14 +482,26 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
NavigatorUtil.goMonthOrderPage(
if (Utils.getAuthority(
context, '全店-月订单量')) {
NavigatorUtil.goMonthOrderPage(
context,
DateTime.now().year.toString(),
DateTime.now().month.toString(),
uid: Provider.of<UserModel>(context,
listen: false)
.user
.openid);
);
} else {
if (Utils.getAuthority(
context, '个人-月订单量')) {
NavigatorUtil.goMonthOrderPage(
context,
DateTime.now().year.toString(),
DateTime.now().month.toString(),
uid: Provider.of<UserModel>(context,
listen: false)
.user
.openid);
}
}
},
child: Container(
padding: EdgeInsets.symmetric(
... ...
... ... @@ -705,13 +705,13 @@ class NoteBookItemFState extends State<NoteBookItemF>
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(28)),
),
notebook.nick_name == null
notebook.place_order_name == null
? SizedBox()
: VEmptyView(6),
notebook.nick_name == null
notebook.place_order_name == null
? SizedBox()
: Text(
notebook.nick_name + '订',
notebook.place_order_name + '订',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
... ...
... ... @@ -616,7 +616,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
],
),
VEmptyView(8),
notebook.nick_name == null &&
notebook.place_order_name == null &&
notebook.tid.split(",").length < 2 &&
(notebook.cusdem == null ||
notebook.cusdem == '') &&
... ... @@ -624,14 +624,14 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
? SizedBox()
: Row(
children: [
notebook.nick_name == null
notebook.place_order_name == null
? SizedBox()
: Padding(
padding: EdgeInsets.only(
right:
ScreenUtil().setWidth(6)),
child: Text(
notebook.nick_name + '订',
notebook.place_order_name + '订',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
... ...
... ... @@ -919,7 +919,8 @@ class NotebookDetailChangeModel with ChangeNotifier {
"type": "0",
"rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
"ddate": '${ddate}'.substring(0, 10), //到店时间
"ddate_solt": ddateSolt
"ddate_solt": ddateSolt,
'note_name': userModel.user.account
};
if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") {
... ...
... ... @@ -81,7 +81,7 @@ class NotebookDetailModel extends ChangeNotifier {
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(
context, Method.get, HttpUrl.reserve_detail,
data: params, showLoading:isShowLoading ? false: showCircle)
data: params, showLoading: isShowLoading ? false : showCircle)
.catchError((error) {
print(error.toString());
if (error is MyError) {
... ... @@ -204,6 +204,7 @@ class NotebookDetailModel extends ChangeNotifier {
bool needToast = true}) async {
Map<String, dynamic> params = {
"rid": rid,
'note_name': Provider.of<UserModel>(context, listen: false).user.account
};
if (actualPum != null) {
params['actual_pum'] = actualPum;
... ...
... ... @@ -999,7 +999,7 @@ class TableManagerModel with ChangeNotifier {
table.nickName = notebook.nick_name;
table.label = notebook.className;
table.reserveCount = notebook.reserveCount;
table.place_order_name = notebook.place_order_name;
//剔除已经预订的桌子,剩下空桌子(仅看空座)
tempList.remove(table);
//全部
... ...
... ... @@ -366,17 +366,16 @@ class FTableItemState extends State<FTableItem> {
widget.need &&
signStr == '已预订' &&
!isSelf &&
table.nickName != null &&
table.nickName != ''
table.place_order_name != null &&
table.place_order_name != ''
? Padding(
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(6),
bottom: ScreenUtil().setWidth(8),
),
child: Text(
table.nickName != null &&
table.nickName != ''
? '${table.nickName}订'
table.place_order_name != null && table.place_order_name != ''
? '${table.place_order_name}订'
: '',
style: TextStyle(
color: MyColours.color_353535,
... ...