Commit efc9cf8f2694b9c91f35c623d575a6f03d6b5f1a

Authored by wdn127929
1 parent ac8d74e3

客情筛选+未分配UI

... ... @@ -119,9 +119,14 @@ class _MyCustomerListPageState extends State<MyCustomerListPage>
_filterLabelList() async {
await customerProvider.getLabelBySellerid(context);
customerProvider.filterLabelList = [];
FilterBtnModel model = FilterBtnModel();
model.title = '未标记客户';
// model.id = item.id;
model.select = false;
customerProvider.filterLabelList.add(model);
if (customerProvider.labelList != null &&
customerProvider.labelList.length > 0) {
customerProvider.filterLabelList = [];
for (CustomerLabelSunModel item in customerProvider.labelList) {
FilterBtnModel model = FilterBtnModel();
model.title = item.label;
... ...
... ... @@ -139,6 +139,11 @@ class _CustomerListPageState extends State<CustomerListPage>
StoreCustomerHomeSunModel model =
await customerProvider.getSellerGuestManage(context);
customerProvider.filterManageList = [];
FilterBtnModel model1 = FilterBtnModel();
// model.id = item.id;
model1.title = '未分配经理';
model1.select = false;
customerProvider.filterManageList.add(model1);
if (model != null &&
model.sellerUser != null &&
model.sellerUser.length > 0) {
... ... @@ -169,6 +174,11 @@ class _CustomerListPageState extends State<CustomerListPage>
if (customerProvider.labelList != null &&
customerProvider.labelList.length > 0) {
customerProvider.filterLabelList = [];
FilterBtnModel model = FilterBtnModel();
model.title = '未标记客户';
// model.id = item.id;
model.select = false;
customerProvider.filterLabelList.add(model);
for (CustomerLabelSunModel item in customerProvider.labelList) {
FilterBtnModel model = FilterBtnModel();
model.title = item.label;
... ... @@ -232,11 +242,17 @@ class _CustomerListPageState extends State<CustomerListPage>
params['uid'] = widget.uidStr;
} else {
String uid = '';
for (FilterBtnModel item in customerProvider.filterManageList) {
List<FilterBtnModel> tempfilterManage =
List.from(customerProvider.filterManageList);
if (tempfilterManage.length > 0) {
tempfilterManage.removeAt(0);
}
for (FilterBtnModel item in tempfilterManage) {
if (item.select) {
uid += '${item.id},';
}
}
if (uid.length > 0) {
if (uid.endsWith(',')) {
uid = uid.substring(0, uid.length - 1);
... ... @@ -293,9 +309,16 @@ class _CustomerListPageState extends State<CustomerListPage>
params['etime'] = customerProvider.controlleretime.text;
}
}
if (distribution) {
params['distribution'] = '1';
print(customerProvider.filterManageList);
if (first) {
if (distribution) {
params['distribution'] = '1';
}
} else {
if (customerProvider.filterManageList.length > 0 &&
customerProvider.filterManageList[0].select) {
params['distribution'] = '1';
}
}
await customerProvider.getCustomerBySeller(context, params);
... ...
... ... @@ -1547,6 +1547,11 @@ class CustomerProvider extends ChangeNotifier {
PersonnelManageModelData dataMap =
PersonnelManageModel.fromJson(baseResp.responseData).data;
filterManageList = [];
// FilterBtnModel model = FilterBtnModel();
// // model.id = item.id;
// model.title = '未分配经理';
// model.select = false;
// filterManageList.add(model);
if (dataMap.manager.listdata != null &&
dataMap.manager.listdata.length > 0) {
for (PersonnelManageSunModel item in dataMap.manager.listdata) {
... ...