|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
...
|
...
|
@@ -13,7 +15,11 @@ import 'package:one_key/utils/utils.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/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/round_button.dart';
|
|
|
|
import 'package:one_key/widgets/row_multi_text.dart';
|
|
|
|
import 'package:one_key/widgets/table_item.dart';
|
|
|
|
import 'package:one_key/models/table.dart' as t;
|
|
...
|
...
|
@@ -42,22 +48,59 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
List<Manager> managers = []; //客户经理
|
|
|
|
|
|
|
|
Manager manager = Manager();
|
|
|
|
List cancelReasonList = [];
|
|
|
|
bool isShowTF = false;
|
|
|
|
int paddingBottom = 174;
|
|
|
|
int paddingTop = 138;
|
|
|
|
FocusNode _cancelNode = FocusNode();
|
|
|
|
TextEditingController _cancelController = TextEditingController();
|
|
|
|
StateSetter _cancelState;
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
// TODO: implement initState
|
|
|
|
super.initState();
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
detailEntity = await detailModel.getReserveDetail(context, {
|
|
|
|
"rid": widget.rid,
|
|
|
|
});
|
|
|
|
setState(() {
|
|
|
|
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
|
|
|
|
});
|
|
|
|
_getReserveDetail();
|
|
|
|
managers = await detailModel.getManagers(context);
|
|
|
|
_initCancel();
|
|
|
|
//添加listener监听
|
|
|
|
//对应的TextField失去或者获取焦点都会回调此监听
|
|
|
|
_cancelNode.addListener(() {
|
|
|
|
if (_cancelNode.hasFocus) {
|
|
|
|
print('得到焦点');
|
|
|
|
paddingTop = 125;
|
|
|
|
} else {
|
|
|
|
print('失去焦点');
|
|
|
|
paddingTop = 138;
|
|
|
|
}
|
|
|
|
_cancelState(() {});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
_getReserveDetail() async {
|
|
|
|
detailEntity = await detailModel.getReserveDetail(context, {
|
|
|
|
"rid": widget.rid,
|
|
|
|
});
|
|
|
|
setState(() {
|
|
|
|
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 初始化取消原因数据
|
|
|
|
_initCancel() {
|
|
|
|
isShowTF = false;
|
|
|
|
paddingBottom = 174;
|
|
|
|
cancelReasonList = [
|
|
|
|
{'title': '顾客取消', 'select': false},
|
|
|
|
{'title': '顾客行程有变', 'select': false},
|
|
|
|
{'title': '信息填写有误', 'select': false},
|
|
|
|
{'title': '操作失误', 'select': false},
|
|
|
|
{'title': '其他原因', 'select': false},
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
//设置当前客户经理
|
|
|
|
_setCurrManager() {
|
|
|
|
manager = managers.firstWhere((manager) => manager.userName == cusmanText,
|
|
...
|
...
|
@@ -71,6 +114,29 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
detailModel.setReserveCusmnan(context, params);
|
|
|
|
}
|
|
|
|
|
|
|
|
///处理在线预订
|
|
|
|
setReserveStatus(String status, {String tid = "", String desc}) async {
|
|
|
|
// 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": desc,
|
|
|
|
};
|
|
|
|
Map<String, String> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"status": status, //5安排包间 6 拒绝订单
|
|
|
|
"tid": tid,
|
|
|
|
// "mid": widget.mid,
|
|
|
|
"cause": json.encode(causeMap)
|
|
|
|
};
|
|
|
|
bool success =
|
|
|
|
await detailModel.setReserveStatus(context, params, ifPush: false);
|
|
|
|
if (success) {
|
|
|
|
_getReserveDetail();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 取消预订, 变更预订按钮
|
|
|
|
Widget _cancelAndChangeBtn(GestureTapCallback onTap, String title) {
|
|
|
|
return InkWell(
|
|
...
|
...
|
@@ -85,314 +151,487 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///取消预订弹框
|
|
|
|
_showCancelWidget(context) {
|
|
|
|
showGeneralDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierLabel:
|
|
|
|
MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
Animation secondaryAnimation) {
|
|
|
|
return StatefulBuilder(builder: (context, state) {
|
|
|
|
_cancelState = state;
|
|
|
|
return GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
// onTap: () {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// },
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Color.fromRGBO(00, 00, 00, 0.5),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
ScreenUtil().setWidth(paddingTop * 2),
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
ScreenUtil().setWidth(paddingBottom * 2)),
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10)),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Stack(
|
|
|
|
children: [
|
|
|
|
Center(
|
|
|
|
child: Text(
|
|
|
|
'请选择取消原因',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
top: ScreenUtil().setWidth(8),
|
|
|
|
right: ScreenUtil().setWidth(0),
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
_initCancel();
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/message_selected.png',
|
|
|
|
width: ScreenUtil().setWidth(32)),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
Column(
|
|
|
|
children: cancelReasonList.map((value) {
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
for (var item in cancelReasonList) {
|
|
|
|
item['select'] = false;
|
|
|
|
isShowTF = false;
|
|
|
|
paddingBottom = 174;
|
|
|
|
if (item['title'] == value['title']) {
|
|
|
|
item['select'] = true;
|
|
|
|
if (item['title'] == '其他原因') {
|
|
|
|
isShowTF = true;
|
|
|
|
paddingBottom = 130;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
child: Column(children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
value['select']
|
|
|
|
? 'assets/message_selected.png'
|
|
|
|
: 'assets/message_default.png',
|
|
|
|
width: ScreenUtil().setWidth(44)),
|
|
|
|
HEmptyView(30),
|
|
|
|
Text(value['title'],
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
color: MyColours.color_333333))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
value['title'] == '其他原因' && isShowTF
|
|
|
|
? Material(
|
|
|
|
child: Container(
|
|
|
|
color: Colors.white,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(76)),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
controller: _cancelController,
|
|
|
|
focusNode: _cancelNode,
|
|
|
|
textAlignVertical:
|
|
|
|
TextAlignVertical.bottom,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "请填写原因",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
),
|
|
|
|
enabledBorder: UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color:
|
|
|
|
MyColours.color_d8d8d8),
|
|
|
|
),
|
|
|
|
// border: InputBorder.none,
|
|
|
|
),
|
|
|
|
onChanged: (_) {
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_cancelNode.unfocus();
|
|
|
|
},
|
|
|
|
// keyboardType: TextInputType.number,
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: Container(),
|
|
|
|
VEmptyView(40)
|
|
|
|
]),
|
|
|
|
);
|
|
|
|
}).toList(),
|
|
|
|
),
|
|
|
|
VEmptyView(15),
|
|
|
|
Material(
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () {
|
|
|
|
String desc = '';
|
|
|
|
for (var value in cancelReasonList) {
|
|
|
|
if (value['select'] == true) {
|
|
|
|
desc = value['title'];
|
|
|
|
if (value['title'] == '其他原因') {
|
|
|
|
desc = _cancelController.text.trim();
|
|
|
|
if (desc.isEmpty) {
|
|
|
|
Utils.showToast("请填写原因");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (desc == '') {
|
|
|
|
Utils.showToast('请选择原因');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
setReserveStatus('4', desc: desc);
|
|
|
|
},
|
|
|
|
text: '确认',
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
width: ScreenUtil().setWidth(300),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
// TODO: implement build
|
|
|
|
return SafeArea(
|
|
|
|
child: detailEntity == null
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyAppBar(
|
|
|
|
"订座详情",
|
|
|
|
showBack: true,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: DefaultTextStyle(
|
|
|
|
style: TextStyle(decoration: TextDecoration.none),
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(43)),
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText("用餐时段", detailEntity.ddateMd),
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText(
|
|
|
|
"用餐时间", detailEntity.ddateHm),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.type == "0"
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: RowMultiText(
|
|
|
|
"用餐人数", detailEntity.pnum),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Image.asset(
|
|
|
|
detailEntity.statuImgAssets,
|
|
|
|
width: ScreenUtil().setWidth(100),
|
|
|
|
height: ScreenUtil().setWidth(30),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.demands.length <= 0
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Column(
|
|
|
|
return 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,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: DefaultTextStyle(
|
|
|
|
style: TextStyle(decoration: TextDecoration.none),
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(43)),
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText("用餐时段", detailEntity.ddateMd),
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText(
|
|
|
|
"包间需求",
|
|
|
|
(detailEntity.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,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
"用餐时间", detailEntity.ddateHm),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.type == "0"
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: RowMultiText(
|
|
|
|
"用餐人数", detailEntity.pnum),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Image.asset(
|
|
|
|
detailEntity.statuImgAssets,
|
|
|
|
width: ScreenUtil().setWidth(100),
|
|
|
|
height: ScreenUtil().setWidth(30),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.demands.length <= 0
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
RowMultiText(
|
|
|
|
"包间需求",
|
|
|
|
(detailEntity.demands.length
|
|
|
|
.toString() +
|
|
|
|
"个") ??
|
|
|
|
""),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
offstage:
|
|
|
|
detailEntity.demands.length >
|
|
|
|
0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height:
|
|
|
|
ScreenUtil().setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext contxt,
|
|
|
|
int index) {
|
|
|
|
return NeedItem(detailEntity
|
|
|
|
.demands[index]);
|
|
|
|
},
|
|
|
|
itemCount: detailEntity
|
|
|
|
.demands.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
"预订桌位",
|
|
|
|
(detailEntity.tables.length.toString() +
|
|
|
|
"个")),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
offstage:
|
|
|
|
detailEntity.tables.length > 0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder: (BuildContext contxt,
|
|
|
|
int index) {
|
|
|
|
return TableItem(
|
|
|
|
detailEntity.tables[index]);
|
|
|
|
},
|
|
|
|
itemCount:
|
|
|
|
detailEntity.tables.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
"预订桌位",
|
|
|
|
(detailEntity.tables.length.toString() +
|
|
|
|
"个")),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: detailEntity.tables.length > 0
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setHeight(210),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemBuilder: (BuildContext contxt,
|
|
|
|
int index) {
|
|
|
|
return TableItem(
|
|
|
|
detailEntity.tables[index]);
|
|
|
|
},
|
|
|
|
itemCount:
|
|
|
|
detailEntity.tables.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
RowMultiText("客户姓名", detailEntity.rnameStr),
|
|
|
|
RowMultiText(
|
|
|
|
"客户电话", detailEntity.phone ?? ""),
|
|
|
|
RowMultiText(
|
|
|
|
"备注信息", detailEntity.cusdem ?? ""),
|
|
|
|
MyDivider(double.infinity,
|
|
|
|
ScreenUtil().setHeight(1)),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setHeight(80),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
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,
|
|
|
|
child: Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
child: Text(
|
|
|
|
"客户经理",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_828282,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30)),
|
|
|
|
),
|
|
|
|
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);
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: 0,
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () async {
|
|
|
|
List<String> list = [];
|
|
|
|
for (Manager manager
|
|
|
|
in managers) {
|
|
|
|
list.add(manager.roleUserName);
|
|
|
|
}
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, list)
|
|
|
|
.then((value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
cusmanText =
|
|
|
|
managers[value.first]
|
|
|
|
.userName;
|
|
|
|
});
|
|
|
|
_setCurrManager();
|
|
|
|
}
|
|
|
|
DialogUtil
|
|
|
|
.showSelectCusmanDialog(
|
|
|
|
context, list)
|
|
|
|
.then((value) {
|
|
|
|
if (value != null) {
|
|
|
|
setState(() {
|
|
|
|
cusmanText =
|
|
|
|
managers[value.first]
|
|
|
|
.userName;
|
|
|
|
});
|
|
|
|
_setCurrManager();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
cusmanText,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30),
|
|
|
|
decoration:
|
|
|
|
TextDecoration.underline,
|
|
|
|
),
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
cusmanText,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30),
|
|
|
|
decoration:
|
|
|
|
TextDecoration.underline,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
"记录人", detailEntity.note_name ?? ""),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "4" &&
|
|
|
|
detailEntity.cancel != null)
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyDivider(double.infinity,
|
|
|
|
ScreenUtil().setHeight(2)),
|
|
|
|
RowMultiText("取消原因",
|
|
|
|
detailEntity.cancel?.desc ?? ""),
|
|
|
|
RowMultiText(
|
|
|
|
"取消时间",
|
|
|
|
detailEntity.cancel?.cdateStr ??
|
|
|
|
""),
|
|
|
|
RowMultiText("操作人",
|
|
|
|
detailEntity.cancel?.uname ?? ""),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
"记录人", detailEntity.note_name ?? ""),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "4" &&
|
|
|
|
detailEntity.cancel != null)
|
|
|
|
? false
|
|
|
|
: true,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyDivider(double.infinity,
|
|
|
|
ScreenUtil().setHeight(2)),
|
|
|
|
RowMultiText("取消原因",
|
|
|
|
detailEntity.cancel?.desc ?? "",
|
|
|
|
textAlign: TextAlign.left),
|
|
|
|
RowMultiText(
|
|
|
|
"取消时间",
|
|
|
|
detailEntity.cancel?.cdateStr ??
|
|
|
|
""),
|
|
|
|
RowMultiText("操作人",
|
|
|
|
detailEntity.cancel?.uname ?? ""),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(
|
|
|
|
color: MyColours.color_dbe3e3,
|
|
|
|
width: ScreenUtil().setWidth(1)))),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setHeight(20)),
|
|
|
|
child: CommonButton(
|
|
|
|
content: "通知客户",
|
|
|
|
width: 669,
|
|
|
|
height: 80,
|
|
|
|
fontSize: 34,
|
|
|
|
onPress: () {
|
|
|
|
DialogUtil.showShareDialog(context)?.then((value) {
|
|
|
|
switch (value) {
|
|
|
|
case 1: //微信
|
|
|
|
NavigatorUtil.goInvicationPage(
|
|
|
|
context,
|
|
|
|
detailEntity.id,
|
|
|
|
detailEntity.tableinfoStr,
|
|
|
|
detailEntity.ddate,
|
|
|
|
detailEntity.ddateStr);
|
|
|
|
break;
|
|
|
|
case 2: //短信
|
|
|
|
NavigatorUtil.goSmsPage(
|
|
|
|
context, detailEntity.id);
|
|
|
|
break;
|
|
|
|
case 3: //电话
|
|
|
|
if (detailEntity.phone != null &&
|
|
|
|
detailEntity.phone.isNotEmpty) {
|
|
|
|
Utils.goPhone(detailEntity.phone);
|
|
|
|
} else {
|
|
|
|
Utils.showToast("没有客户电话!");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(
|
|
|
|
color: MyColours.color_dbe3e3,
|
|
|
|
width: ScreenUtil().setWidth(1)))),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setHeight(20)),
|
|
|
|
child: CommonButton(
|
|
|
|
content: "通知客户",
|
|
|
|
width: 669,
|
|
|
|
height: 80,
|
|
|
|
fontSize: 34,
|
|
|
|
onPress: () {
|
|
|
|
DialogUtil.showShareDialog(context)?.then((value) {
|
|
|
|
switch (value) {
|
|
|
|
case 1: //微信
|
|
|
|
NavigatorUtil.goInvicationPage(
|
|
|
|
context,
|
|
|
|
detailEntity.id,
|
|
|
|
detailEntity.tableinfoStr,
|
|
|
|
detailEntity.ddate,
|
|
|
|
detailEntity.ddateStr);
|
|
|
|
break;
|
|
|
|
case 2: //短信
|
|
|
|
NavigatorUtil.goSmsPage(context, detailEntity.id);
|
|
|
|
break;
|
|
|
|
case 3: //电话
|
|
|
|
if (detailEntity.phone != null &&
|
|
|
|
detailEntity.phone.isNotEmpty) {
|
|
|
|
Utils.goPhone(detailEntity.phone);
|
|
|
|
} else {
|
|
|
|
Utils.showToast("没有客户电话!");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(5)),
|
|
|
|
),
|
|
|
|
// child: Text('fff'),
|
|
|
|
child: Material(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击变更预订');
|
|
|
|
}, '变更预订')),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击取消预订');
|
|
|
|
}, '取消预订')),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: (detailEntity.status == "3" ||
|
|
|
|
detailEntity.status == "4" ||
|
|
|
|
detailEntity.status == "6")
|
|
|
|
? true
|
|
|
|
: false,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(5)),
|
|
|
|
),
|
|
|
|
// child: Text('fff'),
|
|
|
|
child: Material(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击变更预订');
|
|
|
|
}, '变更预订')),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
}, '取消预订')),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
VEmptyView(ScreenUtil().setWidth(60))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(ScreenUtil().setWidth(60))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|