Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ac0511f08 | |||
1d9e8baed8 |
@ -0,0 +1,41 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ToH5Bean
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/9/9 10:01
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public class ToH5Bean implements Serializable {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
private String carNumber;
|
||||||
|
private String carId;
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCarNumber() {
|
||||||
|
return carNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarNumber(String carNumber) {
|
||||||
|
this.carNumber = carNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCarId() {
|
||||||
|
return carId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarId(String carId) {
|
||||||
|
this.carId = carId;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.arpa.hndahesudintocctmsdriver.event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hlh
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2021/10/20 14:43
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
public class PdfResEvent {
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public PdfResEvent(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
@ -72,6 +72,15 @@ public class HuoYuanRequset{
|
|||||||
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void confirm(String cid,String contractUrl,int wid){
|
||||||
|
Map<String,Object> map=new HashMap<>();
|
||||||
|
map.put("carId",cid);
|
||||||
|
map.put("orderId",wid);
|
||||||
|
map.put("contractUrl",contractUrl);
|
||||||
|
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getAgreeOrder(),MapUtil.mapJson(map)),getToken(con),con);
|
||||||
|
RequestUtil.start(1, HuoYunDelActivity.END,re,con,hd);
|
||||||
|
}
|
||||||
//获取执行中的运单
|
//获取执行中的运单
|
||||||
public void startOrder(int id){
|
public void startOrder(int id){
|
||||||
Map<String,Object> map=new HashMap<>();
|
Map<String,Object> map=new HashMap<>();
|
||||||
|
@ -552,15 +552,10 @@ public class HomeFragment extends BaseFragment {
|
|||||||
startActivity(in4);
|
startActivity(in4);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// Intent in5 = new Intent(con, WebActivity.class);
|
Intent in5 = new Intent(con, WebActivity.class);
|
||||||
// in5.putExtra("url", "https://ks.wjx.top/vm/h6Jqu8A.aspx");
|
in5.putExtra("url", "https://ks.wjx.top/vm/h6Jqu8A.aspx");
|
||||||
// in5.putExtra("title", "知识竞猜");
|
in5.putExtra("title", "知识竞猜");
|
||||||
// startActivity(in5);
|
startActivity(in5);
|
||||||
|
|
||||||
Intent in = new Intent(getContext(), WebActivity.class);
|
|
||||||
in.putExtra("url", "http://192.168.1.152:8080");
|
|
||||||
in.putExtra("title", "隐私政策");
|
|
||||||
getContext().startActivity(in);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -29,8 +29,10 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
import com.arpa.hndahesudintocctmsdriver.H5Activity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
import com.arpa.hndahesudintocctmsdriver.bean.JTT;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.ToH5Bean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.FaceEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeEvent;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.PdfResEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||||
@ -154,8 +156,20 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
.asConfirm("请确认接单", "是否确定承运此运单?",
|
.asConfirm("请确认接单", "是否确定承运此运单?",
|
||||||
"取消", "确认",
|
"取消", "确认",
|
||||||
() -> {
|
() -> {
|
||||||
|
ToH5Bean toH5Bean = new ToH5Bean();
|
||||||
|
toH5Bean.setId(id);
|
||||||
|
toH5Bean.setCarNumber(car.getText().toString().substring("选择车辆:".length()));
|
||||||
|
toH5Bean.setCarId(cid);
|
||||||
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
Log.e("--id--", "cid:" + cid + "---wid:" + id);
|
||||||
hyr.confirm(cid, id);
|
Intent in = new Intent(con, WebActivity.class);
|
||||||
|
in.putExtra("url", "https://platform.test.dahehuoyun.com/contract/dist/#/contracttemplate");
|
||||||
|
in.putExtra("id", id);
|
||||||
|
in.putExtra("ToH5Bean",toH5Bean);
|
||||||
|
in.putExtra("title", "合同签署");
|
||||||
|
// startActivity(in);
|
||||||
|
|
||||||
|
startActivityForResult(in,1);
|
||||||
|
|
||||||
}, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
}, () -> customDialog.dismiss(), false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||||
.show();
|
.show();
|
||||||
break;
|
break;
|
||||||
@ -436,6 +450,22 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (resultCode == RESULT_OK&&requestCode==1){
|
||||||
|
//签合同后接单
|
||||||
|
// String pdfUrl = data.getStringExtra("pdfUrl");
|
||||||
|
// hyr.confirm(cid,pdfUrl, id);
|
||||||
|
|
||||||
|
UiAuxiliary.homeRequest("接单");
|
||||||
|
Intent in = new Intent(con, StartYunDanActivity.class);
|
||||||
|
in.putExtra("id", "0");
|
||||||
|
startActivity(in);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接单
|
* 接单
|
||||||
* 先判断安联用户信息验证,随后接单
|
* 先判断安联用户信息验证,随后接单
|
||||||
|
@ -15,18 +15,26 @@ import android.webkit.WebResourceRequest;
|
|||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.ToH5Bean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.UserBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.UserBean;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.PdfResEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PaxWebChromeClient;
|
import com.arpa.hndahesudintocctmsdriver.util.PaxWebChromeClient;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.string.StringUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseActivity;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hlh
|
* @author hlh
|
||||||
@ -38,9 +46,12 @@ public class WebActivity extends BaseActivity {
|
|||||||
|
|
||||||
private String url = "";
|
private String url = "";
|
||||||
private String title = "";
|
private String title = "";
|
||||||
|
private int id = -1;
|
||||||
private WebView wv;
|
private WebView wv;
|
||||||
private TextView title_tv;
|
private TextView title_tv;
|
||||||
|
private ProgressBar progressBar;
|
||||||
private PaxWebChromeClient chromeClient;
|
private PaxWebChromeClient chromeClient;
|
||||||
|
private ToH5Bean toH5Bean;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
@ -50,11 +61,15 @@ public class WebActivity extends BaseActivity {
|
|||||||
con=this;
|
con=this;
|
||||||
initHardwareAccelerate();
|
initHardwareAccelerate();
|
||||||
wv = findViewById(R.id.wv);
|
wv = findViewById(R.id.wv);
|
||||||
|
progressBar = findViewById(R.id.progressBar);
|
||||||
title_tv = findViewById(R.id.title);
|
title_tv = findViewById(R.id.title);
|
||||||
Intent in = getIntent();
|
Intent in = getIntent();
|
||||||
url = in.getExtras().getString("url");
|
url = in.getExtras().getString("url");
|
||||||
title = in.getExtras().getString("title");
|
title = in.getExtras().getString("title");
|
||||||
chromeClient = new PaxWebChromeClient(this,null,null);
|
toH5Bean = (ToH5Bean)in.getSerializableExtra("ToH5Bean");
|
||||||
|
String carNumber = toH5Bean.getCarNumber();
|
||||||
|
id = in.getExtras().getInt("id");
|
||||||
|
chromeClient = new PaxWebChromeClient(this,progressBar,null);
|
||||||
if ("咨询建议".equals(title)) {
|
if ("咨询建议".equals(title)) {
|
||||||
initOpinion();
|
initOpinion();
|
||||||
} else {
|
} else {
|
||||||
@ -208,13 +223,32 @@ public class WebActivity extends BaseActivity {
|
|||||||
return UserParts.getUser(con).getData().getToken();
|
return UserParts.getUser(con).getData().getToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JavascriptInterface
|
||||||
|
public int getOrderId(){
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JavascriptInterface
|
||||||
|
public String getOrderinfo(){
|
||||||
|
return new Gson().toJson(toH5Bean);
|
||||||
|
}
|
||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void isSuccess(){
|
public void isSuccess(){
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void isPdfSuccess(){
|
public void isPdfSuccess(String pdfUrl){
|
||||||
Toast.makeText(con, "签署成功", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(con, "签署成功", Toast.LENGTH_SHORT).show();
|
||||||
|
// EventBus.getDefault().post(new PdfResEvent(pdfUrl));
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("pdfUrl",pdfUrl);
|
||||||
|
setResult(RESULT_OK,intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@JavascriptInterface
|
||||||
|
public void isFail(){
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import android.app.Activity;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.view.View;
|
||||||
import android.webkit.PermissionRequest;
|
import android.webkit.PermissionRequest;
|
||||||
import android.webkit.ValueCallback;
|
import android.webkit.ValueCallback;
|
||||||
import android.webkit.WebChromeClient;
|
import android.webkit.WebChromeClient;
|
||||||
@ -38,12 +39,12 @@ public class PaxWebChromeClient extends WebChromeClient {
|
|||||||
@Override
|
@Override
|
||||||
public void onProgressChanged(WebView view, int newProgress) {
|
public void onProgressChanged(WebView view, int newProgress) {
|
||||||
if (newProgress == 100) {
|
if (newProgress == 100) {
|
||||||
//bar.setVisibility(View.INVISIBLE);
|
bar.setVisibility(View.INVISIBLE);
|
||||||
} else {
|
} else {
|
||||||
// if (View.INVISIBLE == bar.getVisibility()) {
|
if (View.INVISIBLE == bar.getVisibility()) {
|
||||||
// bar.setVisibility(View.VISIBLE);
|
bar.setVisibility(View.VISIBLE);
|
||||||
// }
|
}
|
||||||
// bar.setProgress(newProgress);
|
bar.setProgress(newProgress);
|
||||||
}
|
}
|
||||||
super.onProgressChanged(view, newProgress);
|
super.onProgressChanged(view, newProgress);
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,24 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<WebView
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_marginTop="@dimen/dp_88"
|
android:layout_marginTop="@dimen/dp_88"
|
||||||
android:id="@+id/wv"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent">
|
||||||
|
<WebView
|
||||||
|
android:id="@+id/wv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:layout_alignParentTop="true" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
Loading…
Reference in New Issue
Block a user