提交 75b38238 authored 作者: lgd's avatar lgd

1.连铸件供应商,三大件

2.//TODO erp用户是否选择新部门为空,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes,刷新token
上级 14649d6f
......@@ -1306,7 +1306,22 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesChooseMachineAddActivity"
android:configChanges="keyboardHidden|orientation"
android:label="添加连铸机"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesChooseMachineDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="连铸机详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesUserDataAdd3Activity"
android:configChanges="keyboardHidden|orientation"
......@@ -1331,7 +1346,46 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesThreeAddActivity"
android:configChanges="keyboardHidden|orientation"
android:label="添加连铸三大件"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesThreeAddActivity"
android:configChanges="keyboardHidden|orientation"
android:label="添加连铸三大件"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesThreeModifyActivity"
android:configChanges="keyboardHidden|orientation"
android:label="连铸三大件详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesThreeDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="连铸三大件详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.user.MesSupplierActivity"
android:configChanges="keyboardHidden|orientation"
android:label="三大件供货记录"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.order.MesOrderActivity"
android:configChanges="keyboardHidden|orientation"
......
......@@ -2,6 +2,8 @@ package com.wd.workoffice.ui.activity.mes.user;
import android.content.Intent;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
......@@ -12,11 +14,15 @@ import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ClientBean;
import com.wd.workoffice.bean.event.AddFactoryEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.UserDataClientAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -138,11 +144,7 @@ public class MesChooseMachineActivity extends WorkToolBarActivity {
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
// intent.putExtra("clientName", clientList.get(position).getName());
// intent.putExtra("id", clientList.get(position).getId());
setResult(10001, intent);
finish();
startActivity(MesChooseMachineDetailActivity.class);
}
});
}
......@@ -160,4 +162,36 @@ public class MesChooseMachineActivity extends WorkToolBarActivity {
page = 1;
// getData();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_add, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.add:
startActivity(MesChooseMachineAddActivity.class);
break;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(AddFactoryEvent event) {
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AccountBean;
import com.wd.workoffice.bean.event.AddFactoryEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.UserDataAdd3Adapter;
import com.wd.workoffice.ui.adapter.UserDataMachineAdapter;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 用户数据采集,添加
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesChooseMachineAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_client)
EditText tvClient;
@BindView(R.id.rl_client)
RelativeLayout rlClient;
@BindView(R.id.rv_data1)
RecyclerView rvData1;
@BindView(R.id.rv_data2)
RecyclerView rvData2;
@BindView(R.id.rv_data3)
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)
TextView tvAdd3;
@BindView(R.id.tv_add4)
TextView tvAdd4;
@BindView(R.id.rv_data5)
RecyclerView rvData5;
@BindView(R.id.tv_add5)
TextView tvAdd5;
private AccountBean dataBean;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
List<Object> data1List = new ArrayList<>();
data1List.add(null);
data1List.add(null);
data1List.add(null);
List<Object> data2List = new ArrayList<>();
data2List.add(null);
data2List.add(null);
data2List.add(null);
List<Object> data3List = new ArrayList<>();
data3List.add(null);
data3List.add(null);
data3List.add(null);
List<Object> data4List = new ArrayList<>();
data4List.add(null);
data4List.add(null);
data4List.add(null);
List<Object> data5List = new ArrayList<>();
data5List.add(null);
data5List.add(null);
data5List.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);
UserDataMachineAdapter data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5);
getData();
}
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
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()));
}
});
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_machine_add;
}
@OnClick(R.id.rl_add)
public void onViewClicked() {
EventBus.getDefault().post(new AddFactoryEvent());
}
@OnClick({R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.tv_add5, R.id.rl_add})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_add1:
break;
case R.id.tv_add3:
break;
case R.id.tv_add4:
break;
case R.id.tv_add5:
break;
case R.id.rl_add:
break;
}
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AccountBean;
import com.wd.workoffice.bean.event.AddFactoryEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.UserDataAdd3Adapter;
import com.wd.workoffice.ui.adapter.UserDataMachineAdapter;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 用户数据采集,连铸机详情
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesChooseMachineDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_client)
TextView tvClient;
@BindView(R.id.rl_client)
RelativeLayout rlClient;
@BindView(R.id.rv_data1)
RecyclerView rvData1;
@BindView(R.id.tv_add1)
TextView tvAdd1;
@BindView(R.id.rv_data2)
RecyclerView rvData2;
@BindView(R.id.rv_data3)
RecyclerView rvData3;
@BindView(R.id.tv_add3)
TextView tvAdd3;
@BindView(R.id.rv_data4)
RecyclerView rvData4;
@BindView(R.id.tv_add4)
TextView tvAdd4;
@BindView(R.id.rv_data5)
RecyclerView rvData5;
@BindView(R.id.tv_add5)
TextView tvAdd5;
@BindView(R.id.rl_add)
RelativeLayout rlAdd;
private AccountBean dataBean;
private UserDataMachineAdapter data1Adapter;
private UserDataMachineAdapter data2Adapter;
private UserDataMachineAdapter data3Adapter;
private UserDataMachineAdapter data4Adapter;
private UserDataMachineAdapter data5Adapter;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData1.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData2.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData3.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData4.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvData5.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
List<Object> data1List = new ArrayList<>();
data1List.add(null);
data1List.add(null);
data1List.add(null);
List<Object> data2List = new ArrayList<>();
data2List.add(null);
data2List.add(null);
data2List.add(null);
List<Object> data3List = new ArrayList<>();
data3List.add(null);
data3List.add(null);
data3List.add(null);
List<Object> data4List = new ArrayList<>();
data4List.add(null);
data4List.add(null);
data4List.add(null);
List<Object> data5List = new ArrayList<>();
data5List.add(null);
data5List.add(null);
data5List.add(null);
data1Adapter = new UserDataMachineAdapter(R.layout.item_machine, data1List);
data2Adapter = new UserDataMachineAdapter(R.layout.item_machine, data2List);
data3Adapter = new UserDataMachineAdapter(R.layout.item_machine, data3List);
data4Adapter = new UserDataMachineAdapter(R.layout.item_machine, data4List);
data5Adapter = new UserDataMachineAdapter(R.layout.item_machine, data5List);
data1Adapter.bindToRecyclerView(rvData1);
data2Adapter.bindToRecyclerView(rvData2);
data3Adapter.bindToRecyclerView(rvData3);
data4Adapter.bindToRecyclerView(rvData4);
data5Adapter.bindToRecyclerView(rvData5);
getData();
}
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
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()));
}
});
}
@Override
protected void initEvent() {
data1Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesThreeModifyActivity.class);
}
});
data2Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesSupplierActivity.class);
}
});
data3Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
}
});
data4Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
}
});
data5Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_machine_detail;
}
@OnClick({R.id.tv_add1, R.id.tv_add3, R.id.tv_add4, R.id.tv_add5, R.id.rl_add})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_add1:
startActivity(MesThreeAddActivity.class);
break;
case R.id.tv_add3:
break;
case R.id.tv_add4:
break;
case R.id.tv_add5:
break;
case R.id.rl_add:
break;
}
}
}
package com.wd.workoffice.ui.activity.mes.user;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AccountBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import butterknife.ButterKnife;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 用户数据采集,三大件供货记录
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesSupplierActivity extends WorkToolBarActivity {
private AccountBean dataBean;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
getData();
}
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
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()));
}
});
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_supplier;
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ClientBean;
import com.wd.workoffice.bean.event.AddFactoryEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.UserDataClientAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesThreeAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.rl_factory)
RelativeLayout rlFactory;
@BindView(R.id.et_content)
EditText etContent;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_three;
}
@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:
finish();
break;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(AddFactoryEvent event) {
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddFactoryEvent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesThreeDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.rl_factory)
RelativeLayout rlFactory;
@BindView(R.id.et_content)
EditText etContent;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_three;
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(AddFactoryEvent event) {
}
}
package com.wd.workoffice.ui.activity.mes.user;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddFactoryEvent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesThreeModifyActivity extends WorkToolBarActivity {
@BindView(R.id.tv_factory)
TextView tvFactory;
@BindView(R.id.rl_factory)
RelativeLayout rlFactory;
@BindView(R.id.et_content)
EditText etContent;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_user_data_three;
}
@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:
finish();
break;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(AddFactoryEvent event) {
}
}
package com.wd.workoffice.ui.adapter;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class UserDataMachineAdapter extends BaseQuickAdapter<Object, BaseViewHolder> {
public UserDataMachineAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, Object item) {
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="XD234"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="XD234"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="XD234"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="XD234"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="XD234"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="14mm"
android:background="@android:color/white"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="5mm"
android:text="zzz"
android:textColor="@color/blue_btn" />
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论