Commit a46d2508 authored by 杨秀秀's avatar 杨秀秀

基础搭建

功能开发
1:封个版
parent 2c61c61d
......@@ -36,7 +36,7 @@ android {
minSdk 23
targetSdk 31
versionCode 1
versionName "1.0.3"
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.reseale
......
......@@ -83,13 +83,13 @@ public class AppealDetailViewModel extends BaseViewModel<AppealRequest> {
/*存值*/
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()) {
/*取操作日志最新的一条的remark*/
......
......@@ -18,6 +18,8 @@ import com.xx.merchanthbh.ui.huanbohai.HuanBoHaiFragment;
import com.xx.merchanthbh.ui.mine.MineFragment;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.xx.xxviewlibrary.base.AppManager;
import com.xx.xxviewlibrary.comm.CommTextDialog;
import com.xx.xxviewlibrary.comm.RefuseDialogBean;
import me.goldze.mvvmhabit.base.BaseActivity;
......@@ -98,31 +100,26 @@ public class HomeActivity extends BaseActivity<ActivityHomeBinding, HomeViewMode
private void exit() {
if (!isExit) {
isExit = true;
Toast.makeText(getApplicationContext(), "再按一次退出程序",
Toast.LENGTH_SHORT).show();
// 利用handler延迟发送更改状态信息,2000==2秒
mHandler.sendEmptyMessageDelayed(0, 2000);
} else {
/*Intent intent=new Intent(Intent.ACTION_SENDTO);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);*/
onStop();
}
showCommTextDialog(new RefuseDialogBean("是否确认退出APP?", "确定", "取消"), new CommTextDialog.onAcceptCallBack() {
@Override
public void acceptBack() {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
@Override
public void refuseBack() {
}
});
}
@Override
protected void 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
.doOnSubscribe(new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
showDialog("");
}
}).subscribe(new ApiDisposablePageObserver<ProductListBean>() {
@Override
public void onSuccess(List<ProductListBean> resultBean) {
dismissDialog();
if (page==1)
{
listAdapter.mList=resultBean;
......@@ -66,7 +68,7 @@ public class ProductManagerViewModel extends ListBaseViewModel<ProductManagerReq
@Override
public void onError(String Error) {
dismissDialog();
}
@Override
......
......@@ -95,6 +95,7 @@
android:background="@drawable/bg_white_radius_12"
android:layout_marginBottom="13dp"
app:content_type="1"
app:necessary="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
isBottom="true"/>
......
......@@ -15,6 +15,8 @@ import com.xx.hbhbcompany.databinding.ActivityHomeBinding;
import com.xx.hbhbcompany.ui.mine.MineFragment;
import com.xx.hbhbcompany.ui.work.WorkFragment;
import com.xx.xxviewlibrary.base.AppManager;
import com.xx.xxviewlibrary.comm.CommTextDialog;
import com.xx.xxviewlibrary.comm.RefuseDialogBean;
import me.goldze.mvvmhabit.base.BaseActivity;
......@@ -86,28 +88,28 @@ public class HomeActivity extends BaseActivity<ActivityHomeBinding,HomeViewModel
private void exit() {
if (!isExit) {
isExit = true;
Toast.makeText(getApplicationContext(), "再按一次退出程序",
Toast.LENGTH_SHORT).show();
// 利用handler延迟发送更改状态信息,2000==2秒
mHandler.sendEmptyMessageDelayed(0, 2000);
} else {
onStop();
}
showCommTextDialog(new RefuseDialogBean("是否确认退出APP?", "确定", "取消"), new CommTextDialog.onAcceptCallBack() {
@Override
public void acceptBack() {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
@Override
public void refuseBack() {
}
});
}
@Override
protected void 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
viewModel.type=type;
binding.refresh.setOnRefreshListener(this)
binding.refresh.setOnLoadMoreListener(this)
binding.refresh.setEnableLoadMore(false);
binding.refresh.setEnableFooterFollowWhenNoMoreData(true);
if(type==0)
......@@ -65,10 +66,12 @@ class ProductListActivity : BaseActivity<ActivityProductListBinding, ProductList
if (it == 1) {
binding.rvDblList.visibility= View.VISIBLE
binding.llNoData.visibility= View.GONE
binding.refresh.setEnableLoadMore(true);
binding.refresh.finishLoadMore();
} else if (it == 2) {
binding.rvDblList.visibility= View.VISIBLE
binding.llNoData.visibility= View.GONE
binding.refresh.setEnableLoadMore(true);
binding.refresh.finishLoadMore();
binding.refresh.finishLoadMoreWithNoMoreData()
}else if(it==3)
......
......@@ -203,6 +203,7 @@ public class QualityAuditInfoViewModel extends BaseViewModel<QualityAuditRequst>
@Override
public void onSuccess(MerchantBean resultBean) {
userid=resultBean.getUserId();
if ("1".equals(resultBean.getStatus()) || "4".equals(resultBean.getStatus()))
{
......
package com.xx.hbhbcompany.widget
import android.content.Context
import android.content.res.TypedArray
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
......@@ -40,9 +41,9 @@ class AuditStepLayout: LinearLayout {
fun InitView(attrs: AttributeSet?) {
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))
{
1->{
......@@ -58,6 +59,6 @@ class AuditStepLayout: LinearLayout {
}
}
}
\ No newline at end of file
......@@ -342,7 +342,7 @@
android:layout_height="wrap_content"
app:content_type="1"
app:necessary="false"
ed_content="@{viewModel.qualityPerson}"
ed_content="@{viewModel.supervisorsUser}"
ed_title='@{@string/quality_person}'
/>
<com.xx.xxviewlibrary.witget.XxFormEdit
......
......@@ -297,7 +297,7 @@
android:layout_height="wrap_content"
app:content_type="1"
app:necessary="false"
ed_content="@{viewModel.qualityPerson}"
ed_content="@{viewModel.supervisorsUser}"
ed_title='@{@string/quality_person}'
/>
<com.xx.xxviewlibrary.witget.XxFormEdit
......
......@@ -117,7 +117,7 @@
app:content_type="1"
app:necessary="false"
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