Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王海
TangKuPos
Commits
79a8a496
Commit
79a8a496
authored
Jan 23, 2018
by
姜敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
20e7bb85
d197c33a
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
379 additions
and
1436 deletions
+379
-1436
app/libs/zx_print_library-debug.aar
app/libs/zx_print_library-debug.aar
+0
-0
app/src/main/java/com/xingdata/zzdpos/ui/main/MainActivity.java
...c/main/java/com/xingdata/zzdpos/ui/main/MainActivity.java
+25
-16
app/src/main/java/com/xingdata/zzdpos/ui/main/MainContract.java
...c/main/java/com/xingdata/zzdpos/ui/main/MainContract.java
+10
-505
app/src/main/java/com/xingdata/zzdpos/ui/main/MainPresenter.java
.../main/java/com/xingdata/zzdpos/ui/main/MainPresenter.java
+25
-850
app/src/main/java/com/xingdata/zzdpos/ui/main/dialog/HandoverDialog.java
...va/com/xingdata/zzdpos/ui/main/dialog/HandoverDialog.java
+3
-1
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/MyselfFragment.java
.../com/xingdata/zzdpos/ui/main/fragment/MyselfFragment.java
+2
-2
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralExchangeFragment.java
...marketing/integral/fragment/IntegralExchangeFragment.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralGetFragment.java
...s/ui/marketing/integral/fragment/IntegralGetFragment.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralIndexFragment.java
...ui/marketing/integral/fragment/IntegralIndexFragment.java
+3
-2
app/src/main/java/com/xingdata/zzdpos/ui/marketing/marketingMenu/MarketingMenuActivity.java
...pos/ui/marketing/marketingMenu/MarketingMenuActivity.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTicketContract.java
.../com/xingdata/zzdpos/ui/sendticke/SendTicketContract.java
+1
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/SendTickerSuccFragment.java
.../zzdpos/ui/sendticke/fragment/SendTickerSuccFragment.java
+18
-2
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
...n/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
+9
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/RechargeSearchFragment.java
...pos/ui/statistics/fragment/ms/RechargeSearchFragment.java
+14
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/TicketSearchFragment.java
...zdpos/ui/statistics/fragment/ms/TicketSearchFragment.java
+14
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderMainFragment.java
...zdpos/ui/statistics/fragment/order/OrderMainFragment.java
+1
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderSearchFragment.java
...pos/ui/statistics/fragment/order/OrderSearchFragment.java
+14
-0
app/src/main/java/com/xingdata/zzdpos/util/DensityUtil.java
app/src/main/java/com/xingdata/zzdpos/util/DensityUtil.java
+27
-0
app/src/main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
.../main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
+4
-2
app/src/main/res/drawable/shape_red_r1_thr.xml
app/src/main/res/drawable/shape_red_r1_thr.xml
+10
-0
app/src/main/res/drawable/up_down_line_gray_bottom.xml
app/src/main/res/drawable/up_down_line_gray_bottom.xml
+16
-0
app/src/main/res/drawable/up_down_line_gray_top.xml
app/src/main/res/drawable/up_down_line_gray_top.xml
+16
-0
app/src/main/res/drawable/up_down_line_white_bottom.xml
app/src/main/res/drawable/up_down_line_white_bottom.xml
+16
-0
app/src/main/res/drawable/up_down_line_white_top.xml
app/src/main/res/drawable/up_down_line_white_top.xml
+16
-0
app/src/main/res/layout/dialog_integral_exchange_setting.xml
app/src/main/res/layout/dialog_integral_exchange_setting.xml
+6
-5
app/src/main/res/layout/dialog_integral_get_setting.xml
app/src/main/res/layout/dialog_integral_get_setting.xml
+25
-14
app/src/main/res/layout/dialog_prompt.xml
app/src/main/res/layout/dialog_prompt.xml
+1
-0
app/src/main/res/layout/fragment_integral_main.xml
app/src/main/res/layout/fragment_integral_main.xml
+1
-1
app/src/main/res/layout/fragment_inventory.xml
app/src/main/res/layout/fragment_inventory.xml
+1
-2
app/src/main/res/layout/fragment_order_search.xml
app/src/main/res/layout/fragment_order_search.xml
+6
-4
app/src/main/res/layout/fragment_send_succ_ticker.xml
app/src/main/res/layout/fragment_send_succ_ticker.xml
+17
-2
app/src/main/res/layout/fragment_send_ticker_vip.xml
app/src/main/res/layout/fragment_send_ticker_vip.xml
+1
-0
app/src/main/res/layout/fragment_ticker_main.xml
app/src/main/res/layout/fragment_ticker_main.xml
+49
-3
app/src/main/res/layout/item_marketing_menu.xml
app/src/main/res/layout/item_marketing_menu.xml
+14
-12
app/src/main/res/layout/item_myself_string.xml
app/src/main/res/layout/item_myself_string.xml
+8
-7
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+1
-1
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/libs/zx_print_library-debug.aar
View file @
79a8a496
No preview for this file type
app/src/main/java/com/xingdata/zzdpos/ui/main/MainActivity.java
View file @
79a8a496
...
@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.ui.main.dialog.HandoverDialog;
...
@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.ui.main.dialog.HandoverDialog;
import
com.xingdata.zzdpos.ui.main.fragment.CasherFragment
;
import
com.xingdata.zzdpos.ui.main.fragment.CasherFragment
;
import
com.xingdata.zzdpos.ui.main.fragment.MyselfFragment
;
import
com.xingdata.zzdpos.ui.main.fragment.MyselfFragment
;
import
com.xingdata.zzdpos.ui.main.fragment.ServiceFragment
;
import
com.xingdata.zzdpos.ui.main.fragment.ServiceFragment
;
import
com.xingdata.zzdpos.ui.splash.dialog.UpgradeDialog
;
import
com.xingdata.zzdpos.util.Global
;
import
com.xingdata.zzdpos.util.Global
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -39,6 +40,7 @@ import io.reactivex.schedulers.Schedulers;
...
@@ -39,6 +40,7 @@ import io.reactivex.schedulers.Schedulers;
public
class
MainActivity
extends
BaseActivity
<
MainPresenter
,
ActivityMainBinding
>
implements
public
class
MainActivity
extends
BaseActivity
<
MainPresenter
,
ActivityMainBinding
>
implements
MainContract
.
View
{
MainContract
.
View
{
public
static
MainActivity
mainActivity
;
public
static
MainActivity
mainActivity
;
UpgradeDialog
upgradeDialog
=
new
UpgradeDialog
();
private
long
mExitTime
;
private
long
mExitTime
;
private
int
[]
titleInts
=
{
R
.
string
.
menu_cashier
,
R
.
string
.
menu_service
,
R
.
string
.
menu_myself
};
private
int
[]
titleInts
=
{
R
.
string
.
menu_cashier
,
R
.
string
.
menu_service
,
R
.
string
.
menu_myself
};
private
int
[]
iconList
=
{
R
.
mipmap
.
icon_menu_cashier_1
,
R
.
mipmap
.
icon_menu_service_0
,
R
private
int
[]
iconList
=
{
R
.
mipmap
.
icon_menu_cashier_1
,
R
.
mipmap
.
icon_menu_service_0
,
R
...
@@ -83,26 +85,26 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -83,26 +85,26 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
}
}).
subscribeOn
(
Schedulers
.
newThread
()).
observeOn
(
AndroidSchedulers
.
mainThread
())
}).
subscribeOn
(
Schedulers
.
newThread
()).
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
Consumer
<
View
>()
{
.
subscribe
(
new
Consumer
<
View
>()
{
int
i
=
0
;
int
i
=
0
;
@Override
@Override
public
void
accept
(
View
view
)
throws
Exception
{
public
void
accept
(
View
view
)
throws
Exception
{
ItemMenuBottomBinding
itemMenuBottomBinding
=
DataBindingUtil
.
bind
(
view
);
ItemMenuBottomBinding
itemMenuBottomBinding
=
DataBindingUtil
.
bind
(
view
);
itemMenuBottomBinding
.
text
.
setText
(
titleInts
[
i
]);
itemMenuBottomBinding
.
text
.
setText
(
titleInts
[
i
]);
if
(
i
==
0
)
{
if
(
i
==
0
)
{
itemMenuBottomBinding
.
text
.
setTextColor
(
getResources
().
getColor
(
R
.
color
itemMenuBottomBinding
.
text
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
red_guanyu
));
.
red_guanyu
));
}
}
itemMenuBottomBinding
.
img
.
setImageResource
(
iconList
[
i
]);
itemMenuBottomBinding
.
img
.
setImageResource
(
iconList
[
i
]);
itemMenuBottomBindings
.
add
(
itemMenuBottomBinding
);
itemMenuBottomBindings
.
add
(
itemMenuBottomBinding
);
itemMenuBottomBinding
.
getRoot
().
setMinimumHeight
(
200
);
itemMenuBottomBinding
.
getRoot
().
setMinimumHeight
(
200
);
mViewBinding
.
tabLayout
.
getTabAt
(
i
).
setCustomView
(
view
);
mViewBinding
.
tabLayout
.
getTabAt
(
i
).
setCustomView
(
view
);
i
++;
i
++;
}
}
});
});
mViewBinding
.
tabLayout
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
mViewBinding
.
tabLayout
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
...
@@ -200,4 +202,11 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -200,4 +202,11 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
return
super
.
dispatchTouchEvent
(
ev
);
return
super
.
dispatchTouchEvent
(
ev
);
}
}
@Override
public
void
showUptateDialog
(
String
updateUrl
,
String
version
)
{
upgradeDialog
.
setupdateData
(
updateUrl
,
version
);
upgradeDialog
.
show
(
this
);
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/main/MainContract.java
View file @
79a8a496
...
@@ -8,509 +8,32 @@ interface MainContract {
...
@@ -8,509 +8,32 @@ interface MainContract {
interface
View
extends
BaseView
{
interface
View
extends
BaseView
{
void
isShowLoading
(
Boolean
is
);
void
isShowLoading
(
Boolean
is
);
void
showUptateDialog
(
String
updateUrl
,
String
version
);
/**
/**
* 交班确认
* 交班确认
*/
*/
void
handoverOk
();
void
handoverOk
();
//
// /**
// * 显示修改密码页面
// */
// void showChangePasswordDialog();
//
/**
/**
* 显示交班报表页面
* 显示交班报表页面
*/
*/
void
showHandoverDialog
();
void
showHandoverDialog
();
//
// /**
// * 显示反馈页面
// */
// void showFeedbackDialog();
//
// /**
// * 前往锁屏模块
// */
// void goLockActivity();
//
// /**
// * 显示文字内容
// *
// * @param msg 要显示的内容
// */
// void showMsg(String msg);
//
//
// /**
// * 显示文字内容
// *
// * @param resMsg 要显示内容的res地址
// */
// void showMsg(int resMsg);
//
// /**
// * 加载商店的商品分组列表
// *
// * @param sskugrpList 商品分组
// */
// void loadStoreGroups(List<Sskugrp> sskugrpList);
//
//
// /**
// * 加载分组状态
// *
// * @param skugrpId 分组状态
// */
// void loadStoreGroupState(Long skugrpId);
//
// /**
// * 加载商店的商品列表
// *
// * @param ssskuList 商品列表
// * @param isRefresh 是否刷新
// */
// void loadStoreProducts(List<Sssku> ssskuList, boolean isRefresh);
//
// /**
// * 加载商店的组合商品列表
// *
// * @param usskuList 组合商品列表
// */
// void loadStoreUProducts(List<Ussku> usskuList);
//
//
// /**
// * 加载换购列表
// *
// * @param giftList 换购列表
// */
// void loadGifts(List<Gift> giftList);
//
// /**
// * 加载购物车的商品列表
// *
// * @param saledetailList 商品列表
// */
// void loadCartProducts(List<Saledetail> saledetailList);
//
// /**
// * 加载结算信息
// *
// * @param payList 购物渠道列表
// * @param vip 会员信息
// * @param orderInfo 订单信息
// */
// void loadSettleInfo(List<Pay> payList, Vip vip, Saleorder orderInfo);
//
// /**
// * 加载优惠卷信息
// *
// * @param ticketList 优惠卷列表
// */
// void loadTicket(List<Ticket> ticketList);
//
// /**
// * 添加进购物车
// *
// * @param position 商品详情的position
// */
// void addCartProduct(int position);
//
// /**
// * 更新购物车数据
// *
// * @param position 商品详情的position
// */
// void updateCartProduct(int position);
//
// /**
// * 删除购物车数据
// *
// * @param position 商品详情的position
// */
// void deleteCartProduct(int position);
//
//
// /**
// * 加载订单信息
// *
// * @param saleorder 订单信息
// */
// void loadOrderInfo(Saleorder saleorder);
//
// /**
// * 加载会员信息
// *
// * @param vip 会员信息
// */
// void loadVipInfo(Vip vip);
//
// /**
// * 显示结算页面
// */
// void showSettleFragment();
//
// /**
// * 返回商店页面
// */
// void showStoreFragment();
//
// /**
// * 显示兑奖界面
// */
// void showAwardDialog();
//
// /**
// * 显示会员添加页面
// */
// void showVipAddDialog();
//
// /**
// * 显示卡片查询页面
// */
// void showCardUsingDialog();
//
// /**
// * 控制是否显示添加会员入口
// */
// void showVipAddNewText(boolean is);
//
// /**
// * 显示会员添加页面的新增会员页面
// */
// void showVipAddNewView(Vip vip);
//
// /**
// * 显示会员详情页面
// */
// void showVipMessageDialog(Vip vip, Saleorder saleorder);
//
// /**
// * 显示卡片密码输入界面
// */
// void showInputPassWord(String card);
//
// /**
// * 显示无码商品页面
// */
// void showNoBarcodeDialog();
//
// /**
// * 显示抹零页面
// *
// * @param saleorder 订单信息
// */
// void showDisChangeDialog(Saleorder saleorder);
//
// /**
// * 显示购物车商品详情页面
// *
// * @param saledetail 商品详情
// */
// void showCartDetailDialog(Saledetail saledetail);
//
// /**
// * 显示商店商品详情页面
// *
// * @param ssskuList 标准商品信息列表
// * @param usskuList 组合商品信息列表
// */
// void showStoreDetailDialog(List<Sssku> ssskuList, List<Ussku> usskuList);
//
// /**
// * 关闭弹窗
// *
// * @param clazz 要关闭的弹窗
// */
// void dismissDialog(Class clazz);
//
// /**
// * 关闭所有弹窗
// */
// void dismissAllDialog();
//
// /**
// * 切换支付密码
// */
// void changePayPassword(String password);
//
// /**
// * 改变订单锁定状态
// *
// * @param isLock 是否锁定
// */
// void changeOrderLockState(boolean isLock);
//
// /**
// * 改变购物车下端按钮状态
// */
// void changeCartButtons();
//
// /**
// * 显示读取对话框
// */
// void showLoadingDialog();
//
// /**
// * 隐藏读取对话框
// */
// void dismissLoadingDialog();
//
//
// /**
// * 改变挂单数量
// *
// * @param pendingList 挂单的数量
// */
// void loadPending(List<List<Saledetail>> pendingList);
}
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
// /**
// * 菜单EXIT页面 - 点击修改密码 打开修改密码页面
// */
// public abstract void clickChangePassword();
//
/**
/**
* 菜单EXIT页面 - 点击交班 打开交班报表页面
* 菜单EXIT页面 - 点击交班 打开交班报表页面
*/
*/
public
abstract
void
clickHandover
();
public
abstract
void
clickHandover
();
//
//
/**
// /**
* 检测升级
// * 菜单Help页面 - 点击反馈 打开反馈页面
*/
// */
abstract
void
checkUpdate
();
// public abstract void clickFeedback();
//
// /**
// * 菜单Help页面 - 点击锁屏 前往锁屏模块
// */
// public abstract void clickLock();
//
// /**
// * 菜单页面 - 点击打开兑奖
// */
// public abstract void clickAward();
//
// /**
// * 商品页面 - 获取商品列表
// */
// public abstract void getGroups();
//
// /**
// * 商品页面 - 刷新商品
// */
// public abstract void refreshProduct();
//
// /**
// * 商品页面 - 加载更多商品
// */
// public abstract void loadMoreProduct();
//
// /**
// * 商品页面 - 搜索商品
// *
// * @param keyword 搜索用的关键字
// */
// public abstract void searchProduct(String keyword);
//
// /**
// * 商品页面 - 切换分组
// *
// * @param sskugrp 分组
// */
// public abstract void clickGroup(Sskugrp sskugrp);
//
// /**
// * 商品页面 - 点击商店里的商品
// *
// * @param sku 商品
// */
// public abstract <T extends BaseSku> void clickProductInStore(T sku);
//
//
// /**
// * 商品详情页面 - 确认选择商品
// *
// * @param sku 选择的商品
// */
// public abstract <T extends BaseSku> void selectProductInStoreDetail(T sku);
//
//
// /**
// * 购物车页面 - 点击购物车里的商品
// *
// * @param saledetail 商品明细信息
// */
// public abstract void clickProductInCart(Saledetail saledetail);
//
// /**
// * 购物车页面 - 点击结算
// */
// public abstract void clickSettle();
//
// /**
// * 购物车页面 - 点击显示会员
// */
// public abstract void clickShowVip();
//
// /**
// * 购物车页面 - 点击显示无码商品
// */
// public abstract void clickShowNoBarcode();
//
// /**
// * 购物车页面 - 点击会员退出登录
// */
// public abstract void clickLogOut();
//
// /**
// * 购物车页面 - 清空数据
// */
// public abstract void clearAll();
//
// /**
// * 购物车页面 - 挂单/取单
// */
// public abstract void clickPending();
//
// /**
// * 购物车页面 - 抹零
// */
// public abstract void clickDisChange();
//
// /**
// * 购物车详情页面 - 删除商品
// *
// * @param saledetail 要删除的商品
// */
// public abstract void deleteProduct(Saledetail saledetail);
//
// /**
// * 购物车详情页面 - 修改商品数量
// *
// * @param saledetail 要删除的商品
// */
// public abstract void setProductCount(Saledetail saledetail);
//
// /**
// * 购物车页面 - 购物车发生变化
// */
// public abstract void cartChanged();
//
// /**
// * 会员界面 - 查找会员
// *
// * @param keyword 搜索关键字
// */
// public abstract void searchVip(String keyword);
//
// /**
// * 会员界面 - 新增会员
// */
//
//
// public abstract void addVip(Vip vip);
//
// /**
// * 会员详情页面 - 初始化
// */
// public abstract void initVipMessage();
//
// /**
// * 会员详情页面 - 提交优惠信息
// *
// * @param ticket 使用的优惠卷
// * @param isUsePoint 是否使用积分
// */
// public abstract void commitDisInfo(Ticket ticket, boolean isUsePoint);
//
// /**
// * 无码页面 - 添加无码商品
// *
// * @param amt 金额
// * @param remark 备注
// */
// public abstract void addNoBarcodeProduct(Long amt, String remark);
//
//
// /**
// * 抹零页面 - 提交抹零金额
// *
// * @param disAmt 抹掉的金额
// */
// public abstract void commitDisAmt(Long disAmt);
//
// /**
// * 结算页面 - 初始化
// */
// public abstract void initSettle();
//
// /**
// * 结算页面 - 切换支付渠道
// */
// public abstract void selectedPayChannel(int payType);
//
// /**
// * 结算页面 - 现金支付
// *
// * @param inputAmt 输入金额
// * @param changeAmt 找零金额
// */
// public abstract void payInCash(Long inputAmt, Long changeAmt);
//
// /**
// * 结算页面 - 支付宝支付
// *
// * @param payCode 支付码
// */
// public abstract void payInAli(String payCode);
//
// /**
// * 结算页面 - 微信支付
// *
// * @param payCode 支付码
// */
// public abstract void payInWechat(String payCode);
//
// /**
// * 结算页面 - 银行卡支付
// */
// public abstract void payInBank();
//
// /**
// * 结算页面 - 储值卡
// *
// * @param cardNo 卡号
// * @param password 密码
// */
// public abstract void payInCard(Long cardNo, String password);
//
// /**
// * 结算页面 - 赊账
// */
// public abstract void payInTally();
//
// /**
// * 结算页面 - 取消结算
// */
// public abstract void cancelPay();
//
// /**
// * 储值卡界面 - 查询卡
// *
// * @param keyword 搜索全卡号
// */
// public abstract void searchCard(String keyword);
//
// /**
// * 同步所有表
// */
// public abstract void sync(SplashPresenter.SynchronousTask synchronousTask);
//
/**
/**
* 初始化交班记录
* 初始化交班记录
...
@@ -521,30 +44,12 @@ interface MainContract {
...
@@ -521,30 +44,12 @@ interface MainContract {
* 交班确认
* 交班确认
*/
*/
public
abstract
void
clickHandoverOk
();
public
abstract
void
clickHandoverOk
();
//
// /**
// * 点击换购确定按钮
// */
// public abstract void clickGiftConfirm(Gift gift);
//
// /**
// * 反馈确认
// */
// public abstract void clickFeedOk(Feed feed);
//
/**
/**
* 注销
* 注销
*/
*/
public
abstract
void
logout
();
public
abstract
void
logout
();
//
//
// /**
// * 搜索框获取焦点
// *
// * @param isHas 是否获取焦点
// */
// public abstract void searchBarHasFocus(boolean isHas);
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/main/MainPresenter.java
View file @
79a8a496
...
@@ -6,6 +6,7 @@ import android.view.KeyEvent;
...
@@ -6,6 +6,7 @@ import android.view.KeyEvent;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.AppUtils
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.SPUtils
;
import
com.blankj.utilcode.util.SPUtils
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.blankj.utilcode.util.StringUtils
;
...
@@ -16,6 +17,7 @@ import com.xingdata.zzdpos.api.ApiFactory;
...
@@ -16,6 +17,7 @@ import com.xingdata.zzdpos.api.ApiFactory;
import
com.xingdata.zzdpos.db.DBFactory
;
import
com.xingdata.zzdpos.db.DBFactory
;
import
com.xingdata.zzdpos.model.HandoverInfo
;
import
com.xingdata.zzdpos.model.HandoverInfo
;
import
com.xingdata.zzdpos.ui.login.LoginPresenter
;
import
com.xingdata.zzdpos.ui.login.LoginPresenter
;
import
com.xingdata.zzdpos.util.SystemUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -31,846 +33,18 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -31,846 +33,18 @@ public class MainPresenter extends MainContract.Presenter {
public
static
HandoverInfo
handoverInfo
;
public
static
HandoverInfo
handoverInfo
;
//
// /**
// * 当前的使用的支付方式
// */
// private int mPayType;
// /**
// * 当前的营销活动列表
// */
// private List<Ms> mMsList;
//
// /**
// * 当前设备的支付渠道信息
// */
// private List<Pay> mPayChannels;
//
// /**
// * 当前购物车的商品明细
// */
// private List<Saledetail> mCartProducts;
//
// /**
// * 当前订单信息
// */
// private Saleorder mOrderInfo;
//
// /**
// * 当前会员
// */
// private Vip mVip;
//
// /**
// * 当前页码
// */
// private int mPageNum;
//
// /**
// * 当前的搜索关键字
// */
// private String mKeyword;
//
// /**
// * 当前的分组Id
// */
// private Long mSkuGrpId;
//
// /**
// * 挂单列表 - 购物车
// */
// private List<List<Saledetail>> mPendingCarts;
// /**
// * 挂单列表 - 会员
// */
// private List<Vip> mPendingVips;
//
// /**
// * 换购商品列表
// */
// private List<Gift> mGiftList;
//
// /**
// * 扫描工具
// */
// private ScannerUtil mScannerUtil;
//
//
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
this
.
initRealm
();
this
.
initRealm
();
// mVip = Vip.createDefault();
// mCartProducts = new ArrayList<>();
// mOrderInfo = new Saleorder();
//
// mMsList = new ArrayList<>();
// mGiftList = new ArrayList<>();
// mPendingCarts = new ArrayList<>();
// mPendingVips = new ArrayList<>();
//
// //注册扫码枪监听
// mScannerUtil = new ScannerUtil(this::scanComplete);
//
// //获取支付渠道信息
// this.getPayChannels();
// //获取营销活动信息
// this.getMsList();
}
}
// @Override
// public void clickLock() {
// mView.goLockActivity();
// }
//
// @Override
// public void clickAward() {
// mView.showAwardDialog();
// }
//
// @Override
// public void clickChangePassword() {
// mView.showChangePasswordDialog();
// }
//
@Override
@Override
public
void
clickHandover
()
{
public
void
clickHandover
()
{
mView
.
showHandoverDialog
();
mView
.
showHandoverDialog
();
}
}
//
// @Override
// public void clickFeedback() {
// mView.showFeedbackDialog();
// }
//
// @Override
// public void getGroups() {
// mCompositeDisposable.add(
// DBFactory.Main.queryGroups().subscribe(
// sskugrps -> {
// Sskugrp sskugrp = new Sskugrp();
// sskugrp.setSkuGrpId(-1L);
// sskugrp.setSkuGrpName("组合商品");
// sskugrp.setSelected(false);
// sskugrps.add(0, sskugrp);
//
// sskugrp = new Sskugrp();
// sskugrp.setSkuGrpId(0L);
// sskugrp.setSkuGrpName("全部商品");
// sskugrp.setSelected(true);
// sskugrps.add(0, sskugrp);
//
// mView.loadStoreGroups(sskugrps);
// })
// );
// }
//
// @Override
// public void refreshProduct() {
// this.mPageNum = 0;
// this.mSkuGrpId = 0L;
// this.mKeyword = "";
// mView.loadStoreGroupState(mSkuGrpId);
// this.getProducts();
// }
//
// @Override
// public void loadMoreProduct() {
// this.mPageNum++;
// this.getProducts();
// }
//
// @Override
// public void searchProduct(String keyword) {
// this.mPageNum = 0;
// this.mKeyword = keyword;
// this.getProducts();
// }
//
// @Override
// public void clickGroup(Sskugrp sskugrp) {
// this.mPageNum = 0;
// this.mSkuGrpId = sskugrp.getSkuGrpId();
// mView.loadStoreGroupState(mSkuGrpId);
// if (mSkuGrpId < 0) this.getUProducts();
// else this.getProducts();
// }
//
// @Override
// public <T extends BaseSku> void clickProductInStore(T sku) {
// addProductToCart(sku);
// }
//
// @Override
// public <T extends BaseSku> void selectProductInStoreDetail(T sku) {
// addProductToCart(sku);
// }
//
//
// @Override
// public void clickProductInCart(Saledetail saledetail) {
// mView.showCartDetailDialog(saledetail);
// }
//
// @Override
// public void clickSettle() {
// mView.showSettleFragment();
// }
//
//
// @Override
// public void clickShowVip() {
// if (mVip.isDefaultVip()) {
// mView.showVipAddDialog();
// } else {
// mView.showVipMessageDialog(mVip, mOrderInfo);
// }
// }
//
// @Override
// public void clickShowNoBarcode() {
// mView.showNoBarcodeDialog();
// }
//
//
// @Override
// public void clickLogOut() {
// this.setVip(Vip.createDefault());
// }
//
// @Override
// public void clearAll() {
// clearOrder();
// clearVip();
// clearCart();
// clearPending();
// clearCart();
// }
//
// @Override
// public void clickPending() {
// if (mPendingCarts.size() == 0) {
// mPendingCarts.add(mCartProducts);
// mPendingVips.add(mVip);
//
// this.mVip = Vip.createDefault();
// this.mCartProducts = new ArrayList<>();
//
// mView.loadCartProducts(this.mCartProducts);
// mView.loadVipInfo(this.mVip);
//
// sendToViceScreen(ViceScreenMessageManager.VICE_VIP_INFO, this.mVip);
// sendToViceScreen(ViceScreenMessageManager.VICE_LIST, this.mCartProducts);
// } else {
// this.mCartProducts = mPendingCarts.get(0);
// this.mVip = mPendingVips.get(0);
//
// mView.loadCartProducts(this.mCartProducts);
// mView.loadVipInfo(this.mVip);
//
// sendToViceScreen(ViceScreenMessageManager.VICE_VIP_INFO, this.mVip);
// sendToViceScreen(ViceScreenMessageManager.VICE_LIST, this.mCartProducts);
//
// mPendingCarts.clear();
// mPendingVips.clear();
//
// }
// mView.loadPending(mPendingCarts);
// }
//
// @Override
// public void clickDisChange() {
// mView.showDisChangeDialog(mOrderInfo);
// }
//
//
// private boolean isEqual(Saledetail o1, Saledetail o2) {
// return o1.getSkuId().longValue() == o2.getSkuId() &&
// (o1.getMsId() == null || (o2.getMsId() != null && o1.getMsId().longValue() == o2.getMsId()));
// }
//
// @Override
// public void deleteProduct(Saledetail saledetail) {
// for (int i = 0; i < mCartProducts.size(); i++) {
// if (isEqual(mCartProducts.get(i), saledetail)) {
// mCartProducts.remove(saledetail);
// mView.deleteCartProduct(i);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ITEM_DEL, i);
// break;
// }
// }
// }
//
// @Override
// public void setProductCount(Saledetail saledetail) {
// for (int i = 0; i < mCartProducts.size(); i++) {
// if (isEqual(mCartProducts.get(i), saledetail)) {
// if (saledetail.getMsId() != null && saledetail.getMsId() > 0) return;
// mCartProducts.set(i, saledetail);
// mView.updateCartProduct(i);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ITEM_UPDATA, i);
// break;
// }
// }
// }
//
// @Override
// public void cartChanged() {
// //重置商品
// for (int i = 0; i < mMsList.size(); i++) {
// mMsList.get(i).setSaledetailList(new ArrayList<>());
// }
//
// //添加商品
// for (int i = 0; i < mCartProducts.size(); i++) {
// for (int j = 0; j < mMsList.size(); j++) {
// if (!mMsList.get(j).isAvailable(mVip)) continue;
// if (mMsList.get(j).addSaledetail(mCartProducts.get(i))) break;
// }
// }
// Ms.OnApplyListener onApplyListener = new Ms.OnApplyListener() {
//
// @Override
// public void setDis(Ms ms) {
// mOrderInfo.addMsDis(ms);
// }
//
// @Override
// public void addGift(Long msId, Long skuId, long addAmt) {
// mCompositeDisposable.add(
// DBFactory.Main.queryProductBySkuId(skuId)
// .subscribe(ssskuList -> {
// if (ssskuList.size() == 0) return;
// for (int i = 0; i < mGiftList.size(); i++) {
// if (mGiftList.get(i).getMsId().longValue() == msId) {
// return;
// }
// }
// mGiftList.add(new Gift(msId, ssskuList.get(0), addAmt));
// mView.loadGifts(mGiftList);
// })
// );
// }
//
// @Override
// public void removeGift(Long msId) {
// for (int i = 0; i < mGiftList.size(); i++) {
// if (mGiftList.get(i).getMsId().longValue() == msId) {
// mGiftList.remove(i);
// mView.loadGifts(mGiftList);
// break;
// }
// }
// for (int i = 0; i < mCartProducts.size(); i++) {
// if (mCartProducts.get(i).getMsId() > 0 && mCartProducts.get(i).getMsId()
// .longValue() == msId) {
// mCartProducts.remove(i);
// mView.deleteCartProduct(i);
// MainPresenter.this.sendToViceScreen(ViceScreenMessageManager
// .VICE_ITEM_DEL, i);
// break;
// }
// }
// }
// };
//
// //判断
// for (int i = 0; i < mMsList.size(); i++) {
// mMsList.get(i).setOnApplyListener(onApplyListener);
// mMsList.get(i).execute();
// }
//
// mOrderInfo.setSaledetails(mCartProducts).settle();
// mView.loadOrderInfo(mOrderInfo);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ORDERINFO, mOrderInfo);
// }
//
//
// @Override
// public void searchVip(String keyword) {
// mView.showLoadingDialog();
// ApiFactory.User.queryUserDetailByKeyword(keyword)
// .doOnSubscribe(vip -> mView.dismissLoadingDialog())
// .subscribe(vip -> {
// mVip = vip;
// if (vip.getVipLevel() > 0) {
// setVip(mVip);
// mView.showVipMessageDialog(mVip, mOrderInfo);
// } else {
//
// mView.showVipAddNewView(mVip);
// }
// }, throwable -> mView.showVipAddNewText(true));
// }
//
// @Override
// public void addVip(Vip vip) {
// //新增会员
// ApiFactory.User.addVip(vip).subscribe(
// this::setVip
// , throwable -> {
// LogUtils.e("失败 : " + throwable.getMessage());
// ToastUtils.showLong("失败 : " + throwable.getMessage());
// });
// }
//
// @Override
// public void initVipMessage() {
// //获取优惠卷列表
// ApiFactory.Ticket.query(mVip.getVipId()).subscribe(
// tickets -> mView.loadTicket(tickets),
// throwable -> {
// }
// );
// }
//
// @Override
// public void commitDisInfo(Ticket ticket, boolean isUsePoint) {
// mOrderInfo.setTicket(ticket).setBound(isUsePoint, mVip.getBoundCbal()).settle();
// mView.loadOrderInfo(mOrderInfo);
// }
//
// @Override
// public void addNoBarcodeProduct(Long amt, String remark) {
// mCartProducts.add(0, Saledetail.create(remark, amt, mVip));
// mView.addCartProduct(0);
// }
//
// @Override
// public void commitDisAmt(Long disAmt) {
// mOrderInfo.setDisChange(disAmt).settle();
// mView.loadOrderInfo(mOrderInfo);
// }
//
// @Override
// public void initSettle() {
// mView.loadSettleInfo(mPayChannels, mVip, mOrderInfo);
// }
//
// @Override
// public void selectedPayChannel(int payType) {
// switch (payType) {
// case C.PAY_CHANNEL.CARD:
// case C.PAY_CHANNEL.TALLY:
// this.sendToViceScreen(ViceScreenMessageManager.VICE_PASSWORD, true);
// break;
// default:
// this.sendToViceScreen(ViceScreenMessageManager.VICE_PASSWORD, false);
// break;
// }
// }
//
//
// @Override
// public void payInCash(Long inputAmt, Long changeAmt) {
// this.mPayType = C.PAY_CHANNEL.CASH;
// if (mCartProducts.size() == 0) return;
// subscribePay(commitOrder()
// .flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mOrderInfo.pay(orderNo, C.PAY_CHANNEL.CASH)))
// );
// }
//
// @Override
// public void payInAli(String payCode) {
// this.mPayType = C.PAY_CHANNEL.ALI;
// if (mCartProducts.size() == 0) return;
// subscribePay(commitOrder().flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String s) throws Exception {
// //TODO 支付宝支付
// return Observable.just(s);
// }
// }).flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String orderNo) throws Exception {
// return ApiFactory.Saleorder.addOrderPayMis(mOrderInfo.pay(orderNo, C.PAY_CHANNEL.CASH, payCode));
// }
// }));
// }
//
// @Override
// public void payInWechat(String payCode) {
// this.mPayType = C.PAY_CHANNEL.WECHAT;
// if (mCartProducts.size() == 0) return;
// subscribePay(commitOrder().flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String s) throws Exception {
// //TODO 微信支付
// return Observable.just(s);
// }
// }).flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String orderNo) throws Exception {
// return ApiFactory.Saleorder.addOrderPayMis(mOrderInfo.pay(orderNo, C.PAY_CHANNEL.CASH, payCode));
// }
// }));
// }
//
// @Override
// public void payInBank() {
// this.mPayType = C.PAY_CHANNEL.BANK;
// if (mCartProducts.size() == 0) return;
// subscribePay(commitOrder().flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String s) throws Exception {
// //TODO 银行卡支付
// return Observable.just(s);
// }
// }).flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String orderNo) throws Exception {
// return ApiFactory.Saleorder.addOrderPayMis(mOrderInfo.pay(orderNo, C.PAY_CHANNEL.BANK));
// }
// }));
// }
//
// @Override
// public void payInCard(Long cardNo, String password) {
// this.mPayType = C.PAY_CHANNEL.CARD;
// if (mCartProducts.size() == 0) return;
// subscribePay(ApiFactory.Recard.checkPwd(mVip.getVipId(), String.valueOf(cardNo),
// password).flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String s) throws Exception {
// return commitOrder();
// }
// }).flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String orderNo) throws Exception {
// return ApiFactory.Saleorder.addOrderPayMis(mOrderInfo.pay(orderNo, C.PAY_CHANNEL.CARD, String.valueOf(cardNo)));
// }
// }));
// }
//
// @Override
// public void payInTally() {
// this.mPayType = C.PAY_CHANNEL.TALLY;
// if (mCartProducts.size() == 0) return;
// subscribePay(commitOrder().flatMap(new Function<String, ObservableSource<String>>() {
// @Override
// public ObservableSource<String> apply(String orderNo) throws Exception {
// return ApiFactory.Saleorder.addOrderPayMis(mOrderInfo.pay(orderNo, C.PAY_CHANNEL.TALLY));
// }
// }));
//
// }
//
// @Override
// @Deprecated
// public void searchCard(String keyword) {
// //这一版没有使用其他卡交易的选项
// }
//
// @Override
// public void sync(SplashPresenter.SynchronousTask synchronousTask) {
// //同步请求前,置空同步过程的错误信息
// SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORCODE, "");
// SPUtils.getInstance().put(SplashActivity.SYNCHRONOUSERRORMSG, "");
// for (int i = 0; i < SplashPresenter.listSync.size(); i++) {
// ApiFactory.Sync.allDownload(SplashPresenter.listSync.get(i), synchronousTask, (100.00 / SplashPresenter.listSync.size()));
// }
// }
//
//
// @Override
// public void dispatchKeyEvent(KeyEvent event) {
// mScannerUtil.analysisKeyEvent(event);
// super.dispatchKeyEvent(event);
// }
//
//
// /**
// * 设置会员
// *
// * @param vip 会员信息
// */
// private void setVip(Vip vip) {
// this.mVip = vip;
// for (int i = 0; i < mCartProducts.size(); i++) mCartProducts.get(i).setVip(mVip);
// if (vip.getBoundCbal() != null) {
// //清空优惠券和积分
// mOrderInfo.setBound(false, vip.getBoundCbal()).setTicket(Ticket.defualt()).settle();
// }
// //发送到副屏
// this.sendToViceScreen(ViceScreenMessageManager.VICE_VIP_INFO, vip);
// //加载购物车信息
// mView.loadCartProducts(mCartProducts);
// //加载会员信息
// mView.loadVipInfo(mVip);
// //关闭对话框
// mView.dismissDialog(VipAddDialog.class);
// }
//
// /**
// * 扫描成功
// *
// * @param barcode 条形码
// */
// private void scanComplete(String barcode) {
// getProductByBarcode(barcode);
// }
//
// /**
// * 根据条形码获取商品
// *
// * @param barcode 条形码
// */
// private void getProductByBarcode(String barcode) {
// mView.showLoadingDialog();
// List<Sssku> ssskus = DBFactory.getList(DB.getInstance().get(MainPresenter.class).where
// (Sssku.class)
// .equalTo("spuBarcode", StringUtil.strToLong(barcode))
// .equalTo("skuStatus", 0)
// .findAll());
// List<Ussku> usskus = DBFactory.getList(DB.getInstance().get(MainPresenter.class).where
// (Ussku.class)
// .equalTo("spuBarcode", StringUtil.strToLong(barcode))
// .equalTo("skuStatus", 0)
// .findAll());
// if (ssskus.size() + usskus.size() > 1) {
// mView.showStoreDetailDialog(ssskus, usskus);
// } else if (ssskus.size() == 1 && usskus.size() == 0) {
// this.addProductToCart(ssskus.get(0));
// } else if (ssskus.size() == 0 && usskus.size() == 1) {
// this.addProductToCart(usskus.get(0));
// } else {
// mView.showMsg(R.string.store_scan_empty_hint);
// }
// mView.dismissLoadingDialog();
// }
//
// /**
// * 添加商品进购物车
// *
// * @param sku 要添加的商品
// */
// private <T extends BaseSku> void addProductToCart(T sku) {
// for (int i = 0; i < mCartProducts.size(); i++) {
// if (sku.getSkuId().longValue() == mCartProducts.get(i).getSkuId()
// && (mCartProducts.get(i).getMsId() == null || mCartProducts.get(i).getMsId() == 0)) {
// if (mCartProducts.get(i).getDetailCnt() >= 99) return;
// mCartProducts.get(i).setCount(mCartProducts.get(i).getDetailCnt() + 1);
// mView.updateCartProduct(i);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ITEM_UPDATA, i);
// return;
// }
// }
// Saledetail saledetail = Saledetail.create(sku, mVip);
// mCartProducts.add(0, saledetail);
// mView.addCartProduct(0);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ITEM_ADD, 0);
// }
//
//
// /**
// * 获取商品列表
// */
// private void getProducts() {
// mView.showLoadingDialog();
//
// mCompositeDisposable.add(
// DBFactory.Main.queryProducts(mPageNum, mKeyword, mSkuGrpId)
// .doOnSubscribe(subscription -> mView.dismissLoadingDialog())
// .subscribe(ssskus -> {
// if (mPageNum == 0) getMsList();
// mView.loadStoreProducts(ssskus, mPageNum == 0);
// })
// );
// }
//
// /**
// * 获取组合商品
// */
// private void getUProducts() {
// mView.showLoadingDialog();
//
// mCompositeDisposable.add(
// DBFactory.Main.queryUProducts()
// .doOnSubscribe(subscription -> mView.dismissLoadingDialog())
// .subscribe(usskus -> {
// if (mSkuGrpId < 0) mView.loadStoreUProducts(usskus);
// })
// );
// }
//
//
// /**
// * 发送信息到副屏
// */
// public void sendToViceScreen(int type, Object object) {
// Message message = new Message();
// message.what = type;
// message.obj = object;
// App.instance.viceScreenMessageManager.sendMessageToViceScreen(message);
// }
//
//
// /**
// * 获取支付渠道
// */
// private void getPayChannels() {
// mCompositeDisposable.add(
// DBFactory.Main.queryPays().subscribe(
// pays -> {
// mPayChannels = new ArrayList<>();
// mPayChannels.addAll(pays);
// for (int i = 0; i < mPayChannels.size(); i++) {
// mPayChannels.get(i).init();
// }
// }
// )
// );
// }
//
// /**
// * 获取营销活动
// */
// private void getMsList() {
// mCompositeDisposable.add(
// DBFactory.Main.queryMss().subscribe(
// msList -> {
// mMsList = msList;
// }
// )
// );
// }
//
// /**
// * 获取参数形式的订单信息
// *
// * @return 参数形式的订单信息
// */
// private Saleorder.Param createSaleorderParam() {
// Saleorder.Param saleorderParam = mOrderInfo.setVip(mVip).param();
// for (int i = 0; i < mCartProducts.size(); i++) {
// saleorderParam.saleOrderParamDetailList.add(mCartProducts.get(i).param());
// }
// return saleorderParam;
// }
//
//
// /**
// * 提交订单
// */
// private Observable<String> commitOrder() {
// if (StringUtils.isEmpty(mOrderInfo.getOrderNo())) {
// return ApiFactory.Saleorder.addOrderMis(createSaleorderParam())
// .doAfterNext(s -> {
// //锁定订单状态
// mOrderInfo.setOrderNo(s);
// mView.changeOrderLockState(true);
// });
// } else {
// return Observable.just(mOrderInfo.getOrderNo());
// }
// }
//
//
// /**
// * 订阅支付
// *
// * @param observable 数据源
// */
// private void subscribePay(Observable<String> observable) {
// mView.showLoadingDialog();
// observable
// .doFinally(() -> mView.dismissLoadingDialog())
// .subscribe(this::paySucc, throwable -> payFail());
// }
//
// /**
// * 支付成功
// */
// private void paySucc(String s) {
// try {
// Saleorder print = JSON.parseObject(s, Saleorder.class);
// ZX_PrintPOS.getInstance(App.instance).print(1, print);
// } catch (Exception e) {
// ToastUtils.showShort("打印异常");
// }
// PromptDialog mPromptDialog = new PromptDialog();
// mPromptDialog.setDialogType(PromptDialog.PROMPTDIALOG_SUCC, "支付成功");
// mPromptDialog.setCustomButton("确定", view -> mPromptDialog.dismiss());
// mPromptDialog.show((BaseActivity) ActivityUtils.getTopActivity(), 2);
//
// this.updateHandover();
//
// clearOrder();
// clearVip();
// clearCart();
// clearMs();
//
// mView.changeOrderLockState(false);
// mView.showStoreFragment();
// }
//
// /**
// * 支付失败
// */
// private void payFail() {
// PromptDialog mPromptDialog = new PromptDialog();
// mPromptDialog.setDialogType(PromptDialog.PROMPTDIALOG_ERROR, "支付失败");
// mPromptDialog.setCustomButton("重试", view -> mPromptDialog.dismiss());
// mPromptDialog.show((BaseActivity) ActivityUtils.getTopActivity());
// }
//
// /**
// * 取消结算
// */
// @Override
// public void cancelPay() {
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ORDERINFO, mOrderInfo);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_SUPER_PURCHASE, false);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_PASSWORD, false);
// mView.changeCartButtons();
// }
//
//
// /**
// * 清空订单信息
// */
// private void clearOrder() {
// this.mOrderInfo = new Saleorder();
// }
//
// /**
// * 清理购物车
// */
// private void clearCart() {
// this.mCartProducts = new ArrayList<>();
// mView.loadCartProducts(mCartProducts);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_LIST, mCartProducts);
// }
//
// /**
// * 清空会员
// */
// private void clearVip() {
// this.mVip = Vip.createDefault();
// mView.loadVipInfo(mVip);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_VIP_INFO, mVip);
// }
//
// /**
// * 重置营销计划
// */
// private void clearMs() {
// for (int i = 0; i < mMsList.size(); i++) {
// mMsList.get(i).setSaledetailList(new ArrayList<>());
// }
// mView.loadGifts(mGiftList);
// }
//
// /**
// * 清空挂单信息
// */
// private void clearPending() {
// this.mPendingCarts = new ArrayList<>();
// mView.loadPending(mPendingCarts);
// }
//
//
@Override
@Override
public
void
initHandoverInfo
()
{
public
void
initHandoverInfo
()
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
,
Locale
.
getDefault
());
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
,
Locale
.
getDefault
());
...
@@ -894,6 +68,26 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -894,6 +68,26 @@ public class MainPresenter extends MainContract.Presenter {
}
}
@Override
public
void
checkUpdate
()
{
ApiFactory
.
Ver
.
getLastVer
().
subscribe
(
ver
->
{
SystemUtil
.
getVersionName
();
if
(
ver
!=
null
&&
ver
.
getVerNum
()
!=
null
)
{
if
(
AppUtils
.
getAppVersionCode
()
<
ver
.
getVerNum
())
{
mView
.
showUptateDialog
(
ver
.
getVerUrl
(),
ver
.
getVerTitle
()
+
"\n\n"
+
ver
.
getVerContent
());
}
else
{
ToastUtils
.
showShort
(
"已经是最新版本"
);
}
}
},
throwable
->
{
// ToastUtils.showShort(throwable.getMessage());
ToastUtils
.
showShort
(
"已经是最新版本"
);
}
);
}
@Override
@Override
...
@@ -919,24 +113,5 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -919,24 +113,5 @@ public class MainPresenter extends MainContract.Presenter {
ToastUtils
.
showShort
(
throwable
.
getMessage
());
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
});
}
}
//
// @Override
// public void searchBarHasFocus(boolean isHas) {
// if (isHas) mScannerUtil.close();
// else mScannerUtil.open();
// }
//
// @Override
// public void clickGiftConfirm(Gift gift) {
// for (int i = 0; i < mCartProducts.size(); i++) {
// if (gift.getSssku().getSkuId().longValue() == mCartProducts.get(i).getSkuId()
// && gift.getMsId().longValue() == mCartProducts.get(i).getMsId()) {
// return;
// }
// }
// Saledetail saledetail = Saledetail.create(gift, mVip);
// mCartProducts.add(0, saledetail);
// mView.addCartProduct(0);
// this.sendToViceScreen(ViceScreenMessageManager.VICE_ITEM_ADD, 0);
// }
}
}
app/src/main/java/com/xingdata/zzdpos/ui/main/dialog/HandoverDialog.java
View file @
79a8a496
...
@@ -24,7 +24,7 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind
...
@@ -24,7 +24,7 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind
@Override
@Override
public
int
getTitle
()
{
public
int
getTitle
()
{
return
R
.
string
.
handover_hint
;
return
-
1
;
}
}
@Override
@Override
...
@@ -48,6 +48,8 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind
...
@@ -48,6 +48,8 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind
mViewBinding
.
setBank
(
ConvertUtil
.
fenToYuan
(
MainPresenter
.
handoverInfo
.
getPos
(),
true
));
mViewBinding
.
setBank
(
ConvertUtil
.
fenToYuan
(
MainPresenter
.
handoverInfo
.
getPos
(),
true
));
mViewBinding
.
handoverTvSumamt
.
setText
(
ConvertUtil
.
fenToYuan
(
MainPresenter
.
handoverInfo
.
getFinallyAmt
(),
true
));
mViewBinding
.
handoverTvSumamt
.
setText
(
ConvertUtil
.
fenToYuan
(
MainPresenter
.
handoverInfo
.
getFinallyAmt
(),
true
));
mViewBinding
.
setOrderNum
(
String
.
valueOf
(
MainPresenter
.
handoverInfo
.
getSumOrder
()));
mViewBinding
.
setOrderNum
(
String
.
valueOf
(
MainPresenter
.
handoverInfo
.
getSumOrder
()));
setBtnName
(
"取消"
,
"交班"
);
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/MyselfFragment.java
View file @
79a8a496
...
@@ -48,7 +48,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi
...
@@ -48,7 +48,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi
integers
.
add
(
110
);
integers
.
add
(
110
);
integers
.
add
(
111
);
integers
.
add
(
111
);
mMySelfRecyclerAdapter
=
new
MySelfRecyclerAdapter
(
getActivity
(),
integers
);
mMySelfRecyclerAdapter
=
new
MySelfRecyclerAdapter
(
getActivity
(),
integers
);
mViewBinding
.
fragmentMyselfRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
ListCardItemDecoration
(
getActivity
(),
1
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
)));
mMySelfRecyclerAdapter
.
bindToRecyclerView
(
mViewBinding
.
fragmentMyselfRecycler
);
mMySelfRecyclerAdapter
.
bindToRecyclerView
(
mViewBinding
.
fragmentMyselfRecycler
);
mMySelfRecyclerAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
mMySelfRecyclerAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
@Override
...
@@ -61,7 +61,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi
...
@@ -61,7 +61,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi
ActivityUtils
.
startActivity
(
getActivity
(),
FeedBackActivity
.
class
);
ActivityUtils
.
startActivity
(
getActivity
(),
FeedBackActivity
.
class
);
break
;
break
;
case
C
.
MENU
.
MENU_UPDATE
:
//升级
case
C
.
MENU
.
MENU_UPDATE
:
//升级
ToastUtils
.
showShort
(
"已经是最新版本"
);
mPresenter
.
checkUpdate
(
);
break
;
break
;
case
C
.
MENU
.
MENU_HELP
:
//帮助
case
C
.
MENU
.
MENU_HELP
:
//帮助
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralExchangeFragment.java
View file @
79a8a496
...
@@ -30,7 +30,7 @@ public class IntegralExchangeFragment extends BaseFragment<IntegralPresenter,
...
@@ -30,7 +30,7 @@ public class IntegralExchangeFragment extends BaseFragment<IntegralPresenter,
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"
兑换
积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
@Override
protected
void
myOnClickListener
(
View
v
)
{
protected
void
myOnClickListener
(
View
v
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralGetFragment.java
View file @
79a8a496
...
@@ -67,7 +67,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
...
@@ -67,7 +67,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"
获取
积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
@Override
protected
void
myOnClickListener
(
View
v
)
{
protected
void
myOnClickListener
(
View
v
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralIndexFragment.java
View file @
79a8a496
...
@@ -22,7 +22,6 @@ import com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter;
...
@@ -22,7 +22,6 @@ import com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -50,7 +49,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
...
@@ -50,7 +49,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"
获取
积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
@Override
protected
void
myOnClickListener
(
View
v
)
{
protected
void
myOnClickListener
(
View
v
)
{
...
@@ -90,6 +89,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
...
@@ -90,6 +89,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
case
R
.
id
.
rb_get
:
{
case
R
.
id
.
rb_get
:
{
mViewBinding
.
rbGet
.
getPaint
().
setFakeBoldText
(
true
);
mViewBinding
.
rbGet
.
getPaint
().
setFakeBoldText
(
true
);
mViewBinding
.
rbExchange
.
getPaint
().
setFakeBoldText
(
false
);
mViewBinding
.
rbExchange
.
getPaint
().
setFakeBoldText
(
false
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"获取积分规则"
);
showView
(
v
.
getId
());
showView
(
v
.
getId
());
mPresenter
.
query
(
1
,
NORMAL_TYPE
,
null
);
mPresenter
.
query
(
1
,
NORMAL_TYPE
,
null
);
}
}
...
@@ -97,6 +97,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
...
@@ -97,6 +97,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
case
R
.
id
.
rb_exchange
:
{
case
R
.
id
.
rb_exchange
:
{
mViewBinding
.
rbGet
.
getPaint
().
setFakeBoldText
(
false
);
mViewBinding
.
rbGet
.
getPaint
().
setFakeBoldText
(
false
);
mViewBinding
.
rbExchange
.
getPaint
().
setFakeBoldText
(
true
);
mViewBinding
.
rbExchange
.
getPaint
().
setFakeBoldText
(
true
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"兑换积分规则"
);
showView
(
v
.
getId
());
showView
(
v
.
getId
());
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/marketingMenu/MarketingMenuActivity.java
View file @
79a8a496
...
@@ -47,7 +47,7 @@ public class MarketingMenuActivity extends AppCompatActivity {
...
@@ -47,7 +47,7 @@ public class MarketingMenuActivity extends AppCompatActivity {
list
.
add
(
C
.
MENU
.
MENU_MS_TICKET
);
list
.
add
(
C
.
MENU
.
MENU_MS_TICKET
);
list
.
add
(
C
.
MENU
.
MENU_MS_RECHARGE
);
list
.
add
(
C
.
MENU
.
MENU_MS_RECHARGE
);
list
.
add
(
C
.
MENU
.
MENU_MS_MS
);
list
.
add
(
C
.
MENU
.
MENU_MS_MS
);
list
.
add
(
C
.
MENU
.
MENU_MS_SMS
);
//
list.add(C.MENU.MENU_MS_SMS);
marketingMenuAdapter
=
new
MarketingMenuAdapter
(
list
);
marketingMenuAdapter
=
new
MarketingMenuAdapter
(
list
);
mViewBinding
.
rvMenu
.
setAdapter
(
marketingMenuAdapter
);
mViewBinding
.
rvMenu
.
setAdapter
(
marketingMenuAdapter
);
...
...
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTicketContract.java
View file @
79a8a496
...
@@ -19,6 +19,7 @@ public interface SendTicketContract {
...
@@ -19,6 +19,7 @@ public interface SendTicketContract {
void
error
(
String
errorMsg
,
LoadingDialog
loadingDialog
);
void
error
(
String
errorMsg
,
LoadingDialog
loadingDialog
);
/**
/**
*
* 加载会员列表
* 加载会员列表
*
*
* @param vips 会员列表
* @param vips 会员列表
...
...
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/SendTickerSuccFragment.java
View file @
79a8a496
...
@@ -2,10 +2,12 @@ package com.xingdata.zzdpos.ui.sendticke.fragment;
...
@@ -2,10 +2,12 @@ package com.xingdata.zzdpos.ui.sendticke.fragment;
import
android.view.View
;
import
android.view.View
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentSendSuccTickerBinding
;
import
com.xingdata.zzdpos.databinding.FragmentSendSuccTickerBinding
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketActivity
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
...
@@ -34,8 +36,22 @@ public class SendTickerSuccFragment extends BaseFragment<SendTicketPresenter,
...
@@ -34,8 +36,22 @@ public class SendTickerSuccFragment extends BaseFragment<SendTicketPresenter,
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
@Override
protected
void
myOnClickListener
(
View
v
)
{
protected
void
myOnClickListener
(
View
v
)
{
mPresenter
.
sendTickerIndexFragment
=
new
SendTickerIndexFragment
();
switch
(
v
.
getId
())
{
startWithPop
(
mPresenter
.
sendTickerIndexFragment
);
case
R
.
id
.
btn_over
:
{
ActivityUtils
.
finishActivity
(
SendTicketActivity
.
class
);
}
break
;
case
R
.
id
.
btn_continue_send
:
{
mPresenter
.
sendTickerIndexFragment
=
new
SendTickerIndexFragment
();
startWithPop
(
mPresenter
.
sendTickerIndexFragment
);
}
break
;
default
:
{
}
break
;
}
}
}
});
});
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
View file @
79a8a496
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
;
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.api.print.ZX_PrintPOS
;
import
com.xingdata.api.print.ZX_PrintPOS
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.api.ApiFactory
;
...
@@ -384,7 +387,12 @@ public class SettlePresenter extends SettleContract.Presenter {
...
@@ -384,7 +387,12 @@ public class SettlePresenter extends SettleContract.Presenter {
private
void
paySucc
(
Saleorder
saleorder
)
{
private
void
paySucc
(
Saleorder
saleorder
)
{
mView
.
showPaySuccFragment
(
saleorder
);
mView
.
showPaySuccFragment
(
saleorder
);
this
.
updateHandover
(
MainPresenter
.
handoverInfo
);
this
.
updateHandover
(
MainPresenter
.
handoverInfo
);
ZX_PrintPOS
.
getInstance
(
MainActivity
.
mainActivity
).
print
(
1
,
saleorder
);
try
{
ZX_PrintPOS
.
getInstance
(
MainActivity
.
mainActivity
).
print
(
1
,
saleorder
);
}
catch
(
Exception
e
){
ToastUtils
.
showShort
(
"打印异常"
);
}
}
}
/**
/**
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/RechargeSearchFragment.java
View file @
79a8a496
...
@@ -8,6 +8,7 @@ import android.view.View;
...
@@ -8,6 +8,7 @@ import android.view.View;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentOrderSearchBinding
;
import
com.xingdata.zzdpos.databinding.FragmentOrderSearchBinding
;
...
@@ -19,6 +20,8 @@ import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter;
...
@@ -19,6 +20,8 @@ import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeGroupAdapter
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
com.xingdata.zzdpos.util.StatisticsCallback
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -50,7 +53,6 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
...
@@ -50,7 +53,6 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
if
(
mStatisticsAdapter
==
null
)
{
if
(
mStatisticsAdapter
==
null
)
{
mStatisticsAdapter
=
new
StatisticsRechargeGroupAdapter
(
new
ArrayList
<>());
mStatisticsAdapter
=
new
StatisticsRechargeGroupAdapter
(
new
ArrayList
<>());
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
...
@@ -59,6 +61,17 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
...
@@ -59,6 +61,17 @@ public class RechargeSearchFragment extends BaseFragment<StatisticsPresenter, Fr
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
}
}
mViewBinding
.
statisticsRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
StatisticsItemDecoration
(
getActivity
(),
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
),
new
StatisticsCallback
()
{
@Override
public
SectionEntity
getItem
(
int
position
)
{
if
(
position
<
mStatisticsAdapter
.
getData
().
size
()){
return
mStatisticsAdapter
.
getData
().
get
(
position
);
}
else
{
return
null
;
}
}
}));
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mStatisticsAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mStatisticsAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
if
(
VipRechargeOrders
!=
null
)
{
if
(
VipRechargeOrders
!=
null
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/TicketSearchFragment.java
View file @
79a8a496
...
@@ -8,6 +8,7 @@ import android.view.View;
...
@@ -8,6 +8,7 @@ import android.view.View;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentOrderSearchBinding
;
import
com.xingdata.zzdpos.databinding.FragmentOrderSearchBinding
;
...
@@ -18,6 +19,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
...
@@ -18,6 +19,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsRechargeAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsTicketGroupAdapter
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
com.xingdata.zzdpos.util.StatisticsCallback
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -59,6 +62,17 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
...
@@ -59,6 +62,17 @@ public class TicketSearchFragment extends BaseFragment<StatisticsPresenter, Frag
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
}
}
mViewBinding
.
statisticsRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
StatisticsItemDecoration
(
getActivity
(),
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
),
new
StatisticsCallback
()
{
@Override
public
SectionEntity
getItem
(
int
position
)
{
if
(
position
<
mStatisticsAdapter
.
getData
().
size
()){
return
mStatisticsAdapter
.
getData
().
get
(
position
);
}
else
{
return
null
;
}
}
}));
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mStatisticsAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mStatisticsAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
if
(
Tickets
!=
null
)
{
if
(
Tickets
!=
null
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderMainFragment.java
View file @
79a8a496
...
@@ -55,6 +55,7 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -55,6 +55,7 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mViewBinding
.
edTitle
.
setText
(
""
);
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
//获得当前时间的月份,月份从0开始所以结果要加1
//获得当前时间的月份,月份从0开始所以结果要加1
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderSearchFragment.java
View file @
79a8a496
...
@@ -8,6 +8,7 @@ import android.view.View;
...
@@ -8,6 +8,7 @@ import android.view.View;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.SectionEntity
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
...
@@ -19,6 +20,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
...
@@ -19,6 +20,8 @@ import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import
com.xingdata.zzdpos.ui.statistics.StatisticsPresenter
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsPresenter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
com.xingdata.zzdpos.util.StatisticsCallback
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
com.xingdata.zzdpos.util.StringUtil
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -63,6 +66,17 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
...
@@ -63,6 +66,17 @@ public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, Fragm
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
mViewBinding
.
statisticsRecycler
.
setAdapter
(
mStatisticsAdapter
);
}
}
mViewBinding
.
statisticsRecycler
.
addItemDecoration
(
new
RecyclerViewUtil
.
StatisticsItemDecoration
(
getActivity
(),
2
,
getResources
().
getColor
(
R
.
color
.
gray_kongming
),
new
StatisticsCallback
()
{
@Override
public
SectionEntity
getItem
(
int
position
)
{
if
(
position
<
mStatisticsAdapter
.
getData
().
size
()){
return
mStatisticsAdapter
.
getData
().
get
(
position
);
}
else
{
return
null
;
}
}
}));
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mViewBinding
.
srlProduct
.
setOnRefreshListener
(
this
::
onRefresh
);
mStatisticsAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
mStatisticsAdapter
.
setOnLoadMoreListener
(
this
::
onLoadMore
,
mViewBinding
.
statisticsRecycler
);
if
(
saleorders
!=
null
)
{
if
(
saleorders
!=
null
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/util/DensityUtil.java
0 → 100644
View file @
79a8a496
package
com
.
xingdata
.
zzdpos
.
util
;
import
android.content.Context
;
/**
* Created by Administrator on 2018/1/22.
*/
public
class
DensityUtil
{
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public
static
int
dip2px
(
Context
context
,
float
dpValue
)
{
final
float
scale
=
context
.
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
dpValue
*
scale
+
0.5f
);
}
/**
* 根据手机的分辨率从 px(像素) 的单位 转成为 dp
*/
public
static
int
px2dip
(
Context
context
,
float
pxValue
)
{
final
float
scale
=
context
.
getResources
().
getDisplayMetrics
().
density
;
return
(
int
)
(
pxValue
/
scale
+
0.5f
);
}
}
app/src/main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
View file @
79a8a496
...
@@ -140,6 +140,7 @@ public class RecyclerViewUtil {
...
@@ -140,6 +140,7 @@ public class RecyclerViewUtil {
private
StatisticsCallback
mStatisticsCallback
;
private
StatisticsCallback
mStatisticsCallback
;
private
int
mDividerHight
=
1
;
private
int
mDividerHight
=
1
;
private
Paint
mColorPaint
;
private
Paint
mColorPaint
;
private
Context
mContext
;
public
final
int
[]
ATRRS
=
new
int
[]{
android
.
R
.
attr
.
listDivider
};
public
final
int
[]
ATRRS
=
new
int
[]{
android
.
R
.
attr
.
listDivider
};
...
@@ -147,6 +148,7 @@ public class RecyclerViewUtil {
...
@@ -147,6 +148,7 @@ public class RecyclerViewUtil {
public
StatisticsItemDecoration
(
Context
context
)
{
public
StatisticsItemDecoration
(
Context
context
)
{
final
TypedArray
ta
=
context
.
obtainStyledAttributes
(
ATRRS
);
final
TypedArray
ta
=
context
.
obtainStyledAttributes
(
ATRRS
);
this
.
mDividerDarwable
=
ta
.
getDrawable
(
0
);
this
.
mDividerDarwable
=
ta
.
getDrawable
(
0
);
mContext
=
context
;
ta
.
recycle
();
ta
.
recycle
();
}
}
...
@@ -189,13 +191,13 @@ public class RecyclerViewUtil {
...
@@ -189,13 +191,13 @@ public class RecyclerViewUtil {
SectionEntity
sectionEntity
=
mStatisticsCallback
.
getItem
(
position
);
SectionEntity
sectionEntity
=
mStatisticsCallback
.
getItem
(
position
);
if
(
sectionEntity
!=
null
)
{
if
(
sectionEntity
!=
null
)
{
if
(!
sectionEntity
.
isHeader
)
{
if
(!
sectionEntity
.
isHeader
)
{
final
int
left
=
child
.
getLeft
()
-
params
.
leftMargin
-
mDividerHight
+
200
;
final
int
left
=
child
.
getLeft
()
-
params
.
leftMargin
-
mDividerHight
+
DensityUtil
.
dip2px
(
mContext
,
65
)
;
final
int
right
=
child
.
getRight
()
+
params
.
rightMargin
;
final
int
right
=
child
.
getRight
()
+
params
.
rightMargin
;
int
top
=
0
;
int
top
=
0
;
int
bottom
=
0
;
int
bottom
=
0
;
top
=
child
.
getBottom
()
+
params
.
bottomMargin
+
1
;
top
=
child
.
getBottom
()
+
params
.
bottomMargin
+
1
;
bottom
=
top
+
mDividerHight
;
bottom
=
top
+
mDividerHight
;
//画分割线
//画分割线
mDividerDarwable
.
setBounds
(
left
,
top
,
right
,
bottom
);
mDividerDarwable
.
setBounds
(
left
,
top
,
right
,
bottom
);
...
...
app/src/main/res/drawable/shape_red_r1_thr.xml
0 → 100644
View file @
79a8a496
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/all_shape_radius"
/>
<solid
android:color=
"@color/white"
/>
<stroke
android:width=
"@dimen/edit_border"
android:color=
"@color/red_guanyu"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/up_down_line_gray_bottom.xml
0 → 100644
View file @
79a8a496
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:left=
"-2dp"
android:right=
"-2dp"
android:top=
"-2dp"
>
<shape>
<solid
android:color=
"@color/gray_zhouyu"
/>
<stroke
android:width=
"0.5dp"
android:color=
"@color/gray_huanggai"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/up_down_line_gray_top.xml
0 → 100644
View file @
79a8a496
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:left=
"-2dp"
android:bottom=
"-2dp"
android:right=
"-2dp"
>
<shape>
<solid
android:color=
"@color/gray_zhouyu"
/>
<stroke
android:width=
"0.5dp"
android:color=
"@color/gray_huanggai"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/up_down_line_white_bottom.xml
0 → 100644
View file @
79a8a496
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:left=
"-2dp"
android:top=
"-2dp"
android:right=
"-2dp"
>
<shape>
<solid
android:color=
"@android:color/white"
/>
<stroke
android:width=
"0.5dp"
android:color=
"@color/gray_huanggai"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/up_down_line_white_top.xml
0 → 100644
View file @
79a8a496
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:left=
"-2dp"
android:bottom=
"-2dp"
android:right=
"-2dp"
>
<shape>
<solid
android:color=
"@android:color/white"
/>
<stroke
android:width=
"0.5dp"
android:color=
"@color/gray_huanggai"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/layout/dialog_integral_exchange_setting.xml
View file @
79a8a496
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<TextView
<TextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@
color/gray_zhouyu
"
android:background=
"@
drawable/up_down_line_gray
"
android:gravity=
"left|center_vertical"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_padding"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"基本信息"
android:text=
"基本信息"
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:minHeight=
"@dimen/list1_height"
android:gravity=
"center"
android:gravity=
"center"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_padding"
>
...
@@ -156,7 +157,7 @@
...
@@ -156,7 +157,7 @@
<TextView
<TextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@
color/gray_zhouyu
"
android:background=
"@
drawable/up_down_line_gray
"
android:gravity=
"left|center_vertical"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_padding"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"兑换条件"
android:text=
"兑换条件"
...
@@ -209,9 +210,9 @@
...
@@ -209,9 +210,9 @@
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_
padd
ing"
android:layout_marginLeft=
"@dimen/all_
bounced_spac
ing"
android:layout_marginRight=
"@dimen/all_
padd
ing"
android:layout_marginRight=
"@dimen/all_
bounced_spac
ing"
android:background=
"@color/gray
1
"
></View>
android:background=
"@color/gray
_huanggai
"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/dialog_integral_get_setting.xml
View file @
79a8a496
...
@@ -47,30 +47,21 @@
...
@@ -47,30 +47,21 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
></View>
<TextView
<TextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@
color/gray_zhouyu
"
android:background=
"@
drawable/up_down_line_gray
"
android:gravity=
"left|center_vertical"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_bounced_padding"
android:paddingLeft=
"@dimen/all_bounced_padding"
android:text=
"基本信息"
android:text=
"基本信息"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
android:textSize=
"@dimen/text_secondary_title"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
></View>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_rules_name"
android:id=
"@+id/ll_rules_name"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_conten
t"
android:layout_height=
"
@dimen/list1_heigh
t"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
...
@@ -109,7 +100,7 @@
...
@@ -109,7 +100,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_conten
t"
android:layout_height=
"
@dimen/list1_heigh
t"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
...
@@ -188,6 +179,7 @@
...
@@ -188,6 +179,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:minHeight=
"@dimen/list1_height"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_padding"
>
...
@@ -237,12 +229,19 @@
...
@@ -237,12 +229,19 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_bounced_spacing"
android:layout_marginRight=
"@dimen/all_bounced_spacing"
android:background=
"@color/gray_huanggai"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@
drawable/up_down_line_
white"
android:background=
"@
color/
white"
android:gravity=
"center"
android:gravity=
"center"
android:minHeight=
"@dimen/list1_height"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_padding"
>
...
@@ -250,6 +249,8 @@
...
@@ -250,6 +249,8 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:drawableLeft=
"@mipmap/point"
android:drawablePadding=
"@dimen/all_bounced_spacing"
android:paddingLeft=
"@dimen/all_bounced_padding"
android:paddingLeft=
"@dimen/all_bounced_padding"
android:text=
"获取方式:"
android:text=
"获取方式:"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
...
@@ -322,6 +323,12 @@
...
@@ -322,6 +323,12 @@
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_height"
android:layout_marginLeft=
"@dimen/all_bounced_spacing"
android:layout_marginRight=
"@dimen/all_bounced_spacing"
android:background=
"@color/gray_huanggai"
></View>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_all"
android:id=
"@+id/ll_all"
...
@@ -434,7 +441,7 @@
...
@@ -434,7 +441,7 @@
android:id=
"@+id/ll_category"
android:id=
"@+id/ll_category"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/up_down_line_white"
android:background=
"@drawable/up_down_line_white
_bottom
"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
...
@@ -443,6 +450,7 @@
...
@@ -443,6 +450,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:minHeight=
"@dimen/list1_height"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_padding"
>
...
@@ -542,6 +550,7 @@
...
@@ -542,6 +550,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:minHeight=
"@dimen/list1_height"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_padding"
>
...
@@ -593,6 +602,7 @@
...
@@ -593,6 +602,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:minHeight=
"@dimen/list1_height"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
...
@@ -641,6 +651,7 @@
...
@@ -641,6 +651,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:minHeight=
"@dimen/list1_height"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
...
...
app/src/main/res/layout/dialog_prompt.xml
View file @
79a8a496
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:textSize=
"@dimen/text_three_title"
android:textSize=
"@dimen/text_three_title"
android:paddingTop=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:background=
"@drawable/up_down_line_white"
android:text=
"系统提示"
android:text=
"系统提示"
android:textColor=
"@color/black_baozheng"
/>
android:textColor=
"@color/black_baozheng"
/>
...
...
app/src/main/res/layout/fragment_integral_main.xml
View file @
79a8a496
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<RadioGroup
<RadioGroup
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/up_down_line_white"
android:background=
"@drawable/up_down_line_white
_bottom
"
android:checkedButton=
"@id/rb_get"
android:checkedButton=
"@id/rb_get"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
...
app/src/main/res/layout/fragment_inventory.xml
View file @
79a8a496
...
@@ -68,8 +68,7 @@
...
@@ -68,8 +68,7 @@
android:paddingTop=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:text=
"共0人次盘库记录"
android:text=
"共0人次盘库记录"
android:textColor=
"@color/black_baozheng"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size_low"
android:textSize=
"@dimen/all_text_size_low"
/>
android:textStyle=
"bold"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/fragment_order_search.xml
View file @
79a8a496
<layout>
<layout>
<
android.support.constraint.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -13,8 +13,10 @@
...
@@ -13,8 +13,10 @@
<android.support.v4.widget.SwipeRefreshLayout
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_product"
android:id=
"@+id/srl_product"
android:layout_width=
"0dp"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginTop=
"-1dp"
android:background=
"@color/white_caocao"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
...
@@ -31,5 +33,5 @@
...
@@ -31,5 +33,5 @@
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</
android.support.constraint.Constraint
Layout>
</
Relative
Layout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_send_succ_ticker.xml
View file @
79a8a496
...
@@ -129,10 +129,10 @@
...
@@ -129,10 +129,10 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_margin"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingBottom=
"@dimen/all_spacing"
android:paddingEnd=
"@dimen/all_margin"
android:paddingEnd=
"@dimen/all_margin"
android:layout_marginBottom=
"@dimen/all_margin"
android:paddingStart=
"@dimen/all_margin"
>
android:paddingStart=
"@dimen/all_margin"
>
<TextView
<TextView
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
</android.support.v7.widget.CardView>
</android.support.v7.widget.CardView>
<Button
<Button
android:id=
"@+id/btn_over"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_margin"
android:layout_marginBottom=
"@dimen/all_margin"
...
@@ -163,9 +164,23 @@
...
@@ -163,9 +164,23 @@
android:background=
"@drawable/shape_red_r1"
android:background=
"@drawable/shape_red_r1"
android:foreground=
"?android:attr/selectableItemBackground"
android:foreground=
"?android:attr/selectableItemBackground"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:text=
"
确 定
"
android:text=
"
完 成
"
android:textColor=
"@color/white_caocao"
android:textColor=
"@color/white_caocao"
android:textSize=
"@dimen/all_text_size"
/>
android:textSize=
"@dimen/all_text_size"
/>
<Button
android:id=
"@+id/btn_continue_send"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_margin"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@drawable/shape_red_r1_thr"
android:foreground=
"?android:attr/selectableItemBackground"
android:onClick=
"@{OnClickListener}"
android:text=
"继续发券"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_send_ticker_vip.xml
View file @
79a8a496
...
@@ -65,6 +65,7 @@
...
@@ -65,6 +65,7 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:inputType=
"number"
android:inputType=
"number"
android:maxLength=
"11"
android:maxLength=
"11"
android:hint=
"@string/vip_seach_hint"
android:textColor=
"@color/black_likui"
android:textColor=
"@color/black_likui"
android:textColorHint=
"@color/gray_huanggai"
android:textColorHint=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size"
/>
android:textSize=
"@dimen/all_text_size"
/>
...
...
app/src/main/res/layout/fragment_ticker_main.xml
View file @
79a8a496
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:tools=
"http://schemas.android.com/tools"
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<data>
...
@@ -19,6 +19,52 @@
...
@@ -19,6 +19,52 @@
android:id=
"@+id/ic_title"
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
layout=
"@layout/title"
/>
<FrameLayout
android:id=
"@+id/fl_senior_title"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
android:orientation=
"vertical"
app:layout_constraintTop_toBottomOf=
"@+id/ic_title"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_marginStart=
"@dimen/all_margin"
android:background=
"@drawable/shape_black_b2"
android:gravity=
"center_vertical"
android:padding=
"@dimen/all_spacing"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_red_r1"
android:paddingBottom=
"@dimen/all_shape_radius"
android:paddingEnd=
"@dimen/all_spacing"
android:paddingStart=
"@dimen/all_spacing"
android:paddingTop=
"@dimen/all_shape_radius"
android:text=
"@string/ms_user_title"
android:textColor=
"@color/white_caocao"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_spacing"
android:layout_weight=
"1"
android:singleLine=
"true"
android:text=
"@string/ticket_hint"
android:textColor=
"@color/black_baozheng"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_kongming"
/>
</FrameLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/btn_add"
android:id=
"@+id/btn_add"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -30,7 +76,7 @@
...
@@ -30,7 +76,7 @@
app:layout_constraintBottom_toTopOf=
"@id/ll_menu"
app:layout_constraintBottom_toTopOf=
"@id/ll_menu"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/
ic
_title"
>
app:layout_constraintTop_toBottomOf=
"@+id/
fl_senior
_title"
>
<ImageView
<ImageView
...
...
app/src/main/res/layout/item_marketing_menu.xml
View file @
79a8a496
...
@@ -2,10 +2,12 @@
...
@@ -2,10 +2,12 @@
<layout>
<layout>
<data>
<data>
<import
type=
"android.view.View"
/>
<import
type=
"android.view.View"
/>
<variable
<variable
name=
"isShow"
name=
"isShow"
type=
"Boolean"
/>
type=
"Boolean"
/>
</data>
</data>
...
@@ -53,33 +55,33 @@
...
@@ -53,33 +55,33 @@
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:visibility=
"@{isShow? View.VISIBLE: View.GONE}"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_toLeftOf=
"@+id/iv"
android:textColor=
"@color/red_guanyu"
android:text=
"高级功能"
android:layout_marginEnd=
"@dimen/all_margin"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:textSize=
"@dimen/all_text_size_small"
android:layout_marginEnd=
"@dimen/all_margin"
android:paddingTop=
"@dimen/dp_4"
android:layout_toLeftOf=
"@+id/iv"
android:background=
"@drawable/red_border_thr_bigradius"
android:paddingBottom=
"@dimen/dp_4"
android:paddingBottom=
"@dimen/dp_4"
android:paddingEnd=
"@dimen/all_bounced_padding"
android:paddingEnd=
"@dimen/all_bounced_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
android:paddingStart=
"@dimen/all_bounced_padding"
android:background=
"@drawable/red_border_thr_bigradius"
/>
android:paddingTop=
"@dimen/dp_4"
android:text=
"高级功能"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/all_text_size_small"
android:visibility=
"@{isShow? View.VISIBLE: View.GONE}"
/>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_height=
"@dimen/view_line_L050"
android:layout_alignParentTop=
"true"
android:layout_alignParentTop=
"true"
android:background=
"@color/gray_
kongming
"
/>
android:background=
"@color/gray_
huanggai
"
/>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_height=
"@dimen/view_line_L050"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:background=
"@color/gray_
kongming
"
/>
android:background=
"@color/gray_
huanggai
"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/item_myself_string.xml
View file @
79a8a496
...
@@ -32,19 +32,20 @@
...
@@ -32,19 +32,20 @@
app:layout_constraintStart_toStartOf=
"@id/item_tv"
app:layout_constraintStart_toStartOf=
"@id/item_tv"
app:layout_constraintTop_toTopOf=
"@id/item_tv"
/>
app:layout_constraintTop_toTopOf=
"@id/item_tv"
/>
<View
<View
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/view_line_L050"
android:layout_height=
"@dimen/all_padding"
android:background=
"@color/gray_kongming"
android:background=
"@color/gray_zhouyu"
app:layout_constraintBottom_toBottomOf=
"@id/item_tv"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintStart_toStartOf=
"@id/item_tv"
/>
app:layout_constraintStart_toStartOf=
"@id/item_tv"
app:layout_constraintTop_toBottomOf=
"@id/item_tv"
/>
<View
<View
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/
all_padding
"
android:layout_height=
"@dimen/
view_line_L050
"
android:background=
"@color/gray_
zhouyu
"
android:background=
"@color/gray_
kongming
"
app:layout_constraint
Top
_toBottomOf=
"@id/item_tv"
app:layout_constraint
Bottom
_toBottomOf=
"@id/item_tv"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintStart_toStartOf=
"@id/item_tv"
/>
app:layout_constraintStart_toStartOf=
"@id/item_tv"
/>
...
...
app/src/main/res/values/dimens.xml
View file @
79a8a496
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<dimen
name=
"dialog_button_width"
>
190dp
</dimen>
<dimen
name=
"dialog_button_width"
>
190dp
</dimen>
<!--提示对话框-->
<!--提示对话框-->
<dimen
name=
"prompt_dialog_width"
>
300dp
</dimen>
<dimen
name=
"prompt_dialog_width"
>
300dp
</dimen>
<dimen
name=
"prompt_dialog_height"
>
2
0
0dp
</dimen>
<dimen
name=
"prompt_dialog_height"
>
2
2
0dp
</dimen>
<dimen
name=
"prompt_dialog_logo_size"
>
48dp
</dimen>
<dimen
name=
"prompt_dialog_logo_size"
>
48dp
</dimen>
<!--商品页面-->
<!--商品页面-->
<integer
name=
"fragment_store_product_item_span_count"
>
4
</integer>
<integer
name=
"fragment_store_product_item_span_count"
>
4
</integer>
...
...
app/src/main/res/values/strings.xml
View file @
79a8a496
...
@@ -437,6 +437,7 @@
...
@@ -437,6 +437,7 @@
<string
name=
"integral_exchange_title"
>
积分兑换规则
</string>
<string
name=
"integral_exchange_title"
>
积分兑换规则
</string>
<!--优惠券-->
<!--优惠券-->
<string
name=
"return_ticket_title"
>
新增优惠券
</string>
<string
name=
"return_ticket_title"
>
新增优惠券
</string>
<string
name=
"ticket_hint"
>
优惠券规则功能限时免费使用 1 个月
</string>
<string
name=
"tv_rule"
>
满%s可用
</string>
<string
name=
"tv_rule"
>
满%s可用
</string>
<string
name=
"tv_money"
>
%s 元优惠券
</string>
<string
name=
"tv_money"
>
%s 元优惠券
</string>
<string
name=
"tv_date"
>
有效期至: %s
</string>
<string
name=
"tv_date"
>
有效期至: %s
</string>
...
@@ -499,6 +500,7 @@
...
@@ -499,6 +500,7 @@
<string
name=
"menu_ticket"
>
发券
</string>
<string
name=
"menu_ticket"
>
发券
</string>
<string
name=
"send_ticker_dialog_title"
>
确认发送优惠券?
</string>
<string
name=
"send_ticker_dialog_title"
>
确认发送优惠券?
</string>
<string
name=
"vip_seach_hint"
>
请输入会员手机号
</string>
<string
name=
"menu_statistics"
>
统计
</string>
<string
name=
"menu_statistics"
>
统计
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment