Commit ea89e79d authored by 王海's avatar 王海

Merge remote-tracking branch 'origin/master'

parents 8db076ad 2ed0e2ef
......@@ -62,6 +62,23 @@ public class Sta {
this.cardCount = cardCount;
}
public Long getOperCount() {
return operCount;
}
public Long getOperAddCount() {
return operAddCount;
}
public void setOperCount(Long operCount) {
this.operCount = operCount;
}
public void setOperAddCount(Long operAddCount) {
this.operAddCount = operAddCount;
}
/**
* 会员总数
*/
......@@ -81,5 +98,14 @@ public class Sta {
* 充值次数
*/
private Long cardCount = 0L;
/**
* 店员数量
*/
private Long operCount = 0L;
/**
* 店员新增数量
*/
private Long operAddCount = 0L;
}
......@@ -32,17 +32,35 @@ public class UserActivity extends BaseActivity<UserPresenter, ActivityUserBindin
public int getLayoutId() {
return R.layout.activity_user;
}
@Override
public void initView() {
loadRootFragment(R.id.user_frame, mPresenter.userListFragment, true, false);
}
@Override
public void queryOperSus(Pager<Oper> operPager) {
mPresenter.userListFragment.queryOperSus(operPager);
}
@Override
public void querySta(Sta sta) {
public void queryStaSus(Sta sta) {
mPresenter.userListFragment.queryStaSus(sta);
}
@Override
public void addSusSus(Oper oper) {
mPresenter.userListFragment.addSusSus(oper);
mPresenter.userInfoEditFragment.pop();
}
@Override
public void updateUserSus(Oper oper) {
mPresenter.userListFragment.updateUserSus(oper);
}
@Override
public void delUserSus() {
mPresenter.userListFragment.delUserSus();
}
}
......@@ -21,12 +21,18 @@ public interface UserContract {
interface View extends BaseView {
void queryOperSus(Pager<Oper> operPager);
void querySta(Sta sta);
void queryStaSus(Sta sta);
void addSusSus(Oper oper);
void updateUserSus(Oper oper);
void delUserSus();
}
abstract class Presenter extends BasePresenter<View> {
public abstract void getUserList(String wd);
public abstract void addUser(Oper oper);
public abstract void querySta();
public abstract void updateUser(Oper oper);
public abstract void delUser(Oper oper);
}
}
\ No newline at end of file
package com.xingdata.zzdpos.ui.manage.user;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.ui.manage.user.dialog.UserMenuDialog;
import com.xingdata.zzdpos.ui.manage.user.fragment.UserInfoEditFragment;
import com.xingdata.zzdpos.ui.manage.user.fragment.UserInfoFragment;
import com.xingdata.zzdpos.ui.manage.user.fragment.UserListFragment;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class UserPresenter extends UserContract.Presenter {
public UserListFragment userListFragment = new UserListFragment();
public UserInfoEditFragment userInfoEditFragment = new UserInfoEditFragment();
public UserInfoFragment userInfoFragment = new UserInfoFragment();
public LinkedHashMap<String, String> operLevel = new LinkedHashMap<>();//用户级别 1 员工 2主管 3 店长 9老板
public UserMenuDialog userMenuDialog = new UserMenuDialog();
@Override
public void onAttached() {
initOperLevel();
}
private void initOperLevel() {
operLevel.put("员工", "1");
operLevel.put("主管", "2");
operLevel.put("店长", "3");
operLevel.put("老板", "9");
}
public String getOperLevelName(String strLevel) {
Iterator<Map.Entry<String, String>> iterator = operLevel.entrySet().iterator();
while (iterator.hasNext()) {
if (iterator.next().getValue().equals(strLevel))
return iterator.next().getKey();
}
return "";
}
......@@ -19,27 +50,53 @@ public class UserPresenter extends UserContract.Presenter {
ApiFactory.Oper.queryOper(wd).subscribe(operPager -> {
mView.queryOperSus(operPager);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void addUser(Oper oper) {
ApiFactory.Oper.addOper(oper).subscribe(operPager -> {
ApiFactory.Oper.addOper(oper).subscribe(m -> {
mView.addSusSus(m);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void querySta() {
ApiFactory.Sta.querySta().subscribe(sta -> {
mView.queryStaSus(sta);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void updateUser(Oper oper) {
ApiFactory.Oper.updateOper(oper).subscribe(m -> {
mView.updateUserSus(m);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void delUser(Oper oper) {
ApiFactory.Oper.deleteOper(oper.getOperId()).subscribe(m -> {
mView.delUserSus();
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
public List<String> getOperLevelList() {
ArrayList<String> operLevelList = new ArrayList<>();
Iterator<Map.Entry<String, String>> iterator = operLevel.entrySet().iterator();
while (iterator.hasNext()) {
operLevelList.add(iterator.next().getKey());
}
return operLevelList;
}
}
......@@ -9,6 +9,7 @@ import com.xingdata.zzdpos.databinding.ItemUserListItemBinding;
import com.xingdata.zzdpos.databinding.ItemVipListItemBinding;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.manage.user.UserPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.model.User;
import com.xingdata.zzdpos.util.ConvertUtil;
......@@ -20,18 +21,18 @@ import java.util.List;
public class UserListAdapter extends BaseAdapter<Oper, ItemUserListItemBinding> {
private Context mContext;
private UserPresenter mP;
public UserListAdapter(Context mContext, @Nullable List<Oper> data) {
public UserListAdapter(Context mContext, @Nullable List<Oper> data,UserPresenter userPresenter) {
super(R.layout.item_user_list_item, data);
this.mContext = mContext;
this.mP=userPresenter;
}
@Override
protected void convert(ItemUserListItemBinding mViewBinding, Oper item) {
mViewBinding.userName.setText(item.getOperName());
mViewBinding.userMobile.setText(String.valueOf(item.getOperMobile()));
mViewBinding.vipLevelName.setText(mP.getOperLevelName(item.getOperLevel().toString()));
}
}
package com.xingdata.zzdpos.ui.manage.user.dialog;
import android.view.View;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseSheetDialog;
import com.xingdata.zzdpos.databinding.DialogUserMenuBinding;
import com.xingdata.zzdpos.databinding.DialogVipMenuBinding;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.manage.user.UserPresenter;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoEditFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipRechargeListFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipTruleListFragment;
import java.util.List;
/**
* Created by JM_DEV on 2017/12/27.
*/
public class UserMenuDialog extends BaseSheetDialog<UserPresenter, DialogUserMenuBinding> {
private Oper oper;
private List<Level> mLevel;
@Override
public int getLayoutId() {
return R.layout.dialog_user_menu;
}
@Override
public void initView() {
mViewBinding.setOnClick(view -> {
switch (view.getId()) {
//編輯店员
case R.id.editUser:
mPresenter.userInfoEditFragment.setOper(oper);
((BaseActivity) getActivity()).start(mPresenter.userInfoEditFragment);
break;
//新增店员
case R.id.delUser:
/**
*调用方式
*/
//两个选择按钮,确定取消并含有提示信息
PromptDialog promptDialog = new PromptDialog();
promptDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "确定是否删除店员?")
.setClick(new View.OnClickListener() {
@Override
public void onClick(View view) {
mPresenter.delUser(oper);
promptDialog.dismiss();
}
}, new View.OnClickListener() {
@Override
public void onClick(View view) {
promptDialog. dismiss();
}
}).show((BaseActivity) getActivity());
break;
}
});
}
@Override
protected boolean isTransparentBackground() {
return true;
}
public void setOper(Oper oper) {
this.oper = oper;
}
public void setLevel(List<Level> mLevel) {
this.mLevel = mLevel;
}
}
package com.xingdata.zzdpos.ui.manage.user.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import android.app.DatePickerDialog;
import android.graphics.Color;
import android.view.View;
import android.widget.CheckBox;
import android.widget.DatePicker;
import android.widget.RadioButton;
import android.widget.TextView;
import com.bigkoo.pickerview.OptionsPickerView;
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.FragmentUserInfoEditBinding;
import com.xingdata.zzdpos.databinding.FragmentVipInfoEditBinding;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.manage.user.UserPresenter;
import com.xingdata.zzdpos.ui.manage.user.dialog.UserMenuDialog;
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.Calendar;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
/**
* 会员信息界面
*/
public class UserInfoEditFragment extends BaseFragment<UserPresenter, FragmentUserInfoEditBinding> {
private Oper oper;
public void setOper(Oper oper) {
this.oper = oper;
}
@Override
public int getLayoutId() {
return R.layout.fragment_user_info_edit;
}
@Override
public void initView() {
if (oper == null) {
mViewBinding.infoTitle.tvTitle.setText("新增店员");
} else {
mViewBinding.infoTitle.tvTitle.setText("编辑店员");
mViewBinding.userName.setText(oper.getOperName());
mViewBinding.userName.setSelection(oper.getOperName().length());
mViewBinding.userPhone.setText(String.valueOf(oper.getOperMobile()));
mViewBinding.userLevel.setText(mPresenter.getOperLevelName(oper.getOperLevel().toString()));
}
mViewBinding.infoTitle.popMenu.setVisibility(View.GONE);
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
case R.id.user_Level:
ShowPickerViewStoreAddress();
break;
case R.id.onSure:
if (oper == null) {
oper = new Oper();
}
if (mViewBinding.userLevel.getText().length()==0)
{
ToastUtils.showShort("会员等级不能为空");
return;
}
if (mViewBinding.userPhone.getText().length()==0)
{
ToastUtils.showShort("会员帐号不能为空");
return;
}
if (mViewBinding.userName.getText().length()==0)
{
ToastUtils.showShort("会员名称不能为空");
return;
}
oper.setOperLevel(Byte.valueOf(mPresenter.operLevel.get(mViewBinding.userLevel.getText().toString())));
oper.setOperMobile(Long.parseLong(mViewBinding.userPhone.getText().toString()));
oper.setOperName(mViewBinding.userName.getText().toString());
if (oper.getOperId() == null) {
mPresenter.addUser(oper);
} else {
mPresenter.updateUser(oper);
}
break;
}
});
mViewBinding.infoTitle.ivBack.setOnClickListener(view -> {
pop();
});
}
/**
* 弹出选择会员P
*/
private void ShowPickerViewStoreAddress() {// 弹出选择器
OptionsPickerView pvOptions = new OptionsPickerView.Builder(getActivity(), new
OptionsPickerView.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int options2, int options3, View v) {
mViewBinding.userLevel.setText(mPresenter.getOperLevelList().get(options1));
}
}).setTitleText("请选择")
.setDividerColor(Color.BLACK)
.setTextColorCenter(Color.BLACK) //设置选中项文字颜色
.setContentTextSize(20)
.build();
pvOptions.setPicker(mPresenter.getOperLevelList());
pvOptions.show();
}
@Override
public boolean onBackPressedSupport() {
return false;
}
}
package com.xingdata.zzdpos.ui.manage.user.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import android.graphics.Color;
import android.view.View;
import com.bigkoo.pickerview.OptionsPickerView;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentUserInfoBinding;
import com.xingdata.zzdpos.databinding.FragmentUserInfoEditBinding;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.ui.manage.user.UserPresenter;
import com.xingdata.zzdpos.ui.manage.user.dialog.UserMenuDialog;
/**
* 会员信息界面
*/
public class UserInfoFragment extends BaseFragment<UserPresenter, FragmentUserInfoBinding> {
private Oper oper;
public void setOper(Oper oper) {
this.oper = oper;
}
@Override
public int getLayoutId() {
return R.layout.fragment_user_info;
}
@Override
public void initView() {
mViewBinding.infoTitle.tvTitle.setText("店员详情");
mViewBinding.userName.setText(oper.getOperName());
mViewBinding.userPhone.setText(String.valueOf(oper.getOperMobile()));
mViewBinding.userLevel.setText(mPresenter.getOperLevelName(oper.getOperLevel().toString()));
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
case R.id.user_Level:
ShowPickerViewStoreAddress();
break;
case R.id.onSure:
if (oper == null) {
oper = new Oper();
}
oper.setOperLevel(Byte.valueOf(mPresenter.operLevel.get(mViewBinding.userLevel.getText().toString())));
oper.setOperMobile(Long.parseLong(mViewBinding.userPhone.getText().toString()));
oper.setOperName(mViewBinding.userName.getText().toString());
if (oper.getOperId() == null) {
mPresenter.addUser(oper);
} else {
mPresenter.updateUser(oper);
}
break;
}
});
mViewBinding.infoTitle.ivBack.setOnClickListener(view -> {
pop();
});
mViewBinding.infoTitle.popMenu.setOnClickListener(view -> {
mPresenter.userMenuDialog.setOper(oper);
mPresenter.userMenuDialog.show((BaseActivity) getActivity());
});
}
/**
* 弹出选择会员P
*/
private void ShowPickerViewStoreAddress() {// 弹出选择器
OptionsPickerView pvOptions = new OptionsPickerView.Builder(getActivity(), new
OptionsPickerView.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int options2, int options3, View v) {
mViewBinding.userLevel.setText(mPresenter.getOperLevelList().get(options1));
}
}).setTitleText("请选择")
.setDividerColor(Color.BLACK)
.setTextColorCenter(Color.BLACK) //设置选中项文字颜色
.setContentTextSize(20)
.build();
pvOptions.setPicker(mPresenter.getOperLevelList());
pvOptions.show();
}
@Override
public boolean onBackPressedSupport() {
return false;
}
}
......@@ -45,38 +45,59 @@ public class UserListFragment extends BaseFragment<UserPresenter, FragmentUserLi
@Override
public void initView() {
adapter = new UserListAdapter(getActivity(), opers);
adapter = new UserListAdapter(getActivity(), opers,mPresenter);
mViewBinding.userRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.userRecyclerView.setAdapter(adapter);
adapter.setOnItemClickListener((adapter, view, position) -> {
mPresenter.userInfoFragment.setOper((Oper) adapter.getData().get(position));
start(mPresenter.userInfoFragment);
});
adapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.userRecyclerView);
adapter.setEnableLoadMore(true);
adapter.loadMoreComplete();
adapter.setEnableLoadMore(false);
mViewBinding.titleSearch.onBack.setOnClickListener(view -> {
getActivity().finish();
});
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
case R.id.addUser:
mPresenter.userInfoEditFragment.setOper(null);
start(mPresenter.userInfoEditFragment);
break;
}
});
onRefresh();
}
private void onLoadMore(){
private void onLoadMore() {
}
public void onRefresh() {
mPresenter.getUserList(null);
mPresenter.querySta();
}
public void queryOperSus(Pager<Oper> operPager) {
adapter.setNewData(operPager.getList());
adapter.setEnableLoadMore(false);
adapter.loadMoreComplete();
}
public void queryStaSus(Sta sta) {
mViewBinding.userCount.setText(String.valueOf(sta.getOperCount()));
mViewBinding.userCountAddTodayTitle.setText(String.valueOf(sta.getOperAddCount()));
}
public void addSusSus(Oper oper) {
onRefresh();
}
public void updateUserSus(Oper oper) {
onRefresh();
}
public void delUserSus() {
onRefresh();
}
}
......@@ -85,7 +85,7 @@ public class RecyclerViewUtil {
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.bottom = mDividerHight + 1;
outRect.top = mDividerHight + 20;
}
@Override
......@@ -109,7 +109,7 @@ public class RecyclerViewUtil {
int bottom = 0;
top = child.getBottom() + params.bottomMargin;
top = child.getTop() - params.topMargin;
bottom = top + mDividerHight;
//画分割线
mDividerDarwable.setBounds(left, top, right, bottom);
......
......@@ -90,8 +90,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingEnd="@dimen/all_padding_left_right"
android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/dp_4"
android:weightSum="2"
app:layout_constraintTop_toBottomOf="@id/view1">
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="onClick"
type="android.view.View.OnClickListener" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:background="@drawable/shape_white"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/editUser"
style="@style/default_bluetext_popbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dtail_hight_5"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClick="@{onClick}"
android:text="编辑店员" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<TextView
style="@style/default_bluetext_popbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dtail_hight_5"
android:id="@+id/delUser"
android:textColor="@color/deep_red"
android:background="@color/white"
android:foreground="?android:attr/actionBarItemBackground"
android:onClick="@{onClick}"
android:text="删除店员" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_marginTop="30dp"
android:background="@drawable/shape_white"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/cancelButton"
style="@style/default_blacktext_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dtail_hight_5"
android:foreground="?android:attr/actionBarItemBackground"
android:onClick="@{onClick}"
android:gravity="center"
android:text="取消" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -74,14 +74,10 @@
android:id="@+id/fragment_casher_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_padding"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white_caocao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -45,34 +45,41 @@
</LinearLayout>
<TextView
android:id="@+id/tv_count"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/singleline_zhouyu_huanggai"
android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/all_padding"
android:text="共0人次盘库记录"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low"
android:textStyle="bold" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_title">
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_inventory"
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu">
android:layout_below="@id/tv_count"
android:layout_marginTop="@dimen/Minus_padding_left_right">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_inventory"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"></android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
<TextView
android:id="@+id/tv_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/singleline_zhouyu_huanggai"
android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/all_padding"
android:text="共0人次盘库记录"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -144,7 +144,7 @@
android:layout_marginTop="@dimen/all_spacing"
android:contentDescription="@string/store_cart"
android:foreground="?attr/actionBarItemBackground"
android:src="@mipmap/shopping_cart" />
android:src="@mipmap/inventory_cart" />
<TextView
android:layout_width="@dimen/store_cart_count"
......
......@@ -51,7 +51,7 @@
<android.support.design.widget.TabLayout
android:id="@+id/tab"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMinWidth="150dp"
app:tabTextColor="@color/black_baozheng">
......@@ -62,8 +62,8 @@
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_margin"
android:background="@drawable/singleline_zhouyu_huanggai" />
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_huanggai" />
<android.support.v4.view.ViewPager
android:id="@+id/fragment_container"
......
......@@ -15,9 +15,9 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler"
android:background="@color/gray_zhouyu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:visibility="visible">
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener" />
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
android:orientation="vertical">
<include
android:id="@+id/info_title"
layout="@layout/title_pop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
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"
android:text="姓名" />
<TextView
android:id="@+id/user_name"
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="111111"
android:textColor="@color/black_likui" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
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"
android:text="帐号" />
<TextView
android:id="@+id/user_phone"
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:gravity="right"
android:text="111111"
android:textColor="@color/black_likui" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@color/white"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="级别" />
<TextView
android:id="@+id/user_Level"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_margin"
android:gravity="right"
android:onClick="@{onClickListener}"
android:textColor="@color/gray_huanggai" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
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>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener" />
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
android:orientation="vertical">
<include
android:id="@+id/info_title"
layout="@layout/title_pop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
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"
android:text="姓名" />
<EditText
android:id="@+id/user_name"
style="@style/dialog_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
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"
android:maxLength="11"
android:text="帐号" />
<EditText
android:id="@+id/user_phone"
android:digits="0123456789"
android:inputType="phone"
style="@style/dialog_edit"
android:maxLength="11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="请输入手机号" />
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@mipmap/camera" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@color/white"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_margin_smallstyle"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:text="级别" />
<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:drawableRight="@mipmap/ic_expand"
android:onClick="@{onClickListener}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line_bg" />
<RelativeLayout
android:layout_width="match_parent"
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:onClick="@{onClickListener}"
android:text="确认" />
</RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -17,11 +17,12 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:orientation="horizontal">
<include
android:id="@+id/title_search"
layout="@layout/title_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
......@@ -49,7 +50,6 @@
android:text="店员数量" />
<TextView
android:id="@+id/vip_count_add_today_title"
style="@style/default_blacktext_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -65,7 +65,7 @@
android:orientation="horizontal">
<TextView
android:id="@+id/vip_count"
android:id="@+id/user_count"
style="@style/default_blacktext_bigstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -75,7 +75,7 @@
android:textStyle="bold" />
<TextView
android:id="@+id/vip_count_add_today"
android:id="@+id/user_count_add_today_title"
style="@style/default_blacktext_bigstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -11,8 +11,8 @@
android:background="@color/white_caocao"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="25dp"
android:paddingTop="25dp">
android:paddingBottom="23.5dp"
android:paddingTop="23.5dp">
<ImageView
android:id="@+id/img"
......
......@@ -45,12 +45,14 @@
<TextView
android:id="@+id/tv_left_top"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_padding_left_right"
android:paddingEnd="@dimen/all_padding"
android:text="1231231244124124"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintEnd_toStartOf="@id/tv_right_top"
app:layout_constraintStart_toEndOf="@id/img_left"
app:layout_constraintTop_toTopOf="@id/img_left" />
......
......@@ -4,26 +4,21 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/img_boss" />
</LinearLayout>
android:background="@mipmap/img_boss" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
......@@ -56,7 +51,8 @@
style="@style/default_gray_huanggaitext_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Today_Income" />
android:text="@string/Today_Income"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
......@@ -64,14 +60,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
android:orientation="vertical">
<TextView
android:id="@+id/vip_level_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="员工"
android:textColor="@color/black"
android:textSize="@dimen/detail_textview_size" />
......
......@@ -13,22 +13,26 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="50dp"
<ImageButton
android:id="@+id/onBack"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@mipmap/go_back" />
android:background="@color/transparent"
android:padding="@dimen/all_padding"
android:src="@mipmap/go_back" />
<EditText
style="@style/editText"
android:id="@+id/serchEditText"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:background="@color/gray_kongming"
android:layout_weight="1"
android:imeOptions="actionSearch"
android:hint="请输入手机号或会员姓名" />
android:layout_height="30dp"
android:layout_marginEnd="@dimen/all_padding"
android:drawablePadding="@dimen/all_padding"
android:hint="请输入手机号或会员姓名"
android:inputType="number"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" />
</LinearLayout>
</LinearLayout>
......
......@@ -53,14 +53,17 @@
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:layout_marginStart="@dimen/all_padding_left_right"
android:layout_marginTop="@dimen/all_margin"
android:padding="@dimen/dp_4">
android:layout_marginTop="@dimen/all_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:orientation="vertical">
android:orientation="vertical"
android:paddingBottom="@dimen/dp_4"
android:paddingEnd="@dimen/all_padding_left_right"
android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/dp_4">
<TextView
android:id="@+id/tv_amt_hint"
......
......@@ -28,13 +28,16 @@
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:layout_marginStart="@dimen/all_padding_left_right"
android:layout_marginTop="@dimen/all_margin"
android:padding="@dimen/dp_4">
android:layout_marginTop="@dimen/all_margin">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingBottom="@dimen/dp_4"
android:paddingEnd="@dimen/all_padding_left_right"
android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
......
......@@ -46,13 +46,16 @@
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:layout_marginStart="@dimen/all_padding_left_right"
android:layout_marginTop="@dimen/all_margin"
android:padding="@dimen/dp_4">
android:layout_marginTop="@dimen/all_margin">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingBottom="@dimen/dp_4"
android:paddingEnd="@dimen/all_padding_left_right"
android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
......
......@@ -24,6 +24,7 @@
<dimen name="all_title_size">26sp</dimen>
<dimen name="all_padding">10dp</dimen>
<dimen name="all_padding_left_right">16dp</dimen>
<dimen name="Minus_padding_left_right">-17dp</dimen>
<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>
......
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