Commit 8c0bbca2 authored by 王海's avatar 王海

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/res/layout/title.xml
parents 3648484b 36abaaed
......@@ -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>
......
......@@ -25,6 +25,24 @@ public class VipRechargeOrder extends SectionEntity<MediaStore.Video> implements
private String rctraceNo;
private String vipMobile;
private Long createTime;
private Long cardAmtNet;
private Long cardCntNet;
public Long getCardAmtNet() {
return cardAmtNet;
}
public void setCardAmtNet(Long cardAmtNet) {
this.cardAmtNet = cardAmtNet;
}
public Long getCardCntNet() {
return cardCntNet;
}
public void setCardCntNet(Long cardCntNet) {
this.cardCntNet = cardCntNet;
}
public String getCardNo() {
return cardNo;
......@@ -96,6 +114,9 @@ public class VipRechargeOrder extends SectionEntity<MediaStore.Video> implements
}
public Long getRechangeBefore() {
if (rechangeBefore == null) {
rechangeBefore = cardAmtNet;
}
return rechangeBefore;
}
......@@ -104,6 +125,9 @@ public class VipRechargeOrder extends SectionEntity<MediaStore.Video> implements
}
public Long getRechangeAfter() {
if (rechangeAfter == null) {
rechangeAfter = cardCntNet;
}
return rechangeAfter;
}
......
......@@ -40,6 +40,7 @@ public class OtherSelectPresenter extends OtherSelectContract.Presenter {
.subscribe(osskus -> {
if (osskus.getTotalRow() == 0) {
ToastUtils.showShort("没有搜到当前商品,请重新输入");
mView.loadOssku(osskus, nowPageNumber == 1,keyword);
}else {
mView.loadOssku(osskus, nowPageNumber == 1,keyword);
}
......
......@@ -4,6 +4,7 @@ package com.xingdata.zzdpos.ui.manage.replenishment.fragment;
import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable;
import android.renderscript.ScriptGroup;
import android.support.design.widget.AppBarLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.text.InputType;
import android.view.KeyEvent;
......@@ -46,6 +47,13 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
private Psb mPsb;
private long sumPrice;
private boolean isAdd = true;
private CollapsingToolbarLayoutState state;
private enum CollapsingToolbarLayoutState {
EXPANDED,
COLLAPSED,
INTERNEDIATE
}
@Override
public int getLayoutId() {
......@@ -57,7 +65,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint);
mViewBinding.edTitle.setText("");
initCartBar();
initRecycycler();
initOnClickListener();
......@@ -319,4 +327,38 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
mPresenter.changeTitle(getResources().getString(R.string.replenishment_meun), false);
return super.onBackPressedSupport();
}
public void initCartBar() {
mViewBinding.setIsShowBar(false);
mViewBinding.appBar.addOnOffsetChangedListener(new AppBarLayout
.OnOffsetChangedListener() {
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
if (verticalOffset == 0) {
if (state != CollapsingToolbarLayoutState.EXPANDED) {
mViewBinding.setIsShowBar(false);
state = CollapsingToolbarLayoutState.EXPANDED;//修改状态标记为展开
}
} else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
if (state != CollapsingToolbarLayoutState.COLLAPSED) {
mViewBinding.setIsShowBar(true);
state = CollapsingToolbarLayoutState.COLLAPSED;//修改状态标记为折叠
}
} else {
if (state != CollapsingToolbarLayoutState.INTERNEDIATE) {
if (state == CollapsingToolbarLayoutState.COLLAPSED) {
mViewBinding.setIsShowBar(false);
}
state = CollapsingToolbarLayoutState.INTERNEDIATE;//修改状态标记为中间
}
}
}
});
}
}
package com.xingdata.zzdpos.ui.marketing.fragment;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.Gravity;
import android.widget.RadioButton;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS;
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.Mscard;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.vip.VipContract;
import com.xingdata.zzdpos.ui.vip.fragment.VipExpenseListFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoEditFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipListFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipRechargeFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipRechargeListFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipSearchFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipTruleListFragment;
import java.util.ArrayList;
import java.util.List;
public class VipPresenter extends VipContract.Presenter {
public VipListFragment vipListFragment = new VipListFragment();
public VipInfoEditFragment vipInfoEditFragment = new VipInfoEditFragment();
public VipInfoFragment vipInfoFragment = new VipInfoFragment();
public VipExpenseListFragment vipExpenseListFragment = new VipExpenseListFragment();
public VipRechargeListFragment vipRechargeListFragment = new VipRechargeListFragment();
public VipTruleListFragment vipMscardListFragment = new VipTruleListFragment();
public VipSearchFragment vipSearchFragment = new VipSearchFragment();
public VipRechargeFragment vipRechargeFragment = new VipRechargeFragment();
public int inVipState = 0; //1 充值
@Override
public void onAttached() {
this.initRealm();
}
@Override
public void getVipList(int pageNumber, String vipLevel) {
ApiFactory.User.getVipList(pageNumber, vipLevel).subscribe(vipPager -> {
mView.getVipListSus(vipPager, pageNumber);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void getVipLevel(int pageNum, int
pageSize) {
ApiFactory.Level.getVipLevelList(pageNum, pageSize).subscribe(vipPager -> {
mView.getVipLevelSus(vipPager);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void getVipNumber() {
ApiFactory.Sta.querySta().subscribe(sta -> {
mView.getVipNumberSus(sta);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void addVip(Vip vip) {
if (vip.getVipId() == null) {
ApiFactory.User.addVip(vip).subscribe(mVip -> {
mView.addVipSus(mVip);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
} else {
ApiFactory.User.updateVip(vip).subscribe(mVip -> {
mView.addVipSus(mVip);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
}
@Override
public void ticketQuery(Long vipID) {
ApiFactory.Ticket.query(vipID).subscribe(ticketList -> {
mView.ticketQuerySus(ticketList);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void saleorderQuery(Long vipID, int pageNumber) {
ApiFactory.Saleorder.querySaleorderByVipId(vipID, pageNumber, 5).subscribe(saleorder -> {
mView.getSaleorderSus(saleorder);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void rechargeorderQuery(Long vipID, int number) {
ApiFactory.Rctrace.queryRecharge(vipID, number, 10).subscribe(rechargeOrderPager -> {
mView.getRechargeOrderSus(rechargeOrderPager);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void truleQuery(Long vipID) {
ApiFactory.TRULE.truleQueryByVipId(vipID).subscribe(trulePager -> {
mView.getTruleSus(trulePager);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void searchVip(String keyword) {
ApiFactory.User.queryUserDetailByWD(keyword).subscribe(
vipPager -> {
mView.searchVipSus(vipPager);
},
throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void getMscardList(long vipID) {
ApiFactory.MsCard.mscardQuery(vipID).subscribe(
mscardPager -> {
mView.getMscardSus(mscardPager);
},
throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@SuppressLint("ResourceType")
public RadioButton addRadioButton(Context mContext, Mscard mscard) {
RadioButton radioButton = new RadioButton(mContext);
// ArrayList<RadioButton> radioButtons = new ArrayList<>();
radioButton.setTextSize(18);
radioButton.setTag(mscard.getCruleGradeNo());
radioButton.setText("充:" + mscard.getCruleChargeAmt() / 100);
radioButton.setButtonDrawable(null);
radioButton.setGravity(Gravity.CENTER);
radioButton.getPaint().setFakeBoldText(true);
radioButton.setBackgroundResource(R.drawable.selector_paymoney_radiobutton_bg);
radioButton.setTextColor(mContext.getResources().getColorStateList(R.drawable.selector_paymoney_textcolor_bg));
return radioButton;
}
public Mscard getMaxRechange(List<Mscard> realm, Long rechangeMoney) {
Mscard mMscard = null;
ArrayList<String> strings = new ArrayList<>();
long rechangeM = 0;
for (Mscard mscard : realm) {
if (rechangeMoney >= mscard.getCruleChargeAmt()) {
rechangeM = mscard.getCruleChargeAmt();
mMscard = mscard;
}
}
return mMscard;
}
@Override
public void initSettle() {
// Realm.getInstance(App.instance.mRealmConfig).
DBFactory.Vip.queryPays().subscribe(
pays -> mView.loadPays(pays),
throwable -> {
}
);
// mView.setSettleFragmentBySettleMode(mSettleMode);
}
@Override
public void fullVip(Vip vipOld, Long amtPay, Long amtSend) {
ApiFactory.Recard.fullVip(vipOld.getVipId(), amtPay, amtSend).subscribe(vip -> {
VipRechargeOrder mVipRechangeOrdervip = vip.getRctrace();
mVipRechangeOrdervip.setCreateTime(vip.getUpdateTime());
mVipRechangeOrdervip.setRechangeBefore(vipOld.getAcctCbal());
mVipRechangeOrdervip.setRechangeAfter(vip.getAcctCbal());
try {
ZX_PrintPOS.getInstance(App.instance).printSave(1, mVipRechangeOrdervip);
} catch (Exception e) {
ToastUtils.showShort("打印异常");
}
mView.rechangeSus(vip);
}, throwable -> {
mView.rechangeErr(vipOld, amtPay, amtSend, throwable.getMessage());
});
}
}
......@@ -141,7 +141,11 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
break;
case C.PAY_CHANNEL.BANK:
case C.PAY_CHANNEL.ALI:
showMsg("暂时无法使用");
mScanFragment.setOnScanCompletedListener(barcode -> {
this.pop();
mPresenter.payInAli(barcode);
});
this.start(mScanFragment);
break;
case C.PAY_CHANNEL.WECHAT:
mScanFragment.setOnScanCompletedListener(barcode -> {
......
......@@ -162,6 +162,19 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
false));
viewVipRechargeBinding.setSendAmt(ConvertUtil.fenToYuan(vipRechargeOrder.getCardAmtSend()
, false));
mViewBinding.btnPrint.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ZX_PrintPOS.getInstance(MainActivity.mainActivity).printSave(1, vipRechargeOrder);
mViewBinding.btnPrint.setEnabled(false);
mViewBinding.btnPrint.setText("已打印");
}
});
}
@Override
......
......@@ -50,7 +50,13 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding>
@Override
public void addVipSus(Vip vip) {
mPresenter.vipListFragment.updateVipSus(vip);
}
@Override
public void updateVipSus(Vip vip) {
mPresenter.vipInfoFragment.addVipSus(vip);
}
@Override
......@@ -109,7 +115,6 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding>
}
@Override
public void getVipLevelSus(Pager<Level> levelPager) {
mPresenter.vipListFragment.getVipLevelSus(levelPager);
......
......@@ -29,6 +29,8 @@ public interface VipContract {
void addVipSus(Vip vip);
void updateVipSus(Vip vip);
void ticketQuerySus(List<Ticket> ticketPager);
void getSaleorderSus(Pager<Saleorder> saleorderPager);
......
......@@ -86,7 +86,7 @@ public class VipPresenter extends VipContract.Presenter {
});
} else {
ApiFactory.User.updateVip(vip).subscribe(mVip -> {
mView.addVipSus(mVip);
mView.updateVipSus(mVip);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
......
......@@ -26,6 +26,7 @@ import com.xingdata.zzdpos.ui.vip.dialog.VipEditMenuDialog;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.StringUtil;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
......@@ -35,7 +36,9 @@ 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 Byte vipTag;
@Override
public int getLayoutId() {
......@@ -51,16 +54,23 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
mViewBinding.vipBirthday.setText(StringUtil.format(new Date(mVip.getVipBirthday())));
mViewBinding.vipName.setText(mVip.getVipName());
mViewBinding.vipPhone.setText(mVip.getVipMobile() + "");
((CheckBox) mViewBinding.vipSuper).setChecked(mVip.getVipTag() == 1);
if (String.valueOf(mVip.getVipTag()).equals("1")) {
mViewBinding.vipDiscounts.setText("超级会员"+ " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
} else {
mViewBinding.vipDiscounts.setText(mVip.getVipLevelName() + " " + ConvertUtil.discount(mVip.getVipDefDiscount()) + "折");
}
mViewBinding.vipDiscounts.setEnabled(false);
// ((CheckBox) mViewBinding.vipSuper).setChecked(mVip.getVipTag() == 1);
RadioButton radioButton = mViewBinding.vipSex.findViewWithTag(mVip.getVipSex().toString());
if (radioButton != null) {
radioButton.setChecked(true);
}
} else {
mViewBinding.infoTitle.tvTitle.setText("添加会员");
}
if (levels!=null&&levels.size() != 0) {
mViewBinding.vipDiscounts.setEnabled(true);
mViewBinding.vipDiscounts.setText(levels.get(0).getVipLevelName() + " " + ConvertUtil.discount(levels.get(0).getVipDefDiscount()) + "折");
mViewBinding.vipBirthday.setText(StringUtil.format(new Date(System.currentTimeMillis())));
((RadioButton) mViewBinding.vipSex.getChildAt(0)).setChecked(true);
}
mViewBinding.setOnClickListener(view -> {
......@@ -74,30 +84,36 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
break;
case R.id.onSure:
if (mViewBinding.vipName.getText().length()==0){
if (mViewBinding.vipName.getText().length() == 0) {
ToastUtils.showShort("会员名称不能为空");
return;
}
if (mViewBinding.vipPhone.getText().length()==0){
if (mViewBinding.vipPhone.getText().length() == 0) {
ToastUtils.showShort("会员手机号不能为空");
return;
}
if (mViewBinding.vipPhone.getText().length() != 11) {
ToastUtils.showShort("手机号长度必须为11位");
return;
}
if (mVip == null) {
mVip = new Vip();
}
mVip.setVipName(mViewBinding.vipName.getText().toString().trim());
mVip.setVipMobile(Long.parseLong(mViewBinding.vipPhone.getText().toString().trim()));
if (vipTag != null) {
mVip.setVipTag(vipTag);
mVip.setVipLevelName("超级会员");
} else {
mVip.setVipTag(Byte.parseByte("0"));
}
int sexId = mViewBinding.vipSex.getCheckedRadioButtonId();
if (sexId != -1) {
mVip.setVipSex(Byte.parseByte(mViewBinding.vipSex.findViewById(sexId).getTag().toString()));
}
if (mVip.getVipId() != null) {
mPresenter.addVip(mVip);
} else {
mPresenter.addVip(mVip);
}
break;
}
});
......@@ -121,9 +137,8 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
@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).getVipDefDiscount()) + "折");
// mViewBinding.tvSelectStore.setText(tx);
// shops = list.get(options1);
mViewBinding.vipDiscounts.setText(tx + " " + ConvertUtil.discount(levels.get(options1 - 1).getVipDefDiscount()) + "折");
vipTag = Byte.parseByte(options1 + "");
}
}).setTitleText("请选择")
.setDividerColor(Color.BLACK)
......@@ -131,12 +146,16 @@ public class VipInfoEditFragment extends BaseFragment<VipPresenter, FragmentVipI
.setContentTextSize(20)
.build();
pvOptions.setPicker(levels);
pvOptions.setPicker(mLevels);
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) {
......
......@@ -9,6 +9,8 @@ import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.ui.vip.dialog.VipEditMenuDialog;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.StringUtil;
import java.util.List;
......@@ -38,16 +40,20 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentVipInfoB
dialog.setVip(mVip);
dialog.show((BaseActivity) getActivity());
});
if (mVip!=null){
mViewBinding.Totalpamt.setText(String.valueOf(mVip.getVipTotalpamt()));
if (mVip != null) {
mViewBinding.Totalpamt.setText(ConvertUtil.fenToYuanNoZero(mVip.getVipTotalpamt()));
mViewBinding.BoundCbal.setText(String.valueOf(mVip.getBoundCbal()));
mViewBinding.AcctCbal.setText(String.valueOf(mVip.getAcctCbal()));
mViewBinding.AcctCbal.setText(ConvertUtil.fenToYuanNoZero(mVip.getAcctCbal()));
if (String.valueOf(mVip.getVipTag()).equals("1")){
mViewBinding.vipLevel.setText("超级会员");
}else {
mViewBinding.vipLevel.setText(mVip.getVipLevelName());
}
mViewBinding.vipBirthday.setText(mVip.getVipBirthday() + "");
mViewBinding.vipName.setText(mVip.getVipName());
mViewBinding.vipMoble.setText(mVip.getVipMobile() + "");
mViewBinding.vipSex.setText(getVipSex(mVip.getVipSex()));
mViewBinding.vipDiscounts.setText(getString(R.string.vip_discount, mVip.getVipDefDiscount() + ""));
mViewBinding.vipDiscounts.setText(getString(R.string.vip_discount, ConvertUtil.discount(mVip.getVipDefDiscount() )+ ""));
mPresenter.ticketQuery(mVip.getVipId());
}
......@@ -72,9 +78,24 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentVipInfoB
public void addVipSus(Vip vip) {
mVip = vip;
initView();
mPresenter.vipInfoEditFragment.pop();
mViewBinding.Totalpamt.setText(String.valueOf(vip.getVipTotalpamt()));
mViewBinding.BoundCbal.setText(String.valueOf(vip.getBoundCbal()));
mViewBinding.AcctCbal.setText(String.valueOf(vip.getAcctCbal()));
if (String.valueOf(vip.getVipTag()).equals("1")){
mViewBinding.vipLevel.setText("超级会员");
}else {
mViewBinding.vipLevel.setText(vip.getVipLevelName());
}
mViewBinding.vipBirthday.setText(vip.getVipBirthday() + "");
mViewBinding.vipName.setText(vip.getVipName());
mViewBinding.vipMoble.setText(vip.getVipMobile() + "");
mViewBinding.vipSex.setText(getVipSex(vip.getVipSex()));
mViewBinding.vipDiscounts.setText(getString(R.string.vip_discount, vip.getVipDefDiscount() + ""));
mPresenter.ticketQuery(vip.getVipId());
// initView();
}
public void ticketQuerySus(List<Ticket> ticketPager) {
mViewBinding.ticketCount.setText(String.valueOf(ticketPager.size()));
}
......
......@@ -104,7 +104,6 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
case R.id.onScan:
ToastUtils.showShort("aaaaaaaaaaaa");
PermissionUtils.permission(PermissionConstants.CAMERA).callback(new PermissionUtils.FullCallback() {
@Override
public void onGranted(List<String> permissionsGranted) {
......@@ -170,6 +169,9 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
public void getVipLevelSus(Pager<Level> levelPager) {
if ( mViewBinding.vipLevelR.getChildCount()!=0){
mViewBinding.vipLevelR.removeAllViews();
}
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
Level allLevel = new Level();
allLevel.setVipLevelName("全部会员");
......@@ -192,6 +194,9 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
}
levels = levelPager.getList();
Level level = new Level();
level.setVipLevelName("超级会员");
levels.add(level);
}
private void onLoadMore() {
......@@ -231,19 +236,17 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
mPresenter.vipInfoFragment.setLevel(levels);
((BaseActivity) getActivity()).start(mPresenter.vipInfoFragment);
} else {
mPresenter.vipInfoFragment.setVip(vip);
((BaseActivity) getActivity()).start(mPresenter.vipRechargeFragment);
}
} else {
mPresenter.vipInfoEditFragment.setVip(null);
mPresenter.vipInfoEditFragment.setVipLevel(levels);
((BaseActivity) getActivity()).start(mPresenter.vipInfoEditFragment);
}
}
public void addVipSus(Vip vip) {
}
/**
* @param sta
*/
......@@ -258,6 +261,12 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
}
public void updateVipSus(Vip vip) {
pageNumber = 0;
mPresenter.getVipLevel(pageNumber, 200);
mPresenter.getVipNumber();
mPresenter.vipInfoEditFragment.pop();
}
public void setVipState(int vipState) {
this.vipState = vipState;
......
......@@ -38,11 +38,6 @@ public class VipRechargeListFragment extends BaseFragment<VipPresenter, Fragment
private List<VipRechargeOrder> orders = new ArrayList<>();
private int pageNumber = 0;
private List<Level> levels;
private LinearLayout.LayoutParams layoutParams = null;
private HashMap<String, Mscard> mscardHashMap = new HashMap<>();
private ArrayList<Mscard> mscards = new ArrayList<>();
private ArrayList<String> strLevels = new ArrayList<>();
private EditText serchEditText;
@Override
......@@ -59,7 +54,8 @@ public class VipRechargeListFragment extends BaseFragment<VipPresenter, Fragment
mViewBinding.rechargeRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.rechargeRecyclerView.setAdapter(vipRechargeAdapter);
mViewBinding.rechargeRefresh.setOnRefreshListener(this::onRefresh);
mViewBinding.rechargeAMT.setText(ConvertUtil.fenToYuan2(mVip.getVipTotalpamt()));
mViewBinding.rechargeAmt.setText(ConvertUtil.fenToYuan2(mVip.getAcctCbal()));
mViewBinding.balanceAMT.setText(ConvertUtil.fenToYuan2(mVip.getAcctCbal()));
mViewBinding.vipMobile.setText(String.valueOf(mVip.getVipMobile()));
mViewBinding.vipName.setText(String.valueOf(mVip.getVipName()));
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
......
......@@ -2,6 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_pressed="true" />
<item android:color="@color/white" android:state_enabled="false" />
<item android:color="@color/red_guanyu" />
</selector>
\ No newline at end of file
......@@ -6,6 +6,6 @@
android:width="@dimen/edit_border"
android:color="@color/gary"/>
<solid android:color="@color/lyt_main_bg"/>
<solid android:color="@color/gray_huanggai"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout xmlns:tools="http://schemas.android.com/tools">
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity">
>
<include
android:id="@+id/ic_title"
......@@ -78,7 +77,7 @@
android:id="@+id/btn_return"
style="@style/button_positive"
android:layout_width="@dimen/button1_width"
android:layout_height="@dimen/button1_height"
android:layout_height="37dp"
android:gravity="center"
android:stateListAnimator="@null"
android:text="@string/pay_return"
......
......@@ -283,15 +283,15 @@
<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
android:id="@+id/onSure"
style="@style/button_positive_noradius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="15dp"
android:onClick="@{onClickListener}"
android:text="确认" />
</RelativeLayout>
......
......@@ -21,7 +21,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="72dp"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white"
android:orientation="horizontal">
......@@ -36,9 +36,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@color/white"
android:orientation="vertical">
......@@ -180,14 +180,14 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="级别" />
<TextView
android:id="@+id/vipLevel"
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:textSize="@dimen/all_text_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
......@@ -206,17 +206,16 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:text="性别" />
<TextView
android:id="@+id/vipSex"
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/all_text_size"
/>
</LinearLayout>
......@@ -235,14 +234,13 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="生日" />
<TextView
android:id="@+id/vip_birthday"
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
......@@ -261,9 +259,8 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="地区" />
</LinearLayout>
......@@ -280,9 +277,8 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="详细地址" />
</LinearLayout>
......
......@@ -35,18 +35,23 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
<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_nopadding_smallstyle"
android:layout_width="70dp"
android:text="姓名" />
<EditText
android:id="@+id/vip_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"
......@@ -64,35 +69,41 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
<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_nopadding_smallstyle"
android:layout_width="70dp"
android:maxLength="11"
android:text="手机号" />
<EditText
android:id="@+id/vip_phone"
android:digits="0123456789"
android:inputType="phone"
style="@style/dialog_edit"
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_margin="@dimen/all_margin"
android:layout_gravity="center_vertical"
android:background="@mipmap/camera" />
android:background="@mipmap/hd_default02" />
</LinearLayout>
<View
......@@ -107,33 +118,41 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin_left"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginTop="@dimen/all_margin_left"
android:background="@mipmap/point" />
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="性别" />
<RadioGroup
android:gravity="center_vertical"
android:id="@+id/vip_sex"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12sp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="100dp"
android:orientation="horizontal">
<RadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="50dp"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:tag="1"
android:layout_marginRight="@dimen/all_margin_left"
android:text="男" />
<RadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="50dp"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
......@@ -151,34 +170,30 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:background="@color/white"
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="70dp"
android:layout_height="wrap_content"
android:text="级别" />
<TextView
style="@style/default_blacktext_nopadding_smallstyle"
android:id="@+id/vip_discounts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginLeft="@dimen/sp_12"
android:gravity="center_vertical"
android:layout_marginRight="100dp"
android:drawableRight="@mipmap/ic_expand"
android:onClick="@{onClickListener}" />
<CheckBox
android:id="@+id/vip_super"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:text="超级VIP" />
</LinearLayout>
<View
......@@ -194,17 +209,18 @@
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
style="@style/default_blacktext_margin_16_sp_style"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_marginLeft="13dp"
android:text="生日" />
<TextView
android:id="@+id/vip_birthday"
style="@style/default_blacktext_smallstyle"
style="@style/default_blacktext_nopadding_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请选择"
android:layout_marginLeft="21dp"
android:textSize="@dimen/all_body_size"
android:onClick="@{onClickListener}" />
</LinearLayout>
......@@ -212,18 +228,19 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<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">
<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_marginBottom="15dp"
android:layout_alignParentBottom="true"
android:onClick="@{onClickListener}"
android:text="确认" />
......
......@@ -202,6 +202,8 @@
<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">
......@@ -209,9 +211,7 @@
android:id="@+id/onSure"
style="@style/button_positive_noradius"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="15dp"
android:onClick="@{onClickListener}"
android:text="确认" />
......
......@@ -91,7 +91,7 @@
android:text="可用余额" />
<TextView
android:id="@+id/recharge_AMT"
android:id="@+id/balance_AMT"
style="@style/default_blacktext_bigstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -62,9 +62,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingTop="@dimen/all_padding"
android:paddingEnd="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
android:paddingEnd="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_padding"
android:text="件"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
......@@ -75,8 +75,8 @@
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/all_padding"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low"
android:textStyle="bold"
......@@ -88,7 +88,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_padding"
android:text="盘点件数:"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size_low"
......@@ -101,7 +103,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_padding"
android:text="盘点结果:"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size_low"
......@@ -113,10 +117,11 @@
android:id="@+id/tv_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding"
android:layout_marginEnd="@dimen/all_margin"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
android:paddingEnd="@dimen/all_margin"
android:paddingTop="@dimen/all_padding"
android:text="不相符"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size_low"
......@@ -128,7 +133,9 @@
android:id="@+id/tv_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
android:paddingEnd="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_padding"
android:text="2017-10-01 12:25"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low"
......@@ -138,7 +145,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_padding"
android:text="盘点时间"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low"
......@@ -149,7 +158,7 @@
android:id="@+id/img_inventory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:src="@mipmap/ic_not_consistent"
app:layout_constraintBottom_toBottomOf="@id/tv_result"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -10,12 +10,12 @@
<TextView
android:id="@+id/item_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="48dp"
android:layout_centerVertical="true"
android:background="?android:attr/selectableItemBackground"
android:drawablePadding="@dimen/all_padding"
android:elevation="@dimen/view_line_L050"
android:gravity="left"
android:gravity="left|center_vertical"
android:padding="@dimen/vicescreen_shoppingcart_pandding"
android:singleLine="true"
android:textColor="@color/black"
......
......@@ -115,6 +115,7 @@
android:paddingEnd="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_bounced_padding"
android:text="@{shopName}"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low" />
<TextView
......@@ -126,6 +127,7 @@
android:paddingEnd="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_bounced_padding"
android:text="@{address}"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low" />
<TextView
......@@ -134,10 +136,10 @@
android:background="@color/white_caocao"
android:drawablePadding="@dimen/all_padding"
android:drawableStart="@mipmap/icon_telephone"
android:paddingEnd="@dimen/all_bounced_padding"
android:paddingTop="@dimen/all_bounced_padding"
android:text="@{phone}"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low" />
......
......@@ -22,8 +22,8 @@
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="@color/transparent"
android:src="@mipmap/go_back"
android:onClick="@{onClickListener}" />
android:onClick="@{onClickListener}"
android:src="@mipmap/go_back" />
<TextView
android:id="@+id/tv_title"
......
......@@ -31,7 +31,7 @@
<dimen name="all_text_size_big">22sp</dimen>
<dimen name="all_text_size_big_big">30sp</dimen>
<dimen name="all_text_size_super_big">25sp</dimen>
<dimen name="all_margin_left">17dp</dimen>
<dimen name="all_margin_left">16dp</dimen>
<dimen name="title_height">50dp</dimen>
<dimen name="all_textview_width">120dp</dimen>
<dimen name="all_dialog_button">40dp</dimen>
......
......@@ -56,12 +56,12 @@
<style name="default_blacktext_nopadding_smallstyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_height">48dp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:singleLine">true</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/all_text_size</item>
</style>
<style name="default_blacktext_margin_smallstyle">
......@@ -76,6 +76,18 @@
<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>
<item name="android:gravity">center_vertical</item>
<item name="android:singleLine">true</item>
<item name="android:layout_marginLeft">17dp</item>
<item name="android:padding">@dimen/sp_12</item>
<item name="android:paddingBottom">@dimen/sp_12</item>
<item name="android:paddingTop">@dimen/sp_12</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">@dimen/all_text_size</item>
</style>
<style name="default_bluetext_popbutton">
<item name="android:layout_width">wrap_content</item>
......@@ -293,8 +305,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:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
......@@ -395,6 +407,14 @@
<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: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/all_body_size</item>
</style>
<style name="textView_body">
<item name="android:padding">@dimen/all_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