提交 0911d3f6 authored 作者: lgd's avatar lgd

1.销售和供应下单洗澡能接单方式

上级 e738b560
......@@ -173,6 +173,24 @@ public class ProductBean {
private int flag;// 0 未超出,1 超出预警值
private MarkBean markOrderRel;
private String carInnerPrice;
private String provideMethod;
private String provideMethodName;
public String getProvideMethodName() {
return provideMethodName;
}
public void setProvideMethodName(String provideMethodName) {
this.provideMethodName = provideMethodName;
}
public String getProvideMethod() {
return provideMethod;
}
public void setProvideMethod(String provideMethod) {
this.provideMethod = provideMethod;
}
public String getCarInnerPrice() {
return carInnerPrice;
......
......@@ -124,8 +124,10 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
LinearLayout llSaleMark;
private List<ProductBean.RecordsBean> proList;
private StoreCarAdapter proAdapter;
private QMUIDialog.MenuDialogBuilder receiveDialog;
private QMUIDialog.MenuDialogBuilder setDialog;
private String[] setArray = new String[]{"钢控", "锆碳"};
String[] receiveArray = new String[]{"接单方生产", "接单方采购"};
private Map<String, Object> param;
private Map<String, Object> expandInfo;
private List<JSONObject> orderItems;
......@@ -134,11 +136,22 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
private List<String> billNameList = new ArrayList<>();
private List<OrderBillBean> billList = new ArrayList<>();
private OrderBillBean chooseBill;
private int receivePosition;
@Override
protected void initView() {
ButterKnife.bind(this);
rvPro.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
receiveDialog = DialogUtils.listDialog(this);
receiveDialog.addItems(receiveArray, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
proList.get(receivePosition).setProvideMethod(String.valueOf(which + 1));
proList.get(receivePosition).setProvideMethodName(receiveArray[which]);
proAdapter.notifyItemChanged(receivePosition);
dialog.dismiss();
}
});
setDialog = DialogUtils.listDialog(this);
setDialog.addItems(setArray, new DialogInterface.OnClickListener() {
@Override
......@@ -273,6 +286,7 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
data.put("outerPrice", recordsBean.getCarPrice());
data.put("productCount", recordsBean.getCarNum());
data.put("annex", recordsBean.getUrl());
data.put("provideMethod", recordsBean.getProvideMethod());
orderItems.add(data);
}
return orderItems;
......@@ -294,6 +308,10 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
choosePosition = position;
addImg();
break;
case R.id.rl_receive_order:
receivePosition = position;
receiveDialog.show();
break;
case R.id.rl_choose_dep:
startActivityForResult(StoreClientFactoryActivity.class, 10001,
"customerId", getIntent().getStringExtra("customerId"), "position", position + "");
......
......@@ -55,8 +55,12 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper.addOnClickListener(R.id.rl_choose_dep);
helper.addOnClickListener(R.id.rl_upload);
helper.addOnClickListener(R.id.rl_mark);
helper.addOnClickListener(R.id.rl_receive_order);
helper.setText(R.id.tv_sale_price, item.getCarPrice());
helper.setText(R.id.tv_buy_count, item.getCarNum());
if (!TextUtils.isEmpty(item.getProvideMethodName())) {
helper.setText(R.id.tv_receive_order, item.getProvideMethodName());
}
if (!TextUtils.isEmpty(item.getFactoryName())) {
helper.setText(R.id.tv_choose_dep, item.getFactoryName());
}
......@@ -76,6 +80,14 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper.setGone(R.id.rl_choose_dep, false);
helper.setGone(R.id.rl_sale_price, false);
}
//供应和销售显示接单方式
if (TextUtils.equals(orderType,
PermissionType.PROCESS_SALE.getCode()) || TextUtils.equals(orderType,
PermissionType.PROCESS_SUPPLY.getCode())) {
helper.setGone(R.id.rl_receive_order, true);
} else {
helper.setGone(R.id.rl_receive_order, false);
}
helper.setGone(R.id.rl_mark, TextUtils.equals(orderType, PermissionType.PROCESS_SALE.getCode()));
} else if (type == 2) {
helper.setGone(R.id.ll_inner_price, false);
......
......@@ -232,6 +232,44 @@
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_receive_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_receive_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择接单方式"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_choose_dep"
android:layout_width="match_parent"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论