|
|
|
@ -27,7 +27,8 @@ class SpecifyPhonePage extends StatefulWidget {
|
|
|
|
|
class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
final EasyRefreshController _refreshController = EasyRefreshController();
|
|
|
|
|
List<ExcludePhoneModel> findList = [];
|
|
|
|
|
|
|
|
|
|
String name="";
|
|
|
|
|
String phone="";
|
|
|
|
|
@override
|
|
|
|
|
void dispose() {
|
|
|
|
|
_refreshController.dispose();
|
|
|
|
@ -136,13 +137,13 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
_getNum() {
|
|
|
|
|
return ListView.builder(
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return _getNumContant(findList[index]);
|
|
|
|
|
return _getNumContant(findList[index],findList[index].id);
|
|
|
|
|
},
|
|
|
|
|
itemCount: findList.length,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_getNumContant(ExcludePhoneModel item) {
|
|
|
|
|
_getNumContant(ExcludePhoneModel item,int id) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
|
|
|
child: ListTile(
|
|
|
|
@ -181,7 +182,10 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
placeholderStyle:
|
|
|
|
|
const TextStyle(color: BaseStyle.color333333),
|
|
|
|
|
placeholder: item.remark,
|
|
|
|
|
onChanged: (value) {},
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
name=value;
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
20.hb,
|
|
|
|
|
Text(
|
|
|
|
@ -202,7 +206,10 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
// ),
|
|
|
|
|
color: const Color(0xFFF9F9F9)),
|
|
|
|
|
placeholder: item.phone,
|
|
|
|
|
onChanged: (value) {},
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
phone=value;
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
82.hb,
|
|
|
|
|
// _getUpdate("爸爸", "123123123"),
|
|
|
|
@ -211,7 +218,12 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
border: true,
|
|
|
|
|
color1: const Color(0xFF1890FF),
|
|
|
|
|
color2: const Color(0xFF74BCFF),
|
|
|
|
|
onTap: () {},
|
|
|
|
|
onTap: () async{
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
var res=await ExcludeFunc.getUpdate(id, phone, item.remark.isEmpty?name:item.remark);
|
|
|
|
|
_refreshController.callRefresh();
|
|
|
|
|
print(res);
|
|
|
|
|
},
|
|
|
|
|
text: "保存",
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
@ -222,7 +234,7 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
title: Text(
|
|
|
|
|
item.phone,
|
|
|
|
|
item.remark.isEmpty? item.phone:item.remark,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 32.sp,
|
|
|
|
|
color: BaseStyle.color333333,
|
|
|
|
@ -236,8 +248,9 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
|
|
|
|
side: MaterialStateProperty.all(
|
|
|
|
|
BorderSide(width: 2.w, color: const Color(0xFFE8E8E8)))),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
print(id);
|
|
|
|
|
var res =
|
|
|
|
|
await apiClient.request(API.exclude.find, data: {item.id});
|
|
|
|
|
await apiClient.request(API.exclude.delete, data: {"id":id});
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
_refreshController.callRefresh();
|
|
|
|
|
CloudToast.show(res.msg);
|
|
|
|
|