Commit 04093900f37f6430dae19c23340ae54d700bb018

Authored by wdn127929
1 parent 359b58ab

变更预订记录OK

... ... @@ -112,6 +112,8 @@ class NotebookDetail {
String up_date; //订单修改时间
String deposit_cancel; //订金走向
String log_photo; //下单照片
String get statuImgAssets {
switch (status) {
case "0":
... ... @@ -306,7 +308,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,guest_uid:$guest_uid,reserve_type:$reserve_type,place_order_name:$place_order_name,is_user_comments:$is_user_comments,deposit_cancel:$deposit_cancel,up_date:$up_date}';
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,guest_uid:$guest_uid,reserve_type:$reserve_type,place_order_name:$place_order_name,is_user_comments:$is_user_comments,deposit_cancel:$deposit_cancel,up_date:$up_date,log_photo:$log_photo}';
}
}
... ... @@ -317,6 +319,7 @@ class Cancel {
String uname;
String desc;
String cdate;
String log_photo;
String get cdateStr {
DateTime dateTime =
... ...
... ... @@ -55,7 +55,8 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
..place_order_name = json['place_order_name'] as String
..is_user_comments = json['is_user_comments'] as dynamic
..up_date = json['up_date'] as String
..deposit_cancel = json['deposit_cancel'] as String;
..deposit_cancel = json['deposit_cancel'] as String
..log_photo = json['log_photo'] as String;
}
Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
... ... @@ -96,6 +97,7 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
'is_user_comments': instance.is_user_comments,
'up_date': instance.up_date,
'deposit_cancel': instance.deposit_cancel,
'log_photo': instance.log_photo,
};
OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
return OrderInfo(
... ... @@ -159,13 +161,15 @@ Cancel _$CancelFromJson(Map<String, dynamic> json) {
return Cancel()
..uname = json['uname'] as String
..desc = json['desc'] as String
..cdate = json['cdate'] as String;
..cdate = json['cdate'] as String
..log_photo = json['log_photo'] as String;
}
Map<String, dynamic> _$CancelToJson(Cancel instance) => <String, dynamic>{
'uname': instance.uname,
'desc': instance.desc,
'cdate': instance.cdate
'cdate': instance.cdate,
'log_photo':instance.log_photo
};
Order _$OrderFromJson(Map<String, dynamic> json) {
... ...
... ... @@ -30,22 +30,25 @@ class ReserveActionLogModol {
class ReserveActionLogSunModol {
String content;
String upDate;
String nick_name;
String nickName;
String logPhoto;
ReserveActionLogSunModol({this.content, this.upDate, this.nick_name});
ReserveActionLogSunModol(
{this.content, this.upDate, this.nickName, this.logPhoto});
ReserveActionLogSunModol.fromJson(Map<String, dynamic> json) {
content = json['content'];
upDate = json['up_date'];
nick_name = json['nick_name'];
nickName = json['nick_name'];
logPhoto = json['log_photo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['content'] = this.content;
data['up_date'] = this.upDate;
data['nick_name'] = this.nick_name;
data['nick_name'] = this.nickName;
data['log_photo'] = this.logPhoto;
return data;
}
}
... ...
... ... @@ -58,6 +58,7 @@ import '../../models/reserve_deposit_model.dart';
import '../../provider/collect_store_provider.dart';
import '../../utils/screen_util.dart';
import '../../widgets/special_text/my_extended_text_selection_controls.dart';
import '../online_check/photo_view_wiget.dart';
class NotebookDetailPage extends StatefulWidget {
final String rid;
... ... @@ -202,7 +203,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
bus.on("refresh_detail_reserve_recheck", (args) {
_getReserveRecheckByRid(); //获取核餐记录
});
bus.on("refresh_action_log", (args) {
bus.on("refresh_action_log", (args) {
_getReserveActionLog(); //获取变更记录
});
});
... ... @@ -455,9 +456,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
bus.off("refresh_detail");
bus.off("refresh_detail_deposit");
bus.off("refresh_detail_reserve_recheck");
bus.off("refresh_action_log");
bus.off("refresh_action_log");
}
///获取订单详情
... ... @@ -1856,6 +1855,38 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
]);
}
//查看大图
_showPhotoView(BuildContext context, int index, List<String> imgs,
{isShow = false, List dashName}) async {
// if (imgs.length == 1 &&
// imgs[0] ==
// 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
// imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
// }
Utils.setBarStatus(false, color: Colors.black);
dynamic result = await showGeneralDialog(
context: context,
barrierDismissible: false,
// barrierColor: Colors.red,
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel,
transitionDuration: const Duration(milliseconds: 150),
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
Widget child = Stack(
children: <Widget>[
PhotoPreview(
initialIndex: index,
photoList: imgs,
isShow: isShow,
dashName: dashName)
],
);
return child;
});
Utils.setBarStatus(true, color: Colors.white);
}
///订单操作UI
Widget _operatingRecord() {
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
... ... @@ -1868,7 +1899,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
style: TextStyle(color: MyColours.color_515151, fontSize: font(15)),
),
Container(
padding: EdgeInsets.only(left: w(13), top: w(20)),
padding: EdgeInsets.only(left: w(30), top: w(20)),
child:
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Text(
... ... @@ -1877,12 +1908,26 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
style:
TextStyle(color: MyColours.color_515151, fontSize: font(14)),
),
Spacer(),
Text(
'${detailEntity.place_order_name ?? ''} ${_getDateTime(detailEntity.cdate)}',
overflow: TextOverflow.ellipsis,
style:
TextStyle(color: MyColours.color_999999, fontSize: font(14)),
),
if (detailEntity.log_photo != null && detailEntity.log_photo != '')
HEmptyView(16),
if (detailEntity.log_photo != null && detailEntity.log_photo != '')
InkWell(
onTap: () {
_showPhotoView(context, 0, [detailEntity.log_photo]);
},
child: Text(
'照片',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_438E93, fontSize: font(14)),
))
])),
// if (detailModel.reserveActionLogData.length > 0)
... ... @@ -1893,59 +1938,100 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
itemBuilder: (context, index) {
ReserveActionLogSunModol data =
detailModel.reserveActionLogData[index];
bool show = data.logPhoto != null && data.logPhoto != '';
return Container(
padding: EdgeInsets.only(left: w(13), top: w(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'变更预订',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151, fontSize: font(14)),
),
Text(
'${data.nick_name ?? ''} ${data.upDate}',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_999999, fontSize: font(14)),
),
]));
padding:
EdgeInsets.only(left: w(30), top: index == 0 ? w(16) : 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'订单修改',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(14)),
),
Spacer(),
Text(
'${data.nickName ?? ''} ${data.upDate}',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_999999,
fontSize: font(14)),
),
if (show) HEmptyView(16),
if (show)
InkWell(
onTap: () {
_showPhotoView(context, 0, [data.logPhoto]);
},
child: Text(
'照片',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(14)),
))
]),
Container(
// color: Colors.red,
padding: EdgeInsets.only(
left: w(10),
top: w(12),
),
child: Text(
data.content,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 2,
color: MyColours.color_515151,
fontSize: font(14)),
))
],
));
}),
if (detailEntity.up_date != null)
Container(
padding: EdgeInsets.only(left: w(13), top: w(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'最后修改',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151, fontSize: font(14)),
),
// HEmptyView(40),
Expanded(
child: Text(
'${detailEntity.nick_name ?? ''}' +
' ' +
'${detailEntity.seller_user_phone ?? ''}' +
(detailEntity.up_date == null
? ''
: ' ${_getDateTime(detailEntity.up_date)}'),
// overflow: TextOverflow.ellipsis,
textAlign: TextAlign.right,
style: TextStyle(
color: MyColours.color_999999, fontSize: font(14)),
)),
])),
// if (detailEntity.up_date != null)
// Container(
// padding: EdgeInsets.only(left: w(13), top: w(20)),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// '最后修改',
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// color: MyColours.color_515151, fontSize: font(14)),
// ),
// // HEmptyView(40),
// Expanded(
// child: Text(
// '${detailEntity.nick_name ?? ''}' +
// ' ' +
// '${detailEntity.seller_user_phone ?? ''}' +
// (detailEntity.up_date == null
// ? ''
// : ' ${_getDateTime(detailEntity.up_date)}'),
// // overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.right,
// style: TextStyle(
// color: MyColours.color_999999, fontSize: font(14)),
// )),
// ])),
Offstage(
offstage: (detailEntity.status == "4" && detailEntity.cancel != null)
? false
: true,
child: Column(children: <Widget>[
Container(
padding: EdgeInsets.only(left: w(13), top: w(10)),
padding: EdgeInsets.only(
left: w(30),
top: detailModel.reserveActionLogData.length > 0
? 0
: w(16)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
... ... @@ -1955,18 +2041,34 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
style: TextStyle(
color: MyColours.color_515151, fontSize: font(14)),
),
HEmptyView(40),
Expanded(
child: Text(
Spacer(),
Text(
'${detailEntity.abolition == '2' ? '顾客在线取消' : detailEntity.cancel?.uname ?? ""} ${detailEntity.cancel?.cdateStr ?? ""}',
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.right,
// textAlign: TextAlign.right,
style: TextStyle(
color: MyColours.color_999999, fontSize: font(14)),
)),
),
if (detailEntity.cancel?.log_photo != null &&
detailEntity.cancel?.log_photo != '')
HEmptyView(16),
if (detailEntity.cancel?.log_photo != null &&
detailEntity.cancel?.log_photo != '')
InkWell(
onTap: () {
_showPhotoView(
context, 0, [detailEntity.cancel?.log_photo]);
},
child: Text(
'照片',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(14)),
))
])),
Container(
padding: EdgeInsets.only(left: w(13), top: w(10)),
padding: EdgeInsets.only(left: w(30), top: w(16)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
... ... @@ -1982,10 +2084,10 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
style: TextStyle(
color: MyColours.color_999999, fontSize: font(14)),
),
]))
])),
VEmptyView(20),
// MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4),
])),
VEmptyView(20),
MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4),
]);
}
... ...