|
...
|
...
|
@@ -3,6 +3,7 @@ import 'dart:convert'; |
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/constant/state.dart';
|
|
|
|
import 'package:one_key/models/manager.dart';
|
|
|
|
import 'package:one_key/models/notebook_detail.dart';
|
|
|
|
import 'package:one_key/provider/message_dialog_model.dart';
|
|
...
|
...
|
@@ -20,6 +21,7 @@ import 'package:one_key/widgets/dialog.dart'; |
|
|
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
import 'package:one_key/widgets/loading.dart';
|
|
|
|
import 'package:one_key/widgets/need_item.dart';
|
|
|
|
import 'package:one_key/widgets/page_exception.dart';
|
|
|
|
import 'package:one_key/widgets/round_button.dart';
|
|
|
|
import 'package:one_key/widgets/row_multi_text.dart';
|
|
|
|
import 'package:one_key/widgets/table_item.dart';
|
|
...
|
...
|
@@ -44,7 +46,7 @@ class NotebookDetailPage extends StatefulWidget { |
|
|
|
}
|
|
|
|
|
|
|
|
class NotebookDetailPageState extends State<NotebookDetailPage> {
|
|
|
|
NotebookDetailModel detailModel = NotebookDetailModel();
|
|
|
|
NotebookDetailModel detailModel;
|
|
|
|
|
|
|
|
NotebookDetail detailEntity;
|
|
|
|
|
|
...
|
...
|
@@ -63,7 +65,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
|
|
|
|
ScrollController _scrollController;
|
|
|
|
|
|
|
|
String formatPhone="";
|
|
|
|
String formatPhone = "";
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
...
|
...
|
@@ -118,11 +120,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
});
|
|
|
|
setState(() {
|
|
|
|
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
|
|
|
|
formatPhone=detailEntity.phone;
|
|
|
|
if(App.sp.getString("is_call_tel")!=null&&App.sp.getString("is_call_tel")=="1"){
|
|
|
|
}else{
|
|
|
|
if(detailEntity.phone.isNotEmpty&&detailEntity.phone.length==11&&(detailEntity.status=="0"||detailEntity.status=="6")){
|
|
|
|
formatPhone=detailEntity.phone.substring(0,3)+"****"+detailEntity.phone.substring(7);
|
|
|
|
formatPhone = detailEntity.phone;
|
|
|
|
if (App.sp.getString("is_call_tel") != null &&
|
|
|
|
App.sp.getString("is_call_tel") == "1") {
|
|
|
|
} else {
|
|
|
|
if (detailEntity.phone.isNotEmpty &&
|
|
|
|
detailEntity.phone.length == 11 &&
|
|
|
|
(detailEntity.status == "0" || detailEntity.status == "6")) {
|
|
|
|
formatPhone = detailEntity.phone.substring(0, 3) +
|
|
|
|
"****" +
|
|
|
|
detailEntity.phone.substring(7);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
...
|
...
|
@@ -408,346 +415,383 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
if (MediaQuery.of(context).viewInsets.bottom == 0) {
|
|
|
|
_cancelNode.unfocus();
|
|
|
|
}
|
|
|
|
return WillPopScope(
|
|
|
|
child: detailEntity == null
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(height: ScreenUtil.statusBarHeight),
|
|
|
|
MyAppBar(
|
|
|
|
"订座详情",
|
|
|
|
showBack: true,
|
|
|
|
detailModel = Provider.of<NotebookDetailModel>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
body: SafeArea(
|
|
|
|
child: WillPopScope(
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyAppBar(
|
|
|
|
"订座详情",
|
|
|
|
showBack: true,
|
|
|
|
callback: () {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
} else {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
Expanded(child:
|
|
|
|
Consumer<NotebookDetailModel>(builder: (context, model, _) {
|
|
|
|
if (model.pageState != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
callback: () {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
} else {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
// _getOrderListData();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: DefaultTextStyle(
|
|
|
|
style: TextStyle(decoration: TextDecoration.none),
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
emptyMsg: "暂时没有预订列表信息哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: DefaultTextStyle(
|
|
|
|
style: TextStyle(decoration: TextDecoration.none),
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(43)),
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText("用餐时段", detailEntity.ddateMd),
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(43)),
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
Column(
|
|
|
|
RowMultiText(
|
|
|
|
"用餐时段", detailEntity.ddateMd),
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText(
|
|
|
|
"用餐时间", detailEntity.ddateHm),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.type == "0"
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: RowMultiText(
|
|
|
|
"用餐人数", detailEntity.pnum),
|
|
|
|
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),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Image.asset(
|
|
|
|
detailEntity.statuImgAssets,
|
|
|
|
width: ScreenUtil().setWidth(100),
|
|
|
|
height: ScreenUtil().setWidth(30),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.demands.length <= 0
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText(
|
|
|
|
"包间需求",
|
|
|
|
(detailEntity.demands.length
|
|
|
|
.toString() +
|
|
|
|
"个") ??
|
|
|
|
""),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: detailEntity
|
|
|
|
.demands.length >
|
|
|
|
0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil()
|
|
|
|
.setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext contxt,
|
|
|
|
int index) {
|
|
|
|
return NeedItem(
|
|
|
|
detailEntity
|
|
|
|
.demands[index]);
|
|
|
|
},
|
|
|
|
itemCount: detailEntity
|
|
|
|
.demands.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
"预订桌位",
|
|
|
|
(detailEntity.tables.length.toString() +
|
|
|
|
"个")),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
Offstage(
|
|
|
|
offstage:
|
|
|
|
detailEntity.tables.length > 0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder: (BuildContext contxt,
|
|
|
|
int index) {
|
|
|
|
return TableItem(
|
|
|
|
detailEntity.tables[index]);
|
|
|
|
},
|
|
|
|
itemCount:
|
|
|
|
detailEntity.tables.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
RowMultiText("客户姓名", detailEntity.rnameStr),
|
|
|
|
RowMultiText(
|
|
|
|
"客户电话", formatPhone),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.cusdem == '' ||
|
|
|
|
detailEntity.cusdem == null,
|
|
|
|
child: 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)),
|
|
|
|
),
|
|
|
|
detailEntity.demands.length <= 0
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText(
|
|
|
|
"包间需求",
|
|
|
|
(detailEntity.demands.length
|
|
|
|
.toString() +
|
|
|
|
"个") ??
|
|
|
|
""),
|
|
|
|
Align(
|
|
|
|
alignment:
|
|
|
|
Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: detailEntity
|
|
|
|
.demands
|
|
|
|
.length >
|
|
|
|
0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil()
|
|
|
|
.setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext
|
|
|
|
contxt,
|
|
|
|
int index) {
|
|
|
|
return NeedItem(
|
|
|
|
detailEntity
|
|
|
|
.demands[
|
|
|
|
index]);
|
|
|
|
},
|
|
|
|
itemCount: detailEntity
|
|
|
|
.demands.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: 0,
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () async {
|
|
|
|
List<String> list = [];
|
|
|
|
for (Manager manager
|
|
|
|
in managers) {
|
|
|
|
list.add(
|
|
|
|
manager.roleUserName);
|
|
|
|
}
|
|
|
|
DialogUtil
|
|
|
|
.showSelectCusmanDialog(
|
|
|
|
context, list, (value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
cusmanText =
|
|
|
|
managers[value.first]
|
|
|
|
.userName;
|
|
|
|
});
|
|
|
|
_setCurrManager();
|
|
|
|
}
|
|
|
|
}).then((value) {});
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
cusmanText,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30),
|
|
|
|
decoration:
|
|
|
|
TextDecoration.underline,
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
"预订桌位",
|
|
|
|
(detailEntity.tables.length
|
|
|
|
.toString() +
|
|
|
|
"个")),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
offstage:
|
|
|
|
detailEntity.tables.length > 0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height:
|
|
|
|
ScreenUtil().setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext contxt,
|
|
|
|
int index) {
|
|
|
|
return TableItem(
|
|
|
|
detailEntity
|
|
|
|
.tables[index]);
|
|
|
|
},
|
|
|
|
itemCount: detailEntity
|
|
|
|
.tables.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.note_name == '' ||
|
|
|
|
detailEntity.note_name == null,
|
|
|
|
child: RowMultiText(
|
|
|
|
"记录人", detailEntity.note_name ?? ""),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "4" &&
|
|
|
|
detailEntity.cancel != null)
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyDivider(double.infinity,
|
|
|
|
ScreenUtil().setHeight(2)),
|
|
|
|
RowMultiText("取消原因",
|
|
|
|
detailEntity.cancel?.desc ?? "",
|
|
|
|
textAlign: TextAlign.left),
|
|
|
|
RowMultiText(
|
|
|
|
"取消时间",
|
|
|
|
detailEntity.cancel?.cdateStr ??
|
|
|
|
""),
|
|
|
|
RowMultiText(
|
|
|
|
"操作人",
|
|
|
|
detailEntity.abolition == '2'
|
|
|
|
? '顾客在线取消'
|
|
|
|
: detailEntity
|
|
|
|
.cancel?.uname ??
|
|
|
|
)),
|
|
|
|
RowMultiText(
|
|
|
|
"客户姓名", detailEntity.rnameStr),
|
|
|
|
RowMultiText("客户电话", formatPhone),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.cusdem == '' ||
|
|
|
|
detailEntity.cusdem == null,
|
|
|
|
child: 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,
|
|
|
|
(value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
cusmanText = managers[
|
|
|
|
value.first]
|
|
|
|
.userName;
|
|
|
|
});
|
|
|
|
_setCurrManager();
|
|
|
|
}
|
|
|
|
}).then((value) {});
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
cusmanText,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_353535,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
decoration: TextDecoration
|
|
|
|
.underline,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.note_name ==
|
|
|
|
'' ||
|
|
|
|
detailEntity.note_name == null,
|
|
|
|
child: RowMultiText("记录人",
|
|
|
|
detailEntity.note_name ?? ""),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status ==
|
|
|
|
"4" &&
|
|
|
|
detailEntity.cancel != null)
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyDivider(double.infinity,
|
|
|
|
ScreenUtil().setHeight(2)),
|
|
|
|
RowMultiText(
|
|
|
|
"取消原因",
|
|
|
|
detailEntity.cancel?.desc ??
|
|
|
|
"",
|
|
|
|
textAlign: TextAlign.left),
|
|
|
|
RowMultiText(
|
|
|
|
"取消时间",
|
|
|
|
detailEntity
|
|
|
|
.cancel?.cdateStr ??
|
|
|
|
""),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(
|
|
|
|
color: MyColours.color_dbe3e3,
|
|
|
|
width: ScreenUtil().setWidth(1)))),
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setHeight(40),
|
|
|
|
ScreenUtil().setHeight(40),
|
|
|
|
ScreenUtil().setHeight(40),
|
|
|
|
ScreenUtil().setHeight(0)),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setHeight(20)),
|
|
|
|
child: CommonButton(
|
|
|
|
content: "通知客户",
|
|
|
|
width: 669,
|
|
|
|
height: 84,
|
|
|
|
fontSize: 34,
|
|
|
|
onPress: () {
|
|
|
|
DialogUtil.showShareDialog(context)?.then((value) {
|
|
|
|
switch (value) {
|
|
|
|
case 1: //微信
|
|
|
|
NavigatorUtil.goInvicationPage(
|
|
|
|
context,
|
|
|
|
detailEntity.id,
|
|
|
|
detailEntity.tableinfoStr,
|
|
|
|
detailEntity.ddate,
|
|
|
|
detailEntity.ddateStr);
|
|
|
|
break;
|
|
|
|
case 2: //短信
|
|
|
|
NavigatorUtil.goSmsPage(
|
|
|
|
context, detailEntity.id);
|
|
|
|
break;
|
|
|
|
case 3: //电话
|
|
|
|
if (detailEntity.phone != null &&
|
|
|
|
detailEntity.phone.isNotEmpty) {
|
|
|
|
Utils.goPhone(detailEntity.phone);
|
|
|
|
} else {
|
|
|
|
Utils.showToast("没有客户电话!");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
RowMultiText(
|
|
|
|
"操作人",
|
|
|
|
detailEntity.abolition == '2'
|
|
|
|
? '顾客在线取消'
|
|
|
|
: detailEntity
|
|
|
|
.cancel?.uname ??
|
|
|
|
""),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(84),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10)),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(
|
|
|
|
color: MyColours.color_dbe3e3,
|
|
|
|
width: ScreenUtil().setWidth(1)))),
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setHeight(40),
|
|
|
|
ScreenUtil().setHeight(40),
|
|
|
|
ScreenUtil().setHeight(40),
|
|
|
|
ScreenUtil().setHeight(0)),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setHeight(20)),
|
|
|
|
child: CommonButton(
|
|
|
|
content: "通知客户",
|
|
|
|
width: 669,
|
|
|
|
height: 84,
|
|
|
|
fontSize: 34,
|
|
|
|
onPress: () {
|
|
|
|
DialogUtil.showShareDialog(context)
|
|
|
|
?.then((value) {
|
|
|
|
switch (value) {
|
|
|
|
case 1: //微信
|
|
|
|
NavigatorUtil.goInvicationPage(
|
|
|
|
context,
|
|
|
|
detailEntity.id,
|
|
|
|
detailEntity.tableinfoStr,
|
|
|
|
detailEntity.ddate,
|
|
|
|
detailEntity.ddateStr);
|
|
|
|
break;
|
|
|
|
case 2: //短信
|
|
|
|
NavigatorUtil.goSmsPage(
|
|
|
|
context, detailEntity.id);
|
|
|
|
break;
|
|
|
|
case 3: //电话
|
|
|
|
if (detailEntity.phone != null &&
|
|
|
|
detailEntity.phone.isNotEmpty) {
|
|
|
|
Utils.goPhone(detailEntity.phone);
|
|
|
|
} else {
|
|
|
|
Utils.showToast("没有客户电话!");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// child: Text('fff'),
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击变更预订');
|
|
|
|
NavigatorUtil.goNoteBookChangePage(
|
|
|
|
context, detailEntity, widget.rid);
|
|
|
|
}, '变更预订')),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(84),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
}, '取消预订')),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(ScreenUtil().setWidth(60))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onWillPop: () async {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
),
|
|
|
|
// child: Text('fff'),
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击变更预订');
|
|
|
|
NavigatorUtil.goNoteBookChangePage(
|
|
|
|
context, detailEntity, widget.rid);
|
|
|
|
}, '变更预订')),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
}, '取消预订')),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(ScreenUtil().setWidth(60))
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onWillPop: () async {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|