Commit 4851e52fd805a6694c9a82b8e2e9854ab04ba0bd

Authored by wdn127929
2 parents e84e8ac6 8db668e9

Merge branch 'v5.1.2+' into v5.1.4+

@@ -10,6 +10,7 @@ import 'package:one_key/utils/dialog_util.dart'; @@ -10,6 +10,7 @@ import 'package:one_key/utils/dialog_util.dart';
10 import 'package:one_key/utils/event_bus.dart'; 10 import 'package:one_key/utils/event_bus.dart';
11 import 'package:one_key/utils/misc.dart'; 11 import 'package:one_key/utils/misc.dart';
12 import 'package:one_key/utils/utils.dart'; 12 import 'package:one_key/utils/utils.dart';
  13 +import 'package:one_key/widgets/h_empty_view.dart';
13 import 'package:one_key/widgets/round_button.dart'; 14 import 'package:one_key/widgets/round_button.dart';
14 import 'package:one_key/widgets/system_app_bar.dart'; 15 import 'package:one_key/widgets/system_app_bar.dart';
15 import 'package:one_key/widgets/v_empty_view.dart'; 16 import 'package:one_key/widgets/v_empty_view.dart';
@@ -47,6 +48,7 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -47,6 +48,7 @@ class _EditReserverPageState extends State<EditReserverPage> {
47 48
48 ScrollController _scrollCrl = ScrollController(); 49 ScrollController _scrollCrl = ScrollController();
49 50
  51 +
50 @override 52 @override
51 void initState() { 53 void initState() {
52 super.initState(); 54 super.initState();
@@ -265,6 +267,18 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -265,6 +267,18 @@ class _EditReserverPageState extends State<EditReserverPage> {
265 } else { 267 } else {
266 nameStr = value; 268 nameStr = value;
267 } 269 }
  270 + setState(() {
  271 + showPhoneHistory = true;
  272 + });
  273 + Map<String, String> params = {
  274 + "keywords": value,
  275 + "sid": Provider.of<UserModel>(context,
  276 + listen: false)
  277 + .user
  278 + .sellerid,
  279 + };
  280 + detailModel.getUserHistorys(
  281 + context, params);
268 }, 282 },
269 onEditingComplete: () { 283 onEditingComplete: () {
270 print('fff'); 284 print('fff');
@@ -688,7 +702,16 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -688,7 +702,16 @@ class _EditReserverPageState extends State<EditReserverPage> {
688 .spaceBetween, 702 .spaceBetween,
689 children: [ 703 children: [
690 Text( 704 Text(
691 - detailModel 705 + _nameNode.hasFocus ? ( detailModel
  706 + .userHistorys[
  707 + index]
  708 + .rnameStr ==
  709 + null
  710 + ? ''
  711 + : detailModel
  712 + .userHistorys[
  713 + index]
  714 + .rnameStr): ( detailModel
692 .userHistorys[ 715 .userHistorys[
693 index] 716 index]
694 .phone == 717 .phone ==
@@ -697,7 +720,7 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -697,7 +720,7 @@ class _EditReserverPageState extends State<EditReserverPage> {
697 : detailModel 720 : detailModel
698 .userHistorys[ 721 .userHistorys[
699 index] 722 index]
700 - .phone, 723 + .phone),
701 style: TextStyle( 724 style: TextStyle(
702 color: MyColours 725 color: MyColours
703 .color_333333, 726 .color_333333,
@@ -705,9 +728,19 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -705,9 +728,19 @@ class _EditReserverPageState extends State<EditReserverPage> {
705 ScreenUtil() 728 ScreenUtil()
706 .setSp(32)), 729 .setSp(32)),
707 ), 730 ),
  731 + HEmptyView(20),
708 Expanded( 732 Expanded(
709 child: Text( 733 child: Text(
710 - detailModel 734 + _nameNode.hasFocus ?(detailModel
  735 + .userHistorys[
  736 + index]
  737 + .phone ==
  738 + null
  739 + ? ''
  740 + : detailModel
  741 + .userHistorys[
  742 + index]
  743 + .phone):( detailModel
711 .userHistorys[ 744 .userHistorys[
712 index] 745 index]
713 .rnameStr == 746 .rnameStr ==
@@ -716,7 +749,7 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -716,7 +749,7 @@ class _EditReserverPageState extends State<EditReserverPage> {
716 : detailModel 749 : detailModel
717 .userHistorys[ 750 .userHistorys[
718 index] 751 index]
719 - .rnameStr, 752 + .rnameStr) ,
720 style: TextStyle( 753 style: TextStyle(
721 color: MyColours 754 color: MyColours
722 .color_333333, 755 .color_333333,
@@ -1577,6 +1577,25 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> { @@ -1577,6 +1577,25 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> {
1577 } else { 1577 } else {
1578 nameStr = value; 1578 nameStr = value;
1579 } 1579 }
  1580 + Map<String, String> params = {
  1581 + "keywords": value,
  1582 + "sid": Provider.of<UserModel>(
  1583 + context,
  1584 + listen: false)
  1585 + .user
  1586 + .sellerid,
  1587 + };
  1588 + _notebookDetailChangeModel
  1589 + .getUserHistorys(
  1590 + context, params);
  1591 + },
  1592 + onTap: () {
  1593 + setState(() {
  1594 + showPhoneHistory = true;
  1595 + });
  1596 + // Future.delayed(Duration(milliseconds: 300), () {
  1597 + // _controller.jumpTo(_controller.position.maxScrollExtent);
  1598 + // });
1580 }, 1599 },
1581 onEditingComplete: () { 1600 onEditingComplete: () {
1582 print('fff'); 1601 print('fff');
@@ -1957,20 +1976,29 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> { @@ -1957,20 +1976,29 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> {
1957 .spaceBetween, 1976 .spaceBetween,
1958 children: [ 1977 children: [
1959 Text( 1978 Text(
1960 - _notebookDetailChangeModel  
1961 - .userHistorys[index]  
1962 - .phone, 1979 + _nameNode.hasFocus
  1980 + ? _notebookDetailChangeModel
  1981 + .userHistorys[index]
  1982 + .rnameStr
  1983 + : _notebookDetailChangeModel
  1984 + .userHistorys[index]
  1985 + .phone,
1963 style: TextStyle( 1986 style: TextStyle(
1964 color: MyColours 1987 color: MyColours
1965 .color_333333, 1988 .color_333333,
1966 fontSize: ScreenUtil() 1989 fontSize: ScreenUtil()
1967 .setSp(32)), 1990 .setSp(32)),
1968 ), 1991 ),
  1992 + HEmptyView(20),
1969 Expanded( 1993 Expanded(
1970 child: Text( 1994 child: Text(
1971 - _notebookDetailChangeModel  
1972 - .userHistorys[index]  
1973 - .rnameStr, 1995 + _nameNode.hasFocus
  1996 + ? _notebookDetailChangeModel
  1997 + .userHistorys[index]
  1998 + .phone
  1999 + : _notebookDetailChangeModel
  2000 + .userHistorys[index]
  2001 + .rnameStr,
1974 style: TextStyle( 2002 style: TextStyle(
1975 color: MyColours 2003 color: MyColours
1976 .color_333333, 2004 .color_333333,
@@ -2088,6 +2088,7 @@ class InvicationPageState extends State<InvicationPage> @@ -2088,6 +2088,7 @@ class InvicationPageState extends State<InvicationPage>
2088 children: [ 2088 children: [
2089 Column( 2089 Column(
2090 crossAxisAlignment: CrossAxisAlignment.start, 2090 crossAxisAlignment: CrossAxisAlignment.start,
  2091 + mainAxisSize: MainAxisSize.max,
2091 children: [ 2092 children: [
2092 //姓名 2093 //姓名
2093 if (enterMore) 2094 if (enterMore)
@@ -2137,6 +2138,23 @@ class InvicationPageState extends State<InvicationPage> @@ -2137,6 +2138,23 @@ class InvicationPageState extends State<InvicationPage>
2137 print('ggg'); 2138 print('ggg');
2138 2139
2139 nameStr = value; 2140 nameStr = value;
  2141 + Map<String, String> params = {
  2142 + "keywords": value.trim(),
  2143 + "sid": Provider.of<UserModel>(context,
  2144 + listen: false)
  2145 + .user
  2146 + .sellerid,
  2147 + };
  2148 + _baseIndoProvider.getUserHistorys(
  2149 + context, params);
  2150 + },
  2151 + onTap: () {
  2152 + setState(() {
  2153 + showPhoneHistory = true;
  2154 + });
  2155 + // Future.delayed(Duration(milliseconds: 300), () {
  2156 + // _controller.jumpTo(_controller.position.maxScrollExtent);
  2157 + // });
2140 }, 2158 },
2141 onEditingComplete: () { 2159 onEditingComplete: () {
2142 print('fff'); 2160 print('fff');
@@ -2423,7 +2441,7 @@ class InvicationPageState extends State<InvicationPage> @@ -2423,7 +2441,7 @@ class InvicationPageState extends State<InvicationPage>
2423 ), 2441 ),
2424 if (enterMore) 2442 if (enterMore)
2425 Positioned( 2443 Positioned(
2426 - top: 0, 2444 + top: _nameNode.hasFocus ? w(60) : 0,
2427 left: 0, 2445 left: 0,
2428 child: Offstage( 2446 child: Offstage(
2429 offstage: !(showPhoneHistory && 2447 offstage: !(showPhoneHistory &&
@@ -2445,7 +2463,7 @@ class InvicationPageState extends State<InvicationPage> @@ -2445,7 +2463,7 @@ class InvicationPageState extends State<InvicationPage>
2445 // : ScreenUtil().setWidth(104), 2463 // : ScreenUtil().setWidth(104),
2446 width: ScreenUtil().screenWidth - w(60), 2464 width: ScreenUtil().screenWidth - w(60),
2447 // width: ScreenUtil().setWidth(350), 2465 // width: ScreenUtil().setWidth(350),
2448 - constraints: BoxConstraints(maxHeight: w(270)), 2466 + constraints: BoxConstraints(maxHeight: w(220)),
2449 padding: EdgeInsets.symmetric( 2467 padding: EdgeInsets.symmetric(
2450 horizontal: ScreenUtil().setWidth(30)), 2468 horizontal: ScreenUtil().setWidth(30)),
2451 child: Align( 2469 child: Align(
@@ -2478,7 +2496,7 @@ class InvicationPageState extends State<InvicationPage> @@ -2478,7 +2496,7 @@ class InvicationPageState extends State<InvicationPage>
2478 }, 2496 },
2479 child: Container( 2497 child: Container(
2480 width: double.infinity, 2498 width: double.infinity,
2481 - height: ScreenUtil().setWidth(102), 2499 + height: ScreenUtil().setWidth(100),
2482 decoration: BoxDecoration( 2500 decoration: BoxDecoration(
2483 border: Border( 2501 border: Border(
2484 bottom: (index != 2502 bottom: (index !=
@@ -2501,30 +2519,53 @@ class InvicationPageState extends State<InvicationPage> @@ -2501,30 +2519,53 @@ class InvicationPageState extends State<InvicationPage>
2501 MainAxisAlignment.spaceBetween, 2519 MainAxisAlignment.spaceBetween,
2502 children: [ 2520 children: [
2503 Text( 2521 Text(
2504 - _baseIndoProvider 2522 + _nameNode.hasFocus
  2523 + ? (_baseIndoProvider
  2524 + .userHistorys[
  2525 + index]
  2526 + .rname ==
  2527 + null
  2528 + ? ''
  2529 + : _baseIndoProvider
  2530 + .userHistorys[index]
  2531 + .rnameStr)
  2532 + : (_baseIndoProvider
  2533 + .userHistorys[
  2534 + index]
  2535 + .phone ==
  2536 + null
  2537 + ? ''
  2538 + : _baseIndoProvider
2505 .userHistorys[index] 2539 .userHistorys[index]
2506 - .phone ==  
2507 - null  
2508 - ? ''  
2509 - : _baseIndoProvider  
2510 - .userHistorys[index]  
2511 - .phone, 2540 + .phone),
2512 style: TextStyle( 2541 style: TextStyle(
2513 color: 2542 color:
2514 MyColours.color_333333, 2543 MyColours.color_333333,
2515 fontSize: 2544 fontSize:
2516 ScreenUtil().setSp(32)), 2545 ScreenUtil().setSp(32)),
2517 ), 2546 ),
  2547 + HEmptyView(20),
2518 Expanded( 2548 Expanded(
2519 child: Text( 2549 child: Text(
2520 - _baseIndoProvider 2550 + _nameNode.hasFocus
  2551 + ? (_baseIndoProvider
  2552 + .userHistorys[
  2553 + index]
  2554 + .phone ==
  2555 + null
  2556 + ? ''
  2557 + : _baseIndoProvider
  2558 + .userHistorys[index]
  2559 + .phone)
  2560 + : (_baseIndoProvider
  2561 + .userHistorys[
  2562 + index]
  2563 + .rname ==
  2564 + null
  2565 + ? ''
  2566 + : _baseIndoProvider
2521 .userHistorys[index] 2567 .userHistorys[index]
2522 - .rname ==  
2523 - null  
2524 - ? ''  
2525 - : _baseIndoProvider  
2526 - .userHistorys[index]  
2527 - .rnameStr, 2568 + .rnameStr),
2528 style: TextStyle( 2569 style: TextStyle(
2529 color: 2570 color:
2530 MyColours.color_333333, 2571 MyColours.color_333333,
@@ -948,6 +948,18 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -948,6 +948,18 @@ class TableManagerPageState extends State<TableManagerPage> {
948 print('ggg'); 948 print('ggg');
949 949
950 nameStr = value; 950 nameStr = value;
  951 + setState(() {
  952 + showPhoneHistory = true;
  953 + });
  954 + Map<String, String> params = {
  955 + "keywords": value,
  956 + "sid": Provider.of<UserModel>(context,
  957 + listen: false)
  958 + .user
  959 + .sellerid,
  960 + };
  961 + _baseIndoProvider.getUserHistorys(
  962 + context, params);
951 }, 963 },
952 onEditingComplete: () { 964 onEditingComplete: () {
953 print('fff'); 965 print('fff');
@@ -1218,7 +1230,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -1218,7 +1230,7 @@ class TableManagerPageState extends State<TableManagerPage> {
1218 ], 1230 ],
1219 ), 1231 ),
1220 Positioned( 1232 Positioned(
1221 - top: 0, 1233 + top: _nameNode.hasFocus ? w(60) : 0,
1222 left: 0, 1234 left: 0,
1223 child: Offstage( 1235 child: Offstage(
1224 offstage: !(showPhoneHistory && 1236 offstage: !(showPhoneHistory &&
@@ -1328,32 +1340,57 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -1328,32 +1340,57 @@ class TableManagerPageState extends State<TableManagerPage> {
1328 .spaceBetween, 1340 .spaceBetween,
1329 children: [ 1341 children: [
1330 Text( 1342 Text(
1331 - _baseIndoProvider 1343 + _nameNode.hasFocus
  1344 + ? (_baseIndoProvider
  1345 + .userHistorys[
  1346 + index]
  1347 + .rname ==
  1348 + null
  1349 + ? ''
  1350 + : _baseIndoProvider
1332 .userHistorys[ 1351 .userHistorys[
1333 index] 1352 index]
1334 - .phone ==  
1335 - null  
1336 - ? ''  
1337 - : _baseIndoProvider  
1338 - .userHistorys[index]  
1339 - .phone, 1353 + .rnameStr)
  1354 + : (_baseIndoProvider
  1355 + .userHistorys[
  1356 + index]
  1357 + .phone ==
  1358 + null
  1359 + ? ''
  1360 + : _baseIndoProvider
  1361 + .userHistorys[
  1362 + index]
  1363 + .phone),
1340 style: TextStyle( 1364 style: TextStyle(
1341 color: MyColours 1365 color: MyColours
1342 .color_333333, 1366 .color_333333,
1343 fontSize: ScreenUtil() 1367 fontSize: ScreenUtil()
1344 .setSp(32)), 1368 .setSp(32)),
1345 ), 1369 ),
  1370 + HEmptyView(20),
1346 Expanded( 1371 Expanded(
1347 child: Text( 1372 child: Text(
1348 - _baseIndoProvider 1373 + _nameNode.hasFocus
  1374 + ? (_baseIndoProvider
  1375 + .userHistorys[
  1376 + index]
  1377 + .phone ==
  1378 + null
  1379 + ? ''
  1380 + : _baseIndoProvider
1349 .userHistorys[ 1381 .userHistorys[
1350 index] 1382 index]
1351 - .rname ==  
1352 - null  
1353 - ? ''  
1354 - : _baseIndoProvider  
1355 - .userHistorys[index]  
1356 - .rnameStr, 1383 + .phone)
  1384 + : (_baseIndoProvider
  1385 + .userHistorys[
  1386 + index]
  1387 + .rname ==
  1388 + null
  1389 + ? ''
  1390 + : _baseIndoProvider
  1391 + .userHistorys[
  1392 + index]
  1393 + .rnameStr),
1357 style: TextStyle( 1394 style: TextStyle(
1358 color: MyColours 1395 color: MyColours
1359 .color_333333, 1396 .color_333333,