提交 6c6d1fed authored 作者: lgd's avatar lgd

1.编辑连铸机供应商

2.//TODO erp用户是否选择新部门为空,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes,刷新token,编辑任务担当无法修改.
上级 cdfe2c14
package com.wd.workoffice.ui.activity.mes.user; package com.wd.workoffice.ui.activity.mes.user;
import android.view.LayoutInflater; import android.content.Intent;
import android.os.Bundle;
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,21 +17,15 @@ import com.chad.library.adapter.base.BaseQuickAdapter; ...@@ -16,21 +17,15 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
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.AddFactoryEvent;
import com.wd.workoffice.bean.event.AddMachineAddChildEvent;
import com.wd.workoffice.bean.event.AddMachineEvent;
import com.wd.workoffice.bean.event.AddMachineModifyChildEvent;
import com.wd.workoffice.bean.event.AddUserDataEvent;
import com.wd.workoffice.bean.event.ModifyUserDataEvent; import com.wd.workoffice.bean.event.ModifyUserDataEvent;
import com.wd.workoffice.bean.event.RefreshMachineEvent; import com.wd.workoffice.bean.event.RefreshMachineEvent;
import com.wd.workoffice.bean.mesBean.FactoryDetailBean; import com.wd.workoffice.bean.mesBean.FactoryDetailBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean; import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.bean.mesBean.UserDataDetailBean; import com.wd.workoffice.bean.mesBean.UserDataDetailBean;
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.UserDataAdd3LabelAdapter; import com.wd.workoffice.ui.adapter.UserDataAdd3LabelAdapter;
import com.wd.workoffice.ui.adapter.UserDataAdd3RefAdapter;
import com.wd.workoffice.ui.adapter.UserDataDetailFactory1Adapter; import com.wd.workoffice.ui.adapter.UserDataDetailFactory1Adapter;
import com.wd.workoffice.ui.adapter.UserDataDetailFactory2Adapter; import com.wd.workoffice.ui.adapter.UserDataDetailFactory2Adapter;
import com.wd.workoffice.ui.adapter.UserDataMachineAdapter; import com.wd.workoffice.ui.adapter.UserDataMachineAdapter;
...@@ -43,7 +38,7 @@ import java.util.ArrayList; ...@@ -43,7 +38,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.appcompat.app.AlertDialog; import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
...@@ -141,7 +136,9 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -141,7 +136,9 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
@BindView(R.id.tv_cover3) @BindView(R.id.tv_cover3)
EditText tvCover3; EditText tvCover3;
@BindView(R.id.tv_cover4) @BindView(R.id.tv_cover4)
EditText tvCover4; TextView tvCover4;
@BindView(R.id.rl_cover4)
RelativeLayout rlCover4;
@BindView(R.id.ll_cover) @BindView(R.id.ll_cover)
LinearLayout llCover; LinearLayout llCover;
@BindView(R.id.rl_protection) @BindView(R.id.rl_protection)
...@@ -153,7 +150,9 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -153,7 +150,9 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
@BindView(R.id.tv_protection3) @BindView(R.id.tv_protection3)
EditText tvProtection3; EditText tvProtection3;
@BindView(R.id.tv_protection4) @BindView(R.id.tv_protection4)
EditText tvProtection4; TextView tvProtection4;
@BindView(R.id.rl_protection4)
RelativeLayout rlProtection4;
@BindView(R.id.ll_protection) @BindView(R.id.ll_protection)
LinearLayout llProtection; LinearLayout llProtection;
@BindView(R.id.rv_data1) @BindView(R.id.rv_data1)
...@@ -491,11 +490,19 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -491,11 +490,19 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
} }
@OnClick({R.id.iv_modify_client, R.id.iv_modify_machine, R.id.iv_modify_steel, @OnClick({R.id.rl_cover4, R.id.rl_protection4, R.id.iv_modify_client, R.id.iv_modify_machine, R.id.iv_modify_steel,
R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3, R.id.tv_add5, R.id.tv_add6, R.id.tv_add1, R.id.tv_add3,
R.id.tv_add4}) R.id.tv_add4})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.rl_cover4:
startActivityForResult(MesChooseClientActivity.class,
10001, "from", "1");
break;
case R.id.rl_protection4:
startActivityForResult(MesChooseClientActivity.class,
10002, "from", "1");
break;
case R.id.iv_modify_client: case R.id.iv_modify_client:
if (userDataDetailBean == null) { if (userDataDetailBean == null) {
toast("数据加载中,请稍后"); toast("数据加载中,请稍后");
...@@ -601,13 +608,13 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -601,13 +608,13 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
changeViewClick(tvCover1, !tvCover1.isClickable()); changeViewClick(tvCover1, !tvCover1.isClickable());
changeViewClick(tvCover2, !tvCover2.isClickable()); changeViewClick(tvCover2, !tvCover2.isClickable());
changeViewClick(tvCover3, !tvCover3.isClickable()); changeViewClick(tvCover3, !tvCover3.isClickable());
changeViewClick(tvCover4, !tvCover4.isClickable()); // changeViewClick(tvCover4, !tvCover4.isClickable());
rlCover4.setClickable(!rlCover4.isClickable());
changeViewClick(tvProtection1, !tvProtection1.isClickable()); changeViewClick(tvProtection1, !tvProtection1.isClickable());
changeViewClick(tvProtection2, !tvProtection2.isClickable()); changeViewClick(tvProtection2, !tvProtection2.isClickable());
changeViewClick(tvProtection3, !tvProtection3.isClickable()); changeViewClick(tvProtection3, !tvProtection3.isClickable());
changeViewClick(tvProtection4, !tvProtection4.isClickable()); // changeViewClick(tvProtection4, !tvProtection4.isClickable());
tvProtection4.setClickable(!tvProtection4.isClickable());
break; break;
} }
} }
...@@ -783,96 +790,37 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity { ...@@ -783,96 +790,37 @@ public class MesUserDataDetailModifyActivity extends WorkToolBarActivity {
getData(); getData();
} }
// @Subscribe @Override
// public void modify(AddMachineModifyChildEvent event) { protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
// switch (event.getType()) { super.onActivityResult(requestCode, resultCode, data);
// case 1: switch (requestCode) {
// List<MachineDetailBean.ProductListBean> productList = machineDetailBean.getProductList(); case 10001:
// if (productList == null) { if (resultCode == 10001) {
// machineDetailBean.setProductList(new ArrayList<>()); MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
// } MachineDetailBean.CovAgentBean covAgent = machineDetailBean.getCovAgent();
// productList.remove(event.getPosition()); if (covAgent == null) {
// productList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.ProductListBean.class)); covAgent = new MachineDetailBean.CovAgentBean();
// break; machineDetailBean.setCovAgent(covAgent);
// case 2: }
// break; tvCover4.setText(modifyClient.getCustomerName());
// case 3: covAgent.setSupplierCode(modifyClient.getCustomerCode());
// List<MachineDetailBean.OtherSupListBean> supplyList = machineDetailBean.getOtherSupList(); covAgent.setSupplierName(modifyClient.getCustomerName());
// if (supplyList == null) { }
// machineDetailBean.setOtherSupList(new ArrayList<>()); break;
// } case 10002:
// supplyList.remove(event.getPosition()); if (resultCode == 10001) {
// supplyList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.OtherSupListBean.class)); MesClientBean.ListBean modifyClient = JSON.parseObject(data.getStringExtra("data"), MesClientBean.ListBean.class);
// break; MachineDetailBean.MouldFluBean mouldFlu = machineDetailBean.getMouldFlu();
// case 4: if (mouldFlu == null) {
// List<MachineDetailBean.OtherLadleListBean> otherLadleList = machineDetailBean.getOtherLadleList(); mouldFlu = new MachineDetailBean.MouldFluBean();
// if (otherLadleList == null) { machineDetailBean.setMouldFlu(mouldFlu);
// machineDetailBean.setOtherLadleList(new ArrayList<>()); }
// } tvProtection4.setText(modifyClient.getCustomerName());
// otherLadleList.remove(event.getPosition()); mouldFlu.setSupplierCode(modifyClient.getCustomerCode());
// otherLadleList.add(event.getPosition(), JSON.parseObject(event.getData(), MachineDetailBean.OtherLadleListBean.class)); mouldFlu.setSupplierCode(modifyClient.getCustomerName());
// break; }
// case 5: break;
// 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();
// }
// @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();
// }
} }
...@@ -842,6 +842,7 @@ ...@@ -842,6 +842,7 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_cover4"
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"
...@@ -857,7 +858,7 @@ ...@@ -857,7 +858,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <TextView
android:id="@+id/tv_cover4" 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"
...@@ -982,6 +983,7 @@ ...@@ -982,6 +983,7 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_protection4"
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"
...@@ -997,7 +999,7 @@ ...@@ -997,7 +999,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <TextView
android:id="@+id/tv_protection4" 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"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论