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
4abb5f41
Commit
4abb5f41
authored
Dec 25, 2017
by
王海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交发券
parent
07b4b57f
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1266 additions
and
145 deletions
+1266
-145
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
app/src/main/java/com/xingdata/zzdpos/model/Level.java
app/src/main/java/com/xingdata/zzdpos/model/Level.java
+12
-0
app/src/main/java/com/xingdata/zzdpos/model/Trule.java
app/src/main/java/com/xingdata/zzdpos/model/Trule.java
+10
-0
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
.../com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
+8
-9
app/src/main/java/com/xingdata/zzdpos/ui/sendTicke/SendTicketPresenter.java
...com/xingdata/zzdpos/ui/sendTicke/SendTicketPresenter.java
+0
-17
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTickerC.java
...in/java/com/xingdata/zzdpos/ui/sendticke/SendTickerC.java
+44
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTicketActivity.java
.../com/xingdata/zzdpos/ui/sendticke/SendTicketActivity.java
+24
-1
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTicketContract.java
.../com/xingdata/zzdpos/ui/sendticke/SendTicketContract.java
+56
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTicketPresenter.java
...com/xingdata/zzdpos/ui/sendticke/SendTicketPresenter.java
+57
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/adapter/ReturnTicketAdapter.java
...data/zzdpos/ui/sendticke/adapter/ReturnTicketAdapter.java
+51
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/adapter/VipAdapter.java
.../com/xingdata/zzdpos/ui/sendticke/adapter/VipAdapter.java
+37
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/adapter/VipGroupAdapter.java
...xingdata/zzdpos/ui/sendticke/adapter/VipGroupAdapter.java
+32
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/SendTickerFragment.java
...data/zzdpos/ui/sendticke/fragment/SendTickerFragment.java
+229
-0
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/SendTickerIndexFragment.java
...zzdpos/ui/sendticke/fragment/SendTickerIndexFragment.java
+26
-4
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/VipFragment.java
...om/xingdata/zzdpos/ui/sendticke/fragment/VipFragment.java
+92
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/adapter/ReturnTicketAdapter.java
...ingdata/zzdpos/ui/settle/adapter/ReturnTicketAdapter.java
+62
-0
app/src/main/res/drawable/black_border_thr.xml
app/src/main/res/drawable/black_border_thr.xml
+1
-1
app/src/main/res/drawable/red_border_thr.xml
app/src/main/res/drawable/red_border_thr.xml
+12
-0
app/src/main/res/layout/fragment_send_ticker.xml
app/src/main/res/layout/fragment_send_ticker.xml
+219
-0
app/src/main/res/layout/fragment_send_ticker_main.xml
app/src/main/res/layout/fragment_send_ticker_main.xml
+2
-0
app/src/main/res/layout/fragment_send_ticker_vip.xml
app/src/main/res/layout/fragment_send_ticker_vip.xml
+101
-0
app/src/main/res/layout/item_return_ticket.xml
app/src/main/res/layout/item_return_ticket.xml
+126
-112
app/src/main/res/layout/item_vip_group.xml
app/src/main/res/layout/item_vip_group.xml
+62
-0
app/src/main/res/mipmap-hdpi/but_elect01_stroke.png
app/src/main/res/mipmap-hdpi/but_elect01_stroke.png
+0
-0
app/src/main/res/mipmap-hdpi/but_elect02_stroke.png
app/src/main/res/mipmap-hdpi/but_elect02_stroke.png
+0
-0
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+2
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
4abb5f41
...
...
@@ -58,7 +58,7 @@
android:label=
"@string/title_activity_ticket"
android:theme=
"@style/AppTheme"
/>
<activity
android:name=
".ui.send
T
icke.SendTicketActivity"
android:name=
".ui.send
t
icke.SendTicketActivity"
android:configChanges=
"keyboard|orientation|screenSize|keyboardHidden"
android:label=
"@string/title_activity_ticket"
android:theme=
"@style/AppTheme"
/>
...
...
app/src/main/java/com/xingdata/zzdpos/model/Level.java
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
model
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.bigkoo.pickerview.model.IPickerViewData
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
com.xingdata.zzdpos.base.BaseModel
;
import
io.realm.RealmObject
;
import
io.realm.annotations.Ignore
;
import
io.realm.annotations.Index
;
import
io.realm.annotations.PrimaryKey
;
...
...
@@ -13,6 +15,9 @@ import io.realm.annotations.PrimaryKey;
*/
public
class
Level
extends
RealmObject
implements
BaseModel
,
BaseBean
,
IPickerViewData
{
@JSONField
(
serialize
=
false
)
@Ignore
private
boolean
isSelect
=
false
;
@PrimaryKey
private
Long
id
;
...
...
@@ -139,6 +144,13 @@ public class Level extends RealmObject implements BaseModel, BaseBean, IPickerVi
this
.
vipUpgradeAmtTc
=
vipUpgradeAmtTc
;
}
public
boolean
isSelect
()
{
return
isSelect
;
}
public
void
setSelect
(
boolean
select
)
{
isSelect
=
select
;
}
@Override
public
Long
getSyncId
()
{
...
...
app/src/main/java/com/xingdata/zzdpos/model/Trule.java
View file @
4abb5f41
...
...
@@ -9,6 +9,16 @@ import com.xingdata.zzdpos.base.BaseModel;
*/
public
class
Trule
implements
BaseModel
,
BaseBean
{
private
boolean
isSelect
=
false
;
public
boolean
isSelect
()
{
return
isSelect
;
}
public
void
setSelect
(
boolean
select
)
{
isSelect
=
select
;
}
private
Long
id
;
private
Long
issuerMapId
;
...
...
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
main
.
fragment
;
import
android.content.Intent
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.view.View
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.C
;
...
...
@@ -16,10 +12,11 @@ import com.xingdata.zzdpos.base.BaseFragment;
import
com.xingdata.zzdpos.databinding.FragmentCasherBinding
;
import
com.xingdata.zzdpos.ui.main.MainPresenter
;
import
com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter
;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.ui.payment.PaymentActivity
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketActivity
;
import
com.xingdata.zzdpos.ui.splash.SplashActivity
;
import
com.xingdata.zzdpos.ui.statistics.StatisticsActivity
;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.util.MyMenuItemDecoration
;
import
com.xingdata.zzdpos.util.OnClickListener
;
...
...
@@ -39,7 +36,8 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
@Override
public
void
initView
()
{
mViewBinding
.
fragmentCasherRecycler
.
setLayoutManager
(
new
GridLayoutManager
(
getActivity
(),
2
));
mViewBinding
.
fragmentCasherRecycler
.
setLayoutManager
(
new
GridLayoutManager
(
getActivity
(),
2
));
integers
=
new
ArrayList
<>();
integers
.
add
(
101
);
integers
.
add
(
102
);
...
...
@@ -49,13 +47,14 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
integers
.
add
(
106
);
mMenuRecyclerAdapter
=
new
MenuRecyclerAdapter
(
getActivity
(),
integers
);
mMenuRecyclerAdapter
.
bindToRecyclerView
(
mViewBinding
.
fragmentCasherRecycler
);
mViewBinding
.
fragmentCasherRecycler
.
addItemDecoration
(
new
MyMenuItemDecoration
(
getActivity
(),
5
,
getResources
().
getColor
(
R
.
color
.
golden_yuji
)));
mViewBinding
.
fragmentCasherRecycler
.
addItemDecoration
(
new
MyMenuItemDecoration
(
getActivity
(),
5
,
getResources
().
getColor
(
R
.
color
.
golden_yuji
)));
mMenuRecyclerAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
((
int
)
adapter
.
getData
().
get
(
position
))
{
case
C
.
MENU
.
MENU_VIP
:
//会员
ActivityUtils
.
startActivity
(
new
Intent
(
getActivity
(),
VipActivity
.
class
));
ActivityUtils
.
startActivity
(
new
Intent
(
getActivity
(),
VipActivity
.
class
));
break
;
case
C
.
MENU
.
MENU_RECHARGE
:
//充值
...
...
@@ -64,7 +63,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
break
;
case
C
.
MENU
.
MENU_TICKET
:
//优惠券
ActivityUtils
.
startActivity
(
getActivity
(),
SendTicketActivity
.
class
);
break
;
case
C
.
MENU
.
MENU_STATISTICS
:
//统计
ActivityUtils
.
startActivity
(
getActivity
(),
StatisticsActivity
.
class
);
...
...
app/src/main/java/com/xingdata/zzdpos/ui/sendTicke/SendTicketPresenter.java
deleted
100644 → 0
View file @
07b4b57f
package
com
.
xingdata
.
zzdpos
.
ui
.
sendTicke
;
import
com.xingdata.zzdpos.ui.sendTicke.fragment.SendTickerIndexFragment
;
/**
* Created by Administrator on 2017/11/24.
*/
public
class
SendTicketPresenter
extends
SendTicketContract
.
Presenter
{
public
SendTickerIndexFragment
sendTickerIndexFragment
=
new
SendTickerIndexFragment
();
@Override
public
void
onAttached
()
{
}
}
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTickerC.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
;
import
com.xingdata.zzdpos.model.Level
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by Administrator on 2017/12/25.
*/
public
class
SendTickerC
{
public
static
List
<
Level
>
vipTypeList
;
public
static
List
<
Level
>
getVipType
()
{
if
(
vipTypeList
==
null
)
{
vipTypeList
=
new
ArrayList
<>();
Level
vipType
=
new
Level
();
vipType
.
setId
(
10000
l
);
vipType
.
setVipLevelName
(
"全部会员"
);
Level
vipTypeNowMonth
=
new
Level
();
vipTypeNowMonth
.
setId
(
10001
l
);
vipTypeNowMonth
.
setVipLevelName
(
"本月生日"
);
Level
vipTypeNextMonth
=
new
Level
();
vipTypeNextMonth
.
setId
(
10002
l
);
vipTypeNextMonth
.
setVipLevelName
(
"下月生日"
);
Level
vipTypeLoss
=
new
Level
();
vipTypeLoss
.
setId
(
10003
l
);
vipTypeLoss
.
setVipLevelName
(
"流失会员"
);
vipTypeList
.
add
(
vipType
);
vipTypeList
.
add
(
vipTypeNowMonth
);
vipTypeList
.
add
(
vipTypeNextMonth
);
vipTypeList
.
add
(
vipTypeLoss
);
}
return
vipTypeList
;
}
}
app/src/main/java/com/xingdata/zzdpos/ui/send
T
icke/SendTicketActivity.java
→
app/src/main/java/com/xingdata/zzdpos/ui/send
t
icke/SendTicketActivity.java
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
send
T
icke
;
package
com
.
xingdata
.
zzdpos
.
ui
.
send
t
icke
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.databinding.ActivitySendTicketBinding
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Trule
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
java.util.List
;
public
class
SendTicketActivity
extends
BaseActivity
<
SendTicketPresenter
,
ActivitySendTicketBinding
>
implements
SendTicketContract
.
View
{
...
...
@@ -30,7 +35,25 @@ public class SendTicketActivity extends BaseActivity<SendTicketPresenter,
ToastUtils
.
showLong
(
errorMsg
);
}
@Override
public
void
loadVips
(
List
<
Vip
>
vips
)
{
mPresenter
.
vipFragment
.
loadVips
(
vips
);
}
@Override
public
void
loadVip
(
Vip
vip
)
{
// mPresenter.vipFragment.loadVip(vip);
}
@Override
public
void
truleQuerySucc
(
Pager
<
Trule
>
trulePager
,
LoadingDialog
loadingDialog
)
{
mPresenter
.
sendTickerFragment
.
truleQuerySucc
(
trulePager
,
loadingDialog
);
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
}
private
void
closeLoading
(
LoadingDialog
loadingDialog
)
{
if
(
loadingDialog
!=
null
)
{
loadingDialog
.
dismiss
();
...
...
app/src/main/java/com/xingdata/zzdpos/ui/send
T
icke/SendTicketContract.java
→
app/src/main/java/com/xingdata/zzdpos/ui/send
t
icke/SendTicketContract.java
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
send
T
icke
;
package
com
.
xingdata
.
zzdpos
.
ui
.
send
t
icke
;
import
com.xingdata.zzdpos.base.BasePresenter
;
import
com.xingdata.zzdpos.base.BaseView
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Trule
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
java.util.List
;
/**
* Created by Administrator on 2017/11/24.
...
...
@@ -13,10 +18,39 @@ public interface SendTicketContract {
interface
View
extends
BaseView
{
void
error
(
String
errorMsg
,
LoadingDialog
loadingDialog
);
/**
* 加载会员列表
*
* @param vips 会员列表
*/
void
loadVips
(
List
<
Vip
>
vips
);
/**
* 加载会员信息
*
* @param vip 会员信息
*/
void
loadVip
(
Vip
vip
);
void
truleQuerySucc
(
Pager
<
Trule
>
trulePager
,
LoadingDialog
loadingDialog
);
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
/**
* 会员页面 - 选择会员
*
* @param vip 会员
*/
public
abstract
void
selectVip
(
Vip
vip
);
/**
* 会员界面 - 查找会员
*
* @param keyword 搜索关键字
*/
public
abstract
void
searchVip
(
String
keyword
);
abstract
void
truleQuery
(
LoadingDialog
loadingDialog
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/SendTicketPresenter.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.sendticke.fragment.SendTickerFragment
;
import
com.xingdata.zzdpos.ui.sendticke.fragment.SendTickerIndexFragment
;
import
com.xingdata.zzdpos.ui.sendticke.fragment.VipFragment
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by Administrator on 2017/11/24.
*/
public
class
SendTicketPresenter
extends
SendTicketContract
.
Presenter
{
public
SendTickerIndexFragment
sendTickerIndexFragment
=
new
SendTickerIndexFragment
();
public
VipFragment
vipFragment
=
new
VipFragment
();
public
SendTickerFragment
sendTickerFragment
=
new
SendTickerFragment
();
/**
* 当前会员
*/
private
Vip
mVip
;
@Override
public
void
onAttached
()
{
}
@Override
public
void
selectVip
(
Vip
vip
)
{
mVip
=
vip
;
mView
.
loadVip
(
mVip
);
}
@Override
public
void
searchVip
(
String
keyword
)
{
ApiFactory
.
User
.
queryUserDetailByKeyword
(
keyword
).
subscribe
(
vip
->
{
List
<
Vip
>
vips
=
new
ArrayList
<>();
vips
.
add
(
vip
);
mView
.
loadVips
(
vips
);
},
throwable
->
{
});
}
@Override
public
void
truleQuery
(
LoadingDialog
loadingDialog
)
{
ApiFactory
.
TRULE
.
truleQuery
().
subscribe
(
pager
->
{
mView
.
truleQuerySucc
(
pager
,
loadingDialog
);
},
throwable
->
{
mView
.
error
(
throwable
.
getMessage
(),
loadingDialog
);
});
}
}
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/adapter/ReturnTicketAdapter.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
.
adapter
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemReturnTicketBinding
;
import
com.xingdata.zzdpos.model.Trule
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketActivity
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
public
class
ReturnTicketAdapter
extends
BaseAdapter
<
Trule
,
ItemReturnTicketBinding
>
{
SendTicketPresenter
mPersenter
;
SendTicketActivity
sendTicketActivity
;
public
ReturnTicketAdapter
(
@Nullable
List
<
Trule
>
data
,
SendTicketPresenter
mPersenter
,
SendTicketActivity
sendTicketActivity
)
{
super
(
R
.
layout
.
item_return_ticket
,
data
);
this
.
mPersenter
=
mPersenter
;
this
.
sendTicketActivity
=
sendTicketActivity
;
}
@Override
protected
void
convert
(
ItemReturnTicketBinding
mViewBinding
,
Trule
item
)
{
if
(
item
.
isSelect
())
{
mViewBinding
.
ivSelect
.
setImageResource
(
R
.
mipmap
.
but_elect01_stroke
);
}
else
{
mViewBinding
.
ivSelect
.
setImageResource
(
R
.
mipmap
.
but_elect02_stroke
);
}
mViewBinding
.
ivSelect
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvTicketMoney
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
tv_money
,
ConvertUtil
.
fenToYuanNoPoint
(
item
.
getTruleValAmt
())));
mViewBinding
.
tvTicketMoneys
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
money
,
ConvertUtil
.
fenToYuanNoPoint
(
item
.
getTruleValAmt
())));
mViewBinding
.
tvRule
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
tv_rule
,
ConvertUtil
.
fenToYuanNoPoint
(
item
.
getTruleOrderAmt
())));
mViewBinding
.
tvDate
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
tv_date
,
TimeUtils
.
millis2String
(
item
.
getTruleExp
(),
new
SimpleDateFormat
(
"yyy-mm-dd"
))));
}
}
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/adapter/VipAdapter.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
.
adapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemSettleVipBinding
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
java.util.ArrayList
;
public
class
VipAdapter
extends
BaseAdapter
<
Vip
,
ItemSettleVipBinding
>
{
public
VipAdapter
()
{
super
(
R
.
layout
.
item_settle_vip
,
new
ArrayList
<>());
}
@Override
protected
void
convert
(
ItemSettleVipBinding
mViewBinding
,
Vip
item
)
{
mViewBinding
.
setName
(
item
.
getVipName
());
mViewBinding
.
setPhone
(
ConvertUtil
.
longToString
(
item
.
getVipMobile
()));
if
(
item
.
getVipDefDiscount
()
<
100
&&
item
.
getVipDefDiscount
()
>
0
)
{
mViewBinding
.
setDisRate
(
String
.
valueOf
((
double
)
item
.
getVipDefDiscount
()
/
10
));
}
switch
(
item
.
getVipLevel
())
{
case
1
:
mViewBinding
.
ivLevel
.
setImageResource
(
R
.
mipmap
.
mk_grade01
);
break
;
case
2
:
mViewBinding
.
ivLevel
.
setImageResource
(
R
.
mipmap
.
mk_grade02
);
break
;
case
3
:
mViewBinding
.
ivLevel
.
setImageResource
(
R
.
mipmap
.
mk_grade03
);
break
;
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/adapter/VipGroupAdapter.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
.
adapter
;
import
android.content.res.Resources
;
import
android.graphics.drawable.Drawable
;
import
android.view.View
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemVipGroupBinding
;
import
com.xingdata.zzdpos.model.Level
;
import
java.util.ArrayList
;
public
class
VipGroupAdapter
extends
BaseAdapter
<
Level
,
ItemVipGroupBinding
>
{
public
VipGroupAdapter
()
{
super
(
R
.
layout
.
item_vip_group
,
new
ArrayList
<>());
}
@Override
protected
void
convert
(
ItemVipGroupBinding
mViewBinding
,
Level
item
)
{
mViewBinding
.
tvItem
.
setText
(
item
.
getPickerViewText
());
mViewBinding
.
tvItemSelect
.
setText
(
item
.
getPickerViewText
());
if
(
item
.
isSelect
())
{
mViewBinding
.
tvItem
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvItemSelect
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
mViewBinding
.
tvItem
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvItemSelect
.
setVisibility
(
View
.
GONE
);
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/SendTickerFragment.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
.
fragment
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentSendTickerBinding
;
import
com.xingdata.zzdpos.db.DBFactory
;
import
com.xingdata.zzdpos.model.Level
;
import
com.xingdata.zzdpos.model.Pager
;
import
com.xingdata.zzdpos.model.Trule
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.sendticke.SendTickerC
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketActivity
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.ui.sendticke.adapter.ReturnTicketAdapter
;
import
com.xingdata.zzdpos.ui.sendticke.adapter.VipGroupAdapter
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.RecyclerViewUtil
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.realm.RealmResults
;
public
class
SendTickerFragment
extends
BaseFragment
<
SendTicketPresenter
,
FragmentSendTickerBinding
>
{
//0单个会员发券,1按会员类型发券
private
int
nowtype
=
-
1
;
//当前单个会员发券操作对象
private
Vip
nowVip
;
//当前组别发券组
private
List
<
Level
>
levelList
=
new
ArrayList
<>();
ReturnTicketAdapter
returnTicketAdapter
;
VipGroupAdapter
vipGroupAdapter
;
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
//当前优惠券点击的item id
int
nowTickerItemId
=
-
1
;
List
<
Trule
>
truleList
=
new
ArrayList
<>();
//当前选中会员组别Item ID
int
nowVipGroupId
=
0
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_send_ticker
;
}
@Override
public
void
initView
()
{
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
truleQuery
(
loadingDialog
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"发券"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
pop
();
}
});
returnTicketAdapter
=
new
ReturnTicketAdapter
(
new
ArrayList
<>(),
mPresenter
,
(
SendTicketActivity
)
getActivity
());
vipGroupAdapter
=
new
VipGroupAdapter
();
mViewBinding
.
rlTicker
.
setAdapter
(
returnTicketAdapter
);
LinearLayoutManager
linearLayoutManager
=
new
LinearLayoutManager
(
getActivity
());
linearLayoutManager
.
setOrientation
(
LinearLayoutManager
.
VERTICAL
);
mViewBinding
.
rlTicker
.
setLayoutManager
(
linearLayoutManager
);
if
(
nowtype
==
0
)
{
initOneVipData
();
}
else
if
(
nowtype
==
1
)
{
initVipGroupData
();
}
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
ll_vip_single
:
{
mPresenter
.
vipFragment
=
new
VipFragment
();
startWithPop
(
mPresenter
.
vipFragment
);
}
break
;
case
R
.
id
.
btn_send
:
{
if
(
isNull
())
{
ToastUtils
.
showLong
(
"发券"
);
}
}
break
;
default
:
{
}
break
;
}
}
});
vipGroupAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
levelList
.
get
(
nowVipGroupId
).
setSelect
(
false
);
nowVipGroupId
=
position
;
levelList
.
get
(
nowVipGroupId
).
setSelect
(
true
);
vipGroupAdapter
.
notifyDataSetChanged
();
mViewBinding
.
tvSelect
.
setText
(
levelList
.
get
(
position
).
getVipLevelName
());
}
});
returnTicketAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
if
(
nowTickerItemId
>=
0
)
{
truleList
.
get
(
nowTickerItemId
).
setSelect
(
false
);
}
nowTickerItemId
=
position
;
truleList
.
get
(
nowTickerItemId
).
setSelect
(
true
);
returnTicketAdapter
.
notifyDataSetChanged
();
}
});
}
private
void
initOneVipData
()
{
mViewBinding
.
tvSelect
.
setText
(
""
);
mViewBinding
.
llVipSingle
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
llAll
.
setVisibility
(
View
.
GONE
);
if
(
nowVip
!=
null
)
{
mViewBinding
.
tvSelect
.
setText
(
nowVip
.
getVipName
());
mViewBinding
.
setName
(
nowVip
.
getVipName
());
mViewBinding
.
setPhone
(
ConvertUtil
.
longToString
(
nowVip
.
getVipMobile
()));
if
(
nowVip
.
getVipDefDiscount
()
<
100
&&
nowVip
.
getVipDefDiscount
()
>
0
)
{
mViewBinding
.
setDisRate
(
String
.
valueOf
((
double
)
nowVip
.
getVipDefDiscount
()
/
10
));
}
switch
(
nowVip
.
getVipLevel
())
{
case
1
:
mViewBinding
.
ivLevel
.
setImageResource
(
R
.
mipmap
.
mk_grade01
);
break
;
case
2
:
mViewBinding
.
ivLevel
.
setImageResource
(
R
.
mipmap
.
mk_grade02
);
break
;
case
3
:
mViewBinding
.
ivLevel
.
setImageResource
(
R
.
mipmap
.
mk_grade03
);
break
;
}
}
else
{
LogUtils
.
e
(
"nowVip为null"
);
ToastUtils
.
showLong
(
"nowVip为null"
);
}
}
private
void
initVipGroupData
()
{
mViewBinding
.
llVipSingle
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
llAll
.
setVisibility
(
View
.
VISIBLE
);
RealmResults
<
Level
>
levels
=
DBFactory
.
getRealm
().
where
(
Level
.
class
).
findAll
();
levelList
=
new
ArrayList
<>();
SendTickerC
.
getVipType
().
get
(
0
).
setSelect
(
true
);
levelList
.
add
(
SendTickerC
.
getVipType
().
get
(
0
));
for
(
int
i
=
0
;
i
<
levels
.
size
();
i
++)
{
levelList
.
add
(
levels
.
get
(
i
));
}
for
(
int
i
=
1
;
i
<
SendTickerC
.
getVipType
().
size
();
i
++)
{
levelList
.
add
(
SendTickerC
.
getVipType
().
get
(
i
));
}
mViewBinding
.
tvSelect
.
setText
(
levelList
.
get
(
nowVipGroupId
).
getVipLevelName
());
mViewBinding
.
vipType
.
setAdapter
(
vipGroupAdapter
);
mViewBinding
.
vipType
.
setLayoutManager
(
new
GridLayoutManager
(
mContext
,
3
));
final
int
SPACING
=
mContext
.
getResources
().
getDimensionPixelOffset
(
R
.
dimen
.
ticker_vip_three_item_spacing
);
mViewBinding
.
vipType
.
addItemDecoration
(
new
RecyclerViewUtil
.
GridSpacingItemDecoration
(
3
,
SPACING
,
true
));
vipGroupAdapter
.
setNewData
(
levelList
);
}
public
void
truleQuerySucc
(
Pager
<
Trule
>
trulePager
,
LoadingDialog
loadingDialog
)
{
closeLoading
(
loadingDialog
);
if
(
trulePager
==
null
||
trulePager
.
getList
()
==
null
||
trulePager
.
getList
().
size
()
<=
0
)
{
mViewBinding
.
tvEmpty
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
rlTicker
.
setVisibility
(
View
.
GONE
);
}
if
(
trulePager
!=
null
&&
trulePager
.
getList
()
!=
null
)
{
truleList
=
trulePager
.
getList
();
mViewBinding
.
tvEmpty
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
rlTicker
.
setVisibility
(
View
.
VISIBLE
);
returnTicketAdapter
.
setNewData
(
trulePager
.
getList
());
}
}
/**
* 0单个会员发券,1按会员类型发券
*
* @param type
*/
public
void
setNowtype
(
int
type
)
{
this
.
nowtype
=
type
;
}
public
void
setNowVip
(
Vip
nowVip
)
{
this
.
nowVip
=
nowVip
;
}
private
void
closeLoading
(
LoadingDialog
loadingDialog
)
{
if
(
loadingDialog
!=
null
)
{
loadingDialog
.
dismiss
();
}
}
private
boolean
isNull
()
{
if
(
nowtype
==
0
)
{
//单个会员发券
if
(
null
==
nowVip
||
nowTickerItemId
<
0
)
{
ToastUtils
.
showLong
(
"请选择会员或优惠券"
);
return
false
;
}
}
else
if
(
nowtype
==
1
)
{
//分组发券
if
(
nowTickerItemId
<
0
)
{
ToastUtils
.
showLong
(
"请选择优惠券"
);
return
false
;
}
}
return
true
;
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/send
T
icke/fragment/SendTickerIndexFragment.java
→
app/src/main/java/com/xingdata/zzdpos/ui/send
t
icke/fragment/SendTickerIndexFragment.java
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
send
T
icke
.
fragment
;
package
com
.
xingdata
.
zzdpos
.
ui
.
send
t
icke
.
fragment
;
import
android.view.View
;
...
...
@@ -8,7 +8,7 @@ import com.xingdata.zzdpos.base.BaseFragment;
import
com.xingdata.zzdpos.databinding.FragmentSendTickerMainBinding
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.send
T
icke.SendTicketPresenter
;
import
com.xingdata.zzdpos.ui.send
t
icke.SendTicketPresenter
;
import
com.xingdata.zzdpos.util.OnClickListener
;
public
class
SendTickerIndexFragment
extends
BaseFragment
<
SendTicketPresenter
,
...
...
@@ -21,13 +21,35 @@ public class SendTickerIndexFragment extends BaseFragment<SendTicketPresenter,
@Override
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"
积分规则
"
);
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"
发券
"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
ActivityUtils
.
finishActivity
(
IntegralActivity
.
class
);
}
});
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
ll_one
:
{
mPresenter
.
vipFragment
=
new
VipFragment
();
start
(
mPresenter
.
vipFragment
);
}
break
;
case
R
.
id
.
ll_all
:
{
mPresenter
.
sendTickerFragment
=
new
SendTickerFragment
();
mPresenter
.
sendTickerFragment
.
setNowtype
(
1
);
start
(
mPresenter
.
sendTickerFragment
);
}
break
;
default
:
{
}
break
;
}
}
});
}
...
...
@@ -36,4 +58,4 @@ public class SendTickerIndexFragment extends BaseFragment<SendTicketPresenter,
loadingDialog
.
dismiss
();
}
}
}
}
\ No newline at end of file
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/VipFragment.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
sendticke
.
fragment
;
import
android.annotation.SuppressLint
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.KeyboardUtils
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentSendTickerVipBinding
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.ui.sendticke.adapter.VipAdapter
;
import
com.xingdata.zzdpos.ui.settle.SettleActivity
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.util.List
;
public
class
VipFragment
extends
BaseFragment
<
SendTicketPresenter
,
FragmentSendTickerVipBinding
>
{
private
VipAdapter
mVipAdapter
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_send_ticker_vip
;
}
@Override
public
void
initView
()
{
mViewBinding
.
setEmpty
(
true
);
mVipAdapter
=
new
VipAdapter
();
mViewBinding
.
rlVip
.
setAdapter
(
mVipAdapter
);
mViewBinding
.
rlVip
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
@SuppressLint
(
"InflateParams"
)
View
emptyView
=
getLayoutInflater
().
inflate
(
R
.
layout
.
view_empty
,
null
);
((
TextView
)
emptyView
.
findViewById
(
R
.
id
.
tv_empty
)).
setText
(
R
.
string
.
settle_vip_search_empty
);
mVipAdapter
.
setEmptyView
(
emptyView
);
mVipAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
mPresenter
.
selectVip
(
mVipAdapter
.
getData
().
get
(
position
));
mPresenter
.
sendTickerFragment
=
new
SendTickerFragment
();
mPresenter
.
sendTickerFragment
.
setNowtype
(
0
);
mPresenter
.
sendTickerFragment
.
setNowVip
(
mVipAdapter
.
getData
().
get
(
position
));
startWithPop
(
mPresenter
.
sendTickerFragment
);
});
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_back
:
{
pop
();
}
break
;
default
:
{
}
break
;
}
}
});
mViewBinding
.
etSearch
.
setOnEditorActionListener
((
textView
,
i
,
keyEvent
)
->
{
KeyboardUtils
.
hideSoftInput
(
textView
);
mPresenter
.
searchVip
(
textView
.
getText
().
toString
());
return
false
;
});
}
/**
* 加载会员信息
*
* @param vips 会员列表
*/
public
void
loadVips
(
List
<
Vip
>
vips
)
{
mViewBinding
.
setEmpty
(
vips
.
size
()
==
0
);
mVipAdapter
.
setNewData
(
vips
);
}
@Override
public
void
onDestroyView
()
{
if
(
getActivity
()
instanceof
SettleActivity
)
{
((
SettleActivity
)
getActivity
()).
showTitleBarByTitleMode
(
C
.
TITLE_MODE
.
TEXT
);
}
super
.
onDestroyView
();
}
}
app/src/main/java/com/xingdata/zzdpos/ui/settle/adapter/ReturnTicketAdapter.java
0 → 100644
View file @
4abb5f41
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
.
adapter
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemReturnTicketBinding
;
import
com.xingdata.zzdpos.model.Trule
;
import
com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketActivity
;
import
com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter
;
import
com.xingdata.zzdpos.ui.marketing.ticket.fragment.TickerAddFragment
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
public
class
ReturnTicketAdapter
extends
BaseAdapter
<
Trule
,
ItemReturnTicketBinding
>
{
ReturnTicketPresenter
mPersenter
;
ReturnTicketActivity
returnTicketActivity
;
public
ReturnTicketAdapter
(
@Nullable
List
<
Trule
>
data
,
ReturnTicketPresenter
mPersenter
,
ReturnTicketActivity
returnTicketActivity
)
{
super
(
R
.
layout
.
item_return_ticket
,
data
);
this
.
mPersenter
=
mPersenter
;
this
.
returnTicketActivity
=
returnTicketActivity
;
}
@Override
protected
void
convert
(
ItemReturnTicketBinding
mViewBinding
,
Trule
item
)
{
mViewBinding
.
tvTicketMoney
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
tv_money
,
ConvertUtil
.
fenToYuanNoPoint
(
item
.
getTruleValAmt
())));
mViewBinding
.
tvTicketMoneys
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
money
,
ConvertUtil
.
fenToYuanNoPoint
(
item
.
getTruleValAmt
())));
mViewBinding
.
tvRule
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
tv_rule
,
ConvertUtil
.
fenToYuanNoPoint
(
item
.
getTruleOrderAmt
())));
mViewBinding
.
tvDate
.
setText
(
mContext
.
getResources
().
getString
(
R
.
string
.
tv_date
,
TimeUtils
.
millis2String
(
item
.
getTruleExp
(),
new
SimpleDateFormat
(
"yyy-mm-dd"
))));
mViewBinding
.
clSend
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
// ToastUtils.showLong("发券");
}
});
mViewBinding
.
clItem
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
mPersenter
.
tickerAddFragment
=
new
TickerAddFragment
();
mPersenter
.
tickerAddFragment
.
setNowType
(
2
);
mPersenter
.
tickerAddFragment
.
editTicketData
(
item
);
returnTicketActivity
.
start
(
mPersenter
.
tickerAddFragment
);
}
});
}
}
app/src/main/res/drawable/black_border.xml
→
app/src/main/res/drawable/black_border
_thr
.xml
View file @
4abb5f41
...
...
@@ -5,7 +5,7 @@
<stroke
android:width=
"
0.5
dp"
android:width=
"
1
dp"
android:color=
"@color/black"
/>
<solid
android:color=
"@color/all_transparent"
/>
...
...
app/src/main/res/drawable/red_border_thr.xml
0 → 100644
View file @
4abb5f41
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/all_shape_radius"
/>
<stroke
android:width=
"1dp"
android:color=
"@color/red_guanyu"
/>
<solid
android:color=
"@color/all_transparent"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/fragment_send_ticker.xml
0 → 100644
View file @
4abb5f41
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"empty"
type=
"boolean"
/>
<variable
name=
"OnClickListener"
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
<variable
name=
"titleMode"
type=
"int"
/>
<variable
name=
"name"
type=
"String"
/>
<variable
name=
"phone"
type=
"String"
/>
<variable
name=
"disRate"
type=
"String"
/>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
>
<LinearLayout
android:id=
"@+id/ll_top"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
<LinearLayout
android:id=
"@+id/ll_vip_single"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1.2"
android:onClick=
"@{OnClickListener}"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_huanggai"
/>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_vip"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/all_padding"
android:background=
"@color/white_caocao"
android:foreground=
"?android:attr/selectableItemBackground"
>
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/iv_head"
android:layout_width=
"@dimen/settle_vip_head"
android:layout_height=
"@dimen/settle_vip_head"
android:layout_marginStart=
"@dimen/all_margin"
app:backgroundImage=
"@color/white_caocao"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"parent"
app:placeholderImage=
"@mipmap/icon_menu_service_1"
app:roundAsCircle=
"true"
app:roundingBorderColor=
"@color/gray_huanggai"
app:roundingBorderWidth=
"@dimen/all_line_width"
/>
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/iv_level"
android:layout_width=
"@dimen/settle_vip_level"
android:layout_height=
"@dimen/settle_vip_level"
app:layout_constraintBottom_toBottomOf=
"@id/iv_head"
app:layout_constraintRight_toRightOf=
"@id/iv_head"
app:roundAsCircle=
"true"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/all_margin"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@id/iv_head"
app:layout_constraintTop_toBottomOf=
"parent"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{name}"
android:textColor=
"@color/black_zhangfei"
android:textSize=
"@dimen/all_text_size"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{phone}"
android:textColor=
"@color/black_likui"
android:textSize=
"@dimen/all_caption_size"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_spacing"
android:text=
"@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}"
android:textColor=
"@color/black_zhangfei"
android:textSize=
"@dimen/all_caption_size"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/cb_point"
app:layout_constraintTop_toBottomOf=
"parent"
/>
<CheckBox
android:id=
"@+id/cb_point"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_margin"
android:button=
"@mipmap/but_elect02"
android:contentDescription=
"@string/settle_balance"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"parent"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_all"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"2"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/vip_type"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_ticker"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"9"
android:paddingLeft=
"@dimen/all_padding"
android:paddingRight=
"@dimen/all_padding"
/>
<TextView
android:id=
"@+id/tv_empty"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"9"
android:background=
"@color/appBack"
android:drawableTop=
"@mipmap/icon_things_null"
android:gravity=
"center"
android:padding=
"100dp"
android:text=
"@string/empty_other_select"
android:textColor=
"@color/white_half"
android:textSize=
"@dimen/all_text_size_big"
android:visibility=
"gone"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:layout_alignParentBottom=
"true"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_select"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"3"
android:gravity=
"center|left"
android:text=
"白金会员"
android:textSize=
"@dimen/et_textsize"
/>
<Button
android:id=
"@+id/btn_send"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@drawable/red_border_allradius"
android:text=
"发券"
android:onClick=
"@{OnClickListener}"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_send_ticker_main.xml
View file @
4abb5f41
...
...
@@ -26,6 +26,7 @@
android:layout_marginTop=
"@dimen/all_padding"
android:background=
"@color/white"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/all_margin"
app:layout_constraintTop_toBottomOf=
"@+id/ic_title"
>
...
...
@@ -60,6 +61,7 @@
android:layout_marginTop=
"@dimen/all_padding"
android:background=
"@color/white"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/all_margin"
app:layout_constraintTop_toBottomOf=
"@+id/ll_one"
>
...
...
app/src/main/res/layout/fragment_send_ticker_vip.xml
0 → 100644
View file @
4abb5f41
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"empty"
type=
"boolean"
/>
<variable
name=
"OnClickListener"
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
<variable
name=
"titleMode"
type=
"int"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_huanggai"
/>
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/white_caocao"
>
<ImageButton
android:id=
"@+id/btn_back"
android:layout_width=
"@dimen/title_height"
android:layout_height=
"match_parent"
android:background=
"?attr/selectableItemBackground"
android:contentDescription=
"@string/all_go_back"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:padding=
"@dimen/all_margin"
android:src=
"@mipmap/back_black"
app:layout_constraintLeft_toLeftOf=
"parent"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginEnd=
"@dimen/all_margin"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@id/btn_back"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"parent"
>
<EditText
android:id=
"@+id/et_search"
style=
"@style/searchBarEditor"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:inputType=
"number"
android:textColor=
"@color/black_likui"
android:textColorHint=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginBottom=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
android:visibility=
"@{empty?View.GONE:View.VISIBLE}"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_vip"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_return_ticket.xml
View file @
4abb5f41
...
...
@@ -9,133 +9,147 @@
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_margin"
android:orientation=
"horizontal"
>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_item"
android:layout_width=
"0dp"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_padding"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2.3"
>
android:layout_marginTop=
"@dimen/all_padding"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_item"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:
background=
"@mipmap/return_ticket_one"
/
>
android:
layout_weight=
"2.3"
>
<LinearLayout
android:id=
"@+id/ll_top"
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@mipmap/return_ticket_one"
/>
<LinearLayout
android:id=
"@+id/ll_top"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:gravity=
"center"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
app:layout_constraintBottom_toTopOf=
"@id/ll_bottom"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_weight=
"4"
>
<ImageView
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"right"
android:layout_weight=
"1.8"
android:src=
"@mipmap/bg_return_ticker_logo"
/>
<TextView
android:id=
"@+id/tv_ticket_money"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"5"
android:gravity=
"center"
android:text=
"@string/tv_money"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_secondary_title"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_top"
app:layout_constraintVertical_weight=
"2"
>
<TextView
android:id=
"@+id/tv_date"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/all_margin"
android:text=
"@string/tv_date"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_send"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:gravity=
"center"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
app:layout_constraintBottom_toTopOf=
"@id/ll_bottom"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_weight=
"4"
>
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<ImageView
android:layout_width=
"
0dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"match_parent"
android:layout_gravity=
"right"
android:layout_weight=
"1.8"
android:src=
"@mipmap/bg_return_ticker_logo"
/>
android:background=
"@mipmap/return_ticket_two"
/>
<TextView
android:id=
"@+id/tv_ticket_money"
android:id=
"@+id/tv_ticket_money
s
"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"5"
android:layout_height=
"0dp"
android:gravity=
"center"
android:text=
"@string/
tv_
money"
android:text=
"@string/money"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_secondary_title"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_bottom"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_top"
app:layout_constraintVertical_weight=
"2"
>
android:textSize=
"@dimen/text_primary_title_smile"
android:textStyle=
"bold"
app:layout_constraintBottom_toTopOf=
"@+id/vw_line"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:id=
"@+id/vw_line"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gray1"
app:layout_constraintBottom_toTopOf=
"@id/tv_rule"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/tv_ticket_moneys"
></View>
<TextView
android:id=
"@+id/tv_
dat
e"
android:layout_width=
"
match_parent
"
android:id=
"@+id/tv_
rul
e"
android:layout_width=
"
0dp
"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/all_margin"
android:text=
"@string/tv_date"
android:gravity=
"center"
android:text=
"@string/tv_rule"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/cl_send"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"@mipmap/return_ticket_two"
/>
<TextView
android:id=
"@+id/tv_ticket_moneys"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:gravity=
"center"
android:text=
"@string/money"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_primary_title_smile"
android:textStyle=
"bold"
app:layout_constraintBottom_toTopOf=
"@+id/vw_line"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:id=
"@+id/vw_line"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gray1"
app:layout_constraintBottom_toTopOf=
"@id/tv_rule"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/tv_ticket_moneys"
></View>
<TextView
android:id=
"@+id/tv_rule"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:gravity=
"center"
android:text=
"@string/tv_rule"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/vw_line"
/>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
android:textSize=
"@dimen/et_textsize"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/vw_line"
/>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_select"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:visibility=
"gone"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"@dimen/all_margin"
android:src=
"@mipmap/but_elect02_stroke"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_vip_group.xml
0 → 100644
View file @
4abb5f41
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"OnClickListener"
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
</data>
<LinearLayout
android:id=
"@+id/cl_vip"
android:layout_width=
"115dp"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/black_border_thr"
android:gravity=
"center"
android:maxEms=
"4"
android:maxLength=
"4"
android:padding=
"@dimen/all_padding"
android:singleLine=
"true"
android:text=
"全部会员"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_item_select"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/red_border_thr"
android:gravity=
"center"
android:maxEms=
"4"
android:maxLength=
"4"
android:padding=
"@dimen/all_padding"
android:singleLine=
"true"
android:text=
"全部会员"
android:textColor=
"@color/red_guanyu"
android:textSize=
"@dimen/et_textsize"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
</layout>
app/src/main/res/mipmap-hdpi/but_elect01_stroke.png
0 → 100644
View file @
4abb5f41
2.36 KB
app/src/main/res/mipmap-hdpi/but_elect02_stroke.png
0 → 100644
View file @
4abb5f41
2.26 KB
app/src/main/res/values/dimens.xml
View file @
4abb5f41
...
...
@@ -166,6 +166,7 @@
<dimen
name=
"vip_message_view_height_big"
>
110dp
</dimen>
<dimen
name=
"vip_message_item_spacing"
>
8dp
</dimen>
<integer
name=
"vip_message_item_span_count"
>
4
</integer>
<!--积分规则-->
<dimen
name=
"cl_padding"
>
40dp
</dimen>
...
...
@@ -173,6 +174,7 @@
<dimen
name=
"fragment_detail_padding_end"
>
50dp
</dimen>
<!--优惠券-->
<dimen
name=
"et_text_mini"
>
13sp
</dimen>
<dimen
name=
"ticker_vip_three_item_spacing"
>
12dp
</dimen>
<!--商品组合-->
<dimen
name=
"image_margin"
>
30dp
</dimen>
<dimen
name=
"textview_width"
>
75dp
</dimen>
...
...
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