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

1.新增多种订单类型入库

2.//TODO erp用户激活测试,忘记/重置密码测试,审核规则,领用申请列表/退件列表/参数,坩埚下单页面,组装下单,产品下单还差附件测试,mes,刷新token
上级 6f7c13d2
...@@ -22,7 +22,7 @@ import butterknife.BindView; ...@@ -22,7 +22,7 @@ import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
/** /**
* 发货申请列表 * 入库列表
* author : flexible * author : flexible
* email : lgd19940421@163.com * email : lgd19940421@163.com
* github: https://github.com/FlexibleXd * github: https://github.com/FlexibleXd
...@@ -54,6 +54,7 @@ public class AddStockApplyActivity extends WorkToolBarActivity { ...@@ -54,6 +54,7 @@ public class AddStockApplyActivity extends WorkToolBarActivity {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("state", order[i]); bundle.putString("state", order[i]);
bundle.putString("orderId", getIntent().getStringExtra("orderId")); bundle.putString("orderId", getIntent().getStringExtra("orderId"));
bundle.putString("orderType", getIntent().getStringExtra("orderType"));
bundle.putString("productId", getIntent().getStringExtra("productId")); bundle.putString("productId", getIntent().getStringExtra("productId"));
bundle.putString("num", getIntent().getStringExtra("num")); bundle.putString("num", getIntent().getStringExtra("num"));
saleFragment.setArguments(bundle); saleFragment.setArguments(bundle);
...@@ -90,6 +91,7 @@ public class AddStockApplyActivity extends WorkToolBarActivity { ...@@ -90,6 +91,7 @@ public class AddStockApplyActivity extends WorkToolBarActivity {
case R.id.add: case R.id.add:
startActivity(AddStockApplyAddActivity.class, startActivity(AddStockApplyAddActivity.class,
"num", getIntent().getStringExtra("num"), "num", getIntent().getStringExtra("num"),
"orderType",getIntent().getStringExtra("orderType"),
"productId", getIntent().getStringExtra("productId"), "productId", getIntent().getStringExtra("productId"),
"orderItemId", getIntent().getStringExtra("orderItemId"), "orderItemId", getIntent().getStringExtra("orderItemId"),
"simpleCode", getIntent().getStringExtra("simpleCode"), "simpleCode", getIntent().getStringExtra("simpleCode"),
......
package com.wd.workoffice.ui.activity.bat.order; package com.wd.workoffice.ui.activity.bat.order;
import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
...@@ -11,7 +10,7 @@ import com.wd.workoffice.R; ...@@ -11,7 +10,7 @@ import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean; import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.CheckAddStockEvent; import com.wd.workoffice.bean.event.CheckAddStockEvent;
import com.wd.workoffice.bean.event.CheckUseEvent; import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -25,6 +24,7 @@ import butterknife.BindView; ...@@ -25,6 +24,7 @@ import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer; import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
/** /**
...@@ -49,6 +49,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity { ...@@ -49,6 +49,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
@BindView(R.id.et_box_num) @BindView(R.id.et_box_num)
EditText etBoxNum; EditText etBoxNum;
private Map<String, Object> param; private Map<String, Object> param;
private String orderType;
@Override @Override
protected void initView() { protected void initView() {
...@@ -57,6 +58,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity { ...@@ -57,6 +58,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
orderType = getIntent().getStringExtra("orderType");
tvNum.setText(String.format("最大领用数量(%s)", getIntent().getStringExtra("num"))); tvNum.setText(String.format("最大领用数量(%s)", getIntent().getStringExtra("num")));
param = new HashMap<>(); param = new HashMap<>();
param.put("productId", getIntent().getStringExtra("productId")); param.put("productId", getIntent().getStringExtra("productId"));
...@@ -109,7 +111,17 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity { ...@@ -109,7 +111,17 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
param.put("boxCode", boxCode); param.put("boxCode", boxCode);
param.put("orderItemId", getIntent().getStringExtra("orderItemId")); param.put("orderItemId", getIntent().getStringExtra("orderItemId"));
param.put("applyRemark", remark); param.put("applyRemark", remark);
RtfUtils.getRtf().addStockApplyAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().addStockApplyAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
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));
} else {
observable = RtfUtils.getRtf().addStockApplyAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
}
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
} }
......
...@@ -17,6 +17,7 @@ import com.wd.workoffice.app.WorkToolBarActivity; ...@@ -17,6 +17,7 @@ import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.UseApplyBean; import com.wd.workoffice.bean.UseApplyBean;
import com.wd.workoffice.bean.event.CheckAddStockEvent; import com.wd.workoffice.bean.event.CheckAddStockEvent;
import com.wd.workoffice.bean.event.CheckUseEvent; import com.wd.workoffice.bean.event.CheckUseEvent;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -30,6 +31,7 @@ import butterknife.BindView; ...@@ -30,6 +31,7 @@ import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer; import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
/** /**
...@@ -66,6 +68,7 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -66,6 +68,7 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_box_num) @BindView(R.id.tv_box_num)
TextView tvBoxNum; TextView tvBoxNum;
private UseApplyBean.RecordsBean info; private UseApplyBean.RecordsBean info;
private String orderType;
@Override @Override
protected void initView() { protected void initView() {
...@@ -75,6 +78,7 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -75,6 +78,7 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
info = JSON.parseObject(getIntent().getStringExtra("info"), UseApplyBean.RecordsBean.class); info = JSON.parseObject(getIntent().getStringExtra("info"), UseApplyBean.RecordsBean.class);
orderType = getIntent().getStringExtra("orderType");
tvNum.setText(String.valueOf(info.getProductAmount())); tvNum.setText(String.valueOf(info.getProductAmount()));
tvBoxNum.setText(String.valueOf(info.getBoxCode())); tvBoxNum.setText(String.valueOf(info.getBoxCode()));
tvPerson.setText(String.valueOf(info.getCreatedByName())); tvPerson.setText(String.valueOf(info.getCreatedByName()));
...@@ -169,7 +173,17 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -169,7 +173,17 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
param.put("result", status); param.put("result", status);
param.put("comment", remark); param.put("comment", remark);
param.put("id", id); param.put("id", id);
RtfUtils.getRtf().addStockApplyCheck(id + "", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().addStockApplyCheck(id + "", WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().addPoStockApplyCheck(id + "", WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
observable = RtfUtils.getRtf().addFoStockApplyCheck(id + "", WorkUtils.convertMapToBody(param));
} else {
observable = RtfUtils.getRtf().addStockApplyCheck(id + "", WorkUtils.convertMapToBody(param));
}
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论