提交 10c5b3d8 authored 作者: lgd's avatar lgd

1.组装订单

2.//TODO erp用户激活测试,忘记/重置密码测试,坩埚下单页面,组装列表,往来(客户两个库),产品下单还差附件,mes,消息,刷新token
上级 1fe1c23c
...@@ -816,7 +816,22 @@ ...@@ -816,7 +816,22 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.sale.SaleProductOrderActivity"
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.bat.sale.SaleCrucibleOrderActivity"
android:configChanges="keyboardHidden|orientation"
android:label="坩埚订单"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
...@@ -87,9 +87,45 @@ public class OrderBean { ...@@ -87,9 +87,45 @@ public class OrderBean {
private String attrName; private String attrName;
private String requireTime; private String requireTime;
private String inStockName; private String inStockName;
private String enterStockName;
private String usedStockName;
private Object deptId; private Object deptId;
private List<OrderItemsBean> orderItems; private List<OrderItemsBean> orderItems;
private List<OrderFlowsBean> orderFlows; private List<OrderFlowsBean> orderFlows;
private String serialNumber;
private String appliedByName;
public String getAppliedByName() {
return appliedByName;
}
public void setAppliedByName(String appliedByName) {
this.appliedByName = appliedByName;
}
public String getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
public String getUsedStockName() {
return usedStockName;
}
public void setUsedStockName(String usedStockName) {
this.usedStockName = usedStockName;
}
public String getEnterStockName() {
return enterStockName;
}
public void setEnterStockName(String enterStockName) {
this.enterStockName = enterStockName;
}
public String getInStockName() { public String getInStockName() {
return inStockName; return inStockName;
......
package com.wd.workoffice.bean.event;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class CheckOrderEvent {
public CheckOrderEvent() {
}
}
...@@ -1059,5 +1059,20 @@ public interface ApiService { ...@@ -1059,5 +1059,20 @@ public interface ApiService {
@GET("/product/search-list") @GET("/product/search-list")
Observable<BaseBean> tradingProDialog(@Query("soleCode") String soleCode); Observable<BaseBean> tradingProDialog(@Query("soleCode") String soleCode);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET("/package-order/app/page/list")
Observable<BaseBean> productList(@QueryMap Map<String,Object> param);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET("/packageApply/app/page/list")
Observable<BaseBean> productApplyList(@QueryMap Map<String,Object> param);
} }
package com.wd.workoffice.ui.activity.bat.sale;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.ui.activity.bat.SupplierOrderSearchActivity;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import com.wd.workoffice.ui.fg.ProductOrderApplyFragment;
import com.wd.workoffice.ui.fg.ProductOrderFragment;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
import static com.google.android.material.tabs.TabLayout.MODE_FIXED;
/**
* 销售 - 坩埚订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class SaleCrucibleOrderActivity extends WorkToolBarActivity {
@BindView(R.id.tl_tab)
TabLayout tlTab;
@BindView(R.id.vp_data)
ViewPager vpData;
private String tab[] = {
"坩埚生产订单", "坩埚销售订单"};
@Override
protected void initView() {
ButterKnife.bind(this);
tlTab.setupWithViewPager(vpData);
tlTab.setTabMode(MODE_FIXED);
}
@Override
protected void initData() {
FragmentManager sfm = getSupportFragmentManager();
List<Fragment> data = new ArrayList<>();
ProductOrderFragment saleFragment = new ProductOrderFragment();
ProductOrderApplyFragment applyFragment = new ProductOrderApplyFragment();
Bundle bundle = new Bundle();
bundle.putString("identity", "1");
saleFragment.setArguments(bundle);
applyFragment.setArguments(bundle);
data.add(saleFragment);
data.add(applyFragment);
VpDataAdapter vpFgAdapter = new VpDataAdapter(sfm, data);
vpData.setAdapter(vpFgAdapter);
for (int i = 0; i < tab.length; i++) {
tlTab.getTabAt(i).setText(tab[i]);
}
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_order;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_search, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.search:
startActivity(SupplierOrderSearchActivity.class, "identity", "1","","");
break;
}
return super.onOptionsItemSelected(item);
}
}
package com.wd.workoffice.ui.activity.bat.sale;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.ui.activity.bat.SupplierOrderSearchActivity;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import com.wd.workoffice.ui.fg.ProductOrderApplyFragment;
import com.wd.workoffice.ui.fg.ProductOrderFragment;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
import static com.google.android.material.tabs.TabLayout.MODE_FIXED;
/**
* 销售 - 供应订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class SaleProductOrderActivity extends WorkToolBarActivity {
@BindView(R.id.tl_tab)
TabLayout tlTab;
@BindView(R.id.vp_data)
ViewPager vpData;
private String tab[] = {
"组装订单", "组装申请"};
@Override
protected void initView() {
ButterKnife.bind(this);
tlTab.setupWithViewPager(vpData);
tlTab.setTabMode(MODE_FIXED);
}
@Override
protected void initData() {
FragmentManager sfm = getSupportFragmentManager();
List<Fragment> data = new ArrayList<>();
ProductOrderFragment saleFragment = new ProductOrderFragment();
ProductOrderApplyFragment applyFragment = new ProductOrderApplyFragment();
Bundle bundle = new Bundle();
bundle.putString("identity", "1");
saleFragment.setArguments(bundle);
applyFragment.setArguments(bundle);
data.add(saleFragment);
data.add(applyFragment);
VpDataAdapter vpFgAdapter = new VpDataAdapter(sfm, data);
vpData.setAdapter(vpFgAdapter);
for (int i = 0; i < tab.length; i++) {
tlTab.getTabAt(i).setText(tab[i]);
}
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_order;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_search, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.search:
startActivity(SupplierOrderSearchActivity.class, "identity", "1","","");
break;
}
return super.onOptionsItemSelected(item);
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.OrderBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class SaleProductAdapter extends BaseQuickAdapter<OrderBean, BaseViewHolder> {
public SaleProductAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, OrderBean item) {
helper.setText(R.id.tv_name, item.getCustomerName());
helper.setText(R.id.tv_status, item.getStatusName());
helper.setText(R.id.tv_dep, item.getReceiveDeptName());
helper.setText(R.id.tv_place_name, item.getLaunchUserName());
helper.setText(R.id.tv_company, item.getLaunchDeptName());
helper.setText(R.id.tv_supplier,item.getSupplierName());
helper.setText(R.id.tv_order_no, item.getId());
helper.setText(R.id.tv_time, item.getCreatedTime());
helper.setText(R.id.tv_send_time, item.getRequireTime());
helper.setText(R.id.tv_desc, item.getAttrName());
helper.setText(R.id.tv_price, String.valueOf(item.getLaunchOrderAmount()));
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.OrderBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class SaleProductApplyAdapter extends BaseQuickAdapter<OrderBean, BaseViewHolder> {
public SaleProductApplyAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, OrderBean item) {
helper.setText(R.id.tv_name, item.getCustomerName());
helper.setText(R.id.tv_status, item.getStatusName());
helper.setText(R.id.tv_dep, item.getUsedStockName());
helper.setText(R.id.tv_from_dep, item.getEnterStockName());
helper.setText(R.id.tv_person, item.getAppliedByName());
helper.setText(R.id.tv_time, item.getCreatedTime());
helper.setText(R.id.tv_code, item.getSerialNumber());
}
}
...@@ -11,6 +11,7 @@ import com.wd.workoffice.app.WorkBaseFg; ...@@ -11,6 +11,7 @@ import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.vo.BatLayoutVo; import com.wd.workoffice.bean.vo.BatLayoutVo;
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.activity.bat.sale.SaleProductOrderActivity;
import com.wd.workoffice.ui.activity.bat.store.StoreFinancialActivity; import com.wd.workoffice.ui.activity.bat.store.StoreFinancialActivity;
import com.wd.workoffice.ui.activity.bat.work.WorkInStockActivity; import com.wd.workoffice.ui.activity.bat.work.WorkInStockActivity;
import com.wd.workoffice.ui.activity.bat.store.StoreCrucibleActivity; import com.wd.workoffice.ui.activity.bat.store.StoreCrucibleActivity;
...@@ -181,6 +182,7 @@ public class MainFragment extends WorkBaseFg { ...@@ -181,6 +182,7 @@ public class MainFragment extends WorkBaseFg {
startActivity(SaleInsideOrderActivity.class, "identity", "1"); startActivity(SaleInsideOrderActivity.class, "identity", "1");
break; break;
case 4: case 4:
startActivity(SaleProductOrderActivity.class, "identity", "1");
break; break;
case 5: case 5:
break; break;
...@@ -236,6 +238,7 @@ public class MainFragment extends WorkBaseFg { ...@@ -236,6 +238,7 @@ public class MainFragment extends WorkBaseFg {
startActivity(ProductInsideOrderActivity.class); startActivity(ProductInsideOrderActivity.class);
break; break;
case 4: case 4:
startActivity(SaleProductOrderActivity.class);
break; break;
case 5: case 5:
break; break;
......
package com.wd.workoffice.ui.fg;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.ui.activity.bat.SupplierOrderSearchActivity;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 销售 - 供应订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class ProductOrderApplyFragment extends WorkBaseFg {
@BindView(R.id.tl_tab)
TabLayout tlTab;
@BindView(R.id.vp_data)
ViewPager vpData;
private String tab[] = {
"未审核", "已通过","已驳回"};
private String order[] = {
"0", "1", "2"};
@Override
protected void initView() {
ButterKnife.bind(this, getContentView());
tlTab.setupWithViewPager(vpData);
tlTab.setTabMode(TabLayout.MODE_FIXED);
}
@Override
protected void initData() {
FragmentManager sfm = getChildFragmentManager();
List<Fragment> data = new ArrayList<>();
for (int i = 0; i < tab.length; i++) {
ProductOrderApplyListFragment saleFragment = new ProductOrderApplyListFragment();
Bundle bundle = new Bundle();
bundle.putString("state", order[i]);
bundle.putString("identity", "1");
saleFragment.setArguments(bundle);
data.add(saleFragment);
}
VpDataAdapter vpFgAdapter = new VpDataAdapter(sfm, data);
vpData.setAdapter(vpFgAdapter);
for (int i = 0; i < tab.length; i++) {
tlTab.getTabAt(i).setText(tab[i]);
}
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_order;
}
}
package com.wd.workoffice.ui.fg;
import android.os.Bundle;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.LogisticBean;
import com.wd.workoffice.bean.OrderBean;
import com.wd.workoffice.bean.event.CheckLogisticEvent;
import com.wd.workoffice.bean.event.CheckOrderEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.bat.work.WorkLogisticsDetailActivity;
import com.wd.workoffice.ui.adapter.SaleProductAdapter;
import com.wd.workoffice.ui.adapter.SaleProductApplyAdapter;
import com.wd.workoffice.ui.adapter.WorkLogisticAdapter;
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.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
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 ProductOrderApplyListFragment extends WorkBaseFg {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private String state;
private int page = 1;
private Map<String, Object> param;
private SaleProductApplyAdapter dataAdapter;
private List<OrderBean> dataList;
@Override
protected void initView() {
ButterKnife.bind(this, getContentView());
rvData.setLayoutManager(new LinearLayoutManager(getActivity(), RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
param = WorkUtils.pageKey();
param.put("status", state);
page = 1;
param.put("current", page);
dataList = new ArrayList<>();
dataAdapter = new SaleProductApplyAdapter(R.layout.item_sale_product_apply, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
getData();
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null) {
state = arguments.getString("state");
}
}
private void getData() {
RtfUtils.getRtf().productApplyList(param).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;
}
List<OrderBean> getList= JSON.parseArray(JSON.parseObject(data.getData().toString()).getString("records"), OrderBean.class);
if (page == 1) {
srlRefresh.finishRefresh();
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
srlRefresh.setOnRefreshListener(refreshLayout -> {
page = 1;
param.put("current", page);
getData();
});
dataAdapter.setOnLoadMoreListener(() -> {
param.put("current", page);
getData();
}, rvData);
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(WorkLogisticsDetailActivity.class, "info",JSON.toJSONString(dataList.get(position)));
}
});
}
@Override
protected int layoutId() {
return R.layout.fg_work_contacts;
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckOrderEvent event) {
page = 1;
param.put("current", page);
getData();
}
}
package com.wd.workoffice.ui.fg;
import android.os.Bundle;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.LogisticBean;
import com.wd.workoffice.bean.OrderBean;
import com.wd.workoffice.bean.event.CheckLogisticEvent;
import com.wd.workoffice.bean.event.CheckOrderEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.bat.work.WorkLogisticsDetailActivity;
import com.wd.workoffice.ui.adapter.SaleProductAdapter;
import com.wd.workoffice.ui.adapter.WorkLogisticAdapter;
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.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
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 ProductOrderFragment extends WorkBaseFg {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private String state;
private int page = 1;
private Map<String, Object> param;
private SaleProductAdapter dataAdapter;
private List<OrderBean> dataList;
@Override
protected void initView() {
ButterKnife.bind(this, getContentView());
rvData.setLayoutManager(new LinearLayoutManager(getActivity(), RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
param = WorkUtils.pageKey();
// param.put("status", state);
page = 1;
param.put("current", page);
dataList = new ArrayList<>();
dataAdapter = new SaleProductAdapter(R.layout.item_sale_product, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
getData();
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null) {
state = arguments.getString("state");
}
}
private void getData() {
RtfUtils.getRtf().productList(param).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;
}
List<OrderBean> getList= JSON.parseArray(JSON.parseObject(data.getData().toString()).getString("records"), OrderBean.class);
if (page == 1) {
srlRefresh.finishRefresh();
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
srlRefresh.setOnRefreshListener(refreshLayout -> {
page = 1;
param.put("current", page);
getData();
});
dataAdapter.setOnLoadMoreListener(() -> {
param.put("current", page);
getData();
}, rvData);
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(WorkLogisticsDetailActivity.class, "info",JSON.toJSONString(dataList.get(position)));
}
});
}
@Override
protected int layoutId() {
return R.layout.fg_work_contacts;
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckOrderEvent event) {
page = 1;
param.put("current", page);
getData();
}
}
...@@ -68,7 +68,7 @@ public class StoreFinancialFragment extends WorkBaseFg { ...@@ -68,7 +68,7 @@ public class StoreFinancialFragment extends WorkBaseFg {
dataAdapter = new WorkLogisticAdapter(R.layout.item_logistics, dataList); dataAdapter = new WorkLogisticAdapter(R.layout.item_logistics, dataList);
dataAdapter.bindToRecyclerView(rvData); dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData); dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
getData(); // getData();
} }
@Override @Override
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10mm"
android:paddingTop="10mm"
android:paddingBottom="20mm"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5mm">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="邢台德龙钢铁客户"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="待生产"
android:textColor="#0841F0"
android:textSize="14sp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14mm"
android:paddingVertical="10mm"
android:background="#FCFCFD"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_dep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="接单部门"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_dep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<!-- 1.下单 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="下单人"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_place_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<!-- 2.所属公司 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="所属公司"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_company"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="王紫逸"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/rv_supplier"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="供应商"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_supplier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<!-- 3.订单编号 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="订单编号"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_order_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="王紫逸"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<!-- 4.下单时间 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="下单时间"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="王紫逸"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<!-- 3.要求发货时间 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="要求发货时间"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_send_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="王紫逸"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:gravity="right">
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15mm"
android:text="对方发起提前结束"
android:textColor="@color/red_btn_bg"
android:textSize="13sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单总价:¥"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
\ 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="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10mm"
android:paddingTop="10mm"
android:paddingBottom="20mm"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5mm">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="邢台德龙钢铁客户"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="待生产"
android:textColor="@color/orange"
android:textSize="14sp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14mm"
android:paddingVertical="10mm"
android:background="#FCFCFD"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_dep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="申请编号"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="来源仓库"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_from_dep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="领用仓库"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_dep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="王紫逸"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/rv_supplier"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="申请人"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:text="申请时间"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="王紫逸"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论