Commit 8fffad9a8d82835dbf4326b045f8a86af886cc55

Authored by “gaiyaguang”
1 parent d9f38c1f

合并

@@ -180,6 +180,7 @@ class DioUtil { @@ -180,6 +180,7 @@ class DioUtil {
180 } 180 }
181 if (showLoading) Loading.showLoading(context); 181 if (showLoading) Loading.showLoading(context);
182 try { 182 try {
  183 + print('--------' + path + '---------');
183 Response response = await _dio.request(path, 184 Response response = await _dio.request(path,
184 data: data, 185 data: data,
185 options: _checkOptions(method, options), 186 options: _checkOptions(method, options),
@@ -413,8 +414,8 @@ class DioUtil { @@ -413,8 +414,8 @@ class DioUtil {
413 Options options = new Options(); 414 Options options = new Options();
414 options.contentType = 415 options.contentType =
415 ContentType.parse("application/x-www-form-urlencoded"); 416 ContentType.parse("application/x-www-form-urlencoded");
416 - options.connectTimeout = 1000 * 10;//默认10s  
417 - options.receiveTimeout = 1000 * 10;//默认10s 417 + options.connectTimeout = 1000 * 10; //默认10s
  418 + options.receiveTimeout = 1000 * 10; //默认10s
418 return options; 419 return options;
419 } 420 }
420 } 421 }
@@ -47,9 +47,9 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -47,9 +47,9 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
47 47
48 Manager manager = Manager(); 48 Manager manager = Manager();
49 49
50 - bool isCallTel=false; 50 + bool isCallTel = false;
51 51
52 - String formatPhone="";//格式客户号码 52 + String formatPhone = ""; //格式客户号码
53 53
54 @override 54 @override
55 void initState() { 55 void initState() {
@@ -62,13 +62,18 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -62,13 +62,18 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
62 setState(() { 62 setState(() {
63 //未处理 63 //未处理
64 cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman; 64 cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
65 - formatPhone=detailEntity.phone;  
66 - if(App.sp.getString("is_call_tel")!=null&&App.sp.getString("is_call_tel")=="1"){  
67 - isCallTel=true;  
68 - }else{  
69 - isCallTel=false;  
70 - if(detailEntity.phone.isNotEmpty&&detailEntity.phone.length==11&&(detailEntity.status=="0"||detailEntity.status=="6")){  
71 - formatPhone=detailEntity.phone.substring(0,3)+"****"+detailEntity.phone.substring(7); 65 + formatPhone = detailEntity.phone;
  66 + if (App.sp.getString("is_call_tel") != null &&
  67 + App.sp.getString("is_call_tel") == "1") {
  68 + isCallTel = true;
  69 + } else {
  70 + isCallTel = false;
  71 + if (detailEntity.phone.isNotEmpty &&
  72 + detailEntity.phone.length == 11 &&
  73 + (detailEntity.status == "0" || detailEntity.status == "6")) {
  74 + formatPhone = detailEntity.phone.substring(0, 3) +
  75 + "****" +
  76 + detailEntity.phone.substring(7);
72 } 77 }
73 } 78 }
74 }); 79 });
@@ -83,7 +88,6 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -83,7 +88,6 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
83 managers = await detailModel.getManagers(context); 88 managers = await detailModel.getManagers(context);
84 } 89 }
85 }); 90 });
86 -  
87 } 91 }
88 92
89 //设置当前客户经理 93 //设置当前客户经理
@@ -164,7 +168,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -164,7 +168,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
164 }; 168 };
165 bool success = 169 bool success =
166 await detailModel.setReserveStatus(context, params, showLoading: true); 170 await detailModel.setReserveStatus(context, params, showLoading: true);
167 - if (success!=null&&success) { 171 + if (success != null && success) {
168 bus.emit("refresh_book_list"); 172 bus.emit("refresh_book_list");
169 } 173 }
170 } 174 }
@@ -180,8 +184,6 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -180,8 +184,6 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
180 detailModel.setMessageStatus(context, params); 184 detailModel.setMessageStatus(context, params);
181 } 185 }
182 186
183 -  
184 -  
185 @override 187 @override
186 Widget build(BuildContext context) { 188 Widget build(BuildContext context) {
187 // TODO: implement build 189 // TODO: implement build
@@ -286,8 +288,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -286,8 +288,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
286 )), 288 )),
287 RowMultiText( 289 RowMultiText(
288 "客户姓名", detailEntity.rnameStr), 290 "客户姓名", detailEntity.rnameStr),
289 - RowMultiText(  
290 - "客户电话", formatPhone), 291 + RowMultiText("客户电话", formatPhone),
291 RowMultiText("备注信息", 292 RowMultiText("备注信息",
292 detailEntity.cusdem ?? ""), 293 detailEntity.cusdem ?? ""),
293 MyDivider(double.infinity, 294 MyDivider(double.infinity,
@@ -376,7 +377,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -376,7 +377,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
376 int.parse(detailEntity.ddate) * 377 int.parse(detailEntity.ddate) *
377 1000, 378 1000,
378 detailEntity.ddate_solt); 379 detailEntity.ddate_solt);
379 - if (map!=null&&map['tid'] != null) { 380 + if (map != null && map['tid'] != null) {
380 setReserveStatus("5", 381 setReserveStatus("5",
381 tid: map['tid']); 382 tid: map['tid']);
382 } 383 }
@@ -424,27 +425,29 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -424,27 +425,29 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
424 ), 425 ),
425 Expanded( 426 Expanded(
426 child: GestureDetector( 427 child: GestureDetector(
427 - child: Center(  
428 - child: Text(  
429 - "联系顾客",  
430 - style: TextStyle(  
431 - color:  
432 - MyColours.color_199095,  
433 - fontSize:  
434 - ScreenUtil().setSp(34)),  
435 - ),  
436 - ),  
437 - onTap: () {  
438 - if (detailEntity.phone != null &&  
439 - detailEntity  
440 - .phone.isNotEmpty) {  
441 - Utils.goPhone(  
442 - detailEntity.phone);  
443 - } else {  
444 - Utils.showToast("没有客户电话!");  
445 - }  
446 - },  
447 - )), 428 + child: Center(
  429 + child: Text(
  430 + "联系顾客",
  431 + style: TextStyle(
  432 + color: MyColours
  433 + .color_199095,
  434 + fontSize: ScreenUtil()
  435 + .setSp(34)),
  436 + ),
  437 + ),
  438 + onTap: () {
  439 + if (detailEntity.phone !=
  440 + null &&
  441 + detailEntity
  442 + .phone.isNotEmpty) {
  443 + Utils.goPhone(
  444 + detailEntity.phone);
  445 + } else {
  446 + Utils.showToast(
  447 + "没有客户电话!");
  448 + }
  449 + },
  450 + )),
448 ], 451 ],
449 ), 452 ),
450 ) 453 )