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

1.添加坩埚订单不显示分厂和来源

上级 53c5224f
...@@ -165,6 +165,7 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity { ...@@ -165,6 +165,7 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
proList = new ArrayList<>(); proList = new ArrayList<>();
proAdapter = new StoreCarAdapter(R.layout.item_confirm_pro, proList, 1); proAdapter = new StoreCarAdapter(R.layout.item_confirm_pro, proList, 1);
proAdapter.bindToRecyclerView(rvPro); proAdapter.bindToRecyclerView(rvPro);
proAdapter.setOrderType(getIntent().getStringExtra("code"));
proList.addAll(JSON.parseArray(getIntent().getStringExtra("pro"), ProductBean.RecordsBean.class)); proList.addAll(JSON.parseArray(getIntent().getStringExtra("pro"), ProductBean.RecordsBean.class));
proAdapter.notifyDataSetChanged(); proAdapter.notifyDataSetChanged();
changeNumAndPrice(); changeNumAndPrice();
...@@ -239,8 +240,11 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity { ...@@ -239,8 +240,11 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
data.put("productId", recordsBean.getId()); data.put("productId", recordsBean.getId());
data.put("type", "PDS"); data.put("type", "PDS");
// data.put("tranFromStockId", recordsBean.getCarPrice()); if (!TextUtils.equals(getIntent().getStringExtra("code"),
PermissionType.PROCESS_CRUCIBLE.getCode())) {
data.put("innerPrice", MathUtils.converData(recordsBean.getInternalPrice(), 3)); data.put("innerPrice", MathUtils.converData(recordsBean.getInternalPrice(), 3));
}
// data.put("tranFromStockId", recordsBean.getCarPrice());
data.put("customerBranchFactoryId", recordsBean.getFactoryId());//3.分厂客户ID data.put("customerBranchFactoryId", recordsBean.getFactoryId());//3.分厂客户ID
data.put("outerPrice", recordsBean.getCarPrice()); data.put("outerPrice", recordsBean.getCarPrice());
data.put("productCount", recordsBean.getCarNum()); data.put("productCount", recordsBean.getCarNum());
......
...@@ -13,6 +13,7 @@ import com.chad.library.adapter.base.BaseViewHolder; ...@@ -13,6 +13,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.bean.ProductBean; import com.wd.workoffice.bean.ProductBean;
import com.wd.workoffice.bean.event.ModifyCarEvent; import com.wd.workoffice.bean.event.ModifyCarEvent;
import com.wd.workoffice.bean.workEnum.PermissionType;
import com.wd.workoffice.util.MathUtils; import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import com.wd.workoffice.widget.AddAndReduceView; import com.wd.workoffice.widget.AddAndReduceView;
...@@ -30,6 +31,7 @@ import flexible.xd.android_base.utils.ToastUtil; ...@@ -30,6 +31,7 @@ import flexible.xd.android_base.utils.ToastUtil;
public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, BaseViewHolder> { public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, BaseViewHolder> {
int type = 0;//1 确认订单页面 2 单数量无价格 int type = 0;//1 确认订单页面 2 单数量无价格
private int curFocusPosition = -1; private int curFocusPosition = -1;
private String orderType;
public StoreCarAdapter(int layoutResId, List data) { public StoreCarAdapter(int layoutResId, List data) {
super(layoutResId, data); super(layoutResId, data);
...@@ -58,6 +60,11 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B ...@@ -58,6 +60,11 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
if (!TextUtils.isEmpty(item.getUrl())) { if (!TextUtils.isEmpty(item.getUrl())) {
helper.setText(R.id.tv_upload, item.getUrl().substring(1)); helper.setText(R.id.tv_upload, item.getUrl().substring(1));
} }
if (TextUtils.equals(orderType,
PermissionType.PROCESS_CRUCIBLE.getCode())) {
helper.setGone(R.id.rl_pro_from, false);
helper.setGone(R.id.rl_choose_dep, false);
}
} else if (type == 2) { } else if (type == 2) {
helper.setGone(R.id.tv_desc, item.getFlag() == 1); helper.setGone(R.id.tv_desc, item.getFlag() == 1);
helper.addOnClickListener(R.id.tv_delete); helper.addOnClickListener(R.id.tv_delete);
...@@ -139,9 +146,17 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B ...@@ -139,9 +146,17 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
public void notifyData() { public void notifyData() {
notifyDataSetChanged(); notifyDataSetChanged();
if (curFocusPosition != -1) { if (curFocusPosition != -1) {
AddAndReduceView num = (AddAndReduceView) getViewByPosition(curFocusPosition,R.id.ar_num); AddAndReduceView num = (AddAndReduceView) getViewByPosition(curFocusPosition, R.id.ar_num);
num.setNumFouce(); num.setNumFouce();
} }
} }
public String getOrderType() {
return orderType;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
} }
...@@ -160,6 +160,7 @@ ...@@ -160,6 +160,7 @@
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_pro_from"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5mm" android:layout_marginTop="5mm"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论