Commit 4f441036 authored by 杨秀秀's avatar 杨秀秀

基础搭建

1:XxBar 添加右面按钮功能
功能开发
1:完善商户审批流程
parent f0221581
......@@ -173,6 +173,20 @@ interface ApiService {
@POST("app/merchant/online")
fun postMerchantMsg(@Body requestBody: RequestBody): Observable<BaseResponse<Boolean>>
/**
* 商户线上重新申请开店
*/
@Headers("Content-type:application/json")
@POST("app/merchant/online/re")
fun postReMerchantMsg(@Body requestBody: RequestBody): Observable<BaseResponse<Boolean>>
/**
* 修改商户开店信息
*/
@Headers("Content-type:application/json")
@POST("app/merchant/edit-info")
fun postChangeMerchantMsg(@Body requestBody: RequestBody): Observable<BaseResponse<Boolean>>
/**
* 提交新建店员
*/
......
......@@ -11,13 +11,13 @@ import me.goldze.mvvmhabit.http.ApiParams
import me.goldze.mvvmhabit.http.BaseResponse
class AddProductRequest : BaseRespons() {
var merchantBean:MerchantBean= LocalData.getMerchant()
var merchantBean:MerchantBean?= LocalData.getMerchant()
/**
* 获取用户分类
*/
fun getCategory(): Observable<BaseResponse<List<CategoryBean>>> {
return apiService.postCategory(ApiParams<AffiliatedCompanyBody>().setParams(AffiliatedCompanyBody(merchantBean.booth?.affiliatedCompany!!)))
return apiService.postCategory(ApiParams<AffiliatedCompanyBody>().setParams(AffiliatedCompanyBody(merchantBean?.booth?.affiliatedCompany!!)))
}
......
......@@ -9,7 +9,7 @@ import me.goldze.mvvmhabit.http.ApiParams
import me.goldze.mvvmhabit.http.BasePageResponse
class AppealListRequest:BaseRespons() {
var merchantInfo:MerchantBean=LocalData.getMerchant()
var merchantInfo:MerchantBean?=LocalData.getMerchant()
/**
......@@ -17,7 +17,7 @@ class AppealListRequest:BaseRespons() {
*/
fun getAppealList(appealStatus:Array<String>,page:Int): Observable<BasePageResponse<AppealListBean>>
{
return apiService.postAppealList(ApiParams<AppealListBody>().setParams(AppealListBody(appealStatus,merchantInfo.businessId!!)),10,page)
return apiService.postAppealList(ApiParams<AppealListBody>().setParams(AppealListBody(appealStatus,merchantInfo?.businessId!!)),10,page)
}
......
......@@ -26,7 +26,7 @@ class AppealRequest : BaseRespons() {
uploadImgs: List<String>
): Observable<BaseResponse<Boolean>> {
val body: AppealBody = AppealBody(dictSort,LocalData.getMerchant().businessId,appealPerson,appealPhone, appealDescribe,uploadImgs,"1")
val body: AppealBody = AppealBody(dictSort,LocalData.getMerchant()!!.businessId,appealPerson,appealPhone, appealDescribe,uploadImgs,"1")
return apiService.postAddAppeal(ApiParams<AppealBody>().setParams(body))
}
/*修改诉求*/
......
......@@ -70,13 +70,30 @@ class MerchantEnterRequst: BaseRespons() {
}
/**
* 重新商户开店信息
*/
fun postREMerchantMsg(merchantMsgbody: MerchantMsgbody): Observable<BaseResponse<Boolean>>
{
return apiService.postReMerchantMsg(ApiParams<MerchantMsgbody>().setParams(merchantMsgbody))
}
/**
* 修改商户开店信息
*/
fun postChangeMerchantMsg(merchantMsgbody: MerchantMsgbody): Observable<BaseResponse<Boolean>>
{
return apiService.postChangeMerchantMsg(ApiParams<MerchantMsgbody>().setParams(merchantMsgbody))
}
/**
* 获取商户信息
*/
fun getMerchantInfoById(): Observable<BaseResponse<MerchantBean>>
{
return apiService.getMerchantById(LocalData.getMerchant().businessId);
return apiService.getMerchantById(LocalData.getMerchant()!!.businessId);
}
......
package com.xx.merchanthbh.data.local
import android.text.TextUtils
import com.xx.merchanthbh.data.http.respons.MerchantBean
import com.xx.merchanthbh.data.http.respons.UserBean
import com.google.gson.Gson
......@@ -34,8 +35,12 @@ object LocalData {
* 获取商户信息
*/
@JvmStatic
fun getMerchant() :MerchantBean{
fun getMerchant() : MerchantBean? {
var merchantStr= SPUtils.getInstance().getString("MerchantInformation")
if (TextUtils.isEmpty(merchantStr))
{
return null
}
return Gson().fromJson(merchantStr,MerchantBean::class.java)
}
......
......@@ -15,10 +15,12 @@ import com.xx.xxviewlibrary.base.xxBaseRecyclerViewAdapter;
import me.jessyan.autosize.utils.AutoSizeUtils;
public class ActivitiesCenterListAdapter extends xxBaseRecyclerViewAdapter<ItemActivitiesCenterBinding, ActivityCenterBean> {
public class ActivitiesCenterListAdapter extends xxBaseRecyclerViewAdapter<ItemActivitiesCenterBinding, ActivityCenterBean> implements xxBaseRecyclerViewAdapter.OnItemClick<ActivityCenterBean> {
public ActivitiesCenterListAdapter(Context mContext) {
super(mContext);
itemClick=this;
}
@Override
......@@ -35,4 +37,8 @@ public class ActivitiesCenterListAdapter extends xxBaseRecyclerViewAdapter<ItemA
}
@Override
public void itemClickCalBack(int position, ActivityCenterBean data) {
}
}
......@@ -2,6 +2,7 @@ package com.xx.merchanthbh.ui.assistant;
import android.app.Application;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;
......@@ -42,13 +43,14 @@ public class AssistantManagementViewModel extends BaseViewModel<AssistantManagem
}
//跳转新建店员
public BindingCommand goAssistantAdd = new BindingCommand(new BindingAction() {
public View.OnClickListener goAssistantAdd = new View.OnClickListener() {
@Override
public void call() {
public void onClick(View view) {
startActivity(AssistantAddActivity.class);
}
};
});
//搜索店员列表
public BindingCommand goAssistantMsg = new BindingCommand(new BindingAction() {
@Override
......
......@@ -37,4 +37,6 @@ class MerchantEnterActivity :
}
}
\ No newline at end of file
......@@ -25,6 +25,8 @@ import com.xx.merchanthbh.data.local.LocalData;
import com.xx.merchanthbh.dialog.BoothListDialog;
import com.xx.merchanthbh.ui.addproduct.data.TextListProvider;
import com.xx.xxviewlibrary.base.xxBaseDialog;
import com.xx.xxviewlibrary.comm.CommTextDialog;
import com.xx.xxviewlibrary.comm.RefuseDialogBean;
import com.xx.xxviewlibrary.witget.model.FileBean;
import com.huantansheng.easyphotos.callback.SelectCallback;
import com.huantansheng.easyphotos.models.album.entity.Photo;
......@@ -33,12 +35,14 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.functions.Consumer;
import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;
import me.goldze.mvvmhabit.http.ApiDisposableObserver;
import me.goldze.mvvmhabit.http.BaseResponse;
import me.goldze.mvvmhabit.utils.RxUtils;
import me.goldze.mvvmhabit.utils.ToastUtils;
......@@ -51,6 +55,8 @@ public class MerchantEnterViewModel extends BaseViewModel<MerchantEnterRequst> {
public List<BoothBean> boothBeanList=new ArrayList<>();
public String userStatic=null;
/**
* 通知添加品牌
*/
......@@ -376,7 +382,18 @@ public class MerchantEnterViewModel extends BaseViewModel<MerchantEnterRequst> {
*/
public void submitMerchantMsg(View view)
{
model.postMerchantMsg(new MerchantMsgbody(merchantInfo)).compose(RxUtils.schedulersTransformer()) //线程调度
Observable<BaseResponse<Boolean>> observable;
if (
TextUtils.isEmpty(userStatic)
)
{
observable= model.postMerchantMsg(new MerchantMsgbody(merchantInfo));
}else {
MerchantMsgbody mb= new MerchantMsgbody(merchantInfo);
mb.setBusinessId(userStatic);
observable=model.postREMerchantMsg(mb);
}
observable.compose(RxUtils.schedulersTransformer()) //线程调度
.doOnSubscribe(MerchantEnterViewModel.this)
.doOnSubscribe (new Consumer<Disposable>() {
@Override
......@@ -398,5 +415,25 @@ public class MerchantEnterViewModel extends BaseViewModel<MerchantEnterRequst> {
});
}
/**
* 展示驳回原因
* @param view
*/
public void showReason(View view)
{
showCommTextDialog(new RefuseDialogBean(LocalData.getMerchant().getRemark(),"确认",null,"审核意见"), new CommTextDialog.onAcceptCallBack() {
@Override
public void acceptBack() {
}
@Override
public void refuseBack() {
}
});
}
}
......@@ -7,6 +7,8 @@ import androidx.lifecycle.Observer
import com.xx.merchanthbh.BR
import com.xx.merchanthbh.R
import com.xx.merchanthbh.data.http.requst.body.Brankbody
import com.xx.merchanthbh.data.http.respons.MerchantBean
import com.xx.merchanthbh.data.local.LocalData
import com.xx.merchanthbh.databinding.FragmentRegisterMaterialBinding
import me.goldze.mvvmhabit.base.BaseFragment
......@@ -47,6 +49,12 @@ class RegisterMaterialFragment : BaseFragment<FragmentRegisterMaterialBinding, M
})
var merchantBean :MerchantBean?=LocalData.getMerchant();
if (merchantBean!=null)
{
viewModel.userStatic=merchantBean.businessId;
viewModel.merchantInfo.setMerchantInfo(merchantBean)
}
}
......
......@@ -187,7 +187,7 @@ public class MerchantInfoViewModel extends BaseViewModel<MerchantEnterRequst> {
*/
public void submitMerchantMsg(View view)
{
model.postMerchantMsg(new MerchantMsgbody(merchantInfo)).compose(RxUtils.schedulersTransformer()) //线程调度
model.postChangeMerchantMsg(new MerchantMsgbody(merchantInfo)).compose(RxUtils.schedulersTransformer()) //线程调度
.doOnSubscribe(MerchantInfoViewModel.this)
.doOnSubscribe (new Consumer<Disposable>() {
@Override
......@@ -198,8 +198,7 @@ public class MerchantInfoViewModel extends BaseViewModel<MerchantEnterRequst> {
@Override
public void onSuccess(Boolean resultBean) {
dismissDialog();
NavController navController= Navigation.findNavController(view);
navController.navigate(R.id.action_registerMaterialFragment_to_merchantWaitFragment);
}
@Override
......
......@@ -24,6 +24,7 @@
android:layout_width="match_parent"
android:layout_height="55dp"
on_click="@{viewModel.clickFinish}"
app:right_src='@{@drawable/dianyuanguanli_icon_xinzeng}'
app:bar_title='@{@string/appeal_manager}' />
<com.google.android.material.tabs.TabLayout
......
......@@ -26,6 +26,8 @@
android:id="@+id/bar"
android:layout_width="match_parent"
android:layout_height="55dp"
app:right_click="@{assistantManagementViewModel.goAssistantAdd}"
app:right_src='@{@drawable/dianyuanguanli_icon_xinzeng}'
on_click="@{assistantManagementViewModel.clickFinish}"
app:layout_constraintTop_toTopOf="parent"
app:bar_title='@{@string/assistant_management}'/>
......@@ -95,23 +97,7 @@
</androidx.core.widget.NestedScrollView>
<!--提交底部按钮-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="74dp"
android:layout_marginTop="55dp"
android:layout_alignParentBottom="true"
android:gravity="center">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_bottom_24"
android:text="@string/assistant_add"
android:textColor="@color/white"
binding:onClickCommand="@{assistantManagementViewModel.goAssistantAdd}"
/>
</LinearLayout>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:binding="http://schemas.android.com/apk/res-auto">
<data>
<variable
......@@ -32,9 +33,44 @@
app:step="1"
android:id="@+id/rsl_frm"
/>
<androidx.core.widget.NestedScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintTop_toBottomOf="@+id/rsl_frm"
android:id="@+id/ll_shop_audit_msg"
android:gravity="center_vertical"
android:layout_marginLeft="17dp"
android:layout_marginRight="17dp"
android:layout_marginTop="13dp"
android:background="@drawable/bg_white_radius_12"
android:padding="13dp"
android:orientation="horizontal">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@mipmap/shangjia_icon_tishi"/>
<TextView
style="@style/xxTextTitle"
android:layout_width="match_parent"
android:layout_weight="1"
android:text="商户信息被驳回,点击查看原因"
android:layout_marginLeft="7dp"/>
<Button
android:layout_width="59dp"
android:layout_height="28dp"
android:text="查看"
android:textColor="@color/foreground"
android:onClick="@{viewModel.showReason}"
android:background="@drawable/bg_side_blue_1_radius_20"/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
app:layout_constraintTop_toBottomOf="@+id/ll_shop_audit_msg"
app:layout_constraintBottom_toTopOf="@+id/ll_ame_bottom"
android:layout_height="0dp">
......
......@@ -19,11 +19,13 @@ class MerchantAuditListRequst: BaseRespons() {
var mb:MerchantBody
if (StaticData.sUserRole==0)
if (StaticData.sUserRole==0 )
{
mb = MerchantBody(static, listOf(user.userId.toString()),null)
}else{
}else if(StaticData.sUserRole==1 ){
mb = MerchantBody(static,null,listOf(user.userId.toString()))
}else {
mb = MerchantBody(static, listOf(user.userId.toString()),listOf(user.userId.toString()))
}
return apiService.getMerchantList(
ApiParams<MerchantBody>().setParams(mb
......
package com.xx.hbhbcompany.ui.appeallist;
import android.app.Application;
import android.view.View;
import androidx.annotation.NonNull;
......@@ -8,6 +9,7 @@ import com.xx.hbhbcompany.app.ListBaseViewModel;
import com.xx.hbhbcompany.data.http.requst.AppealListRequest;
import com.xx.hbhbcompany.data.http.respons.AppealListBean;
import com.xx.hbhbcompany.data.staticdata.StaticData;
import com.xx.hbhbcompany.generated.callback.OnClickListener;
import com.xx.hbhbcompany.ui.appeallist.AppealListAdapter;
import java.util.List;
......@@ -157,6 +159,16 @@ public class AppealListViewModel extends ListBaseViewModel<AppealListRequest> {
}
/**
* 跳转新建诉求
*/
public View.OnClickListener addAppeal=new View.OnClickListener() {
@Override
public void onClick(View view) {
//todo 跳转新建诉求
}
};
}
......@@ -2,8 +2,11 @@ package com.xx.hbhbcompany.ui.merchantaudit
import android.os.Bundle
import android.view.View
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener
import com.google.android.material.tabs.TabLayout
import com.google.android.material.tabs.TabLayout.OnTabSelectedListener
import com.scwang.smart.refresh.layout.api.RefreshLayout
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener
import com.xx.hbhbcompany.BR
import com.xx.hbhbcompany.R
import com.xx.hbhbcompany.data.http.requst.MerchantAuditListRequst
......@@ -12,7 +15,7 @@ import com.xx.hbhbcompany.databinding.ActivityAuditListBinding
import me.goldze.mvvmhabit.base.BaseActivity
class MerchantAuditListActivity:
BaseActivity<ActivityAuditListBinding, MerchantAuditListViewModel>() {
BaseActivity<ActivityAuditListBinding, MerchantAuditListViewModel>(),OnRefreshListener,OnLoadMoreListener {
......@@ -32,24 +35,23 @@ class MerchantAuditListActivity:
binding.rvMerchantList.adapter=merchantAdapter
viewModel.mAuditList.observe(this
) {
if(merchantAdapter.mList==null)
{
merchantAdapter.mList=it
}else{
if (viewModel.page == 1) {
merchantAdapter.mList = it
} else {
merchantAdapter.mList.addAll(it);
}
merchantAdapter.notifyDataSetChanged()
}
if (StaticData.sUserRole==0)
if (StaticData.sUserRole==0 || StaticData.sUserRole==3)
{
//督导的页面初始
viewModel.getMerchantAuditList()
binding.tabs.addOnTabSelectedListener(object:OnTabSelectedListener
{
override fun onTabSelected(tab: TabLayout.Tab?) {
viewModel.pageNum=1
viewModel.page=1
merchantAdapter.mList.clear()
when(tab?.position)
{
......@@ -87,15 +89,44 @@ class MerchantAuditListActivity:
binding.tabs.visibility= View.GONE
merchantAdapter.type=4
viewModel. merchantStatus="2"
viewModel.getMerchantAuditList()
}
viewModel.loadMoreStatic.observe(
this
) {
if (it == 1) {
binding.refresh.finishLoadMore();
} else if (it == 2) {
binding.refresh.finishLoadMore();
binding.refresh.setEnableLoadMore(false);
}
binding.refresh.finishRefresh()
}
}
override fun onPostResume() {
super.onPostResume()
viewModel.getMerchantAuditList()
}
override fun initViewModel(): MerchantAuditListViewModel {
val lm: MerchantAuditListRequst = MerchantAuditListRequst()
return MerchantAuditListViewModel(application,lm)
}
override fun onLoadMore(refreshLayout: RefreshLayout) {
viewModel.page++;
viewModel.getMerchantAuditList();
}
override fun onRefresh() {
viewModel.page = 1;
viewModel.getMerchantAuditList();
binding.refresh.setEnableLoadMore(true)
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.MutableLiveData;
import com.xx.hbhbcompany.app.ListBaseViewModel;
import com.xx.hbhbcompany.data.http.BaseRespons;
import com.xx.hbhbcompany.data.http.requst.MerchantAuditListRequst;
import com.xx.hbhbcompany.data.http.respons.MerchantBean;
......@@ -19,7 +20,7 @@ import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.http.ApiDisposablePageObserver;
import me.goldze.mvvmhabit.utils.RxUtils;
public class MerchantAuditListViewModel extends BaseViewModel<MerchantAuditListRequst> {
public class MerchantAuditListViewModel extends ListBaseViewModel<MerchantAuditListRequst> {
public MutableLiveData<List<MerchantBean>> mAuditList=new MutableLiveData<>(new ArrayList<>());
......@@ -30,7 +31,6 @@ public class MerchantAuditListViewModel extends BaseViewModel<MerchantAuditListR
super(application, model);
}
public String merchantStatus="0";
public int pageNum=1;
@Override
public void onResume() {
super.onResume();
......@@ -39,7 +39,7 @@ public class MerchantAuditListViewModel extends BaseViewModel<MerchantAuditListR
public void getMerchantAuditList()
{
model.getMerchantAuditList(merchantStatus,pageNum).compose(RxUtils.schedulersTransformer()) //线程调度
model.getMerchantAuditList(merchantStatus,page).compose(RxUtils.schedulersTransformer()) //线程调度
// .compose(RxUtils.exceptionTransformer()) // 网络错误的异常转换, 这里可以换成自己的ExceptionHandle
.doOnSubscribe(MerchantAuditListViewModel.this)
.doOnSubscribe (new Consumer<Disposable>() {
......@@ -49,8 +49,7 @@ public class MerchantAuditListViewModel extends BaseViewModel<MerchantAuditListR
}).subscribe(new ApiDisposablePageObserver<MerchantBean>() {
@Override
public void onSuccess(List<MerchantBean> resultBean) {
/* List<MerchantBean> mList= mAuditList.getValue();
mList.addAll(resultBean);*/
mAuditList.postValue(resultBean);
}
......
......@@ -2,6 +2,7 @@ package com.xx.hbhbcompany.ui.qualityauditinfo
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.xx.hbhbcompany.BR
import com.xx.hbhbcompany.R
......@@ -35,12 +36,20 @@ class QualityAuditFirstFragment:
viewModel.brankList.observe(this)
{ it->
if (it==null || it.size<=0)
{
it->adapter.mList=it;
binding.llFmafBrand.visibility= View.GONE
}else{
binding.llFmafBrand.visibility= View.VISIBLE
adapter.mList=it;
adapter.notifyDataSetChanged()
}
}
}
}
\ No newline at end of file
package com.xx.hbhbcompany.ui.qualityauditinfo;
import android.app.Application;
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
......@@ -15,6 +16,8 @@ import com.xx.hbhbcompany.data.http.respons.BrankBean;
import com.xx.hbhbcompany.data.http.respons.MerchantBean;
import com.xx.hbhbcompany.data.http.respons.UserBean;
import com.xx.hbhbcompany.data.local.LocalData;
import com.xx.xxviewlibrary.comm.CommTextDialog;
import com.xx.xxviewlibrary.comm.RefuseDialogBean;
import com.xx.xxviewlibrary.witget.model.FileBean;
import java.util.Calendar;
......@@ -37,6 +40,9 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst>
public ObservableField<String> qualityPerson=new ObservableField<>(user.getUserName());
//建议显示隐藏
public ObservableField<Integer> ressonVISIBLE=new ObservableField<>(View.GONE);
public MutableLiveData<List<BrankBean>> brankList=new MutableLiveData<>();
......@@ -85,6 +91,7 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst>
boothId=bean.getBoothId();
leaseStartTime.set(bean.getLeaseStartTime());
leaseEndTime.set(bean.getLeaseEndTime());
remark.set(bean.getRemark());
}
public ObservableField<String> boothNum;
......@@ -137,6 +144,12 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst>
}).subscribe(new ApiDisposableObserver<MerchantBean>() {
@Override
public void onSuccess(MerchantBean resultBean) {
if (TextUtils.isEmpty(resultBean.getRemark()))
{
ressonVISIBLE.set(View.GONE);
}else {
ressonVISIBLE.set(View.VISIBLE);
}
merchantInfo.setMerchantInfo(resultBean);
brankList.postValue(resultBean.getBrandAuthorizationList());
}
......@@ -286,4 +299,24 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst>
});
}
/**
* 展示驳回原因
* @param view
*/
public void showReason(View view)
{
showCommTextDialog(new RefuseDialogBean(merchantInfo.remark.get(),"确认",null,"审核意见"), new CommTextDialog.onAcceptCallBack() {
@Override
public void acceptBack() {
}
@Override
public void refuseBack() {
}
});
}
}
......@@ -24,6 +24,8 @@
android:layout_width="match_parent"
android:layout_height="55dp"
on_click="@{viewModel.clickFinish}"
app:right_click="@{viewModel.addAppeal}"
app:right_src='@{@drawable/dianyuanguanli_icon_xinzeng}'
app:bar_title='@{@string/appeal_manager}' />
<com.google.android.material.tabs.TabLayout
......
......@@ -58,13 +58,28 @@
android:text="店总驳回"
android:id="@+id/tab_aal_reject"/>
</com.google.android.material.tabs.TabLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_grey">
<com.scwang.smart.refresh.header.BezierRadarHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_merchant_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
binding:layoutManager="@{LayoutManagers.linear(1,false)}"
android:layout_margin="17dp"/>
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
......
......@@ -41,9 +41,45 @@
android:layout_marginTop="17dp"
android:id="@+id/rsl_frm"
/>
<androidx.core.widget.NestedScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintTop_toBottomOf="@+id/rsl_frm"
android:id="@+id/ll_shop_audit_msg"
android:gravity="center_vertical"
android:layout_marginLeft="17dp"
android:visibility="@{viewModel.ressonVISIBLE}"
android:layout_marginRight="17dp"
android:layout_marginTop="13dp"
android:background="@drawable/bg_white_radius_12"
android:padding="13dp"
android:orientation="horizontal">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@mipmap/shangjia_icon_tishi"/>
<TextView
style="@style/xxTextTitle"
android:layout_width="match_parent"
android:layout_weight="1"
android:text="点击查看督导审核意见"
android:layout_marginLeft="7dp"/>
<Button
android:layout_width="59dp"
android:layout_height="28dp"
android:text="查看"
android:textColor="@color/foreground"
android:onClick="@{viewModel.showReason}"
android:background="@drawable/bg_side_blue_1_radius_20"/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
app:layout_constraintTop_toBottomOf="@+id/ll_shop_audit_msg"
app:layout_constraintBottom_toTopOf="@+id/ll_ame_bottom"
android:layout_height="0dp">
......@@ -67,7 +103,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
ed_title='@{"公司全称"}'
app:content_type="1"
app:content_type="4"
app:necessary="false"
ed_content="@={viewModel.merchantInfo.companyName}"
/>
......
......@@ -57,7 +57,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
ed_title='@{"公司全称"}'
app:content_type="1"
app:content_type="4"
app:necessary="false"
ed_content="@={viewModel.merchantInfo.companyName}"
/>
......@@ -221,6 +221,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:padding="13dp"
android:id="@+id/ll_fmaf_brand"
android:background="@drawable/bg_white_radius_12"
android:orientation="vertical">
......
......@@ -13,6 +13,7 @@
android:layout_width="match_parent"
android:background="@drawable/bg_white_radius_12"
android:padding="13dp"
android:layout_marginBottom="13dp"
android:layout_height="wrap_content">
<TextView
......
......@@ -302,7 +302,7 @@ public abstract class BaseActivity<V extends ViewDataBinding, VM extends BaseVie
try {
SimpleDateFormat df=new SimpleDateFormat("yyyy-m-d");
Date date= df.parse(year + "-" + (month + 1) + "-" + dayOfMonth);
SimpleDateFormat df2=new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat df2=new SimpleDateFormat("yyyy-mm-dd");
onData.reData(df2.format(date) );
} catch (ParseException e) {
onData.reData( "");
......
package com.xx.xxviewlibrary.comm
import android.content.Context
import android.text.TextUtils
import android.view.Gravity
import android.view.View
import android.view.WindowManager
......@@ -20,6 +21,11 @@ class CommTextDialog(context: Context,var bean :RefuseDialogBean,var callback:on
binding.model=bean
binding.dialog=this
if (TextUtils.isEmpty(bean.refuseTxt))
{
binding.btnRefuse.visibility=View.GONE
}
}
fun refuseClick(view : View)
......
......@@ -2,10 +2,12 @@ package com.xx.xxviewlibrary.witget
import android.content.Context
import android.content.res.TypedArray
import android.graphics.drawable.Drawable
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.ImageButton
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.databinding.BindingAdapter
......@@ -23,6 +25,9 @@ class XxBar constructor(activity: Context?, attrs: AttributeSet?) : RelativeLay
//左侧icon
var img_left: ImageButton? = null
//右侧icon
var img_right: ImageView? = null
var attrsArray:TypedArray?= null
......@@ -59,13 +64,7 @@ class XxBar constructor(activity: Context?, attrs: AttributeSet?) : RelativeLay
}
@BindingAdapter("right_src")
@JvmStatic
fun setRightSrc(view: XxBar, title:Int)
{
view.tv_title?: return
view.tv_title?.setText(title)
}
@BindingAdapter("on_click")
@JvmStatic
......@@ -74,6 +73,26 @@ class XxBar constructor(activity: Context?, attrs: AttributeSet?) : RelativeLay
view.img_left?: return
view.img_left?.setOnClickListener(click)
}
@BindingAdapter("right_src")
@JvmStatic
fun setRightSrc(view: XxBar, res:Drawable)
{
view.img_right?: return
view.img_right?.visibility=View.VISIBLE
view.img_right?.setImageDrawable(res)
}
@BindingAdapter("right_click")
@JvmStatic
fun setRightClick(view: XxBar, click:View.OnClickListener)
{
view.img_right?: return
view.img_right?.setOnClickListener(click)
}
}
......@@ -83,6 +102,7 @@ class XxBar constructor(activity: Context?, attrs: AttributeSet?) : RelativeLay
tv_title = view.findViewById<TextView>(R.id.bar_title)
img_left = view.findViewById<ImageButton>(R.id.bar_left_icon)
img_right=view.findViewById<ImageView>(R.id.iv_bar_right)
}
......
......@@ -45,7 +45,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black"/>
android:background="@color/line_grey"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -55,6 +56,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/btn_refuse"
android:background="#00000000"
android:onClick="@{dialog.refuseClick}"
android:visibility="@{model.refuseTxt==null? View.GONE : View.VISIBLE}"
......@@ -66,7 +68,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:onClick="@{dialog.acceptClick}"
android:background="#00000000"
android:textSize="16sp"
......
......@@ -33,6 +33,7 @@
android:id="@+id/iv_bar_right"
android:layout_centerVertical="true"
android:layout_marginRight="17dp"
android:visibility="gone"
android:layout_alignParentRight="true"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment