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

1.六小件新增

2.//TODO erp用户是否选择新部门为空,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes,刷新token,编辑任务担当无法修改,
上级 13411fbb
package com.wd.workoffice.bean.event;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class AddMachineAddChildEvent {
int type;
String data;
public AddMachineAddChildEvent(int type, String data) {
this.type = type;
this.data = data;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}
package com.wd.workoffice.bean.event;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class AddMachineModifyChildEvent {
int type;// 1 2 3 4 5 6
String data;
int position;
public AddMachineModifyChildEvent(int type, String data, int position) {
this.type = type;
this.data = data;
this.position = position;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public int getPosition() {
return position;
}
public void setPosition(int position) {
this.position = position;
}
}
...@@ -58,6 +58,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity { ...@@ -58,6 +58,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity {
private List<MachineBean> clientList; private List<MachineBean> clientList;
private UserDataChooseMachineAdapter clientAdapter; private UserDataChooseMachineAdapter clientAdapter;
private UserDataBean.ListBean data; private UserDataBean.ListBean data;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
...@@ -72,7 +73,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity { ...@@ -72,7 +73,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity {
clientAdapter.bindToRecyclerView(rvClient); clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient); clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("steelmakingWorksCode",data.getSteelmakingWorksCode()); param.put("steelmakingWorksCode", data.getSteelmakingWorksCode());
getData(); getData();
} }
...@@ -112,7 +113,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity { ...@@ -112,7 +113,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity {
data.setContinuousCasterName(clientList.get(position).getContinuousCasterName()); data.setContinuousCasterName(clientList.get(position).getContinuousCasterName());
data.setContinuousCasterType(clientList.get(position).getContinuousCasterType()); data.setContinuousCasterType(clientList.get(position).getContinuousCasterType());
data.setContinuousCasterCode(clientList.get(position).getContinuousCasterCode()); data.setContinuousCasterCode(clientList.get(position).getContinuousCasterCode());
startActivity(MesChooseMachineDetailActivity.class,"data",JSON.toJSONString(data)); startActivity(MesChooseMachineDetailActivity.class, "data", JSON.toJSONString(data));
} }
}); });
} }
...@@ -139,7 +140,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity { ...@@ -139,7 +140,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity {
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.add: case R.id.add:
startActivity(MesChooseMachineAddActivity.class); startActivity(MesChooseMachineAddActivity.class, "data", JSON.toJSONString(data));
break; break;
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
......
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean; import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AccountBean; import com.wd.workoffice.bean.AccountBean;
import com.wd.workoffice.bean.event.AddFactoryEvent; import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.AddUserDataEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.UserDataBean;
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.ui.adapter.UserDataAdd3Adapter;
import com.wd.workoffice.ui.adapter.UserDataMachineAdapter; import com.wd.workoffice.ui.adapter.UserDataMachineAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
...@@ -36,27 +50,96 @@ import io.reactivex.disposables.Disposable; ...@@ -36,27 +50,96 @@ import io.reactivex.disposables.Disposable;
* github: https://github.com/FlexibleXd * github: https://github.com/FlexibleXd
**/ **/
public class MesChooseMachineAddActivity extends WorkToolBarActivity { public class MesChooseMachineAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_client) @BindView(R.id.tv_machine_type)
EditText tvClient; EditText tvMachineType;
@BindView(R.id.rl_client) @BindView(R.id.tv_section)
RelativeLayout rlClient; EditText tvSection;
@BindView(R.id.tv_steel_type)
EditText tvSteelType;
@BindView(R.id.tv_speed)
EditText tvSpeed;
@BindView(R.id.rl_middle)
RelativeLayout rlMiddle;
@BindView(R.id.tv_middle1)
EditText tvMiddle1;
@BindView(R.id.tv_middle2)
EditText tvMiddle2;
@BindView(R.id.tv_middle3)
EditText tvMiddle3;
@BindView(R.id.tv_middle4)
EditText tvMiddle4;
@BindView(R.id.tv_middle5)
EditText tvMiddle5;
@BindView(R.id.tv_middle6)
EditText tvMiddle6;
@BindView(R.id.tv_middle7)
EditText tvMiddle7;
@BindView(R.id.tv_middle8)
EditText tvMiddle8;
@BindView(R.id.ll_middle)
LinearLayout llMiddle;
@BindView(R.id.rl_cover)
RelativeLayout rlCover;
@BindView(R.id.tv_cover1)
EditText tvCover1;
@BindView(R.id.tv_cover2)
EditText tvCover2;
@BindView(R.id.tv_cover3)
EditText tvCover3;
@BindView(R.id.tv_cover4)
EditText tvCover4;
@BindView(R.id.ll_cover)
LinearLayout llCover;
@BindView(R.id.rl_protection)
RelativeLayout rlProtection;
@BindView(R.id.tv_protection1)
EditText tvProtection1;
@BindView(R.id.tv_protection2)
EditText tvProtection2;
@BindView(R.id.tv_protection3)
EditText tvProtection3;
@BindView(R.id.tv_protection4)
EditText tvProtection4;
@BindView(R.id.ll_protection)
LinearLayout llProtection;
@BindView(R.id.rv_data1) @BindView(R.id.rv_data1)
RecyclerView rvData1; RecyclerView rvData1;
@BindView(R.id.tv_add1)
TextView tvAdd1;
@BindView(R.id.rv_data2) @BindView(R.id.rv_data2)
RecyclerView rvData2; RecyclerView rvData2;
@BindView(R.id.rv_data3) @BindView(R.id.rv_data3)
RecyclerView rvData3; RecyclerView rvData3;
@BindView(R.id.rv_data4)
RecyclerView rvData4;
@BindView(R.id.rl_add)
RelativeLayout rlAdd;
@BindView(R.id.tv_add1)
TextView tvAdd1;
@BindView(R.id.tv_add3) @BindView(R.id.tv_add3)
TextView tvAdd3; TextView tvAdd3;
@BindView(R.id.rv_data5)
RecyclerView rvData5;
@BindView(R.id.tv_add5)
TextView tvAdd5;
@BindView(R.id.rv_data4)
RecyclerView rvData4;
@BindView(R.id.tv_add4) @BindView(R.id.tv_add4)
TextView tvAdd4; TextView tvAdd4;
private AccountBean dataBean; @BindView(R.id.rv_data6)
RecyclerView rvData6;
@BindView(R.id.tv_add6)
TextView tvAdd6;
@BindView(R.id.rl_add)
RelativeLayout rlAdd;
private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter;
private UserDataMachineAdapter data4Adapter;
private UserDataBean.ListBean data;
private List<String> data1List;
private List<String> data2List;
private List<String> data3List;
private List<String> data4List;
private MachineDetailBean machineDetailBean = new MachineDetailBean();
private UserDataMachineAdapter data5Adapter;
private UserDataMachineAdapter data6Adapter;
private List<String> data5List;
private List<String> data6List;
@Override @Override
protected void initView() { protected void initView() {
...@@ -65,69 +148,80 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -65,69 +148,80 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
} }
@Override @Override
protected void initData() { protected void initData() {
List<Object> data1List = new ArrayList<>(); data = JSON.parseObject(getIntent().getStringExtra("data"), UserDataBean.ListBean.class);
data1List.add(null); data1List = new ArrayList<>();
data1List.add(null); data2List = new ArrayList<>();
data1List.add(null); data3List = new ArrayList<>();
List<Object> data2List = new ArrayList<>(); data4List = new ArrayList<>();
data2List.add(null); data5List = new ArrayList<>();
data2List.add(null); data6List = new ArrayList<>();
data2List.add(null);
List<Object> data3List = new ArrayList<>(); data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data3List.add(null); data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3List.add(null); data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data3List.add(null); data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
List<Object> data4List = new ArrayList<>(); data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data4List.add(null); data6Adapter = new UserDataMachineAdapter(R.layout.item_machine, data6List);
data4List.add(null);
data4List.add(null);
UserDataMachineAdapter data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
UserDataMachineAdapter data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
UserDataMachineAdapter data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
UserDataMachineAdapter data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data1Adapter.bindToRecyclerView(rvData1); data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2); data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3); data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4); data4Adapter.bindToRecyclerView(rvData4);
getData(); data5Adapter.bindToRecyclerView(rvData5);
data6Adapter.bindToRecyclerView(rvData6);
} }
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
protected void initEvent() {
data1Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesThreeModifyActivity.class,
"position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getProductList().get(position)));
} }
});
data2Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onFail(String errorMsg) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
hideLoading(); startActivity(MesSupplierActivity.class,
toast(errorMsg); "position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getSupplyList().get(position)));
} }
});
data3Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onSuccess(BaseBean data) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
hideLoading(); startActivity(MesOtherSupplierModifyActivity.class,
if (data.getCode() != 0) { "position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getOtherSupList().get(position)));
toast(data.getMessage());
return;
}
dataBean = JSON.parseObject(data.getData().toString(), AccountBean.class);
// tvName.setText(dataBean.getName());
// tvDpeName.setText(dataBean.getName());
// tvDpePrice.setText(MathUtils.converData(dataBean.getBalance(), 2));
// tvDpeFreezePrice.setText(String.valueOf(dataBean.getFrozenAmount()));
} }
}); });
} data4Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesPackageModifyActivity.class,
"position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getOtherLadleList().get(position)));
@Override }
protected void initEvent() { });
data5Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesStockModifyActivity.class,
"position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getStockList().get(position)));
}
});
data6Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesMiddleModifyActivity.class,
"position", position + "", "from", "1", "data", JSON.toJSONString(machineDetailBean.getSettleList().get(position)));
}
});
} }
@Override @Override
...@@ -135,24 +229,263 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity { ...@@ -135,24 +229,263 @@ public class MesChooseMachineAddActivity extends WorkToolBarActivity {
return R.layout.activity_mes_user_data_machine_add; return R.layout.activity_mes_user_data_machine_add;
} }
private void changeList() {
@OnClick(R.id.rl_add) data1List.clear();
public void onViewClicked() { data2List.clear();
EventBus.getDefault().post(new AddFactoryEvent()); data3List.clear();
data4List.clear();
data5List.clear();
data6List.clear();
if (machineDetailBean.getProductList() != null) {
for (MachineDetailBean.ProductListBean productListBean : machineDetailBean.getProductList()) {
data1List.add(productListBean.getProductsName());
}
data1Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getSupplyList() != null) {
for (MachineDetailBean.SupplyListBean productListBean : machineDetailBean.getSupplyList()) {
data2List.add(productListBean.getProductsName());
}
data2Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getOtherSupList() != null) {
for (MachineDetailBean.OtherSupListBean productListBean : machineDetailBean.getOtherSupList()) {
data3List.add(productListBean.getSupplierName());
}
data3Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getOtherLadleList() != null) {
for (MachineDetailBean.OtherLadleListBean productListBean : machineDetailBean.getOtherLadleList()) {
data4List.add(productListBean.getRefractoryName());
}
data4Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getStockList() != null) {
for (MachineDetailBean.StockListBean productListBean : machineDetailBean.getStockList()) {
data5List.add(productListBean.getProductsName());
}
data5Adapter.notifyDataSetChanged();
}
if (machineDetailBean.getSettleList() != null) {
for (MachineDetailBean.SettleListBean productListBean : machineDetailBean.getSettleList()) {
data6List.add(productListBean.getSettlementMethod());
}
data6Adapter.notifyDataSetChanged();
}
} }
@OnClick({R.id.tv_add5, R.id.tv_add6, R.id.rl_middle, R.id.rl_cover, R.id.rl_protection, R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.rl_add})
@OnClick({R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.rl_add})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.tv_add1: case R.id.tv_add1:
startActivity(MesThreeAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break; break;
case R.id.tv_add3: case R.id.tv_add3:
startActivity(MesOtherSupplierAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break; break;
case R.id.tv_add4: case R.id.tv_add4:
startActivity(MesPackageAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.tv_add5:
startActivity(MesStockAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.tv_add6:
startActivity(MesMiddleAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break; break;
case R.id.rl_add: case R.id.rl_add:
startActivity(MesMiddleAddActivity.class,
"from", "1", "continuousCasterCode", data.getContinuousCasterCode());
break;
case R.id.rl_middle:
if (llMiddle.getVisibility() == View.VISIBLE) {
llMiddle.setVisibility(View.GONE);
} else {
llMiddle.setVisibility(View.VISIBLE);
}
break;
case R.id.rl_cover:
if (llCover.getVisibility() == View.VISIBLE) {
llCover.setVisibility(View.GONE);
} else {
llCover.setVisibility(View.VISIBLE);
}
break;
case R.id.rl_protection:
if (llProtection.getVisibility() == View.VISIBLE) {
llProtection.setVisibility(View.GONE);
} else {
llProtection.setVisibility(View.VISIBLE);
}
break; break;
} }
} }
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(AddMachineAddChildEvent event) {
switch (event.getType()) {
case 1:
List<MachineDetailBean.ProductListBean> productList = machineDetailBean.getProductList();
if (productList == null) {
machineDetailBean.setProductList(new ArrayList<>());
}
machineDetailBean.getProductList().add(JSON.parseObject(event.getData(), MachineDetailBean.ProductListBean.class));
break;
case 2:
break;
case 3:
List<MachineDetailBean.OtherSupListBean> supplyList = machineDetailBean.getOtherSupList();
if (supplyList == null) {
machineDetailBean.setOtherSupList(new ArrayList<>());
}
machineDetailBean.getOtherSupList().add(JSON.parseObject(event.getData(), MachineDetailBean.OtherSupListBean.class));
break;
case 4:
List<MachineDetailBean.OtherLadleListBean> otherLadleList = machineDetailBean.getOtherLadleList();
if (otherLadleList == null) {
machineDetailBean.setOtherLadleList(new ArrayList<>());
}
machineDetailBean.getOtherLadleList().add(JSON.parseObject(event.getData(), MachineDetailBean.OtherLadleListBean.class));
break;
case 5:
List<MachineDetailBean.StockListBean> stockList = machineDetailBean.getStockList();
if (stockList == null) {
machineDetailBean.setStockList(new ArrayList<>());
}
machineDetailBean.getStockList().add(JSON.parseObject(event.getData(), MachineDetailBean.StockListBean.class));
break;
case 6:
List<MachineDetailBean.SettleListBean> settleList = machineDetailBean.getSettleList();
if (settleList == null) {
machineDetailBean.setSettleList(new ArrayList<>());
}
machineDetailBean.getSettleList().add(JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class));
break;
}
changeList();
}
@Subscribe
public void modify(AddMachineModifyChildEvent event) {
switch (event.getType()) {
case 1:
List<MachineDetailBean.ProductListBean> productList = machineDetailBean.getProductList();
if (productList == null) {
machineDetailBean.setProductList(new ArrayList<>());
}
productList.remove(event.getPosition());
productList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.ProductListBean.class));
break;
case 2:
break;
case 3:
List<MachineDetailBean.OtherSupListBean> supplyList = machineDetailBean.getOtherSupList();
if (supplyList == null) {
machineDetailBean.setOtherSupList(new ArrayList<>());
}
supplyList.remove(event.getPosition());
supplyList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.OtherSupListBean.class));
break;
case 4:
List<MachineDetailBean.OtherLadleListBean> otherLadleList = machineDetailBean.getOtherLadleList();
if (otherLadleList == null) {
machineDetailBean.setOtherLadleList(new ArrayList<>());
}
otherLadleList.remove(event.getPosition());
otherLadleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.OtherLadleListBean.class));
break;
case 5:
List<MachineDetailBean.StockListBean> stockList = machineDetailBean.getStockList();
if (stockList == null) {
machineDetailBean.setStockList(new ArrayList<>());
}
stockList.remove(event.getPosition());
stockList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.StockListBean.class));
break;
case 6:
List<MachineDetailBean.SettleListBean> settleList = machineDetailBean.getSettleList();
if (settleList == null) {
machineDetailBean.setSettleList(new ArrayList<>());
}
settleList.remove(event.getPosition());
settleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.SettleListBean.class));
break;
}
changeList();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
private void submit() {
Map<String, Object> param = WorkUtils.simpleParam();
param.put("mainInfo", data);
JSONObject steelInfo = new JSONObject();
steelInfo.put("steelmakingWorksCode", data.getSteelmakingWorksCode());
// steelInfo.put("steelmakingFurnaceCode", data.getSteelmakingWorksCode());
// steelInfo.put("refiningFurnaceCode", data.getSteelmakingWorksCode());
// steelInfo.put("ladleCode", data.getSteelmakingWorksCode());
steelInfo.put("continuousCasterCode", data.getContinuousCasterCode());
param.put("steelInfo", steelInfo);
showLoading();
RtfUtils.getMesRtf().userDataAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
toast("添加成功");
EventBus.getDefault().post(new AddUserDataEvent());
finish();
}
});
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
} }
...@@ -146,7 +146,6 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -146,7 +146,6 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false)); rvData6.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
} }
@Override @Override
...@@ -439,5 +438,4 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity { ...@@ -439,5 +438,4 @@ public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
} }
}); });
} }
} }
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.EditText; import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
...@@ -36,6 +39,8 @@ public class MesMiddleAddActivity extends WorkToolBarActivity { ...@@ -36,6 +39,8 @@ public class MesMiddleAddActivity extends WorkToolBarActivity {
@BindView(R.id.et_type) @BindView(R.id.et_type)
EditText etType; EditText etType;
private Map<String, Object> param; private Map<String, Object> param;
private String from;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
...@@ -43,6 +48,7 @@ public class MesMiddleAddActivity extends WorkToolBarActivity { ...@@ -43,6 +48,7 @@ public class MesMiddleAddActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode")); param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode"));
} }
...@@ -81,29 +87,34 @@ public class MesMiddleAddActivity extends WorkToolBarActivity { ...@@ -81,29 +87,34 @@ public class MesMiddleAddActivity extends WorkToolBarActivity {
param.put("ladleContractSituation", middleStatus); param.put("ladleContractSituation", middleStatus);
param.put("continuousCastingContractSituation", threeStatus); param.put("continuousCastingContractSituation", threeStatus);
param.put("settlementMethod", type); param.put("settlementMethod", type);
RtfUtils.getMesRtf().middleAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { if (TextUtils.equals(from, "1")) {
@Override EventBus.getDefault().post(new AddMachineAddChildEvent(6, JSON.toJSONString(param)));
public void doOnSubscribe(Disposable d) { finish();
} } else {
RtfUtils.getMesRtf().middleAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void onFail(String errorMsg) { public void doOnSubscribe(Disposable d) {
hideLoading(); }
toast(errorMsg);
} @Override
public void onFail(String errorMsg) {
@Override hideLoading();
public void onSuccess(BaseMesBean data) { toast(errorMsg);
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
} }
finish();
toast("添加成功"); @Override
EventBus.getDefault().post(new RefreshMachineEvent()); public void onSuccess(BaseMesBean data) {
} hideLoading();
}); if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
finish();
toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent());
}
});
}
} }
......
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.EditText; import android.widget.EditText;
...@@ -8,6 +9,7 @@ import com.alibaba.fastjson.JSON; ...@@ -8,6 +9,7 @@ import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
...@@ -38,6 +40,7 @@ public class MesMiddleModifyActivity extends WorkToolBarActivity { ...@@ -38,6 +40,7 @@ public class MesMiddleModifyActivity extends WorkToolBarActivity {
EditText etType; EditText etType;
private Map<String, Object> param; private Map<String, Object> param;
private MachineDetailBean.SettleListBean dataBean; private MachineDetailBean.SettleListBean dataBean;
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -53,6 +56,7 @@ public class MesMiddleModifyActivity extends WorkToolBarActivity { ...@@ -53,6 +56,7 @@ public class MesMiddleModifyActivity extends WorkToolBarActivity {
etMiddleStatus.setText(dataBean.getLadleContractSituation()); etMiddleStatus.setText(dataBean.getLadleContractSituation());
etThreeStatus.setText(dataBean.getContinuousCastingContractSituation()); etThreeStatus.setText(dataBean.getContinuousCastingContractSituation());
etType.setText(dataBean.getSettlementMethod()); etType.setText(dataBean.getSettlementMethod());
from = getIntent().getStringExtra("from");
} }
...@@ -89,6 +93,12 @@ public class MesMiddleModifyActivity extends WorkToolBarActivity { ...@@ -89,6 +93,12 @@ public class MesMiddleModifyActivity extends WorkToolBarActivity {
param.put("ladleContractSituation", middleStatus); param.put("ladleContractSituation", middleStatus);
param.put("continuousCastingContractSituation", threeStatus); param.put("continuousCastingContractSituation", threeStatus);
param.put("settlementMethod", type); param.put("settlementMethod", type);
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineModifyChildEvent(5, JSON.toJSONString(param)
, Integer.valueOf(getIntent().getStringExtra("position"))));
finish();
return;
}
RtfUtils.getMesRtf().middleAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().middleAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
......
...@@ -5,6 +5,7 @@ import android.content.Intent; ...@@ -5,6 +5,7 @@ import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
...@@ -16,6 +17,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions; ...@@ -16,6 +17,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.ImageBean; import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MesProBean; import com.wd.workoffice.bean.mesBean.MesProBean;
...@@ -74,6 +76,7 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity { ...@@ -74,6 +76,7 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity {
EditText etRemark; EditText etRemark;
private Map<String, Object> param; private Map<String, Object> param;
private Map<Integer, Object> annexMap = new HashMap<>(); private Map<Integer, Object> annexMap = new HashMap<>();
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -82,6 +85,7 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity { ...@@ -82,6 +85,7 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode")); param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode"));
} }
...@@ -100,6 +104,10 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity { ...@@ -100,6 +104,10 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity {
param.put("otherSituationDescription", content); param.put("otherSituationDescription", content);
param.put("remark", remark); param.put("remark", remark);
param.put("attachments", getUploadImg()); param.put("attachments", getUploadImg());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineAddChildEvent(3, JSON.toJSONString(param)));
finish();
} else {
RtfUtils.getMesRtf().otherSupplierAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().otherSupplierAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
...@@ -122,7 +130,7 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity { ...@@ -122,7 +130,7 @@ public class MesOtherSupplierAddActivity extends WorkToolBarActivity {
toast("添加成功"); toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent()); EventBus.getDefault().post(new RefreshMachineEvent());
} }
}); });}
} }
@Override @Override
......
...@@ -17,6 +17,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions; ...@@ -17,6 +17,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.ImageBean; import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
...@@ -77,6 +78,7 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity { ...@@ -77,6 +78,7 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity {
private Map<String, Object> param; private Map<String, Object> param;
private Map<Integer, Object> annexMap = new HashMap<>(); private Map<Integer, Object> annexMap = new HashMap<>();
private MachineDetailBean.OtherSupListBean dataBean; private MachineDetailBean.OtherSupListBean dataBean;
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -85,6 +87,7 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity { ...@@ -85,6 +87,7 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.OtherSupListBean.class); dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.OtherSupListBean.class);
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", dataBean.getContinuousCasterCode()); param.put("continuousCasterCode", dataBean.getContinuousCasterCode());
...@@ -95,7 +98,25 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity { ...@@ -95,7 +98,25 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity {
etYears.setText(dataBean.getUseLife()); etYears.setText(dataBean.getUseLife());
etContent.setText(dataBean.getOtherSituationDescription()); etContent.setText(dataBean.getOtherSituationDescription());
etRemark.setText(dataBean.getRemark()); etRemark.setText(dataBean.getRemark());
getData(); if (dataBean.getAttachments() != null) {
for (int i = 0; i < dataBean.getAttachments().size(); i++) {
annexMap.put(i + 1, dataBean.getAttachments().get(i));
switch (i + 1) {
case 1:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg1);
break;
case 2:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg2);
break;
case 3:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg3);
break;
}
}
}
if (!TextUtils.equals(from, "1")) {
getData();
}
} }
private void getData() { private void getData() {
...@@ -152,6 +173,12 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity { ...@@ -152,6 +173,12 @@ public class MesOtherSupplierModifyActivity extends WorkToolBarActivity {
param.put("otherSituationDescription", content); param.put("otherSituationDescription", content);
param.put("remark", remark); param.put("remark", remark);
param.put("attachments", getUploadImg()); param.put("attachments", getUploadImg());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineModifyChildEvent(3, JSON.toJSONString(param)
, Integer.valueOf(getIntent().getStringExtra("position"))));
finish();
return;
}
RtfUtils.getMesRtf().otherSupplierAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().otherSupplierAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
......
...@@ -5,6 +5,7 @@ import android.content.Intent; ...@@ -5,6 +5,7 @@ import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
...@@ -18,6 +19,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions; ...@@ -18,6 +19,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.ImageBean; import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MesProBean; import com.wd.workoffice.bean.mesBean.MesProBean;
...@@ -81,6 +83,7 @@ public class MesPackageAddActivity extends WorkToolBarActivity { ...@@ -81,6 +83,7 @@ public class MesPackageAddActivity extends WorkToolBarActivity {
private Map<String, Object> param; private Map<String, Object> param;
private MesProBean.ListBean choosePro; private MesProBean.ListBean choosePro;
private Map<Integer, Object> annexMap = new HashMap<>(); private Map<Integer, Object> annexMap = new HashMap<>();
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -89,6 +92,7 @@ public class MesPackageAddActivity extends WorkToolBarActivity { ...@@ -89,6 +92,7 @@ public class MesPackageAddActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode")); param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode"));
} }
...@@ -112,30 +116,34 @@ public class MesPackageAddActivity extends WorkToolBarActivity { ...@@ -112,30 +116,34 @@ public class MesPackageAddActivity extends WorkToolBarActivity {
param.put("useProblemFeedback", content); param.put("useProblemFeedback", content);
param.put("remark", remark); param.put("remark", remark);
param.put("attachments", getUploadImg()); param.put("attachments", getUploadImg());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineAddChildEvent(4, JSON.toJSONString(param)));
finish();
} else {
RtfUtils.getMesRtf().packageAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
RtfUtils.getMesRtf().packageAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { @Override
@Override public void onFail(String errorMsg) {
public void doOnSubscribe(Disposable d) { hideLoading();
} toast(errorMsg);
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override @Override
public void onSuccess(BaseMesBean data) { public void onSuccess(BaseMesBean data) {
hideLoading(); hideLoading();
if (!data.isSuccess()) { if (!data.isSuccess()) {
toast(data.getMsg()); toast(data.getMsg());
return; return;
}
finish();
toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent());
} }
finish(); });
toast("添加成功"); }
EventBus.getDefault().post(new RefreshMachineEvent());
}
});
} }
@Override @Override
......
...@@ -19,6 +19,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions; ...@@ -19,6 +19,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.ImageBean; import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
...@@ -84,6 +85,7 @@ public class MesPackageModifyActivity extends WorkToolBarActivity { ...@@ -84,6 +85,7 @@ public class MesPackageModifyActivity extends WorkToolBarActivity {
private MesProBean.ListBean choosePro; private MesProBean.ListBean choosePro;
private Map<Integer, Object> annexMap = new HashMap<>(); private Map<Integer, Object> annexMap = new HashMap<>();
private MachineDetailBean.OtherLadleListBean dataBean; private MachineDetailBean.OtherLadleListBean dataBean;
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -92,6 +94,7 @@ public class MesPackageModifyActivity extends WorkToolBarActivity { ...@@ -92,6 +94,7 @@ public class MesPackageModifyActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.OtherLadleListBean.class); dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.OtherLadleListBean.class);
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", dataBean.getContinuousCasterCode()); param.put("continuousCasterCode", dataBean.getContinuousCasterCode());
...@@ -103,12 +106,30 @@ public class MesPackageModifyActivity extends WorkToolBarActivity { ...@@ -103,12 +106,30 @@ public class MesPackageModifyActivity extends WorkToolBarActivity {
tvPro.setText(dataBean.getRefractoryName()); tvPro.setText(dataBean.getRefractoryName());
etImgCode.setText(dataBean.getFigureNumber()); etImgCode.setText(dataBean.getFigureNumber());
} }
if (dataBean.getAttachments() != null) {
for (int i = 0; i < dataBean.getAttachments().size(); i++) {
annexMap.put(i + 1, dataBean.getAttachments().get(i));
switch (i + 1) {
case 1:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg1);
break;
case 2:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg2);
break;
case 3:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg3);
break;
}
}
}
etMaterials.setText(dataBean.getMaterialsUsed()); etMaterials.setText(dataBean.getMaterialsUsed());
etRequirements.setText(dataBean.getUseRequirement()); etRequirements.setText(dataBean.getUseRequirement());
etYears.setText(dataBean.getUseLife()); etYears.setText(dataBean.getUseLife());
etContent.setText(dataBean.getUseProblemFeedback()); etContent.setText(dataBean.getUseProblemFeedback());
etRemark.setText(dataBean.getRemark()); etRemark.setText(dataBean.getRemark());
getData(); if (!TextUtils.equals(from, "1")) {
getData();
}
} }
private void getData() { private void getData() {
...@@ -130,7 +151,6 @@ public class MesPackageModifyActivity extends WorkToolBarActivity { ...@@ -130,7 +151,6 @@ public class MesPackageModifyActivity extends WorkToolBarActivity {
toast(data.getMsg()); toast(data.getMsg());
return; return;
} }
dataBean = JSON.parseObject(data.getData().toString(), MachineDetailBean.OtherLadleListBean.class); dataBean = JSON.parseObject(data.getData().toString(), MachineDetailBean.OtherLadleListBean.class);
if (dataBean.getAttachments() != null) { if (dataBean.getAttachments() != null) {
for (int i = 0; i < dataBean.getAttachments().size(); i++) { for (int i = 0; i < dataBean.getAttachments().size(); i++) {
...@@ -172,6 +192,12 @@ public class MesPackageModifyActivity extends WorkToolBarActivity { ...@@ -172,6 +192,12 @@ public class MesPackageModifyActivity extends WorkToolBarActivity {
param.put("remark", remark); param.put("remark", remark);
param.put("attachments", getUploadImg()); param.put("attachments", getUploadImg());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineModifyChildEvent(4, JSON.toJSONString(param)
, Integer.valueOf(getIntent().getStringExtra("position"))));
finish();
return;
}
RtfUtils.getMesRtf().packageAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().packageAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
......
...@@ -2,6 +2,7 @@ package com.wd.workoffice.ui.activity.mes.user; ...@@ -2,6 +2,7 @@ package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.EditText; import android.widget.EditText;
...@@ -12,6 +13,7 @@ import com.alibaba.fastjson.JSON; ...@@ -12,6 +13,7 @@ import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MesProBean; import com.wd.workoffice.bean.mesBean.MesProBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
...@@ -48,6 +50,8 @@ public class MesStockAddActivity extends WorkToolBarActivity { ...@@ -48,6 +50,8 @@ public class MesStockAddActivity extends WorkToolBarActivity {
EditText etContent; EditText etContent;
private Map<String, Object> param; private Map<String, Object> param;
private MesProBean.ListBean choosePro; private MesProBean.ListBean choosePro;
private String from;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
...@@ -55,6 +59,7 @@ public class MesStockAddActivity extends WorkToolBarActivity { ...@@ -55,6 +59,7 @@ public class MesStockAddActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode")); param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode"));
} }
...@@ -96,6 +101,10 @@ public class MesStockAddActivity extends WorkToolBarActivity { ...@@ -96,6 +101,10 @@ public class MesStockAddActivity extends WorkToolBarActivity {
param.put("productsName", choosePro.getProductName()); param.put("productsName", choosePro.getProductName());
param.put("figureNumber", choosePro.getDrawingNumber()); param.put("figureNumber", choosePro.getDrawingNumber());
// param.put("stockNumber", choosePro.gets); // param.put("stockNumber", choosePro.gets);
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineAddChildEvent(5, JSON.toJSONString(param)));
finish();
} else {
RtfUtils.getMesRtf().stockAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().stockAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
...@@ -118,7 +127,7 @@ public class MesStockAddActivity extends WorkToolBarActivity { ...@@ -118,7 +127,7 @@ public class MesStockAddActivity extends WorkToolBarActivity {
toast("添加成功"); toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent()); EventBus.getDefault().post(new RefreshMachineEvent());
} }
}); });}
} }
@Override @Override
......
...@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSON; ...@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesProBean; import com.wd.workoffice.bean.mesBean.MesProBean;
...@@ -51,6 +52,7 @@ public class MesStockModifyActivity extends WorkToolBarActivity { ...@@ -51,6 +52,7 @@ public class MesStockModifyActivity extends WorkToolBarActivity {
private Map<String, Object> param; private Map<String, Object> param;
private MesProBean.ListBean choosePro; private MesProBean.ListBean choosePro;
private MachineDetailBean.StockListBean dataBean; private MachineDetailBean.StockListBean dataBean;
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -59,6 +61,7 @@ public class MesStockModifyActivity extends WorkToolBarActivity { ...@@ -59,6 +61,7 @@ public class MesStockModifyActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.StockListBean.class); dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.StockListBean.class);
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", dataBean.getContinuousCasterCode()); param.put("continuousCasterCode", dataBean.getContinuousCasterCode());
...@@ -113,6 +116,13 @@ public class MesStockModifyActivity extends WorkToolBarActivity { ...@@ -113,6 +116,13 @@ public class MesStockModifyActivity extends WorkToolBarActivity {
param.put("productsName", choosePro.getProductName()); param.put("productsName", choosePro.getProductName());
param.put("figureNumber", choosePro.getDrawingNumber()); param.put("figureNumber", choosePro.getDrawingNumber());
// param.put("stockNumber", choosePro.gets); // param.put("stockNumber", choosePro.gets);
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineModifyChildEvent(5, JSON.toJSONString(param)
, Integer.valueOf(getIntent().getStringExtra("position"))));
finish();
return;
}
RtfUtils.getMesRtf().stockAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().stockAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
......
...@@ -5,6 +5,7 @@ import android.content.Intent; ...@@ -5,6 +5,7 @@ import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
...@@ -19,6 +20,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions; ...@@ -19,6 +20,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.ImageBean; import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MesProBean; import com.wd.workoffice.bean.mesBean.MesProBean;
...@@ -98,6 +100,7 @@ public class MesThreeAddActivity extends WorkToolBarActivity { ...@@ -98,6 +100,7 @@ public class MesThreeAddActivity extends WorkToolBarActivity {
private Map<String, Object> param; private Map<String, Object> param;
private MesProBean.ListBean choosePro; private MesProBean.ListBean choosePro;
private Map<Integer, Object> annexMap = new HashMap<>(); private Map<Integer, Object> annexMap = new HashMap<>();
private String from;//1 新增连铸机跳转
@Override @Override
protected void initView() { protected void initView() {
...@@ -106,6 +109,7 @@ public class MesThreeAddActivity extends WorkToolBarActivity { ...@@ -106,6 +109,7 @@ public class MesThreeAddActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode")); param.put("continuousCasterCode", getIntent().getStringExtra("continuousCasterCode"));
} }
...@@ -142,30 +146,35 @@ public class MesThreeAddActivity extends WorkToolBarActivity { ...@@ -142,30 +146,35 @@ public class MesThreeAddActivity extends WorkToolBarActivity {
param.put("useProblemFeedback", content); param.put("useProblemFeedback", content);
param.put("remark", remark); param.put("remark", remark);
param.put("attachments", getUploadImg()); param.put("attachments", getUploadImg());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineAddChildEvent(1, JSON.toJSONString(param)));
finish();
} else {
RtfUtils.getMesRtf().threeAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
RtfUtils.getMesRtf().threeAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { @Override
@Override public void onFail(String errorMsg) {
public void doOnSubscribe(Disposable d) { hideLoading();
} toast(errorMsg);
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override @Override
public void onSuccess(BaseMesBean data) { public void onSuccess(BaseMesBean data) {
hideLoading(); hideLoading();
if (!data.isSuccess()) { if (!data.isSuccess()) {
toast(data.getMsg()); toast(data.getMsg());
return; return;
}
finish();
toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent());
} }
finish(); });
toast("添加成功");
EventBus.getDefault().post(new RefreshMachineEvent()); }
}
});
} }
@Override @Override
......
...@@ -20,6 +20,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions; ...@@ -20,6 +20,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.ImageBean; import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
...@@ -101,6 +102,7 @@ public class MesThreeModifyActivity extends WorkToolBarActivity { ...@@ -101,6 +102,7 @@ public class MesThreeModifyActivity extends WorkToolBarActivity {
private MesProBean.ListBean choosePro; private MesProBean.ListBean choosePro;
private Map<Integer, Object> annexMap = new HashMap<>(); private Map<Integer, Object> annexMap = new HashMap<>();
private MachineDetailBean.ProductListBean dataBean; private MachineDetailBean.ProductListBean dataBean;
private String from;
@Override @Override
protected void initView() { protected void initView() {
...@@ -109,6 +111,7 @@ public class MesThreeModifyActivity extends WorkToolBarActivity { ...@@ -109,6 +111,7 @@ public class MesThreeModifyActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
from = getIntent().getStringExtra("from");
dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.ProductListBean.class); dataBean = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.ProductListBean.class);
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
param.put("continuousCasterCode", dataBean.getContinuousCasterCode()); param.put("continuousCasterCode", dataBean.getContinuousCasterCode());
...@@ -125,6 +128,22 @@ public class MesThreeModifyActivity extends WorkToolBarActivity { ...@@ -125,6 +128,22 @@ public class MesThreeModifyActivity extends WorkToolBarActivity {
etSpec.setText(choosePro.getSpecification()); etSpec.setText(choosePro.getSpecification());
etType.setText(choosePro.getProductType()); etType.setText(choosePro.getProductType());
} }
if (dataBean.getAttachments() != null) {
for (int i = 0; i < dataBean.getAttachments().size(); i++) {
annexMap.put(i + 1, dataBean.getAttachments().get(i));
switch (i + 1) {
case 1:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg1);
break;
case 2:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg2);
break;
case 3:
GlideUtils.getRequest().load(dataBean.getAttachments().get(i).getUrl()).into(ivImg3);
break;
}
}
}
etMaterial.setText(dataBean.getMaterialsUsed()); etMaterial.setText(dataBean.getMaterialsUsed());
etRequirements.setText(dataBean.getUseRequirement()); etRequirements.setText(dataBean.getUseRequirement());
etPosition.setText(dataBean.getSlagLineLocation()); etPosition.setText(dataBean.getSlagLineLocation());
...@@ -134,7 +153,9 @@ public class MesThreeModifyActivity extends WorkToolBarActivity { ...@@ -134,7 +153,9 @@ public class MesThreeModifyActivity extends WorkToolBarActivity {
tvBakingTime.setText(dataBean.getBakingDateTime() + ""); tvBakingTime.setText(dataBean.getBakingDateTime() + "");
etContent.setText(dataBean.getUseProblemFeedback()); etContent.setText(dataBean.getUseProblemFeedback());
etRemark.setText(dataBean.getRemark()); etRemark.setText(dataBean.getRemark());
getData(); if (!TextUtils.equals(from, "1")) {
getData();
}
} }
private void getData() { private void getData() {
...@@ -156,7 +177,6 @@ public class MesThreeModifyActivity extends WorkToolBarActivity { ...@@ -156,7 +177,6 @@ public class MesThreeModifyActivity extends WorkToolBarActivity {
toast(data.getMsg()); toast(data.getMsg());
return; return;
} }
dataBean = JSON.parseObject(data.getData().toString(), MachineDetailBean.ProductListBean.class); dataBean = JSON.parseObject(data.getData().toString(), MachineDetailBean.ProductListBean.class);
if (dataBean.getAttachments() != null) { if (dataBean.getAttachments() != null) {
for (int i = 0; i < dataBean.getAttachments().size(); i++) { for (int i = 0; i < dataBean.getAttachments().size(); i++) {
...@@ -210,6 +230,12 @@ public class MesThreeModifyActivity extends WorkToolBarActivity { ...@@ -210,6 +230,12 @@ public class MesThreeModifyActivity extends WorkToolBarActivity {
param.put("useProblemFeedback", content); param.put("useProblemFeedback", content);
param.put("remark", remark); param.put("remark", remark);
param.put("attachments", getUploadImg()); param.put("attachments", getUploadImg());
if (TextUtils.equals(from, "1")) {
EventBus.getDefault().post(new AddMachineModifyChildEvent(1, JSON.toJSONString(param)
, Integer.valueOf(getIntent().getStringExtra("position"))));
finish();
return;
}
RtfUtils.getMesRtf().threeAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().threeAdd("1", "2", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:id="@+id/rl_client"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10mm" android:layout_marginTop="10mm"
...@@ -26,7 +25,7 @@ ...@@ -26,7 +25,7 @@
<EditText <EditText
android:id="@+id/tv_client" android:id="@+id/tv_machine_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -53,8 +52,8 @@ ...@@ -53,8 +52,8 @@
android:text="断面" android:text="断面"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_section"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -62,6 +61,7 @@ ...@@ -62,6 +61,7 @@
android:background="@null" android:background="@null"
android:hint="请输入" android:hint="请输入"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <View style="@style/dividerX" />
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_steel_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -99,6 +100,34 @@ ...@@ -99,6 +100,34 @@
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="拉速"
android:textSize="14sp" />
<EditText
android:id="@+id/tv_speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:hint="请输入"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:id="@+id/rl_middle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -117,6 +146,7 @@ ...@@ -117,6 +146,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<LinearLayout <LinearLayout
android:id="@+id/ll_middle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
...@@ -140,6 +170,7 @@ ...@@ -140,6 +170,7 @@
<EditText <EditText
android:id="@+id/tv_middle1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -166,6 +197,34 @@ ...@@ -166,6 +197,34 @@
<EditText <EditText
android:id="@+id/tv_middle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:background="@null"
android:hint="请输入"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingVertical="9mm"
android:paddingLeft="25mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="类型"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<EditText
android:id="@+id/tv_middle3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -192,6 +251,7 @@ ...@@ -192,6 +251,7 @@
<EditText <EditText
android:id="@+id/tv_middle4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -218,6 +278,7 @@ ...@@ -218,6 +278,7 @@
<EditText <EditText
android:id="@+id/tv_middle5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -244,6 +305,7 @@ ...@@ -244,6 +305,7 @@
<EditText <EditText
android:id="@+id/tv_middle6"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -270,6 +332,7 @@ ...@@ -270,6 +332,7 @@
<EditText <EditText
android:id="@+id/tv_middle7"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -296,6 +359,7 @@ ...@@ -296,6 +359,7 @@
<EditText <EditText
android:id="@+id/tv_middle8"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -309,6 +373,7 @@ ...@@ -309,6 +373,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:id="@+id/rl_cover"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
...@@ -333,6 +398,7 @@ ...@@ -333,6 +398,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<LinearLayout <LinearLayout
android:id="@+id/ll_cover"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
...@@ -354,8 +420,8 @@ ...@@ -354,8 +420,8 @@
android:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_cover1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -382,6 +448,7 @@ ...@@ -382,6 +448,7 @@
<EditText <EditText
android:id="@+id/tv_cover2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -406,8 +473,8 @@ ...@@ -406,8 +473,8 @@
android:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_cover3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -432,8 +499,8 @@ ...@@ -432,8 +499,8 @@
android:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_cover4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -447,6 +514,7 @@ ...@@ -447,6 +514,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:id="@+id/rl_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
...@@ -471,6 +539,7 @@ ...@@ -471,6 +539,7 @@
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<LinearLayout <LinearLayout
android:id="@+id/ll_protection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/white" android:background="@android:color/white"
...@@ -492,8 +561,8 @@ ...@@ -492,8 +561,8 @@
android:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_protection1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -520,6 +589,7 @@ ...@@ -520,6 +589,7 @@
<EditText <EditText
android:id="@+id/tv_protection2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -543,9 +613,8 @@ ...@@ -543,9 +613,8 @@
android:text="化学成分" android:text="化学成分"
android:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_protection3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -553,6 +622,7 @@ ...@@ -553,6 +622,7 @@
android:background="@null" android:background="@null"
android:hint="请输入" android:hint="请输入"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
...@@ -570,8 +640,8 @@ ...@@ -570,8 +640,8 @@
android:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_protection4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -579,6 +649,7 @@ ...@@ -579,6 +649,7 @@
android:background="@null" android:background="@null"
android:hint="请输入" android:hint="请输入"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
...@@ -600,6 +671,7 @@ ...@@ -600,6 +671,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical"> android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
...@@ -609,8 +681,9 @@ ...@@ -609,8 +681,9 @@
<TextView <TextView
android:id="@+id/tv_add1" android:id="@+id/tv_add1"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +" android:text="添加 +"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
...@@ -621,6 +694,7 @@ ...@@ -621,6 +694,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10mm" android:layout_marginTop="10mm"
android:background="@android:color/white" android:background="@android:color/white"
android:gravity="right"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -635,7 +709,8 @@ ...@@ -635,7 +709,8 @@
android:id="@+id/rv_data2" android:id="@+id/rv_data2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" /> android:layout_alignParentRight="true"
android:layout_gravity="right" />
</RelativeLayout> </RelativeLayout>
...@@ -643,6 +718,7 @@ ...@@ -643,6 +718,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -658,17 +734,21 @@ ...@@ -658,17 +734,21 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical"> android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data3" android:id="@+id/rv_data3"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:layout_gravity="right" />
<TextView <TextView
android:id="@+id/tv_add3" android:id="@+id/tv_add3"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +" android:text="添加 +"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
...@@ -677,6 +757,44 @@ ...@@ -677,6 +757,44 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="库存记录"
android:textSize="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data5"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm">
...@@ -692,6 +810,7 @@ ...@@ -692,6 +810,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical"> android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
...@@ -700,9 +819,47 @@ ...@@ -700,9 +819,47 @@
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
android:id="@+id/tv_data4" android:id="@+id/tv_add4"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@android:color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="中间包承包与结算情况"
android:textSize="15sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data6"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="添加 +" android:text="添加 +"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
...@@ -716,7 +873,8 @@ ...@@ -716,7 +873,8 @@
android:layout_marginBottom="30mm" android:layout_marginBottom="30mm"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm"
android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -859,7 +859,8 @@ ...@@ -859,7 +859,8 @@
android:layout_marginBottom="30mm" android:layout_marginBottom="30mm"
android:background="@android:color/white" android:background="@android:color/white"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
android:paddingVertical="9mm"> android:paddingVertical="9mm"
android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论