This commit is contained in:
2020-09-04 14:08:34 +08:00
parent 346415d75e
commit 96b845b673
22 changed files with 294 additions and 146 deletions

View File

@@ -6,6 +6,34 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 这个权限用于获取wifi的获取权限wifi信息会用来进行网络定位 -->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<!-- 写入扩展存储,向扩展卡写入数据,用于写入离线定位数据 -->
<uses-feature android:name="android.hardware.camera.autofocus" /> <!-- 访问网络,网络定位需要上网 -->
<uses-permission android:name="android.permission.CALL_PHONE" /> <!-- 腾讯bugly权限 -->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <!-- Bugly升级SDK权限配置开始 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 二维码扫描 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 震动权限 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 摄像头权限 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 用于申请调用A-GPS模块 -->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 这个权限用于获取wifi的获取权限wifi信息会用来进行网络定位 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 用于读取手机当前的状态 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 写入扩展存储,向扩展卡写入数据,用于写入缓存定位数据 -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- 获取手机录音机使用权限,听写、识别、语义理解需要用到此权限 -->
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 读取联系人权限,上传联系人需要用到此权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" /> <!-- 网络权限,加载网络网页需要联网 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- 精确定位权限,允许一个程序访问精确位置(GPS定位) -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<application
android:name=".BaseApplication"

View File

@@ -74,6 +74,5 @@ public class FindFragment extends BaseFragment {
dianyuanbuju.setVisibility(View.GONE);
}
});
}
}

View File

@@ -13,7 +13,7 @@ import java.util.List;
public class CustomerListBean extends BaseModel {
/**
* result : {"msg":"获取成功","total":0,"data":[{"headimg":"","phone":"15862656263","name":"text","wechat":"weixin","source":"1","customer_id":"3aaa642ed2f57470f62c51ee60d8a852","type":"old","source_name":"添加客户"}],"success":0}
* result : {"data":[{"address":"","budget":"","customer_id":"49fc031a8b374e5c69b1640c2f77b5f4","decoration":"1","headimg":"http://192.168.1.3/upload/2020090409422893432.jpg","name":"狗子","phone":"13255558866","source":"1","source_name":"添加客户","style_id":"","style_name":"","type":"new","wechat":"\u2014 \u2014"},{"address":"住址","budget":"15万-20万","customer_id":"4db0ac2253cb643bfb0ddeb6375a27b3","decoration":"1","headimg":"","name":"阿爸。","phone":"13458966692","source":"1","source_name":"添加客户","style_id":"5","style_name":"现代简约","type":"old","wechat":"call"},{"address":"一次是真的","budget":"5万-10万","customer_id":"5619a67e02a85290ad485d2e2b48b788","decoration":"2","headimg":"http://192.168.1.3/upload/2020090315102014899.jpg","name":"在乎","phone":"13278787787","source":"1","source_name":"添加客户","style_id":"7","style_name":"地中海","type":"old","wechat":"一次"},{"address":"","budget":"","customer_id":"638de5977746a9337b08d9caaee11393","decoration":"2","headimg":"http://192.168.1.3/upload/2020090409345081526.jpg","name":"1212121","phone":"21212121qwq","source":"1","source_name":"添加客户","style_id":"","style_name":"","type":"new","wechat":""},{"address":"等,你,你","budget":"20万以上","customer_id":"7b4df32da7c8c08b55903117bb7cc8d9","decoration":"1","headimg":"http://192.168.1.3/upload/2020090409233368106.jpg","name":"你在,他","phone":"13826942573","source":"1","source_name":"添加客户","style_id":"6","style_name":"东南亚","type":"new","wechat":""},{"address":"","budget":"","customer_id":"af8b2b183071a36cf216211c48890ce9","decoration":"1","headimg":"http://192.168.1.3/upload/2020090409364521615.jpg","name":"二哈","phone":"13245725369","source":"0","source_name":"","style_id":"","style_name":"","type":"new","wechat":"微信"}],"msg":"获取成功","success":0,"total":4}
* status : 0
*/
@@ -38,15 +38,15 @@ public class CustomerListBean extends BaseModel {
public static class ResultBean {
/**
* data : [{"address":"","budget":"","customer_id":"49fc031a8b374e5c69b1640c2f77b5f4","decoration":"1","headimg":"http://192.168.1.3/upload/2020090409422893432.jpg","name":"狗子","phone":"13255558866","source":"1","source_name":"添加客户","style_id":"","style_name":"","type":"new","wechat":"\u2014 \u2014"},{"address":"住址","budget":"15万-20万","customer_id":"4db0ac2253cb643bfb0ddeb6375a27b3","decoration":"1","headimg":"","name":"阿爸。","phone":"13458966692","source":"1","source_name":"添加客户","style_id":"5","style_name":"现代简约","type":"old","wechat":"call"},{"address":"一次是真的","budget":"5万-10万","customer_id":"5619a67e02a85290ad485d2e2b48b788","decoration":"2","headimg":"http://192.168.1.3/upload/2020090315102014899.jpg","name":"在乎","phone":"13278787787","source":"1","source_name":"添加客户","style_id":"7","style_name":"地中海","type":"old","wechat":"一次"},{"address":"","budget":"","customer_id":"638de5977746a9337b08d9caaee11393","decoration":"2","headimg":"http://192.168.1.3/upload/2020090409345081526.jpg","name":"1212121","phone":"21212121qwq","source":"1","source_name":"添加客户","style_id":"","style_name":"","type":"new","wechat":""},{"address":"等,你,你","budget":"20万以上","customer_id":"7b4df32da7c8c08b55903117bb7cc8d9","decoration":"1","headimg":"http://192.168.1.3/upload/2020090409233368106.jpg","name":"你在,他","phone":"13826942573","source":"1","source_name":"添加客户","style_id":"6","style_name":"东南亚","type":"new","wechat":""},{"address":"","budget":"","customer_id":"af8b2b183071a36cf216211c48890ce9","decoration":"1","headimg":"http://192.168.1.3/upload/2020090409364521615.jpg","name":"二哈","phone":"13245725369","source":"0","source_name":"","style_id":"","style_name":"","type":"new","wechat":"微信"}]
* msg : 获取成功
* total : 0
* data : [{"headimg":"","phone":"15862656263","name":"text","wechat":"weixin","source":"1","customer_id":"3aaa642ed2f57470f62c51ee60d8a852","type":"old","source_name":"添加客户"}]
* success : 0
* total : 4
*/
private String msg;
private int total;
private int success;
private int total;
private List<DataBean> data;
public String getMsg() {
@@ -57,14 +57,6 @@ public class CustomerListBean extends BaseModel {
this.msg = msg;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public int getSuccess() {
return success;
}
@@ -73,6 +65,14 @@ public class CustomerListBean extends BaseModel {
this.success = success;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public List<DataBean> getData() {
return data;
}
@@ -83,63 +83,49 @@ public class CustomerListBean extends BaseModel {
public static class DataBean implements Serializable {
/**
* headimg :
* phone : 15862656263
* name : text
* wechat : weixin
* address :
* budget :
* customer_id : 49fc031a8b374e5c69b1640c2f77b5f4
* decoration : 1
* headimg : http://192.168.1.3/upload/2020090409422893432.jpg
* name : 狗子
* phone : 13255558866
* source : 1
* customer_id : 3aaa642ed2f57470f62c51ee60d8a852
* type : old
* source_name : 添加客户
* style_id :
* style_name :
* type : new
* wechat : — —
*/
private String headimg;
private String phone;
private String name;
private String wechat;
private String source;
private String address;
private String budget;
private String customer_id;
private String type;
private String decoration;
private String headimg;
private String name;
private String phone;
private String source;
private String source_name;
private String style_id;
private String style_name;
private String type;
private String wechat;
public String getHeadimg() {
return headimg;
public String getAddress() {
return address;
}
public void setHeadimg(String headimg) {
this.headimg = headimg;
public void setAddress(String address) {
this.address = address;
}
public String getPhone() {
return phone;
public String getBudget() {
return budget;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getWechat() {
return wechat;
}
public void setWechat(String wechat) {
this.wechat = wechat;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
public void setBudget(String budget) {
this.budget = budget;
}
public String getCustomer_id() {
@@ -150,12 +136,44 @@ public class CustomerListBean extends BaseModel {
this.customer_id = customer_id;
}
public String getType() {
return type;
public String getDecoration() {
return decoration;
}
public void setType(String type) {
this.type = type;
public void setDecoration(String decoration) {
this.decoration = decoration;
}
public String getHeadimg() {
return headimg;
}
public void setHeadimg(String headimg) {
this.headimg = headimg;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getSource_name() {
@@ -165,6 +183,38 @@ public class CustomerListBean extends BaseModel {
public void setSource_name(String source_name) {
this.source_name = source_name;
}
public String getStyle_id() {
return style_id;
}
public void setStyle_id(String style_id) {
this.style_id = style_id;
}
public String getStyle_name() {
return style_name;
}
public void setStyle_name(String style_name) {
this.style_name = style_name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getWechat() {
return wechat;
}
public void setWechat(String wechat) {
this.wechat = wechat;
}
}
}
}

View File

@@ -0,0 +1,17 @@
package com.fenghoo.seven.main.kehu.Bean;
/**
* Time: 2020/8/28
* Author: jianbo
* Description:
*/
public class FourEvent {
private String mMsg;
public FourEvent(String msg) {
// TODO Auto-generated constructor stub
mMsg = msg;
}
public String getMsg(){
return mMsg;
}
}

View File

@@ -12,9 +12,9 @@ import com.fenghoo.seven.R;
import com.fenghoo.seven.base.BaseActivity;
import com.fenghoo.seven.db.DbRecordBeanData;
import com.fenghoo.seven.db.dao.DbRecordDao;
import com.fenghoo.seven.main.kehu.Bean.WxuSerinfo;
import com.fenghoo.seven.main.find.entity.ThreeEvent;
import com.fenghoo.seven.main.kehu.Bean.FourEvent;
import com.fenghoo.seven.main.kehu.Bean.customerFPListBean;
import com.fenghoo.seven.main.kehu.Bean.fenpeisuccess;
import com.fenghoo.seven.main.kehu.adapter.AllocationAdapter;
import com.fenghoo.seven.okgonet.NetApi;
import com.fenghoo.seven.okgonet.Observer;
@@ -45,30 +45,26 @@ public class AllocationActivity extends BaseActivity implements View.OnClickList
private List<DbRecordBeanData> dbRecordBeanData;
private String search;
private DbRecordDao dbRecordDao;
private String times;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_allocation);
times = getIntent().getStringExtra("times");
search = getIntent().getStringExtra("search");
initView();
setEvent();
EventBus.getDefault().register(this);
dbRecordDao = new DbRecordDao(this);
initData();
getData(times);
getData();
}
public void onEvent(fenpeisuccess event) {
public void onEvent(FourEvent event) {
if (null != event && event.getMsg().equals("2")) {
// dbRecordDao.delete(mShowList);
// getData(times);
WxuSerinfo wxuSerinfo = new WxuSerinfo();
wxuSerinfo.setHongbao("1");
wxuSerinfo.setMessage(event.getMessage());
EventBus.getDefault().post(wxuSerinfo);
//通知客户列表刷新数据
EventBus.getDefault().post(new ThreeEvent("0",search));
finish();
Log.d("客户调拨--","关闭客户调拨页面");
}
}
private void initView() {
@@ -116,7 +112,7 @@ public class AllocationActivity extends BaseActivity implements View.OnClickList
});
}
public void getData(String times) {
public void getData() {
new NetApi().customerFPList(ProfileSpUtils.getInstance().getUserProfie().getData().getUuid()).subscribe(new Observer<Response>() {
@Override
public void onNext(Response response) {

View File

@@ -71,7 +71,8 @@ public class CustomerDetailActivity extends BaseActivity {
String data1 = result1.getString("data");
Map<String, Object> data = JSON.parseObject(data1, new TypeReference<Map<String, Object>>() {
});
GlideTools.init(CustomerDetailActivity.this).displaypic(mIvDraUserHeads, ToolsText.getValue(data, "customer_head"), R.mipmap.icon_default_head);
String headimg = ToolsText.getValue(data, "headimg");
GlideTools.init(CustomerDetailActivity.this).displaypic(mIvDraUserHeads, headimg, R.mipmap.icon_default_head);
String name = ToolsText.getValue(data, "name");
String phone = ToolsText.getValue(data, "phone");
mTitleBar.setTitle(name+phone);
@@ -80,18 +81,18 @@ public class CustomerDetailActivity extends BaseActivity {
//1毛坯2精装3旧房改造
switch (ToolsText.getValue(data, "decoration")){
case "1":
WidgetTools.setTextfive(mTvDraInfo02, "", ToolsText.getValue(data, "毛坯"));
WidgetTools.setTextfive(mTvDraInfo02, "", "毛坯");
break;
case "2":
WidgetTools.setTextfive(mTvDraInfo02, "", ToolsText.getValue(data, "精装"));
WidgetTools.setTextfive(mTvDraInfo02, "", "精装");
break;
case "3":
WidgetTools.setTextfive(mTvDraInfo02, "", ToolsText.getValue(data, "旧房改造"));
WidgetTools.setTextfive(mTvDraInfo02, "", "旧房改造");
break;
}
WidgetTools.setTextfive(mTvDraInfo04, "4.户型面积:", ToolsText.getValue(data, "style_name"));
WidgetTools.setTextfive(mTvDraInfo06, "6.备 注:", ToolsText.getValue(data, "budget"));
WidgetTools.setTextfive(mTvDraInfo04, "", ToolsText.getValue(data, "style_name"));
WidgetTools.setTextfive(mTvDraInfo06, "", ToolsText.getValue(data, "budget"));
}else {
ToastUtils.showToast(CustomerDetailActivity.this, msg);
@@ -108,5 +109,4 @@ public class CustomerDetailActivity extends BaseActivity {
}
});
}
}

View File

@@ -218,7 +218,7 @@ public class DesignActivity extends BaseTreeActivity<CommitDesignContract.View,
/**
* 订单类型
*/
private void initDingdanTypePopup(RelativeLayout rl_dingdan_type, final TextView tv_dingdan_type, int position) {
private void initDingdanTypePopup(RelativeLayout rl_dingdan_type, final TextView tv_dingdan_type, final int positionp) {
dingdanTypeList.clear();
for (int i = 0; i < industryData.size(); i++) {
@@ -236,7 +236,7 @@ public class DesignActivity extends BaseTreeActivity<CommitDesignContract.View,
String industry = industryData.get(position).getIndustry();
String industry_id = industryData.get(position).getIndustry_id();
tv_dingdan_type.setText(industry);
photoeditor.get(position).setIndustry_id(industry_id);
photoeditor.get(positionp).setIndustry_id(industry_id);
dingdanTypePw.dismiss();
}
});

View File

@@ -30,13 +30,14 @@ public class SearchActivity extends BaseActivity implements View.OnClickListener
private TextView mTvCancel;
private RelativeLayout bt_sousuo_ditu;
private String pagetype;
private String search;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_search);
pagetype = getIntent().getStringExtra("pagetype");
pagetype = getIntent().getStringExtra("pagetype");
search = getIntent().getStringExtra("search");
initView();
initNormalBack();

View File

@@ -36,8 +36,9 @@ public class ShowAty {
/**
* 客户调拨
*/
public static void AllocationActivity(Context ctx) {
public static void AllocationActivity(Context ctx,String search) {
Intent i = new Intent(ctx, AllocationActivity.class);
i.putExtra("search",search);
ctx.startActivity(i);
}

View File

@@ -1,12 +1,17 @@
package com.fenghoo.seven.main.kehu.activity.mvp.presenter;
import com.fenghoo.seven.main.kehu.Bean.CommitDesignModel;
import com.fenghoo.seven.main.kehu.Bean.FourEvent;
import com.fenghoo.seven.main.kehu.Bean.SecondEvent;
import com.fenghoo.seven.main.kehu.Bean.fenpeisuccess;
import com.fenghoo.seven.main.kehu.activity.mvp.contract.CommitDesignContract;
import com.fenghoo.seven.main.kehu.activity.mvp.model.CommitDesignModeltwo;
import com.fenghoo.seven.network.ApiCallBack;
import com.fenghoo.seven.utils.ToastUtils;
import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import de.greenrobot.event.EventBus;
public class CommitDesignPresenter extends MvpBasePresenter<CommitDesignContract.View> implements CommitDesignContract.Presenter {
@@ -24,6 +29,9 @@ public class CommitDesignPresenter extends MvpBasePresenter<CommitDesignContract
if (responseData.getSuccess() == 0) {
ToastUtils.showToast(getView().getContext(), responseData.getMsg());
getView().getActivity().finish();
//销毁上个页面,然后刷新客户列表数据
EventBus.getDefault().post(new FourEvent("2"));
}
}

View File

@@ -51,7 +51,9 @@ public class AllocationAdapter extends RecyclerView.Adapter<AllocationAdapter.Fr
@Override
public void onBindViewHolder(FromViewHolder holder, final int position) {
GlideTools.init(mContext).displaypic(holder.mCivDefine, mDatas.get(position).getHeadimg(), R.mipmap.icon_default_head);
WidgetTools.setTextfive(holder.mTvIntoTime, mDatas.get(position).getName()+"", mDatas.get(position).getPhone());
WidgetTools.setTextfive(holder.tv_dea_name, "", mDatas.get(position).getName()+"");
WidgetTools.setTextfive(holder.tv_dea_phone, "", mDatas.get(position).getPhone());
WidgetTools.setTextfive(holder.tv_yifenpnum, "","已分配"+mDatas.get(position).getFp_num()+"");
String selectstuta = mDatas.get(position).getSelectstuta();
if (selectstuta.equals("1")) {
holder.select_iv.setImageResource(R.mipmap.icon_cheched_true);
@@ -87,17 +89,21 @@ public class AllocationAdapter extends RecyclerView.Adapter<AllocationAdapter.Fr
class FromViewHolder extends RecyclerView.ViewHolder {
CircleImageView mCivDefine;
ImageView select_iv;
TextView mTvIntoTime;
TextView tv_dea_name;
TextView tv_dea_phone;
TextView tv_yifenpnum;
RelativeLayout mRlRemove;
public FromViewHolder(View itemView) {
super(itemView);
mCivDefine = itemView.findViewById(R.id.iv_default_image);
mTvIntoTime = itemView.findViewById(R.id.tv_into_time_value);
tv_dea_name = itemView.findViewById(R.id.tv_dea_name);
tv_dea_phone = itemView.findViewById(R.id.tv_dea_phone);
select_iv = itemView.findViewById(R.id.select_iv);
mRlRemove = itemView.findViewById(R.id.rl_remove);
tv_yifenpnum = itemView.findViewById(R.id.tv_yifenpnum);
}

View File

@@ -28,7 +28,7 @@ public class CusListAdapter extends BaseQuickAdapter<CustomerListBean.ResultBean
@Override
protected void convert(final BaseViewHolder helper, final CustomerListBean.ResultBean.DataBean item) {
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_source_name), "", item.getSource_name());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName()+"");
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_phone), "", item.getPhone());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_watch), "", item.getWechat());
CircleImageView iv_dea_avatar = helper.getView(R.id.iv_dea_avatar);

View File

@@ -29,7 +29,7 @@ public class DeaListAdapter extends BaseQuickAdapter<orderListBean.ResultBean.Da
protected void convert(final BaseViewHolder helper, final orderListBean.ResultBean.DataBean item) {
ImageView image = (ImageView)helper.getView(R.id.iv_dea_avatar);
GlideTools.init(mContext).displaypic(image, item.getHeadimg(), R.mipmap.icon_default_head);
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName()+"");
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_phone), "", item.getPhone());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_watch), "", item.getWechat());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_cjnum), "", "已成交"+item.getOrder_num()+"");

View File

@@ -31,7 +31,7 @@ public class DisListAdapter extends BaseQuickAdapter<FpListBean.ResultBean.DataB
protected void convert(final BaseViewHolder helper, final FpListBean.ResultBean.DataBean item) {
ImageView image = (ImageView)helper.getView(R.id.iv_dea_avatar);
GlideTools.init(mContext).displaypic(image, item.getHeadimg(), R.mipmap.icon_default_head);
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName()+"");
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_phone), "", item.getPhone());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_watch), "", item.getWechat());
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_fpnum), "", "已分配"+item.getFp_num()+"");

View File

@@ -12,6 +12,7 @@ import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
@@ -24,6 +25,7 @@ import com.fenghoo.seven.main.kehu.Bean.FirstEvent;
import com.fenghoo.seven.main.kehu.Bean.LabelBean;
import com.fenghoo.seven.main.kehu.Bean.SecondEvent;
import com.fenghoo.seven.main.kehu.Bean.addCustomerBean;
import com.fenghoo.seven.main.kehu.activity.JsonDataActivity;
import com.fenghoo.seven.main.kehu.activity.ShowAty;
import com.fenghoo.seven.main.kehu.adapter.AddCusAdapter;
import com.fenghoo.seven.okgonet.NetApi;
@@ -139,22 +141,41 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
}
});
recy_10 = (RecyclerView) view.findViewById(R.id.recy_10);
label = addData();
setLabel(label);
textView0 = (EditText) view.findViewById(R.id.textView0);
textView4 = (EditText) view.findViewById(R.id.textView4);
textView6 = (EditText) view.findViewById(R.id.textView6);
textView8 = (EditText) view.findViewById(R.id.textView8);
textView12 = (TextView) view.findViewById(R.id.textView12);
textView14 = (TextView) view.findViewById(R.id.textView14);
if(!pagetype.equals("")){
//完善信息
WidgetTools.setTextfive(textView0, "", dataBean.getName());
WidgetTools.setTextfive(textView4, "", dataBean.getPhone());
WidgetTools.setTextfive(textView6, "", dataBean.getWechat());
WidgetTools.setTextfive(textView8, "", dataBean.getAddress());
GlideTools.init(mContext).displaypic(imageView, dataBean.getHeadimg(), R.mipmap.icon_default_head);
addCustomerBean.setHeadimg(dataBean.getHeadimg());
String decoration = dataBean.getDecoration();
switch (decoration) {
case "1":
label = addData("1","0","0");
break;
case "2":
label = addData("0","1","0");
break;
case "3":
label = addData("0","0","1");
break;
}
WidgetTools.setTextfive(textView12, "", dataBean.getStyle_name());
addCustomerBean.setStyle_id(dataBean.getStyle_id());
WidgetTools.setTextfive(textView14, "", dataBean.getBudget());
addCustomerBean.setBudget(dataBean.getBudget());
}else {
//添加客户
label = addData("1","0","0");
}
setLabel(label);
ConstraintLayout constraintLayout7 = (ConstraintLayout) view.findViewById(R.id.constraintLayout7);
constraintLayout7.setOnClickListener(this);
ConstraintLayout constraintLayout8 = (ConstraintLayout) view.findViewById(R.id.constraintLayout8);
@@ -223,31 +244,26 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
});
}
private ArrayList<LabelBean> addData() {
private ArrayList<LabelBean> addData(String select1,String select2,String select3) {
ArrayList<LabelBean> label = new ArrayList<>();
LabelBean labelBean = new LabelBean();
labelBean.setDecoration("毛坯");
labelBean.setDecorationid("1");
labelBean.setIf_sel_del("1");
labelBean.setIf_sel_del(select1);
label.add(labelBean);
LabelBean labelBean1 = new LabelBean();
labelBean1.setDecoration("精装");
labelBean1.setDecorationid("2");
labelBean1.setIf_sel_del("0");
labelBean1.setIf_sel_del(select2);
label.add(labelBean1);
LabelBean labelBean2 = new LabelBean();
labelBean2.setDecoration("旧房改造");
labelBean2.setDecorationid("3");
labelBean2.setIf_sel_del("0");
labelBean2.setIf_sel_del(select3);
label.add(labelBean2);
return label;
}
private void setLabel(final List<LabelBean> label) {
if(label.size()>0){
if(isSelect(label)){
label.get(0).setIf_sel_del("1");
}
}
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
recy_10.setLayoutManager(gridLayoutManager);
recy_10.setAdapter(new BaseQuickAdapter<LabelBean, BaseViewHolder>(R.layout.markquestionsadapter_item, label) {

View File

@@ -1,5 +1,6 @@
package com.fenghoo.seven.main.kehu.fragment;
import android.Manifest;
import android.util.Log;
import android.view.ViewParent;
import android.widget.FrameLayout;
@@ -20,11 +21,13 @@ import com.fenghoo.seven.utils.ToastUtils;
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
import com.lzy.okgo.model.HttpParams;
import com.lzy.okgo.model.Response;
import com.tbruyelle.rxpermissions2.RxPermissions;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import de.greenrobot.event.EventBus;
import io.reactivex.disposables.Disposable;
/**
* 客户列表
@@ -33,7 +36,7 @@ public class CustomerFragment extends MobanFragment {
private static int mSerial = 0;
private int mTabPos = 0;
private String search="";
public String search="";
public CustomerFragment(int serial) {
super();
@@ -56,7 +59,7 @@ public class CustomerFragment extends MobanFragment {
@Override
public void phoneClick() {//拨打电话
if (item.getPhone() != null) {
call(item.getPhone());
getPermissions(item.getPhone());
}
}
@@ -97,10 +100,41 @@ public class CustomerFragment extends MobanFragment {
});
}
private void getPermissions(final String phone) {
RxPermissions rxPermissions = new RxPermissions(this);
rxPermissions.request(Manifest.permission.CALL_PHONE)
.subscribe(new io.reactivex.Observer<Boolean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(Boolean aBoolean) {
if (aBoolean) {
call(phone);
} else {
ToastUtils.showToast(getActivity(), "获取权限失败,请重新授权");
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
public void onEvent(ThreeEvent event) {
if (null != event ) {
String pagetype = event.getPagetype();
Log.e("刷新页面==",pagetype);
Log.d("客户调拨--","刷新列表页面");
if(pagetype.equals("0")){
search = event.getSearch();

View File

@@ -25,6 +25,7 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import de.greenrobot.event.EventBus;
/**
* 功能:客户列表
@@ -177,7 +178,7 @@ public class TraceFragment extends BaseFragment implements View.OnClickListener
ShowAty.SearchActivity(getActivity(),pagetype,"");
break;
case R.id.bt_fenpei:
ShowAty.AllocationActivity(getActivity());
ShowAty.AllocationActivity(getActivity(),genzongzhongFragment.search);
break;
}

View File

@@ -85,7 +85,7 @@
android:layout_height="20dp"
android:layout_marginLeft="16.5dp"
android:layout_centerVertical="true"
android:text="家装阶段"
android:text="家装阶段"
android:textColor="#ff000000"
android:textSize="14sp" />
<TextView

View File

@@ -40,26 +40,40 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:layout_marginLeft="10dp">
android:layout_marginLeft="0dp">
<TextView
android:id="@+id/tv_into_time_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:layout_marginTop="16dp"
android:textColor="#333333"
android:text="2017-12-25 10:50" />
<TextView
android:id="@+id/tv_dea_name"
android:layout_width="wrap_content"
android:layout_height="21dp"
android:layout_marginTop="19.5dp"
android:layout_toRightOf="@+id/iv_dea_avatar"
android:text="欧阳子文"
android:textStyle="bold"
android:textColor="#ff333333"
android:textSize="15sp"
/>
<TextView
android:id="@+id/tv_dea_phone"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginTop="22dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text="18971614151"
android:textColor="#ff333333"
android:textSize="12sp"
/>
<TextView
android:id="@+id/tv_yifenpnum"
android:layout_width="52.5dp"
android:layout_height="13.5dp"
android:text="已分配2次"
android:layout_marginTop="9dp"
android:background="@drawable/shape_allocation_tv"
android:layout_below="@+id/tv_into_time_value"
android:layout_below="@+id/tv_dea_name"
android:textColor="#ffffffff"
android:textSize="10sp"
/>

View File

@@ -57,24 +57,17 @@
android:layout_height="21dp"
android:layout_marginLeft="13.5dp"
android:layout_marginTop="19.5dp"
android:textStyle="bold"
android:layout_toRightOf="@+id/iv_dea_avatar"
android:text="欧阳子文"
android:textColor="#ff333333"
android:textSize="15sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:layout_marginLeft="4dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text=" • "
/>
<TextView
android:id="@+id/tv_dea_phone"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="22dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text="18971614151"

View File

@@ -35,24 +35,16 @@
android:layout_height="21dp"
android:layout_marginLeft="13.5dp"
android:layout_marginTop="19.5dp"
android:textStyle="bold"
android:layout_toRightOf="@+id/iv_dea_avatar"
android:text="欧阳子文"
android:textColor="#ff333333"
android:textSize="15sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:layout_marginLeft="4dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text=" • "
/>
<TextView
android:id="@+id/tv_dea_phone"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="22dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text="18971614151"

View File

@@ -35,24 +35,16 @@
android:layout_height="21dp"
android:layout_marginLeft="13.5dp"
android:layout_marginTop="19.5dp"
android:textStyle="bold"
android:layout_toRightOf="@+id/iv_dea_avatar"
android:text="欧阳子文"
android:textColor="#ff333333"
android:textSize="15sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:layout_marginLeft="4dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text=" • "
/>
<TextView
android:id="@+id/tv_dea_phone"
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="22dp"
android:layout_toRightOf="@+id/tv_dea_name"
android:text="18971614151"