Commit a2887df1 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/java/com/xingdata/zzdpos/util/SystemUtil.java
parents 14c7cfb8 651f74ab
......@@ -2,7 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" />
<module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos2\TangKuPos.iml" />
<module fileurl="file://$PROJECT_DIR$/TangKuPos2.iml" filepath="$PROJECT_DIR$/TangKuPos2.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
......
......@@ -11,9 +11,6 @@ android {
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
ndk{
abiFilters("armeabi", "armeabi-v7a","x86")
}
}
//解决问题的代码
dexOptions {
......@@ -47,7 +44,6 @@ android {
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/']
jniLibs.srcDirs = ['libs']
}
}
}
......
......@@ -531,6 +531,8 @@ public class C {
public static final int GIFT = 5;
//第二件促销
public static final int SECOND_PRO = 6;
//满送
public static final int TICKET = 7;
}
public final class DIS_TYPE {
......
package com.xingdata.zzdpos.model;
/**
* Created by Administrator on 2018/1/23.
*/
public class Industry {
private boolean isSelect =false;
private int id;
private String industryName;
public String getIndustryName() {
return industryName;
}
public void setIndustryName(String industryName) {
this.industryName = industryName;
}
public boolean isSelect() {
return isSelect;
}
public void setSelect(boolean select) {
isSelect = select;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
package com.xingdata.zzdpos.model;
import com.xingdata.zzdpos.base.BaseBean;
/**
* 商品详情
*/
public class NewSssku implements BaseBean {
private Long id;
private Long opMapId;
private Long channelMapId;
private Long merMapId;
private Long shopMapId;
private Long skuGrpId;
private Long skuId;
private Long spuId;
private Long spuBarcode;
private Long spuCateId;
private Long spuFactoryId;
private Long spuBrandId;
private Long spuPdepId;
private Long spuPclsId;
private Long spuPoptId;
private Long spuVarId;
private Long spuSpecId;
private Long spuModelId;
private Long spuOrigId;
private Long spuAgeId;
private Long spuDegreeId;
private Long spuSizeId;
private Long spuColorId;
private Long spuVolId;
private String spuName;
private String spuAb;
private String spuUnitName;
private String spuImg;
private Byte skuFlag;
private Long spuDownBarcode;
private Long spuDownNum;
private Long skuStock;
private Long skuSell;
private Long skuExp;
private Byte skuSellFlag;
private Long skuSellUnit;
private Long skuAltLow;
private Long skuAltHigh;
private Long skuTurnT;
private Long skuTradePrice;
private Long skuRetailPrice1;
private Long skuRetailPrice2;
private Long skuRetailPrice3;
private Byte skuNetFlag;
private Byte skuOffFlag;
private Long skuBoundAmt;
private Byte skuStatus;
private String spuDepName;
private String spuClaName;
private String spuGrpName;
private String spuCateName;
private Long spuDownBarcodeBar;
private String spuDownBarcodeName;
private Long spuDownBarcodePrice1;
private String spuDownBarUnitName;
private Long spuDownSku;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getOpMapId() {
return opMapId;
}
public void setOpMapId(Long opMapId) {
this.opMapId = opMapId;
}
public Long getChannelMapId() {
return channelMapId;
}
public void setChannelMapId(Long channelMapId) {
this.channelMapId = channelMapId;
}
public Long getMerMapId() {
return merMapId;
}
public void setMerMapId(Long merMapId) {
this.merMapId = merMapId;
}
public Long getShopMapId() {
return shopMapId;
}
public void setShopMapId(Long shopMapId) {
this.shopMapId = shopMapId;
}
public Long getSkuGrpId() {
return skuGrpId;
}
public void setSkuGrpId(Long skuGrpId) {
this.skuGrpId = skuGrpId;
}
public Long getSkuId() {
return skuId;
}
public void setSkuId(Long skuId) {
this.skuId = skuId;
}
public Long getSpuId() {
return spuId;
}
public void setSpuId(Long spuId) {
this.spuId = spuId;
}
public Long getSpuBarcode() {
return spuBarcode;
}
public void setSpuBarcode(Long spuBarcode) {
this.spuBarcode = spuBarcode;
}
public Long getSpuCateId() {
return spuCateId;
}
public void setSpuCateId(Long spuCateId) {
this.spuCateId = spuCateId;
}
public Long getSpuFactoryId() {
return spuFactoryId;
}
public void setSpuFactoryId(Long spuFactoryId) {
this.spuFactoryId = spuFactoryId;
}
public Long getSpuBrandId() {
return spuBrandId;
}
public void setSpuBrandId(Long spuBrandId) {
this.spuBrandId = spuBrandId;
}
public Long getSpuPdepId() {
return spuPdepId;
}
public void setSpuPdepId(Long spuPdepId) {
this.spuPdepId = spuPdepId;
}
public Long getSpuPclsId() {
return spuPclsId;
}
public void setSpuPclsId(Long spuPclsId) {
this.spuPclsId = spuPclsId;
}
public Long getSpuPoptId() {
return spuPoptId;
}
public void setSpuPoptId(Long spuPoptId) {
this.spuPoptId = spuPoptId;
}
public Long getSpuVarId() {
return spuVarId;
}
public void setSpuVarId(Long spuVarId) {
this.spuVarId = spuVarId;
}
public Long getSpuSpecId() {
return spuSpecId;
}
public void setSpuSpecId(Long spuSpecId) {
this.spuSpecId = spuSpecId;
}
public Long getSpuModelId() {
return spuModelId;
}
public void setSpuModelId(Long spuModelId) {
this.spuModelId = spuModelId;
}
public Long getSpuOrigId() {
return spuOrigId;
}
public void setSpuOrigId(Long spuOrigId) {
this.spuOrigId = spuOrigId;
}
public Long getSpuAgeId() {
return spuAgeId;
}
public void setSpuAgeId(Long spuAgeId) {
this.spuAgeId = spuAgeId;
}
public Long getSpuDegreeId() {
return spuDegreeId;
}
public void setSpuDegreeId(Long spuDegreeId) {
this.spuDegreeId = spuDegreeId;
}
public Long getSpuSizeId() {
return spuSizeId;
}
public void setSpuSizeId(Long spuSizeId) {
this.spuSizeId = spuSizeId;
}
public Long getSpuColorId() {
return spuColorId;
}
public void setSpuColorId(Long spuColorId) {
this.spuColorId = spuColorId;
}
public Long getSpuVolId() {
return spuVolId;
}
public void setSpuVolId(Long spuVolId) {
this.spuVolId = spuVolId;
}
public String getSpuName() {
return spuName;
}
public void setSpuName(String spuName) {
this.spuName = spuName;
}
public String getSpuAb() {
return spuAb;
}
public void setSpuAb(String spuAb) {
this.spuAb = spuAb;
}
public String getSpuUnitName() {
return spuUnitName;
}
public void setSpuUnitName(String spuUnitName) {
this.spuUnitName = spuUnitName;
}
public String getSpuImg() {
return spuImg;
}
public void setSpuImg(String spuImg) {
this.spuImg = spuImg;
}
public Byte getSkuFlag() {
return skuFlag;
}
public void setSkuFlag(Byte skuFlag) {
this.skuFlag = skuFlag;
}
public Long getSpuDownBarcode() {
return spuDownBarcode;
}
public void setSpuDownBarcode(Long spuDownBarcode) {
this.spuDownBarcode = spuDownBarcode;
}
public Long getSpuDownNum() {
return spuDownNum;
}
public void setSpuDownNum(Long spuDownNum) {
this.spuDownNum = spuDownNum;
}
public Long getSkuStock() {
return skuStock;
}
public void setSkuStock(Long skuStock) {
this.skuStock = skuStock;
}
public Long getSkuSell() {
return skuSell;
}
public void setSkuSell(Long skuSell) {
this.skuSell = skuSell;
}
public Long getSkuExp() {
return skuExp;
}
public void setSkuExp(Long skuExp) {
this.skuExp = skuExp;
}
public Byte getSkuSellFlag() {
return skuSellFlag;
}
public void setSkuSellFlag(Byte skuSellFlag) {
this.skuSellFlag = skuSellFlag;
}
public Long getSkuSellUnit() {
return skuSellUnit;
}
public void setSkuSellUnit(Long skuSellUnit) {
this.skuSellUnit = skuSellUnit;
}
public Long getSkuAltLow() {
return skuAltLow;
}
public void setSkuAltLow(Long skuAltLow) {
this.skuAltLow = skuAltLow;
}
public Long getSkuAltHigh() {
return skuAltHigh;
}
public void setSkuAltHigh(Long skuAltHigh) {
this.skuAltHigh = skuAltHigh;
}
public Long getSkuTurnT() {
return skuTurnT;
}
public void setSkuTurnT(Long skuTurnT) {
this.skuTurnT = skuTurnT;
}
public Long getSkuTradePrice() {
return skuTradePrice;
}
public void setSkuTradePrice(Long skuTradePrice) {
this.skuTradePrice = skuTradePrice;
}
public Long getSkuRetailPrice1() {
return skuRetailPrice1;
}
public void setSkuRetailPrice1(Long skuRetailPrice1) {
this.skuRetailPrice1 = skuRetailPrice1;
}
public Long getSkuRetailPrice2() {
return skuRetailPrice2;
}
public void setSkuRetailPrice2(Long skuRetailPrice2) {
this.skuRetailPrice2 = skuRetailPrice2;
}
public Long getSkuRetailPrice3() {
return skuRetailPrice3;
}
public void setSkuRetailPrice3(Long skuRetailPrice3) {
this.skuRetailPrice3 = skuRetailPrice3;
}
public Byte getSkuNetFlag() {
return skuNetFlag;
}
public void setSkuNetFlag(Byte skuNetFlag) {
this.skuNetFlag = skuNetFlag;
}
public Byte getSkuOffFlag() {
return skuOffFlag;
}
public void setSkuOffFlag(Byte skuOffFlag) {
this.skuOffFlag = skuOffFlag;
}
public Long getSkuBoundAmt() {
return skuBoundAmt;
}
public void setSkuBoundAmt(Long skuBoundAmt) {
this.skuBoundAmt = skuBoundAmt;
}
public Byte getSkuStatus() {
return skuStatus;
}
public void setSkuStatus(Byte skuStatus) {
this.skuStatus = skuStatus;
}
public String getSpuDepName() {
return spuDepName;
}
public void setSpuDepName(String spuDepName) {
this.spuDepName = spuDepName;
}
public String getSpuClaName() {
return spuClaName;
}
public void setSpuClaName(String spuClaName) {
this.spuClaName = spuClaName;
}
public String getSpuGrpName() {
return spuGrpName;
}
public void setSpuGrpName(String spuGrpName) {
this.spuGrpName = spuGrpName;
}
public String getSpuCateName() {
return spuCateName;
}
public void setSpuCateName(String spuCateName) {
this.spuCateName = spuCateName;
}
public Long getSpuDownBarcodeBar() {
return spuDownBarcodeBar;
}
public void setSpuDownBarcodeBar(Long spuDownBarcodeBar) {
this.spuDownBarcodeBar = spuDownBarcodeBar;
}
public String getSpuDownBarcodeName() {
return spuDownBarcodeName;
}
public void setSpuDownBarcodeName(String spuDownBarcodeName) {
this.spuDownBarcodeName = spuDownBarcodeName;
}
public Long getSpuDownBarcodePrice1() {
return spuDownBarcodePrice1;
}
public void setSpuDownBarcodePrice1(Long spuDownBarcodePrice1) {
this.spuDownBarcodePrice1 = spuDownBarcodePrice1;
}
public String getSpuDownBarUnitName() {
return spuDownBarUnitName;
}
public void setSpuDownBarUnitName(String spuDownBarUnitName) {
this.spuDownBarUnitName = spuDownBarUnitName;
}
public Long getSpuDownSku() {
return spuDownSku;
}
public void setSpuDownSku(Long spuDownSku) {
this.spuDownSku = spuDownSku;
}
}
\ No newline at end of file
......@@ -566,6 +566,7 @@ public class Ossku implements BaseBean {
}
public String getSpuImg() {
if (spuImg !=null && spuImg.contains("ngoods.png")) return "";
return spuImg;
}
......
......@@ -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() {
return skuPrice.longValue() != skuPricePay.longValue();
......@@ -676,6 +676,7 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint {
public String getSpuImg() {
if (spuImg !=null && spuImg.contains("ngoods.png")) return "";
return spuImg;
}
......
......@@ -138,6 +138,7 @@ public class Sspr extends RealmObject implements BaseModel, BaseBean {
}
public String getSpuImg() {
if (spuImg !=null && spuImg.contains("ngoods.png")) return "";
return spuImg;
}
......
......@@ -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)
@Ignore
private boolean isSelected;
......@@ -463,6 +463,7 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B
}
public String getSpuImg() {
if (spuImg != null && spuImg.contains("ngoods.png")) return "";
return spuImg;
}
......@@ -766,7 +767,7 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B
@Override
public String getCnt() {
return getSkuCnt()+"";
return getSkuCnt() + "";
}
@Override
......@@ -776,13 +777,13 @@ public class Sssku extends RealmObject implements BaseModel, BaseBean, BaseSku,B
@Override
public String getPrice() {
return ConvertUtil.fenToYuan(getSkuCost(),false);
return ConvertUtil.fenToYuan(getSkuCost(), false);
}
@Override
public String getSubtotal() {
return ConvertUtil.fenToYuan(getSellSumAmt(),false);
return ConvertUtil.fenToYuan(getSellSumAmt(), false);
}
@Override
......
......@@ -290,6 +290,7 @@ public class Ussku extends RealmObject implements BaseModel, BaseBean, BaseSku {
}
public String getSpuImg() {
if (spuImg !=null && spuImg.contains("ngoods.png")) return "";
return spuImg;
}
......
......@@ -144,14 +144,14 @@ public class PromptDialog extends BaseDialog<LoginPresenter, DialogPromptBinding
private void setBtn() {
if (btnText.isEmpty()) {
mViewBinding.btnCustom.setVisibility(View.GONE);
mViewBinding.rlBtn.setVisibility(View.GONE);
mViewBinding.llBottom.setVisibility(View.VISIBLE);
mViewBinding.btnCancel.setOnClickListener(errorOnClick);
mViewBinding.btnOk.setOnClickListener(okOnClick);
} else {
mViewBinding.llBottom.setVisibility(View.GONE);
mViewBinding.btnCustom.setVisibility(View.VISIBLE);
mViewBinding.rlBtn.setVisibility(View.VISIBLE);
mViewBinding.btnCustom.setText(btnText);
mViewBinding.btnCustom.setOnClickListener(customOnClick);
}
......@@ -163,14 +163,14 @@ public class PromptDialog extends BaseDialog<LoginPresenter, DialogPromptBinding
case PROMPTDIALOG_ING: {
mViewBinding.spinKit.setVisibility(View.VISIBLE);
mViewBinding.ivLogo.setVisibility(View.GONE);
mViewBinding.tvText.setTextColor(getResources().getColor(R.color.succ));
// mViewBinding.tvText.setTextColor(getResources().getColor(R.color.succ));
}
break;
case PROMPTDIALOG_ERROR: {
mViewBinding.spinKit.setVisibility(View.GONE);
mViewBinding.ivLogo.setVisibility(View.VISIBLE);
mViewBinding.ivLogo.setImageResource(R.mipmap.prompt_dialog_fail);
mViewBinding.tvText.setTextColor(getResources().getColor(R.color.error));
// mViewBinding.tvText.setTextColor(getResources().getColor(R.color.error));
}
break;
case PROMPTDIALOG_SUCC: {
......
......@@ -14,6 +14,7 @@ import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityLoginBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.login.fragment.SelectIndustryFragment;
import com.xingdata.zzdpos.ui.login.fragment.SignInFragment;
import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean;
......@@ -135,6 +136,22 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
promptDialog.dismiss();
if (SPUtils.getInstance().getBoolean(loginReturnBean.getOperMobile() + "")) {
mPresenter.startUi();
} else {
SPUtils.getInstance().put(loginReturnBean.getOperMobile() + "", true);
start(mPresenter.selectIndustryFragment);
}
}
/**
* 登录成功UI跳转
*
* @param loginReturnBean
*/
@Override
public void startUi(LoginReturnBean loginReturnBean) {
//如果sn已经绑定款台,则直接跳转主页
if (loginReturnBean.getBindSN()) {
startActivity(new Intent(LoginActivity.this, MainActivity.class));
......@@ -170,7 +187,6 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
}
break;
}
}
@Override
......@@ -309,6 +325,12 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
} else {
AppUtils.exitApp();
}
} else if (getTopFragment() instanceof SelectIndustryFragment) {
mPresenter.logout();
SPUtils.getInstance().put(LoginPresenter.loginReturnBean.getOperMobile() + "",
false);
pop();
} else {
pop();
}
......@@ -327,5 +349,6 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
return super.dispatchTouchEvent(ev);
}
}
......@@ -2,10 +2,6 @@ package com.xingdata.zzdpos.ui.login;
import android.content.Context;
import java.util.ArrayList;
import java.util.List;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
......@@ -15,6 +11,9 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean;
import java.util.ArrayList;
import java.util.List;
/**
* 登录模块契约类
......@@ -132,6 +131,13 @@ public interface LoginContract {
*/
void addStoreSucc(LoadingDialog loadingDialog);
/**
* ui跳转
*
* @param loginReturnBean
*/
void startUi(LoginReturnBean loginReturnBean);
}
......@@ -144,7 +150,7 @@ public interface LoginContract {
/**
* 所有fragment赋值操作
*/
abstract LoginBean getLoginBean( );
abstract LoginBean getLoginBean();
/*********************************************************************************************************************************
登录界面逻辑接口定义**********************************************************************************************************
*********************************************************************************************************************************/
......@@ -190,7 +196,8 @@ public interface LoginContract {
* 创建门店操作
*/
abstract void createStore(String operMobile, String loginPwd, String
merName,String operName, String shopName, int cityCountyId, String cityAddress, int startWay,
merName, String operName, String shopName, int cityCountyId, String cityAddress,
int startWay,
LoadingDialog loadingDialog);
/*********************************************************************************************************************************
绑定款台界面逻辑接口定义**********************************************************************************************************
......@@ -226,6 +233,10 @@ public interface LoginContract {
abstract void deviceRegister(String phone, String password, PromptDialog promptDialog,
LoadingDialog loadingDialog);
abstract void startUi();
abstract void logout();
}
......
......@@ -21,6 +21,7 @@ import com.xingdata.zzdpos.ui.login.fragment.BindingCounterFragment;
import com.xingdata.zzdpos.ui.login.fragment.ChoiceStoreFragment;
import com.xingdata.zzdpos.ui.login.fragment.CreateStoreFragment;
import com.xingdata.zzdpos.ui.login.fragment.InputPasswordFragment;
import com.xingdata.zzdpos.ui.login.fragment.SelectIndustryFragment;
import com.xingdata.zzdpos.ui.login.fragment.SignInFragment;
import com.xingdata.zzdpos.ui.login.fragment.SmsCodeFragment;
import com.xingdata.zzdpos.ui.login.fragment.bean.LoginBean;
......@@ -64,7 +65,7 @@ public class LoginPresenter extends LoginContract.Presenter {
public InputPasswordFragment inputPasswordFragment = new InputPasswordFragment();
public SignInFragment signInFragment = new SignInFragment();
public SmsCodeFragment smsCodeFragment = new SmsCodeFragment();
public SelectIndustryFragment selectIndustryFragment = new SelectIndustryFragment();
//存储Login内所有操作的数据,方便最终提交使用
private LoginBean loginBean = new LoginBean();
//省市县数据列表
......@@ -304,6 +305,18 @@ public class LoginPresenter extends LoginContract.Presenter {
});
}
@Override
public void startUi() {
mView.startUi(loginReturnBean);
}
@Override
public void logout() {
ApiFactory.Test.logout().subscribe(s -> {
}, throwable -> {
});
}
/**
* 创建门店界面初始化数据(省市县,以及门店类型)
*
......
package com.xingdata.zzdpos.ui.login.adapter;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.view.View;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemSelectIndustryBinding;
import com.xingdata.zzdpos.model.Industry;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public class SelectIndustryAdapter extends BaseAdapter<Industry, ItemSelectIndustryBinding> {
public SelectIndustryAdapter(@Nullable List<Industry> data) {
super(R.layout.item_select_industry, data);
}
@Override
protected void convert(ItemSelectIndustryBinding mViewBinding, Industry item) {
mViewBinding.tvItem.setText(item.getIndustryName());
mViewBinding.tvItemSelect.setText(item.getIndustryName());
if (item.isSelect()) {
mViewBinding.tvItemSelect.setVisibility(View.VISIBLE);
mViewBinding.tvItem.setVisibility(View.GONE);
} else {
mViewBinding.tvItemSelect.setVisibility(View.GONE);
mViewBinding.tvItem.setVisibility(View.VISIBLE);
}
switch (item.getId()) {
case 0: {
setDrawableLeft(mViewBinding, R.mipmap.industry_market);
}
break;
case 1: {
setDrawableLeft(mViewBinding, R.mipmap.industry_flower);
}
break;
case 2: {
setDrawableLeft(mViewBinding, R.mipmap.industry_clothes);
}
break;
case 3: {
setDrawableLeft(mViewBinding, R.mipmap.industry_pharmacy);
}
break;
case 4: {
setDrawableLeft(mViewBinding, R.mipmap.industry_food);
}
break;
case 5: {
setDrawableLeft(mViewBinding, R.mipmap.industry_fresh);
}
break;
case 6: {
setDrawableLeft(mViewBinding, R.mipmap.industry_store);
}
break;
case 7: {
setDrawableLeft(mViewBinding, R.mipmap.industry_spouse);
}
break;
case 8: {
setDrawableLeft(mViewBinding, R.mipmap.industry_smoke);
}
break;
case 9: {
setDrawableLeft(mViewBinding, R.mipmap.industry_baby);
}
break;
case 10: {
setDrawableLeft(mViewBinding, R.mipmap.industry_tea);
}
break;
case 11: {
setDrawableLeft(mViewBinding, R.mipmap.industry_book);
}
break;
case 12: {
setDrawableLeft(mViewBinding, R.mipmap.industry_beauty);
}
break;
case 13: {
setDrawableLeft(mViewBinding, R.mipmap.industry_other);
}
break;
}
}
private void setDrawableLeft(ItemSelectIndustryBinding mViewBinding, int resources) {
Drawable drawable = App.instance.getResources().getDrawable(resources);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
mViewBinding.tvItem.setCompoundDrawables(drawable, null, null, null);
mViewBinding.tvItemSelect.setCompoundDrawables(drawable, null, null, null);
}
}
package com.xingdata.zzdpos.ui.login.fragment;
import android.support.v7.widget.GridLayoutManager;
import android.view.View;
import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSelectIndustryBinding;
import com.xingdata.zzdpos.model.Industry;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.login.adapter.SelectIndustryAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList;
import java.util.List;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public class SelectIndustryFragment extends BaseFragment<LoginPresenter,
FragmentSelectIndustryBinding> {
public static String[] industryName = new String[]{
"超市", "鲜花", "鞋服", "药店", "熟食", "生鲜", "便利店", "夫妻店", "烟酒", "母婴", "茶叶", "书店", "美妆", "其他"};
List<Industry> list = new ArrayList<>();
SelectIndustryAdapter selectIndustryAdapter;
long mExitTime;
LoadingDialog loadingDialog = new LoadingDialog();
Boolean isLoadMore = false;
int nowId = 0;
@Override
public int getLayoutId() {
return R.layout.fragment_select_industry;
}
@Override
public void initView() {
list.clear();
addData();
selectIndustryAdapter = new SelectIndustryAdapter(list);
mViewBinding.rvSelect.setAdapter(selectIndustryAdapter);
mViewBinding.rvSelect.setLayoutManager(new GridLayoutManager(getActivity(), 2));
mViewBinding.rvSelect.addItemDecoration(new RecyclerViewUtil.GridSpacingItemDecoration(2,
50, true));
mViewBinding.sl.setOnRefreshListener(this::refreshProduct);
selectIndustryAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rvSelect);
selectIndustryAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
(selectIndustryAdapter.getData().get(position)));
mViewBinding.icTitle.tvTitle.setText("选择行业");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
SPUtils.getInstance().put(LoginPresenter.loginReturnBean.getOperMobile() + "",
false);
mPresenter.logout();
pop();
}
});
mViewBinding.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_ok: {
mPresenter.startUi();
}
break;
default: {
}
break;
}
}
});
}
/**
* 刷新商品
*/
private void refreshProduct() {
selectIndustryAdapter.setEnableLoadMore(false);
mViewBinding.sl.setRefreshing(false);
}
/**
* 加载更多商品
*/
private void loadMoreProduct() {
mViewBinding.sl.setRefreshing(false);
selectIndustryAdapter.setEnableLoadMore(false);
}
/**
* 点击item
*/
private void clickProduct(Industry industry) {
if ((System.currentTimeMillis() - mExitTime) > 100) {
mExitTime = System.currentTimeMillis();
list.get(nowId).setSelect(false);
industry.setSelect(true);
nowId = industry.getId();
selectIndustryAdapter.notifyDataSetChanged();
// ToastUtils.showLong(industry.getIndustryName());
} else {
ToastUtils.showLong("您操作太快了");
}
}
private void addData() {
for (int i = 0; i < industryName.length; i++) {
Industry industry = new Industry();
industry.setId(i);
industry.setIndustryName(industryName[i]);
if (i == 0) {
industry.setSelect(true);
} else {
industry.setSelect(false);
}
list.add(industry);
}
}
}
......@@ -113,8 +113,24 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
}
break;
case R.id.btn_cancel: {
pop();
listData.clear();
PromptDialog promptDialog = new PromptDialog();
promptDialog.setDialogType(PromptDialog
.PROMPTDIALOG_SELECT, "当前商品没有组合,确定退出?")
.setClick(new View.OnClickListener() {
@Override
public void onClick(View view) {
pop();
listData.clear();
promptDialog.dismiss();
}
}, new View.OnClickListener() {
@Override
public void onClick(View view) {
promptDialog.dismiss();
}
}).show((BaseActivity) getActivity());
}
break;
case R.id.btn_ok: {
......@@ -130,7 +146,7 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
}
} else {
ToastUtils.showLong("数据不能为null");
ToastUtils.showLong("数据不能为");
}
}
break;
......
......@@ -5,6 +5,7 @@ import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils;
......@@ -87,9 +88,10 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
pop();
loadingDialog.show(
(BaseActivity)
getActivity());
getActivity());
mPresenter.usskuQuery
(barcode, loadingDialog);
(barcode,
loadingDialog);
}
});
if (!mScanFragment.isAdded()) {
......@@ -123,19 +125,19 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
isAddData = false;
this.isLoadMore = isLoadMore;
if (nowData == null || nowData.size() <= 0) {
mViewBinding.llNull.setVisibility(View.VISIBLE);
mViewBinding.srlProducts.setVisibility(View.GONE);
return;
// mViewBinding.llNull.setVisibility(View.VISIBLE);
// mViewBinding.srlProducts.setVisibility(View.GONE);
mBaleIndexAdapter.setEmptyView(getEmptyView(R.string.bale_no_seach));
} else {
mViewBinding.llNull.setVisibility(View.GONE);
mViewBinding.srlProducts.setVisibility(View.VISIBLE);
// mViewBinding.llNull.setVisibility(View.GONE);
// mViewBinding.srlProducts.setVisibility(View.VISIBLE);
}
if (mBaleIndexAdapter != null) {
mViewBinding.srlProducts.setRefreshing(false);
mBaleIndexAdapter.setEnableLoadMore(false);
if (nowData != null) {
mBaleIndexAdapter.setNewData(nowData);
}
// if (nowData != null) {
mBaleIndexAdapter.setNewData(nowData);
// }
}
}
......@@ -165,7 +167,12 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
mBaleIndexAdapter.setEnableLoadMore(false);
loadingDialog.show((BaseActivity) getActivity());
mPresenter.usskuQuery(null, loadingDialog);
if (nowData.size() <= 0) {
mPresenter.usskuQuery("", loadingDialog);
} else {
mPresenter.usskuQuery(null, loadingDialog);
}
}
/**
......@@ -220,6 +227,12 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
}
private View getEmptyView(int resHint) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null);
view.setBackgroundResource(R.color.gray_zhouyu);
((TextView) view.findViewById(R.id.tv_empty)).setText(resHint);
return view;
}
// public void myHidekey() {
// List<View> list = new ArrayList<>();
// list.add(mViewBinding.etKeyword);
......
......@@ -28,8 +28,7 @@ import com.xingdata.zzdpos.util.Global;
import java.util.List;
public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements
SsskuContract.View {
public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements SsskuContract.View {
private ManagerFragment mManagerFragment = new ManagerFragment();
private SearchFragment mSearchFragment = new SearchFragment();
......@@ -127,8 +126,18 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
public void showSearchFragment(int searchType) {
if (mSearchFragment.isAdded()) return;
mViewBinding.etSearch.requestFocus();
KeyboardUtils.showSoftInput(mViewBinding.etSearch);
this.showTitleBarByTitleMode(searchType);
this.start(mSearchFragment.setSearchType(searchType));
this.start(mSearchFragment.setKeyword("").setSearchType(searchType));
}
@Override
public void showSearchFragment(String keyword, int searchType) {
if (mSearchFragment.isAdded()) return;
mViewBinding.etSearch.requestFocus();
KeyboardUtils.showSoftInput(mViewBinding.etSearch);
this.showTitleBarByTitleMode(searchType);
this.start(mSearchFragment.setKeyword(keyword).setSearchType(searchType));
}
@Override
......@@ -220,6 +229,12 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
this.pop();
}
@Override
public void backToMenuActivity() {
mPresenter.doOnFinish();
this.finish();
}
@Override
public void addSku(Sssku sssku) {
mManagerFragment.addSku(sssku);
......
......@@ -85,9 +85,19 @@ public interface SsskuContract {
/**
* 显示搜索页面
*
* @param searchType 搜索类型
*/
void showSearchFragment(int searchType);
/**
* 显示搜索页面
*
* @param keyword 预设关键字
* @param searchType 搜索类型
*/
void showSearchFragment(String keyword, int searchType);
/**
* 显示添加检查页面
*/
......@@ -147,6 +157,11 @@ public interface SsskuContract {
*/
void backToDetailFragment();
/**
* 返回菜单页面
*/
void backToMenuActivity();
/**
* 添加商品
*
......@@ -326,5 +341,11 @@ public interface SsskuContract {
* 主页面 - 点击菜单按钮
*/
public abstract void clickSkuMenu();
/**
* 主页面 - 关闭
*/
public abstract void doOnFinish();
}
}
package com.xingdata.zzdpos.ui.manage.sssku;
import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Sskugrp;
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;
public class SsskuPresenter extends SsskuContract.Presenter {
/**
* 是否需要同步
*/
private boolean isNeedSync = false;
private int mPageNum;
private Long mSkuGrpId;
......@@ -209,6 +217,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory.Sssku.addSssku(sssku).subscribe(
sssku1 -> {
mView.showMsg("添加成功");
isNeedSync = true;
mView.backToEditFragment();
mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) {
......@@ -221,6 +230,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory.Sssku.update(sssku).subscribe(
sssku1 -> {
mView.showMsg("修改成功");
isNeedSync = true;
mView.backToEditFragment();
mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId || mSkuGrpId == 0L) {
......@@ -234,6 +244,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory.Sssku.addSssku(sssku).subscribe(
sssku1 -> {
mView.showMsg("添加成功");
isNeedSync = true;
mView.backToEditFragment();
mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) {
......@@ -255,6 +266,31 @@ public class SsskuPresenter extends SsskuContract.Presenter {
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()));
}
}
/**
* 获取商品
*/
......
......@@ -28,9 +28,6 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi
@Override
public void initView() {
mViewBinding.etBarcode.requestFocus();
mViewBinding.etBarcode.setOnEditorActionListener((textView, i, keyEvent) -> {
if ((i == EditorInfo.IME_ACTION_SEARCH || i == EditorInfo.IME_ACTION_UNSPECIFIED) && !StringUtils.isEmpty(textView.getText())) {
KeyboardUtils.hideSoftInput(textView);
......@@ -56,6 +53,12 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi
});
}
@Override
public void onStart() {
super.onStart();
KeyboardUtils.showSoftInput(mViewBinding.etBarcode);
}
public void loadCheckSkus(List<Sssku> ssskus) {
mSkuAdapter.setNewData(ssskus);
}
......
......@@ -2,7 +2,6 @@ package com.xingdata.zzdpos.ui.manage.sssku.fragment;
import android.annotation.SuppressLint;
import android.support.v4.app.ActivityCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;
......@@ -13,6 +12,7 @@ import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSsskuManagerBinding;
import com.xingdata.zzdpos.model.Sskugrp;
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.adapter.SkuAdapter;
import com.xingdata.zzdpos.ui.manage.sssku.adapter.SkugrpAdapter;
......@@ -156,7 +156,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
*/
public void updateSku(Sssku sssku) {
for (int i = 0; i < mSkuAdapter.getData().size(); i++) {
if (mSkuAdapter.getData().get(i).getId().longValue() == sssku.getSkuId().longValue()) {
if (mSkuAdapter.getData().get(i).getId().longValue() == sssku.getId().longValue()) {
mSkuAdapter.setData(i, sssku);
return;
}
......@@ -194,7 +194,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
@Override
public boolean onBackPressedSupport() {
ActivityCompat.finishAfterTransition(getActivity());
((SsskuActivity) getActivity()).backToMenuActivity();
return super.onBackPressedSupport();
}
}
......@@ -3,7 +3,9 @@ package com.xingdata.zzdpos.ui.manage.sssku.fragment;
import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
......@@ -18,6 +20,8 @@ import java.util.List;
public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSearchBinding> {
private int mSearchType;
private String mKeyword;
private SkuAdapter<Sssku> mSkuAdapter;
@Override
......@@ -48,8 +52,12 @@ public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSe
// set empty
@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.isUseEmpty(false);
//init
if (!StringUtils.isEmpty(mKeyword)) mPresenter.searchSku(mKeyword);
}
/**
......@@ -87,6 +95,17 @@ public class SearchFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSe
return this;
}
/**
* 设置预设关键字
*
* @param keyword 预设关键字
* @return this
*/
public SearchFragment setKeyword(String keyword) {
this.mKeyword = mKeyword;
return this;
}
@Override
public boolean onBackPressedSupport() {
switch (mSearchType) {
......
......@@ -80,6 +80,10 @@ public class UserInfoEditFragment extends BaseFragment<UserPresenter, FragmentUs
ToastUtils.showShort("会员帐号不能为空");
return;
}
if (mViewBinding.userPhone.getText().length() !=11) {
ToastUtils.showShort("会员帐号长度必须11位");
return;
}
if (mViewBinding.userLevel.getText().length() == 0) {
ToastUtils.showShort("会员等级不能为空");
......
......@@ -9,7 +9,6 @@ import android.widget.TextView;
import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.listener.CustomListener;
import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.App;
......@@ -314,8 +313,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
* 初始化会员等级选择对话框
*/
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setVipLevel(realmResult.get(options1).getVipLevel());
......@@ -340,10 +338,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
}
});
}
})
.isDialog(true)
.build();
}).isDialog(true).build();
pvCustomOptions.setPicker(realmResult);//添加数据
pvCustomOptions.show();
......
package com.xingdata.zzdpos.ui.marketing.ms;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
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.ToastUtils;
......@@ -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.EditorFragment;
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.model.Area;
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.User;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.util.Global;
import java.util.List;
public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, ActivityMsBinding>
implements MsContract.View<Sku> {
public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, ActivityMsBinding> implements MsContract.View<Sku> {
private ManagerFragment mManagerFragment = new ManagerFragment();
private EditorFragment mEditorFragment = new EditorFragment();
private AddFragment mAddFragment = new AddFragment();
private SearchFragment<Sku> mSearchFragment = new SearchFragment<>();
private ScanFragment<Sku> mScanFragment = new ScanFragment<>();
private ScanFragment mScanFragment = new ScanFragment<>();
private LoadingDialog mLoadingDialog = new LoadingDialog();
......@@ -50,12 +45,8 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
@Override
public void initView() {
this.loadRootFragment(R.id.f_ms, mManagerFragment);
mViewBinding.setTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.btnBack.setOnClickListener(view -> {
getTopFragment().onBackPressedSupport();
onBackPressedSupport();
});
mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH) {
KeyboardUtils.hideSoftInput(textView);
......@@ -65,6 +56,10 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
});
}
@Override
public void onBackPressedSupport() {
}
@Override
public void showMsg(String msg) {
ToastUtils.showShort(msg);
......@@ -82,24 +77,39 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
@Override
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));
}
@Override
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));
}
@Override
public void showSearchFragment(int searchType) {
this.showTitleBarByTitleMode(searchType);
this.start(mSearchFragment.setSearchType(searchType));
this.start(mSearchFragment.setKeyword("").setSearchType(searchType));
}
@Override
public void showSearchFragment(String keyword, int searchType) {
this.showTitleBarByTitleMode(searchType);
this.start(mSearchFragment.setKeyword(keyword).setSearchType(searchType));
}
@Override
public void showScanFragment(int searchType) {
this.showTitleBarByTitleMode(searchType);
this.start(mScanFragment.setSearchType(searchType));
mScanFragment.setOnScanCompletedListener(barcode -> {
mScanFragment.pop();
mPresenter.scanCompleted(barcode, searchType);
});
mScanFragment.setOnBackPressedListener(this::pop);
this.start(mScanFragment);
}
......@@ -150,13 +160,21 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
@Override
public void backToEditFragment() {
this.popTo(EditorFragment.class, false);
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
this.pop();
}
@Override
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
......@@ -189,6 +207,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
public boolean dispatchTouchEvent(MotionEvent ev) {
Global.clickHideKeyboard(ev, this);
......
......@@ -47,9 +47,19 @@ interface MsContract {
/**
* 显示搜索页面
*
* @param searchType 搜索类型
*/
void showSearchFragment(int searchType);
/**
* 显示搜素页面
*
* @param keyword 关键字
* @param searchType 搜索类型
*/
void showSearchFragment(String keyword, int searchType);
/**
* 显示扫描页面
*
......@@ -131,6 +141,11 @@ interface MsContract {
*/
void backToManagerFragment();
/**
* 退回到菜单页面
*/
void backToMenuActivity();
/**
* 显示读取对话框
*/
......@@ -184,11 +199,21 @@ interface MsContract {
*/
public abstract void clickGroupSkuSearch();
/**
* 编辑页面 - 点击营销主体商品的扫描键
*/
public abstract void clickGroupSkuScan();
/**
* 编辑页面 - 点击营销类型商品的搜索框
*/
public abstract void clickTypeSkuSearch();
/**
* 编辑页面 - 点击营销类型商品的扫描键
*/
public abstract void clickTypeSkuScan();
/**
* 编辑页面 - 点击搜索按钮
*
......@@ -218,9 +243,17 @@ interface MsContract {
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;
import com.blankj.utilcode.util.SPUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.base.BaseSku;
......@@ -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.Type;
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.List;
public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> {
/**
* 是否需要同步
*/
private boolean isNeedSync = false;
/**
* 页码
*/
......@@ -106,11 +113,21 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
mView.showSearchFragment(C.TITLE_MODE.SKU);
}
@Override
public void clickGroupSkuScan() {
mView.showScanFragment(C.TITLE_MODE.SKU);
}
@Override
public void clickTypeSkuSearch() {
mView.showSearchFragment(C.TITLE_MODE.GIFT);
}
@Override
public void clickTypeSkuScan() {
mView.showScanFragment(C.TITLE_MODE.GIFT);
}
@Override
public void clickSearchButton(String keyword) {
......@@ -128,6 +145,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
.doOnSubscribe(disposable -> mView.dismissLoadingDialog())
.subscribe(ms1 -> {
mView.showMsg("添加成功");
isNeedSync = true;
mView.backToManagerFragment();
mView.addMs(ms1);
}, throwable -> {
......@@ -139,6 +157,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
.doOnSubscribe(disposable -> mView.dismissLoadingDialog())
.subscribe(ms1 -> {
mView.showMsg("修改成功");
isNeedSync = true;
mView.backToManagerFragment();
mView.updateMs(ms1);
}, throwable -> {
......@@ -166,10 +185,34 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
}
}
@Override
public void scanCompleted(String barcode, int searchType) {
mView.showSearchFragment(barcode, searchType);
}
@Override
public void exitSearchFragment() {
mView.backToEditFragment();
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()));
}
}
/**
......
......@@ -71,7 +71,11 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> {
strGroup = mContext.getResources().getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.CATE:
strGroup = mContext.getResources().getString(R.string.ms_group_cate_info, ms.getCateName());
if (ms.getCateName() != null) {
strGroup = mContext.getResources().getString(R.string.ms_group_cate_info, ms.getCateName());
} else {
strGroup = mContext.getResources().getString(R.string.ms_group_cate_info, "指定品类商品");
}
break;
case C.MS_GROUP.SKU:
String spuName = DBFactory.Marketing.Ms.querySpuNameBySkuId(ms.getSkuId());
......@@ -92,7 +96,8 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> {
strType = mContext.getResources().getString(R.string.ms_type_money_off_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftOffAmt()));
break;
case C.MS_TYPE.GIFT:
strType = mContext.getResources().getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
String spuName = DBFactory.Marketing.Ms.querySpuNameBySkuId(ms.getGiftSkuId());
strType = mContext.getResources().getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), spuName);
break;
}
return strGroup + strType;
......
......@@ -5,6 +5,7 @@ import android.support.v7.widget.GridLayoutManager;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
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.adapter.TypeAdapter;
import com.xingdata.zzdpos.ui.marketing.ms.model.Type;
......@@ -48,4 +49,9 @@ public class AddFragment extends BaseFragment<MsPresenter, FragmentMsAddBinding>
mTypeAdapter.setNewData(types);
}
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToManagerFragment();
return super.onBackPressedSupport();
}
}
......@@ -21,6 +21,7 @@ import com.xingdata.zzdpos.databinding.FragmentMsEditorBinding;
import com.xingdata.zzdpos.databinding.ViewTimeDetailBinding;
import com.xingdata.zzdpos.model.Ms;
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.adapter.BeanAdapter;
import com.xingdata.zzdpos.ui.marketing.ms.model.Area;
......@@ -175,7 +176,6 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi
*/
public <Sku extends BaseSku> void loadGroupSku(Sku sssku) {
if (mGroupView instanceof GroupSkuView) ((GroupSkuView) mGroupView).loadSssku(sssku);
}
/**
......@@ -184,6 +184,7 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi
* @param sssku 商品
*/
public <Sku extends BaseSku> void loadTypeSku(Sku sssku) {
if (mTypeView instanceof TypeGiftView) ((TypeGiftView) mTypeView).loadSssku(sssku);
}
/**
......@@ -502,4 +503,10 @@ public class EditorFragment extends BaseFragment<MsPresenter, FragmentMsEditorBi
mPresenter.clickEditorConfirm(mMs, mEditorMode);
}
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToManagerFragment();
return super.onBackPressedSupport();
}
}
......@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentMsManagerBinding;
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.adapter.MsAdapter;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
......@@ -43,6 +44,12 @@ public class ManagerFragment extends BaseFragment<MsPresenter, FragmentMsManager
refreshMs();
}
@Override
public boolean onBackPressedSupport() {
((MsActivity) getActivity()).backToMenuActivity();
return super.onBackPressedSupport();
}
/**
* 加载营销计划数据
*
......
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;
import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BaseSku;
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.adapter.SkuAdapter;
import java.util.List;
public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresenter, FragmentMsSearchBinding> {
private int mSearchType;
private String mKeyword;
private SkuAdapter<Sku> mSkuAdapter;
@Override
......@@ -34,20 +40,17 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente
mSkuAdapter.setOnLoadMoreListener(this::loadMoreSku, mViewBinding.rlSku);
mSkuAdapter.setOnItemClickListener((adapter, view, position) -> {
mPresenter.clickSku(mSkuAdapter.getData().get(position), mSearchType);
this.pop();
((MsActivity) getActivity()).backToEditFragment();
});
// set empty
@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.isUseEmpty(false);
}
@Override
public void onDestroyView() {
mPresenter.exitSearchFragment();
super.onDestroyView();
//init
if (!StringUtils.isEmpty(mKeyword)) mPresenter.clickSearchButton(mKeyword);
}
/**
......@@ -84,4 +87,20 @@ public class SearchFragment<Sku extends BaseSku> extends BaseFragment<MsPresente
this.mSearchType = searchType;
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,7 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> {
if (b) mPresenter.clickGroupSkuSearch();
});
mViewBinding.btnScan.setOnClickListener(view -> mPresenter.clickGroupSkuScan());
}
@SuppressLint("SetTextI18n")
......@@ -36,7 +37,6 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk
protected void setViewByMs() {
if (mMs.getMsTouchTag2() == null || mMs.getMsTouchTag2() != C.MS_GROUP.SKU) return;
mViewBinding.llProduct.setVisibility(View.VISIBLE);
mViewBinding.etSearch.setText(ConvertUtil.longToString(mMs.getSkuBarCode()));
mViewBinding.setName(mMs.getSkuName());
mViewBinding.setPrice(ConvertUtil.fenToYuan(mMs.getSkuPrice1(), true));
}
......@@ -53,7 +53,6 @@ public class GroupSkuView<Sku extends BaseSku> extends BaseGroupView<ViewGroupSk
public void loadSssku(Sku sku) {
this.mSku = sku;
if (sku != null) {
mViewBinding.etSearch.setText(ConvertUtil.longToString(sku.getSpuBarcode()));
mViewBinding.setName(sku.getSpuName());
mViewBinding.setPrice(ConvertUtil.fenToYuan(sku.getSkuRetailPrice1(), true));
mViewBinding.llProduct.setVisibility(View.VISIBLE);
......
package com.xingdata.zzdpos.ui.marketing.ms.view;
import android.annotation.SuppressLint;
import android.view.View;
import android.widget.EditText;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.databinding.ViewTypeGiftBinding;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.InputFilters;
/**
* 促销页面
*/
public class TypeGiftView extends BaseTypeView<ViewTypeGiftBinding> {
public class TypeGiftView<Sku extends BaseSku> extends BaseTypeView<ViewTypeGiftBinding> {
private Sku mSssku;
private View.OnFocusChangeListener mOnFocusChangeListener;
public TypeGiftView() {
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
public int getLayoutId() {
return R.layout.view_type_gift;
}
@Override
public void initView() {
super.initView();
mViewBinding.etAmt.setFilters(InputFilters.getMoneyFilter(6));
mViewBinding.etAddAmt.setFilters(InputFilters.getMoneyFilter(6));
mViewBinding.etAmt.setOnFocusChangeListener(mOnFocusChangeListener);
mViewBinding.etAddAmt.setOnFocusChangeListener(mOnFocusChangeListener);
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> {
if (b) mPresenter.clickTypeSkuSearch();
});
mViewBinding.btnScan.setOnClickListener(view -> mPresenter.clickTypeSkuScan());
}
@SuppressLint("SetTextI18n")
@Override
protected void setViewByMs() {
if (mMs.getMsTools() == null || mMs.getMsTools() != C.MS_TYPE.GIFT) return;
mViewBinding.etAmt.setText(ConvertUtil.fenToYuan(mMs.getPayAmt()));
mViewBinding.etAddAmt.setText(ConvertUtil.fenToYuan(mMs.getGiftSkuPrice()));
mViewBinding.llProduct.setVisibility(View.VISIBLE);
mViewBinding.setName(mMs.getGiftSkuName());
mViewBinding.setPrice(ConvertUtil.fenToYuan(mMs.getGiftSkuPrice1(), true));
}
@Override
public boolean processMs(Ms ms) {
ms.setMsTools(C.MS_TYPE.GIFT);
String strAmt = mViewBinding.etAmt.getText().toString();
if (StringUtils.isEmpty(strAmt)) return false;
ms.setPayAmt(ConvertUtil.yuanToFen(strAmt));
String strAddAmt = mViewBinding.etAddAmt.getText().toString();
if (StringUtils.isEmpty(strAddAmt)) return false;
ms.setGiftSkuPrice(ConvertUtil.yuanToFen(strAddAmt));
if (mSssku == null && ms.getGiftSkuId() == null) return false;
if (mSssku != null) ms.setGiftSkuId(mSssku.getSkuId());
return true;
}
@SuppressLint("SetTextI18n")
public void loadSssku(Sku sku) {
this.mSssku = sku;
if (sku != null) {
mViewBinding.setName(sku.getSpuName());
mViewBinding.setPrice(ConvertUtil.fenToYuan(sku.getSkuRetailPrice1(), true));
mViewBinding.llProduct.setVisibility(View.VISIBLE);
} else {
mViewBinding.llProduct.setVisibility(View.GONE);
}
}
}
......@@ -19,6 +19,7 @@ import com.xingdata.zzdpos.util.InputFilters;
*/
public class TypeMoneyOffView extends BaseTypeView<ViewTypeMoneyOffBinding> {
private View.OnFocusChangeListener mOnFocusChangeListener;
public TypeMoneyOffView() {
......
......@@ -41,7 +41,7 @@ public class RechargeRuleEditFragment extends BaseFragment<RechargeRulePresenter
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
if (mMscard != null) {
mViewBinding.infoTitle.tvTitle.setText("修改会员");
mViewBinding.infoTitle.tvTitle.setText("修改充值优惠");
mViewBinding.ruleNameLayout.setVisibility(View.GONE);
mViewBinding.ruleName.setText("充" + ConvertUtil.fenToYuanNoZero(mMscard.getCruleChargeAmt()) + "送" + ConvertUtil.fenToYuanNoZero(mMscard.getCruleSendAmt()) + "元");
mViewBinding.rechargAmt.setText(ConvertUtil.fenToYuanNoZero(mMscard.getCruleChargeAmt()));
......
......@@ -53,7 +53,9 @@ public class TickerAddFragment extends BaseFragment<ReturnTicketPresenter,
mViewBinding.etTicketMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etRuleMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etTicketCount.addTextChangedListener(mTextWatcher);
mViewBinding.llTickerName.setVisibility(View.GONE);
if (nowType == 2) {
mViewBinding.llTickerName.setVisibility(View.VISIBLE);
mViewBinding.icTitles.tvTitle.setText("编辑优惠券");
mViewBinding.tvIntegralRuleName.setText(trule.getTruleName());
if (trule.getTruleStatus() == 1) {
......
......@@ -45,6 +45,8 @@ public class SendTicketPresenter extends SendTicketContract.Presenter {
mView.loadVips(vips);
},
throwable -> {
List<Vip> vips = new ArrayList<>();
mView.loadVips(vips);
});
}
......
......@@ -22,6 +22,9 @@ import java.util.List;
public class VipFragment extends BaseFragment<SendTicketPresenter, FragmentSendTickerVipBinding> {
private VipAdapter mVipAdapter;
@SuppressLint("InflateParams")
View emptyView;
TextView noSeachData;
@Override
public int getLayoutId() {
......@@ -35,10 +38,9 @@ public class VipFragment extends BaseFragment<SendTicketPresenter, FragmentSendT
mVipAdapter = new VipAdapter();
mViewBinding.rlVip.setAdapter(mVipAdapter);
mViewBinding.rlVip.setLayoutManager(new LinearLayoutManager(mContext));
@SuppressLint("InflateParams") View emptyView = getLayoutInflater().inflate(R.layout
.view_empty, null);
((TextView) emptyView.findViewById(R.id.tv_empty)).setText(R.string
.settle_vip_search_empty);
emptyView = getLayoutInflater().inflate(R.layout.view_empty, null);
noSeachData = ((TextView) emptyView.findViewById(R.id.tv_empty));
noSeachData.setText(R.string.settle_vip_search_empty);
mVipAdapter.setEmptyView(emptyView);
mVipAdapter.setOnItemClickListener((adapter, view, position) -> {
......@@ -80,7 +82,12 @@ public class VipFragment extends BaseFragment<SendTicketPresenter, FragmentSendT
* @param vips 会员列表
*/
public void loadVips(List<Vip> vips) {
mViewBinding.setEmpty(vips.size() == 0);
if (vips.size() == 0) {
noSeachData.setText(R.string.settle_vip_search_empty_no_seach);
mVipAdapter.setEmptyView(emptyView);
mViewBinding.setEmpty(vips.size() == 0);
}
mVipAdapter.setNewData(vips);
}
......
package com.xingdata.zzdpos.ui.settle;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ToastUtils;
......@@ -159,6 +157,7 @@ public class SettlePresenter extends SettleContract.Presenter {
mView.loadVips(vips);
},
throwable -> {
mView.loadVips(new ArrayList<>());
});
}
......@@ -387,9 +386,9 @@ public class SettlePresenter extends SettleContract.Presenter {
private void paySucc(Saleorder saleorder) {
mView.showPaySuccFragment(saleorder);
this.updateHandover(MainPresenter.handoverInfo);
try{
try {
ZX_PrintPOS.getInstance(MainActivity.mainActivity).print(1, saleorder);
}catch (Exception e){
} catch (Exception e) {
ToastUtils.showShort("打印异常");
}
......
......@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSettleTicketBinding;
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.adapter.TicketAdapter;
......@@ -96,4 +97,10 @@ public class TicketFragment extends BaseFragment<SettlePresenter, FragmentSettle
mTicketAdapter.notifyDataSetChanged();
}
@Override
public boolean onBackPressedSupport() {
((SettleActivity) getActivity()).backToSettleFragment();
return super.onBackPressedSupport();
}
}
......@@ -9,6 +9,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSettleVipBinding;
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.adapter.VipAdapter;
......@@ -48,13 +49,10 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
* @param 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) {
mPresenter.selectVip(vips.get(0));
this.pop();
} else if (vips.size() == 0) {
mVipAdapter.setNewData(vips);
mViewBinding.setEmpty(vips.size() == 0);
((TextView) mVipAdapter.getEmptyView().findViewById(R.id.tv_empty)).setText(R.string.settle_vip_search_none);
} else {
mViewBinding.setEmpty(vips.size() == 0);
mVipAdapter.setNewData(vips);
......@@ -63,8 +61,8 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
@Override
public void onDestroyView() {
mPresenter.exitVipFragment();
super.onDestroyView();
public boolean onBackPressedSupport() {
((SettleActivity) getActivity()).backToSettleFragment();
return super.onBackPressedSupport();
}
}
......@@ -67,18 +67,20 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
return false;
});
mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission(PermissionConstants.CAMERA)
.callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
mPresenter.clickScan();
}
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) {
}
})
.request());
mViewBinding.btnScan.setOnClickListener(view ->
PermissionUtils.permission(PermissionConstants.CAMERA)
.callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
mPresenter.clickScan();
}
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) {
}
})
.request()
);
mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode));
}
......@@ -159,8 +161,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
public void showSearchFragment() {
if (!mSearchFragment.isAdded()) {
mViewBinding.setTitleMode(C.TITLE_MODE.SKU);
mViewBinding.etSearch.setVisibility(View.VISIBLE);
mViewBinding.etSearch.setText("");
mViewBinding.etSearch.requestFocus();
KeyboardUtils.showSoftInput(mViewBinding.etSearch);
this.start(mSearchFragment.setKeyword(""));
}
}
......
......@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import com.blankj.utilcode.util.ScreenUtils;
import com.blankj.utilcode.util.StringUtils;
......@@ -53,6 +54,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
// set empty
@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.isUseEmpty(false);
......
......@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import com.blankj.utilcode.util.ScreenUtils;
import com.blankj.utilcode.util.StringUtils;
......@@ -64,6 +65,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
else mPresenter.clickRemoveSku(sku, value);
});
// set grp listener
mSkugrpAdapter.setOnItemClickListener((adapter, view, position) -> mPresenter.clickSkugrp(mSkugrpAdapter.getData().get(position)));
......@@ -73,12 +75,10 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
// set empty
@SuppressLint("InflateParams") View emptyView = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) emptyView.findViewById(R.id.tv_empty)).setText(R.string.sku_empty_hint);
mSkuAdapter.setEmptyView(emptyView);
mSkuAdapter.isUseEmpty(false);
// init data
mPresenter.initStore();
}
......
......@@ -20,6 +20,7 @@ import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.vip.fragment.VipAddSucceedFragment;
import com.xingdata.zzdpos.util.Global;
import com.xingdata.zzdpos.view.ViewTools;
......@@ -50,7 +51,9 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding>
@Override
public void addVipSus(Vip vip) {
mPresenter.vipListFragment.updateVipSus(vip);
// mPresenter.vipListFragment.updateVipSus(vip);
mPresenter.vipAddSucceedFragment.setmVip(vip);
start(mPresenter.vipAddSucceedFragment);
}
@Override
......
......@@ -13,9 +13,11 @@ import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Mscard;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.vip.fragment.VipAddSucceedFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipExpenseListFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoEditFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoFragment;
......@@ -37,7 +39,8 @@ public class VipPresenter extends VipContract.Presenter {
public VipTruleListFragment vipMscardListFragment = new VipTruleListFragment();
public VipSearchFragment vipSearchFragment = new VipSearchFragment();
public VipRechargeFragment vipRechargeFragment = new VipRechargeFragment();
public int inVipState = 0; //1 充值
public VipAddSucceedFragment vipAddSucceedFragment =new VipAddSucceedFragment();
public ArrayList<Level> levels = new ArrayList<>();
@Override
public void onAttached() {
......@@ -78,8 +81,11 @@ public class VipPresenter extends VipContract.Presenter {
@Override
public void addVip(Vip vip) {
int vipDis= vip.getVipDefDiscount();
if (vip.getVipId() == null) {
ApiFactory.User.addVip(vip).subscribe(mVip -> {
mVip.setVipLevelName(vip.getVipLevelName());
mVip.setVipDefDiscount(vipDis);
mView.addVipSus(mVip);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
......
......@@ -34,14 +34,12 @@ public class VipEditMenuDialog extends BaseSheetDialog<VipPresenter, DialogVipMe
case R.id.editVip:
mPresenter.vipInfoEditFragment = new VipInfoEditFragment();
mPresenter.vipInfoEditFragment.setVip(mVip);
mPresenter.vipInfoEditFragment.setVipLevel(mLevel);
((BaseActivity) getActivity()).start(mPresenter.vipInfoEditFragment);
break;
//充值記錄
case R.id.rechargeList:
mPresenter.vipRechargeListFragment = new VipRechargeListFragment();
mPresenter.vipRechargeListFragment.setVip(mVip);
mPresenter.vipRechargeListFragment.setVipLevel(mLevel);
((BaseActivity) getActivity()).start(mPresenter.vipRechargeListFragment);
break;
//優惠券詳情
......
package com.xingdata.zzdpos.ui.vip.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentVipAddSucceedBinding;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
/**
* 会员信息界面
*/
public class VipAddSucceedFragment extends BaseFragment<VipPresenter, FragmentVipAddSucceedBinding> {
private Vip mVip;
@Override
public int getLayoutId() {
return R.layout.fragment_vip_add_succeed;
}
@Override
public void initView() {
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
mViewBinding.infoTitle.tvTitle.setText("添加成功");
mViewBinding.vipName.setText(mVip.getVipName());
mViewBinding.vipMobile.setText(mVip.getVipMobile() + "");
if (String.valueOf(mVip.getVipTag()).equals("1")) {
mViewBinding.vipLevel.setText("超级会员" + " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
} else {
mViewBinding.vipLevel.setText(mVip.getVipLevelName() + " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
}
mViewBinding.vipAdd.setOnClickListener(view -> {
this.pop();
});
mViewBinding.vipRecharge.setOnClickListener(view -> {
this.pop();
mPresenter.vipRechargeFragment.setVip(mVip);
start(mPresenter.vipRechargeFragment);
});
mViewBinding.vipSure.setOnClickListener(view -> {
pop();
mPresenter.vipListFragment.updateVipSus(null);
});
mViewBinding.infoTitle.ivBack.setOnClickListener(view -> {
pop();
});
}
public void setmVip(Vip mVip) {
this.mVip = mVip;
}
}
......@@ -35,10 +35,10 @@ import java.util.List;
* 会员信息界面
*/
public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipInfoEditBinding> {
private List<Level> levels;
private ArrayList<Level> mLevels = new ArrayList<>();
private Vip mVip;
private Vip vip;
private Byte vipTag;
private int vipDiscounts;
@Override
public int getLayoutId() {
......@@ -47,28 +47,33 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
@Override
public void initView() {
mLevels.clear();
mLevels.add(mPresenter.levels.get(0));
mLevels.add(mPresenter.levels.get(mPresenter.levels.size() - 1));
mLevels.get(mLevels.size() - 1).setVipLevelName("超级会员");
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
if (mVip != null) {
if (vip != null) {
mViewBinding.infoTitle.tvTitle.setText("修改会员");
mViewBinding.vipDiscounts.setText(mVip.getVipLevelName() + mVip.getVipDefDiscount() + "折");
mViewBinding.vipBirthday.setText(StringUtil.format(new Date(mVip.getVipBirthday())));
mViewBinding.vipName.setText(mVip.getVipName());
mViewBinding.vipPhone.setText(mVip.getVipMobile() + "");
if (String.valueOf(mVip.getVipTag()).equals("1")) {
mViewBinding.vipDiscounts.setText("超级会员"+ " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
mViewBinding.vipDiscounts.setText(vip.getVipLevelName() + vip.getVipDefDiscount() + "折");
mViewBinding.vipBirthday.setText(StringUtil.format(new Date(vip.getVipBirthday())));
mViewBinding.vipName.setText(vip.getVipName());
mViewBinding.vipPhone.setText(vip.getVipMobile() + "");
if (String.valueOf(vip.getVipTag()).equals("1")) {
mViewBinding.vipDiscounts.setText("超级会员" + " " + ConvertUtil.discount(vip.getVipDefDiscount()) + "折");
} else {
mViewBinding.vipDiscounts.setText(mVip.getVipLevelName() + " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
mViewBinding.vipDiscounts.setText(vip.getVipLevelName() + " " + ConvertUtil.discount(vip.getVipDefDiscount()) + "折");
}
mViewBinding.vipDiscounts.setEnabled(false);
// ((CheckBox) mViewBinding.vipSuper).setChecked(mVip.getVipTag() == 1);
RadioButton radioButton = mViewBinding.vipSex.findViewWithTag(mVip.getVipSex().toString());
RadioButton radioButton = mViewBinding.vipSex.findViewWithTag(vip.getVipSex().toString());
if (radioButton != null) {
radioButton.setChecked(true);
}
} else {
mViewBinding.infoTitle.tvTitle.setText("添加会员");
mViewBinding.vipDiscounts.setEnabled(true);
mViewBinding.vipDiscounts.setText(levels.get(0).getVipLevelName() + " " + ConvertUtil.discount(levels.get(0).getVipDefDiscount()) + "折");
mViewBinding.vipDiscounts.setText(mPresenter.levels.get(0).getVipLevelName() + " " + ConvertUtil.discount(mPresenter.levels.get(0).getVipDefDiscount()) + "折");
vipDiscounts = mPresenter.levels.get(0).getVipDefDiscount();
mViewBinding.vipBirthday.setText(StringUtil.format(new Date(System.currentTimeMillis())));
((RadioButton) mViewBinding.vipSex.getChildAt(0)).setChecked(true);
}
......@@ -96,9 +101,10 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
ToastUtils.showShort("手机号长度必须为11位");
return;
}
if (mVip == null) {
mVip = new Vip();
Vip mVip = new Vip();
if (vip != null) {
mVip.setVipId(vip.getVipId());
mVip.setVipDefDiscount(vip.getVipDefDiscount());
}
mVip.setVipName(mViewBinding.vipName.getText().toString().trim());
mVip.setVipMobile(Long.parseLong(mViewBinding.vipPhone.getText().toString().trim()));
......@@ -107,8 +113,9 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
mVip.setVipLevelName("超级会员");
} else {
mVip.setVipTag(Byte.parseByte("0"));
mVip.setVipLevelName(mPresenter.levels.get(0).getVipLevelName());
}
mVip.setVipDefDiscount(vipDiscounts);
int sexId = mViewBinding.vipSex.getCheckedRadioButtonId();
if (sexId != -1) {
mVip.setVipSex(Byte.parseByte(mViewBinding.vipSex.findViewById(sexId).getTag().toString()));
......@@ -136,8 +143,13 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
OptionsPickerView.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int options2, int options3, View v) {
String tx = levels.get(options1).getPickerViewText();
mViewBinding.vipDiscounts.setText(tx + " " + ConvertUtil.discount(levels.get(options1 - 1).getVipDefDiscount()) + "折");
if (options1 == 0) {
mViewBinding.vipDiscounts.setText(mPresenter.levels.get(options1).getPickerViewText() + " " + ConvertUtil.discount(mPresenter.levels.get(options1).getVipDefDiscount()) + "折");
vipDiscounts = mPresenter.levels.get(options1).getVipDefDiscount();
} else {
mViewBinding.vipDiscounts.setText(mPresenter.levels.get(mPresenter.levels.size() - 1).getVipLevelName() + " " + ConvertUtil.discount(mPresenter.levels.get(mPresenter.levels.size() - 1).getVipDefDiscount()) + "折");
vipDiscounts = mPresenter.levels.get(mPresenter.levels.size() - 1).getVipDefDiscount();
}
vipTag = Byte.parseByte(options1 + "");
}
}).setTitleText("请选择")
......@@ -150,20 +162,12 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
pvOptions.show();
}
public void setVipLevel(List<Level> levels) {
this.levels = levels;
mLevels.clear();
mLevels.add(levels.get(0));
mLevels.add(levels.get(levels.size() - 1));
mLevels.get(mLevels.size() - 1).setVipLevelName("超级会员");
}
public void setVip(Vip mVip) {
this.mVip = mVip;
this.vip = mVip;
}
public Vip getmVip() {
return mVip;
return vip;
}
//将两个选择时间的dialog放在该函数中
......
......@@ -20,7 +20,6 @@ import java.util.List;
public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentVipInfoBinding> {
private Vip mVip;
private List<Level> level;
@Override
......@@ -36,7 +35,7 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentVipInfoB
});
mViewBinding.infoTitle.popMenu.setOnClickListener(view -> {
VipEditMenuDialog dialog = new VipEditMenuDialog();
dialog.setLevel(level);
dialog.setLevel(mPresenter.levels);
dialog.setVip(mVip);
dialog.show((BaseActivity) getActivity());
});
......@@ -72,9 +71,6 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentVipInfoB
this.mVip = vip;
}
public void setLevel(List<Level> level) {
this.level = level;
}
public void addVipSus(Vip vip) {
mVip = vip;
......
......@@ -36,7 +36,6 @@ import java.util.List;
public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListBinding> {
private VipListAdapter vipListAdapter;
private List<Vip> vips = new ArrayList<>();
private List<Level> levels = null;
private int pageNumber = 0;
private String strVipLevle;
private int vipState = 0;//0 会员 1 充值
......@@ -92,7 +91,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
case R.id.addVip:
if (levels == null || levels.size() == 0) {
if (mPresenter.levels== null || mPresenter.levels.size() == 0) {
ToastUtils.showShort("缺少会员等级");
return;
}
......@@ -117,7 +116,6 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
}
});
mViewBinding.titleSearch.serchEditText.setOnClickListener(view -> {
mPresenter.vipSearchFragment.setLevel(levels);
if (vipState == 0) {
mPresenter.vipSearchFragment.setBaseFragment(mPresenter.vipInfoFragment);
} else {
......@@ -191,10 +189,12 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
// mPresenter.getVipList(0,mViewBinding.vipLevelR.getChildAt(0).getTag()== null ? null : mViewBinding.vipLevelR.getChildAt(0).getTag().toString());
}
levels = levelPager.getList();
mPresenter.levels.clear();
mPresenter.levels.addAll(levelPager.getList());
Level level = new Level();
level.setVipLevelName("超级会员");
levels.add(level);
level.setVipDefDiscount(mPresenter.levels.get(mPresenter.levels.size()-1).getVipDefDiscount());
mPresenter.levels.add(level);
}
private void onLoadMore() {
......@@ -231,7 +231,6 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
if (vip != null) {
if (vipState == 0) {
mPresenter.vipInfoFragment.setVip(vip);
mPresenter.vipInfoFragment.setLevel(levels);
((BaseActivity) getActivity()).start(mPresenter.vipInfoFragment);
} else {
mPresenter.vipInfoFragment.setVip(vip);
......@@ -240,7 +239,6 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
} else {
mPresenter.vipInfoEditFragment.setVip(null);
mPresenter.vipInfoEditFragment.setVipLevel(levels);
((BaseActivity) getActivity()).start(mPresenter.vipInfoEditFragment);
}
}
......
......@@ -12,6 +12,7 @@ import android.text.Spanned;
import android.text.SpannedString;
import android.text.TextWatcher;
import android.text.style.AbsoluteSizeSpan;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.LinearLayout;
import android.widget.RadioButton;
......@@ -40,7 +41,6 @@ import java.util.List;
*/
@SuppressLint("ValidFragment")
public class VipRechargeFragment extends BaseFragment<VipPresenter, FragmentVipRechargeBinding> {
private List<Level> levels;
private List<Mscard> mscards = new ArrayList<>();
private LinearLayout.LayoutParams layoutParams = null;
private HashMap<String, Mscard> mscardHashMap = new HashMap<>();
......@@ -57,6 +57,7 @@ public class VipRechargeFragment extends BaseFragment<VipPresenter, FragmentVipR
@Override
public void initView() {
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
mViewBinding.vipMobile.setText(String.valueOf(mVip.getVipMobile()));
mViewBinding.vipName.setText(String.valueOf(mVip.getVipName()));
mViewBinding.infoTitle.tvTitle.setText("充值");
......@@ -110,9 +111,6 @@ public class VipRechargeFragment extends BaseFragment<VipPresenter, FragmentVipR
return true;
}
public void setVipLevel(List<Level> levels) {
this.levels = levels;
}
public void setVip(Vip mVip) {
......
......@@ -37,7 +37,6 @@ public class VipRechargeListFragment extends BaseFragment<VipPresenter, Fragment
private VipRechargeAdapter vipRechargeAdapter;
private List<VipRechargeOrder> orders = new ArrayList<>();
private int pageNumber = 0;
private List<Level> levels;
@Override
......@@ -87,9 +86,6 @@ public class VipRechargeListFragment extends BaseFragment<VipPresenter, Fragment
return true;
}
public void setVipLevel(List<Level> levels) {
this.levels = levels;
}
public void setVip(Vip mVip) {
......
......@@ -30,7 +30,6 @@ import java.util.List;
public class VipSearchFragment extends BaseFragment<VipPresenter, FragmentVipSerchBinding> {
private VipAdapter mVipAdapter;
private BaseFragment baseFragment;
private List<Level> level;
public void setBaseFragment(BaseFragment baseFragment) {
this.baseFragment = baseFragment;
......@@ -55,7 +54,6 @@ public class VipSearchFragment extends BaseFragment<VipPresenter, FragmentVipSer
((EditText) mViewBinding.etSearch).requestFocus();
mVipAdapter.setOnItemClickListener((adapter, view, position) -> {
if (baseFragment instanceof VipInfoFragment) {
((VipInfoFragment) baseFragment).setLevel(this.level);
((VipInfoFragment) baseFragment).setVip(mVipAdapter.getData().get(position));
}else if (baseFragment instanceof VipRechargeFragment){
((VipRechargeFragment) baseFragment).setVip(mVipAdapter.getData().get(position));
......@@ -102,9 +100,6 @@ public class VipSearchFragment extends BaseFragment<VipPresenter, FragmentVipSer
mVipAdapter.setNewData(vips.getList());
}
public void setLevel(List<Level> level) {
this.level = level;
}
@Override
public void onResume() {
......
......@@ -58,9 +58,8 @@ public final class SystemUtil {
}
}
// return deviceSN;
return "54849226";
return "54849689";
}
/**
* 获取应用名称
*
......@@ -80,8 +79,7 @@ public final class SystemUtil {
}
/**
*
*获取是否存在NavigationBar
* 获取是否存在NavigationBar
*/
public static boolean checkDeviceHasNavigationBar(Context context) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius"/>
<stroke
android:width="0.5dp"
android:color="@color/black_likui"/>
<solid android:color="@color/gray_zhouyu"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius"/>
<stroke
android:width="0.5dp"
android:color="@color/red_guanyu"/>
<solid android:color="@color/red_guanyu"/>
</shape>
\ No newline at end of file
......@@ -48,8 +48,8 @@
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_weight="1"
android:inputType="number"
android:labelFor="@+id/et_search"/>
android:inputType="text"
android:labelFor="@+id/et_search" />
</LinearLayout>
......
......@@ -45,8 +45,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:minHeight="@dimen/list1_height"
android:gravity="center"
android:minHeight="@dimen/list1_height"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
......@@ -55,6 +55,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:paddingLeft="@dimen/all_padding"
android:text="启用状态:"
android:textColor="@color/black_baozheng"
......@@ -84,7 +85,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
......@@ -148,6 +149,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="2"
android:text=" 个积分=1元"
android:textColor="@color/black_baozheng"
......@@ -180,7 +182,7 @@
android:drawablePadding="@dimen/all_bounced_spacing"
android:gravity="left"
android:paddingLeft="@dimen/all_padding"
android:text="订单实收满 "
android:text="实收满: "
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
......@@ -201,6 +203,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="1"
android:text="元"
android:textColor="@color/black_baozheng"
......@@ -230,7 +233,7 @@
android:drawablePadding="@dimen/all_bounced_spacing"
android:gravity="left"
android:paddingLeft="@dimen/all_padding"
android:text="可以使用 "
android:text="可以使用:"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
......@@ -251,8 +254,9 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="1"
android:text="积分"
android:text="积分"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
......@@ -270,7 +274,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="@dimen/all_margin"
android:layout_margin="@dimen/all_bounced_padding"
android:background="@drawable/red_border"
android:onClick="@{OnClickListener}"
android:text="确定"
......
......@@ -73,6 +73,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding"
android:text="规则名称:"
android:textColor="@color/black_baozheng"
......@@ -112,6 +114,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:paddingLeft="@dimen/all_bounced_padding"
android:text="启用状态:"
android:textColor="@color/black"
......
......@@ -25,66 +25,74 @@
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:textSize="@dimen/text_three_title"
android:paddingTop="@dimen/all_padding"
android:background="@drawable/up_down_line_white"
android:text="系统提示"
android:textColor="@color/black_baozheng"/>
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/ll_bottom"
android:layout_below="@+id/tv_title"
android:gravity="center"
android:orientation="vertical">
<com.github.ybq.android.spinkit.SpinKitView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/spin_kit"
style="@style/SpinKitView.Circle"
android:layout_width="@dimen/prompt_dialog_logo_size"
android:layout_height="@dimen/prompt_dialog_logo_size"
android:layout_marginTop="@dimen/all_bounced_padding"
android:visibility="gone"
app:SpinKit_Color="@color/black"/>
<ImageView
android:id="@+id/iv_logo"
android:layout_width="@dimen/prompt_dialog_logo_size"
android:layout_height="@dimen/prompt_dialog_logo_size"
android:layout_centerHorizontal="true"
android:src="@mipmap/prompt_dialog_success" />
<ScrollView
android:layout_below="@+id/tv_title">
<RelativeLayout
android:id="@+id/rl_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/all_bounced_padding"
android:background="@drawable/up_down_line_white_top"
android:paddingBottom="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_bounced_padding">
<Button
android:id="@+id/btn_custom"
style="@style/button_positive_allradius"
android:layout_width="@dimen/button1_width"
android:layout_height="@dimen/button1_height"
android:layout_centerInParent="true"
android:text="重新获取"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/list2_height">
android:layout_height="match_parent"
android:gravity="center"
android:layout_above="@+id/rl_btn"
android:layout_marginTop="@dimen/all_bounced_spacing"
android:orientation="vertical">
<com.github.ybq.android.spinkit.SpinKitView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/spin_kit"
style="@style/SpinKitView.Circle"
android:layout_width="@dimen/prompt_dialog_logo_size"
android:layout_height="@dimen/prompt_dialog_logo_size"
android:layout_marginTop="@dimen/all_bounced_padding"
android:visibility="gone"
app:SpinKit_Color="@color/black"/>
<ImageView
android:id="@+id/iv_logo"
android:layout_width="@dimen/prompt_dialog_logo_size"
android:layout_height="@dimen/prompt_dialog_logo_size"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/all_bounced_padding"
android:src="@mipmap/prompt_dialog_success"/>
<TextView
android:id="@+id/tv_text"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_bounced_padding"
android:gravity="center"
android:text="正在处理,请稍后."
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"/>
</ScrollView>
<Button
android:id="@+id/btn_custom"
style="@style/button_positive_allradius"
android:layout_width="@dimen/button1_width"
android:layout_height="@dimen/button1_height"
android:layout_marginBottom="@dimen/all_bounced_padding"
android:text="重新获取"/>
</LinearLayout>
android:layout_marginTop="@dimen/all_bounced_padding">
<TextView
android:id="@+id/tv_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="正在处理,请稍后."
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"/>
</ScrollView>
</LinearLayout>
</RelativeLayout>
<android.support.constraint.ConstraintLayout
......
......@@ -19,7 +19,7 @@
<TextView
android:id="@+id/tv_update"
android:layout_width="match_parent"
android:layout_height="@dimen/button3_height"
android:layout_height="@dimen/list1_height"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:text="@string/sku_update"
......@@ -36,7 +36,7 @@
<TextView
android:id="@+id/tv_update_price"
android:layout_width="match_parent"
android:layout_height="@dimen/button3_height"
android:layout_height="@dimen/list1_height"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:text="@string/sku_update_price"
......@@ -53,7 +53,7 @@
<TextView
android:id="@+id/tv_update_vip"
android:layout_width="match_parent"
android:layout_height="@dimen/button3_height"
android:layout_height="@dimen/list1_height"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:text="@string/sku_update_vip"
......@@ -64,7 +64,7 @@
<TextView
android:id="@+id/tv_cancel"
android:layout_width="match_parent"
android:layout_height="@dimen/button3_height"
android:layout_height="@dimen/list1_height"
android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_white_r1"
android:foreground="?android:attr/selectableItemBackground"
......
......@@ -27,7 +27,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/up_down_line_gray"
android:background="@drawable/up_down_line_gray_bottom"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="基本信息"
......@@ -35,6 +35,7 @@
android:textSize="@dimen/text_secondary_title"/>
<LinearLayout
android:id="@+id/ll_ticker_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
......@@ -45,6 +46,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="活动名称:"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
......@@ -53,8 +56,10 @@
android:id="@+id/tv_integral_rule_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="5"
android:focusable="true"
android:gravity="right"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black_baozheng"
......@@ -80,6 +85,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="启用状态:"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
......@@ -160,7 +167,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_weight="2.5"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="优惠券面值:"
......@@ -182,7 +189,9 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="2"
android:gravity="right"
android:paddingLeft="@dimen/all_padding"
android:text="元"
android:textColor="@color/black_baozheng"
......@@ -205,7 +214,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_weight="2.5"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="券有效期:"
......@@ -227,6 +236,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="2"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
......@@ -247,7 +257,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_weight="2.5"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="订单金额满:"
......@@ -269,7 +279,9 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="2"
android:gravity="right"
android:paddingLeft="@dimen/all_padding"
android:text="元可用"
android:textColor="@color/black_baozheng"
......@@ -292,7 +304,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_weight="2.5"
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="每单使用:"
......@@ -314,7 +326,9 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_weight="2"
android:gravity="right"
android:paddingLeft="@dimen/all_padding"
android:text="张"
android:textColor="@color/black_baozheng"
......
......@@ -90,12 +90,11 @@
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/layout_statistics_bottom_height"
android:layout_alignParentBottom="true"
android:background="@drawable/up_down_line_white"
android:gravity="center"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing">
android:orientation="horizontal">
<Button
android:id="@+id/btn_cancel"
......@@ -132,7 +131,6 @@
android:id="@+id/tv_keyword"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding"
......@@ -149,7 +147,6 @@
android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size_low"
/>
</LinearLayout>
......@@ -189,6 +186,7 @@
android:layout_width="@dimen/all_button_radius_width_min"
android:layout_height="@dimen/all_button_radius_height_min"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/all_bounced_padding"
android:background="@drawable/red_border_allradius"
android:onClick="@{OnClickListener}"
android:stateListAnimator="@null"
......@@ -213,7 +211,7 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:layout_weight="2.9"
android:orientation="vertical"
android:padding="@dimen/all_padding">
......@@ -231,7 +229,8 @@
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="名称:"
android:textColor="@color/black"/>
android:textColor="@color/black"
android:textSize="@dimen/all_text_size"/>
<com.xingdata.zzdpos.view.ContainsEmojiEditText
android:id="@+id/et_shop_name"
......@@ -269,7 +268,8 @@
android:drawableLeft="@mipmap/point"
android:drawablePadding="@dimen/all_bounced_spacing"
android:text="价格:"
android:textColor="@color/black"/>
android:textColor="@color/black"
android:textSize="@dimen/all_text_size"/>
<EditText
android:id="@+id/et_shop_money"
......@@ -294,7 +294,8 @@
android:layout_weight="1"
android:paddingLeft="@dimen/all_padding"
android:text=" 元"
android:textColor="@color/black"/>
android:textColor="@color/black"
android:textSize="@dimen/all_text_size"/>
</LinearLayout>
</LinearLayout>
......@@ -303,8 +304,13 @@
android:id="@+id/rv_img_list"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_padding"
android:layout_marginRight="@dimen/all_bounced_padding"
android:layout_marginTop="@dimen/all_padding"
android:layout_weight="1"
android:padding="@dimen/all_padding"></android.support.v7.widget.RecyclerView>
android:background="@drawable/shape_black"
android:paddingLeft="@dimen/all_bounced_spacing"
android:paddingRight="@dimen/all_bounced_spacing"></android.support.v7.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
......
......@@ -74,9 +74,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:onClick="@{OnClickListener}"
android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground"
android:onClick="@{OnClickListener}"
android:src="@mipmap/but_sweep_yard"/>
</LinearLayout>
......@@ -101,7 +101,6 @@
android:id="@+id/tv_keyword"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding"
......@@ -118,7 +117,6 @@
android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size_low"
/>
</LinearLayout>
......@@ -158,7 +156,7 @@
android:id="@+id/btn_group"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/up_down_line_gray"
android:background="@drawable/up_down_line_gray_bottom"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="共 2 个组合"
......@@ -186,18 +184,6 @@
app:layout_constraintTop_toBottomOf="@id/btn_group"
app:layout_constraintVertical_weight="22">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_products"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rc_bale_shop"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/ll_null"
android:layout_width="match_parent"
......@@ -206,20 +192,32 @@
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/tv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/all_margin"
android:drawableTop="@mipmap/icon_things_null"
android:drawableTop="@mipmap/nong"
android:gravity="center"
android:lineSpacingExtra="@dimen/all_padding"
android:text="没有组合商品"
android:textColor="@color/white_half"
android:textSize="@dimen/all_text_size_big"/>
android:textColor="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
</LinearLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_products"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rc_bale_shop"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
......
......@@ -58,8 +58,8 @@
<EditText
android:id="@+id/et_keyword"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="@dimen/all_seach_height"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1"
android:background="@drawable/shape_gray_r1"
......@@ -73,8 +73,8 @@
android:maxLines="1"
android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding"
android:saveEnabled="false"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
<TextView
......
......@@ -58,7 +58,6 @@
android:id="@+id/et_keyword"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="@dimen/all_seach_height"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1"
android:focusable="true"
......@@ -68,7 +67,6 @@
android:labelFor="@+id/et_search"
android:saveEnabled="false"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
<TextView
......
......@@ -81,6 +81,7 @@
android:hint="@string/ms_editor_name_hint"
android:inputType="text"
android:lines="1"
android:maxLength="16"
android:text="@{name}"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size" />
......
......@@ -64,7 +64,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_amt"
android:textColor="@color/black_zhangfei"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
......@@ -72,7 +72,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_zhangfei"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" />
</LinearLayout>
......@@ -96,7 +96,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_change"
android:textColor="@color/black_zhangfei"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
......@@ -104,7 +104,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_zhangfei"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" />
</LinearLayout>
......
......@@ -283,8 +283,6 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:orientation="horizontal">
<Button
......
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener"/>
</data>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="@dimen/list1_height"
android:layout_below="@+id/ic_title"
android:layout_marginLeft="@dimen/all_bounced_padding"
android:background="@drawable/up_down_line_white_bottom"
android:gravity="center_vertical"
android:text="请选择零售行业"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/sl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/ll_bottom"
android:layout_below="@+id/tv_title">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_select"
android:layout_width="match_parent"
android:layout_height="match_parent"></android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/white">
<Button
android:id="@+id/btn_ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_bounced_padding"
android:background="@drawable/red_border"
android:onClick="@{onClickListener}"
android:text="确定"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -116,10 +116,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:drawablePadding="@dimen/all_bounced_spacing"
android:drawableRight="@mipmap/drop_down"
android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@id/cb_point"
app:layout_constraintTop_toBottomOf="parent"/>
......@@ -183,11 +184,11 @@
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_all"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="@dimen/list3_height"
android:background="@drawable/up_down_line_white"
android:foreground="?android:attr/selectableItemBackground"
android:onClick="@{OnClickListener}">
android:onClick="@{OnClickListener}"
android:visibility="gone">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_all_head"
......
......@@ -61,11 +61,10 @@
android:id="@+id/et_search"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="@dimen/all_seach_height"
android:layout_weight="1"
android:hint="@string/vip_seach_hint"
android:inputType="number"
android:maxLength="11"
android:hint="@string/vip_seach_hint"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
......
......@@ -136,7 +136,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:text="@string/settle_select_vip"
android:textColor="@color/black_zhangfei"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
android:visibility="@{defualtVip?View.VISIBLE:View.INVISIBLE}"
app:layout_constraintBottom_toTopOf="parent"
......
......@@ -53,6 +53,7 @@
android:layout_weight="1"
android:background="@color/transparent"
android:gravity="center_vertical"
android:imeOptions="actionSearch"
android:inputType="number"
android:labelFor="@+id/et_barcode"
android:saveEnabled="false"
......
......@@ -67,7 +67,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1"
android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size"
......
......@@ -134,6 +134,7 @@
android:hint="@string/sku_name_hint"
android:inputType="text"
android:labelFor="@+id/et_name"
android:maxLength="16"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size"
......
......@@ -164,32 +164,36 @@
android:layout_height="match_parent"
android:baselineAligned="false">
<LinearLayout
<android.support.v4.widget.NestedScrollView
android:layout_width="0dp"
android:layout_height="match_parent"
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" />
android:layout_weight="1">
<FrameLayout
android:id="@+id/ll_skugrp_add"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:foreground="?android:attr/selectableItemBackground">
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_skugrp"
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>
android:layout_height="wrap_content" />
</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:id="@+id/srl_sku"
......
......@@ -54,7 +54,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1"
android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size"
......
......@@ -54,7 +54,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1"
android:background="@drawable/shape_black_b2"
android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size"
......
......@@ -149,6 +149,7 @@
android:id="@+id/rc_ticket"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/gray_zhouyu"
android:padding="@dimen/all_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
......
......@@ -145,7 +145,6 @@
style="@style/button_positive_noradius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:onClick="@{onClickListener}"
android:text="确认" />
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener" />
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
android:orientation="vertical">
<include
android:id="@+id/info_title"
layout="@layout/title_pop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin_left"
android:background="@mipmap/tv_bg"
android:gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin_left"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_succeed" />
<TextView
style="@style/default_blacktext_bigstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="添加成功" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/white"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_no_margin_smallstyle"
android:text="会员手机" />
<TextView
android:id="@+id/vip_name"
style="@style/default_blacktext_no_margin_smallstyle"
android:layout_width="match_parent"
android:gravity="right"
android:text="111111"
android:textColor="@color/black_likui" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/white"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_no_margin_smallstyle"
android:text="会员手机" />
<TextView
android:id="@+id/vip_mobile"
style="@style/default_blacktext_no_margin_smallstyle"
android:layout_width="match_parent"
android:gravity="right"
android:text="111111"
android:textColor="@color/black_likui" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin_left"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/white"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_no_margin_smallstyle"
android:text="会员等级" />
<TextView
android:id="@+id/vip_level"
style="@style/default_blacktext_no_margin_smallstyle"
android:layout_width="match_parent"
android:gravity="right"
android:text=""
android:textColor="@color/black_likui" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<Button
android:id="@+id/vip_Sure"
style="@style/button_positive_noradius"
android:layout_alignParentBottom="true"
android:text="完成" />
<Button
android:id="@+id/vip_recharge"
style="@style/button_positive_white"
android:layout_alignParentBottom="true"
android:text="充值" />
<Button
android:id="@+id/vip_add"
style="@style/button_positive_white"
android:layout_alignParentBottom="true"
android:text="继续添加" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -275,7 +275,6 @@
android:layout_gravity="center_vertical"
android:background="@color/white"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="wrap_content"
......
......@@ -231,8 +231,6 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:layout_height="match_parent"
android:orientation="horizontal">
......
......@@ -202,8 +202,6 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:layout_height="match_parent"
android:orientation="horizontal">
......
......@@ -60,6 +60,7 @@
android:id="@+id/tv_goods_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_bounced_padding"
android:background="@drawable/frame_frame_zhouyu_bg"
android:padding="@dimen/dp_4"
android:text="规格"
......@@ -119,6 +120,8 @@
android:id="@+id/et_shop_Num"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_4"
android:layout_weight="1"
android:background="@drawable/selector_edit_frame_blue_background"
android:digits="1234567890"
......@@ -174,6 +177,8 @@
android:id="@+id/et_shop_Num_edit"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_4"
android:background="@drawable/selector_edit_frame_blue_background"
android:digits="1234567890"
android:ems="5"
......
......@@ -34,6 +34,7 @@
android:id="@+id/ll_shop_message"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/all_bounced_padding"
android:orientation="vertical"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintHorizontal_weight="1.5"
......@@ -77,15 +78,24 @@
android:layout_height="wrap_content"
android:text="8531651233213"/>
<TextView
android:id="@+id/tv_goods_size"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/frame_frame_zhouyu_bg"
android:padding="@dimen/dp_4"
android:text="规格"
android:textSize="@dimen/all_text_size_small"
/>
android:gravity="right"
android:layout_marginRight="@dimen/all_bounced_padding"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_goods_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/frame_frame_zhouyu_bg"
android:padding="@dimen/dp_4"
android:text="规格"
android:textSize="@dimen/all_text_size_small"
/>
</LinearLayout>
</LinearLayout>
......
......@@ -22,8 +22,8 @@
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_width="64dp"
android:layout_height="64dp"
app:failureImage="@mipmap/icon_goods_default"
app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" />
......@@ -42,7 +42,7 @@
<LinearLayout
android:layout_width="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_constraintTop_toBottomOf="@id/tv_name">
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"/>
</data>
<LinearLayout
android:id="@+id/cl_vip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/black_border_zhouyu_01"
android:drawableLeft="@mipmap/industry_market"
android:gravity="center"
android:maxEms="4"
android:maxLength="4"
android:padding="@dimen/all_padding"
android:singleLine="true"
android:text="超市"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/tv_item_select"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/black_border_zhouyu_02"
android:drawableLeft="@mipmap/industry_market"
android:gravity="center"
android:maxEms="4"
android:maxLength="4"
android:padding="@dimen/all_padding"
android:singleLine="true"
android:text="超市"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</LinearLayout>
</layout>
......@@ -21,8 +21,8 @@
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_width="80dp"
android:layout_height="80dp"
app:failureImage="@mipmap/icon_goods_default"
app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" />
......
......@@ -15,34 +15,39 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@mipmap/img_boss" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/padding_big"
android:layout_marginTop="@dimen/padding_big"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="vertical">
<TextView
android:id="@+id/user_name"
style="@style/default_blacktext_bigstyle"
android:id="@+id/user_mobile"
android:textSize="@dimen/all_text_size_small"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="张小萌" />
android:text="13311556556" />
<TextView
android:id="@+id/user_mobile"
style="@style/default_blacktext_smallstyle"
android:id="@+id/user_name"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13311556556" />
android:text="张小萌" />
</LinearLayout>
<LinearLayout
......@@ -71,7 +76,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="@dimen/detail_textview_size" />
android:textSize="@dimen/big_big_text_size" />
<TextView
android:layout_width="match_parent"
......
......@@ -9,8 +9,15 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_margin="@dimen/all_margin_left"
android:background="@mipmap/hd_default02"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -19,14 +26,14 @@
<TextView
android:id="@+id/vip_name"
style="@style/default_blacktext_bigstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="张小萌" />
<TextView
android:id="@+id/vip_mobile"
style="@style/default_blacktext_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13311556556" />
......
......@@ -5,16 +5,15 @@
<variable
name="onClickListener"
type="com.xingdata.zzdpos.util.OnClickListener" />
type="com.xingdata.zzdpos.util.OnClickListener"/>
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:orientation="horizontal">
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/up_down_line_white_bottom"
android:orientation="horizontal">
<ImageButton
......@@ -31,18 +30,14 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="标题"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout>
<LinearLayout
<data>
<import type="android.view.View" />
<variable
name="name"
type="String" />
<variable
name="price"
type="String" />
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="@color/white_caocao"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/ms_editor_type_gift_text1"
android:textColor="@color/black"
android:textSize="@dimen/big_text_size" />
<EditText
android:id="@+id/et_amt"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/transparent"
android:inputType="numberDecimal"
android:labelFor="@+id/et_amt"
android:saveEnabled="false"
android:textSize="@dimen/all_body_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/ms_editor_type_gift_text2"
android:textColor="@color/black"
android:textSize="@dimen/big_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/ms_editor_type_gift_text3"
android:textColor="@color/black"
android:textSize="@dimen/big_text_size" />
<EditText
android:id="@+id/et_add_amt"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/transparent"
android:inputType="numberDecimal"
android:labelFor="@+id/et_add_amt"
android:textSize="@dimen/all_body_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/ms_editor_type_gift_text2"
android:textColor="@color/black"
android:textSize="@dimen/big_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin">
<EditText
android:id="@+id/et_search"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1"
android:hint="@string/ms_editor_type_gift_search_hint"
android:inputType="text"
android:labelFor="@+id/et_search"
android:saveEnabled="false" />
<ImageButton
android:id="@+id/btn_scan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground"
android:src="@mipmap/but_sweep_yard" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_product"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="@{name.length()>0?View.VISIBLE:View.GONE }">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/tv_product_pic"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/all_margin"
app:placeholderImage="@mipmap/icon_goods_default" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_spacing"
android:orientation="vertical"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_product_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{@string/ms_editor_group_sku_name+name}" />
<TextView
android:id="@+id/tv_product_price"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:text="@{@string/ms_editor_group_sku_price+price}" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -69,7 +69,7 @@
<dimen name="dialog_button_width">190dp</dimen>
<!--提示对话框-->
<dimen name="prompt_dialog_width">300dp</dimen>
<dimen name="prompt_dialog_height">220dp</dimen>
<dimen name="prompt_dialog_height">200dp</dimen>
<dimen name="prompt_dialog_logo_size">48dp</dimen>
<!--商品页面-->
<integer name="fragment_store_product_item_span_count">4</integer>
......
......@@ -333,20 +333,20 @@
<string name="ms_editor_title">管理-营销计划</string>
<string name="ms_editor_setting">设置营销计划</string>
<string name="ms_editor_subtitle_info">基本信息</string>
<string name="ms_editor_name">计划名称</string>
<string name="ms_editor_name">计划名称:</string>
<string name="ms_editor_name_hint">请输入计划名称</string>
<string name="ms_editor_subtitle_time">时间信息</string>
<string name="ms_editor_time_more">更多设置</string>
<string name="ms_editor_date">起止时间:</string>
<string name="ms_editor_date_start">开始时间</string>
<string name="ms_editor_date_end">结束时间</string>
<string name="ms_editor_time">限定时段</string>
<string name="ms_editor_week">限定星期</string>
<string name="ms_editor_date_start">开始时间:</string>
<string name="ms_editor_date_end">结束时间:</string>
<string name="ms_editor_time">限定时段:</string>
<string name="ms_editor_week">限定星期:</string>
<string name="ms_editor_subtitle_ms">活动信息</string>
<string name="ms_editor_type">营销方式:</string>
<string name="ms_editor_group">营销主体</string>
<string name="ms_editor_user">营销对象</string>
<string name="ms_editor_area">营销范围</string>
<string name="ms_editor_group">营销主体:</string>
<string name="ms_editor_user">营销对象:</string>
<string name="ms_editor_area">营销范围:</string>
<string name="ms_editor_buy"></string>
<string name="ms_editor_group_all_hint">任意商品</string>
<string name="ms_editor_group_skugrp_hint">品类下的任意商品</string>
......@@ -355,7 +355,7 @@
<string name="ms_editor_group_sku_name">品名:</string>
<string name="ms_editor_group_sku_price">售价:</string>
<string name="ms_editor_type_dis_text1">享受</string>
<string name="ms_editor_type_dis_hint">折扣比例</string>
<string name="ms_editor_type_dis_hint">折扣比例:</string>
<string name="ms_editor_type_dis_text2">折优惠</string>
<string name="ms_editor_type_promotion_text1">按选定商品的促销价销售</string>
<string name="ms_editor_type_promotion_text2">促销价为商品维护中的促销价</string>
......@@ -366,13 +366,13 @@
<string name="ms_editor_type_money_off_text2"></string>
<string name="ms_editor_type_money_off_text3"></string>
<string name="ms_editor_type_gift_text1"></string>
<string name="ms_editor_type_gift_text2">,加</string>
<string name="ms_editor_type_gift_text3">元换购</string>
<string name="ms_editor_type_gift_text2"></string>
<string name="ms_editor_type_gift_text3"></string>
<string name="ms_editor_type_gift_text4">1件</string>
<string name="ms_editor_type_gift_hint">条码:请扫码或输入条码</string>
<string name="ms_editor_type_gift_name">品名:</string>
<string name="ms_editor_type_gift_price">售价:</string>
<string name="ms_editor_type_gift_search_hint">扫内包装商品条码</string>
<string name="ms_editor_type_gift_search_hint">输入商品名称/条码</string>
<string name="ms_editor_date_format">%s年%s月%s日</string>
<string name="ms_editor_time_format">%s:%s</string>
......@@ -444,6 +444,7 @@
<string name="tv_ticket_count"> 共 %s 种优惠券</string>
<!--商品组合-->
<string name="bale_select_title">请选择商品</string>
<string name="bale_no_seach">没有组合商品 ~</string>
<string name="bale_title">新增优惠券</string>
<string name="tv_bale_count"> 共 %s 个组合</string>
<string name="tv_bale_edit_count"> 共 %s 件</string>
......@@ -581,6 +582,7 @@
<!--支付里的Vip-->
<string name="settle_vip_search_hint">请输入会员手机号</string>
<string name="settle_vip_search_empty">请输入会员手机号进行搜索~</string>
<string name="settle_vip_search_empty_no_seach">没有搜到此会员</string>
<string name="settle_vip_search_none">没有搜到此会员~</string>
<string name="settle_vip_none">不需要会员</string>
......@@ -708,7 +710,7 @@
<string name="sku_subtitle_price">调整价格</string>
<string name="sku_price1">售价:</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_point1">消费每满</string>
<string name="sku_point2">元等于1积分</string>
......@@ -727,11 +729,10 @@
<string name="sku_update">编辑商品</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_empty_hint">没有找到对应商品~</string>
</resources>
......@@ -63,6 +63,14 @@
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/all_text_size</item>
</style>
<style name="default_blacktext_no_margin_smallstyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">35dp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:singleLine">true</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/all_text_size</item>
</style>
<style name="default_blacktext_margin_smallstyle">
<item name="android:layout_width">wrap_content</item>
......@@ -307,9 +315,34 @@
<style name="button_positive_noradius">
<item name="android:background">@drawable/selector_gradient_red_button_background_noradius </item>
<item name="android:layout_height">@dimen/button3_height</item>
<item name="android:layout_width">match_parent</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:layout_marginLeft">@dimen/all_margin_left</item>
<item name="android:layout_marginRight">@dimen/all_margin_left</item>
<item name="android:layout_marginBottom">@dimen/all_margin_left</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_white">
<item name="android:background">@drawable/shape_red_layout </item>
<item name="android:layout_height">@dimen/button3_height</item>
<item name="android:layout_width">match_parent</item>
<item name="android:textColor">@color/deep_red</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:layout_marginLeft">@dimen/all_margin_left</item>
<item name="android:layout_marginRight">@dimen/all_margin_left</item>
<item name="android:layout_marginBottom">@dimen/all_margin_left</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_red">
<item name="android:background">@drawable/selector_gradient_red_button_background_noradius </item>
<item name="android:layout_height">@dimen/button3_height</item>
<item name="android:textColor">@color/black</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:layout_margin">@dimen/all_margin_left</item>
<item name="android:focusableInTouchMode">false</item>
</style>
......@@ -405,7 +438,7 @@
<item name="android:saveEnabled">false</item>
<item name="android:background">@drawable/selector_white_background_stroke</item>
<item name="android:layout_width">0dp</item>
<item name="android:textSize">@dimen/small_text_size</item>
<item name="android:textSize">@dimen/all_body_size</item>
</style>
<style name="all_edittext_14sp_style">
<item name="android:padding">@dimen/dialog_padding</item>
......
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