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