社会组织

This commit is contained in:
高健 2021-11-05 18:45:58 +08:00
parent b6ab4d5973
commit 4404d735e3
11 changed files with 995 additions and 579 deletions

View File

@ -32,6 +32,7 @@ public class SaveSocialOrgBean {
private String masterIdCard; private String masterIdCard;
private String masterIdCardBack; private String masterIdCardBack;
private String masterIdCardCode; private String masterIdCardCode;
private String masterIdCardCodeName;
private String masterIdCardFront; private String masterIdCardFront;
private String masterName; private String masterName;
private String masterPhone; private String masterPhone;
@ -54,6 +55,14 @@ public class SaveSocialOrgBean {
private int womenTotalPerson; private int womenTotalPerson;
private String workplacePhotos; private String workplacePhotos;
public String getMasterIdCardCodeName() {
return masterIdCardCodeName;
}
public void setMasterIdCardCodeName(String masterIdCardCodeName) {
this.masterIdCardCodeName = masterIdCardCodeName;
}
public String getApprovalDate() { public String getApprovalDate() {
return approvalDate; return approvalDate;
} }

View File

@ -32,7 +32,8 @@ public class SocialOrgDetailBean {
private String legalPersonName; private String legalPersonName;
private String masterIdCard; private String masterIdCard;
private String masterIdCardBack; private String masterIdCardBack;
private int masterIdCardCode; private String masterIdCardCode;
private String masterIdCardCodeName;
private String masterIdCardFront; private String masterIdCardFront;
private String masterName; private String masterName;
private String masterPhone; private String masterPhone;
@ -248,14 +249,22 @@ public class SocialOrgDetailBean {
this.masterIdCardBack = masterIdCardBack; this.masterIdCardBack = masterIdCardBack;
} }
public int getMasterIdCardCode() { public String getMasterIdCardCode() {
return masterIdCardCode; return masterIdCardCode;
} }
public void setMasterIdCardCode(int masterIdCardCode) { public void setMasterIdCardCode(String masterIdCardCode) {
this.masterIdCardCode = masterIdCardCode; this.masterIdCardCode = masterIdCardCode;
} }
public String getMasterIdCardCodeName() {
return masterIdCardCodeName;
}
public void setMasterIdCardCodeName(String masterIdCardCodeName) {
this.masterIdCardCodeName = masterIdCardCodeName;
}
public String getMasterIdCardFront() { public String getMasterIdCardFront() {
return masterIdCardFront; return masterIdCardFront;
} }

View File

@ -63,7 +63,8 @@ public class SocialOrgListBean {
private String legalPersonName; private String legalPersonName;
private String masterIdCard; private String masterIdCard;
private String masterIdCardBack; private String masterIdCardBack;
private int masterIdCardCode; private String masterIdCardCode;
private String masterIdCardCodeName;
private String masterIdCardFront; private String masterIdCardFront;
private String masterName; private String masterName;
private String masterPhone; private String masterPhone;
@ -279,14 +280,22 @@ public class SocialOrgListBean {
this.masterIdCardBack = masterIdCardBack; this.masterIdCardBack = masterIdCardBack;
} }
public int getMasterIdCardCode() { public String getMasterIdCardCode() {
return masterIdCardCode; return masterIdCardCode;
} }
public void setMasterIdCardCode(int masterIdCardCode) { public void setMasterIdCardCode(String masterIdCardCode) {
this.masterIdCardCode = masterIdCardCode; this.masterIdCardCode = masterIdCardCode;
} }
public String getMasterIdCardCodeName() {
return masterIdCardCodeName;
}
public void setMasterIdCardCodeName(String masterIdCardCodeName) {
this.masterIdCardCodeName = masterIdCardCodeName;
}
public String getMasterIdCardFront() { public String getMasterIdCardFront() {
return masterIdCardFront; return masterIdCardFront;
} }

View File

@ -1715,7 +1715,7 @@ public interface GridApis {
*/ */
@Headers({"base_url_name:usercenter", "Content-Type: application/json", "Accept: application/json"}) @Headers({"base_url_name:usercenter", "Content-Type: application/json", "Accept: application/json"})
@GET("app/organization/get/{organizationId}") @GET("app/organization/get/{organizationId}")
Observable<SocialOrgDetailBean> getSocialOrgDetailById(@Path("knowledgeId") String id, @Header("token") String token); Observable<SocialOrgDetailBean> getSocialOrgDetailById(@Path("organizationId") String id, @Header("token") String token);
/** /**
* 删除社会组织 * 删除社会组织

View File

@ -14,6 +14,8 @@ import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
import android.widget.ZoomControls; import android.widget.ZoomControls;
@ -36,7 +38,9 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.tengshisoft.commonmodule.beans.AreaGridListBean;
import com.tengshisoft.commonmodule.beans.SaveSocialOrgBean; import com.tengshisoft.commonmodule.beans.SaveSocialOrgBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis; import com.tengshisoft.commonmodule.nets.GridApis;
import com.tengshisoft.gridmodule.R; import com.tengshisoft.gridmodule.R;
import com.tengshisoft.gridmodule.R2; import com.tengshisoft.gridmodule.R2;
@ -129,8 +133,6 @@ public class SocialOrgAddActivity extends BaseActivity {
TextureMapView mTmvMap; TextureMapView mTmvMap;
@BindView(R2.id.et_company_name) @BindView(R2.id.et_company_name)
EditText mEtCompanyName; EditText mEtCompanyName;
@BindView(R2.id.tv_company_status)
TextView mTvCompanyStatus;
@BindView(R2.id.tv_company_type) @BindView(R2.id.tv_company_type)
TextView mTvCompanyType; TextView mTvCompanyType;
@BindView(R2.id.et_company_summary) @BindView(R2.id.et_company_summary)
@ -179,6 +181,12 @@ public class SocialOrgAddActivity extends BaseActivity {
NestedScrollView mNsvContent; NestedScrollView mNsvContent;
@BindView(R2.id.et_author_code) @BindView(R2.id.et_author_code)
EditText mEtAuthorCode; EditText mEtAuthorCode;
@BindView(R2.id.rb_normal)
RadioButton mRbNormal;
@BindView(R2.id.rb_unnormal)
RadioButton mRbUnnormal;
@BindView(R2.id.rg_company_status)
RadioGroup mRgCompanyStatus;
private Unbinder mBind; private Unbinder mBind;
private String mSelAreaCode; private String mSelAreaCode;
private String mSelAreaId; private String mSelAreaId;
@ -192,15 +200,12 @@ public class SocialOrgAddActivity extends BaseActivity {
private String mPicPath; private String mPicPath;
private OptionsPickerView mConcernPicker; private OptionsPickerView mConcernPicker;
private OptionsPickerView mEnterpriseTypePicker; private OptionsPickerView mEnterpriseTypePicker;
private OptionsPickerView mCompanyStatusPicker;
private OptionsPickerView mCardTypePicker; private OptionsPickerView mCardTypePicker;
private List<DicBean> mConcernList; private List<DicBean> mConcernList;
private List<DicBean> mEnterpriseTypeList; private List<DicBean> mEnterpriseTypeList;
private List<DicBean> mCompanyStatusList;
private List<DicBean> mCardTypeList; private List<DicBean> mCardTypeList;
private DicBean mSelConcern; private DicBean mSelConcern;
private DicBean mSelEnterpriseType; private DicBean mSelEnterpriseType;
private DicBean mSelCompanyStatus;
private DicBean mSelCardType; private DicBean mSelCardType;
private int mIsCanParty = 0;//是否具备建立中共党组织 private int mIsCanParty = 0;//是否具备建立中共党组织
private int mHasYoung = 0;//是否有共青团 private int mHasYoung = 0;//是否有共青团
@ -215,7 +220,8 @@ public class SocialOrgAddActivity extends BaseActivity {
private String mMasterZPhotoId;//负责人身份证正面 private String mMasterZPhotoId;//负责人身份证正面
private String mMasterFPhotoId;//负责人身份证反面 private String mMasterFPhotoId;//负责人身份证反面
private String mLicensePhotoId;//营业执照相片 private String mLicensePhotoId;//营业执照相片
private String mSelGridId;//选择的网格 private AreaGridListBean.RowsBean mSelGrid;//选择的网格
private int mOrgStatus = 1;//状态 正常
@Override @Override
protected int setLayoutId() { protected int setLayoutId() {
@ -248,7 +254,10 @@ public class SocialOrgAddActivity extends BaseActivity {
if (TextUtils.isEmpty(mSelAreaCode)) { if (TextUtils.isEmpty(mSelAreaCode)) {
ToastUtils.show("请选择地区"); ToastUtils.show("请选择地区");
} else { } else {
//TODO 选择网格 ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_GRID)
.withString("areaCode", mSelAreaCode)
.navigation(mActivity, 15);
} }
}); });
mIvLicensePhoto.setOnClickListener(v -> onShowSelectPhoto(null, 1)); mIvLicensePhoto.setOnClickListener(v -> onShowSelectPhoto(null, 1));
@ -261,15 +270,23 @@ public class SocialOrgAddActivity extends BaseActivity {
mSwCanParty.setOnCheckedChangeListener((b, c) -> mIsCanParty = c ? 1 : 0); mSwCanParty.setOnCheckedChangeListener((b, c) -> mIsCanParty = c ? 1 : 0);
mSwHasYoung.setOnCheckedChangeListener((b, c) -> mHasYoung = c ? 1 : 0); mSwHasYoung.setOnCheckedChangeListener((b, c) -> mHasYoung = c ? 1 : 0);
mTvDegreeConcern.setOnClickListener(v -> onShowConcern()); mTvDegreeConcern.setOnClickListener(v -> onShowConcern());
mTvMasterType.setOnClickListener(v -> onShowCardType());
mTvCompanyType.setOnClickListener(v -> onShowCompanyType());
mTvAddressSel.setOnClickListener(v -> ARouter.getInstance() mTvAddressSel.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_MAP_SEL_POINT) .build(PathConfig.PATH_MODULE_MAP_SEL_POINT)
.navigation(mActivity, 16)); .navigation(mActivity, 16));
mTvCompanyStatus.setOnClickListener(v -> onShowCompanyStatus());
mTvCompanyType.setOnClickListener(v -> onShowCompanyType());
mSwHasLabour.setOnCheckedChangeListener((b, c) -> mHasLabour = c ? 1 : 0); mSwHasLabour.setOnCheckedChangeListener((b, c) -> mHasLabour = c ? 1 : 0);
mSwHasParty.setOnCheckedChangeListener((b, c) -> mHasParty = c ? 1 : 0); mSwHasParty.setOnCheckedChangeListener((b, c) -> mHasParty = c ? 1 : 0);
mSwHasWomen.setOnCheckedChangeListener((b, c) -> mHasWomen = c ? 1 : 0); mSwHasWomen.setOnCheckedChangeListener((b, c) -> mHasWomen = c ? 1 : 0);
mTvMasterType.setOnClickListener(v -> onShowCardType()); mRgCompanyStatus.setOnCheckedChangeListener((group, checkedId) -> {
if (checkedId == R.id.rb_normal) {
//正常
mOrgStatus = 1;
} else {
//不正常
mOrgStatus = 0;
}
});
initFacePhoto(); initFacePhoto();
initWorkSpacePhoto(); initWorkSpacePhoto();
mIvDelLicensePhoto.setOnClickListener(v -> { mIvDelLicensePhoto.setOnClickListener(v -> {
@ -319,32 +336,7 @@ public class SocialOrgAddActivity extends BaseActivity {
} }
mEnterpriseTypePicker.show(); mEnterpriseTypePicker.show();
} else { } else {
getDicListByType(PathConfig.DIC_SCHOOL_TYPE, 5); getDicListByType(PathConfig.DIC_ORG_TYPE, 5);
}
}
/**
* 显示组织状态 5
*/
private void onShowCompanyStatus() {
hideSoftKeyboard();
if (mCompanyStatusList != null && mCompanyStatusList.size() > 0) {
if (mCompanyStatusPicker == null) {
mCompanyStatusPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mCompanyStatusList.get(o1);
mSelCompanyStatus = bean;
mTvCompanyStatus.setText(bean.getDataName());
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mCompanyStatusPicker.setPicker(mCompanyStatusList);
}
mCompanyStatusPicker.show();
} else {
getDicListByType(PathConfig.DIC_SCHOOL_TYPE, 5);
} }
} }
@ -556,6 +548,12 @@ public class SocialOrgAddActivity extends BaseActivity {
.animateType(MarkerOptions.MarkerAnimateType.none); .animateType(MarkerOptions.MarkerAnimateType.none);
mBaiduMap.addOverlay(markerOptions); mBaiduMap.addOverlay(markerOptions);
} }
} else if (resultCode == 222) {
if (requestCode == 15) {
//网格选择
mSelGrid = (AreaGridListBean.RowsBean) data.getSerializableExtra("bean");
mTvGrid.setText(mSelGrid.getGridName());
}
} }
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
} }
@ -608,11 +606,15 @@ public class SocialOrgAddActivity extends BaseActivity {
.apply(options) .apply(options)
.into(mIvLicensePhoto); .into(mIvLicensePhoto);
mLicensePhotoId = baseUserBean.getData(); mLicensePhotoId = baseUserBean.getData();
mIvDelLicensePhoto.setVisibility(View.VISIBLE);
break; break;
case 2://门面照片 case 2://门面照片
mCurrentBean.setId(baseUserBean.getData()); mCurrentBean.setId(baseUserBean.getData());
mCurrentBean.setPath(picPath); mCurrentBean.setPath(picPath);
mFaceAdapter.notifyDataSetChanged(); if (mFacePhotos.size() < 9) {
mFacePhotos.add(new AddPhotoBean());
mFaceAdapter.notifyDataSetChanged();
}
mCurrentBean = null; mCurrentBean = null;
break; break;
case 5://5 企业负责人身份证正面 case 5://5 企业负责人身份证正面
@ -621,6 +623,7 @@ public class SocialOrgAddActivity extends BaseActivity {
.apply(options) .apply(options)
.into(mIvMasterPZ); .into(mIvMasterPZ);
mMasterZPhotoId = baseUserBean.getData(); mMasterZPhotoId = baseUserBean.getData();
mIvDelMasterPZ.setVisibility(View.VISIBLE);
break; break;
case 6://6 负责人身份证反面 case 6://6 负责人身份证反面
Glide.with(mActivity) Glide.with(mActivity)
@ -628,11 +631,15 @@ public class SocialOrgAddActivity extends BaseActivity {
.apply(options) .apply(options)
.into(mIvMasterPF); .into(mIvMasterPF);
mMasterFPhotoId = baseUserBean.getData(); mMasterFPhotoId = baseUserBean.getData();
mIvDelMasterPF.setVisibility(View.VISIBLE);
break; break;
case 7://工作场所 case 7://工作场所
mCurrentBean.setId(baseUserBean.getData()); mCurrentBean.setId(baseUserBean.getData());
mCurrentBean.setPath(picPath); mCurrentBean.setPath(picPath);
mWorkAdapter.notifyDataSetChanged(); if (mWorkPhotos.size() < 9) {
mWorkPhotos.add(new AddPhotoBean());
mWorkAdapter.notifyDataSetChanged();
}
mCurrentBean = null; mCurrentBean = null;
break; break;
@ -781,6 +788,10 @@ public class SocialOrgAddActivity extends BaseActivity {
mCardTypeList = beans; mCardTypeList = beans;
onShowCardType(); onShowCardType();
break; break;
case 5:
mEnterpriseTypeList = beans;
onShowCompanyType();
break;
} }
} else { } else {
ToastUtils.show("暂无数据"); ToastUtils.show("暂无数据");
@ -827,8 +838,8 @@ public class SocialOrgAddActivity extends BaseActivity {
bean.setAreaName(mSelAreaName); bean.setAreaName(mSelAreaName);
} }
//网格 //网格
if (!TextUtils.isEmpty(mSelGridId)) { if (mSelGrid != null) {
bean.setGridCode(mSelGridId); bean.setGridCode(mSelGrid.getGridCode());
bean.setGridName(mTvGrid.getText().toString().trim()); bean.setGridName(mTvGrid.getText().toString().trim());
} }
//营业执照 //营业执照
@ -849,11 +860,11 @@ public class SocialOrgAddActivity extends BaseActivity {
} }
String authourCode = mEtAuthorCode.getText().toString().trim(); String authourCode = mEtAuthorCode.getText().toString().trim();
if (!TextUtils.isEmpty(authourCode)) { if (!TextUtils.isEmpty(authourCode)) {
bean.setRegistrationAuthorityNo(authourCode); bean.setRegistrationAuthorityNo(authourCode);//登记管理机关代码
} }
String authorNumber = mEtAuthorNumber.getText().toString().trim(); String authorNumber = mEtAuthorNumber.getText().toString().trim();
if (!TextUtils.isEmpty(authorNumber)) { if (!TextUtils.isEmpty(authorNumber)) {
bean.setRegistrationNo(authorNumber); bean.setRegistrationNo(authorNumber);//登记证号
} }
String approvalDate = mTvApprovalDate.getText().toString().trim(); String approvalDate = mTvApprovalDate.getText().toString().trim();
if (!TextUtils.isEmpty(approvalDate)) { if (!TextUtils.isEmpty(approvalDate)) {
@ -893,19 +904,18 @@ public class SocialOrgAddActivity extends BaseActivity {
bean.setOrganizationTypeId(mSelEnterpriseType.getDataId()); bean.setOrganizationTypeId(mSelEnterpriseType.getDataId());
bean.setOrganizationTypeName(mSelEnterpriseType.getDataName()); bean.setOrganizationTypeName(mSelEnterpriseType.getDataName());
} }
//TODO 组织状态 bean.setOrganizationStatus(mOrgStatus);
if (mSelCompanyStatus != null) {
// bean.setOrganizationStatus(mSelCompanyStatus.getDataId());
}
String summary = mEtCompanySummary.getText().toString().trim(); String summary = mEtCompanySummary.getText().toString().trim();
if (!TextUtils.isEmpty(summary)) { if (!TextUtils.isEmpty(summary)) {
bean.setOrganizationSummary(summary); bean.setOrganizationSummary(summary);
} }
if (mFacePhotos.size() > 2) { if (mFacePhotos.size() >= 2) {
String ids = ""; String ids = "";
for (int i = 0; i < mFacePhotos.size(); i++) { for (int i = 0; i < mFacePhotos.size(); i++) {
ids += mFacePhotos.get(i).getId() + ","; if (!TextUtils.isEmpty(mFacePhotos.get(i).getId())) {
ids += mFacePhotos.get(i).getId() + ",";
}
} }
ids = ids.substring(0, ids.length() - 1); ids = ids.substring(0, ids.length() - 1);
bean.setFacadePhotos(ids); bean.setFacadePhotos(ids);
@ -919,6 +929,7 @@ public class SocialOrgAddActivity extends BaseActivity {
} }
if (mSelCardType != null) { if (mSelCardType != null) {
bean.setMasterIdCardCode(mSelCardType.getDataId()); bean.setMasterIdCardCode(mSelCardType.getDataId());
bean.setMasterIdCardCodeName(mSelCardType.getDataName());
} }
String legalName = mEtLegalName.getText().toString().trim(); String legalName = mEtLegalName.getText().toString().trim();
if (!TextUtils.isEmpty(legalName)) { if (!TextUtils.isEmpty(legalName)) {
@ -956,15 +967,16 @@ public class SocialOrgAddActivity extends BaseActivity {
if (!TextUtils.isEmpty(sourceFound)) { if (!TextUtils.isEmpty(sourceFound)) {
bean.setSourceOfFunds(sourceFound); bean.setSourceOfFunds(sourceFound);
} }
String womanCount = mEtCompanyWomanCount.getText().toString().trim(); String womanCount = mEtCompanyWomanCount.getText().toString().trim();
if (!TextUtils.isEmpty(womanCount)) { if (!TextUtils.isEmpty(womanCount)) {
bean.setWomenTotalPerson(Integer.parseInt(womanCount)); bean.setWomenTotalPerson(Integer.parseInt(womanCount));
} }
if (mWorkPhotos.size() > 2) { if (mWorkPhotos.size() >= 2) {
String ids = ""; String ids = "";
for (int i = 0; i < mWorkPhotos.size(); i++) { for (int i = 0; i < mWorkPhotos.size(); i++) {
ids += mWorkPhotos.get(i).getId() + ","; if (!TextUtils.isEmpty(mWorkPhotos.get(i).getId())) {
ids += mWorkPhotos.get(i).getId() + ",";
}
} }
ids = ids.substring(0, ids.length() - 1); ids = ids.substring(0, ids.length() - 1);
bean.setWorkplacePhotos(ids); bean.setWorkplacePhotos(ids);
@ -983,7 +995,41 @@ public class SocialOrgAddActivity extends BaseActivity {
* 保存数据 * 保存数据
*/ */
private void doSaveCompany() { private void doSaveCompany() {
if (checkParams()) {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
dialog.show();
RequestBody body = buildParams();
RetrofitManager.getInstance()
.create(GridApis.class)
.doSaveSocialOrg(body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull SuccessBean successBean) {
dialog.dismiss();
ToastUtils.show("保存成功");
setResult(13);
finish();
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
} }
@Override @Override

View File

@ -1,9 +1,13 @@
package com.tengshisoft.gridmodule.incident.activitys.orgmanage; package com.tengshisoft.gridmodule.incident.activitys.orgmanage;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.ZoomControls; import android.widget.ZoomControls;
@ -21,7 +25,9 @@ import com.baidu.mapapi.map.TextureMapView;
import com.baidu.mapapi.model.LatLng; import com.baidu.mapapi.model.LatLng;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.hjq.toast.ToastUtils;
import com.tengshisoft.commonmodule.beans.SocialOrgDetailBean; import com.tengshisoft.commonmodule.beans.SocialOrgDetailBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis; import com.tengshisoft.commonmodule.nets.GridApis;
import com.tengshisoft.gridmodule.R; import com.tengshisoft.gridmodule.R;
import com.tengshisoft.gridmodule.R2; import com.tengshisoft.gridmodule.R2;
@ -32,10 +38,12 @@ import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter; import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter;
import com.tenlionsoft.baselib.core.widget.base.GlideRoundTransform; import com.tenlionsoft.baselib.core.widget.base.GlideRoundTransform;
import com.tenlionsoft.baselib.utils.ExceptionHandler; import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils; import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.util.ArrayList; import java.util.ArrayList;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.core.widget.NestedScrollView; import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
@ -145,6 +153,10 @@ public class SocialOrgDetailActivity extends BaseActivity {
TextView mTvRemark; TextView mTvRemark;
@BindView(R2.id.nsv_content) @BindView(R2.id.nsv_content)
NestedScrollView mNsvContent; NestedScrollView mNsvContent;
@BindView(R2.id.btn_edit)
Button mBtnEdit;
@BindView(R2.id.btn_del)
Button mBtnDel;
private Unbinder mBind; private Unbinder mBind;
private String mId; private String mId;
private BaiduMap mBaiduMap; private BaiduMap mBaiduMap;
@ -177,6 +189,69 @@ public class SocialOrgDetailActivity extends BaseActivity {
initViews(); initViews();
mId = getIntent().getStringExtra("id"); mId = getIntent().getStringExtra("id");
getDetailData(); getDetailData();
mBtnEdit.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SOCIAL_ORG_EDIT)
.withString("id", mId)
.navigation(mActivity, 12));
mBtnDel.setOnClickListener(v -> doDel());
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 12) {
if (resultCode == 13) {
refreshView(STATE_LOAD_LOADING);
getDetailData();
}
}
}
/**
* 删除数据
*/
private void doDel() {
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
builder.setTitle("提示")
.setMessage("确定要删除该组织吗?")
.setPositiveButton("确定", (dialog, which) -> {
dialog.dismiss();
ProgressDialog dialog1 = UIUtil.initDialog(mActivity, "删除中...");
dialog1.show();
RetrofitManager.getInstance()
.create(GridApis.class)
.doDelSocialOrg(mId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull SuccessBean successBean) {
dialog1.dismiss();
ToastUtils.show("删除成功");
setResult(13);
finish();
}
@Override
public void onError(@NonNull Throwable e) {
dialog1.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
})
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
.create()
.show();
} }
/** /**
@ -230,7 +305,8 @@ public class SocialOrgDetailActivity extends BaseActivity {
.into(mIvLicensePhoto); .into(mIvLicensePhoto);
mTvLicenseNumber.setText(bean.getBusinessRegNo()); mTvLicenseNumber.setText(bean.getBusinessRegNo());
mTvAuthor.setText(bean.getRegistrationAuthorityNo()); mTvAuthor.setText(bean.getRegistrationAuthorityNo());
mTvAuthorNumber.setText(bean.getRegistrationAuthorityNo()); mTvAuthorNumber.setText(bean.getRegistrationNo());
mTvLicenseStartDate.setText(bean.getBusinessLicenseStartDate()); mTvLicenseStartDate.setText(bean.getBusinessLicenseStartDate());
mTvLicenseEndDate.setText(bean.getBusinessLicenseEndDate()); mTvLicenseEndDate.setText(bean.getBusinessLicenseEndDate());
mTvApprovalDate.setText(bean.getApprovalDate()); mTvApprovalDate.setText(bean.getApprovalDate());
@ -259,7 +335,7 @@ public class SocialOrgDetailActivity extends BaseActivity {
mBaiduMap.addOverlay(markerOptions); mBaiduMap.addOverlay(markerOptions);
} }
mTvCompanyName.setText(bean.getOrganizationName()); mTvCompanyName.setText(bean.getOrganizationName());
mTvCompanyStatus.setText(bean.getOrganizationStatus() + ""); mTvCompanyStatus.setText(bean.getOrganizationStatus() == 1 ? "正常" : "不正常");
mTvCompanyType.setText(bean.getOrganizationTypeName()); mTvCompanyType.setText(bean.getOrganizationTypeName());
mTvCompanySummary.setText(bean.getOrganizationSummary()); mTvCompanySummary.setText(bean.getOrganizationSummary());
if (!TextUtils.isEmpty(bean.getFacadePhotos())) { if (!TextUtils.isEmpty(bean.getFacadePhotos())) {
@ -289,7 +365,7 @@ public class SocialOrgDetailActivity extends BaseActivity {
mTvLegalName.setText(bean.getLegalPersonName()); mTvLegalName.setText(bean.getLegalPersonName());
mTvMasterName.setText(bean.getMasterName()); mTvMasterName.setText(bean.getMasterName());
mTvMasterPhone.setText(bean.getMasterPhone()); mTvMasterPhone.setText(bean.getMasterPhone());
mTvMasterType.setText(bean.getMasterIdCardCode()); mTvMasterType.setText(bean.getMasterIdCardCodeName());
mTvMasterIdCard.setText(bean.getMasterIdCard()); mTvMasterIdCard.setText(bean.getMasterIdCard());
String masterFront = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardFront(); String masterFront = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardFront();
String masterBack = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardBack(); String masterBack = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardBack();

View File

@ -14,6 +14,8 @@ import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
import android.widget.ZoomControls; import android.widget.ZoomControls;
@ -36,8 +38,10 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.tengshisoft.commonmodule.beans.AreaGridListBean;
import com.tengshisoft.commonmodule.beans.SaveSocialOrgBean; import com.tengshisoft.commonmodule.beans.SaveSocialOrgBean;
import com.tengshisoft.commonmodule.beans.SocialOrgDetailBean; import com.tengshisoft.commonmodule.beans.SocialOrgDetailBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis; import com.tengshisoft.commonmodule.nets.GridApis;
import com.tengshisoft.gridmodule.R; import com.tengshisoft.gridmodule.R;
import com.tengshisoft.gridmodule.R2; import com.tengshisoft.gridmodule.R2;
@ -97,10 +101,10 @@ public class SocialOrgEditActivity extends BaseActivity {
TextView mTvGrid; TextView mTvGrid;
@BindView(R2.id.iv_license_photo) @BindView(R2.id.iv_license_photo)
ImageView mIvLicensePhoto; ImageView mIvLicensePhoto;
@BindView(R2.id.iv_del_license_photo)
ImageView mIvDelLicensePhoto;
@BindView(R2.id.et_license_number) @BindView(R2.id.et_license_number)
EditText mEtLicenseNumber; EditText mEtLicenseNumber;
@BindView(R2.id.tv_author)
TextView mTvAuthor;
@BindView(R2.id.et_author_number) @BindView(R2.id.et_author_number)
EditText mEtAuthorNumber; EditText mEtAuthorNumber;
@BindView(R2.id.tv_license_start_date) @BindView(R2.id.tv_license_start_date)
@ -131,8 +135,6 @@ public class SocialOrgEditActivity extends BaseActivity {
TextureMapView mTmvMap; TextureMapView mTmvMap;
@BindView(R2.id.et_company_name) @BindView(R2.id.et_company_name)
EditText mEtCompanyName; EditText mEtCompanyName;
@BindView(R2.id.tv_company_status)
TextView mTvCompanyStatus;
@BindView(R2.id.tv_company_type) @BindView(R2.id.tv_company_type)
TextView mTvCompanyType; TextView mTvCompanyType;
@BindView(R2.id.et_company_summary) @BindView(R2.id.et_company_summary)
@ -159,14 +161,18 @@ public class SocialOrgEditActivity extends BaseActivity {
EditText mEtMasterIdCard; EditText mEtMasterIdCard;
@BindView(R2.id.iv_master_p_z) @BindView(R2.id.iv_master_p_z)
ImageView mIvMasterPZ; ImageView mIvMasterPZ;
@BindView(R2.id.iv_del_master_p_z)
ImageView mIvDelMasterPZ;
@BindView(R2.id.iv_master_p_f) @BindView(R2.id.iv_master_p_f)
ImageView mIvMasterPF; ImageView mIvMasterPF;
@BindView(R2.id.iv_del_master_p_f)
ImageView mIvDelMasterPF;
@BindView(R2.id.et_security_name) @BindView(R2.id.et_security_name)
EditText mEtSecurityName; EditText mEtSecurityName;
@BindView(R2.id.et_security_phone) @BindView(R2.id.et_security_phone)
EditText mEtSecurityPhone; EditText mEtSecurityPhone;
@BindView(R2.id.tv_source_funds) @BindView(R2.id.et_source_funds)
TextView mTvSourceFunds; EditText mEtSourceFunds;
@BindView(R2.id.et_company_woman_count) @BindView(R2.id.et_company_woman_count)
EditText mEtCompanyWomanCount; EditText mEtCompanyWomanCount;
@BindView(R2.id.rlv_work_photo) @BindView(R2.id.rlv_work_photo)
@ -175,6 +181,15 @@ public class SocialOrgEditActivity extends BaseActivity {
EditText mEtRemark; EditText mEtRemark;
@BindView(R2.id.nsv_content) @BindView(R2.id.nsv_content)
NestedScrollView mNsvContent; NestedScrollView mNsvContent;
@BindView(R2.id.et_author_code)
EditText mEtAuthorCode;
@BindView(R2.id.rb_normal)
RadioButton mRbNormal;
@BindView(R2.id.rb_unnormal)
RadioButton mRbUnnormal;
@BindView(R2.id.rg_company_status)
RadioGroup mRgCompanyStatus;
private Unbinder mBind;
private String mSelAreaCode; private String mSelAreaCode;
private String mSelAreaId; private String mSelAreaId;
private String mSelAreaName; private String mSelAreaName;
@ -187,18 +202,13 @@ public class SocialOrgEditActivity extends BaseActivity {
private String mPicPath; private String mPicPath;
private OptionsPickerView mConcernPicker; private OptionsPickerView mConcernPicker;
private OptionsPickerView mEnterpriseTypePicker; private OptionsPickerView mEnterpriseTypePicker;
private OptionsPickerView mCompanyStatusPicker;
private OptionsPickerView mCardTypePicker; private OptionsPickerView mCardTypePicker;
private List<DicBean> mConcernList; private List<DicBean> mConcernList;
private List<DicBean> mEnterpriseTypeList; private List<DicBean> mEnterpriseTypeList;
private List<DicBean> mCompanyStatusList;
private List<DicBean> mCardTypeList; private List<DicBean> mCardTypeList;
private DicBean mSelConcern; private DicBean mSelConcern;
private DicBean mSelEnterpriseType; private DicBean mSelEnterpriseType;
private DicBean mSelCompanyStatus;
private DicBean mSelCardType; private DicBean mSelCardType;
private DicBean mSelSource;
private DicBean mSelAuthor;
private int mIsCanParty = 0;//是否具备建立中共党组织 private int mIsCanParty = 0;//是否具备建立中共党组织
private int mHasYoung = 0;//是否有共青团 private int mHasYoung = 0;//是否有共青团
private int mHasLabour = 0;//是否有工会 private int mHasLabour = 0;//是否有工会
@ -212,8 +222,8 @@ public class SocialOrgEditActivity extends BaseActivity {
private String mMasterZPhotoId;//负责人身份证正面 private String mMasterZPhotoId;//负责人身份证正面
private String mMasterFPhotoId;//负责人身份证反面 private String mMasterFPhotoId;//负责人身份证反面
private String mLicensePhotoId;//营业执照相片 private String mLicensePhotoId;//营业执照相片
private String mSelGridId;//选择的网格 private AreaGridListBean.RowsBean mSelGrid;//选择的网格
private Unbinder mBind; private int mOrgStatus = 1;//状态 正常
private String mId; private String mId;
@Override @Override
@ -221,16 +231,16 @@ public class SocialOrgEditActivity extends BaseActivity {
return R.layout.activity_social_org_edit; return R.layout.activity_social_org_edit;
} }
@Override @Override
public void initData() { public void initData() {
mBind = ButterKnife.bind(this); mBind = ButterKnife.bind(this);
mTvPublish.setVisibility(View.VISIBLE); mTvPublish.setVisibility(View.VISIBLE);
mTvBaseTitle.setText("社会组织信息录入"); mTvBaseTitle.setText("社会组织信息编辑");
mTvPublish.setText("保存"); mTvPublish.setText("保存");
mTvPublish.setOnClickListener(v -> doSaveCompany()); mTvPublish.setOnClickListener(v -> doSaveCompany());
mId = getIntent().getStringExtra("id");
initViews(); initViews();
mId = getIntent().getStringExtra("id");
getDetailData();
} }
/** /**
@ -276,24 +286,52 @@ public class SocialOrgEditActivity extends BaseActivity {
.placeholder(R.drawable.ic_img_loading); .placeholder(R.drawable.ic_img_loading);
refreshView(STATE_LOAD_SUCCESS); refreshView(STATE_LOAD_SUCCESS);
mTvArea.setText(bean.getAreaName()); mTvArea.setText(bean.getAreaName());
mSelAreaCode = bean.getAreaCode();
mSelAreaName = bean.getAreaName();
mTvGrid.setText(bean.getGridName()); mTvGrid.setText(bean.getGridName());
mEtCompanySummary.setText(bean.getOrganizationSummary());
if (!TextUtils.isEmpty(bean.getGridCode())) {
mSelGrid = new AreaGridListBean.RowsBean();
mSelGrid.setGridCode(bean.getGridCode());
mSelGrid.setGridName(bean.getGridName());
}
String licensePhoto = BaseUrlApi.BASE_IMG_URL + bean.getBusinessLicense(); String licensePhoto = BaseUrlApi.BASE_IMG_URL + bean.getBusinessLicense();
Glide.with(mActivity) if (!TextUtils.isEmpty(bean.getBusinessLicense())) {
.load(licensePhoto) mLicensePhotoId = bean.getBusinessLicense();
.apply(options) Glide.with(mActivity)
.into(mIvLicensePhoto); .load(licensePhoto)
.apply(options)
.into(mIvLicensePhoto);
mIvDelLicensePhoto.setVisibility(View.VISIBLE);
} else {
mIvDelLicensePhoto.setVisibility(View.GONE);
Glide.with(mActivity)
.load(R.drawable.ic_add_photo)
.apply(options)
.into(mIvLicensePhoto);
}
mEtLicenseNumber.setText(bean.getBusinessRegNo()); mEtLicenseNumber.setText(bean.getBusinessRegNo());
mTvAuthor.setText(bean.getRegistrationAuthorityNo()); mEtAuthorCode.setText(bean.getRegistrationAuthorityNo());
mEtAuthorNumber.setText(bean.getRegistrationAuthorityNo()); mEtAuthorNumber.setText(bean.getRegistrationNo());
mTvLicenseStartDate.setText(bean.getBusinessLicenseStartDate()); mTvLicenseStartDate.setText(bean.getBusinessLicenseStartDate());
mTvLicenseEndDate.setText(bean.getBusinessLicenseEndDate()); mTvLicenseEndDate.setText(bean.getBusinessLicenseEndDate());
mTvApprovalDate.setText(bean.getApprovalDate()); mTvApprovalDate.setText(bean.getApprovalDate());
mSwHasOver.setChecked(bean.getHasOverseasBackground() == 1); mSwHasOver.setChecked(bean.getHasOverseasBackground() == 1);
mHasOver = bean.getHasOverseasBackground();
mSwCanParty.setChecked(bean.getCanEstablishPartyOrg() == 1); mSwCanParty.setChecked(bean.getCanEstablishPartyOrg() == 1);
mHasParty = bean.getCanEstablishPartyOrg();
mEtPartyCount.setText(bean.getPartyOrgTotalPerson() + ""); mEtPartyCount.setText(bean.getPartyOrgTotalPerson() + "");
mSwHasYoung.setChecked(bean.getHasCommunistYouthLeague() == 1); mSwHasYoung.setChecked(bean.getHasCommunistYouthLeague() == 1);
mHasYoung = bean.getHasCommunistYouthLeague();
mEtYoungCount.setText(bean.getCommunistYouthLeagueTotalPerson() + ""); mEtYoungCount.setText(bean.getCommunistYouthLeagueTotalPerson() + "");
mTvDegreeConcern.setText(bean.getDegreeOfConcernName()); mTvDegreeConcern.setText(bean.getDegreeOfConcernName());
if (!TextUtils.isEmpty(bean.getDegreeOfConcernName())) {
mSelConcern = new DicBean();
mSelConcern.setDataName(bean.getDegreeOfConcernName());
mSelConcern.setDataId(bean.getDegreeOfConcernId());
}
mEtAddress.setText(bean.getOfficeAddress()); mEtAddress.setText(bean.getOfficeAddress());
mEtResidence.setText(bean.getResidence()); mEtResidence.setText(bean.getResidence());
@ -313,28 +351,33 @@ public class SocialOrgEditActivity extends BaseActivity {
mBaiduMap.addOverlay(markerOptions); mBaiduMap.addOverlay(markerOptions);
} }
mEtCompanyName.setText(bean.getOrganizationName()); mEtCompanyName.setText(bean.getOrganizationName());
mTvCompanyStatus.setText(bean.getOrganizationStatus() + "");
mTvCompanyType.setText(bean.getOrganizationTypeName()); mTvCompanyType.setText(bean.getOrganizationTypeName());
mEtCompanySummary.setText(bean.getOrganizationSummary()); if (!TextUtils.isEmpty(bean.getOrganizationTypeId())) {
mSelEnterpriseType = new DicBean();
mSelEnterpriseType.setDataId(bean.getOrganizationTypeId());
mSelEnterpriseType.setDataName(bean.getOrganizationTypeName());
}
mOrgStatus = bean.getOrganizationStatus();
if (bean.getOrganizationStatus() == 1) {
mRbNormal.setChecked(true);
} else {
mRbUnnormal.setChecked(true);
}
if (!TextUtils.isEmpty(bean.getFacadePhotos())) { if (!TextUtils.isEmpty(bean.getFacadePhotos())) {
String[] split = bean.getFacadePhotos().split(","); String[] split = bean.getFacadePhotos().split(",");
ArrayList<String> paths = new ArrayList<>(); mFacePhotos.clear();
BaseShowPhotoAdapter mAdapter = new BaseShowPhotoAdapter(mActivity, paths);
mRlvFacePhoto.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvFacePhoto.setAdapter(mAdapter);
mAdapter.setOnItemClickListener((data, pos) -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
.withStringArrayList("imgUrls", paths)
.withInt("curItem", pos)
.navigation());
for (String doorId : split) { for (String doorId : split) {
if (!TextUtils.isEmpty(doorId)) { if (!TextUtils.isEmpty(doorId)) {
paths.add(BaseUrlApi.BASE_IMG_URL + doorId); AddPhotoBean addPhotoBean = new AddPhotoBean();
String path = BaseUrlApi.BASE_IMG_URL + doorId;
addPhotoBean.setId(doorId);
addPhotoBean.setPath(path);
mFacePhotos.add(addPhotoBean);
} }
} }
mAdapter.setData(paths); mFacePhotos.add(new AddPhotoBean());
} else { mFaceAdapter.setData(mFacePhotos);
//TODO 没有门面
} }
mSwHasLabour.setChecked(bean.getHasLabourUnion() == 1); mSwHasLabour.setChecked(bean.getHasLabourUnion() == 1);
mSwHasParty.setChecked(bean.getHasPartyOrg() == 1); mSwHasParty.setChecked(bean.getHasPartyOrg() == 1);
@ -343,41 +386,61 @@ public class SocialOrgEditActivity extends BaseActivity {
mEtLegalName.setText(bean.getLegalPersonName()); mEtLegalName.setText(bean.getLegalPersonName());
mEtMasterName.setText(bean.getMasterName()); mEtMasterName.setText(bean.getMasterName());
mEtMasterPhone.setText(bean.getMasterPhone()); mEtMasterPhone.setText(bean.getMasterPhone());
mTvMasterType.setText(bean.getMasterIdCardCode()); mTvMasterType.setText(bean.getMasterIdCardCodeName());
if (!TextUtils.isEmpty(bean.getMasterIdCardCode())) {
mSelCardType = new DicBean();
mSelCardType.setDataName(bean.getMasterIdCardCodeName());
mSelCardType.setDataId(bean.getMasterIdCardCode());
}
mEtMasterIdCard.setText(bean.getMasterIdCard()); mEtMasterIdCard.setText(bean.getMasterIdCard());
String masterFront = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardFront(); String masterFront = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardFront();
String masterBack = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardBack(); String masterBack = BaseUrlApi.BASE_IMG_URL + bean.getMasterIdCardBack();
Glide.with(mActivity) if (!TextUtils.isEmpty(bean.getMasterIdCardBack())) {
.load(masterFront) mMasterFPhotoId = bean.getMasterIdCardBack();
.apply(options) Glide.with(mActivity)
.into(mIvMasterPZ); .load(masterBack)
Glide.with(mActivity) .apply(options)
.load(masterBack) .into(mIvMasterPF);
.apply(options) mIvDelMasterPF.setVisibility(View.VISIBLE);
.into(mIvMasterPF); } else {
Glide.with(mActivity)
.load(R.drawable.ic_add_photo)
.apply(options)
.into(mIvMasterPF);
mIvDelMasterPF.setVisibility(View.GONE);
}
if (!TextUtils.isEmpty(bean.getMasterIdCardFront())) {
mMasterZPhotoId = bean.getMasterIdCardFront();
Glide.with(mActivity)
.load(masterFront)
.apply(options)
.into(mIvMasterPZ);
mIvDelMasterPZ.setVisibility(View.VISIBLE);
} else {
Glide.with(mActivity)
.load(R.drawable.ic_add_photo)
.apply(options)
.into(mIvMasterPZ);
mIvDelMasterPZ.setVisibility(View.GONE);
}
mEtSecurityName.setText(bean.getSecurityPersonName()); mEtSecurityName.setText(bean.getSecurityPersonName());
mEtSecurityPhone.setText(bean.getSecurityPersonPhone()); mEtSecurityPhone.setText(bean.getSecurityPersonPhone());
mTvSourceFunds.setText(bean.getSourceOfFunds() + ""); mEtSourceFunds.setText(bean.getSourceOfFunds() + "");
mEtCompanyWomanCount.setText(bean.getWomenTotalPerson() + ""); mEtCompanyWomanCount.setText(bean.getWomenTotalPerson() + "");
if (!TextUtils.isEmpty(bean.getWorkplacePhotos())) { if (!TextUtils.isEmpty(bean.getWorkplacePhotos())) {
mWorkPhotos.clear();
String[] split = bean.getWorkplacePhotos().split(","); String[] split = bean.getWorkplacePhotos().split(",");
ArrayList<String> paths = new ArrayList<>();
BaseShowPhotoAdapter mAdapter = new BaseShowPhotoAdapter(mActivity, paths);
mRlvWorkPhoto.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvWorkPhoto.setAdapter(mAdapter);
mAdapter.setOnItemClickListener((data, pos) -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
.withStringArrayList("imgUrls", paths)
.withInt("curItem", pos)
.navigation());
for (String doorId : split) { for (String doorId : split) {
if (!TextUtils.isEmpty(doorId)) { if (!TextUtils.isEmpty(doorId)) {
paths.add(BaseUrlApi.BASE_IMG_URL + doorId); AddPhotoBean addPhotoBean = new AddPhotoBean();
String path = BaseUrlApi.BASE_IMG_URL + doorId;
addPhotoBean.setId(doorId);
addPhotoBean.setPath(path);
mWorkPhotos.add(addPhotoBean);
} }
} }
mAdapter.setData(paths); mWorkPhotos.add(new AddPhotoBean());
} else { mWorkAdapter.setData(mWorkPhotos);
//TODO 没有上传工作场所图片
} }
mEtRemark.setText(bean.getRemarks()); mEtRemark.setText(bean.getRemarks());
} }
@ -397,15 +460,15 @@ public class SocialOrgEditActivity extends BaseActivity {
if (TextUtils.isEmpty(mSelAreaCode)) { if (TextUtils.isEmpty(mSelAreaCode)) {
ToastUtils.show("请选择地区"); ToastUtils.show("请选择地区");
} else { } else {
//TODO 选择网格 ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_GRID)
.withString("areaCode", mSelAreaCode)
.navigation(mActivity, 15);
} }
}); });
initFacePhoto();
initWorkSpacePhoto();
mIvLicensePhoto.setOnClickListener(v -> onShowSelectPhoto(null, 1)); mIvLicensePhoto.setOnClickListener(v -> onShowSelectPhoto(null, 1));
mIvMasterPZ.setOnClickListener(v -> onShowSelectPhoto(null, 3)); mIvMasterPZ.setOnClickListener(v -> onShowSelectPhoto(null, 5));
mIvMasterPF.setOnClickListener(v -> onShowSelectPhoto(null, 4)); mIvMasterPF.setOnClickListener(v -> onShowSelectPhoto(null, 6));
mTvAuthor.setOnClickListener(v -> onShowAuthor());
mTvLicenseStartDate.setOnClickListener(v -> onShowDate(1)); mTvLicenseStartDate.setOnClickListener(v -> onShowDate(1));
mTvLicenseEndDate.setOnClickListener(v -> onShowDate(2)); mTvLicenseEndDate.setOnClickListener(v -> onShowDate(2));
mTvApprovalDate.setOnClickListener(v -> onShowDate(3)); mTvApprovalDate.setOnClickListener(v -> onShowDate(3));
@ -413,22 +476,48 @@ public class SocialOrgEditActivity extends BaseActivity {
mSwCanParty.setOnCheckedChangeListener((b, c) -> mIsCanParty = c ? 1 : 0); mSwCanParty.setOnCheckedChangeListener((b, c) -> mIsCanParty = c ? 1 : 0);
mSwHasYoung.setOnCheckedChangeListener((b, c) -> mHasYoung = c ? 1 : 0); mSwHasYoung.setOnCheckedChangeListener((b, c) -> mHasYoung = c ? 1 : 0);
mTvDegreeConcern.setOnClickListener(v -> onShowConcern()); mTvDegreeConcern.setOnClickListener(v -> onShowConcern());
mTvMasterType.setOnClickListener(v -> onShowCardType());
mTvCompanyType.setOnClickListener(v -> onShowCompanyType());
mTvAddressSel.setOnClickListener(v -> ARouter.getInstance() mTvAddressSel.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_MAP_SEL_POINT) .build(PathConfig.PATH_MODULE_MAP_SEL_POINT)
.navigation(mActivity, 16)); .navigation(mActivity, 16));
mTvCompanyStatus.setOnClickListener(v -> onShowCompanyStatus());
mTvCompanyType.setOnClickListener(v -> onShowCompanyType());
mSwHasLabour.setOnCheckedChangeListener((b, c) -> mHasLabour = c ? 1 : 0); mSwHasLabour.setOnCheckedChangeListener((b, c) -> mHasLabour = c ? 1 : 0);
mSwHasParty.setOnCheckedChangeListener((b, c) -> mHasParty = c ? 1 : 0); mSwHasParty.setOnCheckedChangeListener((b, c) -> mHasParty = c ? 1 : 0);
mSwHasWomen.setOnCheckedChangeListener((b, c) -> mHasWomen = c ? 1 : 0); mSwHasWomen.setOnCheckedChangeListener((b, c) -> mHasWomen = c ? 1 : 0);
mTvMasterType.setOnClickListener(v -> onShowCardType()); mRgCompanyStatus.setOnCheckedChangeListener((group, checkedId) -> {
mTvSourceFunds.setOnClickListener(v -> onShowSourceFounds()); if (checkedId == R.id.rb_normal) {
} //正常
mOrgStatus = 1;
} else {
//不正常
mOrgStatus = 0;
}
});
initFacePhoto();
initWorkSpacePhoto();
mIvDelLicensePhoto.setOnClickListener(v -> {
mLicensePhotoId = "";
Glide.with(mActivity)
.load(R.drawable.ic_add_photo)
.into(mIvLicensePhoto);
mIvDelLicensePhoto.setVisibility(View.GONE);
});
/** mIvDelMasterPZ.setOnClickListener(v -> {
* 显示资金来源 mMasterZPhotoId = "";
*/ Glide.with(mActivity)
private void onShowSourceFounds() { .load(R.drawable.ic_add_photo)
.into(mIvMasterPZ);
mIvDelMasterPZ.setVisibility(View.GONE);
});
mIvDelMasterPF.setOnClickListener(v -> {
mMasterFPhotoId = "";
Glide.with(mActivity)
.load(R.drawable.ic_add_photo)
.into(mIvMasterPF);
mIvDelMasterPF.setVisibility(View.GONE);
});
} }
@ -453,41 +542,10 @@ public class SocialOrgEditActivity extends BaseActivity {
} }
mEnterpriseTypePicker.show(); mEnterpriseTypePicker.show();
} else { } else {
getDicListByType(PathConfig.DIC_SCHOOL_TYPE, 5); getDicListByType(PathConfig.DIC_ORG_TYPE, 5);
} }
} }
/**
* 显示组织状态 5
*/
private void onShowCompanyStatus() {
hideSoftKeyboard();
if (mCompanyStatusList != null && mCompanyStatusList.size() > 0) {
if (mCompanyStatusPicker == null) {
mCompanyStatusPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mCompanyStatusList.get(o1);
mSelCompanyStatus = bean;
mTvCompanyStatus.setText(bean.getDataName());
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mCompanyStatusPicker.setPicker(mCompanyStatusList);
}
mCompanyStatusPicker.show();
} else {
getDicListByType(PathConfig.DIC_SCHOOL_TYPE, 5);
}
}
/**
* 登记管理机关
*/
private void onShowAuthor() {
}
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
private void initMap() { private void initMap() {
@ -519,7 +577,7 @@ public class SocialOrgEditActivity extends BaseActivity {
mWorkPhotos = new ArrayList<>(); mWorkPhotos = new ArrayList<>();
mWorkPhotos.add(bean); mWorkPhotos.add(bean);
mWorkAdapter = new AddPhotoAdapter(mActivity, mWorkPhotos); mWorkAdapter = new AddPhotoAdapter(mActivity, mWorkPhotos);
GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 3) { GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 4) {
@Override @Override
public boolean canScrollHorizontally() { public boolean canScrollHorizontally() {
return false; return false;
@ -532,7 +590,23 @@ public class SocialOrgEditActivity extends BaseActivity {
}; };
mRlvWorkPhoto.setLayoutManager(gridLayoutManager); mRlvWorkPhoto.setLayoutManager(gridLayoutManager);
mRlvWorkPhoto.setAdapter(mWorkAdapter); mRlvWorkPhoto.setAdapter(mWorkAdapter);
mWorkAdapter.addOnItemClickListener(addPhotoBean -> onShowSelectPhoto(addPhotoBean, 7)); mWorkAdapter.addOnItemClickListener(addPhotoBean -> {
if (TextUtils.isEmpty(addPhotoBean.getId())) {
onShowSelectPhoto(addPhotoBean, 7);
} else {
ArrayList paths = new ArrayList();
paths.add(addPhotoBean.getPath());
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
.withStringArrayList("imgUrls", paths)
.withInt("curItem", 0)
.navigation();
}
});
mWorkAdapter.addOnDeleteListener((bean1, i) -> {
mWorkPhotos.remove(bean1);
mWorkAdapter.notifyDataSetChanged();
});
} }
@ -544,7 +618,7 @@ public class SocialOrgEditActivity extends BaseActivity {
mFacePhotos = new ArrayList<>(); mFacePhotos = new ArrayList<>();
mFacePhotos.add(bean); mFacePhotos.add(bean);
mFaceAdapter = new AddPhotoAdapter(mActivity, mFacePhotos); mFaceAdapter = new AddPhotoAdapter(mActivity, mFacePhotos);
GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 3) { GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 4) {
@Override @Override
public boolean canScrollHorizontally() { public boolean canScrollHorizontally() {
return false; return false;
@ -557,9 +631,26 @@ public class SocialOrgEditActivity extends BaseActivity {
}; };
mRlvFacePhoto.setLayoutManager(gridLayoutManager); mRlvFacePhoto.setLayoutManager(gridLayoutManager);
mRlvFacePhoto.setAdapter(mFaceAdapter); mRlvFacePhoto.setAdapter(mFaceAdapter);
mFaceAdapter.addOnItemClickListener(addPhotoBean -> onShowSelectPhoto(addPhotoBean, 2)); mFaceAdapter.addOnItemClickListener(addPhotoBean -> {
if (TextUtils.isEmpty(addPhotoBean.getId())) {
onShowSelectPhoto(addPhotoBean, 2);
} else {
ArrayList paths = new ArrayList();
paths.add(addPhotoBean.getPath());
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
.withStringArrayList("imgUrls", paths)
.withInt("curItem", 0)
.navigation();
}
});
mFaceAdapter.addOnDeleteListener((bean1, i) -> {
mFacePhotos.remove(bean1);
mFaceAdapter.notifyDataSetChanged();
});
} }
/** /**
* 将地图移动到定位中心 * 将地图移动到定位中心
* *
@ -663,6 +754,12 @@ public class SocialOrgEditActivity extends BaseActivity {
.animateType(MarkerOptions.MarkerAnimateType.none); .animateType(MarkerOptions.MarkerAnimateType.none);
mBaiduMap.addOverlay(markerOptions); mBaiduMap.addOverlay(markerOptions);
} }
} else if (resultCode == 222) {
if (requestCode == 15) {
//网格选择
mSelGrid = (AreaGridListBean.RowsBean) data.getSerializableExtra("bean");
mTvGrid.setText(mSelGrid.getGridName());
}
} }
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
} }
@ -709,53 +806,48 @@ public class SocialOrgEditActivity extends BaseActivity {
.error(R.drawable.ic_img_load_err) .error(R.drawable.ic_img_load_err)
.placeholder(R.drawable.ic_img_loading); .placeholder(R.drawable.ic_img_loading);
switch (mCurrentPhotoType) { switch (mCurrentPhotoType) {
// case 1://营业执照 case 1://营业执照
// Glide.with(mActivity) Glide.with(mActivity)
// .load(picPath) .load(picPath)
// .apply(options) .apply(options)
// .into(mIvIdenPZ); .into(mIvLicensePhoto);
// mLicensePhotoId = baseUserBean.getData(); mLicensePhotoId = baseUserBean.getData();
// break; mIvDelLicensePhoto.setVisibility(View.VISIBLE);
// case 2://门面照片 break;
// mCurrentBean.setId(baseUserBean.getData()); case 2://门面照片
// mCurrentBean.setPath(picPath); mCurrentBean.setId(baseUserBean.getData());
// mFaceAdapter.notifyDataSetChanged(); mCurrentBean.setPath(picPath);
// mCurrentBean = null; if (mFacePhotos.size() < 9) {
// break; mFacePhotos.add(new AddPhotoBean());
// case 3://3 企业法人身份证正面 mFaceAdapter.notifyDataSetChanged();
// Glide.with(mActivity) }
// .load(picPath) mCurrentBean = null;
// .apply(options) break;
// .into(mIvIdenPZ); case 5://5 企业负责人身份证正面
// mLegalZPhotoId = baseUserBean.getData(); Glide.with(mActivity)
// break; .load(picPath)
// case 4:// 4 企业法人身份证反面 .apply(options)
// Glide.with(mActivity) .into(mIvMasterPZ);
// .load(picPath) mMasterZPhotoId = baseUserBean.getData();
// .apply(options) mIvDelMasterPZ.setVisibility(View.VISIBLE);
// .into(mIvIdenPF); break;
// mLegalFPhotoId = baseUserBean.getData(); case 6://6 负责人身份证反面
// break; Glide.with(mActivity)
// case 5://5 企业负责人身份证正面 .load(picPath)
// Glide.with(mActivity) .apply(options)
// .load(picPath) .into(mIvMasterPF);
// .apply(options) mMasterFPhotoId = baseUserBean.getData();
// .into(mIvMasterPZ); mIvDelMasterPF.setVisibility(View.VISIBLE);
// mMasterZPhotoId = baseUserBean.getData(); break;
// break; case 7://工作场所
// case 6://6 负责人身份证反面 mCurrentBean.setId(baseUserBean.getData());
// Glide.with(mActivity) mCurrentBean.setPath(picPath);
// .load(picPath) if (mWorkPhotos.size() < 9) {
// .apply(options) mWorkPhotos.add(new AddPhotoBean());
// .into(mIvMasterPF); mWorkAdapter.notifyDataSetChanged();
// mMasterFPhotoId = baseUserBean.getData(); }
// break; mCurrentBean = null;
// case 7://工作场所 break;
// mCurrentBean.setId(baseUserBean.getData());
// mCurrentBean.setPath(picPath);
// mWorkAdapter.notifyDataSetChanged();
// mCurrentBean = null;
// break;
} }
} }
@ -902,6 +994,10 @@ public class SocialOrgEditActivity extends BaseActivity {
mCardTypeList = beans; mCardTypeList = beans;
onShowCardType(); onShowCardType();
break; break;
case 5:
mEnterpriseTypeList = beans;
onShowCompanyType();
break;
} }
} else { } else {
ToastUtils.show("暂无数据"); ToastUtils.show("暂无数据");
@ -948,8 +1044,8 @@ public class SocialOrgEditActivity extends BaseActivity {
bean.setAreaName(mSelAreaName); bean.setAreaName(mSelAreaName);
} }
//网格 //网格
if (!TextUtils.isEmpty(mSelGridId)) { if (mSelGrid != null) {
bean.setGridCode(mSelGridId); bean.setGridCode(mSelGrid.getGridCode());
bean.setGridName(mTvGrid.getText().toString().trim()); bean.setGridName(mTvGrid.getText().toString().trim());
} }
//营业执照 //营业执照
@ -968,8 +1064,9 @@ public class SocialOrgEditActivity extends BaseActivity {
if (!TextUtils.isEmpty(endDate)) { if (!TextUtils.isEmpty(endDate)) {
bean.setBusinessLicenseEndDate(endDate); bean.setBusinessLicenseEndDate(endDate);
} }
if (mSelAuthor != null) { String authourCode = mEtAuthorCode.getText().toString().trim();
bean.setRegistrationAuthorityNo(mSelAuthor.getDataId()); if (!TextUtils.isEmpty(authourCode)) {
bean.setRegistrationAuthorityNo(authourCode);
} }
String authorNumber = mEtAuthorNumber.getText().toString().trim(); String authorNumber = mEtAuthorNumber.getText().toString().trim();
if (!TextUtils.isEmpty(authorNumber)) { if (!TextUtils.isEmpty(authorNumber)) {
@ -1013,19 +1110,18 @@ public class SocialOrgEditActivity extends BaseActivity {
bean.setOrganizationTypeId(mSelEnterpriseType.getDataId()); bean.setOrganizationTypeId(mSelEnterpriseType.getDataId());
bean.setOrganizationTypeName(mSelEnterpriseType.getDataName()); bean.setOrganizationTypeName(mSelEnterpriseType.getDataName());
} }
//TODO 组织状态 bean.setOrganizationStatus(mOrgStatus);
if (mSelCompanyStatus != null) {
// bean.setOrganizationStatus(mSelCompanyStatus.getDataId());
}
String summary = mEtCompanySummary.getText().toString().trim(); String summary = mEtCompanySummary.getText().toString().trim();
if (!TextUtils.isEmpty(summary)) { if (!TextUtils.isEmpty(summary)) {
bean.setOrganizationSummary(summary); bean.setOrganizationSummary(summary);
} }
if (mFacePhotos.size() > 2) { if (mFacePhotos.size() >= 2) {
String ids = ""; String ids = "";
for (int i = 0; i < mFacePhotos.size(); i++) { for (int i = 0; i < mFacePhotos.size(); i++) {
ids += mFacePhotos.get(i).getId() + ","; if (!TextUtils.isEmpty(mFacePhotos.get(i).getId())) {
ids += mFacePhotos.get(i).getId() + ",";
}
} }
ids = ids.substring(0, ids.length() - 1); ids = ids.substring(0, ids.length() - 1);
bean.setFacadePhotos(ids); bean.setFacadePhotos(ids);
@ -1039,6 +1135,7 @@ public class SocialOrgEditActivity extends BaseActivity {
} }
if (mSelCardType != null) { if (mSelCardType != null) {
bean.setMasterIdCardCode(mSelCardType.getDataId()); bean.setMasterIdCardCode(mSelCardType.getDataId());
bean.setMasterIdCardCodeName(mSelCardType.getDataName());
} }
String legalName = mEtLegalName.getText().toString().trim(); String legalName = mEtLegalName.getText().toString().trim();
if (!TextUtils.isEmpty(legalName)) { if (!TextUtils.isEmpty(legalName)) {
@ -1072,19 +1169,20 @@ public class SocialOrgEditActivity extends BaseActivity {
if (!TextUtils.isEmpty(securityPhone)) { if (!TextUtils.isEmpty(securityPhone)) {
bean.setSecurityPersonPhone(securityPhone); bean.setSecurityPersonPhone(securityPhone);
} }
String sourceFound = mEtSourceFunds.getText().toString().trim();
if (mSelSource != null) { if (!TextUtils.isEmpty(sourceFound)) {
bean.setSourceOfFunds(mSelSource.getDataId()); bean.setSourceOfFunds(sourceFound);
} }
String womanCount = mEtCompanyWomanCount.getText().toString().trim(); String womanCount = mEtCompanyWomanCount.getText().toString().trim();
if (!TextUtils.isEmpty(womanCount)) { if (!TextUtils.isEmpty(womanCount)) {
bean.setWomenTotalPerson(Integer.parseInt(womanCount)); bean.setWomenTotalPerson(Integer.parseInt(womanCount));
} }
if (mWorkPhotos.size() > 2) { if (mWorkPhotos.size() >= 2) {
String ids = ""; String ids = "";
for (int i = 0; i < mWorkPhotos.size(); i++) { for (int i = 0; i < mWorkPhotos.size(); i++) {
ids += mWorkPhotos.get(i).getId() + ","; if (!TextUtils.isEmpty(mWorkPhotos.get(i).getId())) {
ids += mWorkPhotos.get(i).getId() + ",";
}
} }
ids = ids.substring(0, ids.length() - 1); ids = ids.substring(0, ids.length() - 1);
bean.setWorkplacePhotos(ids); bean.setWorkplacePhotos(ids);
@ -1103,7 +1201,41 @@ public class SocialOrgEditActivity extends BaseActivity {
* 保存数据 * 保存数据
*/ */
private void doSaveCompany() { private void doSaveCompany() {
if (checkParams()) {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
dialog.show();
RequestBody body = buildParams();
RetrofitManager.getInstance()
.create(GridApis.class)
.doEditSocialOrg(mId, body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull SuccessBean successBean) {
dialog.dismiss();
ToastUtils.show("修改成功");
setResult(13);
finish();
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
} }
@Override @Override

View File

@ -90,8 +90,8 @@ public class SocialOrgListActivity extends BaseActivity {
getSocialOrgList(mCurrentPage); getSocialOrgList(mCurrentPage);
mAdapter.addOnItemClickListener(v -> ARouter.getInstance() mAdapter.addOnItemClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SOCIAL_ORG_DETAIL) .build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SOCIAL_ORG_DETAIL)
.withString("id", "") .withString("id", v.getOrganizationId())
.navigation()); .navigation(mActivity, 12));
} }
@Override @Override

View File

@ -33,6 +33,97 @@
android:text="基本信息" android:text="基本信息"
android:textStyle="bold" /> android:textStyle="bold" />
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织名称" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_company_name"
style="@style/item_content"
android:hint="请输入组织名称" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织状态" />
<View style="@style/vertical_line" />
<RadioGroup
android:id="@+id/rg_company_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:button="@drawable/sel_check_item_cir"
android:checked="true"
android:text="正常" />
<RadioButton
android:id="@+id/rb_unnormal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/sel_check_item_cir"
android:text="不正常" />
</RadioGroup>
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织类型" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_type"
style="@style/sel_text_arrow"
android:hint="请选择组织类型" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="组织简介" />
<EditText
android:id="@+id/et_company_summary"
style="@style/item_content_edit"
android:hint="请输入组织简介"
android:minLines="3" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
<ImageView <ImageView
@ -123,6 +214,7 @@
<EditText <EditText
android:id="@+id/et_license_number" android:id="@+id/et_license_number"
style="@style/item_content" style="@style/item_content"
android:digits="@string/limit_id_card"
android:hint="请输入统一社会信用代码" /> android:hint="请输入统一社会信用代码" />
</LinearLayout> </LinearLayout>
@ -423,24 +515,6 @@
android:inputType="text" /> android:inputType="text" />
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="住所" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_residence"
style="@style/item_content"
android:hint="请输入住所" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -469,89 +543,6 @@
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="2dp" /> android:layout_marginBottom="2dp" />
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织名称" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_company_name"
style="@style/item_content"
android:hint="请输入组织名称" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织状态" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_status"
style="@style/sel_text_arrow"
android:hint="请选择组织状态" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织类型" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_type"
style="@style/sel_text_arrow"
android:hint="请选择组织类型" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="组织简介" />
<EditText
android:id="@+id/et_company_summary"
style="@style/item_content_edit"
android:hint="请输入组织简介"
android:minLines="3" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="门面照片" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_face_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout <LinearLayout
style="@style/item_gray" style="@style/item_gray"
@ -710,6 +701,25 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="住所" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_residence"
style="@style/item_content"
android:hint="请输入住所" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -914,6 +924,7 @@
<EditText <EditText
android:id="@+id/et_security_phone" android:id="@+id/et_security_phone"
style="@style/item_content" style="@style/item_content"
android:digits="@string/limit_phone"
android:hint="请输入组织治保负责人联系电话" /> android:hint="请输入组织治保负责人联系电话" />
</LinearLayout> </LinearLayout>
@ -957,6 +968,18 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="门面照片" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_face_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical"> <LinearLayout style="@style/item_gray_vertical">
<TextView <TextView

View File

@ -25,13 +25,128 @@
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <RelativeLayout
android:id="@+id/tv_issue_base_info" android:layout_width="match_parent"
style="@style/issue_report_title" android:layout_height="wrap_content"
android:drawablePadding="10dp" android:layout_marginTop="5dp"
android:padding="8dp" android:orientation="horizontal"
android:text="基本信息" android:paddingLeft="8dp"
android:textStyle="bold" /> android:paddingRight="8dp">
<TextView
android:id="@+id/tv_issue_base_info"
style="@style/issue_report_title"
android:drawablePadding="10dp"
android:padding="8dp"
android:text="基本信息"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:orientation="horizontal">
<Button
android:id="@+id/btn_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="@drawable/sel_btn_blue_gray_re_5"
android:minWidth="0dp"
android:minHeight="0dp"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text="编辑"
android:textColor="@color/white" />
<Button
android:id="@+id/btn_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sel_btn_red_gray_re_5"
android:minWidth="0dp"
android:minHeight="0dp"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text="删除"
android:textColor="@color/white" />
</LinearLayout>
</RelativeLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织名称" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_name"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织状态" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_status"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织类型" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_type"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="组织简介" />
<TextView
android:id="@+id/tv_company_summary"
style="@style/item_content_ver"
android:minLines="3" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -78,6 +193,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
@ -307,7 +423,6 @@
<TextView <TextView
style="@style/item_title" style="@style/item_title"
android:layout_weight="0.5"
android:text="是否有共青团" /> android:text="是否有共青团" />
<View style="@style/vertical_line" /> <View style="@style/vertical_line" />
@ -345,7 +460,6 @@
<TextView <TextView
style="@style/item_title" style="@style/item_title"
android:layout_weight="0.5"
android:text="共青团团员数量" /> android:text="共青团团员数量" />
<View style="@style/vertical_line" /> <View style="@style/vertical_line" />
@ -391,24 +505,6 @@
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical" />
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:layout_weight=".5"
android:text="住所" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_residence"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -436,85 +532,6 @@
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="2dp" /> android:layout_marginBottom="2dp" />
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织名称" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_name"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织状态" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_status"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织类型" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_type"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="组织简介" />
<TextView
android:id="@+id/tv_company_summary"
style="@style/item_content_ver"
android:minLines="3" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="门面照片" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_face_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout <LinearLayout
style="@style/item_gray" style="@style/item_gray"
@ -670,6 +687,23 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="住所" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_residence"
style="@style/item_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -876,6 +910,18 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="门面照片" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_face_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical"> <LinearLayout style="@style/item_gray_vertical">
<TextView <TextView

View File

@ -33,6 +33,97 @@
android:text="基本信息" android:text="基本信息"
android:textStyle="bold" /> android:textStyle="bold" />
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织名称" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_company_name"
style="@style/item_content"
android:hint="请输入组织名称" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织状态" />
<View style="@style/vertical_line" />
<RadioGroup
android:id="@+id/rg_company_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:button="@drawable/sel_check_item_cir"
android:checked="true"
android:text="正常" />
<RadioButton
android:id="@+id/rb_unnormal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/sel_check_item_cir"
android:text="不正常" />
</RadioGroup>
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织类型" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_type"
style="@style/sel_text_arrow"
android:hint="请选择组织类型" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="组织简介" />
<EditText
android:id="@+id/et_company_summary"
style="@style/item_content_edit"
android:hint="请输入组织简介"
android:minLines="3" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
<ImageView <ImageView
@ -76,18 +167,35 @@
style="@style/item_title_vertical" style="@style/item_title_vertical"
android:text="营业执照照片" /> android:text="营业执照照片" />
<LinearLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="210dp"
android:layout_height="wrap_content" android:layout_height="130dp"
android:layout_marginTop="5dp" android:layout_gravity="center_horizontal"
android:orientation="horizontal"> android:layout_marginTop="5dp">
<ImageView <RelativeLayout
android:id="@+id/iv_license_photo" android:layout_width="match_parent"
android:layout_width="200dp" android:layout_height="match_parent"
android:layout_height="100dp" android:layout_gravity="center_horizontal"
android:src="@drawable/ic_add_photo" /> android:orientation="horizontal">
</LinearLayout>
<ImageView
android:id="@+id/iv_license_photo"
android:layout_width="200dp"
android:layout_height="120dp"
android:layout_centerInParent="true"
android:src="@drawable/ic_add_photo" />
<ImageView
android:id="@+id/iv_del_license_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="@drawable/ic_delete"
android:visibility="gone"
tools:visibility="visible" />
</RelativeLayout>
</FrameLayout>
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -106,6 +214,7 @@
<EditText <EditText
android:id="@+id/et_license_number" android:id="@+id/et_license_number"
style="@style/item_content" style="@style/item_content"
android:digits="@string/limit_id_card"
android:hint="请输入统一社会信用代码" /> android:hint="请输入统一社会信用代码" />
</LinearLayout> </LinearLayout>
@ -123,10 +232,11 @@
<View style="@style/vertical_line" /> <View style="@style/vertical_line" />
<TextView <EditText
android:id="@+id/tv_author" android:id="@+id/et_author_code"
style="@style/sel_text_arrow" style="@style/item_content"
android:hint="请选择登记机关" /> android:digits="@string/limit_id_card"
android:hint="请输入登记管理机关代码" />
</LinearLayout> </LinearLayout>
@ -318,7 +428,6 @@
<TextView <TextView
style="@style/item_title" style="@style/item_title"
android:layout_weight="0.5"
android:text="是否有共青团" /> android:text="是否有共青团" />
<View style="@style/vertical_line" /> <View style="@style/vertical_line" />
@ -356,7 +465,6 @@
<TextView <TextView
style="@style/item_title" style="@style/item_title"
android:layout_weight="0.5"
android:text="共青团团员数量" /> android:text="共青团团员数量" />
<View style="@style/vertical_line" /> <View style="@style/vertical_line" />
@ -407,25 +515,6 @@
android:inputType="text" /> android:inputType="text" />
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:layout_weight=".5"
android:text="住所" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_residence"
style="@style/item_content"
android:hint="请输入住所" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -454,89 +543,6 @@
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="2dp" /> android:layout_marginBottom="2dp" />
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织名称" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_company_name"
style="@style/item_content"
android:hint="请输入组织名称" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织状态" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_status"
style="@style/sel_text_arrow"
android:hint="请选择组织状态" />
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="组织类型" />
<View style="@style/vertical_line" />
<TextView
android:id="@+id/tv_company_type"
style="@style/sel_text_arrow"
android:hint="请选择组织类型" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="组织简介" />
<EditText
android:id="@+id/et_company_summary"
style="@style/item_content_vertical"
android:hint="请输入组织简介"
android:minLines="3" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="门面照片" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_face_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout <LinearLayout
style="@style/item_gray" style="@style/item_gray"
@ -656,8 +662,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
<ImageView <ImageView
@ -697,6 +701,25 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
style="@style/style_hint_star"
android:visibility="gone" />
<TextView
style="@style/item_title"
android:text="住所" />
<View style="@style/vertical_line" />
<EditText
android:id="@+id/et_residence"
style="@style/item_content"
android:hint="请输入住所" />
</LinearLayout>
<LinearLayout style="@style/item_gray"> <LinearLayout style="@style/item_gray">
@ -795,12 +818,27 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<ImageView
android:id="@+id/iv_master_p_z" <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="wrap_content">
android:scaleType="fitXY"
android:src="@drawable/ic_add_photo" /> <ImageView
android:id="@+id/iv_master_p_z"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_add_photo" />
<ImageView
android:id="@+id/iv_del_master_p_z"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="@drawable/ic_delete"
android:visibility="gone" />
</RelativeLayout>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -819,12 +857,27 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<ImageView
android:id="@+id/iv_master_p_f" <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="wrap_content">
android:scaleType="fitXY"
android:src="@drawable/ic_add_photo" /> <ImageView
android:id="@+id/iv_master_p_f"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_add_photo" />
<ImageView
android:id="@+id/iv_del_master_p_f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:src="@drawable/ic_delete"
android:visibility="gone" />
</RelativeLayout>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -871,6 +924,7 @@
<EditText <EditText
android:id="@+id/et_security_phone" android:id="@+id/et_security_phone"
style="@style/item_content" style="@style/item_content"
android:digits="@string/limit_phone"
android:hint="请输入组织治保负责人联系电话" /> android:hint="请输入组织治保负责人联系电话" />
</LinearLayout> </LinearLayout>
@ -887,10 +941,10 @@
<View style="@style/vertical_line" /> <View style="@style/vertical_line" />
<TextView <EditText
android:id="@+id/tv_source_funds" android:id="@+id/et_source_funds"
style="@style/sel_text_arrow" style="@style/item_content"
android:hint="请选择资金来源" /> android:hint="请输入资金来源" />
</LinearLayout> </LinearLayout>
@ -914,6 +968,18 @@
</LinearLayout> </LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
<TextView
style="@style/item_title_vertical"
android:text="门面照片" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_face_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical"> <LinearLayout style="@style/item_gray_vertical">
<TextView <TextView