Commit e7875d70 authored by 陈前's avatar 陈前

统计

parent 60dc818c
......@@ -19,7 +19,7 @@
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/main_title"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.splash.SplashActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......@@ -34,7 +34,6 @@
android:name=".ui.login.LoginActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.exception.ErrorDialogActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......@@ -68,7 +67,8 @@
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.help.HelpActivity" />
<activity android:name=".ui.feedback.FeedBackActivity"></activity>
<activity android:name=".ui.feedback.FeedBackActivity" />
<activity android:name=".ui.statistics.StatisticsActivity"></activity>
</application>
</manifest>
\ No newline at end of file
......@@ -19,6 +19,8 @@ public class C {
public static final int MENU_UPDATE = 109;
public static final int MENU_HELP = 110;
public static final int MENU_EXIT = 111;
public static final int MENU_STATISTICS_ORDER = 1051;
public static final int MENU_STATISTICS_MS = 1052;
}
......
......@@ -138,7 +138,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog.dismiss();
//如果sn已经绑定款台,则直接跳转主页
if (loginReturnBean.getBindSN()) {
startActivity(new Intent(LoginActivity.this, IntegralActivity.class));
startActivity(new Intent(LoginActivity.this, MainActivity.class));
LoginActivity.this.finish();
return;
}
......
......@@ -8,6 +8,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityMainBinding;
......@@ -134,6 +135,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
@Override
public void handoverOk() {
mHandoverDialog.dismiss();
ActivityUtils.finishAllActivities();
}
@Override
public void showHandoverDialog() {
mHandoverDialog.show(this);
......
......@@ -7,10 +7,10 @@ import com.xingdata.zzdpos.base.BaseView;
interface MainContract {
interface View extends BaseView {
// /**
// * 交班确认
// */
// void handoverOk();
/**
* 交班确认
*/
void handoverOk();
//
// /**
// * 显示修改密码页面
......@@ -527,10 +527,10 @@ interface MainContract {
// */
// public abstract void clickFeedOk(Feed feed);
//
// /**
// * 注销
// */
// public abstract void logout();
/**
* 注销
*/
public abstract void logout();
//
//
// /**
......
......@@ -12,6 +12,7 @@ import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.HandoverInfo;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
......@@ -29,7 +30,8 @@ import io.reactivex.functions.Function;
public class MainPresenter extends MainContract.Presenter {
public static HandoverInfo handoverInfo;
//
//
// /**
// * 当前的使用的支付方式
// */
......@@ -116,7 +118,7 @@ public class MainPresenter extends MainContract.Presenter {
// this.getMsList();
}
// @Override
// @Override
// public void clickLock() {
// mView.goLockActivity();
// }
......@@ -131,12 +133,12 @@ public class MainPresenter extends MainContract.Presenter {
// mView.showChangePasswordDialog();
// }
//
@Override
public void clickHandover() {
mView.showHandoverDialog();
}
@Override
public void clickHandover() {
mView.showHandoverDialog();
}
//
//
// @Override
// public void clickFeedback() {
// mView.showFeedbackDialog();
......@@ -933,11 +935,11 @@ public void clickHandover() {
@Override
public void clickHandoverOk() {
// logout();
// mView.handoverOk();
logout();
mView.handoverOk();
}
// @Override
// @Override
// public void clickFeedOk(Feed feed) {
// ApiFactory.Feed.addFeed(feed)
// .subscribe(object -> {
......@@ -946,14 +948,14 @@ public void clickHandover() {
// });
// }
//
// @Override
// public void logout() {
// ApiFactory.Test.logout()
// .subscribe(object -> {
// }, throwable -> {
// ToastUtils.showShort(throwable.getMessage());
// });
// }
@Override
public void logout() {
ApiFactory.Test.logout()
.subscribe(object -> {
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
//
// @Override
// public void searchBarHasFocus(boolean isHas) {
......
......@@ -16,6 +16,7 @@ import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.ui.payment.PaymentActivity;
import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.ui.statistics.StatisticsActivity;
import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener;
......@@ -63,7 +64,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
break;
case C.MENU.MENU_STATISTICS://统计
ActivityUtils.startActivity(getActivity(), StatisticsActivity.class);
break;
case C.MENU.MENU_MANAGER://管理
......
......@@ -62,7 +62,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi
ActivityUtils.startActivity(getActivity(), HelpActivity.class);
break;
case C.MENU.MENU_EXIT://退出
mPresenter.clickHandover();
break;
}
......
package com.xingdata.zzdpos.ui.statistics;
import android.os.Bundle;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityStatisticsBinding;
import com.xingdata.zzdpos.ui.statistics.fragment.StatisticsFragment;
public class StatisticsActivity extends BaseActivity<StatisticsPresenter, ActivityStatisticsBinding> implements StatisticsContract.View {
private StatisticsFragment mStatisticsFragment = new StatisticsFragment();
@Override
public int getLayoutId() {
return R.layout.activity_statistics;
}
@Override
public void initView() {
loadRootFragment(R.id.fragment_container, mStatisticsFragment, false, false);
}
}
package com.xingdata.zzdpos.ui.statistics;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
/**
* Created by Administrator on 2017/12/23.
*/
public interface StatisticsContract {
interface View extends BaseView {
}
abstract class Presenter extends BasePresenter<View> {
}
}
package com.xingdata.zzdpos.ui.statistics;
/**
* Created by Administrator on 2017/12/23.
*/
public class StatisticsPresenter extends StatisticsContract.Presenter {
@Override
public void onAttached() {
}
}
package com.xingdata.zzdpos.ui.statistics.fragment;
import android.support.v7.widget.GridLayoutManager;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentStatisticsBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
public class StatisticsFragment extends BaseFragment<MainPresenter, FragmentStatisticsBinding> {
private MenuRecyclerAdapter mMenuRecyclerAdapter;
private List<Integer> integers;
@Override
public int getLayoutId() {
return R.layout.fragment_statistics;
}
@Override
public void initView() {
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
getActivity().finish();
}
});
mViewBinding.icTitle.tvTitle.setText(R.string.menu_statistics);
mViewBinding.fragmentCasherRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 2));
integers = new ArrayList<>();
integers.add(101);
integers.add(102);
mMenuRecyclerAdapter = new MenuRecyclerAdapter(getActivity(), integers);
mMenuRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentCasherRecycler);
mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyMenuItemDecoration(getActivity(), 5, getResources().getColor(R.color.golden_yuji)));
mMenuRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
switch ((int) adapter.getData().get(position)) {
case C.MENU.MENU_VIP://会员
break;
case C.MENU.MENU_RECHARGE://充值
break;
case C.MENU.MENU_MS://营销
break;
case C.MENU.MENU_TICKET://优惠券
break;
case C.MENU.MENU_STATISTICS://统计
break;
case C.MENU.MENU_MANAGER://管理
break;
}
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="versionNo"
type="String" />
</data>
<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"
......@@ -35,10 +42,11 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -70,10 +78,10 @@
android:weightSum="2">
<TextView
style="@style/textView_body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_phone_hint" />
<TextView
......@@ -84,6 +92,7 @@
android:padding="@dimen/all_padding"
android:text="@string/help_phone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -92,10 +101,10 @@
android:weightSum="2">
<TextView
style="@style/textView_body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_code_hint" />
<TextView
......@@ -104,8 +113,9 @@
android:layout_weight="1"
android:gravity="right"
android:padding="@dimen/all_padding"
android:text="@string/help_web" />
android:text="@{versionNo}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -114,10 +124,10 @@
android:weightSum="2">
<TextView
style="@style/textView_body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_word_hint" />
<TextView
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<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">
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<layout>
<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.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/black_zhangfei"
android:gravity="top|center_horizontal"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="32000"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_text_size_big_big" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayAmt_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:textColor="@color/white_caocao" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayOrder_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:textColor="@color/white_caocao" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayRecharge_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:textColor="@color/white_caocao" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayVipAdd_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/fragment_casher_recycler"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white_caocao"
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
......@@ -14,6 +14,7 @@
<dimen name="all_title_size">26sp</dimen>
<dimen name="all_padding">10dp</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>
<dimen name="all_margin_left">15dp</dimen>
<dimen name="title_height">50dp</dimen>
......
......@@ -539,6 +539,13 @@
<string name="handover_bank">银行卡收款:</string>
<string name="handover_vip">储值卡收款:</string>
<!--<string name="handover_vip">储值卡收款</string>-->
<!--统计POS-->
<string name="statistics_hint">统计</string>
<string name="statistics_todayAmt_hint">今日销售额</string>
<string name="statistics_todayOrder_hint">今日订单数</string>
<string name="statistics_todayRecharge_hint">今日充值</string>
<string name="statistics_todayVipAdd_hint">今日新增会员</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment