Merge branch 'newlj2' into newlj2toyybc
This commit is contained in:
commit
b082e37493
@ -8,6 +8,7 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
@ -17,6 +18,7 @@ import android.text.TextUtils;
|
||||
import android.text.method.HideReturnsTransformationMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
@ -48,7 +50,10 @@ import com.arpa.hndahesudintocctmsdriver.util.img.ImageGetUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.sp.SPUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickListener;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.esign.esignsdk.EsignSdk;
|
||||
import com.esign.esignsdk.data.AuthEvent;
|
||||
import com.google.gson.Gson;
|
||||
@ -74,6 +79,7 @@ import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||
import com.permissionx.guolindev.PermissionX;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -81,6 +87,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
|
||||
@ -98,6 +105,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
|
||||
private String currOutInvoice = "0";
|
||||
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
@ -161,13 +169,17 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
isRegOk = true;
|
||||
|
||||
Log.e("orderStatus", CacheGroup.cacheList.get("orderStatus"));
|
||||
WaybillStatusBean status = gson.fromJson(CacheGroup.cacheList.get("orderStatus"), WaybillStatusBean.class);
|
||||
if (status.getCode() == 200) {
|
||||
if (regOkPop != null && regOkPop.isShow()) {
|
||||
regOkPop.dismiss();
|
||||
}
|
||||
if (status.getData() != null) {
|
||||
//执行运单下一步操作
|
||||
new XPopup.Builder(con)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
@ -352,7 +364,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
});
|
||||
//
|
||||
Button confirm_btn = v.findViewById(R.id.confirm_btn);
|
||||
confirm_btn.setOnClickListener(v13 -> {
|
||||
confirm_btn.setOnClickListener(new OnLimitClickHelper(view -> {
|
||||
if ("1".equals(UserParts.getUser(con).getData().getRealAuthentication())) {
|
||||
if (cid != null) {
|
||||
// if (fpKey){
|
||||
@ -373,7 +385,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
Intent in = new Intent(con, PersonalAuthActivity.class);
|
||||
startActivity(in);
|
||||
}
|
||||
});
|
||||
}));
|
||||
BaseRecyclerView zhuang_data = v.findViewById(R.id.zhuang_rv1);
|
||||
BaseRecyclerView xie_data = v.findViewById(R.id.zhuang_rv2);
|
||||
List<Object> listz = new ArrayList<>();
|
||||
@ -508,6 +520,8 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
* 先判断安联用户信息验证,随后接单
|
||||
*/
|
||||
private void reOrder() {
|
||||
//开始倒计时
|
||||
startCountDown();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
try {
|
||||
PermissionX.init(this)
|
||||
@ -519,10 +533,10 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
if (allGranted) {
|
||||
customDialog = new CustomDialog(con, "正在接单...");
|
||||
customDialog.show();
|
||||
if ("0".equals(currOutInvoice)){
|
||||
if ("0".equals(currOutInvoice)) {
|
||||
//验证安联用户是否通过
|
||||
ALProcess.verification(con, selectCarNum, hd);
|
||||
}else{
|
||||
} else {
|
||||
hyr.getOrderStatus(id);
|
||||
}
|
||||
|
||||
@ -567,4 +581,97 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
// 取消倒计时,防止内存泄漏
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
}
|
||||
if (regOkPop != null && regOkPop.isShow()) {
|
||||
regOkPop.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
private CountDownTimer countDownTimer;
|
||||
private boolean isRegOk = false;
|
||||
private BasePopupView regOkPop;
|
||||
private void startCountDown() {
|
||||
countDownTimer = new CountDownTimer(30000, 1000) {
|
||||
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
// 更新TextView显示剩余时间
|
||||
System.out.println("asdf");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (!isRegOk) {
|
||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
//执行运单下一步操作
|
||||
regOkPop = new XPopup.Builder(con)
|
||||
.setPopupCallback(new XPopupCallback() {
|
||||
@Override
|
||||
public void onCreated(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(BasePopupView popupView) {
|
||||
isRegOk = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDismiss(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed(BasePopupView popupView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyBoardStateChanged(BasePopupView popupView, int height) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrag(BasePopupView popupView, int value, float percent, boolean upOrLeft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickOutside(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
})
|
||||
.asConfirm("提示", "接单失败,请返回重新接单!",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
isRegOk = false;
|
||||
finish();
|
||||
}, () -> {
|
||||
}, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}.start(); // 别忘了调用start()方法来启动倒计时
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +102,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
private boolean key = false;
|
||||
private int id = 0;
|
||||
LocationGDUtil ld;
|
||||
private TextView pl_submit;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@ -135,6 +136,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
if (CacheGroup.cacheList.get(KEEP_EVALUTE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(KEEP_EVALUTE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
pl_submit.setVisibility(View.GONE);
|
||||
Toast.makeText(con, "评价保存成功", Toast.LENGTH_SHORT).show();
|
||||
hyr.startOrder(id);
|
||||
hyr.getEvaluate(id);
|
||||
@ -260,7 +262,7 @@ public class StartYunDanActivity extends BaseActivity {
|
||||
sv2.initView();
|
||||
sv1.setScore(5);
|
||||
//设置是否可以修改评分,默认为true
|
||||
TextView pl_submit = v.findViewById(R.id.pl_submit);
|
||||
pl_submit = v.findViewById(R.id.pl_submit);
|
||||
TextView m_pl_value = v.findViewById(R.id.m_pl_value);
|
||||
TextView pl_value = v.findViewById(R.id.pl_value);
|
||||
if (wnb.getData() != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user