Commit 2da9c4d4 authored by 陈前's avatar 陈前

盘库UI

parent 30b3e0ac
...@@ -180,9 +180,14 @@ public class InventoryPresenter extends InventoryContract.Presenter { ...@@ -180,9 +180,14 @@ public class InventoryPresenter extends InventoryContract.Presenter {
ApiFactory.Cs.querCsList(pageNum, nowPageSize, start, end).doFinally(() -> mView.isShowLoading(false)) ApiFactory.Cs.querCsList(pageNum, nowPageSize, start, end).doFinally(() -> mView.isShowLoading(false))
.subscribe(csPager -> { .subscribe(csPager -> {
//判断是否能加载更多 //判断是否能加载更多
mView.loadCs(csPager, start, end); if (csPager.getList().size() == 0) {
mView.setInventoryCount(com.blankj.utilcode.util.TimeUtils.millis2String(start, new SimpleDateFormat(StringUtil.defaultDatePattern)) + " ~ " + ToastUtils.showShort("没有盘库记录");
com.blankj.utilcode.util.TimeUtils.millis2String(end, new SimpleDateFormat(StringUtil.defaultDatePattern))); } else {
mView.loadCs(csPager, start, end);
mView.setInventoryCount(com.blankj.utilcode.util.TimeUtils.millis2String(start, new SimpleDateFormat(StringUtil.defaultDatePattern)) + " ~ " +
com.blankj.utilcode.util.TimeUtils.millis2String(end - 86400000L, new SimpleDateFormat(StringUtil.defaultDatePattern)));
}
}, throwable -> { }, throwable -> {
ToastUtils.showShort(throwable.getMessage()); ToastUtils.showShort(throwable.getMessage());
......
...@@ -156,6 +156,12 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment ...@@ -156,6 +156,12 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment
if (pager.isLastPage()) mInventoryAdapter.loadMoreEnd(isRefresh); if (pager.isLastPage()) mInventoryAdapter.loadMoreEnd(isRefresh);
else mInventoryAdapter.loadMoreComplete(); else mInventoryAdapter.loadMoreComplete();
if (mInventoryAdapter.getData().size()==0){
mViewBinding.tvCount.setVisibility(View.GONE);
}else {
mViewBinding.tvCount.setVisibility(View.VISIBLE);
}
} }
......
...@@ -89,7 +89,6 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -89,7 +89,6 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
private View getEmptyView(int resHint) { private View getEmptyView(int resHint) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null); View view = getLayoutInflater().inflate(R.layout.view_empty, null);
view.setBackgroundResource(R.color.white_caocao);
((TextView) view.findViewById(R.id.tv_empty)).setText(resHint); ((TextView) view.findViewById(R.id.tv_empty)).setText(resHint);
return view; return view;
} }
......
...@@ -55,13 +55,19 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -55,13 +55,19 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
public void initView() { public void initView() {
mViewBinding.lyTitle.edTitle.setHint(R.string.inventory_add_et_hint); mViewBinding.lyTitle.edTitle.setHint(R.string.inventory_add_et_hint);
mViewBinding.lyTitle.edTitle.setText(""); mViewBinding.lyTitle.edTitle.setText("");
Drawable drawableTop = getResources().getDrawable(R.mipmap.but_up); Drawable drawableTop = getResources().getDrawable(R.mipmap.but_unfurled);
Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_unfurled); Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_up);
drawableTop.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10); drawableTop.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
drawableBottom.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10); drawableBottom.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null); mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null);
mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null); mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null);
initRecycycler(); initRecycycler();
mViewBinding.lyTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() { mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() {
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
......
...@@ -193,6 +193,7 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese ...@@ -193,6 +193,7 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
for (Saledetail saledetail : mSaleorder.getSaledetailList()) { for (Saledetail saledetail : mSaleorder.getSaledetailList()) {
View view = LayoutInflater.from(this).inflate(R.layout.item_settle_saledetail, null); View view = LayoutInflater.from(this).inflate(R.layout.item_settle_saledetail, null);
view.setPadding(20, 20, 20, 20);
ItemSettleSaledetailBinding itemSettleSaledetailBinding = DataBindingUtil.bind(view); ItemSettleSaledetailBinding itemSettleSaledetailBinding = DataBindingUtil.bind(view);
itemSettleSaledetailBinding.tvAmt.setText("¥" + saledetail.getSubtotal()); itemSettleSaledetailBinding.tvAmt.setText("¥" + saledetail.getSubtotal());
itemSettleSaledetailBinding.tvCount.setText(saledetail.getCnt()); itemSettleSaledetailBinding.tvCount.setText(saledetail.getCnt());
......
...@@ -158,7 +158,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F ...@@ -158,7 +158,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true); FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true);
} else { } else {
mOrderSearchFragment.setType(OrderSearchFragment.PAYTYPE); mOrderSearchFragment.setType(OrderSearchFragment.PAYTYPE);
mOrderSearchFragment.setData(saleorderPager, saleorderPager.isFirstPage()); mOrderSearchFragment.setData(saleorderPager);
} }
} }
...@@ -171,7 +171,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F ...@@ -171,7 +171,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true); FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true);
} else { } else {
mOrderSearchFragment.setType(OrderSearchFragment.WD); mOrderSearchFragment.setType(OrderSearchFragment.WD);
mOrderSearchFragment.setData(saleorderPager, saleorderPager.isFirstPage()); mOrderSearchFragment.setData(saleorderPager);
} }
} }
...@@ -185,7 +185,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F ...@@ -185,7 +185,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true); FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true);
} else { } else {
mOrderSearchFragment.setType(OrderSearchFragment.DATE); mOrderSearchFragment.setType(OrderSearchFragment.DATE);
mOrderSearchFragment.setData(saleorderPager, saleorderPager.isFirstPage()); mOrderSearchFragment.setData(saleorderPager);
} }
} }
...@@ -196,7 +196,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F ...@@ -196,7 +196,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
FragmentUtils.add(getChildFragmentManager(), mRechargeSearchFragment, mViewBinding.mainFrame.getId(), false, true); FragmentUtils.add(getChildFragmentManager(), mRechargeSearchFragment, mViewBinding.mainFrame.getId(), false, true);
} else { } else {
mRechargeSearchFragment.setType(OrderSearchFragment.DATE); mRechargeSearchFragment.setType(OrderSearchFragment.DATE);
mRechargeSearchFragment.setData(vipRechargeOrderPager, vipRechargeOrderPager.isFirstPage()); mRechargeSearchFragment.setData(vipRechargeOrderPager);
} }
} }
...@@ -206,7 +206,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F ...@@ -206,7 +206,7 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
FragmentUtils.add(getChildFragmentManager(), mTicketSearchFragment, mViewBinding.mainFrame.getId(), false, true); FragmentUtils.add(getChildFragmentManager(), mTicketSearchFragment, mViewBinding.mainFrame.getId(), false, true);
} else { } else {
mTicketSearchFragment.setType(OrderSearchFragment.DATE); mTicketSearchFragment.setType(OrderSearchFragment.DATE);
mTicketSearchFragment.setData(ticketPager, ticketPager.isFirstPage()); mTicketSearchFragment.setData(ticketPager);
} }
} }
......
...@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager; ...@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -15,13 +16,23 @@ import com.xingdata.zzdpos.model.VipRechargeOrder; ...@@ -15,13 +16,23 @@ import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter; import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter;
import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Action;
import io.reactivex.schedulers.Schedulers;
public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> { public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> {
private StatisticsRechargeAdapter mStatisticsAdapter; private StatisticsRechargeGroupAdapter mStatisticsAdapter;
private Pager<VipRechargeOrder> VipRechargeOrders; private Pager<VipRechargeOrder> VipRechargeOrders;
private int pagerNum; private int pagerNum;
private String wd = ""; private String wd = "";
...@@ -30,7 +41,7 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr ...@@ -30,7 +41,7 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
public static final int DATE = 100; public static final int DATE = 100;
private Long startDate; private Long startDate;
private Long endDate; private Long endDate;
private String monthDate;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -41,7 +52,7 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr ...@@ -41,7 +52,7 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
public void initView() { public void initView() {
if (mStatisticsAdapter == null) { if (mStatisticsAdapter == null) {
mStatisticsAdapter = new StatisticsRechargeAdapter(new ArrayList<>()); mStatisticsAdapter = new StatisticsRechargeGroupAdapter(new ArrayList<>());
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter); mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
} else { } else {
...@@ -51,14 +62,17 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr ...@@ -51,14 +62,17 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler); mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler);
if (VipRechargeOrders != null) { if (VipRechargeOrders != null) {
setData(VipRechargeOrders, VipRechargeOrders.isFirstPage()); setData(VipRechargeOrders);
} }
mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class); if (!mStatisticsAdapter.getData().get(position).isHeader) {
intent.putExtra(VipRechargeOrder.class.getName(), mStatisticsAdapter.getData().get(position)); Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class);
ActivityUtils.startActivity(intent); intent.putExtra(VipRechargeOrder.class.getName(), mStatisticsAdapter.getData().get(position));
ActivityUtils.startActivity(intent);
}
} }
}); });
...@@ -96,7 +110,7 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr ...@@ -96,7 +110,7 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
* @param pager 数据 * @param pager 数据
* @param isRefresh 是否刷新 * @param isRefresh 是否刷新
*/ */
public void setData(Pager<VipRechargeOrder> pager, boolean isRefresh) { private void setData(Pager<VipRechargeOrder> pager, boolean isRefresh) {
if (isRefresh) { if (isRefresh) {
mStatisticsAdapter.setEnableLoadMore(true); mStatisticsAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false); mViewBinding.srlProduct.setRefreshing(false);
...@@ -109,6 +123,37 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr ...@@ -109,6 +123,37 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
} }
public void setData(Pager<VipRechargeOrder> pager) {
if (pager.isFirstPage()) {
monthDate = "";
}
io.reactivex.Observable.create(new ObservableOnSubscribe<Pager<VipRechargeOrder>>() {
@Override
public void subscribe(ObservableEmitter<Pager<VipRechargeOrder>> e) throws Exception {
for (int i = 0; i < pager.getList().size(); i++) {
String m = TimeUtils.millis2String(pager.getList().get(i).getCreateTime(), new SimpleDateFormat(StringUtil.defaultDatePattern));
if (!m.equals(monthDate)) {
monthDate = m;
pager.getList().add(i, new VipRechargeOrder(true, monthDate + ""));
i++;
}
}
e.onComplete();
}
}).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()).doOnComplete(new Action() {
@Override
public void run() throws Exception {
setData(pager, pager.isFirstPage());
}
}).subscribe();
}
public void setCreateData(Pager<VipRechargeOrder> list, String wd) { public void setCreateData(Pager<VipRechargeOrder> list, String wd) {
this.VipRechargeOrders = list; this.VipRechargeOrders = list;
this.wd = wd; this.wd = wd;
......
...@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager; ...@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -16,12 +17,21 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; ...@@ -16,12 +17,21 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter; import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter;
import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Action;
import io.reactivex.schedulers.Schedulers;
public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> { public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> {
private StatisticsTicketAdapter mStatisticsAdapter; private StatisticsTicketGroupAdapter mStatisticsAdapter;
private Pager<Ticket> Tickets; private Pager<Ticket> Tickets;
private int pagerNum; private int pagerNum;
private String wd = ""; private String wd = "";
...@@ -30,6 +40,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag ...@@ -30,6 +40,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
public static final int DATE = 100; public static final int DATE = 100;
private Long startDate; private Long startDate;
private Long endDate; private Long endDate;
private String monthDate;
@Override @Override
...@@ -41,7 +52,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag ...@@ -41,7 +52,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
public void initView() { public void initView() {
if (mStatisticsAdapter == null) { if (mStatisticsAdapter == null) {
mStatisticsAdapter = new StatisticsTicketAdapter(new ArrayList<>()); mStatisticsAdapter = new StatisticsTicketGroupAdapter(new ArrayList<>());
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter); mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
} else { } else {
...@@ -51,7 +62,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag ...@@ -51,7 +62,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler); mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler);
if (Tickets != null) { if (Tickets != null) {
setData(Tickets, Tickets.isFirstPage()); setData(Tickets);
} }
mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
...@@ -97,7 +108,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag ...@@ -97,7 +108,7 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
* @param pager 数据 * @param pager 数据
* @param isRefresh 是否刷新 * @param isRefresh 是否刷新
*/ */
public void setData(Pager<Ticket> pager, boolean isRefresh) { private void setData(Pager<Ticket> pager, boolean isRefresh) {
if (isRefresh) { if (isRefresh) {
mStatisticsAdapter.setEnableLoadMore(true); mStatisticsAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false); mViewBinding.srlProduct.setRefreshing(false);
...@@ -110,6 +121,37 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag ...@@ -110,6 +121,37 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
} }
public void setData(Pager<Ticket> pager) {
if (pager.isFirstPage()) {
monthDate = "";
}
io.reactivex.Observable.create(new ObservableOnSubscribe<Pager<Ticket>>() {
@Override
public void subscribe(ObservableEmitter<Pager<Ticket>> e) throws Exception {
for (int i = 0; i < pager.getList().size(); i++) {
String m = TimeUtils.date2String(pager.getList().get(i).getCreateTime(), new SimpleDateFormat(StringUtil.defaultDatePattern));
if (!m.equals(monthDate)) {
monthDate = m;
pager.getList().add(i, new Ticket(true, monthDate + ""));
i++;
}
}
e.onComplete();
}
}).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()).doOnComplete(new Action() {
@Override
public void run() throws Exception {
setData(pager, pager.isFirstPage());
}
}).subscribe();
}
public void setCreateData(Pager<Ticket> list, String wd) { public void setCreateData(Pager<Ticket> list, String wd) {
this.Tickets = list; this.Tickets = list;
this.wd = wd; this.wd = wd;
......
...@@ -93,9 +93,12 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen ...@@ -93,9 +93,12 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class); if (!mStatisticsAdapter.getData().get(position).isHeader) {
intent.putExtra(Saleorder.class.getName(), mStatisticsAdapter.getData().get(position).getId()); Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class);
ActivityUtils.startActivity(intent); intent.putExtra(Saleorder.class.getName(), mStatisticsAdapter.getData().get(position).getId());
ActivityUtils.startActivity(intent);
}
} }
}); });
...@@ -122,7 +125,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen ...@@ -122,7 +125,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
* @param pager 数据 * @param pager 数据
* @param isRefresh 是否刷新 * @param isRefresh 是否刷新
*/ */
public void setData(Pager<Saleorder> pager, boolean isRefresh) { private void setData(Pager<Saleorder> pager, boolean isRefresh) {
if (isRefresh) { if (isRefresh) {
mStatisticsAdapter.setEnableLoadMore(true); mStatisticsAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false); mViewBinding.srlProduct.setRefreshing(false);
......
...@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager; ...@@ -6,6 +6,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -17,14 +18,23 @@ import com.xingdata.zzdpos.model.Saleorder; ...@@ -17,14 +18,23 @@ import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter; import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter;
import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Action;
import io.reactivex.schedulers.Schedulers;
public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> { public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> {
private StatisticsOrderAdapter mStatisticsAdapter; private StatisticsOrderGroupAdapter mStatisticsAdapter;
private Pager<Saleorder> saleorders; private Pager<Saleorder> saleorders;
private int pagerNum; private int pagerNum;
private String wd = ""; private String wd = "";
...@@ -35,7 +45,7 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm ...@@ -35,7 +45,7 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
public static final int PAYTYPE = 101; public static final int PAYTYPE = 101;
private Long startDate; private Long startDate;
private Long endDate; private Long endDate;
private String monthDate;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -46,7 +56,7 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm ...@@ -46,7 +56,7 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
public void initView() { public void initView() {
if (mStatisticsAdapter == null) { if (mStatisticsAdapter == null) {
mStatisticsAdapter = new StatisticsOrderAdapter(new ArrayList<>()); mStatisticsAdapter = new StatisticsOrderGroupAdapter(new ArrayList<>());
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter); mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
} else { } else {
...@@ -56,14 +66,17 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm ...@@ -56,14 +66,17 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler); mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler);
if (saleorders != null) { if (saleorders != null) {
setData(saleorders, saleorders.isFirstPage()); setData(saleorders);
} }
mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class); if (!mStatisticsAdapter.getData().get(position).isHeader) {
intent.putExtra(Saleorder.class.getName(), mStatisticsAdapter.getData().get(position).getId()); Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class);
ActivityUtils.startActivity(intent); intent.putExtra(Saleorder.class.getName(), mStatisticsAdapter.getData().get(position).getId());
ActivityUtils.startActivity(intent);
}
} }
}); });
...@@ -107,7 +120,7 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm ...@@ -107,7 +120,7 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
* @param pager 数据 * @param pager 数据
* @param isRefresh 是否刷新 * @param isRefresh 是否刷新
*/ */
public void setData(Pager<Saleorder> pager, boolean isRefresh) { private void setData(Pager<Saleorder> pager, boolean isRefresh) {
if (isRefresh) { if (isRefresh) {
mStatisticsAdapter.setEnableLoadMore(true); mStatisticsAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false); mViewBinding.srlProduct.setRefreshing(false);
...@@ -120,6 +133,38 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm ...@@ -120,6 +133,38 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
} }
public void setData(Pager<Saleorder> pager) {
if (pager.isFirstPage()) {
monthDate = "";
}
io.reactivex.Observable.create(new ObservableOnSubscribe<Pager<Saleorder>>() {
@Override
public void subscribe(ObservableEmitter<Pager<Saleorder>> e) throws Exception {
for (int i = 0; i < pager.getList().size(); i++) {
String m = TimeUtils.millis2String(pager.getList().get(i).getCreateTime(), new SimpleDateFormat(StringUtil.defaultDatePattern));
if (!m.equals(monthDate)) {
monthDate = m;
pager.getList().add(i, new Saleorder(true, monthDate + ""));
i++;
}
}
e.onComplete();
}
}).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()).doOnComplete(new Action() {
@Override
public void run() throws Exception {
setData(pager, pager.isFirstPage());
}
}).subscribe();
}
public void setCreateData(Pager<Saleorder> list, int patType) { public void setCreateData(Pager<Saleorder> list, int patType) {
this.saleorders = list; this.saleorders = list;
this.payType = patType; this.payType = patType;
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/gray_huanggai"/>
</shape>
</item>
<item android:bottom="@dimen/view_line_L050" android:top="@dimen/view_line_L050">
<shape>
<solid android:color="@color/gray_zhouyu"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
...@@ -48,23 +48,23 @@ ...@@ -48,23 +48,23 @@
android:layout="@layout/view_inventory_detail" /> android:layout="@layout/view_inventory_detail" />
</FrameLayout> </FrameLayout>
<LinearLayout <android.support.constraint.ConstraintLayout
android:id="@+id/ll_bottom" android:id="@+id/ll_bottom"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/layout_statistics_bottom_height"
android:layout_marginTop="@dimen/all_padding" android:layout_marginTop="@dimen/all_padding"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:elevation="@dimen/view_line_L2" android:elevation="@dimen/view_line_L2"
android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"> app:layout_constraintBottom_toBottomOf="parent">
<Button <Button
android:id="@+id/btn_print" android:id="@+id/btn_print"
style="@style/button_passive" style="@style/button_passive"
android:layout_width="0dp" android:layout_width="@dimen/layout_statistics_bottom_button_width"
android:layout_height="wrap_content" android:layout_height="@dimen/layout_statistics_bottom_button_height"
android:layout_margin="@dimen/all_padding" android:layout_marginStart="@dimen/all_margin_big_big"
android:layout_weight="1"
android:stateListAnimator="@null" android:stateListAnimator="@null"
android:text="@string/settle_print_receipt" android:text="@string/settle_print_receipt"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size"
...@@ -77,10 +77,9 @@ ...@@ -77,10 +77,9 @@
<Button <Button
android:id="@+id/btn_return" android:id="@+id/btn_return"
style="@style/button_positive" style="@style/button_positive"
android:layout_width="0dp" android:layout_width="@dimen/layout_statistics_bottom_button_width"
android:layout_height="wrap_content" android:layout_height="@dimen/layout_statistics_bottom_button_height"
android:layout_margin="@dimen/all_padding" android:layout_marginEnd="@dimen/all_margin_big_big"
android:layout_weight="1"
android:stateListAnimator="@null" android:stateListAnimator="@null"
android:text="@string/pay_return" android:text="@string/pay_return"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size"
...@@ -88,8 +87,9 @@ ...@@ -88,8 +87,9 @@
app:layout_constraintLeft_toRightOf="@id/btn_cancel" app:layout_constraintLeft_toRightOf="@id/btn_cancel"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginStart="@dimen/all_margin_big_big"
tools:targetApi="lollipop" /> tools:targetApi="lollipop" />
</LinearLayout> </android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</layout> </layout>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050" android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming" /> android:background="@color/gray_huanggai" />
<LinearLayout <LinearLayout
android:id="@+id/btn_add" android:id="@+id/btn_add"
...@@ -44,17 +44,12 @@ ...@@ -44,17 +44,12 @@
android:textSize="@dimen/big_text_size" /> android:textSize="@dimen/big_text_size" />
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming" />
<TextView <TextView
android:id="@+id/tv_count" android:id="@+id/tv_count"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/gray_zhouyu" android:background="@drawable/singleline_zhouyu_huanggai"
android:paddingBottom="@dimen/all_padding" android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_padding_left_right" android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/all_padding" android:paddingTop="@dimen/all_padding"
...@@ -63,6 +58,7 @@ ...@@ -63,6 +58,7 @@
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
android:textStyle="bold" /> android:textStyle="bold" />
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product" android:id="@+id/srl_product"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -71,9 +67,9 @@ ...@@ -71,9 +67,9 @@
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recycler_inventory" android:id="@+id/recycler_inventory"
android:background="@color/gray_zhouyu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="@color/gray_zhouyu">
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout> </android.support.v4.widget.SwipeRefreshLayout>
......
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
layout="@layout/title_order" layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@id/ic_title" />
<TextView <TextView
android:id="@+id/tv_title_small" android:id="@+id/tv_title_small"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -39,6 +45,12 @@ ...@@ -39,6 +45,12 @@
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/ic_title" /> app:layout_constraintTop_toBottomOf="@id/ic_title" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@id/tv_title_small" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -50,6 +62,12 @@ ...@@ -50,6 +62,12 @@
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toTopOf="@id/fl_cart" />
<FrameLayout <FrameLayout
android:id="@+id/fl_cart" android:id="@+id/fl_cart"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -81,8 +99,8 @@ ...@@ -81,8 +99,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/red_guanyu"
android:text="@{result}" android:text="@{result}"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_sub_title_size" android:textSize="@dimen/all_sub_title_size"
android:textStyle="bold" /> android:textStyle="bold" />
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<import type="android.view.View" /> <import type="android.view.View" />
</data> </data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
...@@ -16,6 +15,11 @@ ...@@ -16,6 +15,11 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toTopOf="parent" />
<!-- TODO: Update blank fragmfragment_integral_indexyout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
......
...@@ -23,33 +23,38 @@ ...@@ -23,33 +23,38 @@
<!-- TODO: Update blank fragmfragment_integral_indexyout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<View
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<!--<LinearLayout--> <!--<LinearLayout-->
<!--android:id="@+id/ll_title"--> <!--android:id="@+id/ll_title"-->
<!--android:layout_width="match_parent"--> <!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"--> <!--android:layout_height="wrap_content"-->
<!--android:orientation="horizontal"--> <!--android:orientation="horizontal"-->
<!--android:weightSum="2"--> <!--android:weightSum="2"-->
<!--app:layout_constraintEnd_toEndOf="parent"--> <!--app:layout_constraintEnd_toEndOf="parent"-->
<!--app:layout_constraintStart_toStartOf="parent"--> <!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintTop_toTopOf="parent">--> <!--app:layout_constraintTop_toTopOf="parent">-->
<!--<TextView--> <!--<TextView-->
<!--android:layout_width="0dp"--> <!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"--> <!--android:layout_height="wrap_content"-->
<!--android:layout_weight="1"--> <!--android:layout_weight="1"-->
<!--android:gravity="left"--> <!--android:gravity="left"-->
<!--android:padding="@dimen/all_padding"--> <!--android:padding="@dimen/all_padding"-->
<!--android:text="@{month}" />--> <!--android:text="@{month}" />-->
<!--<TextView--> <!--<TextView-->
<!--android:layout_width="0dp"--> <!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"--> <!--android:layout_height="wrap_content"-->
<!--android:layout_weight="1"--> <!--android:layout_weight="1"-->
<!--android:gravity="right"--> <!--android:gravity="right"-->
<!--android:padding="@dimen/all_padding"--> <!--android:padding="@dimen/all_padding"-->
<!--android:text="@{amt}"--> <!--android:text="@{amt}"-->
<!--android:visibility="invisible" />--> <!--android:visibility="invisible" />-->
<!--</LinearLayout>--> <!--</LinearLayout>-->
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<!-- TODO: Update blank fragmfragment_integral_indexyout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product" android:id="@+id/srl_product"
android:layout_width="0dp" android:layout_width="0dp"
......
...@@ -10,15 +10,17 @@ ...@@ -10,15 +10,17 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
android:orientation="vertical"> android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product" android:id="@+id/srl_product"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/ll_title" android:layout_below="@id/ll_title">
>
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recycler_other_selcet" android:id="@+id/recycler_other_selcet"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050" android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming" /> android:background="@color/gray_huanggai" />
<LinearLayout <LinearLayout
android:id="@+id/btn_add" android:id="@+id/btn_add"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050" android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming" /> android:background="@color/gray_huanggai" />
<android.support.design.widget.TabLayout <android.support.design.widget.TabLayout
android:id="@+id/tab" android:id="@+id/tab"
...@@ -58,7 +58,10 @@ ...@@ -58,7 +58,10 @@
</android.support.design.widget.TabLayout> </android.support.design.widget.TabLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recycler" android:id="@+id/recycler"
android:background="@color/gray_zhouyu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="visible"> android:visibility="visible">
...@@ -29,7 +30,6 @@ ...@@ -29,7 +30,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/ll_title" android:layout_below="@id/ll_title"
android:background="@color/white_caocao"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"> android:visibility="gone">
......
...@@ -11,15 +11,21 @@ ...@@ -11,15 +11,21 @@
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding_left_right"
android:foreground="?attr/selectableItemBackground"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:padding="@dimen/all_padding_left_right"> android:foreground="?attr/selectableItemBackground">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_padding_left_right"
android:background="@drawable/singleline_zhouyu_huanggai"
app:layout_constraintTop_toBottomOf="@id/tv_date" />
<ImageView <ImageView
android:id="@+id/img" android:id="@+id/img"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_margin="@dimen/all_padding_left_right"
android:src="@mipmap/img_boss" android:src="@mipmap/img_boss"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
......
...@@ -40,20 +40,27 @@ ...@@ -40,20 +40,27 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/all_padding" android:layout_marginBottom="@dimen/all_padding_left_right"
android:background="@color/white"> android:background="@color/white">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming"
app:layout_constraintTop_toTopOf="parent" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050" android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming" android:background="@color/gray_kongming"
app:layout_constraintBottom_toBottomOf="parent"/> app:layout_constraintBottom_toBottomOf="parent" />
<LinearLayout <LinearLayout
android:id="@+id/ll_boss" android:id="@+id/ll_boss"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_padding_left_right"
android:layout_marginTop="@dimen/all_padding"
android:gravity="center" android:gravity="center"
android:padding="@dimen/dp_4" android:padding="@dimen/dp_4"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -91,8 +98,10 @@ ...@@ -91,8 +98,10 @@
android:id="@+id/ll_date" android:id="@+id/ll_date"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_padding_left_right"
android:gravity="center" android:gravity="center"
android:padding="@dimen/dp_4" android:padding="@dimen/dp_4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_boss"> app:layout_constraintTop_toBottomOf="@id/ll_boss">
<ImageView <ImageView
...@@ -115,8 +124,10 @@ ...@@ -115,8 +124,10 @@
android:id="@+id/ll_no" android:id="@+id/ll_no"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_padding_left_right"
android:gravity="center" android:gravity="center"
android:padding="@dimen/dp_4" android:padding="@dimen/dp_4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_date"> app:layout_constraintTop_toBottomOf="@id/ll_date">
<ImageView <ImageView
...@@ -138,7 +149,7 @@ ...@@ -138,7 +149,7 @@
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/all_padding" android:layout_margin="@dimen/all_margin"
app:cardElevation="0dp" app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_no"> app:layout_constraintTop_toBottomOf="@id/ll_no">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/item_statistics_height"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"> android:foreground="?android:attr/selectableItemBackground">
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
android:id="@+id/tv_right_top" android:id="@+id/tv_right_top"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_text_size_small"
android:textStyle="bold"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_small" android:textSize="@dimen/all_text_size_small"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/img_left" /> app:layout_constraintTop_toTopOf="@id/img_left" />
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
android:id="@+id/tv_right_bottom" android:id="@+id/tv_right_bottom"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding_left_right" android:layout_marginEnd="@dimen/all_text_size_small"
android:text="本店" android:text="本店"
android:textSize="@dimen/all_text_size_small" android:textSize="@dimen/all_text_size_small"
app:layout_constraintBottom_toBottomOf="@id/img_left" app:layout_constraintBottom_toBottomOf="@id/img_left"
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" > android:layout_height="wrap_content" >
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai"
android:layout_alignParentBottom="true" />
<TextView <TextView
android:id="@+id/item_tv" android:id="@+id/item_tv"
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
android:hint="@string/statistics_order_edit_hint" android:hint="@string/statistics_order_edit_hint"
android:inputType="number" android:inputType="number"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai" android:textColorHint="@color/gray_kongming"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_right" app:layout_constraintEnd_toStartOf="@id/iv_right"
......
...@@ -56,15 +56,23 @@ ...@@ -56,15 +56,23 @@
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:padding="@dimen/dp_4"> android:padding="@dimen/dp_4">
<android.support.constraint.ConstraintLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/white_caocao" android:background="@color/white_caocao"
app:layout_constraintBottom_toBottomOf="parent" >
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/tv_amt_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_margin"
android:text="订单金额"
android:textColor="@color/black_baozheng"
/>
<TextView <TextView
android:id="@+id/tv_amt" android:id="@+id/tv_amt"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -75,22 +83,9 @@ ...@@ -75,22 +83,9 @@
android:textColor="@color/red900" android:textColor="@color/red900"
android:textSize="@dimen/all_text_size_big" android:textSize="@dimen/all_text_size_big"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_amt_hint" />
<TextView
android:id="@+id/tv_amt_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_margin"
android:text="订单金额"
android:textColor="@color/black_baozheng"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View <View
android:id="@+id/view1" android:id="@+id/view1"
...@@ -98,14 +93,14 @@ ...@@ -98,14 +93,14 @@
android:layout_height="@dimen/view_line_L1" android:layout_height="@dimen/view_line_L1"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
app:layout_constraintLeft_toLeftOf="parent" />
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_amt" />
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/view1"> android:scrollbars="none"
app:layout_constraintTop_toBottomOf="@id/view1"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -120,13 +115,13 @@ ...@@ -120,13 +115,13 @@
android:paddingEnd="@dimen/dp_4" android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4" android:paddingStart="@dimen/dp_4"
android:paddingTop="@dimen/dp_4" android:paddingTop="@dimen/dp_4"
android:weightSum="2"> android:weightSum="10">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="7"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
...@@ -198,7 +193,7 @@ ...@@ -198,7 +193,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="3"
android:gravity="right" android:gravity="right"
android:orientation="vertical"> android:orientation="vertical">
...@@ -304,99 +299,114 @@ ...@@ -304,99 +299,114 @@
android:layout_height="@dimen/view_line_L1" android:layout_height="@dimen/view_line_L1"
android:background="@color/gray_zhouyu" /> android:background="@color/gray_zhouyu" />
<LinearLayout
android:id="@+id/ll_goods_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding"
android:orientation="vertical"
android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:visibility="gone">
<android.support.constraint.ConstraintLayout
<LinearLayout
android:id="@+id/ll_goods_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white_caocao" android:layout_marginBottom="@dimen/all_padding"
android:paddingEnd="@dimen/all_margin" android:orientation="vertical"
android:paddingStart="@dimen/all_margin"> android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
<TextView android:paddingTop="@dimen/dp_4"
android:id="@+id/tv_name" android:visibility="gone">
android:layout_width="0dp"
android:layout_height="wrap_content" <android.support.constraint.ConstraintLayout
android:maxLines="2" android:layout_width="match_parent"
android:text="品名"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="5"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_count"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="数量"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_price"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_initial_price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/gray"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/tv_price"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/tv_price"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="end" android:background="@color/white_caocao"
android:text="单价" android:paddingEnd="@dimen/dp_4"
android:textColor="@color/black_baozheng" android:paddingStart="@dimen/dp_4">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2" <TextView
app:layout_constraintLeft_toRightOf="@+id/tv_count" android:id="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_amt1" android:layout_width="0dp"
app:layout_constraintTop_toBottomOf="@id/tv_initial_price" /> android:layout_height="wrap_content"
android:maxLines="2"
<TextView android:paddingBottom="@dimen/dp_4"
android:id="@+id/tv_amt1" android:paddingTop="@dimen/dp_4"
android:layout_width="0dp" android:text="品名"
android:layout_height="wrap_content" android:textColor="@color/black_baozheng"
android:gravity="end" app:layout_constraintBottom_toBottomOf="parent"
android:text="小计" app:layout_constraintHorizontal_weight="5"
android:textColor="@color/black_baozheng" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toLeftOf="@+id/tv_count"
app:layout_constraintHorizontal_weight="2" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintLeft_toRightOf="@+id/tv_price"
app:layout_constraintRight_toRightOf="parent" <TextView
app:layout_constraintTop_toTopOf="parent" /> android:id="@+id/tv_count"
android:layout_width="0dp"
</android.support.constraint.ConstraintLayout> android:layout_height="wrap_content"
</LinearLayout> android:gravity="end"
android:paddingBottom="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:text="数量"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_price"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_initial_price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/gray"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/tv_price"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/tv_price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:paddingBottom="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:text="单价"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt1"
app:layout_constraintTop_toBottomOf="@id/tv_initial_price" />
<TextView
android:id="@+id/tv_amt1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:paddingBottom="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:text="小计"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_price"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming"
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</android.support.constraint.ConstraintLayout> </LinearLayout>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
</FrameLayout> </FrameLayout>
</layout> </layout>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<dimen name="all_line_width">0.5dp</dimen> <dimen name="all_line_width">0.5dp</dimen>
<dimen name="all_slight_line_width">0.5dp</dimen> <dimen name="all_slight_line_width">0.5dp</dimen>
<dimen name="all_margin">18dp</dimen> <dimen name="all_margin">18dp</dimen>
<dimen name="all_margin_big_big">40dp</dimen>
<dimen name="all_margin_big">28dp</dimen> <dimen name="all_margin_big">28dp</dimen>
<dimen name="all_spacing">6dp</dimen> <dimen name="all_spacing">6dp</dimen>
<dimen name="all_sub_title_size">20sp</dimen> <dimen name="all_sub_title_size">20sp</dimen>
...@@ -205,7 +206,11 @@ ...@@ -205,7 +206,11 @@
<!--商店--> <!--商店-->
<dimen name="store_cart_count">20dp</dimen> <dimen name="store_cart_count">20dp</dimen>
<!--统计条目-->
<dimen name="item_statistics_height">72dp</dimen>
<dimen name="layout_statistics_bottom_height">56dp</dimen>
<dimen name="layout_statistics_bottom_button_height">35dp</dimen>
<dimen name="layout_statistics_bottom_button_width">105dp</dimen>
<!--新标准--> <!--新标准-->
<dimen name="headline">20dp</dimen> <dimen name="headline">20dp</dimen>
......
...@@ -659,7 +659,7 @@ ...@@ -659,7 +659,7 @@
<string name="statistics_order_edit_hint">请输入单号/手机号</string> <string name="statistics_order_edit_hint">请输入单号/手机号</string>
<string name="statistics_order_detail_hint">订单详情</string> <string name="statistics_order_detail_hint">订单详情</string>
<string name="statistics_vip_recharge_hint">充值记录</string> <string name="statistics_vip_recharge_hint">充值记录</string>
<string name="statistics_used_ticket_hint">充值记录</string> <string name="statistics_used_ticket_hint">优惠券记录</string>
<string name="statistics_inventory_detail_hint">盘库结果</string> <string name="statistics_inventory_detail_hint">盘库结果</string>
<!--商品详情POS--> <!--商品详情POS-->
<string name="oder_detail_date">交易时间:</string> <string name="oder_detail_date">交易时间:</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment