Commit 2a15897a authored by david's avatar david

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

parents a30951bd a46d2508
...@@ -36,7 +36,7 @@ android { ...@@ -36,7 +36,7 @@ android {
minSdk 23 minSdk 23
targetSdk 31 targetSdk 31
versionCode 1 versionCode 1
versionName "1.0.3" versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.reseale signingConfig signingConfigs.reseale
......
...@@ -83,13 +83,13 @@ public class AppealDetailViewModel extends BaseViewModel<AppealRequest> { ...@@ -83,13 +83,13 @@ public class AppealDetailViewModel extends BaseViewModel<AppealRequest> {
/*存值*/ /*存值*/
AppealDetailList.postValue(resultBean.getAppealFiles()); AppealDetailList.postValue(resultBean.getAppealFiles());
/*反馈人*/ /*反馈人*/
appealPerson.set(String.valueOf(resultBean.getFeedbackPerson())); appealPerson.set(resultBean.getFeedbackPerson());
/*联系方式*/ /*联系方式*/
appealPhone.set(String.valueOf(resultBean.getContactMode())); appealPhone.set(resultBean.getContactMode());
/*描述*/ /*描述*/
appealDescribe.set(String.valueOf(resultBean.getLiteralDescription())); appealDescribe.set(resultBean.getLiteralDescription());
/*所属商户*/ /*所属商户*/
appealCustom.set(String.valueOf(resultBean.getMerchant().getCompanyName())); appealCustom.set(resultBean.getMerchant().getCompanyName());
/*驳回原因赋值*/ /*驳回原因赋值*/
if (resultBean.getAppealStatus().equals("REJECTED") && !resultBean.getOperations().isEmpty()) { if (resultBean.getAppealStatus().equals("REJECTED") && !resultBean.getOperations().isEmpty()) {
/*取操作日志最新的一条的remark*/ /*取操作日志最新的一条的remark*/
......
...@@ -18,6 +18,8 @@ import com.xx.merchanthbh.ui.huanbohai.HuanBoHaiFragment; ...@@ -18,6 +18,8 @@ import com.xx.merchanthbh.ui.huanbohai.HuanBoHaiFragment;
import com.xx.merchanthbh.ui.mine.MineFragment; import com.xx.merchanthbh.ui.mine.MineFragment;
import com.google.android.material.bottomnavigation.BottomNavigationView; import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.xx.xxviewlibrary.base.AppManager; import com.xx.xxviewlibrary.base.AppManager;
import com.xx.xxviewlibrary.comm.CommTextDialog;
import com.xx.xxviewlibrary.comm.RefuseDialogBean;
import me.goldze.mvvmhabit.base.BaseActivity; import me.goldze.mvvmhabit.base.BaseActivity;
...@@ -98,31 +100,26 @@ public class HomeActivity extends BaseActivity<ActivityHomeBinding, HomeViewMode ...@@ -98,31 +100,26 @@ public class HomeActivity extends BaseActivity<ActivityHomeBinding, HomeViewMode
private void exit() { private void exit() {
if (!isExit) { showCommTextDialog(new RefuseDialogBean("是否确认退出APP?", "确定", "取消"), new CommTextDialog.onAcceptCallBack() {
isExit = true; @Override
Toast.makeText(getApplicationContext(), "再按一次退出程序", public void acceptBack() {
Toast.LENGTH_SHORT).show(); Intent intent = new Intent(Intent.ACTION_MAIN);
// 利用handler延迟发送更改状态信息,2000==2秒 intent.addCategory(Intent.CATEGORY_HOME);
mHandler.sendEmptyMessageDelayed(0, 2000); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else { startActivity(intent);
/*Intent intent=new Intent(Intent.ACTION_SENDTO); }
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); @Override
startActivity(intent);*/ public void refuseBack() {
onStop();
} }
});
} }
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
// 使用Intent将当前Activity移至后台
if (isExit)
{
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
} }
} }
\ No newline at end of file
...@@ -50,11 +50,13 @@ public class ProductManagerViewModel extends ListBaseViewModel<ProductManagerReq ...@@ -50,11 +50,13 @@ public class ProductManagerViewModel extends ListBaseViewModel<ProductManagerReq
.doOnSubscribe(new Consumer<Disposable>() { .doOnSubscribe(new Consumer<Disposable>() {
@Override @Override
public void accept(Disposable disposable) throws Exception { public void accept(Disposable disposable) throws Exception {
showDialog("");
} }
}).subscribe(new ApiDisposablePageObserver<ProductListBean>() { }).subscribe(new ApiDisposablePageObserver<ProductListBean>() {
@Override @Override
public void onSuccess(List<ProductListBean> resultBean) { public void onSuccess(List<ProductListBean> resultBean) {
dismissDialog();
if (page==1) if (page==1)
{ {
listAdapter.mList=resultBean; listAdapter.mList=resultBean;
...@@ -66,7 +68,7 @@ public class ProductManagerViewModel extends ListBaseViewModel<ProductManagerReq ...@@ -66,7 +68,7 @@ public class ProductManagerViewModel extends ListBaseViewModel<ProductManagerReq
@Override @Override
public void onError(String Error) { public void onError(String Error) {
dismissDialog();
} }
@Override @Override
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
android:background="@drawable/bg_white_radius_12" android:background="@drawable/bg_white_radius_12"
android:layout_marginBottom="13dp" android:layout_marginBottom="13dp"
app:content_type="1" app:content_type="1"
app:necessary="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
isBottom="true"/> isBottom="true"/>
......
...@@ -15,6 +15,8 @@ import com.xx.hbhbcompany.databinding.ActivityHomeBinding; ...@@ -15,6 +15,8 @@ import com.xx.hbhbcompany.databinding.ActivityHomeBinding;
import com.xx.hbhbcompany.ui.mine.MineFragment; import com.xx.hbhbcompany.ui.mine.MineFragment;
import com.xx.hbhbcompany.ui.work.WorkFragment; import com.xx.hbhbcompany.ui.work.WorkFragment;
import com.xx.xxviewlibrary.base.AppManager; import com.xx.xxviewlibrary.base.AppManager;
import com.xx.xxviewlibrary.comm.CommTextDialog;
import com.xx.xxviewlibrary.comm.RefuseDialogBean;
import me.goldze.mvvmhabit.base.BaseActivity; import me.goldze.mvvmhabit.base.BaseActivity;
...@@ -86,28 +88,28 @@ public class HomeActivity extends BaseActivity<ActivityHomeBinding,HomeViewModel ...@@ -86,28 +88,28 @@ public class HomeActivity extends BaseActivity<ActivityHomeBinding,HomeViewModel
private void exit() { private void exit() {
if (!isExit) { showCommTextDialog(new RefuseDialogBean("是否确认退出APP?", "确定", "取消"), new CommTextDialog.onAcceptCallBack() {
isExit = true; @Override
Toast.makeText(getApplicationContext(), "再按一次退出程序", public void acceptBack() {
Toast.LENGTH_SHORT).show(); Intent intent = new Intent(Intent.ACTION_MAIN);
// 利用handler延迟发送更改状态信息,2000==2秒 intent.addCategory(Intent.CATEGORY_HOME);
mHandler.sendEmptyMessageDelayed(0, 2000); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else { startActivity(intent);
onStop(); }
}
@Override
public void refuseBack() {
}
});
} }
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
// 使用Intent将当前Activity移至后台
if (isExit)
{
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
} }
} }
...@@ -36,6 +36,7 @@ class ProductListActivity : BaseActivity<ActivityProductListBinding, ProductList ...@@ -36,6 +36,7 @@ class ProductListActivity : BaseActivity<ActivityProductListBinding, ProductList
viewModel.type=type; viewModel.type=type;
binding.refresh.setOnRefreshListener(this) binding.refresh.setOnRefreshListener(this)
binding.refresh.setOnLoadMoreListener(this) binding.refresh.setOnLoadMoreListener(this)
binding.refresh.setEnableLoadMore(false);
binding.refresh.setEnableFooterFollowWhenNoMoreData(true); binding.refresh.setEnableFooterFollowWhenNoMoreData(true);
if(type==0) if(type==0)
...@@ -65,10 +66,12 @@ class ProductListActivity : BaseActivity<ActivityProductListBinding, ProductList ...@@ -65,10 +66,12 @@ class ProductListActivity : BaseActivity<ActivityProductListBinding, ProductList
if (it == 1) { if (it == 1) {
binding.rvDblList.visibility= View.VISIBLE binding.rvDblList.visibility= View.VISIBLE
binding.llNoData.visibility= View.GONE binding.llNoData.visibility= View.GONE
binding.refresh.setEnableLoadMore(true);
binding.refresh.finishLoadMore(); binding.refresh.finishLoadMore();
} else if (it == 2) { } else if (it == 2) {
binding.rvDblList.visibility= View.VISIBLE binding.rvDblList.visibility= View.VISIBLE
binding.llNoData.visibility= View.GONE binding.llNoData.visibility= View.GONE
binding.refresh.setEnableLoadMore(true);
binding.refresh.finishLoadMore(); binding.refresh.finishLoadMore();
binding.refresh.finishLoadMoreWithNoMoreData() binding.refresh.finishLoadMoreWithNoMoreData()
}else if(it==3) }else if(it==3)
......
...@@ -203,6 +203,7 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst> ...@@ -203,6 +203,7 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst>
@Override @Override
public void onSuccess(MerchantBean resultBean) { public void onSuccess(MerchantBean resultBean) {
userid=resultBean.getUserId(); userid=resultBean.getUserId();
if ("1".equals(resultBean.getStatus()) || "4".equals(resultBean.getStatus())) if ("1".equals(resultBean.getStatus()) || "4".equals(resultBean.getStatus()))
{ {
......
package com.xx.hbhbcompany.widget package com.xx.hbhbcompany.widget
import android.content.Context import android.content.Context
import android.content.res.TypedArray
import android.util.AttributeSet import android.util.AttributeSet
import android.view.LayoutInflater import android.view.LayoutInflater
import android.widget.LinearLayout import android.widget.LinearLayout
...@@ -40,9 +41,9 @@ class AuditStepLayout: LinearLayout { ...@@ -40,9 +41,9 @@ class AuditStepLayout: LinearLayout {
fun InitView(attrs: AttributeSet?) { fun InitView(attrs: AttributeSet?) {
binding= inflate(LayoutInflater.from(context), R.layout.widget_audit_step, this, true); binding= inflate(LayoutInflater.from(context), R.layout.widget_audit_step, this, true);
var typedArray: TypedArray =
context.obtainStyledAttributes(attrs, R.styleable.auditStepStyle)
context.obtainStyledAttributes(attrs, R.styleable.auditStepStyle).use {
typedArray ->
when( typedArray.getInteger(R.styleable.auditStepStyle_step,0)) when( typedArray.getInteger(R.styleable.auditStepStyle_step,0))
{ {
1->{ 1->{
...@@ -58,6 +59,6 @@ class AuditStepLayout: LinearLayout { ...@@ -58,6 +59,6 @@ class AuditStepLayout: LinearLayout {
}
} }
} }
\ No newline at end of file
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:content_type="1" app:content_type="1"
app:necessary="false" app:necessary="false"
ed_content="@{viewModel.qualityPerson}" ed_content="@{viewModel.supervisorsUser}"
ed_title='@{@string/quality_person}' ed_title='@{@string/quality_person}'
/> />
<com.xx.xxviewlibrary.witget.XxFormEdit <com.xx.xxviewlibrary.witget.XxFormEdit
......
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:content_type="1" app:content_type="1"
app:necessary="false" app:necessary="false"
ed_content="@{viewModel.qualityPerson}" ed_content="@{viewModel.supervisorsUser}"
ed_title='@{@string/quality_person}' ed_title='@{@string/quality_person}'
/> />
<com.xx.xxviewlibrary.witget.XxFormEdit <com.xx.xxviewlibrary.witget.XxFormEdit
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
app:content_type="1" app:content_type="1"
app:necessary="false" app:necessary="false"
app:isBottom="true" app:isBottom="true"
ed_content="@{viewModel.user.userName}" ed_content="@{viewModel.supervisorsUser}"
/> />
......
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