提交 1b9986e6 authored 作者: lgd's avatar lgd

1.供应入库添加税率和价格

上级 7ae21c95
......@@ -148,6 +148,23 @@ public class AddStockBean {
private Object qiAuditTime;
private Object qiAuditByName;
private String image;
private String tax;private String foPrice;
public String getTax() {
return tax;
}
public void setTax(String tax) {
this.tax = tax;
}
public String getFoPrice() {
return foPrice;
}
public void setFoPrice(String foPrice) {
this.foPrice = foPrice;
}
public String getImage() {
return image;
......
......@@ -78,6 +78,14 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
LinearLayout llPhoto;
@BindView(R.id.ll_box_num)
LinearLayout llBoxNum;
@BindView(R.id.et_tax)
EditText etTax;
@BindView(R.id.ll_tax)
LinearLayout llTax;
@BindView(R.id.et_price)
EditText etPrice;
@BindView(R.id.ll_price)
LinearLayout llPrice;
private Map<String, Object> param;
private String orderType;
private OrderDetail dataBean;
......@@ -88,6 +96,8 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
protected void initView() {
ButterKnife.bind(this);
WorkUtils.addDecimalsListener(etNum);
WorkUtils.addDecimalsListener(etPrice);
WorkUtils.addDecimalsListener(etTax);
WorkUtils.addNumListener(etRemark, tvRemarkNum);
rvPhoto.setLayoutManager(new LinearLayoutManager(this, RecyclerView.HORIZONTAL, false));
......@@ -99,12 +109,13 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
//外采购订单入库,添加照片(必传)。供应订单入库取消箱号
if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
llBoxNum.setVisibility(View.GONE);
llPrice.setVisibility(View.VISIBLE);
llTax.setVisibility(View.VISIBLE);
}
if ( TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
llBoxNum.setVisibility(View.GONE);
llPhoto.setVisibility(View.VISIBLE);
}else {
} else {
llPhoto.setVisibility(View.GONE);
}
// tvNum.setText(String.format("入库数量(%s)", getIntent().getStringExtra("num")));
......@@ -240,7 +251,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
List<OrderDetail.OrderItemsBean> orderItems = dataBean.getOrderItems();
for (OrderDetail.OrderItemsBean orderItem : orderItems) {
if (TextUtils.equals(orderItem.getId(), getIntent().getStringExtra("orderItemId"))) {
if (new BigDecimal(Double.valueOf(num)).compareTo(new BigDecimal(orderItem.getCanInStoreProductSum())) == 1) {
if (BigDecimal.valueOf(Double.parseDouble(num)).compareTo(new BigDecimal(orderItem.getCanInStoreProductSum())) == 1) {
toast(String.format("可申请入库数量最大为%s", MathUtils.converData(orderItem.getCanInStoreProductSum(), 3)));
return;
}
......@@ -252,6 +263,8 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
param.put("boxCode", boxCode);
param.put("orderItemId", getIntent().getStringExtra("orderItemId"));
param.put("applyRemark", remark);
param.put("tax", etTax.getText().toString());
param.put("foPrice", etPrice.getText().toString());
Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().addStockApplyAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
......@@ -265,7 +278,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
for (int i = 0; i < imgList.size() - 1; i++) {
image.append(imgList.get(i).getPath()).append(",");
}
param.put("image", image.substring(0, image.length()-1));
param.put("image", image.substring(0, image.length() - 1));
observable = RtfUtils.getRtf().addPoStockApplyAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
observable = RtfUtils.getRtf().addFoStockApplyAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
......
......@@ -25,6 +25,7 @@ import com.wd.workoffice.ui.activity.mes.ImageActivity;
import com.wd.workoffice.ui.adapter.AddStockCrucibleChooseAdapter;
import com.wd.workoffice.ui.adapter.ImgAdapter;
import com.wd.workoffice.util.HwObsUtil;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
......@@ -85,6 +86,16 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
RelativeLayout rlBoxNum;
@BindView(R.id.rv_img)
RecyclerView rvImg;
@BindView(R.id.tv_tax)
TextView tvTax;
@BindView(R.id.rl_tax)
RelativeLayout rlTax;
@BindView(R.id.tv_price)
TextView tvPrice;
@BindView(R.id.rl_price)
RelativeLayout rlPrice;
@BindView(R.id.ll_supplier)
LinearLayout llSupplier;
private AddStockBean.RecordsBean info;
private String orderType;
private List<AddStockChooseBean.RecordsBean> productList;
......@@ -126,12 +137,15 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
}
if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
rlBoxNum.setVisibility(View.GONE);
llSupplier.setVisibility(View.VISIBLE);
tvTax.setText(MathUtils.converData(info.getTax(),3));
tvPrice.setText(MathUtils.converData(info.getFoPrice(),3));
}
tvNum.setText(String.valueOf(info.getProductAmount()));
tvBoxNum.setText(String.valueOf(info.getBoxCode()));
tvPerson.setText(String.valueOf(info.getCreatedByName()));
tvNum.setText(MathUtils.converData(info.getProductAmount(),3));
tvBoxNum.setText(info.getBoxCode());
tvPerson.setText(info.getCreatedByName());
tvTime.setText(info.getCreatedTime());
tvRemark.setText(String.valueOf(info.getApplyRemark()));
tvRemark.setText(info.getApplyRemark());
if (TextUtils.equals(info.getStatus(), "0")) {
if (TextUtils.equals(getIntent().getStringExtra("hasPermission"), "1")) {
llBottom.setVisibility(View.VISIBLE);
......
......@@ -313,6 +313,9 @@ public class OrderMarkActivity extends WorkToolBarActivity {
}
private void addMarkData() {
if (null == markBean) {
markBean = new MarkBean();
}
markBean.setReceiveCompany(etCompany.getText().toString());
markBean.setCustomerBranchFactory(etFactory.getText().toString());
markBean.setContinuousCastingMachine(etMachine.getText().toString());
......
......@@ -76,6 +76,7 @@ public class WorkFinancialReceiveTicketSubmitActivity extends WorkToolBarActivit
tvClient.setText(getIntent().getStringExtra("customerName"));
dataList = JSON.parseArray(getIntent().getStringExtra("info"), TicketAddBean.RecordsBean.class);
dataAdapter = new WorkAddTicketOrderAdapter(R.layout.item_ticket_add_detail, dataList, 1);
dataAdapter.setFrom(1);
dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>();
param.put("supplierId", getIntent().getStringExtra("customerId"));
......
......@@ -243,7 +243,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
hasPermission = WorkUtils.hasPermission(PagePermissionType.PO_INVOICE_AUDIT.getPermission());
} else if (TextUtils.equals(orderType, "坩埚订单")) {
hasPermission = WorkUtils.hasPermission(PagePermissionType.CO_INVOICE_AUDIT.getPermission());
} else if (TextUtils.equals(orderType, "开票审核")) {
} else if (TextUtils.equals(orderType, "组装订单")) {
hasPermission = WorkUtils.hasPermission(PagePermissionType.AO_INVOICE_AUDIT.getPermission());
}
if (!hasPermission) {
......
......@@ -35,7 +35,7 @@ public class AddStockSendApplyAdapter extends BaseQuickAdapter<AddStockBean.Reco
protected void convert(BaseViewHolder helper, AddStockBean.RecordsBean item) {
helper.setText(R.id.tv_name, item.getSerialNumber());
helper.setText(R.id.tv_num, MathUtils.converData(item.getProductAmount(), 3));
helper.setText(R.id.tv_box_num, String.valueOf(item.getBoxCode()));
helper.setText(R.id.tv_box_num, item.getBoxCode());
helper.setText(R.id.tv_time, item.getCreatedTime());
helper.setText(R.id.tv_status, WorkUtils.getReturnStatus(Integer.valueOf(item.getStatus())));
if (status == 0) {
......
......@@ -119,6 +119,72 @@
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_tax"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="税率"
android:textSize="14sp" />
<EditText
android:id="@+id/et_tax"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:hint="输入税率"
android:padding="3mm"
android:inputType="numberDecimal"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_price"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:visibility="gone"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="产品单价"
android:textSize="14sp" />
<EditText
android:id="@+id/et_price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:hint="输入产品单价"
android:padding="3mm"
android:inputType="numberDecimal"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -52,9 +52,9 @@
<LinearLayout
android:id="@+id/ll_stock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
android:layout_height="wrap_content">
android:visibility="gone">
<LinearLayout
android:layout_width="wrap_content"
......@@ -155,6 +155,68 @@
<View style="@style/dividerX" />
<LinearLayout
android:id="@+id/ll_supplier"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_tax"
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_tax"
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:id="@+id/rl_price"
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_price"
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" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -294,7 +356,6 @@
<View style="@style/dividerX" />
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
......@@ -348,12 +409,13 @@
</LinearLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_img"
android:paddingHorizontal="10mm"
android:layout_marginTop="20mm"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginTop="20mm"
android:paddingHorizontal="10mm" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论