Commit 4a724a45 authored by 姜敏's avatar 姜敏

Merge remote-tracking branch 'origin/master'

parents 81b679a7 3af279c7
...@@ -28,6 +28,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -28,6 +28,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.bale.BalePresenter; import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
import com.xingdata.zzdpos.ui.manage.bale.adpter.EditFragmentImgShopAdapter; import com.xingdata.zzdpos.ui.manage.bale.adpter.EditFragmentImgShopAdapter;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.InputFilters; import com.xingdata.zzdpos.util.InputFilters;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
...@@ -155,6 +156,23 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd ...@@ -155,6 +156,23 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
}).show((BaseActivity) getActivity()); }).show((BaseActivity) getActivity());
}
break;
case R.id.btn_scan: {
ScanFragment mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment
.OnScanCompletedListener() {
@Override
public void OnScanCompleted(String barcode) {
pop();
mPresenter.mBaleSeachShopFragment.seachBarcode(barcode);
start(mPresenter.mBaleSeachShopFragment);
}
});
if (!mScanFragment.isAdded()) {
start(mScanFragment);
}
} }
break; break;
} }
......
...@@ -18,6 +18,7 @@ import com.xingdata.zzdpos.model.Ussku; ...@@ -18,6 +18,7 @@ import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.BalePresenter; import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
import com.xingdata.zzdpos.ui.manage.bale.adpter.BaleIndexAdapter; import com.xingdata.zzdpos.ui.manage.bale.adpter.BaleIndexAdapter;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -74,6 +75,28 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -74,6 +75,28 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
ActivityUtils.finishActivity(getActivity()); ActivityUtils.finishActivity(getActivity());
} }
break; break;
case R.id.btn_scan: {
ScanFragment mScanFragment = new
ScanFragment();
mScanFragment.setOnScanCompletedListener
(new ScanFragment
.OnScanCompletedListener() {
@Override
public void OnScanCompleted
(String barcode) {
pop();
loadingDialog.show(
(BaseActivity)
getActivity());
mPresenter.usskuQuery
(barcode, loadingDialog);
}
});
if (!mScanFragment.isAdded()) {
start(mScanFragment);
}
}
break;
default: { default: {
} }
......
...@@ -5,7 +5,6 @@ import android.view.KeyEvent; ...@@ -5,7 +5,6 @@ import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.util.KeyboardUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -39,13 +38,8 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS ...@@ -39,13 +38,8 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS
} }
break; break;
case R.id.btn_seach: { case R.id.btn_seach: {
loadingDialog.show((BaseActivity) seach(mViewBinding.etKeyword
getActivity()); .getText().toString());
mPresenter.usskuQuery(mViewBinding
.etKeyword.getText()
.toString(),
loadingDialog);
pop();
} }
break; break;
default: { default: {
...@@ -61,14 +55,8 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS ...@@ -61,14 +55,8 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS
public boolean onEditorAction public boolean onEditorAction
(TextView textView, int i, (TextView textView, int i,
KeyEvent keyEvent) { KeyEvent keyEvent) {
loadingDialog.show((BaseActivity) seach(mViewBinding.etKeyword
getActivity()); .getText().toString());
mPresenter.usskuQuery(mViewBinding
.etKeyword
.getText()
.toString(),
loadingDialog);
pop();
return false; return false;
} }
} }
...@@ -77,4 +65,10 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS ...@@ -77,4 +65,10 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS
Global.setFocus(mViewBinding.etKeyword, getActivity()); Global.setFocus(mViewBinding.etKeyword, getActivity());
} }
public void seach(String str) {
loadingDialog.show((BaseActivity)
getActivity());
mPresenter.usskuQuery(str, loadingDialog);
pop();
}
} }
...@@ -34,6 +34,7 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter, ...@@ -34,6 +34,7 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter,
private boolean isAddData = false; private boolean isAddData = false;
private List<Sssku> nowData = new ArrayList<>(); private List<Sssku> nowData = new ArrayList<>();
public String barCode = null;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -61,7 +62,16 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter, ...@@ -61,7 +62,16 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter,
getEmptyView("没有数据"); getEmptyView("没有数据");
} }
loadingDialog.show((BaseActivity) getActivity()); loadingDialog.show((BaseActivity) getActivity());
mPresenter.queryShopItem(mViewBinding.etKeyword.getText().toString(), true, loadingDialog); if (barCode != null) {
mViewBinding.etKeyword.setText(barCode);
mPresenter.queryShopItem(barCode, true,
loadingDialog);
} else {
mPresenter.queryShopItem(mViewBinding.etKeyword.getText().toString(), true,
loadingDialog);
}
mViewBinding.setOnClickListener(new OnClickListener() { mViewBinding.setOnClickListener(new OnClickListener() {
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
...@@ -170,6 +180,9 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter, ...@@ -170,6 +180,9 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter,
} }
} }
public void seachBarcode(String barCode) {
this.barCode = barCode;
}
/** /**
* 获取空页面 * 获取空页面
......
...@@ -3,9 +3,13 @@ package com.xingdata.zzdpos.ui.manage.inventory; ...@@ -3,9 +3,13 @@ package com.xingdata.zzdpos.ui.manage.inventory;
import android.content.Intent; import android.content.Intent;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View;
import com.blankj.utilcode.constant.PermissionConstants;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.FragmentUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.PermissionUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityInventoryBinding; import com.xingdata.zzdpos.databinding.ActivityInventoryBinding;
...@@ -17,8 +21,10 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -17,8 +21,10 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryAddFragment; import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryAddFragment;
import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryFragment; import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryFragment;
import com.xingdata.zzdpos.ui.manage.manageMenu.ManageDateFragment; import com.xingdata.zzdpos.ui.manage.manageMenu.ManageDateFragment;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.util.Global; import com.xingdata.zzdpos.util.Global;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.List; import java.util.List;
...@@ -27,8 +33,10 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -27,8 +33,10 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
implements InventoryContract.View { implements InventoryContract.View {
private InventoryFragment mInventoryFragment = new InventoryFragment(); private InventoryFragment mInventoryFragment = new InventoryFragment();
private ManageDateFragment mManageDateFragment = new ManageDateFragment(); private ManageDateFragment mManageDateFragment = new ManageDateFragment();
private InventoryAddFragment mInventoryAddFragment; private InventoryAddFragment mInventoryAddFragment = new InventoryAddFragment();
;
LoadingDialog mLoadingDialog = new LoadingDialog(); LoadingDialog mLoadingDialog = new LoadingDialog();
private ScanFragment mScanFragment;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -38,13 +46,35 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -38,13 +46,35 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
@Override @Override
public void initView() { public void initView() {
loadRootFragment(R.id.f_bottom, mInventoryFragment, true, false); loadRootFragment(R.id.f_bottom, mInventoryFragment, true, false);
initTitle();
}
private void initTitle() {
mViewBinding.icTitle.edTitle.setVisibility(View.GONE);
mViewBinding.icTitle.tvTitle.setVisibility(View.VISIBLE);
changeTitle("盘库记录", false);
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
if (mInventoryAddFragment.isAdded()) {
mInventoryAddFragment.popThis();
return;
}
if (mScanFragment != null && mScanFragment.isAdded()) {
mScanFragment.pop();
return;
} }
finish();
}
});
}
@Override @Override
public void showDateFragment() { public void showDateFragment() {
start(mManageDateFragment);
FragmentUtils.add(getSupportFragmentManager(), mManageDateFragment, R.id.f_bottom, false, true);
} }
@Override @Override
...@@ -55,11 +85,18 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -55,11 +85,18 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
@Override @Override
public void addInventoryGoodsItem(List<Sssku> ssskuList) { public void addInventoryGoodsItem(List<Sssku> ssskuList) {
mInventoryAddFragment.addInventoryGoodsItem(ssskuList); mInventoryAddFragment.addInventoryGoodsItem(ssskuList);
if (mScanFragment != null && mScanFragment.isAdded()) {
mScanFragment.pop();
}
} }
@Override @Override
public void addInventoryGoodsItem(Sssku sssku) { public void addInventoryGoodsItem(Sssku sssku) {
mInventoryAddFragment.addInventoryGoodsItem(sssku); mInventoryAddFragment.addInventoryGoodsItem(sssku);
if (mScanFragment != null && mScanFragment.isAdded()) {
mScanFragment.pop();
}
} }
@Override @Override
...@@ -85,6 +122,7 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -85,6 +122,7 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
@Override @Override
public void disInventoryDetailFragment(Boolean idChange) { public void disInventoryDetailFragment(Boolean idChange) {
changeTitle("盘库记录", false);
if (idChange) { if (idChange) {
mInventoryAddFragment.pop(); mInventoryAddFragment.pop();
mInventoryFragment.onRefresh(); mInventoryFragment.onRefresh();
...@@ -102,13 +140,15 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -102,13 +140,15 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
@Override @Override
public void setInventoryCount(String s) { public void setInventoryCount(String s) {
changeTitle(null, true);
mInventoryFragment.setCount(s); mInventoryFragment.setCount(s);
} }
@Override @Override
public void openInventoryAddFragment(Cs cs) { public void openInventoryAddFragment(Cs cs) {
mInventoryAddFragment = new InventoryAddFragment();
mInventoryAddFragment.setCs(cs); mInventoryAddFragment.setCs(cs);
changeTitle("商品盘点", true);
start(mInventoryAddFragment); start(mInventoryAddFragment);
} }
...@@ -129,6 +169,62 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -129,6 +169,62 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
// mInventoryAddFragment.searchGoodsSuc(); // mInventoryAddFragment.searchGoodsSuc();
} }
@Override
public void changeTitle(String s, boolean b) {
if (s == null) {
if (b) {
mViewBinding.icTitle.getRoot().setVisibility(View.VISIBLE);
} else {
mViewBinding.icTitle.getRoot().setVisibility(View.GONE);
}
return;
}
mViewBinding.icTitle.tvTitle.setText(s);
if (b) {
mViewBinding.icTitle.ivRight.setImageResource(R.mipmap.but_sweep_yard);
} else {
mViewBinding.icTitle.ivRight.setImageResource(R.mipmap.ic_dates);
}
mViewBinding.icTitle.ivRight.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
if (b) {
PermissionUtils.permission(PermissionConstants.CAMERA).callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
if (mScanFragment == null) {
mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override
public void OnScanCompleted(String barcode) {
mPresenter.getProductByBarcode(barcode);
}
});
}
if (!mScanFragment.isAdded()) {
start(mScanFragment);
}
}
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String>
permissionsDenied) {
}
})
.request();
} else {
mPresenter.clickDate();
}
}
});
}
@Override @Override
public void isShowLoading(Boolean is) { public void isShowLoading(Boolean is) {
if (is) { if (is) {
...@@ -140,6 +236,11 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -140,6 +236,11 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
} }
} }
@Override
public void delSucc() {
mInventoryFragment.onRefresh();
}
@Override @Override
public boolean dispatchTouchEvent(MotionEvent ev) { public boolean dispatchTouchEvent(MotionEvent ev) {
Global.clickHideKeyboard(ev, this); Global.clickHideKeyboard(ev, this);
......
...@@ -21,9 +21,9 @@ public interface InventoryContract { ...@@ -21,9 +21,9 @@ public interface InventoryContract {
* 添加盘库 搜索商品成功 * 添加盘库 搜索商品成功
*/ */
void searchGoodsSuc(); void searchGoodsSuc();
void changeTitle(String s,boolean b);
void isShowLoading(Boolean is); void isShowLoading(Boolean is);
void delSucc();
/** /**
* 跳转日期搜索 * 跳转日期搜索
*/ */
...@@ -92,6 +92,11 @@ public interface InventoryContract { ...@@ -92,6 +92,11 @@ public interface InventoryContract {
*/ */
public abstract void clickDate(); public abstract void clickDate();
/**
* - 改标题
*/
public abstract void changeTitle(String s,boolean b);
/** /**
* 盘库添加页面 - 取消退出这次盘库的记录 * 盘库添加页面 - 取消退出这次盘库的记录
* *
......
...@@ -117,7 +117,7 @@ public class InventoryPresenter extends InventoryContract.Presenter { ...@@ -117,7 +117,7 @@ public class InventoryPresenter extends InventoryContract.Presenter {
mView.isShowLoading(true); mView.isShowLoading(true);
ApiFactory.Cs.delCsDetail(cs.getId(), cs.getCsNo()).doFinally(() -> mView.isShowLoading(false)) ApiFactory.Cs.delCsDetail(cs.getId(), cs.getCsNo()).doFinally(() -> mView.isShowLoading(false))
.subscribe(object -> { .subscribe(object -> {
mView.delSucc();
}, throwable -> { }, throwable -> {
ToastUtils.showShort(throwable.getMessage()); ToastUtils.showShort(throwable.getMessage());
}); });
...@@ -128,6 +128,11 @@ public class InventoryPresenter extends InventoryContract.Presenter { ...@@ -128,6 +128,11 @@ public class InventoryPresenter extends InventoryContract.Presenter {
mView.showDateFragment(); mView.showDateFragment();
} }
@Override
public void changeTitle(String s, boolean b) {
mView.changeTitle(s,b);
}
@Override @Override
public void cancelInventoryAdd(Cs cs) { public void cancelInventoryAdd(Cs cs) {
mView.isShowLoading(true); mView.isShowLoading(true);
......
...@@ -7,6 +7,7 @@ import android.text.TextWatcher; ...@@ -7,6 +7,7 @@ import android.text.TextWatcher;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView;
import com.facebook.drawee.view.SimpleDraweeView; import com.facebook.drawee.view.SimpleDraweeView;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
...@@ -17,10 +18,12 @@ import com.xingdata.zzdpos.model.Sssku; ...@@ -17,10 +18,12 @@ import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
public class InventoryGoodsAdapter extends BaseAdapter<Sssku, ItemInventoryGoodsBinding> { public class InventoryGoodsAdapter extends BaseAdapter<Sssku, ItemInventoryGoodsBinding> {
private int count ;
public InventoryGoodsAdapter(@Nullable List<Sssku> data) { public InventoryGoodsAdapter(@Nullable List<Sssku> data) {
super(R.layout.item_inventory_goods, data); super(R.layout.item_inventory_goods, data);
...@@ -30,44 +33,53 @@ public class InventoryGoodsAdapter extends BaseAdapter<Sssku, ItemInventoryGoods ...@@ -30,44 +33,53 @@ public class InventoryGoodsAdapter extends BaseAdapter<Sssku, ItemInventoryGoods
@Override @Override
protected void convert(BaseViewHolder helper, Sssku item) { protected void convert(BaseViewHolder helper, Sssku item) {
helper.addOnClickListener(R.id.btn_ok);
super.convert(helper, item);
}
@Override
protected void convert(ItemInventoryGoodsBinding mViewBinding, Sssku item) {
if (item.getInventoryCut() == 0) { if (item.getInventoryCut() == 0) {
item.setInventoryCut(1); item.setInventoryCut(1);
} }
count=item.getInventoryCut();
helper.setText(R.id.et_count, item.getInventoryCut() + ""); mViewBinding.etCount.setText(item.getInventoryCut() + "");
helper.setText(R.id.tv_goods_name, item.getSpuName()) mViewBinding.tvGoodsName.setText(item.getSpuName());
.setText(R.id.tv_goods_code, item.getSpuBarcode() + "") mViewBinding.tvGoodsCode.setText(item.getSpuBarcode() + "");
.setText(R.id.tv_goods_size, "规格/" + item.getSpuUnitName()) mViewBinding.tvGoodsSize.setText("规格/" + item.getSpuUnitName());
.setText(R.id.tv_goods_price, ConvertUtil.fenToYuan(item.getSkuRetailPrice1(), false)) mViewBinding.tvGoodsPrice.setText(ConvertUtil.fenToYuan(item.getSkuRetailPrice1(), false));
.setText(R.id.tv_stock, item.getSkuStock() + ""); mViewBinding.tvStock.setText(item.getSkuStock() + item.getSpuUnitName());
((SimpleDraweeView) helper.getView(R.id.img_goods)).setImageURI(item.getSpuImg());
helper.getView(R.id.btn_up).setOnClickListener(v -> { mViewBinding.imgGoods.setImageURI(item.getSpuImg());
mViewBinding.btnUp.setOnClickListener(v -> {
int count = Integer.valueOf(mViewBinding.etCount.getText().toString());
if (count > 0 && count < 9999) { if (count > 0 && count < 9999) {
helper.setText(R.id.et_count, String.valueOf(++count)); mViewBinding.etCount.setText(String.valueOf(++count));
item.setInventoryCut(count); item.setInventoryCut(count);
} }
}); });
helper.getView(R.id.btn_down).setOnClickListener(v -> { mViewBinding.btnDown.setOnClickListener(v -> {
int count = Integer.valueOf(mViewBinding.etCount.getText().toString());
if (count == 1) { if (count == 1) {
item.setInventoryCut(count); item.setInventoryCut(count);
return; return;
} }
if (count > 1 && count < 100) { if (count > 1 && count < 100) {
helper.setText(R.id.et_count, String.valueOf(--count)); mViewBinding.etCount.setText(String.valueOf(--count));
item.setInventoryCut(count); item.setInventoryCut(count);
} }
}); });
((EditText) helper.getView(R.id.et_count)).addTextChangedListener((new TextWatcher() { mViewBinding.etCount.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) {
} }
@Override @Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
count = ((EditText) helper.getView(R.id.et_count)).getText().toString().length() == 0 ? 1 : Integer.valueOf(((EditText) helper.getView(R.id.et_count)).getText().toString()); int count = mViewBinding.etCount.getText().toString().length() == 0 ? 1 : Integer.valueOf((mViewBinding.etCount.getText().toString()));
item.setInventoryCut(count); item.setInventoryCut(count);
} }
...@@ -75,13 +87,6 @@ public class InventoryGoodsAdapter extends BaseAdapter<Sssku, ItemInventoryGoods ...@@ -75,13 +87,6 @@ public class InventoryGoodsAdapter extends BaseAdapter<Sssku, ItemInventoryGoods
public void afterTextChanged(Editable editable) { public void afterTextChanged(Editable editable) {
} }
})); }));
helper.addOnClickListener(R.id.btn_ok);
super.convert(helper, item);
}
@Override
protected void convert(ItemInventoryGoodsBinding mViewBinding, Sssku item) {
} }
......
...@@ -44,7 +44,10 @@ public class CsCartDialog extends BaseSheetDialog<InventoryPresenter, DialogInve ...@@ -44,7 +44,10 @@ public class CsCartDialog extends BaseSheetDialog<InventoryPresenter, DialogInve
mViewBinding.setResult(result); mViewBinding.setResult(result);
// set Other listener // set Other listener
mViewBinding.tvOk.setOnClickListener(view -> mPresenter.exitInventoryAdd()); mViewBinding.tvOk.setOnClickListener(view -> {
dismiss();
mPresenter.exitInventoryAdd();
});
} }
......
...@@ -8,6 +8,7 @@ import android.view.inputmethod.EditorInfo; ...@@ -8,6 +8,7 @@ import android.view.inputmethod.EditorInfo;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.util.FragmentUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
...@@ -21,6 +22,7 @@ import com.xingdata.zzdpos.ui.dialog.PromptDialog; ...@@ -21,6 +22,7 @@ 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.InventoryGoodsAdapter; import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryGoodsAdapter;
import com.xingdata.zzdpos.ui.manage.inventory.dialog.CsCartDialog; import com.xingdata.zzdpos.ui.manage.inventory.dialog.CsCartDialog;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -39,6 +41,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm ...@@ -39,6 +41,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
private InventoryGoodsAdapter mInventoryGoodsAdapter; private InventoryGoodsAdapter mInventoryGoodsAdapter;
private CsCartDialog mCartDialog = new CsCartDialog(); private CsCartDialog mCartDialog = new CsCartDialog();
/** /**
* 当前购物车信息 * 当前购物车信息
*/ */
...@@ -57,9 +60,8 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm ...@@ -57,9 +60,8 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
initRecycler(); initRecycler();
mViewBinding.setCartCount(0); mViewBinding.setCartCount(0);
mViewBinding.icTitle.edTitle.setVisibility(View.GONE);
mViewBinding.icTitle.tvTitle.setText("商品盘点");
mViewBinding.icTitle.tvTitle.setVisibility(View.VISIBLE);
mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint); mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() { mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override @Override
...@@ -83,18 +85,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm ...@@ -83,18 +85,7 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
mViewBinding.btnEnd.setOnClickListener(view -> { mViewBinding.btnEnd.setOnClickListener(view -> {
mPresenter.exitInventoryAdd(); mPresenter.exitInventoryAdd();
}); });
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
PromptDialog promptDialog = new PromptDialog();
promptDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "退出前是否删除本次盘库记录").setClick(view1 -> {
mPresenter.cancelInventoryAdd(mCs);
promptDialog.dismiss();
}, view1 -> {
promptDialog.dismiss();
}).setCancelables(false).show((BaseActivity) mContext);
}
});
// mViewBinding.btnPrint.setOnClickListener(new OnClickListener() { // mViewBinding.btnPrint.setOnClickListener(new OnClickListener() {
// @Override // @Override
// protected void myOnClickListener(View v) { // protected void myOnClickListener(View v) {
...@@ -219,6 +210,12 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm ...@@ -219,6 +210,12 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
@Override @Override
public boolean onBackPressedSupport() { public boolean onBackPressedSupport() {
popThis();
return true;
}
public void popThis() {
if (bottomCsList.size() == 0) { if (bottomCsList.size() == 0) {
mPresenter.cancelInventoryAdd(mCs); mPresenter.cancelInventoryAdd(mCs);
} else { } else {
...@@ -229,17 +226,12 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm ...@@ -229,17 +226,12 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
}, view1 -> { }, view1 -> {
promptDialog.dismiss(); promptDialog.dismiss();
mPresenter.changeTitle("盘库记录",false);
pop(); pop();
}).setCancelables(false).show((BaseActivity) mContext);
}
return true; }).setCancelables(false).show((BaseActivity) mContext);
} }
public void searchGoodsSuc() {
// mViewBinding.etKeyword.setText("");
// KeyboardUtils.hideSoftInput(getActivity());
} }
...@@ -249,4 +241,5 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm ...@@ -249,4 +241,5 @@ public class InventoryAddFragment extends BaseFragment<InventoryPresenter, Fragm
textView.setText(R.string.inventory_add_empty_hint); textView.setText(R.string.inventory_add_empty_hint);
return view; return view;
} }
} }
...@@ -59,7 +59,6 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment ...@@ -59,7 +59,6 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment
start = null; start = null;
end = null; end = null;
pageNum = 1; pageNum = 1;
initTitle();
mViewBinding.btnAdd.setOnClickListener(new OnClickListener() { mViewBinding.btnAdd.setOnClickListener(new OnClickListener() {
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
...@@ -100,23 +99,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment ...@@ -100,23 +99,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment
mPresenter.getInventoryList(pageNum); mPresenter.getInventoryList(pageNum);
} }
private void initTitle() {
mViewBinding.icTitle.edTitle.setVisibility(View.GONE);
mViewBinding.icTitle.tvTitle.setText("盘库记录");
mViewBinding.icTitle.tvTitle.setVisibility(View.VISIBLE);
mViewBinding.icTitle.ivRight.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
mPresenter.clickDate();
}
});
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
getActivity().finish();
}
});
}
// //
public void setCount(int count) { public void setCount(int count) {
......
...@@ -31,6 +31,7 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen ...@@ -31,6 +31,7 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen
@Override @Override
public void initView() { public void initView() {
mPresenter.changeTitle(null, false);
initListener(); initListener();
textSize = mViewBinding.editStart.getTextSize(); textSize = mViewBinding.editStart.getTextSize();
...@@ -71,6 +72,7 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen ...@@ -71,6 +72,7 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen
mViewBinding.tvCancel.setOnClickListener(new OnClickListener() { mViewBinding.tvCancel.setOnClickListener(new OnClickListener() {
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
mPresenter.changeTitle(null, true);
pop(); pop();
} }
}); });
...@@ -131,4 +133,10 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen ...@@ -131,4 +133,10 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen
}; };
} }
@Override
public boolean onBackPressedSupport() {
mPresenter.changeTitle(null, true);
return super.onBackPressedSupport();
}
} }
...@@ -9,8 +9,10 @@ import android.view.inputmethod.InputMethodManager; ...@@ -9,8 +9,10 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.constant.PermissionConstants;
import com.blankj.utilcode.util.FragmentUtils; import com.blankj.utilcode.util.FragmentUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.PermissionUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
...@@ -20,15 +22,19 @@ import com.xingdata.zzdpos.model.Pager; ...@@ -20,15 +22,19 @@ import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherDetailFragment; import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherDetailFragment;
import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherListFragment; import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherListFragment;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.Global; import com.xingdata.zzdpos.util.Global;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import java.util.List;
public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
ActivityOtherSelectBinding> implements OtherSelectContract.View { ActivityOtherSelectBinding> implements OtherSelectContract.View {
private OtherListFragment mOtherListFragment = new OtherListFragment(); private OtherListFragment mOtherListFragment = new OtherListFragment();
private OtherDetailFragment mOtherDetailFragment = new OtherDetailFragment(); private OtherDetailFragment mOtherDetailFragment = new OtherDetailFragment();
LoadingDialog mLoadingDialog = new LoadingDialog(); LoadingDialog mLoadingDialog = new LoadingDialog();
private ScanFragment mScanFragment;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -37,20 +43,47 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ...@@ -37,20 +43,47 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
@Override @Override
public void initView() { public void initView() {
mViewBinding.lyTitle.ivRight.setVisibility(View.GONE); mViewBinding.lyTitle.ivRight.setVisibility(View.VISIBLE);
mViewBinding.lyTitle.edTitle.setVisibility(View.GONE); mViewBinding.lyTitle.edTitle.setVisibility(View.GONE);
mViewBinding.lyTitle.tvTitle.setText("邻库查询"); mViewBinding.lyTitle.tvTitle.setText("邻库查询");
mViewBinding.lyTitle.tvTitle.setVisibility(View.VISIBLE); mViewBinding.lyTitle.tvTitle.setVisibility(View.VISIBLE);
FragmentUtils.add(getSupportFragmentManager(), mOtherListFragment, mViewBinding FragmentUtils.add(getSupportFragmentManager(), mOtherListFragment, mViewBinding
.fragmentContainer.getId(), false, true); .fragmentContainer.getId(), false, true);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() { mViewBinding.lyTitle.ivRight.setImageResource(R.mipmap.but_sweep_yard);
mViewBinding.lyTitle.ivRight.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
PermissionUtils.permission
(PermissionConstants.CAMERA)
.callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
if (mScanFragment == null) {
mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { public void OnScanCompleted(String barcode) {
if (i == EditorInfo.IME_ACTION_SEARCH) { mOtherListFragment.search(barcode);
search(mViewBinding.edTitle.getText().toString().trim()); }
});
}
if (!mScanFragment.isAdded()) {
FragmentUtils.add(getSupportFragmentManager(), mScanFragment, mViewBinding
.fragmentContainer.getId(), false, true);
} }
return true; }
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String>
permissionsDenied) {
}
})
.request();
} }
}); });
mViewBinding.lyTitle.setOnClickListener(new OnClickListener() { mViewBinding.lyTitle.setOnClickListener(new OnClickListener() {
...@@ -60,8 +93,8 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ...@@ -60,8 +93,8 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
mViewBinding.lyTitle.edTitle.clearFocus(); mViewBinding.lyTitle.edTitle.clearFocus();
} }
if (mOtherDetailFragment.isAdded()) { if (mScanFragment != null && mScanFragment.isAdded()) {
mOtherDetailFragment.pop(); mScanFragment.pop();
return; return;
} }
finish(); finish();
...@@ -84,11 +117,12 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ...@@ -84,11 +117,12 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
@Override @Override
public void loadOssku(Pager<Ossku> osskuList, boolean isRefresh) { public void loadOssku(Pager<Ossku> osskuList, boolean isRefresh, String keyWord) {
if (mOtherDetailFragment.isAdded()) { if (mScanFragment != null && mScanFragment.isAdded()) {
mOtherDetailFragment.pop(); mScanFragment.pop();
} }
mOtherListFragment.setData(osskuList, isRefresh); mOtherListFragment.setData(osskuList, isRefresh);
mOtherListFragment.setKeyword(keyWord);
} }
@Override @Override
...@@ -104,17 +138,6 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ...@@ -104,17 +138,6 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
super.onPause(); super.onPause();
} }
private void search(String string) {
KeyboardUtils.hideSoftInput(this);
if (string.length() == 0) {
ToastUtils.showShort("请输入搜索内容");
return;
}
mPresenter.searchGoodsFirst(string);
}
@Override @Override
public boolean dispatchTouchEvent(MotionEvent ev) { public boolean dispatchTouchEvent(MotionEvent ev) {
......
...@@ -20,7 +20,7 @@ public interface OtherSelectContract { ...@@ -20,7 +20,7 @@ public interface OtherSelectContract {
/** /**
* 加载列表 * 加载列表
*/ */
void loadOssku(Pager<Ossku> osskuList, boolean isRefresh); void loadOssku(Pager<Ossku> osskuList, boolean isRefresh,String wd);
void showOsskuDetail(Ossku ossku); void showOsskuDetail(Ossku ossku);
} }
......
...@@ -40,9 +40,11 @@ public class OtherSelectPresenter extends OtherSelectContract.Presenter { ...@@ -40,9 +40,11 @@ public class OtherSelectPresenter extends OtherSelectContract.Presenter {
.subscribe(osskus -> { .subscribe(osskus -> {
if (osskus.getTotalRow() == 0) { if (osskus.getTotalRow() == 0) {
ToastUtils.showShort("没有搜到当前商品,请重新输入"); ToastUtils.showShort("没有搜到当前商品,请重新输入");
}else {
mView.loadOssku(osskus, nowPageNumber == 1,keyword);
} }
//判断是否能加载更多 //判断是否能加载更多
mView.loadOssku(osskus, nowPageNumber == 1);
}, throwable -> { }, throwable -> {
ToastUtils.showShort(throwable.getMessage()); ToastUtils.showShort(throwable.getMessage());
}); });
......
...@@ -7,6 +7,7 @@ import android.support.v7.widget.LinearLayoutManager; ...@@ -7,6 +7,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView; import android.widget.TextView;
...@@ -51,7 +52,15 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -51,7 +52,15 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recyclerOtherSelcet.setAdapter(mOtherSelectAdapter); mViewBinding.recyclerOtherSelcet.setAdapter(mOtherSelectAdapter);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
if (i == EditorInfo.IME_ACTION_SEARCH) {
search(mViewBinding.edTitle.getText().toString().trim());
}
return true;
}
});
// mOtherSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { // mOtherSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
// @Override // @Override
// public void onItemClick(BaseQuickAdapter adapter, View view, int position) { // public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
...@@ -102,11 +111,26 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -102,11 +111,26 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
} }
public void setKeyword(String 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);
((TextView) view.findViewById(R.id.tv_empty)).setText(resHint); ((TextView) view.findViewById(R.id.tv_empty)).setText(resHint);
return view; return view;
} }
public void search(String string) {
KeyboardUtils.hideSoftInput(getActivity());
if (string.length() == 0) {
ToastUtils.showShort("请输入搜索内容");
return;
}
mPresenter.searchGoodsFirst(string);
}
} }
...@@ -2,8 +2,12 @@ package com.xingdata.zzdpos.ui.manage.replenishment; ...@@ -2,8 +2,12 @@ package com.xingdata.zzdpos.ui.manage.replenishment;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View;
import com.blankj.utilcode.constant.PermissionConstants;
import com.blankj.utilcode.util.FragmentUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.PermissionUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityReplenishmentBinding; import com.xingdata.zzdpos.databinding.ActivityReplenishmentBinding;
...@@ -12,7 +16,9 @@ import com.xingdata.zzdpos.model.Sssku; ...@@ -12,7 +16,9 @@ import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentDetailFragment; import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentDetailFragment;
import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentFragment; import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentFragment;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.Global; import com.xingdata.zzdpos.util.Global;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.List; import java.util.List;
...@@ -22,6 +28,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -22,6 +28,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
private ReplenishmentDetailFragment mReplenishmentDetailFragment = new private ReplenishmentDetailFragment mReplenishmentDetailFragment = new
ReplenishmentDetailFragment(); ReplenishmentDetailFragment();
private boolean isAllowFragment = true; private boolean isAllowFragment = true;
private ScanFragment mScanFragment;
LoadingDialog mLoadingDialog = new LoadingDialog(); LoadingDialog mLoadingDialog = new LoadingDialog();
@Override @Override
...@@ -32,7 +39,63 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -32,7 +39,63 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
@Override @Override
public void initView() { public void initView() {
mPresenter.queryPsbList(); mPresenter.queryPsbList();
mViewBinding.icTitle.edTitle.setVisibility(View.GONE);
mViewBinding.icTitle.tvTitle.setText(R.string.replenishment_meun);
mViewBinding.icTitle.tvTitle.setVisibility(View.VISIBLE);
mViewBinding.icTitle.ivRight.setImageResource(R.mipmap.but_sweep_yard);
mViewBinding.icTitle.ivRight.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
PermissionUtils.permission
(PermissionConstants.CAMERA)
.callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
if (mScanFragment == null) {
mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override
public void OnScanCompleted(String barcode) {
mReplenishmentDetailFragment.scrollToItem(barcode);
}
});
}
if (!mScanFragment.isAdded()) {
start(mScanFragment);
}
}
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String>
permissionsDenied) {
}
})
.request();
}
});
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
if (mReplenishmentDetailFragment.isAdded()) {
mReplenishmentDetailFragment.pop();
mViewBinding.icTitle.tvTitle.setText(R.string.replenishment_meun);
return;
}
if (mScanFragment != null && mScanFragment.isAdded()) {
mScanFragment.pop();
return;
}
finish();
}
});
mViewBinding.icTitle.ivRight.setVisibility(View.GONE);
} }
@Override @Override
...@@ -58,6 +121,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -58,6 +121,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
if (isAllowFragment) { if (isAllowFragment) {
isAllowFragment = false; isAllowFragment = false;
mReplenishmentDetailFragment.setSsskuList(ssskuList); mReplenishmentDetailFragment.setSsskuList(ssskuList);
changeTitle("一键补货", true);
start(mReplenishmentDetailFragment); start(mReplenishmentDetailFragment);
} }
...@@ -68,6 +132,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -68,6 +132,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
if (isAllowFragment) { if (isAllowFragment) {
isAllowFragment = false; isAllowFragment = false;
mReplenishmentDetailFragment.setPsb(psb); mReplenishmentDetailFragment.setPsb(psb);
changeTitle("定货详情", true);
start(mReplenishmentDetailFragment); start(mReplenishmentDetailFragment);
} }
...@@ -95,6 +160,24 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -95,6 +160,24 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
isAllowFragment = is; isAllowFragment = is;
} }
@Override
public void changeTitle(String s, boolean b) {
mViewBinding.icTitle.tvTitle.setText(s);
if (b) {
mViewBinding.icTitle.ivRight.setVisibility(View.VISIBLE);
} else {
mViewBinding.icTitle.ivRight.setVisibility(View.GONE);
}
}
@Override
public void popScan() {
if (mScanFragment != null && mScanFragment.isAdded()) {
mScanFragment.pop();
}
}
@Override @Override
public boolean dispatchTouchEvent(MotionEvent ev) { public boolean dispatchTouchEvent(MotionEvent ev) {
Global.clickHideKeyboard(ev, this); Global.clickHideKeyboard(ev, this);
......
...@@ -22,8 +22,9 @@ public interface ReplenishmentContract { ...@@ -22,8 +22,9 @@ public interface ReplenishmentContract {
void isAllowFragment(Boolean is); void isAllowFragment(Boolean is);
void changeTitle(String s,boolean b);
void popScan();
/** /**
* 提交订货成功 * 提交订货成功
*/ */
...@@ -49,12 +50,20 @@ public interface ReplenishmentContract { ...@@ -49,12 +50,20 @@ public interface ReplenishmentContract {
abstract class Presenter extends BasePresenter<View> { abstract class Presenter extends BasePresenter<View> {
/**
* - 退出扫码
*/
public abstract void popScan();
/** /**
* 补货订货页面 - 点击一键补货 * 补货订货页面 - 点击一键补货
*/ */
public abstract void clickAdd(); public abstract void clickAdd();
/**
* 补货订货页面 - 改标题
*/
public abstract void changeTitle(String s,boolean b);
/** /**
* 补货订货页面 - 查询门店订货订单 * 补货订货页面 - 查询门店订货订单
*/ */
......
...@@ -25,6 +25,11 @@ public class ReplenishmentPresenter extends ReplenishmentContract.Presenter { ...@@ -25,6 +25,11 @@ public class ReplenishmentPresenter extends ReplenishmentContract.Presenter {
} }
@Override
public void popScan() {
mView.popScan();
}
@Override @Override
public void clickAdd() { public void clickAdd() {
mView.isShowLoading(true); mView.isShowLoading(true);
...@@ -43,6 +48,11 @@ public class ReplenishmentPresenter extends ReplenishmentContract.Presenter { ...@@ -43,6 +48,11 @@ public class ReplenishmentPresenter extends ReplenishmentContract.Presenter {
} }
@Override
public void changeTitle(String s, boolean b) {
mView.changeTitle(s,b);
}
@Override @Override
public void queryPsbList() { public void queryPsbList() {
mView.isShowLoading(true); mView.isShowLoading(true);
......
...@@ -37,7 +37,7 @@ public class ReplenishmentDetailAdapter extends BaseAdapter<Sssku, ItemReplenish ...@@ -37,7 +37,7 @@ public class ReplenishmentDetailAdapter extends BaseAdapter<Sssku, ItemReplenish
mViewBinding.tvGoodsCode.setText(item.getSpuBarcode() + ""); mViewBinding.tvGoodsCode.setText(item.getSpuBarcode() + "");
mViewBinding.tvGoodsSize.setText("规格/" + item.getSpuUnitName()); mViewBinding.tvGoodsSize.setText("规格/" + item.getSpuUnitName());
mViewBinding.tvGoodsPrice.setText(ConvertUtil.fenToYuan(item.getSkuCost(), false)); mViewBinding.tvGoodsPrice.setText(ConvertUtil.fenToYuan(item.getSkuCost(), false));
mViewBinding.tvStock.setText(item.getSkuStock() + ""); mViewBinding.tvStock.setText(item.getSkuStock() + item.getSpuUnitName());
if (item.getSkuCnt() != null) { if (item.getSkuCnt() != null) {
mViewBinding.etCount.setText(item.getSkuCnt() + ""); mViewBinding.etCount.setText(item.getSkuCnt() + "");
} else { } else {
......
...@@ -54,24 +54,29 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -54,24 +54,29 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
@Override @Override
public void initView() { public void initView() {
mViewBinding.lyTitle.edTitle.setVisibility(View.GONE);
mViewBinding.lyTitle.tvTitle.setVisibility(View.VISIBLE);
mViewBinding.lyTitle.tvTitle.setText("定货详情");
mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint); mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint);
mViewBinding.edTitle.setText(""); mViewBinding.edTitle.setText("");
initRecycycler();
initOnClickListener();
new android.os.Handler().postDelayed(new Runnable() {
@Override
public void run() {
mViewBinding.recyclerView.scrollToPosition(0);
}
}, 1);
}
private void initOnClickListener() {
Drawable drawableTop = getResources().getDrawable(R.mipmap.but_unfurled); Drawable drawableTop = getResources().getDrawable(R.mipmap.but_unfurled);
Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_up); 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();
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) {
...@@ -96,7 +101,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -96,7 +101,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
} }
} }
}); });
mViewBinding.lyTitle.ivRight.setVisibility(View.GONE);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() { mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override @Override
...@@ -107,9 +112,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -107,9 +112,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
return true; return true;
} }
}); });
mViewBinding.lyTitle.ivBack.setOnClickListener(view -> {
this.pop();
});
mViewBinding.btnOk.setOnClickListener(view -> { mViewBinding.btnOk.setOnClickListener(view -> {
if (mPsb == null || mPsb.getPsbStatus() == null) { if (mPsb == null || mPsb.getPsbStatus() == null) {
...@@ -160,6 +163,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -160,6 +163,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
} }
mReplenishmentDetailAdapter.setEmptyView(getEmptyView()); mReplenishmentDetailAdapter.setEmptyView(getEmptyView());
mViewBinding.recyclerView.setAdapter(mReplenishmentDetailAdapter); mViewBinding.recyclerView.setAdapter(mReplenishmentDetailAdapter);
mReplenishmentDetailAdapter.setOnItemLongClickListener((adapter, view, position) -> { mReplenishmentDetailAdapter.setOnItemLongClickListener((adapter, view, position) -> {
PromptDialog delDialog = new PromptDialog(); PromptDialog delDialog = new PromptDialog();
delDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "是否删除").setClick(new View.OnClickListener() { delDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "是否删除").setClick(new View.OnClickListener() {
...@@ -269,25 +273,29 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -269,25 +273,29 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
return view; return view;
} }
private void scrollToItem(String string) { public void scrollToItem(String string) {
if (string.length() == 0) { if (string.length() == 0) {
ToastUtils.showShort("请输入搜索内容"); ToastUtils.showShort("请输入搜索内容");
return; return;
} }
Pattern pattern = Pattern.compile(string, Pattern.CASE_INSENSITIVE); Pattern pattern = Pattern.compile(string, Pattern.CASE_INSENSITIVE);
for (int i = 0; i < mReplenishmentDetailAdapter.getData().size(); i++) { for (int i = 0; i < mReplenishmentDetailAdapter.getData().size(); i++) {
Matcher matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuBarcode() + ""); Matcher matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuBarcode() + "");
if (matcher.find()) { if (matcher.find()) {
((LinearLayoutManager) mViewBinding.recyclerView.getLayoutManager()).scrollToPositionWithOffset(i, 0); ((LinearLayoutManager) mViewBinding.recyclerView.getLayoutManager()).scrollToPositionWithOffset(i, 0);
mPresenter.popScan();
ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName()); ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName());
KeyboardUtils.hideSoftInput(getActivity()); KeyboardUtils.hideSoftInput(getActivity());
return; return;
} }
matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuAb() + ""); matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuAb() + "");
if (matcher.find()) { if (matcher.find()) {
((LinearLayoutManager) mViewBinding.recyclerView.getLayoutManager()).scrollToPositionWithOffset(i, 0); ((LinearLayoutManager) mViewBinding.recyclerView.getLayoutManager()).scrollToPositionWithOffset(i, 0);
mPresenter.popScan();
ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName()); ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName());
KeyboardUtils.hideSoftInput(getActivity()); KeyboardUtils.hideSoftInput(getActivity());
return; return;
...@@ -295,6 +303,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -295,6 +303,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuName() + ""); matcher = pattern.matcher((mReplenishmentDetailAdapter.getData().get(i)).getSpuName() + "");
if (matcher.find()) { if (matcher.find()) {
((LinearLayoutManager) mViewBinding.recyclerView.getLayoutManager()).scrollToPositionWithOffset(i, 0); ((LinearLayoutManager) mViewBinding.recyclerView.getLayoutManager()).scrollToPositionWithOffset(i, 0);
mPresenter.popScan();
ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName()); ToastUtils.showShort("已找到商品:" + mReplenishmentDetailAdapter.getData().get(i).getSpuName());
KeyboardUtils.hideSoftInput(getActivity()); KeyboardUtils.hideSoftInput(getActivity());
return; return;
...@@ -304,4 +313,10 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -304,4 +313,10 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
ToastUtils.showShort("没有找到相关货品"); ToastUtils.showShort("没有找到相关货品");
} }
@Override
public boolean onBackPressedSupport() {
mPresenter.changeTitle(getResources().getString(R.string.replenishment_meun), false);
return super.onBackPressedSupport();
}
} }
...@@ -5,8 +5,10 @@ import android.databinding.DataBindingUtil; ...@@ -5,8 +5,10 @@ import android.databinding.DataBindingUtil;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.support.design.widget.TabLayout; import android.support.design.widget.TabLayout;
import android.text.InputType; import android.text.InputType;
import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView; import android.widget.TextView;
...@@ -65,23 +67,16 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter, ...@@ -65,23 +67,16 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter,
mViewBinding.btnAdd.setOnClickListener(view -> { mViewBinding.btnAdd.setOnClickListener(view -> {
mPresenter.clickAdd(); mPresenter.clickAdd();
}); });
mViewBinding.icTitle.edTitle.setVisibility(View.GONE);
mViewBinding.icTitle.tvTitle.setText("补货订货");
mViewBinding.icTitle.tvTitle.setVisibility(View.VISIBLE);
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
getActivity().finish();
}
});
mViewBinding.icTitle.ivRight.setVisibility(View.GONE);
mViewBinding.edTitle.setHint("请输入供货商名称"); mViewBinding.edTitle.setHint("请输入供货商名称");
mViewBinding.edTitle.setInputType(InputType.TYPE_CLASS_TEXT); mViewBinding.edTitle.setInputType(InputType.TYPE_CLASS_TEXT);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() {
mViewBinding.edTitle.setOnClickListener(view -> { @Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
if (i == EditorInfo.IME_ACTION_SEARCH) {
if (mViewBinding.edTitle.getText().toString().trim().length() == 0) { if (mViewBinding.edTitle.getText().toString().trim().length() == 0) {
ToastUtils.showShort("请输入供货商名称"); ToastUtils.showShort("请输入供货商名称");
return; return true;
} }
switch (mViewBinding.tab.getSelectedTabPosition()) { switch (mViewBinding.tab.getSelectedTabPosition()) {
case 0: case 0:
...@@ -94,10 +89,13 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter, ...@@ -94,10 +89,13 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter,
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(2)); mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(2));
break; break;
} }
}
return true;
}
}); });
} }
......
...@@ -34,6 +34,7 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi ...@@ -34,6 +34,7 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi
mViewBinding.etBarcode.setOnEditorActionListener((textView, i, keyEvent) -> { mViewBinding.etBarcode.setOnEditorActionListener((textView, i, keyEvent) -> {
if ((i == EditorInfo.IME_ACTION_SEARCH || i == EditorInfo.IME_ACTION_UNSPECIFIED) && !StringUtils.isEmpty(textView.getText())) { if ((i == EditorInfo.IME_ACTION_SEARCH || i == EditorInfo.IME_ACTION_UNSPECIFIED) && !StringUtils.isEmpty(textView.getText())) {
KeyboardUtils.hideSoftInput(textView); KeyboardUtils.hideSoftInput(textView);
this.pop();
mPresenter.clickCheck(mViewBinding.etBarcode.getText().toString()); mPresenter.clickCheck(mViewBinding.etBarcode.getText().toString());
} }
return false; return false;
......
...@@ -27,56 +27,68 @@ public class MarketingMenuAdapter extends BaseAdapter<Integer, ItemMarketingMenu ...@@ -27,56 +27,68 @@ public class MarketingMenuAdapter extends BaseAdapter<Integer, ItemMarketingMenu
switch (item) { switch (item) {
case C.MENU.MENU_MS_VIP_LEVEL: case C.MENU.MENU_MS_VIP_LEVEL:
titleId = R.string.menu_ms_vip_level; titleId = R.string.menu_ms_vip_level;
mViewBinding.setIsShow(false);
imgId = R.mipmap.vip_level; imgId = R.mipmap.vip_level;
break; break;
case C.MENU.MENU_MS_INTEGRAL: case C.MENU.MENU_MS_INTEGRAL:
titleId = R.string.menu_ms_integral; titleId = R.string.menu_ms_integral;
mViewBinding.setIsShow(false);
imgId = R.mipmap.integral_rules; imgId = R.mipmap.integral_rules;
break; break;
case C.MENU.MENU_MS_TICKET: case C.MENU.MENU_MS_TICKET:
titleId = R.string.menu_ms_ticket; titleId = R.string.menu_ms_ticket;
mViewBinding.setIsShow(true);
imgId = R.mipmap.ticker_setting; imgId = R.mipmap.ticker_setting;
break; break;
case C.MENU.MENU_MS_RECHARGE: case C.MENU.MENU_MS_RECHARGE:
titleId = R.string.menu_ms_recharge; titleId = R.string.menu_ms_recharge;
mViewBinding.setIsShow(true);
imgId = R.mipmap.top_up_preferential; imgId = R.mipmap.top_up_preferential;
break; break;
case C.MENU.MENU_MS_MS: case C.MENU.MENU_MS_MS:
titleId = R.string.menu_ms_ms; titleId = R.string.menu_ms_ms;
mViewBinding.setIsShow(true);
imgId = R.mipmap.marketing_plan; imgId = R.mipmap.marketing_plan;
break; break;
case C.MENU.MENU_MS_SMS: case C.MENU.MENU_MS_SMS:
titleId = R.string.menu_ms_sms; titleId = R.string.menu_ms_sms;
mViewBinding.setIsShow(false);
imgId = R.mipmap.sms_all; imgId = R.mipmap.sms_all;
break; break;
case C.MENU.MENU_MANAGER_OPER: { case C.MENU.MENU_MANAGER_OPER: {
titleId = R.string.menu_manager_oper; titleId = R.string.menu_manager_oper;
mViewBinding.setIsShow(false);
imgId = R.mipmap.ic_oper_setting; imgId = R.mipmap.ic_oper_setting;
} }
break; break;
case C.MENU.MENU_MANAGER_GOODS: { case C.MENU.MENU_MANAGER_GOODS: {
titleId = R.string.menu_manager_goods; titleId = R.string.menu_manager_goods;
mViewBinding.setIsShow(false);
imgId = R.mipmap.ic_goods_setting; imgId = R.mipmap.ic_goods_setting;
} }
break; break;
case C.MENU.MENU_MANAGER_BALE: { case C.MENU.MENU_MANAGER_BALE: {
titleId = R.string.menu_manager_bale; titleId = R.string.menu_manager_bale;
mViewBinding.setIsShow(false);
imgId = R.mipmap.ic_bale; imgId = R.mipmap.ic_bale;
} }
break; break;
case C.MENU.MENU_MANAGER_REPLENISHMENT: { case C.MENU.MENU_MANAGER_REPLENISHMENT: {
titleId = R.string.menu_manager_replenishment; titleId = R.string.menu_manager_replenishment;
mViewBinding.setIsShow(false);
imgId = R.mipmap.ic_replenishment; imgId = R.mipmap.ic_replenishment;
} }
break; break;
case C.MENU.MENU_MANAGER_OTHER: { case C.MENU.MENU_MANAGER_OTHER: {
titleId = R.string.menu_manager_other; titleId = R.string.menu_manager_other;
mViewBinding.setIsShow(false);
imgId = R.mipmap.ic_other_select; imgId = R.mipmap.ic_other_select;
} }
break; break;
case C.MENU.MENU_MANAGER_INVENTORY: { case C.MENU.MENU_MANAGER_INVENTORY: {
titleId = R.string.menu_manager_inventory; titleId = R.string.menu_manager_inventory;
mViewBinding.setIsShow(false);
imgId = R.mipmap.ic_inventory; imgId = R.mipmap.ic_inventory;
} }
break; break;
......
...@@ -227,11 +227,10 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -227,11 +227,10 @@ public class SettlePresenter extends SettleContract.Presenter {
public void payInAli(String payCode) { public void payInAli(String payCode) {
mView.showLoadingDialog(); mView.showLoadingDialog();
commitOrder() commitOrder()
.flatMap(orderNo -> { .flatMap(orderNo -> JniFactory.Settle.pay(C.PAY_CHANNEL.ALI, payCode, mSaleorder.getOrderPayAmt(), orderNo))
return JniFactory.Settle.pay(C.PAY_CHANNEL.ALI, payCode, mSaleorder.getOrderPayAmt(), orderNo);
})
.doFinally(() -> mView.dismissLoadingDialog()) .doFinally(() -> mView.dismissLoadingDialog())
.subscribe(response -> { .subscribe(
response -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class); com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) { switch (r1.getResponseCode()) {
case "0000": case "0000":
...@@ -244,23 +243,18 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -244,23 +243,18 @@ public class SettlePresenter extends SettleContract.Presenter {
mView.showPayFailFragment(null, mSaleorder); mView.showPayFailFragment(null, mSaleorder);
break; break;
} }
}, throwable -> { },
mView.showPayFailFragment(throwable, mSaleorder); throwable -> mView.showPayFailFragment(throwable, mSaleorder));
});
// .flatMap(response -> {
// return ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(response.getOrderNo(), C.PAY_CHANNEL.ALI));
// });
} }
@Override @Override
public void payInWechat(String payCode) { public void payInWechat(String payCode) {
mView.showLoadingDialog(); mView.showLoadingDialog();
commitOrder() commitOrder()
.flatMap(orderNo -> { .flatMap(orderNo -> JniFactory.Settle.pay(C.PAY_CHANNEL.WECHAT, payCode, mSaleorder.getOrderPayAmt(), orderNo))
return JniFactory.Settle.pay(C.PAY_CHANNEL.WECHAT, payCode, mSaleorder.getOrderPayAmt(), orderNo);
})
.doFinally(() -> mView.dismissLoadingDialog()) .doFinally(() -> mView.dismissLoadingDialog())
.subscribe(response -> { .subscribe(
response -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class); com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) { switch (r1.getResponseCode()) {
case "0000": case "0000":
...@@ -273,9 +267,8 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -273,9 +267,8 @@ public class SettlePresenter extends SettleContract.Presenter {
mView.showPayFailFragment(null, mSaleorder); mView.showPayFailFragment(null, mSaleorder);
break; break;
} }
}, throwable -> { },
mView.showPayFailFragment(throwable, mSaleorder); throwable -> mView.showPayFailFragment(throwable, mSaleorder));
});
} }
@Override @Override
......
...@@ -8,6 +8,7 @@ import android.view.View; ...@@ -8,6 +8,7 @@ import android.view.View;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.TimeUtils; import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.entity.SectionEntity;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentMsListBinding; import com.xingdata.zzdpos.databinding.FragmentMsListBinding;
...@@ -16,6 +17,8 @@ import com.xingdata.zzdpos.model.VipRechargeOrder; ...@@ -16,6 +17,8 @@ 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.StatisticsRechargeGroupAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import com.xingdata.zzdpos.util.StatisticsCallback;
import com.xingdata.zzdpos.util.StringUtil; import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -49,7 +52,17 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag ...@@ -49,7 +52,17 @@ public class RechargeListFragment extends BaseFragment<StatisticsPresenter, Frag
mStatisticsGroupAdapter = new StatisticsRechargeGroupAdapter(new ArrayList<>()); mStatisticsGroupAdapter = new StatisticsRechargeGroupAdapter(new ArrayList<>());
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsGroupAdapter); mViewBinding.statisticsRecycler.setAdapter(mStatisticsGroupAdapter);
mViewBinding.statisticsRecycler.addItemDecoration(
new RecyclerViewUtil.StatisticsItemDecoration(getActivity(), 2, getResources().getColor(R.color.gray_kongming), new StatisticsCallback() {
@Override
public SectionEntity getItem(int position) {
if (position<mStatisticsGroupAdapter.getData().size()){
return mStatisticsGroupAdapter.getData().get(position);
}else {
return null;
}
}
}));
mStatisticsGroupAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsGroupAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
......
...@@ -8,6 +8,7 @@ import android.view.View; ...@@ -8,6 +8,7 @@ import android.view.View;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.TimeUtils; import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.entity.SectionEntity;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentMsListBinding; import com.xingdata.zzdpos.databinding.FragmentMsListBinding;
...@@ -17,6 +18,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; ...@@ -17,6 +18,8 @@ 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.StatisticsRechargeGroupAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import com.xingdata.zzdpos.util.StatisticsCallback;
import com.xingdata.zzdpos.util.StringUtil; import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -50,7 +53,17 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr ...@@ -50,7 +53,17 @@ public class UsedTicketListFragment extends BaseFragment<StatisticsPresenter, Fr
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsGroupAdapter); mViewBinding.statisticsRecycler.setAdapter(mStatisticsGroupAdapter);
mViewBinding.statisticsRecycler.addItemDecoration(
new RecyclerViewUtil.StatisticsItemDecoration(getActivity(), 2, getResources().getColor(R.color.gray_kongming), new StatisticsCallback() {
@Override
public SectionEntity getItem(int position) {
if (position < mStatisticsGroupAdapter.getData().size()) {
return mStatisticsGroupAdapter.getData().get(position);
} else {
return null;
}
}
}));
mStatisticsGroupAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsGroupAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
......
...@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON; ...@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.TimeUtils; import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.entity.SectionEntity;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -24,6 +25,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter; ...@@ -24,6 +25,8 @@ 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.StatisticsOrderGroupAdapter;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import com.xingdata.zzdpos.util.StatisticsCallback;
import com.xingdata.zzdpos.util.StringUtil; import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -42,7 +45,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen ...@@ -42,7 +45,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
private StatisticsOrderGroupAdapter mStatisticsAdapter; private StatisticsOrderGroupAdapter mStatisticsAdapter;
private Long monthDateStart; private Long monthDateStart;
private Long monthDateEnd; private Long monthDateEnd;
private int pagerNum ; private int pagerNum;
private String monthDate; private String monthDate;
...@@ -60,7 +63,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen ...@@ -60,7 +63,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
@Override @Override
public void initView() { public void initView() {
pagerNum=1; pagerNum = 1;
// Calendar calendar = Calendar.getInstance(); // Calendar calendar = Calendar.getInstance();
////获得当前时间的月份,月份从0开始所以结果要加1 ////获得当前时间的月份,月份从0开始所以结果要加1
// int monthNow = calendar.get(Calendar.MONTH) + 1; // int monthNow = calendar.get(Calendar.MONTH) + 1;
...@@ -84,7 +87,17 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen ...@@ -84,7 +87,17 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
mStatisticsAdapter = new StatisticsOrderGroupAdapter(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);
mViewBinding.statisticsRecycler.addItemDecoration(
new RecyclerViewUtil.StatisticsItemDecoration(getActivity(), 2, getResources().getColor(R.color.gray_kongming), new StatisticsCallback() {
@Override
public SectionEntity getItem(int position) {
if (position<mStatisticsAdapter.getData().size()){
return mStatisticsAdapter.getData().get(position);
}else {
return null;
}
}
}));
mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mStatisticsAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
......
...@@ -36,8 +36,7 @@ import java.util.ArrayList; ...@@ -36,8 +36,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBinding> implements public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBinding> implements StoreContract.View {
StoreContract.View {
private StoreFragment mStoreFragment = new StoreFragment(); private StoreFragment mStoreFragment = new StoreFragment();
private SearchFragment mSearchFragment = new SearchFragment(); private SearchFragment mSearchFragment = new SearchFragment();
...@@ -68,8 +67,7 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -68,8 +67,7 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
return false; return false;
}); });
mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission(PermissionConstants.CAMERA)
(PermissionConstants.CAMERA)
.callback(new PermissionUtils.FullCallback() { .callback(new PermissionUtils.FullCallback() {
@Override @Override
public void onGranted(List<String> permissionsGranted) { public void onGranted(List<String> permissionsGranted) {
...@@ -77,12 +75,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -77,12 +75,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
} }
@Override @Override
public void onDenied(List<String> permissionsDeniedForever, List<String> public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) {
permissionsDenied) {
} }
}) })
.request()); .request());
mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode)); mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode));
} }
...@@ -165,7 +161,17 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -165,7 +161,17 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
mViewBinding.setTitleMode(C.TITLE_MODE.SKU); mViewBinding.setTitleMode(C.TITLE_MODE.SKU);
mViewBinding.etSearch.setText(""); mViewBinding.etSearch.setText("");
mViewBinding.etSearch.requestFocus(); mViewBinding.etSearch.requestFocus();
this.start(mSearchFragment); this.start(mSearchFragment.setKeyword(""));
}
}
@Override
public void showSearchFragment(String keyword) {
if (!mSearchFragment.isAdded()) {
mViewBinding.setTitleMode(C.TITLE_MODE.SKU);
mViewBinding.etSearch.setText(keyword);
mViewBinding.etSearch.requestFocus();
this.start(mSearchFragment.setKeyword(keyword));
} }
} }
...@@ -194,28 +200,28 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -194,28 +200,28 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
* @param scaleLarge 放大比例 * @param scaleLarge 放大比例
* @param duration 时间 * @param duration 时间
*/ */
private void startShakeByPropertyAnim(View view, float scaleSmall, float scaleLarge, long private void startShakeByPropertyAnim(View view, float scaleSmall, float scaleLarge, long duration) {
duration) {
if (view == null) { if (view == null) {
return; return;
} }
//先变小后变大 //先变小后变大
PropertyValuesHolder scaleXValuesHolder = PropertyValuesHolder.ofKeyframe(View.SCALE_X, PropertyValuesHolder scaleXValuesHolder = PropertyValuesHolder.ofKeyframe(
View.SCALE_X,
Keyframe.ofFloat(0f, 1.0f), Keyframe.ofFloat(0f, 1.0f),
Keyframe.ofFloat(0.25f, scaleSmall), Keyframe.ofFloat(0.25f, scaleSmall),
Keyframe.ofFloat(0.5f, scaleLarge), Keyframe.ofFloat(0.5f, scaleLarge),
Keyframe.ofFloat(0.75f, scaleLarge), Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f) Keyframe.ofFloat(1.0f, 1.0f)
); );
PropertyValuesHolder scaleYValuesHolder = PropertyValuesHolder.ofKeyframe(View.SCALE_Y, PropertyValuesHolder scaleYValuesHolder = PropertyValuesHolder.ofKeyframe(
View.SCALE_Y,
Keyframe.ofFloat(0f, 1.0f), Keyframe.ofFloat(0f, 1.0f),
Keyframe.ofFloat(0.25f, scaleSmall), Keyframe.ofFloat(0.25f, scaleSmall),
Keyframe.ofFloat(0.5f, scaleLarge), Keyframe.ofFloat(0.5f, scaleLarge),
Keyframe.ofFloat(0.75f, scaleLarge), Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f) Keyframe.ofFloat(1.0f, 1.0f)
); );
ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(view, ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(view, scaleXValuesHolder, scaleYValuesHolder);
scaleXValuesHolder, scaleYValuesHolder);
objectAnimator.setDuration(duration); objectAnimator.setDuration(duration);
objectAnimator.start(); objectAnimator.start();
} }
......
...@@ -102,6 +102,13 @@ interface StoreContract { ...@@ -102,6 +102,13 @@ interface StoreContract {
*/ */
void showSearchFragment(); void showSearchFragment();
/**
* 显示搜索页面
*
* @param keyword 搜索内容
*/
void showSearchFragment(String keyword);
/** /**
* 显示扫码页面 * 显示扫码页面
*/ */
......
...@@ -354,8 +354,7 @@ public class StorePresenter extends StoreContract.Presenter { ...@@ -354,8 +354,7 @@ public class StorePresenter extends StoreContract.Presenter {
.equalTo("skuStatus", 0) .equalTo("skuStatus", 0)
.findAll()); .findAll());
if (ssskus.size() + usskus.size() > 1) { if (ssskus.size() + usskus.size() > 1) {
mView.showSearchFragment(); mView.showSearchFragment(barcode);
this.searchSku(barcode);
} else if (ssskus.size() == 1 && usskus.size() == 0) { } else if (ssskus.size() == 1 && usskus.size() == 0) {
this.clickAddSku(ssskus.get(0), 1); this.clickAddSku(ssskus.get(0), 1);
} else if (ssskus.size() == 0 && usskus.size() == 1) { } else if (ssskus.size() == 0 && usskus.size() == 1) {
......
...@@ -12,6 +12,7 @@ import android.view.animation.LinearInterpolator; ...@@ -12,6 +12,7 @@ import android.view.animation.LinearInterpolator;
import android.widget.ImageView; import android.widget.ImageView;
import com.blankj.utilcode.util.ScreenUtils; import com.blankj.utilcode.util.ScreenUtils;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -26,7 +27,9 @@ import java.util.List; ...@@ -26,7 +27,9 @@ import java.util.List;
public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSearchBinding> { public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSearchBinding> {
private SkuAdapter mSkuAdapter; private SkuAdapter mSkuAdapter;
private List<Saledetail> mSaledetails; private List<Saledetail> mSaledetails;
private String mKeyword;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -52,6 +55,9 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -52,6 +55,9 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
mSkuAdapter.setEmptyView(view); mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
//init
if (!StringUtils.isEmpty(mKeyword)) mPresenter.searchSku(mKeyword);
} }
...@@ -108,6 +114,16 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -108,6 +114,16 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
} }
/**
* 设置搜索关键字
*
* @param keyword 关键字
*/
public SearchFragment setKeyword(String keyword) {
this.mKeyword = keyword;
return this;
}
/** /**
* 点击添加按钮 * 点击添加按钮
* *
......
...@@ -31,9 +31,8 @@ import java.util.List; ...@@ -31,9 +31,8 @@ import java.util.List;
public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBinding> { public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBinding> {
private SkugrpAdapter mSkugrpAdapter;
private SkuAdapter mSkuAdapter; private SkuAdapter mSkuAdapter;
private SkugrpAdapter mSkugrpAdapter;
public interface OnCountChangeListener { public interface OnCountChangeListener {
void onCountChange(View view, BaseSku sku, int value); void onCountChange(View view, BaseSku sku, int value);
......
...@@ -9,6 +9,9 @@ import android.graphics.drawable.Drawable; ...@@ -9,6 +9,9 @@ import android.graphics.drawable.Drawable;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.View; import android.view.View;
import com.chad.library.adapter.base.entity.SectionEntity;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailContract;
public class RecyclerViewUtil { public class RecyclerViewUtil {
public static class GridSpacingItemDecoration extends RecyclerView.ItemDecoration { public static class GridSpacingItemDecoration extends RecyclerView.ItemDecoration {
...@@ -82,12 +85,14 @@ public class RecyclerViewUtil { ...@@ -82,12 +85,14 @@ public class RecyclerViewUtil {
mDividerHight = dividerHight; mDividerHight = dividerHight;
mDividerDarwable = dividerDrawable; mDividerDarwable = dividerDrawable;
} }
public ListCardItemDecoration(Context context, int dividerHight, Drawable dividerDrawable,int noNum) {
public ListCardItemDecoration(Context context, int dividerHight, Drawable dividerDrawable, int noNum) {
this(context); this(context);
mDividerHight = dividerHight; mDividerHight = dividerHight;
mDividerDarwable = dividerDrawable; mDividerDarwable = dividerDrawable;
this. noNum=noNum; this.noNum = noNum;
} }
@Override @Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state); super.getItemOffsets(outRect, view, parent, state);
...@@ -125,6 +130,84 @@ public class RecyclerViewUtil { ...@@ -125,6 +130,84 @@ public class RecyclerViewUtil {
} }
}
}
}
public static class StatisticsItemDecoration extends RecyclerView.ItemDecoration {
private Drawable mDividerDarwable;
private StatisticsCallback mStatisticsCallback;
private int mDividerHight = 1;
private Paint mColorPaint;
public final int[] ATRRS = new int[]{android.R.attr.listDivider};
public StatisticsItemDecoration(Context context) {
final TypedArray ta = context.obtainStyledAttributes(ATRRS);
this.mDividerDarwable = ta.getDrawable(0);
ta.recycle();
}
/*
int dividerHight 分割线的线宽
int dividerColor 分割线的颜色
*/
public StatisticsItemDecoration(Context context, int dividerHight, int dividerColor, StatisticsCallback statisticsCallback) {
this(context);
mDividerHight = dividerHight;
mColorPaint = new Paint();
mColorPaint.setColor(dividerColor);
this.mStatisticsCallback = statisticsCallback;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.bottom = 0;
}
@Override
public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
super.onDraw(c, parent, state);
//画水平和垂直分割线
drawHorizontalDivider(c, parent);
}
public void drawHorizontalDivider(Canvas c, RecyclerView parent) {
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = parent.getChildAt(i);
RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
int position = parent.getChildAdapterPosition(child);
SectionEntity sectionEntity = mStatisticsCallback.getItem(position);
if (sectionEntity != null) {
if (!sectionEntity.isHeader) {
final int left = child.getLeft() - params.leftMargin - mDividerHight + 200;
final int right = child.getRight() + params.rightMargin;
int top = 0;
int bottom = 0;
top = child.getBottom() + params.bottomMargin +1;
bottom = top + mDividerHight;
//画分割线
mDividerDarwable.setBounds(left, top, right, bottom);
mDividerDarwable.draw(c);
if (mColorPaint != null) {
c.drawRect(left, top, right, bottom, mColorPaint);
}
}
}
} }
} }
} }
......
package com.xingdata.zzdpos.util;
import com.chad.library.adapter.base.entity.SectionEntity;
/**
* Created by Administrator on 2018/1/18.
*/
public interface StatisticsCallback {
SectionEntity getItem(int position);
}
package com.xingdata.zzdpos;
public class zxpay {
static {
System.loadLibrary("jsonpay");
}
public static native String jsonpay(String string);
}
<?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="0.5dp"
android:top="0.5dp">
<shape>
<solid android:color="@color/gray_zhouyu" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="1000dp" />
<stroke
android:width="0.5dp"
android:color="@color/red_guanyu" />
<solid android:color="@color/all_transparent" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="@dimen/all_line_width"
android:color="@color/black_baozheng" />
<solid android:color="@color/white_caocao" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="@dimen/all_line_width"
android:color="@color/black_baozheng" />
<solid android:color="@color/gray_zhouyu" />
</shape>
\ No newline at end of file
...@@ -22,15 +22,15 @@ ...@@ -22,15 +22,15 @@
</data> </data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="400dp" android:layout_width="wrap_content"
android:layout_height="450dp" android:layout_height="wrap_content"
android:background="@color/transparent" android:background="@color/transparent"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="450dp" android:layout_width="300dp"
android:layout_height="450dp" android:layout_height="300dp"
android:background="@color/white" android:background="@color/white"
android:orientation="vertical"> android:orientation="vertical">
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"> <layout xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<FrameLayout <FrameLayout
android:id="@+id/f_bottom" android:id="@+id/f_bottom"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -20,6 +29,6 @@ ...@@ -20,6 +29,6 @@
</FrameLayout> </FrameLayout>
</android.support.constraint.ConstraintLayout> </LinearLayout>
</layout> </layout>
\ No newline at end of file
...@@ -49,10 +49,7 @@ ...@@ -49,10 +49,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:inputType="number" android:inputType="number"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"/>
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout> </LinearLayout>
......
...@@ -12,31 +12,15 @@ ...@@ -12,31 +12,15 @@
android:id="@+id/ly_title" android:id="@+id/ly_title"
layout="@layout/title_order" /> layout="@layout/title_order" />
<EditText
android:id="@+id/ed_title"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_below="@id/ly_title"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding"
android:layout_marginTop="@dimen/padding_small"
android:drawablePadding="@dimen/all_padding"
android:hint="@string/other_select_edit_hint"
android:textColor="@color/black_likui"
android:inputType="text"
android:imeOptions="actionSearch"
android:textSize="@dimen/all_text_size_low"
/>
<FrameLayout <FrameLayout
android:id="@+id/fragment_container" android:id="@+id/fragment_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/ed_title" android:layout_below="@id/ly_title"
android:background="@color/gray_zhouyu"></FrameLayout> android:background="@color/white_caocao">
</FrameLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -44,11 +28,7 @@ ...@@ -44,11 +28,7 @@
android:layout_below="@id/ly_title" android:layout_below="@id/ly_title"
android:background="@color/gray_huanggai" /> android:background="@color/gray_huanggai" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_below="@id/ed_title"
android:background="@color/gray_huanggai" />
</RelativeLayout> </RelativeLayout>
</layout> </layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"> <layout xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<FrameLayout <FrameLayout
android:id="@+id/f_bottom" android:id="@+id/f_bottom"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -20,6 +29,6 @@ ...@@ -20,6 +29,6 @@
</FrameLayout> </FrameLayout>
</android.support.constraint.ConstraintLayout> </LinearLayout>
</layout> </layout>
\ No newline at end of file
...@@ -47,10 +47,7 @@ ...@@ -47,10 +47,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:inputType="number" android:inputType="number"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search" />
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout> </LinearLayout>
<TextView <TextView
......
...@@ -51,10 +51,7 @@ ...@@ -51,10 +51,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1" android:layout_weight="1"
android:inputType="text" android:inputType="text"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search" />
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout> </LinearLayout>
......
...@@ -68,24 +68,22 @@ ...@@ -68,24 +68,22 @@
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_spacing"
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"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"
android:visibility="@{titleMode>1?View.VISIBLE:View.INVISIBLE}" /> android:visibility="@{titleMode>1?View.VISIBLE:View.INVISIBLE}" />
<ImageButton <ImageButton
android:id="@+id/btn_scan" android:id="@+id/btn_scan"
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_spacing"
android:background="@color/transparent" android:background="@color/transparent"
android:contentDescription="@string/store_scan" android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:src="@mipmap/but_sweep_yard" /> android:src="@mipmap/but_sweep_yard"
android:visibility="@{titleMode>1?View.GONE:View.VISIBLE}" />
</LinearLayout> </LinearLayout>
<TextView <TextView
......
...@@ -123,6 +123,8 @@ ...@@ -123,6 +123,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:text="积分面值:" android:text="积分面值:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -173,6 +175,8 @@ ...@@ -173,6 +175,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:gravity="left" android:gravity="left"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:text="订单实收满 " android:text="订单实收满 "
...@@ -221,6 +225,8 @@ ...@@ -221,6 +225,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:gravity="left" android:gravity="left"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:text="可以使用 " android:text="可以使用 "
...@@ -250,6 +256,7 @@ ...@@ -250,6 +256,7 @@
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
......
...@@ -196,6 +196,8 @@ ...@@ -196,6 +196,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="会员等级:" android:text="会员等级:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -341,6 +343,8 @@ ...@@ -341,6 +343,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="积分比例:" android:text="积分比例:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -392,6 +396,8 @@ ...@@ -392,6 +396,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="有效期限:" android:text="有效期限:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -445,6 +451,8 @@ ...@@ -445,6 +451,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="商品品类:" android:text="商品品类:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -456,7 +464,7 @@ ...@@ -456,7 +464,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_weight="1.6" android:layout_weight="1.5"
android:drawableRight="@mipmap/createstore_drop_down" android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
...@@ -474,7 +482,7 @@ ...@@ -474,7 +482,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding" android:layout_marginLeft="@dimen/all_padding"
android:layout_weight="1.6" android:layout_weight="1.5"
android:drawableRight="@mipmap/createstore_drop_down" android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
...@@ -492,8 +500,8 @@ ...@@ -492,8 +500,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding" android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_bounced_padding" android:layout_marginRight="@dimen/all_padding"
android:layout_weight="1.8" android:layout_weight="1.5"
android:drawableRight="@mipmap/createstore_drop_down" android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end" android:ellipsize="end"
android:ems="10" android:ems="10"
...@@ -542,6 +550,8 @@ ...@@ -542,6 +550,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="积分比例:" android:text="积分比例:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -592,6 +602,8 @@ ...@@ -592,6 +602,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="有效期限:" android:text="有效期限:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
...@@ -638,6 +650,8 @@ ...@@ -638,6 +650,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding" android:paddingLeft="@dimen/all_bounced_padding"
android:text="有效期限:" android:text="有效期限:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu" android:background="@drawable/up_down_line_gray"
android:gravity="left|center_vertical" android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:text="基本信息" android:text="基本信息"
...@@ -118,16 +118,18 @@ ...@@ -118,16 +118,18 @@
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</RadioGroup> </RadioGroup>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding" android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding" android:layout_marginRight="@dimen/all_padding"
android:background="@color/gray1"></View> android:background="@color/gray1"></View>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu" android:background="@drawable/up_down_line_gray"
android:gravity="left|center_vertical" android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:text="规则设置" android:text="规则设置"
...@@ -159,6 +161,8 @@ ...@@ -159,6 +161,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="优惠券面值:" android:text="优惠券面值:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
...@@ -184,12 +188,14 @@ ...@@ -184,12 +188,14 @@
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding" android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding" android:layout_marginRight="@dimen/all_padding"
android:background="@color/gray1"></View> android:background="@color/gray1"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -200,6 +206,8 @@ ...@@ -200,6 +206,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="券有效期:" android:text="券有效期:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
...@@ -222,12 +230,14 @@ ...@@ -222,12 +230,14 @@
android:layout_weight="2" android:layout_weight="2"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding" android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding" android:layout_marginRight="@dimen/all_padding"
android:background="@color/gray1"></View> android:background="@color/gray1"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -238,6 +248,8 @@ ...@@ -238,6 +248,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="订单金额满:" android:text="订单金额满:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
...@@ -263,12 +275,14 @@ ...@@ -263,12 +275,14 @@
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding" android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding" android:layout_marginRight="@dimen/all_padding"
android:background="@color/gray1"></View> android:background="@color/gray1"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -279,6 +293,8 @@ ...@@ -279,6 +293,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="每单使用:" android:text="每单使用:"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
...@@ -308,6 +324,7 @@ ...@@ -308,6 +324,7 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
android:background="@color/transparent" android:background="@color/transparent"
android:contentDescription="@string/store_scan" android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:onClick="@{OnClickListener}"
android:src="@mipmap/but_sweep_yard"/> android:src="@mipmap/but_sweep_yard"/>
</LinearLayout> </LinearLayout>
...@@ -91,10 +92,10 @@ ...@@ -91,10 +92,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/all_spacing" android:background="@drawable/up_down_line_white"
android:background="@color/white"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing">
<Button <Button
android:id="@+id/btn_cancel" android:id="@+id/btn_cancel"
...@@ -125,8 +126,7 @@ ...@@ -125,8 +126,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/cl_title" android:layout_below="@+id/cl_title"
android:background="@color/white" android:background="@color/white"
android:orientation="horizontal" android:orientation="horizontal">
>
<TextView <TextView
android:id="@+id/tv_keyword" android:id="@+id/tv_keyword"
...@@ -154,13 +154,19 @@ ...@@ -154,13 +154,19 @@
/> />
</LinearLayout> </LinearLayout>
<View
android:id="@+id/vw"
android:layout_width="match_parent"
android:layout_height="@dimen/all_bounced_padding"
android:layout_below="@+id/ll_keyword"
android:background="@drawable/up_down_line_gray"></View>
<LinearLayout <LinearLayout
android:id="@+id/ll_left" android:id="@+id/ll_left"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/ll_keyword" android:layout_below="@+id/vw"
android:orientation="vertical" android:orientation="vertical">
>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -222,6 +228,8 @@ ...@@ -222,6 +228,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="名称:" android:text="名称:"
android:textColor="@color/black"/> android:textColor="@color/black"/>
...@@ -258,6 +266,8 @@ ...@@ -258,6 +266,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="价格:" android:text="价格:"
android:textColor="@color/black"/> android:textColor="@color/black"/>
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/transparent" android:background="@color/transparent"
android:onClick="@{OnClickListener}"
android:contentDescription="@string/store_scan" android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:src="@mipmap/but_sweep_yard"/> android:src="@mipmap/but_sweep_yard"/>
...@@ -126,7 +127,7 @@ ...@@ -126,7 +127,7 @@
android:id="@+id/btn_add" android:id="@+id/btn_add"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray" android:background="@drawable/up_down_line_white"
android:gravity="center" android:gravity="center"
android:onClick="@{OnClickListener}" android:onClick="@{OnClickListener}"
android:orientation="horizontal" android:orientation="horizontal"
......
...@@ -46,10 +46,7 @@ ...@@ -46,10 +46,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"/>
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout> </LinearLayout>
......
...@@ -13,15 +13,6 @@ ...@@ -13,15 +13,6 @@
android:orientation="vertical" android:orientation="vertical"
android:splitMotionEvents="false"> android:splitMotionEvents="false">
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<LinearLayout <LinearLayout
android:id="@+id/btn_add" android:id="@+id/btn_add"
......
...@@ -21,16 +21,6 @@ ...@@ -21,16 +21,6 @@
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:orientation="vertical"> android:orientation="vertical">
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
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" />
<EditText <EditText
android:id="@+id/ed_title" android:id="@+id/ed_title"
...@@ -45,10 +35,9 @@ ...@@ -45,10 +35,9 @@
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="text"
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_toBottomOf="@id/ic_title" /> app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout <RelativeLayout
android:layout_width="0dp" android:layout_width="0dp"
......
...@@ -7,22 +7,12 @@ ...@@ -7,22 +7,12 @@
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/all_line_width"
android:layout_marginTop="@dimen/all_spacing"
android:background="@color/gray_huanggai" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/rl_type" android:id="@+id/rl_type"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_spacing"
android:background="@color/white_caocao" /> android:background="@color/white_caocao" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai" />
</LinearLayout> </LinearLayout>
</layout> </layout>
\ No newline at end of file
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
android:id="@+id/statistics_recycler" android:id="@+id/statistics_recycler"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white_caocao"
android:visibility="gone"> android:visibility="gone">
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
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:background="@drawable/shape_gray_r1" android:background="@drawable/shape_black_b2"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="@dimen/all_spacing"> android:padding="@dimen/all_spacing">
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
<!-- TODO: Update blank fragmfragment_integral_indexyout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<View <View
android:layout_alignParentTop="true"
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:layout_alignParentTop="true"
android:background="@color/gray_huanggai" /> android:background="@color/gray_huanggai" />
<!--<LinearLayout--> <!--<LinearLayout-->
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
android:id="@+id/statistics_recycler" android:id="@+id/statistics_recycler"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white_caocao"
android:visibility="gone"> android:visibility="gone">
......
...@@ -4,18 +4,20 @@ ...@@ -4,18 +4,20 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<LinearLayout <RelativeLayout
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:background="@color/gray_zhouyu"
android:orientation="vertical"> android:orientation="vertical">
<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_marginTop="-2dp">
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recycler_other_selcet" android:id="@+id/recycler_other_selcet"
...@@ -24,7 +26,41 @@ ...@@ -24,7 +26,41 @@
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout> </android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ly_title"
android:background="@color/white_caocao">
<EditText
android:id="@+id/ed_title"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding"
android:layout_marginTop="@dimen/padding_small"
android:drawablePadding="@dimen/all_padding"
android:hint="@string/other_select_edit_hint"
android:imeOptions="actionSearch"
android:inputType="text"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low"
/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_below="@id/ll_title"
android:background="@color/gray_huanggai" />
</LinearLayout> </LinearLayout>
</RelativeLayout>
</layout> </layout>
\ No newline at end of file
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:gravity="center" android:gravity="center"
android:text="@{payResult?@string/settle_pay_succ:@string/settle_pay_fail}" android:text="@{payResult?@string/settle_pay_succ:@string/settle_pay_fail}"
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:textStyle="bold" /> android:textStyle="bold" />
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/settle_pay_time" android:text="@string/settle_pay_time"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" /> android:textSize="@dimen/all_body_size" />
<TextView <TextView
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/settle_pay_type" android:text="@string/settle_pay_type"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" /> android:textSize="@dimen/all_body_size" />
<TextView <TextView
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/settle_pay_count" android:text="@string/settle_pay_count"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" /> android:textSize="@dimen/all_body_size" />
<TextView <TextView
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/settle_pay_order_amt" android:text="@string/settle_pay_order_amt"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" /> android:textSize="@dimen/all_body_size" />
<TextView <TextView
......
...@@ -13,15 +13,6 @@ ...@@ -13,15 +13,6 @@
android:orientation="vertical" android:orientation="vertical"
android:splitMotionEvents="false"> android:splitMotionEvents="false">
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<EditText <EditText
android:id="@+id/ed_title" android:id="@+id/ed_title"
style="@style/searchBarEditor" style="@style/searchBarEditor"
...@@ -33,7 +24,7 @@ ...@@ -33,7 +24,7 @@
android:layout_marginTop="@dimen/padding_small" android:layout_marginTop="@dimen/padding_small"
android:drawablePadding="@dimen/all_padding" android:drawablePadding="@dimen/all_padding"
android:hint="@string/statistics_order_edit_hint" android:hint="@string/statistics_order_edit_hint"
android:inputType="number" android:imeOptions="actionSearch"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
......
...@@ -63,11 +63,6 @@ ...@@ -63,11 +63,6 @@
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:splitMotionEvents="false"> android:splitMotionEvents="false">
<include
android:id="@+id/ly_title"
layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_default" android:id="@+id/cl_default"
...@@ -87,7 +82,7 @@ ...@@ -87,7 +82,7 @@
android:paddingTop="@dimen/all_padding" android:paddingTop="@dimen/all_padding"
android:text="供货方" android:text="供货方"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size_low"
android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}" android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
...@@ -109,7 +104,6 @@ ...@@ -109,7 +104,6 @@
app:layout_constraintTop_toTopOf="@id/tv_supplier_title" /> app:layout_constraintTop_toTopOf="@id/tv_supplier_title" />
<View <View
android:id="@+id/view_line_left_1" android:id="@+id/view_line_left_1"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -215,7 +209,7 @@ ...@@ -215,7 +209,7 @@
android:paddingTop="@dimen/all_padding" android:paddingTop="@dimen/all_padding"
android:text="定货方" android:text="定货方"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size_low"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_supplier" /> app:layout_constraintTop_toBottomOf="@id/ll_supplier" />
...@@ -227,16 +221,12 @@ ...@@ -227,16 +221,12 @@
android:drawableStart="@mipmap/icon_stores" android:drawableStart="@mipmap/icon_stores"
android:text="@{shopName}" android:text="@{shopName}"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size_low"
app:layout_constraintBottom_toBottomOf="@id/tv_shop_title" app:layout_constraintBottom_toBottomOf="@id/tv_shop_title"
app:layout_constraintEnd_toEndOf="@id/tv_shop_title" app:layout_constraintEnd_toEndOf="@id/tv_shop_title"
app:layout_constraintTop_toTopOf="@id/tv_shop_title" /> app:layout_constraintTop_toTopOf="@id/tv_shop_title" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_slight_line_width"
android:background="@color/gray_kongming"
app:layout_constraintTop_toTopOf="@id/tv_shop_title" />
<View <View
android:id="@+id/view_line_left_2" android:id="@+id/view_line_left_2"
...@@ -502,7 +492,7 @@ ...@@ -502,7 +492,7 @@
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_below="@id/ly_title" android:layout_alignParentTop="true"
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"
...@@ -513,11 +503,7 @@ ...@@ -513,11 +503,7 @@
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" /> android:textSize="@dimen/all_text_size_low" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_above="@id/ed_title"
android:background="@color/gray_huanggai" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -69,6 +69,15 @@ ...@@ -69,6 +69,15 @@
app:layout_constraintRight_toLeftOf="@id/et_barcode" app:layout_constraintRight_toLeftOf="@id/et_barcode"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/all_margin"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@mipmap/point"
app:layout_constraintBottom_toTopOf="@id/et_barcode"
app:layout_constraintTop_toBottomOf="@id/et_barcode" />
<EditText <EditText
android:id="@+id/et_barcode" android:id="@+id/et_barcode"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -85,6 +94,14 @@ ...@@ -85,6 +94,14 @@
app:layout_constraintLeft_toRightOf="@id/tv_barcode_hint" app:layout_constraintLeft_toRightOf="@id/tv_barcode_hint"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:layout_width="@dimen/all_margin"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@mipmap/point"
app:layout_constraintBottom_toTopOf="@id/et_name"
app:layout_constraintTop_toBottomOf="@id/et_name" />
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
...@@ -114,6 +131,7 @@ ...@@ -114,6 +131,7 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/transparent" android:background="@color/transparent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/sku_name_hint"
android:inputType="text" android:inputType="text"
android:labelFor="@+id/et_name" android:labelFor="@+id/et_name"
android:saveEnabled="false" android:saveEnabled="false"
...@@ -187,11 +205,11 @@ ...@@ -187,11 +205,11 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" android:textSize="@dimen/all_body_size"
app:layout_constraintHorizontal_weight="1.5" app:layout_constraintHorizontal_weight="1.5"
app:layout_constraintLeft_toRightOf="@id/tv_type_hint" app:layout_constraintLeft_toRightOf="@id/tv_type_hint"
app:layout_constraintRight_toLeftOf="@id/ns_type_2" /> app:layout_constraintRight_toLeftOf="@id/ns_type_2"
app:textTint="@color/black_baozheng" />
<org.angmarch.views.NiceSpinner <org.angmarch.views.NiceSpinner
android:id="@+id/ns_type_2" android:id="@+id/ns_type_2"
...@@ -199,11 +217,11 @@ ...@@ -199,11 +217,11 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" android:textSize="@dimen/all_body_size"
app:layout_constraintHorizontal_weight="1.5" app:layout_constraintHorizontal_weight="1.5"
app:layout_constraintLeft_toRightOf="@id/ns_type_1" app:layout_constraintLeft_toRightOf="@id/ns_type_1"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent"
app:textTint="@color/black_baozheng" />
<org.angmarch.views.NiceSpinner <org.angmarch.views.NiceSpinner
android:id="@+id/ns_type_3" android:id="@+id/ns_type_3"
...@@ -211,11 +229,11 @@ ...@@ -211,11 +229,11 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" android:textSize="@dimen/all_body_size"
app:layout_constraintLeft_toLeftOf="@id/ns_type_1" app:layout_constraintLeft_toLeftOf="@id/ns_type_1"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ns_type_1" /> app:layout_constraintTop_toBottomOf="@id/ns_type_1"
app:textTint="@color/black_baozheng" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
<View <View
...@@ -247,8 +265,8 @@ ...@@ -247,8 +265,8 @@
android:layout_weight="3" android:layout_weight="3"
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textSize="@dimen/all_body_size"
android:textSize="@dimen/all_body_size" /> app:textTint="@color/black_baozheng" />
<TextView <TextView
android:id="@+id/tv_unit" android:id="@+id/tv_unit"
...@@ -289,8 +307,8 @@ ...@@ -289,8 +307,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="3" android:layout_weight="3"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textSize="@dimen/all_body_size"
android:textSize="@dimen/all_body_size" /> app:textTint="@color/black_baozheng" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -595,16 +613,12 @@ ...@@ -595,16 +613,12 @@
android:id="@+id/et_search" android:id="@+id/et_search"
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp"
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_spacing" android:layout_marginTop="@dimen/all_spacing"
android:hint="@string/sssku_search_hint" android:hint="@string/sssku_search_hint"
android:inputType="number" android:inputType="number"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"
android:visibility="@{isSelected?View.VISIBLE:View.GONE}" /> android:visibility="@{isSelected?View.VISIBLE:View.GONE}" />
<LinearLayout <LinearLayout
...@@ -748,8 +762,8 @@ ...@@ -748,8 +762,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="3" android:layout_weight="3"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textSize="@dimen/all_body_size"
android:textSize="@dimen/all_body_size" /> app:textTint="@color/black_baozheng" />
</LinearLayout> </LinearLayout>
<View <View
......
...@@ -27,11 +27,9 @@ ...@@ -27,11 +27,9 @@
android:id="@+id/tv_search" android:id="@+id/tv_search"
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/store_search_hint" android:textColor="@color/black_likui"
android:textColor="@color/gray_huanggai" android:text="@string/store_search_hint" />
android:textSize="@dimen/all_text_size" />
</LinearLayout> </LinearLayout>
<View <View
......
...@@ -18,50 +18,44 @@ ...@@ -18,50 +18,44 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:gravity="center" android:orientation="vertical">
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView <TextView
android:id="@+id/tv_search" android:id="@+id/tv_search"
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_gravity="center"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/store_search_hint" android:text="@string/store_search_hint"
android:textColor="@color/gray_huanggai" android:textColor="@color/black_likui" />
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<FrameLayout
android:id="@+id/ll_ms"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:orientation="vertical"
android:visibility="@{msCount>0 ?View.VISIBLE:View.GONE}">
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_gravity="top" android:layout_gravity="bottom"
android:background="@color/gray_kongming" /> android:background="@color/gray_huanggai" />
</FrameLayout>
<LinearLayout <LinearLayout
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_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@drawable/shape_gray_r1" android:layout_marginTop="@dimen/all_margin"
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}">
<TextView <TextView
android:id="@+id/tv_ms_type" android:id="@+id/tv_ms_type"
...@@ -91,17 +85,8 @@ ...@@ -91,17 +85,8 @@
android:drawablePadding="@dimen/all_spacing" android:drawablePadding="@dimen/all_spacing"
android:text="@{msCount +@string/store_ms_count}" android:text="@{msCount +@string/store_ms_count}"
android:textColor="@color/black_baozheng" /> android:textColor="@color/black_baozheng" />
</LinearLayout> </LinearLayout>
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
......
...@@ -10,7 +10,11 @@ ...@@ -10,7 +10,11 @@
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/rl_sku" android:id="@+id/rl_sku"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" /> android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</layout> </layout>
\ No newline at end of file
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
android:padding="@dimen/dp_4" android:padding="@dimen/dp_4"
android:text="规格" android:text="规格"
android:textSize="@dimen/all_text_size_small" android:textSize="@dimen/all_text_size_small"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tv_goods_code" app:layout_constraintBottom_toBottomOf="@id/tv_goods_code"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_goods_code" /> app:layout_constraintTop_toTopOf="@id/tv_goods_code" />
......
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<layout> <layout>
<data> <data>
<import type="android.view.View"/>
<variable
name="isShow"
type="Boolean"/>
</data> </data>
...@@ -25,9 +28,9 @@ ...@@ -25,9 +28,9 @@
android:src="@mipmap/right" /> android:src="@mipmap/right" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/iv" android:layout_alignParentStart="true"
android:paddingBottom="@dimen/all_padding" android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_bounced_padding" android:paddingStart="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_padding"> android:paddingTop="@dimen/all_padding">
...@@ -49,6 +52,23 @@ ...@@ -49,6 +52,23 @@
android:textSize="@dimen/et_textsize" /> android:textSize="@dimen/et_textsize" />
</LinearLayout> </LinearLayout>
<TextView
android:visibility="@{isShow? View.VISIBLE: View.GONE}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/iv"
android:textColor="@color/red_guanyu"
android:text="高级功能"
android:layout_marginEnd="@dimen/all_margin"
android:layout_centerVertical="true"
android:textSize="@dimen/all_text_size_small"
android:paddingTop="@dimen/dp_4"
android:paddingBottom="@dimen/dp_4"
android:paddingEnd="@dimen/all_bounced_padding"
android:paddingStart="@dimen/all_bounced_padding"
android:background="@drawable/red_border_thr_bigradius"/>
<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"
......
...@@ -14,15 +14,16 @@ ...@@ -14,15 +14,16 @@
android:id="@+id/iv_type" android:id="@+id/iv_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/icon_buy02" android:contentDescription="@null"
android:contentDescription="@null" /> android:src="@mipmap/icon_buy02" />
<TextView <TextView
android:id="@+id/tv_name" android:id="@+id/tv_name"
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_spacing" android:layout_marginTop="@dimen/all_spacing"
android:text="满减送" /> android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout> </LinearLayout>
</layout> </layout>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,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="wrap_content"
android:background="@drawable/singleline_white_gray" android:background="@color/white_caocao"
android:paddingBottom="@dimen/all_padding"> android:paddingBottom="@dimen/all_padding">
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
style="@style/other_select_smallstyle" style="@style/other_select_smallstyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="0dp"
android:padding="0dp"
android:text="12783163981789" android:text="12783163981789"
app:layout_constraintBottom_toBottomOf="@id/tv_goods_code_hint" app:layout_constraintBottom_toBottomOf="@id/tv_goods_code_hint"
app:layout_constraintStart_toEndOf="@id/tv_goods_code_hint" app:layout_constraintStart_toEndOf="@id/tv_goods_code_hint"
...@@ -64,6 +65,7 @@ ...@@ -64,6 +65,7 @@
android:padding="@dimen/dp_4" android:padding="@dimen/dp_4"
android:text="规格" android:text="规格"
android:textSize="@dimen/all_text_size_small" android:textSize="@dimen/all_text_size_small"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tv_goods_code" app:layout_constraintBottom_toBottomOf="@id/tv_goods_code"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_goods_code" /> app:layout_constraintTop_toTopOf="@id/tv_goods_code" />
...@@ -85,7 +87,7 @@ ...@@ -85,7 +87,7 @@
android:id="@+id/tv_rmb" android:id="@+id/tv_rmb"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="0dp"
android:text="@string/money_rmb" android:text="@string/money_rmb"
android:textColor="@color/store_product_price" android:textColor="@color/store_product_price"
android:textSize="@dimen/all_text_size_small" android:textSize="@dimen/all_text_size_small"
...@@ -169,6 +171,7 @@ ...@@ -169,6 +171,7 @@
style="@style/other_select_smallstyle" style="@style/other_select_smallstyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="0dp"
android:text="0个" android:text="0个"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/tv_stock_hint" app:layout_constraintBottom_toBottomOf="@id/tv_stock_hint"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/item_statistics_height" android:layout_height="@dimen/item_statistics_height"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"> android:foreground="?android:attr/selectableItemBackground">
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
...@@ -65,14 +64,6 @@ ...@@ -65,14 +64,6 @@
android:textSize="@dimen/all_text_size_small_small" android:textSize="@dimen/all_text_size_small_small"
app:layout_constraintBottom_toBottomOf="@id/img_left" app:layout_constraintBottom_toBottomOf="@id/img_left"
app:layout_constraintStart_toEndOf="@id/img_left" /> app:layout_constraintStart_toEndOf="@id/img_left" />
<View
android:layout_width="0dp"
android:layout_height="@dimen/view_line_L1"
android:background="@color/gray_zhouyu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/img_left" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</layout> </layout>
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic" android:id="@+id/iv_pic"
android:layout_width="80dp" android:layout_width="64dp"
android:layout_height="80dp" android:layout_height="64dp"
app:failureImage="@mipmap/icon_goods_default" app:failureImage="@mipmap/icon_goods_default"
app:placeholderImage="@mipmap/icon_goods_default" app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" /> app:roundedCornerRadius="@dimen/all_shape_radius" />
...@@ -39,11 +39,12 @@ ...@@ -39,11 +39,12 @@
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent" />
<LinearLayout <LinearLayout
android:id="@+id/ll_price"
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_spacing" android:layout_marginTop="@dimen/all_spacing"
app:layout_constraintBottom_toBottomOf="@id/ll_count" app:layout_constraintLeft_toLeftOf="@id/tv_name"
app:layout_constraintLeft_toLeftOf="@id/tv_name"> app:layout_constraintTop_toBottomOf="@id/tv_name">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -66,11 +67,10 @@ ...@@ -66,11 +67,10 @@
android:id="@+id/ll_count" android:id="@+id/ll_count"
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_spacing"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:gravity="center" android:gravity="center"
app:layout_constraintBottom_toBottomOf="@id/iv_pic" app:layout_constraintRight_toRightOf="@id/tv_name"
app:layout_constraintRight_toRightOf="@id/tv_name"> app:layout_constraintTop_toBottomOf="@id/ll_price">
<ImageView <ImageView
android:id="@+id/iv_reduce" android:id="@+id/iv_reduce"
...@@ -78,6 +78,7 @@ ...@@ -78,6 +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:src="@mipmap/but_reduce" android:src="@mipmap/but_reduce"
android:visibility="gone" /> android:visibility="gone" />
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
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:src="@mipmap/but_increase02" /> android:src="@mipmap/but_increase02" />
</LinearLayout> </LinearLayout>
...@@ -109,7 +111,7 @@ ...@@ -109,7 +111,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_pic" /> app:layout_constraintTop_toBottomOf="@id/ll_count" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@drawable/singleline_zhouyu_huanggai" android:background="@drawable/item_string_head_bg"
android:gravity="left" android:gravity="left"
android:paddingBottom="@dimen/all_padding" android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_bounced_padding" android:paddingStart="@dimen/all_bounced_padding"
......
...@@ -38,10 +38,7 @@ ...@@ -38,10 +38,7 @@
android:hint="@string/ms_editor_type_gift_search_hint" android:hint="@string/ms_editor_type_gift_search_hint"
android:inputType="text" android:inputType="text"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"
android:saveEnabled="false" android:saveEnabled="false" />
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
<ImageButton <ImageButton
android:id="@+id/btn_scan" android:id="@+id/btn_scan"
......
...@@ -69,29 +69,22 @@ ...@@ -69,29 +69,22 @@
<TextView <TextView
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_padding"
android:text="@{date}" android:text="@{date}"
android:textSize="@dimen/all_text_size_small" /> android:textSize="@dimen/all_text_size_small" />
</LinearLayout> </LinearLayout>
<View
android:id="@+id/view_line_left"
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/lyt_main_bg"
android:elevation="@dimen/view_line_L050"
app:layout_constraintTop_toBottomOf="@id/img_user" />
<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:layout_marginTop="@dimen/view_line_height" android:layout_marginTop="@dimen/all_bounced_padding"
android:background="@color/lyt_main_bg" android:background="@drawable/singleline_zhouyu_huanggai"
android:elevation="@dimen/view_line_L050" android:elevation="@dimen/view_line_L050"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="5" android:weightSum="5"
app:layout_constraintTop_toBottomOf="@id/view_line_left"> app:layout_constraintTop_toBottomOf="@id/img_user">
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
...@@ -151,8 +144,9 @@ ...@@ -151,8 +144,9 @@
android:id="@+id/ll_result" android:id="@+id/ll_result"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center_vertical|end"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/all_bounced_padding"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1" app:layout_constraintHorizontal_weight="1"
...@@ -162,7 +156,6 @@ ...@@ -162,7 +156,6 @@
android:id="@+id/tv_result_hint" android:id="@+id/tv_result_hint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:text="盘点结果:" android:text="盘点结果:"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/small_text_size" android:textSize="@dimen/small_text_size"
...@@ -173,6 +166,7 @@ ...@@ -173,6 +166,7 @@
<TextView <TextView
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"
android:background="@drawable/yellow_radius_bg" android:background="@drawable/yellow_radius_bg"
android:gravity="center" android:gravity="center"
android:paddingBottom="@dimen/dp_4" android:paddingBottom="@dimen/dp_4"
...@@ -189,8 +183,9 @@ ...@@ -189,8 +183,9 @@
android:id="@+id/ll_num" android:id="@+id/ll_num"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center_vertical|start"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/all_bounced_padding"
app:layout_constraintBottom_toBottomOf="@id/ll_result" app:layout_constraintBottom_toBottomOf="@id/ll_result"
app:layout_constraintEnd_toStartOf="@id/ll_result" app:layout_constraintEnd_toStartOf="@id/ll_result"
app:layout_constraintHorizontal_weight="1" app:layout_constraintHorizontal_weight="1"
...@@ -200,7 +195,6 @@ ...@@ -200,7 +195,6 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:text="盘点件数:" android:text="盘点件数:"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/small_text_size" android:textSize="@dimen/small_text_size"
...@@ -212,6 +206,7 @@ ...@@ -212,6 +206,7 @@
<TextView <TextView
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"
android:padding="@dimen/dp_4" android:padding="@dimen/dp_4"
android:text="@{sumNum}" android:text="@{sumNum}"
android:textColor="@color/black" android:textColor="@color/black"
......
...@@ -726,5 +726,6 @@ ...@@ -726,5 +726,6 @@
<string name="sku_update_price">调整价格</string> <string name="sku_update_price">调整价格</string>
<string name="sku_update_vip">调整会员</string> <string name="sku_update_vip">调整会员</string>
<string name="sku_name_hint">请输入商品名称</string>
</resources> </resources>
...@@ -429,6 +429,9 @@ ...@@ -429,6 +429,9 @@
<item name="android:maxLength">20</item> <item name="android:maxLength">20</item>
<item name="android:background">@drawable/shape_gray_r1</item> <item name="android:background">@drawable/shape_gray_r1</item>
<item name="android:imeOptions">actionSearch</item> <item name="android:imeOptions">actionSearch</item>
<item name="android:textSize">@dimen/all_body_size</item>
<item name="android:textColor">@color/black_baozheng</item>
<item name="android:textColorHint">@color/black_likui</item>
</style> </style>
<style name="searchEditor"> <style name="searchEditor">
......
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