提交 c7bdded6 authored 作者: lgd's avatar lgd

1.添加收票开票备注

2.修改webview加载方式
上级 fad07a57
......@@ -122,7 +122,7 @@ public class TicketBean {
private Object createdByName;
private String createdTime;
private int updatedBy;
private Object updatedByName;
private String updatedByName;
private String updatedTime;
private Object commenceFromId;
private Object createdType;
......@@ -189,11 +189,11 @@ public class TicketBean {
this.updatedBy = updatedBy;
}
public Object getUpdatedByName() {
public String getUpdatedByName() {
return updatedByName;
}
public void setUpdatedByName(Object updatedByName) {
public void setUpdatedByName(String updatedByName) {
this.updatedByName = updatedByName;
}
......
......@@ -27,8 +27,6 @@ public class NoticeDetailActivity extends WorkToolBarActivity {
@BindView(R.id.wv_content)
WebView wvContent;
private boolean loadingFinished;
private boolean redirect;
@Override
......@@ -39,86 +37,6 @@ public class NoticeDetailActivity extends WorkToolBarActivity {
wSet.setDomStorageEnabled(true);
// wSet.setAllowFileAccess(true);
// wSet.setAppCacheEnabled(true);
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// WebView.setWebContentsDebuggingEnabled(true);
//
// android.webkit.WebView.setWebContentsDebuggingEnabled(true);
//
// }
// wvContent.setWebChromeClient(new WebChromeClient() {
//
// @Override
// public void onProgressChanged(WebView webView, int i) {
//
// if (i == 100) {
// Map<String, Object> param = new HashMap<>();
// param.put("token", UserKeeper.getInstance().getToken());
// wvContent.loadUrl("javascript:postToken(" + JSON.toJSONString(param) + ")");
// }
// super.onProgressChanged(webView, i);
// }
// });
wvContent.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String urlNewString) {
// if (!loadingFinished) {
// redirect = true;
// }
// loadingFinished = false;
// LogUtils.LOGE("bb", urlNewString);
// String tag="tel";
// if (urlNewString.contains(tag)) {
// Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(urlNewString));
// startActivity(intent);
// //这个超连接,java已经处理了,webview不要处理了
// return true;
// }
wvContent.loadUrl(urlNewString);
return true;
}
@Override
public void onPageStarted(WebView webView, String s, Bitmap bitmap) {
super.onPageStarted(webView, s, bitmap);
// loadingFinished = false;
}
@Override
public void onPageFinished(WebView view, String url) {
// wvContent.addJavascriptInterface(this, "android");
// if (!redirect) {
// loadingFinished = true;
// }
//
// if (loadingFinished && !redirect) {
// //HIDE LOADING IT HAS FINISHED
// Map<String, Object> param = new HashMap<>();
// param.put("token", UserKeeper.getInstance().getToken());
// wvContent.loadUrl("javascript:postToken(" + JSON.toJSONString(param) + ")");
// } else {
// redirect = false;
// }
}
});
// wvContent.setWebViewClient(new WebViewClient() {
// public boolean shouldOverrideUrlLoading(WebView view, String url) { // 重写此方法表明点击网页里面的链接还是在当前的webview里跳转,不跳到浏览器那边
// view.loadUrl(url);
// return true;
// }
//
// @Override
// public void onPageFinished(WebView view, String url) {
// Map<String, Object> param = new HashMap<>();
// param.put("token", UserKeeper.getInstance().getToken());
// wvContent.loadUrl("javascript:postToken(" + JSON.toJSONString(param) + ")");
// super.onPageFinished(view, url);
// }
// });
}
private void getData() {
......@@ -141,7 +59,8 @@ public class NoticeDetailActivity extends WorkToolBarActivity {
return;
}
JSONObject dataBean = JSON.parseObject(data.getData().toString());
wvContent.loadData(dataBean.getString("content"), "text/html", "utf-8");
// wvContent.loadData(, "text/html", "utf-8");
wvContent.loadDataWithBaseURL(null,dataBean.getString("content"), "text/html", "utf-8", null);
}
});
}
......
package com.wd.workoffice.ui.activity.bat.work;
import android.text.Editable;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
......@@ -64,6 +63,16 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
RecyclerView rvData;
@BindView(R.id.tv_desc)
TextView tvDesc;
@BindView(R.id.tv_check_person)
TextView tvCheckPerson;
@BindView(R.id.tv_check_time)
TextView tvCheckTime;
@BindView(R.id.tv_check_remark)
TextView tvCheckRemark;
@BindView(R.id.tv_check_status)
TextView tvCheckStatus;
@BindView(R.id.ll_check)
LinearLayout llCheck;
private List<TicketDetailBean> dataList;
private WorkFinancialTicketDetailAdapter dataAdapter;
private Map<String, Object> param;
......@@ -84,10 +93,15 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
tvPrice.setText(String.valueOf(info.getInvoiceSum()));
tvTax.setText(String.valueOf(info.getTax()));
tvRemark.setText(info.getApplyRemark());
tvCheckPerson.setText(info.getExamedByName());
tvCheckTime.setText(info.getUpdatedTime());
tvCheckRemark.setText(info.getAuditRemark());
if (TextUtils.equals(info.getStatus(), "0")) {
llBottom.setVisibility(View.VISIBLE);
llCheck.setVisibility(View.GONE);
} else {
llBottom.setVisibility(View.GONE);
llCheck.setVisibility(View.VISIBLE);
}
dataList = new ArrayList<>();
dataAdapter = new WorkFinancialTicketDetailAdapter(R.layout.item_ticket_detail, dataList);
......@@ -163,7 +177,7 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
tvOk.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (status!=1&&TextUtils.isEmpty(etRemark.getText().toString())) {
if (status != 1 && TextUtils.isEmpty(etRemark.getText().toString())) {
toast("请填写备注");
return;
}
......@@ -229,4 +243,5 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
tvAgree.setVisibility(View.GONE);
}
}
}
package com.wd.workoffice.ui.activity.bat.work;
import android.text.Editable;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
......@@ -62,6 +61,18 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
TextView tvRemark;
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.tv_desc)
TextView tvDesc;
@BindView(R.id.tv_check_person)
TextView tvCheckPerson;
@BindView(R.id.tv_check_time)
TextView tvCheckTime;
@BindView(R.id.tv_check_remark)
TextView tvCheckRemark;
@BindView(R.id.tv_check_status)
TextView tvCheckStatus;
@BindView(R.id.ll_check)
LinearLayout llCheck;
private List<TicketDetailBean> dataList;
private WorkFinancialTicketDetailAdapter dataAdapter;
private Map<String, Object> param;
......@@ -81,10 +92,15 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
tvPrice.setText(String.valueOf(info.getInvoiceSum()));
tvTax.setText(String.valueOf(info.getTax()));
tvRemark.setText(info.getApplyRemark());
tvCheckPerson.setText(info.getExamedByName());
tvCheckTime.setText(info.getUpdatedTime());
tvCheckRemark.setText(info.getAuditRemark());
if (TextUtils.equals(info.getStatus(), "0")) {
llBottom.setVisibility(View.VISIBLE);
llCheck.setVisibility(View.GONE);
} else {
llBottom.setVisibility(View.GONE);
llCheck.setVisibility(View.VISIBLE);
}
dataList = new ArrayList<>();
dataAdapter = new WorkFinancialTicketDetailAdapter(R.layout.item_ticket_detail, dataList);
......@@ -92,7 +108,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
param = new HashMap<>();
param.put("id", info.getId());
orderType = getIntent().getStringExtra("type");
if (TextUtils.equals("contacts",orderType)){
if (TextUtils.equals("contacts", orderType)) {
llBottom.setVisibility(View.GONE);
}
changePermission();
......@@ -157,7 +173,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
TextView tvNum = view.findViewById(R.id.tv_num);
TextView tvCancel = view.findViewById(R.id.tv_cancel);
EditText etRemark = view.findViewById(R.id.et_content);
WorkUtils.addNumListener(etRemark,tvNum);
WorkUtils.addNumListener(etRemark, tvNum);
builder.setView(view);
AlertDialog addCartDialog = builder.create();
tvOk.setOnClickListener(new View.OnClickListener() {
......@@ -235,4 +251,11 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
tvAgree.setVisibility(View.GONE);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
}
......@@ -90,7 +90,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="销售二公司"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
......@@ -117,11 +116,123 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="销售二公司"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_check"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="审核人"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_check_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="审核时间"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_check_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="审核备注"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_check_remark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:visibility="gone"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="审核状态"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_check_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
</LinearLayout>
<View style="@style/ViewX" />
<LinearLayout
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论