Commit d5feb9e3 authored by 王海's avatar 王海

Merge remote-tracking branch 'origin/master'

parents 20ce263a 8e8a349a
......@@ -2,8 +2,9 @@
<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://D:\Work\Android\AndroidProject\XingData\TangKuPos\TangKuPos2.iml" filepath="D:\Work\Android\AndroidProject\XingData\TangKuPos\TangKuPos2.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
......
......@@ -118,13 +118,13 @@ public class App extends Application {
*/
private void initFragment() {
// Fragmentation.builder().stackViewMode(Fragmentation.BUBBLE).debug(BuildConfig.DEBUG)
// .handleException(e -> {
// }).install();
//正式版本
Fragmentation.builder().stackViewMode(Fragmentation.BUBBLE)
Fragmentation.builder().stackViewMode(Fragmentation.BUBBLE).debug(BuildConfig.DEBUG)
.handleException(e -> {
}).install();
//正式版本
// Fragmentation.builder().stackViewMode(Fragmentation.BUBBLE)
// .handleException(e -> {
// }).install();
}
/**
......
......@@ -581,4 +581,9 @@ public class C {
public static final int ADD_SKU = 7;
public static final int SKU_EDITOR = 8;
}
public final class PAY_STATE {
public static final String PAYING = "0098";
public static final String SUCC = "0000";
}
}
......@@ -52,6 +52,7 @@ public abstract class BaseFragment<P extends BasePresenter, B extends ViewDataBi
}
}
protected interface titleBar {
int getTitleText();
}
......
......@@ -45,13 +45,13 @@ public class LoadingDialog extends BaseDialog<BasePresenter, DialogLoadingBindin
super.show(activity, 20);
}
public void show(BaseActivity activity, int s) {
super.show(activity, s);
}
@Override
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);
// if (null != disp && (!disp.isDisposed())) {
// disp.dispose();
// }
}
}
......@@ -13,6 +13,7 @@ import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentCasherBinding;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.ui.manage.manageMenu.ManageMenuActivity;
......@@ -28,12 +29,17 @@ import com.xingdata.zzdpos.util.SystemUtil;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBinding> {
private MenuRecyclerAdapter mMenuRecyclerAdapter;
private List<Integer> integers;
private Bundle bundle;
private Intent intent;
private int[] ints = {101, 102, 103, 104, 105, 106};
private int[] intsB = {101, 102, 104, 105, 106};
@Override
public int getLayoutId() {
......@@ -42,27 +48,63 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
@Override
public void initView() {
if (SystemUtil.checkDeviceHasNavigationBar(getActivity())){
LinearLayout.LayoutParams cp = new LinearLayout.LayoutParams( mViewBinding.fragmentCasherRecycler.getLayoutParams());
switch ((int) LoginPresenter.loginReturnBean.getOperLevel()) {
case 1:
ints = intsB;
break;
case 2:
break;
case 3:
break;
}
if (SystemUtil.checkDeviceHasNavigationBar(getActivity())) {
LinearLayout.LayoutParams cp = new LinearLayout.LayoutParams(mViewBinding.fragmentCasherRecycler.getLayoutParams());
cp.setMargins(0, 0, 0, 0);
mViewBinding.fragmentCasherRecycler.setLayoutParams(cp);
}
io.reactivex.Observable.create((ObservableOnSubscribe<Integer>) e -> {
for (int i : ints) {
e.onNext(i);
}
e.onComplete();
}).doFinally(() -> {
mViewBinding.fragmentCasherRecycler.setLayoutManager(new GridLayoutManager(getActivity(),
2));
}).subscribe(new Observer<Integer>() {
private List<Integer> integers;
@Override
public void onSubscribe(Disposable d) {
integers = new ArrayList<>();
integers.add(101);
integers.add(102);
integers.add(103);
integers.add(104);
integers.add(105);
integers.add(106);
}
@Override
public void onNext(Integer integer) {
integers.add(integer);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
mMenuRecyclerAdapter = new MenuRecyclerAdapter(getActivity(), integers);
mMenuRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentCasherRecycler);
mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyMenuItemDecoration
(getActivity(), 2, getResources().getColor(R.color.golden_yuji)));
}
});
mMenuRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
......
......@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.ui.manage.manageMenu;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
......@@ -11,6 +12,8 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.ui.manage.bale.BaleActivity;
import com.xingdata.zzdpos.ui.manage.inventory.InventoryActivity;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectActivity;
......@@ -18,20 +21,38 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.manage.user.UserActivity;
import com.xingdata.zzdpos.ui.marketing.marketingMenu.adapter.MarketingMenuAdapter;
import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
public class ManageMenuActivity extends AppCompatActivity {
MarketingMenuAdapter marketingMenuAdapter;
List<Integer> list = new ArrayList<>();
private int[] ints = {C.MENU.MENU_MANAGER_OPER, C.MENU.MENU_MANAGER_GOODS, C.MENU.MENU_MANAGER_BALE, C.MENU.MENU_MANAGER_REPLENISHMENT, C.MENU.MENU_MANAGER_OTHER, C.MENU.MENU_MANAGER_INVENTORY};
private int[] intsB = {C.MENU.MENU_MANAGER_OTHER, C.MENU.MENU_MANAGER_INVENTORY};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_marketing_menu);
switch ((int) LoginPresenter.loginReturnBean.getOperLevel()) {
case 1:
ints = intsB;
break;
case 2:
break;
case 3:
break;
}
ActivityMarketingMenuBinding mViewBinding = DataBindingUtil.setContentView(
this, R.layout.activity_marketing_menu);
mViewBinding.icTitle.tvTitle.setText("管理");
......@@ -41,19 +62,42 @@ public class ManageMenuActivity extends AppCompatActivity {
ActivityUtils.finishActivity(ManageMenuActivity.class);
}
});
list.add(C.MENU.MENU_MANAGER_OPER);
list.add(C.MENU.MENU_MANAGER_GOODS);
list.add(C.MENU.MENU_MANAGER_BALE);
list.add(C.MENU.MENU_MANAGER_REPLENISHMENT);
list.add(C.MENU.MENU_MANAGER_OTHER);
list.add(C.MENU.MENU_MANAGER_INVENTORY);
marketingMenuAdapter = new MarketingMenuAdapter(list);
mViewBinding.rvMenu.setAdapter(marketingMenuAdapter);
io.reactivex.Observable.create((ObservableOnSubscribe<Integer>) e -> {
for (int i : ints) {
e.onNext(i);
}
e.onComplete();
}).doFinally(() -> {
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvMenu.setLayoutManager(linearLayoutManager);
}).subscribe(new Observer<Integer>() {
private List<Integer> integers;
@Override
public void onSubscribe(Disposable d) {
integers = new ArrayList<>();
}
@Override
public void onNext(Integer integer) {
integers.add(integer);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
marketingMenuAdapter = new MarketingMenuAdapter(integers);
mViewBinding.rvMenu.setAdapter(marketingMenuAdapter);
}
});
marketingMenuAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
......
......@@ -4,29 +4,20 @@ package com.xingdata.zzdpos.ui.manage.user.fragment;
* Created by JM_DEV on 2017/12/21.
*/
import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentUserListBinding;
import com.xingdata.zzdpos.databinding.FragmentVipListBinding;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.manage.user.UserPresenter;
import com.xingdata.zzdpos.ui.manage.user.adapter.UserListAdapter;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.ui.vip.adapter.VipListAdapter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
......@@ -56,8 +47,12 @@ public class UserListFragment extends BaseFragment<UserPresenter, FragmentUserLi
});
adapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.userRecyclerView);
adapter.setEnableLoadMore(false);
mViewBinding.searchLayout.onBack.setOnClickListener(view -> {
mViewBinding.titleLayout.tvTitle.setText("店员管理");
mViewBinding.titleLayout.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
getActivity().finish();
}
});
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
......@@ -72,9 +67,9 @@ public class UserListFragment extends BaseFragment<UserPresenter, FragmentUserLi
}
mPresenter.queryUser( mViewBinding.searchLayout.serchEditText.getText().toString().trim());
break;
case R.id.onBack:
getActivity().finish();
break;
// case R.id.onBack:
// getActivity().finish();
// break;
}
});
onRefresh();
......
......@@ -55,7 +55,6 @@ public class RechargeRuleEditFragment extends BaseFragment<RechargeRulePresenter
} else {
mViewBinding.ruleNameLayout.setVisibility(View.GONE);
mViewBinding.infoTitle.tvTitle.setText("新增充值优惠");
mViewBinding.ruleNameLayout.setVisibility(View.VISIBLE);
((RadioButton)mViewBinding.ruleState.getChildAt(0)).setChecked(true);
}
......
......@@ -55,6 +55,10 @@ public class VipLevelEditFragment extends BaseFragment<LevelPresenter, FragmentV
ToastUtils.showShort("折扣不能为空");
return;
}
if (Integer.parseInt(mViewBinding.levelDiscont.getText().toString())>100||Integer.parseInt(mViewBinding.levelDiscont.getText().toString())<1) {
ToastUtils.showShort("折扣必须为1到100之间");
return;
}
if (mViewBinding.updateDay.length() == 0) {
ToastUtils.showShort("最近多少天不能为空");
return;
......
......@@ -4,6 +4,7 @@ import android.content.Intent;
import android.view.MotionEvent;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
......@@ -12,8 +13,7 @@ import com.xingdata.zzdpos.ui.payment.fragment.PaymentFragment;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.util.Global;
public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaymentBinding>
implements PaymentContract.View {
public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaymentBinding> implements PaymentContract.View {
private PaymentFragment mPaymentFragment = new PaymentFragment();
......@@ -29,6 +29,11 @@ public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaym
}
@Override
public void showMsg(String msg) {
ToastUtils.showShort(msg);
}
@Override
public void showSettle(Long amt) {
Intent intent = new Intent(PaymentActivity.this, SettleActivity.class);
......
......@@ -8,6 +8,13 @@ interface PaymentContract {
interface View extends BaseView {
/**
* 显示信息
*
* @param msg 信息
*/
void showMsg(String msg);
/**
* 显示结算页面
*/
......
......@@ -8,6 +8,10 @@ public class PaymentPresenter extends PaymentContract.Presenter {
@Override
public void clickSettle(Long amt) {
if (amt > 99999999999L) {
mView.showMsg("金额不合法,请重新输入");
} else {
mView.showSettle(amt);
}
}
}
......@@ -173,7 +173,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
@Override
public void showLoadingDialog() {
mLoadingDialog.show(this);
mLoadingDialog.show(this, 60);
}
@Override
......
......@@ -257,8 +257,10 @@ interface SettleContract {
/**
* 支付中页面 - 查看支付状态
*
* @param payType 支付类型
*/
public abstract void checkPayState();
public abstract void checkPayState(int payType);
/**
* 支付结果页面 - 完成订单
......
......@@ -2,7 +2,6 @@ package com.xingdata.zzdpos.ui.settle;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.C;
......@@ -259,10 +258,10 @@ public class SettlePresenter extends SettleContract.Presenter {
response -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) {
case "0000":
case C.PAY_STATE.SUCC:
subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, C.PAY_CHANNEL.WECHAT)).doFinally(() -> mView.dismissLoadingDialog())));
break;
case "0098":
case C.PAY_STATE.PAYING:
mView.showPayingDialog(C.PAY_CHANNEL.WECHAT, r1);
break;
default:
......@@ -302,17 +301,17 @@ public class SettlePresenter extends SettleContract.Presenter {
}
@Override
public void checkPayState() {
public void checkPayState(int payType) {
mView.showLoadingDialog();
JniFactory.Settle.query()
.doFinally(() -> mView.dismissLoadingDialog())
.subscribe(s -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(s.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) {
case "0000":
subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, C.PAY_CHANNEL.ALI)).doFinally(() -> mView.dismissLoadingDialog())));
case C.PAY_STATE.SUCC:
subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, payType)).doFinally(() -> mView.dismissLoadingDialog())));
break;
case "0098":
case C.PAY_STATE.PAYING:
mView.showMsg("交易处理中");
break;
default:
......@@ -356,15 +355,11 @@ public class SettlePresenter extends SettleContract.Presenter {
* 提交订单
*/
private Observable<String> commitOrder() {
if (StringUtils.isEmpty(mSaleorder.getOrderNo())) {
return ApiFactory.Saleorder.addOrderMis(createSaleorderParam())
.doAfterNext(s -> {
mSaleorder.setOrderNo(s);
mView.changeLockState(true);
});
} else {
return Observable.just(mSaleorder.getOrderNo());
}
}
/**
......
......@@ -26,8 +26,7 @@ public class PayingDialog extends BaseDialog<SettlePresenter, DialogSettlePaying
@Override
public void initView() {
mViewBinding.tvCheck.setOnClickListener(view -> mPresenter.checkPayState());
mViewBinding.tvCheck.setOnClickListener(view -> mPresenter.checkPayState(mType));
switch (mType) {
case C.PAY_CHANNEL.ALI:
mViewBinding.ivLogo.setImageResource(R.mipmap.pay_alipay);
......
......@@ -18,13 +18,19 @@ public class PayResultFragment extends BaseFragment<SettlePresenter, FragmentPay
@Override
public void initView() {
mViewBinding.setPayResult(mResult);
if (mSaleorder == null) {
mViewBinding.setPayResult(false);
return;
} else {
mViewBinding.tvCount.setText(mSaleorder.getGoodsCnt());
mViewBinding.tvOrderAmt.setText(mSaleorder.getPayAmt());
if (mResult) {
mViewBinding.tvType.setText(mSaleorder.getPayChannel());
mViewBinding.tvTime.setText(mSaleorder.getOrderTime());
}
}
mViewBinding.setPayResult(mResult);
mViewBinding.ivResult.setImageResource(mResult ? R.mipmap.ic_succeed : R.mipmap.ic_fail);
mViewBinding.btnConfirm.setOnClickListener(view -> {
......
......@@ -28,17 +28,17 @@ public class StatisticsRechargeGroupAdapter extends BaseSectionQuickAdapter<VipR
@Override
protected void convertHead(com.chad.library.adapter.base.BaseViewHolder helper, VipRechargeOrder item) {
helper.setText(R.id.item_tv,item.header);
helper.setText(R.id.item_tv, item.header);
}
@Override
protected void convert(BaseViewHolder helper, VipRechargeOrder item) {
helper.setText(R.id.tv_left_top,item.getUserName());
helper.setText(R.id.tv_left_bottom,com.blankj.utilcode.util.TimeUtils.millis2String(item.getCreateTime(),new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern)));
helper.setText(R.id.tv_right_top,"+"+ ConvertUtil.fenToYuan(item.getCardAmtPay(),false));
((ImageView)helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_filling);
helper.setText(R.id.tv_left_top, item.getUserName());
helper.setText(R.id.tv_left_bottom, com.blankj.utilcode.util.TimeUtils.millis2String(item.getCreateTime(), new SimpleDateFormat(StringUtil.mmddhhmmmDatePattern)));
helper.setText(R.id.tv_right_top, "+" + ConvertUtil.fenToYuan(item.getCardAmtPay(), false));
((ImageView) helper.getView(R.id.img_left)).setImageResource(R.mipmap.ic_filling);
}
......
......@@ -32,19 +32,16 @@ public class VipEditMenuDialog extends BaseSheetDialog<VipPresenter, DialogVipMe
switch (view.getId()) {
//編輯會員
case R.id.editVip:
mPresenter.vipInfoEditFragment = new VipInfoEditFragment();
mPresenter.vipInfoEditFragment.setVip(mVip);
((BaseActivity) getActivity()).start(mPresenter.vipInfoEditFragment);
break;
//充值記錄
case R.id.rechargeList:
mPresenter.vipRechargeListFragment = new VipRechargeListFragment();
mPresenter.vipRechargeListFragment.setVip(mVip);
((BaseActivity) getActivity()).start(mPresenter.vipRechargeListFragment);
break;
//優惠券詳情
case R.id.voucherDetails:
mPresenter.vipMscardListFragment = new VipTruleListFragment();
mPresenter.vipMscardListFragment.setVip(mVip);
((BaseActivity) getActivity()).start(mPresenter.vipMscardListFragment);
break;
......
......@@ -35,18 +35,19 @@ public class VipAddSucceedFragment extends BaseFragment<VipPresenter, FragmentVi
} else {
mViewBinding.vipLevel.setText(mVip.getVipLevelName() + " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
}
//继续添加
mViewBinding.vipAdd.setOnClickListener(view -> {
this.pop();
mPresenter.vipInfoEditFragment.setVip(null);
startWithPop(mPresenter.vipInfoEditFragment);
});
//充值
mViewBinding.vipRecharge.setOnClickListener(view -> {
this.pop();
mPresenter.vipRechargeFragment.setVip(mVip);
start(mPresenter.vipRechargeFragment);
startWithPop(mPresenter.vipRechargeFragment);
});
mViewBinding.vipSure.setOnClickListener(view -> {
pop();
mPresenter.vipListFragment.updateVipSus(null);
});
......
......@@ -121,6 +121,7 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
mVip.setVipSex(Byte.parseByte(mViewBinding.vipSex.findViewById(sexId).getTag().toString()));
}
mPresenter.addVip(mVip);
pop();
break;
}
});
......
......@@ -26,6 +26,7 @@ import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.ui.vip.adapter.VipListAdapter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
......@@ -52,9 +53,12 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
mViewBinding.vipRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.vipRecyclerView.setAdapter(vipListAdapter);
if (vipState != 0) {
mViewBinding.titleLayout.tvTitle.setText("会员充值");
mViewBinding.vipCountAddTodayTitle.setText("充值金额");
mViewBinding.vipCountTitle.setText("今日充值");
mViewBinding.addVipLinearLayout.setVisibility(View.GONE);
}else {
mViewBinding.titleLayout.tvTitle.setText("会员管理");
}
mViewBinding.vipRefresh.setOnRefreshListener(this::onRefresh);
vipListAdapter.setOnItemClickListener((adapter, view, position) -> {
......@@ -63,8 +67,15 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
vipListAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.vipRecyclerView);
vipListAdapter.setEnableLoadMore(true);
mViewBinding.titleSearch.onBack.setOnClickListener(view -> {
// mViewBinding.titleSearch.onBack.setOnClickListener(view -> {
// getActivity().finish();
// });
mViewBinding.titleLayout.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
getActivity().finish();
}
});
scanFragment.setOnScanCompletedListener(new ScanFragment.OnScanCompletedListener() {
@Override
......@@ -91,7 +102,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
case R.id.addVip:
if (mPresenter.levels== null || mPresenter.levels.size() == 0) {
if (mPresenter.levels == null || mPresenter.levels.size() == 0) {
ToastUtils.showShort("缺少会员等级");
return;
}
......@@ -165,7 +176,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
public void getVipLevelSus(Pager<Level> levelPager) {
if ( mViewBinding.vipLevelR.getChildCount()!=0){
if (mViewBinding.vipLevelR.getChildCount() != 0) {
mViewBinding.vipLevelR.removeAllViews();
}
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
......@@ -193,7 +204,7 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
mPresenter.levels.addAll(levelPager.getList());
Level level = new Level();
level.setVipLevelName("超级会员");
level.setVipDefDiscount(mPresenter.levels.get(mPresenter.levels.size()-1).getVipDefDiscount());
level.setVipDefDiscount(mPresenter.levels.get(mPresenter.levels.size() - 1).getVipDefDiscount());
mPresenter.levels.add(level);
}
......@@ -231,15 +242,15 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
if (vip != null) {
if (vipState == 0) {
mPresenter.vipInfoFragment.setVip(vip);
((BaseActivity) getActivity()).start(mPresenter.vipInfoFragment);
start(mPresenter.vipInfoFragment);
} else {
mPresenter.vipInfoFragment.setVip(vip);
((BaseActivity) getActivity()).start(mPresenter.vipRechargeFragment);
start(mPresenter.vipRechargeFragment);
}
} else {
mPresenter.vipInfoEditFragment.setVip(null);
((BaseActivity) getActivity()).start(mPresenter.vipInfoEditFragment);
start(mPresenter.vipInfoEditFragment);
}
}
......@@ -261,9 +272,12 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
pageNumber = 0;
mPresenter.getVipLevel(pageNumber, 200);
mPresenter.getVipNumber();
if (mPresenter.vipInfoEditFragment.isHidden()) {
mPresenter.vipInfoEditFragment.pop();
}
}
public void setVipState(int vipState) {
this.vipState = vipState;
}
......
......@@ -57,6 +57,7 @@ public class VipRechargeFragment extends BaseFragment<VipPresenter, FragmentVipR
@Override
public void initView() {
setMoney("0","0");
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
mViewBinding.vipMobile.setText(String.valueOf(mVip.getVipMobile()));
mViewBinding.vipName.setText(String.valueOf(mVip.getVipName()));
......@@ -120,6 +121,7 @@ public class VipRechargeFragment extends BaseFragment<VipPresenter, FragmentVipR
@SuppressLint("ResourceAsColor")
public void getMscardSus(Pager<Mscard> mscardPager) {
mscards.clear();
mscards.addAll(mscardPager.getList());
......@@ -167,8 +169,11 @@ public class VipRechargeFragment extends BaseFragment<VipPresenter, FragmentVipR
@Override
public void afterTextChanged(Editable editable) {
if (mViewBinding.stealMoney.getText().length() == 0)
if (mViewBinding.stealMoney.getText().length() == 0){
setMoney("0","0");
return;
}
Mscard mscard = mPresenter.getMaxRechange(mscards, ConvertUtil.yuanToFen(mViewBinding.stealMoney.getText().toString()));
String strSend = "0";
if (mscard == null) {
......
......@@ -128,7 +128,7 @@ public class MyMenuItemDecoration extends RecyclerView.ItemDecoration {
// top = child.getBottom() + params.bottomMargin;
// bottom = top + mDividerHight;
// } else {
if (i/size!=(parent.getAdapter().getItemCount()/size-1)){
if (i/size!=(parent.getAdapter().getItemCount()+(int)(size*0.5+0.5))/size-1){
top = child.getBottom() + params.bottomMargin;
bottom = top + mDividerHight;
}
......
......@@ -58,7 +58,7 @@ public final class SystemUtil {
}
}
// return deviceSN;
return "54849689";
return "5484965656";
}
/**
* 获取应用名称
......
......@@ -32,10 +32,7 @@
android:text="基本信息" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -73,10 +70,7 @@
android:enabled="false" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -126,10 +120,7 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -145,10 +136,7 @@
android:text="优惠规则" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -182,10 +170,7 @@
android:text="元" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -219,10 +204,7 @@
android:text="元" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -246,11 +228,7 @@
android:gravity="center"
android:onClick="@{onClickListener}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -275,14 +253,12 @@
android:onClick="@{onClickListener}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_margin_left"
android:orientation="horizontal">
<Button
......
......@@ -25,12 +25,18 @@
android:layout_height="match_parent" />
</LinearLayout>
<include layout="@layout/line_layout" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_margin_left"></View>
<include layout="@layout/line_layout" />
<LinearLayout
android:id="@+id/addVipLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_height="58dp"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
......@@ -38,7 +44,8 @@
<LinearLayout
android:id="@+id/addRule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:onClick="@{onClickListener}"
android:orientation="horizontal">
......@@ -47,7 +54,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:background="@mipmap/add_bg" />
android:background="@mipmap/add_bg"
android:drawablePadding="@dimen/all_spacing" />
<TextView
style="@style/default_blacktext_bigstyle"
......@@ -58,11 +66,7 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1" />
<include layout="@layout/line_layout" />
<RelativeLayout
......
......@@ -38,10 +38,7 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
style="@style/default_blacktext_margin_16_sp_style"
android:text="姓名" />
<TextView
......@@ -54,10 +51,7 @@
android:textColor="@color/black_likui" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -66,10 +60,7 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
style="@style/default_blacktext_margin_16_sp_style"
android:text="帐号" />
<TextView
......@@ -87,10 +78,7 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
......@@ -101,9 +89,7 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
android:layout_height="wrap_content"
style="@style/default_blacktext_margin_16_sp_style"
android:text="级别" />
<TextView
......@@ -116,15 +102,12 @@
android:textColor="@color/gray_huanggai" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_margin_left"
android:orientation="horizontal">
<Button
......@@ -133,7 +116,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="15dp"
android:onClick="@{onClickListener}"
android:text="确认" />
......
......@@ -17,16 +17,15 @@
<include
android:id="@+id/info_title"
layout="@layout/title_pop" />
<View
android:layout_marginTop="@dimen/all_margin"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -48,7 +47,7 @@
<EditText
android:id="@+id/user_name"
style="@style/dialog_edit"
style="@style/all_edittext_14sp_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -56,11 +55,7 @@
android:hint="请输入姓名" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
android:layout_width="match_parent"
......@@ -78,31 +73,27 @@
<EditText
android:id="@+id/user_phone"
android:digits="0123456789"
android:inputType="phone"
style="@style/dialog_edit"
android:maxLength="11"
style="@style/all_edittext_14sp_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="请输入手机号" />
android:digits="0123456789"
android:hint="请输入手机号"
android:inputType="phone"
android:maxLength="11" />
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@mipmap/camera" />
android:layout_margin="@dimen/all_margin_left"
android:background="@mipmap/img_boss" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
android:layout_width="match_parent"
......@@ -119,32 +110,28 @@
<TextView
android:id="@+id/user_Level"
android:layout_marginRight="@dimen/all_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/sp_12"
android:layout_marginRight="@dimen/all_margin"
android:drawableRight="@mipmap/ic_expand"
android:onClick="@{onClickListener}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_margin_left"
android:orientation="horizontal">
<Button
android:id="@+id/onSure"
android:layout_alignParentBottom="true"
style="@style/button_positive_noradius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:onClick="@{onClickListener}"
android:text="确认" />
......
......@@ -11,13 +11,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/title_layout"
layout="@layout/title" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:background="@drawable/up_down_line_white_bottom"
android:orientation="horizontal">
<include
......@@ -26,7 +30,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:id="@+id/userSearch"
style="@style/textView_body_small"
......@@ -35,15 +38,8 @@
android:gravity="center"
android:onClick="@{onClickListener}"
android:text="搜索" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -96,11 +92,18 @@
android:textStyle="bold" />
</LinearLayout>
<include layout="@layout/line_layout" />
<View
android:layout_width="wrap_content"
android:layout_height="@dimen/all_margin_left"></View>
<include layout="@layout/line_layout" />
<LinearLayout
android:id="@+id/addVipLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_height="58dp"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
......@@ -108,7 +111,8 @@
<LinearLayout
android:id="@+id/addUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:onClick="@{onClickListener}"
android:orientation="horizontal">
......@@ -128,11 +132,7 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener" />
......@@ -111,7 +113,8 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_margin_left">
<LinearLayout
android:layout_width="match_parent"
......@@ -123,6 +126,7 @@
android:id="@+id/vip_Sure"
style="@style/button_positive_noradius"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/all_margin_left"
android:text="完成" />
<Button
......
......@@ -19,10 +19,15 @@
android:id="@+id/info_title"
layout="@layout/title_pop" />
<View
android:layout_width="wrap_content"
android:layout_height="@dimen/all_margin_left" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white"
android:orientation="horizontal">
......@@ -31,7 +36,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/all_margin"
android:background="@mipmap/mk_grade01" />
android:background="@mipmap/iv_vip" />
<LinearLayout
android:layout_width="match_parent"
......@@ -67,15 +72,17 @@
android:text="@string/vip_info_discount" />
</LinearLayout>
<include layout="@layout/line_layout" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg"></View>
android:layout_width="wrap_content"
android:layout_height="@dimen/all_margin_left" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -166,11 +173,7 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/line_bg" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
......@@ -187,17 +190,13 @@
<TextView
android:id="@+id/vipLevel"
style="@style/default_blacktext_nopadding_smallstyle"
android:textSize="@dimen/all_text_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
android:layout_width="match_parent"
......@@ -215,17 +214,11 @@
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/all_text_size"
/>
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
android:layout_width="match_parent"
......@@ -245,10 +238,7 @@
android:layout_height="wrap_content" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
......@@ -264,10 +254,7 @@
android:text="地区" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<include layout="@layout/line_layout_margin" />
<LinearLayout
android:layout_width="match_parent"
......@@ -275,13 +262,14 @@
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"
android:text="详细地址" />
</LinearLayout>
<include layout="@layout/line_layout" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -103,7 +103,7 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:layout_gravity="center_vertical"
android:background="@mipmap/hd_default02" />
android:background="@mipmap/iv_vip" />
</LinearLayout>
<View
......@@ -232,6 +232,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/all_margin_left"
android:orientation="horizontal">
<Button
......
......@@ -34,8 +34,8 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
android:layout_height="0.5dp"
android:background="@color/gray_huanggai" />
<LinearLayout
android:layout_width="match_parent"
......@@ -53,13 +53,19 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:background="@mipmap/point" />
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:text="等级名称" />
<EditText
......@@ -74,20 +80,28 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_height="0.5dp"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/line_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:background="@mipmap/point" />
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:maxLength="11"
android:text="折扣设置" />
......@@ -129,7 +143,7 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_height="0.5dp"
android:background="@color/line_bg" />
<LinearLayout
......@@ -148,6 +162,7 @@
<EditText
android:id="@+id/update_day"
style="@style/dialog_edit"
android:text=""
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -165,20 +180,29 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_height="0.5dp"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:background="@color/line_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:background="@mipmap/point" />
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:text="消费金额" />
<EditText
......@@ -203,7 +227,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
android:layout_marginBottom="@dimen/all_margin_left">
<Button
android:id="@+id/onSure"
......
......@@ -29,7 +29,7 @@
<LinearLayout
android:id="@+id/addVipLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="58dp"
android:layout_marginTop="10dp"
android:background="@color/white"
android:gravity="center"
......
......@@ -5,7 +5,7 @@
<variable
name="onClickListener"
type="android.view.View.OnClickListener"/>
type="android.view.View.OnClickListener" />
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -13,10 +13,11 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title" android:id="@+id/title_layout"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
android:background="@drawable/up_down_line_white_bottom"
android:orientation="horizontal">
<include
......@@ -24,27 +25,25 @@
layout="@layout/title_search"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"/>
android:layout_weight="1" />
<ImageView
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@mipmap/swipe_card_bg"/>
android:background="@mipmap/swipe_card_bg" />
<ImageView
android:id="@+id/onScan"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@mipmap/scan_bg"
android:onClick="@{onClickListener}"/>
android:onClick="@{onClickListener}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1"/>
android:layout_width="wrap_content"
android:layout_height="@dimen/all_margin_left"></View>
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -59,7 +58,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="本店会员"/>
android:text="本店会员" />
<TextView
android:id="@+id/vip_count_add_today_title"
......@@ -68,7 +67,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="今日新增"/>
android:text="今日新增" />
</LinearLayout>
<LinearLayout
......@@ -85,7 +84,7 @@
android:layout_weight="1"
android:gravity="center"
android:textSize="22sp"
android:textStyle="bold"/>
android:textStyle="bold" />
<TextView
android:id="@+id/vip_count_add_today"
......@@ -95,22 +94,28 @@
android:layout_weight="1"
android:gravity="center"
android:textSize="22sp"
android:textStyle="bold"/>
android:textStyle="bold" />
</LinearLayout>
<include layout="@layout/line_layout" />
<LinearLayout
android:id="@+id/addVipLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="58dp"
android:layout_marginTop="10dp"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
<include layout="@layout/line_layout" />
<LinearLayout
android:id="@+id/addVip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:onClick="@{onClickListener}"
android:orientation="horizontal">
......@@ -119,7 +124,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:background="@mipmap/add_bg"/>
android:background="@mipmap/add_bg" />
<TextView
style="@style/default_blacktext_bigstyle"
......@@ -127,15 +132,11 @@
android:layout_height="wrap_content"
android:text="添加会员"
android:textColor="@color/deep_red"
android:textSize="22sp"/>
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1"/>
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
......@@ -170,7 +171,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/vipRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</LinearLayout>
......
......@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/all_margin"
android:background="@mipmap/mk_grade01" />
android:background="@mipmap/iv_vip" />
<LinearLayout
android:layout_width="match_parent"
......@@ -65,10 +65,7 @@
android:text="@string/vip_info_discount" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg"></View>
<include layout="@layout/line_layout"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -125,10 +122,7 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg"></View>
<include layout="@layout/line_layout"/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/recharge_refresh"
......
......@@ -33,7 +33,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/all_margin"
android:background="@mipmap/mk_grade01" />
android:background="@mipmap/iv_vip" />
<LinearLayout
android:layout_width="match_parent"
......@@ -69,10 +69,13 @@
android:text="@string/vip_balance_text" />
</LinearLayout>
<include layout="@layout/line_layout" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg"></View>
android:layout_width="wrap_content"
android:layout_height="@dimen/all_margin_left" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
......@@ -101,10 +104,10 @@
android:orientation="horizontal">
<LinearLayout
android:layout_weight="2"
android:id="@+id/stealLayout"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_weight="2"
android:background="@drawable/selector_paymoney_radiobutton_bg"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -118,7 +121,6 @@
<EditText
android:id="@+id/steal_money"
android:singleLine="true"
style="@style/dialog_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -128,21 +130,19 @@
android:inputType="phone"
android:maxLength="6"
android:onClick="@{onClickListener}"
android:singleLine="true"
android:textCursorDrawable="@null" />
</LinearLayout>
<View
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="1dp"/>
android:layout_height="1dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="@color/line_bg"></View>
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
......@@ -193,11 +193,17 @@
</LinearLayout>
</LinearLayout>
<include layout="@layout/line_layout" />
<View
android:layout_width="wrap_content"
android:layout_height="@dimen/all_margin_left" />
<include layout="@layout/line_layout" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white"
android:orientation="horizontal">
......@@ -217,14 +223,18 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:textColor="@color/deep_red" />
android:text="1111111111"
android:textColor="@color/deep_red"
android:textSize="@dimen/sbig_text_size" />
</LinearLayout>
<include layout="@layout/line_layout" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_pay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin_left"
android:background="@color/gray_zhouyu"
android:textAppearance="@android:style/TextAppearance.Large" />
</LinearLayout>
......
......@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/all_margin"
android:background="@mipmap/mk_grade01" />
android:background="@mipmap/iv_vip" />
<LinearLayout
android:layout_width="match_parent"
......@@ -65,10 +65,7 @@
android:text="@string/vip_info_discount" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg"></View>
<include layout="@layout/line_layout"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -127,10 +124,7 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg"></View>
<include layout="@layout/line_layout"/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/recharge_refresh"
......
......@@ -69,8 +69,8 @@
android:textSize="@dimen/all_text_size" />
<TextView
style="@style/textView_body"
android:id="@+id/search_ImageButton"
style="@style/textView_body"
android:layout_width="60dp"
android:layout_height="match_parent"
android:onClick="@{OnClickListener}"
......@@ -79,27 +79,10 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent" />
<include layout="@layout/line_layout" />
</android.support.constraint.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginBottom="@dimen/all_margin"
android:background="@color/gray_huanggai"
android:visibility="@{empty?View.GONE:View.VISIBLE}" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai" />
<include layout="@layout/line_layout" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_vip"
android:layout_width="match_parent"
......
......@@ -4,7 +4,9 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
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:layout_marginTop="@dimen/all_margin_left"
android:background="@mipmap/recharge_rule"
android:gravity="center_horizontal"
android:orientation="vertical">
......
......@@ -50,6 +50,8 @@
android:paddingEnd="@dimen/all_padding"
android:text="1231231244124124"
android:textColor="@color/black_baozheng"
android:singleLine="true"
android:ellipsize = "end"
android:textSize="@dimen/all_text_size"
app:layout_constraintEnd_toStartOf="@id/tv_right_top"
app:layout_constraintStart_toEndOf="@id/img_left"
......
......@@ -35,14 +35,14 @@
<TextView
android:id="@+id/user_mobile"
android:textSize="@dimen/all_text_size_small"
style="@style/default_blacktext_margin_16_sp_style"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13311556556" />
<TextView
android:id="@+id/user_name"
style="@style/default_blacktext_margin_16_sp_style"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="张小萌" />
......
......@@ -14,7 +14,7 @@
<ImageView
android:layout_margin="@dimen/all_margin_left"
android:background="@mipmap/hd_default02"
android:background="@mipmap/iv_vip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/black_likui"
></LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/line_bg"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
></LinearLayout>
\ No newline at end of file
......@@ -10,18 +10,10 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_margin_left"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageButton
android:id="@+id/onBack"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/transparent"
android:padding="@dimen/all_padding"
android:src="@mipmap/go_back" />
<EditText
android:id="@+id/serchEditText"
style="@style/searchBarEditor"
......
......@@ -39,9 +39,9 @@
<item name="android:layout_height">match_parent</item>
<item name="android:gravity">center_vertical</item>
<item name="android:singleLine">true</item>
<item name="android:padding">@dimen/sp_12</item>
<item name="android:padding">@dimen/dp_4</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/detail_textview_size</item>
<item name="android:textSize">@dimen/big_text_size</item>
</style>
<style name="default_gray_huanggaitext_smallstyle">
......@@ -63,6 +63,7 @@
<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>
......@@ -84,6 +85,7 @@
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/detail_textview_size</item>
</style>
<style name="default_blacktext_margin_16_sp_style">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">48dp</item>
......@@ -313,7 +315,8 @@
</style>
<style name="button_positive_noradius">
<item name="android:background">@drawable/selector_gradient_red_button_background_noradius </item>
<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>
......@@ -321,11 +324,11 @@
<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: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>
......@@ -336,8 +339,10 @@
<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: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>
......@@ -440,9 +445,10 @@
<item name="android:layout_width">0dp</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>
<item name="android:singleLine">false</item>
<item name="android:singleLine">true</item>
<item name="android:saveEnabled">false</item>
<item name="android:background">@drawable/selector_white_background_stroke</item>
<item name="android:layout_width">0dp</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