提交 9c7e8c34 authored 作者: lgd's avatar lgd

1.入库修改

上级 451327b1
...@@ -254,7 +254,7 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -254,7 +254,7 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
public void onClick(View v) { public void onClick(View v) {
String price = ""; String price = "";
String tax = ""; String tax = "";
if (status == 1 && TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) { if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
EditText etPrice = view.findViewById(R.id.et_price); EditText etPrice = view.findViewById(R.id.et_price);
EditText etTax = view.findViewById(R.id.et_tax); EditText etTax = view.findViewById(R.id.et_tax);
price = etPrice.getText().toString(); price = etPrice.getText().toString();
......
...@@ -208,7 +208,16 @@ public class AddStockApplyFragment extends WorkBaseFg { ...@@ -208,7 +208,16 @@ public class AddStockApplyFragment extends WorkBaseFg {
private void checkDialog(int status, int id) { private void checkDialog(int status, int id) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View view = LayoutInflater.from(getActivity()).inflate(R.layout.view_check, null); View view;
if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
view = LayoutInflater.from(getActivity()).inflate(R.layout.view_supply_stock, null);
EditText etPrice = view.findViewById(R.id.et_price);
EditText etTax = view.findViewById(R.id.et_tax);
WorkUtils.addDecimalsListener(etPrice);
WorkUtils.addDecimalsListener(etTax);
} else {
view = LayoutInflater.from(getActivity()).inflate(R.layout.view_check, null);
}
TextView tvOk = view.findViewById(R.id.tv_ok); TextView tvOk = view.findViewById(R.id.tv_ok);
TextView tvDesc = view.findViewById(R.id.tv_desc); TextView tvDesc = view.findViewById(R.id.tv_desc);
tvDesc.setText(status == 1 ? "通过" : "拒绝"); tvDesc.setText(status == 1 ? "通过" : "拒绝");
...@@ -221,11 +230,27 @@ public class AddStockApplyFragment extends WorkBaseFg { ...@@ -221,11 +230,27 @@ public class AddStockApplyFragment extends WorkBaseFg {
tvOk.setOnClickListener(new View.OnClickListener() { tvOk.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (status!=1&&TextUtils.isEmpty(etRemark.getText().toString()) && status == 2) { String price = "";
String tax = "";
if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
EditText etPrice = view.findViewById(R.id.et_price);
EditText etTax = view.findViewById(R.id.et_tax);
price = etPrice.getText().toString();
tax = etTax.getText().toString();
if (TextUtils.isEmpty(price)) {
toast("请填写价格");
return;
}
if (TextUtils.isEmpty(tax)) {
toast("请填写税率");
return;
}
}
if (status != 1 && TextUtils.isEmpty(etRemark.getText().toString())) {
toast("请填写备注"); toast("请填写备注");
return; return;
} }
check(status, etRemark.getText().toString(), id); check(status, etRemark.getText().toString(), id, price, tax);
addCartDialog.dismiss(); addCartDialog.dismiss();
} }
}); });
...@@ -239,10 +264,12 @@ public class AddStockApplyFragment extends WorkBaseFg { ...@@ -239,10 +264,12 @@ public class AddStockApplyFragment extends WorkBaseFg {
} }
private void check(int status, String remark, int id) { private void check(int status, String remark, int id, String price, String tax) {
Map<String, Object> param = WorkUtils.simpleParam(); Map<String, Object> param = WorkUtils.simpleParam();
param.put("result", status); param.put("result", status);
param.put("comment", remark); param.put("comment", remark);
param.put("tax", tax);
param.put("foPrice", price);
param.put("id", id); param.put("id", id);
Observable<BaseBean> observable; Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) { if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论