Commit f6b3f276 authored by 王海's avatar 王海

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.idea/modules.xml
#	app/src/main/res/values/strings.xml
parents f0254c63 c4a3caf6
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" />
<module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" /> <module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" />
<module fileurl="file://D:\AndroidStudioProject\TangKuPos\TangKuPos2.iml" filepath="D:\AndroidStudioProject\TangKuPos\TangKuPos2.iml" /> <module fileurl="file://$PROJECT_DIR$/TangKuPos2.iml" filepath="$PROJECT_DIR$/TangKuPos2.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules> </modules>
</component> </component>
......
...@@ -207,7 +207,6 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind ...@@ -207,7 +207,6 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
if (null != mDisp && (!mDisp.isDisposed())) { if (null != mDisp && (!mDisp.isDisposed())) {
mDisp.dispose(); mDisp.dispose();
} }
super.dismiss(); super.dismiss();
} }
} }
......
...@@ -179,7 +179,7 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd ...@@ -179,7 +179,7 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
mScanFragment.setOnScanCompletedListener(new ScanFragment mScanFragment.setOnScanCompletedListener(new ScanFragment
.OnScanCompletedListener() { .OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
pop(); pop();
mPresenter.mBaleSeachShopFragment.seachBarcode(barcode); mPresenter.mBaleSeachShopFragment.seachBarcode(barcode);
start(mPresenter.mBaleSeachShopFragment); start(mPresenter.mBaleSeachShopFragment);
......
...@@ -83,7 +83,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -83,7 +83,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
(new ScanFragment (new ScanFragment
.OnScanCompletedListener() { .OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted public void onScanCompleted
(String barcode) { (String barcode) {
pop(); pop();
loadingDialog.show( loadingDialog.show(
......
...@@ -197,7 +197,7 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -197,7 +197,7 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
mScanFragment = new ScanFragment(); mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
mPresenter.getProductByBarcode(barcode); mPresenter.getProductByBarcode(barcode);
} }
}); });
......
...@@ -27,6 +27,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -27,6 +27,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog; import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.manage.inventory.InventoryPresenter; import com.xingdata.zzdpos.ui.manage.inventory.InventoryPresenter;
import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryAdapter; import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.MyMenuItemDecoration; import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -71,7 +72,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment ...@@ -71,7 +72,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment
Drawable drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai); Drawable drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai);
mInventoryAdapter.bindToRecyclerView( mViewBinding.recyclerInventory); mInventoryAdapter.bindToRecyclerView( mViewBinding.recyclerInventory);
mViewBinding.recyclerInventory.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recyclerInventory.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mInventoryAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerInventory); mInventoryAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerInventory);
......
...@@ -64,7 +64,7 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ...@@ -64,7 +64,7 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
mScanFragment = new ScanFragment(); mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
mOtherListFragment.search(barcode); mOtherListFragment.search(barcode);
} }
}); });
......
...@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.model.Ossku; ...@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter; import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter;
import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter; import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -46,7 +47,7 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -46,7 +47,7 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
@Override @Override
public void initView() { public void initView() {
drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai); drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai);
listItemDecoration = new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable, 0); listItemDecoration = new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(), 16), drawable, 0);
mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>()); mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>());
mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select)); mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select));
mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity()));
...@@ -111,9 +112,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -111,9 +112,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
} }
public void setKeyword(String s){ public void setKeyword(String s) {
mViewBinding.edTitle.setText(s); mViewBinding.edTitle.setText(s);
} }
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.gray_zhouyu); view.setBackgroundResource(R.color.gray_zhouyu);
......
...@@ -57,7 +57,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -57,7 +57,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
mScanFragment = new ScanFragment(); mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
mReplenishmentDetailFragment.scrollToItem(barcode); mReplenishmentDetailFragment.scrollToItem(barcode);
} }
}); });
......
...@@ -24,6 +24,7 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter; ...@@ -24,6 +24,7 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter;
import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter; import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -49,12 +50,12 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent ...@@ -49,12 +50,12 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent
mReplenishmentAdapter = new ReplenishmentAdapter(new ArrayList<>()); mReplenishmentAdapter = new ReplenishmentAdapter(new ArrayList<>());
mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
} else { } else {
mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
} }
mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> { mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> {
......
...@@ -145,7 +145,6 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -145,7 +145,6 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU_EDITOR); this.showTitleBarByTitleMode(C.TITLE_MODE.SKU_EDITOR);
mViewBinding.tvEditorHint.setText("已有"); mViewBinding.tvEditorHint.setText("已有");
mViewBinding.tvEditorHint.setBackgroundResource(R.drawable.shape_orange_r1); mViewBinding.tvEditorHint.setBackgroundResource(R.drawable.shape_orange_r1);
mViewBinding.tvTitle.setText(R.string.sssku_add); mViewBinding.tvTitle.setText(R.string.sssku_add);
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.ADD)); this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.ADD));
break; break;
......
...@@ -226,7 +226,7 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -226,7 +226,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId || mSkuGrpId == 0L) { if (sssku1.getSkuGrpId().longValue() == mSkuGrpId || mSkuGrpId == 0L) {
mView.updateSku(sssku1); mView.updateSku(sssku1);
} else { } else {
mView.deleteSku(sssku1.getSkuId()); mView.deleteSku(sssku1.getId());
} }
}, throwable -> mView.showMsg(throwable.getMessage())); }, throwable -> mView.showMsg(throwable.getMessage()));
break; break;
......
...@@ -5,6 +5,7 @@ import android.annotation.SuppressLint; ...@@ -5,6 +5,7 @@ import android.annotation.SuppressLint;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.widget.TextView;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
...@@ -60,6 +61,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -60,6 +61,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(R.string.sku_empty_hint);
mSkuAdapter.setEmptyView(view); mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
...@@ -80,7 +82,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -80,7 +82,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
mViewBinding.srlSku.setRefreshing(false); mViewBinding.srlSku.setRefreshing(false);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(false);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
...@@ -108,10 +110,13 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -108,10 +110,13 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
public void loadSkugrpState(Long skugrpId) { public void loadSkugrpState(Long skugrpId) {
for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) { for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) {
if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) { if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) {
int oldSelected = mSkugrpAdapter.getSelectedPosition();
mSkugrpAdapter.setSelectedPosition(i); mSkugrpAdapter.setSelectedPosition(i);
mSkugrpAdapter.notifyItemChanged(oldSelected);
mSkugrpAdapter.notifyItemChanged(i);
break;
} }
} }
mSkugrpAdapter.notifyDataSetChanged();
} }
/** /**
...@@ -151,7 +156,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -151,7 +156,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
*/ */
public void updateSku(Sssku sssku) { public void updateSku(Sssku sssku) {
for (int i = 0; i < mSkuAdapter.getData().size(); i++) { for (int i = 0; i < mSkuAdapter.getData().size(); i++) {
if (mSkuAdapter.getData().get(i).getSkuId().longValue() == sssku.getSkuId().longValue()) { if (mSkuAdapter.getData().get(i).getId().longValue() == sssku.getSkuId().longValue()) {
mSkuAdapter.setData(i, sssku); mSkuAdapter.setData(i, sssku);
return; return;
} }
...@@ -165,7 +170,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -165,7 +170,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
*/ */
public void deleteSku(Long skuId) { public void deleteSku(Long skuId) {
for (int i = 0; i < mSkuAdapter.getData().size(); i++) { for (int i = 0; i < mSkuAdapter.getData().size(); i++) {
if (mSkuAdapter.getData().get(i).getSkuId().longValue() == skuId) { if (mSkuAdapter.getData().get(i).getId().longValue() == skuId) {
mSkuAdapter.remove(i); mSkuAdapter.remove(i);
return; return;
} }
......
...@@ -71,7 +71,7 @@ public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSe ...@@ -71,7 +71,7 @@ public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSe
mSkuAdapter.setEnableLoadMore(true); mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
...@@ -95,7 +95,6 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> { ...@@ -95,7 +95,6 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> {
strType = mContext.getResources().getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName()); strType = mContext.getResources().getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
break; break;
} }
return strGroup + strType; return strGroup + strType;
} }
} }
...@@ -56,7 +56,7 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager ...@@ -56,7 +56,7 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager
mViewBinding.srlMs.setRefreshing(false); mViewBinding.srlMs.setRefreshing(false);
mMsAdapter.setNewData(mss); mMsAdapter.setNewData(mss);
} else if (mss.size() > 0) mMsAdapter.addData(mss); } else if (mss.size() > 0) mMsAdapter.addData(mss);
if (mss.size() < C.PRODUCT.PAGE_SIZE) mMsAdapter.loadMoreEnd(isRefresh); if (mss.size() <= C.PRODUCT.PAGE_SIZE) mMsAdapter.loadMoreEnd(isRefresh);
else mMsAdapter.loadMoreComplete(); else mMsAdapter.loadMoreComplete();
} }
......
...@@ -69,7 +69,7 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente ...@@ -69,7 +69,7 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente
mSkuAdapter.setEnableLoadMore(true); mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
...@@ -2,6 +2,8 @@ package com.xingdata.zzdpos.ui.marketing.ms.view; ...@@ -2,6 +2,8 @@ package com.xingdata.zzdpos.ui.marketing.ms.view;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
...@@ -11,11 +13,27 @@ import com.xingdata.zzdpos.model.Ms; ...@@ -11,11 +13,27 @@ import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.InputFilters; import com.xingdata.zzdpos.util.InputFilters;
/** /**
* 满减返现页面 * 满减返现页面
*/ */
public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
private View.OnFocusChangeListener mOnFocusChangeListener;
public TypeMoneyOffView() {
mOnFocusChangeListener = (view, b) -> {
if (view instanceof EditText) {
EditText editText = (EditText) view;
if (b && editText.getText().toString().equals("0.00")) {
editText.setText("");
} else if (!b && editText.getText().length() == 0) {
editText.setText("0.00");
}
}
};
}
@Override @Override
public int getLayoutId() { public int getLayoutId() {
return R.layout.view_type_money_off; return R.layout.view_type_money_off;
...@@ -44,7 +62,6 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { ...@@ -44,7 +62,6 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
} }
} }
}); });
mViewBinding.etDisAmt.addTextChangedListener(new TextWatcher() { mViewBinding.etDisAmt.addTextChangedListener(new TextWatcher() {
@Override @Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
...@@ -62,6 +79,9 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { ...@@ -62,6 +79,9 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
} }
} }
}); });
mViewBinding.etAmt.setOnFocusChangeListener(mOnFocusChangeListener);
mViewBinding.etDisAmt.setOnFocusChangeListener(mOnFocusChangeListener);
} }
@Override @Override
...@@ -77,11 +97,13 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { ...@@ -77,11 +97,13 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
String strAmt = mViewBinding.etAmt.getText().toString(); String strAmt = mViewBinding.etAmt.getText().toString();
if (StringUtils.isEmpty(strAmt)) return false; if (StringUtils.isEmpty(strAmt)) return false;
if (ConvertUtil.yuanToFen(strAmt) <= 0) return false;
ms.setPayAmt(ConvertUtil.yuanToFen(strAmt)); ms.setPayAmt(ConvertUtil.yuanToFen(strAmt));
String strDisAmt = mViewBinding.etDisAmt.getText().toString(); String strDisAmt = mViewBinding.etDisAmt.getText().toString();
if (StringUtils.isEmpty(strDisAmt)) return false; if (StringUtils.isEmpty(strDisAmt)) return false;
if (ConvertUtil.yuanToFen(strDisAmt) > ConvertUtil.yuanToFen(strAmt)) return false; if (ConvertUtil.yuanToFen(strDisAmt) > ConvertUtil.yuanToFen(strAmt)) return false;
if (ConvertUtil.yuanToFen(strDisAmt) <= 0) return false;
ms.setGiftOffAmt(ConvertUtil.yuanToFen(strDisAmt)); ms.setGiftOffAmt(ConvertUtil.yuanToFen(strDisAmt));
return true; return true;
......
...@@ -23,6 +23,7 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -23,6 +23,7 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
} }
private OnScanCompletedListener mOnScanCompletedListener; private OnScanCompletedListener mOnScanCompletedListener;
private OnBackPressedListener mOnBackPressedListener;
public OnScanCompletedListener getOnScanCompletedListener() { public OnScanCompletedListener getOnScanCompletedListener() {
return mOnScanCompletedListener; return mOnScanCompletedListener;
...@@ -32,8 +33,20 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -32,8 +33,20 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
this.mOnScanCompletedListener = onScanCompletedListener; this.mOnScanCompletedListener = onScanCompletedListener;
} }
public OnBackPressedListener getOnBackPressedListener() {
return mOnBackPressedListener;
}
public void setOnBackPressedListener(OnBackPressedListener onBackPressedListener) {
this.mOnBackPressedListener = onBackPressedListener;
}
public interface OnScanCompletedListener { public interface OnScanCompletedListener {
void OnScanCompleted(String barcode); void onScanCompleted(String barcode);
}
public interface OnBackPressedListener {
void onBackPressed();
} }
@Override @Override
...@@ -44,14 +57,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -44,14 +57,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
return new ScanFragment.CustomViewFinderView(context); return new ScanFragment.CustomViewFinderView(context);
} }
}; };
mResultHandler = result -> { mResultHandler = result -> {
if (mOnScanCompletedListener != null) { if (mOnScanCompletedListener != null) {
mOnScanCompletedListener.OnScanCompleted(result.getText()); mOnScanCompletedListener.onScanCompleted(result.getText());
} }
resetScanner(); resetScanner();
}; };
mScannerView.setResultHandler(mResultHandler); mScannerView.setResultHandler(mResultHandler);
mViewBinding.contentFrame.addView(mScannerView); mViewBinding.contentFrame.addView(mScannerView);
} }
...@@ -75,6 +86,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -75,6 +86,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
new Handler().postDelayed(() -> mScannerView.resumeCameraPreview(mResultHandler), 1000); new Handler().postDelayed(() -> mScannerView.resumeCameraPreview(mResultHandler), 1000);
} }
@Override
public boolean onBackPressedSupport() {
if (mOnBackPressedListener != null) mOnBackPressedListener.onBackPressed();
return super.onBackPressedSupport();
}
private static class CustomViewFinderView extends ViewFinderView { private static class CustomViewFinderView extends ViewFinderView {
public CustomViewFinderView(Context context) { public CustomViewFinderView(Context context) {
......
...@@ -56,10 +56,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -56,10 +56,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
public void initView() { public void initView() {
this.loadRootFragment(R.id.f_settle, mSettleFragment); this.loadRootFragment(R.id.f_settle, mSettleFragment);
mViewBinding.setTitleMode(C.TITLE_MODE.TEXT); mViewBinding.setTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.btnBack.setOnClickListener(view -> { mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
getTopFragment().onBackPressedSupport();
onBackPressedSupport();
});
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> { mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH) { if (i == EditorInfo.IME_ACTION_SEARCH) {
KeyboardUtils.hideSoftInput(textView); KeyboardUtils.hideSoftInput(textView);
...@@ -73,6 +70,10 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -73,6 +70,10 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
}); });
} }
@Override
public void onBackPressedSupport() {
}
@Override @Override
public void showMsg(String msg) { public void showMsg(String msg) {
ToastUtils.showShort(msg); ToastUtils.showShort(msg);
...@@ -133,6 +134,8 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -133,6 +134,8 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
public void showPayFragment(Saleorder saleorder) { public void showPayFragment(Saleorder saleorder) {
switch (saleorder.getPayType()) { switch (saleorder.getPayType()) {
case C.PAY_CHANNEL.CASH: case C.PAY_CHANNEL.CASH:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.settle_channel_cash);
this.start(mCashPayFragment.setSaleorder(saleorder)); this.start(mCashPayFragment.setSaleorder(saleorder));
break; break;
case C.PAY_CHANNEL.TALLY: case C.PAY_CHANNEL.TALLY:
...@@ -140,18 +143,25 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -140,18 +143,25 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
mPasswordDialog.setSaleorder(saleorder).show(this); mPasswordDialog.setSaleorder(saleorder).show(this);
break; break;
case C.PAY_CHANNEL.BANK: case C.PAY_CHANNEL.BANK:
break;
case C.PAY_CHANNEL.ALI: case C.PAY_CHANNEL.ALI:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.settle_channel_ali);
mScanFragment.setOnScanCompletedListener(barcode -> { mScanFragment.setOnScanCompletedListener(barcode -> {
this.pop(); this.pop();
mPresenter.payInAli(barcode); mPresenter.payInAli(barcode);
}); });
mScanFragment.setOnBackPressedListener(this::backToSettleFragment);
this.start(mScanFragment); this.start(mScanFragment);
break; break;
case C.PAY_CHANNEL.WECHAT: case C.PAY_CHANNEL.WECHAT:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.settle_channel_wechat);
mScanFragment.setOnScanCompletedListener(barcode -> { mScanFragment.setOnScanCompletedListener(barcode -> {
this.pop(); this.pop();
mPresenter.payInWechat(barcode); mPresenter.payInWechat(barcode);
}); });
mScanFragment.setOnBackPressedListener(this::backToSettleFragment);
this.start(mScanFragment); this.start(mScanFragment);
break; break;
} }
......
...@@ -4,6 +4,7 @@ import com.xingdata.zzdpos.R; ...@@ -4,6 +4,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentPayCashBinding; import com.xingdata.zzdpos.databinding.FragmentPayCashBinding;
import com.xingdata.zzdpos.model.Saleorder; import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.settle.SettlePresenter; import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.view.InputerView; import com.xingdata.zzdpos.ui.settle.view.InputerView;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
...@@ -68,4 +69,9 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa ...@@ -68,4 +69,9 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa
} }
} }
@Override
public boolean onBackPressedSupport() {
((SettleActivity) getActivity()).backToSettleFragment();
return super.onBackPressedSupport();
}
} }
...@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.ui.settle.fragment; ...@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.ui.settle.fragment;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.BottomSheetBehavior;
import android.support.v4.app.ActivityCompat;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.StaggeredGridLayoutManager; import android.support.v7.widget.StaggeredGridLayoutManager;
...@@ -80,8 +81,10 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle ...@@ -80,8 +81,10 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
if (BottomSheetBehavior.from(mViewBinding.llSheet).getState() == BottomSheetBehavior.STATE_EXPANDED) { if (BottomSheetBehavior.from(mViewBinding.llSheet).getState() == BottomSheetBehavior.STATE_EXPANDED) {
BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_COLLAPSED); BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_COLLAPSED);
return true; return true;
} else {
ActivityCompat.finishAfterTransition(getActivity());
return super.onBackPressedSupport();
} }
return super.onBackPressedSupport();
} }
/** /**
...@@ -95,6 +98,7 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle ...@@ -95,6 +98,7 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
mViewBinding.llStore.setVisibility(View.GONE); mViewBinding.llStore.setVisibility(View.GONE);
mPresenter.initPaymentInfo(); mPresenter.initPaymentInfo();
BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_EXPANDED); BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_EXPANDED);
mViewBinding.tvSettle.setAlpha(0);
break; break;
case C.SETTLE_MODE.STORE: case C.SETTLE_MODE.STORE:
mViewBinding.llStore.setVisibility(View.VISIBLE); mViewBinding.llStore.setVisibility(View.VISIBLE);
......
...@@ -51,6 +51,10 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip ...@@ -51,6 +51,10 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
if (vips.size() == 1) { if (vips.size() == 1) {
mPresenter.selectVip(vips.get(0)); mPresenter.selectVip(vips.get(0));
this.pop(); this.pop();
} else if (vips.size() == 0) {
mVipAdapter.setNewData(vips);
mViewBinding.setEmpty(vips.size() == 0);
((TextView) mVipAdapter.getEmptyView().findViewById(R.id.tv_empty)).setText(R.string.settle_vip_search_none);
} else { } else {
mViewBinding.setEmpty(vips.size() == 0); mViewBinding.setEmpty(vips.size() == 0);
mVipAdapter.setNewData(vips); mVipAdapter.setNewData(vips);
......
...@@ -38,7 +38,7 @@ public class StatisticsRechargeGroupAdapter extends BaseSectionQuickAdapter<VipR ...@@ -38,7 +38,7 @@ public class StatisticsRechargeGroupAdapter extends BaseSectionQuickAdapter<VipR
helper.setText(R.id.tv_left_top,item.getUserName()); helper.setText(R.id.tv_left_top,item.getUserName());
helper.setText(R.id.tv_left_bottom,com.blankj.utilcode.util.TimeUtils.millis2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern))); helper.setText(R.id.tv_left_bottom,com.blankj.utilcode.util.TimeUtils.millis2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern)));
helper.setText(R.id.tv_right_top,"+"+ ConvertUtil.fenToYuan(item.getCardAmtPay(),false)); helper.setText(R.id.tv_right_top,"+"+ ConvertUtil.fenToYuan(item.getCardAmtPay(),false));
((ImageView)helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_text_recharge); ((ImageView)helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_filling);
} }
......
...@@ -35,7 +35,7 @@ public class StatisticsTicketGroupAdapter extends BaseSectionQuickAdapter<Ticket ...@@ -35,7 +35,7 @@ public class StatisticsTicketGroupAdapter extends BaseSectionQuickAdapter<Ticket
protected void convert(BaseViewHolder helper, Ticket item) { protected void convert(BaseViewHolder helper, Ticket item) {
helper.setText(R.id.tv_left_top, ConvertUtil.fenToYuanNoZero(item.getTicketValAmt()) + "元优惠券"); helper.setText(R.id.tv_left_top, ConvertUtil.fenToYuanNoZero(item.getTicketValAmt()) + "元优惠券");
helper.setText(R.id.tv_left_bottom, TimeUtils.date2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern))); helper.setText(R.id.tv_left_bottom, TimeUtils.date2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern)));
((ImageView) helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_text_ticket); ((ImageView) helper.getView(R.id.img_left)).setImageResource(R.mipmap.icon_record);
} }
......
...@@ -87,7 +87,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -87,7 +87,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
mSkuAdapter.setEnableLoadMore(true); mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
...@@ -72,11 +72,13 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -72,11 +72,13 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
mViewBinding.tvSearch.setOnClickListener(view -> mPresenter.searchBarFocusChanged(true)); mViewBinding.tvSearch.setOnClickListener(view -> mPresenter.searchBarFocusChanged(true));
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View emptyView = getLayoutInflater().inflate(R.layout.view_empty, null);
mSkuAdapter.setEmptyView(view); mSkuAdapter.setEmptyView(emptyView);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
// init data // init data
mPresenter.initStore(); mPresenter.initStore();
} }
...@@ -114,10 +116,13 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -114,10 +116,13 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
public void loadSkugrpState(Long skugrpId) { public void loadSkugrpState(Long skugrpId) {
for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) { for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) {
if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) { if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) {
int oldSelected = mSkugrpAdapter.getSelectedPosition();
mSkugrpAdapter.setSelectedPosition(i); mSkugrpAdapter.setSelectedPosition(i);
mSkugrpAdapter.notifyItemChanged(oldSelected);
mSkugrpAdapter.notifyItemChanged(i);
break;
} }
} }
mSkugrpAdapter.notifyDataSetChanged();
} }
/** /**
...@@ -213,7 +218,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -213,7 +218,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
mViewBinding.srlSku.setRefreshing(false); mViewBinding.srlSku.setRefreshing(false);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(false);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
...@@ -8,8 +8,6 @@ import android.annotation.SuppressLint; ...@@ -8,8 +8,6 @@ import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.view.Gravity; import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RadioButton; import android.widget.RadioButton;
...@@ -71,7 +69,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB ...@@ -71,7 +69,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
}); });
scanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { scanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
ToastUtils.showShort(barcode); ToastUtils.showShort(barcode);
scanFragment.pop(); scanFragment.pop();
} }
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
android:id="@+id/et_search" android:id="@+id/et_search"
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:hint="@string/store_search_hint" android:hint="@string/store_search_hint"
android:inputType="text" android:inputType="text"
...@@ -223,7 +222,7 @@ ...@@ -223,7 +222,7 @@
android:id="@+id/fl_logo" android:id="@+id/fl_logo"
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_margin_big" android:layout_marginStart="@dimen/all_margin"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
app:layout_constraintBottom_toBottomOf="@id/tv_settle" app:layout_constraintBottom_toBottomOf="@id/tv_settle"
app:layout_constraintLeft_toLeftOf="@id/fl_cart"> app:layout_constraintLeft_toLeftOf="@id/fl_cart">
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:gravity="center_vertical|end" android:gravity="center_vertical|end"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin" android:paddingStart="@dimen/all_margin"
app:layout_constraintBottom_toTopOf="@id/rl_cart" app:layout_constraintBottom_toTopOf="@id/rl_cart"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -80,12 +80,10 @@ ...@@ -80,12 +80,10 @@
<TextView <TextView
android:id="@+id/tv_clear" android:id="@+id/tv_clear"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:foreground="?android:attr/selectableItemBackground" android:gravity="center"
android:paddingBottom="@dimen/all_spacing" android:paddingEnd="@dimen/all_margin"
android:paddingEnd="@dimen/all_margin_big" android:paddingStart="@dimen/all_margin"
android:paddingStart="@dimen/all_margin_big"
android:paddingTop="@dimen/all_spacing"
android:text="@string/store_clear_all" android:text="@string/store_clear_all"
android:textColor="@color/black_baozheng" /> android:textColor="@color/black_baozheng" />
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small" android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding" android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding" android:layout_marginStart="@dimen/all_bounced_padding"
...@@ -35,6 +34,7 @@ ...@@ -35,6 +34,7 @@
android:drawablePadding="@dimen/all_padding" android:drawablePadding="@dimen/all_padding"
android:hint="@string/other_select_edit_hint" android:hint="@string/other_select_edit_hint"
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
android:inputType="number"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
......
...@@ -56,7 +56,13 @@ ...@@ -56,7 +56,13 @@
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"> android:paddingStart="@null">
<ImageView
android:layout_width="@dimen/all_margin"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@mipmap/point" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -77,7 +83,7 @@ ...@@ -77,7 +83,7 @@
android:lines="1" android:lines="1"
android:text="@{name}" android:text="@{name}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
...@@ -147,7 +153,7 @@ ...@@ -147,7 +153,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{dateStart}" android:text="@{dateStart}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
...@@ -184,7 +190,7 @@ ...@@ -184,7 +190,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{dateEnd}" android:text="@{dateEnd}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<ViewStub <ViewStub
...@@ -239,7 +245,7 @@ ...@@ -239,7 +245,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{user}" android:text="@{user}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -275,7 +281,7 @@ ...@@ -275,7 +281,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{area}" android:text="@{area}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
......
...@@ -94,9 +94,7 @@ ...@@ -94,9 +94,7 @@
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="parent" app:layout_constraintTop_toBottomOf="parent"
app:placeholderImage="@mipmap/img_number01" app:placeholderImage="@mipmap/img_number01"
app:roundAsCircle="true" app:roundAsCircle="true" />
app:roundingBorderColor="@color/gray_huanggai"
app:roundingBorderWidth="@dimen/all_line_width" />
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
...@@ -122,7 +120,7 @@ ...@@ -122,7 +120,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{name}" android:text="@{name}"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_text_size" />
<TextView <TextView
...@@ -150,7 +148,7 @@ ...@@ -150,7 +148,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}" android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
android:visibility="@{defualtVip?View.INVISIBLE:View.VISIBLE}" android:visibility="@{defualtVip?View.INVISIBLE:View.VISIBLE}"
app:layout_constraintBottom_toTopOf="parent" app:layout_constraintBottom_toTopOf="parent"
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textColor="@color/black_likui" android:text="@string/store_search_hint"
android:text="@string/store_search_hint" /> android:textColor="@color/black_likui" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingBottom="@dimen/all_margin" android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"> android:paddingTop="@dimen/all_margin"
android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
......
...@@ -42,20 +42,20 @@ ...@@ -42,20 +42,20 @@
android:background="@color/gray_huanggai" /> android:background="@color/gray_huanggai" />
</FrameLayout> </FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_ms" android:id="@+id/ll_ms"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginBottom="@dimen/all_spacing"
android:layout_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_spacing"
android:background="@drawable/shape_black_b1" android:background="@drawable/shape_black_b1"
android:foreground="?attr/selectableItemBackground" android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:visibility="@{msCount>0 ?View.VISIBLE:View.GONE}"> android:visibility="@{msCount>0?View.VISIBLE:View.GONE}">
<TextView <TextView
android:id="@+id/tv_ms_type" android:id="@+id/tv_ms_type"
...@@ -89,9 +89,9 @@ ...@@ -89,9 +89,9 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="0dp"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai" /> android:visibility="@{msCount>0?View.GONE:View.VISIBLE}" />
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_store" android:id="@+id/cl_store"
...@@ -124,6 +124,12 @@ ...@@ -124,6 +124,12 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout> </android.support.v4.widget.SwipeRefreshLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</LinearLayout> </LinearLayout>
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
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:foreground="?attr/selectableItemBackground" android:background="@color/white_caocao"
android:background="@drawable/singleline_white_gray"> android:foreground="?attr/selectableItemBackground">
<LinearLayout <LinearLayout
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1" android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+spuUnitName}" android:text="@{@string/sku_size+spuUnitName}"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
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:background="@color/white_caocao"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin" android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"> android:paddingTop="@dimen/all_margin">
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/store_reduce" android:contentDescription="@string/store_reduce"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_margin"
android:src="@mipmap/but_reduce" android:src="@mipmap/but_reduce"
android:visibility="gone" /> android:visibility="gone" />
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing" android:layout_marginStart="@dimen/all_spacing"
android:text='@{count+""}' android:text='@{count+""}'
android:textColor="@color/black_likui" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" android:textSize="@dimen/all_sub_title_size"
android:visibility="gone" /> android:visibility="gone" />
...@@ -99,14 +99,13 @@ ...@@ -99,14 +99,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/store_increase" android:contentDescription="@string/store_increase"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_margin"
android:src="@mipmap/but_increase02" /> android:src="@mipmap/but_increase02" />
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_kongming" android:background="@color/gray_kongming"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
......
...@@ -59,7 +59,13 @@ ...@@ -59,7 +59,13 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"> android:paddingStart="@null">
<ImageView
android:layout_width="@dimen/all_margin"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@mipmap/point" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -79,7 +85,7 @@ ...@@ -79,7 +85,7 @@
android:inputType="number" android:inputType="number"
android:maxLength="2" android:maxLength="2"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
android:background="@color/transparent" android:background="@color/transparent"
android:inputType="numberDecimal" android:inputType="numberDecimal"
android:labelFor="@+id/et_amt" android:labelFor="@+id/et_amt"
android:saveEnabled="false" /> android:saveEnabled="false"
android:textSize="@dimen/all_body_size" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -75,7 +76,8 @@ ...@@ -75,7 +76,8 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@color/transparent" android:background="@color/transparent"
android:inputType="numberDecimal" android:inputType="numberDecimal"
android:labelFor="@+id/et_dis_amt" /> android:labelFor="@+id/et_dis_amt"
android:textSize="@dimen/all_body_size" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -230,9 +230,9 @@ ...@@ -230,9 +230,9 @@
<dimen name="button1_marginHorizontal">24dp</dimen> <dimen name="button1_marginHorizontal">24dp</dimen>
<dimen name="button1_width">120dp</dimen> <dimen name="button1_width">120dp</dimen>
<dimen name="button2_height">35dp</dimen> <dimen name="button2_height">@dimen/button1_height</dimen>
<dimen name="button2_marginHorizontal">16dp</dimen> <dimen name="button2_marginHorizontal">@dimen/button1_marginHorizontal</dimen>
<dimen name="button2_width">105dp</dimen> <dimen name="button2_width">@dimen/button1_width</dimen>
<dimen name="button3_height">44dp</dimen> <dimen name="button3_height">44dp</dimen>
<dimen name="button3_marginHorizontal">16dp</dimen> <dimen name="button3_marginHorizontal">16dp</dimen>
......
...@@ -162,15 +162,15 @@ ...@@ -162,15 +162,15 @@
<string name="card_num_hint">请输入储值卡卡号</string> <string name="card_num_hint">请输入储值卡卡号</string>
<!--结算页面 <WHERE>_<DESCRIPTION>--> <!--结算页面 <WHERE>_<DESCRIPTION>-->
<string name="settle_channel_hint">请选择支付方式</string> <string name="settle_channel_hint">请选择支付方式</string>
<string name="settle_channel_cash">现金</string> <string name="settle_channel_cash">现金支付</string>
<string name="settle_channel_cash_not_enough">金额不足,无法支付</string> <string name="settle_channel_cash_not_enough">金额不足,无法支付</string>
<string name="settle_channel_wechat">微信</string> <string name="settle_channel_wechat">微信支付</string>
<string name="settle_channel_wechat_hint">正在进行微信支付…</string> <string name="settle_channel_wechat_hint">正在进行微信支付…</string>
<string name="settle_channel_ali">支付宝</string> <string name="settle_channel_ali">支付宝支付</string>
<string name="settle_channel_ali_hint">正在进行支付宝支付…</string> <string name="settle_channel_ali_hint">正在进行支付宝支付…</string>
<string name="settle_channel_bank">银行卡</string> <string name="settle_channel_bank">银行卡支付</string>
<string name="settle_channel_bank_hint">正在POS机上完成刷卡支付…</string> <string name="settle_channel_bank_hint">正在POS机上完成刷卡支付…</string>
<string name="settle_channel_card">会员卡</string> <string name="settle_channel_card">会员卡支付</string>
<string name="settle_channel_card_hint">请提醒客户在副屏输入密码</string> <string name="settle_channel_card_hint">请提醒客户在副屏输入密码</string>
<string name="settle_channel_card_reset_hint">【在副屏连击三次确认按钮,则重置密码】</string> <string name="settle_channel_card_reset_hint">【在副屏连击三次确认按钮,则重置密码】</string>
<string name="settle_channel_balance">余额</string> <string name="settle_channel_balance">余额</string>
...@@ -583,6 +583,7 @@ ...@@ -583,6 +583,7 @@
<string name="settle_vip_search_hint">请输入会员手机号</string> <string name="settle_vip_search_hint">请输入会员手机号</string>
<string name="settle_vip_search_empty">请输入会员手机号进行搜索~</string> <string name="settle_vip_search_empty">请输入会员手机号进行搜索~</string>
<string name="settle_vip_search_empty_no_seach">没有搜到此会员</string> <string name="settle_vip_search_empty_no_seach">没有搜到此会员</string>
<string name="settle_vip_search_none">没有搜到此会员~</string>
<string name="settle_vip_none">不需要会员</string> <string name="settle_vip_none">不需要会员</string>
<!--支付里的优惠券--> <!--支付里的优惠券-->
...@@ -731,5 +732,8 @@ ...@@ -731,5 +732,8 @@
<string name="sku_update_vip">调整会员</string> <string name="sku_update_vip">调整会员</string>
<string name="sku_name_hint">请输入商品名称</string> <string name="sku_name_hint">请输入商品名称</string>
<string name="sku_empty_hint">没有找到对应商品~</string>
</resources> </resources>
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