Commit 00fffede authored by 姜敏's avatar 姜敏

Merge remote-tracking branch 'origin/master'

parents 962b2213 f831f4d6
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" /> <module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" />
<module fileurl="file://$PROJECT_DIR$/TangKuPos2.iml" filepath="$PROJECT_DIR$/TangKuPos2.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules> </modules>
</component> </component>
......
...@@ -11,9 +11,6 @@ android { ...@@ -11,9 +11,6 @@ android {
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
ndk{
abiFilters("armeabi", "armeabi-v7a","x86")
}
} }
//解决问题的代码 //解决问题的代码
dexOptions { dexOptions {
...@@ -47,7 +44,6 @@ android { ...@@ -47,7 +44,6 @@ android {
sourceSets { sourceSets {
main { main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/'] assets.srcDirs = ['src/main/assets', 'src/main/assets/']
jniLibs.srcDirs = ['libs']
} }
} }
} }
......
...@@ -531,6 +531,8 @@ public class C { ...@@ -531,6 +531,8 @@ public class C {
public static final int GIFT = 5; public static final int GIFT = 5;
//第二件促销 //第二件促销
public static final int SECOND_PRO = 6; public static final int SECOND_PRO = 6;
//满送
public static final int TICKET = 7;
} }
public final class DIS_TYPE { public final class DIS_TYPE {
......
...@@ -207,7 +207,6 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind ...@@ -207,7 +207,6 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
if (null != mDisp && (!mDisp.isDisposed())) { if (null != mDisp && (!mDisp.isDisposed())) {
mDisp.dispose(); mDisp.dispose();
} }
super.dismiss(); super.dismiss();
} }
} }
......
...@@ -566,6 +566,7 @@ public class Ossku implements BaseBean { ...@@ -566,6 +566,7 @@ public class Ossku implements BaseBean {
} }
public String getSpuImg() { public String getSpuImg() {
if (spuImg.contains("ngoods.png")) return "";
return spuImg; return spuImg;
} }
......
...@@ -12,7 +12,7 @@ import com.xingdata.zzdpos.util.ConvertUtil; ...@@ -12,7 +12,7 @@ import com.xingdata.zzdpos.util.ConvertUtil;
/** /**
* 订单详情(购物车商品明细) * 订单详情(购物车商品明细)
*/ */
public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint { public class Saledetail implements BaseModel, BaseBean, BaseGoodPrint {
public boolean isDiscount() { public boolean isDiscount() {
return skuPrice.longValue() != skuPricePay.longValue(); return skuPrice.longValue() != skuPricePay.longValue();
...@@ -676,6 +676,7 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint { ...@@ -676,6 +676,7 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint {
public String getSpuImg() { public String getSpuImg() {
if (spuImg.contains("ngoods.png")) return "";
return spuImg; return spuImg;
} }
......
...@@ -138,6 +138,7 @@ public class Sspr extends RealmObject implements BaseModel, BaseBean { ...@@ -138,6 +138,7 @@ public class Sspr extends RealmObject implements BaseModel, BaseBean {
} }
public String getSpuImg() { public String getSpuImg() {
if (spuImg.contains("ngoods.png")) return "";
return spuImg; return spuImg;
} }
......
...@@ -16,7 +16,7 @@ import io.realm.annotations.PrimaryKey; ...@@ -16,7 +16,7 @@ import io.realm.annotations.PrimaryKey;
/** /**
* 商品详情 * 商品详情
*/ */
public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,BaseGoodPrint { public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku, BaseGoodPrint {
@JSONField(serialize = false) @JSONField(serialize = false)
@Ignore @Ignore
private boolean isSelected; private boolean isSelected;
...@@ -463,6 +463,7 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B ...@@ -463,6 +463,7 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B
} }
public String getSpuImg() { public String getSpuImg() {
if (spuImg.contains("ngoods.png")) return "";
return spuImg; return spuImg;
} }
...@@ -766,7 +767,7 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B ...@@ -766,7 +767,7 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B
@Override @Override
public String getCnt() { public String getCnt() {
return getSkuCnt()+""; return getSkuCnt() + "";
} }
@Override @Override
...@@ -776,13 +777,13 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B ...@@ -776,13 +777,13 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B
@Override @Override
public String getPrice() { public String getPrice() {
return ConvertUtil.fenToYuan(getSkuCost(),false); return ConvertUtil.fenToYuan(getSkuCost(), false);
} }
@Override @Override
public String getSubtotal() { public String getSubtotal() {
return ConvertUtil.fenToYuan(getSellSumAmt(),false); return ConvertUtil.fenToYuan(getSellSumAmt(), false);
} }
@Override @Override
......
...@@ -290,6 +290,7 @@ public class Ussku extends RealmObject implements BaseModel, BaseBean, BaseSku { ...@@ -290,6 +290,7 @@ public class Ussku extends RealmObject implements BaseModel, BaseBean, BaseSku {
} }
public String getSpuImg() { public String getSpuImg() {
if (spuImg.contains("ngoods.png")) return "";
return spuImg; return spuImg;
} }
......
...@@ -163,7 +163,7 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd ...@@ -163,7 +163,7 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
mScanFragment.setOnScanCompletedListener(new ScanFragment mScanFragment.setOnScanCompletedListener(new ScanFragment
.OnScanCompletedListener() { .OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
pop(); pop();
mPresenter.mBaleSeachShopFragment.seachBarcode(barcode); mPresenter.mBaleSeachShopFragment.seachBarcode(barcode);
start(mPresenter.mBaleSeachShopFragment); start(mPresenter.mBaleSeachShopFragment);
......
...@@ -82,7 +82,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -82,7 +82,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
(new ScanFragment (new ScanFragment
.OnScanCompletedListener() { .OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted public void onScanCompleted
(String barcode) { (String barcode) {
pop(); pop();
loadingDialog.show( loadingDialog.show(
......
...@@ -197,7 +197,7 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -197,7 +197,7 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
mScanFragment = new ScanFragment(); mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
mPresenter.getProductByBarcode(barcode); mPresenter.getProductByBarcode(barcode);
} }
}); });
......
...@@ -27,6 +27,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -27,6 +27,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog; import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.manage.inventory.InventoryPresenter; import com.xingdata.zzdpos.ui.manage.inventory.InventoryPresenter;
import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryAdapter; import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.MyMenuItemDecoration; import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -71,7 +72,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment ...@@ -71,7 +72,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment
Drawable drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai); Drawable drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai);
mInventoryAdapter.bindToRecyclerView( mViewBinding.recyclerInventory); mInventoryAdapter.bindToRecyclerView( mViewBinding.recyclerInventory);
mViewBinding.recyclerInventory.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recyclerInventory.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mInventoryAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerInventory); mInventoryAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerInventory);
......
...@@ -64,7 +64,7 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ...@@ -64,7 +64,7 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
mScanFragment = new ScanFragment(); mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
mOtherListFragment.search(barcode); mOtherListFragment.search(barcode);
} }
}); });
......
...@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.model.Ossku; ...@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter; import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter;
import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter; import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -46,7 +47,7 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -46,7 +47,7 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
@Override @Override
public void initView() { public void initView() {
drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai); drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai);
listItemDecoration = new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable, 0); listItemDecoration = new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(), 16), drawable, 0);
mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>()); mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>());
mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select)); mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select));
mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity()));
...@@ -111,9 +112,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -111,9 +112,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
} }
public void setKeyword(String s){ public void setKeyword(String s) {
mViewBinding.edTitle.setText(s); mViewBinding.edTitle.setText(s);
} }
private View getEmptyView(int resHint) { private View getEmptyView(int resHint) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null); View view = getLayoutInflater().inflate(R.layout.view_empty, null);
view.setBackgroundResource(R.color.gray_zhouyu); view.setBackgroundResource(R.color.gray_zhouyu);
......
...@@ -57,7 +57,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -57,7 +57,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
mScanFragment = new ScanFragment(); mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { mScanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
mReplenishmentDetailFragment.scrollToItem(barcode); mReplenishmentDetailFragment.scrollToItem(barcode);
} }
}); });
......
...@@ -24,6 +24,7 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter; ...@@ -24,6 +24,7 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter;
import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter; import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -49,12 +50,12 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent ...@@ -49,12 +50,12 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent
mReplenishmentAdapter = new ReplenishmentAdapter(new ArrayList<>()); mReplenishmentAdapter = new ReplenishmentAdapter(new ArrayList<>());
mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
} else { } else {
mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
} }
mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> { mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> {
......
...@@ -28,8 +28,7 @@ import com.xingdata.zzdpos.util.Global; ...@@ -28,8 +28,7 @@ import com.xingdata.zzdpos.util.Global;
import java.util.List; import java.util.List;
public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements SsskuContract.View {
SsskuContract.View {
private ManagerFragment mManagerFragment = new ManagerFragment(); private ManagerFragment mManagerFragment = new ManagerFragment();
private SearchFragment mSearchFragment = new SearchFragment(); private SearchFragment mSearchFragment = new SearchFragment();
...@@ -127,6 +126,7 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -127,6 +126,7 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
public void showSearchFragment(int searchType) { public void showSearchFragment(int searchType) {
if (mSearchFragment.isAdded()) return; if (mSearchFragment.isAdded()) return;
mViewBinding.etSearch.requestFocus(); mViewBinding.etSearch.requestFocus();
KeyboardUtils.showSoftInput(mViewBinding.etSearch);
this.showTitleBarByTitleMode(searchType); this.showTitleBarByTitleMode(searchType);
this.start(mSearchFragment.setSearchType(searchType)); this.start(mSearchFragment.setSearchType(searchType));
} }
...@@ -145,7 +145,6 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -145,7 +145,6 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU_EDITOR); this.showTitleBarByTitleMode(C.TITLE_MODE.SKU_EDITOR);
mViewBinding.tvEditorHint.setText("已有"); mViewBinding.tvEditorHint.setText("已有");
mViewBinding.tvEditorHint.setBackgroundResource(R.drawable.shape_orange_r1); mViewBinding.tvEditorHint.setBackgroundResource(R.drawable.shape_orange_r1);
mViewBinding.tvTitle.setText(R.string.sssku_add); mViewBinding.tvTitle.setText(R.string.sssku_add);
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.ADD)); this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.ADD));
break; break;
...@@ -221,6 +220,12 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -221,6 +220,12 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
this.pop(); this.pop();
} }
@Override
public void backToMenuActivity() {
mPresenter.doOnFinish();
this.finish();
}
@Override @Override
public void addSku(Sssku sssku) { public void addSku(Sssku sssku) {
mManagerFragment.addSku(sssku); mManagerFragment.addSku(sssku);
......
...@@ -147,6 +147,11 @@ public interface SsskuContract { ...@@ -147,6 +147,11 @@ public interface SsskuContract {
*/ */
void backToDetailFragment(); void backToDetailFragment();
/**
* 返回菜单页面
*/
void backToMenuActivity();
/** /**
* 添加商品 * 添加商品
* *
...@@ -326,5 +331,11 @@ public interface SsskuContract { ...@@ -326,5 +331,11 @@ public interface SsskuContract {
* 主页面 - 点击菜单按钮 * 主页面 - 点击菜单按钮
*/ */
public abstract void clickSkuMenu(); public abstract void clickSkuMenu();
/**
* 主页面 - 关闭
*/
public abstract void doOnFinish();
} }
} }
package com.xingdata.zzdpos.ui.manage.sssku; package com.xingdata.zzdpos.ui.manage.sssku;
import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory; import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Sskugrp; import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.model.Sssku; import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.ui.splash.SplashPresenter;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
public class SsskuPresenter extends SsskuContract.Presenter { public class SsskuPresenter extends SsskuContract.Presenter {
/**
* 是否需要同步
*/
private boolean isNeedSync = false;
private int mPageNum; private int mPageNum;
private Long mSkuGrpId; private Long mSkuGrpId;
...@@ -209,6 +217,7 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -209,6 +217,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory.Sssku.addSssku(sssku).subscribe( ApiFactory.Sssku.addSssku(sssku).subscribe(
sssku1 -> { sssku1 -> {
mView.showMsg("添加成功"); mView.showMsg("添加成功");
isNeedSync = true;
mView.backToEditFragment(); mView.backToEditFragment();
mView.backToManagerFragment(); mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) { if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) {
...@@ -221,12 +230,13 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -221,12 +230,13 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory.Sssku.update(sssku).subscribe( ApiFactory.Sssku.update(sssku).subscribe(
sssku1 -> { sssku1 -> {
mView.showMsg("修改成功"); mView.showMsg("修改成功");
isNeedSync = true;
mView.backToEditFragment(); mView.backToEditFragment();
mView.backToManagerFragment(); mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId || mSkuGrpId == 0L) { if (sssku1.getSkuGrpId().longValue() == mSkuGrpId || mSkuGrpId == 0L) {
mView.updateSku(sssku1); mView.updateSku(sssku1);
} else { } else {
mView.deleteSku(sssku1.getSkuId()); mView.deleteSku(sssku1.getId());
} }
}, throwable -> mView.showMsg(throwable.getMessage())); }, throwable -> mView.showMsg(throwable.getMessage()));
break; break;
...@@ -234,6 +244,7 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -234,6 +244,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory.Sssku.addSssku(sssku).subscribe( ApiFactory.Sssku.addSssku(sssku).subscribe(
sssku1 -> { sssku1 -> {
mView.showMsg("添加成功"); mView.showMsg("添加成功");
isNeedSync = true;
mView.backToEditFragment(); mView.backToEditFragment();
mView.backToManagerFragment(); mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) { if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) {
...@@ -255,6 +266,31 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -255,6 +266,31 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView.showSkuMenuDialog(); mView.showSkuMenuDialog();
} }
@Override
public void doOnFinish() {
if (!isNeedSync) return;
final double[] nowPro = {0.0};
mView.showLoadingDialog();
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORCODE, "");
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORMSG, "");
for (int i = 0; i < SplashPresenter.listSync.size(); i++) {
ApiFactory.Sync.allDownload(SplashPresenter.listSync.get(i), new SplashPresenter.SynchronousTask() {
@Override
public void getPro(double pro) {
nowPro[0] += pro;
if (nowPro[0] >= 100) {
mView.dismissLoadingDialog();
}
}
@Override
public void error(String table, String errCode, String errMsg) {
}
}, (100.00 / SplashPresenter.listSync.size()));
}
}
/** /**
* 获取商品 * 获取商品
*/ */
......
...@@ -2,9 +2,9 @@ package com.xingdata.zzdpos.ui.manage.sssku.fragment; ...@@ -2,9 +2,9 @@ package com.xingdata.zzdpos.ui.manage.sssku.fragment;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.support.v4.app.ActivityCompat;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.widget.TextView;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
...@@ -12,6 +12,7 @@ import com.xingdata.zzdpos.base.BaseFragment; ...@@ -12,6 +12,7 @@ import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSsskuManagerBinding; import com.xingdata.zzdpos.databinding.FragmentSsskuManagerBinding;
import com.xingdata.zzdpos.model.Sskugrp; import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.model.Sssku; import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuPresenter; import com.xingdata.zzdpos.ui.manage.sssku.SsskuPresenter;
import com.xingdata.zzdpos.ui.manage.sssku.adapter.SkuAdapter; import com.xingdata.zzdpos.ui.manage.sssku.adapter.SkuAdapter;
import com.xingdata.zzdpos.ui.manage.sssku.adapter.SkugrpAdapter; import com.xingdata.zzdpos.ui.manage.sssku.adapter.SkugrpAdapter;
...@@ -60,6 +61,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -60,6 +61,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(R.string.sku_empty_hint);
mSkuAdapter.setEmptyView(view); mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
...@@ -80,7 +82,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -80,7 +82,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
mViewBinding.srlSku.setRefreshing(false); mViewBinding.srlSku.setRefreshing(false);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(false);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
...@@ -108,10 +110,13 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -108,10 +110,13 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
public void loadSkugrpState(Long skugrpId) { public void loadSkugrpState(Long skugrpId) {
for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) { for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) {
if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) { if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) {
int oldSelected = mSkugrpAdapter.getSelectedPosition();
mSkugrpAdapter.setSelectedPosition(i); mSkugrpAdapter.setSelectedPosition(i);
mSkugrpAdapter.notifyItemChanged(oldSelected);
mSkugrpAdapter.notifyItemChanged(i);
break;
} }
} }
mSkugrpAdapter.notifyDataSetChanged();
} }
/** /**
...@@ -151,7 +156,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -151,7 +156,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
*/ */
public void updateSku(Sssku sssku) { public void updateSku(Sssku sssku) {
for (int i = 0; i < mSkuAdapter.getData().size(); i++) { for (int i = 0; i < mSkuAdapter.getData().size(); i++) {
if (mSkuAdapter.getData().get(i).getSkuId().longValue() == sssku.getSkuId().longValue()) { if (mSkuAdapter.getData().get(i).getId().longValue() == sssku.getId().longValue()) {
mSkuAdapter.setData(i, sssku); mSkuAdapter.setData(i, sssku);
return; return;
} }
...@@ -165,7 +170,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -165,7 +170,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
*/ */
public void deleteSku(Long skuId) { public void deleteSku(Long skuId) {
for (int i = 0; i < mSkuAdapter.getData().size(); i++) { for (int i = 0; i < mSkuAdapter.getData().size(); i++) {
if (mSkuAdapter.getData().get(i).getSkuId().longValue() == skuId) { if (mSkuAdapter.getData().get(i).getId().longValue() == skuId) {
mSkuAdapter.remove(i); mSkuAdapter.remove(i);
return; return;
} }
...@@ -189,7 +194,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -189,7 +194,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
@Override @Override
public boolean onBackPressedSupport() { public boolean onBackPressedSupport() {
ActivityCompat.finishAfterTransition(getActivity()); ((SsskuActivity) getActivity()).backToMenuActivity();
return super.onBackPressedSupport(); return super.onBackPressedSupport();
} }
} }
...@@ -71,7 +71,7 @@ public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSe ...@@ -71,7 +71,7 @@ public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSe
mSkuAdapter.setEnableLoadMore(true); mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
package com.xingdata.zzdpos.ui.marketing.ms; package com.xingdata.zzdpos.ui.marketing.ms;
import android.content.Context;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
...@@ -20,25 +16,24 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -20,25 +16,24 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ms.fragment.AddFragment; import com.xingdata.zzdpos.ui.marketing.ms.fragment.AddFragment;
import com.xingdata.zzdpos.ui.marketing.ms.fragment.EditorFragment; import com.xingdata.zzdpos.ui.marketing.ms.fragment.EditorFragment;
import com.xingdata.zzdpos.ui.marketing.ms.fragment.ManagerFragment; import com.xingdata.zzdpos.ui.marketing.ms.fragment.ManagerFragment;
import com.xingdata.zzdpos.ui.marketing.ms.fragment.ScanFragment;
import com.xingdata.zzdpos.ui.marketing.ms.fragment.SearchFragment; import com.xingdata.zzdpos.ui.marketing.ms.fragment.SearchFragment;
import com.xingdata.zzdpos.ui.marketing.ms.model.Area; import com.xingdata.zzdpos.ui.marketing.ms.model.Area;
import com.xingdata.zzdpos.ui.marketing.ms.model.Group; import com.xingdata.zzdpos.ui.marketing.ms.model.Group;
import com.xingdata.zzdpos.ui.marketing.ms.model.Type; import com.xingdata.zzdpos.ui.marketing.ms.model.Type;
import com.xingdata.zzdpos.ui.marketing.ms.model.User; import com.xingdata.zzdpos.ui.marketing.ms.model.User;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.Global; import com.xingdata.zzdpos.util.Global;
import java.util.List; import java.util.List;
public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, ActivityMsBinding> public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, ActivityMsBinding> implements MsContract.View<Sku> {
implements MsContract.View<Sku> {
private ManagerFragment mManagerFragment = new ManagerFragment(); private ManagerFragment mManagerFragment = new ManagerFragment();
private EditorFragment mEditorFragment = new EditorFragment(); private EditorFragment mEditorFragment = new EditorFragment();
private AddFragment mAddFragment = new AddFragment(); private AddFragment mAddFragment = new AddFragment();
private SearchFragment<Sku> mSearchFragment = new SearchFragment<>(); private SearchFragment<Sku> mSearchFragment = new SearchFragment<>();
private ScanFragment<Sku> mScanFragment = new ScanFragment<>(); private ScanFragment mScanFragment = new ScanFragment<>();
private LoadingDialog mLoadingDialog = new LoadingDialog(); private LoadingDialog mLoadingDialog = new LoadingDialog();
...@@ -50,12 +45,8 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -50,12 +45,8 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
@Override @Override
public void initView() { public void initView() {
this.loadRootFragment(R.id.f_ms, mManagerFragment); this.loadRootFragment(R.id.f_ms, mManagerFragment);
mViewBinding.setTitleMode(C.TITLE_MODE.TEXT); mViewBinding.setTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.btnBack.setOnClickListener(view -> { mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
getTopFragment().onBackPressedSupport();
onBackPressedSupport();
});
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> { mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH) { if (i == EditorInfo.IME_ACTION_SEARCH) {
KeyboardUtils.hideSoftInput(textView); KeyboardUtils.hideSoftInput(textView);
...@@ -65,6 +56,10 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -65,6 +56,10 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
}); });
} }
@Override
public void onBackPressedSupport() {
}
@Override @Override
public void showMsg(String msg) { public void showMsg(String msg) {
ToastUtils.showShort(msg); ToastUtils.showShort(msg);
...@@ -82,11 +77,15 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -82,11 +77,15 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
@Override @Override
public void showEditorFragment(Ms ms) { public void showEditorFragment(Ms ms) {
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(getTitleRes(ms.getMsTools()));
start(mEditorFragment.setMs(ms).setEditMode(C.MS_EDITOR_MODE.UPDATE)); start(mEditorFragment.setMs(ms).setEditMode(C.MS_EDITOR_MODE.UPDATE));
} }
@Override @Override
public void showEditorFragment(int msType) { public void showEditorFragment(int msType) {
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(getTitleRes(msType));
start(mEditorFragment.setMs(msType).setEditMode(C.MS_EDITOR_MODE.ADD)); start(mEditorFragment.setMs(msType).setEditMode(C.MS_EDITOR_MODE.ADD));
} }
...@@ -96,10 +95,20 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -96,10 +95,20 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
this.start(mSearchFragment.setSearchType(searchType)); this.start(mSearchFragment.setSearchType(searchType));
} }
@Override
public void showSearchFragment(String keyword, int searchType) {
this.showTitleBarByTitleMode(searchType);
this.start(mSearchFragment.setKeyword(keyword).setSearchType(searchType));
}
@Override @Override
public void showScanFragment(int searchType) { public void showScanFragment(int searchType) {
this.showTitleBarByTitleMode(searchType); this.showTitleBarByTitleMode(searchType);
this.start(mScanFragment.setSearchType(searchType)); mScanFragment.setOnScanCompletedListener(barcode -> {
mScanFragment.pop();
mPresenter.scanCompleted(barcode, searchType);
});
this.start(mScanFragment);
} }
...@@ -150,13 +159,21 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -150,13 +159,21 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
@Override @Override
public void backToEditFragment() { public void backToEditFragment() {
this.popTo(EditorFragment.class, false);
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT); this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
this.pop();
} }
@Override @Override
public void backToManagerFragment() { public void backToManagerFragment() {
this.popTo(ManagerFragment.class, false); this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.ms_title);
this.pop();
}
@Override
public void backToMenuActivity() {
mPresenter.doOnFinish();
this.finish();
} }
@Override @Override
...@@ -189,6 +206,29 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -189,6 +206,29 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
} }
} }
/**
* 获取文字信息
*
* @param msType 营销计划类型
* @return 营销计划名称
*/
private int getTitleRes(int msType) {
switch (msType) {
case C.MS_TYPE.DIS:
return R.string.ms_type_dis;
case C.MS_TYPE.PROMOTION:
return R.string.ms_type_promotion;
case C.MS_TYPE.MONEY_OFF:
return R.string.ms_type_money_off;
case C.MS_TYPE.GIFT:
return R.string.ms_type_gift;
case C.MS_TYPE.SECOND:
return R.string.ms_type_dis;
default:
return R.string.ms_title;
}
}
@Override @Override
public boolean dispatchTouchEvent(MotionEvent ev) { public boolean dispatchTouchEvent(MotionEvent ev) {
Global.clickHideKeyboard(ev, this); Global.clickHideKeyboard(ev, this);
......
...@@ -47,9 +47,19 @@ interface MsContract { ...@@ -47,9 +47,19 @@ interface MsContract {
/** /**
* 显示搜索页面 * 显示搜索页面
*
* @param searchType 搜索类型
*/ */
void showSearchFragment(int searchType); void showSearchFragment(int searchType);
/**
* 显示搜素页面
*
* @param keyword 关键字
* @param searchType 搜索类型
*/
void showSearchFragment(String keyword, int searchType);
/** /**
* 显示扫描页面 * 显示扫描页面
* *
...@@ -131,6 +141,11 @@ interface MsContract { ...@@ -131,6 +141,11 @@ interface MsContract {
*/ */
void backToManagerFragment(); void backToManagerFragment();
/**
* 退回到菜单页面
*/
void backToMenuActivity();
/** /**
* 显示读取对话框 * 显示读取对话框
*/ */
...@@ -184,6 +199,11 @@ interface MsContract { ...@@ -184,6 +199,11 @@ interface MsContract {
*/ */
public abstract void clickGroupSkuSearch(); public abstract void clickGroupSkuSearch();
/**
* 编辑页面 - 点击营销主体商品的扫描键
*/
public abstract void clickGroupSkuScan();
/** /**
* 编辑页面 - 点击营销类型商品的搜索框 * 编辑页面 - 点击营销类型商品的搜索框
*/ */
...@@ -218,9 +238,17 @@ interface MsContract { ...@@ -218,9 +238,17 @@ interface MsContract {
public abstract void clickSku(Sku sku, int searchType); public abstract void clickSku(Sku sku, int searchType);
/** /**
* 搜素页面 - 退出 * 扫描页面 - 扫描成功
*
* @param barcode 条码
* @param searchType 扫描类型
*/
public abstract void scanCompleted(String barcode, int searchType);
/**
* 主页面 - 退出
*/ */
public abstract void exitSearchFragment(); public abstract void doOnFinish();
} }
} }
package com.xingdata.zzdpos.ui.marketing.ms; package com.xingdata.zzdpos.ui.marketing.ms;
import com.blankj.utilcode.util.SPUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory; import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.base.BaseSku; import com.xingdata.zzdpos.base.BaseSku;
...@@ -11,12 +12,18 @@ import com.xingdata.zzdpos.ui.marketing.ms.model.Area; ...@@ -11,12 +12,18 @@ import com.xingdata.zzdpos.ui.marketing.ms.model.Area;
import com.xingdata.zzdpos.ui.marketing.ms.model.Group; import com.xingdata.zzdpos.ui.marketing.ms.model.Group;
import com.xingdata.zzdpos.ui.marketing.ms.model.Type; import com.xingdata.zzdpos.ui.marketing.ms.model.Type;
import com.xingdata.zzdpos.ui.marketing.ms.model.User; import com.xingdata.zzdpos.ui.marketing.ms.model.User;
import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.ui.splash.SplashPresenter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> { public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> {
/**
* 是否需要同步
*/
private boolean isNeedSync = false;
/** /**
* 页码 * 页码
*/ */
...@@ -106,6 +113,11 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> ...@@ -106,6 +113,11 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
mView.showSearchFragment(C.TITLE_MODE.SKU); mView.showSearchFragment(C.TITLE_MODE.SKU);
} }
@Override
public void clickGroupSkuScan() {
mView.showScanFragment(C.TITLE_MODE.SKU);
}
@Override @Override
public void clickTypeSkuSearch() { public void clickTypeSkuSearch() {
mView.showSearchFragment(C.TITLE_MODE.GIFT); mView.showSearchFragment(C.TITLE_MODE.GIFT);
...@@ -128,6 +140,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> ...@@ -128,6 +140,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
.doOnSubscribe(disposable -> mView.dismissLoadingDialog()) .doOnSubscribe(disposable -> mView.dismissLoadingDialog())
.subscribe(ms1 -> { .subscribe(ms1 -> {
mView.showMsg("添加成功"); mView.showMsg("添加成功");
isNeedSync = true;
mView.backToManagerFragment(); mView.backToManagerFragment();
mView.addMs(ms1); mView.addMs(ms1);
}, throwable -> { }, throwable -> {
...@@ -139,6 +152,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> ...@@ -139,6 +152,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
.doOnSubscribe(disposable -> mView.dismissLoadingDialog()) .doOnSubscribe(disposable -> mView.dismissLoadingDialog())
.subscribe(ms1 -> { .subscribe(ms1 -> {
mView.showMsg("修改成功"); mView.showMsg("修改成功");
isNeedSync = true;
mView.backToManagerFragment(); mView.backToManagerFragment();
mView.updateMs(ms1); mView.updateMs(ms1);
}, throwable -> { }, throwable -> {
...@@ -166,10 +180,34 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> ...@@ -166,10 +180,34 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
} }
} }
@Override
public void scanCompleted(String barcode, int searchType) {
mView.showSearchFragment(barcode, searchType);
}
@Override @Override
public void exitSearchFragment() { public void doOnFinish() {
mView.backToEditFragment(); if (!isNeedSync) return;
final double[] nowPro = {0.0};
mView.showLoadingDialog();
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORCODE, "");
SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORMSG, "");
for (int i = 0; i < SplashPresenter.listSync.size(); i++) {
ApiFactory.Sync.allDownload(SplashPresenter.listSync.get(i), new SplashPresenter.SynchronousTask() {
@Override
public void getPro(double pro) {
nowPro[0] += pro;
if (nowPro[0] >= 100) {
mView.dismissLoadingDialog();
}
}
@Override
public void error(String table, String errCode, String errMsg) {
}
}, (100.00 / SplashPresenter.listSync.size()));
}
} }
/** /**
......
...@@ -95,7 +95,6 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> { ...@@ -95,7 +95,6 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> {
strType = mContext.getResources().getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName()); strType = mContext.getResources().getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
break; break;
} }
return strGroup + strType; return strGroup + strType;
} }
} }
...@@ -5,6 +5,7 @@ import android.support.v7.widget.GridLayoutManager; ...@@ -5,6 +5,7 @@ import android.support.v7.widget.GridLayoutManager;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentMsAddBinding; import com.xingdata.zzdpos.databinding.FragmentMsAddBinding;
import com.xingdata.zzdpos.ui.marketing.ms.MsActivity;
import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter; import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.adapter.TypeAdapter; import com.xingdata.zzdpos.ui.marketing.ms.adapter.TypeAdapter;
import com.xingdata.zzdpos.ui.marketing.ms.model.Type; import com.xingdata.zzdpos.ui.marketing.ms.model.Type;
...@@ -48,4 +49,9 @@ public class AddFragment extends BaseFragment<MsPresenter, FragmentMsAddBinding> ...@@ -48,4 +49,9 @@ public class AddFragment extends BaseFragment<MsPresenter, FragmentMsAddBinding>
mTypeAdapter.setNewData(types); mTypeAdapter.setNewData(types);
} }
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToManagerFragment();
return super.onBackPressedSupport();
}
} }
...@@ -21,6 +21,7 @@ import com.xingdata.zzdpos.databinding.FragmentMsEditorBinding; ...@@ -21,6 +21,7 @@ import com.xingdata.zzdpos.databinding.FragmentMsEditorBinding;
import com.xingdata.zzdpos.databinding.ViewTimeDetailBinding; import com.xingdata.zzdpos.databinding.ViewTimeDetailBinding;
import com.xingdata.zzdpos.model.Ms; import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.ui.login.LoginPresenter; import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.MsActivity;
import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter; import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.adapter.BeanAdapter; import com.xingdata.zzdpos.ui.marketing.ms.adapter.BeanAdapter;
import com.xingdata.zzdpos.ui.marketing.ms.model.Area; import com.xingdata.zzdpos.ui.marketing.ms.model.Area;
...@@ -502,4 +503,10 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi ...@@ -502,4 +503,10 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi
mPresenter.clickEditorConfirm(mMs, mEditorMode); mPresenter.clickEditorConfirm(mMs, mEditorMode);
} }
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToManagerFragment();
return super.onBackPressedSupport();
}
} }
...@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.R; ...@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentMsManagerBinding; import com.xingdata.zzdpos.databinding.FragmentMsManagerBinding;
import com.xingdata.zzdpos.model.Ms; import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.ui.marketing.ms.MsActivity;
import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter; import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.adapter.MsAdapter; import com.xingdata.zzdpos.ui.marketing.ms.adapter.MsAdapter;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -43,6 +44,12 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager ...@@ -43,6 +44,12 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager
refreshMs(); refreshMs();
} }
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToMenuActivity();
return super.onBackPressedSupport();
}
/** /**
* 加载营销计划数据 * 加载营销计划数据
* *
...@@ -56,7 +63,7 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager ...@@ -56,7 +63,7 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager
mViewBinding.srlMs.setRefreshing(false); mViewBinding.srlMs.setRefreshing(false);
mMsAdapter.setNewData(mss); mMsAdapter.setNewData(mss);
} else if (mss.size() > 0) mMsAdapter.addData(mss); } else if (mss.size() > 0) mMsAdapter.addData(mss);
if (mss.size() < C.PRODUCT.PAGE_SIZE) mMsAdapter.loadMoreEnd(isRefresh); if (mss.size() <= C.PRODUCT.PAGE_SIZE) mMsAdapter.loadMoreEnd(isRefresh);
else mMsAdapter.loadMoreComplete(); else mMsAdapter.loadMoreComplete();
} }
......
package com.xingdata.zzdpos.ui.marketing.ms.fragment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.databinding.FragmentMsScanBinding;
import com.xingdata.zzdpos.ui.store.StorePresenter;
public class ScanFragment<Sku extends BaseSku> extends BaseFragment<StorePresenter, FragmentMsScanBinding> {
private int mSearchType;
@Override
public int getLayoutId() {
return R.layout.fragment_ms_scan;
}
@Override
public void initView() {
}
/**
* 设置搜索类型
*
* @param searchType 搜索类型
* @return this
*/
public ScanFragment setSearchType(int searchType) {
this.mSearchType = searchType;
return this;
}
}
...@@ -3,19 +3,25 @@ package com.xingdata.zzdpos.ui.marketing.ms.fragment; ...@@ -3,19 +3,25 @@ package com.xingdata.zzdpos.ui.marketing.ms.fragment;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BaseSku; import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.databinding.FragmentMsSearchBinding; import com.xingdata.zzdpos.databinding.FragmentMsSearchBinding;
import com.xingdata.zzdpos.ui.marketing.ms.MsActivity;
import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter; import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.adapter.SkuAdapter; import com.xingdata.zzdpos.ui.marketing.ms.adapter.SkuAdapter;
import java.util.List; import java.util.List;
public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresenter, FragmentMsSearchBinding> { public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresenter, FragmentMsSearchBinding> {
private int mSearchType; private int mSearchType;
private String mKeyword;
private SkuAdapter<Sku> mSkuAdapter; private SkuAdapter<Sku> mSkuAdapter;
@Override @Override
...@@ -39,15 +45,12 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente ...@@ -39,15 +45,12 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(R.string.sku_empty_hint);
mSkuAdapter.setEmptyView(view); mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
}
@Override //init
public void onDestroyView() { if (!StringUtils.isEmpty(mKeyword)) mPresenter.clickSearchButton(mKeyword);
mPresenter.exitSearchFragment();
super.onDestroyView();
} }
/** /**
...@@ -69,7 +72,7 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente ...@@ -69,7 +72,7 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente
mSkuAdapter.setEnableLoadMore(true); mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
...@@ -84,4 +87,20 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente ...@@ -84,4 +87,20 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente
this.mSearchType = searchType; this.mSearchType = searchType;
return this; return this;
} }
/**
* 设置搜索关键字
*
* @param keyword 关键字
*/
public SearchFragment setKeyword(String keyword) {
this.mKeyword = keyword;
return this;
}
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToEditFragment();
return super.onBackPressedSupport();
}
} }
...@@ -29,6 +29,9 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk ...@@ -29,6 +29,9 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> { mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> {
if (b) mPresenter.clickGroupSkuSearch(); if (b) mPresenter.clickGroupSkuSearch();
}); });
mViewBinding.btnScan.setOnClickListener(view -> {
mPresenter.clickGroupSkuScan();
});
} }
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
...@@ -37,6 +40,7 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk ...@@ -37,6 +40,7 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk
if (mMs.getMsTouchTag2() == null || mMs.getMsTouchTag2() != C.MS_GROUP.SKU) return; if (mMs.getMsTouchTag2() == null || mMs.getMsTouchTag2() != C.MS_GROUP.SKU) return;
mViewBinding.llProduct.setVisibility(View.VISIBLE); mViewBinding.llProduct.setVisibility(View.VISIBLE);
mViewBinding.etSearch.setText(ConvertUtil.longToString(mMs.getSkuBarCode())); mViewBinding.etSearch.setText(ConvertUtil.longToString(mMs.getSkuBarCode()));
mViewBinding.setName(mMs.getSkuName()); mViewBinding.setName(mMs.getSkuName());
mViewBinding.setPrice(ConvertUtil.fenToYuan(mMs.getSkuPrice1(), true)); mViewBinding.setPrice(ConvertUtil.fenToYuan(mMs.getSkuPrice1(), true));
} }
......
...@@ -2,6 +2,8 @@ package com.xingdata.zzdpos.ui.marketing.ms.view; ...@@ -2,6 +2,8 @@ package com.xingdata.zzdpos.ui.marketing.ms.view;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
...@@ -11,11 +13,28 @@ import com.xingdata.zzdpos.model.Ms; ...@@ -11,11 +13,28 @@ import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.InputFilters; import com.xingdata.zzdpos.util.InputFilters;
/** /**
* 满减返现页面 * 满减返现页面
*/ */
public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
private View.OnFocusChangeListener mOnFocusChangeListener;
public TypeMoneyOffView() {
mOnFocusChangeListener = (view, b) -> {
if (view instanceof EditText) {
EditText editText = (EditText) view;
if (b && editText.getText().toString().equals("0.00")) {
editText.setText("");
} else if (!b && editText.getText().length() == 0) {
editText.setText("0.00");
}
}
};
}
@Override @Override
public int getLayoutId() { public int getLayoutId() {
return R.layout.view_type_money_off; return R.layout.view_type_money_off;
...@@ -44,7 +63,6 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { ...@@ -44,7 +63,6 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
} }
} }
}); });
mViewBinding.etDisAmt.addTextChangedListener(new TextWatcher() { mViewBinding.etDisAmt.addTextChangedListener(new TextWatcher() {
@Override @Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
...@@ -62,6 +80,9 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { ...@@ -62,6 +80,9 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
} }
} }
}); });
mViewBinding.etAmt.setOnFocusChangeListener(mOnFocusChangeListener);
mViewBinding.etDisAmt.setOnFocusChangeListener(mOnFocusChangeListener);
} }
@Override @Override
...@@ -77,11 +98,13 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> { ...@@ -77,11 +98,13 @@ public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
String strAmt = mViewBinding.etAmt.getText().toString(); String strAmt = mViewBinding.etAmt.getText().toString();
if (StringUtils.isEmpty(strAmt)) return false; if (StringUtils.isEmpty(strAmt)) return false;
if (ConvertUtil.yuanToFen(strAmt) <= 0) return false;
ms.setPayAmt(ConvertUtil.yuanToFen(strAmt)); ms.setPayAmt(ConvertUtil.yuanToFen(strAmt));
String strDisAmt = mViewBinding.etDisAmt.getText().toString(); String strDisAmt = mViewBinding.etDisAmt.getText().toString();
if (StringUtils.isEmpty(strDisAmt)) return false; if (StringUtils.isEmpty(strDisAmt)) return false;
if (ConvertUtil.yuanToFen(strDisAmt) > ConvertUtil.yuanToFen(strAmt)) return false; if (ConvertUtil.yuanToFen(strDisAmt) > ConvertUtil.yuanToFen(strAmt)) return false;
if (ConvertUtil.yuanToFen(strDisAmt) <= 0) return false;
ms.setGiftOffAmt(ConvertUtil.yuanToFen(strDisAmt)); ms.setGiftOffAmt(ConvertUtil.yuanToFen(strDisAmt));
return true; return true;
......
...@@ -23,6 +23,7 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -23,6 +23,7 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
} }
private OnScanCompletedListener mOnScanCompletedListener; private OnScanCompletedListener mOnScanCompletedListener;
private OnBackPressedListener mOnBackPressedListener;
public OnScanCompletedListener getOnScanCompletedListener() { public OnScanCompletedListener getOnScanCompletedListener() {
return mOnScanCompletedListener; return mOnScanCompletedListener;
...@@ -32,8 +33,20 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -32,8 +33,20 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
this.mOnScanCompletedListener = onScanCompletedListener; this.mOnScanCompletedListener = onScanCompletedListener;
} }
public OnBackPressedListener getOnBackPressedListener() {
return mOnBackPressedListener;
}
public void setOnBackPressedListener(OnBackPressedListener onBackPressedListener) {
this.mOnBackPressedListener = onBackPressedListener;
}
public interface OnScanCompletedListener { public interface OnScanCompletedListener {
void OnScanCompleted(String barcode); void onScanCompleted(String barcode);
}
public interface OnBackPressedListener {
void onBackPressed();
} }
@Override @Override
...@@ -44,14 +57,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -44,14 +57,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
return new ScanFragment.CustomViewFinderView(context); return new ScanFragment.CustomViewFinderView(context);
} }
}; };
mResultHandler = result -> { mResultHandler = result -> {
if (mOnScanCompletedListener != null) { if (mOnScanCompletedListener != null) {
mOnScanCompletedListener.OnScanCompleted(result.getText()); mOnScanCompletedListener.onScanCompleted(result.getText());
} }
resetScanner(); resetScanner();
}; };
mScannerView.setResultHandler(mResultHandler); mScannerView.setResultHandler(mResultHandler);
mViewBinding.contentFrame.addView(mScannerView); mViewBinding.contentFrame.addView(mScannerView);
} }
...@@ -75,6 +86,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm ...@@ -75,6 +86,12 @@ public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, Fragm
new Handler().postDelayed(() -> mScannerView.resumeCameraPreview(mResultHandler), 1000); new Handler().postDelayed(() -> mScannerView.resumeCameraPreview(mResultHandler), 1000);
} }
@Override
public boolean onBackPressedSupport() {
if (mOnBackPressedListener != null) mOnBackPressedListener.onBackPressed();
return super.onBackPressedSupport();
}
private static class CustomViewFinderView extends ViewFinderView { private static class CustomViewFinderView extends ViewFinderView {
public CustomViewFinderView(Context context) { public CustomViewFinderView(Context context) {
......
...@@ -56,10 +56,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -56,10 +56,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
public void initView() { public void initView() {
this.loadRootFragment(R.id.f_settle, mSettleFragment); this.loadRootFragment(R.id.f_settle, mSettleFragment);
mViewBinding.setTitleMode(C.TITLE_MODE.TEXT); mViewBinding.setTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.btnBack.setOnClickListener(view -> { mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
getTopFragment().onBackPressedSupport();
onBackPressedSupport();
});
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> { mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH) { if (i == EditorInfo.IME_ACTION_SEARCH) {
KeyboardUtils.hideSoftInput(textView); KeyboardUtils.hideSoftInput(textView);
...@@ -73,6 +70,10 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -73,6 +70,10 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
}); });
} }
@Override
public void onBackPressedSupport() {
}
@Override @Override
public void showMsg(String msg) { public void showMsg(String msg) {
ToastUtils.showShort(msg); ToastUtils.showShort(msg);
...@@ -133,6 +134,8 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -133,6 +134,8 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
public void showPayFragment(Saleorder saleorder) { public void showPayFragment(Saleorder saleorder) {
switch (saleorder.getPayType()) { switch (saleorder.getPayType()) {
case C.PAY_CHANNEL.CASH: case C.PAY_CHANNEL.CASH:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.settle_channel_cash);
this.start(mCashPayFragment.setSaleorder(saleorder)); this.start(mCashPayFragment.setSaleorder(saleorder));
break; break;
case C.PAY_CHANNEL.TALLY: case C.PAY_CHANNEL.TALLY:
...@@ -140,18 +143,25 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -140,18 +143,25 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
mPasswordDialog.setSaleorder(saleorder).show(this); mPasswordDialog.setSaleorder(saleorder).show(this);
break; break;
case C.PAY_CHANNEL.BANK: case C.PAY_CHANNEL.BANK:
break;
case C.PAY_CHANNEL.ALI: case C.PAY_CHANNEL.ALI:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.settle_channel_ali);
mScanFragment.setOnScanCompletedListener(barcode -> { mScanFragment.setOnScanCompletedListener(barcode -> {
this.pop(); this.pop();
mPresenter.payInAli(barcode); mPresenter.payInAli(barcode);
}); });
mScanFragment.setOnBackPressedListener(this::backToSettleFragment);
this.start(mScanFragment); this.start(mScanFragment);
break; break;
case C.PAY_CHANNEL.WECHAT: case C.PAY_CHANNEL.WECHAT:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.settle_channel_wechat);
mScanFragment.setOnScanCompletedListener(barcode -> { mScanFragment.setOnScanCompletedListener(barcode -> {
this.pop(); this.pop();
mPresenter.payInWechat(barcode); mPresenter.payInWechat(barcode);
}); });
mScanFragment.setOnBackPressedListener(this::backToSettleFragment);
this.start(mScanFragment); this.start(mScanFragment);
break; break;
} }
......
package com.xingdata.zzdpos.ui.settle; package com.xingdata.zzdpos.ui.settle;
import android.widget.TextView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
...@@ -159,6 +157,7 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -159,6 +157,7 @@ public class SettlePresenter extends SettleContract.Presenter {
mView.loadVips(vips); mView.loadVips(vips);
}, },
throwable -> { throwable -> {
mView.loadVips(new ArrayList<>());
}); });
} }
...@@ -387,9 +386,9 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -387,9 +386,9 @@ public class SettlePresenter extends SettleContract.Presenter {
private void paySucc(Saleorder saleorder) { private void paySucc(Saleorder saleorder) {
mView.showPaySuccFragment(saleorder); mView.showPaySuccFragment(saleorder);
this.updateHandover(MainPresenter.handoverInfo); this.updateHandover(MainPresenter.handoverInfo);
try{ try {
ZX_PrintPOS.getInstance(MainActivity.mainActivity).print(1, saleorder); ZX_PrintPOS.getInstance(MainActivity.mainActivity).print(1, saleorder);
}catch (Exception e){ } catch (Exception e) {
ToastUtils.showShort("打印异常"); ToastUtils.showShort("打印异常");
} }
......
...@@ -4,6 +4,7 @@ import com.xingdata.zzdpos.R; ...@@ -4,6 +4,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentPayCashBinding; import com.xingdata.zzdpos.databinding.FragmentPayCashBinding;
import com.xingdata.zzdpos.model.Saleorder; import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.settle.SettlePresenter; import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.view.InputerView; import com.xingdata.zzdpos.ui.settle.view.InputerView;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
...@@ -68,4 +69,9 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa ...@@ -68,4 +69,9 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa
} }
} }
@Override
public boolean onBackPressedSupport() {
((SettleActivity) getActivity()).backToSettleFragment();
return super.onBackPressedSupport();
}
} }
...@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.ui.settle.fragment; ...@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.ui.settle.fragment;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.BottomSheetBehavior;
import android.support.v4.app.ActivityCompat;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.StaggeredGridLayoutManager; import android.support.v7.widget.StaggeredGridLayoutManager;
...@@ -80,8 +81,10 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle ...@@ -80,8 +81,10 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
if (BottomSheetBehavior.from(mViewBinding.llSheet).getState() == BottomSheetBehavior.STATE_EXPANDED) { if (BottomSheetBehavior.from(mViewBinding.llSheet).getState() == BottomSheetBehavior.STATE_EXPANDED) {
BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_COLLAPSED); BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_COLLAPSED);
return true; return true;
} else {
ActivityCompat.finishAfterTransition(getActivity());
return super.onBackPressedSupport();
} }
return super.onBackPressedSupport();
} }
/** /**
...@@ -95,6 +98,7 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle ...@@ -95,6 +98,7 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
mViewBinding.llStore.setVisibility(View.GONE); mViewBinding.llStore.setVisibility(View.GONE);
mPresenter.initPaymentInfo(); mPresenter.initPaymentInfo();
BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_EXPANDED); BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_EXPANDED);
mViewBinding.tvSettle.setAlpha(0);
break; break;
case C.SETTLE_MODE.STORE: case C.SETTLE_MODE.STORE:
mViewBinding.llStore.setVisibility(View.VISIBLE); mViewBinding.llStore.setVisibility(View.VISIBLE);
......
...@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.R; ...@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSettleTicketBinding; import com.xingdata.zzdpos.databinding.FragmentSettleTicketBinding;
import com.xingdata.zzdpos.model.Ticket; import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.settle.SettlePresenter; import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.adapter.TicketAdapter; import com.xingdata.zzdpos.ui.settle.adapter.TicketAdapter;
...@@ -96,4 +97,10 @@ public class TicketFragment extends BaseFragment<SettlePresenter, FragmentSettle ...@@ -96,4 +97,10 @@ public class TicketFragment extends BaseFragment<SettlePresenter, FragmentSettle
mTicketAdapter.notifyDataSetChanged(); mTicketAdapter.notifyDataSetChanged();
} }
@Override
public boolean onBackPressedSupport() {
((SettleActivity) getActivity()).backToSettleFragment();
return super.onBackPressedSupport();
}
} }
...@@ -9,6 +9,7 @@ import com.xingdata.zzdpos.R; ...@@ -9,6 +9,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSettleVipBinding; import com.xingdata.zzdpos.databinding.FragmentSettleVipBinding;
import com.xingdata.zzdpos.model.Vip; import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.settle.SettlePresenter; import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.adapter.VipAdapter; import com.xingdata.zzdpos.ui.settle.adapter.VipAdapter;
...@@ -48,6 +49,7 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip ...@@ -48,6 +49,7 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
* @param vips 会员列表 * @param vips 会员列表
*/ */
public void loadVips(List<Vip> vips) { public void loadVips(List<Vip> vips) {
((TextView) mVipAdapter.getEmptyView().findViewById(R.id.tv_empty)).setText(R.string.settle_vip_search_none);
if (vips.size() == 1) { if (vips.size() == 1) {
mPresenter.selectVip(vips.get(0)); mPresenter.selectVip(vips.get(0));
this.pop(); this.pop();
...@@ -59,8 +61,8 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip ...@@ -59,8 +61,8 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
@Override @Override
public void onDestroyView() { public boolean onBackPressedSupport() {
mPresenter.exitVipFragment(); ((SettleActivity) getActivity()).backToSettleFragment();
super.onDestroyView(); return super.onBackPressedSupport();
} }
} }
...@@ -38,7 +38,7 @@ public class StatisticsRechargeGroupAdapter extends BaseSectionQuickAdapter<VipR ...@@ -38,7 +38,7 @@ public class StatisticsRechargeGroupAdapter extends BaseSectionQuickAdapter<VipR
helper.setText(R.id.tv_left_top,item.getUserName()); helper.setText(R.id.tv_left_top,item.getUserName());
helper.setText(R.id.tv_left_bottom,com.blankj.utilcode.util.TimeUtils.millis2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern))); helper.setText(R.id.tv_left_bottom,com.blankj.utilcode.util.TimeUtils.millis2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern)));
helper.setText(R.id.tv_right_top,"+"+ ConvertUtil.fenToYuan(item.getCardAmtPay(),false)); helper.setText(R.id.tv_right_top,"+"+ ConvertUtil.fenToYuan(item.getCardAmtPay(),false));
((ImageView)helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_text_recharge); ((ImageView)helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_filling);
} }
......
...@@ -35,7 +35,7 @@ public class StatisticsTicketGroupAdapter extends BaseSectionQuickAdapter<Ticket ...@@ -35,7 +35,7 @@ public class StatisticsTicketGroupAdapter extends BaseSectionQuickAdapter<Ticket
protected void convert(BaseViewHolder helper, Ticket item) { protected void convert(BaseViewHolder helper, Ticket item) {
helper.setText(R.id.tv_left_top, ConvertUtil.fenToYuanNoZero(item.getTicketValAmt()) + "元优惠券"); helper.setText(R.id.tv_left_top, ConvertUtil.fenToYuanNoZero(item.getTicketValAmt()) + "元优惠券");
helper.setText(R.id.tv_left_bottom, TimeUtils.date2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern))); helper.setText(R.id.tv_left_bottom, TimeUtils.date2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern)));
((ImageView) helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_text_ticket); ((ImageView) helper.getView(R.id.img_left)).setImageResource(R.mipmap.icon_record);
} }
......
...@@ -67,18 +67,20 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -67,18 +67,20 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
return false; return false;
}); });
mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission(PermissionConstants.CAMERA) mViewBinding.btnScan.setOnClickListener(view ->
.callback(new PermissionUtils.FullCallback() { PermissionUtils.permission(PermissionConstants.CAMERA)
@Override .callback(new PermissionUtils.FullCallback() {
public void onGranted(List<String> permissionsGranted) { @Override
mPresenter.clickScan(); public void onGranted(List<String> permissionsGranted) {
} mPresenter.clickScan();
}
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) { @Override
} public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) {
}) }
.request()); })
.request()
);
mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode)); mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode));
} }
...@@ -159,8 +161,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -159,8 +161,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
public void showSearchFragment() { public void showSearchFragment() {
if (!mSearchFragment.isAdded()) { if (!mSearchFragment.isAdded()) {
mViewBinding.setTitleMode(C.TITLE_MODE.SKU); mViewBinding.setTitleMode(C.TITLE_MODE.SKU);
mViewBinding.etSearch.setVisibility(View.VISIBLE);
mViewBinding.etSearch.setText(""); mViewBinding.etSearch.setText("");
mViewBinding.etSearch.requestFocus(); mViewBinding.etSearch.requestFocus();
KeyboardUtils.showSoftInput(mViewBinding.etSearch);
this.start(mSearchFragment.setKeyword("")); this.start(mSearchFragment.setKeyword(""));
} }
} }
......
...@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager; ...@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.view.animation.LinearInterpolator; import android.view.animation.LinearInterpolator;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import com.blankj.utilcode.util.ScreenUtils; import com.blankj.utilcode.util.ScreenUtils;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
...@@ -53,6 +54,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -53,6 +54,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(R.string.sku_empty_hint);
mSkuAdapter.setEmptyView(view); mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
...@@ -87,7 +89,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -87,7 +89,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
mSkuAdapter.setEnableLoadMore(true); mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
...@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager; ...@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.view.animation.LinearInterpolator; import android.view.animation.LinearInterpolator;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import com.blankj.utilcode.util.ScreenUtils; import com.blankj.utilcode.util.ScreenUtils;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
...@@ -64,6 +65,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -64,6 +65,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
else mPresenter.clickRemoveSku(sku, value); else mPresenter.clickRemoveSku(sku, value);
}); });
// set grp listener // set grp listener
mSkugrpAdapter.setOnItemClickListener((adapter, view, position) -> mPresenter.clickSkugrp(mSkugrpAdapter.getData().get(position))); mSkugrpAdapter.setOnItemClickListener((adapter, view, position) -> mPresenter.clickSkugrp(mSkugrpAdapter.getData().get(position)));
...@@ -72,11 +74,11 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -72,11 +74,11 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
mViewBinding.tvSearch.setOnClickListener(view -> mPresenter.searchBarFocusChanged(true)); mViewBinding.tvSearch.setOnClickListener(view -> mPresenter.searchBarFocusChanged(true));
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View emptyView = getLayoutInflater().inflate(R.layout.view_empty, null);
mSkuAdapter.setEmptyView(view); ((TextView) emptyView.findViewById(R.id.tv_empty)).setText(R.string.sku_empty_hint);
mSkuAdapter.setEmptyView(emptyView);
mSkuAdapter.isUseEmpty(false); mSkuAdapter.isUseEmpty(false);
// init data // init data
mPresenter.initStore(); mPresenter.initStore();
} }
...@@ -114,10 +116,13 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -114,10 +116,13 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
public void loadSkugrpState(Long skugrpId) { public void loadSkugrpState(Long skugrpId) {
for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) { for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) {
if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) { if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) {
int oldSelected = mSkugrpAdapter.getSelectedPosition();
mSkugrpAdapter.setSelectedPosition(i); mSkugrpAdapter.setSelectedPosition(i);
mSkugrpAdapter.notifyItemChanged(oldSelected);
mSkugrpAdapter.notifyItemChanged(i);
break;
} }
} }
mSkugrpAdapter.notifyDataSetChanged();
} }
/** /**
...@@ -213,7 +218,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -213,7 +218,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
mViewBinding.srlSku.setRefreshing(false); mViewBinding.srlSku.setRefreshing(false);
mSkuAdapter.setNewData(skus); mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus); } else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh); if (skus.size() <= C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(false);
else mSkuAdapter.loadMoreComplete(); else mSkuAdapter.loadMoreComplete();
} }
......
...@@ -8,8 +8,6 @@ import android.annotation.SuppressLint; ...@@ -8,8 +8,6 @@ import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.view.Gravity; import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RadioButton; import android.widget.RadioButton;
...@@ -71,7 +69,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB ...@@ -71,7 +69,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
}); });
scanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() { scanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override @Override
public void OnScanCompleted(String barcode) { public void onScanCompleted(String barcode) {
ToastUtils.showShort(barcode); ToastUtils.showShort(barcode);
scanFragment.pop(); scanFragment.pop();
} }
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
android:id="@+id/et_search" android:id="@+id/et_search"
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:hint="@string/store_search_hint" android:hint="@string/store_search_hint"
android:inputType="text" android:inputType="text"
...@@ -223,7 +222,7 @@ ...@@ -223,7 +222,7 @@
android:id="@+id/fl_logo" android:id="@+id/fl_logo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin_big" android:layout_marginStart="@dimen/all_margin"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
app:layout_constraintBottom_toBottomOf="@id/tv_settle" app:layout_constraintBottom_toBottomOf="@id/tv_settle"
app:layout_constraintLeft_toLeftOf="@id/fl_cart"> app:layout_constraintLeft_toLeftOf="@id/fl_cart">
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<TextView <TextView
android:id="@+id/tv_update" android:id="@+id/tv_update"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/button3_height" android:layout_height="@dimen/list1_height"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:gravity="center" android:gravity="center"
android:text="@string/sku_update" android:text="@string/sku_update"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<TextView <TextView
android:id="@+id/tv_update_price" android:id="@+id/tv_update_price"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/button3_height" android:layout_height="@dimen/list1_height"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:gravity="center" android:gravity="center"
android:text="@string/sku_update_price" android:text="@string/sku_update_price"
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<TextView <TextView
android:id="@+id/tv_update_vip" android:id="@+id/tv_update_vip"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/button3_height" android:layout_height="@dimen/list1_height"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:gravity="center" android:gravity="center"
android:text="@string/sku_update_vip" android:text="@string/sku_update_vip"
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<TextView <TextView
android:id="@+id/tv_cancel" android:id="@+id/tv_cancel"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/button3_height" android:layout_height="@dimen/list1_height"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_white_r1" android:background="@drawable/shape_white_r1"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:gravity="center_vertical|end" android:gravity="center_vertical|end"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin" android:paddingStart="@dimen/all_margin"
app:layout_constraintBottom_toTopOf="@id/rl_cart" app:layout_constraintBottom_toTopOf="@id/rl_cart"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -80,12 +80,10 @@ ...@@ -80,12 +80,10 @@
<TextView <TextView
android:id="@+id/tv_clear" android:id="@+id/tv_clear"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:foreground="?android:attr/selectableItemBackground" android:gravity="center"
android:paddingBottom="@dimen/all_spacing" android:paddingEnd="@dimen/all_margin"
android:paddingEnd="@dimen/all_margin_big" android:paddingStart="@dimen/all_margin"
android:paddingStart="@dimen/all_margin_big"
android:paddingTop="@dimen/all_spacing"
android:text="@string/store_clear_all" android:text="@string/store_clear_all"
android:textColor="@color/black_baozheng" /> android:textColor="@color/black_baozheng" />
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small" android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding" android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding" android:layout_marginStart="@dimen/all_bounced_padding"
...@@ -35,6 +34,7 @@ ...@@ -35,6 +34,7 @@
android:drawablePadding="@dimen/all_padding" android:drawablePadding="@dimen/all_padding"
android:hint="@string/other_select_edit_hint" android:hint="@string/other_select_edit_hint"
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
android:inputType="number"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
......
...@@ -56,7 +56,13 @@ ...@@ -56,7 +56,13 @@
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"> android:paddingStart="@null">
<ImageView
android:layout_width="@dimen/all_margin"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@mipmap/point" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -75,9 +81,10 @@ ...@@ -75,9 +81,10 @@
android:hint="@string/ms_editor_name_hint" android:hint="@string/ms_editor_name_hint"
android:inputType="text" android:inputType="text"
android:lines="1" android:lines="1"
android:maxLength="16"
android:text="@{name}" android:text="@{name}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
...@@ -147,7 +154,7 @@ ...@@ -147,7 +154,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{dateStart}" android:text="@{dateStart}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
...@@ -184,7 +191,7 @@ ...@@ -184,7 +191,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{dateEnd}" android:text="@{dateEnd}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<ViewStub <ViewStub
...@@ -239,7 +246,7 @@ ...@@ -239,7 +246,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{user}" android:text="@{user}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -275,7 +282,7 @@ ...@@ -275,7 +282,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@{area}" android:text="@{area}"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
......
...@@ -94,9 +94,7 @@ ...@@ -94,9 +94,7 @@
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="parent" app:layout_constraintTop_toBottomOf="parent"
app:placeholderImage="@mipmap/img_number01" app:placeholderImage="@mipmap/img_number01"
app:roundAsCircle="true" app:roundAsCircle="true" />
app:roundingBorderColor="@color/gray_huanggai"
app:roundingBorderWidth="@dimen/all_line_width" />
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
...@@ -122,7 +120,7 @@ ...@@ -122,7 +120,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{name}" android:text="@{name}"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_text_size" />
<TextView <TextView
...@@ -150,7 +148,7 @@ ...@@ -150,7 +148,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}" android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
android:visibility="@{defualtVip?View.INVISIBLE:View.VISIBLE}" android:visibility="@{defualtVip?View.INVISIBLE:View.VISIBLE}"
app:layout_constraintBottom_toTopOf="parent" app:layout_constraintBottom_toTopOf="parent"
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1" android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}" android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
......
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
android:hint="@string/sku_name_hint" android:hint="@string/sku_name_hint"
android:inputType="text" android:inputType="text"
android:labelFor="@+id/et_name" android:labelFor="@+id/et_name"
android:maxLength="16"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" android:textSize="@dimen/all_body_size"
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textColor="@color/black_likui" android:text="@string/store_search_hint"
android:text="@string/store_search_hint" /> android:textColor="@color/black_likui" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingBottom="@dimen/all_margin" android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"> android:paddingTop="@dimen/all_margin"
android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
...@@ -163,32 +164,36 @@ ...@@ -163,32 +164,36 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:baselineAligned="false"> android:baselineAligned="false">
<LinearLayout <android.support.v4.widget.NestedScrollView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1">
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_skugrp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout <LinearLayout
android:id="@+id/ll_skugrp_add"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="match_parent"
android:foreground="?android:attr/selectableItemBackground"> android:orientation="vertical">
<ImageView <android.support.v7.widget.RecyclerView
android:id="@+id/rl_skugrp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_sub_title_size" android:layout_height="wrap_content" />
android:layout_gravity="center"
android:contentDescription="@null"
android:src="@mipmap/grp_add" />
</FrameLayout>
</LinearLayout> <FrameLayout
android:id="@+id/ll_skugrp_add"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:foreground="?android:attr/selectableItemBackground">
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/all_sub_title_size"
android:layout_gravity="center"
android:contentDescription="@null"
android:src="@mipmap/grp_add" />
</FrameLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_sku" android:id="@+id/srl_sku"
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1" android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}" android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1" android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}" android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
......
...@@ -42,20 +42,20 @@ ...@@ -42,20 +42,20 @@
android:background="@color/gray_huanggai" /> android:background="@color/gray_huanggai" />
</FrameLayout> </FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_ms" android:id="@+id/ll_ms"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginBottom="@dimen/all_spacing"
android:layout_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_spacing"
android:background="@drawable/shape_black_b1" android:background="@drawable/shape_black_b1"
android:foreground="?attr/selectableItemBackground" android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:visibility="@{msCount>0 ?View.VISIBLE:View.GONE}"> android:visibility="@{msCount>0?View.VISIBLE:View.GONE}">
<TextView <TextView
android:id="@+id/tv_ms_type" android:id="@+id/tv_ms_type"
...@@ -89,9 +89,9 @@ ...@@ -89,9 +89,9 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="0dp"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai" /> android:visibility="@{msCount>0?View.GONE:View.VISIBLE}" />
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_store" android:id="@+id/cl_store"
...@@ -124,6 +124,12 @@ ...@@ -124,6 +124,12 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout> </android.support.v4.widget.SwipeRefreshLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</LinearLayout> </LinearLayout>
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic" android:id="@+id/iv_pic"
android:layout_width="80dp" android:layout_width="64dp"
android:layout_height="80dp" android:layout_height="64dp"
app:failureImage="@mipmap/icon_goods_default" app:failureImage="@mipmap/icon_goods_default"
app:placeholderImage="@mipmap/icon_goods_default" app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" /> app:roundedCornerRadius="@dimen/all_shape_radius" />
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_spacing"
app:layout_constraintLeft_toLeftOf="@id/tv_name" app:layout_constraintLeft_toLeftOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_name"> app:layout_constraintTop_toBottomOf="@id/tv_name">
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground" android:background="@color/white_caocao"
android:background="@drawable/singleline_white_gray"> android:foreground="?attr/selectableItemBackground">
<LinearLayout <LinearLayout
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1" android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+spuUnitName}" android:text="@{@string/sku_size+spuUnitName}"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin" android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"> android:paddingTop="@dimen/all_margin">
<com.facebook.drawee.view.SimpleDraweeView <com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic" android:id="@+id/iv_pic"
android:layout_width="64dp" android:layout_width="80dp"
android:layout_height="64dp" android:layout_height="80dp"
app:failureImage="@mipmap/icon_goods_default" app:failureImage="@mipmap/icon_goods_default"
app:placeholderImage="@mipmap/icon_goods_default" app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" /> app:roundedCornerRadius="@dimen/all_shape_radius" />
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/store_reduce" android:contentDescription="@string/store_reduce"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_margin"
android:src="@mipmap/but_reduce" android:src="@mipmap/but_reduce"
android:visibility="gone" /> android:visibility="gone" />
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing" android:layout_marginStart="@dimen/all_spacing"
android:text='@{count+""}' android:text='@{count+""}'
android:textColor="@color/black_likui" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" android:textSize="@dimen/all_sub_title_size"
android:visibility="gone" /> android:visibility="gone" />
...@@ -99,14 +99,13 @@ ...@@ -99,14 +99,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/store_increase" android:contentDescription="@string/store_increase"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:padding="@dimen/all_spacing" android:padding="@dimen/all_margin"
android:src="@mipmap/but_increase02" /> android:src="@mipmap/but_increase02" />
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_kongming" android:background="@color/gray_kongming"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
......
...@@ -59,7 +59,13 @@ ...@@ -59,7 +59,13 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin" android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"> android:paddingStart="@null">
<ImageView
android:layout_width="@dimen/all_margin"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@mipmap/point" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -79,7 +85,7 @@ ...@@ -79,7 +85,7 @@
android:inputType="number" android:inputType="number"
android:maxLength="2" android:maxLength="2"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
android:background="@color/transparent" android:background="@color/transparent"
android:inputType="numberDecimal" android:inputType="numberDecimal"
android:labelFor="@+id/et_amt" android:labelFor="@+id/et_amt"
android:saveEnabled="false" /> android:saveEnabled="false"
android:textSize="@dimen/all_body_size" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -75,7 +76,8 @@ ...@@ -75,7 +76,8 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@color/transparent" android:background="@color/transparent"
android:inputType="numberDecimal" android:inputType="numberDecimal"
android:labelFor="@+id/et_dis_amt" /> android:labelFor="@+id/et_dis_amt"
android:textSize="@dimen/all_body_size" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -230,9 +230,9 @@ ...@@ -230,9 +230,9 @@
<dimen name="button1_marginHorizontal">24dp</dimen> <dimen name="button1_marginHorizontal">24dp</dimen>
<dimen name="button1_width">120dp</dimen> <dimen name="button1_width">120dp</dimen>
<dimen name="button2_height">35dp</dimen> <dimen name="button2_height">@dimen/button1_height</dimen>
<dimen name="button2_marginHorizontal">16dp</dimen> <dimen name="button2_marginHorizontal">@dimen/button1_marginHorizontal</dimen>
<dimen name="button2_width">105dp</dimen> <dimen name="button2_width">@dimen/button1_width</dimen>
<dimen name="button3_height">44dp</dimen> <dimen name="button3_height">44dp</dimen>
<dimen name="button3_marginHorizontal">16dp</dimen> <dimen name="button3_marginHorizontal">16dp</dimen>
......
...@@ -162,15 +162,15 @@ ...@@ -162,15 +162,15 @@
<string name="card_num_hint">请输入储值卡卡号</string> <string name="card_num_hint">请输入储值卡卡号</string>
<!--结算页面 <WHERE>_<DESCRIPTION>--> <!--结算页面 <WHERE>_<DESCRIPTION>-->
<string name="settle_channel_hint">请选择支付方式</string> <string name="settle_channel_hint">请选择支付方式</string>
<string name="settle_channel_cash">现金</string> <string name="settle_channel_cash">现金支付</string>
<string name="settle_channel_cash_not_enough">金额不足,无法支付</string> <string name="settle_channel_cash_not_enough">金额不足,无法支付</string>
<string name="settle_channel_wechat">微信</string> <string name="settle_channel_wechat">微信支付</string>
<string name="settle_channel_wechat_hint">正在进行微信支付…</string> <string name="settle_channel_wechat_hint">正在进行微信支付…</string>
<string name="settle_channel_ali">支付宝</string> <string name="settle_channel_ali">支付宝支付</string>
<string name="settle_channel_ali_hint">正在进行支付宝支付…</string> <string name="settle_channel_ali_hint">正在进行支付宝支付…</string>
<string name="settle_channel_bank">银行卡</string> <string name="settle_channel_bank">银行卡支付</string>
<string name="settle_channel_bank_hint">正在POS机上完成刷卡支付…</string> <string name="settle_channel_bank_hint">正在POS机上完成刷卡支付…</string>
<string name="settle_channel_card">会员卡</string> <string name="settle_channel_card">会员卡支付</string>
<string name="settle_channel_card_hint">请提醒客户在副屏输入密码</string> <string name="settle_channel_card_hint">请提醒客户在副屏输入密码</string>
<string name="settle_channel_card_reset_hint">【在副屏连击三次确认按钮,则重置密码】</string> <string name="settle_channel_card_reset_hint">【在副屏连击三次确认按钮,则重置密码】</string>
<string name="settle_channel_balance">余额</string> <string name="settle_channel_balance">余额</string>
...@@ -581,6 +581,7 @@ ...@@ -581,6 +581,7 @@
<!--支付里的Vip--> <!--支付里的Vip-->
<string name="settle_vip_search_hint">请输入会员手机号</string> <string name="settle_vip_search_hint">请输入会员手机号</string>
<string name="settle_vip_search_empty">请输入会员手机号进行搜索~</string> <string name="settle_vip_search_empty">请输入会员手机号进行搜索~</string>
<string name="settle_vip_search_none">没有搜到此会员~</string>
<string name="settle_vip_none">不需要会员</string> <string name="settle_vip_none">不需要会员</string>
<!--支付里的优惠券--> <!--支付里的优惠券-->
...@@ -707,7 +708,7 @@ ...@@ -707,7 +708,7 @@
<string name="sku_subtitle_price">调整价格</string> <string name="sku_subtitle_price">调整价格</string>
<string name="sku_price1">售价:</string> <string name="sku_price1">售价:</string>
<string name="sku_price2">促销价:</string> <string name="sku_price2">促销价:</string>
<string name="sku_subtitle_vip">会员信息</string> <string name="sku_subtitle_vip">折扣信息</string>
<string name="sku_vip_dis">会员折扣</string> <string name="sku_vip_dis">会员折扣</string>
<string name="sku_point1">消费每满</string> <string name="sku_point1">消费每满</string>
<string name="sku_point2">元等于1积分</string> <string name="sku_point2">元等于1积分</string>
...@@ -726,8 +727,10 @@ ...@@ -726,8 +727,10 @@
<string name="sku_update">编辑商品</string> <string name="sku_update">编辑商品</string>
<string name="sku_update_price">调整价格</string> <string name="sku_update_price">调整价格</string>
<string name="sku_update_vip">调整会员</string> <string name="sku_update_vip">调整积分</string>
<string name="sku_name_hint">请输入商品名称</string> <string name="sku_name_hint">请输入商品名称</string>
<string name="sku_empty_hint">没有找到对应商品~</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment