|
...
|
...
|
@@ -21,6 +21,8 @@ import 'package:one_key/widgets/v_empty_view.dart'; |
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:one_key/utils/event_bus.dart';
|
|
|
|
|
|
|
|
import '../../app.dart';
|
|
|
|
|
|
|
|
class HandleOnlinePage extends StatefulWidget {
|
|
|
|
final String rid;
|
|
|
|
final String mid;
|
|
...
|
...
|
@@ -45,6 +47,10 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
|
|
|
|
Manager manager = Manager();
|
|
|
|
|
|
|
|
bool isCallTel=false;
|
|
|
|
|
|
|
|
String formatPhone="";//格式客户号码
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
// TODO: implement initState
|
|
...
|
...
|
@@ -56,6 +62,15 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
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"){
|
|
|
|
isCallTel=true;
|
|
|
|
}else{
|
|
|
|
isCallTel=false;
|
|
|
|
if(detailEntity.phone.isNotEmpty&&detailEntity.phone.length==11&&(detailEntity.status=="0"||detailEntity.status=="6")){
|
|
|
|
formatPhone=detailEntity.phone.substring(0,3)+"****"+detailEntity.phone.substring(7);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
if (detailEntity.status != "0") {
|
|
|
|
//已处理
|
|
...
|
...
|
@@ -68,6 +83,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
managers = await detailModel.getManagers(context);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//设置当前客户经理
|
|
...
|
...
|
@@ -148,7 +164,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
};
|
|
|
|
bool success =
|
|
|
|
await detailModel.setReserveStatus(context, params, showLoading: true);
|
|
|
|
if (success) {
|
|
|
|
if (success!=null&&success) {
|
|
|
|
bus.emit("refresh_book_list");
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -164,9 +180,12 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
detailModel.setMessageStatus(context, params);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
// TODO: implement build
|
|
|
|
|
|
|
|
return SafeArea(
|
|
|
|
child: WillPopScope(
|
|
|
|
child: detailEntity == null
|
|
...
|
...
|
@@ -268,7 +287,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
RowMultiText(
|
|
|
|
"客户姓名", detailEntity.rnameStr),
|
|
|
|
RowMultiText(
|
|
|
|
"客户电话", detailEntity.phone),
|
|
|
|
"客户电话", formatPhone),
|
|
|
|
RowMultiText("备注信息",
|
|
|
|
detailEntity.cusdem ?? ""),
|
|
|
|
MyDivider(double.infinity,
|
|
...
|
...
|
@@ -357,7 +376,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
int.parse(detailEntity.ddate) *
|
|
|
|
1000,
|
|
|
|
detailEntity.ddate_solt);
|
|
|
|
if (map['tid'] != null) {
|
|
|
|
if (map!=null&&map['tid'] != null) {
|
|
|
|
setReserveStatus("5",
|
|
|
|
tid: map['tid']);
|
|
|
|
}
|
|
...
|
...
|
@@ -393,34 +412,42 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { |
|
|
|
_showRefuseDialog();
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setHeight(52),
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: GestureDetector(
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
"联系顾客",
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_199095,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(34)),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: !isCallTel,
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setHeight(52),
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
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("没有客户电话!");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
...
|
...
|
|