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

1.修改开收票流程问题

上级 1a32836f
...@@ -771,7 +771,7 @@ ...@@ -771,7 +771,7 @@
<activity <activity
android:name=".ui.activity.bat.work.WorkChooseProductActivity" android:name=".ui.activity.bat.work.WorkChooseProductActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:label="选择开票来源" android:label="选择产品"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
......
...@@ -187,6 +187,15 @@ public class TicketAddBean { ...@@ -187,6 +187,15 @@ public class TicketAddBean {
private Object orderTypeName; private Object orderTypeName;
private String carPrice; private String carPrice;
private String carNum; private String carNum;
private Double canReceiptInvoiceSum;
public Double getCanReceiptInvoiceSum() {
return canReceiptInvoiceSum;
}
public void setCanReceiptInvoiceSum(Double canReceiptInvoiceSum) {
this.canReceiptInvoiceSum = canReceiptInvoiceSum;
}
public String getCarPrice() { public String getCarPrice() {
return carPrice; return carPrice;
......
...@@ -85,14 +85,16 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -85,14 +85,16 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
tvDesc.setText("开票价格"); tvDesc.setText("开票价格");
AddAndReduceView num = view.findViewById(R.id.ar_num); AddAndReduceView num = view.findViewById(R.id.ar_num);
EditText etPrice = view.findViewById(R.id.et_price); EditText etPrice = view.findViewById(R.id.et_price);
etPrice.setText(MathUtils.converData(data.getInnerPrice(),3)); etPrice.setText(MathUtils.converData(data.getInnerPrice(), 3));
for (TicketAddBean.RecordsBean recordsBean : carList) { for (TicketAddBean.RecordsBean recordsBean : carList) {
if (data.getId() == recordsBean.getId()) { if (data.getId() == recordsBean.getId()) {
etPrice.setText(recordsBean.getCarPrice()); etPrice.setText(recordsBean.getCarPrice());
num.setNumber(recordsBean.getCarNum()); num.setNumber(recordsBean.getCarNum());
} }
} }
num.setMaxNum(data.getCanInvoiceSum()); num.setMaxNum( TextUtils.isEmpty(getIntent().getStringExtra("supplier"))
? data.getCanInvoiceSum() : data.getCanReceiptInvoiceSum());
builder.setView(view); builder.setView(view);
AlertDialog addCartDialog = builder.create(); AlertDialog addCartDialog = builder.create();
tvOk.setOnClickListener(new View.OnClickListener() { tvOk.setOnClickListener(new View.OnClickListener() {
...@@ -153,11 +155,12 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -153,11 +155,12 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
if (TextUtils.isEmpty(getIntent().getStringExtra("supplier"))) { if (TextUtils.isEmpty(getIntent().getStringExtra("supplier"))) {
param.put("customerId", getIntent().getStringExtra("customerId")); param.put("customerId", getIntent().getStringExtra("customerId"));
param.put("launchDeptId", getIntent().getStringExtra("depId")); param.put("launchDeptId", getIntent().getStringExtra("depId"));
clientAdapter.setFrom(0);
} else { } else {
param.put("supplierId", getIntent().getStringExtra("customerId")); param.put("supplierId", getIntent().getStringExtra("customerId"));
param.put("receiveDeptId", getIntent().getStringExtra("depId")); param.put("receiveDeptId", getIntent().getStringExtra("depId"));
clientAdapter.setFrom(1);
} }
getData(); getData();
} }
......
...@@ -20,6 +20,7 @@ import androidx.annotation.Nullable; ...@@ -20,6 +20,7 @@ import androidx.annotation.Nullable;
public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.RecordsBean, BaseViewHolder> { public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.RecordsBean, BaseViewHolder> {
int type;//0,add 1,submit int type;//0,add 1,submit
int from;//0 开票 1 收票
public WorkAddTicketOrderAdapter(int layoutResId, List data) { public WorkAddTicketOrderAdapter(int layoutResId, List data) {
super(layoutResId, data); super(layoutResId, data);
...@@ -36,7 +37,7 @@ public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.Re ...@@ -36,7 +37,7 @@ public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.Re
helper.setText(R.id.tv_order, item.getOrderId()); helper.setText(R.id.tv_order, item.getOrderId());
helper.setText(R.id.tv_spec, item.getProductSpec()); helper.setText(R.id.tv_spec, item.getProductSpec());
helper.setText(R.id.tv_unit, item.getProductUnit()); helper.setText(R.id.tv_unit, item.getProductUnit());
helper.setText(R.id.tv_apply_num, MathUtils.converData(item.getCanInvoiceSum(), 3)); helper.setText(R.id.tv_apply_num, from == 0 ? MathUtils.converData(item.getCanInvoiceSum(), 3) : MathUtils.converData(item.getCanReceiptInvoiceSum(), 3));
helper.setText(R.id.tv_price, item.getCarPrice()); helper.setText(R.id.tv_price, item.getCarPrice());
helper.setText(R.id.tv_num, item.getCarNum()); helper.setText(R.id.tv_num, item.getCarNum());
helper.setVisible(R.id.ll_desc, !TextUtils.isEmpty(item.getCarPrice())); helper.setVisible(R.id.ll_desc, !TextUtils.isEmpty(item.getCarPrice()));
...@@ -44,5 +45,13 @@ public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.Re ...@@ -44,5 +45,13 @@ public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.Re
helper.setVisible(R.id.iv_cart, false); helper.setVisible(R.id.iv_cart, false);
} }
} }
public int getFrom() {
return from;
}
public void setFrom(int from) {
this.from = from;
}
} }
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="2mm" android:layout_marginLeft="2mm"
android:background="@null" android:background="@null"
android:hint="搜索图号/品名/规则/品号" android:hint="搜索订单号/产品/品名/品号"
android:maxLines="1" android:maxLines="1"
android:textColor="#91ABBA" android:textColor="#91ABBA"
android:textColorHint="#91ABBA" android:textColorHint="#91ABBA"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论